bitmovin-player 8.280.0 → 8.281.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bitmovinplayer-serviceworker.js +2 -2
- package/bitmovinplayer-serviceworker.prod.js +2 -2
- package/bitmovinplayer-ui.js +1 -1
- package/bitmovinplayer.js +2 -2
- package/bitmovinplayer.prod.js +2 -2
- package/modules/bitmovinplayer-abr.js +2 -2
- package/modules/bitmovinplayer-abr.prod.js +2 -2
- package/modules/bitmovinplayer-advertising-bitmovin.js +2 -2
- package/modules/bitmovinplayer-advertising-bitmovin.prod.js +2 -2
- package/modules/bitmovinplayer-advertising-core.js +2 -2
- package/modules/bitmovinplayer-advertising-core.prod.js +2 -2
- package/modules/bitmovinplayer-advertising-ima.js +2 -2
- package/modules/bitmovinplayer-advertising-ima.prod.js +2 -2
- package/modules/bitmovinplayer-advertising-omsdk.js +2 -2
- package/modules/bitmovinplayer-advertising-omsdk.prod.js +2 -2
- package/modules/bitmovinplayer-analytics.js +2 -2
- package/modules/bitmovinplayer-analytics.prod.js +2 -2
- package/modules/bitmovinplayer-container-mp4.js +2 -2
- package/modules/bitmovinplayer-container-mp4.prod.js +2 -2
- package/modules/bitmovinplayer-container-ts.js +2 -2
- package/modules/bitmovinplayer-container-ts.prod.js +2 -2
- package/modules/bitmovinplayer-container-webm.js +2 -2
- package/modules/bitmovinplayer-container-webm.prod.js +2 -2
- package/modules/bitmovinplayer-core.js +2 -2
- package/modules/bitmovinplayer-core.prod.js +2 -2
- package/modules/bitmovinplayer-crypto.js +2 -2
- package/modules/bitmovinplayer-crypto.prod.js +2 -2
- package/modules/bitmovinplayer-dash.js +2 -2
- package/modules/bitmovinplayer-dash.prod.js +2 -2
- package/modules/bitmovinplayer-drm.js +2 -2
- package/modules/bitmovinplayer-drm.prod.js +2 -2
- package/modules/bitmovinplayer-engine-bitmovin.js +2 -2
- package/modules/bitmovinplayer-engine-bitmovin.prod.js +2 -2
- package/modules/bitmovinplayer-engine-native.js +2 -2
- package/modules/bitmovinplayer-engine-native.prod.js +2 -2
- package/modules/bitmovinplayer-engine-webrtc.js +2 -2
- package/modules/bitmovinplayer-engine-webrtc.prod.js +2 -2
- package/modules/bitmovinplayer-envivio.js +1 -1
- package/modules/bitmovinplayer-envivio.prod.js +1 -1
- package/modules/bitmovinplayer-hls.js +2 -2
- package/modules/bitmovinplayer-hls.prod.js +2 -2
- package/modules/bitmovinplayer-lowlatency.js +2 -2
- package/modules/bitmovinplayer-lowlatency.prod.js +2 -2
- package/modules/bitmovinplayer-mserenderer.js +2 -2
- package/modules/bitmovinplayer-mserenderer.prod.js +2 -2
- package/modules/bitmovinplayer-patch.js +1 -1
- package/modules/bitmovinplayer-patch.prod.js +1 -1
- package/modules/bitmovinplayer-playstation4.js +2 -2
- package/modules/bitmovinplayer-playstation4.prod.js +2 -2
- package/modules/bitmovinplayer-playstation5.js +2 -2
- package/modules/bitmovinplayer-playstation5.prod.js +2 -2
- package/modules/bitmovinplayer-polyfill.js +1 -1
- package/modules/bitmovinplayer-polyfill.prod.js +1 -1
- package/modules/bitmovinplayer-reactnative.js +1 -1
- package/modules/bitmovinplayer-reactnative.prod.js +1 -1
- package/modules/bitmovinplayer-remotecontrol.js +2 -2
- package/modules/bitmovinplayer-remotecontrol.prod.js +2 -2
- package/modules/bitmovinplayer-serviceworker-client.js +2 -2
- package/modules/bitmovinplayer-serviceworker-client.prod.js +2 -2
- package/modules/bitmovinplayer-serviceworker.js +2 -2
- package/modules/bitmovinplayer-serviceworker.prod.js +2 -2
- package/modules/bitmovinplayer-sgai.js +2 -2
- package/modules/bitmovinplayer-sgai.prod.js +2 -2
- package/modules/bitmovinplayer-smooth.js +2 -2
- package/modules/bitmovinplayer-smooth.prod.js +2 -2
- package/modules/bitmovinplayer-style.js +2 -2
- package/modules/bitmovinplayer-style.prod.js +2 -2
- package/modules/bitmovinplayer-subtitles-cea608.js +2 -2
- package/modules/bitmovinplayer-subtitles-cea608.prod.js +2 -2
- package/modules/bitmovinplayer-subtitles-native.js +2 -2
- package/modules/bitmovinplayer-subtitles-native.prod.js +2 -2
- package/modules/bitmovinplayer-subtitles-ttml.js +2 -2
- package/modules/bitmovinplayer-subtitles-ttml.prod.js +2 -2
- package/modules/bitmovinplayer-subtitles-vtt.js +2 -2
- package/modules/bitmovinplayer-subtitles-vtt.prod.js +2 -2
- package/modules/bitmovinplayer-subtitles.js +2 -2
- package/modules/bitmovinplayer-subtitles.prod.js +2 -2
- package/modules/bitmovinplayer-thumbnail-imp.js +2 -2
- package/modules/bitmovinplayer-thumbnail-imp.prod.js +2 -2
- package/modules/bitmovinplayer-thumbnail.js +2 -2
- package/modules/bitmovinplayer-thumbnail.prod.js +2 -2
- package/modules/bitmovinplayer-tizen.js +2 -2
- package/modules/bitmovinplayer-tizen.prod.js +2 -2
- package/modules/bitmovinplayer-ui.js +2 -2
- package/modules/bitmovinplayer-ui.prod.js +2 -2
- package/modules/bitmovinplayer-vidaa.js +2 -2
- package/modules/bitmovinplayer-vidaa.prod.js +2 -2
- package/modules/bitmovinplayer-vr.js +2 -2
- package/modules/bitmovinplayer-vr.prod.js +2 -2
- package/modules/bitmovinplayer-webos.js +2 -2
- package/modules/bitmovinplayer-webos.prod.js +2 -2
- package/modules/bitmovinplayer-wpe.js +2 -2
- package/modules/bitmovinplayer-wpe.prod.js +2 -2
- package/modules/bitmovinplayer-xml.js +1 -1
- package/modules/bitmovinplayer-xml.prod.js +1 -1
- package/package.json +1 -1
- package/types/advertising/API.d.ts +9 -0
- package/types/advertising/ConfigAPI.d.ts +6 -5
- package/types/core/BufferSettings.d.ts +58 -0
- package/types/core/LogLevels.d.ts +54 -0
- package/types/core/Logger.d.ts +51 -0
- package/types/core/Settings.d.ts +856 -0
- package/types/core/network/ManifestMimeType.d.ts +5 -0
- package/types/core/util/MimeTypeHelper.d.ts +52 -0
- package/types/sgai/SgaiConfigAPI.d.ts +1 -1
- package/types/sgai/SgaiErrorCode.d.ts +6 -1
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
* This software includes open-source components. See THIRD_PARTY_NOTICES
|
|
10
10
|
* in the distribution for details.
|
|
11
11
|
*
|
|
12
|
-
* Bitmovin Player Version 8.
|
|
12
|
+
* Bitmovin Player Version 8.281.0
|
|
13
13
|
*
|
|
14
14
|
****************************************************************************/
|
|
15
15
|
|
|
16
16
|
(function() {
|
|
17
|
-
"use strict";!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.vr=e():(t.bitmovin=t.bitmovin||{},t.bitmovin.player=t.bitmovin.player||{},t.bitmovin.player.vr=e())}(self,function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[339],{50879:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ByteBuffer=void 0;var i=function(){function t(){}return t.stringToBytes=function(t,e){e=!!e;for(var i=t.length,n=new Uint8Array(e?4*i:i),r=0,o=0;o<i;o++){var s=t.charCodeAt(o);if(e&&55296<=s&&s<=56319){if(++o>=i)throw new Error("Malformed string, low surrogate expected at position "+o);s=(55296^s)<<10|65536|56320^t.charCodeAt(o)}else if(!e&&s>>>8)throw new Error("Wide characters are not allowed.");!e||s<=127?n[r++]=s:s<=2047?(n[r++]=192|s>>6,n[r++]=128|63&s):s<=65535?(n[r++]=224|s>>12,n[r++]=128|s>>6&63,n[r++]=128|63&s):(n[r++]=240|s>>18,n[r++]=128|s>>12&63,n[r++]=128|s>>6&63,n[r++]=128|63&s)}return n.subarray(0,r)},t.bytesToHex=function(t){for(var e="",i=0;i<t.length;i++){var n=(255&t[i]).toString(16);n.length<2&&(e+="0"),e+=n}return e},t.hexToBytes=function(t){var e=t.length;1&e&&(t="0"+t,e++);for(var i=new Uint8Array(e>>1),n=0;n<e;n+=2)i[n>>1]=parseInt(t.substr(n,2),16);return i},t.base64ToBytes=function(e){return t.stringToBytes(atob(e))},t}();e.ByteBuffer=i},5357:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Cardboard=void 0;var n=i(57160),r=i(50879),o=function(){function t(){}return t.decode=function(e){return new n.ProtoBuf(r.ByteBuffer.base64ToBytes(e),t.proto).readAll()},t.proto={1:{name:"vendor",type:"string"},2:{name:"model",type:"string"},3:{name:"screen_to_lens_distance",type:"float"},4:{name:"inter_lens_distance",type:"float"},5:{name:"left_eye_field_of_view_angles",type:"float",packed:!0},11:{name:"vertical_alignment",type:{0:"bottom",1:"center",2:"top"}},6:{name:"tray_to_lens_distance",type:"float"},7:{name:"distortion_coefficients",type:"float",packed:!0},10:{name:"has_magnet",type:"boolean"},12:{name:"primary_button",type:{0:"none",1:"magnet",2:"touch",3:"indirect_touch"}},defaults:{vertical_alignment:"bottom",primary_button:"magnet"}},t}();e.Cardboard=o},7247:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.CardboardViewer=void 0;var n=i(67392),r=function(){return function(t){this.label=t.model,this.fov=t.left_eye_field_of_view_angles[0],this.interLensDistance=t.inter_lens_distance,this.baselineLensDistance=t.tray_to_lens_distance,this.screenLensDistance=t.screen_to_lens_distance,this.distortion=new n.Distortion(t.distortion_coefficients),this.inverseCoefficients=this.distortion.approximateInverse()}}();e.CardboardViewer=r},95433:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Device=void 0;var i=[{type:"android",rules:[{ua:"Nexus 7"}],dpi:[320.8,323],bw:3,ac:500},{type:"android",rules:[{ua:"ASUS_Z00AD"}],dpi:[403,404.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"HTC6435LVW"}],dpi:[449.7,443.3],bw:3,ac:1e3},{type:"android",rules:[{ua:"HTC One XL"}],dpi:[315.3,314.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 9"}],dpi:289,bw:3,ac:500},{type:"android",rules:[{ua:"HTC One M9"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{ua:"HTC One_M8"}],dpi:[449.7,447.4],bw:3,ac:500},{type:"android",rules:[{ua:"HTC One"}],dpi:472.8,bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 6P"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 5X"}],dpi:[422,419.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"LGMS345"}],dpi:[221.7,219.1],bw:3,ac:500},{type:"android",rules:[{ua:"LG-D800"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{ua:"LG-D850"}],dpi:[537.9,541.9],bw:3,ac:500},{type:"android",rules:[{ua:"VS985 4G"}],dpi:[537.9,535.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 5 "}],dpi:[442.4,444.8],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 4"}],dpi:[319.8,318.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"LG-P769"}],dpi:[240.6,247.5],bw:3,ac:1e3},{type:"android",rules:[{ua:"LGMS323"}],dpi:[206.6,204.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"LGLS996"}],dpi:[403.4,401.5],bw:3,ac:1e3},{type:"android",rules:[{ua:"4560MMX"}],dpi:[240,219.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"Micromax A250"}],dpi:[480,446.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"Micromax AQ4501"}],dpi:240,bw:3,ac:500},{type:"android",rules:[{ua:"DROID RAZR"}],dpi:[368.1,256.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT830C"}],dpi:[254,255.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1021"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{ua:"XT1023"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{ua:"XT1028"}],dpi:[326.6,327.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1034"}],dpi:[326.6,328.4],bw:3,ac:500},{type:"android",rules:[{ua:"XT1053"}],dpi:[315.3,316.1],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1562"}],dpi:[403.4,402.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 6 "}],dpi:[494.3,489.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1063"}],dpi:[295,296.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1064"}],dpi:[295,295.6],bw:3,ac:500},{type:"android",rules:[{ua:"XT1092"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{ua:"XT1095"}],dpi:[422,423.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"A0001"}],dpi:[403.4,401],bw:3,ac:1e3},{type:"android",rules:[{ua:"ONE E1005"}],dpi:[442.4,441.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"ONE A2005"}],dpi:[391.9,405.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"X909"}],dpi:[442.4,444.1],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9082"}],dpi:[184.7,185.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G360P"}],dpi:[196.7,205.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus S"}],dpi:[234.5,229.8],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9300"}],dpi:[304.8,303.9],bw:5,ac:500},{type:"android",rules:[{ua:"SM-T230NU"}],dpi:216,bw:3,ac:500},{type:"android",rules:[{ua:"SGH-T399"}],dpi:[217.7,231.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-N9005"}],dpi:[386.4,387],bw:3,ac:500},{type:"android",rules:[{ua:"SAMSUNG-SM-N900A"}],dpi:[386.4,387.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9500"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{ua:"GT-I9505"}],dpi:439.4,bw:4,ac:1e3},{type:"android",rules:[{ua:"SM-G900F"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{ua:"SM-G900M"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{ua:"SM-G800F"}],dpi:326.8,bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G906S"}],dpi:[562.7,572.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9300"}],dpi:[306.7,304.8],bw:5,ac:1e3},{type:"android",rules:[{ua:"SM-T535"}],dpi:[142.6,136.4],bw:3,ac:500},{type:"android",rules:[{ua:"SM-N920C"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9300I"}],dpi:[304.8,305.8],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9195"}],dpi:[249.4,256.7],bw:3,ac:500},{type:"android",rules:[{ua:"SPH-L520"}],dpi:[249.4,255.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"SAMSUNG-SGH-I717"}],dpi:285.8,bw:3,ac:1e3},{type:"android",rules:[{ua:"SPH-D710"}],dpi:[217.7,204.2],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-N7100"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{ua:"SCH-I605"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{ua:"Galaxy Nexus"}],dpi:[315.3,314.2],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-N910H"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-N910C"}],dpi:[515.2,520.2],bw:3,ac:500},{type:"android",rules:[{ua:"SM-G130M"}],dpi:[165.9,164.8],bw:3,ac:500},{type:"android",rules:[{ua:"SM-G928I"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G920F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{ua:"SM-G920P"}],dpi:[522.5,577],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G925F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{ua:"SM-G925V"}],dpi:[522.5,576.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"C6903"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{ua:"D6653"}],dpi:[428.6,427.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"E6653"}],dpi:[428.6,425.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"E6853"}],dpi:[403.4,401.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"SGP321"}],dpi:[224.7,224.1],bw:3,ac:500},{type:"android",rules:[{ua:"ALCATEL ONE TOUCH Fierce"}],dpi:[240,247.5],bw:3,ac:1e3},{type:"android",rules:[{ua:"thl 5000"}],dpi:[480,443.3],bw:3,ac:1e3},{type:"android",rules:[{ua:"ZTE Blade L2"}],dpi:240,bw:3,ac:500},{type:"ios",rules:[{res:[640,960]}],dpi:[325.1,328.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[640,960]}],dpi:[325.1,328.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[640,1136]}],dpi:[317.1,320.2],bw:3,ac:1e3},{type:"ios",rules:[{res:[640,1136]}],dpi:[317.1,320.2],bw:3,ac:1e3},{type:"ios",rules:[{res:[750,1334]}],dpi:326.4,bw:4,ac:1e3},{type:"ios",rules:[{res:[750,1334]}],dpi:326.4,bw:4,ac:1e3},{type:"ios",rules:[{res:[1242,2208]}],dpi:[453.6,458.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[1242,2208]}],dpi:[453.6,458.4],bw:4,ac:1e3}],n=function(){function t(e){this.width=e.width||t.getScreenWidth(),this.height=e.height||t.getScreenHeight(),this.widthMeters=e.widthMeters,this.heightMeters=e.heightMeters,this.bevelMeters=e.bevelMeters}return t.isIOS=function(){return/iPad|iPhone|iPod/.test(navigator.platform)},t.getScreenWidth=function(){return Math.max(window.screen.width,window.screen.height)*window.devicePixelRatio},t.getScreenHeight=function(){return Math.min(window.screen.width,window.screen.height)*window.devicePixelRatio},t.detect=function(e){for(var n=navigator.userAgent||navigator.vendor||window.opera,s=t.getScreenWidth(),a=t.getScreenHeight(),h=0;h<i.length;h++){var u=i[h];if(u.rules)if("ios"===u.type||"android"===u.type){if(t.isIOS()===("ios"===u.type)){for(var l=!1,c=0;c<u.rules.length;c++){var d=u.rules[c];if(t.matchRule(d,n,s,a)){e.debug("Rule matched:"+JSON.stringify(d)),l=!0;break}}if(l){var p=.0254,f={width:s,height:a,widthMeters:p/(u.dpi[0]||u.dpi)*s,heightMeters:p/(u.dpi[1]||u.dpi)*a,bevelMeters:.001*u.bw};return e.debug("Device found: "+JSON.stringify(f)),new t(f)}}}else e.debug("Device["+h+"] has invalid type.");else e.debug("Device["+h+"] has no rules section.")}return t.isIOS()?(e.debug("Using fallback iOS device measurements."),o):(e.debug("Using fallback Android device measurements."),r)},t.matchRule=function(t,e,i,n){if(!t.ua&&!t.res)return!1;if(t.ua&&e.indexOf(t.ua)<0)return!1;if(t.res){if(!t.res[0]||!t.res[1])return!1;var r=t.res[0],o=t.res[1];if(Math.min(i,n)!==Math.min(r,o)||Math.max(i,n)!==Math.max(r,o))return!1}return!0},t}();e.Device=n;var r=new n({widthMeters:.11,heightMeters:.062,bevelMeters:.004}),o=new n({widthMeters:.1038,heightMeters:.0584,bevelMeters:.004})},3973:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.DeviceInfo=void 0;var n=i(95433),r=i(44369),o=i(7247),s=function(){function t(t,e){this.u6=new o.CardboardViewer(t),this.v6=n.Device.detect(e)}return t.prototype.getDevice=function(){return this.v6},t.prototype.setViewer=function(t){this.u6=t},t.prototype.getDistortedFieldOfViewLeftEye=function(){var t=this.u6.screenLensDistance,e=this.u6.distortion,i=(this.v6.widthMeters-this.u6.interLensDistance)/2,n=this.u6.interLensDistance/2,o=this.u6.baselineLensDistance-this.v6.bevelMeters,s=this.v6.heightMeters-o,a=r.MathUtil.radToDeg(Math.atan(e.distort(i/t))),h=r.MathUtil.radToDeg(Math.atan(e.distort(n/t))),u=r.MathUtil.radToDeg(Math.atan(e.distort(o/t))),l=r.MathUtil.radToDeg(Math.atan(e.distort(s/t)));return{leftDegrees:Math.min(a,this.u6.fov),rightDegrees:Math.min(h,this.u6.fov),downDegrees:Math.min(u,this.u6.fov),upDegrees:Math.min(l,this.u6.fov)}},t.prototype.getLeftEyeVisibleTanAngles=function(){var t=this.u6.distortion,e=Math.tan(-r.MathUtil.degToRad(this.u6.fov)),i=Math.tan(r.MathUtil.degToRad(this.u6.fov)),n=Math.tan(r.MathUtil.degToRad(this.u6.fov)),o=Math.tan(-r.MathUtil.degToRad(this.u6.fov)),s=this.v6.widthMeters/4,a=this.v6.heightMeters/2,h=this.u6.baselineLensDistance-this.v6.bevelMeters-a,u=this.u6.interLensDistance/2-s,l=-h,c=this.u6.screenLensDistance,d=t.distort((u-s)/c),p=t.distort((l+a)/c),f=t.distort((u+s)/c),b=t.distort((l-a)/c),y=new Float32Array(4);return y[0]=Math.max(e,d),y[1]=Math.min(i,p),y[2]=Math.min(n,f),y[3]=Math.max(o,b),y},t.prototype.getLeftEyeNoLensTanAngles=function(){var t=this.u6.distortion,e=new Float32Array(4),i=t.distortInverse(Math.tan(-r.MathUtil.degToRad(this.u6.fov))),n=t.distortInverse(Math.tan(r.MathUtil.degToRad(this.u6.fov))),o=t.distortInverse(Math.tan(r.MathUtil.degToRad(this.u6.fov))),s=t.distortInverse(Math.tan(-r.MathUtil.degToRad(this.u6.fov))),a=this.v6.widthMeters/4,h=this.v6.heightMeters/2,u=this.u6.baselineLensDistance-this.v6.bevelMeters-h,l=this.u6.interLensDistance/2-a,c=-u,d=this.u6.screenLensDistance,p=(l-a)/d,f=(c+h)/d,b=(l+a)/d,y=(c-h)/d;return e[0]=Math.max(i,p),e[1]=Math.min(n,f),e[2]=Math.min(o,b),e[3]=Math.max(s,y),e},t.prototype.getLeftEyeVisibleScreenRect=function(t){var e=this.u6.screenLensDistance,i=(this.v6.widthMeters-this.u6.interLensDistance)/2,n=this.u6.baselineLensDistance-this.v6.bevelMeters,r=(t[0]*e+i)/this.v6.widthMeters,o=(t[1]*e+n)/this.v6.heightMeters,s=(t[2]*e+i)/this.v6.widthMeters,a=(t[3]*e+n)/this.v6.heightMeters;return{x:r,y:a,width:s-r,height:o-a}},t.prototype.getFieldOfViewLeftEye=function(t){return t?this.getUndistortedFieldOfViewLeftEye():this.getDistortedFieldOfViewLeftEye()},t.prototype.getFieldOfViewRightEye=function(t){var e=this.getFieldOfViewLeftEye(t);return{leftDegrees:e.leftDegrees,rightDegrees:e.rightDegrees,downDegrees:e.downDegrees,upDegrees:e.upDegrees}},t.prototype.getUndistortedFieldOfViewLeftEye=function(){var t=this.getUndistortedParams_();return{leftDegrees:r.MathUtil.radToDeg(Math.atan(t.outerDist)),rightDegrees:r.MathUtil.radToDeg(Math.atan(t.innerDist)),downDegrees:r.MathUtil.radToDeg(Math.atan(t.bottomDist)),upDegrees:r.MathUtil.radToDeg(Math.atan(t.topDist))}},t.prototype.getUndistortedViewportLeftEye=function(){var t=this.getUndistortedParams_(),e=this.u6.screenLensDistance,i=this.v6.widthMeters/e,n=this.v6.heightMeters/e,r=this.v6.width/i,o=this.v6.height/n,s=Math.round((t.eyePosX-t.outerDist)*r),a=Math.round((t.eyePosY-t.bottomDist)*o);return{x:s,y:a,width:Math.round((t.eyePosX+t.innerDist)*r)-s,height:Math.round((t.eyePosY+t.topDist)*o)-a}},t.prototype.getUndistortedParams_=function(){var t=this.u6.distortion,e=this.u6.screenLensDistance,i=this.u6.interLensDistance/2/e,n=this.v6.widthMeters/e,o=this.v6.heightMeters/e,s=n/2-i,a=(this.u6.baselineLensDistance-this.v6.bevelMeters)/e,h=this.u6.fov,u=t.distortInverse(Math.tan(r.MathUtil.degToRad(h))),l=Math.min(s,u),c=Math.min(i,u),d=Math.min(a,u);return{outerDist:l,innerDist:c,topDist:Math.min(o-a,u),bottomDist:d,eyePosX:s,eyePosY:a}},t}();e.DeviceInfo=s},67392:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Distortion=void 0;var i=function(){function t(t){this.tfb=t}return t.prototype.distortInverse=function(t){for(var e=0,i=1,n=t-this.distort(e);Math.abs(i-e)>1e-4;){var r=t-this.distort(i),o=i-r*((i-e)/(r-n));e=i,i=o,n=r}return i},t.prototype.distort=function(t){for(var e=t*t,i=0,n=this.tfb.length-1;n>=0;n--)i=e*(i+this.tfb[n]);return(i+1)*t},t.solveLinear_=function(t,e){var i,n,r,o=t.length;for(n=0;n<o-1;++n)for(r=n+1;r<o;++r){var s=t[n][r]/t[n][n];for(i=n+1;i<o;++i)t[i][r]-=s*t[i][n];e[r]-=s*e[n]}var a=new Array(o);for(n=o-1;n>=0;--n){var h=e[n];for(i=n+1;i<o;++i)h-=t[i][n]*a[i];a[n]=h/t[n][n]}return a},t.solveLeastSquares_=function(e,i){var n,r,o,s,a=e.length,h=e[0].length;if(h!==i.length)throw new Error("Matrix / vector dimension mismatch");var u=new Array(a);for(o=0;o<a;++o)for(u[o]=new Array(a),r=0;r<a;++r){for(s=0,n=0;n<h;++n)s+=e[r][n]*e[o][n];u[o][r]=s}var l=new Array(a);for(r=0;r<a;++r){for(s=0,n=0;n<h;++n)s+=e[r][n]*i[n];l[r]=s}return t.solveLinear_(u,l)},t.prototype.approximateInverse=function(e,i){e=e||1,i=i||100;var n,r,o=new Array(12);for(r=0;r<12;++r)o[r]=new Array(i);var s=new Array(i);for(n=0;n<i;++n){var a=e*(n+1)/i,h=this.distort(a),u=h;for(r=0;r<12;++r)u*=h*h,o[r][n]=u;s[n]=a-h}return t.solveLeastSquares_(o,s)},t}();e.Distortion=i},44369:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Quat=e.Vec3=e.Mat4=e.MathUtil=void 0;var i=function(){function t(){}return t.degToRad=function(t){return t*Math.PI/180},t.radToDeg=function(t){return 180*t/Math.PI},t.hypot=function(t,e){return Math.sqrt(t*t+e*e)},t.getSum=function(t){return t.length>0?t.reduce(function(t,e){return t+e},0):0},t.getAverage=function(e){return e.length>0?t.getSum(e)/e.length:1/0},t.sign=function(t){return Math.sign&&Math.sign(t)||(t>0?1:t<0?-1:0)},t}();e.MathUtil=i;var n=function(){function t(){}return t.create=function(){var t;return(t="undefined"!=typeof Float32Array?new Float32Array(16):new Array(16))[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.rotate=function(t,e,i){var n,r,o,s,a,h,u,l,c,d,p,f,b,y,v,g,m,w,I,T,E,O,M,P,D=i[0],R=i[1],_=i[2],V=Math.sqrt(D*D+R*R+_*_);return Math.abs(V)<1e-6?null:(D*=V=1/V,R*=V,_*=V,n=Math.sin(e),o=1-(r=Math.cos(e)),s=t[0],a=t[1],h=t[2],u=t[3],l=t[4],c=t[5],d=t[6],p=t[7],f=t[8],b=t[9],y=t[10],v=t[11],g=D*D*o+r,m=R*D*o+_*n,w=_*D*o-R*n,I=D*R*o-_*n,T=R*R*o+r,E=_*R*o+D*n,O=D*_*o+R*n,M=R*_*o-D*n,P=_*_*o+r,t[0]=s*g+l*m+f*w,t[1]=a*g+c*m+b*w,t[2]=h*g+d*m+y*w,t[3]=u*g+p*m+v*w,t[4]=s*I+l*T+f*E,t[5]=a*I+c*T+b*E,t[6]=h*I+d*T+y*E,t[7]=u*I+p*T+v*E,t[8]=s*O+l*M+f*P,t[9]=a*O+c*M+b*P,t[10]=h*O+d*M+y*P,t[11]=u*O+p*M+v*P,t)},t.multiply=function(t,e,i){var n=e[0],r=e[1],o=e[2],s=e[3],a=e[4],h=e[5],u=e[6],l=e[7],c=e[8],d=e[9],p=e[10],f=e[11],b=e[12],y=e[13],v=e[14],g=e[15],m=i[0],w=i[1],I=i[2],T=i[3];return t[0]=m*n+w*a+I*c+T*b,t[1]=m*r+w*h+I*d+T*y,t[2]=m*o+w*u+I*p+T*v,t[3]=m*s+w*l+I*f+T*g,m=i[4],w=i[5],I=i[6],T=i[7],t[4]=m*n+w*a+I*c+T*b,t[5]=m*r+w*h+I*d+T*y,t[6]=m*o+w*u+I*p+T*v,t[7]=m*s+w*l+I*f+T*g,m=i[8],w=i[9],I=i[10],T=i[11],t[8]=m*n+w*a+I*c+T*b,t[9]=m*r+w*h+I*d+T*y,t[10]=m*o+w*u+I*p+T*v,t[11]=m*s+w*l+I*f+T*g,m=i[12],w=i[13],I=i[14],T=i[15],t[12]=m*n+w*a+I*c+T*b,t[13]=m*r+w*h+I*d+T*y,t[14]=m*o+w*u+I*p+T*v,t[15]=m*s+w*l+I*f+T*g,t},t.perspective=function(t,e,i,n,r){var o=1/Math.tan(e/2),s=1/(n-r);return t[0]=o/i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(r+n)*s,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*r*n*s,t[15]=0,t},t.invert=function(t,e){var i=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],h=e[6],u=e[7],l=e[8],c=e[9],d=e[10],p=e[11],f=e[12],b=e[13],y=e[14],v=e[15],g=i*a-n*s,m=i*h-r*s,w=i*u-o*s,I=n*h-r*a,T=n*u-o*a,E=r*u-o*h,O=l*b-c*f,M=l*y-d*f,P=l*v-p*f,D=c*y-d*b,R=c*v-p*b,_=d*v-p*y,V=g*_-m*R+w*D+I*P-T*M+E*O;return V?(V=1/V,t[0]=(a*_-h*R+u*D)*V,t[1]=(r*R-n*_-o*D)*V,t[2]=(b*E-y*T+v*I)*V,t[3]=(d*T-c*E-p*I)*V,t[4]=(h*P-s*_-u*M)*V,t[5]=(i*_-r*P+o*M)*V,t[6]=(y*w-f*E-v*m)*V,t[7]=(l*E-d*w+p*m)*V,t[8]=(s*R-a*P+u*O)*V,t[9]=(n*P-i*R-o*O)*V,t[10]=(f*T-b*w+v*g)*V,t[11]=(c*w-l*T-p*g)*V,t[12]=(a*M-s*D-h*O)*V,t[13]=(i*D-n*M+r*O)*V,t[14]=(b*m-f*I-y*g)*V,t[15]=(l*I-c*m+d*g)*V,t):null},t}();e.Mat4=n;var r=function(){function t(){}return t.create=function(){var t;return(t="undefined"!=typeof Float32Array?new Float32Array(3):new Array(3))[0]=0,t[1]=0,t[2]=0,t},t}();e.Vec3=r;var o=function(){function t(){}return t.create=function(){var t;return(t="undefined"!=typeof Float32Array?new Float32Array(4):new Array(4))[0]=0,t[1]=0,t[2]=0,t[3]=1,t},t.fromValues=function(t,e,i,n){var r;return(r="undefined"!=typeof Float32Array?new Float32Array(4):new Array(4))[0]=t,r[1]=e,r[2]=i,r[3]=n,r},t.multiply=function(t,e,i){var n=e[0],r=e[1],o=e[2],s=e[3],a=i[0],h=i[1],u=i[2],l=i[3];return t[0]=n*l+s*a+r*u-o*h,t[1]=r*l+s*h+o*a-n*u,t[2]=o*l+s*u+n*h-r*a,t[3]=s*l-n*a-r*h-o*u,t},t.toAngle=function(t){var e=r.create(),i=t[0]*t[0],n=t[1]*t[1],o=t[2]*t[2],s=t[0]*t[1]+t[2]*t[3];return s>.499?(e[2]=2*Math.atan2(t[0],t[3]),e[0]=Math.PI/2,e[1]=0):s<-.499?(e[2]=-2*Math.atan2(t[0],t[3]),e[0]=-Math.PI/2,e[1]=0):(e[2]=Math.atan2(2*t[1]*t[3]-2*t[0]*t[2],1-2*n-2*o),e[0]=Math.asin(2*s),e[1]=Math.atan2(2*t[0]*t[3]-2*t[1]*t[2],1-2*i-2*o)),{yaw:180*e[2]/Math.PI,pitch:180*e[1]/Math.PI,roll:180*e[0]/Math.PI}},t}();e.Quat=o},57160:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProtoBuf=void 0;var i=function(){function t(t,e){this.heb=t,this.keb=e,this.ieb=0,this.jeb=new DataView(this.heb.buffer,0,this.heb.length)}return t.prototype.readVarInt=function(){var t,e=0;for(t=0;this.ieb<this.heb.length&&(e|=(127&this.heb[this.ieb])<<t,128&this.heb[this.ieb]);this.ieb++)t+=7;return this.ieb++,e},t.prototype.readHeader=function(){var t=this.readVarInt();return{tag:t>>>3,type:7&t}},t.prototype.readString=function(){for(var t=this.readVarInt(),e=new Array(t),i=0,n=this.ieb;n<this.ieb+t;n++){var r=this.heb[n];if(r<128)e[i++]=r;else if(r>=192&&r<224&&n+1<t)e[i++]=(31&r)<<6|63&this.heb[++n];else if(r>=224&&r<240&&n+2<t)e[i++]=(15&r)<<12|(63&this.heb[++n])<<6|63&this.heb[++n];else{if(!(r>=240&&r<248&&n+3<t))throw new Error("Malformed UTF8 character at byte offset "+n);var o=(7&r)<<18|(63&this.heb[++n])<<12|(63&this.heb[++n])<<6|63&this.heb[++n];o<=65535?e[i++]=o:(o^=65536,e[i++]=55296|o>>10,e[i++]=56320|1023&o)}}var s="",a=16384;for(n=0;n<i;n+=a)s+=String.fromCharCode.apply(String,e.slice(n,n+a<=i?n+a:i));return this.ieb+=t,s},t.prototype.readPacked=function(t){var e=this.readVarInt(),i=[];switch(t){case"float":for(var n=0;n<e/4;n++)i.push(this.jeb.getFloat32(this.ieb,!0)),this.ieb+=4;break;case"int":for(var r=this.ieb;this.ieb<r+e;)i.push(this.readVarInt())}return i},t.prototype.leb=function(t){for(var e=0,i=0;i<t;i++)e=(e<<8)+this.heb[this.ieb+i],this.ieb++;return e},t.prototype.readNum32=function(){var t=this.jeb.getFloat32(this.ieb,!0);return this.ieb+=4,t},t.prototype.readNum64=function(){return this.leb(8)},t.prototype.readField=function(t){var e;switch(t){case 0:e=this.readVarInt();break;case 1:e=this.readNum64();break;case 2:e=this.readString();break;case 5:e=this.readNum32()}return e},t.prototype.readAll=function(){for(var t={};this.ieb<this.heb.length;){var e=this.readHeader(),i=void 0;if(this.keb.hasOwnProperty(e.tag))if(i=this.keb[e.tag],2===e.type&&i&&i.hasOwnProperty("packed")&&i.packed)t[i.name]=this.readPacked(i.type);else{var n=this.readField(e.type);"boolean"===i.type?n=!!n:"object"==typeof i.type&&(n=i.type[n]),t[i.name]=n}}if(t.length>0)for(var r in this.keb.defaults)this.keb.defaults.hasOwnProperty(r)&&void 0===t[r]&&(t[r]=this.keb.defaults[r]);return t},t}();e.ProtoBuf=i},43948:function(t,e){var i,n,r;Object.defineProperty(e,"__esModule",{value:!0}),e.TransitionTimingType=e.VRState=e.VRContentType=void 0,function(t){t.Single="single",t.TAB="tab",t.SBS="sbs"}(i||(e.VRContentType=i={})),function(t){t.Ready="ready",t.Playing="playing",t.Error="error",t.Uninitialized="uninitialized"}(n||(e.VRState=n={})),function(t){t.None="none",t.EaseIn="ease-in",t.EaseOut="ease-out",t.EaseInOut="ease-in-out"}(r||(e.TransitionTimingType=r={}))},61535:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.InternalVRHandler=void 0;var n=i(5357),r=i(3973),o=i(25926),s=i(4224),a=i(45202),h=i(3714),u=i(44468),l=i(21513),c=i(19274),d=i(43948),p=i(33639),f=i(85361),b=function(){function t(e,i,u,b,y,v,g,m){var w=this;this.GI=null,this.HI=null,this.II=null,this.JI=null,this.KI=d.VRState.Uninitialized,this.LI=null,this.MI=!1,this.NI=!1,this.OI=null,this.PI=null,this.QI=null,this.RI=!1,this.hI=function(){w.SI=!0},this.lI=function(t){if(w.KI!==d.VRState.Playing)return w.UI&&Boolean(w.ZI.onRenderingSuspended)&&w.ZI.onRenderingSuspended(),void(w.UI=!1);w.iI(),w.NI!==w.MI&&(w.WI.getEventFunction()(h.PlayerEvent.VRStereoChanged,{stereo:w.MI}),w.NI=w.MI);var e=w.PI.update(t),i=!w.RI||w.SI||0===t;i||e||0===t||w.TI?(w.VI&&Boolean(w.ZI.onStartRendering)&&w.ZI.onStartRendering(),!w.UI&&Boolean(w.ZI.onRenderingResumed)&&w.ZI.onRenderingResumed(),w.OI.drawScene(w.PI.getProjectionInverse(),i),w.VI=!1,w.UI=!0):(w.UI&&Boolean(w.ZI.onRenderingSuspended)&&w.ZI.onRenderingSuspended(),w.UI=!1),null===w.LI&&(w.II=requestAnimationFrame(w.lI)),w.SI=!1,w.TI=!1},this.mI=function(){w.gI().removeEventListener(c.MediaElementEvent.playing,w.mI),w.gI().removeEventListener(c.MediaElementEvent.seeked,w.mI),w.KI===d.VRState.Ready&&(w.iI(),w.KI=d.VRState.Playing,w.II=requestAnimationFrame(w.lI))},this.nI=function(t){w.KI=d.VRState.Error,w.LI=t,w.kI(),w.II&&(cancelAnimationFrame(w.II),w.II=null),w.WI.getEventFunction()(h.PlayerEvent.Warning,new o.PlayerWarning(s.WarningCode.VR_RENDERING_ERROR)),w.aI.debug("VR Rendering error: "+t)},this.enableGyroscope=function(){return w.PI.enableGyroscope(),!0},this.disableGyroscope=function(){return w.PI.disableGyroscope(),!0},this.isGyroscopeEnabled=function(){return w.PI.isGyroscopeEnabled()},this.enableMouseControl=function(){return w.PI.enableMouseControl(),!0},this.disableMouseControl=function(){return w.PI.disableMouseControl(),!0},this.isMouseControlEnabled=function(){return w.PI.isMouseControlEnabled()},this.enableKeyboardControl=function(){return w.PI.enableKeyboardControl(),!0},this.disableKeyboardControl=function(){return w.PI.disableKeyboardControl(),!0},this.isKeyboardControlEnabled=function(){return w.PI.isKeyboardControlEnabled()},this.setViewingDirection=function(t){return!!w.PI&&(w.PI.setViewingDirection(t),!0)},this.pause=function(){w.RI=!0},this.oI=function(){var t=w.gI();4!==t.readyState?t.addEventListener(c.MediaElementEvent.playing,function(){return w.RI=!1}):w.RI=!1},this.pI=function(){w.WI.off(h.PlayerEvent.Playing,w.oI),w.WI.off(h.PlayerEvent.Paused,w.pause),w.WI.off(h.PlayerEvent.Destroy,w.pI),w.WI.off(h.PlayerEvent.SourceUnloaded,w.pI),w.WI=null;var t=w.gI();w.dI&&w.dI.removeEventListener(c.MediaElementEvent.seeked,w.hI),w.kI(),w.GI&&w.GI.parentNode&&(w.GI.parentNode.removeChild(w.GI),w.GI=null),w.HI&&w.HI.parentNode&&(w.HI.parentNode.removeChild(w.HI),w.HI=null),w.JI&&w.JI.parentNode&&(w.JI.parentNode.removeChild(w.JI),w.JI=null),w.KI=d.VRState.Uninitialized,w.II&&(cancelAnimationFrame(w.II),w.II=null),w.PI&&w.PI.destroy(),w.PI=null,w.OI.destroy(),w.OI=null,t.removeEventListener(c.MediaElementEvent.playing,w.mI),t.removeEventListener(c.MediaElementEvent.seeked,w.mI)},this.WI=e.eventHandler,this.dI=e.videoElement,this.eI=b,this.XI=e.parentHtmlElement,this.id=i,this.YI=u,this.ZI=m,this.aI=y,this.bI=v,this.cI=e.sourceContext.technology.streaming,this.fI=g,this.SI=!1,this.TI=!1,this.UI=!1,this.VI=!0,this.GI=document.createElement("canvas"),this.GI.setAttribute("id","bitmovinplayer-vr-canvas"),this.GI.style.display="none",this.GI.style.position="absolute";var I=this.XI.getElementsByClassName(a.Environment.idPrefix+"poster")[0];I?this.XI.insertBefore(this.GI,I):this.XI.appendChild(this.GI);var T=e.sourceContext.technology.player;if(t.isVideoTextureSupported(v,this.cI,T)?this.aI.debug("VR: using 3D rendering context"):(this.HI=document.createElement("canvas"),this.HI.setAttribute("id","bitmovinplayer-vr-helper-canvas"),this.HI.style.display="none",this.HI.style.position="absolute",this.XI.insertBefore(this.HI,this.GI),this.aI.debug("VR: using 2D rendering context")),(0,l.getCapabilities)().isSafariIOS&&(this.dI.setAttribute("playsinline",""),this.dI.setAttribute("webkit-playsinline",""),this.aI.debug("VR: set playsinline = true")),this.JI=document.getElementById("bitmovinplayer-no-select-style-node"),this.JI||(this.JI=document.createElement("style"),this.JI.setAttribute("id","bitmovinplayer-no-select-style-node"),this.JI.appendChild(document.createTextNode(".bitmovinplayer-no-select { -webkit-user-select: none; -moz-user-select: -moz-none; -ms-user-select: none; user-select: none; }")),document.getElementsByTagName("head")[0].appendChild(this.JI)),this.MI=this.YI.stereo,this.NI=this.MI,this.YI.restrictedInlinePlayback?this.aI.debug("VR: using restricted inline playback"):this.dI.addEventListener(c.MediaElementEvent.seeked,this.hI),"string"==typeof this.YI.cardboard){var E=n.Cardboard.decode(this.YI.cardboard);this.aI.debug("cardboard: "+JSON.stringify(E)),E.hasOwnProperty("distortion_coefficients")&&(this.QI=new r.DeviceInfo(E,this.aI))}this.KI=d.VRState.Ready,this.PI=new p.OrientationHandler(this.GI,this.XI,this.YI,this.ZI,this.WI),this.OI=new f.Renderer(this.GI,this.HI,e,this.QI,this.nI,this.aI,this.fI,this.YI,this.ZI),this.WI.on(h.PlayerEvent.Playing,this.oI),this.WI.on(h.PlayerEvent.Paused,this.pause),this.WI.on(h.PlayerEvent.Destroy,this.pI),this.WI.on(h.PlayerEvent.SourceUnloaded,this.pI),this.jI(),this.iI();var O=this.gI();4!==O.readyState&&O.paused?(O.addEventListener(c.MediaElementEvent.playing,this.mI),O.addEventListener(c.MediaElementEvent.seeked,this.mI)):this.mI()}return t.prototype.gI=function(){return this.YI.restrictedInlinePlayback&&this.eI?this.eI:this.dI},t.prototype.iI=function(){if(this.GI){var t,e,i,n;this.XI&&this.XI.clientWidth&&this.XI.clientHeight?(t=this.XI.clientWidth,e=this.XI.clientHeight):(t=window.innerWidth,e=window.innerHeight),this.dI&&this.dI.videoWidth&&this.dI.videoHeight?(i=this.dI.videoWidth,n=this.dI.videoHeight):(i=t,n=e);var r=(this.bI.devicePixelRatio||1)/this.OI.getBackingStoreRatio(),o=t*r,s=e*r,a=o/s;o>i&&(s=(o=i)/a),s>n&&(o=(s=n)*a),this.GI.width===o&&this.GI.height===s||(this.GI.width=o,this.GI.height=s),!this.HI||this.HI.width===i&&this.HI.height===n||(this.HI.width=i,this.HI.height=n)}},t.prototype.jI=function(){this.GI&&(this.GI.style.display="block"),this.HI&&(this.HI.style.display="block"),this.dI&&(this.dI.style.display="none")},t.prototype.kI=function(){this.GI&&(this.GI.style.display="none"),this.HI&&(this.HI.style.display="none"),this.dI&&this.dI.style&&(this.dI.style.display="block")},t.isVideoTextureSupported=function(t,e,i){var n=t.appName,r=t.userAgent,o=t.appVersion,s=(0,l.getCapabilities)().safariVersion,a=(s.major>10||10===s.major&&s.minor>=1)&&!(0,l.getCapabilities)().isSafariIOS,h=-1;return!(e===u.StreamType.Hls&&i===u.PlayerType.Native&&!a)&&("Microsoft Internet Explorer"===n?null!==new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})").exec(r)&&(h=parseFloat(RegExp.$1)):"Netscape"===n&&(-1!==o.indexOf("Trident")?h=11:null!==new RegExp("Edge/([0-9]{1,}[\\.0-9]{0,})").exec(r)&&(h=parseFloat(RegExp.$1))),-1===h||h>=13)},t.prototype.setStereo=function(t){return this.TI=this.MI!==t,this.MI=t,this.MI?(this.OI.enableStereo(),this.PI.enableStereo()):(this.OI.disableStereo(),this.PI.disableStereo()),!0},t.prototype.getStereo=function(){return this.MI},t.prototype.getState=function(){return this.KI===d.VRState.Ready?d.VRState.Ready:this.KI===d.VRState.Playing?d.VRState.Playing:this.KI===d.VRState.Error?d.VRState.Error:this.KI===d.VRState.Uninitialized?null:void 0},t.prototype.getLastError=function(){return this.LI},t.prototype.getViewingDirection=function(){return this.PI?this.PI.getViewingDirection():{yaw:0,pitch:0,roll:0}},t.prototype.moveViewingDirection=function(t){return!!this.PI&&(this.PI.moveViewingDirection(t),!0)},t.prototype.setViewingDirectionChangeEventInterval=function(t){return!!this.PI&&(this.PI.setViewingDirectionChangeEventInterval(t),!0)},t.prototype.getViewingDirectionChangeEventInterval=function(){return this.PI?this.PI.getViewingDirectionChangeEventInterval():-1},t.prototype.setViewingDirectionChangeThreshold=function(t){return!!this.PI&&(this.PI.setViewingDirectionChangeThreshold(t),!0)},t.prototype.getViewingDirectionChangeThreshold=function(){return this.PI?this.PI.getViewingDirectionChangeThreshold():-1},t.prototype.setVerticalFieldOfView=function(t){return!!this.PI&&(this.PI.setVerticalFieldOfView(t),!0)},t.prototype.getVerticalFieldOfView=function(){return this.PI?this.PI.getVerticalFieldOfView():-1},t.prototype.setHorizontalFieldOfView=function(t){return!!this.PI&&(this.PI.setHorizontalFieldOfView(t),!0)},t.prototype.getHorizontalFieldOfView=function(){return this.PI?this.PI.getHorizontalFieldOfView():-1},t.prototype.zoom=function(t){return!!this.PI&&this.PI.zoom(t)},t.prototype.getZoom=function(){return this.PI?this.PI.getZoom():-1},t.prototype.deviceOrientationPermissionRequired=function(){var t,e;return null!==(e=null===(t=this.PI)||void 0===t?void 0:t.permissionRequired())&&void 0!==e&&e},t.prototype.requestDeviceOrientationPermission=function(){var t,e;return null!==(e=null===(t=this.PI)||void 0===t?void 0:t.requestPermission())&&void 0!==e?e:Promise.resolve()},t}();e.InternalVRHandler=b},6463:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.VRState=e.TransitionTimingType=e.VRContentType=e.VRModuleDefinition=void 0;var n=i(62756),r=i(43948);Object.defineProperty(e,"TransitionTimingType",{enumerable:!0,get:function(){return r.TransitionTimingType}}),Object.defineProperty(e,"VRContentType",{enumerable:!0,get:function(){return r.VRContentType}}),Object.defineProperty(e,"VRState",{enumerable:!0,get:function(){return r.VRState}});var o=i(24180);e.VRModuleDefinition={name:n.ModuleName.VR,module:{VRHandler:o.VRHandler},exports:{VRContentType:r.VRContentType,TransitionTimingType:r.TransitionTimingType,VRState:r.VRState}},e.default=e.VRModuleDefinition},85361:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Renderer=void 0;var n=i(44369),r=i(3714),o=i(44468),s=i(43948),a=i(54479),h=i(17378),u=function(){function t(){this.D4=[],this.E4=[]}return t.prototype.getVideoWidths=function(){return this.D4},t.prototype.getVideoHeights=function(){return this.E4},t.prototype.add=function(t,e){this.D4.indexOf(t)<0&&(this.D4.push(t),this.D4.sort(function(t,e){return t-e})),this.E4.indexOf(e)<0&&(this.E4.push(e),this.E4.sort(function(t,e){return t-e}))},t}(),l=function(){function t(t,e,i,n,o,s,l,c,d){var p=this;this.F4=null,this.G4=null,this.H4=a.GL_ERROR.NO_ERROR,this.J4=-1,this.K4=!1,this.L4=-1,this.M4=-1,this.N4=-1,this.Y5=-1,this.Z5=-1,this.a5=[-1,-1,1,-1,1,1,-1,1],this.b5=[0,1,2,0,2,3],this.c5=-1,this.d5=new RegExp("mediump","g"),this.e5=!0,this.f5=[0,0,0,0,0,0,0,0,0,0,0,0],this.g5={LEFT:0,RIGHT:1},this.h5=[0,0,0,0,0,0,0,0,0,0,0,0],this.i5=1,this.j5=[[1,1],[1,1]],this.k5=[1,1],this.p5=null,this.q5=null,this.r5=null,this.s5=null,this.t5=null,this.u5=null,this.v5=-1,this.w5=-1,this.x5=null,this.y5=!1,this.z5=null,c.stereo?(this.K4=!0,this.J4=2):(this.K4=!1,this.J4=1),this.o5=i.eventHandler,this.p5=s,this.q5=t,this.r5=e,this.s5=i.videoElement,this.t5=o,this.u5=i.sourceContext.technology.streaming,this.z5=l,this.A5=c,this.B5=d,this.I4=[],this.o5.on(r.PlayerEvent.TimeChanged,function(){return p.e5=!1}),n&&(this.h5=this.m6(n),this.i5=this.n6(n),this.j5[this.g5.LEFT]=this.p6(n,this.g5.LEFT),this.j5[this.g5.RIGHT]=this.p6(n,this.g5.RIGHT),this.k5=this.q6(n)),this.x5=new u,this.n5=new h.FrameRateMonitor(1500,1e3),this.A5.enableFrameRateMeasurements?(this.n5.enable(),this.n5.subscribe(this)):this.n5.disable();try{this.S5(),this.R5(),this.T5(),this.U5(),this.V5(),this.W5(),this.X5(),this.i6()}catch(t){this.p5.error("Failed to initialize VR renderer",t)}}return t.prototype.O5=function(t){if(void 0===t&&(t=[]),null!==this.F4){var e=this.F4.getError();if(e===a.GL_ERROR.NO_ERROR)return this.H4=a.GL_ERROR.NO_ERROR,void(this.I4=[]);if(this.I4.push(e),t.indexOf(e)>-1&&this.e5)throw this.H4=a.GL_ERROR.NO_ERROR,this.I4=[],"STARTUP ERROR";if(!(this.I4.length>=this.z5.MAX_CONSECUTIVE_VR_ERRORS))return;this.H4=this.I4[this.I4.length-1]}var i="Unable to initialize WebGL";throw a.GL_ERROR_STR[this.H4]&&(i=a.GL_ERROR_STR[this.H4]),this.t5(i),i},t.prototype.P5=function(t,e){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];var r=null;if(t&&"function"==typeof t[e]){try{r=t[e].apply(t,i)}catch(t){this.p5.warn("could not call WebGL function ("+e+"("+JSON.stringify(i)+")): "+t)}this.O5()}return r},t.prototype.Q5=function(t){throw this.H4=a.GL_ERROR.OTHER_ERROR,this.t5(t),t},t.prototype.R5=function(){this.m5=i(70415),this.l5=i(17913);var t=this.P5(this.F4,"getShaderPrecisionFormat",this.F4.FRAGMENT_SHADER,this.F4.HIGH_FLOAT);0!==t.precision&&0!==t.rangeMin&&0!==t.rangeMax&&(this.m5=this.m5.replace(this.d5,"highp")),0!==(t=this.P5(this.F4,"getShaderPrecisionFormat",this.F4.VERTEX_SHADER,this.F4.HIGH_FLOAT)).precision&&0!==t.rangeMin&&0!==t.rangeMax&&(this.l5=this.l5.replace(this.d5,"highp"))},t.prototype.S5=function(){this.r5&&(this.G4=this.r5.getContext("2d"));var t={failIfMajorPerformanceCaveat:!0};this.F4=this.q5.getContext("webgl",t)||this.q5.getContext("experimental-webgl",t),this.O5(),this.P5(this.F4,"clearColor",.5,.5,.5,1),this.P5(this.F4,"clearDepth",1),this.P5(this.F4,"disable",this.F4.DEPTH_TEST)},t.prototype.T5=function(){this.L4=this.P5(this.F4,"createShader",this.F4.VERTEX_SHADER),this.P5(this.F4,"shaderSource",this.L4,this.l5),this.P5(this.F4,"compileShader",this.L4),this.P5(this.F4,"getShaderParameter",this.L4,this.F4.COMPILE_STATUS)||this.Q5("Vertex shader compilation failed ("+this.P5(this.F4,"getShaderInfoLog",this.L4)+")"),this.M4=this.P5(this.F4,"createShader",this.F4.FRAGMENT_SHADER),this.P5(this.F4,"shaderSource",this.M4,this.m5),this.P5(this.F4,"compileShader",this.M4),this.P5(this.F4,"getShaderParameter",this.M4,this.F4.COMPILE_STATUS)||this.Q5("Fragment shader compilation failed ("+this.P5(this.F4,"getShaderInfoLog",this.M4)+")")},t.prototype.U5=function(){this.N4=this.P5(this.F4,"createProgram"),this.P5(this.F4,"attachShader",this.N4,this.L4),this.P5(this.F4,"attachShader",this.N4,this.M4),this.P5(this.F4,"linkProgram",this.N4),this.P5(this.F4,"getProgramParameter",this.N4,this.F4.LINK_STATUS)||this.Q5("Unable to link program: "+this.P5(this.F4,"getProgramInfoLog",this.N4)),this.P5(this.F4,"useProgram",this.N4)},t.prototype.V5=function(){this.C5=new a.GLAttribute(this.F4,this.N4,"vertexPosition",null)},t.prototype.W5=function(){this.D5=new a.GLUniform(this.F4,this.N4,"eyeSelector",a.GLVariableType.UNIFORM_1I),this.E5=new a.GLUniform(this.F4,this.N4,"textureUnit",a.GLVariableType.UNIFORM_1I),this.G5=new a.GLUniform(this.F4,this.N4,"contentType",a.GLVariableType.UNIFORM_1I),this.H5=new a.GLUniform(this.F4,this.N4,"contentFieldOfView",a.GLVariableType.UNIFORM_1F),this.I5=new a.GLUniform(this.F4,this.N4,"videoWidth",a.GLVariableType.UNIFORM_1F),this.J5=new a.GLUniform(this.F4,this.N4,"videoHeight",a.GLVariableType.UNIFORM_1F),this.F5=new a.GLUniform(this.F4,this.N4,"projectionInverse",a.GLVariableType.UNIFORM_MATRIX_4FV),this.K5=new a.GLUniform(this.F4,this.N4,"distortionCoefficients",a.GLVariableType.UNIFORM_1FV),this.L5=new a.GLUniform(this.F4,this.N4,"distortionMaxFovSquared",a.GLVariableType.UNIFORM_1F),this.M5=new a.GLUniform(this.F4,this.N4,"distortionFovOffset",a.GLVariableType.UNIFORM_2FV),this.N5=new a.GLUniform(this.F4,this.N4,"distortionFovScale",a.GLVariableType.UNIFORM_2FV)},t.prototype.X5=function(){this.Y5=this.P5(this.F4,"createBuffer"),this.P5(this.F4,"bindBuffer",this.F4.ARRAY_BUFFER,this.Y5),this.P5(this.F4,"bufferData",this.F4.ARRAY_BUFFER,new Float32Array(this.a5),this.F4.STATIC_DRAW),this.Z5=this.P5(this.F4,"createBuffer"),this.P5(this.F4,"bindBuffer",this.F4.ELEMENT_ARRAY_BUFFER,this.Z5),this.P5(this.F4,"bufferData",this.F4.ELEMENT_ARRAY_BUFFER,new Uint16Array(this.b5),this.F4.STATIC_DRAW)},t.prototype.i6=function(){this.c5=this.P5(this.F4,"createTexture"),this.P5(this.F4,"bindTexture",this.F4.TEXTURE_2D,this.c5),this.P5(this.F4,"texParameteri",this.F4.TEXTURE_2D,this.F4.TEXTURE_MAG_FILTER,this.F4.LINEAR),this.P5(this.F4,"texParameteri",this.F4.TEXTURE_2D,this.F4.TEXTURE_MIN_FILTER,this.F4.LINEAR),this.P5(this.F4,"texParameteri",this.F4.TEXTURE_2D,this.F4.TEXTURE_WRAP_S,this.F4.CLAMP_TO_EDGE),this.P5(this.F4,"texParameteri",this.F4.TEXTURE_2D,this.F4.TEXTURE_WRAP_T,this.F4.CLAMP_TO_EDGE)},t.prototype.j6=function(t,e){var i,n,r=this.P5(this.G4,"getImageData",0,0,t,e);if(!r)return this.p5.debug("Texture size verification failed."),void(this.y5=!1);for(var o=this.x5.getVideoWidths(),s=this.x5.getVideoHeights(),a=0;a<o.length&&r.data[4*(o[a]-1)+3]>0;a++)i=Math.min(o[a],t);for(var h=0;h<s.length&&r.data[(s[h]-1)*this.s5.videoWidth*4+3]>0;h++)n=Math.min(s[h],e);i&&n&&(i!==t||n!==e)?(this.p5.debug("Texture size mismatch! Expected "+t+"x"+e+" but got "+i+"x"+n+" instead."),this.P5(this.G4,"drawImage",this.r5,0,0,i,n,0,0,this.r5.width,this.r5.height)):this.y5=!1},t.prototype.k6=function(){if(!this.H4||this.H4===a.GL_ERROR.NO_ERROR){var t=this.s5.videoWidth,e=this.s5.videoHeight;if(this.r5&&this.G4){var i=0;this.u5!==o.StreamType.Progressive&&/Trident/.test(navigator.userAgent)&&(i=.0555555*e);var n=e-2*i;this.P5(this.G4,"drawImage",this.s5.getWrappedElement(),0,i,t,n,0,0,this.r5.width,this.r5.height),this.x5.add(t,e);var r=this.v5!==t,s=this.w5!==e;!r&&!s||/Trident/.test(navigator.userAgent)||(this.y5=!0),this.y5&&this.j6(t,e),this.v5=t,this.w5=e}this.P5(this.F4,"activeTexture",this.F4.TEXTURE0),this.P5(this.F4,"bindTexture",this.F4.TEXTURE_2D,this.c5);try{var h=null!==this.B5.requestFakeInput?this.B5.requestFakeInput():null;null!==h?this.P5(this.F4,"texImage2D",this.F4.TEXTURE_2D,0,this.F4.RGB,this.F4.RGB,this.F4.UNSIGNED_BYTE,h):this.r5?this.P5(this.F4,"texImage2D",this.F4.TEXTURE_2D,0,this.F4.RGB,this.F4.RGB,this.F4.UNSIGNED_BYTE,this.r5):this.P5(this.F4,"texImage2D",this.F4.TEXTURE_2D,0,this.F4.RGB,this.F4.RGB,this.F4.UNSIGNED_BYTE,this.s5.getWrappedElement())}catch(t){this.Q5(t.message)}}},t.prototype.onFrameRateAvailable=function(t,e,i){this.p5.debug("Average framerate: "+t.toFixed(2)+"fps, of which "+(100*i).toFixed(2)+"% were spent drawing the scene, "+(100*e).toFixed(2)+"% were spent updating the texture")},t.prototype.l6=function(t,e){if(!this.H4||this.H4===a.GL_ERROR.NO_ERROR){switch(this.P5(this.F4,"useProgram",this.N4),this.P5(this.F4,"bindBuffer",this.F4.ARRAY_BUFFER,this.Y5),this.P5(this.F4,"vertexAttribPointer",this.C5.loc,2,this.F4.FLOAT,!1,0,0),this.P5(this.F4,"activeTexture",this.F4.TEXTURE0),this.P5(this.F4,"bindTexture",this.F4.TEXTURE_2D,this.c5),this.D5.setValue(t),this.E5.setValue(0),this.H5.setValue(this.A5.contentFieldOfView),isFinite(this.s5.videoWidth)&&this.s5.videoWidth>0&&isFinite(this.s5.videoHeight)&&this.s5.videoHeight>0?(this.I5.setValue(this.s5.videoWidth),this.J5.setValue(this.s5.videoHeight)):(this.I5.setValue(4096),this.J5.setValue(2048)),this.A5.contentType){case s.VRContentType.Single:this.G5.setValue(0);break;case s.VRContentType.SBS:this.G5.setValue(1);break;case s.VRContentType.TAB:this.G5.setValue(2);break;default:this.Q5("Invalid content type specified ("+this.A5.contentType+")")}this.K5.setValue(this.h5),this.L5.setValue(this.i5),this.M5.setValue(this.j5[t]),this.N5.setValue(this.k5),this.F5.setValue(e),this.P5(this.F4,"viewport",this.q5.width/2*t,0,this.q5.width/this.J4,this.q5.height),this.P5(this.F4,"bindBuffer",this.F4.ELEMENT_ARRAY_BUFFER,this.Z5),this.P5(this.F4,"drawElements",this.F4.TRIANGLES,6,this.F4.UNSIGNED_SHORT,0)}},t.prototype.m6=function(t){return t?t.viewer.inverseCoefficients:this.f5},t.prototype.n6=function(t){var e=this.o6(t),i=n.MathUtil.hypot(Math.tan(n.MathUtil.degToRad(Math.max(e.leftDegrees,e.rightDegrees))),Math.tan(n.MathUtil.degToRad(Math.max(e.downDegrees,e.upDegrees))));return i*i},t.prototype.o6=function(t,e){var i=e||this.g5.LEFT;return i===this.g5.LEFT?t.getFieldOfViewLeftEye(!0):i===this.g5.RIGHT?t.getFieldOfViewRightEye(!0):null},t.prototype.p6=function(t,e){var i=this.o6(t,e);return[Math.tan(n.MathUtil.degToRad(i.leftDegrees)),Math.tan(n.MathUtil.degToRad(i.downDegrees))]},t.prototype.q6=function(t){var e=this.o6(t);return[Math.tan(n.MathUtil.degToRad(e.leftDegrees))+Math.tan(n.MathUtil.degToRad(e.rightDegrees)),Math.tan(n.MathUtil.degToRad(e.upDegrees))+Math.tan(n.MathUtil.degToRad(e.downDegrees))]},t.prototype.getBackingStoreRatio=function(){var t=0;return this.H4===a.GL_ERROR.NO_ERROR&&(t=(t=(t=(t=(t=t||this.F4.webkitBackingStorePixelRatio)||this.F4.mozBackingStorePixelRatio)||this.F4.msBackingStorePixelRatio)||this.F4.oBackingStorePixelRatio)||this.F4.backingStorePixelRatio),t||1},t.prototype.enableStereo=function(){this.K4=!0,this.J4=2},t.prototype.disableStereo=function(){this.K4=!1,this.J4=1},t.prototype.drawScene=function(t,e){if((!this.H4||this.H4===a.GL_ERROR.NO_ERROR)&&this.F4&&this.s5.getWrappedElement()){this.n5.endAnimationFrame(),this.n5.startAnimationFrame(),this.n5.startDrawScene();try{this.n5.startUpdateTexture(),e&&this.k6(),this.n5.endUpdateTexture(),this.l6(this.g5.LEFT,t),this.K4&&this.l6(this.g5.RIGHT,t),null!==this.B5.onDrawScene&&this.B5.onDrawScene(this.F4),this.O5([a.GL_ERROR.INVALID_VALUE])}catch(t){this.p5.warn("Texture update failed: "+t)}this.n5.endDrawScene()}},t.prototype.destroy=function(){this.n5.unsubscribe(this),this.n5.destroy(),this.n5=null,this.x5=null,this.F4=null,this.q5=null,this.G4=null,this.r5=null},t}();e.Renderer=l},24180:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.VRHandler=void 0;var n,r=i(61535),o=i(70372),s=function(){function t(t,e,i,s,a,h,u){var l=o.ConfigParser.parse(i),c=l[0],d=l[1],p=new r.InternalVRHandler(t,e,c,s,a,h,u,d);(n=n||new window.WeakMap).set(this,p)}return t.prototype.Ob=function(){return n.has(this)&&"error"!==n.get(this).getState()},t.prototype.setStereo=function(t){var e="boolean"==typeof t;return!(!this.Ob()||!e)&&n.get(this).setStereo(t)},t.prototype.enableGyroscope=function(){return!!this.Ob()&&n.get(this).enableGyroscope()},t.prototype.disableGyroscope=function(){return!!this.Ob()&&n.get(this).disableGyroscope()},t.prototype.isGyroscopeEnabled=function(){return!!this.Ob()&&n.get(this).isGyroscopeEnabled()},t.prototype.enableMouseControl=function(){return!!this.Ob()&&n.get(this).enableMouseControl()},t.prototype.disableMouseControl=function(){return!!this.Ob()&&n.get(this).disableMouseControl()},t.prototype.isMouseControlEnabled=function(){return!!this.Ob()&&n.get(this).isMouseControlEnabled()},t.prototype.enableKeyboardControl=function(){return!!this.Ob()&&n.get(this).enableKeyboardControl()},t.prototype.disableKeyboardControl=function(){return!!this.Ob()&&n.get(this).disableKeyboardControl()},t.prototype.isKeyboardControlEnabled=function(){return!!this.Ob()&&n.get(this).isKeyboardControlEnabled()},t.prototype.getStereo=function(){return!!this.Ob()&&n.get(this).getStereo()},t.prototype.getState=function(){return n.has(this)?n.get(this).getState():null},t.prototype.getLastError=function(){return n.has(this)?n.get(this).getLastError():null},t.prototype.getViewingDirection=function(){return this.Ob()?n.get(this).getViewingDirection():{yaw:0,pitch:0,roll:0}},t.prototype.setViewingDirection=function(t){var e=t&&isFinite(t.yaw)&&isFinite(t.pitch)&&isFinite(t.roll);return!(!this.Ob()||!e)&&n.get(this).setViewingDirection(t)},t.prototype.moveViewingDirection=function(t){var e=isFinite(t.x)&&isFinite(t.y)&&isFinite(t.phi);return!(!this.Ob()||!e)&&n.get(this).moveViewingDirection(t)},t.prototype.setViewingDirectionChangeEventInterval=function(t){var e=isFinite(t);return!(!this.Ob()||!e)&&n.get(this).setViewingDirectionChangeEventInterval(t)},t.prototype.getViewingDirectionChangeEventInterval=function(){return this.Ob()?n.get(this).getViewingDirectionChangeEventInterval():-1},t.prototype.setViewingDirectionChangeThreshold=function(t){var e=isFinite(t);return!(!this.Ob()||!e)&&n.get(this).setViewingDirectionChangeThreshold(t)},t.prototype.getViewingDirectionChangeThreshold=function(){return this.Ob()?n.get(this).getViewingDirectionChangeThreshold():-1},t.prototype.setVerticalFieldOfView=function(t){return!!this.Ob()&&n.get(this).setVerticalFieldOfView(t)},t.prototype.getVerticalFieldOfView=function(){return this.Ob()?n.get(this).getVerticalFieldOfView():-1},t.prototype.setHorizontalFieldOfView=function(t){return!!this.Ob()&&n.get(this).setHorizontalFieldOfView(t)},t.prototype.getHorizontalFieldOfView=function(){return this.Ob()?n.get(this).getHorizontalFieldOfView():-1},t.prototype.zoom=function(t){return!!this.Ob()&&n.get(this).zoom(t)},t.prototype.getZoom=function(){return this.Ob()?n.get(this).getZoom():-1},t.prototype.deviceOrientationPermissionRequired=function(){var t,e;return this.Ob()&&null!==(e=null===(t=n.get(this))||void 0===t?void 0:t.deviceOrientationPermissionRequired())&&void 0!==e&&e},t.prototype.requestDeviceOrientationPermission=function(){var t,e;return this.Ob()&&null!==(e=null===(t=n.get(this))||void 0===t?void 0:t.requestDeviceOrientationPermission())&&void 0!==e?e:Promise.resolve()},t}();e.VRHandler=s},45698:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.ApiControl=void 0;var r=i(37485),o=function(t){function e(e,i,n){var o=t.call(this,e,i)||this;return o.setViewingDirectionChangeEventInterval(n),o.Geb=new r.DisplacementVector,o.Heb=new r.DisplacementVector,o.Jeb=0,o}return n(e,t),e.prototype.getDisplacementVector=function(t){return this.Jeb+=t,this.Jeb>this.Ieb?this.Heb.update(0,0,0,!1,t):(r.DisplacementVector.clone(this.Geb,this.Heb),this.Heb.length=this.Geb.length*t,this.Heb.phi=this.Geb.phi*t,this.Heb.update(this.Heb.x,this.Heb.y,this.Heb.phi,!0,t)),this.Heb},e.prototype.setTargetVector=function(t){this.Geb.fromVec3(t,!0),this.Jeb=0},e.prototype.setViewingDirectionChangeEventInterval=function(t){this.Ieb=t},e.prototype.dispose=function(){this.disable()},e}(i(67982).Control);e.ApiControl=o},67982:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Control=void 0;var i=function(){function t(t,e){this.config=t,this.debugHooks=e}return t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.isEnabled=function(){return this.enabled},t}();e.Control=i},22185:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.KeyboardControl=void 0;var r=i(37485),o=i(67982),s=function(){function t(t){this.setKeyCombinations(t),this.Vfb=!1}return t.prototype.checkAndSetActiveState=function(t){return this.Ufb.some(function(e){return!e.some(function(e){return t.indexOf(e)<0})})?(this.Vfb=!0,!0):(this.Vfb=!1,!1)},t.prototype.isActive=function(){return this.Vfb},t.prototype.setKeyCombinations=function(t){for(var e=[],i=0,n=t;i<n.length;i++){var r=n[i].split(" ").filter(function(t){return t.length>0});r.length>0&&e.push(r)}this.Ufb=e},t}(),a=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n.ffb=function(t){if(t&&"string"==typeof t.key){var e=t.key.replace(" ","Space"),i=n.dfb.indexOf(e);i>=0&&"keyup"===t.type?n.dfb.splice(i,1):i<0&&"keydown"===t.type&&n.dfb.push(e),n.Xfb.checkAndSetActiveState(n.dfb),n.Yfb.checkAndSetActiveState(n.dfb),n.Zfb.checkAndSetActiveState(n.dfb),n.afb.checkAndSetActiveState(n.dfb),n.bfb.checkAndSetActiveState(n.dfb),n.cfb.checkAndSetActiveState(n.dfb)}},n.Wfb=n.config.maxDisplacementSpeed,n.Xfb=new s(["w"]),n.Yfb=new s(["s"]),n.Zfb=new s(["a"]),n.afb=new s(["d"]),n.bfb=new s(["e"]),n.cfb=new s(["q"]),n.dfb=[],n.efb=new r.DisplacementVector,n.applyKeyMap(n.config.keyMap),n.enable(),n}return n(e,t),e.prototype.getDisplacementVector=function(t){if(this.enabled){var e=0,i=0,n=0;this.debugHooks.requestKeyActiveState?(i+=this.debugHooks.requestKeyActiveState("up")?this.Wfb*t:0,i-=this.debugHooks.requestKeyActiveState("down")?this.Wfb*t:0,e+=this.debugHooks.requestKeyActiveState("left")?this.Wfb*t:0,e-=this.debugHooks.requestKeyActiveState("right")?this.Wfb*t:0,n-=this.debugHooks.requestKeyActiveState("rotateClockwise")?this.Wfb*t:0,n+=this.debugHooks.requestKeyActiveState("rotateCounterclockwise")?this.Wfb*t:0):(i+=this.Xfb.isActive()?this.Wfb*t:0,i-=this.Yfb.isActive()?this.Wfb*t:0,e+=this.Zfb.isActive()?this.Wfb*t:0,e-=this.afb.isActive()?this.Wfb*t:0,n-=this.bfb.isActive()?this.Wfb*t:0,n+=this.cfb.isActive()?this.Wfb*t:0);var r=0!==e||0!==i||0!==n;this.efb.update(e,i,n,r,t)}else this.efb.update(0,0,0,!1,t);return this.efb},e.prototype.enable=function(){this.enabled=!0,document.addEventListener("keydown",this.ffb,!1),document.addEventListener("keyup",this.ffb,!1)},e.prototype.disable=function(){this.enabled=!1,document.removeEventListener("keydown",this.ffb,!1),document.removeEventListener("keyup",this.ffb,!1)},e.prototype.dispose=function(){this.disable()},e.prototype.applyKeyMap=function(t){t.hasOwnProperty("up")&&this.Xfb.setKeyCombinations(t.up),t.hasOwnProperty("down")&&this.Yfb.setKeyCombinations(t.down),t.hasOwnProperty("left")&&this.Zfb.setKeyCombinations(t.left),t.hasOwnProperty("right")&&this.afb.setKeyCombinations(t.right),t.hasOwnProperty("rotateClockwise")&&this.bfb.setKeyCombinations(t.rotateClockwise),t.hasOwnProperty("rotateCounterclockwise")&&this.cfb.setKeyCombinations(t.rotateCounterclockwise)},e}(o.Control);e.KeyboardControl=a},64419:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.MouseControl=void 0;var r=i(37485),o=i(51629),s=function(t){function e(i,n,s,a,h){void 0===h&&(h=90);var u=t.call(this,i,n)||this;return u.pfb=function(t){var i=e.getTouchPosition(t),n=0,r=0;u.ifb&&(n=i.x-u.lfb.x,r=i.y-u.lfb.y,u.mfb.x+=n,u.mfb.y+=r,u.lfb=i),Math.abs(n)+Math.abs(r)>0&&(u.kfb=!0),t.preventDefault()},u.qfb=function(t){t.stopPropagation(),t.preventDefault(),o.ElementHelper.removeEventListener(document,["click"],u.qfb,!0)},u.rfb=function(t){o.ElementHelper.removeEventListener(document,o.ElementHelper.touchEvents.move,u.pfb,!1),o.ElementHelper.removeEventListener(document,o.ElementHelper.touchEvents.up,u.rfb,!1),o.ElementHelper.removeEventListener(u.gfb,o.ElementHelper.touchEvents.up,u.rfb,!1),o.ElementHelper.removeClass(document.body,"bitmovinplayer-no-select"),u.lfb=null,u.ifb=!1,u.kfb&&u.jfb&&t.target===u.jfb&&o.ElementHelper.addEventListener(document,["click"],u.qfb,!0),u.kfb=!1,u.jfb=null},u.sfb=function(t){u.lfb=e.getTouchPosition(t),u.mfb={x:0,y:0},u.ifb=!0,u.kfb=!1,u.jfb=t.target,o.ElementHelper.addEventListener(document,o.ElementHelper.touchEvents.move,u.pfb,!1),o.ElementHelper.addEventListener(document,o.ElementHelper.touchEvents.up,u.rfb,!1),o.ElementHelper.addEventListener(u.gfb,o.ElementHelper.touchEvents.up,u.rfb,!1),o.ElementHelper.addClass(document.body,"bitmovinplayer-no-select")},u.gfb=s,u.hfb=a,u.ifb=!1,u.lfb=null,u.mfb={x:0,y:0},u.nfb=h,u.ofb=new r.DisplacementVector,u.enable(),u}return n(e,t),e.prototype.getDisplacementVector=function(t){var e=this.hfb.clientWidth,i=this.hfb.clientHeight,n=Boolean(this.debugHooks.requestTraveledMouseDistance),r=this.nfb*(i/e);if(this.mfb=n?this.debugHooks.requestTraveledMouseDistance(t):this.mfb,this.enabled&&isFinite(r)&&r>0){var o=this.ifb||0!==this.mfb.x||0!==this.mfb.y;this.ofb.update(this.mfb.x/this.hfb.clientWidth*this.nfb,this.mfb.y/this.hfb.clientHeight*r,0,o,t),this.mfb={x:0,y:0}}else this.ofb.update(0,0,0,this.ifb,t);return this.ofb},e.prototype.enable=function(){this.enabled=!0,o.ElementHelper.addEventListener(this.gfb,o.ElementHelper.touchEvents.down,this.sfb,!1)},e.prototype.disable=function(){this.enabled=!1,o.ElementHelper.removeEventListener(document,o.ElementHelper.touchEvents.move,this.pfb,!1),o.ElementHelper.removeEventListener(document,o.ElementHelper.touchEvents.up,this.rfb,!1),o.ElementHelper.removeEventListener(this.gfb,o.ElementHelper.touchEvents.up,this.rfb,!1),o.ElementHelper.removeEventListener(this.gfb,o.ElementHelper.touchEvents.down,this.sfb,!1),o.ElementHelper.removeEventListener(document,["click"],this.qfb,!0),this.lfb=null,this.ifb=!1,this.kfb=!1,this.jfb=null,o.ElementHelper.removeClass(document.body,"bitmovinplayer-no-select")},e.prototype.dispose=function(){this.disable(),this.gfb=null,this.hfb=null},e.getTouchPosition=function(t){var e={x:0,y:0};return"ms"===o.ElementHelper.touchEvents.type?(e.x=t.clientX||t.originalEvent.layerX,e.y=t.clientY||t.originalEvent.layerY):"mobile"===o.ElementHelper.touchEvents.type?(e.x=t.touches[0].clientX,e.y=t.touches[0].clientY):(e.x=t.clientX,e.y=t.clientY),e.x=e.x||0,e.y=e.y||0,e},e}(i(67982).Control);e.MouseControl=s},54479:function(t,e){var i,n,r=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.GLUniform=e.GLAttribute=e.GLVariableType=e.GL_ERROR_STR=e.GL_ERROR=void 0,function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.OTHER_ERROR=1]="OTHER_ERROR",t[t.INVALID_ENUM=1280]="INVALID_ENUM",t[t.INVALID_FRAMEBUFFER_OPERATION=1286]="INVALID_FRAMEBUFFER_OPERATION",t[t.INVALID_OPERATION=1282]="INVALID_OPERATION",t[t.INVALID_VALUE=1281]="INVALID_VALUE"}(i||(e.GL_ERROR=i={})),e.GL_ERROR_STR={1280:"INVALID_ENUM",1286:"INVALID_FRAMEBUFFER_OPERATION",1282:"INVALID_OPERATION",1281:"INVALID_VALUE"},function(t){t.UNIFORM_1I="uniform1i",t.UNIFORM_1F="uniform1f",t.UNIFORM_MATRIX_4FV="uniformMatrix4fv",t.UNIFORM_1FV="uniform1fv",t.UNIFORM_2FV="uniform2fv"}(n||(e.GLVariableType=n={}));var o=function(){function t(t,e,i,n){this.context=t,this.program=e,this.name=i,this.type=n}return Object.defineProperty(t.prototype,"loc",{get:function(){return this.location},enumerable:!1,configurable:!0}),t}(),s=function(t){function e(e,i,n,r){var o=t.call(this,e,i,n,r)||this;return o.location=o.context.getAttribLocation(o.program,o.name),o.context.enableVertexAttribArray(o.name),o}return r(e,t),e.prototype.setValue=function(t){},e}(o);e.GLAttribute=s;var a=function(t){function e(e,i,n,r){var o=t.call(this,e,i,n,r)||this;return o.location=o.context.getUniformLocation(o.program,o.name),o.context.enableVertexAttribArray(o.name),o}return r(e,t),e.prototype.setValue=function(t){this.type.indexOf("Matrix")>-1?this.context[this.type].call(this.context,this.location,!1,t):this.context[this.type].call(this.context,this.location,t)},e}(o);e.GLUniform=a},55443:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultDeviceOrientationProvider=void 0;var r,o=i(44369),s=i(16404);!function(t){t.Granted="granted",t.Denied="denied"}(r||(r={}));var a=function(t){function e(){var i=t.call(this)||this;i.Uib=null,i.Vib=null,i.Wib=null,i.Xib=0,i.Yib=0,i.bib=function(t){var e=void 0!==t.alpha&&null!==t.alpha,n=void 0!==t.beta&&null!==t.beta,r=void 0!==t.gamma&&null!==t.gamma;e&&n&&r&&(i.Uib=t.alpha,i.Vib=t.gamma,i.Wib=t.beta),t.hasOwnProperty("screenOrientation")&&(i.Xib=i.aib(t))},i.cib=function(){i.bib(e.getDeviceOrientationFromWindow())},i.dib=function(t){t&&t.data&&i.bib(t.data)},window.top!==window?window.addEventListener("message",i.dib,!1):window.addEventListener("deviceorientation",i.bib);try{window.addEventListener("orientationchange",i.cib);var n=e.getDeviceOrientationFromWindow();i.bib(n)}catch(t){window.removeEventListener("orientationchange",i.cib)}return i.enable(),i}return n(e,t),e.prototype.getOrientation=function(){if(!this.orientationDataAvailable()||!this.enabled)return this.defaultDeviceOrientation;var t=o.MathUtil.degToRad(this.Uib)/2,e=o.MathUtil.degToRad(this.Wib)/2,i=o.MathUtil.degToRad(this.Vib)/2,n=Math.cos(e),r=Math.cos(i),s=Math.cos(t),a=Math.sin(e),h=Math.sin(i),u=Math.sin(t),l=n*r*s-a*h*u,c=a*r*s-n*h*u,d=n*h*s+a*r*u,p=n*r*u+a*h*s,f=o.Quat.fromValues(c,d,p,l),b=o.MathUtil.degToRad(this.Zib())/2,y=o.Quat.fromValues(0,0,-Math.sin(b),Math.cos(b)),v=o.Quat.create();o.Quat.multiply(v,f,y);var g=Math.sqrt(.5);return o.Quat.multiply(v,o.Quat.fromValues(-g,0,0,g),v),o.Quat.toAngle(v)},e.prototype.orientationDataAvailable=function(){return null!==this.Uib},e.supported=function(){return!!window.DeviceOrientationEvent},e.prototype.Zib=function(){return this.Xib},e.prototype.aib=function(t){var e;switch(t.screenOrientation.type){case"landscape-primary":e=90;break;case"landscape-secondary":e=-90;break;case"portrait-secondary":e=180;break;case"portrait-primary":e=0}return!e&&isNaN(e)&&(e=isNaN(t.screenOrientation.type)?t.orientation||0:t.screenOrientation.type),window.top!==window&&e===this.Yib&&t.orientation!==e&&(e=t.orientation||0),e},e.getDeviceOrientationFromWindow=function(){var t=window.screen,e=t.orientation||t.mozOrientation||t.msOrientation||{};return{screenOrientation:{type:e.type||e,angle:e.angle},orientation:window.orientation}},e.prototype.permissionRequired=function(){return"undefined"!=typeof DeviceMotionEvent&&"function"==typeof DeviceMotionEvent.requestPermission},e.prototype.requestPermission=function(){return"undefined"==typeof DeviceMotionEvent||"function"!=typeof DeviceMotionEvent.requestPermission?Promise.resolve():DeviceMotionEvent.requestPermission().then(function(t){return t===r.Granted?Promise.resolve():Promise.reject()})},e}(s.DeviceOrientationProvider);e.DefaultDeviceOrientationProvider=a},16404:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeviceOrientationProvider=void 0;var i=function(){function t(){this.defaultFieldOfView={upDegrees:45,rightDegrees:55,downDegrees:45,leftDegrees:55},this.defaultDeviceOrientation={yaw:0,pitch:0,roll:0}}return t.prototype.getFieldOfViewParams=function(){return this.defaultFieldOfView},t.supported=function(){return!1},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.isEnabled=function(){return this.enabled},t.prototype.permissionRequired=function(){return!1},t.prototype.requestPermission=function(){return Promise.resolve()},t}();e.DeviceOrientationProvider=i},59324:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.DeviceOrientationProviderFactory=void 0;var n=i(55443),r=i(11805),o=i(72458),s=function(){function t(){}return t.get=function(){return o.WebVRDeviceOrientationProvider.supported()?new o.WebVRDeviceOrientationProvider:n.DefaultDeviceOrientationProvider.supported()?new n.DefaultDeviceOrientationProvider:new r.NoDeviceOrientationProvider},t}();e.DeviceOrientationProviderFactory=s},37485:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.DisplacementVector=void 0;var n=i(23068),r=Math.PI/180,o=180/Math.PI,s=function(){function t(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=!1),this.Feb=null,this.update(t,e,i,n)}return Object.defineProperty(t.prototype,"x",{get:function(){return this.zeb},set:function(t){this.zeb!==t&&this.update(t,this.Aeb,this.Beb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.Aeb},set:function(t){this.Aeb!==t&&this.update(this.zeb,t,this.Beb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"phi",{get:function(){return this.Beb},set:function(t){this.Beb!==t&&this.update(this.zeb,this.Aeb,t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alpha",{get:function(){return this.Deb},set:function(t){this.Deb!==t&&this.update(this.Ceb*Math.cos(t*r),this.Ceb*Math.sin(t*r),this.Beb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this.Ceb},set:function(t){this.Ceb!==t&&this.update(t*Math.cos(this.Deb*r),t*Math.sin(this.Deb*r),this.Beb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"active",{get:function(){return this.Eeb},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deltaTime",{get:function(){return this.Feb||0},set:function(t){this.Feb=t},enumerable:!1,configurable:!0}),t.prototype.update=function(t,e,i,r,s){if(void 0===i&&(i=0),"boolean"==typeof r&&(this.Eeb=r),(0,n.isNumber)(s)&&(this.Feb=s),this.zeb!==t||this.Aeb!==e||this.Beb!==i){if(this.zeb=Math.abs(t)<1e-4?0:t,this.Aeb=Math.abs(e)<1e-4?0:e,this.Beb=Math.abs(i)<1e-4?0:i,0===this.zeb&&0===this.Aeb&&0===this.Beb)return this.Ceb=0,void(this.Deb=0);this.Ceb=Math.sqrt(this.zeb*this.zeb+this.Aeb*this.Aeb),0===this.Aeb&&this.zeb>=0?this.Deb=0:0===this.zeb&&this.Aeb>0?this.Deb=90:0===this.zeb&&this.Aeb<0?this.Deb=270:this.zeb<0&&0===this.Aeb?this.Deb=180:this.zeb>0&&this.Aeb>0?this.Deb=Math.atan(this.Aeb/this.zeb)*o:this.zeb<0&&this.Aeb>0||this.zeb<0&&this.Aeb<0?this.Deb=180+Math.atan(this.Aeb/this.zeb)*o:this.zeb>0&&this.Aeb<0?this.Deb=360+Math.atan(this.Aeb/this.zeb)*o:this.Deb=0}},t.prototype.fromVec3=function(t,e,i){this.update(t.x,t.y,t.phi,e,i)},t.prototype.add=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=this.zeb,n=this.Aeb,r=this.Beb,o=0,s=t;o<s.length;o++){var a=s[o];i+=a.zeb,n+=a.Aeb,r+=a.Beb}this.update(i,n,r)},t.prototype.diff=function(e,i){i instanceof t?this.update(i.x-e.x,i.y-e.y,i.phi-e.phi):this.update(e.x-this.zeb,e.y-this.Aeb,e.phi-this.Beb)},t.clone=function(e,i){e instanceof t&&i instanceof t&&i.update(e.zeb,e.Aeb,e.Beb,e.Eeb,e.Feb)},t.prototype.scale=function(t){this.length=this.Ceb*t},t}();e.DisplacementVector=s},11805:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.NoDeviceOrientationProvider=void 0;var r=function(t){function e(){var e=t.call(this)||this;return e.enable(),e}return n(e,t),e.prototype.getOrientation=function(){return this.defaultDeviceOrientation},e.prototype.orientationDataAvailable=function(){return!0},e.supported=function(){return!0},e}(i(16404).DeviceOrientationProvider);e.NoDeviceOrientationProvider=r},33639:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.OrientationHandler=void 0;var n,r=i(44369),o=i(3714),s=i(45698),a=i(22185),h=i(64419),u=i(76320),l=i(59324),c=i(37485);!function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal",t.BOTH="BOTH"}(n||(n={}));var d=function(){function t(t,e,i,o,d){var p=this;this.x6=null,this.y6=null,this.z6=1,this.A6=null,this.B6=null,this.C6=null,this.D6=null,this.E6=null,this.F6=null,this.G6=null,this.enableGyroscope=function(){p.w6.enable()},this.disableGyroscope=function(){p.w6.disable()},this.isGyroscopeEnabled=function(){return p.w6.isEnabled()},this.enableMouseControl=function(){p.K6.enable()},this.disableMouseControl=function(){p.K6.disable()},this.isMouseControlEnabled=function(){return p.K6.isEnabled()},this.enableKeyboardControl=function(){p.J6.enable()},this.disableKeyboardControl=function(){p.J6.disable()},this.isKeyboardControlEnabled=function(){return p.J6.isEnabled()},this.H6=t,this.I6=i,this.c6=d,this.w6=l.DeviceOrientationProviderFactory.get(),this.D6=r.Mat4.create(),this.E6=r.Mat4.create(),this.F6=r.Mat4.create(),this.A6=r.Mat4.create(),this.x6=r.Mat4.create(),this.z6=this.I6.stereo?2:1,this.C6={yaw:0,pitch:0,roll:0},this.C6.yaw=this.I6.startPosition,this.P6=new c.DisplacementVector,this.Q6=new c.DisplacementVector,this.B6={yaw:this.C6.yaw,pitch:0,roll:0},this.R6=this.I6.viewingDirectionChangeEventInterval,this.S6=this.I6.viewingDirectionChangeThreshold,this.X6=this.I6.verticalFieldOfView,this.Y6=this.I6.horizontalFieldOfView,this.Z6=this.X6>-1,this.a6=this.Y6>-1,this.b6=1,this.T6=0,this.U6=!1,this.J6=new a.KeyboardControl(this.I6.keyboardControl,o),this.K6=new h.MouseControl(this.I6.mouseControl,o,e,this.H6),this.L6=new s.ApiControl(this.I6.apiControl,o,this.R6),this.N6=u.TransitionTimingFactory.get(this.I6.keyboardControl),this.M6=u.TransitionTimingFactory.get(this.I6.mouseControl),this.O6=u.TransitionTimingFactory.get(this.I6.apiControl),this.X6>-1&&this.Y6>-1?this.W6=n.BOTH:this.Y6>-1?this.W6=n.HORIZONTAL:this.W6=n.VERTICAL}return t.clampValue=function(t,e,i){return 0===e&&360===i?t%360:t>i?i:t<e?e:t},t.clampToWindow=function(e,i){var n={yaw:0,pitch:0,roll:e.roll};return n.yaw=t.clampValue(e.yaw,i.minYaw,i.maxYaw),n.pitch=t.clampValue(e.pitch,i.minPitch,i.maxPitch),n},t.prototype.d6=function(e){void 0===e&&(e={yaw:0,pitch:0,roll:0}),null!==this.G6&&(this.G6=t.clampToWindow(this.G6,this.I6.viewingWindow),this.C6.yaw=this.G6.yaw-e.yaw,this.C6.pitch=this.G6.pitch-e.pitch,this.C6.roll=this.G6.roll-e.roll,this.M6.reset(),this.N6.reset(),this.O6.reset()),this.G6=null,this.B6.yaw=this.C6.yaw+e.yaw,this.B6.pitch=this.C6.pitch+e.pitch,this.B6.roll=this.C6.roll+e.roll,this.B6=t.clampToWindow(this.B6,this.I6.viewingWindow),r.Mat4.identity(this.A6),r.Mat4.rotate(this.A6,r.MathUtil.degToRad(this.B6.yaw+180),[0,1,0]),r.Mat4.rotate(this.A6,r.MathUtil.degToRad(this.B6.pitch),[1,0,0]),r.Mat4.rotate(this.A6,r.MathUtil.degToRad(this.B6.roll),[0,0,1])},t.prototype.getProjectionInverse=function(){return this.x6},t.prototype.getViewingDirection=function(){return this.B6},t.prototype.setViewingDirection=function(t){this.G6=t},t.prototype.setVerticalFieldOfView=function(t){this.Z6=-1!==t,this.X6=-1===t?-1:Math.max(Math.min(180,t),0),-1===t&&this.W6===n.BOTH?this.W6=n.HORIZONTAL:this.W6===n.HORIZONTAL&&(this.a6?this.W6=n.BOTH:this.W6=n.VERTICAL)},t.prototype.getVerticalFieldOfView=function(){return this.X6/this.b6},t.prototype.setHorizontalFieldOfView=function(t){this.a6=-1!==t,this.Y6=-1===t?-1:Math.max(Math.min(180,t),0),-1===t&&this.W6===n.BOTH?this.W6=n.VERTICAL:this.W6===n.VERTICAL&&(this.Z6?this.W6=n.BOTH:this.W6=n.HORIZONTAL)},t.prototype.getHorizontalFieldOfView=function(){return this.Y6/this.b6},t.prototype.zoom=function(t){return!!isFinite(t)&&(this.b6=Math.max(Number(t),1e-10),!0)},t.prototype.getZoom=function(){return this.b6},t.prototype.e6=function(){var t,e,i=this.w6.getFieldOfViewParams(),o=[1];this.X6<0&&(this.X6=i.upDegrees+i.downDegrees),this.Y6<0&&(this.Y6=i.leftDegrees+i.rightDegrees),this.W6!==n.BOTH&&this.W6!==n.HORIZONTAL||o.push(180/(this.Y6/this.b6)),this.W6!==n.BOTH&&this.W6!==n.VERTICAL||o.push(180/(this.X6/this.b6)),this.b6/=Math.min.apply(null,o);var s=r.MathUtil.degToRad(this.X6/this.b6),a=r.MathUtil.degToRad(this.Y6/this.b6);this.W6===n.BOTH?(t=s,e=Math.tan(.5*a)/Math.tan(.5*s)):e=this.H6.width/this.z6/this.H6.height,this.W6===n.HORIZONTAL?(t=2*Math.atan(Math.tan(a/2)/e),this.X6=r.MathUtil.radToDeg(t)*this.b6):this.W6===n.VERTICAL&&(t=s,this.Y6=r.MathUtil.radToDeg(2*Math.atan(e*Math.tan(s/2)))/this.z6*this.b6),r.Mat4.perspective(this.F6,t,e,.1,10),r.Mat4.invert(this.D6,this.F6),r.Mat4.multiply(this.x6,this.A6,this.D6)},t.prototype.update=function(e){this.y6=this.y6||e;for(var i=(e-this.y6)/1e3,n=r.Mat4.create(),s=0;s<this.x6.length;s++)n[s]=this.x6[s];this.T6+=i,this.P6.update(0,0,0),i>0&&this.P6.add(this.M6.apply(this.K6.getDisplacementVector(i)),this.N6.apply(this.J6.getDisplacementVector(i)),this.O6.apply(this.L6.getDisplacementVector(i))),this.C6.yaw+=this.P6.x,this.C6.pitch+=this.P6.y,this.C6.roll+=this.P6.phi,this.C6=t.clampToWindow(this.C6,this.I6.viewingWindow),this.y6=e,this.w6.orientationDataAvailable()?this.d6(this.w6.getOrientation()):this.d6(),this.Q6.add(this.P6);var a=Math.abs(this.Q6.length)>this.S6||Math.abs(this.Q6.phi)>this.S6;a||this.U6||(this.T6=0);var h=this.T6>=this.R6;for(!a||!h&&this.U6?h&&this.U6&&(this.U6=!1,this.Q6.update(0,0,0),this.T6=0,this.c6.getEventFunction()(o.PlayerEvent.VRViewingDirectionChanged,{direction:this.B6})):(this.U6=!0,this.T6=0,this.Q6.update(0,0,0),this.c6.getEventFunction()(o.PlayerEvent.VRViewingDirectionChange,{direction:this.B6})),this.e6(),s=0;s<this.x6.length;s++)if(n[s]!==this.x6[s])return!0;return!1},t.prototype.enableStereo=function(){this.z6=2},t.prototype.disableStereo=function(){this.z6=1},t.prototype.moveViewingDirection=function(t){this.L6.setTargetVector(t)},t.prototype.setViewingDirectionChangeEventInterval=function(t){this.R6=t},t.prototype.getViewingDirectionChangeEventInterval=function(){return this.R6},t.prototype.setViewingDirectionChangeThreshold=function(t){this.S6=t},t.prototype.getViewingDirectionChangeThreshold=function(){return this.S6},t.prototype.permissionRequired=function(){return this.w6.permissionRequired()},t.prototype.requestPermission=function(){return this.w6.requestPermission()},t.prototype.destroy=function(){this.J6.dispose(),this.K6.dispose(),this.J6=null,this.K6=null},t}();e.OrientationHandler=d},72458:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.WebVRDeviceOrientationProvider=void 0;var r=i(44369),o=function(t){function e(){var e=t.call(this)||this;return e.eib=null,e.fib=null,e.gib=function(t){var i;for(i=0;i<t.length;++i)if(t[i]instanceof HMDVRDevice){e.eib=t[i];break}if(e.eib)for(i=0;i<t.length;++i)if(t[i]instanceof PositionSensorVRDevice&&t[i].hardwareUnitId===e.eib.hardwareUnitId){e.fib=t[i];break}},navigator.getVRDevices&&navigator.getVRDevices().then(e.gib),e.enable(),e}return n(e,t),e.prototype.getOrientation=function(){if(this.orientationDataAvailable()&&this.enabled){var t=this.fib.getState(),e=new Float32Array([0,0,0,0]);return null!==t&&t.orientation&&(e=new Float32Array([t.orientation.x,t.orientation.y,t.orientation.z,t.orientation.w])),r.Quat.toAngle(e)}return this.defaultDeviceOrientation},e.prototype.getFieldOfViewParams=function(){return this.orientationDataAvailable()?this.eib.getEyeParameters("left").recommendedFieldOfView:this.defaultFieldOfView},e.prototype.orientationDataAvailable=function(){return null!==this.fib&&null!==this.eib},e.supported=function(){return!!navigator.getVRDevices},e}(i(16404).DeviceOrientationProvider);e.WebVRDeviceOrientationProvider=o},81116:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.EaseInOutTransitionTiming=void 0;var r=i(44369),o=i(37485),s=function(t){function e(e){var i=t.call(this,e)||this;return i.currentDisplacementVector=new o.DisplacementVector,i.intermediateDisplacementVector=new o.DisplacementVector,i.targetDisplacementVector=new o.DisplacementVector,i.normalizedTargetDisplacementVector=new o.DisplacementVector,i.normalizedDisplacementVector=new o.DisplacementVector,i.maximumLinearAcceleration=0,i.maximumAngularAcceleration=0,i}return n(e,t),e.prototype.shouldTransitionBeApplied=function(){var t=isFinite(this.targetDisplacementVector.deltaTime),e=this.targetDisplacementVector.deltaTime>0;return t&&e},e.prototype.apply=function(t){if(this.targetDisplacementVector.deltaTime=t.deltaTime,o.DisplacementVector.clone(t,this.normalizedDisplacementVector),o.DisplacementVector.clone(this.targetDisplacementVector,this.normalizedTargetDisplacementVector),this.normalizedDisplacementVector.length/=this.normalizedDisplacementVector.deltaTime,this.normalizedTargetDisplacementVector.length/=this.normalizedTargetDisplacementVector.deltaTime,this.normalizedDisplacementVector.phi/=this.normalizedDisplacementVector.deltaTime,this.normalizedTargetDisplacementVector.phi/=this.normalizedTargetDisplacementVector.deltaTime,this.normalizedDisplacementVector.diff(this.normalizedTargetDisplacementVector),this.normalizedDisplacementVector.length>0&&(this.maximumLinearAcceleration=this.normalizedDisplacementVector.length/this.config.transitionTime),0!==Math.abs(this.normalizedDisplacementVector.phi)&&(this.maximumAngularAcceleration=Math.abs(this.normalizedDisplacementVector.phi)/this.config.transitionTime),o.DisplacementVector.clone(t,this.targetDisplacementVector),!this.shouldTransitionBeApplied())return o.DisplacementVector.clone(this.targetDisplacementVector,this.currentDisplacementVector),this.targetDisplacementVector;this.intermediateDisplacementVector.diff(this.currentDisplacementVector,this.targetDisplacementVector);var e=Math.min(this.maximumLinearAcceleration*this.targetDisplacementVector.deltaTime*this.targetDisplacementVector.deltaTime,this.config.maxDisplacementSpeed),i=Math.min(this.maximumAngularAcceleration*this.targetDisplacementVector.deltaTime*this.targetDisplacementVector.deltaTime,this.config.maxDisplacementSpeed);return this.intermediateDisplacementVector.length>e&&(this.intermediateDisplacementVector.length=e),Math.abs(this.intermediateDisplacementVector.phi)>i&&(this.intermediateDisplacementVector.phi=r.MathUtil.sign(this.intermediateDisplacementVector.phi)*i),this.currentDisplacementVector.add(this.intermediateDisplacementVector),this.currentDisplacementVector},e.prototype.reset=function(){this.currentDisplacementVector.update(0,0,0),this.intermediateDisplacementVector.update(0,0,0),this.targetDisplacementVector.update(0,0,0),this.maximumLinearAcceleration=0,this.maximumAngularAcceleration=0},e}(i(7192).TransitionTiming);e.EaseInOutTransitionTiming=s},68801:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.EaseInTransitionTiming=void 0;var r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.shouldTransitionBeApplied=function(){var t=isFinite(this.targetDisplacementVector.deltaTime),e=this.targetDisplacementVector.deltaTime>0,i=this.targetDisplacementVector.active;return t&&e&&i},e}(i(81116).EaseInOutTransitionTiming);e.EaseInTransitionTiming=r},95746:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.EaseOutTransitionTiming=void 0;var r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.shouldTransitionBeApplied=function(){var t=isFinite(this.targetDisplacementVector.deltaTime),e=this.targetDisplacementVector.deltaTime>0,i=this.targetDisplacementVector.active;return t&&e&&!i},e}(i(81116).EaseInOutTransitionTiming);e.EaseOutTransitionTiming=r},4551:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.NoTransitionTiming=void 0;var r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.apply=function(t){return t},e.prototype.reset=function(){},e}(i(7192).TransitionTiming);e.NoTransitionTiming=r},7192:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.TransitionTiming=void 0;var i=function(){return function(t){this.config=t}}();e.TransitionTiming=i},76320:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.TransitionTimingFactory=void 0;var n=i(43948),r=i(81116),o=i(68801),s=i(95746),a=i(4551),h=function(){function t(){}return t.get=function(t){switch(t.transitionTimingType){case n.TransitionTimingType.None:return new a.NoTransitionTiming(t);case n.TransitionTimingType.EaseIn:return new o.EaseInTransitionTiming(t);case n.TransitionTimingType.EaseOut:return new s.EaseOutTransitionTiming(t);case n.TransitionTimingType.EaseInOut:return new r.EaseInOutTransitionTiming(t)}},t}();e.TransitionTimingFactory=h},70372:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigParser=void 0;var n=i(43948),r={contentType:n.VRContentType.Single,stereo:!1,startPosition:0,contentFieldOfView:360,verticalFieldOfView:-1,horizontalFieldOfView:-1,viewingWindow:{minYaw:0,maxYaw:360,minPitch:-90,maxPitch:90},restrictedInlinePlayback:!1,enableFrameRateMeasurements:!1,cardboard:null,viewingDirectionChangeThreshold:5,viewingDirectionChangeEventInterval:.25,keyboardControl:{transitionTimingType:n.TransitionTimingType.EaseInOut,transitionTime:.25,maxDisplacementSpeed:90,keyMap:{up:["w"],right:["d"],down:["s"],left:["a"],rotateClockwise:["e"],rotateCounterclockwise:["q"]}},mouseControl:{transitionTimingType:n.TransitionTimingType.EaseOut,transitionTime:.25,maxDisplacementSpeed:1/0},apiControl:{transitionTimingType:n.TransitionTimingType.EaseInOut,transitionTime:.25,maxDisplacementSpeed:1/0}},o=function(){function t(){}return t.getObject=function(t,e){for(var i=e.split("."),n=!0,o=t,s=r,a=0,h=i;a<h.length;a++){var u=h[a];o.hasOwnProperty(u)&&n?o=o[u]:n=!1,s.hasOwnProperty(u)&&(s=s[u])}return[n,o,s]},t.getPrimitive=function(e,i,n,r){var o=t.getObject(e,i),s=o[0],a=o[1],h=o[2],u=!0;if(r)for(var l in r){if(r.hasOwnProperty(l)&&r[l]===a){u=!0;break}u=!1}return s&&typeof a===n&&u?a:h},t.getArray=function(e,i,n){var r=t.getObject(e,i),o=r[0],s=r[1],a=r[2];return o&&"object"==typeof s&&s instanceof Array&&!s.some(function(t){return typeof t!==n})?s:a},t.getStringPrimitive=function(e,i,n){return t.getPrimitive(e,i,"string",n)},t.getEnumPrimitive=function(e,i,n){return t.getPrimitive(e,i,"string",n)},t.getBooleanPrimitive=function(e,i,n){return t.getPrimitive(e,i,"boolean",n)},t.getNumberPrimitive=function(e,i,n){return t.getPrimitive(e,i,"number",n)},t.getStringArray=function(e,i){return t.getArray(e,i,"string")},t.parseGeneralConfig=function(e,i){i.stereo=t.getBooleanPrimitive(e,"stereo"),i.restrictedInlinePlayback=t.getBooleanPrimitive(e,"restrictedInlinePlayback"),i.startPosition=t.getNumberPrimitive(e,"startPosition"),i.contentFieldOfView=t.getNumberPrimitive(e,"contentFieldOfView"),i.verticalFieldOfView=t.getNumberPrimitive(e,"verticalFieldOfView"),i.horizontalFieldOfView=t.getNumberPrimitive(e,"horizontalFieldOfView"),i.enableFrameRateMeasurements=t.getBooleanPrimitive(e,"enableFrameRateMeasurements"),i.cardboard=t.getStringPrimitive(e,"cardboard"),i.viewingDirectionChangeThreshold=t.getNumberPrimitive(e,"viewingDirectionChangeThreshold"),i.viewingDirectionChangeEventInterval=t.getNumberPrimitive(e,"viewingDirectionChangeEventInterval")},t.parseViewingWindow=function(e,i){i.viewingWindow=r.viewingWindow,e.hasOwnProperty("viewingWindow")&&"object"==typeof e.viewingWindow&&(i.viewingWindow.minYaw=t.getNumberPrimitive(e,"viewingWindow.minYaw"),i.viewingWindow.maxYaw=t.getNumberPrimitive(e,"viewingWindow.maxYaw"),i.viewingWindow.minPitch=t.getNumberPrimitive(e,"viewingWindow.minPitch"),i.viewingWindow.maxPitch=t.getNumberPrimitive(e,"viewingWindow.maxPitch"))},t.parseKeyboardControl=function(e,i){i.keyboardControl=r.keyboardControl,e.hasOwnProperty("keyboardControl")&&"object"==typeof e.keyboardControl&&(i.keyboardControl.transitionTimingType=t.getEnumPrimitive(e,"keyboardControl.transitionTimingType",n.TransitionTimingType),i.keyboardControl.transitionTime=t.getNumberPrimitive(e,"keyboardControl.transitionTime"),i.keyboardControl.maxDisplacementSpeed=t.getNumberPrimitive(e,"keyboardControl.maxDisplacementSpeed"),e.keyboardControl.hasOwnProperty("keyMap")&&"object"==typeof e.keyboardControl.keyMap&&(i.keyboardControl.keyMap.up=t.getStringArray(e,"keyboardControl.keyMap.up"),i.keyboardControl.keyMap.right=t.getStringArray(e,"keyboardControl.keyMap.right"),i.keyboardControl.keyMap.down=t.getStringArray(e,"keyboardControl.keyMap.down"),i.keyboardControl.keyMap.left=t.getStringArray(e,"keyboardControl.keyMap.left"),i.keyboardControl.keyMap.rotateClockwise=t.getStringArray(e,"keyboardControl.keyMap.rotateClockwise"),i.keyboardControl.keyMap.rotateCounterclockwise=t.getStringArray(e,"keyboardControl.keyMap.rotateCounterclockwise")))},t.parseMouseControl=function(e,i){i.mouseControl=r.mouseControl,e.hasOwnProperty("mouseControl")&&"object"==typeof e.mouseControl&&(i.mouseControl.transitionTimingType=t.getEnumPrimitive(e,"mouseControl.transitionTimingType",n.TransitionTimingType),i.mouseControl.transitionTime=t.getNumberPrimitive(e,"mouseControl.transitionTime"),i.mouseControl.maxDisplacementSpeed=t.getNumberPrimitive(e,"mouseControl.maxDisplacementSpeed"))},t.parseApiControl=function(e,i){i.apiControl=r.apiControl,e.hasOwnProperty("apiControl")&&"object"==typeof e.apiControl&&(i.apiControl.transitionTimingType=t.getEnumPrimitive(e,"apiControl.transitionTimingType",n.TransitionTimingType),i.apiControl.transitionTime=t.getNumberPrimitive(e,"apiControl.transitionTime"),i.apiControl.maxDisplacementSpeed=t.getNumberPrimitive(e,"apiControl.maxDisplacementSpeed"))},t.parseDebugHooks=function(t){var e={onDrawScene:null,onStartRendering:null,onRenderingSuspended:null,onRenderingResumed:null,requestFakeInput:null,requestTraveledMouseDistance:null,requestKeyActiveState:null};return t.debugHooks&&Object.keys(e).filter(function(e){return"function"==typeof t.debugHooks[e]}).forEach(function(i){return e[i]=t.debugHooks[i]}),e},t.parse=function(e){e=e||{};var i={contentType:t.getEnumPrimitive(e,"contentType",n.VRContentType)};return t.parseGeneralConfig(e,i),t.parseViewingWindow(e,i),t.parseKeyboardControl(e,i),t.parseMouseControl(e,i),t.parseApiControl(e,i),[i,t.parseDebugHooks(e)]},t}();e.ConfigParser=o},51629:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ElementHelper=void 0;var i=function(){function t(){}return t.addEventListener=function(t,e,i,n){for(var r=0;r<e.length;r++)t.addEventListener(e[r],i,n)},t.removeEventListener=function(t,e,i,n){for(var r=0;r<e.length;r++)t.removeEventListener(e[r],i,n)},t.addClass=function(t,e){if(t&&e){var i=t.getAttribute("class"),n=!0;i&&i.length>0&&(n=i.split(" ").indexOf(e)<0),i&&i.length>0&&n&&(e=i+" "+e),n&&t.setAttribute("class",e)}},t.removeClass=function(t,e){if(t&&e){var i=t.getAttribute("class");i&&i.indexOf(e)>-1&&(i=i.replace(new RegExp("(?:^|\\s)"+e+"(?!\\S)"),"").trim(),t.setAttribute("class",i))}},t.getNavigator=function(){return window.navigator},Object.defineProperty(t,"touchEvents",{get:function(){var e=t.getNavigator().userAgent,i=t.getNavigator().msPointerEnabled;return/Android|IEMobile|iP(hone|ad|od)/i.test(e)?i?{start:["MSPointerDown"],move:["MSPointerMove"],end:["MSPointerUp"],down:["MSPointerDown"],up:["MSPointerUp"],click:["MSPointerUp"],type:"ms"}:{start:["touchstart"],move:["touchmove"],end:["touchend","touchcancel"],down:["touchstart"],up:["touchend","touchcancel"],click:["touchend"],type:"mobile"}:{start:["mouseover"],move:["mousemove"],end:["mouseleave","mouseout"],down:["mousedown"],up:["mouseup"],click:["click"],type:"desktop"}},enumerable:!1,configurable:!0}),t}();e.ElementHelper=i},17378:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.FrameRateMonitor=void 0;var n=i(44369),r=function(){function t(t,e){void 0===e&&(e=1e3);var i=this;this.startAnimationFrame=function(){i.web&&(i.seb=window.performance.now())},this.endAnimationFrame=function(){if(!(i.seb<0)){var t=window.performance.now()-i.seb;i.peb.push(t),i.yeb(),i.veb+=t,i.veb>i.neb&&i.oeb&&(i.veb=0,i.xeb(i.getAverageFrameRate(),i.getTimeSpentUpdatingTexture(),i.getTimeSpentDrawingScene()))}},this.startUpdateTexture=function(){i.web&&(i.teb=window.performance.now())},this.endUpdateTexture=function(){i.teb<0||i.reb.push(window.performance.now()-i.teb)},this.startDrawScene=function(){i.web&&(i.ueb=window.performance.now())},this.endDrawScene=function(){i.ueb<0||i.qeb.push(window.performance.now()-i.ueb)},this.peb=[],this.reb=[],this.qeb=[],this.seb=-1,this.teb=-1,this.ueb=-1,this.meb=t,this.neb=e,this.oeb=[],this.veb=0,this.web=!1}return t.prototype.enable=function(){this.web=!0},t.prototype.disable=function(){this.web=!1,this.peb=[],this.reb=[],this.qeb=[],this.seb=-1,this.teb=-1,this.ueb=-1},t.prototype.subscribe=function(t){-1===this.oeb.indexOf(t)&&this.oeb.push(t)},t.prototype.unsubscribe=function(t){this.oeb.indexOf(t)>-1&&this.oeb.splice(this.oeb.indexOf(t),1)},t.prototype.getAverageFrameRate=function(){return 1/(n.MathUtil.getAverage(this.peb)/1e3)},t.prototype.getTimeSpentUpdatingTexture=function(){return n.MathUtil.getSum(this.reb)/n.MathUtil.getSum(this.peb)},t.prototype.getTimeSpentDrawingScene=function(){return n.MathUtil.getSum(this.qeb)/n.MathUtil.getSum(this.peb)},t.prototype.destroy=function(){this.disable(),this.oeb=null},t.prototype.xeb=function(t,e,i){for(var n=0,r=this.oeb;n<r.length;n++)r[n].onFrameRateAvailable(t,e,i)},t.prototype.yeb=function(){for(var t=0,e=this.peb.length-1;e>=0;e--)if((t+=this.peb[e])>=this.meb){this.peb.splice(0,e+1),this.reb.splice(0,e+1),this.qeb.splice(0,e+1);break}},t}();e.FrameRateMonitor=r},70415:function(t){t.exports="precision mediump float;\n\nconst int LEFT_EYE = 0;\nconst int RIGHT_EYE = 1;\nconst int CONTENT_TYPE_MONO = 0;\nconst int CONTENT_TYPE_STEREO_SBS = 1;\nconst int CONTENT_TYPE_STEREO_TAB = 2;\nconst float PI = 3.1415926535897932384626433832795;\nconst float TwoPI = 6.283185307179586476925286766559;\n\nuniform int eyeSelector;\nuniform int contentType;\nuniform float videoWidth;\nuniform float videoHeight;\nuniform float contentFieldOfView;\nuniform sampler2D textureUnit;\nvarying vec3 viewingDirection;\n\nfloat restrictedMod(float value, float divisor, float bound) {\n return mod(value, divisor) * (1.0 - (2.0 * bound)) + bound;\n}\n\nvec4 directionToColor(vec3 direction, int eye, int contentType, float contentFieldOfView, float videoWidth, float videoHeight) {\n float eyeOffset = 0.0;\n float textureSizeMultiplier = contentFieldOfView / 180.;\n float theta = atan(direction.x, direction.z * -1.0);\n float verticalSamplingOffset = 1.0 / (2.0 * videoHeight);\n float horizontalSamplingOffset = 1.0 / (2.0 * videoWidth);\n float phi = atan(direction.y * -1.0, length(direction.xz));\n\n float u = mod(theta / (PI * textureSizeMultiplier), 1.0);\n float v = mod(phi / PI + 0.5, 1.0);\n\n if (eye == LEFT_EYE) {\n eyeOffset = 0.0;\n } else if (eye == RIGHT_EYE) {\n eyeOffset = 0.5;\n }\n\n if ((theta + PI) / PI > textureSizeMultiplier) {\n return vec4(0., 0., 0., 1.);\n }\n\n if (contentType == CONTENT_TYPE_STEREO_SBS) {\n u = restrictedMod(theta / (TwoPI * textureSizeMultiplier), 0.5, horizontalSamplingOffset) + eyeOffset;\n } else if (contentType == CONTENT_TYPE_STEREO_TAB) {\n v = restrictedMod(v / 2.0, 0.5, verticalSamplingOffset) + (0.5 - eyeOffset);\n }\n\n return texture2D(textureUnit, vec2(u, v));\n}\nvoid main(void) {\n gl_FragColor = directionToColor(viewingDirection, eyeSelector, contentType, contentFieldOfView, videoWidth, videoHeight);\n}\n"},17913:function(t){t.exports="precision mediump float;\n\nattribute vec2 vertexPosition;\nvarying vec3 viewingDirection;\nuniform mat4 projectionInverse;\nuniform vec2 distortionFovScale;\nuniform vec2 distortionFovOffset;\nuniform float contentWidthDegrees;\nuniform float distortionMaxFovSquared;\nuniform float distortionCoefficients[12];\n\nfloat DistortionFactor(float rSquared) {\n float ret = 0.0;\n rSquared = min(distortionMaxFovSquared, rSquared);\n ret = rSquared * (ret + distortionCoefficients[11]);\n ret = rSquared * (ret + distortionCoefficients[10]);\n ret = rSquared * (ret + distortionCoefficients[9]);\n ret = rSquared * (ret + distortionCoefficients[8]);\n ret = rSquared * (ret + distortionCoefficients[7]);\n ret = rSquared * (ret + distortionCoefficients[6]);\n ret = rSquared * (ret + distortionCoefficients[5]);\n ret = rSquared * (ret + distortionCoefficients[4]);\n ret = rSquared * (ret + distortionCoefficients[3]);\n ret = rSquared * (ret + distortionCoefficients[2]);\n ret = rSquared * (ret + distortionCoefficients[1]);\n ret = rSquared * (ret + distortionCoefficients[0]);\n return ret + 1.0;\n}\n\nvec4 Distort(vec4 point) {\n vec3 pointNdc = point.xyz / point.w;\n vec2 pointUnitSquare = (pointNdc.xy + vec2(1.0)) / 2.0;\n vec2 pointTanAngle = pointUnitSquare * distortionFovScale - distortionFovOffset;\n float radiusSquared = dot(pointTanAngle, pointTanAngle);\n float distortionFactor = DistortionFactor(radiusSquared);\n vec2 distortedPointTanAngle = pointTanAngle * distortionFactor;\n vec2 distortedPointUnitSquare = (distortedPointTanAngle + distortionFovOffset)\n / distortionFovScale;\n vec3 distortedPointNdc = vec3(distortedPointUnitSquare * 2.0 - vec2(1.0), pointNdc.z);\n return vec4(distortedPointNdc, 1.0) * point.w;\n}\n\nvoid main(void) {\n gl_Position = Distort(vec4(vertexPosition, 1.0, 1.0));\n vec4 projectiveDirection = projectionInverse * gl_Position;\n viewingDirection = projectiveDirection.xyz / projectiveDirection.w;\n }\n"}},function(t){return function(){return t(6463)}()}])});
|
|
17
|
+
"use strict";!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.vr=e():(t.bitmovin=t.bitmovin||{},t.bitmovin.player=t.bitmovin.player||{},t.bitmovin.player.vr=e())}(self,function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[339],{50879:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ByteBuffer=void 0;var i=function(){function t(){}return t.stringToBytes=function(t,e){e=!!e;for(var i=t.length,n=new Uint8Array(e?4*i:i),r=0,o=0;o<i;o++){var s=t.charCodeAt(o);if(e&&55296<=s&&s<=56319){if(++o>=i)throw new Error("Malformed string, low surrogate expected at position "+o);s=(55296^s)<<10|65536|56320^t.charCodeAt(o)}else if(!e&&s>>>8)throw new Error("Wide characters are not allowed.");!e||s<=127?n[r++]=s:s<=2047?(n[r++]=192|s>>6,n[r++]=128|63&s):s<=65535?(n[r++]=224|s>>12,n[r++]=128|s>>6&63,n[r++]=128|63&s):(n[r++]=240|s>>18,n[r++]=128|s>>12&63,n[r++]=128|s>>6&63,n[r++]=128|63&s)}return n.subarray(0,r)},t.bytesToHex=function(t){for(var e="",i=0;i<t.length;i++){var n=(255&t[i]).toString(16);n.length<2&&(e+="0"),e+=n}return e},t.hexToBytes=function(t){var e=t.length;1&e&&(t="0"+t,e++);for(var i=new Uint8Array(e>>1),n=0;n<e;n+=2)i[n>>1]=parseInt(t.substr(n,2),16);return i},t.base64ToBytes=function(e){return t.stringToBytes(atob(e))},t}();e.ByteBuffer=i},5357:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Cardboard=void 0;var n=i(57160),r=i(50879),o=function(){function t(){}return t.decode=function(e){return new n.ProtoBuf(r.ByteBuffer.base64ToBytes(e),t.proto).readAll()},t.proto={1:{name:"vendor",type:"string"},2:{name:"model",type:"string"},3:{name:"screen_to_lens_distance",type:"float"},4:{name:"inter_lens_distance",type:"float"},5:{name:"left_eye_field_of_view_angles",type:"float",packed:!0},11:{name:"vertical_alignment",type:{0:"bottom",1:"center",2:"top"}},6:{name:"tray_to_lens_distance",type:"float"},7:{name:"distortion_coefficients",type:"float",packed:!0},10:{name:"has_magnet",type:"boolean"},12:{name:"primary_button",type:{0:"none",1:"magnet",2:"touch",3:"indirect_touch"}},defaults:{vertical_alignment:"bottom",primary_button:"magnet"}},t}();e.Cardboard=o},7247:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.CardboardViewer=void 0;var n=i(67392),r=function(){return function(t){this.label=t.model,this.fov=t.left_eye_field_of_view_angles[0],this.interLensDistance=t.inter_lens_distance,this.baselineLensDistance=t.tray_to_lens_distance,this.screenLensDistance=t.screen_to_lens_distance,this.distortion=new n.Distortion(t.distortion_coefficients),this.inverseCoefficients=this.distortion.approximateInverse()}}();e.CardboardViewer=r},95433:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Device=void 0;var i=[{type:"android",rules:[{ua:"Nexus 7"}],dpi:[320.8,323],bw:3,ac:500},{type:"android",rules:[{ua:"ASUS_Z00AD"}],dpi:[403,404.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"HTC6435LVW"}],dpi:[449.7,443.3],bw:3,ac:1e3},{type:"android",rules:[{ua:"HTC One XL"}],dpi:[315.3,314.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 9"}],dpi:289,bw:3,ac:500},{type:"android",rules:[{ua:"HTC One M9"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{ua:"HTC One_M8"}],dpi:[449.7,447.4],bw:3,ac:500},{type:"android",rules:[{ua:"HTC One"}],dpi:472.8,bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 6P"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 5X"}],dpi:[422,419.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"LGMS345"}],dpi:[221.7,219.1],bw:3,ac:500},{type:"android",rules:[{ua:"LG-D800"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{ua:"LG-D850"}],dpi:[537.9,541.9],bw:3,ac:500},{type:"android",rules:[{ua:"VS985 4G"}],dpi:[537.9,535.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 5 "}],dpi:[442.4,444.8],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 4"}],dpi:[319.8,318.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"LG-P769"}],dpi:[240.6,247.5],bw:3,ac:1e3},{type:"android",rules:[{ua:"LGMS323"}],dpi:[206.6,204.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"LGLS996"}],dpi:[403.4,401.5],bw:3,ac:1e3},{type:"android",rules:[{ua:"4560MMX"}],dpi:[240,219.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"Micromax A250"}],dpi:[480,446.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"Micromax AQ4501"}],dpi:240,bw:3,ac:500},{type:"android",rules:[{ua:"DROID RAZR"}],dpi:[368.1,256.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT830C"}],dpi:[254,255.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1021"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{ua:"XT1023"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{ua:"XT1028"}],dpi:[326.6,327.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1034"}],dpi:[326.6,328.4],bw:3,ac:500},{type:"android",rules:[{ua:"XT1053"}],dpi:[315.3,316.1],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1562"}],dpi:[403.4,402.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 6 "}],dpi:[494.3,489.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1063"}],dpi:[295,296.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1064"}],dpi:[295,295.6],bw:3,ac:500},{type:"android",rules:[{ua:"XT1092"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{ua:"XT1095"}],dpi:[422,423.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"A0001"}],dpi:[403.4,401],bw:3,ac:1e3},{type:"android",rules:[{ua:"ONE E1005"}],dpi:[442.4,441.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"ONE A2005"}],dpi:[391.9,405.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"X909"}],dpi:[442.4,444.1],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9082"}],dpi:[184.7,185.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G360P"}],dpi:[196.7,205.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus S"}],dpi:[234.5,229.8],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9300"}],dpi:[304.8,303.9],bw:5,ac:500},{type:"android",rules:[{ua:"SM-T230NU"}],dpi:216,bw:3,ac:500},{type:"android",rules:[{ua:"SGH-T399"}],dpi:[217.7,231.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-N9005"}],dpi:[386.4,387],bw:3,ac:500},{type:"android",rules:[{ua:"SAMSUNG-SM-N900A"}],dpi:[386.4,387.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9500"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{ua:"GT-I9505"}],dpi:439.4,bw:4,ac:1e3},{type:"android",rules:[{ua:"SM-G900F"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{ua:"SM-G900M"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{ua:"SM-G800F"}],dpi:326.8,bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G906S"}],dpi:[562.7,572.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9300"}],dpi:[306.7,304.8],bw:5,ac:1e3},{type:"android",rules:[{ua:"SM-T535"}],dpi:[142.6,136.4],bw:3,ac:500},{type:"android",rules:[{ua:"SM-N920C"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9300I"}],dpi:[304.8,305.8],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9195"}],dpi:[249.4,256.7],bw:3,ac:500},{type:"android",rules:[{ua:"SPH-L520"}],dpi:[249.4,255.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"SAMSUNG-SGH-I717"}],dpi:285.8,bw:3,ac:1e3},{type:"android",rules:[{ua:"SPH-D710"}],dpi:[217.7,204.2],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-N7100"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{ua:"SCH-I605"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{ua:"Galaxy Nexus"}],dpi:[315.3,314.2],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-N910H"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-N910C"}],dpi:[515.2,520.2],bw:3,ac:500},{type:"android",rules:[{ua:"SM-G130M"}],dpi:[165.9,164.8],bw:3,ac:500},{type:"android",rules:[{ua:"SM-G928I"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G920F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{ua:"SM-G920P"}],dpi:[522.5,577],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G925F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{ua:"SM-G925V"}],dpi:[522.5,576.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"C6903"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{ua:"D6653"}],dpi:[428.6,427.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"E6653"}],dpi:[428.6,425.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"E6853"}],dpi:[403.4,401.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"SGP321"}],dpi:[224.7,224.1],bw:3,ac:500},{type:"android",rules:[{ua:"ALCATEL ONE TOUCH Fierce"}],dpi:[240,247.5],bw:3,ac:1e3},{type:"android",rules:[{ua:"thl 5000"}],dpi:[480,443.3],bw:3,ac:1e3},{type:"android",rules:[{ua:"ZTE Blade L2"}],dpi:240,bw:3,ac:500},{type:"ios",rules:[{res:[640,960]}],dpi:[325.1,328.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[640,960]}],dpi:[325.1,328.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[640,1136]}],dpi:[317.1,320.2],bw:3,ac:1e3},{type:"ios",rules:[{res:[640,1136]}],dpi:[317.1,320.2],bw:3,ac:1e3},{type:"ios",rules:[{res:[750,1334]}],dpi:326.4,bw:4,ac:1e3},{type:"ios",rules:[{res:[750,1334]}],dpi:326.4,bw:4,ac:1e3},{type:"ios",rules:[{res:[1242,2208]}],dpi:[453.6,458.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[1242,2208]}],dpi:[453.6,458.4],bw:4,ac:1e3}],n=function(){function t(e){this.width=e.width||t.getScreenWidth(),this.height=e.height||t.getScreenHeight(),this.widthMeters=e.widthMeters,this.heightMeters=e.heightMeters,this.bevelMeters=e.bevelMeters}return t.isIOS=function(){return/iPad|iPhone|iPod/.test(navigator.platform)},t.getScreenWidth=function(){return Math.max(window.screen.width,window.screen.height)*window.devicePixelRatio},t.getScreenHeight=function(){return Math.min(window.screen.width,window.screen.height)*window.devicePixelRatio},t.detect=function(e){for(var n=navigator.userAgent||navigator.vendor||window.opera,s=t.getScreenWidth(),a=t.getScreenHeight(),h=0;h<i.length;h++){var u=i[h];if(u.rules)if("ios"===u.type||"android"===u.type){if(t.isIOS()===("ios"===u.type)){for(var l=!1,c=0;c<u.rules.length;c++){var d=u.rules[c];if(t.matchRule(d,n,s,a)){e.debug("Rule matched:"+JSON.stringify(d)),l=!0;break}}if(l){var p=.0254,f={width:s,height:a,widthMeters:p/(u.dpi[0]||u.dpi)*s,heightMeters:p/(u.dpi[1]||u.dpi)*a,bevelMeters:.001*u.bw};return e.debug("Device found: "+JSON.stringify(f)),new t(f)}}}else e.debug("Device["+h+"] has invalid type.");else e.debug("Device["+h+"] has no rules section.")}return t.isIOS()?(e.debug("Using fallback iOS device measurements."),o):(e.debug("Using fallback Android device measurements."),r)},t.matchRule=function(t,e,i,n){if(!t.ua&&!t.res)return!1;if(t.ua&&e.indexOf(t.ua)<0)return!1;if(t.res){if(!t.res[0]||!t.res[1])return!1;var r=t.res[0],o=t.res[1];if(Math.min(i,n)!==Math.min(r,o)||Math.max(i,n)!==Math.max(r,o))return!1}return!0},t}();e.Device=n;var r=new n({widthMeters:.11,heightMeters:.062,bevelMeters:.004}),o=new n({widthMeters:.1038,heightMeters:.0584,bevelMeters:.004})},3973:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.DeviceInfo=void 0;var n=i(95433),r=i(44369),o=i(7247),s=function(){function t(t,e){this.B6=new o.CardboardViewer(t),this.C6=n.Device.detect(e)}return t.prototype.getDevice=function(){return this.C6},t.prototype.setViewer=function(t){this.B6=t},t.prototype.getDistortedFieldOfViewLeftEye=function(){var t=this.B6.screenLensDistance,e=this.B6.distortion,i=(this.C6.widthMeters-this.B6.interLensDistance)/2,n=this.B6.interLensDistance/2,o=this.B6.baselineLensDistance-this.C6.bevelMeters,s=this.C6.heightMeters-o,a=r.MathUtil.radToDeg(Math.atan(e.distort(i/t))),h=r.MathUtil.radToDeg(Math.atan(e.distort(n/t))),u=r.MathUtil.radToDeg(Math.atan(e.distort(o/t))),l=r.MathUtil.radToDeg(Math.atan(e.distort(s/t)));return{leftDegrees:Math.min(a,this.B6.fov),rightDegrees:Math.min(h,this.B6.fov),downDegrees:Math.min(u,this.B6.fov),upDegrees:Math.min(l,this.B6.fov)}},t.prototype.getLeftEyeVisibleTanAngles=function(){var t=this.B6.distortion,e=Math.tan(-r.MathUtil.degToRad(this.B6.fov)),i=Math.tan(r.MathUtil.degToRad(this.B6.fov)),n=Math.tan(r.MathUtil.degToRad(this.B6.fov)),o=Math.tan(-r.MathUtil.degToRad(this.B6.fov)),s=this.C6.widthMeters/4,a=this.C6.heightMeters/2,h=this.B6.baselineLensDistance-this.C6.bevelMeters-a,u=this.B6.interLensDistance/2-s,l=-h,c=this.B6.screenLensDistance,d=t.distort((u-s)/c),p=t.distort((l+a)/c),f=t.distort((u+s)/c),b=t.distort((l-a)/c),y=new Float32Array(4);return y[0]=Math.max(e,d),y[1]=Math.min(i,p),y[2]=Math.min(n,f),y[3]=Math.max(o,b),y},t.prototype.getLeftEyeNoLensTanAngles=function(){var t=this.B6.distortion,e=new Float32Array(4),i=t.distortInverse(Math.tan(-r.MathUtil.degToRad(this.B6.fov))),n=t.distortInverse(Math.tan(r.MathUtil.degToRad(this.B6.fov))),o=t.distortInverse(Math.tan(r.MathUtil.degToRad(this.B6.fov))),s=t.distortInverse(Math.tan(-r.MathUtil.degToRad(this.B6.fov))),a=this.C6.widthMeters/4,h=this.C6.heightMeters/2,u=this.B6.baselineLensDistance-this.C6.bevelMeters-h,l=this.B6.interLensDistance/2-a,c=-u,d=this.B6.screenLensDistance,p=(l-a)/d,f=(c+h)/d,b=(l+a)/d,y=(c-h)/d;return e[0]=Math.max(i,p),e[1]=Math.min(n,f),e[2]=Math.min(o,b),e[3]=Math.max(s,y),e},t.prototype.getLeftEyeVisibleScreenRect=function(t){var e=this.B6.screenLensDistance,i=(this.C6.widthMeters-this.B6.interLensDistance)/2,n=this.B6.baselineLensDistance-this.C6.bevelMeters,r=(t[0]*e+i)/this.C6.widthMeters,o=(t[1]*e+n)/this.C6.heightMeters,s=(t[2]*e+i)/this.C6.widthMeters,a=(t[3]*e+n)/this.C6.heightMeters;return{x:r,y:a,width:s-r,height:o-a}},t.prototype.getFieldOfViewLeftEye=function(t){return t?this.getUndistortedFieldOfViewLeftEye():this.getDistortedFieldOfViewLeftEye()},t.prototype.getFieldOfViewRightEye=function(t){var e=this.getFieldOfViewLeftEye(t);return{leftDegrees:e.leftDegrees,rightDegrees:e.rightDegrees,downDegrees:e.downDegrees,upDegrees:e.upDegrees}},t.prototype.getUndistortedFieldOfViewLeftEye=function(){var t=this.getUndistortedParams_();return{leftDegrees:r.MathUtil.radToDeg(Math.atan(t.outerDist)),rightDegrees:r.MathUtil.radToDeg(Math.atan(t.innerDist)),downDegrees:r.MathUtil.radToDeg(Math.atan(t.bottomDist)),upDegrees:r.MathUtil.radToDeg(Math.atan(t.topDist))}},t.prototype.getUndistortedViewportLeftEye=function(){var t=this.getUndistortedParams_(),e=this.B6.screenLensDistance,i=this.C6.widthMeters/e,n=this.C6.heightMeters/e,r=this.C6.width/i,o=this.C6.height/n,s=Math.round((t.eyePosX-t.outerDist)*r),a=Math.round((t.eyePosY-t.bottomDist)*o);return{x:s,y:a,width:Math.round((t.eyePosX+t.innerDist)*r)-s,height:Math.round((t.eyePosY+t.topDist)*o)-a}},t.prototype.getUndistortedParams_=function(){var t=this.B6.distortion,e=this.B6.screenLensDistance,i=this.B6.interLensDistance/2/e,n=this.C6.widthMeters/e,o=this.C6.heightMeters/e,s=n/2-i,a=(this.B6.baselineLensDistance-this.C6.bevelMeters)/e,h=this.B6.fov,u=t.distortInverse(Math.tan(r.MathUtil.degToRad(h))),l=Math.min(s,u),c=Math.min(i,u),d=Math.min(a,u);return{outerDist:l,innerDist:c,topDist:Math.min(o-a,u),bottomDist:d,eyePosX:s,eyePosY:a}},t}();e.DeviceInfo=s},67392:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Distortion=void 0;var i=function(){function t(t){this.Xfb=t}return t.prototype.distortInverse=function(t){for(var e=0,i=1,n=t-this.distort(e);Math.abs(i-e)>1e-4;){var r=t-this.distort(i),o=i-r*((i-e)/(r-n));e=i,i=o,n=r}return i},t.prototype.distort=function(t){for(var e=t*t,i=0,n=this.Xfb.length-1;n>=0;n--)i=e*(i+this.Xfb[n]);return(i+1)*t},t.solveLinear_=function(t,e){var i,n,r,o=t.length;for(n=0;n<o-1;++n)for(r=n+1;r<o;++r){var s=t[n][r]/t[n][n];for(i=n+1;i<o;++i)t[i][r]-=s*t[i][n];e[r]-=s*e[n]}var a=new Array(o);for(n=o-1;n>=0;--n){var h=e[n];for(i=n+1;i<o;++i)h-=t[i][n]*a[i];a[n]=h/t[n][n]}return a},t.solveLeastSquares_=function(e,i){var n,r,o,s,a=e.length,h=e[0].length;if(h!==i.length)throw new Error("Matrix / vector dimension mismatch");var u=new Array(a);for(o=0;o<a;++o)for(u[o]=new Array(a),r=0;r<a;++r){for(s=0,n=0;n<h;++n)s+=e[r][n]*e[o][n];u[o][r]=s}var l=new Array(a);for(r=0;r<a;++r){for(s=0,n=0;n<h;++n)s+=e[r][n]*i[n];l[r]=s}return t.solveLinear_(u,l)},t.prototype.approximateInverse=function(e,i){e=e||1,i=i||100;var n,r,o=new Array(12);for(r=0;r<12;++r)o[r]=new Array(i);var s=new Array(i);for(n=0;n<i;++n){var a=e*(n+1)/i,h=this.distort(a),u=h;for(r=0;r<12;++r)u*=h*h,o[r][n]=u;s[n]=a-h}return t.solveLeastSquares_(o,s)},t}();e.Distortion=i},44369:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Quat=e.Vec3=e.Mat4=e.MathUtil=void 0;var i=function(){function t(){}return t.degToRad=function(t){return t*Math.PI/180},t.radToDeg=function(t){return 180*t/Math.PI},t.hypot=function(t,e){return Math.sqrt(t*t+e*e)},t.getSum=function(t){return t.length>0?t.reduce(function(t,e){return t+e},0):0},t.getAverage=function(e){return e.length>0?t.getSum(e)/e.length:1/0},t.sign=function(t){return Math.sign&&Math.sign(t)||(t>0?1:t<0?-1:0)},t}();e.MathUtil=i;var n=function(){function t(){}return t.create=function(){var t;return(t="undefined"!=typeof Float32Array?new Float32Array(16):new Array(16))[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.rotate=function(t,e,i){var n,r,o,s,a,h,u,l,c,d,p,f,b,y,v,g,m,w,I,T,E,O,M,D,R=i[0],V=i[1],_=i[2],P=Math.sqrt(R*R+V*V+_*_);return Math.abs(P)<1e-6?null:(R*=P=1/P,V*=P,_*=P,n=Math.sin(e),o=1-(r=Math.cos(e)),s=t[0],a=t[1],h=t[2],u=t[3],l=t[4],c=t[5],d=t[6],p=t[7],f=t[8],b=t[9],y=t[10],v=t[11],g=R*R*o+r,m=V*R*o+_*n,w=_*R*o-V*n,I=R*V*o-_*n,T=V*V*o+r,E=_*V*o+R*n,O=R*_*o+V*n,M=V*_*o-R*n,D=_*_*o+r,t[0]=s*g+l*m+f*w,t[1]=a*g+c*m+b*w,t[2]=h*g+d*m+y*w,t[3]=u*g+p*m+v*w,t[4]=s*I+l*T+f*E,t[5]=a*I+c*T+b*E,t[6]=h*I+d*T+y*E,t[7]=u*I+p*T+v*E,t[8]=s*O+l*M+f*D,t[9]=a*O+c*M+b*D,t[10]=h*O+d*M+y*D,t[11]=u*O+p*M+v*D,t)},t.multiply=function(t,e,i){var n=e[0],r=e[1],o=e[2],s=e[3],a=e[4],h=e[5],u=e[6],l=e[7],c=e[8],d=e[9],p=e[10],f=e[11],b=e[12],y=e[13],v=e[14],g=e[15],m=i[0],w=i[1],I=i[2],T=i[3];return t[0]=m*n+w*a+I*c+T*b,t[1]=m*r+w*h+I*d+T*y,t[2]=m*o+w*u+I*p+T*v,t[3]=m*s+w*l+I*f+T*g,m=i[4],w=i[5],I=i[6],T=i[7],t[4]=m*n+w*a+I*c+T*b,t[5]=m*r+w*h+I*d+T*y,t[6]=m*o+w*u+I*p+T*v,t[7]=m*s+w*l+I*f+T*g,m=i[8],w=i[9],I=i[10],T=i[11],t[8]=m*n+w*a+I*c+T*b,t[9]=m*r+w*h+I*d+T*y,t[10]=m*o+w*u+I*p+T*v,t[11]=m*s+w*l+I*f+T*g,m=i[12],w=i[13],I=i[14],T=i[15],t[12]=m*n+w*a+I*c+T*b,t[13]=m*r+w*h+I*d+T*y,t[14]=m*o+w*u+I*p+T*v,t[15]=m*s+w*l+I*f+T*g,t},t.perspective=function(t,e,i,n,r){var o=1/Math.tan(e/2),s=1/(n-r);return t[0]=o/i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(r+n)*s,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*r*n*s,t[15]=0,t},t.invert=function(t,e){var i=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],h=e[6],u=e[7],l=e[8],c=e[9],d=e[10],p=e[11],f=e[12],b=e[13],y=e[14],v=e[15],g=i*a-n*s,m=i*h-r*s,w=i*u-o*s,I=n*h-r*a,T=n*u-o*a,E=r*u-o*h,O=l*b-c*f,M=l*y-d*f,D=l*v-p*f,R=c*y-d*b,V=c*v-p*b,_=d*v-p*y,P=g*_-m*V+w*R+I*D-T*M+E*O;return P?(P=1/P,t[0]=(a*_-h*V+u*R)*P,t[1]=(r*V-n*_-o*R)*P,t[2]=(b*E-y*T+v*I)*P,t[3]=(d*T-c*E-p*I)*P,t[4]=(h*D-s*_-u*M)*P,t[5]=(i*_-r*D+o*M)*P,t[6]=(y*w-f*E-v*m)*P,t[7]=(l*E-d*w+p*m)*P,t[8]=(s*V-a*D+u*O)*P,t[9]=(n*D-i*V-o*O)*P,t[10]=(f*T-b*w+v*g)*P,t[11]=(c*w-l*T-p*g)*P,t[12]=(a*M-s*R-h*O)*P,t[13]=(i*R-n*M+r*O)*P,t[14]=(b*m-f*I-y*g)*P,t[15]=(l*I-c*m+d*g)*P,t):null},t}();e.Mat4=n;var r=function(){function t(){}return t.create=function(){var t;return(t="undefined"!=typeof Float32Array?new Float32Array(3):new Array(3))[0]=0,t[1]=0,t[2]=0,t},t}();e.Vec3=r;var o=function(){function t(){}return t.create=function(){var t;return(t="undefined"!=typeof Float32Array?new Float32Array(4):new Array(4))[0]=0,t[1]=0,t[2]=0,t[3]=1,t},t.fromValues=function(t,e,i,n){var r;return(r="undefined"!=typeof Float32Array?new Float32Array(4):new Array(4))[0]=t,r[1]=e,r[2]=i,r[3]=n,r},t.multiply=function(t,e,i){var n=e[0],r=e[1],o=e[2],s=e[3],a=i[0],h=i[1],u=i[2],l=i[3];return t[0]=n*l+s*a+r*u-o*h,t[1]=r*l+s*h+o*a-n*u,t[2]=o*l+s*u+n*h-r*a,t[3]=s*l-n*a-r*h-o*u,t},t.toAngle=function(t){var e=r.create(),i=t[0]*t[0],n=t[1]*t[1],o=t[2]*t[2],s=t[0]*t[1]+t[2]*t[3];return s>.499?(e[2]=2*Math.atan2(t[0],t[3]),e[0]=Math.PI/2,e[1]=0):s<-.499?(e[2]=-2*Math.atan2(t[0],t[3]),e[0]=-Math.PI/2,e[1]=0):(e[2]=Math.atan2(2*t[1]*t[3]-2*t[0]*t[2],1-2*n-2*o),e[0]=Math.asin(2*s),e[1]=Math.atan2(2*t[0]*t[3]-2*t[1]*t[2],1-2*i-2*o)),{yaw:180*e[2]/Math.PI,pitch:180*e[1]/Math.PI,roll:180*e[0]/Math.PI}},t}();e.Quat=o},57160:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProtoBuf=void 0;var i=function(){function t(t,e){this.oeb=t,this.reb=e,this.peb=0,this.qeb=new DataView(this.oeb.buffer,0,this.oeb.length)}return t.prototype.readVarInt=function(){var t,e=0;for(t=0;this.peb<this.oeb.length&&(e|=(127&this.oeb[this.peb])<<t,128&this.oeb[this.peb]);this.peb++)t+=7;return this.peb++,e},t.prototype.readHeader=function(){var t=this.readVarInt();return{tag:t>>>3,type:7&t}},t.prototype.readString=function(){for(var t=this.readVarInt(),e=new Array(t),i=0,n=this.peb;n<this.peb+t;n++){var r=this.oeb[n];if(r<128)e[i++]=r;else if(r>=192&&r<224&&n+1<t)e[i++]=(31&r)<<6|63&this.oeb[++n];else if(r>=224&&r<240&&n+2<t)e[i++]=(15&r)<<12|(63&this.oeb[++n])<<6|63&this.oeb[++n];else{if(!(r>=240&&r<248&&n+3<t))throw new Error("Malformed UTF8 character at byte offset "+n);var o=(7&r)<<18|(63&this.oeb[++n])<<12|(63&this.oeb[++n])<<6|63&this.oeb[++n];o<=65535?e[i++]=o:(o^=65536,e[i++]=55296|o>>10,e[i++]=56320|1023&o)}}var s="",a=16384;for(n=0;n<i;n+=a)s+=String.fromCharCode.apply(String,e.slice(n,n+a<=i?n+a:i));return this.peb+=t,s},t.prototype.readPacked=function(t){var e=this.readVarInt(),i=[];switch(t){case"float":for(var n=0;n<e/4;n++)i.push(this.qeb.getFloat32(this.peb,!0)),this.peb+=4;break;case"int":for(var r=this.peb;this.peb<r+e;)i.push(this.readVarInt())}return i},t.prototype.seb=function(t){for(var e=0,i=0;i<t;i++)e=(e<<8)+this.oeb[this.peb+i],this.peb++;return e},t.prototype.readNum32=function(){var t=this.qeb.getFloat32(this.peb,!0);return this.peb+=4,t},t.prototype.readNum64=function(){return this.seb(8)},t.prototype.readField=function(t){var e;switch(t){case 0:e=this.readVarInt();break;case 1:e=this.readNum64();break;case 2:e=this.readString();break;case 5:e=this.readNum32()}return e},t.prototype.readAll=function(){for(var t={};this.peb<this.oeb.length;){var e=this.readHeader(),i=void 0;if(this.reb.hasOwnProperty(e.tag))if(i=this.reb[e.tag],2===e.type&&i&&i.hasOwnProperty("packed")&&i.packed)t[i.name]=this.readPacked(i.type);else{var n=this.readField(e.type);"boolean"===i.type?n=!!n:"object"==typeof i.type&&(n=i.type[n]),t[i.name]=n}}if(t.length>0)for(var r in this.reb.defaults)this.reb.defaults.hasOwnProperty(r)&&void 0===t[r]&&(t[r]=this.reb.defaults[r]);return t},t}();e.ProtoBuf=i},43948:function(t,e){var i,n,r;Object.defineProperty(e,"__esModule",{value:!0}),e.TransitionTimingType=e.VRState=e.VRContentType=void 0,function(t){t.Single="single",t.TAB="tab",t.SBS="sbs"}(i||(e.VRContentType=i={})),function(t){t.Ready="ready",t.Playing="playing",t.Error="error",t.Uninitialized="uninitialized"}(n||(e.VRState=n={})),function(t){t.None="none",t.EaseIn="ease-in",t.EaseOut="ease-out",t.EaseInOut="ease-in-out"}(r||(e.TransitionTimingType=r={}))},61535:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.InternalVRHandler=void 0;var n=i(5357),r=i(3973),o=i(25926),s=i(4224),a=i(45202),h=i(3714),u=i(44468),l=i(21513),c=i(19274),d=i(43948),p=i(33639),f=i(85361),b=function(){function t(e,i,u,b,y,v,g,m){var w=this;this.SI=null,this.TI=null,this.UI=null,this.VI=null,this.WI=d.VRState.Uninitialized,this.XI=null,this.YI=!1,this.ZI=!1,this.aI=null,this.bI=null,this.cI=null,this.dI=!1,this.tI=function(){w.eI=!0},this.xI=function(t){if(w.WI!==d.VRState.Playing)return w.gI&&Boolean(w.lI.onRenderingSuspended)&&w.lI.onRenderingSuspended(),void(w.gI=!1);w.uI(),w.ZI!==w.YI&&(w.iI.getEventFunction()(h.PlayerEvent.VRStereoChanged,{stereo:w.YI}),w.ZI=w.YI);var e=w.bI.update(t),i=!w.dI||w.eI||0===t;i||e||0===t||w.fI?(w.hI&&Boolean(w.lI.onStartRendering)&&w.lI.onStartRendering(),!w.gI&&Boolean(w.lI.onRenderingResumed)&&w.lI.onRenderingResumed(),w.aI.drawScene(w.bI.getProjectionInverse(),i),w.hI=!1,w.gI=!0):(w.gI&&Boolean(w.lI.onRenderingSuspended)&&w.lI.onRenderingSuspended(),w.gI=!1),null===w.XI&&(w.UI=requestAnimationFrame(w.xI)),w.eI=!1,w.fI=!1},this.yI=function(){w.sI().removeEventListener(c.MediaElementEvent.playing,w.yI),w.sI().removeEventListener(c.MediaElementEvent.seeked,w.yI),w.WI===d.VRState.Ready&&(w.uI(),w.WI=d.VRState.Playing,w.UI=requestAnimationFrame(w.xI))},this.zI=function(t){w.WI=d.VRState.Error,w.XI=t,w.wI(),w.UI&&(cancelAnimationFrame(w.UI),w.UI=null),w.iI.getEventFunction()(h.PlayerEvent.Warning,new o.PlayerWarning(s.WarningCode.VR_RENDERING_ERROR)),w.mI.debug("VR Rendering error: "+t)},this.enableGyroscope=function(){return w.bI.enableGyroscope(),!0},this.disableGyroscope=function(){return w.bI.disableGyroscope(),!0},this.isGyroscopeEnabled=function(){return w.bI.isGyroscopeEnabled()},this.enableMouseControl=function(){return w.bI.enableMouseControl(),!0},this.disableMouseControl=function(){return w.bI.disableMouseControl(),!0},this.isMouseControlEnabled=function(){return w.bI.isMouseControlEnabled()},this.enableKeyboardControl=function(){return w.bI.enableKeyboardControl(),!0},this.disableKeyboardControl=function(){return w.bI.disableKeyboardControl(),!0},this.isKeyboardControlEnabled=function(){return w.bI.isKeyboardControlEnabled()},this.setViewingDirection=function(t){return!!w.bI&&(w.bI.setViewingDirection(t),!0)},this.pause=function(){w.dI=!0},this.AI=function(){var t=w.sI();4!==t.readyState?t.addEventListener(c.MediaElementEvent.playing,function(){return w.dI=!1}):w.dI=!1},this.BI=function(){w.iI.off(h.PlayerEvent.Playing,w.AI),w.iI.off(h.PlayerEvent.Paused,w.pause),w.iI.off(h.PlayerEvent.Destroy,w.BI),w.iI.off(h.PlayerEvent.SourceUnloaded,w.BI),w.iI=null;var t=w.sI();w.pI&&w.pI.removeEventListener(c.MediaElementEvent.seeked,w.tI),w.wI(),w.SI&&w.SI.parentNode&&(w.SI.parentNode.removeChild(w.SI),w.SI=null),w.TI&&w.TI.parentNode&&(w.TI.parentNode.removeChild(w.TI),w.TI=null),w.VI&&w.VI.parentNode&&(w.VI.parentNode.removeChild(w.VI),w.VI=null),w.WI=d.VRState.Uninitialized,w.UI&&(cancelAnimationFrame(w.UI),w.UI=null),w.bI&&w.bI.destroy(),w.bI=null,w.aI.destroy(),w.aI=null,t.removeEventListener(c.MediaElementEvent.playing,w.yI),t.removeEventListener(c.MediaElementEvent.seeked,w.yI)},this.iI=e.eventHandler,this.pI=e.videoElement,this.qI=b,this.jI=e.parentHtmlElement,this.id=i,this.kI=u,this.lI=m,this.mI=y,this.nI=v,this.oI=e.sourceContext.technology.streaming,this.rI=g,this.eI=!1,this.fI=!1,this.gI=!1,this.hI=!0,this.SI=document.createElement("canvas"),this.SI.setAttribute("id","bitmovinplayer-vr-canvas"),this.SI.style.display="none",this.SI.style.position="absolute";var I=this.jI.getElementsByClassName(a.Environment.idPrefix+"poster")[0];I?this.jI.insertBefore(this.SI,I):this.jI.appendChild(this.SI);var T=e.sourceContext.technology.player;if(t.isVideoTextureSupported(v,this.oI,T)?this.mI.debug("VR: using 3D rendering context"):(this.TI=document.createElement("canvas"),this.TI.setAttribute("id","bitmovinplayer-vr-helper-canvas"),this.TI.style.display="none",this.TI.style.position="absolute",this.jI.insertBefore(this.TI,this.SI),this.mI.debug("VR: using 2D rendering context")),(0,l.getCapabilities)().isSafariIOS&&(this.pI.setAttribute("playsinline",""),this.pI.setAttribute("webkit-playsinline",""),this.mI.debug("VR: set playsinline = true")),this.VI=document.getElementById("bitmovinplayer-no-select-style-node"),this.VI||(this.VI=document.createElement("style"),this.VI.setAttribute("id","bitmovinplayer-no-select-style-node"),this.VI.appendChild(document.createTextNode(".bitmovinplayer-no-select { -webkit-user-select: none; -moz-user-select: -moz-none; -ms-user-select: none; user-select: none; }")),document.getElementsByTagName("head")[0].appendChild(this.VI)),this.YI=this.kI.stereo,this.ZI=this.YI,this.kI.restrictedInlinePlayback?this.mI.debug("VR: using restricted inline playback"):this.pI.addEventListener(c.MediaElementEvent.seeked,this.tI),"string"==typeof this.kI.cardboard){var E=n.Cardboard.decode(this.kI.cardboard);this.mI.debug("cardboard: "+JSON.stringify(E)),E.hasOwnProperty("distortion_coefficients")&&(this.cI=new r.DeviceInfo(E,this.mI))}this.WI=d.VRState.Ready,this.bI=new p.OrientationHandler(this.SI,this.jI,this.kI,this.lI,this.iI),this.aI=new f.Renderer(this.SI,this.TI,e,this.cI,this.zI,this.mI,this.rI,this.kI,this.lI),this.iI.on(h.PlayerEvent.Playing,this.AI),this.iI.on(h.PlayerEvent.Paused,this.pause),this.iI.on(h.PlayerEvent.Destroy,this.BI),this.iI.on(h.PlayerEvent.SourceUnloaded,this.BI),this.vI(),this.uI();var O=this.sI();4!==O.readyState&&O.paused?(O.addEventListener(c.MediaElementEvent.playing,this.yI),O.addEventListener(c.MediaElementEvent.seeked,this.yI)):this.yI()}return t.prototype.sI=function(){return this.kI.restrictedInlinePlayback&&this.qI?this.qI:this.pI},t.prototype.uI=function(){if(this.SI){var t,e,i,n;this.jI&&this.jI.clientWidth&&this.jI.clientHeight?(t=this.jI.clientWidth,e=this.jI.clientHeight):(t=window.innerWidth,e=window.innerHeight),this.pI&&this.pI.videoWidth&&this.pI.videoHeight?(i=this.pI.videoWidth,n=this.pI.videoHeight):(i=t,n=e);var r=(this.nI.devicePixelRatio||1)/this.aI.getBackingStoreRatio(),o=t*r,s=e*r,a=o/s;o>i&&(s=(o=i)/a),s>n&&(o=(s=n)*a),this.SI.width===o&&this.SI.height===s||(this.SI.width=o,this.SI.height=s),!this.TI||this.TI.width===i&&this.TI.height===n||(this.TI.width=i,this.TI.height=n)}},t.prototype.vI=function(){this.SI&&(this.SI.style.display="block"),this.TI&&(this.TI.style.display="block"),this.pI&&(this.pI.style.display="none")},t.prototype.wI=function(){this.SI&&(this.SI.style.display="none"),this.TI&&(this.TI.style.display="none"),this.pI&&this.pI.style&&(this.pI.style.display="block")},t.isVideoTextureSupported=function(t,e,i){var n=t.appName,r=t.userAgent,o=t.appVersion,s=(0,l.getCapabilities)().safariVersion,a=(s.major>10||10===s.major&&s.minor>=1)&&!(0,l.getCapabilities)().isSafariIOS,h=-1;return!(e===u.StreamType.Hls&&i===u.PlayerType.Native&&!a)&&("Microsoft Internet Explorer"===n?null!==new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})").exec(r)&&(h=parseFloat(RegExp.$1)):"Netscape"===n&&(-1!==o.indexOf("Trident")?h=11:null!==new RegExp("Edge/([0-9]{1,}[\\.0-9]{0,})").exec(r)&&(h=parseFloat(RegExp.$1))),-1===h||h>=13)},t.prototype.setStereo=function(t){return this.fI=this.YI!==t,this.YI=t,this.YI?(this.aI.enableStereo(),this.bI.enableStereo()):(this.aI.disableStereo(),this.bI.disableStereo()),!0},t.prototype.getStereo=function(){return this.YI},t.prototype.getState=function(){return this.WI===d.VRState.Ready?d.VRState.Ready:this.WI===d.VRState.Playing?d.VRState.Playing:this.WI===d.VRState.Error?d.VRState.Error:this.WI===d.VRState.Uninitialized?null:void 0},t.prototype.getLastError=function(){return this.XI},t.prototype.getViewingDirection=function(){return this.bI?this.bI.getViewingDirection():{yaw:0,pitch:0,roll:0}},t.prototype.moveViewingDirection=function(t){return!!this.bI&&(this.bI.moveViewingDirection(t),!0)},t.prototype.setViewingDirectionChangeEventInterval=function(t){return!!this.bI&&(this.bI.setViewingDirectionChangeEventInterval(t),!0)},t.prototype.getViewingDirectionChangeEventInterval=function(){return this.bI?this.bI.getViewingDirectionChangeEventInterval():-1},t.prototype.setViewingDirectionChangeThreshold=function(t){return!!this.bI&&(this.bI.setViewingDirectionChangeThreshold(t),!0)},t.prototype.getViewingDirectionChangeThreshold=function(){return this.bI?this.bI.getViewingDirectionChangeThreshold():-1},t.prototype.setVerticalFieldOfView=function(t){return!!this.bI&&(this.bI.setVerticalFieldOfView(t),!0)},t.prototype.getVerticalFieldOfView=function(){return this.bI?this.bI.getVerticalFieldOfView():-1},t.prototype.setHorizontalFieldOfView=function(t){return!!this.bI&&(this.bI.setHorizontalFieldOfView(t),!0)},t.prototype.getHorizontalFieldOfView=function(){return this.bI?this.bI.getHorizontalFieldOfView():-1},t.prototype.zoom=function(t){return!!this.bI&&this.bI.zoom(t)},t.prototype.getZoom=function(){return this.bI?this.bI.getZoom():-1},t.prototype.deviceOrientationPermissionRequired=function(){var t,e;return null!==(e=null===(t=this.bI)||void 0===t?void 0:t.permissionRequired())&&void 0!==e&&e},t.prototype.requestDeviceOrientationPermission=function(){var t,e;return null!==(e=null===(t=this.bI)||void 0===t?void 0:t.requestPermission())&&void 0!==e?e:Promise.resolve()},t}();e.InternalVRHandler=b},6463:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.VRState=e.TransitionTimingType=e.VRContentType=e.VRModuleDefinition=void 0;var n=i(62756),r=i(43948);Object.defineProperty(e,"TransitionTimingType",{enumerable:!0,get:function(){return r.TransitionTimingType}}),Object.defineProperty(e,"VRContentType",{enumerable:!0,get:function(){return r.VRContentType}}),Object.defineProperty(e,"VRState",{enumerable:!0,get:function(){return r.VRState}});var o=i(24180);e.VRModuleDefinition={name:n.ModuleName.VR,module:{VRHandler:o.VRHandler},exports:{VRContentType:r.VRContentType,TransitionTimingType:r.TransitionTimingType,VRState:r.VRState}},e.default=e.VRModuleDefinition},85361:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Renderer=void 0;var n=i(44369),r=i(3714),o=i(44468),s=i(43948),a=i(54479),h=i(17378),u=function(){function t(){this.N4=[],this.Y5=[]}return t.prototype.getVideoWidths=function(){return this.N4},t.prototype.getVideoHeights=function(){return this.Y5},t.prototype.add=function(t,e){this.N4.indexOf(t)<0&&(this.N4.push(t),this.N4.sort(function(t,e){return t-e})),this.Y5.indexOf(e)<0&&(this.Y5.push(e),this.Y5.sort(function(t,e){return t-e}))},t}(),l=function(){function t(t,e,i,n,o,s,l,c,d){var p=this;this.Z5=null,this.a5=null,this.b5=a.GL_ERROR.NO_ERROR,this.d5=-1,this.e5=!1,this.f5=-1,this.g5=-1,this.h5=-1,this.i5=-1,this.j5=-1,this.k5=[-1,-1,1,-1,1,1,-1,1],this.l5=[0,1,2,0,2,3],this.m5=-1,this.n5=new RegExp("mediump","g"),this.o5=!0,this.p5=[0,0,0,0,0,0,0,0,0,0,0,0],this.q5={LEFT:0,RIGHT:1},this.r5=[0,0,0,0,0,0,0,0,0,0,0,0],this.s5=1,this.t5=[[1,1],[1,1]],this.u5=[1,1],this.z5=null,this.A5=null,this.B5=null,this.C5=null,this.D5=null,this.E5=null,this.F5=-1,this.G5=-1,this.H5=null,this.I5=!1,this.J5=null,c.stereo?(this.e5=!0,this.d5=2):(this.e5=!1,this.d5=1),this.y5=i.eventHandler,this.z5=s,this.A5=t,this.B5=e,this.C5=i.videoElement,this.D5=o,this.E5=i.sourceContext.technology.streaming,this.J5=l,this.K5=c,this.L5=d,this.c5=[],this.y5.on(r.PlayerEvent.TimeChanged,function(){return p.o5=!1}),n&&(this.r5=this.w6(n),this.s5=this.x6(n),this.t5[this.q5.LEFT]=this.z6(n,this.q5.LEFT),this.t5[this.q5.RIGHT]=this.z6(n,this.q5.RIGHT),this.u5=this.A6(n)),this.H5=new u,this.x5=new h.FrameRateMonitor(1500,1e3),this.K5.enableFrameRateMeasurements?(this.x5.enable(),this.x5.subscribe(this)):this.x5.disable();try{this.m6(),this.l6(),this.n6(),this.o6(),this.p6(),this.q6(),this.r6(),this.s6()}catch(t){this.z5.error("Failed to initialize VR renderer",t)}}return t.prototype.i6=function(t){if(void 0===t&&(t=[]),null!==this.Z5){var e=this.Z5.getError();if(e===a.GL_ERROR.NO_ERROR)return this.b5=a.GL_ERROR.NO_ERROR,void(this.c5=[]);if(this.c5.push(e),t.indexOf(e)>-1&&this.o5)throw this.b5=a.GL_ERROR.NO_ERROR,this.c5=[],"STARTUP ERROR";if(!(this.c5.length>=this.J5.MAX_CONSECUTIVE_VR_ERRORS))return;this.b5=this.c5[this.c5.length-1]}var i="Unable to initialize WebGL";throw a.GL_ERROR_STR[this.b5]&&(i=a.GL_ERROR_STR[this.b5]),this.D5(i),i},t.prototype.j6=function(t,e){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];var r=null;if(t&&"function"==typeof t[e]){try{r=t[e].apply(t,i)}catch(t){this.z5.warn("could not call WebGL function ("+e+"("+JSON.stringify(i)+")): "+t)}this.i6()}return r},t.prototype.k6=function(t){throw this.b5=a.GL_ERROR.OTHER_ERROR,this.D5(t),t},t.prototype.l6=function(){this.w5=i(70415),this.v5=i(17913);var t=this.j6(this.Z5,"getShaderPrecisionFormat",this.Z5.FRAGMENT_SHADER,this.Z5.HIGH_FLOAT);0!==t.precision&&0!==t.rangeMin&&0!==t.rangeMax&&(this.w5=this.w5.replace(this.n5,"highp")),0!==(t=this.j6(this.Z5,"getShaderPrecisionFormat",this.Z5.VERTEX_SHADER,this.Z5.HIGH_FLOAT)).precision&&0!==t.rangeMin&&0!==t.rangeMax&&(this.v5=this.v5.replace(this.n5,"highp"))},t.prototype.m6=function(){this.B5&&(this.a5=this.B5.getContext("2d"));var t={failIfMajorPerformanceCaveat:!0};this.Z5=this.A5.getContext("webgl",t)||this.A5.getContext("experimental-webgl",t),this.i6(),this.j6(this.Z5,"clearColor",.5,.5,.5,1),this.j6(this.Z5,"clearDepth",1),this.j6(this.Z5,"disable",this.Z5.DEPTH_TEST)},t.prototype.n6=function(){this.f5=this.j6(this.Z5,"createShader",this.Z5.VERTEX_SHADER),this.j6(this.Z5,"shaderSource",this.f5,this.v5),this.j6(this.Z5,"compileShader",this.f5),this.j6(this.Z5,"getShaderParameter",this.f5,this.Z5.COMPILE_STATUS)||this.k6("Vertex shader compilation failed ("+this.j6(this.Z5,"getShaderInfoLog",this.f5)+")"),this.g5=this.j6(this.Z5,"createShader",this.Z5.FRAGMENT_SHADER),this.j6(this.Z5,"shaderSource",this.g5,this.w5),this.j6(this.Z5,"compileShader",this.g5),this.j6(this.Z5,"getShaderParameter",this.g5,this.Z5.COMPILE_STATUS)||this.k6("Fragment shader compilation failed ("+this.j6(this.Z5,"getShaderInfoLog",this.g5)+")")},t.prototype.o6=function(){this.h5=this.j6(this.Z5,"createProgram"),this.j6(this.Z5,"attachShader",this.h5,this.f5),this.j6(this.Z5,"attachShader",this.h5,this.g5),this.j6(this.Z5,"linkProgram",this.h5),this.j6(this.Z5,"getProgramParameter",this.h5,this.Z5.LINK_STATUS)||this.k6("Unable to link program: "+this.j6(this.Z5,"getProgramInfoLog",this.h5)),this.j6(this.Z5,"useProgram",this.h5)},t.prototype.p6=function(){this.M5=new a.GLAttribute(this.Z5,this.h5,"vertexPosition",null)},t.prototype.q6=function(){this.N5=new a.GLUniform(this.Z5,this.h5,"eyeSelector",a.GLVariableType.UNIFORM_1I),this.O5=new a.GLUniform(this.Z5,this.h5,"textureUnit",a.GLVariableType.UNIFORM_1I),this.Q5=new a.GLUniform(this.Z5,this.h5,"contentType",a.GLVariableType.UNIFORM_1I),this.R5=new a.GLUniform(this.Z5,this.h5,"contentFieldOfView",a.GLVariableType.UNIFORM_1F),this.S5=new a.GLUniform(this.Z5,this.h5,"videoWidth",a.GLVariableType.UNIFORM_1F),this.T5=new a.GLUniform(this.Z5,this.h5,"videoHeight",a.GLVariableType.UNIFORM_1F),this.P5=new a.GLUniform(this.Z5,this.h5,"projectionInverse",a.GLVariableType.UNIFORM_MATRIX_4FV),this.U5=new a.GLUniform(this.Z5,this.h5,"distortionCoefficients",a.GLVariableType.UNIFORM_1FV),this.V5=new a.GLUniform(this.Z5,this.h5,"distortionMaxFovSquared",a.GLVariableType.UNIFORM_1F),this.W5=new a.GLUniform(this.Z5,this.h5,"distortionFovOffset",a.GLVariableType.UNIFORM_2FV),this.X5=new a.GLUniform(this.Z5,this.h5,"distortionFovScale",a.GLVariableType.UNIFORM_2FV)},t.prototype.r6=function(){this.i5=this.j6(this.Z5,"createBuffer"),this.j6(this.Z5,"bindBuffer",this.Z5.ARRAY_BUFFER,this.i5),this.j6(this.Z5,"bufferData",this.Z5.ARRAY_BUFFER,new Float32Array(this.k5),this.Z5.STATIC_DRAW),this.j5=this.j6(this.Z5,"createBuffer"),this.j6(this.Z5,"bindBuffer",this.Z5.ELEMENT_ARRAY_BUFFER,this.j5),this.j6(this.Z5,"bufferData",this.Z5.ELEMENT_ARRAY_BUFFER,new Uint16Array(this.l5),this.Z5.STATIC_DRAW)},t.prototype.s6=function(){this.m5=this.j6(this.Z5,"createTexture"),this.j6(this.Z5,"bindTexture",this.Z5.TEXTURE_2D,this.m5),this.j6(this.Z5,"texParameteri",this.Z5.TEXTURE_2D,this.Z5.TEXTURE_MAG_FILTER,this.Z5.LINEAR),this.j6(this.Z5,"texParameteri",this.Z5.TEXTURE_2D,this.Z5.TEXTURE_MIN_FILTER,this.Z5.LINEAR),this.j6(this.Z5,"texParameteri",this.Z5.TEXTURE_2D,this.Z5.TEXTURE_WRAP_S,this.Z5.CLAMP_TO_EDGE),this.j6(this.Z5,"texParameteri",this.Z5.TEXTURE_2D,this.Z5.TEXTURE_WRAP_T,this.Z5.CLAMP_TO_EDGE)},t.prototype.t6=function(t,e){var i,n,r=this.j6(this.a5,"getImageData",0,0,t,e);if(!r)return this.z5.debug("Texture size verification failed."),void(this.I5=!1);for(var o=this.H5.getVideoWidths(),s=this.H5.getVideoHeights(),a=0;a<o.length&&r.data[4*(o[a]-1)+3]>0;a++)i=Math.min(o[a],t);for(var h=0;h<s.length&&r.data[(s[h]-1)*this.C5.videoWidth*4+3]>0;h++)n=Math.min(s[h],e);i&&n&&(i!==t||n!==e)?(this.z5.debug("Texture size mismatch! Expected "+t+"x"+e+" but got "+i+"x"+n+" instead."),this.j6(this.a5,"drawImage",this.B5,0,0,i,n,0,0,this.B5.width,this.B5.height)):this.I5=!1},t.prototype.u6=function(){if(!this.b5||this.b5===a.GL_ERROR.NO_ERROR){var t=this.C5.videoWidth,e=this.C5.videoHeight;if(this.B5&&this.a5){var i=0;this.E5!==o.StreamType.Progressive&&/Trident/.test(navigator.userAgent)&&(i=.0555555*e);var n=e-2*i;this.j6(this.a5,"drawImage",this.C5.getWrappedElement(),0,i,t,n,0,0,this.B5.width,this.B5.height),this.H5.add(t,e);var r=this.F5!==t,s=this.G5!==e;!r&&!s||/Trident/.test(navigator.userAgent)||(this.I5=!0),this.I5&&this.t6(t,e),this.F5=t,this.G5=e}this.j6(this.Z5,"activeTexture",this.Z5.TEXTURE0),this.j6(this.Z5,"bindTexture",this.Z5.TEXTURE_2D,this.m5);try{var h=null!==this.L5.requestFakeInput?this.L5.requestFakeInput():null;null!==h?this.j6(this.Z5,"texImage2D",this.Z5.TEXTURE_2D,0,this.Z5.RGB,this.Z5.RGB,this.Z5.UNSIGNED_BYTE,h):this.B5?this.j6(this.Z5,"texImage2D",this.Z5.TEXTURE_2D,0,this.Z5.RGB,this.Z5.RGB,this.Z5.UNSIGNED_BYTE,this.B5):this.j6(this.Z5,"texImage2D",this.Z5.TEXTURE_2D,0,this.Z5.RGB,this.Z5.RGB,this.Z5.UNSIGNED_BYTE,this.C5.getWrappedElement())}catch(t){this.k6(t.message)}}},t.prototype.onFrameRateAvailable=function(t,e,i){this.z5.debug("Average framerate: "+t.toFixed(2)+"fps, of which "+(100*i).toFixed(2)+"% were spent drawing the scene, "+(100*e).toFixed(2)+"% were spent updating the texture")},t.prototype.v6=function(t,e){if(!this.b5||this.b5===a.GL_ERROR.NO_ERROR){switch(this.j6(this.Z5,"useProgram",this.h5),this.j6(this.Z5,"bindBuffer",this.Z5.ARRAY_BUFFER,this.i5),this.j6(this.Z5,"vertexAttribPointer",this.M5.loc,2,this.Z5.FLOAT,!1,0,0),this.j6(this.Z5,"activeTexture",this.Z5.TEXTURE0),this.j6(this.Z5,"bindTexture",this.Z5.TEXTURE_2D,this.m5),this.N5.setValue(t),this.O5.setValue(0),this.R5.setValue(this.K5.contentFieldOfView),isFinite(this.C5.videoWidth)&&this.C5.videoWidth>0&&isFinite(this.C5.videoHeight)&&this.C5.videoHeight>0?(this.S5.setValue(this.C5.videoWidth),this.T5.setValue(this.C5.videoHeight)):(this.S5.setValue(4096),this.T5.setValue(2048)),this.K5.contentType){case s.VRContentType.Single:this.Q5.setValue(0);break;case s.VRContentType.SBS:this.Q5.setValue(1);break;case s.VRContentType.TAB:this.Q5.setValue(2);break;default:this.k6("Invalid content type specified ("+this.K5.contentType+")")}this.U5.setValue(this.r5),this.V5.setValue(this.s5),this.W5.setValue(this.t5[t]),this.X5.setValue(this.u5),this.P5.setValue(e),this.j6(this.Z5,"viewport",this.A5.width/2*t,0,this.A5.width/this.d5,this.A5.height),this.j6(this.Z5,"bindBuffer",this.Z5.ELEMENT_ARRAY_BUFFER,this.j5),this.j6(this.Z5,"drawElements",this.Z5.TRIANGLES,6,this.Z5.UNSIGNED_SHORT,0)}},t.prototype.w6=function(t){return t?t.viewer.inverseCoefficients:this.p5},t.prototype.x6=function(t){var e=this.y6(t),i=n.MathUtil.hypot(Math.tan(n.MathUtil.degToRad(Math.max(e.leftDegrees,e.rightDegrees))),Math.tan(n.MathUtil.degToRad(Math.max(e.downDegrees,e.upDegrees))));return i*i},t.prototype.y6=function(t,e){var i=e||this.q5.LEFT;return i===this.q5.LEFT?t.getFieldOfViewLeftEye(!0):i===this.q5.RIGHT?t.getFieldOfViewRightEye(!0):null},t.prototype.z6=function(t,e){var i=this.y6(t,e);return[Math.tan(n.MathUtil.degToRad(i.leftDegrees)),Math.tan(n.MathUtil.degToRad(i.downDegrees))]},t.prototype.A6=function(t){var e=this.y6(t);return[Math.tan(n.MathUtil.degToRad(e.leftDegrees))+Math.tan(n.MathUtil.degToRad(e.rightDegrees)),Math.tan(n.MathUtil.degToRad(e.upDegrees))+Math.tan(n.MathUtil.degToRad(e.downDegrees))]},t.prototype.getBackingStoreRatio=function(){var t=0;return this.b5===a.GL_ERROR.NO_ERROR&&(t=(t=(t=(t=(t=t||this.Z5.webkitBackingStorePixelRatio)||this.Z5.mozBackingStorePixelRatio)||this.Z5.msBackingStorePixelRatio)||this.Z5.oBackingStorePixelRatio)||this.Z5.backingStorePixelRatio),t||1},t.prototype.enableStereo=function(){this.e5=!0,this.d5=2},t.prototype.disableStereo=function(){this.e5=!1,this.d5=1},t.prototype.drawScene=function(t,e){if((!this.b5||this.b5===a.GL_ERROR.NO_ERROR)&&this.Z5&&this.C5.getWrappedElement()){this.x5.endAnimationFrame(),this.x5.startAnimationFrame(),this.x5.startDrawScene();try{this.x5.startUpdateTexture(),e&&this.u6(),this.x5.endUpdateTexture(),this.v6(this.q5.LEFT,t),this.e5&&this.v6(this.q5.RIGHT,t),null!==this.L5.onDrawScene&&this.L5.onDrawScene(this.Z5),this.i6([a.GL_ERROR.INVALID_VALUE])}catch(t){this.z5.warn("Texture update failed: "+t)}this.x5.endDrawScene()}},t.prototype.destroy=function(){this.x5.unsubscribe(this),this.x5.destroy(),this.x5=null,this.H5=null,this.Z5=null,this.A5=null,this.a5=null,this.B5=null},t}();e.Renderer=l},24180:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.VRHandler=void 0;var n,r=i(61535),o=i(70372),s=function(){function t(t,e,i,s,a,h,u){var l=o.ConfigParser.parse(i),c=l[0],d=l[1],p=new r.InternalVRHandler(t,e,c,s,a,h,u,d);(n=n||new window.WeakMap).set(this,p)}return t.prototype.Ob=function(){return n.has(this)&&"error"!==n.get(this).getState()},t.prototype.setStereo=function(t){var e="boolean"==typeof t;return!(!this.Ob()||!e)&&n.get(this).setStereo(t)},t.prototype.enableGyroscope=function(){return!!this.Ob()&&n.get(this).enableGyroscope()},t.prototype.disableGyroscope=function(){return!!this.Ob()&&n.get(this).disableGyroscope()},t.prototype.isGyroscopeEnabled=function(){return!!this.Ob()&&n.get(this).isGyroscopeEnabled()},t.prototype.enableMouseControl=function(){return!!this.Ob()&&n.get(this).enableMouseControl()},t.prototype.disableMouseControl=function(){return!!this.Ob()&&n.get(this).disableMouseControl()},t.prototype.isMouseControlEnabled=function(){return!!this.Ob()&&n.get(this).isMouseControlEnabled()},t.prototype.enableKeyboardControl=function(){return!!this.Ob()&&n.get(this).enableKeyboardControl()},t.prototype.disableKeyboardControl=function(){return!!this.Ob()&&n.get(this).disableKeyboardControl()},t.prototype.isKeyboardControlEnabled=function(){return!!this.Ob()&&n.get(this).isKeyboardControlEnabled()},t.prototype.getStereo=function(){return!!this.Ob()&&n.get(this).getStereo()},t.prototype.getState=function(){return n.has(this)?n.get(this).getState():null},t.prototype.getLastError=function(){return n.has(this)?n.get(this).getLastError():null},t.prototype.getViewingDirection=function(){return this.Ob()?n.get(this).getViewingDirection():{yaw:0,pitch:0,roll:0}},t.prototype.setViewingDirection=function(t){var e=t&&isFinite(t.yaw)&&isFinite(t.pitch)&&isFinite(t.roll);return!(!this.Ob()||!e)&&n.get(this).setViewingDirection(t)},t.prototype.moveViewingDirection=function(t){var e=isFinite(t.x)&&isFinite(t.y)&&isFinite(t.phi);return!(!this.Ob()||!e)&&n.get(this).moveViewingDirection(t)},t.prototype.setViewingDirectionChangeEventInterval=function(t){var e=isFinite(t);return!(!this.Ob()||!e)&&n.get(this).setViewingDirectionChangeEventInterval(t)},t.prototype.getViewingDirectionChangeEventInterval=function(){return this.Ob()?n.get(this).getViewingDirectionChangeEventInterval():-1},t.prototype.setViewingDirectionChangeThreshold=function(t){var e=isFinite(t);return!(!this.Ob()||!e)&&n.get(this).setViewingDirectionChangeThreshold(t)},t.prototype.getViewingDirectionChangeThreshold=function(){return this.Ob()?n.get(this).getViewingDirectionChangeThreshold():-1},t.prototype.setVerticalFieldOfView=function(t){return!!this.Ob()&&n.get(this).setVerticalFieldOfView(t)},t.prototype.getVerticalFieldOfView=function(){return this.Ob()?n.get(this).getVerticalFieldOfView():-1},t.prototype.setHorizontalFieldOfView=function(t){return!!this.Ob()&&n.get(this).setHorizontalFieldOfView(t)},t.prototype.getHorizontalFieldOfView=function(){return this.Ob()?n.get(this).getHorizontalFieldOfView():-1},t.prototype.zoom=function(t){return!!this.Ob()&&n.get(this).zoom(t)},t.prototype.getZoom=function(){return this.Ob()?n.get(this).getZoom():-1},t.prototype.deviceOrientationPermissionRequired=function(){var t,e;return this.Ob()&&null!==(e=null===(t=n.get(this))||void 0===t?void 0:t.deviceOrientationPermissionRequired())&&void 0!==e&&e},t.prototype.requestDeviceOrientationPermission=function(){var t,e;return this.Ob()&&null!==(e=null===(t=n.get(this))||void 0===t?void 0:t.requestDeviceOrientationPermission())&&void 0!==e?e:Promise.resolve()},t}();e.VRHandler=s},45698:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.ApiControl=void 0;var r=i(37485),o=function(t){function e(e,i,n){var o=t.call(this,e,i)||this;return o.setViewingDirectionChangeEventInterval(n),o.Yfb=new r.DisplacementVector,o.Zfb=new r.DisplacementVector,o.bfb=0,o}return n(e,t),e.prototype.getDisplacementVector=function(t){return this.bfb+=t,this.bfb>this.afb?this.Zfb.update(0,0,0,!1,t):(r.DisplacementVector.clone(this.Yfb,this.Zfb),this.Zfb.length=this.Yfb.length*t,this.Zfb.phi=this.Yfb.phi*t,this.Zfb.update(this.Zfb.x,this.Zfb.y,this.Zfb.phi,!0,t)),this.Zfb},e.prototype.setTargetVector=function(t){this.Yfb.fromVec3(t,!0),this.bfb=0},e.prototype.setViewingDirectionChangeEventInterval=function(t){this.afb=t},e.prototype.dispose=function(){this.disable()},e}(i(67982).Control);e.ApiControl=o},67982:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Control=void 0;var i=function(){function t(t,e){this.config=t,this.debugHooks=e}return t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.isEnabled=function(){return this.enabled},t}();e.Control=i},22185:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.KeyboardControl=void 0;var r=i(37485),o=i(67982),s=function(){function t(t){this.setKeyCombinations(t),this.qfb=!1}return t.prototype.checkAndSetActiveState=function(t){return this.pfb.some(function(e){return!e.some(function(e){return t.indexOf(e)<0})})?(this.qfb=!0,!0):(this.qfb=!1,!1)},t.prototype.isActive=function(){return this.qfb},t.prototype.setKeyCombinations=function(t){for(var e=[],i=0,n=t;i<n.length;i++){var r=n[i].split(" ").filter(function(t){return t.length>0});r.length>0&&e.push(r)}this.pfb=e},t}(),a=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n.Afb=function(t){if(t&&"string"==typeof t.key){var e=t.key.replace(" ","Space"),i=n.yfb.indexOf(e);i>=0&&"keyup"===t.type?n.yfb.splice(i,1):i<0&&"keydown"===t.type&&n.yfb.push(e),n.sfb.checkAndSetActiveState(n.yfb),n.tfb.checkAndSetActiveState(n.yfb),n.ufb.checkAndSetActiveState(n.yfb),n.vfb.checkAndSetActiveState(n.yfb),n.wfb.checkAndSetActiveState(n.yfb),n.xfb.checkAndSetActiveState(n.yfb)}},n.rfb=n.config.maxDisplacementSpeed,n.sfb=new s(["w"]),n.tfb=new s(["s"]),n.ufb=new s(["a"]),n.vfb=new s(["d"]),n.wfb=new s(["e"]),n.xfb=new s(["q"]),n.yfb=[],n.zfb=new r.DisplacementVector,n.applyKeyMap(n.config.keyMap),n.enable(),n}return n(e,t),e.prototype.getDisplacementVector=function(t){if(this.enabled){var e=0,i=0,n=0;this.debugHooks.requestKeyActiveState?(i+=this.debugHooks.requestKeyActiveState("up")?this.rfb*t:0,i-=this.debugHooks.requestKeyActiveState("down")?this.rfb*t:0,e+=this.debugHooks.requestKeyActiveState("left")?this.rfb*t:0,e-=this.debugHooks.requestKeyActiveState("right")?this.rfb*t:0,n-=this.debugHooks.requestKeyActiveState("rotateClockwise")?this.rfb*t:0,n+=this.debugHooks.requestKeyActiveState("rotateCounterclockwise")?this.rfb*t:0):(i+=this.sfb.isActive()?this.rfb*t:0,i-=this.tfb.isActive()?this.rfb*t:0,e+=this.ufb.isActive()?this.rfb*t:0,e-=this.vfb.isActive()?this.rfb*t:0,n-=this.wfb.isActive()?this.rfb*t:0,n+=this.xfb.isActive()?this.rfb*t:0);var r=0!==e||0!==i||0!==n;this.zfb.update(e,i,n,r,t)}else this.zfb.update(0,0,0,!1,t);return this.zfb},e.prototype.enable=function(){this.enabled=!0,document.addEventListener("keydown",this.Afb,!1),document.addEventListener("keyup",this.Afb,!1)},e.prototype.disable=function(){this.enabled=!1,document.removeEventListener("keydown",this.Afb,!1),document.removeEventListener("keyup",this.Afb,!1)},e.prototype.dispose=function(){this.disable()},e.prototype.applyKeyMap=function(t){t.hasOwnProperty("up")&&this.sfb.setKeyCombinations(t.up),t.hasOwnProperty("down")&&this.tfb.setKeyCombinations(t.down),t.hasOwnProperty("left")&&this.ufb.setKeyCombinations(t.left),t.hasOwnProperty("right")&&this.vfb.setKeyCombinations(t.right),t.hasOwnProperty("rotateClockwise")&&this.wfb.setKeyCombinations(t.rotateClockwise),t.hasOwnProperty("rotateCounterclockwise")&&this.xfb.setKeyCombinations(t.rotateCounterclockwise)},e}(o.Control);e.KeyboardControl=a},64419:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.MouseControl=void 0;var r=i(37485),o=i(51629),s=function(t){function e(i,n,s,a,h){void 0===h&&(h=90);var u=t.call(this,i,n)||this;return u.lfb=function(t){var i=e.getTouchPosition(t),n=0,r=0;u.efb&&(n=i.x-u.hfb.x,r=i.y-u.hfb.y,u.ifb.x+=n,u.ifb.y+=r,u.hfb=i),Math.abs(n)+Math.abs(r)>0&&(u.gfb=!0),t.preventDefault()},u.mfb=function(t){t.stopPropagation(),t.preventDefault(),o.ElementHelper.removeEventListener(document,["click"],u.mfb,!0)},u.nfb=function(t){o.ElementHelper.removeEventListener(document,o.ElementHelper.touchEvents.move,u.lfb,!1),o.ElementHelper.removeEventListener(document,o.ElementHelper.touchEvents.up,u.nfb,!1),o.ElementHelper.removeEventListener(u.cfb,o.ElementHelper.touchEvents.up,u.nfb,!1),o.ElementHelper.removeClass(document.body,"bitmovinplayer-no-select"),u.hfb=null,u.efb=!1,u.gfb&&u.ffb&&t.target===u.ffb&&o.ElementHelper.addEventListener(document,["click"],u.mfb,!0),u.gfb=!1,u.ffb=null},u.ofb=function(t){u.hfb=e.getTouchPosition(t),u.ifb={x:0,y:0},u.efb=!0,u.gfb=!1,u.ffb=t.target,o.ElementHelper.addEventListener(document,o.ElementHelper.touchEvents.move,u.lfb,!1),o.ElementHelper.addEventListener(document,o.ElementHelper.touchEvents.up,u.nfb,!1),o.ElementHelper.addEventListener(u.cfb,o.ElementHelper.touchEvents.up,u.nfb,!1),o.ElementHelper.addClass(document.body,"bitmovinplayer-no-select")},u.cfb=s,u.dfb=a,u.efb=!1,u.hfb=null,u.ifb={x:0,y:0},u.jfb=h,u.kfb=new r.DisplacementVector,u.enable(),u}return n(e,t),e.prototype.getDisplacementVector=function(t){var e=this.dfb.clientWidth,i=this.dfb.clientHeight,n=Boolean(this.debugHooks.requestTraveledMouseDistance),r=this.jfb*(i/e);if(this.ifb=n?this.debugHooks.requestTraveledMouseDistance(t):this.ifb,this.enabled&&isFinite(r)&&r>0){var o=this.efb||0!==this.ifb.x||0!==this.ifb.y;this.kfb.update(this.ifb.x/this.dfb.clientWidth*this.jfb,this.ifb.y/this.dfb.clientHeight*r,0,o,t),this.ifb={x:0,y:0}}else this.kfb.update(0,0,0,this.efb,t);return this.kfb},e.prototype.enable=function(){this.enabled=!0,o.ElementHelper.addEventListener(this.cfb,o.ElementHelper.touchEvents.down,this.ofb,!1)},e.prototype.disable=function(){this.enabled=!1,o.ElementHelper.removeEventListener(document,o.ElementHelper.touchEvents.move,this.lfb,!1),o.ElementHelper.removeEventListener(document,o.ElementHelper.touchEvents.up,this.nfb,!1),o.ElementHelper.removeEventListener(this.cfb,o.ElementHelper.touchEvents.up,this.nfb,!1),o.ElementHelper.removeEventListener(this.cfb,o.ElementHelper.touchEvents.down,this.ofb,!1),o.ElementHelper.removeEventListener(document,["click"],this.mfb,!0),this.hfb=null,this.efb=!1,this.gfb=!1,this.ffb=null,o.ElementHelper.removeClass(document.body,"bitmovinplayer-no-select")},e.prototype.dispose=function(){this.disable(),this.cfb=null,this.dfb=null},e.getTouchPosition=function(t){var e={x:0,y:0};return"ms"===o.ElementHelper.touchEvents.type?(e.x=t.clientX||t.originalEvent.layerX,e.y=t.clientY||t.originalEvent.layerY):"mobile"===o.ElementHelper.touchEvents.type?(e.x=t.touches[0].clientX,e.y=t.touches[0].clientY):(e.x=t.clientX,e.y=t.clientY),e.x=e.x||0,e.y=e.y||0,e},e}(i(67982).Control);e.MouseControl=s},54479:function(t,e){var i,n,r=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.GLUniform=e.GLAttribute=e.GLVariableType=e.GL_ERROR_STR=e.GL_ERROR=void 0,function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.OTHER_ERROR=1]="OTHER_ERROR",t[t.INVALID_ENUM=1280]="INVALID_ENUM",t[t.INVALID_FRAMEBUFFER_OPERATION=1286]="INVALID_FRAMEBUFFER_OPERATION",t[t.INVALID_OPERATION=1282]="INVALID_OPERATION",t[t.INVALID_VALUE=1281]="INVALID_VALUE"}(i||(e.GL_ERROR=i={})),e.GL_ERROR_STR={1280:"INVALID_ENUM",1286:"INVALID_FRAMEBUFFER_OPERATION",1282:"INVALID_OPERATION",1281:"INVALID_VALUE"},function(t){t.UNIFORM_1I="uniform1i",t.UNIFORM_1F="uniform1f",t.UNIFORM_MATRIX_4FV="uniformMatrix4fv",t.UNIFORM_1FV="uniform1fv",t.UNIFORM_2FV="uniform2fv"}(n||(e.GLVariableType=n={}));var o=function(){function t(t,e,i,n){this.context=t,this.program=e,this.name=i,this.type=n}return Object.defineProperty(t.prototype,"loc",{get:function(){return this.location},enumerable:!1,configurable:!0}),t}(),s=function(t){function e(e,i,n,r){var o=t.call(this,e,i,n,r)||this;return o.location=o.context.getAttribLocation(o.program,o.name),o.context.enableVertexAttribArray(o.name),o}return r(e,t),e.prototype.setValue=function(t){},e}(o);e.GLAttribute=s;var a=function(t){function e(e,i,n,r){var o=t.call(this,e,i,n,r)||this;return o.location=o.context.getUniformLocation(o.program,o.name),o.context.enableVertexAttribArray(o.name),o}return r(e,t),e.prototype.setValue=function(t){this.type.indexOf("Matrix")>-1?this.context[this.type].call(this.context,this.location,!1,t):this.context[this.type].call(this.context,this.location,t)},e}(o);e.GLUniform=a},55443:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultDeviceOrientationProvider=void 0;var r,o=i(44369),s=i(16404);!function(t){t.Granted="granted",t.Denied="denied"}(r||(r={}));var a=function(t){function e(){var i=t.call(this)||this;i.eib=null,i.fib=null,i.gib=null,i.hib=0,i.iib=0,i.lib=function(t){var e=void 0!==t.alpha&&null!==t.alpha,n=void 0!==t.beta&&null!==t.beta,r=void 0!==t.gamma&&null!==t.gamma;e&&n&&r&&(i.eib=t.alpha,i.fib=t.gamma,i.gib=t.beta),t.hasOwnProperty("screenOrientation")&&(i.hib=i.kib(t))},i.mib=function(){i.lib(e.getDeviceOrientationFromWindow())},i.nib=function(t){t&&t.data&&i.lib(t.data)},window.top!==window?window.addEventListener("message",i.nib,!1):window.addEventListener("deviceorientation",i.lib);try{window.addEventListener("orientationchange",i.mib);var n=e.getDeviceOrientationFromWindow();i.lib(n)}catch(t){window.removeEventListener("orientationchange",i.mib)}return i.enable(),i}return n(e,t),e.prototype.getOrientation=function(){if(!this.orientationDataAvailable()||!this.enabled)return this.defaultDeviceOrientation;var t=o.MathUtil.degToRad(this.eib)/2,e=o.MathUtil.degToRad(this.gib)/2,i=o.MathUtil.degToRad(this.fib)/2,n=Math.cos(e),r=Math.cos(i),s=Math.cos(t),a=Math.sin(e),h=Math.sin(i),u=Math.sin(t),l=n*r*s-a*h*u,c=a*r*s-n*h*u,d=n*h*s+a*r*u,p=n*r*u+a*h*s,f=o.Quat.fromValues(c,d,p,l),b=o.MathUtil.degToRad(this.jib())/2,y=o.Quat.fromValues(0,0,-Math.sin(b),Math.cos(b)),v=o.Quat.create();o.Quat.multiply(v,f,y);var g=Math.sqrt(.5);return o.Quat.multiply(v,o.Quat.fromValues(-g,0,0,g),v),o.Quat.toAngle(v)},e.prototype.orientationDataAvailable=function(){return null!==this.eib},e.supported=function(){return!!window.DeviceOrientationEvent},e.prototype.jib=function(){return this.hib},e.prototype.kib=function(t){var e;switch(t.screenOrientation.type){case"landscape-primary":e=90;break;case"landscape-secondary":e=-90;break;case"portrait-secondary":e=180;break;case"portrait-primary":e=0}return!e&&isNaN(e)&&(e=isNaN(t.screenOrientation.type)?t.orientation||0:t.screenOrientation.type),window.top!==window&&e===this.iib&&t.orientation!==e&&(e=t.orientation||0),e},e.getDeviceOrientationFromWindow=function(){var t=window.screen,e=t.orientation||t.mozOrientation||t.msOrientation||{};return{screenOrientation:{type:e.type||e,angle:e.angle},orientation:window.orientation}},e.prototype.permissionRequired=function(){return"undefined"!=typeof DeviceMotionEvent&&"function"==typeof DeviceMotionEvent.requestPermission},e.prototype.requestPermission=function(){return"undefined"==typeof DeviceMotionEvent||"function"!=typeof DeviceMotionEvent.requestPermission?Promise.resolve():DeviceMotionEvent.requestPermission().then(function(t){return t===r.Granted?Promise.resolve():Promise.reject()})},e}(s.DeviceOrientationProvider);e.DefaultDeviceOrientationProvider=a},16404:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeviceOrientationProvider=void 0;var i=function(){function t(){this.defaultFieldOfView={upDegrees:45,rightDegrees:55,downDegrees:45,leftDegrees:55},this.defaultDeviceOrientation={yaw:0,pitch:0,roll:0}}return t.prototype.getFieldOfViewParams=function(){return this.defaultFieldOfView},t.supported=function(){return!1},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.isEnabled=function(){return this.enabled},t.prototype.permissionRequired=function(){return!1},t.prototype.requestPermission=function(){return Promise.resolve()},t}();e.DeviceOrientationProvider=i},59324:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.DeviceOrientationProviderFactory=void 0;var n=i(55443),r=i(11805),o=i(72458),s=function(){function t(){}return t.get=function(){return o.WebVRDeviceOrientationProvider.supported()?new o.WebVRDeviceOrientationProvider:n.DefaultDeviceOrientationProvider.supported()?new n.DefaultDeviceOrientationProvider:new r.NoDeviceOrientationProvider},t}();e.DeviceOrientationProviderFactory=s},37485:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.DisplacementVector=void 0;var n=i(23068),r=Math.PI/180,o=180/Math.PI,s=function(){function t(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=!1),this.Wfb=null,this.update(t,e,i,n)}return Object.defineProperty(t.prototype,"x",{get:function(){return this.Geb},set:function(t){this.Geb!==t&&this.update(t,this.Heb,this.Ieb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.Heb},set:function(t){this.Heb!==t&&this.update(this.Geb,t,this.Ieb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"phi",{get:function(){return this.Ieb},set:function(t){this.Ieb!==t&&this.update(this.Geb,this.Heb,t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alpha",{get:function(){return this.Ufb},set:function(t){this.Ufb!==t&&this.update(this.Jeb*Math.cos(t*r),this.Jeb*Math.sin(t*r),this.Ieb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this.Jeb},set:function(t){this.Jeb!==t&&this.update(t*Math.cos(this.Ufb*r),t*Math.sin(this.Ufb*r),this.Ieb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"active",{get:function(){return this.Vfb},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deltaTime",{get:function(){return this.Wfb||0},set:function(t){this.Wfb=t},enumerable:!1,configurable:!0}),t.prototype.update=function(t,e,i,r,s){if(void 0===i&&(i=0),"boolean"==typeof r&&(this.Vfb=r),(0,n.isNumber)(s)&&(this.Wfb=s),this.Geb!==t||this.Heb!==e||this.Ieb!==i){if(this.Geb=Math.abs(t)<1e-4?0:t,this.Heb=Math.abs(e)<1e-4?0:e,this.Ieb=Math.abs(i)<1e-4?0:i,0===this.Geb&&0===this.Heb&&0===this.Ieb)return this.Jeb=0,void(this.Ufb=0);this.Jeb=Math.sqrt(this.Geb*this.Geb+this.Heb*this.Heb),0===this.Heb&&this.Geb>=0?this.Ufb=0:0===this.Geb&&this.Heb>0?this.Ufb=90:0===this.Geb&&this.Heb<0?this.Ufb=270:this.Geb<0&&0===this.Heb?this.Ufb=180:this.Geb>0&&this.Heb>0?this.Ufb=Math.atan(this.Heb/this.Geb)*o:this.Geb<0&&this.Heb>0||this.Geb<0&&this.Heb<0?this.Ufb=180+Math.atan(this.Heb/this.Geb)*o:this.Geb>0&&this.Heb<0?this.Ufb=360+Math.atan(this.Heb/this.Geb)*o:this.Ufb=0}},t.prototype.fromVec3=function(t,e,i){this.update(t.x,t.y,t.phi,e,i)},t.prototype.add=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=this.Geb,n=this.Heb,r=this.Ieb,o=0,s=t;o<s.length;o++){var a=s[o];i+=a.Geb,n+=a.Heb,r+=a.Ieb}this.update(i,n,r)},t.prototype.diff=function(e,i){i instanceof t?this.update(i.x-e.x,i.y-e.y,i.phi-e.phi):this.update(e.x-this.Geb,e.y-this.Heb,e.phi-this.Ieb)},t.clone=function(e,i){e instanceof t&&i instanceof t&&i.update(e.Geb,e.Heb,e.Ieb,e.Vfb,e.Wfb)},t.prototype.scale=function(t){this.length=this.Jeb*t},t}();e.DisplacementVector=s},11805:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.NoDeviceOrientationProvider=void 0;var r=function(t){function e(){var e=t.call(this)||this;return e.enable(),e}return n(e,t),e.prototype.getOrientation=function(){return this.defaultDeviceOrientation},e.prototype.orientationDataAvailable=function(){return!0},e.supported=function(){return!0},e}(i(16404).DeviceOrientationProvider);e.NoDeviceOrientationProvider=r},33639:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.OrientationHandler=void 0;var n,r=i(44369),o=i(3714),s=i(45698),a=i(22185),h=i(64419),u=i(76320),l=i(59324),c=i(37485);!function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal",t.BOTH="BOTH"}(n||(n={}));var d=function(){function t(t,e,i,o,d){var p=this;this.E6=null,this.F6=null,this.G6=1,this.H6=null,this.I6=null,this.J6=null,this.K6=null,this.L6=null,this.M6=null,this.N6=null,this.enableGyroscope=function(){p.D6.enable()},this.disableGyroscope=function(){p.D6.disable()},this.isGyroscopeEnabled=function(){return p.D6.isEnabled()},this.enableMouseControl=function(){p.R6.enable()},this.disableMouseControl=function(){p.R6.disable()},this.isMouseControlEnabled=function(){return p.R6.isEnabled()},this.enableKeyboardControl=function(){p.Q6.enable()},this.disableKeyboardControl=function(){p.Q6.disable()},this.isKeyboardControlEnabled=function(){return p.Q6.isEnabled()},this.O6=t,this.P6=i,this.t7=d,this.D6=l.DeviceOrientationProviderFactory.get(),this.K6=r.Mat4.create(),this.L6=r.Mat4.create(),this.M6=r.Mat4.create(),this.H6=r.Mat4.create(),this.E6=r.Mat4.create(),this.G6=this.P6.stereo?2:1,this.J6={yaw:0,pitch:0,roll:0},this.J6.yaw=this.P6.startPosition,this.W6=new c.DisplacementVector,this.X6=new c.DisplacementVector,this.I6={yaw:this.J6.yaw,pitch:0,roll:0},this.Y6=this.P6.viewingDirectionChangeEventInterval,this.Z6=this.P6.viewingDirectionChangeThreshold,this.e6=this.P6.verticalFieldOfView,this.f6=this.P6.horizontalFieldOfView,this.g6=this.e6>-1,this.h6=this.f6>-1,this.s7=1,this.a6=0,this.b6=!1,this.Q6=new a.KeyboardControl(this.P6.keyboardControl,o),this.R6=new h.MouseControl(this.P6.mouseControl,o,e,this.O6),this.S6=new s.ApiControl(this.P6.apiControl,o,this.Y6),this.U6=u.TransitionTimingFactory.get(this.P6.keyboardControl),this.T6=u.TransitionTimingFactory.get(this.P6.mouseControl),this.V6=u.TransitionTimingFactory.get(this.P6.apiControl),this.e6>-1&&this.f6>-1?this.d6=n.BOTH:this.f6>-1?this.d6=n.HORIZONTAL:this.d6=n.VERTICAL}return t.clampValue=function(t,e,i){return 0===e&&360===i?t%360:t>i?i:t<e?e:t},t.clampToWindow=function(e,i){var n={yaw:0,pitch:0,roll:e.roll};return n.yaw=t.clampValue(e.yaw,i.minYaw,i.maxYaw),n.pitch=t.clampValue(e.pitch,i.minPitch,i.maxPitch),n},t.prototype.u7=function(e){void 0===e&&(e={yaw:0,pitch:0,roll:0}),null!==this.N6&&(this.N6=t.clampToWindow(this.N6,this.P6.viewingWindow),this.J6.yaw=this.N6.yaw-e.yaw,this.J6.pitch=this.N6.pitch-e.pitch,this.J6.roll=this.N6.roll-e.roll,this.T6.reset(),this.U6.reset(),this.V6.reset()),this.N6=null,this.I6.yaw=this.J6.yaw+e.yaw,this.I6.pitch=this.J6.pitch+e.pitch,this.I6.roll=this.J6.roll+e.roll,this.I6=t.clampToWindow(this.I6,this.P6.viewingWindow),r.Mat4.identity(this.H6),r.Mat4.rotate(this.H6,r.MathUtil.degToRad(this.I6.yaw+180),[0,1,0]),r.Mat4.rotate(this.H6,r.MathUtil.degToRad(this.I6.pitch),[1,0,0]),r.Mat4.rotate(this.H6,r.MathUtil.degToRad(this.I6.roll),[0,0,1])},t.prototype.getProjectionInverse=function(){return this.E6},t.prototype.getViewingDirection=function(){return this.I6},t.prototype.setViewingDirection=function(t){this.N6=t},t.prototype.setVerticalFieldOfView=function(t){this.g6=-1!==t,this.e6=-1===t?-1:Math.max(Math.min(180,t),0),-1===t&&this.d6===n.BOTH?this.d6=n.HORIZONTAL:this.d6===n.HORIZONTAL&&(this.h6?this.d6=n.BOTH:this.d6=n.VERTICAL)},t.prototype.getVerticalFieldOfView=function(){return this.e6/this.s7},t.prototype.setHorizontalFieldOfView=function(t){this.h6=-1!==t,this.f6=-1===t?-1:Math.max(Math.min(180,t),0),-1===t&&this.d6===n.BOTH?this.d6=n.VERTICAL:this.d6===n.VERTICAL&&(this.g6?this.d6=n.BOTH:this.d6=n.HORIZONTAL)},t.prototype.getHorizontalFieldOfView=function(){return this.f6/this.s7},t.prototype.zoom=function(t){return!!isFinite(t)&&(this.s7=Math.max(Number(t),1e-10),!0)},t.prototype.getZoom=function(){return this.s7},t.prototype.v7=function(){var t,e,i=this.D6.getFieldOfViewParams(),o=[1];this.e6<0&&(this.e6=i.upDegrees+i.downDegrees),this.f6<0&&(this.f6=i.leftDegrees+i.rightDegrees),this.d6!==n.BOTH&&this.d6!==n.HORIZONTAL||o.push(180/(this.f6/this.s7)),this.d6!==n.BOTH&&this.d6!==n.VERTICAL||o.push(180/(this.e6/this.s7)),this.s7/=Math.min.apply(null,o);var s=r.MathUtil.degToRad(this.e6/this.s7),a=r.MathUtil.degToRad(this.f6/this.s7);this.d6===n.BOTH?(t=s,e=Math.tan(.5*a)/Math.tan(.5*s)):e=this.O6.width/this.G6/this.O6.height,this.d6===n.HORIZONTAL?(t=2*Math.atan(Math.tan(a/2)/e),this.e6=r.MathUtil.radToDeg(t)*this.s7):this.d6===n.VERTICAL&&(t=s,this.f6=r.MathUtil.radToDeg(2*Math.atan(e*Math.tan(s/2)))/this.G6*this.s7),r.Mat4.perspective(this.M6,t,e,.1,10),r.Mat4.invert(this.K6,this.M6),r.Mat4.multiply(this.E6,this.H6,this.K6)},t.prototype.update=function(e){this.F6=this.F6||e;for(var i=(e-this.F6)/1e3,n=r.Mat4.create(),s=0;s<this.E6.length;s++)n[s]=this.E6[s];this.a6+=i,this.W6.update(0,0,0),i>0&&this.W6.add(this.T6.apply(this.R6.getDisplacementVector(i)),this.U6.apply(this.Q6.getDisplacementVector(i)),this.V6.apply(this.S6.getDisplacementVector(i))),this.J6.yaw+=this.W6.x,this.J6.pitch+=this.W6.y,this.J6.roll+=this.W6.phi,this.J6=t.clampToWindow(this.J6,this.P6.viewingWindow),this.F6=e,this.D6.orientationDataAvailable()?this.u7(this.D6.getOrientation()):this.u7(),this.X6.add(this.W6);var a=Math.abs(this.X6.length)>this.Z6||Math.abs(this.X6.phi)>this.Z6;a||this.b6||(this.a6=0);var h=this.a6>=this.Y6;for(!a||!h&&this.b6?h&&this.b6&&(this.b6=!1,this.X6.update(0,0,0),this.a6=0,this.t7.getEventFunction()(o.PlayerEvent.VRViewingDirectionChanged,{direction:this.I6})):(this.b6=!0,this.a6=0,this.X6.update(0,0,0),this.t7.getEventFunction()(o.PlayerEvent.VRViewingDirectionChange,{direction:this.I6})),this.v7(),s=0;s<this.E6.length;s++)if(n[s]!==this.E6[s])return!0;return!1},t.prototype.enableStereo=function(){this.G6=2},t.prototype.disableStereo=function(){this.G6=1},t.prototype.moveViewingDirection=function(t){this.S6.setTargetVector(t)},t.prototype.setViewingDirectionChangeEventInterval=function(t){this.Y6=t},t.prototype.getViewingDirectionChangeEventInterval=function(){return this.Y6},t.prototype.setViewingDirectionChangeThreshold=function(t){this.Z6=t},t.prototype.getViewingDirectionChangeThreshold=function(){return this.Z6},t.prototype.permissionRequired=function(){return this.D6.permissionRequired()},t.prototype.requestPermission=function(){return this.D6.requestPermission()},t.prototype.destroy=function(){this.Q6.dispose(),this.R6.dispose(),this.Q6=null,this.R6=null},t}();e.OrientationHandler=d},72458:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.WebVRDeviceOrientationProvider=void 0;var r=i(44369),o=function(t){function e(){var e=t.call(this)||this;return e.bib=null,e.cib=null,e.dib=function(t){var i;for(i=0;i<t.length;++i)if(t[i]instanceof HMDVRDevice){e.bib=t[i];break}if(e.bib)for(i=0;i<t.length;++i)if(t[i]instanceof PositionSensorVRDevice&&t[i].hardwareUnitId===e.bib.hardwareUnitId){e.cib=t[i];break}},navigator.getVRDevices&&navigator.getVRDevices().then(e.dib),e.enable(),e}return n(e,t),e.prototype.getOrientation=function(){if(this.orientationDataAvailable()&&this.enabled){var t=this.cib.getState(),e=new Float32Array([0,0,0,0]);return null!==t&&t.orientation&&(e=new Float32Array([t.orientation.x,t.orientation.y,t.orientation.z,t.orientation.w])),r.Quat.toAngle(e)}return this.defaultDeviceOrientation},e.prototype.getFieldOfViewParams=function(){return this.orientationDataAvailable()?this.bib.getEyeParameters("left").recommendedFieldOfView:this.defaultFieldOfView},e.prototype.orientationDataAvailable=function(){return null!==this.cib&&null!==this.bib},e.supported=function(){return!!navigator.getVRDevices},e}(i(16404).DeviceOrientationProvider);e.WebVRDeviceOrientationProvider=o},81116:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.EaseInOutTransitionTiming=void 0;var r=i(44369),o=i(37485),s=function(t){function e(e){var i=t.call(this,e)||this;return i.currentDisplacementVector=new o.DisplacementVector,i.intermediateDisplacementVector=new o.DisplacementVector,i.targetDisplacementVector=new o.DisplacementVector,i.normalizedTargetDisplacementVector=new o.DisplacementVector,i.normalizedDisplacementVector=new o.DisplacementVector,i.maximumLinearAcceleration=0,i.maximumAngularAcceleration=0,i}return n(e,t),e.prototype.shouldTransitionBeApplied=function(){var t=isFinite(this.targetDisplacementVector.deltaTime),e=this.targetDisplacementVector.deltaTime>0;return t&&e},e.prototype.apply=function(t){if(this.targetDisplacementVector.deltaTime=t.deltaTime,o.DisplacementVector.clone(t,this.normalizedDisplacementVector),o.DisplacementVector.clone(this.targetDisplacementVector,this.normalizedTargetDisplacementVector),this.normalizedDisplacementVector.length/=this.normalizedDisplacementVector.deltaTime,this.normalizedTargetDisplacementVector.length/=this.normalizedTargetDisplacementVector.deltaTime,this.normalizedDisplacementVector.phi/=this.normalizedDisplacementVector.deltaTime,this.normalizedTargetDisplacementVector.phi/=this.normalizedTargetDisplacementVector.deltaTime,this.normalizedDisplacementVector.diff(this.normalizedTargetDisplacementVector),this.normalizedDisplacementVector.length>0&&(this.maximumLinearAcceleration=this.normalizedDisplacementVector.length/this.config.transitionTime),0!==Math.abs(this.normalizedDisplacementVector.phi)&&(this.maximumAngularAcceleration=Math.abs(this.normalizedDisplacementVector.phi)/this.config.transitionTime),o.DisplacementVector.clone(t,this.targetDisplacementVector),!this.shouldTransitionBeApplied())return o.DisplacementVector.clone(this.targetDisplacementVector,this.currentDisplacementVector),this.targetDisplacementVector;this.intermediateDisplacementVector.diff(this.currentDisplacementVector,this.targetDisplacementVector);var e=Math.min(this.maximumLinearAcceleration*this.targetDisplacementVector.deltaTime*this.targetDisplacementVector.deltaTime,this.config.maxDisplacementSpeed),i=Math.min(this.maximumAngularAcceleration*this.targetDisplacementVector.deltaTime*this.targetDisplacementVector.deltaTime,this.config.maxDisplacementSpeed);return this.intermediateDisplacementVector.length>e&&(this.intermediateDisplacementVector.length=e),Math.abs(this.intermediateDisplacementVector.phi)>i&&(this.intermediateDisplacementVector.phi=r.MathUtil.sign(this.intermediateDisplacementVector.phi)*i),this.currentDisplacementVector.add(this.intermediateDisplacementVector),this.currentDisplacementVector},e.prototype.reset=function(){this.currentDisplacementVector.update(0,0,0),this.intermediateDisplacementVector.update(0,0,0),this.targetDisplacementVector.update(0,0,0),this.maximumLinearAcceleration=0,this.maximumAngularAcceleration=0},e}(i(7192).TransitionTiming);e.EaseInOutTransitionTiming=s},68801:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.EaseInTransitionTiming=void 0;var r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.shouldTransitionBeApplied=function(){var t=isFinite(this.targetDisplacementVector.deltaTime),e=this.targetDisplacementVector.deltaTime>0,i=this.targetDisplacementVector.active;return t&&e&&i},e}(i(81116).EaseInOutTransitionTiming);e.EaseInTransitionTiming=r},95746:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.EaseOutTransitionTiming=void 0;var r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.shouldTransitionBeApplied=function(){var t=isFinite(this.targetDisplacementVector.deltaTime),e=this.targetDisplacementVector.deltaTime>0,i=this.targetDisplacementVector.active;return t&&e&&!i},e}(i(81116).EaseInOutTransitionTiming);e.EaseOutTransitionTiming=r},4551:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.NoTransitionTiming=void 0;var r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.apply=function(t){return t},e.prototype.reset=function(){},e}(i(7192).TransitionTiming);e.NoTransitionTiming=r},7192:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.TransitionTiming=void 0;var i=function(){return function(t){this.config=t}}();e.TransitionTiming=i},76320:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.TransitionTimingFactory=void 0;var n=i(43948),r=i(81116),o=i(68801),s=i(95746),a=i(4551),h=function(){function t(){}return t.get=function(t){switch(t.transitionTimingType){case n.TransitionTimingType.None:return new a.NoTransitionTiming(t);case n.TransitionTimingType.EaseIn:return new o.EaseInTransitionTiming(t);case n.TransitionTimingType.EaseOut:return new s.EaseOutTransitionTiming(t);case n.TransitionTimingType.EaseInOut:return new r.EaseInOutTransitionTiming(t)}},t}();e.TransitionTimingFactory=h},70372:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigParser=void 0;var n=i(43948),r={contentType:n.VRContentType.Single,stereo:!1,startPosition:0,contentFieldOfView:360,verticalFieldOfView:-1,horizontalFieldOfView:-1,viewingWindow:{minYaw:0,maxYaw:360,minPitch:-90,maxPitch:90},restrictedInlinePlayback:!1,enableFrameRateMeasurements:!1,cardboard:null,viewingDirectionChangeThreshold:5,viewingDirectionChangeEventInterval:.25,keyboardControl:{transitionTimingType:n.TransitionTimingType.EaseInOut,transitionTime:.25,maxDisplacementSpeed:90,keyMap:{up:["w"],right:["d"],down:["s"],left:["a"],rotateClockwise:["e"],rotateCounterclockwise:["q"]}},mouseControl:{transitionTimingType:n.TransitionTimingType.EaseOut,transitionTime:.25,maxDisplacementSpeed:1/0},apiControl:{transitionTimingType:n.TransitionTimingType.EaseInOut,transitionTime:.25,maxDisplacementSpeed:1/0}},o=function(){function t(){}return t.getObject=function(t,e){for(var i=e.split("."),n=!0,o=t,s=r,a=0,h=i;a<h.length;a++){var u=h[a];o.hasOwnProperty(u)&&n?o=o[u]:n=!1,s.hasOwnProperty(u)&&(s=s[u])}return[n,o,s]},t.getPrimitive=function(e,i,n,r){var o=t.getObject(e,i),s=o[0],a=o[1],h=o[2],u=!0;if(r)for(var l in r){if(r.hasOwnProperty(l)&&r[l]===a){u=!0;break}u=!1}return s&&typeof a===n&&u?a:h},t.getArray=function(e,i,n){var r=t.getObject(e,i),o=r[0],s=r[1],a=r[2];return o&&"object"==typeof s&&s instanceof Array&&!s.some(function(t){return typeof t!==n})?s:a},t.getStringPrimitive=function(e,i,n){return t.getPrimitive(e,i,"string",n)},t.getEnumPrimitive=function(e,i,n){return t.getPrimitive(e,i,"string",n)},t.getBooleanPrimitive=function(e,i,n){return t.getPrimitive(e,i,"boolean",n)},t.getNumberPrimitive=function(e,i,n){return t.getPrimitive(e,i,"number",n)},t.getStringArray=function(e,i){return t.getArray(e,i,"string")},t.parseGeneralConfig=function(e,i){i.stereo=t.getBooleanPrimitive(e,"stereo"),i.restrictedInlinePlayback=t.getBooleanPrimitive(e,"restrictedInlinePlayback"),i.startPosition=t.getNumberPrimitive(e,"startPosition"),i.contentFieldOfView=t.getNumberPrimitive(e,"contentFieldOfView"),i.verticalFieldOfView=t.getNumberPrimitive(e,"verticalFieldOfView"),i.horizontalFieldOfView=t.getNumberPrimitive(e,"horizontalFieldOfView"),i.enableFrameRateMeasurements=t.getBooleanPrimitive(e,"enableFrameRateMeasurements"),i.cardboard=t.getStringPrimitive(e,"cardboard"),i.viewingDirectionChangeThreshold=t.getNumberPrimitive(e,"viewingDirectionChangeThreshold"),i.viewingDirectionChangeEventInterval=t.getNumberPrimitive(e,"viewingDirectionChangeEventInterval")},t.parseViewingWindow=function(e,i){i.viewingWindow=r.viewingWindow,e.hasOwnProperty("viewingWindow")&&"object"==typeof e.viewingWindow&&(i.viewingWindow.minYaw=t.getNumberPrimitive(e,"viewingWindow.minYaw"),i.viewingWindow.maxYaw=t.getNumberPrimitive(e,"viewingWindow.maxYaw"),i.viewingWindow.minPitch=t.getNumberPrimitive(e,"viewingWindow.minPitch"),i.viewingWindow.maxPitch=t.getNumberPrimitive(e,"viewingWindow.maxPitch"))},t.parseKeyboardControl=function(e,i){i.keyboardControl=r.keyboardControl,e.hasOwnProperty("keyboardControl")&&"object"==typeof e.keyboardControl&&(i.keyboardControl.transitionTimingType=t.getEnumPrimitive(e,"keyboardControl.transitionTimingType",n.TransitionTimingType),i.keyboardControl.transitionTime=t.getNumberPrimitive(e,"keyboardControl.transitionTime"),i.keyboardControl.maxDisplacementSpeed=t.getNumberPrimitive(e,"keyboardControl.maxDisplacementSpeed"),e.keyboardControl.hasOwnProperty("keyMap")&&"object"==typeof e.keyboardControl.keyMap&&(i.keyboardControl.keyMap.up=t.getStringArray(e,"keyboardControl.keyMap.up"),i.keyboardControl.keyMap.right=t.getStringArray(e,"keyboardControl.keyMap.right"),i.keyboardControl.keyMap.down=t.getStringArray(e,"keyboardControl.keyMap.down"),i.keyboardControl.keyMap.left=t.getStringArray(e,"keyboardControl.keyMap.left"),i.keyboardControl.keyMap.rotateClockwise=t.getStringArray(e,"keyboardControl.keyMap.rotateClockwise"),i.keyboardControl.keyMap.rotateCounterclockwise=t.getStringArray(e,"keyboardControl.keyMap.rotateCounterclockwise")))},t.parseMouseControl=function(e,i){i.mouseControl=r.mouseControl,e.hasOwnProperty("mouseControl")&&"object"==typeof e.mouseControl&&(i.mouseControl.transitionTimingType=t.getEnumPrimitive(e,"mouseControl.transitionTimingType",n.TransitionTimingType),i.mouseControl.transitionTime=t.getNumberPrimitive(e,"mouseControl.transitionTime"),i.mouseControl.maxDisplacementSpeed=t.getNumberPrimitive(e,"mouseControl.maxDisplacementSpeed"))},t.parseApiControl=function(e,i){i.apiControl=r.apiControl,e.hasOwnProperty("apiControl")&&"object"==typeof e.apiControl&&(i.apiControl.transitionTimingType=t.getEnumPrimitive(e,"apiControl.transitionTimingType",n.TransitionTimingType),i.apiControl.transitionTime=t.getNumberPrimitive(e,"apiControl.transitionTime"),i.apiControl.maxDisplacementSpeed=t.getNumberPrimitive(e,"apiControl.maxDisplacementSpeed"))},t.parseDebugHooks=function(t){var e={onDrawScene:null,onStartRendering:null,onRenderingSuspended:null,onRenderingResumed:null,requestFakeInput:null,requestTraveledMouseDistance:null,requestKeyActiveState:null};return t.debugHooks&&Object.keys(e).filter(function(e){return"function"==typeof t.debugHooks[e]}).forEach(function(i){return e[i]=t.debugHooks[i]}),e},t.parse=function(e){e=e||{};var i={contentType:t.getEnumPrimitive(e,"contentType",n.VRContentType)};return t.parseGeneralConfig(e,i),t.parseViewingWindow(e,i),t.parseKeyboardControl(e,i),t.parseMouseControl(e,i),t.parseApiControl(e,i),[i,t.parseDebugHooks(e)]},t}();e.ConfigParser=o},51629:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ElementHelper=void 0;var i=function(){function t(){}return t.addEventListener=function(t,e,i,n){for(var r=0;r<e.length;r++)t.addEventListener(e[r],i,n)},t.removeEventListener=function(t,e,i,n){for(var r=0;r<e.length;r++)t.removeEventListener(e[r],i,n)},t.addClass=function(t,e){if(t&&e){var i=t.getAttribute("class"),n=!0;i&&i.length>0&&(n=i.split(" ").indexOf(e)<0),i&&i.length>0&&n&&(e=i+" "+e),n&&t.setAttribute("class",e)}},t.removeClass=function(t,e){if(t&&e){var i=t.getAttribute("class");i&&i.indexOf(e)>-1&&(i=i.replace(new RegExp("(?:^|\\s)"+e+"(?!\\S)"),"").trim(),t.setAttribute("class",i))}},t.getNavigator=function(){return window.navigator},Object.defineProperty(t,"touchEvents",{get:function(){var e=t.getNavigator().userAgent,i=t.getNavigator().msPointerEnabled;return/Android|IEMobile|iP(hone|ad|od)/i.test(e)?i?{start:["MSPointerDown"],move:["MSPointerMove"],end:["MSPointerUp"],down:["MSPointerDown"],up:["MSPointerUp"],click:["MSPointerUp"],type:"ms"}:{start:["touchstart"],move:["touchmove"],end:["touchend","touchcancel"],down:["touchstart"],up:["touchend","touchcancel"],click:["touchend"],type:"mobile"}:{start:["mouseover"],move:["mousemove"],end:["mouseleave","mouseout"],down:["mousedown"],up:["mouseup"],click:["click"],type:"desktop"}},enumerable:!1,configurable:!0}),t}();e.ElementHelper=i},17378:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.FrameRateMonitor=void 0;var n=i(44369),r=function(){function t(t,e){void 0===e&&(e=1e3);var i=this;this.startAnimationFrame=function(){i.Deb&&(i.zeb=window.performance.now())},this.endAnimationFrame=function(){if(!(i.zeb<0)){var t=window.performance.now()-i.zeb;i.web.push(t),i.Feb(),i.Ceb+=t,i.Ceb>i.ueb&&i.veb&&(i.Ceb=0,i.Eeb(i.getAverageFrameRate(),i.getTimeSpentUpdatingTexture(),i.getTimeSpentDrawingScene()))}},this.startUpdateTexture=function(){i.Deb&&(i.Aeb=window.performance.now())},this.endUpdateTexture=function(){i.Aeb<0||i.yeb.push(window.performance.now()-i.Aeb)},this.startDrawScene=function(){i.Deb&&(i.Beb=window.performance.now())},this.endDrawScene=function(){i.Beb<0||i.xeb.push(window.performance.now()-i.Beb)},this.web=[],this.yeb=[],this.xeb=[],this.zeb=-1,this.Aeb=-1,this.Beb=-1,this.teb=t,this.ueb=e,this.veb=[],this.Ceb=0,this.Deb=!1}return t.prototype.enable=function(){this.Deb=!0},t.prototype.disable=function(){this.Deb=!1,this.web=[],this.yeb=[],this.xeb=[],this.zeb=-1,this.Aeb=-1,this.Beb=-1},t.prototype.subscribe=function(t){-1===this.veb.indexOf(t)&&this.veb.push(t)},t.prototype.unsubscribe=function(t){this.veb.indexOf(t)>-1&&this.veb.splice(this.veb.indexOf(t),1)},t.prototype.getAverageFrameRate=function(){return 1/(n.MathUtil.getAverage(this.web)/1e3)},t.prototype.getTimeSpentUpdatingTexture=function(){return n.MathUtil.getSum(this.yeb)/n.MathUtil.getSum(this.web)},t.prototype.getTimeSpentDrawingScene=function(){return n.MathUtil.getSum(this.xeb)/n.MathUtil.getSum(this.web)},t.prototype.destroy=function(){this.disable(),this.veb=null},t.prototype.Eeb=function(t,e,i){for(var n=0,r=this.veb;n<r.length;n++)r[n].onFrameRateAvailable(t,e,i)},t.prototype.Feb=function(){for(var t=0,e=this.web.length-1;e>=0;e--)if((t+=this.web[e])>=this.teb){this.web.splice(0,e+1),this.yeb.splice(0,e+1),this.xeb.splice(0,e+1);break}},t}();e.FrameRateMonitor=r},70415:function(t){t.exports="precision mediump float;\n\nconst int LEFT_EYE = 0;\nconst int RIGHT_EYE = 1;\nconst int CONTENT_TYPE_MONO = 0;\nconst int CONTENT_TYPE_STEREO_SBS = 1;\nconst int CONTENT_TYPE_STEREO_TAB = 2;\nconst float PI = 3.1415926535897932384626433832795;\nconst float TwoPI = 6.283185307179586476925286766559;\n\nuniform int eyeSelector;\nuniform int contentType;\nuniform float videoWidth;\nuniform float videoHeight;\nuniform float contentFieldOfView;\nuniform sampler2D textureUnit;\nvarying vec3 viewingDirection;\n\nfloat restrictedMod(float value, float divisor, float bound) {\n return mod(value, divisor) * (1.0 - (2.0 * bound)) + bound;\n}\n\nvec4 directionToColor(vec3 direction, int eye, int contentType, float contentFieldOfView, float videoWidth, float videoHeight) {\n float eyeOffset = 0.0;\n float textureSizeMultiplier = contentFieldOfView / 180.;\n float theta = atan(direction.x, direction.z * -1.0);\n float verticalSamplingOffset = 1.0 / (2.0 * videoHeight);\n float horizontalSamplingOffset = 1.0 / (2.0 * videoWidth);\n float phi = atan(direction.y * -1.0, length(direction.xz));\n\n float u = mod(theta / (PI * textureSizeMultiplier), 1.0);\n float v = mod(phi / PI + 0.5, 1.0);\n\n if (eye == LEFT_EYE) {\n eyeOffset = 0.0;\n } else if (eye == RIGHT_EYE) {\n eyeOffset = 0.5;\n }\n\n if ((theta + PI) / PI > textureSizeMultiplier) {\n return vec4(0., 0., 0., 1.);\n }\n\n if (contentType == CONTENT_TYPE_STEREO_SBS) {\n u = restrictedMod(theta / (TwoPI * textureSizeMultiplier), 0.5, horizontalSamplingOffset) + eyeOffset;\n } else if (contentType == CONTENT_TYPE_STEREO_TAB) {\n v = restrictedMod(v / 2.0, 0.5, verticalSamplingOffset) + (0.5 - eyeOffset);\n }\n\n return texture2D(textureUnit, vec2(u, v));\n}\nvoid main(void) {\n gl_FragColor = directionToColor(viewingDirection, eyeSelector, contentType, contentFieldOfView, videoWidth, videoHeight);\n}\n"},17913:function(t){t.exports="precision mediump float;\n\nattribute vec2 vertexPosition;\nvarying vec3 viewingDirection;\nuniform mat4 projectionInverse;\nuniform vec2 distortionFovScale;\nuniform vec2 distortionFovOffset;\nuniform float contentWidthDegrees;\nuniform float distortionMaxFovSquared;\nuniform float distortionCoefficients[12];\n\nfloat DistortionFactor(float rSquared) {\n float ret = 0.0;\n rSquared = min(distortionMaxFovSquared, rSquared);\n ret = rSquared * (ret + distortionCoefficients[11]);\n ret = rSquared * (ret + distortionCoefficients[10]);\n ret = rSquared * (ret + distortionCoefficients[9]);\n ret = rSquared * (ret + distortionCoefficients[8]);\n ret = rSquared * (ret + distortionCoefficients[7]);\n ret = rSquared * (ret + distortionCoefficients[6]);\n ret = rSquared * (ret + distortionCoefficients[5]);\n ret = rSquared * (ret + distortionCoefficients[4]);\n ret = rSquared * (ret + distortionCoefficients[3]);\n ret = rSquared * (ret + distortionCoefficients[2]);\n ret = rSquared * (ret + distortionCoefficients[1]);\n ret = rSquared * (ret + distortionCoefficients[0]);\n return ret + 1.0;\n}\n\nvec4 Distort(vec4 point) {\n vec3 pointNdc = point.xyz / point.w;\n vec2 pointUnitSquare = (pointNdc.xy + vec2(1.0)) / 2.0;\n vec2 pointTanAngle = pointUnitSquare * distortionFovScale - distortionFovOffset;\n float radiusSquared = dot(pointTanAngle, pointTanAngle);\n float distortionFactor = DistortionFactor(radiusSquared);\n vec2 distortedPointTanAngle = pointTanAngle * distortionFactor;\n vec2 distortedPointUnitSquare = (distortedPointTanAngle + distortionFovOffset)\n / distortionFovScale;\n vec3 distortedPointNdc = vec3(distortedPointUnitSquare * 2.0 - vec2(1.0), pointNdc.z);\n return vec4(distortedPointNdc, 1.0) * point.w;\n}\n\nvoid main(void) {\n gl_Position = Distort(vec4(vertexPosition, 1.0, 1.0));\n vec4 projectiveDirection = projectionInverse * gl_Position;\n viewingDirection = projectiveDirection.xyz / projectiveDirection.w;\n }\n"}},function(t){return function(){return t(6463)}()}])});
|
|
18
18
|
})();
|