gcg-website/static/aula/app-files/vendor/marzipano.js

23 lines
247 KiB
JavaScript
Raw Normal View History

2020-12-07 19:21:54 +01:00
// Marzipano - a 360° media viewer for the modern web (v0.9.1)
//
// Copyright 2016 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Marzipano=t()}}(function(){var t;return function(){function t(e,r,i){function n(s,a){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var h=new Error("Cannot find module '"+s+"'");throw h.code="MODULE_NOT_FOUND",h}var l=r[s]={exports:{}};e[s][0].call(l.exports,function(t){return n(e[s][1][t]||t)},l,l.exports,t,e,r,i)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s<i.length;s++)n(i[s]);return n}return t}()({1:[function(e,r,i){!function(e,n){"object"==typeof i&&"object"==typeof r?r.exports=n():"function"==typeof t&&t.amd?t([],n):"object"==typeof i?i.bowser=n():e.bowser=n()}(this,function(){return function(t){function e(i){if(r[i])return r[i].exports;var n=r[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,i){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:i})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(e.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var n in t)e.d(i,n,function(e){return t[e]}.bind(null,n));return i},e.n=function(t){var r=t&&t.__esModule?function(){return t["default"]}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=90)}({17:function(t,e,r){"use strict";e.__esModule=!0,e["default"]=void 0;var i=r(18),n=function(){function t(){}return t.getFirstMatch=function(t,e){var r=e.match(t);return r&&r.length>0&&r[1]||""},t.getSecondMatch=function(t,e){var r=e.match(t);return r&&r.length>1&&r[2]||""},t.matchAndReturnConst=function(t,e,r){if(t.test(e))return r},t.getWindowsVersionName=function(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},t.getMacOSVersionName=function(t){var e=t.split(".").splice(0,2).map(function(t){return parseInt(t,10)||0});if(e.push(0),10===e[0])switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},t.getAndroidVersionName=function(t){var e=t.split(".").splice(0,2).map(function(t){return parseInt(t,10)||0});if(e.push(0),!(1===e[0]&&e[1]<5))return 1===e[0]&&e[1]<6?"Cupcake":1===e[0]&&e[1]>=6?"Donut":2===e[0]&&e[1]<2?"Eclair":2===e[0]&&2===e[1]?"Froyo":2===e[0]&&e[1]>2?"Gingerbread":3===e[0]?"Honeycomb":4===e[0]&&e[1]<1?"Ice Cream Sandwich":4===e[0]&&e[1]<4?"Jelly Bean":4===e[0]&&e[1]>=4?"KitKat":5===e[0]?"Lollipop":6===e[0]?"Marshmallow":7===e[0]?"Nougat":8===e[0]?"Oreo":9===e[0]?"Pie":void 0},t.getVersionPrecision=function(t){return t.split(".").length},t.compareVersions=function(e,r,i){void 0===i&&(i=!1);var n=t.getVersionPrecision(e),o=t.getVersionPrecision(r),s=Math.max(n,o),a=0,u=t.map([e,r],function(e){var r=s-t.getVersionPrecision(e),i=e+new Array(r+1).join(".0");return t.map(i.split("."),function(t){return new Array(20-t.length).join("0")+t}).reverse()});for(i&&(a=s-Math.min(n,o)),s-=1;s>=a;){if(u[0][s]>u[1][s])return 1;if(u[0][s]===u[1][s]){if(s===a)return 0;s-=1}else if(u[0][s]<u[1][s])return-1}},t.map=function(t,e){var r,i=[];if(Array.prototype.map)return Array.prototype.map.call(t,e);for(r=0;r<t.length;r+=1)i.push(e(t[
return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],1)}function w(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t[4]=e[4]+r[4],t[5]=e[5]+r[5],t}function M(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t[4]=e[4]-r[4],t[5]=e[5]-r[5],t}function b(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*r,t[5]=e[5]*r,t}function x(t,e,r,i){return t[0]=e[0]+r[0]*i,t[1]=e[1]+r[1]*i,t[2]=e[2]+r[2]*i,t[3]=e[3]+r[3]*i,t[4]=e[4]+r[4]*i,t[5]=e[5]+r[5]*i,t}function E(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]}function T(t,e){var r=t[0],i=t[1],n=t[2],o=t[3],s=t[4],a=t[5],u=e[0],h=e[1],l=e[2],c=e[3],p=e[4],f=e[5];return Math.abs(r-u)<=P.EPSILON*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(i-h)<=P.EPSILON*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(n-l)<=P.EPSILON*Math.max(1,Math.abs(n),Math.abs(l))&&Math.abs(o-c)<=P.EPSILON*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(s-p)<=P.EPSILON*Math.max(1,Math.abs(s),Math.abs(p))&&Math.abs(a-f)<=P.EPSILON*Math.max(1,Math.abs(a),Math.abs(f))}Object.defineProperty(r,"__esModule",{value:!0}),r.create=i,r.clone=n,r.copy=o,r.identity=s,r.fromValues=a,r.set=u,r.invert=h,r.determinant=l,r.multiply=c,r.rotate=p,r.scale=f,r.translate=d,r.fromRotation=m,r.fromScaling=v,r.fromTranslation=_,r.str=y,r.frob=g,r.add=w,r.subtract=M,r.multiplyScalar=b,r.multiplyScalarAndAdd=x,r.exactEquals=E,r.equals=T,r.sub=r.mul=void 0;var P=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,r):{};i.get||i.set?Object.defineProperty(e,r,i):e[r]=t[r]}return e["default"]=t,e}(t("./common.js")),L=c;r.mul=L;var S=M;r.sub=S},{"./common.js":2}],6:[function(t,e,r){"use strict";function i(){var t=new I.ARRAY_TYPE(9);return I.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function n(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function o(t){var e=new I.ARRAY_TYPE(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function a(t,e,r,i,n,o,s,a,u){var h=new I.ARRAY_TYPE(9);return h[0]=t,h[1]=e,h[2]=r,h[3]=i,h[4]=n,h[5]=o,h[6]=s,h[7]=a,h[8]=u,h}function u(t,e,r,i,n,o,s,a,u,h){return t[0]=e,t[1]=r,t[2]=i,t[3]=n,t[4]=o,t[5]=s,t[6]=a,t[7]=u,t[8]=h,t}function h(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function l(t,e){if(t===e){var r=e[1],i=e[2],n=e[5];t[1]=e[3],t[2]=e[6],t[3]=r,t[5]=e[7],t[6]=i,t[7]=n}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function c(t,e){var r=e[0],i=e[1],n=e[2],o=e[3],s=e[4],a=e[5],u=e[6],h=e[7],l=e[8],c=l*s-a*h,p=-l*o+a*u,f=h*o-s*u,d=r*c+i*p+n*f;return d?(d=1/d,t[0]=c*d,t[1]=(-l*i+n*h)*d,t[2]=(a*i-n*s)*d,t[3]=p*d,t[4]=(l*r-n*u)*d,t[5]=(-a*r+n*o)*d,t[6]=f*d,t[7]=(-h*r+i*u)*d,t[8]=(s*r-i*o)*d,t):null}function p(t,e){var r=e[0],i=e[1],n=e[2],o=e[3],s=e[4],a=e[5],u=e[6],h=e[7],l=e[8];return t[0]=s*l-a*h,t[1]=n*h-i*l,t[2]=i*a-n*s,t[3]=a*u-o*l,t[4]=r*l-n*u,t[5]=n*o-r*a,t[6]=o*h-s*u,t[7]=i*u-r*h,t[8]=r*s-i*o,t}function f(t){var e=t[0],r=t[1],i=t[2],n=t[3],o=t[4],s=t[5],a=t[6],u=t[7],h=t[8];return e*(h*o-s*u)+r*(-h*n+s*a)+i*(u*n-o*a)}function d(t,e,r){var i=e[0],n=e[1],o=e[2],s=e[3],a=e[4],u=e[5],h=e[6],l=e[7],c=e[8],p=r[0],f=r[1],d=r[2],m=r[3],v=r[4],_=r[5],y=r[6],g=r[7],w=r[8];return t[0]=p*i+f*s+d*h,t[1]=p*n+f*a+d*l,t[2]=p*o+f*u+d*c,t[3]=m*i+v*s+_*h,t[4]=m*n+v*a+_*l,t[5]=m*o+v*u+_*c,t[6]=y*i+g*s+w*h,t[7]=y*n+g*a+w*l,t[8]=y*o+g*u+w*c,t}function m(t,e,r){var i=e[0],n=e[1],o=e[2],s=e[3],a=e[4],u=e[5],h=e[6],l=e[7],c=e[8],p=r[0],f=r[1];return t[0]=i,t[1]=n,t[2]=o,t[3]=s,t[4]=a,t[5]=u,t[6]=p*i+f*s+h,t[7]=p*n+f*a+l,t[8]=p*o+f*u+c,t}function v(t,e,r){var i=e[0],n=e[1],o=e[2],s=e[3],a=e[4],u=e[5],h=
var i=r[0],n=r[1],o=r[2],s=r[3],a=e[0],u=e[1],h=e[2],l=e[3];return t[0]=a*s+l*i+u*o-h*n,t[1]=u*s+l*n+h*i-a*o,t[2]=h*s+l*o+a*n-u*i,t[3]=l*s-a*i-u*n-h*o,a=e[4],u=e[5],h=e[6],l=e[7],t[4]=a*s+l*i+u*o-h*n,t[5]=u*s+l*n+h*i-a*o,t[6]=h*s+l*o+a*n-u*i,t[7]=l*s-a*i-u*n-h*o,t}function x(t,e,r){var i=e[0],n=e[1],o=e[2],s=e[3],a=r[0],u=r[1],h=r[2],l=r[3];return t[0]=i*l+s*a+n*h-o*u,t[1]=n*l+s*u+o*a-i*h,t[2]=o*l+s*h+i*u-n*a,t[3]=s*l-i*a-n*u-o*h,a=r[4],u=r[5],h=r[6],l=r[7],t[4]=i*l+s*a+n*h-o*u,t[5]=n*l+s*u+o*a-i*h,t[6]=o*l+s*h+i*u-n*a,t[7]=s*l-i*a-n*u-o*h,t}function E(t,e,r,i){if(Math.abs(i)<z.EPSILON)return p(t,e);var n=Math.hypot(r[0],r[1],r[2]);i*=.5;var o=Math.sin(i),s=o*r[0]/n,a=o*r[1]/n,u=o*r[2]/n,h=Math.cos(i),l=e[0],c=e[1],f=e[2],d=e[3];t[0]=l*h+d*s+c*u-f*a,t[1]=c*h+d*a+f*s-l*u,t[2]=f*h+d*u+l*a-c*s,t[3]=d*h-l*s-c*a-f*u;var m=e[4],v=e[5],_=e[6],y=e[7];return t[4]=m*h+y*s+v*u-_*a,t[5]=v*h+y*a+_*s-m*u,t[6]=_*h+y*u+m*a-v*s,t[7]=y*h-m*s-v*a-_*u,t}function T(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t[4]=e[4]+r[4],t[5]=e[5]+r[5],t[6]=e[6]+r[6],t[7]=e[7]+r[7],t}function P(t,e,r){var i=e[0],n=e[1],o=e[2],s=e[3],a=r[4],u=r[5],h=r[6],l=r[7],c=e[4],p=e[5],f=e[6],d=e[7],m=r[0],v=r[1],_=r[2],y=r[3];return t[0]=i*y+s*m+n*_-o*v,t[1]=n*y+s*v+o*m-i*_,t[2]=o*y+s*_+i*v-n*m,t[3]=s*y-i*m-n*v-o*_,t[4]=i*l+s*a+n*h-o*u+c*y+d*m+p*_-f*v,t[5]=n*l+s*u+o*a-i*h+p*y+d*v+f*m-c*_,t[6]=o*l+s*h+i*u-n*a+f*y+d*_+c*v-p*m,t[7]=s*l-i*a-n*u-o*h+d*y-c*m-p*v-f*_,t}function L(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t}function S(t,e,r,i){var n=1-i;return B(e,r)<0&&(i=-i),t[0]=e[0]*n+r[0]*i,t[1]=e[1]*n+r[1]*i,t[2]=e[2]*n+r[2]*i,t[3]=e[3]*n+r[3]*i,t[4]=e[4]*n+r[4]*i,t[5]=e[5]*n+r[5]*i,t[6]=e[6]*n+r[6]*i,t[7]=e[7]*n+r[7]*i,t}function A(t,e){var r=W(e);return t[0]=-e[0]/r,t[1]=-e[1]/r,t[2]=-e[2]/r,t[3]=e[3]/r,t[4]=-e[4]/r,t[5]=-e[5]/r,t[6]=-e[6]/r,t[7]=e[7]/r,t}function R(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=e[7],t}function C(t,e){var r=W(e);if(r>0){r=Math.sqrt(r);var i=e[0]/r,n=e[1]/r,o=e[2]/r,s=e[3]/r,a=e[4],u=e[5],h=e[6],l=e[7],c=i*a+n*u+o*h+s*l;t[0]=i,t[1]=n,t[2]=o,t[3]=s,t[4]=(a-i*c)/r,t[5]=(u-n*c)/r,t[6]=(h-o*c)/r,t[7]=(l-s*c)/r}return t}function O(t){return"quat2("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+")"}function I(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]}function F(t,e){var r=t[0],i=t[1],n=t[2],o=t[3],s=t[4],a=t[5],u=t[6],h=t[7],l=e[0],c=e[1],p=e[2],f=e[3],d=e[4],m=e[5],v=e[6],_=e[7];return Math.abs(r-l)<=z.EPSILON*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(i-c)<=z.EPSILON*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(n-p)<=z.EPSILON*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(o-f)<=z.EPSILON*Math.max(1,Math.abs(o),Math.abs(f))&&Math.abs(s-d)<=z.EPSILON*Math.max(1,Math.abs(s),Math.abs(d))&&Math.abs(a-m)<=z.EPSILON*Math.max(1,Math.abs(a),Math.abs(m))&&Math.abs(u-v)<=z.EPSILON*Math.max(1,Math.abs(u),Math.abs(v))&&Math.abs(h-_)<=z.EPSILON*Math.max(1,Math.abs(h),Math.abs(_))}Object.defineProperty(r,"__esModule",{value:!0}),r.create=n,r.clone=o,r.fromValues=s,r.fromRotationTranslationValues=a,r.fromRotationTranslation=u,r.fromTranslation=h,r.fromRotation=l,r.fromMat4=c,r.copy=p,r.identity=f,r.set=d,r.getDual=m,r.setDual=v,r.getTranslation=_,r.translate=y,r.rotateX=g,r.rotateY=w,r.rotateZ=M,r.rotateByQuatAppend=b,r.rotateByQuatPrepend=x,r.rotateAroundAxis=E,r.add=T,r.multiply=P,r.scale=L,r.lerp=S,r.invert=A,r.conjugate=R,r.normalize=C,r.str=O,r.exactEquals=I,r.equals=F,r.sqrLen=r.squaredLength=r.len=r.length=r.dot=r.mul=r.setReal=r.getReal=void 0;var z=i(t("./common.js")),D=i(t("./quat.js")),k=i(t("./mat4.js")),N=D.copy;r.getReal=N;var j=D.copy;r.setReal=j;var H=P;r.mul=H;var B=D.dot;r.dot=B;var Y=D.length;r.length=Y;var q=Y;r.len=q;var W=D.squaredLength;r.squaredLength=W;var V=W;r.sqrLen=V},{"./common.js":2,"./mat4.js":7,"./quat.js":8}],10:[function(t,e,r){"use strict";function i(){var t=new H.ARRAY_TY
this.state=oe,this.tryEmit()},e.time,this);else if(t.eventType&Et)return oe;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===oe&&(t&&t.eventType&Et?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=mt(),this.manager.emit(this.options.event,this._input)))}}),c(it,J,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[$t]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&re)}}),c(nt,J,{defaults:{event:"swipe",threshold:10,velocity:.65,direction:Ct|Ot,pointers:1},getTouchAction:function(){return tt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,r=this.options.direction;return r&(Ct|Ot)?e=t.velocity:r&Ct?e=t.velocityX:r&Ot&&(e=t.velocityY),this._super.attrTest.call(this,t)&&r&t.direction&&t.distance>this.options.threshold&&dt(e)>this.options.velocity&&t.eventType&Et},emit:function(t){var e=Q(t.direction);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),c(ot,Z,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:2,posThreshold:10},getTouchAction:function(){return[Qt]},process:function(t){var e=this.options,r=t.pointers.length===e.pointers,i=t.distance<e.threshold,n=t.deltaTime<e.time;if(this.reset(),t.eventType&bt&&0===this.count)return this.failTimeout();if(i&&n&&r){if(t.eventType!=Et)return this.failTimeout();var o=!this.pTime||t.timeStamp-this.pTime<e.interval,a=!this.pCenter||D(this.pCenter,t.center)<e.posThreshold;this.pTime=t.timeStamp,this.pCenter=t.center,a&&o?this.count+=1:this.count=1,this._input=t;if(0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=s(function(){this.state=oe,this.tryEmit()},e.interval,this),re):oe}return 32},failTimeout:function(){return this._timer=s(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==oe&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),st.VERSION="2.0.4",st.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[it,{enable:!1}],[et,{enable:!1},["rotate"]],[nt,{direction:Ct}],[tt,{direction:Ct},["swipe"]],[ot],[ot,{event:"doubletap",taps:2},["tap"]],[rt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};at.prototype={set:function(t){return h(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){this.touchAction.preventDefaults(t);var r,i=this.recognizers,n=e.curRecognizer;(!n||n&&n.state&oe)&&(n=e.curRecognizer=null);for(var o=0;o<i.length;)r=i[o],2===e.stopped||n&&r!=n&&!r.canRecognizeWith(n)?r.reset():r.recognize(t),!n&&r.state&(re|ie|ne)&&(n=e.curRecognizer=r),o++}},get:function(t){if(t instanceof Z)return t;for(var e=this.recognizers,r=0;r<e.length;r++)if(e[r].options.event==t)return e[r];return null},add:function(t){if(a(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(a(t,"remove",this))return this;var e=this.recognizers;return t=this.get(t),e.splice(w(e,t),1),this.touchAction.update(),this},on:function(t,e){var r=this.handlers;return u(g(t),function(t){r[t]=r[t]||[],r[t].push(e)}),this},off:function(t,e){var r=this.handlers;return u(g(t),function(t){e?r[t].splice(w(r[t],e),1):delete r[t]}),this},emit:function(t,e){this.options.domEvents&&ht(t,e);var r=this.handlers[t]&&this.handlers[t].slice();if(r&&r.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var i=0;i<r.length;)r[i](e),i++}},destroy:function(){this.element&&ut(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},h(st,{INPUT_START:bt,INPUT_MOVE:xt,INPU
},i.prototype.destroyAllScenes=function(){for(;this._scenes.length>0;)this.destroyScene(this._scenes[0])},i.prototype.hasScene=function(t){return this._scenes.indexOf(t)>=0},i.prototype.listScenes=function(){return[].concat(this._scenes)},i.prototype.scene=function(){return this._currentScene},i.prototype.view=function(){var t=this._currentScene;return t?t.view():null},i.prototype.lookTo=function(t,e,r){var i=this._currentScene;i&&i.lookTo(t,e,r)},i.prototype.startMovement=function(t,e){var r=this._currentScene;r&&r.startMovement(t,e)},i.prototype.stopMovement=function(){var t=this._currentScene;t&&t.stopMovement()},i.prototype.movement=function(){var t=this._currentScene;if(t)return t.movement()},i.prototype.setIdleMovement=function(t,e){this._idleTimer.setDuration(t),this._idleMovement=e},i.prototype.breakIdleMovement=function(){this.stopMovement(),this._resetIdleTimer()},i.prototype._resetIdleTimer=function(){this._idleTimer.start()},i.prototype._triggerIdleTimer=function(){var t=this._idleMovement;t&&this.startMovement(t)};i.prototype.switchScene=function(t,e,r){function i(e){f(e,t,u)}function o(){if(s._replacedScene){s._removeSceneEventListeners(s._replacedScene),h=s._replacedScene.listLayers();for(var t=0;t<h.length;t++)s._removeLayerFromStage(h[t]);s._replacedScene=null}s._cancelCurrentTween=null,r()}var s=this;e=e||{},r=r||x;var a=this._stage,u=this._currentScene;if(u===t)return void r();if(this._scenes.indexOf(t)<0)throw new Error("No such scene in viewer");this._cancelCurrentTween&&(this._cancelCurrentTween(),this._cancelCurrentTween=null);var h=u?u.listLayers():[],l=t.listLayers(),c=a.listLayers();if(u&&(c.length!==h.length||c.length>1&&c[0]!=h[0]))throw new Error("Stage not in sync with viewer");for(var p=null!=e.transitionDuration?e.transitionDuration:1e3,f=null!=e.transitionUpdate?e.transitionUpdate:n,d=0;d<l.length;d++)this._addLayerToStage(l[d]);this._cancelCurrentTween=b(p,i,o),this._currentScene=t,this._replacedScene=u,this.emit("sceneChange"),this.emit("viewChange"),this._addSceneEventListeners(t)},e.exports=i},{"./RenderLoop":19,"./Scene":20,"./Timer":23,"./controls/ControlCursor":37,"./controls/Controls":38,"./controls/HammerGestures":42,"./controls/registerDefaultControls":49,"./renderers/registerDefaultRenderers":70,"./stages/Css":77,"./stages/Flash":78,"./stages/WebGl":81,"./util/clearOwnProperties":91,"./util/dom":100,"./util/noop":107,"./util/tween":115,bowser:1,"minimal-event-emitter":14}],25:[function(t,e,r){"use strict";function i(t){this.constructor.super_.call(this,t),this._timestamp=0}var n=t("./Static"),o=t("../util/inherits"),s=t("minimal-event-emitter"),a=t("../util/clearOwnProperties");o(i,n),s(i),i.prototype.destroy=function(){a(this)},i.prototype.timestamp=function(){return this._timestamp},i.prototype.isDynamic=function(){return!0},i.prototype.markDirty=function(){this._timestamp++,this.emit("change")},e.exports=i},{"../util/clearOwnProperties":91,"../util/inherits":104,"./Static":27,"minimal-event-emitter":14}],26:[function(t,e,r){"use strict";function i(t,e){this._flashElement=t,this._imageId=e}var n=t("minimal-event-emitter"),o=t("../util/clearOwnProperties");n(i),i.prototype.destroy=function(){this._flashElement.unloadImage(this._imageId),o(this)},i.prototype.element=function(){return this._imageId},i.prototype.width=function(){return 0},i.prototype.height=function(){return 0},i.prototype.timestamp=function(){return 0},i.prototype.isDynamic=function(){return!1},e.exports=i},{"../util/clearOwnProperties":91,"minimal-event-emitter":14}],27:[function(t,e,r){"use strict";function i(t){var e=!1;for(var r in a)if(n[r]&&t instanceof n[r]){e=!0,this._widthProp=a[r][0],this._heightProp=a[r][1];break}if(!e)throw new Error("Unsupported pixel source");this._element=t}var n=t("../util/global"),o=t("minimal-event-emitter"),s=t("../util/clearOwnProperties"),a={HTMLImageElement:["naturalWidth","naturalHeight"],HTMLCanvasElement:["width","height"],ImageBitmap:["width","height"]};o(i),i.prototype.destroy=function(){s(this)},i.prototype.element=function(){return this._element},i.prototype.width=f
t.keyCode===this._keyCode&&(this._pressing&&(this._dynamics.friction=this._friction,this.emit("parameterDynamics",this._parameter,this._dynamics),this.emit("inactive")),this._pressing=!1)},i.prototype._handleBlur=function(){this._dynamics.velocity=0,this.emit("parameterDynamics",this._parameter,this._dynamics),this.emit("inactive"),this._pressing=!1},e.exports=i},{"../util/clearOwnProperties":91,"./Dynamics":40,"minimal-event-emitter":14}],44:[function(t,e,r){"use strict";function i(t,e,r){this._hammer=s.get(t,e),this._lastEvent=null,this._active=!1,this._dynamics=new o,this._hammer.on("pinchstart",this._handleStart.bind(this)),this._hammer.on("pinch",this._handleEvent.bind(this)),this._hammer.on("pinchend",this._handleEnd.bind(this)),this._hammer.on("pinchcancel",this._handleEnd.bind(this))}var n=t("minimal-event-emitter"),o=t("./Dynamics"),s=t("./HammerGestures"),a=t("../util/clearOwnProperties");n(i),i.prototype.destroy=function(){this._hammer.release(),a(this)},i.prototype._handleStart=function(){this._active||(this._active=!0,this.emit("active"))},i.prototype._handleEnd=function(){this._lastEvent=null,this._active&&(this._active=!1,this.emit("inactive"))},i.prototype._handleEvent=function(t){var e=t.scale;this._lastEvent&&(e/=this._lastEvent.scale),this._dynamics.offset=-1*(e-1),this.emit("parameterDynamics","zoom",this._dynamics),this._lastEvent=t},e.exports=i},{"../util/clearOwnProperties":91,"./Dynamics":40,"./HammerGestures":42,"minimal-event-emitter":14}],45:[function(t,e,r){"use strict";function i(t,e,r){this._element=t,this._opts=a(r||{},l),this._active=!1,this._hammer=s.get(t,e),this._dynamics={x:new o,y:new o},this._hammer.on("panstart",this._handleStart.bind(this)),this._hammer.on("panmove",this._handleMove.bind(this)),this._hammer.on("panend",this._handleRelease.bind(this)),this._hammer.on("pancancel",this._handleRelease.bind(this))}var n=t("minimal-event-emitter"),o=t("./Dynamics"),s=t("./HammerGestures"),a=t("../util/defaults"),u=t("./util").maxFriction,h=t("../util/clearOwnProperties"),l={speed:8,friction:6,maxFrictionTime:.3};n(i),i.prototype.destroy=function(){this._hammer.release(),h(this)},i.prototype._handleStart=function(t){t.preventDefault(),this._active||(this._active=!0,this.emit("active"))},i.prototype._handleMove=function(t){t.preventDefault(),this._updateDynamics(t,!1)},i.prototype._handleRelease=function(t){t.preventDefault(),this._updateDynamics(t,!0),this._active&&(this._active=!1,this.emit("inactive"))};var c=[null,null];i.prototype._updateDynamics=function(t,e){var r=this._element.getBoundingClientRect(),i=r.right-r.left,n=r.bottom-r.top,o=Math.max(i,n),s=t.deltaX/o*this._opts.speed,a=t.deltaY/o*this._opts.speed;this._dynamics.x.reset(),this._dynamics.y.reset(),this._dynamics.x.velocity=s,this._dynamics.y.velocity=a,e&&(u(this._opts.friction,this._dynamics.x.velocity,this._dynamics.y.velocity,this._opts.maxFrictionTime,c),this._dynamics.x.friction=c[0],this._dynamics.y.friction=c[1]),this.emit("parameterDynamics","x",this._dynamics.x),this.emit("parameterDynamics","y",this._dynamics.y)},e.exports=i},{"../util/clearOwnProperties":91,"../util/defaults":96,"./Dynamics":40,"./HammerGestures":42,"./util":50,"minimal-event-emitter":14}],46:[function(t,e,r){"use strict";function i(t,e){this._opts=u(e||{},l),this._dynamics=new s,this._eventList=[];var r=this._opts.frictionTime?this.withSmoothing:this.withoutSmoothing;this._wheelListener=new a(t,r.bind(this))}function n(t){var e=1==t.deltaMode?20:1;return t.deltaY*e}var o=t("minimal-event-emitter"),s=t("./Dynamics"),a=t("./WheelListener"),u=t("../util/defaults"),h=t("../util/clearOwnProperties"),l={frictionTime:.2,zoomDelta:.001};o(i),i.prototype.destroy=function(){this._wheelListener.destroy(),h(this)},i.prototype.withoutSmoothing=function(t){this._dynamics.offset=n(t)*this._opts.zoomDelta,this.emit("parameterDynamics","zoom",this._dynamics),t.preventDefault(),this.emit("active"),this.emit("inactive")},i.prototype.withSmoothing=function(t){var e=t.timeStamp;for(this._eventList.push(t);this._eventList[0].timeStamp<e-1e3*this._opts.frictionTime
;this._oldTileList=this._newTileList,this._newTileList=y},e.exports=n},{"../collections/Map":31,"../util/clearOwnProperties":91,"../util/decimal":95,"../util/dom":100}],60:[function(t,e,r){"use strict";function i(t,e){this.constructor.super_.call(this,t,e,n)}var n=t("../geometries/Cube").Tile,o=t("./CssBase"),s=t("../util/decimal");t("../util/inherits")(i,o),i.prototype.calculateTransform=function(t,e,r){var i=this._browserQuirks.padSize,n=this._browserQuirks.reverseLevelDepth,o=this._browserQuirks.perspectiveNudge,a="",u=n?256-t.z:t.levelWidth(),h=r.size(),l=h.width,c=h.height;a+="translate3d("+s(l/2)+"px, "+s(c/2)+"px, 0px) ";var p=.5*c/Math.tan(r.fov()/2),f=p+o;a+="perspective("+s(p)+"px) translateZ("+s(f)+"px) ";var d=-r.roll(),m=-r.pitch(),v=r.yaw();a+="rotateZ("+s(d)+"rad) rotateX("+s(m)+"rad) rotateY("+s(v)+"rad) ";var _=-t.rotX(),y=t.rotY();a+="rotateX("+s(_)+"rad) rotateY("+s(y)+"rad) ";var g=t.centerX()-t.scaleX()/2,w=-(t.centerY()+t.scaleY()/2),M=g*u,b=w*u,x=-u/2;if(a+="translate3d("+s(M)+"px, "+s(b)+"px, "+s(x)+"px) ",n){var E=u*t.scaleX()/t.width(),T=u*t.scaleY()/t.height();a+="scale("+s(E)+", "+s(T)+") "}var P=t.padLeft()?i:0,L=t.padTop()?i:0;return 0===P&&0===L||(a+="translate3d("+s(-P)+"px, "+s(-L)+"px, 0) "),a},e.exports=i},{"../geometries/Cube":51,"../util/decimal":95,"../util/inherits":104,"./CssBase":59}],61:[function(t,e,r){"use strict";function i(t,e){this.constructor.super_.call(this,t,e,n)}var n=t("../geometries/Flat").Tile,o=t("./CssBase"),s=t("../util/decimal");t("../util/inherits")(i,o),i.prototype.calculateTransform=function(t,e,r){var i=this._browserQuirks.padSize,n="",o=r.width(),a=r.height();n+="translateX("+s(o/2)+"px) translateY("+s(a/2)+"px) ";var u=o/r._zoomX(),h=a/r._zoomY(),l=t.centerX()-t.scaleX()/2+.5,c=.5-t.centerY()-t.scaleY()/2,p=l*u,f=c*h;n+="translateX("+s(p)+"px) translateY("+s(f)+"px) ";var d=-r.x()*u,m=-r.y()*h;n+="translateX("+s(d)+"px) translateY("+s(m)+"px) ";var v=t.padLeft()?i:0,_=t.padTop()?i:0;0===v&&0===_||(n+="translateX("+s(-v)+"px) translateY("+s(-_)+"px) ");var y=u/t.levelWidth(),g=h/t.levelHeight();return n+="scale("+s(y)+", "+s(g)+") "},e.exports=i},{"../geometries/Flat":53,"../util/decimal":95,"../util/inherits":104,"./CssBase":59}],62:[function(t,e,r){"use strict";function i(t,e){return t.cmp(e)}function n(t,e,r,i){this._flashElement=t,this._layerId=e,this._quirks=r,this._tileList=[],this._textureMap=new o,this._layerCreated=!1}var o=t("../collections/Map"),s=t("../util/clearOwnProperties");n.prototype.destroy=function(){this._layerCreated&&this._flashElement.destroyLayer(this._layerId),s(this)},n.prototype.startLayer=function(t,e){this._flashElement.isReady&&this._flashElement.isReady()&&(this._layerCreated||(this._flashElement.createLayer(this._layerId),this._layerCreated=!0),this._tileList.length=0,this._textureMap.clear())},n.prototype.renderTile=function(t,e){this._tileList.push(t),this._textureMap.set(t,e)},n.prototype.endLayer=function(t,e){if(this._flashElement.isReady&&this._flashElement.isReady()){this._tileList.sort(i),this._renderOnFlash(t,e)}},e.exports=n},{"../collections/Map":31,"../util/clearOwnProperties":91}],63:[function(t,e,r){"use strict";function i(t,e,r){this.constructor.super_.call(this,t,e,r,o),this._flashTileList=[]}var n=t("./FlashBase"),o=t("../geometries/Cube").Tile,s=t("../util/inherits"),a=t("../util/radToDeg");s(i,n),i.prototype._renderOnFlash=function(t,e){var r=this._flashElement,i=this._layerId,n=this._quirks.padSize,o=this._tileList,s=this._textureMap,u=this._flashTileList;u.length=0;for(var h=0;h<o.length;h++){var l=o[h],c=s.get(l);if(!c)throw new Error("Rendering tile with missing texture");var p=l.padTop()?n:0,f=l.padBottom()?n:0,d=l.padLeft()?n:0,m=l.padRight()?n:0;u.push({textureId:c._textureId,face:l.face,width:l.width(),height:l.height(),centerX:l.centerX(),centerY:l.centerY(),rotX:a(l.rotX()),rotY:a(l.rotY()),levelSize:l.levelWidth(),padTop:p,padBottom:f,padLeft:d,padRight:m})}var v=this._flashElement.clientWidth,_=this._flashElement.clientHeight,y=v*e.x,g=_*e.y,w=v*e.width,M=_*e.height,b=1,x=t.effects();x&&null!=x
videoUseTexImage2D:h.chrome};l(n,s),n.prototype.destroy=function(){this._domElement.removeEventListener("webglcontextlost",this._handleContextLoss),this.constructor.super_.prototype.destroy.call(this)},n.supported=function(){return u()},n.prototype.domElement=function(){return this._domElement},n.prototype.webGlContext=function(){return this._gl},n.prototype.setSizeForType=function(){var t=c();this._domElement.width=t*this._width,this._domElement.height=t*this._height},n.prototype.loadImage=function(t,e,r){return this._loader.loadImage(t,e,r)},n.prototype.maxTextureSize=function(){return this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE)},n.prototype.validateLayer=function(t){var e=t.geometry().maxTileSize(),r=this.maxTextureSize();if(e>r)throw new Error("Layer has level with tile size larger than maximum texture size ("+e+" vs. "+r+")")},n.prototype.createRenderer=function(t){for(var e=this._rendererInstances,r=0;r<e.length;r++)if(e[r]instanceof t)return e[r];var i=new t(this._gl);return e.push(i),i},n.prototype.destroyRenderer=function(t){var e=this._rendererInstances;if(this._renderers.indexOf(t)<0){t.destroy();var r=e.indexOf(t);r>=0&&e.splice(r,1)}},n.prototype.startFrame=function(){var t=this._gl;if(!t)throw new Error("Bad WebGL context - maybe context was lost?");t.viewport(0,0,t.drawingBufferWidth,t.drawingBufferHeight),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),t.enable(t.DEPTH_TEST),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA)},n.prototype.endFrame=function(){},n.prototype.takeSnapshot=function(t){"object"==typeof t&&null!=t||(t={});var e=t.quality;if(void 0===e&&(e=75),"number"!=typeof e||e<0||e>100)throw new Error("WebGLStage: Snapshot quality needs to be a number between 0 and 100");return this.render(),this._domElement.toDataURL("image/jpeg",e/100)},n.type=n.prototype.type="webgl",o.prototype.refresh=function(t,e){var r,i=this._gl,n=this._stage,o=e.timestamp();if(o!==this._timestamp){var s=e.element(),a=e.width(),u=e.height();if(a!==this._width||u!==this._height){var h=n.maxTextureSize();if(a>h)throw new Error("Texture width larger than max size ("+a+" vs. "+h+")");if(u>h)throw new Error("Texture height larger than max size ("+u+" vs. "+h+")");this._texture&&i.deleteTexture(r),r=this._texture=i.createTexture(),i.bindTexture(i.TEXTURE_2D,r),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!0),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,s)}else r=this._texture,i.bindTexture(i.TEXTURE_2D,r),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!0),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),s instanceof HTMLVideoElement&&_.videoUseTexImage2D?i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,s):i.texSubImage2D(i.TEXTURE_2D,0,0,0,i.RGBA,i.UNSIGNED_BYTE,s);n._generateMipmaps&&p(a)&&p(u)?(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR_MIPMAP_LINEAR),i.generateMipmap(i.TEXTURE_2D)):(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR)),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.bindTexture(i.TEXTURE_2D,null),this._timestamp=o,this._width=a,this._height=u}},o.prototype.destroy=function(){this._texture&&this._gl.deleteTexture(this._texture),m(this)},n.TextureClass=n.prototype.TextureClass=o,e.exports=n},{"../loaders/HtmlImage":58,"../support/WebGl":84,"../util/clearOwnProperties":91,"../util/dom":100,"../util/inherits":104,"../util/ispot":105,"../util/pixelRatio":110,"./Stage":80,bowser:1}],82:[function(t,e,r){"use strict";function i(){var t=s("perspective"),e=document.createElement("div"),r="undefined"!=typeof e.style[t];if(r&&"WebkitPerspective"===t){var i="__marzipano_test_css3d_support__",n=document.createElement("style");n.textContent="@media(-webkit-transform-3d){#"+i+"{height: 3px;})",document.getElementsByTagName("head")[0].appendChild(n),e.id=i,document.body.appendChild(e),r=e.offsetHeight>0,n.parentNo