text: (function() {
    var root = this;
    var g,aa=[];function n(a){this.M="";this.Gc=this.vb=this.wb=null;this.fb=!0;this.he=this.ff=!1;this.Wf=null;this.Wa=a||"BaseObject"}n.prototype.constructor=n;function ba(a){if("string"!==typeof a.M||""===a.M)a.M=p.wh();p.register(a);null!==a.wb&&("string"===typeof a.wb&&(a.wb=[a.wb]),!0===Array.isArray(a.wb)&&ca.register(a))}function da(a){""!==a.M&&!0===p.gb(a.M)&&p.unregister(a)}
  function fa(a,b,d){d=d||"log";console[d].apply(console,!0===q.chrome||!0===q.firefox?["%c[ForgeJS]%c FORGE."+a.Wa+": "+b+" %c(@"+window.performance.now().toFixed(2)+"ms)","background: #e2edff; color: #4286f4; font-weight: 700;","font-weight: 400;","color: #AAA;"]:["[ForgeJS] FORGE."+a.Wa+": "+b+" (@"+window.performance.now().toFixed(2)+"ms)"]);if("object"===typeof b&&null!==b)console[d](b)}
  n.prototype.log=function(a){if(!0===window.FORGE.DEBUG||!0===window.FORGE[this.Wa].DEBUG||!0===this.ff)fa(this,a,"log"),null===this.Wf&&(this.Wf=[]),this.Wf.push(a)};n.prototype.warn=function(a){!0!==window.FORGE.WARNING&&!0!==window.FORGE[this.Wa].WARNING&&!0!==this.he||fa(this,a,"warn")};n.prototype.destroy=function(){!1!==this.fb&&(da(this),null!==this.Gc&&(this.Gc.D(),this.Gc.destroy(),this.Gc=null),this.vb=null,this.fb=!1)};Object.defineProperty(n.prototype,"className",{get:function(){return this.Wa}});
  Object.defineProperty(n.prototype,"uid",{get:function(){return this.M}});Object.defineProperty(n.prototype,"tags",{get:function(){return this.wb}});Object.defineProperty(n.prototype,"alive",{get:function(){return this.fb}});Object.defineProperty(n.prototype,"data",{get:function(){return this.vb},set:function(a){this.vb=a}});
  Object.defineProperty(n.prototype,"debug",{get:function(){return this.ff},set:function(a){this.ff=!!a;!0===this.ff&&(console.log("Enabling debug for a FORGE."+this.Wa+" instance :"),console.log(this))}});Object.defineProperty(n.prototype,"warning",{get:function(){return this.he},set:function(a){this.he=!!a;!0===this.he&&(console.log("Enabling warning for a FORGE."+this.Wa+" instance :"),console.log(this))}});
  Object.defineProperty(n.prototype,"onDestroy",{get:function(){null===this.Gc&&(this.Gc=new r(this));return this.Gc}});
  function u(a,b,d){n.call(this,"Viewer");this.m=a;this.ka=b;this.u=this.R=this.V=this.A=this.Tb=this.H=this.Da=this.qc=this.na=this.U=this.ga=this.Sb=this.X=this.oa=this.O=this.Z=this.aa=this.C=this.S=this.o=this.ha=this.Ca=this.K=this.ja=this.J=this.B=this.c=this.pa=this.ea=this.f=null;this.la=this.ca=!1;this.N=this.G=this.F=this.I=this.W=null;this.i=d||null;window.setTimeout(this.Cn.bind(this),0)}u.prototype=Object.create(n.prototype);u.prototype.constructor=u;
  var ga={background:"#000",autoResume:!0,autoPause:!0,webgl:{antialias:!0,alpha:!0,premultipliedAlpha:!1,stencil:!1}};g=u.prototype;
  g.Cn=function(a){if(!1!==this.fb){this.M="FORGE-instance-"+String(aa.length);aa.push(this.M);ba(this);this.ea=new ha(this);"string"===typeof this.m&&""!==this.m&&(this.m=document.getElementById(this.m));if("undefined"===typeof this.m||null===this.m||!1===ia.Bh(this.m))throw"$_Viewer.boot : Viewer parent is invalid";this.pa=document.createElement("div");this.pa.style.width="100%";this.pa.style.height="100%";this.pa.style.position="relative";this.m.appendChild(this.pa);this.c=new w(this,null,null,this.pa);
  this.c.id="FORGE-main-container-"+this.M;this.B=new w(this);this.B.id="FORGE-canvas-container-"+this.M;this.c.index=0;this.B.Xb(!0);this.c.vc(this.B);this.J=new w(this);this.J.id="FORGE-dom-hotspot-container-"+this.M;this.c.index=0;this.J.Xb(!0);this.c.vc(this.J);this.ja=document.createElement("style");this.ja.type="text/css";document.head.appendChild(this.ja);this.K=new w(this);this.K.id="FORGE-plugin-container-"+this.M;this.c.index=0;this.K.Xb(!0);this.c.vc(this.K);this.Ca=new ja(this);this.Ca.Xb(!0);
  this.B.vc(this.Ca);this.ha=new ka(this);this.A=new la(this);this.o=new x(this);this.Tb=new ma(this);this.R=new na(this);this.X=new y(this);this.Sb=new oa(this);this.u=new z(this);this.O=new pa(this);this.S=new A(this);this.H=new qa(this);this.C=new ra(this);this.aa=new sa(this);this.Z=new ta(this);this.oa=new ua(this);this.na=new va(this);this.qc=new wa(this);this.Da=new xa(this);this.U=new ya(this);this.ga=new za(this);this.V=new Aa(this);this.ha.boot();this.o.boot();this.Tb.boot();this.X.boot();
  this.S.boot();this.H.boot();this.C.boot();"function"===typeof a&&a.call();null!==this.i&&"function"===typeof this.i.boot&&this.i.boot.call();this.la=!0;null!==this.W&&this.W.D();a=this.ka;"string"===typeof a?this.ga.json(this.M+"-configuration",a,this.Co,this):null!==a&&"object"===typeof a&&Ba(this,a)}};g.Co=function(a){a=this.U.get(B.JSON,a.key).data;Ba(this,a)};
  function Ba(a,b){a.ka=b;a.f=D.ta(ga,b.viewer);null!==a.G&&a.G.D();"undefined"!==typeof b.i18n&&a.R.ia(b.i18n);a.Sb.ia(b.history);"undefined"!==typeof b.audio&&a.o.ia(b.audio);"undefined"!==typeof b.playlists&&a.S.ia(b.playlists);"undefined"!==typeof b.actions&&a.aa.ia(b.actions);"undefined"!==typeof b.director&&a.Z.load(b.director);"undefined"!==typeof b.hotspots&&a.C.il(b.hotspots);"undefined"!==typeof b.postProcessing&&a.oa.ia(b.postProcessing);"undefined"!==typeof b.plugins&&a.H.ia(b.plugins);
  a.O.ia(b.controllers);"undefined"!==typeof b.story&&a.X.load(b.story);a.Tb.start();null!==a.N&&a.N.D()}
  g.update=function(a){!0!==this.ca&&(this.A.update(a),this.ea.update(),this.na.update(),this.Da.update(),this.o.update(),this.H.update(),this.V.update(),this.C.update(),this.O.update(),this.u.update(),null!==this.i&&"function"===typeof this.i.update&&this.i.update.call(),null!==this.i&&"function"===typeof this.i.beforeRender&&this.i.beforeRender.call(),null!==this.u&&this.u.render(),null!==this.i&&"function"===typeof this.i.afterRender&&this.i.afterRender.call())};
  g.pause=function(a){!0!==this.ca&&(this.ca=!0,(!0!==a||null!==this.f&&!0===this.f.autoPause)&&this.o.am(),null!==this.I&&this.I.D({internal:a}))};g.resume=function(a){!1!==this.ca&&(this.ca=!1,(!0!==a||null!==this.f&&!0===this.f.autoResume)&&this.o.dm(),null!==this.F&&this.F.D({internal:a}))};
  g.destroy=function(){null!==this.Tb&&(this.Tb.destroy(),this.Tb=null);null!==this.ha&&(this.ha.destroy(),this.ha=null);null!==this.H&&(this.H.destroy(),this.H=null);null!==this.ga&&(this.ga.destroy(),this.ga=null);null!==this.Sb&&(this.Sb.destroy(),this.Sb=null);null!==this.A&&(this.A.destroy(),this.A=null);null!==this.O&&(this.O.destroy(),this.O=null);null!==this.na&&(this.na.destroy(),this.na=null);null!==this.qc&&(this.qc.destroy(),this.qc=null);null!==this.Da&&(this.Da.destroy(),this.Da=null);
  null!==this.C&&(this.C.destroy(),this.C=null);null!==this.Z&&(this.Z.destroy(),this.Z=null);null!==this.u&&(this.u.destroy(),this.u=null);null!==this.Ca&&(this.Ca.destroy(),this.Ca=null);null!==this.B&&(this.B.destroy(),this.B=null);null!==this.J&&(this.J.destroy(),this.J=null);null!==this.K&&(this.K.destroy(),this.K=null);null!==this.c&&(this.c.destroy(),this.c=null);null!==this.oa&&(this.oa.destroy(),this.oa=null);null!==this.aa&&(this.aa.destroy(),this.aa=null);null!==this.ea&&(this.ea.destroy(),
  this.ea=null);null!==this.S&&(this.S.destroy(),this.S=null);null!==this.o&&(this.o.destroy(),this.o=null);null!==this.X&&(this.X.destroy(),this.X=null);null!==this.V&&(this.V.destroy(),this.V=null);null!==this.U&&(this.U.destroy(),this.U=null);null!==this.R&&(this.R.destroy(),this.R=null);this.i=this.m=null;null!==this.W&&(this.W.destroy(),this.W=null);null!==this.I&&(this.I.destroy(),this.I=null);null!==this.F&&(this.F.destroy(),this.F=null);null!==this.G&&(this.G.destroy(),this.G=null);null!==this.N&&
  (this.N.destroy(),this.N=null);aa.splice(this.M,1);n.prototype.destroy.call(this)};Object.defineProperty(u.prototype,"ready",{get:function(){return this.la}});Object.defineProperty(u.prototype,"mainConfig",{get:function(){return this.ka}});Object.defineProperty(u.prototype,"config",{get:function(){return this.f}});Object.defineProperty(u.prototype,"parent",{get:function(){return this.m}});Object.defineProperty(u.prototype,"display",{get:function(){return this.ea}});
  Object.defineProperty(u.prototype,"fullscreen",{get:function(){return this.c.Fd()},set:function(a){"boolean"===typeof a&&this.c.Fd()!==a&&(this.c.fullscreen=a)}});Object.defineProperty(u.prototype,"container",{get:function(){return this.c}});Object.defineProperty(u.prototype,"canvasContainer",{get:function(){return this.B}});Object.defineProperty(u.prototype,"canvas",{get:function(){return this.Ca}});Object.defineProperty(u.prototype,"domHotspotContainer",{get:function(){return this.J}});
  Object.defineProperty(u.prototype,"domHotspotStyle",{get:function(){return this.ja}});Object.defineProperty(u.prototype,"pluginContainer",{get:function(){return this.K}});Object.defineProperty(u.prototype,"raf",{get:function(){return this.Tb}});Object.defineProperty(u.prototype,"audio",{get:function(){return this.o}});Object.defineProperty(u.prototype,"playlists",{get:function(){return this.S}});Object.defineProperty(u.prototype,"hotspots",{get:function(){return this.C}});
  Object.defineProperty(u.prototype,"actions",{get:function(){return this.aa}});Object.defineProperty(u.prototype,"director",{get:function(){return this.Z}});Object.defineProperty(u.prototype,"story",{get:function(){return this.X}});Object.defineProperty(u.prototype,"history",{get:function(){return this.Sb}});Object.defineProperty(u.prototype,"load",{get:function(){return this.ga}});Object.defineProperty(u.prototype,"cache",{get:function(){return this.U}});
  Object.defineProperty(u.prototype,"plugins",{get:function(){return this.H}});Object.defineProperty(u.prototype,"clock",{get:function(){return this.A}});Object.defineProperty(u.prototype,"tween",{get:function(){return this.V}});Object.defineProperty(u.prototype,"i18n",{get:function(){return this.R}});Object.defineProperty(u.prototype,"renderer",{get:function(){return this.u}});Object.defineProperty(u.prototype,"view",{get:function(){return this.u.view}});
  Object.defineProperty(u.prototype,"camera",{get:function(){return this.u.camera}});Object.defineProperty(u.prototype,"controllers",{get:function(){return this.O}});Object.defineProperty(u.prototype,"postProcessing",{get:function(){return this.oa}});Object.defineProperty(u.prototype,"keyboard",{get:function(){return this.na}});Object.defineProperty(u.prototype,"gyroscope",{get:function(){return this.qc}});Object.defineProperty(u.prototype,"gamepad",{get:function(){return this.Da}});
  Object.defineProperty(u.prototype,"width",{get:function(){return this.c.width},set:function(a){this.c.width=a}});Object.defineProperty(u.prototype,"height",{get:function(){return this.c.height},set:function(a){this.c.height=a}});Object.defineProperty(u.prototype,"onReady",{get:function(){null===this.W&&(this.W=new r(this));return this.W}});Object.defineProperty(u.prototype,"onPause",{get:function(){null===this.I&&(this.I=new r(this));return this.I}});
  Object.defineProperty(u.prototype,"onResume",{get:function(){null===this.F&&(this.F=new r(this));return this.F}});Object.defineProperty(u.prototype,"onConfigLoadComplete",{get:function(){null===this.G&&(this.G=new r(this));return this.G}});Object.defineProperty(u.prototype,"onMainConfigLoadComplete",{get:function(){null===this.N&&(this.N=new r(this));return this.N}});
  var ca=function(a){a=a();a.prototype=Object.create(n.prototype);a.prototype.constructor=a;a.prototype.register=function(a){if("object"===typeof a&&"string"===typeof a.uid&&Array.isArray(a.tags)){var b=a.uid,e=a.tags;if(!0===p.gb(b))for(var h=0,k=e.length;h<k;h++)a=e[h],"string"!==typeof a?this.warn("Tags: An object has a tag that isn't a string!"):("undefined"===typeof this.xb[a]&&(this.xb[a]=[],null!==this.xd&&this.xd.D({tag:a})),-1===this.xb[a].indexOf(b)&&this.xb[a].push(b));else this.warn("Tags: The object you want to register in tags is not known by UID!"),
  this.warn(a)}else this.warn("Tags: No uid or no tags on the object you try to register!"),this.warn(a)};a.prototype.yh=function(a,d){var b=[];if("string"===typeof a)b=this.xb[a];else if(Array.isArray(a)){var h=0;for(a=a.length;h<a;h++);}"string"===typeof d&&(b=p.Pe(b,d));return b};a.prototype.get=function(a,d){if("string"===typeof a)return p.get(this.xb[a],d);if(Array.isArray(a)){var b=0;for(a=a.length;b<a;b++);return p.get([],d)}};a.prototype.$p=function(a,d){if(!0===this.gb(a)){a=this.xb[a];for(var b=
  0,h=this.xb.length;b<h;b++)if(!0===p.P(a[b],d))return!0}return!1};a.prototype.gb=function(a){return"undefined"!==typeof this.xb[a]&&null!==this.xb[a]};Object.defineProperty(a.prototype,"list",{get:function(){return Object.keys(this.xb)}});Object.defineProperty(a.prototype,"onRegister",{get:function(){null===this.xd&&(this.xd=new r(this));return this.xd}});return new a}(function(){return function(){this.xb={};this.xd=null;n.call(this,"Tags")}}),p=function(a){a=a();a.prototype=Object.create(n.prototype);
  a.prototype.constructor=a;a.prototype.wh=function(){var a="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0;return("x"==a?b:b&3|8).toString(16)});return!1===p.gb(a)?a:p.wh()};a.prototype.lm=function(a){function b(a){var d,h;for(h in a)if("uid"===h)if(d=a[h],"string"===typeof d){if(p.gb(d)||-1!==e.indexOf(d))return this.warn("UID configuration not valid, uid "+d+" already exists!"),!1;e.push(a[h])}else return this.warn("Found a uid in configuration that is not a string!"),
  !1;else if("object"===typeof a[h])return b.apply(this,[a[h]]);return!0}var e=[];return b.apply(this,[a])};a.prototype.register=function(a){if("object"===typeof a&&"string"===typeof a.uid){var b=a.uid;if(!1===p.gb(b))return this.da[b]=a,!0;this.warn("The uid you want to register already exists!");this.warn(a)}else this.warn("No uid on the object you try to register!"),this.warn(a);return!1};a.prototype.unregister=function(a){"object"===typeof a&&"string"===typeof a.uid?(a=a.uid,this.da[a]=null,delete this.da[a]):
  this.warn("No uid on the object you try to unregister!")};a.prototype.yh=function(a){return"undefined"===typeof a||null===a?Object.keys(this.da):p.Pe(Object.keys(this.da),a)};a.prototype.Pe=function(a,d){return a.filter(function(a){return p.P(a,d)?!0:!1})};a.prototype.get=function(a,d){if("undefined"===typeof a||null===a){if("string"!==typeof d)return this.da;a=Object.keys(this.da)}if("string"===typeof a)return this.da[a];if(Array.isArray(a)){"string"===typeof d&&(a=p.Pe(a,d));d=[];for(var b,h=0,
  k=a.length;h<k;h++)b=a[h],!0===p.gb(b)&&d.push(this.da[b]);return d}};a.prototype.P=function(a,d){a=p.get(a);return D.P(a,d)};a.prototype.gb=function(a){return"undefined"!==typeof this.da[a]&&null!==this.da[a]};return new a}(function(){return function(){this.da={};n.call(this,"UID")}});function r(a,b){this.o=a;this.i=b||!1;this.f=this.m=null;this.c=!0;this.u=!1;n.call(this,"EventDispatcher")}r.prototype=Object.create(n.prototype);g=r.prototype;g.constructor=r;
  function Ca(a,b,d,e,h){if("function"!==typeof b)a.warn("You're trying to add an undefined listener");else if(!0===a.has(b,e))a.warn("You're trying to add a duplicate listener for this context");else{b=new Da(a,b,d,e,h);null===a.f&&(a.f=[]);if(a.f.length){d=a.f.length;do d--;while(a.f[d]&&b.$g<=a.f[d].$g);a.f.splice(d+1,0,b)}else a.f.push(b);!0===a.i&&!0===a.c&&!0===a.u&&b.Vb(a.m)}}
  function Ea(a,b,d){if(null===a.f)return-1;"undefined"===typeof d&&(d=null);for(var e,h=0,k=a.f.length;h<k;h++)if(e=a.f[h],e.listener===b&&e.context===d)return h;return-1}g.add=function(a,b,d){Ca(this,a,!1,b,d)};g.ba=function(a,b,d){Ca(this,a,!0,b,d)};g.remove=function(a,b){a=Ea(this,a,b);-1!==a&&(this.f[a].destroy(),this.f.splice(a,1))};g.has=function(a,b){return-1!==Ea(this,a,b)};
  g.D=function(a,b){this.u=!0;!0===this.i&&(this.m=void 0===a?null:a);if(!1!==this.c&&null!==this.f)for(var d=this.f.length;d--;)this.f[d].Vb(a,b)};g.destroy=function(){if(!1!==this.fb){if(null!==this.f){for(var a=this.f.length;a--;)this.f[a].destroy();this.f=null}this.m=this.o=null;n.prototype.destroy.call(this)}};Object.defineProperty(r.prototype,"emitter",{get:function(){return this.o}});Object.defineProperty(r.prototype,"memorize",{get:function(){return this.i},set:function(a){this.i=!!a}});
  Object.defineProperty(r.prototype,"active",{get:function(){return this.c},set:function(a){this.c=!!a}});function Fa(a,b){this.c=a;this.f=b||null}Fa.prototype.constructor=Fa;Object.defineProperty(Fa.prototype,"emitter",{get:function(){return this.c}});Object.defineProperty(Fa.prototype,"data",{get:function(){return this.f}});function Da(a,b,d,e,h){this.M=a;this.f=b;this.i=e||null;this.o=d||!1;this.$g=h||0;this.m=0;this.c=!1}g=Da.prototype;g.constructor=Da;
  g.Wj=function(a){this.f.call(this.i,new Fa(this.M.emitter,a));this.m++;!0===this.o&&this.yi();this.c=!1};g.Vb=function(a,b){null!==this.f&&(!0===b&&!1===this.c?(this.c=!0,window.setTimeout(this.Wj.bind(this,a),0)):!0!==b&&this.Wj(a))};g.yi=function(){return this.M.remove(this.f,this.i)};g.destroy=function(){this.i=this.f=this.M=null};Object.defineProperty(Da.prototype,"listener",{get:function(){return this.f}});Object.defineProperty(Da.prototype,"context",{get:function(){return this.i}});
  Object.defineProperty(Da.prototype,"priority",{get:function(){return this.$g}});Object.defineProperty(Da.prototype,"callCount",{get:function(){return this.m}});function y(a){this.j=a;this.J=this.K=this.N=this.f=null;this.H="";this.c=null;this.o="";this.u=null;this.m="";this.i={};this.A=this.F=this.G=this.B=this.I=this.C=this.O=this.W=null;n.call(this,"Story")}y.prototype=Object.create(n.prototype);g=y.prototype;g.constructor=y;g.jn=function(a){a=this.j.cache.get(B.JSON,a.key).data;Ga(this,a)};
  function Ga(a,b){if(!0!==p.lm(b))throw"Story configuration is not valid, you have duplicate uids";a.f=b;a.M=a.f.uid;ba(a);a.H=a.f["default"];a.N.key=a.f.name;a.K.key=a.f.slug;a.J.key=a.f.description;if("undefined"!==typeof a.f.scenes&&0<a.f.scenes.length){b=a.f.scenes;for(var d,e=0,h=b.length;e<h;e++)d=new E(a.j),d.ia(b[e]),!0===d.booted&&Ha(a,d)}if("undefined"!==typeof a.f.groups&&0<a.f.groups.length)for(b=a.f.groups,e=0,h=b.length;e<h;e++)d=new F(a.j,b[e]),a.u.push(d.uid);if("object"===typeof a.f.events&&
  null!==a.f.events){b=a.f.events;for(var k in b)d=new Ia(a.j),d.f(b[k]),a.i[k]=d}Ja(a)}function Ja(a){if("undefined"===typeof a.f.scenes||a.c.length===a.f.scenes.length){null!==a.W&&a.W.D();!0===D.P(a.i.onReady,"ActionEventDispatcher")&&a.i.onReady.D();var b=Ka().hashParameters;null!==b&&"string"===typeof b.uid&&p.gb(b.uid)?La(b.uid):""!==a.H&&null!==a.H&&p.gb(a.H)?La(a.H):a.gd(0)}}function La(a){!0!==p.P(a,"Scene")&&!0!==p.P(a,"Group")||p.get(a).load()}
  function Ha(a,b){b.onLoadRequest.add(a.sp,a);b.onLoadStart.add(a.ln,a);b.onLoadComplete.add(a.kn,a);a.c.push(b.uid)}g.On=function(){this.j.renderer.pickingManager.start()};
  g.sp=function(a){var b=this.scene;a=a.emitter;var d=NaN;null!==b&&(-1!==a.sync.indexOf(b.uid)&&b.media.type===G.VIDEO&&(d=b.media.displayObject.currentTime),b.mf());this.o=a.uid;a.Ul(d);!1===a.Nc()?(this.m=null,null!==this.A&&this.A.D({groupUid:this.m}),!0===D.P(this.i.onGroupChange,"ActionEventDispatcher")&&this.i.onGroupChange.D()):!0===a.Nc()&&!1===a.Dd(this.m)&&Ma(this,a.groups[0].uid);null!==this.O&&this.O.D({sceneUid:this.o});!0===D.P(this.i.onSceneLoadRequest,"ActionEventDispatcher")&&this.i.onSceneLoadRequest.D()};
  g.ln=function(){null!==this.C&&this.C.D({sceneUid:this.o});!0===D.P(this.i.onSceneLoadStart,"ActionEventDispatcher")&&this.i.onSceneLoadStart.D()};g.kn=function(){null!==this.B&&this.B.D({sceneUid:this.o});!0===D.P(this.i.onSceneLoadComplete,"ActionEventDispatcher")&&this.i.onSceneLoadComplete.D()};function Ma(a,b){!0===p.P(b,"Group")&&b!==a.m&&(a.m=b,null!==a.A&&a.A.D({groupUid:a.m}),!0===D.P(a.i.onGroupChange,"ActionEventDispatcher")&&a.i.onGroupChange.D())}
  g.boot=function(){this.c=[];this.u=[];this.N=new Na(this.j);this.K=new Na(this.j);this.J=new Na(this.j)};g.load=function(a){"string"===typeof a?this.j.load.json("forge.story.config",a,this.jn,this):"object"===typeof a&&Ga(this,a)};g.mn=function(){return!!this.c.length};g.Nc=function(){return!!this.u.length};g.nn=function(){var a=this.c.indexOf(this.o);this.gd(a+1<this.c.length?this.c[a+1]:this.c[0])};g.pn=function(){var a=this.c.indexOf(this.o);this.gd(0<=a-1?this.c[a-1]:this.c[this.c.length-1])};
  g.gd=function(a){var b;"number"===typeof a?0<=a&&a<this.c.length?b=this.c[a]:this.warn("Load scene error: index "+a+" is out of bounds"):"string"===typeof a&&p.P(a,"Scene")?b=a:"object"===typeof a&&D.P(a,"Scene")&&(b=a.uid);"undefined"!==typeof b&&b!==this.o&&(this.j.renderer.pickingManager.stop(),this.j.renderer.onBackgroundReady.ba(this.On,this),La(b))};
  g.Eh=function(a){var b;"number"===typeof a?0<=a&&a<this.u.length?b=this.u[a]:this.warn("Load group, index "+a+" is out of bounds"):"string"===typeof a&&p.P(a,"Group")?b=a:"object"===typeof a&&D.P(a,"Group")&&(b=a.uid);"undefined"!==typeof b&&b!==this.m&&(Ma(this,b),La(b))};g.Zl=function(a){Ha(this,a);Ja(this)};
  g.destroy=function(){this.f=this.j=null;this.N.destroy();this.N=null;this.K.destroy();this.K=null;this.J.destroy();this.J=null;for(var a=0,b=this.c.length;a<b;a++)p.get(this.c[a]).destroy();this.c=null;a=0;for(b=this.u.length;a<b;a++)p.get(this.u[a]).destroy();this.u=null;null!==this.W&&(this.W.destroy(),this.W=null);null!==this.C&&(this.C.destroy(),this.C=null);null!==this.I&&(this.I.destroy(),this.I=null);null!==this.B&&(this.B.destroy(),this.B=null);null!==this.G&&(this.G.destroy(),this.G=null);
  null!==this.F&&(this.F.destroy(),this.F=null);null!==this.A&&(this.A.destroy(),this.A=null);for(var d in this.i)this.i[d].destroy(),this.i[d]=null;this.i=null;n.prototype.destroy.call(this)};Object.defineProperty(y.prototype,"config",{get:function(){return this.f}});Object.defineProperty(y.prototype,"name",{get:function(){return this.N.value}});Object.defineProperty(y.prototype,"slug",{get:function(){return this.K.value}});Object.defineProperty(y.prototype,"description",{get:function(){return this.J.value}});
  Object.defineProperty(y.prototype,"scenes",{get:function(){return p.get(this.c)}});Object.defineProperty(y.prototype,"scene",{get:function(){return null===this.o||""===this.o?null:p.get(this.o)},set:function(a){this.gd(a)}});Object.defineProperty(y.prototype,"sceneUids",{get:function(){return this.c}});Object.defineProperty(y.prototype,"sceneUid",{get:function(){return this.o},set:function(a){this.gd(a)}});Object.defineProperty(y.prototype,"groups",{get:function(){return p.get(this.u)}});
  Object.defineProperty(y.prototype,"group",{get:function(){return null===this.m||""===this.m?null:p.get(this.m)},set:function(a){this.Eh(a)}});Object.defineProperty(y.prototype,"groupUids",{get:function(){return this.u}});Object.defineProperty(y.prototype,"groupUid",{get:function(){return this.m},set:function(a){this.Eh(a)}});Object.defineProperty(y.prototype,"onReady",{get:function(){null===this.W&&(this.W=new r(this));return this.W}});
  Object.defineProperty(y.prototype,"onSceneLoadRequest",{get:function(){null===this.O&&(this.O=new r(this));return this.O}});Object.defineProperty(y.prototype,"onSceneLoadStart",{get:function(){null===this.C&&(this.C=new r(this));return this.C}});Object.defineProperty(y.prototype,"onSceneLoadProgress",{get:function(){null===this.I&&(this.I=new r(this));return this.I}});Object.defineProperty(y.prototype,"onSceneLoadComplete",{get:function(){null===this.B&&(this.B=new r(this));return this.B}});
  Object.defineProperty(y.prototype,"onSceneLoadError",{get:function(){null===this.G&&(this.G=new r(this));return this.G}});Object.defineProperty(y.prototype,"onScenePreview",{get:function(){null===this.F&&(this.F=new r(this));return this.F}});Object.defineProperty(y.prototype,"onGroupChange",{get:function(){null===this.A&&(this.A=new r(this));return this.A}});
  function F(a,b){this.j=a;this.f=b;this.o=null;this.B="#ffffff";this.A=1;this.c=this.m=this.u=null;this.i="";n.call(this,"Group");this.M=this.f.uid;this.wb=this.f.tags;ba(this);this.c=[];this.o=new Na(this.j,this.f.name);this.u=new Na(this.j,this.f.slug);this.m=new Na(this.j,this.f.description);"string"===typeof this.f.color&&(this.B=this.f.color);"number"===typeof this.f.alpha&&(this.A=this.f.alpha);a=this.f;"undefined"!==typeof a.children&&!0===D.za(a.children,"string")?this.c=a.children:this.warn("A group has no children in its configuration, or configuration is not valid!");
  "string"===typeof a["default"]&&(-1!==this.c.indexOf(a["default"])?this.i=a["default"]:this.warn("A group has a default child that is not in its children array!"))}F.prototype=Object.create(n.prototype);g=F.prototype;g.constructor=F;
  g.load=function(a){if(null===this.c||!this.c.length)throw"Group.load() : can't load a group that have no children";var b="";"undefined"===typeof a||null===a?b="string"===typeof this.i&&""!==this.i?this.i:this.c[0]:"number"===typeof a&&0<=a&&a<this.c.length?b=this.c[a]:"string"===typeof a?b=a:"object"===typeof a&&!0===this.sf(a)&&(b=a.uid);if(-1===this.c.indexOf(b))throw'Group.load() : uid "'+b+'" is not in children of the group!';if(!0===p.P(b,"Scene")||!0===p.P(b,"Group"))p.get(b).load();else throw"Impossible to load group child with uid "+
  b+", it seems to be neither a scene or a group!";};g.sf=function(a){return"string"===typeof a?-1!==this.c.indexOf(a):!0===D.P(a,"Scene")||!0===D.P(a,"Group")?this.sf(a.uid):!1};g.fd=function(a){return"string"===typeof a&&p.P(a,"Scene")?-1!==this.c.indexOf(a):!0===D.P(a,"Scene")?this.fd(a.uid):!1};g.Dd=function(a){return"string"===typeof a&&p.P(a,"Group")?-1!==this.c.indexOf(a):!0===D.P(a,"Group")?this.Dd(a.uid):!1};g.Xp=function(){return!!this.c.length};
  g.Ah=function(a){for(var b,d=0,e=this.c.length;d<e;d++)if(b=this.c[d],p.P(b,a))return!0;return!1};g.tf=function(){return this.Ah("Scene")};g.Nc=function(){return this.Ah("Group")};g.Bd=function(a){if("string"!==typeof a)return this.c;for(var b=[],d=0,e=this.c.length;d<e;d++)p.P(this.c[d],a)&&b.push(this.c[d]);return b};g.Se=function(a){a=this.Bd(a);return p.get(a)};
  g.wm=function(){if(!1===this.tf())this.warn("Can't do Group.nextScene() on this group that have no scenes!");else{var a=this.scenesUids,b=a.indexOf(this.j.story.sceneUid),d;-1===b&&(p.P(this.i,"Scene")?d=this.i:d=a[0]);b+1<a.length?d=a[b+1]:-1!==b&&(d=a[0]);this.load(d)}};
  g.xm=function(){if(!1===this.tf())this.warn("Can't do Group.previousScene() on this group that have no scenes!");else{var a=this.scenesUids,b=a.indexOf(this.j.story.sceneUid),d;-1===b&&(p.P(this.i,"Scene")?d=this.i:d=a[0]);0<=b-1?d=a[b-1]:-1!==b&&(d=a[a.length-1]);this.load(d)}};g.destroy=function(){this.c=this.j=null;this.o.destroy();this.o=null;this.u.destroy();this.u=null;this.m.destroy();this.m=null;n.prototype.destroy.call(this)};Object.defineProperty(F.prototype,"config",{get:function(){return this.f}});
  Object.defineProperty(F.prototype,"name",{get:function(){return this.o.value}});Object.defineProperty(F.prototype,"color",{get:function(){return this.B}});Object.defineProperty(F.prototype,"alpha",{get:function(){return this.A}});Object.defineProperty(F.prototype,"slug",{get:function(){return this.u.value}});Object.defineProperty(F.prototype,"description",{get:function(){return this.m.value}});Object.defineProperty(F.prototype,"childrenUids",{get:function(){return this.Bd()}});
  Object.defineProperty(F.prototype,"children",{get:function(){return this.Se()}});Object.defineProperty(F.prototype,"scenesUids",{get:function(){return this.Bd("Scene")}});Object.defineProperty(F.prototype,"scenes",{get:function(){return this.Se("Scene")}});Object.defineProperty(F.prototype,"groupsUids",{get:function(){return this.Bd("Group")}});Object.defineProperty(F.prototype,"groups",{get:function(){return this.Se("Group")}});
  function E(a){this.j=a;this.I=this.H=this.F=this.f=null;this.K=[];this.N=0;this.J=!1;this.c={};this.G=this.B=this.u=this.A=this.m=this.o=this.C=this.i=null;n.call(this,"Scene")}E.prototype=Object.create(n.prototype);g=E.prototype;g.constructor=E;g.hn=function(a){this.J=!0;"string"===typeof a.data&&(a.data=JSON.parse(a.data));this.f=D.ta(this.f,a.data);this.j.story.Zl(this);null!==this.B&&this.B.D()};
  g.ia=function(a){this.f=a;this.M=a.uid;this.wb=a.tags;ba(this);this.F=new Na(this.j,this.f.name);this.H=new Na(this.j,this.f.slug);this.I=new Na(this.j,this.f.description);this.K=!0===D.za(this.f.sync,"string")?this.f.sync:[];if("object"===typeof a.events&&null!==a.events){var b=a.events,d,e;for(e in b)d=new Ia(this.j),d.f(b[e]),this.c[e]=d}!1===this.J&&"string"===typeof a.url&&""!==a.url?this.j.load.json(this.M,a.url,this.hn,this):this.J=!0};
  g.load=function(){this.j.story.scene!==this&&(null!==this.C&&this.C.D(),!0===D.P(this.c.onLoadRequest,"ActionEventDispatcher")&&this.c.onLoadRequest.D())};
  g.Ul=function(a){"number"===typeof a&&!1===isNaN(a)&&"undefined"!==typeof this.f.media&&("undefined"===typeof this.f.media.options&&(this.f.media.options={}),this.f.media.options.startTime=a);null===this.i&&(this.i=new Oa(this.j,this.f.media),null!==this.G&&this.G.D({media:this.i}));null!==this.o&&this.o.D();!0===D.P(this.c.onLoadStart,"ActionEventDispatcher")&&this.c.onLoadStart.D();this.N++;null!==this.m&&this.m.D();!0===D.P(this.c.onLoadComplete,"ActionEventDispatcher")&&this.c.onLoadComplete.D()};
  g.mf=function(){null!==this.A&&this.A.D();!0===D.P(this.c.onUnloadStart,"ActionEventDispatcher")&&this.c.onUnloadStart.D();this.i.destroy();this.i=null;null!==this.u&&this.u.D();!0===D.P(this.c.onUnloadComplete,"ActionEventDispatcher")&&this.c.onUnloadComplete.D()};g.Dd=function(a){return"string"===typeof a&&!0===p.P(a,"Group")?p.get(a).fd(this):!0===D.P(a,"Group")?a.fd(this):!1};g.Nc=function(){for(var a=this.j.story.groups,b,d=0,e=a.length;d<e;d++)if(b=a[d],!0===b.fd(this))return!0;return!1};
  g.Nl=function(){return"undefined"!==typeof this.f.sound&&"undefined"!==typeof this.f.sound.source&&("undefined"!==typeof this.f.sound.source.url&&""!==this.f.sound.source.url||"undefined"!==typeof this.f.sound.source.target&&""!==this.f.sound.source.target)?!0:!1};g.Ol=function(a){return"undefined"!==typeof this.f.sound&&"undefined"!==typeof this.f.sound.source&&"undefined"!==typeof this.f.sound.source.target&&""!==this.f.sound.source.target&&this.f.sound.source.target===a?!0:!1};
  g.Ql=function(){return!0===this.Nl()&&this.f.sound.type===Pa.Hf?!0:!1};g.destroy=function(){this.j=null;this.F.destroy();this.F=null;this.H.destroy();this.H=null;this.I.destroy();this.I=null;null!==this.i&&(this.i.destroy(),this.i=null);null!==this.o&&(this.o.destroy(),this.o=null);null!==this.m&&(this.m.destroy(),this.m=null);null!==this.A&&(this.A.destroy(),this.A=null);null!==this.u&&(this.u.destroy(),this.u=null);for(var a in this.c)this.c[a].destroy(),this.c[a]=null;this.c=null;n.prototype.destroy.call(this)};
  Object.defineProperty(E.prototype,"booted",{get:function(){return this.J}});Object.defineProperty(E.prototype,"config",{get:function(){return this.f}});Object.defineProperty(E.prototype,"viewCount",{get:function(){return this.N}});Object.defineProperty(E.prototype,"viewed",{get:function(){return!!this.N}});Object.defineProperty(E.prototype,"name",{get:function(){return this.F.value}});Object.defineProperty(E.prototype,"slug",{get:function(){return this.H.value}});
  Object.defineProperty(E.prototype,"description",{get:function(){return this.I.value}});Object.defineProperty(E.prototype,"sync",{get:function(){return this.K}});Object.defineProperty(E.prototype,"groupsUid",{get:function(){for(var a=this.j.story.groups,b,d=[],e=0,h=a.length;e<h;e++)b=a[e],!0===b.fd(this)&&d.push(b.uid);return d}});Object.defineProperty(E.prototype,"groups",{get:function(){return p.get(this.groupsUid)}});Object.defineProperty(E.prototype,"thumbnails",{get:function(){return this.f.thumbnails}});
  Object.defineProperty(E.prototype,"media",{get:function(){return this.i}});Object.defineProperty(E.prototype,"background",{get:function(){return"undefined"!==typeof this.f.background?this.f.background:this.j.config.background}});Object.defineProperty(E.prototype,"onLoadRequest",{get:function(){null===this.C&&(this.C=new r(this));return this.C}});Object.defineProperty(E.prototype,"onLoadStart",{get:function(){null===this.o&&(this.o=new r(this));return this.o}});
  Object.defineProperty(E.prototype,"onLoadComplete",{get:function(){null===this.m&&(this.m=new r(this));return this.m}});Object.defineProperty(E.prototype,"onUnloadStart",{get:function(){null===this.A&&(this.A=new r(this));return this.A}});Object.defineProperty(E.prototype,"onUnloadComplete",{get:function(){null===this.u&&(this.u=new r(this));return this.u}});Object.defineProperty(E.prototype,"onConfigLoadComplete",{get:function(){null===this.B&&(this.B=new r(this));return this.B}});
  Object.defineProperty(E.prototype,"onMediaCreate",{get:function(){null===this.G&&(this.G=new r(this));return this.G}});var H={Pa:"degrees",sb:"radians"};H.pj=Math.PI/180;H.wj=180/Math.PI;H.zj=2*Math.PI;H.T=function(a){return a*H.pj};H.xa=function(a){return a*H.wj};H.hf=function(a){return Math.round(10*a)/10};H.$=function(a,b,d){b="number"===typeof b&&!1===isNaN(b)?b:-Infinity;d="number"===typeof d&&!1===isNaN(d)?d:Infinity;return Math.min(Math.max(a,b),d)};
  H.ib=function(a,b,d){return a===d?d:(d-=b)?((a-b)%d+d)%d+b:b};H.lq=function(a,b,d){return a*d+b*(1-d)};H.sq=function(a,b,d){a=H.$((a-b)/(d-b),0,1);return a*a*(3-2*a)};H.Hd=function(a){return!!a&&!(a&a-1)};H.Oc=function(a){return{yaw:Math.atan2(-a.elements[2],a.elements[10]),pitch:Math.asin(-a.elements[6]),roll:Math.atan2(-a.elements[4],a.elements[5])}};
  H.Mc=function(a,b,d,e){var h=Math.cos(a);a=Math.sin(a);var k=Math.cos(-b);b=Math.sin(-b);var l=Math.cos(d);d=Math.sin(d);"undefined"===typeof e&&(e=!1);return e?(new THREE.Matrix4).set(h*l+a*b*d,-h*d+a*b*l,a*k,0,k*d,k*l,-b,0,-a*l+h*b*d,a*d+h*b*l,h*k,0,0,0,0,1):(new THREE.Matrix4).set(l*h-d*b*a,-d*k,l*a+d*b*h,0,d*h+l*b*a,l*k,d*a-l*b*h,0,-a*k,b,k*h,0,0,0,0,1)};
  H.kf=function(a,b,d,e){var h={};e===H.Pa&&(b=H.T(b),d=H.T(d));d=H.ib(d,-Math.PI/2,Math.PI/2);b+=0>a?Math.PI:0;b=H.ib(b,0,2*Math.PI);a=Math.abs(a);h.x=a*Math.cos(d)*Math.sin(b);h.y=a*Math.sin(d);h.z=-a*Math.cos(d)*Math.cos(b);return h};H.Ad=function(a,b,d,e){var h={};h.radius=Math.sqrt(a*a+b*b+d*d);if(!h.radius)return{radius:0,theta:0,phi:0};h.phi=Math.asin(b/h.radius);h.theta=Math.atan2(a,-d||0);e===H.Pa&&(h.phi=H.xa(h.phi),h.theta=H.xa(h.theta));return h};
  var I={Md:function(a){a=(new THREE.Euler).setFromQuaternion(a,"XYZ");return{yaw:a.x,pitch:-a.y,roll:a.z}},Bb:function(a,b,d){"object"===typeof a&&(b=a.pitch,d=a.roll,a=a.yaw);return(new THREE.Quaternion).setFromEuler(new THREE.Euler(a,-b,d,"ZXY"))},im:function(a){a=I.Md(a);return H.Mc(a.yaw,a.pitch,a.roll)},tl:function(a){return I.Bb(H.Oc(a))},cancelRoll:function(a){a=I.Md(a);return I.Bb(a.yaw,a.pitch,0)},rl:function(a,b){return(new THREE.Quaternion).copy(a).inverse().multiply(b)},jl:function(a,b){a=
  Math.abs(a.dot(b));return 1<=a?0:2*Math.acos(a)},multiplyScalar:function(a,b){return new THREE.Quaternion(a*b.x,a*b.y,a*b.z,a*b.w)},add:function(a,b){return new THREE.Quaternion(a.x+b.x,a.y+b.y,a.z+b.z,a.w+b.w)},log:function(a){var b=new THREE.Quaternion(0,0,0,0);if(1>Math.abs(a.w)){var d=Math.acos(a.w),e=Math.sin(d);0<e&&(b.x=d*a.x/e,b.y=d*a.y/e,b.z=d*a.z/e);return b}b.x=a.x;b.y=a.y;b.z=a.z;return b},exp:function(a){var b=Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z),d=Math.sin(b),e=(new THREE.Quaternion).copy(a);
  e.w=Math.cos(b);Math.abs(d)>Number.EPSILON&&(e.x=d*a.x/b,e.y=d*a.y/b,e.z=d*a.z/b);return e},slerp:function(a,b,d){var e=new THREE.Quaternion;THREE.Quaternion.slerp(a,b,e,d);return e},tq:function(a,b,d,e,h,k){a=I.slerp(a,e,k);b=I.slerp(b,d,k);return I.slerp(a,b,2*k*(1-k))},Yl:function(a,b,d){return I.add(I.multiplyScalar(1-d,a),I.multiplyScalar(d,b)).normalize()},jf:function(a,b,d){var e=a.dot(b);if(.95<=Math.abs(e))return I.Yl(a,b,d);e=Math.acos(e);return I.multiplyScalar(1/Math.sin(e),I.add(I.multiplyScalar(Math.sin(e*
  (1-d)),a),I.multiplyScalar(Math.sin(e*d),b)))},hm:function(a,b,d,e,h){a=I.jf(a,e,h);b=I.jf(b,d,h);return I.jf(a,b,2*h*(1-h))},Lh:function(a,b,d){var e=(new THREE.Quaternion).copy(b).conjugate();a=(new THREE.Quaternion).copy(e).multiply(a);d=(new THREE.Quaternion).copy(e).multiply(d);e=I.log(a);d=I.log(d);d=I.add(e,d);d=I.multiplyScalar(-.25,d);d=I.exp(d);return(new THREE.Quaternion).copy(b).multiply(d).normalize()}};
  function Qa(a,b,d,e){this.i="number"===typeof a?a:0;this.M="number"===typeof b?b:0;this.c="number"===typeof d?d:0;this.f="number"===typeof e?e:0}Qa.prototype.constructor=Qa;Object.defineProperty(Qa.prototype,"x",{get:function(){return this.i},set:function(a){"number"===typeof a&&(this.i=a)}});Object.defineProperty(Qa.prototype,"y",{get:function(){return this.M},set:function(a){"number"===typeof a&&(this.M=a)}});
  Object.defineProperty(Qa.prototype,"width",{get:function(){return this.c},set:function(a){"number"===typeof a&&(this.c=a)}});Object.defineProperty(Qa.prototype,"w",{get:function(){return this.width},set:function(a){this.width=a}});Object.defineProperty(Qa.prototype,"height",{get:function(){return this.f},set:function(a){"number"===typeof a&&(this.f=a)}});Object.defineProperty(Qa.prototype,"h",{get:function(){return this.height},set:function(a){this.height=a}});
  Object.defineProperty(Qa.prototype,"center",{get:function(){return new THREE.Vector2(this.i+.5*this.c,this.M+.5*this.f)}});Object.defineProperty(Qa.prototype,"origin",{get:function(){return new THREE.Vector2(this.i,this.M)}});Object.defineProperty(Qa.prototype,"size",{get:function(){return new Ra(this.c,this.f)}});function Ra(a,b){this.c=a||0;this.f=b||0}Ra.prototype.constructor=Ra;Object.defineProperty(Ra.prototype,"width",{get:function(){return this.c}});
  Object.defineProperty(Ra.prototype,"height",{get:function(){return this.f}});Object.defineProperty(Ra.prototype,"ratio",{get:function(){return this.c/this.f}});var G={Pb:"undefined",IMAGE:"image",VIDEO:"video",Fc:"grid"},Sa={Ec:"equi",rd:"cube",$a:"flat",Gn:"hotspot"};
  function Ta(a,b,d){this.j=a;this.f=b;this.C=d;this.B=this.m=this.i=this.u=this.c=null;this.I=this.o=0;this.F="";this.G=this.A=null;n.call(this,"MediaStore");ba(this);this.c=new Ua;this.u=[];this.m=[];this.i=new Ua;this.A={};a=this.f;b=/\{[lfxy].*\}/;if("string"===typeof a.pattern){if(null===a.pattern.match(b))throw"the pattern of the multi resolution media is wrong";this.F=a.pattern}null!==this.C&&("string"!==typeof this.C.url||null===this.C.url.match(b)?this.warn("no preview for this panorama"):
  this.A[Va]=this.C.url);d=0;for(var e=a.levels.length;d<e;d++)if("string"===typeof a.levels[d].pattern){if(null===a.pattern.match(b))throw"the pattern of the multi resolution media is wrong";this.A[d]=a.levels[d].pattern}this.G=Wa;"undefined"!==typeof a.faces&&(this.G=a.faces);this.I=!0===q.desktop?15E7:!0===q.iOS?4E7:5E7}Ta.prototype=Object.create(n.prototype);Ta.prototype.constructor=Ta;var Wa={front:"front",right:"right",back:"back",left:"left",down:"down",up:"up"};
  function Xa(a,b){a=""+("undefined"!==typeof b.face?a.G[b.face]+"-":"");a+="undefined"!==typeof b.level?b.level+"-":"";a+="undefined"!==typeof b.x?b.x+"-":"";return a+="undefined"!==typeof b.y?b.y:""}
  function Ya(a,b){var d=Xa(a,b);if(-1===a.u.indexOf(d)){var e=a.i.get(d);e.cancelled?(e.load.reject("Tile cancelled"),a.i.delete(d)):(a.u.push(d),d=a.F,"undefined"!==typeof a.A[b.level]&&(d=a.A[b.level]),d=d.replace(/\{face\}/,a.G[b.face]),d=d.replace(/\{level\}/,b.level.toString()),d=d.replace(/\{x\}/,b.x.toString()),d=d.replace(/\{y\}/,b.y.toString()),d=new Za(a.j,{url:d}),d.data={tile:b},d.onLoadComplete.add(a.Km.bind(a),a))}}g=Ta.prototype;
  g.Km=function(a){if(null===this.c)a.emitter.destroy();else{a=a.emitter;var b=a.data.tile,d=Xa(this,b),e=new THREE.Texture;e.image=a.element;var h=a.element.height*a.element.width;this.o+=h;b=new $a(e,b.level===Va,h);this.c.set(d,b);this.u.splice(this.u.indexOf(a.data.key),1);this.i.get(d).load.resolve(b.texture);this.i.delete(d);a.destroy();if(!(this.o<this.I))for(a=this.c.zf(),d=!1,a=D.Pc(a,"1.lastTime");this.o>this.I;)b=a.shift(),"undefined"===typeof b?(a=this.c.zf(),a=D.Pc(a,"1.lastTime"),d=!0):
  !0!==d&&!0===b[1].locked||ab(this,b[0])}};function ab(a,b){if(!1!==a.c.has(b)){var d=a.c.get(b);a.o-=d.size;d.destroy();a.c.delete(b)}}g.Ap=function(){for(this.B=null;0<this.m.length;){var a=this.m.pop();Ya(this,a)}};
  g.get=function(a){var b=Xa(this,a);if(this.c.has(b)){var d=D.Fh();a=this.c.get(b);d.resolve(a.texture);return d}d=this.i.get(b);if(void 0!==d)return null;d=D.Fh();if(this.c.has(b))return d.resolve(this.c.get(b)),d;this.i.set(b,{load:d,cancelled:!1});null!==this.B&&(window.clearTimeout(this.B),this.B=null);a.level===Va?Ya(this,a):(this.m.push(a),this.B=window.setTimeout(this.Ap.bind(this),250));return d};g.has=function(a){return this.c.has(a)};g.Mp=function(a){ab(this,Xa(this,a))};
  g.destroy=function(){da(this);this.u=this.j=this.A=null;null!==this.m&&(this.m.length=0,this.m=null);this.i=null;this.c.Ai();this.c=null};function $a(a,b,d){this.c=a;this.m=b;this.M=d;this.i=window.performance.now();this.f=0}$a.prototype.constructor=$a;$a.prototype.destroy=function(){null!==this.c&&this.c.dispose();this.c=null};Object.defineProperty($a.prototype,"texture",{get:function(){this.f++;this.i=window.performance.now();return this.c}});Object.defineProperty($a.prototype,"locked",{get:function(){return this.m}});
  Object.defineProperty($a.prototype,"size",{get:function(){return this.M}});Object.defineProperty($a.prototype,"lastTime",{get:function(){return this.i}});Object.defineProperty($a.prototype,"count",{get:function(){return this.f}});
  function Oa(a,b){this.j=a;this.f=b;this.u="";this.m=this.A=this.L=this.i=null;this.B=!1;this.o=this.c=null;n.call(this,"Media");this.c={};this.o=new r(this,!0);b=this.f;if("undefined"===typeof b||null===b)this.u=G.Pb,bb(this);else{this.M=b.uid;this.i="undefined"!==typeof b.options?b.options:null;this.u=b.type;a=b.source;"undefined"!==typeof b.source&&"undefined"===typeof b.source.format&&(b.source.format=Sa.$a);if("object"===typeof b.events&&null!==b.events){var d=b.events,e,h;for(h in d)e=new Ia(this.j),
  e.f(d[h]),this.c[h]=e}if(this.u===G.Fc)bb(this);else if("undefined"!==typeof b.source&&null!==b.source)if(h=b.preview,this.u===G.IMAGE){if("undefined"!==typeof h)if("string"===typeof h&&(h={url:h}),null!==h.url.match(/\{[lfxy].*\}/))this.m=h;else if(a.format===Sa.Ec||a.format===Sa.rd||a.format===Sa.$a)this.m=new Za(this.j,{key:this.M+"-preview",url:h.url}),this.m.onLoadComplete.ba(this.vk,this);if(a.url)if(a.format===Sa.Ec||a.format===Sa.rd||a.format===Sa.$a)a={key:this.M,url:a.url},this.L=new Za(this.j,
  a),this.L.onLoadComplete.ba(this.vk,this);else throw"Media format not supported";else this.A=new Ta(this.j,a,this.m),bb(this)}else if(this.u===G.VIDEO){if(Array.isArray(a.levels))for(a.url=[],h=0,b=a.levels.length;h<b;h++)!1!==q.check(a.levels[h].device)&&a.url.push(a.levels[h].url);if("string"===typeof a.url||0!==a.url.length)"undefined"!==typeof a.streaming&&a.streaming.toLowerCase()===cb.Kf?this.L=new J(this.j,this.M):(h=this.j.story.scene,this.L=new K(this.j,this.M,null,null,!0===h.Ol(this.M)&&
  !0===h.Ql()?!0:!1)),this.L.load(a.url),this.L.onLoadedMetaData.ba(this.Mm,this),this.L.onPlay.add(this.Om,this),this.L.onPause.add(this.Nm,this),this.L.onSeeked.add(this.Pm,this),this.L.onEnded.add(this.Lm,this)}}}Oa.prototype=Object.create(n.prototype);g=Oa.prototype;g.constructor=Oa;g.vk=function(){bb(this)};
  g.Mm=function(){null!==this.i&&(this.L.volume="number"===typeof this.i.volume?this.i.volume:1,this.L.loop="boolean"===typeof this.i.loop?this.i.loop:!0,this.L.currentTime="number"===typeof this.i.startTime?this.i.startTime:0,!0===this.i.autoPlay&&"visible"===document[q.visibilityState]&&this.L.play(),this.L.autoPause=this.i.autoPause,this.L.autoResume=this.i.autoResume);bb(this)};
  function bb(a){a.u===G.IMAGE?null!==a.A?(a.B=!0,a.o.D()):(a.B=null!==a.L&&a.L.loaded&&null!==a.m&&a.m.loaded,null===a.m||null!==a.L&&!1===a.L.loaded||!1===a.m.loaded?a.o.D():null!==a.j.renderer.backgroundRenderer&&(a.j.renderer.backgroundRenderer.displayObject=a.L)):(a.B=!0,a.o.D())}g.Om=function(){!0===D.P(this.c.onPlay,"ActionEventDispatcher")&&this.c.onPlay.D()};g.Nm=function(){!0===D.P(this.c.onPause,"ActionEventDispatcher")&&this.c.onPause.D()};
  g.Pm=function(){!0===D.P(this.c.onSeeked,"ActionEventDispatcher")&&this.c.onSeeked.D()};g.Lm=function(){!0===D.P(this.c.onEnded,"ActionEventDispatcher")&&this.c.onEnded.D()};g.destroy=function(){null!==this.L&&(this.L.destroy(),this.L=null);null!==this.A&&(this.A.destroy(),this.A=null);null!==this.o&&(this.o.destroy(),this.o=null);for(var a in this.c)this.c[a].destroy(),this.c[a]=null;this.j=this.c=null};Object.defineProperty(Oa.prototype,"config",{get:function(){return this.f}});
  Object.defineProperty(Oa.prototype,"type",{get:function(){return this.u}});Object.defineProperty(Oa.prototype,"displayObject",{get:function(){return this.u===G.IMAGE&&null===this.A?null!==this.L&&!0===this.L.loaded?this.L:this.m:this.L}});Object.defineProperty(Oa.prototype,"store",{get:function(){return this.A}});Object.defineProperty(Oa.prototype,"loaded",{get:function(){return this.B}});Object.defineProperty(Oa.prototype,"onLoadComplete",{get:function(){return this.o}});
  function z(a){this.j=a;this.f=this.B=this.o=this.u=this.c=this.i=this.C=null;this.J=db.Pb;this.G=this.N=this.S=this.m=null;this.O=this.K=!1;this.I=this.F=this.H=null;n.call(this,"RenderManager");this.A=new THREE.Clock;this.j.onConfigLoadComplete.add(this.Dk,this,1E3)}z.prototype=Object.create(n.prototype);g=z.prototype;g.constructor=z;
  g.Dk=function(){var a=this.j.config.webgl;a.canvas=this.j.canvas.dom;try{this.C=new THREE.WebGLRenderer(a)}catch(b){this.destroy();return}this.C.autoClear=!1;this.C.autoClearDepth=!0;this.C.autoClearColor=!0;this.u=new eb(this.j);this.u.onChange.add(this.np,this);this.B=new fb(this.j);this.c=new gb(this.j);this.G=new hb(this.j);this.i=new ib(this.j);this.c.onDisplayChange.add(this.Nk,this);jb(this,this.c.rendererSize);this.m=new L(this.j);this.j.canvas.onResize.add(this.Gj,this);this.j.story.onSceneLoadStart.add(this.zk,
  this)};
  g.zk=function(){this.j.story.scene.onUnloadStart.ba(this.cp,this);var a=this.j.story.scene.config;this.j.container.background=this.j.story.scene.background;this.G.ol();this.i.gl(this.G.renderScenes);this.u.load(a.view);var b=D.hb(this.j.mainConfig.camera,a.camera);this.m.load(b);b=a.sound;if("undefined"!==typeof b&&"undefined"!==typeof b.source){var d,e,h,k;"undefined"!==typeof b.options&&(d="number"===typeof b.options.volume?H.$(b.options.volume,0,1):1,e="boolean"===typeof b.options.loop?b.options.loop:
  !1,h="number"===typeof b.options.startTime?b.options.startTime:0,k="boolean"===typeof b.options.autoPlay?b.options.autoPlay:!1);"undefined"!==typeof b.source.url&&""!==b.source.url&&(this.o=new N(this.j,a.sound.uid,a.sound.source.url,a.sound.type===Pa.Hf),"undefined"!==typeof b.options&&null!==b.options&&(this.o.volume=d,this.o.loop=e,this.o.startTime=h,!0===k&&this.o.play(this.o.startTime,this.o.loop,!0)))}a=this.j.story.scene.media;a.onLoadComplete.ba(this.Fo,this);D.P(a.displayObject,["VideoHTML5",
  "VideoDash"])&&a.displayObject.onQualityChange.add(this.gn,this)};g.cp=function(){this.O=!1;kb(this);null!==this.G&&this.G.Bf();null!==this.B&&this.B.Ci();null!==this.i&&this.i.Df();null!==this.o&&(this.o.destroy(),this.o=null)};g.np=function(){null!==this.f&&this.f.bc();this.B.jm(this.u.type);this.u.type===lb.Eb?this.i.vh(!1):this.i.vh(!0,this.B.material,this.B.renderTarget)};
  g.Fo=function(a){a=a.emitter;nb(this,this.c.presentingVR);ob(this,this.J);null!==this.f&&(this.f.displayObject=a.displayObject);a=null;var b=this.j.story.scene.config,d=b.media;"undefined"!==typeof d&&null!==d&&"undefined"!==typeof d.fx&&null!==d.fx&&(a=this.j.postProcessing.Te(d.fx));null!==this.f&&this.i.sh(this.f.renderTarget.texture,a,1);"undefined"!==typeof b.fx&&null!==b.fx&&this.i.fl(this.j.postProcessing.Te(b.fx));this.O=!0};g.gn=function(a){this.f.displayObject=a.emitter};
  function jb(a,b){var d=a.c.presentingVR,e=!0;!0===d?(b=a.c.rendererSize,e=!1):a.c.setSize(b);a.C.setSize(b.width,b.height,e);a.S=b;a.N=new Ra(b.width,b.height);!0===d&&(a.N.width*=.5);null!==a.f&&a.f.setSize(a.N);a.B.setSize(a.N);a.i.setSize(a.N)}g.Gj=function(){var a=this.j.canvas.dom;jb(this,new Ra(a.width,a.height))};g.Nk=function(){jb(this,this.c.rendererSize);this.B.mode=!0===this.c.presentingVR?pb.Uc:pb.jb};
  function ob(a,b){var d=null,e=null;null!==a.f&&(null!==a.f.displayObject&&(d=a.f.displayObject),null!==a.f.renderTarget&&(e=a.f.renderTarget));kb(a);var h={},k=a.j.story.scene.media,l=k.config;if("undefined"!==typeof l&&null!==l){h.type=l.type;if("undefined"!==typeof l.source&&null!==l.source){var t=l.source;if("undefined"===typeof t.levels&&(h.jq=l.source.format,k=k.displayObject.element.width/k.displayObject.element.height||1,"undefined"!==typeof t.fov)){var v;"number"===typeof t.fov?v=t.fov.vertical:
  "number"===typeof t.fov.vertical?v=t.fov.vertical:v="number"===typeof t.fov.horizontal?t.fov.horizontal/k:"number"===typeof t.fov.diagonal?t.fov.diagonal/Math.sqrt(1+k*k):90;h.Bq=H.T(v)}}"undefined"!==typeof l.options&&null!==l.options&&"undefined"!==typeof l.options.color&&(h.color=l.options.color)}b===db.oe?(a.f=new qb(a.j,e,h),b=a.C.getSize(),jb(a,new Ra(b.width,b.height))):b===db.hg?a.f=new O(a.j,e,l):b===db.Vc&&("undefined"!==typeof l&&null!==l&&"undefined"!==typeof l.source&&null!==l.source&&
  (h.order=l.source.order||"RLUDFB","number"===typeof l.source.tile?h.tile=l.source.tile:Array.isArray(l.source.levels)&&"number"===typeof l.source.levels[0].tile&&(h.tile=l.source.levels[0].tile)),a.f=new rb(a.j,e,h));null!==d&&(a.f.displayObject=d);null!==a.f&&a.f.bc();a.K=!0;null!==a.H&&a.H.D()}
  function nb(a,b){var d=a.j.story.scene.media;d.type===G.Pb?a.J=db.Pb:!0===b?a.J=db.Vc:(b=d.config,a.J=b.type===G.Fc?db.Vc:"undefined"!==typeof b.source?"undefined"!==typeof b.source.levels&&d.type===G.IMAGE?db.hg:b.source.format===Sa.rd?db.Vc:db.oe:db.oe,"undefined"===typeof b.source||"undefined"===typeof b.source.format?a.log("VR off - view "+a.u.current.type+", background type = "+a.J):a.log("VR off - media "+b.source.format+", view "+a.u.current.type+", background type = "+a.J))}
  function kb(a){null!==a.f&&(a.f.destroy(),a.f=null);a.K=!1}g.update=function(){this.m.update()};
  g.render=function(){if(null!==this.u&&!1!==this.O&&null!==this.i){null!==this.F&&this.F.D();null!==this.f&&this.f.update();for(var a=this.c.presentingVR,b=this.c.Dl(),d=0,e=b.length;d<e;d++){var h=b[d],k=h.rectangle,h=h.camera;this.C.setViewport(k.origin.x,k.origin.y,k.size.width,k.size.height);null!==this.f&&this.f.render((!0===a?h:null)||null);this.i.render(h);this.C.clearDepth();!0===a&&(k=new THREE.Scene,k.add(h),this.C.render(k,h))}!0===this.c.presentingVR&&this.c.Vi();null!==this.I&&this.I.D()}};
  g.Xi=function(){if(!0!==this.c.presentingVR&&!0===q.webVR){this.c.Ui();this.u.kj();var a=this.j.story.scene.config;"undefined"!==typeof a.media&&null!==a.media&&"undefined"!==typeof a.media.source&&null!==a.media.source&&a.media.source.format===Sa.Ec&&ob(this,db.Vc)}};
  g.Wi=function(){if(!1!==this.c.presentingVR&&!0===q.webVR){this.c.Ti();this.u.jj();var a=this.j.story.scene.config.media;"undefined"!==typeof a&&null!==a&&"undefined"!==typeof a.source&&null!==a.source&&a.source.format===Sa.Ec&&(nb(this,!1),ob(this,this.J))}};g.xq=function(){!0===this.c.presentingVR?this.Wi():this.Xi()};
  g.destroy=function(){this.j.canvas.onResize.remove(this.Gj,this);this.j.story.onSceneLoadStart.remove(this.zk,this);this.j.onConfigLoadComplete.remove(this.Dk,this);null!==this.B&&(this.B.destroy(),this.B=null);null!==this.H&&(this.H.destroy(),this.H=null);null!==this.o&&(this.o.destroy(),this.o=null);null!==this.G&&(this.G.destroy(),this.G=null);null!==this.f&&(this.f.destroy(),this.f=null);null!==this.m&&(this.m.destroy(),this.m=null);null!==this.u&&(this.u.destroy(),this.u=null);null!==this.c&&
  (this.c.onDisplayChange.remove(this.Nk,this),this.c.destroy(),this.c=null);null!==this.i&&(this.i.destroy(),this.i=null);null!==this.F&&(this.F.destroy(),this.F=null);null!==this.I&&(this.I.destroy(),this.I=null);this.C=this.A=null;n.prototype.destroy.call(this)};Object.defineProperty(z.prototype,"viewer",{get:function(){return this.j}});Object.defineProperty(z.prototype,"mediaSound",{get:function(){return this.o}});Object.defineProperty(z.prototype,"webGLRenderer",{get:function(){return this.C}});
  Object.defineProperty(z.prototype,"renderPipeline",{get:function(){return this.i}});Object.defineProperty(z.prototype,"backgroundRenderer",{get:function(){return this.f}});Object.defineProperty(z.prototype,"pickingManager",{get:function(){return this.B}});Object.defineProperty(z.prototype,"view",{get:function(){return this.u}});Object.defineProperty(z.prototype,"camera",{get:function(){return this.m}});Object.defineProperty(z.prototype,"canvasResolution",{get:function(){return this.S}});
  Object.defineProperty(z.prototype,"displayResolution",{get:function(){return this.N}});Object.defineProperty(z.prototype,"presentingVR",{get:function(){return this.c.presentingVR}});Object.defineProperty(z.prototype,"display",{get:function(){return this.c}});Object.defineProperty(z.prototype,"backgroundReady",{get:function(){return this.K}});Object.defineProperty(z.prototype,"objects",{get:function(){return this.G}});
  Object.defineProperty(z.prototype,"onBackgroundReady",{get:function(){null===this.H&&(this.H=new r(this,!0));return this.H}});Object.defineProperty(z.prototype,"onBeforeRender",{get:function(){null===this.F&&(this.F=new r(this));return this.F}});Object.defineProperty(z.prototype,"onAfterRender",{get:function(){null===this.I&&(this.I=new r(this));return this.I}});
  function sb(a,b,d,e){this.j=a;this.o=b;this.m=d;this.i=e;this.c=this.f=null;n.call(this,"RenderScene");this.f=new tb(ub.oc,this.j.renderer.webGLRenderer);a=new vb(this.o,this.m);a.position=wb.oc;this.f.addPass(a);a=this.j.postProcessing.ef(this.i);b=0;for(d=a.length;b<d;b++)e=a[b],e.renderToScreen=!1,e.position=wb.oc,this.f.addPass(e);this.c=new tb(ub.ag,this.j.renderer.webGLRenderer);a=new vb(this.o,this.m);a.position=wb.oc;this.c.addPass(a)}sb.prototype=Object.create(n.prototype);
  sb.prototype.constructor=sb;sb.prototype.setSize=function(a,b){this.f.setSize(a,b);this.c.setSize(a,b)};sb.prototype.destroy=function(){this.f.readBuffer.dispose();for(this.f.writeBuffer.dispose();0<this.f.passes.length;){var a=this.f.passes.pop();a instanceof xb&&a.hasOwnProperty("tDiffuse")&&(a.uniforms.tDiffuse.value.texture.dispose(),a.uniforms.tDiffuse.value=null)}this.f=null;this.c.passes.length=0;this.i=this.m=this.o=this.j=this.c=null;n.prototype.destroy.call(this)};
  Object.defineProperty(sb.prototype,"scene",{get:function(){return this.o}});Object.defineProperty(sb.prototype,"camera",{get:function(){return this.m}});Object.defineProperty(sb.prototype,"sceneComposer",{get:function(){return this.f}});Object.defineProperty(sb.prototype,"pickingComposer",{get:function(){return this.c}});function ib(a){this.j=a;this.A=this.c=this.f=null;this.i=!0;n.call(this,"RenderPipeline");this.A=new THREE.Clock;this.c=[];this.f=new tb(ub.sj,this.j.renderer.webGLRenderer)}
  ib.prototype=Object.create(n.prototype);g=ib.prototype;g.constructor=ib;
  function yb(a){if(a.passes.length){for(var b=[],d=0,e=a.passes.length;d<e;d++){var h;h=a.passes[d];h=h instanceof xb?h.hasOwnProperty("map")?"Texture("+h.map.uuid.split("-")[0].slice(0,4)+")":"Texture":h instanceof vb?"Render":h instanceof THREE.ClearMaskPass?"ClearMask":h instanceof THREE.MaskPass?"Mask":h instanceof zb?"Shader("+h.type.replace("Shader","")+")":"Pass";b.push(h)}a=0;for(d=b.length;a<d;a++){e=b[a];for(h=0;h<e.length;h++);if(a<d-1)for(e=0;5>e;e++);}a=0;for(b=b.length;a<b;a++);}}
  function Ab(a){for(var b=0,d=a.c.length;b<d;b++)yb(a.c[b]);yb(a.f)}function Bb(a,b,d){a.c.push(b);!1===d&&(b=new Cb(b),a.f.addPass(b));Db(a)}function Eb(a,b,d){d="undefined"!==typeof d?d:a.passes.length;if(Array.isArray(b))for(var e=b.length-1;0<=e;e--)a.insertPass(b[e],d);else b instanceof THREE.Pass&&a.insertPass(b,d)}
  function Db(a){var b=a.f.passes,d=[];b.filter(function(a,b){a.position===wb.Ud&&d.push(b)});if(0<d.length&&0<d[0]){for(var e=[],h=d.length-1;0<=h;h--){var k=b.splice(d[h],1)[0];e.push(k)}h=0;for(k=e.length;h<k;h++)a.f.insertPass(e[h],0)}var l=[];b.filter(function(a,b){a.position===wb.Nf&&l.push(b)});if(0<l.length&&l[l.length-1]<b.length-1){e=[];h=0;for(k=l.length;h<k;h++){var t=b.splice(l[h],1)[0];e.push(t)}h=0;for(k=e.length;h<k;h++)a.f.addPass(e[h])}e=0;for(h=a.c.length;e<h;e++){var k=a.c[e],t=
  !1,v,C=a.c.length;for(v=0;v<C;v++)if(v!==e&&k.readBuffer===a.c[v].readBuffer){t=!0;break}t=t&&e>v;v=0;for(C=k.passes.length;v<C;v++)k.passes[v].clear=!0===t?!1:!v}e=!1;for(h=b.length-1;0<=h;h--)k=b[h],!0===e?k.renderToScreen=!1:!0===k.enabled&&(e=k.renderToScreen=!0);Ab(a)}g.vh=function(a,b,d){for(var e=0,h=this.c.length;e<h;e++){var k=this.c[e];k.type===ub.ag&&(k.enabled=a,"undefined"!==typeof b&&(k.passes[0].overrideMaterial=b),"undefined"!==typeof d&&(k.renderTarget=d))}};
  g.sh=function(a,b,d){if("undefined"!==typeof b&&null!==b&&0<b.length){b=this.j.postProcessing.ef(b);for(var e=0,h=b.length;e<h;e++)b[e].position=wb.Ud;Eb(this.f,b,0)}a=new xb(a,d);a.position=wb.Ud;this.f.insertPass(a,0);Db(this)};g.gl=function(a){for(var b=0,d=a.length;b<d;b++)Bb(this,a[b].sceneComposer,!1),Bb(this,a[b].pickingComposer,!0);Db(this)};g.fl=function(a){a=this.j.postProcessing.ef(a);for(var b=0,d=a.length;b<d;b++)a[b].position=wb.Nf;Eb(this.f,a);Db(this)};
  g.Up=function(a){if(null!==this.f)for(var b=0,d=this.f.passes.length;b<d;b++){var e=this.f.passes[b];if(e.uid===a)return e}if(null!==this.c)for(b=0,d=this.c.length;b<d;b++)for(var e=this.c[b],h=0,k=e.passes.length;h<k;h++){var l=e.passes[h];if(l.uid===a)return l}return null};
  g.setSize=function(a){for(var b=0,d=this.c.length;b<d;b++){var e=this.c[b];e.setSize(a.width,a.height);for(var h=0,k=e.passes.length;h<k;h++){var l=e.passes[h];l instanceof THREE.ShaderPass&&"undefined"!==typeof l.uniforms.resolution&&(l.uniforms.resolution.value=new THREE.Vector2(1/a.width,1/a.height))}}this.f.setSize(a.width,a.height);h=0;for(k=this.f.passes.length;h<k;h++)l=this.f.passes[h],l instanceof THREE.ShaderPass&&"undefined"!==typeof l.uniforms.resolution&&(l.uniforms.resolution.value=
  new THREE.Vector2(1/a.width,1/a.height))};
  g.render=function(a){if(null!==this.f){if(!(this.f.passes[0]instanceof xb)){var b=document.createElement("canvas");b.width=b.height=1;var d=b.getContext("2d");d.fillStyle="rgb(0, 0, 0)";d.fillRect(0,0,b.width,b.height);b=(new THREE.TextureLoader).load(b.toDataURL());b.name="forge-default-texture";this.sh(b,null,0)}b=0;for(d=this.f.passes.length;b<d;b++){var e=this.f.passes[b];if(e instanceof Cb){var h=e.composer,k=h.passes[h.passes.length-1],l=h.readBuffer.texture;"undefined"!==typeof k&&!0===k.needsSwap&&
  (l=h.writeBuffer.texture);e.uniforms.tAdd.value=l}}b=this.A.getDelta();d=this.c.concat(this.f);e=0;for(h=d.length;e<h;e++)for(var k=d[e],l=0,t=k.passes.length;l<t;l++){var v=k.passes[l];v instanceof vb&&(v.camera=a)}a=0;for(d=this.c.length;a<d;a++)this.c[a].enabled&&this.c[a].render(b);this.f.render(b)}};
  g.Df=function(){if(null!==this.f){this.f.readBuffer.dispose();this.f.writeBuffer.dispose();for(var a=0,b=this.f.passes.length;a<b;a++){var d=this.f.passes[a];d instanceof zb&&d.uniforms.hasOwnProperty("tAdd")&&(d.uniforms.tAdd.value=null)}this.f.passes=[]}this.c=[]};
  g.destroy=function(){this.Df();this.A=null;for(var a=this.c.length-1;0<a;a--){for(var b=this.c[a],d=0,e=b.passes.length;d<e;d++){var h=b.passes[d];"function"===typeof h.destroy&&h.destroy()}b.passes.length=0}this.c=null;d=0;for(e=this.f.passes.length;d<e;d++)h=this.f.passes[d],"function"===typeof h.destroy&&h.destroy();this.f.passes.length=0;this.j=this.f=null};
  Object.defineProperty(ib.prototype,"enabled",{get:function(){return this.i},set:function(a){for(var b=this.c.concat(this.f),d=0,e=b.length;d<e;d++){var h=b[d],k=a;!1===k&&(this.i=!1);for(var l=h.passes.length-1;0<=l;l--){var t=h.passes[l];t instanceof THREE.ShaderPass&&!(t instanceof Cb)&&(t.enabled=k)}h.hasOwnProperty("enabled")&&(h.enabled=k);Db(this)}this.i=a}});
  function gb(a){this.j=a;this.o=this.uc=!1;this.u=this.c=this.A=this.m=this.f=null;this.C=1;this.B=this.i=null;n.call(this,"RenderDisplay");Gb(this)}gb.prototype=Object.create(n.prototype);g=gb.prototype;g.constructor=gb;
  function Gb(a){var b=a.j.renderer.webGLRenderer;a.C=b.getPixelRatio();b=b.getSize();a.u=new Ra(b.width,b.height);a.c=a.u;a.m=[0,0,.5,1];a.A=[.5,0,.5,1];"VRFrameData"in window&&(a.i=new VRFrameData);!0===q.webVR?(navigator.getVRDisplays().then(function(b){a.uc=0<b.length;for(var d=0,h=b.length;d<h;d++)if("VRDisplay"in window&&b[d]instanceof VRDisplay){a.f=b[d];a.f.depthNear=.01;a.f.depthFar=2E4;break}}),Hb(a)):a.warn("missing api navigator.getVRDisplays")}
  function Hb(a){a.j.container.onFullscreenEnter.add(a.Tc,a);a.j.container.onFullscreenExit.add(a.Tc,a);window.addEventListener("vrdisplaypresentchange",a.Tc.bind(a),!1)}
  g.Tc=function(){var a=this.o,b=this.j.renderer.webGLRenderer;this.o="undefined"!==typeof this.f&&(!0===this.f.isPresenting||!1===this.uc&&document[q.fullscreenElement]instanceof window.HTMLElement);if(!0===this.o){var d=this.f.getEyeParameters("left");!0===this.uc&&(this.I=d.renderWidth,this.G=d.renderHeight,this.m=[0,0,.5,1],this.A=[.5,0,.5,1],this.f.getLayers&&(d=this.f.getLayers(),0<d.length&&null!==d[0].leftBounds&&4===d[0].leftBounds.length&&(this.m=d[0].leftBounds,this.A=d[0].rightBounds)));
  !1===a&&(this.C=b.getPixelRatio(),d=b.getSize(),this.u.width=d.width,this.u.height=d.height,this.c=new Ra(2*this.I,this.G),b.setPixelRatio(1))}else!0===a&&(this.c=this.u,b.setPixelRatio(this.C));this.o!==a&&null!==this.B&&this.B.D()};function Ib(a,b){var d=a.j.renderer.webGLRenderer.domElement;new Promise(function(a,h){"undefined"===typeof this.f?h(Error("No VR hardware found.")):this.o===b?a():!0===this.uc&&(b?a(this.f.requestPresent([{source:d}])):a(this.f.exitPresent()))}.bind(a))}
  g.Ui=function(){this.j.raf.stop();this.j.raf.start(this.f);Ib(this,!0)};g.Ti=function(){this.j.raf.stop();this.j.raf.start(window);Ib(this,!1)};g.Bl=function(){if(null===this.f)return null;var a=null;null!==this.i&&"undefined"!==typeof this.i.pose?a=this.i.pose:a=this.f.getPose();if(null===a||null===a.orientation)return new THREE.Quaternion;a=a.orientation;return new THREE.Quaternion(-a[1],-a[0],-a[2],a[3])};
  g.Dl=function(){var a=this.j.renderer.camera,b=[];if("undefined"!==typeof this.f&&null!==this.f&&!0===this.o){var d=this.c.width*this.m[0],e=this.c.height*this.m[1],h=this.c.width*this.m[2],k=this.c.height*this.m[3],l=new Qa(d,e,h,k),d=this.c.width*this.A[0],e=this.c.height*this.A[1],h=this.c.width*this.A[2],k=this.c.height*this.A[3],d=new Qa(d,e,h,k);b.push(new Jb(l,a.left));b.push(new Jb(d,a.right))}else b.push(new Jb(new Qa(0,0,this.u.width,this.u.height),this.j.renderer.view.type===lb.$a?a.flat:
  a.main));return b};g.setSize=function(a){this.u=a;this.j.renderer.webGLRenderer.setPixelRatio(1)};g.Vi=function(){!0===this.uc&&"undefined"!==typeof this.f&&!0===this.o&&!0===this.f.capabilities.hasExternalDisplay&&this.f.submitFrame()};g.destroy=function(){this.j.container.onFullscreenEnter.remove(this.Tc,this);this.j.container.onFullscreenExit.remove(this.Tc,this);window.removeEventListener("vrdisplaypresentchange",this.Tc.bind(this));this.j=this.c=this.A=this.m=this.i=this.f=null};
  Object.defineProperty(gb.prototype,"presentingVR",{get:function(){return this.o}});Object.defineProperty(gb.prototype,"vrDisplay",{get:function(){return this.f}});Object.defineProperty(gb.prototype,"vrFrameData",{get:function(){return null!==this.f&&"function"===typeof this.f.getFrameData&&null!==this.i?(this.f.getFrameData(this.i),this.i):null}});Object.defineProperty(gb.prototype,"rendererSize",{get:function(){return this.c}});
  Object.defineProperty(gb.prototype,"onDisplayChange",{get:function(){null===this.B&&(this.B=new r(this));return this.B}});function Jb(a,b){this.f=a||null;this.m=b||null}Jb.prototype.constructor=Jb;Object.defineProperty(Jb.prototype,"rectangle",{get:function(){return this.f}});Object.defineProperty(Jb.prototype,"camera",{get:function(){return this.m}});
  function P(a,b,d,e){this.j=a;this.J=this.m=this.o=this.i=this.Ca=null;this.H=d.jq||Sa.rd;this.C=b||null;n.call(this,e||"BackgroundRenderer");this.Cc()}P.prototype=Object.create(n.prototype);g=P.prototype;g.constructor=P;
  g.Cc=function(){this.o=new THREE.Scene;this.o.name="Background scene";null===this.C&&(this.C=new THREE.WebGLRenderTarget(this.j.renderer.canvasResolution.width,this.j.renderer.canvasResolution.height,{minFilter:THREE.LinearFilter,magFilter:THREE.LinearFilter,format:THREE.RGBAFormat,Jq:!1}));this.J=new THREE.Frustum};g.fh=function(){throw"Please implement "+this.Wa+"::_setDisplayObject";};g.Hc=function(){throw"Please implement "+this.Wa+"::_clear";};
  g.bc=function(){throw Error(this.Wa+"::updateAfterViewChange not implemented");};g.setSize=function(a){null!==this.renderTarget&&this.renderTarget.setSize(a.width,a.height)};
  g.render=function(a){if(null!==this.j.renderer&&null!==this.C){if(null!==this.c&&null!==this.A&&null!==this.I&&"undefined"!==typeof this.L&&null!==this.L&&null!==this.L.element&&(!0!==D.P(this.L,["VideoHTML5","VideoDash"])||!1!==this.L.playing)){var b=this.L.element;b instanceof HTMLVideoElement&&b.readyState===HTMLMediaElement.HAVE_ENOUGH_DATA&&this.I&&(this.I.drawImage(b,0,0,b.videoWidth,b.videoHeight,0,0,this.A.width,this.A.height),this.c.needsUpdate=!0)}a=null!==a?a:this.m;this.J.setFromMatrix((new THREE.Matrix4).multiplyMatrices(a.projectionMatrix,
  a.matrixWorldInverse));this.j.renderer.webGLRenderer.render(this.o,a,this.C,!0)}};g.Sl=function(a){return this.J.intersectsObject(a)};g.Tl=function(a){return void 0!==this.o.getObjectByName(a.name)};
  g.update=function(){if(null!==this.i&&this.i.material instanceof THREE.ShaderMaterial){var a=this.j.renderer.displayResolution;this.i.material.uniforms.hasOwnProperty("tViewportResolution")&&(this.i.material.uniforms.tViewportResolution.value=new THREE.Vector2(a.width,a.height));this.i.material.uniforms.hasOwnProperty("tViewportResolutionRatio")&&(this.i.material.uniforms.tViewportResolutionRatio.value=a.ratio);this.i.material.uniforms.hasOwnProperty("tModelViewMatrixInverse")&&(this.i.material.uniforms.tModelViewMatrixInverse.value=
  this.j.renderer.camera.modelViewInverse);this.j.renderer.view.current.qb(this.i.material.uniforms)}else this.j.renderer.view.current.qb()};g.destroy=function(){this.J=this.m=null;null!==this.C&&(this.C.dispose(),this.C=null);for(;0<this.o.children.length;){var a=this.o.children.pop();null!==a.geometry&&(a.geometry.dispose(),a.geometry=null);this.o.remove(a)}this.j=this.o=null;n.prototype.destroy.call(this)};
  Object.defineProperty(P.prototype,"textureSize",{get:function(){return null===this.c||"undefined"===typeof this.c.image?null:new Ra(this.c.image.width,this.c.image.height)}});Object.defineProperty(P.prototype,"renderTarget",{get:function(){return this.C}});Object.defineProperty(P.prototype,"displayObject",{get:function(){return this.L},set:function(a){null===a?this.Hc():this.fh(a)}});Object.defineProperty(P.prototype,"scene",{get:function(){return this.o}});
  Object.defineProperty(P.prototype,"frustum",{get:function(){return this.J}});var db={Pb:"undefined",oe:"shader",Vc:"mesh",hg:"pyramid"};function rb(a,b,d){this.I=this.A=this.c=this.L=null;this.F=d.type||G.Fc;this.S=d.Bq||90;this.K=d.color||"#ffffff";this.O=d.order||"RLUDFB";this.u=new THREE.Vector2(0,0);this.N=d.tile||512;this.f=this.B=0;this.G=1;P.call(this,a,b,d,"BackgroundMeshRenderer")}rb.prototype=Object.create(P.prototype);g=rb.prototype;g.constructor=rb;
  g.Cc=function(){P.prototype.Cc.call(this);this.m=this.j.renderer.camera.main;this.B=2E4;this.f=32};
  g.fh=function(a){null===this.i&&Kb(this);this.L=a;if(D.P(a,"Image"))this.c=new THREE.Texture,this.c.image=a.element;else if(D.P(a,"Canvas"))this.c=new THREE.Texture,this.c.image=a.element;else if(D.P(a,["VideoHTML5","VideoDash"]))"safari"===q.browser.toLowerCase()&&1440<a.originalHeight&&(this.G=2),this.A=document.createElement("canvas"),this.A.width=a.originalWidth/this.G,this.A.height=a.originalHeight/this.G,this.I=this.A.getContext("2d"),this.c=new THREE.Texture(this.A);else throw"Wrong type of display object "+
  a.type;this.c.format=THREE.RGBAFormat;this.c.mapping=THREE.Texture.DEFAULT_MAPPING;"undefined"!==typeof this.i.material.uniforms.tTextureRatio&&(this.i.material.uniforms.tTextureRatio.value=this.c.image.width/this.c.image.height);this.c.generateMipmaps=!1;this.c.minFilter=THREE.LinearFilter;if(this.H===Sa.$a){H.Hd(a.width)&&H.Hd(a.height)&&(this.c.generateMipmaps=!0,this.c.minFilter=THREE.LinearMipMapLinearFilter);null!=this.i.geometry&&(this.i.geometry.dispose(),this.i.geometry=null);var b=this.B,
  d=Math.round(b/(a.width/a.height));a=d/(2*Math.tan(.5*this.S));b=new THREE.PlaneBufferGeometry(b,d);this.i.geometry=b;this.i.position.set(0,0,-a)}this.c.needsUpdate=!0;this.i.material.nf=!1;null!==this.c.image&&(this.u.x=this.c.image.width/this.N,this.u.y=this.c.image.height/this.N);this.i.onBeforeRender=this.nm.bind(this);if(this.i.geometry instanceof THREE.BoxBufferGeometry)b=Lb(this);else if(this.i.geometry instanceof THREE.SphereBufferGeometry){b=new Float32Array(this.i.geometry.attributes.uv.array.byteLength/
  4);a=b.keys();var d=this.f,e=1/d,h,k;for(k=0;k<=d;k++){var l=k*e;for(h=0;h<=d;h++){var t=h*e;b[a.next().value]=1-t;b[a.next().value]=1-l}}}else b=null;null!==b&&this.i.geometry.attributes.uv.set(b)};g.nm=function(){"undefined"!==typeof this.i.material.uniforms&&(this.i.material.uniforms.hasOwnProperty("tTexture")&&(this.i.material.uniforms.tTexture.value=this.c),this.i.material.uniforms.hasOwnProperty("tOpacity")&&(this.i.material.uniforms.tOpacity.value=1))};
  function Lb(a){function b(a,b,h,mb,pc){if(-1===a)throw"Unknown face for cube mapping.";var C,ea=a%b/b;a=1-(1+parseInt(a/b,10))/h;if(pc)for(pc=0,h=mb;pc<=h;pc++)for(b=0,C=mb;b<=C;b++)d[e.next().value]=t+k*b+ea,d[e.next().value]=v+l*pc+a;else for(pc=0,h=mb;pc<=h;h--)for(b=0,C=mb;b<=C;C--)d[e.next().value]=t+k*C+ea,d[e.next().value]=v+l*h+a}var d=new Float32Array((a.f+1)*(a.f+1)*12),e=D.th(d),h=a.O.split(""),k=1/1.01*(1/a.u.x/a.f),l=1/1.01*(1/a.u.y/a.f),t=1/a.u.x*.005,v=1/a.u.y*.005;b(h.indexOf("R"),
  a.u.x,a.u.y,a.f);b(h.indexOf("L"),a.u.x,a.u.y,a.f);b(h.indexOf("U"),a.u.x,a.u.y,a.f,!0);b(h.indexOf("D"),a.u.x,a.u.y,a.f,!0);b(h.indexOf("B"),a.u.x,a.u.y,a.f);b(h.indexOf("F"),a.u.x,a.u.y,a.f);return d}g.Hc=function(){this.j.renderer.webGLRenderer.clearColor()};
  function Kb(a){if(null!==a.j.renderer.view.current){var b;a.F===G.Fc?(b=D.clone(a.j.renderer.view.current.shaderWTS).nf,a.f=8):b=D.clone(a.j.renderer.view.current.shaderWTS).mapping;var d=Mb.pb(b.vertexShader),e=Mb.pb(b.fragmentShader);b=new THREE.RawShaderMaterial({fragmentShader:e,vertexShader:d,uniforms:b.uniforms,name:"BackgroundMeshMaterial",transparent:!0,side:THREE.BackSide});d=null;null!==a.c&&(a.i.material.uniforms.hasOwnProperty("tTexture")&&(b.uniforms.tTexture.value=a.c),a.i.material.uniforms.hasOwnProperty("tTextureRatio")&&
  (b.uniforms.tTextureRatio.value=a.c.image.width/a.c.image.height));a.F===G.Fc&&(b.uniforms.tColor.value=new THREE.Color(a.K),b.M=THREE.CustomBlending,b.c=THREE.AddEquation,b.i=THREE.SrcAlphaFactor,b.f=THREE.OneMinusSrcAlphaFactor);if(0===a.o.children.length){a.H===Sa.Ec?(a.f=64,d=new THREE.SphereBufferGeometry(a.B,a.f,a.f)):a.H===Sa.$a?d=new THREE.PlaneBufferGeometry(a.B,a.B):d=new THREE.BoxBufferGeometry(a.B,a.B,a.B,a.f,a.f,a.f);a.i=new THREE.Mesh(d,b);if(a.F===G.Fc&&null!==a.i&&"undefined"!==typeof a.i.geometry){for(var d=
  new Int8Array(2*a.i.geometry.attributes.position.array.length/3),e=D.th(d),h=new THREE.Vector2(1,1),k=new THREE.Vector2(1,-1),l=new THREE.Vector2(-1,1),t=new THREE.Vector2(-1,-1),v=a.f+1,C=0;6>C;C++)for(var ea=0;ea<v;ea++){var Fb,mb;ea&1?(Fb=h,mb=k):(Fb=l,mb=t);for(var pc=0;pc<v;pc++)pc&1?(d[e.next().value]=mb.x,d[e.next().value]=mb.y):(d[e.next().value]=Fb.x,d[e.next().value]=Fb.y)}a.i.geometry.addAttribute("quadrilateralCoords",new THREE.BufferAttribute(d,2))}a.H===Sa.$a&&(a.i.position.set(0,0,
  .5*-a.B),a.i.material.side=THREE.FrontSide);a.H===Sa.Ec&&a.i.rotation.set(0,Math.PI/2,0,"YXZ");a.o.add(a.i)}else a.i=a.o.children[0],a.i.material.dispose();a.i.material=b;b.needsUpdate=!0}}g.bc=function(){Kb(this);"undefined"!==typeof this.i.material.uniforms.tTextureRatio&&(this.i.material.uniforms.tTextureRatio.value=this.c.image.width/this.c.image.height)};g.render=function(a){null!==this.j.renderer&&P.prototype.render.call(this,a)};
  g.destroy=function(){this.Hc();this.I=this.A=this.L=null;null!==this.i&&(null!==this.i.geometry&&(this.i.geometry.dispose(),this.i.geometry=null),null!==this.i.material&&(this.i.material.dispose(),this.i.material=null),this.i=null);null!==this.c&&(this.c.dispose(),this.c=null);P.prototype.destroy.call(this)};Object.defineProperty(rb.prototype,"texture",{get:function(){return this.c}});
  function O(a,b,d){this.f=d;this.N=this.B=0;this.u=this.S=null;this.X=this.K=0;this.G=this.O=this.F=null;this.aa="";P.call(this,a,b,d,"BackgroundPyramidRenderer")}O.prototype=Object.create(P.prototype);g=O.prototype;g.constructor=O;
  g.Cc=function(){P.prototype.Cc.call(this);var a=this.f;this.F=[];if("undefined"!==typeof this.f.source.levels)for(var b,d=0,e=this.f.source.levels.length;d<e;d++)b=this.f.source.levels[d],this.F.push({x:b.width/b.tile,y:b.height/b.tile});this.X=1.01*H.T(90/this.F[a.source.levels.length-1].y);this.N=2E4;this.u={};this.S=this.j.story.scene.media.store;this.m=this.j.renderer.camera.main;this.j.camera.onChange.add(this.sk,this);"undefined"!==typeof this.f.preview&&Nb(this);for(a=0;6>a;a++)for(b=Object.keys(Wa)[a],
  d=0,e=this.Na(0,"y");d<e;d++)for(var h=0,k=this.Na(0,"x");h<k;h++)this.wc(null,0,b,h,d)};function Nb(a){for(var b=0;6>b;b++){var d=Object.keys(Wa)[b];a.wc(null,Va,d,0,0)}"undefined"!==typeof a.u[Va]&&a.u[Va].forEach(function(a){this.o.add(a)}.bind(a))}g.Hc=function(){this.j.renderer.webGLRenderer.clearColor()};g.bc=function(){this.j.view.type!==lb.Eb&&(this.warn("Only Rectilinear view is supported for multi resolution scene"),this.j.view.type=lb.Eb)};
  function Ob(a,b){var d=Math.floor(180/b);b=a.F.findIndex(function(a){return a.y>=d});-1===b&&(b=a.F.length-1);return Math.max(0,b)}g.sk=function(a){a=Ob(this,a.emitter.fov);this.B!==a&&this.fm(a)};g.Bk=function(a){a=a.emitter;a.onDestroy.remove(this.Bk,this);this.u[a.level].delete(a.name);this.o.remove(a)};
  function Pb(a){var b=[],d=Date.now();a.o.children.forEach(function(a){var e=a.level===Va,k=0===a.level,e=a.level!==this.B&&!e&&!k,k=!0===a.textureIsSet,l=-1!==this.G.indexOf(a),t=d-a.createTS,v=d-a.displayTS,v=null!==a.displayTS&&3E3<v,t=null===a.displayTS&&2E3<t||v;(a.level>this.B||e&&t&&k&&!l)&&b.push(a)}.bind(a));b.forEach(function(a){this.o.remove(a)}.bind(a))}
  g.Al=function(a){if(a.level===Va)return null;if(0===a.level)return this.wc(null,Va,a.face,0,0);var b,d=a.level;b=(new THREE.Vector2(a.x,a.y)).divide(new THREE.Vector2(this.Na(d,"x"),this.Na(d,"y")));var d=a.level-1,e=this.Na(d,"x"),h=this.Na(d,"y");b=new THREE.Vector2(Math.min(Math.floor(e*b.x),Math.ceil(e)-1),Math.min(Math.floor(h*b.y),Math.ceil(h)-1));return this.wc(null,d,a.face,b.x,b.y)};
  g.wc=function(a,b,d,e,h){"undefined"===typeof this.u[b]&&(this.u[b]=new Map);var k=Qb(d,b,e,h),l=this.u[b].get(k);"undefined"===typeof l&&(l=new Rb(a,this,e,h,b,d),l.onDestroy.add(this.Bk,this),this.u[b].set(k,l));-1===this.o.children.indexOf(l)&&this.o.add(l);return l};g.Na=function(a,b){if(null===this.F||a===Va)return 1;var d=this.F[a];if("undefined"!==typeof d){if("x"===b)return d.x;if("y"===b)return d.y}return Math.pow(2,a)};g.Xl=function(a){return 6*this.Na(a,"x")*this.Na(a,"y")};
  g.wq=function(a){return new Ra(this.N/this.Na(a,"x"),this.N/this.Na(a,"y"))};
  g.fm=function(a){this.B=a;"undefined"!==typeof this.u[this.B]&&this.u[this.B].forEach(function(a){this.o.add(a)}.bind(this));a===Va?(a=this.f.preview,a.width=a.tile,a.height=a.tile):a=this.f.source.levels[a];this.K=this.Xl(this.B)*a.width*a.height;a={3:"kilo",6:"mega",9:"giga",12:"tera",15:"peta",18:"exa",21:"zetta",24:"yotta"};var b=3*Math.floor(Math.log(this.K)/(3*Math.LN10)),d=this.K/Math.pow(10,b),e="";27<=b?e=" too many ":3<=b&&(e=" "+a[b]);this.aa=d.toFixed(1)+e+"pixels"};
  g.hl=function(a){this.O.push(a);a.level===this.B&&(this.G=this.G.concat(a.neighbours))};g.render=function(a){this.O=[];this.G=[];P.prototype.render.call(this,a);this.G=D.ll(this.G);Pb(this)};g.destroy=function(){this.j.camera.onChange.remove(this.sk,this);this.Hc();var a,b;for(b in this.u){for(;this.u[b].length;)a=this.u[b].pop(),a.destroy();this.u[b]=null}this.u=this.S=null;this.G.length=0;this.G=null;this.O.length=0;this.f=this.O=null;P.prototype.destroy.call(this)};
  Object.defineProperty(O.prototype,"cubeSize",{get:function(){return this.N}});Object.defineProperty(O.prototype,"textureStore",{get:function(){return this.S}});Object.defineProperty(O.prototype,"levelMax",{get:function(){return this.f.source.levels.length-1}});Object.defineProperty(O.prototype,"level",{get:function(){return this.B}});Object.defineProperty(O.prototype,"pixelsAtCurrentLevel",{get:function(){return this.K}});Object.defineProperty(O.prototype,"pixelsAtCurrentLevelHumanReadable",{get:function(){return this.aa}});
  Object.defineProperty(O.prototype,"fovMin",{get:function(){return this.X}});Object.defineProperty(O.prototype,"tilesOnAxisX",{get:function(){return this.Na(this.B,"x")}});Object.defineProperty(O.prototype,"tilesOnAxisY",{get:function(){return this.Na(this.B,"y")}});function qb(a,b,d){this.I=this.A=this.c=this.L=null;this.f=1;P.call(this,a,b,d,"BackgroundShaderRenderer")}qb.prototype=Object.create(P.prototype);g=qb.prototype;g.constructor=qb;
  g.Cc=function(){P.prototype.Cc.call(this);Sb(this);this.m=new THREE.OrthographicCamera(-1,1,1,-1,-1,1)};
  g.fh=function(a){this.L=a;if(D.P(a,"Image")||D.P(a,"Canvas"))this.c=new THREE.Texture,this.c.image=a.element;else if(D.P(a,["VideoHTML5","VideoDash"]))"safari"===q.browser.toLowerCase()&&1440<a.originalHeight&&(this.f=2),this.L.onQualityChange.has(this.md,this)&&this.L.onQualityChange.remove(this.md,this),this.L.onQualityChange.add(this.md,this),this.A=document.createElement("canvas"),this.A.width=a.originalWidth/this.f,this.A.height=a.originalHeight/this.f,this.I=this.A.getContext("2d"),this.c=new THREE.Texture(this.A);
  else throw"Wrong type of display object "+a.Fq;this.c.format=THREE.RGBFormat;this.c.mapping=THREE.Texture.DEFAULT_MAPPING;this.c.magFilter=THREE.LinearFilter;this.c.wrapS=THREE.ClampToEdgeWrapping;this.c.wrapT=THREE.ClampToEdgeWrapping;this.c.generateMipmaps=!1;this.c.minFilter=THREE.LinearFilter;this.H===Sa.$a&&H.Hd(a.width)&&H.Hd(a.height)&&(this.c.generateMipmaps=!0,this.c.minFilter=THREE.LinearMipMapLinearFilter);this.c.needsUpdate=!0;this.i.material.uniforms.tTexture.value=this.c;this.i.material.uniforms.hasOwnProperty("tTextureRatio")&&
  (this.i.material.uniforms.tTextureRatio.value=this.c.image.width/this.c.image.height);this.i.material.uniforms.hasOwnProperty("tTextureSize")&&(this.i.material.uniforms.tTextureSize.value=new THREE.Vector2(this.c.image.width,this.c.image.height))};g.md=function(a){a=a.emitter;this.A.width=a.originalWidth/this.f;this.A.height=a.originalHeight/this.f};
  function Sb(a){var b=a.j.renderer.view.current.shaderSTW,d=Mb.pb(b.vertexShader),e=Mb.pb(b.fragmentShader),b=new THREE.ShaderMaterial({uniforms:b.uniforms,vertexShader:d,fragmentShader:e,side:THREE.FrontSide});null!==a.c&&(b.uniforms.tTexture.value=a.c);0===a.o.children.length?(d=new THREE.PlaneBufferGeometry(2,2),a.i=new THREE.Mesh(d,b),a.o.add(a.i)):(a.i=a.o.children[0],a.i.material=null);a.i.material=b;b.needsUpdate=!0}g.Hc=function(){this.j.renderer.webGLRenderer.clearColor()};
  g.render=function(){null!==this.j.renderer&&P.prototype.render.call(this,null)};g.bc=function(){Sb(this);null!==this.c&&"undefined"!==typeof this.c.image&&(this.i.material.uniforms.hasOwnProperty("tTextureRatio")&&(this.i.material.uniforms.tTextureRatio.value=this.c.image.width/this.c.image.height),this.i.material.uniforms.hasOwnProperty("tTextureSize")&&(this.i.material.uniforms.tTextureSize.value=new THREE.Vector2(this.c.image.width,this.c.image.height)))};
  g.destroy=function(){this.Hc();"undefined"!==typeof this.L.onQualityChange&&this.L.onQualityChange.has(this.md,this)&&this.L.onQualityChange.remove(this.md,this);this.I=this.A=this.L=null;null!==this.c&&(this.c.dispose(),this.c=null);P.prototype.destroy.call(this)};Object.defineProperty(qb.prototype,"texture",{get:function(){return this.c}});function ua(a){this.j=a;this.c=this.f=null;n.call(this,"PostProcessing");this.c={}}ua.prototype=Object.create(n.prototype);g=ua.prototype;g.constructor=ua;
  g.ef=function(a){if("undefined"===typeof a||null===a||!a.length)return[];for(var b=[],d=0,e=a.length;d<e;d++){var h=a[d];if(THREE.hasOwnProperty(h.type)){var k=null;if(-1!=h.type.indexOf("Shader")){var k=void 0,l=h,h=new zb(l.uid,l.type,THREE[l.type]);if("undefined"!==typeof h.uniforms)for(k in l.params){var t=l.params[k],v=t;if("object"===typeof t&&t.hasOwnProperty("type")&&t.hasOwnProperty("args")){var C=t.args;switch(t.type){case "THREE.Color":if(3===C.length)v=new THREE.Color(C[0],C[1],C[2]);
  else if("string"===typeof C||"number"===typeof C)v=new THREE.Color(C);else throw Error("Cannot create THREE.Color with "+typeof C+" (length "+C.length+")");break;case "THREE.Vector2":v=new THREE.Vector2(C[0],C[1]);break;case "THREE.Vector3":v=new THREE.Vector3(C[0],C[1],C[2])}}h.uniforms[k].value=v}k=h}else if(-1!=h.type.indexOf("Pass")){l=k=void 0;t=THREE[h.type];v=[];if("undefined"!==typeof h.args)if(h.args instanceof Array)v=[null].concat(h.args);else for(l in v=[null],h.args)v.push(h.args[l]);
  l=new (Function.prototype.bind.apply(t,v));l.uid=h.uid;if("undefined"!==typeof h.params)for(k in h.params)l[k]=h.params[k];k=l}null!==k&&b.push(k)}else this.warn("Unknown image effect ("+h.type+")")}return b};g.Te=function(a){return this.c[a]};g.ia=function(a){a=this.f=a;this.M=a.uid;if("undefined"!==typeof a.fxSets&&0<a.fxSets.length)for(var b=0,d=a.fxSets.length;b<d;b++){var e=a.fxSets[b];this.c[e.uid]=e.set}};g.destroy=function(){this.c=this.j=null};var ub={sj:"main",oc:"render",ag:"picking"};
  function tb(a,b,d){this.M=a||ub.oc;this.i="";this.c=!0;this.f=0;THREE.EffectComposer.call(this,b,d);this.i=Tb(this.M)}tb.prototype=Object.create(THREE.EffectComposer.prototype);tb.prototype.constructor=tb;tb.prototype.render=function(a){for(var b=this.f+=a,d=0,e=this.passes.length;d<e;d++){var h=this.passes[d];"undefined"!==typeof h.uniforms&&"undefined"!==typeof h.uniforms.time&&(h.uniforms.time.value=b);"undefined"!==typeof h.time&&(h.time=b)}THREE.EffectComposer.prototype.render.call(this,a)};
  tb.prototype.destroy=function(){this.writeBuffer.dispose();this.writeBuffer=null;this.readBuffer.dispose();this.readBuffer=null};tb.uid=0;function Tb(a){return"$_EffectComposer."+a+"."+tb.uid++}Object.defineProperty(tb.prototype,"type",{get:function(){return this.M}});Object.defineProperty(tb.prototype,"renderTarget",{get:function(){return this.readBuffer},set:function(a){null!==this.readBuffer&&this.readBuffer.dispose();this.readBuffer=a}});
  Object.defineProperty(tb.prototype,"enabled",{get:function(){return this.c},set:function(a){this.c=a}});Object.defineProperty(tb.prototype,"name",{get:function(){return this.i}});var wb={te:"",Ud:"background",oc:"render",Nf:"global"};function xb(a,b){this.i="";THREE.TexturePass.call(this,a,b)}xb.prototype=Object.create(THREE.TexturePass.prototype);xb.prototype.constructor=xb;Object.defineProperty(xb.prototype,"position",{get:function(){return this.i},set:function(a){this.i=a}});
  function zb(a,b,d,e){this.o=a;this.m=b||"shader";this.i=wb.te;this.c=0;THREE.ShaderPass.call(this,d,e||"tDiffuse")}zb.prototype=Object.create(THREE.ShaderPass.prototype);zb.prototype.constructor=zb;zb.prototype.render=function(a,b,d,e,h){this.c+=e;this.uniforms.hasOwnProperty("time")&&(this.uniforms.time.value=this.c);THREE.ShaderPass.prototype.render.call(this,a,b,d,e,h)};Object.defineProperty(zb.prototype,"uid",{get:function(){return this.o}});Object.defineProperty(zb.prototype,"type",{get:function(){return this.m}});
  Object.defineProperty(zb.prototype,"position",{get:function(){return this.i},set:function(a){this.i=a}});function Cb(a){this.M=a;this.f=null;a=Mb.pb(Ub.wts_vert_rectilinear);var b=Mb.pb(Ub.wts_frag_addition);this.f=new THREE.RawShaderMaterial({fragmentShader:b,vertexShader:a,uniforms:{tTexture:{type:"t",value:null},tAdd:{type:"t",value:null}},side:THREE.FrontSide,name:"$_AdditionPassMaterial"});zb.call(this,"","Addition",this.f,"tTexture")}Cb.prototype=Object.create(zb.prototype);
  Cb.prototype.constructor=Cb;Cb.prototype.destroy=function(){null===this.f&&(this.f.dispose(),this.f=null);this.M=null};Object.defineProperty(Cb.prototype,"composer",{get:function(){return this.M}});function vb(a,b,d,e,h){this.i="";THREE.RenderPass.call(this,a,b,d,e,h)}vb.prototype=Object.create(THREE.RenderPass.prototype);vb.prototype.constructor=vb;Object.defineProperty(vb.prototype,"position",{get:function(){return this.i},set:function(a){this.i=a}});
  var Ub={coordinates:"\nvec3 toCartesian(in vec3 rtp) {\n    float r = rtp.x;\n    float theta = rtp.y;\n    float phi = rtp.z;\n    float x = r * cos(phi) * sin(theta);\n    float y = r * sin(phi);\n    float z = r * cos(phi) * cos(theta);\n    return vec3(x,y,z);\n}\nvec3 toSpherical(in vec3 pt) {\n    float r = length(pt);\n    float theta = -atan(pt.x, pt.z);\n    float phi = asin(pt.y / r);\n    return vec3(r,theta,phi);\n}\n",defines:"precision highp float;\nprecision highp int;\n#define PI_2  1.5707963268\n#define PI  3.141592653589793\n#define PI2 6.28318530717959\n#define RECIPROCAL_PI2 0.1591549430919\n#define isTrue(a) ((a) != 0)\n",
  helpers:"\nfloat wrap(in float x, in float min, in float max) {\n    return x - ((max - min) * (1.0 - step(x, min) - step(x, max)));\n}\nvec2 getFragment() {\n    return (2.0 * gl_FragCoord.xy / tViewportResolution - 1.0) * vec2(tViewportResolutionRatio, 1.0);\n}\nvec2 smoothTexUV(vec2 uv, vec2 texSize) {\n    uv = uv * texSize + 0.5;\n    vec2 iuv = floor(uv);\n    vec2 fuv = uv - iuv;\n    uv = iuv + fuv * fuv * fuv * (fuv * (fuv * 6.0 - 15.0) + 10.0);\n    return (uv - 0.5) / texSize;\n}\n",texcoords:"\nvec2 toEquirectangularTexCoords(in vec2 thetaphi) {\n    thetaphi.x = wrap(thetaphi.x + PI, -PI, PI);\n    vec2 coords = 0.5 + thetaphi / vec2(PI2, PI);\n    return coords;\n}\n",
  uniforms:"uniform mat4 modelMatrix;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 cameraPosition;\n",vert_attributes:"attribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\n",vert_attributes_wireframe:"attribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\nattribute vec2 quadrilateralCoords;\n",stw_frag_proj_flat:"\n#include <defines>\nuniform sampler2D tTexture;\nuniform vec2 tViewportResolution;\nuniform float tViewportResolutionRatio;\nuniform float tTextureRatio;\nuniform float tFov;\nuniform float tYaw;\nuniform float tPitch;\nuniform int tRepeatX;\nuniform int tRepeatY;\n#include <helpers>\n#include <coordinates>\n#include <texcoords>\nvoid main() {\n    vec2 sTexResolution = PI * vec2(tTextureRatio, 1.0);\n    vec2 sReference = vec2(tYaw, tPitch) + sTexResolution / 2.0;\n    vec2 sTexel = sReference + (tFov * 0.5) * getFragment();\n    vec2 uv = sTexel / sTexResolution;\n    if (isTrue(tRepeatX)) {\n        uv.x = mod(uv.x, 1.0);\n    }\n    else if (uv.x > 1.0 || uv.x < 0.0) {\n        discard;\n    }\n    if (isTrue(tRepeatY)) {\n        uv.y = mod(uv.y, 1.0);\n    }\n    else if (uv.y > 1.0 || uv.y < 0.0) {\n        discard;\n    }\n    gl_FragColor = vec4(texture2D(tTexture, uv).rgb, 1.0);\n}\n",
  stw_frag_proj_gopro:"\n#include <defines>\nuniform sampler2D tTexture;\nuniform vec2 tViewportResolution;\nuniform float tViewportResolutionRatio;\nuniform mat4 tModelViewMatrixInverse;\nuniform float tProjectionDistance;\nuniform float tProjectionScale;\n#include <helpers>\n#include <coordinates>\n#include <texcoords>\nvec2 projection() {\n    vec2 frag = getFragment();\n    vec2 c = tProjectionScale * frag;\n    float zs = tProjectionDistance;\n    float xy2 = dot(c,c);\n    float zs12 = (zs + 1.0) * (zs + 1.0);\n    float delta = 4.0 * (zs * zs * xy2 * xy2 - (xy2 + zs12) * (xy2 * zs * zs - zs12));\n    if (delta < 0.0) { return vec2(-1.); }\n    float z = (2.0 * zs * xy2 - sqrt(delta)) / (2.0 * (zs12 + xy2));\n    float x = c.x * ((zs - z) / (zs + 1.0));\n    float y = c.y * ((zs - z) / (zs + 1.0));\n    vec3 vx = vec3(tModelViewMatrixInverse * vec4(x, y, z, 1.0));\n    return toSpherical(vx).yz;\n}\nvoid main() {\n    vec2 texCoords = toEquirectangularTexCoords(projection());\n    gl_FragColor = vec4(texture2D(tTexture, texCoords).rgb, 1.0);\n}\n",
  stw_frag_proj_rectilinear:"\n#include <defines>\nuniform sampler2D tTexture;\nuniform vec2 tViewportResolution;\nuniform float tViewportResolutionRatio;\nuniform mat4 tModelViewMatrixInverse;\nuniform float tProjectionScale;\n#include <helpers>\n#include <coordinates>\n#include <texcoords>\nvec2 projection() {\n    vec2 frag = tProjectionScale * getFragment();\n    vec4 screenPT = vec4(frag, -1.0, 1.0);\n    vec4 worldPT = tModelViewMatrixInverse * screenPT;\n    return toSpherical(worldPT.xyz).yz;\n}\nvoid main() {\n    vec2 texCoords = toEquirectangularTexCoords(projection());\n    gl_FragColor = vec4(texture2D(tTexture, texCoords).rgb, 1.0);\n}\n",
  stw_vert_proj:"\n#include <defines>\nvoid main() {\n   gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}\n",wts_frag:"\n#include <defines>\nuniform sampler2D tTexture;\nuniform float tOpacity;\nvarying vec2 vUv;\nvoid main() {\n    vec4 texel = texture2D( tTexture, vUv );\n    gl_FragColor = vec4(texel.rgb, texel.a * tOpacity);\n}\n",wts_frag_addition:"\n#include <defines>\nuniform sampler2D tTexture;\nuniform sampler2D tAdd;\nvarying vec2 vUv;\nvoid main() {\n    vec4 texel = texture2D( tTexture, vUv );\n    vec4 texelAdd = texture2D( tAdd, vUv );\n    float alpha = max(texel.a, texelAdd.a);\n    gl_FragColor = vec4(vec3(texelAdd.a * texelAdd.rgb + (1.0 - texelAdd.a) * texel.rgb), alpha);\n}\n",
  wts_frag_color:"\n#include <defines>\nuniform vec3 tColor;\nuniform float tOpacity;\nvarying vec2 vUv;\nvoid main() {\n    vec2 texCoords = vUv;\n    gl_FragColor = vec4(tColor, tOpacity);\n}\n",wts_frag_wireframe:"\n#extension GL_OES_standard_derivatives : enable \n#include <defines>\n#define WIRE_THICKNESS 1.50\nuniform vec3 tColor;\nvarying vec2 vQuadrilateralCoords;\nvoid main() {\n    vec2 dfdx = dFdx(vQuadrilateralCoords);\n    vec2 dfdy = dFdy(vQuadrilateralCoords);\n    vec2 threshold = vec2(WIRE_THICKNESS * sqrt(dfdx * dfdx + dfdy * dfdy));\n    vec2 amount = smoothstep(vec2(0.0), WIRE_THICKNESS * threshold, vec2(1.0) - abs(vQuadrilateralCoords));\n    float alpha = 1.0 - amount.x * amount.y;\n    gl_FragColor = vec4(tColor.rgb, alpha);\n}\n",
  wts_vert_gopro:"\n#include <defines>\n#include <vert_attributes>\n#include <uniforms>\nuniform float tProjectionDistance;\nvarying vec2 vUv;\nvoid main() {\n    vec4 spherePt = normalize(modelViewMatrix * vec4( position, 1.0 ));\n    float radius = 1.0 - 0.5 * tProjectionDistance;\n    float offset = radius - 1.0;\n    spherePt.xyz *= radius;\n    spherePt.z += offset;\n    gl_Position = projectionMatrix * spherePt;\n    vUv = uv;\n}\n",wts_vert_gopro_wireframe:"\n#include <defines>\n#include <vert_attributes_wireframe>\n#include <uniforms>\nuniform float tProjectionDistance;\nvarying vec2 vQuadrilateralCoords;\nvoid main() {\n    vec4 spherePt = normalize(modelViewMatrix * vec4( position, 1.0 ));\n    float radius = 1.0 - 0.5 * tProjectionDistance;\n    float offset = radius - 1.0;\n    spherePt.xyz *= radius;\n    spherePt.z += offset;\n    gl_Position = projectionMatrix * spherePt;\n    vQuadrilateralCoords = quadrilateralCoords;\n}\n",
  wts_vert_rectilinear:"\n#include <defines>\n#include <vert_attributes>\n#include <uniforms>\nvarying vec2 vUv;\nvoid main() {\n    vec4 camPt = modelViewMatrix * vec4( position, 1.0 );\n    gl_Position = projectionMatrix * camPt;\n    vUv = uv;\n}\n",wts_vert_rectilinear_wireframe:"\n#include <defines>\n#include <vert_attributes_wireframe>\n#include <uniforms>\nvarying vec2 vQuadrilateralCoords;\nvoid main() {\n    vec4 camPt = modelViewMatrix * vec4( position, 1.0 );\n    gl_Position = projectionMatrix * camPt;\n    vQuadrilateralCoords = quadrilateralCoords;\n}\n"},
  Mb={screenToWorld:{rectilinear:{uniforms:{tTexture:{type:"t",value:null},tViewportResolution:{type:"v2",value:new THREE.Vector2},tViewportResolutionRatio:{type:"f",value:1},tModelViewMatrixInverse:{type:"m4",value:new THREE.Matrix4},tProjectionScale:{type:"f",value:1}},vertexShader:Ub.stw_vert_proj,fragmentShader:Ub.stw_frag_proj_rectilinear},flat:{uniforms:{tTexture:{type:"t",value:null},tTextureRatio:{type:"f",value:1},tViewportResolution:{type:"v2",value:new THREE.Vector2},tViewportResolutionRatio:{type:"f",
  value:1},tFov:{type:"f",value:0},tYaw:{type:"f",value:0},tPitch:{type:"f",value:0},tRepeatX:{type:"i",value:0},tRepeatY:{type:"i",value:0}},vertexShader:Ub.stw_vert_proj,fragmentShader:Ub.stw_frag_proj_flat},gopro:{uniforms:{tTexture:{type:"t",value:null},tViewportResolution:{type:"v2",value:new THREE.Vector2},tViewportResolutionRatio:{type:"f",value:1},tModelViewMatrixInverse:{type:"m4",value:new THREE.Matrix4},tProjectionDistance:{type:"f",value:0},tProjectionScale:{type:"f",value:1}},vertexShader:Ub.stw_vert_proj,
  fragmentShader:Ub.stw_frag_proj_gopro}},worldToScreen:{rectilinear:{mapping:{uniforms:{tOpacity:{type:"f",value:1},tTexture:{type:"t",value:null}},vertexShader:Ub.wts_vert_rectilinear,fragmentShader:Ub.wts_frag},nf:{uniforms:{tColor:{type:"c",value:null},tModelViewMatrixInverse:{type:"m4",value:null}},vertexShader:Ub.wts_vert_rectilinear_wireframe,fragmentShader:Ub.wts_frag_wireframe}},flat:{mapping:{uniforms:{tOpacity:{type:"f",value:1},tTexture:{type:"t",value:null}},vertexShader:Ub.wts_vert_rectilinear,
  fragmentShader:Ub.wts_frag},nf:{uniforms:{tColor:{type:"c",value:null},tModelViewMatrixInverse:{type:"m4",value:null}},vertexShader:Ub.wts_vert_rectilinear_wireframe,fragmentShader:Ub.wts_frag_wireframe}},gopro:{mapping:{uniforms:{tOpacity:{type:"f",value:1},tTexture:{type:"t",value:null},tProjectionDistance:{type:"f",value:1}},vertexShader:Ub.wts_vert_gopro,fragmentShader:Ub.wts_frag},nf:{uniforms:{tColor:{type:"c",value:null},tProjectionDistance:{type:"f",value:1}},vertexShader:Ub.wts_vert_gopro_wireframe,
  fragmentShader:Ub.wts_frag_wireframe}}},pb:function(a){return a.replace(/#include +<([\w\d.]+)>/g,function(a,d){a=Ub[d];if("undefined"===typeof a&&(a=THREE.ShaderChunk[d],"undefined"===typeof a))throw Error("Can not resolve #include <"+d+">");return Mb.pb(a)})}};function eb(a){this.j=a;this.f=null;this.la=!1;this.i="";this.c=this.m=null;n.call(this,"ViewManager")}eb.prototype=Object.create(n.prototype);g=eb.prototype;g.constructor=eb;
  function Vb(a,b,d){if(null===a.f||a.f.type!==b){a.la=!1;null!==a.f&&(a.f.destroy(),a.f=null);d=d||null;switch(b){case lb.ee:a.f=new Wb(a.j,d);break;case lb.$a:a.f=new Xb(a.j,d);break;default:a.f=new Yb(a.j,d)}a.la=!0;a.Db()}}g.Db=function(){null!==this.c&&this.c.D()};g.load=function(a){a=D.hb(this.j.mainConfig.view,a);Vb(this,"string"===typeof a.type?a.type.toLowerCase():lb.Eb,a.options)};g.kj=function(){this.i=this.f.type;this.m=this.f.options;Vb(this,lb.Eb,null)};
  g.jj=function(){""!==this.i&&(Vb(this,this.i,this.m),this.j.camera.roll=0)};g.worldToScreen=function(a,b){return this.f.worldToScreen(a,b)};g.screenToWorld=function(a){return this.f.screenToWorld(a)};g.destroy=function(){this.j=null;null!==this.f&&(this.f.destroy(),this.f=null);null!==this.c&&(this.c.destroy(),this.c=null);n.prototype.destroy.call(this)};Object.defineProperty(eb.prototype,"current",{get:function(){return this.f}});Object.defineProperty(eb.prototype,"ready",{get:function(){return this.la}});
  Object.defineProperty(eb.prototype,"type",{get:function(){return null!==this.f?this.f.type:null},set:function(a){Vb(this,a,null)}});Object.defineProperty(eb.prototype,"onChange",{get:function(){null===this.c&&(this.c=new r(this));return this.c}});var lb={Pb:"undefined",$a:"flat",Eb:"rectilinear",ee:"gopro"};
  function Q(a,b,d,e){this.j=a;this.c=b||null;this.i=1;this.H=e;this.B=-Infinity;this.u=Infinity;this.A=-Infinity;this.o=Infinity;this.F=0;this.I=Infinity;this.G=this.C=null;n.call(this,d||"ViewBase")}Q.prototype=Object.create(n.prototype);g=Q.prototype;g.constructor=Q;g.Ob=function(){this.j.story.onSceneLoadComplete.add(this.qb,this)};function Zb(a,b){a=a.j.renderer.displayResolution;return new THREE.Vector2((2*b.x/a.width-1)*a.ratio,2*b.y/a.height-1)}
  function $b(a,b){a=a.j.renderer.displayResolution;return new THREE.Vector2(Math.round(a.width/2*(b.x/a.ratio+1)),a.height-Math.round(a.height/2*(b.y+1)))}g.qb=function(){throw"Please implement "+this.Wa+"::updateUniforms";};g.worldToScreen=function(){throw"Please implement "+this.Wa+"::worldToScreen";};g.screenToWorld=function(){throw"Please implement "+this.Wa+"::screenToWorld";};g.We=function(){return H.T(this.j.renderer.camera.fov)};g.destroy=function(){this.G=this.C=this.m=this.j=null;n.prototype.destroy.call(this)};
  Object.defineProperty(Q.prototype,"type",{get:function(){return this.H}});Object.defineProperty(Q.prototype,"yawMin",{get:function(){return this.B}});Object.defineProperty(Q.prototype,"yawMax",{get:function(){return this.u}});Object.defineProperty(Q.prototype,"pitchMin",{get:function(){return this.A}});Object.defineProperty(Q.prototype,"pitchMax",{get:function(){return this.o}});Object.defineProperty(Q.prototype,"rollMin",{get:function(){return-Infinity}});
  Object.defineProperty(Q.prototype,"rollMax",{get:function(){return Infinity}});Object.defineProperty(Q.prototype,"fovMin",{get:function(){return this.F}});Object.defineProperty(Q.prototype,"fovMax",{get:function(){return this.I}});Object.defineProperty(Q.prototype,"shaderSTW",{get:function(){return this.C}});Object.defineProperty(Q.prototype,"shaderWTS",{get:function(){return this.G}});Object.defineProperty(Q.prototype,"options",{get:function(){return this.c}});
  function Xb(a,b){Q.call(this,a,b,"ViewFlat",lb.$a);this.Ob()}Xb.prototype=Object.create(Q.prototype);Xb.prototype.constructor=Xb;var ac={repeatX:!1,repeatY:!1};Xb.prototype.Ob=function(){Q.prototype.Ob.call(this);this.C=D.ta({},Mb.screenToWorld.flat);this.G=D.ta({},Mb.worldToScreen.flat);this.B=H.T(-360);this.u=H.T(360);this.A=H.T(-180);this.o=H.T(180);this.F=H.T(20);this.I=H.T(180);this.c=D.ta(ac,this.c)};
  function bc(a){if(null!==a.j)if(a.j.renderer.backgroundRenderer instanceof qb){var b=H.T(a.j.camera.fov);!1===a.c.repeatX?(a.u=Math.min(360,Math.max(0,.5*(Math.PI*a.j.renderer.backgroundRenderer.textureSize.ratio-b*a.j.renderer.displayResolution.ratio))),a.B=-a.u):(a.B=H.T(-360),a.u=H.T(360));!1===a.c.repeatY?(a.o=.5*Math.max(0,Math.PI-b),a.A=-a.o):(a.A=H.T(-180),a.o=H.T(180))}else a.u=a.o=H.T(20),a.B=-a.u,a.A=-a.o}
  Xb.prototype.qb=function(a){bc(this);"undefined"!==typeof a&&(a.hasOwnProperty("tRepeatX")&&(a.tRepeatX.value=this.c.repeatX?1:0),a.hasOwnProperty("tRepeatY")&&(a.tRepeatY.value=this.c.repeatY?1:0),a.hasOwnProperty("tYaw")&&(a.tYaw.value=H.T(this.j.camera.yaw)),a.hasOwnProperty("tPitch")&&(a.tPitch.value=H.T(this.j.camera.pitch)),a.hasOwnProperty("tFov")&&(a.tFov.value=H.T(this.j.renderer.camera.fov)))};Xb.prototype.worldToScreen=function(){return new THREE.Vector2};Xb.prototype.screenToWorld=function(){return new THREE.Vector3};
  Object.defineProperty(Xb.prototype,"repeatX",{get:function(){return this.c.repeatX},set:function(a){this.c.repeatX=a;bc(this);this.j.view.Db()}});Object.defineProperty(Xb.prototype,"repeatY",{get:function(){return this.c.repeatY},set:function(a){this.c.repeatY=a;bc(this);this.j.view.Db()}});function Wb(a,b){this.f=0;Q.call(this,a,b,"ViewGoPro",lb.ee);this.Ob()}Wb.prototype=Object.create(Q.prototype);g=Wb.prototype;g.constructor=Wb;
  g.Ob=function(){Q.prototype.Ob.call(this);this.C=D.ta({},Mb.screenToWorld.gopro);this.G=D.ta({},Mb.worldToScreen.gopro);this.F=H.T(30);this.I=H.T(330)};function cc(a){if(null!==a.j){var b,d=a.j.camera.fov;b=90>d?0:180<d?1:.5*(1+Math.sin(Math.PI/2*((d-90)/90*2-1)));a.f=b;d=.5*H.T(d);a.i=(b+1)*Math.sin(d)/(b+Math.cos(d))}}
  g.qb=function(a){cc(this);"undefined"!==typeof a&&(a.hasOwnProperty("tProjectionDistance")&&(a.tProjectionDistance.value=this.f),a.hasOwnProperty("tProjectionScale")&&(a.tProjectionScale.value=this.i))};
  g.worldToScreen=function(a,b){a=a||new THREE.Vector3;a.normalize();b=b||0;a=new THREE.Vector4(-a.x,-a.y,a.z,1);var d=H.Oc(this.j.camera.modelView),d=H.Mc(d.yaw,d.pitch,-d.roll,!0),d=d.transpose();a.applyMatrix4(d);if(a.z>this.f)return null;var e=(this.f+1)/(this.f-a.z),d=-a.x*e;a=-a.y*e;d/=(1+b)*this.i;a/=this.i;return $b(this,new THREE.Vector2(d,a))};
  g.screenToWorld=function(a){var b=this.j.renderer.displayResolution;a=a||new THREE.Vector2(b.width/2,b.height/2);var d=dc*b.width,e=dc*b.height;if(a.x<-d||a.x>b.width+d||a.y<-e||a.y>b.height+e)return null;b=Zb(this,a);b.multiplyScalar(this.i);var d=b.dot(b),e=Math.pow(this.f+1,2),h=4*(this.f*this.f*d*d-(d+e)*(d*this.f*this.f-e));if(0>h)return null;a=new THREE.Vector4;a.z=(2*this.f*d-Math.sqrt(h))/(2*(e+d));a.x=(this.f-a.z)/(this.f+1)*b.x;a.y=(this.f-a.z)/(this.f+1)*b.y;b=H.Oc(this.j.camera.modelView);
  b=H.Mc(-b.yaw,b.pitch,-b.roll,!0);a.applyMatrix4(b);return(new THREE.Vector3(a.x,-a.y,a.z)).normalize()};g.We=function(){cc(this);var a=.5*H.T(this.j.camera.fov),b=1-this.f/2;return 2*Math.atan2(b*Math.sin(a),Math.abs(b-1)+b*Math.cos(a))};function Yb(a,b){Q.call(this,a,b,"ViewRectilinear",lb.Eb);this.Ob()}Yb.prototype=Object.create(Q.prototype);Yb.prototype.constructor=Yb;var dc=.5;
  Yb.prototype.Ob=function(){Q.prototype.Ob.call(this);this.C=D.ta({},Mb.screenToWorld.rectilinear);this.G=D.ta({},Mb.worldToScreen.rectilinear);this.A=-H.T(90);this.o=H.T(90);this.F=H.T(40);this.I=H.T(140)};Yb.prototype.qb=function(a){null!==this.j&&(this.i=Math.tan(H.T(this.j.camera.fov/2)));"undefined"!==typeof a&&a.hasOwnProperty("tProjectionScale")&&(a.tProjectionScale.value=this.i)};
  Yb.prototype.worldToScreen=function(a,b){a=a||new THREE.Vector3;a.normalize();b=b||0;a=new THREE.Vector4(a.x,a.y,-a.z,1);var d=H.Oc(this.j.camera.modelView),d=H.Mc(d.yaw,d.pitch,-d.roll,!0),d=d.transpose();a.applyMatrix4(d);if(0>a.z)return null;d=Math.max(Number.EPSILON,a.z);a=(new THREE.Vector2(a.x,a.y)).divideScalar(d);a.x/=(1+b)*this.i;a.y/=this.i;return $b(this,a)};
  Yb.prototype.screenToWorld=function(a){var b=this.j.renderer.displayResolution;a=a||new THREE.Vector2(b.width/2,b.height/2);var d=dc*b.width,e=dc*b.height;if(a.x<-d||a.x>b.width+d||a.y<-e||a.y>b.height+e)return null;a=Zb(this,a);a.multiplyScalar(this.i);a=new THREE.Vector4(a.x,a.y,-1,0);b=H.Oc(this.j.camera.modelView);b=H.Mc(-b.yaw,b.pitch,-b.roll,!0);a.applyMatrix4(b);return(new THREE.Vector3(a.x,-a.y,a.z)).normalize()};
  function ec(a){this.f=a||[];n.call(this,"Timeline");D.za(this.f,"Keyframe")?this.f=D.Pc(this.f,"time"):this.f=[]}ec.prototype=Object.create(n.prototype);g=ec.prototype;g.constructor=ec;g.Yp=function(){return null!==this.f&&0<this.f.length};g.Ab=function(a){D.P(a,"Keyframe")&&(this.f.push(a),this.f=D.Pc(this.f,"time"))};g.Rp=function(a){a=this.Ue(a);return{previous:this.f[a.previous],next:this.f[a.next]||null}};
  g.Ue=function(a){for(var b=-1,d=-1,e=this.f.length-1;0<=e;e--)if(a>=this.f[e].time){b=e;break}b!==this.f.length-1&&(d=b+1);return{previous:b,next:d}};g.El=function(a){a=this.Fl(a);return{previous:this.f[a.previous]||null,next:this.f[a.next]||null}};g.Fl=function(a){a=this.Ue(a);var b=0,d=a.next;0<a.previous&&(b=a.previous-1);a.next<this.f.length-2&&(d=a.next+1);return{previous:b,next:d}};g.Op=function(){for(;0<this.f.length;)this.f.pop().data=null;this.f=[]};
  g.destroy=function(){for(;0<this.f.length;)this.f.pop().data=null;this.f=null;n.prototype.destroy.call(this)};Object.defineProperty(ec.prototype,"keyframes",{get:function(){return this.f},set:function(a){D.za(a,"Keyframe")&&(this.f=D.Pc(a,"time"))}});function fc(a,b){n.call(this,"Keyframe");this.f=a;this.vb=b}fc.prototype=Object.create(n.prototype);fc.prototype.constructor=fc;Object.defineProperty(fc.prototype,"time",{get:function(){return this.f},set:function(a){"number"===typeof a&&(this.f=a)}});
  Object.defineProperty(fc.prototype,"data",{get:function(){return this.vb},set:function(a){this.vb=a}});function gc(a,b){this.j=a;this.ma=b||null;this.G=this.I=this.o=this.Ta=null;this.J=this.F=0;this.N=!1;this.c=null;this.O=0;this.S=!1;this.u=this.B=this.C=this.A=this.V=this.U=null;n.call(this,"Animation");this.pf()}gc.prototype=Object.create(n.prototype);g=gc.prototype;g.constructor=gc;
  g.pf=function(){ba(this);this.c=new hc(this.j,this);this.c.onStart.add(this.lp,this);this.c.onStop.add(this.mp,this);this.c.onProgress.add(this.mm,this);this.c.onComplete.add(this.kp,this);this.j.tween.add(this.c);this.o=new ec};function ic(a,b){a=a.split(".");for(var d=0,e=a.length;d<e-1;d++)b=b[a[d]];return[b,a[d]]}
  function jc(a,b){b=b||a.F;var d=a.o.Ue(b||a.F);a.G=a.o.keyframes[d.next];a.I=a.o.keyframes[d.previous];if(null===a.G||-1===d.next)return!1;if(a.S){var e=a.o.El(b);if(null!==e.previous&&null!==e.next){b=(new THREE.Quaternion).copy(a.I.data.quaternion).normalize();var d=(new THREE.Quaternion).copy(a.G.data.quaternion).normalize(),h=(new THREE.Quaternion).copy(e.previous.data.quaternion).normalize(),e=(new THREE.Quaternion).copy(e.next.data.quaternion).normalize();a.U=I.Lh(h,b,d);a.V=I.Lh(b,d,e)}}a.J=
  a.G.time-a.I.time;a.c.Gf({tweenTime:1},a.J);a.O=0;a.c.start();return!0}g.lp=function(){!0!==this.N&&(null!==this.A&&this.A.D(),this.N=!0)};g.mp=function(){this.N=!1;null!==this.C&&this.C.D()};
  g.mm=function(){var a=this.O;if(null!==this.G){this.F=a*this.J+this.I.time;var b=[],d,e,h;Array.isArray(this.Ta.prop)||(this.Ta.prop=[this.Ta.prop]);h=this.Ta.prop.length;for(e=0;e<h;e++)b.push(ic(this.Ta.prop[e],this.ma));if(!0===this.Ta.smooth&&"quaternion"===this.Ta.prop[0])d=b[0],d[0].quaternion=I.hm(this.I.data.quaternion,this.U,this.V,this.G.data.quaternion,a);else if("quaternion"===this.Ta.prop[0])d=b[0],d[0].quaternion=I.slerp(this.I.data.quaternion,this.G.data.quaternion,a);else{var k=this.c.easing(a),
  l,t,v=0;for(e=0;e<h;e++){l=ic(this.Ta.prop[e],this.I.data);t=ic(this.Ta.prop[e],this.G.data);d=b[e];l=l[0][l[1]];t=t[0][t[1]];if(this.Ta.ib&&this.Ta.ib[e]){var C=this.Ta.ib[e][0],ea=this.Ta.ib[e][1],v=Math.abs(C-ea)/2;Math.abs(l-t)>v?(l=H.ib(l+v,C,ea),t=H.ib(t+v,C,ea)):v=0}d[0][d[1]]=(1-k)*l+k*t-v}}"function"===typeof this.Ta.wl&&this.Ta.wl.call(this,a)}null!==this.B&&this.B.D({progress:this.F/this.J})};g.kp=function(){jc(this)||null!==this.u&&this.u.D()};g.play=function(a){this.F=a||0;jc(this,this.F)};
  g.stop=function(){this.c.stop()};g.resume=function(){jc(this)};g.destroy=function(){null!==this.o&&(this.o.destroy(),this.o=null);null!==this.c&&(this.c.destroy(),this.c=null);null!==this.A&&(this.A.destroy(),this.A=null);null!==this.C&&(this.C.destroy(),this.C=null);null!==this.B&&(this.B.destroy(),this.B=null);null!==this.u&&(this.u.destroy(),this.u=null);n.prototype.destroy.call(this)};Object.defineProperty(gc.prototype,"running",{get:function(){return this.N}});
  Object.defineProperty(gc.prototype,"timeline",{get:function(){return this.o}});Object.defineProperty(gc.prototype,"instruction",{get:function(){return this.Ta},set:function(a){this.Ta=a}});Object.defineProperty(gc.prototype,"tween",{get:function(){return this.c},set:function(a){this.c=a}});Object.defineProperty(gc.prototype,"tweenTime",{get:function(){return this.O},set:function(a){this.O=a}});Object.defineProperty(gc.prototype,"smooth",{get:function(){return this.S},set:function(a){this.S=a}});
  Object.defineProperty(gc.prototype,"onPlay",{get:function(){null===this.A&&(this.A=new r(this));return this.A}});Object.defineProperty(gc.prototype,"onStop",{get:function(){null===this.C&&(this.C=new r(this));return this.C}});Object.defineProperty(gc.prototype,"onProgress",{get:function(){null===this.B&&(this.B=new r(this));return this.B}});Object.defineProperty(gc.prototype,"onComplete",{get:function(){null===this.u&&(this.u=new r(this));return this.u}});
  function kc(a,b,d){this.j=a;this.ma=b||null;this.f=null;this.C=0;this.o=this.c=null;n.call(this,d)}kc.prototype=Object.create(n.prototype);g=kc.prototype;g.constructor=kc;g.stop=function(){if(null!==this.f)for(var a=0,b=this.f.length;a<b;a++)this.f[a].stop()};g.resume=function(){if(null!==this.f)for(var a=0,b=this.f.length;a<b;a++)this.f[a].resume()};g.rc=function(){this.C++;this.C===this.f.length&&null!==this.o&&this.o.D()};
  function lc(a,b,d,e,h,k){var l=null,t=null;d=D.Pc(d,"time");for(var v=0;v<d.length;v++){var C="string"===typeof k?d[v].data[k][e]:d[v].data[e];if("undefined"!==typeof C&&null!==C&&(d[v].time<b&&(l=d[v]),d[v].time>b)){t=d[v];break}}null===l&&(l={time:0,data:{}},"string"===typeof k?l.data[k]=a.ma[k]:l.data[e]=a.ma[e]);if(null===t)return"string"===typeof k?l.data[k][e]:l.data[e];a=h((b-l.time)/(t.time-l.time));return(1-a)*("string"===typeof k?l.data[k][e]:l.data[e])+a*("string"===typeof k?t.data[k][e]:
  t.data[e])}function mc(a){for(var b;a.f&&0<a.f.length;)b=a.f.pop(),b.onComplete.remove(a.rc,a),b.destroy();a.f=[];a.C=0}g.destroy=function(){mc(this);for(this.f=null;this.c&&0<this.c.length;)this.c.pop();this.c=null;null!==this.o&&(this.o.destroy(),this.o=null);n.prototype.destroy.call(this)};Object.defineProperty(kc.prototype,"running",{get:function(){for(var a=0,b=this.f.length;a<b;a++)if(!0===this.f[a].running)return!0;return!1}});
  Object.defineProperty(kc.prototype,"onComplete",{get:function(){null===this.o&&(this.o=new r(this));return this.o}});function nc(a){this.f=this.A=this.B=null;this.u=0;this.c=null;this.i=0;n.call(this,a)}nc.prototype=Object.create(n.prototype);nc.prototype.constructor=nc;
  nc.prototype.m=function(a){this.M=a.uid;this.B=a.name;this.A=a.description;this.f=a.keyframes;this.c="linear";this.i=0;"object"===typeof a.easing&&null!==a.easing&&(this.c=a.easing["default"]||this.c,this.i=a.easing.offset||this.i);ba(this)};nc.prototype.destroy=function(){da(this)};Object.defineProperty(nc.prototype,"name",{get:function(){return this.B}});Object.defineProperty(nc.prototype,"description",{get:function(){return this.A}});Object.defineProperty(nc.prototype,"keyframes",{get:function(){return this.f}});
  Object.defineProperty(nc.prototype,"count",{set:function(a){"number"===typeof a&&(this.u=a)},get:function(){return this.u}});Object.defineProperty(nc.prototype,"easing",{get:function(){return this.c}});Object.defineProperty(nc.prototype,"offset",{get:function(){return this.i}});Object.defineProperty(nc.prototype,"duration",{get:function(){for(var a=this.f[0].time,b=1,d=this.f.length;b<d;b++)this.f[b].time>a&&(a=this.f[b].time);return a}});
  function oc(a,b){this.j=a;this.c=null;this.X="";this.N=this.H=!0;this.o=null;this.V=!1;this.ga=null;this.la=!1;this.W=this.A=this.B=this.C=null;n.call(this,b||"Object3D");this.Af()}oc.prototype=Object.create(n.prototype);g=oc.prototype;g.constructor=oc;g.Af=function(){this.o={};this.c=new THREE.Mesh;this.ga=qc(this.c);this.j.renderer.objects.register(this)};g.click=function(){!0===D.P(this.o.onClick,"ActionEventDispatcher")&&this.o.onClick.D();null!==this.C&&this.C.D()};
  g.Sc=function(){!0===D.P(this.o.onOver,"ActionEventDispatcher")&&this.o.onOver.D();null!==this.B&&this.B.D()};g.Dc=function(){!0===D.P(this.o.onOut,"ActionEventDispatcher")&&this.o.onOut.D();null!==this.A&&this.A.D()};
  g.destroy=function(){this.j.renderer.objects.unregister(this);null!==this.c&&(this.c.K=null,null!==this.c.geometry&&(this.c.geometry.dispose(),this.c.geometry=null),this.c=this.c.material=null);null!==this.C&&(this.C.destroy(),this.C=null);null!==this.B&&(this.B.destroy(),this.B=null);null!==this.A&&(this.A.destroy(),this.A=null);null!==this.W&&(this.W.destroy(),this.W=null);for(var a in this.o)this.o[a].destroy(),this.o[a]=null;this.j=this.o=null;n.prototype.destroy.call(this)};
  Object.defineProperty(oc.prototype,"mesh",{get:function(){return this.c}});Object.defineProperty(oc.prototype,"visible",{get:function(){return this.H},set:function(a){this.H=!!a;null!==this.c&&(this.c.visible=this.H)}});Object.defineProperty(oc.prototype,"hovered",{get:function(){return this.V},set:function(a){this.V=!!a}});Object.defineProperty(oc.prototype,"interactive",{get:function(){return this.N},set:function(a){this.N=!!a}});Object.defineProperty(oc.prototype,"fx",{get:function(){return this.X}});
  Object.defineProperty(oc.prototype,"events",{get:function(){return this.o}});Object.defineProperty(oc.prototype,"ready",{get:function(){return this.la}});Object.defineProperty(oc.prototype,"onClick",{get:function(){null===this.C&&(this.C=new r(this));return this.C}});Object.defineProperty(oc.prototype,"onOver",{get:function(){null===this.B&&(this.B=new r(this));return this.B}});Object.defineProperty(oc.prototype,"onOut",{get:function(){null===this.A&&(this.A=new r(this));return this.A}});
  Object.defineProperty(oc.prototype,"onReady",{get:function(){null===this.W&&(this.W=new r(this));return this.W}});function hb(a){this.j=a;this.f=this.da=null;n.call(this,"ObjectRenderer");this.da=[];this.f=[]}hb.prototype=Object.create(n.prototype);g=hb.prototype;g.constructor=hb;function rc(a,b){var d=[];return d="undefined"===typeof b||""===b||null===b?a.da.filter(function(a){return"undefined"===typeof a.fx||""===a.fx||null===a.fx}):a.da.filter(function(a){return a.fx===b})}
  function sc(a){var b=rc(a,null);return D.kl(a.da,b)}function tc(a){return sc(a).reduce(function(a,d){0>a.indexOf(d.fx)&&a.push(d.fx);return a},[])}g.register=function(a){this.da.push(a)};g.unregister=function(a){this.da.splice(this.da.indexOf(a),1)};
  g.ol=function(){var a=this.j.renderer.camera.main,b=rc(this,null);if(0<b.length){for(var d=new THREE.Scene,e=0,h=b.length;e<h;e++)d.add(b[e].mesh);h=new sb(this.j,d,a,null);this.f.push(h)}b=tc(this);d=0;for(e=b.length;d<e;d++){for(var h=b[d],k=rc(this,h),l=new THREE.Scene,t=0,v=k.length;t<v;t++)l.add(k[t].mesh);h=new sb(this.j,l,a,this.j.postProcessing.Te(h));this.f.push(h)}};g.Cl=function(){return this.da.filter(function(a){return!0===a.ready&&!0===a.interactive})};
  g.yl=function(a){for(var b=0,d=this.da.length;b<d;b++)if(this.da[b].mesh===a)return this.da[b];return null};g.Bf=function(){for(var a=this.f.length;a--;)this.f.pop().destroy()};g.destroy=function(){this.Bf();this.j=this.f=null;n.prototype.destroy.call(this)};Object.defineProperty(hb.prototype,"all",{get:function(){return this.da}});Object.defineProperty(hb.prototype,"renderScenes",{get:function(){return this.f}});function uc(a){this.j=a;this.f=this.c=null;n.call(this,"Raycaster")}uc.prototype=Object.create(n.prototype);
  g=uc.prototype;g.constructor=uc;g.start=function(a){null===this.c&&(this.c=new THREE.Raycaster);a===pb.jb?(!1===this.j.canvas.pointer.onClick.has(this.Qd,this)&&this.j.canvas.pointer.onClick.add(this.Qd,this),!1===this.j.canvas.pointer.onMove.has(this.Rd,this)&&this.j.canvas.pointer.onMove.add(this.Rd,this)):a===pb.Uc&&!1===this.j.renderer.camera.onChange.has(this.ue,this)&&this.j.renderer.camera.onChange.add(this.ue,this)};
  g.stop=function(){this.j.canvas.pointer.onClick.has(this.Qd,this)&&this.j.canvas.pointer.onClick.remove(this.Qd,this);this.j.canvas.pointer.onMove.has(this.Rd,this)&&this.j.canvas.pointer.onMove.remove(this.Rd,this);this.j.renderer.camera.onChange.has(this.ue,this)&&this.j.renderer.camera.onChange.remove(this.ue,this);vc(this);this.c=null};g.Qd=function(a){a=wc(a.data);xc(this,"click",a)};g.Rd=function(a){a=wc(a.data);xc(this,"move",a)};g.ue=function(){xc(this,"move")};
  function xc(a,b,d){if(null===a.f||!1!==a.f.ready){var e=a.j.renderer.canvasResolution;d=d||new THREE.Vector2(e.width/2,e.height/2);var h=a.j.renderer.camera,k=(new THREE.Vector2(d.x/e.width,1-d.y/e.height)).multiplyScalar(2).addScalar(-1),e=a.j.renderer.objects.Cl();d=0;for(var l=e.length;d<l;d++)e[d].hovered=!1;d=null;a.c.setFromCamera(k,h.main);h=[];k=0;for(l=e.length;k<l;k++)h.push(e[k].mesh);for(e=a.c.intersectObjects(h);null===d&&0<e.length;){var h=e.shift(),k=h.object,t=h.uv,h=a.j.renderer.objects.yl(k);
  if(!1===k.material.transparent)d=h;else{l=h;k=t;t=null;if(null!==l.mesh&&null!==l.mesh.material&&"undefined"!==typeof l.mesh.material.uniforms.tTexture){var v=l.mesh.material.uniforms.tTexture.value,l=null;null!==v&&null!==v.image&&("img"===v.image.nodeName.toLowerCase()?(l=document.createElement("canvas"),l.width=v.image.width,l.height=v.image.height,l.getContext("2d").drawImage(v.image,0,0)):"canvas"===v.image.nodeName.toLowerCase()&&(l=v.image),null!==l&&(t=l.width,v=l.height,k=4*(Math.floor(v-
  k.y*v)*t+Math.floor(k.x*t)),l=l.getContext("2d").getImageData(0,0,t,v).data,t=new yc(0,0,0,l[k+3])))}else"undefined"!==typeof l.mesh.material.color&&(t=l.mesh.material.color);k=t;if(null===k||k&&10<k.alpha)d=h}}null!==d?"click"===b?(a.f=d,a.click()):"move"===b&&d!==a.f&&(vc(a),a.f=d,d.Sc(),a.j.renderer.pickingManager.mode===pb.Uc&&a.j.renderer.camera.gaze.start()):vc(a)}}function vc(a){null!==a.f&&(a.f.Dc(),a.f=null,a.j.renderer.pickingManager.mode===pb.Uc&&a.j.renderer.camera.gaze.stop())}
  g.click=function(){null!==this.f&&this.f.click()};g.Si=function(){this.f=null};Object.defineProperty(uc.prototype,"hoveredObject",{get:function(){return this.f}});
  function zc(a){this.j=a;this.f=this.c=this.ma=null;n.call(this,"PickingDrawPass");a=D.clone(this.j.renderer.view.current.shaderWTS.mapping);a.uniforms.tColor={type:"c",value:new THREE.Color(0)};this.c=new THREE.RawShaderMaterial({fragmentShader:Mb.pb(Ub.wts_frag_color),vertexShader:Mb.pb(a.vertexShader),uniforms:a.uniforms,side:THREE.FrontSide,name:"PickingMaterial"});this.ma=new THREE.WebGLRenderTarget(this.j.renderer.canvasResolution.width/3,this.j.renderer.canvasResolution.height/3,{format:THREE.RGBAFormat});
  this.ma.name="Picking RenderTarget"}zc.prototype=Object.create(n.prototype);g=zc.prototype;g.constructor=zc;function qc(a){return new THREE.Color(a.id)}
  function Ac(a,b){var d=wc(b.data),e=new Uint8Array(4);a.j.renderer.webGLRenderer.readRenderTargetPixels(a.ma,d.x/b.data.target.width*a.ma.width,(1-d.y/b.data.target.height)*a.ma.height,1,1,e);b=new THREE.Color(e[0],e[1],e[2]);a:{a=a.j.renderer.objects.all;d=0;for(e=a.length;d<e;d++)if(a[d].mesh.id===((b.r&255)<<16|((b.g&255)<<8)+(b.b&255))){a=a[d];break a}a=null}return a}g.nd=function(a){a=Ac(this,a);null!==a&&a.click()};
  g.Od=function(a){a=Ac(this,a);null===a?null!==this.f&&(this.f.Dc(),this.f=null):a!==this.f&&(null!==this.f&&this.f.Dc(),a.Sc(),this.f=a)};g.start=function(){this.j.canvas.pointer.enabled=!0;!1===this.j.canvas.pointer.onClick.has(this.nd,this)&&this.j.canvas.pointer.onClick.add(this.nd,this);!1===this.j.canvas.pointer.onMove.has(this.Od,this)&&this.j.canvas.pointer.onMove.add(this.Od,this)};
  g.stop=function(){this.j.canvas.pointer.onClick.has(this.nd,this)&&this.j.canvas.pointer.onClick.remove(this.nd,this);this.j.canvas.pointer.onMove.has(this.Od,this)&&this.j.canvas.pointer.onMove.remove(this.Od,this)};g.click=function(){null!==this.f&&this.j.canvas.pointer.onClick.has(this.nd,this)&&this.f.click()};g.setSize=function(a){null!==this.ma&&this.ma.setSize(a.width,a.height)};g.Bi=function(){this.f=null};
  g.destroy=function(){null!==this.c&&(this.c.dispose(),this.c=null);null!==this.ma&&(this.ma.dispose(),this.ma=null);this.j=null;n.prototype.destroy.call(this)};Object.defineProperty(zc.prototype,"material",{get:function(){return this.c}});Object.defineProperty(zc.prototype,"renderTarget",{get:function(){return this.ma}});function fb(a){this.j=a;this.c=this.f=null;this.i=pb.jb;n.call(this,"PickingManager")}fb.prototype=Object.create(n.prototype);fb.prototype.constructor=fb;var pb={jb:"pointer",Uc:"gaze"};
  g=fb.prototype;g.jm=function(a){a===lb.Eb?null===this.c&&(null!==this.f&&(this.f.stop(),this.f.destroy(),this.f=null),this.c=new uc(this.j),this.c.start(this.i)):null===this.f&&(null!==this.c&&(this.c.stop(),this.c.destroy(),this.c=null),this.f=new zc(this.j),this.f.start())};g.Ci=function(){null!==this.c&&this.c.Si();null!==this.f&&this.f.Bi()};g.setSize=function(a){null!==this.f&&this.f.setSize(a)};g.click=function(){null!==this.c&&this.c.click();null!==this.f&&this.f.click()};
  g.start=function(){null!==this.c&&this.c.start(this.i);null!==this.f&&this.f.start()};g.stop=function(){null!==this.c&&this.c.stop();null!==this.f&&this.f.stop()};g.destroy=function(){null!==this.c&&(this.c.stop(),this.c.destroy(),this.c=null);null!==this.f&&(this.f.stop(),this.f.destroy(),this.f=null);n.prototype.destroy.call(this)};Object.defineProperty(fb.prototype,"renderTarget",{get:function(){return null===this.f?null:this.f.renderTarget}});
  Object.defineProperty(fb.prototype,"material",{get:function(){return null===this.f?null:this.f.material}});Object.defineProperty(fb.prototype,"mode",{get:function(){return this.i},set:function(a){a!==pb.jb&&a!==pb.Uc||a===this.i||(this.i=a,this.start())}});
  function Rb(a,b,d,e,h,k){this.c=b;this.u=d;this.A=e;this.f=h;this.m=k;this.H=this.F=null;this.B=a;this.o=this.M=null;this.J=this.N=!0;this.G=0;this.I=!1;this.C=null;THREE.Mesh.call(this);this.o=[];this.M=[];this.name=Qb(this.m,this.f,this.u,this.A);0<this.f&&null===this.B&&Bc(this);this.renderOrder=this.f===Va?0:2*(this.f+1);this.onBeforeRender=this.rn.bind(this);this.onAfterRender=this.qn.bind(this);d=this.c.Na(this.f,"x");e=this.c.Na(this.f,"y");a=this.c.cubeSize/d;b=this.c.cubeSize/e;d=new Ra((this.u<
  Math.floor(d)?1:d-Math.floor(d))*a,(this.A<Math.floor(e)?1:e-Math.floor(e))*b);this.geometry=new THREE.PlaneBufferGeometry(d.width,d.height);e=.5*-this.c.cubeSize;a=new THREE.Vector3(e+a*this.u+.5*d.width,-(e+b*this.A+.5*d.height),e);b=Cc(this);this.rotation.copy(b);a.applyEuler(b);this.position.copy(a);this.G=(a=this.f!==Va)?0:1;this.material=new THREE.MeshBasicMaterial({color:new THREE.Color(0),transparent:a,opacity:this.G,depthTest:!1,side:THREE.FrontSide});Dc(this);!0===Rb.oj&&(a=document.createElement("canvas"),
  a.width=a.height=512,b=a.getContext("2d"),d=a.width/2,e=a.height/2-25,b.fillStyle="gray",b.strokeStyle="white",b.strokeRect(20,20,a.width-40,a.height-40),b.textAlign="center",b.textAlign="center",b.textBaseline="middle",b.fillStyle="white",b.font="16px Courier",b.fillText("TILE "+this.name,d,e),b.font="12px Courier",b.textAlign="left",b.font="10px Courier",this.f===Va?b.fillText("Preview",10,a.height-10):b.fillText("Level "+this.f,10,a.height-10),b.textAlign="right",b.fillText(this.c.pixelsAtCurrentLevelHumanReadable,
  a.width-10,a.height-10),a=new THREE.Texture(a),a.needsUpdate=!0,a=new THREE.MeshBasicMaterial({transparent:!0,map:a,depthTest:!1}),a=new THREE.Mesh(this.geometry.clone(),a),a.name=this.name+"-debug-canvas",this.add(a),a.renderOrder=this.renderOrder+1);this.F=Date.now()}Rb.prototype=Object.create(THREE.Mesh.prototype);Rb.prototype.constructor=Rb;
  var Ec="front right back left up down".split(" "),Va=-Infinity,Fc={front:"left",right:"front",back:"right",left:"back",up:"up",down:"down"},Gc={front:"right",right:"back",back:"left",left:"front",up:"up",down:"down"};function Qb(a,b,d,e){a="number"===typeof a?Ec[a]:a.toLowerCase();return b===Va?a.substring(0,1).toUpperCase()+"-preview":a.substring(0,1).toUpperCase()+"-"+b+"-"+e+"-"+d}function Hc(a){return new THREE.Vector2(Math.floor(a.x/2),Math.floor(a.y/2))}g=Rb.prototype;
  g.rn=function(){this.c.hl(this);!0===this.I?Ic(this,1):Ic(this,0)};
  g.qn=function(){this.Hh();if(this.f!==Va){if(this.c.level>this.f){if(!(0<this.M.length)){var a,b=this.f+1;this.f===Va&&(b=0);var d=this.c.Na(b,"x"),e=this.c.Na(b,"y"),h=Math.round(d/this.c.Na(this.f,"x")),k=Math.round(e/this.c.Na(this.f,"y"));a=this.c.wc(this,b,this.m,h*this.u,k*this.A);-1===this.M.indexOf(a)&&(a.onDestroy.add(this.De,this),this.M.push(a));for(var l,t,v,C=0;C<h;C++)for(var ea=0;ea<k;ea++)a=h*this.u+C,l=k*this.A+ea,t=a<d,v=l<e,!0===t&&!0===v&&(a=this.c.wc(this,b,this.m,a,l),-1===this.M.indexOf(a)&&
  (a.onDestroy.add(this.De,this),this.M.push(a)))}b=0;for(d=this.M.length;b<d;b++)e=this.M[b],!this.c.Tl(e)&&this.c.Sl(e)&&(this.c.scene.add(e),e.Hh())}Jc(this)}Dc(this)};
  function Dc(a){if(null!==a.material&&null===a.material.map&&!1===a.I&&(a.f===Va&&a.f===a.c.level||!(200>a.H-a.F))){var b=a.c.textureStore.get(a);null!==b&&b.then(function(a){null!==this.material&&null!==a&&a instanceof THREE.Texture&&(this.I=!0,a.generateMipmaps=!1,a.minFilter=THREE.LinearFilter,a.needsUpdate=!0,this.material.color=new THREE.Color(16777215),this.material.map=a,this.material.needsUpdate=!0)}.bind(a),function(a){console.warn("Tile texture loading error: "+a)}.bind(a))}}
  function Ic(a,b){function d(a){null!==a&&null!==a.material&&"undefined"!==typeof a.material.opacity&&!0===a.material.transparent&&(a.material.opacity=b);for(var e=0,k=a.children.length;e<k;e++)d(a.children[e])}b=H.$(b,0,1);a.G=b;d(a)}
  function Cc(a){if(null!==a.B)return a.B.rotation;switch(a.m){case "front":return new THREE.Euler(0,0,0);case "back":return new THREE.Euler(0,Math.PI,0);case "left":return new THREE.Euler(0,Math.PI/2,0);case "right":return new THREE.Euler(0,-Math.PI/2,0);case "up":return new THREE.Euler(Math.PI/2,0,0);case "down":return new THREE.Euler(-Math.PI/2,0,0)}}g.De=function(a){a=a.emitter;a.onDestroy.remove(this.De,this);null!==this.M&&(a=this.M.indexOf(a),-1!==a&&this.M.splice(a,1))};
  g.Yg=function(a){a=a.emitter;a.onDestroy.remove(this.Yg,this);this.J=!0;null!==this.o&&(a=this.o.indexOf(a),-1!==a&&this.o.splice(a,1))};g.wk=function(a){a.emitter.onDestroy.remove(this.wk,this);this.B=null;this.N=!0};function Bc(a){null!==a.B||!1===a.N||0>=a.f||(a.N=!1,Promise.resolve().then(function(){this.B=this.c.Al(this);this.B.onDestroy.add(this.wk,this)}.bind(a)))}
  function Jc(a){if(!1!==a.J&&a.f!==Va&&a.f===a.c.level){a.J=!1;for(var b=Math.ceil(a.c.Na(a.f,"x")),d=Math.ceil(a.c.Na(a.f,"y")),e=Promise.resolve(),h=function(a,b,d,h,k,l){e.then(function(){var e=a.wc(null,b,d,h,k);-1===l.indexOf(e)&&(e.onDestroy.add(v),l.push(e))})},k=Math.max(0,a.u-1),l=Math.min(b-1,a.u+1),t=Math.min(d-1,a.A+1),v=a.Yg.bind(a),C=Math.max(0,a.A-1);C<=t;C++)for(var ea=k;ea<=l;ea++)ea===a.u&&C===a.A||h(a.c,a.f,a.m,ea,C,a.o);k=a.u;l=a.A;k&&k!==b-1||(C=(t=!k)?Fc[a.m]:Gc[a.m],h(a.c,a.f,
  C,t?b-1:0,l,a.o));if(l===d-1||!l){var t=!l,Fb,mb,C=t?"up":"down";"front"===a.m?(Fb=k,mb=t?0:d-1):"back"===a.m?(Fb=b-1-k,mb=t?d-1:0):"right"===a.m?(Fb=d-1,mb=t?b-1-k:k):"left"===a.m?(Fb=0,mb=t?k:b-1-k):"up"===a.m?(Fb=t?b-1-k:k,mb=0,C=t?"back":"front"):"down"===a.m&&(Fb=t?k:b-1-k,mb=t?b-1:d-1,C="back");h(a.c,a.f,C,Fb,mb,a.o);t&&1===d&&h(a.c,a.f,"down",Fb,mb,a.o)}}}g.Tp=function(){if(0>=this.f)return null;var a=Hc(this);return Qb(this.m,this.f-1,a.x,a.y)};g.Hh=function(){this.H=Date.now()};
  g.destroy=function(){if(null!==this.material){if("undefined"!==typeof this.material.uniforms)for(var a in this.material.uniforms)this.material.uniforms[a].value=null;null!==this.material.map&&(this.material.map.dispose(),this.material.map=null);this.material.dispose();this.material=null}null!==this.geometry&&(this.geometry.dispose(),this.geometry=null);this.B=null;a=0;for(var b=this.M.length;a<b;a++)this.M[a].onDestroy.remove(this.De,this);this.M.length=0;this.M=null;a=0;for(b=this.o.length;a<b;a++)this.o[a].onDestroy.remove(this.Yg,
  this);this.o.length=0;this.c=this.i=this.o=null;null!==this.C&&(this.C.D(),this.C.destroy(),this.C=null)};Object.defineProperty(Rb.prototype,"onDestroy",{get:function(){null===this.C&&(this.C=new r(this,!0));return this.C}});Object.defineProperty(Rb.prototype,"face",{get:function(){return this.m}});Object.defineProperty(Rb.prototype,"level",{get:function(){return this.f}});Object.defineProperty(Rb.prototype,"x",{get:function(){return this.u}});Object.defineProperty(Rb.prototype,"y",{get:function(){return this.A}});
  Object.defineProperty(Rb.prototype,"opacity",{get:function(){return this.G}});Object.defineProperty(Rb.prototype,"createTS",{get:function(){return this.F}});Object.defineProperty(Rb.prototype,"displayTS",{get:function(){return this.H}});Object.defineProperty(Rb.prototype,"neighbours",{get:function(){return this.o}});Object.defineProperty(Rb.prototype,"textureIsSet",{get:function(){return this.I}});function ra(a){this.j=a;this.f=null;this.c=[];n.call(this,"HotspotManager")}ra.prototype=Object.create(n.prototype);
  g=ra.prototype;g.constructor=ra;g.create=function(a){var b=null;switch(a.type||Kc.qg){case Kc.qg:b=new Lc(this.j,a);break;case Kc.rj:b=new Mc(this.j,a)}return null!==b?(this.c.push(b),b):!1};g.remove=function(a){!0===D.P(a,"string")&&(a=p.get(a));!0===D.P(a,"Hotspot3D")&&(this.c.splice(this.c.indexOf(a),1),a.destroy())};g.Bm=function(){var a=this.j.story.scene;a.onUnloadStart.ba(this.tp,this);"undefined"!==typeof a.config.hotspots&&this.ia(a.config.hotspots)};g.tp=function(){this.vf()};
  g.boot=function(){this.f=[];this.j.story.onSceneLoadStart.add(this.Bm,this)};g.Dm=function(a){return this.c.filter(function(b){return b.type===a})};g.ia=function(a){for(var b=0,d=a.length;b<d;b++)this.create(a[b])};g.il=function(a){if(null!==a.tracks&&"undefined"!==typeof a.tracks){a=a.tracks;for(var b=0,d=a.length;b<d;b++)new Nc(a[b])}};g.update=function(){for(var a=0,b=this.c.length;a<b;a++)this.c[a].update()};
  g.vf=function(a){this.c=this.c.filter(function(b){var d="string"===typeof a&&b.type!==a;!1===d&&b.destroy();return d})};g.Cm=function(){for(var a=[],b=0,d=this.c.length;b<d;b++)a.push(this.c[b].pi());return a};g.destroy=function(){this.vf();this.c=this.j=null;n.prototype.destroy.call(this)};Object.defineProperty(ra.prototype,"all",{get:function(){return this.c}});Object.defineProperty(ra.prototype,"uids",{get:function(){for(var a=[],b=0,d=this.c.length;b<d;b++)a.push(this.c[b].uid);return a}});
  Object.defineProperty(ra.prototype,"count",{get:function(){return this.c.length}});
  function Mc(a,b){this.j=a;this.f=b;this.o=null;this.m=Oc;this.i=this.c=null;this.A=this.u=!0;this.I="pointer";this.C=this.G=this.B=null;n.call(this,"HotspotDOM");this.o=new Pc;this.i={};a=this.f;a=D.hb(Qc,a);this.M=a.uid;if("object"===typeof a.events&&null!==a.events){b=a.events;var d,e;for(e in b)d=new Ia(this.j),d.f(b[e]),this.i[e]=d}e=a.dom;if(null!==e&&"undefined"!==typeof e){var h;"string"===typeof e.id?h=e.id:h=this.M;this.m=e.offset||Oc;b=document.getElementById(h);null!==b?this.c=b:(this.c=
  document.createElement("div"),this.c.id=h);this.c.classList.add("hotspot-dom");this.c.style.position="absolute";if("string"===typeof e.class)this.c.classList.add(e.class);else if(!0===Array.isArray(e.class))for(h=0,b=e.class.length;h<b;h++)this.c.classList.add(e.class[h]);h="."+this.c.id+"-basic-class {";"number"===typeof e.width?h+="width: "+e.width+"px;":"string"===typeof e.width&&(h+="width: "+e.width+";");"number"===typeof e.height?h+="height: "+e.height+"px;":"string"===typeof e.height&&(h+=
  "height: "+e.height+";");"string"===typeof e.color&&(h+="background-color: "+e.color+";");"number"===typeof e.index&&(h+="z-index: "+e.index+";");this.j.domHotspotStyle.sheet.insertRule(h+"}",0);this.c.classList.add(this.c.id+"-basic-class")}this.c.style.pointerEvents="auto";this.B=this.mo.bind(this);this.G=this.oo.bind(this);this.C=this.no.bind(this);this.c.addEventListener("click",this.B);this.c.addEventListener("mouseover",this.G);this.c.addEventListener("mouseout",this.C);null!==a.transform&&
  "undefined"!==typeof a.transform&&this.o.load(a.transform,!1);this.u="boolean"===typeof a.visible?a.visible:!0;this.A="boolean"===typeof a.interactive?a.interactive:!0;this.I="string"===typeof a.cursor?a.cursor:"pointer";this.si();ba(this);this.j.renderer.view.onChange.add(this.ri,this)}Mc.prototype=Object.create(n.prototype);Mc.prototype.constructor=Mc;var Qc={dom:{id:"hostpot-dom",width:320,height:240,color:"white",index:10,offset:Oc}},Oc={x:0,y:0};g=Mc.prototype;
  g.mo=function(){!0===D.P(this.i.onClick,"ActionEventDispatcher")&&this.i.onClick.D()};g.oo=function(){!0===D.P(this.i.onOver,"ActionEventDispatcher")&&this.i.onOver.D();this.c.style.cursor=this.I};g.no=function(){!0===D.P(this.i.onOut,"ActionEventDispatcher")&&this.i.onOut.D();this.c.style.cursor="default"};g.ri=function(){this.c.style.display="block";if(this.j.view.type!==lb.Eb&&this.j.view.type!==lb.ee||!1===this.u)this.c.style.display="none"};g.si=function(){this.j.domHotspotContainer.dom.appendChild(this.c)};
  g.Am=function(){this.j.domHotspotContainer.dom.removeChild(this.c,!1)};g.update=function(){var a=this.j.view.worldToScreen(this.o.position.values);if(null!==a){var b=a.y+this.m.y-this.c.clientHeight/2;this.c.style.left=a.x+this.m.x-this.c.clientWidth/2+"px";this.c.style.top=b+"px"}else this.c.style.left="99999px",this.c.style.top="99999px"};
  g.destroy=function(){this.c.removeEventListener("click",this.B);this.c.removeEventListener("mouseover",this.G);this.c.removeEventListener("mouseout",this.C);this.C=this.G=this.B=null;for(var a in this.i)this.i[a].destroy(),this.i[a]=null;this.i=null;this.c.style.left="99999px";this.c.style.top="99999px";this.c=null;this.o.destroy();this.o=null;n.prototype.destroy.call(this)};Object.defineProperty(Mc.prototype,"dom",{get:function(){return this.c}});
  Object.defineProperty(Mc.prototype,"visible",{get:function(){return this.u},set:function(a){this.u=!!a;!0===this.u?this.ri():this.c.style.display="none"}});Object.defineProperty(Mc.prototype,"interactive",{get:function(){return this.A},set:function(a){this.A=!!a;this.c.style.pointerEvents=!0===this.A?"auto":"none"}});Object.defineProperty(Mc.prototype,"offset",{get:function(){return this.m},set:function(a){"undefined"===typeof a||"number"!==typeof a.x&&"number"!==typeof a.y||(this.m=D.ta(Oc,a))}});
  function Lc(a,b){this.f=b;this.J="";this.m=this.G=this.F=this.u=this.I=this.i=null;this.S=this.O=!1;this.K="pointer";this.aa=this.R=null;oc.call(this,a,"Hotspot3D")}Lc.prototype=Object.create(oc.prototype);g=Lc.prototype;g.constructor=Lc;
  g.Af=function(){oc.prototype.Af.call(this);this.i=new Pc;this.i.onChange.add(this.jp,this);this.G=new Rc(this.j,this.i);this.R=this.zm.bind(this);this.aa=this.ym.bind(this);this.c.visible=!1;this.c.onBeforeRender=this.R;this.c.onAfterRender=this.aa;this.j.renderer.view.onChange.add(this.oi,this);if("undefined"!==typeof this.f&&null!==this.f){var a=this.f;this.M=a.uid;this.wb=a.tags;ba(this);this.c.name="mesh-"+this.M;this.c.K=a;this.J="string"===typeof a.name?a.name:"";this.H="boolean"===typeof a.visible?
  a.visible:!0;this.O="boolean"===typeof a.facingCenter?a.facingCenter:!1;this.S="boolean"===typeof a.autoScale?a.autoScale:!1;this.N="boolean"===typeof a.interactive?a.interactive:!0;this.K="string"===typeof a.cursor?a.cursor:"pointer";this.I=new Sc;this.u=new Tc(this.j,this.M);this.F=new Uc(this.j,this.M);this.m=new Vc(this.j,this.M);"object"===typeof a.states&&null!==a.states&&this.m.ia(a.states);"string"===typeof a.fx&&""!==a.fx&&(this.X=a.fx);if("object"===typeof a.events&&null!==a.events){var a=
  a.events,b,d;for(d in a)b=new Ia(this.j),b.f(a[d]),this.o[d]=b}this.m.onLoadComplete.add(this.zp,this);this.m.load()}};g.zm=function(a,b,d,e,h){this.j.renderer.view.current.qb(h.uniforms);"HotspotMaterial"===h.name?this.u.update():"PickingMaterial"===h.name&&h.program&&(a=this.j.renderer.webGLRenderer.getContext(),a.useProgram(h.program.program),h.program.getUniforms().map.tColor.setValue(a,this.ga),h.uniforms.tColor.value=this.ga)};g.ym=function(){};
  g.zp=function(){this.c.geometry=this.I.geometry;this.c.material=this.u.material;this.c.visible=this.H;Wc(this);!0===this.G.autoPlay&&"visible"===document[q.visibilityState]&&this.G.play();null!==this.W&&this.W.D()};g.jp=function(){Wc(this)};
  function Wc(a){a.c.position.x=a.i.position.x;a.c.position.y=a.i.position.y;a.c.position.z=a.i.position.z;if(!0===a.O){var b=(new THREE.Spherical).setFromVector3(new THREE.Vector3(a.i.position.x,a.i.position.y,a.i.position.z));a.c.rotation.set(-b.phi+Math.PI/2,b.theta+Math.PI,0,"YXZ");a.c.rotation.x+=-H.T(a.i.rotation.x);a.c.rotation.y+=H.T(a.i.rotation.y);a.c.rotation.z+=H.T(a.i.rotation.z)}else a.c.rotation.set(-H.T(a.i.rotation.x),H.T(a.i.rotation.y),H.T(a.i.rotation.z),"YXZ");!0===a.S?Xc(a):(a.c.scale.x=
  H.$(a.i.scale.x,1E-6,1E5),a.c.scale.y=H.$(a.i.scale.y,1E-6,1E5),a.c.scale.z=H.$(a.i.scale.z,1E-6,1E5))}function Xc(a){var b=a.j.camera.fov/a.j.camera.config.fov["default"];a.c.scale.x=H.$(a.i.scale.x*b,1E-6,1E5);a.c.scale.y=H.$(a.i.scale.y*b,1E-6,1E5);a.c.scale.z=H.$(a.i.scale.z*b,1E-6,1E5)}g.oi=function(){this.c.O=this.j.renderer.view.current instanceof Yb;this.u.km();this.c.material=this.u.material};
  g.Sc=function(){oc.prototype.Sc.call(this);!0===this.m.auto&&this.m.load("over");this.j.canvas.pointer.cursor=this.K};g.Dc=function(){oc.prototype.Dc.call(this);!0===this.m.auto&&this.m.load();this.j.canvas.pointer.cursor="default"};g.update=function(){null!==this.F&&this.F.update();!0===this.S&&Xc(this)};g.pi=function(){return{uid:this.M,name:this.J,tags:this.wb,visible:this.H,interactive:this.N,cursor:this.K,fx:this.X,facingCenter:this.O,geometry:this.I.o(),transform:this.i.ui(),material:this.u.ti()}};
  g.destroy=function(){this.j.renderer.view.onChange.remove(this.oi,this);this.aa=this.R=null;null!==this.m&&(this.m.destroy(),this.m=null);null!==this.i&&(this.i.destroy(),this.i=null);null!==this.I&&(this.I.destroy(),this.I=null);null!==this.G&&(this.G.destroy(),this.G=null);null!==this.u&&(this.u.destroy(),this.u=null);null!==this.F&&(this.F.destroy(),this.F=null);oc.prototype.destroy.call(this)};Object.defineProperty(Lc.prototype,"config",{get:function(){return this.f}});
  Object.defineProperty(Lc.prototype,"name",{get:function(){return this.J},set:function(a){"string"===typeof a&&(this.J=a)}});Object.defineProperty(Lc.prototype,"animation",{get:function(){return this.G}});Object.defineProperty(Lc.prototype,"material",{get:function(){return this.u}});Object.defineProperty(Lc.prototype,"sound",{get:function(){return this.F}});Object.defineProperty(Lc.prototype,"transform",{get:function(){return this.i}});Object.defineProperty(Lc.prototype,"geometry",{get:function(){return this.I}});
  Object.defineProperty(Lc.prototype,"ready",{get:function(){return this.la=!0===this.m.ready}});Object.defineProperty(Lc.prototype,"states",{get:function(){return this.m}});Object.defineProperty(Lc.prototype,"state",{get:function(){return this.m.state},set:function(a){this.m.load(a)}});function Uc(a,b){this.j=a;this.I=b;this.c=null;this.C=0;this.B=1;this.u=!1;this.A=0;this.G=!1;this.i={x:0,y:0,z:200};this.o=360;this.W=null;n.call(this,"HotspotSound")}Uc.prototype=Object.create(n.prototype);g=Uc.prototype;
  g.constructor=Uc;g.Em=function(){null!==this.W&&this.W.D()};
  g.load=function(a){if(!0===D.ed(this.f,a))null!==this.W&&this.W.D(),!0===this.G&&null!==this.c&&this.c.play(this.A,this.u,!0);else if(this.f=a,null!==this.c&&(this.c.destroy(),this.c=null),"undefined"!==typeof a.source&&"object"===typeof a.source)if(this.M=a.uid,"undefined"!==typeof a.source.url&&"string"===typeof a.source.url&&""!==a.source.url){this.m=a.source.url;if("undefined"!==typeof a.options&&"object"===typeof a.options){if("number"===typeof a.options.volume)this.B=a.options.volume;else if("object"===
  typeof a.options.volume){var b=a.options.volume;this.C="number"===typeof b.min?H.$(b.min,0,1):0;this.B="number"===typeof b.max?H.$(b.max,0,1):1}this.u="boolean"===typeof a.options.loop?a.options.loop:!1;this.A="number"===typeof a.options.startTime?a.options.startTime:0;this.G="boolean"===typeof a.options.autoPlay?a.options.autoPlay:!1;this.o="number"===typeof a.options.range?H.$(a.options.range,1,360):360}a=p.get(this.I).config.transform.position;this.i.theta="number"===typeof a.theta?H.$(a.theta,
  -180,180):0;this.i.phi="number"===typeof a.phi?H.$(a.phi,-90,90):0;this.c=new N(this.j,this.M,this.m||"");this.c.onCanPlayThrough.ba(this.Em,this);!0===360>this.o&&(a=H.kf(1,this.i.theta,this.i.phi),this.c.spatialized=360>this.o,this.c.x=a.x,this.c.y=a.y,this.c.z=a.z);this.c.volume=this.B;this.c.loop=this.u;this.c.startTime=this.A;!0===this.G&&("visible"===document[q.visibilityState]?this.c.play(this.A,this.u,!0):this.c.resumed=!0)}else"undefined"!==typeof a.source.target&&!0===p.gb(a.source.target)&&
  p.get(a.source.target)};g.update=function(){if(!1===this.j.audio.enabled)null!==this.c&&this.c.stop();else if(!0===360>this.o&&!0===360>this.o&&"number"===typeof this.o){var a=this.j.renderer.camera,a=I.Bb(H.T(a.yaw),H.T(a.pitch),0),b=I.Bb(H.T(this.i.theta),H.T(this.i.phi),0),a=I.jl(b,a),b=H.T(this.o/2);this.c.volume=a<b?this.C+(this.B-this.C)*(1-a/b):this.C}};g.destroy=function(){null!==this.c&&(this.c.destroy(),this.c=null);null!==this.W&&this.W.destroy();n.prototype.destroy.call(this)};
  Object.defineProperty(Uc.prototype,"sound",{get:function(){return this.c}});Object.defineProperty(Uc.prototype,"onReady",{get:function(){null===this.W&&(this.W=new r(this));return this.W}});function Tc(a,b){this.j=a;this.G=b;this.f=null;this.m="";this.i=this.c=null;this.o=1;this.B=!1;this.A=16777215;this.L=null;this.la=this.u=!1;this.W=null;n.call(this,"HotspotMaterial")}Tc.prototype=Object.create(n.prototype);Tc.prototype.constructor=Tc;
  var Yc={IMAGE:"image",se:"sprite",VIDEO:"video",ke:"plugin",Of:"graphics"},Zc={FRONT:"front",BACK:"back",Lf:"double"},$c={Mn:{color:"#ffffff",opacity:0,transparent:!1},oj:{color:"#00ff00",opacity:.8,transparent:!1}};g=Tc.prototype;g.so=function(a){this.L=a=a.emitter;this.c=new THREE.Texture;this.c.generateMipmaps=!1;this.c.minFilter=THREE.LinearFilter;this.Kh(a.frame);ad(this)};
  g.yp=function(a){a=a.emitter;this.c=new THREE.Texture;this.c.generateMipmaps=!1;this.c.minFilter=THREE.LinearFilter;this.Kh(a.frame);ad(this)};g.Dp=function(a){a=a.emitter;a.play();this.c=new THREE.Texture;this.c.generateMipmaps=!1;this.c.minFilter=THREE.LinearFilter;this.c.image=a.element;ad(this)};g.Ik=function(a){a=a.data;a.uid===this.f.plugin&&(this.j.plugins.onInstanceCreate.remove(this.Ik,this),bd(this,a))};function bd(a,b){!0===b.instanceReady?cd(a,b):b.onInstanceReady.ba(a.qp,a)}
  g.qp=function(a){a=a.emitter;if(null===a.instance||!1===a.instanceReady)throw Error("Plugin instance not available");cd(this,a)};function cd(a,b){a.L=b.instance.texture;a.c=new THREE.Texture(a.L.dom);a.c.format=THREE.RGBAFormat;a.c.minFilter=THREE.LinearFilter;a.c.generateMipmaps=!1;a.c.needsUpdate=!0;ad(a)}function ad(a){dd(a);a.la=!0;null!==a.W&&a.W.D()}
  function dd(a){if(null!==a.j.renderer.view.current){null!==a.i&&(a.i.dispose(),a.i=null);var b=D.clone(a.j.renderer.view.current.shaderWTS.mapping);a.m===Yc.Of&&(b.fragmentShader=Ub.wts_frag_color,b.uniforms.tColor={type:"c",value:new THREE.Color(a.A)});b.uniforms.tOpacity={type:"f",value:a.o};var d=Mb.pb(b.vertexShader),e=Mb.pb(b.fragmentShader),h=THREE.DoubleSide;switch(a.C){case Zc.FRONT:h=THREE.FrontSide;break;case Zc.BACK:h=THREE.BackSide;break;case Zc.Lf:h=THREE.DoubleSide}a.i=new THREE.RawShaderMaterial({fragmentShader:e,
  vertexShader:d,uniforms:b.uniforms,side:h,name:"HotspotMaterial"});a.i.transparent=a.B;a.i.needsUpdate=!0}}g.km=function(){dd(this)};
  g.load=function(a){this.f=a;this.la=!1;a=this.f;this.o="number"===typeof a.opacity?H.$(a.opacity,0,1):1;this.B="boolean"===typeof a.transparent?a.transparent:!1;this.A="string"===typeof a.color?a.color:16777215;this.u="boolean"===typeof a.update?a.update:!1;this.C="string"===typeof a.side?a.side:Zc.Lf;"undefined"!==typeof a.image&&null!==a.image?(a=a.image,this.m=Yc.IMAGE,"string"===typeof a&&(a={url:a}),a.renderMode=ed.dc,this.L=new Za(this.j,a),this.L.onLoadComplete.ba(this.so,this)):"undefined"!==
  typeof a.sprite&&null!==a.sprite?(a=a.sprite,this.m=Yc.se,this.u=!0,this.L=new fd(this.j,a),this.L.onLoadComplete.ba(this.yp,this)):"undefined"!==typeof a.video&&null!==a.video?(a=a.video,this.m=Yc.VIDEO,this.u=!0,this.L=new K(this.j,this.G+"-material-video"),this.L.currentTime=1E5,this.L.onLoadedMetaData.ba(this.Dp,this),this.L.load(a.url)):"undefined"!==typeof a.plugin&&null!==a.plugin?(a=a.plugin,this.m=Yc.ke,a=this.j.plugins.get(a),"undefined"===typeof a||null===a?this.j.plugins.onInstanceCreate.add(this.Ik,
  this):bd(this,a)):(this.m=Yc.Of,ad(this))};g.update=function(){this.i&&this.i.uniforms&&(this.i.uniforms.tTexture.value=this.c,this.i.uniforms.tOpacity.value=this.o);null!==this.c&&!0===this.u&&(this.c.needsUpdate=!0)};g.Kh=function(a){null===this.L||this.m!==Yc.IMAGE&&this.m!==Yc.se||(this.L.frame=a||new Qa(0,0,this.L.element.naturalWidth,this.L.element.naturalHeight),this.c.image=this.L.canvas,this.c.image.crossOrigin="anonymous",this.c.needsUpdate=!0,this.update())};
  g.ti=function(){var a={color:this.A,opacity:this.o,transparent:this.B,side:this.C,update:this.u};switch(this.m){case Yc.IMAGE:a.image=this.f.image;break;case Yc.se:a.sprite=this.f.sprite;break;case Yc.VIDEO:a.video=this.f.video;break;case Yc.ke:a.plugin=this.f.plugin}return a};
  g.destroy=function(){null!==this.c&&(this.c.dispose(),this.c=null);null!==this.i&&(this.i.dispose(),this.i=null);null!==this.L&&(this.m!==Yc.ke&&this.L.destroy(),this.L=null);null!==this.W&&(this.W.destroy(),this.W=null);this.j=null;n.prototype.destroy.call(this)};Object.defineProperty(Tc.prototype,"type",{get:function(){return this.m}});Object.defineProperty(Tc.prototype,"texture",{get:function(){return this.c}});Object.defineProperty(Tc.prototype,"material",{get:function(){return this.i}});
  Object.defineProperty(Tc.prototype,"opacity",{get:function(){return this.o}});Object.defineProperty(Tc.prototype,"transparent",{get:function(){return this.B}});Object.defineProperty(Tc.prototype,"color",{get:function(){return this.A}});Object.defineProperty(Tc.prototype,"side",{get:function(){return this.C}});Object.defineProperty(Tc.prototype,"displayObject",{get:function(){return this.L}});Object.defineProperty(Tc.prototype,"ready",{get:function(){return this.la}});
  Object.defineProperty(Tc.prototype,"onReady",{get:function(){null===this.W&&(this.W=new r(this));return this.W}});function Sc(){this.f=gd;this.m="";this.c=null;this.i=hd;this.M=null}var gd={type:"plane",options:{width:20,height:20,widthSegments:8,heightSegments:8},offset:hd},hd={x:0,y:0,z:0};function id(a){a=a||{};return new THREE.PlaneBufferGeometry(a.width||20,a.height||20,a.widthSegments||8,a.heightSegments||8)}
  Sc.prototype.load=function(a){a=this.f="undefined"!==typeof a&&"string"===typeof a.type?a:D.ta({},gd);this.m=a.type;var b=a.options;this.i="undefined"!==typeof a.offset?a.offset:{x:0,y:0,z:0};switch(this.m){case jd.eg:this.c=id(b);break;case jd.If:a=b||{};this.c=new THREE.BoxBufferGeometry(a.width||20,a.height||20,a.depth||20,a.widthSegments||8,a.heightSegments||8,a.depthSegments||8);break;case jd.ng:a=b||{};this.c=new THREE.SphereBufferGeometry(a.radius||10,a.widthSegments||64,a.heightSegments||
  64,a.phiStart||0,a.phiLength||2*Math.PI,a.thetaStart||0,a.thetaLength||2*Math.PI);break;case jd.Jf:a=b||{};this.c=new THREE.CylinderBufferGeometry(a.radiusTop||10,a.radiusBottom||10,a.height||20,a.radiusSegments||32,a.heightSegments||1,a.openEnded||!1,a.thetaStart||0,a.thetaLength||2*Math.PI);break;case jd.mg:a=b||{};if(Array.isArray(a.points)){a.points.push(a.points[0]);for(var d,e,h=[],b=0,k=a.points.length-1;b<k;b++)d=a.points[b],e=a.points[b+1],d[0]===e[0]&&d[1]===e[1]||h.push(d);a.points=h;3>
  a.points.length&&(console.warn("$_HotspotGeometry.SHAPE: the points given to draw the shape should be a least 3"),a.points=null)}!1===Array.isArray(a.points)&&(a.points=[[-10,3],[3,3],[3,8],[15,0],[3,-8],[3,-3],[-10,-3]]);d=[];b=0;for(k=a.points.length;b<k;b++)h=a.points[b],!0===Array.isArray(h)&&(e="number"===typeof h[0]&&!1===isNaN(h[0])?h[0]:0,h="number"===typeof h[1]&&!1===isNaN(h[1])?h[1]:0,d.push(new THREE.Vector2(e,h)));this.c=new THREE.ShapeBufferGeometry(new THREE.Shape(d));break;default:this.c=
  id(b)}this.c.applyMatrix((new THREE.Matrix4).makeTranslation(this.i.x,this.i.y,this.i.z));null!==this.M&&this.M.D()};
  Sc.prototype.o=function(){var a={type:this.m},b={};switch(this.m){case jd.eg:case jd.If:case jd.ng:case jd.Jf:b=this.c.parameters;break;case jd.mg:b=[];if(!0===Array.isArray(this.c.parameters.shapes.curves)){var d=this.c.parameters.shapes.curves;b.push([d[0].v1.x,d[0].v1.y]);b.push([d[0].v2.x,d[0].v2.y]);for(var e=1,h=d.length;e<h;e++)b.push([d[e].v2.x,d[e].v2.y])}else b=this.f.options.points;b={points:b}}a.options=b;return a};
  Sc.prototype.destroy=function(){null!==this.c&&(this.c.dispose(),this.c=null);null!==this.M&&(this.M.destroy(),this.M=null)};Object.defineProperty(Sc.prototype,"type",{get:function(){return this.m}});Object.defineProperty(Sc.prototype,"geometry",{get:function(){return this.c}});Object.defineProperty(Sc.prototype,"onLoadComplete",{get:function(){null===this.M&&(this.M=new r(this));return this.M}});
  Object.defineProperty(Sc.prototype,"offset",{get:function(){return this.i},set:function(a){"undefined"===typeof a||"number"!==typeof a.x&&"number"!==typeof a.y&&"number"!==typeof a.z||(a=D.ta(hd,a),this.c.applyMatrix((new THREE.Matrix4).makeTranslation(a.x,a.y,a.z)),this.i.x+=a.x,this.i.y+=a.y,this.i.z+=a.z)}});var jd={eg:"plane",If:"box",ng:"sphere",Jf:"cylinder",mg:"shape"};
  function Pc(){this.m=this.c=this.f=this.i=null;n.call(this,"HotspotTransform");ba(this);this.i=new kd(this.M,0,0,-200);this.f=new kd(this.M,0,0,0);this.c=new kd(this.M,1,1,1)}Pc.prototype=Object.create(n.prototype);g=Pc.prototype;g.constructor=Pc;
  function ld(a,b){var d=!1;if("undefined"!==typeof b.position){var e=D.ta(a.i.c(),md(b.position));!1===D.ed(a.i.c(),e)&&(a.i.load(e,!1),d=!0)}"undefined"!==typeof b.rotation&&(e=D.ta({},a.f.c()),e.x="number"===typeof b.rotation.x?b.rotation.x:0,e.y="number"===typeof b.rotation.y?b.rotation.y:0,e.z="number"===typeof b.rotation.z?b.rotation.z:0,!1===D.ed(a.f.c(),e)&&(a.f.load(e,!1),d=!0));"undefined"!==typeof b.scale&&(e=D.ta({},a.c.c()),e.x="number"===typeof b.scale.x?H.$(b.scale.x,1E-6,1E5):1,e.y=
  "number"===typeof b.scale.y?H.$(b.scale.y,1E-6,1E5):1,e.z="number"===typeof b.scale.z?H.$(b.scale.z,1E-6,1E5):1,!1===D.ed(a.c.c(),e)&&(a.c.load(e,!1),d=!0));return d}
  function md(a){var b={x:0,y:0,z:-200};"undefined"!==typeof a&&null!==a&&("number"===typeof a.radius||"number"===typeof a.theta||"number"===typeof a.phi?b=H.kf("number"===typeof a.radius?a.radius:200,"number"===typeof a.theta?H.T(a.theta):0,"number"===typeof a.phi?H.T(a.phi):0):(b.x="number"===typeof a.x?a.x:0,b.y="number"===typeof a.y?a.y:0,b.z="number"===typeof a.z?a.z:-200));return b}
  g.zq=function(a){this.i.load(a.position);this.f.load({x:-H.xa(a.rotation.x),y:H.xa(a.rotation.y),z:H.xa(a.rotation.z)});this.c.load(a.scale)};g.Db=function(){null!==this.m&&this.m.D()};g.load=function(a,b){a=ld(this,a);!1!==b&&!0===a&&this.Db()};g.ui=function(){return{position:this.i.c(),rotation:this.f.c(),scale:this.c.c()}};Object.defineProperty(Pc.prototype,"position",{get:function(){return this.i},set:function(a){ld(this,{position:a})}});
  Object.defineProperty(Pc.prototype,"rotation",{get:function(){return this.f},set:function(a){ld(this,{rotation:a})}});Object.defineProperty(Pc.prototype,"scale",{get:function(){return this.c},set:function(a){ld(this,{scale:a})}});Object.defineProperty(Pc.prototype,"onChange",{get:function(){null===this.m&&(this.m=new r(this));return this.m}});function kd(a,b,d,e){this.o=a;this.i="number"===typeof b?b:0;this.M="number"===typeof d?d:0;this.m="number"===typeof e?e:0;this.f=null}
  kd.prototype.load=function(a,b){var d=!1;"number"===typeof a.x&&!1===isNaN(a.x)&&this.i!==a.x&&(this.i=a.x,d=!0);"number"===typeof a.y&&!1===isNaN(a.y)&&this.M!==a.y&&(this.M=a.y,d=!0);"number"===typeof a.z&&!1===isNaN(a.z)&&this.m!==a.z&&(this.m=a.z,d=!0);!1!==b&&!0===d&&(null!==this.f&&this.f.D(),p.get(this.o).Db());return d};kd.prototype.c=function(){return{x:this.i,y:this.M,z:this.m}};kd.prototype.destroy=function(){null!==this.f&&(this.f.destroy(),this.f=null)};
  Object.defineProperty(kd.prototype,"x",{get:function(){return this.i},set:function(a){"number"===typeof a&&!0!==isNaN(a)&&this.i!==a&&(this.i=a,null!==this.f&&this.f.D(),p.get(this.o).Db())}});Object.defineProperty(kd.prototype,"y",{get:function(){return this.M},set:function(a){"number"===typeof a&&!0!==isNaN(a)&&this.M!==a&&(this.M=a,null!==this.f&&this.f.D(),p.get(this.o).Db())}});
  Object.defineProperty(kd.prototype,"z",{get:function(){return this.m},set:function(a){"number"===typeof a&&!0!==isNaN(a)&&this.m!==a&&(this.m=a,null!==this.f&&this.f.D(),p.get(this.o).Db())}});Object.defineProperty(kd.prototype,"values",{get:function(){return new THREE.Vector3(this.i,this.M,this.m)}});Object.defineProperty(kd.prototype,"onChange",{get:function(){null===this.f&&(this.f=new r(this));return this.f}});
  function Rc(a,b){this.B="";this.i=null;this.G=this.A=this.I=!1;this.u=!0;this.m=null;kc.call(this,a,b,"HotspotAnimation");this.c=[{prop:["rotation.x","rotation.y","rotation.z"],ib:[[-180,180],[-180,180],[-180,180]],smooth:!1},{prop:["position.x","position.y","position.z"],smooth:!1},{prop:["scale.x","scale.y","scale.z"],smooth:!1}]}Rc.prototype=Object.create(kc.prototype);g=Rc.prototype;g.constructor=Rc;
  g.load=function(a){this.stop();this.u="boolean"===typeof a.enabled?a.enabled:!0;this.I="boolean"===typeof a.loop?a.loop:!1;this.A="boolean"===typeof a.random?a.random:!1;this.G="boolean"===typeof a.autoPlay?a.autoPlay:!1;null!==a.tracks&&D.za(a.tracks,"string")&&(this.i=!0===this.A?D.Ld(a.tracks):a.tracks)};g.rc=function(){if(1<this.i.length){var a=this.i.indexOf(this.B)+1;if(a<this.i.length){this.play(a);return}}!0===this.I?(!0===this.A&&(this.i=D.Ld(this.i)),this.play(0)):kc.prototype.rc.call(this)};
  g.uf=function(){null!==this.m&&this.m.D()};
  g.play=function(a){if(!1!==this.u){this.B="number"===typeof a?this.i[a]:"string"===typeof a?a:this.i[0];a=p.get(this.B);mc(this);var b,d=a.offset,e=new gc(this.j,this.ma);e.tween.easing=a.easing;e.instruction=this.c[0];e.instruction.smooth=a.smooth;e.onComplete.add(this.rc,this);e.onProgress.add(this.uf,this);for(var h,k,l,t=0,v=a.keyframes.length;t<v;t++)b=a.keyframes[t].time+d,h=a.keyframes[t].data.rotation,"undefined"!==typeof h&&null!==h&&(k="undefined"!==typeof h.x&&null!==h.x?h.x:lc(this,b,
  a.keyframes,"x",e.tween.easing,"rotation"),l="undefined"!==typeof h.y&&null!==h.y?h.y:lc(this,b,a.keyframes,"y",e.tween.easing,"rotation"),h="undefined"!==typeof h.z&&null!==h.z?h.z:lc(this,b,a.keyframes,"z",e.tween.easing,"rotation"),b=new fc(b+d,{rotation:{x:k,y:l,z:h}}),e.timeline.Ab(b));if(0<e.timeline.keyframes.length&&0<e.timeline.keyframes[0].time||0<d)t={rotation:D.clone(this.ma.rotation)},b=new fc(0,t),e.timeline.Ab(b);this.f.push(e);e=new gc(this.j,this.ma);e.tween.easing=a.easing;e.instruction=
  this.c[1];e.instruction.smooth=a.smooth;e.onComplete.add(this.rc,this);e.onProgress.add(this.uf,this);t=0;for(v=a.keyframes.length;t<v;t++)b=a.keyframes[t].time+d,h=a.keyframes[t].data.position,"undefined"!==typeof h&&null!==h&&("number"===typeof h.x||"number"===typeof h.y||"number"===typeof h.z||"number"!==typeof h.radius&&"number"!==typeof h.theta&&"number"!==typeof h.phi?(k="undefined"!==typeof h.x&&null!==h.x?h.x:lc(this,b,a.keyframes,"x",e.tween.easing,"position"),l="undefined"!==typeof h.y&&
  null!==h.y?h.y:lc(this,b,a.keyframes,"y",e.tween.easing,"position"),h="undefined"!==typeof h.z&&null!==h.z?h.z:lc(this,b,a.keyframes,"z",e.tween.easing,"position")):(k="number"===typeof h.radius?h.radius:lc(this,b,a.keyframes,"radius",e.tween.easing,"position"),l="number"===typeof h.theta?H.T(h.theta):H.T(lc(this,b,a.keyframes,"theta",e.tween.easing,"position")),h="number"===typeof h.phi?H.T(h.phi):H.T(lc(this,b,a.keyframes,"phi",e.tween.easing,"position")),h=H.kf(k,l,h),k=h.x,l=h.y,h=h.z),b=new fc(b+
  d,{position:{x:k,y:l,z:h}}),e.timeline.Ab(b));if(0<e.timeline.keyframes.length&&0<e.timeline.keyframes[0].time||0<d)t={position:D.clone(this.ma.position)},b=new fc(0,t),e.timeline.Ab(b);this.f.push(e);e=new gc(this.j,this.ma);e.tween.easing=a.easing;e.instruction=this.c[2];e.instruction.smooth=a.smooth;e.onComplete.add(this.rc,this);e.onProgress.add(this.uf,this);t=0;for(v=a.keyframes.length;t<v;t++)b=a.keyframes[t].time+d,h=a.keyframes[t].data.scale,"undefined"!==typeof h&&null!==h&&(k="undefined"!==
  typeof h.x&&null!==h.x?h.x:lc(this,b,a.keyframes,"x",e.tween.easing,"scale"),l="undefined"!==typeof h.y&&null!==h.y?h.y:lc(this,b,a.keyframes,"y",e.tween.easing,"scale"),h="undefined"!==typeof h.z&&null!==h.z?h.z:lc(this,b,a.keyframes,"z",e.tween.easing,"scale"),b=new fc(b+d,{scale:{x:k,y:l,z:h}}),e.timeline.Ab(b));if(0<e.timeline.keyframes.length&&0<e.timeline.keyframes[0].time||0<d)t={scale:D.clone(this.ma.scale)},b=new fc(0,t),e.timeline.Ab(b);this.f.push(e);this.f[0].play();this.f[1].play();this.f[2].play()}};
  g.destroy=function(){this.i=null;null!==this.m&&(this.m.destroy(),this.m=null);kc.prototype.destroy.call(this)};Object.defineProperty(Rc.prototype,"enabled",{get:function(){return this.u}});Object.defineProperty(Rc.prototype,"autoPlay",{get:function(){return this.G}});Object.defineProperty(Rc.prototype,"onProgress",{get:function(){null===this.m&&(this.m=new r(this));return this.m}});function Nc(a){nc.call(this,"HotspotAnimationTrack");this.m(a)}Nc.prototype=Object.create(nc.prototype);
  Nc.prototype.constructor=Nc;function Vc(a,b){this.j=a;this.i=b;this.f=null;this.u="";this.o="default";this.A=!0;this.la=!1;this.c={geometry:!1,transform:!1,material:!1,sound:!1,animation:!1};this.m=null;n.call(this,"HotspotStates");a=p.get(this.i);if("undefined"===typeof a)throw"No hotspot match with uid: "+this.i;this.f={options:{},default:a.config}}Vc.prototype=Object.create(n.prototype);Vc.prototype.constructor=Vc;var nd=["options"];
  function od(a){if(null===a.f)return[];for(var b=Object.keys(a.f),d=0,e=nd.length;d<e;d++){var h=b.indexOf(nd[d]);-1!==h&&b.splice(h,1)}"default"!==a.o&&"undefined"!==typeof a.f[a.o]&&(h=b.indexOf("default"),-1!==h&&b.splice(h,1));return b}g=Vc.prototype;g.ro=function(){this.c.geometry=!1;pd(this)};g.Eo=function(){this.c.material=!1;pd(this)};g.wp=function(){this.c.sound=!1;pd(this)};function pd(a){for(var b in a.c)if(!0===a.c[b])return;a.la=!0;null!==a.m&&a.m.D()}
  g.ia=function(a){a=this.f=D.ta(this.f,a);this.o="string"===typeof a.options["default"]?a.options["default"]:"default";this.A="boolean"===typeof a.options.auto?a.options.auto:!0;this.f["default"]=D.ta(this.f["default"],a[this.o])};
  g.load=function(a){a="string"===typeof a?a:this.o;var b=p.get(this.i);if("undefined"!==typeof b&&"object"===typeof this.f[a]&&a!==this.u){this.la=!1;this.u=a;"object"===typeof this.f[a].sound&&(this.c.sound=!0);"object"===typeof this.f[a].animation&&(this.c.animation=!0);this.c.material=!0;this.c.geometry=!0;this.c.transform=!0;if(!0===this.c.material){var d=D.ta(b.config.material,this.f[a].material),e=p.get(this.i);e.material.onReady.ba(this.Eo,this);e.material.load(d)}!0===this.c.sound&&(d=D.ta(b.config.sound,
  this.f[a].sound),e=p.get(this.i),e.sound.onReady.ba(this.wp,this),e.sound.load(d));!0===this.c.animation&&(d=D.ta(b.config.animation,this.f[a].animation),p.get(this.i).animation.load(d,!1),this.c.animation=!1,pd(this));!0===this.c.geometry&&(d=D.ta(b.config.geometry,this.f[a].geometry),e=p.get(this.i),e.geometry.onLoadComplete.ba(this.ro,this),e.geometry.load(d));!0===this.c.transform&&(a=D.ta(b.config.transform,this.f[a].transform),p.get(this.i).transform.load(a,!1),this.c.transform=!1,pd(this))}};
  g.Fm=function(a){if(null===a||"undefined"===typeof a||2>a.length)a=od(this);var b=a.indexOf(this.u),d=0;b<a.length-1&&(d=b+1);this.load(a[d])};g.destroy=function(){this.j=null;null!==this.m&&(this.m.destroy(),this.m=null);n.prototype.destroy.call(this)};Object.defineProperty(Vc.prototype,"state",{get:function(){return this.u},set:function(a){this.load(a)}});Object.defineProperty(Vc.prototype,"names",{get:function(){return od(this)}});Object.defineProperty(Vc.prototype,"ready",{get:function(){return this.la}});
  Object.defineProperty(Vc.prototype,"auto",{get:function(){return this.A}});Object.defineProperty(Vc.prototype,"onLoadComplete",{get:function(){null===this.m&&(this.m=new r(this));return this.m}});var Kc={qg:"3d",rj:"dom"};
  function L(a){this.j=a;this.f=null;this.K=0;this.pa=-Infinity;this.oa=Infinity;this.H=0;this.Z=-Infinity;this.U=Infinity;this.X=0;this.na=-Infinity;this.ea=Infinity;this.G=90;this.V=0;this.R=Infinity;this.S=0;this.ga=!1;this.m=this.o=this.i=this.c=this.B=this.N=this.u=null;this.aa=0;this.J=this.O=null;this.ca=!1;this.I=this.F=this.C=this.A=null;n.call(this,"Camera");qd(this);this.u=new THREE.Matrix4;this.N=new THREE.Matrix4;this.B=new THREE.Quaternion;this.J=new rd(this.j,sd.gaze);this.j.renderer.view.onChange.add(this.Nd,
  this);this.j.renderer.onBackgroundReady.add(this.Nd,this);td(this);ud(this);this.o=this.c.clone();this.o.name="CameraLeft";this.o.layers.enable(1);this.o.add(this.J.object);this.m=this.c.clone();this.m.name="CameraRight";this.m.layers.enable(2);null!==this.f&&vd(this,this.f)}L.prototype=Object.create(n.prototype);L.prototype.constructor=L;
  var sd={keep:!1,parallax:0,yaw:{min:-Infinity,max:Infinity,default:0},pitch:{min:-Infinity,max:Infinity,default:0},roll:{min:-Infinity,max:Infinity,default:0},fov:{min:0,max:Infinity,default:90},gaze:{delay:2E3,cursor:{innerRadius:.02,outerRadius:.04,color:16777215,opacity:.5},progress:{innerRadius:.02,outerRadius:.04,color:16711680,opacity:.5}}};
  function vd(a,b){a.S=b.parallax;a.aa=50*a.S;a.ga=b.keep;if(!0!==a.ga||!0!==a.ca)"number"===typeof b.fov.min&&(a.V=H.T(b.fov.min)),"number"===typeof b.fov.max&&(a.R=H.T(b.fov.max)),"number"===typeof b.fov["default"]&&wd(a,b.fov["default"],H.Pa),"number"===typeof b.yaw.min&&(a.pa=H.T(b.yaw.min)),"number"===typeof b.yaw.max&&(a.oa=H.T(b.yaw.max)),"number"===typeof b.yaw["default"]&&xd(a,b.yaw["default"],H.Pa),"number"===typeof b.pitch.min&&(a.Z=H.T(b.pitch.min)),"number"===typeof b.pitch.max&&(a.U=H.T(b.pitch.max)),
  "number"===typeof b.pitch["default"]&&yd(a,b.pitch["default"],H.Pa),"number"===typeof b.roll.min&&(a.na=H.T(b.roll.min)),"number"===typeof b.roll.max&&(a.ea=H.T(b.roll.max)),"number"===typeof b.roll["default"]&&zd(a,b.roll["default"],H.Pa),Ad(a),Bd(a),Cd(a),a.J.load(b.gaze)}function qd(a){a.A={yaw:!1,pitch:!1,roll:!1,fov:!1}}
  function td(a){"undefined"!==typeof a.j.renderer&&(a.c=new THREE.PerspectiveCamera(a.G,a.j.renderer.displayResolution.ratio,.01,2E4),a.c.name="CameraMain",a.c.matrixAutoUpdate=!1)}function ud(a){"undefined"!==typeof a.j.renderer&&(a.i=new THREE.OrthographicCamera(-1E3,1E3,1E3,-1E3,.01,1E4),a.i.name="CameraFlat",a.i.matrixAutoUpdate=!1)}
  function Dd(a,b){var d=Math.tan(H.T(a.upDegrees)),e=Math.tan(H.T(a.downDegrees)),h=Math.tan(H.T(a.leftDegrees)),k=Math.tan(H.T(a.rightDegrees));a=2/(h+k);var h=(h-k)*a*.5,k=2/(d+e),d=(d-e)*k*.5,e=new THREE.Matrix4,l=e.elements;l[0]=a;l[1]=0;l[2]=-h;l[3]=0;l[4]=0;l[5]=k;l[6]=d;l[7]=0;l[8]=0;l[9]=0;l[10]=b.far/(b.near-b.far);l[11]=b.far*b.near/(b.near-b.far);l[12]=0;l[13]=0;l[14]=-1;l[15]=0;e.transpose();return e}
  function Ad(a){a.u=H.Mc(a.K,a.H,a.X,!1);a.N=a.u.clone().transpose();a.B=I.Bb(a.K,a.H,a.X);Ed(a)}function Fd(a){a.u=I.im(a.B);a.N=a.u.clone().transpose();var b=I.Md(a.B);Gd(a,b.yaw,b.pitch,b.roll,null,H.sb)}
  function Bd(a){if(null!==a.c&&null!==a.j.renderer.view.current){var b=(new THREE.Matrix4).copy(a.N);a.S&&b.multiply((new THREE.Matrix4).makeTranslation(0,0,-a.aa));a.c.quaternion.setFromRotationMatrix(b);a.c.matrixWorld=b;a.c.matrixWorldInverse.getInverse(b);a.c.fov=H.xa(a.j.renderer.view.current.We());a.c.aspect=a.j.renderer.displayResolution.ratio;a.c.updateProjectionMatrix()}}
  function Cd(a){if(null!==a.i){var b=a.i.right-a.i.left,d=a.i.top-a.i.bottom;a.i.left=a.i.position.x-b/2;a.i.right=a.i.position.x+b/2;a.i.top=a.i.position.y+d/2;a.i.bottom=a.i.position.y-d/2;b=a.j.renderer.view.current;null!==b&&null!==b.fovMax?(b=Math.min(b.fovMax,a.R),a.i.zoom=b/a.G):a.i.zoom=1;a.i.updateProjectionMatrix()}}
  function Ed(a){var b=!1;if(!0===a.A.yaw||!0===a.A.pitch||!0===a.A.roll)b=!0,null!==a.F&&a.F.D(null,!0);!0===a.A.fov&&(b=!0,null!==a.I&&a.I.D(null,!0));!0===b&&null!==a.C&&a.C.D(null,!0)}
  function xd(a,b,d){if("number"!==typeof b||!0===isNaN(b))return!1;d=d===H.Pa||d===H.sb?d:H.sb;b=d===H.Pa?H.T(b):b;if(null!==a.j.renderer.backgroundRenderer&&null!==a.j.renderer.backgroundRenderer.displayObject&&a.j.renderer.view.type===lb.$a){d=a.j.renderer.backgroundRenderer.displayObject;var e=d.pixelWidth/d.pixelHeight;d.element instanceof HTMLVideoElement&&(e=d.element.videoWidth/d.element.videoHeight);b=H.ib(b,-Math.PI*e,Math.PI*e)}else b=H.ib(b,-Math.PI,Math.PI);d=Hd(a);b=H.$(b,d.min,d.max);
  d=a.K!==b;a.A.yaw=d;a.K=b;return d}function Hd(a,b,d){var e=a.pa,h=a.oa;d=d||a.G;!1!==b&&e!==h&&(b=.5*d*a.j.renderer.displayResolution.ratio,e+=b,h-=b);a=a.j.renderer.view.current;null!==a&&(e=Math.max(a.yawMin,e),h=Math.min(a.yawMax,h));return{min:e,max:h}}
  function yd(a,b,d){if("number"!==typeof b||!0===isNaN(b))return!1;var e=a.H;d=d===H.Pa||d===H.sb?d:H.sb;b=d===H.Pa?H.T(b):b;b=H.ib(b,-Math.PI,Math.PI);d=Id(a);b=H.$(b,d.min,d.max);Math.abs(e)>Math.PI/2&&Math.abs(b)===Math.PI/2&&(b=0);e=a.H!==b;a.A.pitch=e;a.H=b;return e}function Id(a,b,d){var e=a.Z,h=a.U;d=d||a.G;!1!==b&&e!==h&&(b=.5*d,e+=b,h-=b);a=a.j.renderer.view.current;null!==a&&(e=Math.max(a.pitchMin,e),h=Math.min(a.pitchMax,h));return{min:e,max:h}}
  function zd(a,b,d){if("number"!==typeof b||!0===isNaN(b))return!1;d=d===H.Pa||d===H.sb?d:H.sb;b=d===H.Pa?H.T(b):b;b=H.ib(b,-Math.PI,Math.PI);d=Jd(a);b=H.$(b,d.min,d.max);d=a.X!==b;a.A.roll=d;a.X=b;return d}function Jd(a){var b=a.na,d=a.ea;a=a.j.renderer.view.current;null!==a&&(b=Math.max(a.rollMin,b),d=Math.min(a.rollMax,d));return{min:b,max:d}}
  function wd(a,b,d){if("number"!==typeof b||!0===isNaN(b))return!1;d=d===H.Pa||d===H.sb?d:H.sb;b=d===H.Pa?H.T(b):b;d=Kd(a);b=H.$(b,d.min,d.max);d=a.G!==b;a.A.fov=d;a.G=b;d&&(xd(a,a.K),yd(a,a.H));return d}
  function Kd(a){var b=a.V,d=a.R,e=a.j.renderer.view.current;null!==a.j.renderer.backgroundRenderer&&"fovMin"in a.j.renderer.backgroundRenderer?b=Math.max(a.j.renderer.backgroundRenderer.fovMin,b):b||null===e||(b=Math.max(e.fovMin,b),d=Math.min(e.fovMax,d));null!==e&&e.type!==lb.$a&&(e=Id(a,!1),e=e.max-e.min,0<e&&(d=Math.min(e,d)),e=Hd(a,!1),e=e.max-e.min,e/=a.j.renderer.displayResolution.ratio,0<e&&(d=Math.min(e,d)),d<b&&(b=d));return{min:b,max:d}}
  function Gd(a,b,d,e,h,k){h=wd(a,h,k);b=xd(a,b,k);d=yd(a,d,k);a=zd(a,e,k);return!0===b||!0===d||!0===a||!0===h}g=L.prototype;g.Nd=function(){!0===Gd(this,this.K,this.H,this.X,this.G)&&Ad(this)};g.load=function(a){this.f=D.hb(sd,a);vd(this,this.f);this.ca=!0};
  g.Vl=function(a,b,d,e,h,k,l){if("number"===typeof h&&h){if(null!==e&&"undefined"!==typeof e){var t=Kd(this);e=H.$(e,H.xa(t.min),H.xa(t.max));null!==a&&"undefined"!==typeof a&&(t=Hd(this,!0,H.T(e)),a=H.$(a,H.xa(t.min),H.xa(t.max)));null!==b&&"undefined"!==typeof b&&(t=Id(this,!0,H.T(e)),b=H.$(b,H.xa(t.min),H.xa(t.max)))}a=new Ld({easing:{default:l||"LINEAR",start:0},cancelRoll:!!k,keyframes:[{time:h,data:{yaw:a,pitch:b,roll:d,fov:e}}]});this.animation.play(a.uid)}else!0===Gd(this,a,b,d,e,H.Pa)&&Ad(this)};
  g.update=function(){if(!0===this.j.renderer.display.presentingVR){this.J.update();var a=this.j.renderer.display,b=a.vrFrameData,d=a.Bl();null!==d&&(this.B=d,Fd(this));d=a.vrDisplay.getEyeParameters("left");a=a.vrDisplay.getEyeParameters("right");this.c.matrixWorld.decompose(this.o.position,this.o.quaternion,this.o.scale);this.o.matrixWorld=(new THREE.Matrix4).makeRotationFromQuaternion(this.c.quaternion);this.c.matrixWorld.decompose(this.m.position,this.m.quaternion,this.m.scale);this.m.matrixWorld=
  (new THREE.Matrix4).makeRotationFromQuaternion(this.c.quaternion);this.o.matrixWorld.elements[12]=this.c.matrixWorld.elements[12]+d.offset[0];this.o.matrixWorld.elements[13]=this.c.matrixWorld.elements[13]+d.offset[1];this.o.matrixWorld.elements[14]=this.c.matrixWorld.elements[14]+d.offset[2];this.m.matrixWorld.elements[12]=this.c.matrixWorld.elements[12]+a.offset[0];this.m.matrixWorld.elements[13]=this.c.matrixWorld.elements[13]+a.offset[1];this.m.matrixWorld.elements[14]=this.c.matrixWorld.elements[14]+
  a.offset[2];null!==b?(this.o.projectionMatrix.elements=b.leftProjectionMatrix,this.m.projectionMatrix.elements=b.rightProjectionMatrix):(this.o.projectionMatrix=Dd({upDegrees:d.fieldOfView.upDegrees,downDegrees:d.fieldOfView.downDegrees,leftDegrees:d.fieldOfView.leftDegrees,rightDegrees:d.fieldOfView.rightDegrees},this.c),this.m.projectionMatrix=Dd({upDegrees:a.fieldOfView.upDegrees,downDegrees:a.fieldOfView.downDegrees,leftDegrees:a.fieldOfView.leftDegrees,rightDegrees:a.fieldOfView.rightDegrees},
  this.c));Ed(this);b=0;for(a=this.m.children.length;b<a;b++)this.m.remove(this.m.children[b]);a=0;for(d=this.o.children.length;a<d;a++)b=this.o.children[a].clone(),this.m.add(b)}Bd(this);Cd(this);qd(this)};
  g.destroy=function(){this.i=this.c=this.B=this.N=this.u=null;this.J.destroy();this.J=null;this.j.renderer.view.onChange.remove(this.Nd,this);this.j.renderer.onBackgroundReady.remove(this.Nd,this);null!==this.C&&(this.C.destroy(),this.C=null);null!==this.F&&(this.F.destroy(),this.F=null);null!==this.I&&(this.I.destroy(),this.I=null);null!==this.O&&(this.O.destroy(),this.O=null);this.j=null;n.prototype.destroy.call(this)};Object.defineProperty(L.prototype,"config",{get:function(){return this.f},set:function(a){this.load(a)}});
  Object.defineProperty(L.prototype,"keep",{get:function(){return this.ga}});Object.defineProperty(L.prototype,"yaw",{get:function(){return H.xa(this.K)},set:function(a){!0===xd(this,a,H.Pa)&&Ad(this)}});Object.defineProperty(L.prototype,"yawMin",{get:function(){return H.xa(Hd(this).min)}});Object.defineProperty(L.prototype,"yawMax",{get:function(){return H.xa(Hd(this).max)}});Object.defineProperty(L.prototype,"pitch",{get:function(){return H.xa(this.H)},set:function(a){yd(this,a,H.Pa)&&Ad(this)}});
  Object.defineProperty(L.prototype,"pitchMin",{get:function(){return H.xa(Id(this).min)}});Object.defineProperty(L.prototype,"pitchMax",{get:function(){return H.xa(Id(this).max)}});Object.defineProperty(L.prototype,"roll",{get:function(){return H.xa(this.X)},set:function(a){!0===zd(this,a,H.Pa)&&Ad(this)}});Object.defineProperty(L.prototype,"rollMin",{get:function(){return H.xa(Jd(this).min)}});Object.defineProperty(L.prototype,"rollMax",{get:function(){return H.xa(Jd(this).max)}});
  Object.defineProperty(L.prototype,"fov",{get:function(){return H.xa(this.G)},set:function(a){!0===wd(this,a,H.Pa)&&Ad(this)}});Object.defineProperty(L.prototype,"fovMin",{get:function(){return H.xa(Kd(this).min)}});Object.defineProperty(L.prototype,"fovMax",{get:function(){return H.xa(Kd(this).max)}});Object.defineProperty(L.prototype,"quaternion",{get:function(){return this.B},set:function(a){this.B=a;Fd(this);Ed(this)}});
  Object.defineProperty(L.prototype,"animation",{get:function(){null===this.O&&(this.O=new Md(this.j,this));return this.O}});Object.defineProperty(L.prototype,"parallax",{get:function(){return this.S},set:function(a){this.S=H.$(a,0,1);this.aa=50*this.S;Ed(this)}});Object.defineProperty(L.prototype,"modelView",{get:function(){return this.u},set:function(a){this.u=a;this.N=this.u.clone().transpose();a=H.Oc(this.u);Gd(this,a.yaw,a.pitch,a.roll,null,H.sb);this.B=I.tl(this.u);Ed(this)}});
  Object.defineProperty(L.prototype,"modelViewInverse",{get:function(){return this.N}});Object.defineProperty(L.prototype,"main",{get:function(){null===this.c&&td(this);return this.c}});Object.defineProperty(L.prototype,"flat",{get:function(){null===this.i&&ud(this);return this.i}});Object.defineProperty(L.prototype,"perspectiveCameraRadius",{get:function(){return this.aa}});Object.defineProperty(L.prototype,"left",{get:function(){return this.o}});Object.defineProperty(L.prototype,"right",{get:function(){return this.m}});
  Object.defineProperty(L.prototype,"gaze",{get:function(){return this.J}});Object.defineProperty(L.prototype,"onChange",{get:function(){null===this.C&&(this.C=new r(this));return this.C}});Object.defineProperty(L.prototype,"onOrientationChange",{get:function(){null===this.F&&(this.F=new r(this));return this.F}});Object.defineProperty(L.prototype,"onFovChange",{get:function(){null===this.I&&(this.I=new r(this));return this.I}});function Md(a,b){kc.call(this,a,b,"CameraAnimation");Nd(this)}
  Md.prototype=Object.create(kc.prototype);Md.prototype.constructor=Md;function Nd(a){ba(a);a.c=[{prop:"quaternion",smooth:!0,wl:function(){!0===this.Ta.cancelRoll&&(this.ma.quaternion=I.cancelRoll(this.ma.quaternion))},cancelRoll:!0},{prop:"fov",smooth:!1}]}
  Md.prototype.play=function(a,b){"string"===typeof a&&(a=p.get(a));mc(this);var d=new gc(this.j,this.ma);d.tween.easing=a.easing;d.instruction=this.c[0];d.instruction.smooth=a.smooth;d.smooth=a.smooth;d.instruction.cancelRoll=a.cancelRoll;d.onComplete.add(this.rc,this);this.f.push(d);var e=new gc(this.j,this.ma);e.tween.easing=a.easing;e.instruction=this.c[1];e.instruction.smooth=a.smooth;e.onComplete.add(this.rc,this);this.f.push(e);var h=a.keyframes;a=a.offset;var k=d.tween.easing;a=a||0;for(var l,
  t,v,C,ea=0,Fb=h.length;ea<Fb;ea++)t=h[ea].data,l="undefined"!==typeof t.yaw&&null!==t.yaw?t.yaw:lc(this,h[ea].time+a,h,"yaw",k),v="undefined"!==typeof t.pitch&&null!==t.pitch?t.pitch:lc(this,h[ea].time+a,h,"pitch",k),C="undefined"!==typeof t.roll&&null!==t.roll?t.roll:lc(this,h[ea].time+a,h,"roll",k),l=H.T(l),v=H.T(v),C=H.T(C),"undefined"!==typeof l&&null!==l&&"undefined"!==typeof v&&null!==v&&"undefined"!==typeof C&&null!==C&&(l=I.Bb(l,v,C),l=new fc(h[ea].time+a,{quaternion:l}),this.f[0].timeline.Ab(l)),
  "undefined"!==typeof t.fov&&null!==t.fov&&(t=t.fov,l=new fc(h[ea].time+a,{fov:t}),this.f[1].timeline.Ab(l));if(0<h[0].time||0<a)l=new fc(0,{quaternion:D.clone(this.ma.quaternion)}),this.f[0].timeline.Ab(l),l=new fc(0,{fov:this.ma.fov}),this.f[1].timeline.Ab(l);d.play(b);e.play(b)};
  function rd(a,b){this.j=a;this.f=b;this.c=null;this.A=!1;this.u=this.i=null;this.m=0;n.call(this,"CameraGaze");this.i=this.j.clock.create(!1);this.c=new THREE.Object3D;this.c.name="CameraGaze";this.c.position.z=-2;Od(this)}rd.prototype=Object.create(n.prototype);g=rd.prototype;g.constructor=rd;function Pd(a,b,d,e,h,k){k=k||2*Math.PI;return new THREE.RingBufferGeometry(a||.02,b||.04,d||32,e||1,h||0,k)}
  function Od(a){var b=new THREE.MeshBasicMaterial({color:a.f.cursor.color,opacity:a.f.cursor.opacity,transparent:!0}),b=new THREE.Mesh(Pd(a.f.cursor.innerRadius,a.f.cursor.outerRadius),b);b.name="cursor";a.c.add(b)}
  function Qd(a){var b=new THREE.MeshBasicMaterial({color:a.f.progress.color,opacity:a.f.progress.opacity,transparent:!0,side:THREE.DoubleSide}),b=new THREE.Mesh(Pd(a.f.progress.innerRadius,a.f.progress.outerRadius,32,1,Math.PI/2,a.m/100*H.zj),b);b.name="progress";b.rotateY(Math.PI);a.c.add(b)}function Rd(a,b){for(var d=null,e=0,h=a.c.children.length;e<h;e++)a.c.children[e].name===b&&(d=a.c.children[e]);null!==d&&(a.c.remove(d),d.geometry.dispose(),d.material.dispose())}
  g.Bp=function(){this.stop();this.j.renderer.pickingManager.click()};g.load=function(a){this.f=a;Rd(this,"progress");Rd(this,"cursor");Od(this);!0===this.A&&this.m&&Qd(this)};g.start=function(){this.A=!0;this.m=0;Rd(this,"progress");Qd(this);null!==this.i&&(this.i.stop(),this.u=this.i.add(2E3,this.Bp,this),this.i.start())};g.stop=function(){this.A=!1;this.i.stop();this.u=null;this.m=0;var a=this.c.children[1];"undefined"!==typeof a&&null!==a&&(this.c.remove(a),a.geometry.dispose(),a.material.dispose())};
  g.update=function(){!0===this.A&&null!==this.u&&(this.m=100*(this.u.delay-this.i.duration)/this.u.delay,Rd(this,"progress"),Qd(this))};g.destroy=function(){this.stop();null!==this.c&&("undefined"!==typeof this.c.geometry&&null!==this.c.geometry&&this.c.geometry.dispose(),"undefined"!==typeof this.c.material&&null!==this.c.material&&this.c.material.dispose(),this.c=null);this.o=null};
  Object.defineProperty(rd.prototype,"visible",{get:function(){return this.c.visible},set:function(a){this.c.visible=a}});Object.defineProperty(rd.prototype,"object",{get:function(){return this.c}});var Sd={mj:"base",jb:"pointer",je:"keyboard",fe:"gyroscope",de:"gamepad"};function pa(a){this.j=a;this.f=[];this.m=!0;this.c=this.i=null;n.call(this,"ControllerManager")}pa.prototype=Object.create(n.prototype);pa.prototype.constructor=pa;
  var Td={enabled:!0,instances:[{type:Sd.jb,enabled:!0},{type:Sd.je,enabled:!0},{type:Sd.fe,enabled:!0},{type:Sd.de,enabled:!0}]};g=pa.prototype;g.Kd=function(a){null!==this.i&&this.i.D({controller:a})};g.Jd=function(a){null!==this.c&&this.c.D({controller:a})};g.update=function(){if(null!==this.f)for(var a=0,b=this.f.length;a<b;a++)"function"===typeof this.f[a].update&&this.f[a].update()};
  g.ia=function(a){a="undefined"!==typeof a?a:Td;this.m="boolean"===typeof a.enabled?a.enabled:!0;if("undefined"!==typeof a.instances)for(var b,d=0,e=a.instances.length;d<e;d++){b=a.instances[d];switch(b.type){case Sd.jb:b=new Ud(this.j,b);break;case Sd.je:b=new Vd(this.j,b);break;case Sd.fe:b=new Wd(this.j,b);break;case Sd.de:b=new Xd(this.j,b);break;default:b=null}null!==b&&this.f.push(b)}};g.rm=function(a){for(var b,d=0,e=this.f.length;d<e;d++)if(b=this.f[d],b.type===a)return b;return null};
  g.destroy=function(){for(var a;this.f.length;)a=this.f.pop(),null!==a&&"undefined"!==typeof a&&a.destroy();this.f=null;null!==this.i&&(this.i.destroy(),this.i=null);null!==this.c&&(this.c.destroy(),this.c=null);n.prototype.destroy.call(this)};Object.defineProperty(pa.prototype,"all",{get:function(){return this.f}});Object.defineProperty(pa.prototype,"enabled",{get:function(){return this.m},set:function(a){this.m=!!a}});
  Object.defineProperty(pa.prototype,"active",{get:function(){for(var a=0,b=this.f.length;a<b;a++)if(!0===this.f[a].active)return!0;return!1}});Object.defineProperty(pa.prototype,"onControlStart",{get:function(){null===this.i&&(this.i=new r(this));return this.i}});Object.defineProperty(pa.prototype,"onControlEnd",{get:function(){null===this.c&&(this.c=new r(this));return this.c}});
  function R(a,b){this.j=a;this.H=Sd.mj;this.m=null;this.I=this.c=!1;this.i=this.o=null;n.call(this,b||"ControllerBase");this.Nb()}R.prototype=Object.create(n.prototype);g=R.prototype;g.constructor=R;g.Nb=function(){this.j.canvas.pointer.enabled=!0;this.m=this.j.renderer.camera};g.enable=function(){!0!==this.c&&(this.c=!0)};g.Xa=function(){!1!==this.c&&(this.c=!1)};g.destroy=function(){this.j=this.m=null;null!==this.o&&(this.o.destroy(),this.o=null);null!==this.i&&(this.i.destroy(),this.i=null);n.prototype.destroy.call(this)};
  Object.defineProperty(R.prototype,"enabled",{get:function(){return this.c},set:function(a){!0===!!a?this.enable():this.Xa()}});Object.defineProperty(R.prototype,"type",{get:function(){return this.H}});Object.defineProperty(R.prototype,"active",{get:function(){return this.I}});Object.defineProperty(R.prototype,"onControlStart",{get:function(){null===this.o&&(this.o=new r(this));return this.o}});Object.defineProperty(R.prototype,"onControlEnd",{get:function(){null===this.i&&(this.i=new r(this));return this.i}});
  function Ud(a,b){this.f=b;this.O=!0;this.N=this.A=this.C=null;this.F=0;this.G=1;this.J=this.u=null;this.K=!1;R.call(this,a,"ControllerPointer")}Ud.prototype=Object.create(R.prototype);Ud.prototype.constructor=Ud;var Yd={fullscreen:!0,orientation:{drag:!1,hardness:.6,damping:.15,velocityMax:300,invert:{x:!1,y:!1}},zoom:{hardness:5,invert:!1,toPointer:!1}};g=Ud.prototype;
  g.Nb=function(){R.prototype.Nb.call(this);this.H=Sd.jb;this.J=new THREE.Vector2;this.u=new THREE.Vector2;this.C=new THREE.Vector2;this.N=new THREE.Vector2;this.A=new THREE.Vector2;var a=this.f;this.M=a.uid;ba(this);var b=a.options||{};this.Ja=D.hb(Yd.orientation,b.orientation);this.B=D.hb(Yd.zoom,b.zoom);this.O="boolean"===typeof b.fullscreen?b.fullscreen:Yd.fullscreen;this.c="boolean"===typeof a.enabled?a.enabled:!0;!0===this.c&&this.enable()};
  g.$h=function(a){!1!==this.j.controllers.enabled&&(this.j.canvas.pointer.onPanMove.add(this.qf,this),this.K=this.I=!0,a=wc(a.data),this.C=new THREE.Vector2(a.x,a.y),this.N.copy(this.C),this.A.copy(this.C),this.u.set(0,0),null!==this.o&&this.o.D(),this.j.controllers.Kd(this))};
  g.qf=function(a){a=wc(a.data);if(!1!==this.j.controllers.enabled&&null!==a&&(this.N.copy(this.A),this.A.set(a.x,a.y),!0===this.Ja.drag&&!0===this.K)){var b=this.j.view.screenToWorld(this.N);a=this.j.view.screenToWorld(this.A);null!==b&&null!==a&&(b=H.Ad(b.x,b.y,b.z),I.Bb(b.theta,b.phi,0),a=H.Ad(a.x,a.y,a.z),I.Bb(a.theta,a.phi,0),this.m.yaw+=H.xa(b.theta-a.theta),this.m.pitch+=H.xa(b.phi-a.phi),this.m.roll=0)}};
  g.Zh=function(){this.j.canvas.pointer.onPanMove.remove(this.qf,this);this.K=this.I=!1;this.u.set(0,0);this.C.set(0,0);this.A.copy(this.C);null!==this.i&&this.i.D();this.j.controllers.Jd(this)};g.bi=function(){!1!==this.j.controllers.enabled&&(this.F=this.m.fov,this.G=1,this.j.canvas.pointer.onPinchMove.add(this.ai,this))};
  g.ai=function(a){if(!1!==this.j.controllers.enabled){a.data.preventDefault();a=this.B.invert?a.data.scale:1/a.data.scale;var b=this.m.fovMin,d=this.m.fovMax,e=this.F*a/this.G;e<b?this.G=this.F*a/b:e>d&&(this.G=this.F*a/d);e=this.F*a/this.G;this.m.fov=e}};g.rf=function(){this.j.canvas.pointer.onPinchMove.remove(this.ai,this)};
  g.ci=function(a){if(!1!==this.j.controllers.enabled){a.data.preventDefault();var b=(this.B.invert?1:-1)/this.B.hardness,d=1;if(a.data.deltaMode)switch(a.data.deltaMode){case 1:d=33.3;break;case 2:d=self.innerHeight;break;default:d=1}a.data.deltaY&&(b*=a.data.deltaY*d/5);this.m.fov-=Math.min(1,this.m.fov/90)/Math.LN2*b;!0===this.B.toPointer&&(b=wc(a.data),a=this.j.view.screenToWorld(b),a=H.Ad(a.x,a.y,a.z),a=I.Bb(a.theta,a.phi,0),this.j.view.current.qb(),b=this.j.view.screenToWorld(b),b=H.Ad(b.x,b.y,
  b.z),b=I.Bb(b.theta,b.phi,0),a=I.rl(b,a),a=I.Md(a),this.m.yaw+=H.xa(a.yaw),this.m.pitch+=H.xa(a.pitch))}};g.Yh=function(){!1!==this.j.controllers.enabled&&!1!==this.O&&(this.j.fullscreen=!this.j.fullscreen)};
  g.enable=function(){R.prototype.enable.call(this);this.j.canvas.pointer.onPanStart.add(this.$h,this);this.j.canvas.pointer.onPanEnd.add(this.Zh,this);this.j.canvas.pointer.onPinchStart.add(this.bi,this);this.j.canvas.pointer.onPinchEnd.add(this.rf,this);this.j.canvas.pointer.onWheel.add(this.ci,this);this.j.canvas.pointer.onDoubleTap.add(this.Yh,this)};
  g.Xa=function(){R.prototype.Xa.call(this);this.j.canvas.pointer.onPanStart.remove(this.$h,this);this.j.canvas.pointer.onPanMove.remove(this.qf,this);this.j.canvas.pointer.onPanEnd.remove(this.Zh,this);this.j.canvas.pointer.onPinchStart.remove(this.bi,this);this.j.canvas.pointer.onPinchMove.remove(this.rf,this);this.j.canvas.pointer.onPinchEnd.remove(this.rf,this);this.j.canvas.pointer.onWheel.remove(this.ci,this);this.j.canvas.pointer.onDoubleTap.remove(this.Yh,this)};
  g.update=function(){if(!0!==this.Ja.drag){var a=this.j.renderer.displayResolution,a=1/(this.Ja.hardness*Math.min(a.width,a.height)),b=Math.min(1,this.m.fov/90)/Math.LN2;this.u.subVectors(this.A,this.C);this.u.length()>this.Ja.velocityMax&&this.u.setLength(this.Ja.velocityMax);this.u.multiplyScalar(a);this.u.multiplyScalar(b);var d=this.Ja.invert,e=!0===d?-1:"object"===typeof d&&!0===d.y?-1:1,h=this.u.x+this.J.x,a=this.u.y+this.J.y;if(h||a)d=(!0===d?-1:"object"===typeof d&&!0===d.x?-1:1)*h,b*=.05,
  Math.abs(d)>b&&(this.m.yaw+=d,this.m.flat.position.x+=h),e*=a,Math.abs(e)>b&&(this.m.pitch-=e,this.m.flat.position.y-=a),this.J.add(this.u).multiplyScalar(H.$(1-this.Ja.damping,0,1))}};Object.defineProperty(Ud.prototype,"orientation",{get:function(){return this.Ja},set:function(a){this.Ja=a}});Object.defineProperty(Ud.prototype,"zoom",{get:function(){return this.B},set:function(a){this.B=a}});function Vd(a,b){this.f=b;this.u=this.G=this.B=this.A=this.C=null;R.call(this,a,"ControllerKeyboard")}
  Vd.prototype=Object.create(R.prototype);Vd.prototype.constructor=Vd;var Zd={orientation:{hardness:.6,damping:.15,velocityMax:300,invert:!1},zoom:{hardness:5,invert:!1}};g=Vd.prototype;
  g.Nb=function(){R.prototype.Nb.call(this);this.H=Sd.je;this.u=[];this.G=new THREE.Vector2;this.B=new THREE.Vector2;this.C=new THREE.Vector2;this.A=new THREE.Vector2;var a=this.f;this.M=a.uid;ba(this);var b=a.options||{};this.Ja=D.hb(Zd.orientation,b.orientation);this.F=D.hb(Zd.zoom,b.zoom);this.c="boolean"===typeof a.enabled?a.enabled:!0;!1!==b["default"]&&(a=new $d(this.j,[81,37],this.He,this.Je,this.Ie,[68,39],this,"left"),this.u.push(a),a=new $d(this.j,[68,39],this.He,this.Je,this.Ie,[81,37],this,
  "right"),this.u.push(a),a=new $d(this.j,[90,38],this.He,this.Je,this.Ie,[83,40],this,"up"),this.u.push(a),a=new $d(this.j,[83,40],this.He,this.Je,this.Ie,[90,38],this,"down"),this.u.push(a),a=new $d(this.j,107,this.Vh,this.Xh,this.Wh,109,this,"plus"),this.u.push(a),a=new $d(this.j,109,this.Vh,this.Xh,this.Wh,107,this,"minus"),this.u.push(a));if(!0===Array.isArray(b.bindings))for(var a=0,d=b.bindings.length;a<d;a++){var e=b.bindings[a],h=e.in,k=e.out,l=e.name,e=e.events;!1===D.P(h,"number")&&!1===
  D.za(h,"number")?this.warn("Can't add custom keyboard binding, keys in are invalid!"):"object"!==typeof e&&null===e?this.warn("Can't add custom keyboard binding, events are invalid!"):(h=new $d(this.j,h,e.onDown,e.onUp,e.onHold,k,this,l),this.u.push(h))}!0===this.c&&this.enable()};g.He=function(a){if(!1!==this.j.controllers.enabled){this.I=!0;switch(a.name){case "left":case "right":this.B.setX(0);break;case "up":case "down":this.B.setY(0)}null!==this.o&&this.o.D();this.j.controllers.Kd(this)}};
  g.Ie=function(a){if(!1!==this.j.controllers.enabled)switch(a.name){case "left":this.A.setX(this.A.x-5);break;case "right":this.A.setX(this.A.x+5);break;case "up":this.A.setY(this.A.y-5);break;case "down":this.A.setY(this.A.y+5)}};g.Je=function(a){this.I=!1;switch(a.name){case "left":case "right":this.B.setX(0);this.A.setX(0);break;case "up":case "down":this.B.setY(0),this.A.setY(0)}null!==this.i&&this.i.D();this.j.controllers.Jd(this)};
  g.Vh=function(a){!1!==this.j.controllers.enabled&&(this.I=!0,ae(this,a),null!==this.o&&this.o.D(),this.j.controllers.Kd(this))};g.Wh=function(a){ae(this,a)};g.Xh=function(){this.I=!1;null!==this.i&&this.i.D();this.j.controllers.Jd(this)};function ae(a,b){var d=(a.F.invert?1:-1)/a.F.hardness;switch(b.name){case "minus":d*=10;break;case "plus":d*=-10}a.m.fov=a.m.fov-d}g.enable=function(){R.prototype.enable.call(this);for(var a,b=0,d=this.u.length;b<d;b++)a=this.u[b],this.j.keyboard.Ub(a)};
  g.Xa=function(){R.prototype.Xa.call(this);for(var a,b=0,d=this.u.length;b<d;b++)a=this.u[b],this.j.keyboard.yc(a)};
  g.update=function(){var a=this.j.renderer.displayResolution,a=1/(this.Ja.hardness*Math.min(a.width,a.height));this.B.subVectors(this.A,this.C);this.B.length()>this.Ja.velocityMax&&this.B.setLength(this.Ja.velocityMax);this.B.multiplyScalar(a);var a=this.B.x+this.G.x,b=this.B.y+this.G.y;if(a||b){var d=this.Ja.invert?-1:1;this.m.yaw+=d*a;this.m.pitch-=d*b;this.G.add(this.B).multiplyScalar(H.$(1-this.Ja.damping,0,1))}};
  function Wd(a,b){this.f=b;this.B=this.C=this.F=this.u=this.A=null;this.dd=0;this.G=!1;R.call(this,a,"ControllerGyroscope")}Wd.prototype=Object.create(R.prototype);g=Wd.prototype;g.constructor=Wd;
  g.Nb=function(){R.prototype.Nb.call(this);this.H=Sd.fe;this.A=new THREE.Euler;this.u=new THREE.Quaternion;this.F=new THREE.Quaternion(-Math.sqrt(.5),0,0,Math.sqrt(.5));this.C=new THREE.Quaternion;this.B=new THREE.Quaternion;var a=this.f;this.M=a.uid;ba(this);this.c="boolean"===typeof a.enabled?a.enabled:!0;q.onReady.ba(this.lo,this)};g.lo=function(){this.j.renderer.display.onDisplayChange.add(this.Th,this);this.j.renderer.view.onChange.add(this.Uh,this);!0===this.c&&!0===q.gyroscope&&this.enable()};
  g.Th=function(){this.G=!0===this.j.renderer.display.presentingVR?!0:!1};g.Uh=function(){this.G=this.j.renderer.view.type!==lb.Eb?!0:!1};g.Dg=function(a){if(!1!==this.j.controllers.enabled){var b={beta:0,alpha:0,gamma:0};"undefined"!==typeof a&&null!==a&&"undefined"!==typeof a.data&&null!==a.data&&(b=a.data);this.A.set(H.T(b.beta),H.T(b.alpha),-H.T(b.gamma),"YXZ");this.u.setFromEuler(this.A);this.u.multiply(this.F);this.u.multiply(this.C);this.B.set(-this.u.y,-this.u.x,-this.u.z,this.u.w)}};
  g.dh=function(){"undefined"!==typeof screen.orientation?this.dd=H.T(screen.orientation.angle):"undefined"!==typeof window.orientation&&(this.dd=H.T(window.orientation));this.C.setFromAxisAngle(new THREE.Vector3(0,0,1),-this.dd)};g.enable=function(){!1!==this.j.controllers.enabled&&!1!==this.f.enabled&&(R.prototype.enable.call(this),this.j.gyroscope.onDeviceOrientationChange.add(this.Dg,this),this.j.gyroscope.onScreenOrientationChange.add(this.dh,this),this.dh(),this.Dg())};
  g.Xa=function(){!1!==this.j.controllers.enabled&&!1!==this.f.enabled&&(R.prototype.Xa.call(this),this.j.gyroscope.onDeviceOrientationChange.remove(this.Dg,this),this.j.gyroscope.onScreenOrientationChange.remove(this.dh,this))};g.update=function(){!0===this.c&&!0===q.gyroscope&&!1===this.G&&(this.j.camera.quaternion=this.B)};
  g.destroy=function(){this.Xa();this.j.renderer.display.onDisplayChange.remove(this.Th,this);this.j.renderer.view.onChange.remove(this.Uh,this);this.B=this.C=this.F=this.u=this.A=null;R.prototype.destroy.call(this)};function Xd(a,b){this.u=null;this.f=b;this.A=this.B=this.J=this.G=this.F=null;R.call(this,a,"ControllerGamepad")}Xd.prototype=Object.create(R.prototype);Xd.prototype.constructor=Xd;var be={orientation:{hardness:.6,damping:.15,velocityMax:300,invert:{x:!1,y:!1}},zoom:{hardness:5,invert:!1}};
  g=Xd.prototype;
  g.Nb=function(){R.prototype.Nb.call(this);this.H=Sd.de;this.u=[];this.B=[];this.A=[];this.J=new THREE.Vector2;this.G=new THREE.Vector2;this.C=new THREE.Vector2;this.F=new THREE.Vector2;var a=this.f;this.M=a.uid;ba(this);var b=a.options||{};this.Ja=D.hb(be.orientation,b.orientation);this.N=D.hb(be.zoom,b.zoom);this.c="boolean"===typeof a.enabled?a.enabled:!0;!1!==b["default"]&&(a=new ce(this.j,7,this.Qh,this.Sh,this.Rh,6,this,"plus"),this.B.push(a),a=new ce(this.j,6,this.Qh,this.Sh,this.Rh,7,this,
  "minus"),this.B.push(a),a=new de(this.j,0,this.Hp,this,"yaw"),this.A.push(a),a=new de(this.j,1,this.pp,this,"pitch"),this.A.push(a));if("undefined"!==typeof b.bindings){if("undefined"!==typeof b.bindings.buttons&&!0===Array.isArray(b.bindings.buttons))for(var a=0,d=b.bindings.buttons.length;a<d;a++){var e=b.bindings.buttons[a],h=e.in,k=e.out,l=e.name,e=e.events;!1===D.P(h,"number")&&!1===D.za(h,"number")?this.warn("Can't add custom gamepad binding, buttons in are invalid!"):"object"!==typeof e&&null===
  e?this.warn("Can't add custom gamepad binding, events are invalid!"):(h=new ce(this.j,h,e.onDown,e.onUp,e.onHold,k,this,l),this.B.push(h))}if("undefined"!==typeof b.bindings.axes&&!0===Array.isArray(b.bindings.axes))for(a=0,d=b.bindings.axes.length;a<d;a++)l=b.bindings.axes[a],h=l.axis,k=l.name,l=l.events,!1===D.P(h,"number")&&!1===D.za(h,"number")?this.warn("Can't add custom gamepad binding, axis in is invalid!"):"object"!==typeof l&&null===l?this.warn("Can't add custom gamepad binding, events are invalid!"):
  (h=new de(this.j,h,l.onChange,this,k),this.A.push(h))}!0===this.c&&this.enable();this.j.gamepad.onGamepadConnected.add(this.tk,this);this.j.gamepad.onGamepadDisconnected.add(this.uk,this)};g.Hp=function(a,b){.1>Math.abs(b)?(this.G.setX(0),this.F.setX(0)):this.F.setX(180*b)};g.pp=function(a,b){.1>Math.abs(b)?(this.G.setY(0),this.F.setY(0)):this.F.setY(180*b)};g.Qh=function(a){!1!==this.j.controllers.enabled&&(this.I=!0,ee(this,a),null!==this.o&&this.o.D(),this.j.controllers.Kd(this))};
  g.Rh=function(a){ee(this,a)};g.Sh=function(){this.I=!1;null!==this.i&&this.i.D();this.j.controllers.Jd(this)};function ee(a,b){var d=(a.N.invert?1:-1)/a.N.hardness;switch(b.name){case "minus":d*=5;break;case "plus":d*=-5}a.m.fov=a.m.fov-d}g.tk=function(a){a=a.data;-1===this.u.indexOf(a)&&this.u.push(a);for(var b,d=0,e=this.B.length;d<e;d++)b=this.B[d],a.Ub(b);d=0;for(e=this.A.length;d<e;d++)b=this.A[d],a.Ub(b)};
  g.uk=function(a){a=a.data;for(var b,d=0,e=this.u.length;d<e;d++)if(this.u[d].name===a){b=d;break}-1!==b&&this.u.splice(b,1)};g.enable=function(){R.prototype.enable.call(this);for(var a,b=0,d=this.B.length;b<d;b++){a=this.B[b];for(var e=0,h=this.u.length;e<h;e++)this.u[e].Ub(a)}b=0;for(d=this.A.length;b<d;b++)for(a=this.A[b],e=0,h=this.u.length;e<h;e++)this.u[e].Ub(a)};
  g.Xa=function(){R.prototype.Xa.call(this);for(var a,b=0,d=this.B.length;b<d;b++){a=this.B[b];for(var e=0,h=this.u.length;e<h;e++)this.u[e].yc(a)}b=0;for(d=this.A.length;b<d;b++)for(a=this.A[b],e=0,h=this.u.length;e<h;e++)this.u[e].yc(a)};
  g.update=function(){var a=this.j.renderer.displayResolution,a=1/(this.Ja.hardness*Math.min(a.width,a.height));this.G=this.F.clone();this.G.length()>this.Ja.velocityMax&&this.G.setLength(this.Ja.velocityMax);this.G.multiplyScalar(a);var a=this.G.x+this.J.x,b=this.G.y+this.J.y;if(a||b){var d=this.Ja.invert,e=!0===d?-1:"object"===typeof d&&!0===d.y?-1:1;this.m.yaw+=(!0===d?-1:"object"===typeof d&&!0===d.x?-1:1)*a;this.m.pitch-=e*b;this.J.add(this.G).multiplyScalar(H.$(1-this.Ja.damping,0,1))}};
  g.destroy=function(){this.j.gamepad.onGamepadConnected.remove(this.tk,this);this.j.gamepad.onGamepadDisconnected.remove(this.uk,this);this.J=this.G=this.F=this.C=null;for(var a;0<this.B.length;)a=this.B.pop(),a.destroy();for(this.B=null;0<this.A.length;)a=this.A.pop(),a.destroy();this.A=null;R.prototype.destroy.call(this)};
  function x(a){this.j=a;this.f=null;this.m=1;this.aa=!1;this.S=this.H=this.X=1;this.F=!1;this.O=!0;this.c=null;this.N=!1;this.o=!0;this.i=null;this.K="running";this.B=this.A=this.I=this.G=this.C=this.u=this.J=null;n.call(this,"SoundManager")}x.prototype=Object.create(n.prototype);g=x.prototype;g.constructor=x;
  g.boot=function(){this.c=[];if(!0===q.webAudio)try{"function"===typeof window.AudioContext?this.i=new window.AudioContext:this.i=new window.webkitAudioContext}catch(a){this.i=null,this.o=!1}!0===q.audioTag&&null===this.i&&(this.o=!1,this.N=!0);null!==this.i&&(this.u="undefined"===typeof this.i.createGain?this.i.createGainNode():this.i.createGain(),this.J=this.i.createAnalyser(),this.J.connect(this.u),this.u.gain.value=this.m,this.u.connect(this.i.destination),this.i.listener.setOrientation(0,0,-1,
  0,1,0));this.j.story.onSceneLoadStart.add(this.Yi,this)};g.Yi=function(){if("undefined"!==typeof this.j.story.scene.config.audio){var a=D.hb(this.f,this.j.story.scene.config.audio);fe(this,a)}else fe(this,this.f);!1===this.O?null!==this.A&&this.A.D():null!==this.B&&this.B.D()};
  function fe(a,b){null!==b&&(a.O="undefined"!==typeof b.enabled?!!b.enabled:!0,a.H="undefined"!==typeof b.volume&&"number"===typeof b.volume.max?H.$(b.volume.max,0,1):1,a.X=!1===a.aa?"undefined"!==typeof b.volume&&"number"===typeof b.volume["default"]?H.$(b.volume["default"],0,a.H):1:H.$(a.m,0,a.H))}g.ia=function(a){this.f=a;fe(this,a);"number"===typeof this.X&&!1===this.aa&&(this.m=H.$(this.X,0,1));ge(this)};
  g.update=function(){for(var a=0,b=this.c.length;a<b;a++)this.c[a].update();if(!0===this.o&&null!==this.j.renderer.camera.main){a=new THREE.Vector3;b=this.j.renderer.camera.main.quaternion;a.set(0,0,-1);a.applyQuaternion(b);var d=a.clone();a.set(0,1,0);a.applyQuaternion(b);this.i.listener.setOrientation(d.x,d.y,d.z,a.x,a.y,a.z)}};g.add=function(a){-1===he(this,a)&&this.c.push(a)};g.remove=function(a){a=he(this,a);-1<a&&this.c.splice(a,1)};
  function he(a,b){if(null===a.c)return-1;for(var d,e=0,h=a.c.length;e<h;e++)if(d=a.c[e],d===b)return e;return-1}g.suspend=function(){if(null!==this.i&&"undefined"!==typeof this.i.suspend&&!0===this.o&&!1===q.safari&&"running"===this.K){for(var a=!0,b=0,d=this.c.length;b<d;b++)if(!0===this.c[b].playing||!0===this.c[b].paused){a=!1;break}!0===a&&(this.K="suspended",this.i.suspend())}};
  g.resume=function(){if(null!==this.i&&"undefined"!==typeof this.i.resume&&!0===this.o&&!1===q.safari&&"suspended"===this.K)for(var a=0,b=this.c.length;a<b;a++)if(!0===this.c[a].playing||!0===this.c[a].paused){this.K="running";this.i.resume();break}};g.am=function(){for(var a=0,b=this.c.length;a<b;a++)!0===this.c[a].playing&&(this.c[a].pause(),this.c[a].resumed=!0)};g.dm=function(){for(var a=0,b=this.c.length;a<b;a++)!0===this.c[a].resumed&&(this.c[a].resume(),this.c[a].resumed=!1)};
  g.ob=function(){!0!==this.F&&(this.F=!0,this.S=this.m,this.m=0,!0===this.o&&(this.S=this.u.gain.value),ge(this),null!==this.C&&this.C.D())};g.Zi=function(){!1!==this.F&&(this.F=!1,this.m=this.S,ge(this),null!==this.G&&this.G.D())};function ge(a){if(!0===a.o)a.u.gain.value=a.m;else if(!0===a.N)for(var b=0;b<a.c.length;b++)a.c[b].f.data.volume=H.$(a.c[b].B,0,1)*a.m;a.aa=!0;null!==a.I&&a.I.D()}
  g.destroy=function(){this.j.story.onSceneLoadStart.remove(this.Yi,this);this.f=this.j=null;for(var a=this.c.length;a--;)this.c[a].destroy();this.u=this.J=this.i=this.c=null;null!==this.C&&(this.C.destroy(),this.C=null);null!==this.G&&(this.G.destroy(),this.G=null);null!==this.I&&(this.I.destroy(),this.I=null);null!==this.A&&(this.A.destroy(),this.A=null);null!==this.B&&(this.B.destroy(),this.B=null);n.prototype.destroy.call(this)};Object.defineProperty(x.prototype,"context",{get:function(){return this.i}});
  Object.defineProperty(x.prototype,"analyser",{get:function(){return this.J}});Object.defineProperty(x.prototype,"inputNode",{get:function(){return this.J}});Object.defineProperty(x.prototype,"masterGain",{get:function(){return this.u}});Object.defineProperty(x.prototype,"useWebAudio",{get:function(){return this.o},set:function(a){"boolean"===typeof a&&(this.o=a,this.N=!a)}});
  Object.defineProperty(x.prototype,"useAudioTag",{get:function(){return this.N},set:function(a){"boolean"===typeof a&&(this.N=a,this.o=!a)}});Object.defineProperty(x.prototype,"enabled",{get:function(){return this.O}});Object.defineProperty(x.prototype,"muted",{get:function(){return this.F},set:function(a){"boolean"===typeof a&&(!0===a?this.ob():this.Zi())}});
  Object.defineProperty(x.prototype,"volume",{get:function(){return!0===this.o?this.u.gain.value:this.m},set:function(a){"number"===typeof a&&(a=H.$(a,0,1),this.m=this.H<a?this.H:a,0<this.m&&(this.F=!1),ge(this))}});Object.defineProperty(x.prototype,"onMute",{get:function(){null===this.C&&(this.C=new r(this));return this.C}});Object.defineProperty(x.prototype,"onUnmute",{get:function(){null===this.G&&(this.G=new r(this));return this.G}});
  Object.defineProperty(x.prototype,"onVolumeChange",{get:function(){null===this.I&&(this.I=new r(this));return this.I}});Object.defineProperty(x.prototype,"onDisable",{get:function(){null===this.A&&(this.A=new r(this));return this.A}});Object.defineProperty(x.prototype,"onEnable",{get:function(){null===this.B&&(this.B=new r(this));return this.B}});var Pa={Kn:"stereo",Jn:"3d",Hf:"ambisonic"};
  function N(a,b,d,e){this.j=a;this.ka=b;this.m=d;this.va=this.B=1;this.ja=!1;this.N=!0;this.ha=!1;this.A=this.Ea=this.F=this.H=this.o=0;this.u=this.K=!1;this.Fa=0;this.Ia=this.I=!1;this.G=this.Ha=this.i=this.c=this.qa=this.f=this.J=null;this.Ka=this.wa=this.Ga=0;this.ua=null;this.sa=e||!1;this.La=[0,1,2,3];this.la=this.ca=!1;this.Ba=this.Aa=null;this.oa=!1;this.X=this.U=this.V=this.Z=this.C=this.na=this.ea=this.ga=this.S=this.O=this.R=this.aa=this.pa=null;n.call(this,"Sound");!0===this.sa&&!1===ie(this)&&
  (this.sa=!1);this.M=this.ka;ba(this);!0===this.j.audio.useWebAudio&&(this.i=this.j.audio.context,this.Ha=this.j.audio.inputNode,this.G="undefined"===typeof this.i.createGain?this.i.createGainNode():this.i.createGain(),this.G.gain.value=this.B*this.j.audio.volume,this.G.connect(this.Ha));if(!0===this.j.audio.useAudioTag||!0===ie(this))!0===this.j.cache.has(B.Fb,this.ka)&&this.aj(this.j.cache.get(B.Fb,this.ka)),this.j.audio.onVolumeChange.add(this.bj,this);this.j.audio.onDisable.add(this.$i,this);""!==
  this.m&&(this.j.load.sound(this.ka,this.m,this.aj,this,ie(this)),null!==this.aa&&this.aa.D());this.j.audio.add(this)}N.prototype=Object.create(n.prototype);g=N.prototype;g.constructor=N;
  g.aj=function(a){!1!==this.fb&&(this.J=a,this.la=!0,null!==this.R&&this.R.D(),!0===this.j.audio.useWebAudio?(a=this.J)&&!1===this.oa&&(this.Aa=this.Oj.bind(this),this.Ba=this.io.bind(this),!0===ie(this)?(this.ua=Omnitone.createFOADecoder(this.i,a.data,{channelMap:this.La}),this.ua.initialize().then(this.Aa,this.Ba)):this.i.decodeAudioData(a.data,this.Aa,this.Ba)):(je(this),this.Oj(null)))};g.io=function(){null!==this.J&&(this.J.data=null,this.oa=!1)};
  function je(a){null!==a.pa&&a.pa.D();null!==a.O&&a.O.D();null!==a.S&&a.S.D()}g.Oj=function(a){if(null!==this.J){a&&(this.J.data=a);this.oa=!0;je(this);if(!0===this.j.audio.useAudioTag||!0===ie(this))this.f=this.j.cache.get(B.Fb,this.ka),ke(this),this.o=0,this.f.data.duration&&(this.o=this.f.data.duration,this.H=Math.ceil(1E3*this.o));!0===this.ca&&this.play(this.A,this.K,!0)}};g.bj=function(){ke(this)};
  function ke(a){null===a.f||!0!==a.j.audio.useAudioTag&&!0!==ie(a)||(a.f.data.volume=H.$(a.B,0,1)*a.j.audio.volume)}g.$i=function(){!0===this.u?this.pause():!1===this.paused&&this.stop()};function le(a){a.A=0;a.ca=!1;a.u=!1;a.I=!1}
  function me(a,b){null===a.c&&(a.c=a.i.createPanner(),a.c.panningModel="HRTF",a.c.distanceModel="inverse",a.c.refDistance=1,a.c.maxDistance=1E4,a.c.rolloffFactor=1,a.c.coneInnerAngle=360,a.c.coneOuterAngle=0,a.c.coneOuterGain=0,a.c.setOrientation(0,0,0),a.c.setPosition(0,0,0));a.c.setPosition(a.Ga,a.wa,a.Ka);!0===b&&(a.f.connect(a.c),a.c.connect(a.G))}function ie(a){return!0===a.sa&&!0===a.j.audio.useWebAudio&&"undefined"!==typeof Omnitone}
  g.update=function(){if(!0===this.u&&!1===this.I){var a=this.j.clock.time-this.F;if(a>=this.H){if(this.A=this.H,!0===this.j.audio.useWebAudio||!0===this.j.audio.useAudioTag)this.stop(!0),null!==this.X&&this.X.D(),!0===this.K&&(this.A=0,this.resume())}else this.A=a}null!==this.ua&&!0===this.u&&this.ua.setRotationMatrixFromCamera(this.j.renderer.camera.modelViewInverse)};
  g.play=function(a,b,d){if(!1===this.j.audio.enabled||!1===this.N)this.I=this.u=!1;else{this.K=b||this.K;if(!0===this.u)if(!0===d)this.stop();else return;if(!1===this.la)this.ca=!0;else{if(!0===this.j.audio.useWebAudio&&!1===ie(this))if(!0===this.oa)null===this.qa&&(this.qa=this.J.data),this.f=this.i.createBufferSource(),this.f.buffer=this.qa,!0===this.ha?me(this,!0):this.f.connect(this.G),this.o=this.f.buffer.duration,this.H=Math.ceil(1E3*this.o),!isNaN(a)&&a<this.H?this.F=this.j.clock.time-a:(a=
  0,this.F=this.j.clock.time),b=H.hf(a/1E3),"undefined"===typeof this.f.start?this.f.noteGrainOn(0,b%this.o,this.o):this.f.start(0,b%this.o,this.o),this.u=!0,this.A=a,this.Fa++,null!==this.C&&this.C.D();else{this.ca=!0;return}else if(!0===this.j.audio.useAudioTag||!0===ie(this))this.o?Infinity===this.o&&(this.f.data.loop=!0):(this.o=this.f.data.duration,this.H=Math.ceil(1E3*this.o)),!isNaN(a)&&this.H&&a<this.H?(this.f.data.currentTime=H.hf(a/1E3),this.F=this.j.clock.time-a):(a=0,this.f.data.currentTime=
  a,this.F=this.j.clock.time),this.f.data.play(),this.u=!0,this.A=a,this.Fa++,null!==this.C&&this.C.D();this.j.audio.resume()}}};g.stop=function(a){null!==this.f?(ne(this,!0),this.F=this.Ea=this.j.clock.time,this.I=this.u=this.ca=!1,null!==this.Z&&!0===a&&this.Z.D(),this.j.audio.suspend()):!1!==this.la&&!0===this.oa||le(this)};
  function ne(a,b){if(!0===a.j.audio.useWebAudio&&!1===ie(a)){if("undefined"===typeof a.f.stop)a.f.noteOff(0);else try{a.f.stop(0)}catch(d){}a.f.disconnect(0);!0===b&&(a.A=0)}else if(!0===a.j.audio.useAudioTag||!0===ie(a))a.f.data.pause(),!0===b&&(a.A=0,a.f.data.currentTime=0)}g.pause=function(){!0===this.u&&null!==this.f?(ne(this,!1),this.I=!0,this.Ea=this.j.clock.time,this.u=this.ca=!1,null!==this.V&&this.V.D(),this.j.audio.suspend()):!1!==this.la&&!0===this.oa||le(this)};
  g.resume=function(){if(!1!==this.j.audio.enabled&&!1!==this.N)if(!0===this.I||!1===this.u||!0===this.Ia)if(null===this.f)this.play(this.A,this.K,!0);else{this.F=this.j.clock.time-(this.Ea-this.F);this.A=this.j.clock.time-this.F;var a=H.hf(this.A/1E3);if(!0===this.j.audio.useWebAudio&&!1===ie(this)){this.f=this.i.createBufferSource();this.f.buffer=this.qa;!0===this.ha?me(this,!0):this.f.connect(this.G);var b=Math.ceil((this.H-this.A)/1E3);"undefined"===typeof this.f.start?this.f.noteGrainOn(0,a%this.o,
  b):this.f.start(0,a%this.o,b)}else if(!0===this.j.audio.useAudioTag||!0===ie(this))this.f.data.currentTime=a,this.f.data.play();this.u=!0;this.I=!1;null!==this.U&&this.U.D();this.j.audio.resume()}else if(!1===this.la||!1===this.oa)le(this),this.ca=!0};
  g.ob=function(){!0!==this.ja&&!1!==this.j.audio.enabled&&!1!==this.N&&(this.ja=!0,this.va=this.B,this.B=0,!0===this.j.audio.useWebAudio&&!1===ie(this)?this.G.gain.value=this.B:!0!==this.j.audio.useAudioTag&&!0!==ie(this)||null===this.f||(this.f.data.volume=this.B),null!==this.ga&&this.ga.D())};
  g.cj=function(){!1!==this.ja&&!1!==this.j.audio.enabled&&!1!==this.N&&(this.ja=!1,this.B=this.va,!0===this.j.audio.useWebAudio&&!1===ie(this)?this.G.gain.value=this.va:!0!==this.j.audio.useAudioTag&&!0!==ie(this)||null===this.f||(this.f.data.volume=this.va),null!==this.ea&&this.ea.D())};
  g.destroy=function(){this.stop();!0!==this.j.audio.useAudioTag&&!0!==ie(this)||this.j.audio.onVolumeChange.remove(this.bj,this);this.j.audio.onDisable.remove(this.$i,this);this.j.audio.remove(this);this.Ba=this.Aa=this.c=this.G=this.Ha=this.i=this.qa=this.f=this.J=this.j=null;null!==this.pa&&(this.pa.destroy(),this.pa=null);null!==this.aa&&(this.aa.destroy(),this.aa=null);null!==this.R&&(this.R.destroy(),this.R=null);null!==this.O&&(this.O.destroy(),this.O=null);null!==this.S&&(this.S.destroy(),this.S=
  null);null!==this.ga&&(this.ga.destroy(),this.ga=null);null!==this.ea&&(this.ea.destroy(),this.ea=null);null!==this.na&&(this.na.destroy(),this.na=null);null!==this.C&&(this.C.destroy(),this.C=null);null!==this.Z&&(this.Z.destroy(),this.Z=null);null!==this.V&&(this.V.destroy(),this.V=null);null!==this.U&&(this.U.destroy(),this.U=null);null!==this.X&&(this.X.destroy(),this.X=null);n.prototype.destroy.call(this)};
  Object.defineProperty(N.prototype,"enabled",{get:function(){return this.N},set:function(a){"boolean"===typeof a&&(this.N=a,!1!==this.N||!0!==this.u&&!0!==this.I||this.stop())}});Object.defineProperty(N.prototype,"currentTime",{get:function(){return this.A},set:function(a){"number"===typeof a&&(this.pause(),this.A=a,!0===this.u&&this.resume())}});Object.defineProperty(N.prototype,"spatialized",{get:function(){return this.ha},set:function(a){"boolean"===typeof a&&(this.ha=a)}});
  Object.defineProperty(N.prototype,"ambisonic",{get:function(){return this.sa}});Object.defineProperty(N.prototype,"duration",{get:function(){return this.o}});Object.defineProperty(N.prototype,"muted",{get:function(){return this.ja||this.j.audio.ob},set:function(a){"boolean"===typeof a&&(!0===a?this.ob():this.cj())}});
  Object.defineProperty(N.prototype,"volume",{get:function(){return this.B},set:function(a){"number"===typeof a&&!0!==isNaN(a)&&(a=H.$(a,0,1),a!==this.B&&!1!==this.j.audio.enabled&&!1!==this.N&&(this.B=a,0<this.B&&(this.ja=!1),!0===this.j.audio.useWebAudio&&!1===ie(this)?this.G.gain.value=a:ke(this),null!==this.na&&this.na.D()))}});Object.defineProperty(N.prototype,"decoded",{get:function(){return null===this.J?!1:this.oa}});Object.defineProperty(N.prototype,"playCount",{get:function(){return this.Fa}});
  Object.defineProperty(N.prototype,"playing",{get:function(){return this.u}});Object.defineProperty(N.prototype,"ready",{get:function(){return this.la}});Object.defineProperty(N.prototype,"paused",{get:function(){return this.I}});Object.defineProperty(N.prototype,"resumed",{get:function(){return this.Ia},set:function(a){"boolean"===typeof a&&(this.Ia=a)}});
  Object.defineProperty(N.prototype,"loop",{get:function(){return this.K},set:function(a){"boolean"===typeof a&&(this.K=a,!0!==this.j.audio.useAudioTag&&!0!==ie(this)||null===this.f||Infinity!==this.o||(this.f.data.loop=this.K))}});Object.defineProperty(N.prototype,"x",{get:function(){return this.Ga},set:function(a){"number"===typeof a&&(this.Ga=a,!0===this.j.audio.useWebAudio&&!1===ie(this)&&null!==this.f&&null!==this.c&&!0===this.ha&&me(this))}});
  Object.defineProperty(N.prototype,"y",{get:function(){return this.wa},set:function(a){"number"===typeof a&&(this.wa=a,!0===this.j.audio.useWebAudio&&!1===ie(this)&&null!==this.f&&null!==this.c&&!0===this.ha&&me(this))}});Object.defineProperty(N.prototype,"z",{get:function(){return this.wa},set:function(a){"number"===typeof a&&(this.Ka=a,!0===this.j.audio.useWebAudio&&!1===ie(this)&&null!==this.f&&null!==this.c&&!0===this.ha&&me(this))}});
  Object.defineProperty(N.prototype,"onSoundDecode",{get:function(){null===this.pa&&(this.pa=new r(this));return this.pa}});Object.defineProperty(N.prototype,"onLoadStart",{get:function(){null===this.aa&&(this.aa=new r(this));return this.aa}});Object.defineProperty(N.prototype,"onLoadedData",{get:function(){null===this.R&&(this.R=new r(this));return this.R}});Object.defineProperty(N.prototype,"onCanPlay",{get:function(){null===this.O&&(this.O=new r(this));return this.O}});
  Object.defineProperty(N.prototype,"onCanPlayThrough",{get:function(){null===this.S&&(this.S=new r(this));return this.S}});Object.defineProperty(N.prototype,"onMute",{get:function(){null===this.ga&&(this.ga=new r(this));return this.ga}});Object.defineProperty(N.prototype,"onUnmute",{get:function(){null===this.ea&&(this.ea=new r(this));return this.ea}});Object.defineProperty(N.prototype,"onVolumeChange",{get:function(){null===this.na&&(this.na=new r(this));return this.na}});
  Object.defineProperty(N.prototype,"onPlay",{get:function(){null===this.C&&(this.C=new r(this));return this.C}});Object.defineProperty(N.prototype,"onStop",{get:function(){null===this.Z&&(this.Z=new r(this));return this.Z}});Object.defineProperty(N.prototype,"onPause",{get:function(){null===this.V&&(this.V=new r(this));return this.V}});Object.defineProperty(N.prototype,"onResume",{get:function(){null===this.U&&(this.U=new r(this));return this.U}});
  Object.defineProperty(N.prototype,"onEnded",{get:function(){null===this.X&&(this.X=new r(this));return this.X}});
  function S(a,b){this.j=a;this.f=b;this.F=this.c=null;this.i=this.N="";this.H=this.m=1;this.I=this.J=this.G=!0;this.o=this.B=this.u=this.C=this.A=this.W=null;n.call(this,"Playlist");this.M=this.f.uid;ba(this);this.F=new Na(this.j,this.f.name);this.c=[];a=this.f;this.G="undefined"!==typeof a.autoPlay?!!a.autoPlay:!0;this.I="undefined"!==typeof a.loop?!!a.loop:!0;this.m="undefined"!==typeof a.volume&&"number"===typeof a.volume.max?H.$(a.volume.max,0,1):1;this.H="undefined"!==typeof a.volume&&"number"===
  typeof a.volume["default"]?H.$(a.volume["default"],0,this.m):H.$(1,0,this.m);a=this.f;"undefined"!==typeof a.tracks&&!0===D.za(a.tracks,"string")?this.c=a.tracks:this.warn("A playlist has no track in its configuration, or configuration is not valid!");"string"===typeof a["default"]&&""!==a["default"]?this.N=a["default"]:"number"===typeof a["default"]&&0<=a["default"]&&a["default"]<this.c.length?this.N=this.c[a["default"]].uid:this.warn("A playlist has a default track that is not in its tracks array!");
  this.i=this.N;null!==this.W&&this.W.D()}S.prototype=Object.create(n.prototype);g=S.prototype;g.constructor=S;g.Me=function(){0<this.c.length&&this.c.indexOf(this.i)+1===this.c.length&&(!1===this.I||!0===this.track.loop)?this.i=this.c[0]:this.Id()};g.Ym=function(){null!==this.A&&this.A.D()};g.$m=function(){null!==this.C&&this.C.D()};g.Xm=function(){null!==this.u&&this.u.D()};g.Zm=function(){null!==this.B&&this.B.D()};g.Wm=function(){null!==this.o&&this.o.D()};g.an=function(){return!!this.c.length};
  g.play=function(a,b){this.J="undefined"!==typeof b?b:!1;var d;if("string"===typeof a&&p.P(a,"PlaylistTrack"))d=a;else if(D.P(a,"PlaylistTrack"))d=a.uid;else if("number"===typeof a&&0<=a&&a<this.c.length)d=this.c[a];else if(""!==this.i)d=this.i;else if("undefined"===typeof a||""===a)d=this.c[0];if("undefined"!==typeof d){this.stop();this.i=d;if(!0===this.J&&!1===this.G)return this.warn("$_Playlist.play(); autoPlay is disabled"),this.track;this.track.play();!1===this.track.onEnded.has(this.Me,this)&&
  this.track.onEnded.add(this.Me,this);return this.track}return null};g.stop=function(){null!==this.track&&(this.track.stop(),"undefined"!==typeof this.track.onEnded&&!1===this.track.onEnded.has(this.Me,this)&&this.track.onEnded.remove(this.Me,this))};g.pause=function(){null!==this.track&&this.track.pause()};g.resume=function(){null!==this.track&&this.track.resume()};
  g.Id=function(){var a=-1;0<this.c.length&&(a=this.c.indexOf(this.i)+1,a===this.c.length&&(a=0));this.play(a,this.J);!0===this.paused&&this.pause()};g.gf=function(){var a=-1;0<this.c.length&&(a=this.c.indexOf(this.i)-1,-1===a&&(a=this.c.length-1));this.play(a,this.J);!0===this.paused&&this.pause()};g.destroy=function(){this.stop();this.j=null;this.F.destroy();this.F=null;0<this.c.length&&(this.c.length=0,this.c=null);this.f=null;n.prototype.destroy.call(this)};
  Object.defineProperty(S.prototype,"tracks",{get:function(){return this.c}});Object.defineProperty(S.prototype,"name",{get:function(){return this.F.value}});Object.defineProperty(S.prototype,"ready",{get:function(){return null!==this.track?this.track.ready:!1}});Object.defineProperty(S.prototype,"decoded",{get:function(){return null!==this.track?this.track.decoded:!1}});Object.defineProperty(S.prototype,"playing",{get:function(){return null!==this.track?this.track.playing:!1}});
  Object.defineProperty(S.prototype,"paused",{get:function(){return null!==this.track?this.track.paused:!1}});Object.defineProperty(S.prototype,"track",{get:function(){return!0===p.P(this.i,"PlaylistTrack")?p.get(this.i,"PlaylistTrack"):null}});Object.defineProperty(S.prototype,"loop",{get:function(){return this.I},set:function(a){this.I=!!a}});Object.defineProperty(S.prototype,"autoPlay",{get:function(){return this.G},set:function(a){this.G=!!a}});
  Object.defineProperty(S.prototype,"volume",{get:function(){return this.H},set:function(a){"number"===typeof a&&(a=H.$(a,0,1),this.H=this.m<a?this.m:a,!0===p.P(this.i,"PlaylistTrack")&&(a=p.get(this.i,"PlaylistTrack"),null!==a&&(a.volume=this.H*this.j.playlists.volume)))}});Object.defineProperty(S.prototype,"onPlay",{get:function(){null===this.A&&(this.A=new r(this));return this.A}});Object.defineProperty(S.prototype,"onStop",{get:function(){null===this.C&&(this.C=new r(this));return this.C}});
  Object.defineProperty(S.prototype,"onPause",{get:function(){null===this.u&&(this.u=new r(this));return this.u}});Object.defineProperty(S.prototype,"onResume",{get:function(){null===this.B&&(this.B=new r(this));return this.B}});Object.defineProperty(S.prototype,"onEnded",{get:function(){null===this.o&&(this.o=new r(this));return this.o}});Object.defineProperty(S.prototype,"onReady",{get:function(){null===this.W&&(this.W=new r(this));return this.W}});
  function A(a){this.j=a;this.A=this.c=this.f=null;this.i=this.m="";this.J=this.B=1;this.o=!0;this.u=this.N=!1;this.C=this.F=this.G=this.H=this.I=this.W=null;n.call(this,"PlaylistManager")}A.prototype=Object.create(n.prototype);g=A.prototype;g.constructor=A;g.boot=function(){this.c=[];this.A=[];this.j.audio.onEnable.add(this.Sj,this);this.j.story.onSceneLoadStart.add(this.Di,this)};
  g.Sj=function(){!0===this.o&&0<this.c.length&&!0===this.ready&&!0===this.decoded&&!1===this.u&&(!0===this.paused?this.resume():!1===this.playing&&this.play())};
  g.Di=function(){if("undefined"!==typeof this.j.story.scene.config.playlists){var a=D.hb(this.f,this.j.story.scene.config.playlists);oe(this,a);!1===this.u&&(!1===this.o?pe(this):qe(this,this.i)||!0===this.playing&&pe(this))}else oe(this,this.f),!1===this.u&&this.i!==this.m&&(!1!==this.o&&!1!==this.ready&&!1!==this.decoded&&!0!==this.playing||pe(this),qe(this,this.i))};
  function oe(a,b){null!==b&&(a.o="undefined"!==typeof b.enabled?!!b.enabled:!0,"undefined"!==typeof b["default"]&&("string"===typeof b["default"]&&""!==b["default"]?a.i=b["default"]:"number"===typeof b["default"]&&0<=b["default"]&&b["default"]<a.c.length&&(a.i=a.c[b["default"]].uid)),a.B="undefined"!==typeof b.volume&&"number"===typeof b.volume.max?H.$(b.volume.max,0,1):1,a.J="undefined"!==typeof b.volume&&"number"===typeof b.volume["default"]?H.$(b.volume["default"],0,a.B):H.$(1,0,a.B))}
  g.ia=function(a){var b;this.f=a;if("undefined"!==typeof a.lists)for(var d=0,e=a.lists.length;d<e;d++)b=new S(this.j,a.lists[d]),this.add(b);if("undefined"!==typeof a.tracks)for(d=0,e=a.tracks.length;d<e;d++)b=new re(this.j,a.tracks[d]),this.Ei(b),!0===this.N&&this.warn("Preload is not supported yet.");oe(this,a);"undefined"!==typeof a.lists&&0<a.lists.length&&(""===this.i&&this.warn("The playlist manager has a default playlist that is not in its playlists array!"),this.m=this.i);this.gk()};
  g.gk=function(){if("visible"!==document[q.visibilityState])this.j.onResume.ba(this.gk,this);else if(!(0>=this.c.length)){var a;"string"===typeof this.i&&""!==this.i?a=this.i:a=this.c[0].uid;void 0===p.get(a)&&this.warn('PlaylistManager : uid "'+a+'" is not into playlists');!0===p.P(a,"Playlist")?this.play(a,!0):this.warn("Impossible to play the playlist with uid "+a+", it doesn't seem to be a playlist!")}};
  function qe(a,b){return null!==b&&!0===p.P(b,"Playlist")?(null!==a.playlist&&a.playlist.uid===b?null!==a.playlist.track&&"undefined"!==typeof a.playlist.track.uid&&""!==a.playlist.track.uid?!0===a.paused?a.resume():!1===a.playing&&a.play(b,!0):(a.stop(),a.play(b,!0)):(a.stop(),a.play(b,!0)),!0):!1}function pe(a){!0===a.playing?a.pause():a.stop()}g.Sm=function(){null!==this.I&&this.I.D();null!==this.playlist&&S.prototype.Ym.call(this.playlist)};
  g.Um=function(){null!==this.H&&this.H.D();null!==this.playlist&&S.prototype.$m.call(this.playlist)};g.Rm=function(){null!==this.G&&this.G.D();null!==this.playlist&&S.prototype.Xm.call(this.playlist)};g.Tm=function(){null!==this.F&&this.F.D();null!==this.playlist&&S.prototype.Zm.call(this.playlist)};g.Qm=function(){null!==this.C&&this.C.D();null!==this.playlist&&S.prototype.Wm.call(this.playlist)};g.add=function(a){this.c.push(a)};g.Ei=function(a){this.A.push(a)};g.Zp=function(){return!!this.c.length};
  g.Vm=function(){return!!this.A.length};g.play=function(a,b){var d;if("string"===typeof a&&p.P(a,"Playlist"))d=a;else if(D.P(a,"Playlist"))d=a.uid;else if("number"===typeof a&&0<=a&&a<this.c.length)d=this.c[a].uid;else if(""!==this.m)d=this.m;else if("undefined"===typeof a||""===a)d=this.c[0].uid;"undefined"!==typeof d&&(!0===this.playing&&this.stop(),this.m=d,!0===this.o&&(this.u=!1,this.playlist.play(null,b)))};g.stop=function(){null!==this.playlist&&this.playlist.stop()};
  g.pause=function(){null!==this.playlist&&!0===this.playlist.playing&&(this.u=!0,this.playlist.pause())};g.resume=function(){if(null!==this.playlist&&!0===this.o&&!0===this.playlist.paused){var a=this.u;this.u=!1;!0===a&&this.i!==this.m?qe(this,this.i):this.playlist.resume()}};g.Id=function(){null!==this.playlist&&!0===this.o&&this.playlist.Id()};g.gf=function(){null!==this.playlist&&!0===this.o&&this.playlist.gf()};
  g.destroy=function(){this.stop();this.j.audio.onEnable.remove(this.Sj,this);this.j.story.onSceneLoadStart.remove(this.Di,this);this.f=this.j=null;for(var a=this.c.length;a--;)this.c[a].destroy();this.c=null;for(a=this.A.length;a--;)this.A[a].destroy();this.A=null;n.prototype.destroy.call(this)};Object.defineProperty(A.prototype,"playlists",{get:function(){return this.c}});Object.defineProperty(A.prototype,"tracks",{get:function(){return this.A}});
  Object.defineProperty(A.prototype,"playlist",{get:function(){return!0===p.P(this.m,"Playlist")?p.get(this.m,"Playlist"):null}});Object.defineProperty(A.prototype,"loop",{get:function(){return null!==this.playlist?this.playlist.loop:!0}});Object.defineProperty(A.prototype,"autoPlay",{get:function(){return null!==this.playlist?this.playlist.autoPlay:!0}});Object.defineProperty(A.prototype,"preload",{get:function(){return this.N},set:function(a){this.N=!!a}});
  Object.defineProperty(A.prototype,"enabled",{get:function(){return this.o}});Object.defineProperty(A.prototype,"ready",{get:function(){return null!==this.playlist?this.playlist.ready:!1}});Object.defineProperty(A.prototype,"decoded",{get:function(){return null!==this.playlist?this.playlist.decoded:!1}});Object.defineProperty(A.prototype,"playing",{get:function(){return null!==this.playlist?this.playlist.playing:!1}});
  Object.defineProperty(A.prototype,"paused",{get:function(){return null!==this.playlist?this.playlist.paused:!1}});Object.defineProperty(A.prototype,"volume",{get:function(){return this.J},set:function(a){if("number"===typeof a&&(a=H.$(a,0,1),this.J=this.B<a?this.B:a,!0===p.P(this.m,"Playlist")&&(a=p.get(this.m,"Playlist"),null!==a))){var b=a.track;null!==b&&(b.volume=a.volume*this.J)}}});Object.defineProperty(A.prototype,"onReady",{get:function(){null===this.W&&(this.W=new r(this));return this.W}});
  Object.defineProperty(A.prototype,"onPlay",{get:function(){null===this.I&&(this.I=new r(this));return this.I}});Object.defineProperty(A.prototype,"onStop",{get:function(){null===this.H&&(this.H=new r(this));return this.H}});Object.defineProperty(A.prototype,"onPause",{get:function(){null===this.G&&(this.G=new r(this));return this.G}});Object.defineProperty(A.prototype,"onResume",{get:function(){null===this.F&&(this.F=new r(this));return this.F}});
  Object.defineProperty(A.prototype,"onEnded",{get:function(){null===this.C&&(this.C=new r(this));return this.C}});function re(a,b){this.j=a;this.f=b;this.u=this.o=null;this.m="";this.i=!1;this.c=null;n.call(this,"PlaylistTrack");this.M=this.f.uid;ba(this);a=this.f;da(this);this.M=a.uid;ba(this);this.o=new Na(this.j,a.name);this.u=new Na(this.j,a.author);this.m=a.url;this.i=a.loop||!1}re.prototype=Object.create(n.prototype);g=re.prototype;g.constructor=re;g.Hi=function(){A.prototype.Sm.call(this.j.playlists)};
  g.Ak=function(){A.prototype.Um.call(this.j.playlists)};g.Gi=function(){A.prototype.Rm.call(this.j.playlists)};g.yk=function(){A.prototype.Tm.call(this.j.playlists)};g.Fi=function(){A.prototype.Qm.call(this.j.playlists)};
  g.play=function(){null===this.c&&(this.c=new N(this.j,this.M+"-sound",this.m),this.c.volume=this.j.playlists.volume*this.j.playlists.playlist.volume,!0===this.i&&(this.c.loop=this.i),this.c.onPlay.add(this.Hi,this),this.c.onStop.add(this.Ak,this),this.c.onPause.add(this.Gi,this),this.c.onResume.add(this.yk,this),this.c.onEnded.add(this.Fi,this));this.c.play()};g.stop=function(){null!==this.c&&this.c.stop(!0)};g.pause=function(){null!==this.c&&this.c.pause()};g.resume=function(){null!==this.c&&this.c.resume()};
  g.destroy=function(){this.f=this.j=null;this.o.destroy();this.o=null;this.u.destroy();this.u=null;null!==this.c&&(this.c.onPlay.remove(this.Hi,this),this.c.onStop.remove(this.Ak,this),this.c.onPause.remove(this.Gi,this),this.c.onResume.remove(this.yk,this),this.c.onEnded.remove(this.Fi,this),this.c.destroy(),this.c=null);n.prototype.destroy.call(this)};Object.defineProperty(re.prototype,"name",{get:function(){return this.o.value}});Object.defineProperty(re.prototype,"author",{get:function(){return this.u.value}});
  Object.defineProperty(re.prototype,"currentTime",{get:function(){return null!==this.c?this.c.currentTime:0},set:function(a){null!==this.c&&(this.c.currentTime=a)}});Object.defineProperty(re.prototype,"volume",{get:function(){return null!==this.c?this.c.volume:!1},set:function(a){if(null===this.c)return!1;this.c.volume=a}});Object.defineProperty(re.prototype,"ready",{get:function(){return null!==this.c?this.c.ready:!1}});
  Object.defineProperty(re.prototype,"decoded",{get:function(){return null!==this.c?this.c.decoded:!1}});Object.defineProperty(re.prototype,"playing",{get:function(){return null!==this.c?this.c.playing:!1}});Object.defineProperty(re.prototype,"paused",{get:function(){return null!==this.c?this.c.paused:!1}});Object.defineProperty(re.prototype,"loop",{get:function(){return this.i},set:function(a){this.i=!!a}});Object.defineProperty(re.prototype,"onPlay",{get:function(){if(null!==this.c)return this.c.onPlay}});
  Object.defineProperty(re.prototype,"onStop",{get:function(){if(null!==this.c)return this.c.onStop}});Object.defineProperty(re.prototype,"onPause",{get:function(){if(null!==this.c)return this.c.onPause}});Object.defineProperty(re.prototype,"onResume",{get:function(){if(null!==this.c)return this.c.onResume}});Object.defineProperty(re.prototype,"onEnded",{get:function(){if(null!==this.c)return this.c.onEnded}});
  function ta(a){this.j=a;this.i=this.f=null;this.R=this.X=this.ga=!1;this.K=-1;this.aa=this.H=this.m=null;n.call(this,"Director");this.pf()}ta.prototype=Object.create(n.prototype);g=ta.prototype;g.constructor=ta;g.pf=function(){this.m=this.j.clock.create(!1);this.j.story.onSceneLoadComplete.add(this.di,this);this.j.onReady.add(this.Ek,this);this.aa=this.sm.bind(this)};g.load=function(a){if(null!==a.tracks&&Array.isArray(a.tracks))for(var b=0,d=a.tracks.length;b<d;b++)new Ld(a.tracks[b])};
  g.Ek=function(){this.j.controllers.onControlStart.add(this.vd,this);this.j.controllers.onControlEnd.add(this.ud,this)};
  g.di=function(){var a=this.j.story.scene;this.stop();se(this);this.f=null;this.i=[];"undefined"!==typeof a.config.director&&(a=a.config.director.animation,"undefined"!==typeof a&&null!==a&&!1!==a.enabled&&(this.ga="boolean"===typeof a.loop?a.loop:!1,this.X="boolean"===typeof a.random?a.random:!1,this.R="boolean"===typeof a.stoppable?a.stoppable:!1,this.K="number"===typeof a.idleTime?a.idleTime:0,null!==a.tracks&&D.za(a.tracks,"string")&&(this.i=!0===this.X?D.Ld(a.tracks):a.tracks),this.j.camera.animation.onComplete.add(this.Ck,
  this),this.j.story.scene.media.type===G.VIDEO&&(this.j.story.scene.media.displayObject.onPause.add(this.Ke,this),this.j.story.scene.media.displayObject.onWaiting.add(this.zb,this),this.j.story.scene.media.displayObject.onStalled.add(this.zb,this),this.j.story.scene.media.displayObject.onSeeking.add(this.zb,this),this.j.story.scene.media.displayObject.onEnded.add(this.Uj,this),this.j.story.scene.media.displayObject.onCurrentTimeChange.add(this.Le,this),document.addEventListener(q.visibilityChange,
  this.aa)),"number"===typeof a.delay&&(this.H=this.m.add(a.delay,this.Kg,this),this.m.start())))};g.Ke=function(){this.stop();this.j.story.scene.media.type===G.VIDEO&&(this.j.story.scene.media.displayObject.onPause.remove(this.Ke,this),this.j.story.scene.media.displayObject.onPlay.add(this.Zg,this));this.j.controllers.onControlStart.remove(this.vd,this);this.j.controllers.onControlEnd.remove(this.ud,this)};
  g.Zg=function(){null!==this.f&&(this.play(this.f),this.j.story.scene.media.type===G.VIDEO&&this.Le());this.j.story.scene.media.type===G.VIDEO&&(this.j.story.scene.media.displayObject.onPause.add(this.Ke,this),this.j.story.scene.media.displayObject.onPlay.remove(this.Zg,this));this.j.controllers.onControlStart.add(this.vd,this);this.j.controllers.onControlEnd.add(this.ud,this)};
  g.zb=function(){this.stop();this.j.story.scene.media.type===G.VIDEO&&(this.j.story.scene.media.displayObject.onWaiting.remove(this.zb,this),this.j.story.scene.media.displayObject.onStalled.remove(this.zb,this),this.j.story.scene.media.displayObject.onSeeking.remove(this.zb,this),this.j.story.scene.media.displayObject.onPlaying.add(this.yd,this),this.j.story.scene.media.displayObject.onSeeked.add(this.yd,this));this.j.controllers.onControlStart.remove(this.vd,this);this.j.controllers.onControlEnd.remove(this.ud,
  this)};
  g.yd=function(){null!==this.f&&(this.play(this.f),this.j.story.scene.media.type===G.VIDEO&&this.Le());this.j.story.scene.media.type===G.VIDEO&&(this.j.story.scene.media.displayObject.onPlaying.remove(this.yd,this),this.j.story.scene.media.displayObject.onSeeked.remove(this.yd,this),this.j.story.scene.media.displayObject.onWaiting.add(this.zb,this),this.j.story.scene.media.displayObject.onStalled.add(this.zb,this),this.j.story.scene.media.displayObject.onSeeking.add(this.zb,this));this.j.controllers.onControlStart.add(this.vd,this);
  this.j.controllers.onControlEnd.add(this.ud,this)};g.Uj=function(){this.j.story.scene.media.type===G.VIDEO&&!0===this.j.story.scene.media.displayObject.loop&&this.di()};g.vd=function(){null!==this.f&&!0===this.R&&this.stop();this.m.stop(!0)};
  g.ud=function(){null!==this.H&&this.m.remove(this.H);null!==this.f&&!0===this.R&&(null===this.f&&"number"===typeof this.j.story.scene.config.director.animation.delay?(this.H=this.m.add(this.j.story.scene.config.director.animation.delay,this.Kg,this),this.m.start()):"number"===typeof this.K&&-1<this.K&&(this.H=this.m.add(this.K,this.Kg,this),this.m.start()))};
  g.Ck=function(){if(1<this.i.length){var a=this.i.indexOf(this.f)+1;if(a<this.i.length){this.play(a);return}}!0===this.ga&&(!0===this.X&&(this.i=D.Ld(this.i)),this.play(0))};g.Kg=function(){this.play(this.f);this.m.stop(!0)};g.sm=function(){"hidden"!==document[q.visibilityState]&&this.j.story.scene.media.type===G.VIDEO&&this.j.story.scene.media.displayObject.onCurrentTimeChange.D(this.j.story.scene.media.displayObject.currentTime)};
  g.Le=function(a){this.stop();this.f=null;"number"===typeof a?a*=1E3:"object"===typeof a&&"number"===typeof a.data?a=1E3*a.data:this.j.story.scene.media.type===G.VIDEO?a=this.j.story.scene.media.displayObject.currentTimeMS:a=0;var b=0,d,e;e=p.get(this.i[0]);if(e.duration>a)this.f=e.uid;else for(var h=1,k=this.i.length-1;h<k;h++){d=e;e=p.get(this.i[h]);if(d.duration+b<a&&e.duration+d.duration+b>a){this.f=e.uid;break}b+=d.duration}null===this.f?(a=e.keyframes[e.keyframes.length-1].data,this.j.camera.Vl(a.yaw,
  a.pitch,a.roll,a.fov)):this.j.camera.animation.play(this.f,a)};g.play=function(a){this.stop();this.f=null;this.f="number"===typeof a?this.i[a]:"string"===typeof a?a:this.i[0];this.j.camera.animation.play(this.f)};g.stop=function(){this.j.camera.animation.stop()};
  function se(a){a.j.camera.animation.onComplete.remove(a.Ck,a);null!==a.j.story.scene&&a.j.story.scene.media.type===G.VIDEO&&(a.j.story.scene.media.displayObject.onPlay.remove(a.Zg,a),a.j.story.scene.media.displayObject.onPause.remove(a.Ke,a),a.j.story.scene.media.displayObject.onWaiting.remove(a.zb,a),a.j.story.scene.media.displayObject.onStalled.remove(a.zb,a),a.j.story.scene.media.displayObject.onPlaying.remove(a.yd,a),a.j.story.scene.media.displayObject.onEnded.remove(a.Uj,a),a.j.story.scene.media.displayObject.onCurrentTimeChange.remove(a.Le,
  a),document.removeEventListener(q.visibilityChange,a.aa))}g.destroy=function(){se(this);this.j.onReady.remove(this.Ek,this);this.f=this.i=this.j=null;n.prototype.destroy.call(this)};function Ld(a){this.C=this.o=!1;nc.call(this,"DirectorTrack");this.m(a)}Ld.prototype=Object.create(nc.prototype);Ld.prototype.constructor=Ld;Ld.prototype.m=function(a){this.o=a.smooth;this.C=a.cancelRoll;nc.prototype.m.call(this,a)};Object.defineProperty(Ld.prototype,"smooth",{get:function(){return this.o}});
  Object.defineProperty(Ld.prototype,"cancelRoll",{get:function(){return this.C}});function Ia(a){this.j=a;this.c=[];this.m=this.i=!1;n.call(this,"ActionEventDispatcher")}Ia.prototype=Object.create(n.prototype);Ia.prototype.constructor=Ia;Ia.prototype.f=function(a){if(!0===D.za(a,"string")||D.P(a,"string"))this.c=this.c.concat(a)};
  Ia.prototype.D=function(){this.i=!0;for(var a=0,b=this.c.length;a<b;a++){var d=this.j.actions.get(this.c[a]);"undefined"!==typeof d&&null!==d&&d.Vb()}this.i=!1;!0===this.m&&this.destroy()};Ia.prototype.destroy=function(){!0===this.i?this.m=!0:(this.j=null,n.prototype.destroy.call(this))};
  function te(a,b){this.j=a;this.f=b;this.ma="";this.c=this.i=null;n.call(this,"Action");a=this.f;this.M=a.uid;this.ma=a.target;this.i="undefined"!==typeof a.method?a.method:null;this.c="undefined"!==typeof a.property?a.property:null;ba(this)}te.prototype=Object.create(n.prototype);te.prototype.constructor=te;var ue={lg:"set",lj:"add",xj:"substract",tj:"multiply",qj:"divide",yj:"toggle"};
  function ve(a,b){var d=null;if("undefined"===typeof b)d=window;else{var e=b,h=b;"object"===typeof b&&("string"===typeof b.identifier&&(e=b.identifier),"string"===typeof b.accessor&&(h=b.accessor));b=p.get(e);"undefined"!==typeof b&&null!==b&&(D.P(b,"Plugin")?d=b.instance:d=b);h=h.split(".");b=0;"viewer"===h[0].toLowerCase()&&null===d?(d=a.j,b=1):null===d&&(d=window);for(e=h.length;b<e;b++)"object"===typeof d[h[b]]&&(d=d[h[b]])}null===d&&a.warn("The target of the action "+a.M+" is invalid.");return d}
  te.prototype.Vb=function(){var a=ve(this,this.ma);if(null!==a){if(null!==this.c){var b=this.c;if("undefined"!==typeof a[b.name])switch("undefined"===typeof b.operation&&(b.operation=ue.lg),b.operation){case ue.lg:a[b.name]=b.value;break;case ue.lj:a[b.name]+=b.value;break;case ue.xj:a[b.name]-=b.value;break;case ue.tj:a[b.name]*=b.value;break;case ue.qj:a[b.name]/=b.value;break;case ue.yj:a[b.name]=!a[b.name]}}if(null!==this.i&&(b=this.i,"function"===typeof a[b.name])){var d="undefined"!==typeof b.args?
  b.args:null;Array.isArray(d)||(d=[d]);a[b.name].apply(a,d)}}};te.prototype.destroy=function(){this.j=null;n.prototype.destroy.call(this)};Object.defineProperty(te.prototype,"target",{get:function(){return ve(this,this.ma)}});Object.defineProperty(te.prototype,"count",{get:function(){return 0}});function sa(a){this.j=a;this.f=null;this.c=[];this.W=null;n.call(this,"ActionManager")}sa.prototype=Object.create(n.prototype);sa.prototype.constructor=sa;sa.prototype.get=function(a){return p.get(a,"Action")};
  sa.prototype.ia=function(a){var b;if(!0===Array.isArray(a))for(var d=0,e=a.length;d<e;d++)b=new te(this.j,a[d]),this.c.push(b);else b=new te(this.j,a),this.c.push(b)};sa.prototype.destroy=function(){if(D.za(this.c,"Action"))for(;0<this.c.length;)this.c.pop().destroy()};
  function we(a,b,d,e){this.j=a;this.C=b;this.G=d;this.f=this.H=null;this.X=e;this.c=this.A=this.J=this.K=null;this.S=!1;this.I=this.F=this.B=this.i=this.m=null;this.O=this.N=!0;this.u=this.o=null;n.call(this,"Plugin");this.M=this.G.uid;this.wb=this.G.tags;ba(this);this.I={}}we.prototype=Object.create(n.prototype);g=we.prototype;g.constructor=we;
  function xe(a){a.f=D.hb(a.C.defaultConfig,a.G,a.H);a.K=a.f.options||{};a.vb=a.f.data||{};a.J=a.f.actions||{};ye(a);var b=a.f.events;a.A={};var d,e;for(e in b)d=new Ia(a.j),d.f(b[e]),a.A[e]=d}function ye(a){for(var b in a.A)a.A[b].destroy(),a.A[b]=null}g.Pl=function(){!0===this.C.loaded?ze(this):this.C.onLoadComplete.ba(this.po,this)};g.po=function(){ze(this)};
  function ze(a){var b=a.G;"string"===typeof b.parent&&(a.m=b.parent);a.N="boolean"===typeof b.keep?b.keep:!0;a.O="boolean"===typeof b.reset?b.reset:!0;null===a.F&&!0===D.za(b.scenes,"string")&&(a.F=b.scenes);xe(a);a.c=a.C.zl(a.j,a);a.c.boot.call(a.c);null!==a.o&&a.o.D()}g.mq=function(){this.S=!0;null!==this.u&&this.u.D()};g.update=function(){null!==this.c&&"function"===typeof this.c.update&&this.c.update.call(this.c)};
  g.cm=function(){xe(this);null!==this.c&&("function"===typeof this.c.reset?this.c.reset.call(this.c):this.log("There is no reset function on plugin "+this.C.uid))};
  g.destroy=function(){!1!==this.fb&&(null!==this.c&&(this.c.viewer=null,this.c.plugin=null,this.c.destroy(),this.c=null),null!==this.B&&(this.B.destroy(),this.B=null),null!==this.i&&(this.i.destroy(),this.i=null),null!==this.o&&(this.o.destroy(),this.o=null),null!==this.u&&(this.u.destroy(),this.u=null),ye(this),this.I=this.j=this.A=null,n.prototype.destroy.call(this))};Object.defineProperty(we.prototype,"fullUrl",{get:function(){return this.C.fullUrl}});
  Object.defineProperty(we.prototype,"options",{get:function(){return this.K}});Object.defineProperty(we.prototype,"actions",{get:function(){return this.J}});Object.defineProperty(we.prototype,"events",{get:function(){return this.A}});Object.defineProperty(we.prototype,"scenes",{get:function(){return this.F}});Object.defineProperty(we.prototype,"persistentData",{get:function(){return this.I},set:function(a){this.I=a}});Object.defineProperty(we.prototype,"instance",{get:function(){return this.c}});
  Object.defineProperty(we.prototype,"instanceReady",{get:function(){return this.S}});
  Object.defineProperty(we.prototype,"container",{get:function(){if(null===this.i){if("string"===typeof this.m&&""!==this.m){this.m=document.getElementById(this.m);if("undefined"===typeof this.m||null===this.m||!1===ia.Bh(this.m))throw"$_Plugin.boot : Plugin parent is invalid";this.i=new w(this.j,null,null,this.m)}else this.i=new w(this.j),this.j.pluginContainer.vc(this.i),this.i.Xb(!0);this.i.id=this.M;this.i.index=this.X}return this.i}});
  Object.defineProperty(we.prototype,"create",{get:function(){null===this.B&&(this.B=new Ae(this.j,this));return this.B}});Object.defineProperty(we.prototype,"keep",{get:function(){return this.N}});Object.defineProperty(we.prototype,"reset",{get:function(){return this.O}});Object.defineProperty(we.prototype,"contextualConfig",{get:function(){return this.H},set:function(a){this.H=a}});Object.defineProperty(we.prototype,"instanceConfig",{get:function(){return this.G}});
  Object.defineProperty(we.prototype,"config",{get:function(){return this.f}});Object.defineProperty(we.prototype,"onInstanceCreate",{get:function(){null===this.o&&(this.o=new r(this,!0));return this.o}});Object.defineProperty(we.prototype,"onInstanceReady",{get:function(){null===this.u&&(this.u=new r(this,!0));return this.u}});
  function Be(a){n.call(this,"PluginEngine");this.j=a;this.f=null;this.u=this.K=this.m=this.N="";this.H=null;this.A="";this.B=null;this.F="";this.o=this.C=this.I=this.G=this.i=null;this.O=0;this.J=!1;this.c=null}Be.prototype=Object.create(n.prototype);Be.prototype.constructor=Be;var Ce=["boot","destroy"],De=["viewer","plugin"];g=Be.prototype;
  g.load=function(a){if("undefined"!==typeof a){a=this.f=a;if("undefined"===typeof a.uid)throw"Can't load a plugin engine, missing id in config";this.M=a.uid;ba(this);this.N="string"===typeof a.prefix?a.prefix:this.j.plugins.prefix;if("undefined"===typeof a.url)throw"Can't load a plugin engine, missing url in config";this.m=a.url;this.u=this.N+this.m;this.K="string"===typeof a.manifest?a.manifest:"manifest.json";this.j.load.json(this.M,this.u+this.K,this.Do,this);return!0}return!1};
  g.zl=function(a,b){for(var d=new this.i,e=0,h=De.length;e<h;e++)if("undefined"!==typeof d[De[e]])throw"$_PluginEngine instance validation failed, "+De[e]+" is reserved";if(null!==this.o)for(e=0,h=this.o.length;e<h;e++)if("function"!==typeof d[this.o[e]])throw"$_PluginEngine instance validation failed, action "+this.o[e]+" is undefined on plugin "+this.F;d.j=a;d.tc=b;return d};
  g.Do=function(a){a=this.H=this.j.cache.get(B.JSON,a.key).data;if(this.M!==a.uid)throw"Plugin Engine UID doesn't match with manifest UID";var b=a.viewer,d="0.0.0",e="9.9.9";"undefined"!==typeof b&&("undefined"!==typeof b.min&&(d=b.min),"undefined"!==typeof b.max&&(e=b.max));for(var b=["0","9","5"],d=d.split("."),e=e.split("."),h=0,k=0,l=0,t=1,v=Math.max(b.length,d.length,e.length)-1;0<=v;v--)"undefined"!==typeof b[v]&&(h+=parseInt(b[v],10)*t),"undefined"!==typeof d[v]&&(k+=parseInt(d[v],10)*t),"undefined"!==
  typeof e[v]&&(l+=parseInt(e[v],10)*t),t*=10;if(!1===(h<k||h>l?!1:!0))this.warn("Version compatibility check for plugin "+a.uid+" failed!"),this.warn(a.viewer);else if(!1===q.check(a.device))this.warn("Device compatibility check for plugin "+a.uid+" failed!"),this.warn(a.device);else{"undefined"!==typeof a.options&&(this.I=a.options);"undefined"!==typeof a.data&&(this.vb=a.data);"undefined"!==typeof a.actions&&(this.o=a.actions);"undefined"!==typeof a.events&&(this.C=a.events);this.A=a.name;this.B=
  a.sources;this.F=a.constructor;b=null;if("undefined"!==typeof a.i18n&&(b=a.i18n,"undefined"!==typeof b.locales))for(d=0,e=b.locales.length;d<e;d++)if(a=b.locales[d],"undefined"!==typeof a.files)for(k=0,l=a.files.length;k<l;k++)h=a.files[k],h.key=this.M+"-"+h.key,h.url=this.u+h.url;this.G=b;a=this.B;b=0;for(d=a.length;b<d;b++)e="http://"===String(a[b]).substring(0,7)||"https://"===String(a[b]).substring(0,8)?a[b]:this.u+a[b],"css"===Ka(e).extension?this.j.load.pl(e,this.nk,this):this.j.load.em(e,this.nk,
  this)}};g.nk=function(){this.O++;if(this.O===this.B.length){var a;a:{a=this.F;if("string"===typeof a&&""!==a){a=a.split(".");for(var b=window,d=0,e=a.length;d<e;d++){if(d===a.length-1&&"function"===typeof b[a[d]]){a=b[a[d]];break a}if("object"===typeof b[a[d]])b=b[a[d]];else break}}a=null}this.i=a;!0===Ee(this)&&(a=this.G,null!==a&&this.j.i18n.ia(a),this.J=!0,null!==this.c&&this.c.D())}};
  function Ee(a){if(null===a.i||"function"!==typeof a.i)throw"Plugin engine "+a.M+" can't find it's constructor";for(var b=0,d=Ce.length;b<d;b++)if("function"!==typeof a.i.prototype[Ce[b]])throw"$_PluginEngine engine validation failed, missing required method "+Ce[b]+" on plugin engine "+a.A;Object.defineProperty(a.i.prototype,"viewer",{get:function(){return this.j}});Object.defineProperty(a.i.prototype,"plugin",{get:function(){return this.tc}});return!0}
  g.destroy=function(){this.G=this.i=this.B=this.A=this.H=this.f=this.j=null;null!==this.c&&(this.c.destroy(),this.c=null);n.prototype.destroy.call(this)};Object.defineProperty(Be.prototype,"name",{get:function(){return this.A}});Object.defineProperty(Be.prototype,"loaded",{get:function(){return this.J}});Object.defineProperty(Be.prototype,"url",{get:function(){return this.m}});Object.defineProperty(Be.prototype,"fullUrl",{get:function(){return this.u}});
  Object.defineProperty(Be.prototype,"options",{get:function(){return this.I}});Object.defineProperty(Be.prototype,"actions",{get:function(){return this.o}});Object.defineProperty(Be.prototype,"events",{get:function(){return this.C}});Object.defineProperty(Be.prototype,"defaultConfig",{get:function(){return{data:this.vb,options:this.I,actions:this.o,events:this.C}}});Object.defineProperty(Be.prototype,"onLoadComplete",{get:function(){null===this.c&&(this.c=new r(this));return this.c}});
  function qa(a){n.call(this,"PluginManager");this.j=a;this.o=!0;this.u="";this.i=this.c=this.m=null}qa.prototype=Object.create(n.prototype);g=qa.prototype;g.constructor=qa;
  g.bn=function(){for(var a=this.j.story.sceneUid,b,d=this.c.size;d--;)b=this.c.get(d),(!1===b.keep||null!==b.scenes&&-1===b.scenes.indexOf(a))&&this.remove(b.uid);!0===this.o&&"undefined"!==typeof this.f&&(a=this.f,Fe(this,a.engines),Ge(this,a.instances),He(this,a.configurations));!0===this.o&&"undefined"!==typeof this.j.story.scene.config.plugins&&(a=this.j.story.scene.config.plugins,Fe(this,a.engines),Ge(this,a.instances),He(this,a.configurations));for(b=this.c.size;b--;)a=this.c.get(b),!0===a.reset&&
  a.cm()};function Fe(a,b){if("undefined"!==typeof b)for(var d=0,e=b.length;d<e;d++){var h=a,k=b[d];if("string"===typeof k.uid&&null===Ie(h,k.uid))if(!1===p.gb(k.uid)){var l=new Be(h.j);h.m.add(l);l.load(k)}else h.m.add(p.get(k.uid))}}
  function Ge(a,b){if("undefined"!==typeof b)for(var d=0,e=b.length;d<e;d++){var h=!1!==b[d].enabled?!0:!1,k=a.Re(b[d].uid),l=a.j.story.sceneUid,t=D.za(b[d].scenes,"string")?b[d].scenes:[],l=0===t.length||""===l&&0===t.length||-1!==t.indexOf(l);if(!0===h&&null===k&&!0===l){h=a;k=b[d];if("undefined"===typeof k.engine)throw"Can't create plugin instance, engineUid is undefined";l=Ie(h,k.engine);if(null===l)throw"Plugin Engine "+k.engine+" doesn't exist";k=new we(h.j,l,k,"number"===typeof k.index?k.index:
  h.c.size);k.onInstanceCreate.ba(h.Mo,h);h.c.add(k);k.Pl()}}}function He(a,b){if("undefined"!==typeof b)for(var d=0,e=b.length;d<e;d++){var h=!1!==b[d].enabled?!0:!1,k=a.Re(b[d].instance),l=null;!0===h&&(l=b[d]);null!==k&&(k.contextualConfig=l)}}function Ie(a,b){for(var d,e=0,h=a.m.size;e<h;e++)if(d=a.m.get(e),d.uid===b)return d;return null}g.Mo=function(a){a=a.emitter;null!==this.i&&this.i.D(a)};g.boot=function(){this.m=new Je;this.c=new Je;this.j.story.onSceneLoadStart.add(this.bn,this)};
  g.ia=function(a){this.f=a;this.o="boolean"===typeof a.enabled?a.enabled:!0;this.u="string"===typeof a.prefix?a.prefix:"./plugins/"};g.Re=function(a){for(var b,d=0,e=this.c.size;d<e;d++)if(b=this.c.get(d),b.uid===a)return b;return null};g.xl=function(a){a=this.c.get(a);return"undefined"!==typeof a?a:null};g.get=function(a){var b=null;"string"===typeof a?b=this.Re(a):"number"===typeof a&&(b=this.xl(a));return b};g.remove=function(a){a=this.get(a);a.destroy();this.c.remove(a)};
  g.update=function(){for(var a,b=0,d=this.c.size;b<d;b++)a=this.c.get(b),a.update()};g.render=function(){};g.destroy=function(){this.j=null;null!==this.i&&(this.i.destroy(),this.i=null);for(var a=0,b=this.m.size;a<b;a++)this.m.get(a).destroy();this.m=null;a=0;for(b=this.c.size;a<b;a++)this.c.get(a).destroy();this.c=null;n.prototype.destroy.call(this)};Object.defineProperty(qa.prototype,"all",{get:function(){return this.c}});Object.defineProperty(qa.prototype,"enabled",{get:function(){return this.o}});
  Object.defineProperty(qa.prototype,"prefix",{get:function(){return this.u}});Object.defineProperty(qa.prototype,"onInstanceCreate",{get:function(){null===this.i&&(this.i=new r(this,!0));return this.i}});function Ae(a,b){this.j=a;this.tc=b;this.da=[];n.call(this,"PluginObjectFactory")}Ae.prototype=Object.create(n.prototype);g=Ae.prototype;g.constructor=Ae;g.yb=function(a){a:{for(var b=this.da.length,d;b--;)if(d=this.da[b],d===a.emitter){a=b;break a}a=-1}this.da.splice(a,1)};
  g.uq=function(a){a=new Na(this.j,a);a.onDestroy.ba(this.yb,this);this.da.push(a);return a};g.vq=function(a){a=new T(this.j,a);a.onDestroy.ba(this.yb,this);this.da.push(a);return a};g.sound=function(a,b){a=new N(this.j,a,b);a.onDestroy.ba(this.yb,this);this.da.push(a);return a};g.Np=function(a){a=new w(this.j,a);a.onDestroy.ba(this.yb,this);this.da.push(a);return a};g.dn=function(a){a=new U(this.j,a);a.onDestroy.ba(this.yb,this);this.da.push(a);return a};
  g.image=function(a,b){var d=a;"string"===typeof a&&(d={key:null,url:a});d.key=this.tc.uid+"-"+d.key;!1!==b&&(d.url=this.tc.fullUrl+d.url);a=new Za(this.j,d);a.onDestroy.ba(this.yb,this);this.da.push(a);return a};g.sprite=function(a,b){a.key=this.tc.uid+"-"+a.key;!1!==b&&(a.url=this.tc.fullUrl+a.url,a.frames=this.tc.fullUrl+a.frames);a=new fd(this.j,a);a.onDestroy.ba(this.yb,this);this.da.push(a);return a};g.cn=function(a){a=new Ke(this.j,a);a.onDestroy.ba(this.yb,this);this.da.push(a);return a};
  g.fn=function(a,b,d,e,h){var k;"undefined"!==typeof d&&d.toLowerCase()===cb.Kf?k=new J(this.j,a,b,e):k=new K(this.j,a,b,e,h);k.onDestroy.ba(this.yb,this);this.da.push(k);return k};g.canvas=function(){var a=new ja(this.j);a.onDestroy.ba(this.yb,this);this.da.push(a);return a};g.en=function(a){a=new hc(this.j,a);a.onDestroy.ba(this.yb,this);this.j.tween.add(a);this.da.push(a);return a};g.ql=function(){for(var a=this.da.length;a--;)this.da[a].destroy()};
  g.destroy=function(){this.ql();this.da=this.tc=this.j=null;n.prototype.destroy.call(this)};
  var q=function(a){a=a();a.prototype=Object.create(n.prototype);a.prototype.constructor=a;a.prototype.co=function(){if(/Playstation Vita/.test(this.fa))this.nb="playstationvita",this.jh=!0;else if(/Xbox/.test(this.fa))this.nb="xbox",this.rh=!0;else if(/Kindle/.test(this.fa)||/\bKF[A-Z][A-Z]+/.test(this.fa)||/Silk.*Mobile Safari/.test(this.fa))this.nb="kindle",this.Ng=!0;else if(/Windows Phone/i.test(this.fa)||/IEMobile/i.test(this.fa))this.nb="windowsphone",this.Ne=!0,/Windows Phone (\d+)/.test(this.fa)&&
  (this.sc=parseInt(RegExp.$1,10));else if(/Android/.test(this.fa))this.nb="android",this.Cj=!0,/Android ([\.\_\d]+)/.test(this.fa)&&(this.sc=parseInt(RegExp.$1,10));else if(/CrOS/.test(this.fa))this.nb="chromeos",this.wg=!0;else if(/iP[ao]d|iPhone/i.test(this.fa))this.nb="ios",this.cd=!0,/OS (\d+)/.test(navigator.appVersion)&&(this.sc=parseInt(RegExp.$1,10));else if(/(Linux|X11)/.test(this.fa))this.nb="linux",this.Og=!0;else if(/Mac OS X/.test(this.fa))this.nb="macosx",this.Rg=!0,/Mac OS X (10[\.\_\d]+)/.test(this.fa)&&
  (this.sc=parseInt(RegExp.$1,10));else if(/Windows/.test(this.fa)||/WPDesktop/i.test(this.fa))/WPDesktop/i.test(this.fa)?(this.nb="windowsphone",this.Ne=!0):(this.nb="windows",this.qh=!0),/(Windows 10.0|Windows NT 10.0)/.test(this.fa)?this.sc=10:/(Windows 8.1|Windows NT 6.3)/.test(this.fa)||/(Windows 8|Windows NT 6.2)/.test(this.fa)?this.sc=8:/(Windows 7|Windows NT 6.1)/.test(this.fa)&&(this.sc=7)};a.prototype.Un=function(){this.wd="undefined"!==typeof document.documentMode;this.xe=!1===this.wd&&!0===
  !!window.StyleMedia;this.Fg="undefined"!==typeof window.InstallTrigger;this.Ee=!0===!!window.opr||0<=this.fa.indexOf(" OPR/")||0<=this.fa.indexOf("Opera");this.ah=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);this.vg=!1===this.wd&&!1===this.xe&&!1===this.Ee&&(!0===!!window.chrome||0<=this.fa.indexOf("CriOS"));if(this.xe)this.Qb="edge",/Edge\/(\d+)/.test(this.fa)&&(this.mb=this.Rj=parseInt(RegExp.$1,10));else if(this.vg)this.Qb="chrome",/CriOS\/(\d+)/.test(this.fa)?this.mb=this.xg=parseInt(RegExp.$1,
  10):/Chrome\/(\d+)/.test(this.fa)&&(this.mb=this.xg=parseInt(RegExp.$1,10));else if(this.Fg)this.Qb="firefox",/Firefox\D+(\d+)/.test(this.fa)&&(this.mb=this.$j=parseInt(RegExp.$1,10));else if(this.Ng)/Silk/.test(this.fa)&&(this.Qb="silk",this.gh=!0);else if(this.wd)this.Qb="internetexplorer",/MSIE (\d+\.\d+);/.test(this.fa)?this.mb=this.Lg=parseInt(RegExp.$1,10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(this.fa)&&(this.mb=this.Lg=parseInt(RegExp.$3,10));else if(this.Ee)this.Qb="opera",/OPR\/(\d+)/.test(this.fa)?
  this.mb=this.Fe=parseInt(RegExp.$1,10):0<=this.fa.indexOf("Opera/")?/Version\/(\d+)/.test(this.fa)&&(this.mb=this.Fe=parseInt(RegExp.$1,10)):/Opera (\d+)/.test(this.fa)&&(this.mb=this.Fe=parseInt(RegExp.$1,10));else if(this.ah)this.Qb="safari",/version\/(\d+(\.\d+)?)/i.test(this.fa)&&(this.mb=this.Uk=parseInt(RegExp.$1,10));else{var a=this.fa.match(/Android.*AppleWebKit\/([\d.]+)/);a&&537>a[1]&&(this.Qb="androidstock",this.hk=!0,this.mb=this.Dj=parseFloat(this.fa.slice(this.fa.indexOf("Android")+
  8)))}navigator.M&&(this.dl=!0);this.Kk="CSS1Compat"===document.compatMode?!1:!0};a.prototype.Wn=function(){this.Kc=window.devicePixelRatio||1;this.ek=!0===this.cd&&-1!==this.fa.toLowerCase().indexOf("iphone");this.fk=!0===this.cd&&-1!==this.fa.toLowerCase().indexOf("ipod");this.Jg=!0===this.cd&&-1!==this.fa.toLowerCase().indexOf("ipad");this.Pk=2<=this.Kc&&!0===this.cd;this.qh&&!this.Ne||this.Rg||this.Og&&!this.gh||this.wg?this.ve=!0:/Mobi/i.test(this.fa)&&!1===this.Jg?this.Ae=!0:this.hh=!0;if(/TV/i.test(this.fa)||
  !0===this.jh||!0===this.rh||this.ve&&/Windows NT/i.test(this.fa)&&/Touch/i.test(this.fa))this.Fk=!0,this.ve=this.hh=this.Ae=!1};a.prototype.fo=function(){var a=document.createElement("video");try{"function"===typeof a.canPlayType&&(a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(this.Xg=!0),a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(this.Ug=this.Hg=!0),a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(this.ph=!0),a.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,
  "")&&(this.kh=!0),a.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(this.Ig=!0))}catch(d){}};a.prototype.Sn=function(){this.Fj="undefined"!==typeof window.Audio;this.el="undefined"!==typeof window.AudioContext||"undefined"!==typeof window.webkitAudioContext;var a=document.createElement("audio");try{if("function"===typeof a.canPlayType){a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(this.Wg=!0);a.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(this.Sg=
  !0);if(a.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||a.canPlayType("audio/opus;").replace(/^no$/,""))this.Ge=!0;a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(this.lh=!0);a.canPlayType("audio/aac;").replace(/^no$/,"")&&(this.sg=!0);if(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/m4a;")||a.canPlayType("audio/aac;").replace(/^no$/,""))this.Qg=!0;if(a.canPlayType("audio/x-mp4;")||a.canPlayType("audio/mp4;")||a.canPlayType("audio/aac;").replace(/^no$/,""))this.Tg=!0;
  a.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(this.nh=this.oh=!0)}}catch(d){}};a.prototype.Xn=function(){this.bl="undefined"!==typeof navigator.vibrate||"undefined"!==typeof navigator.o||"undefined"!==typeof navigator.f||"undefined"!==typeof navigator.c;this.tg="function"===typeof navigator.getBattery};a.prototype.Zn=function(){this.Ca="undefined"!==typeof window.CanvasRenderingContext2D;if(!0===this.Ca){this.Hj="function"===typeof document.createElement("canvas").getContext("2d").fillText;
  var a=document.createElement("canvas").getContext("2d");a.rect(0,0,10,10);a.rect(2,2,6,6);this.Ij=!1===a.isPointInPath(5,5,"evenodd")}try{this.Pg="object"===typeof window.localStorage&&"function"===typeof window.localStorage.getItem}catch(e){this.Pg=!1}this.qk="function"===typeof window.MediaSource;this.Tj="function"===typeof window.HTMLMediaElement&&"function"===typeof window.i&&"function"===typeof window.c&&"function"===typeof navigator.i;this.Ej="object"===typeof window.applicationCache;this.Bj=
  "function"===typeof window.addEventListener;try{var d=document.createElement("canvas");d.c=!1;this.mh="function"===typeof d.getContext&&"undefined"!==typeof window.WebGLRenderingContext&&!(!d.getContext("webgl")&&!d.getContext("experimental-webgl"))}catch(e){this.mh=!1}this.uc="function"===typeof navigator.getVRDisplays?!0:!1;this.Aj="object"===typeof window.JSON&&"function"===typeof window.JSON.parse&&"function"===typeof window.JSON.stringify;this.dk="object"===typeof navigator.geolocation;this.Sb=
  "object"===typeof window.history&&"function"===typeof window.history.pushState;this.Wk="function"===typeof document.createElementNS&&"function"===typeof document.createElementNS("http://www.w3.org/2000/svg","svg").f;this.Jj="undefined"!==typeof document.documentElement.contextMenu&&"function"===typeof window.HTMLMenuItemElement};a.prototype.Yn=function(){this.ik=/^https/i.test(window.location.protocol);try{this.Mg=window.self!==window.top}catch(b){this.Mg=!0}};a.prototype.bo=function(){this.Zk="undefined"!==
  typeof window.ontouchstart||"undefined"!==typeof window.f&&document instanceof window.f||"number"===typeof navigator.maxTouchPoints&&0<navigator.maxTouchPoints||"number"===typeof navigator.msMaxTouchPoints&&0<navigator.msMaxTouchPoints;if("undefined"!==typeof window.M||"undefined"!==typeof window.m)this.$k=!(!MouseEvent.c||!MouseEvent.f);this.Da="function"===typeof navigator.getGamepads||"function"===typeof navigator.webkitGetGamepads};a.prototype.$n=function(){for(var a="requestFullscreen requestFullScreen webkitRequestFullscreen webkitRequestFullScreen mozRequestFullScreen mozRequestFullscreen msRequestFullscreen msRequestFullScreen".split(" "),
  d="cancelFullscreen cancelFullScreen exitFullscreen exitFullScreen webkitCancelFullscreen webkitCancelFullScreen webkitExitFullscreen webkitExitFullScreen mozCancelFullscreen mozCancelFullScreen mozExitFullscreen mozExitFullScreen msCancelFullscreen msCancelFullScreen msExitFullscreen msExitFullScreen".split(" "),e=document.createElement("div"),h=0,k=a.length;h<k;h++)if(e[a[h]]){this.Ok=a[h];break}a=0;for(e=d.length;a<e;a++)if(document[d[a]]){this.Xj=d[a];break}"function"===typeof window.Element&&
  Element.ALLOW_KEYBOARD_INPUT&&(this.ck=!0);d=["fullscreenElement","mozFullScreenElement","webkitFullscreenElement","msFullscreenElement"];a=0;for(e=d.length;a<e;a++)if("undefined"!==typeof document[d[a]]){this.ak=d[a];break}d=["fullscreenEnabled","mozFullScreenEnabled","webkitFullscreenEnabled","msFullscreenEnabled"];a=0;for(e=d.length;a<e;a++)if("undefined"!==typeof document[d[a]]){this.bk=d[a];break}};a.prototype.Tn=function(){this.ih="visibilityState"in document?"visibilityState":"webkitVisibilityState"in
  document?"webkitVisibilityState":"mozVisibilityState"in document?"mozVisibilityState":null;this.cl=this.ih.slice(0,-5)+"change";for(var a=["orientation","mozOrientation","msOrientation"],d=0,e=a.length;d<e;d++)if("string"===typeof screen[a[d]]){this.Ja=a[d];break}this.dd="object"===typeof screen.orientation&&"string"===typeof screen.orientation.type&&"function"===typeof screen.orientation.lock;for(var a=["lockOrientation","mozLockOrientation","msLockOrientation"],d=["unlockOrientation","mozUnlockOrientation",
  "msUnlockOrientation"],e=0,h=a.length;e<h;e++)if("function"===typeof screen[a[e]]){this.pk=a[e];this.al=d[e];break}this.Yj="undefined"!==typeof window.File&&"undefined"!==typeof window.FileReader&&"undefined"!==typeof window.FileList&&"undefined"!==typeof window.Blob;this.Zj="undefined"!==typeof window.requestFileSystem||"undefined"!==typeof window.webkitRequestFileSystem;this.Jk="undefined"!==typeof document.c||"undefined"!==typeof document.f||"undefined"!==typeof document.i};a.prototype.Vn=function(){var a=
  document.createElement("a").style;a.cssText="pointer-events:auto";this.Mj="auto"===a.pointerEvents;a.cssText="background-color:rgba(150,255,150,.5)";this.Nj=-1<(""+a.backgroundColor).indexOf("rgba");this.Lj="undefined"!==typeof a.animationName||"undefined"!==typeof a.webkitAnimationName||"undefined"!==typeof a.m||"undefined"!==typeof a.o;var a=document.createElement("p"),d,e={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};
  document.body.insertBefore(a,null);for(var h in e)"undefined"!==typeof a.style[h]&&(a.style[h]="translate3d(1px,1px,1px)",d=window.getComputedStyle(a).getPropertyValue(e[h]));document.body.removeChild(a);this.Kj="undefined"!==typeof d&&0<d.length&&"none"!==d};a.prototype.ko=function(a){null!==a.rotationRate&&"undefined"!==typeof a.rotationRate.alpha&&"undefined"!==typeof a.rotationRate.beta&&"undefined"!==typeof a.rotationRate.gamma&&(this.Bg=!0);"undefined"!==typeof a.acceleration&&"undefined"!==
  typeof a.acceleration.x&&"undefined"!==typeof a.acceleration.y&&"undefined"!==typeof a.acceleration.z&&(this.Ag=!0);this.Lk();"function"!==typeof this.bd&&this.ug()};a.prototype.we=function(a){"undefined"!==typeof a.alpha&&null!==a.alpha&&"undefined"!==typeof a.beta&&null!==a.beta&&"undefined"!==typeof a.gamma&&null!==a.gamma&&(this.Eg=!0);this.Mk();"function"!==typeof this.ad&&this.ug()};a.prototype.Lk=function(){window.removeEventListener("devicemotion",this.ad,!1);this.ad=null};a.prototype.Mk=
  function(){window.removeEventListener("deviceorientation",this.bd,!1);this.bd=null};a.prototype.ao=function(){this.zg="undefined"!==typeof window.DeviceMotionEvent;this.Cg="undefined"!==typeof window.DeviceOrientationEvent;window.addEventListener("deviceorientation",this.bd,!1);window.addEventListener("devicemotion",this.ad,!1)};a.prototype.eo=function(){var a=document.createElement("div");a.style.width="1in";a.style.height="1in";document.body.appendChild(a);this.Qj=a.offsetWidth;document.body.removeChild(a);
  this.Ae?(this.eh=Math.floor(Math.min(window.screen.width,window.screen.height)*this.Kc),this.bh=Math.floor(Math.max(window.screen.width,window.screen.height)*this.Kc)):(this.eh=Math.floor(Math.max(window.screen.width,window.screen.height)*this.Kc),this.bh=Math.floor(Math.min(window.screen.width,window.screen.height)*this.Kc))};a.prototype.Rn=function(){this.fa=navigator.userAgent;this.jk=navigator.languages&&navigator.languages[0]||navigator.language||navigator.m||"";this.co();this.Un();this.Wn();
  this.Sn();this.fo();this.Xn();this.Zn();this.Yn();this.Tn();this.$n();this.bo();this.Vn();this.ad=this.ko.bind(this);this.bd=this.we.bind(this);this.ao();this.eo();!1===this.zg&&!1===this.Cg&&this.ug()};a.prototype.ug=function(){"function"===typeof this.ad&&this.Lk();"function"===typeof this.bd&&this.Mk();this.qc=!0===this.Bg&&!0===this.Ag&&!0===this.Eg;this.la=!0;this.W.D();Object.freeze(q)};a.prototype.Kp=function(a){return"mp3"===a&&!0===this.Sg||"ogg"===a&&(!0===this.Wg||!0===this.Ge)||"m4a"===
  a&&!0===this.Qg||"mp4"===a&&!0===this.Tg||"opus"===a&&!0===this.Ge||"wav"===a&&!0===this.lh||"aac"===a&&!0===this.sg||"webm"===a&&!0===this.oh||"weba"===a&&!0===this.nh?!0:!1};a.prototype.Lp=function(a){if("webm"!==a||!0!==this.ph&&!0!==this.kh)if("mp4"!==a||!0!==this.Ug&&!0!==this.Hg){if(("ogg"===a||"ogv"===a)&&!0===this.Xg||"mpeg"===a&&!0===this.Ig)return!0}else return!0;else return!0;return!1};a.prototype.hq=function(){return navigator.getBattery().then(function(a){return this.tg&&!a.charging&&
  .2>=a.level}.bind(this),function(){return!1})};a.prototype.check=function(a,d,e){e=e||"and";d=d||q;var b=!0,k;for(k in a)if(b="and"===k?q.check(a[k],d,"and"):"or"===k?q.check(a[k],d,"or"):q.nl(a[k],d[k]),"and"===e&&!1===b)break;else if("or"===e&&!0===b)break;return b};a.prototype.nl=function(a,d){var b="===";"object"===typeof a&&("string"===typeof a.operation&&(b=a.operation),a=a.value);var h=!1;switch(b){case "==":case "===":h=d===a;break;case "!=":case "!==":h=d!==a;break;case "<":h=d<a;break;case "<=":h=
  d<=a;break;case ">":h=d>a;break;case ">=":h=d>=a}return h};Object.defineProperty(a.prototype,"ready",{get:function(){return this.la}});Object.defineProperty(a.prototype,"ua",{get:function(){return this.fa}});Object.defineProperty(a.prototype,"language",{get:function(){return this.jk}});Object.defineProperty(a.prototype,"os",{get:function(){return this.nb}});Object.defineProperty(a.prototype,"osVersion",{get:function(){return this.sc}});Object.defineProperty(a.prototype,"vita",{get:function(){return this.jh}});
  Object.defineProperty(a.prototype,"xbox",{get:function(){return this.rh}});Object.defineProperty(a.prototype,"kindle",{get:function(){return this.Ng}});Object.defineProperty(a.prototype,"android",{get:function(){return this.Cj}});Object.defineProperty(a.prototype,"chromeOS",{get:function(){return this.wg}});Object.defineProperty(a.prototype,"iOS",{get:function(){return this.cd}});Object.defineProperty(a.prototype,"linux",{get:function(){return this.Og}});Object.defineProperty(a.prototype,"macOS",
  {get:function(){return this.Rg}});Object.defineProperty(a.prototype,"windows",{get:function(){return this.qh}});Object.defineProperty(a.prototype,"windowsPhone",{get:function(){return this.Ne}});Object.defineProperty(a.prototype,"firefox",{get:function(){return this.Fg}});Object.defineProperty(a.prototype,"firefoxVersion",{get:function(){return this.$j}});Object.defineProperty(a.prototype,"chrome",{get:function(){return this.vg}});Object.defineProperty(a.prototype,"chromeVersion",{get:function(){return this.xg}});
  Object.defineProperty(a.prototype,"ie",{get:function(){return this.wd}});Object.defineProperty(a.prototype,"ieVersion",{get:function(){return this.Lg}});Object.defineProperty(a.prototype,"opera",{get:function(){return this.Ee}});Object.defineProperty(a.prototype,"operaVersion",{get:function(){return this.Fe}});Object.defineProperty(a.prototype,"edge",{get:function(){return this.xe}});Object.defineProperty(a.prototype,"edgeVersion",{get:function(){return this.Rj}});Object.defineProperty(a.prototype,
  "safari",{get:function(){return this.ah}});Object.defineProperty(a.prototype,"safariVersion",{get:function(){return this.Uk}});Object.defineProperty(a.prototype,"silk",{get:function(){return this.gh}});Object.defineProperty(a.prototype,"browser",{get:function(){return this.Qb}});Object.defineProperty(a.prototype,"browserVersion",{get:function(){return this.mb}});Object.defineProperty(a.prototype,"webApp",{get:function(){return this.dl}});Object.defineProperty(a.prototype,"isAndroidStockBrowser",{get:function(){return this.hk}});
  Object.defineProperty(a.prototype,"androidStockBrowserVersion",{get:function(){return this.Dj}});Object.defineProperty(a.prototype,"quirksMode",{get:function(){return this.Kk}});Object.defineProperty(a.prototype,"fullscreenEnabled",{get:function(){return this.bk}});Object.defineProperty(a.prototype,"requestFullscreen",{get:function(){return this.Ok}});Object.defineProperty(a.prototype,"exitFullscreen",{get:function(){return this.Xj}});Object.defineProperty(a.prototype,"fullscreenElement",{get:function(){return this.ak}});
  Object.defineProperty(a.prototype,"fullscreenKeyboard",{get:function(){return this.ck}});Object.defineProperty(a.prototype,"iPhone",{get:function(){return this.ek}});Object.defineProperty(a.prototype,"retina",{get:function(){return this.Pk}});Object.defineProperty(a.prototype,"iPod",{get:function(){return this.fk}});Object.defineProperty(a.prototype,"iPad",{get:function(){return this.Jg}});Object.defineProperty(a.prototype,"pixelRatio",{get:function(){return this.Kc}});Object.defineProperty(a.prototype,
  "vibrate",{get:function(){return this.bl}});Object.defineProperty(a.prototype,"battery",{get:function(){return this.tg}});Object.defineProperty(a.prototype,"desktop",{get:function(){return this.ve}});Object.defineProperty(a.prototype,"tablet",{get:function(){return this.hh}});Object.defineProperty(a.prototype,"mobile",{get:function(){return this.Ae}});Object.defineProperty(a.prototype,"other",{get:function(){return this.Fk}});Object.defineProperty(a.prototype,"touch",{get:function(){return this.Zk}});
  Object.defineProperty(a.prototype,"gamepad",{get:function(){return this.Da}});Object.defineProperty(a.prototype,"touchForce",{get:function(){return this.$k}});Object.defineProperty(a.prototype,"audioTag",{get:function(){return this.Fj}});Object.defineProperty(a.prototype,"webAudio",{get:function(){return this.el}});Object.defineProperty(a.prototype,"ogg",{get:function(){return this.Wg}});Object.defineProperty(a.prototype,"mp3",{get:function(){return this.Sg}});Object.defineProperty(a.prototype,"opus",
  {get:function(){return this.Ge}});Object.defineProperty(a.prototype,"wav",{get:function(){return this.lh}});Object.defineProperty(a.prototype,"m4a",{get:function(){return this.Qg}});Object.defineProperty(a.prototype,"mp4",{get:function(){return this.Tg}});Object.defineProperty(a.prototype,"aac",{get:function(){return this.sg}});Object.defineProperty(a.prototype,"webm",{get:function(){return this.oh}});Object.defineProperty(a.prototype,"weba",{get:function(){return this.nh}});Object.defineProperty(a.prototype,
  "oggVideo",{get:function(){return this.Xg}});Object.defineProperty(a.prototype,"h264Video",{get:function(){return this.Hg}});Object.defineProperty(a.prototype,"mp4Video",{get:function(){return this.Ug}});Object.defineProperty(a.prototype,"webmVideo",{get:function(){return this.ph}});Object.defineProperty(a.prototype,"vp9Video",{get:function(){return this.kh}});Object.defineProperty(a.prototype,"hlsVideo",{get:function(){return this.Ig}});Object.defineProperty(a.prototype,"canvas",{get:function(){return this.Ca}});
  Object.defineProperty(a.prototype,"canvasWinding",{get:function(){return this.Ij}});Object.defineProperty(a.prototype,"canvasText",{get:function(){return this.Hj}});Object.defineProperty(a.prototype,"addEventListener",{get:function(){return this.Bj}});Object.defineProperty(a.prototype,"raf",{get:function(){return this.Tb}});Object.defineProperty(a.prototype,"webGL",{get:function(){return this.mh}});Object.defineProperty(a.prototype,"webVR",{get:function(){return this.uc}});Object.defineProperty(a.prototype,
  "file",{get:function(){return this.Yj}});Object.defineProperty(a.prototype,"fileSystem",{get:function(){return this.Zj}});Object.defineProperty(a.prototype,"localStorage",{get:function(){return this.Pg}});Object.defineProperty(a.prototype,"applicationCache",{get:function(){return this.Ej}});Object.defineProperty(a.prototype,"geolocation",{get:function(){return this.dk}});Object.defineProperty(a.prototype,"pointerLock",{get:function(){return this.Jk}});Object.defineProperty(a.prototype,"contextMenu",
  {get:function(){return this.Jj}});Object.defineProperty(a.prototype,"mediaSource",{get:function(){return this.qk}});Object.defineProperty(a.prototype,"encryptedMedia",{get:function(){return this.Tj}});Object.defineProperty(a.prototype,"JSON",{get:function(){return this.Aj}});Object.defineProperty(a.prototype,"history",{get:function(){return this.Sb}});Object.defineProperty(a.prototype,"svg",{get:function(){return this.Wk}});Object.defineProperty(a.prototype,"isSecure",{get:function(){return this.ik}});
  Object.defineProperty(a.prototype,"isIframe",{get:function(){return this.Mg}});Object.defineProperty(a.prototype,"visibilityState",{get:function(){return this.ih}});Object.defineProperty(a.prototype,"visibilityChange",{get:function(){return this.cl}});Object.defineProperty(a.prototype,"css3D",{get:function(){return this.Kj}});Object.defineProperty(a.prototype,"cssRgba",{get:function(){return this.Nj}});Object.defineProperty(a.prototype,"cssPointerEvents",{get:function(){return this.Mj}});Object.defineProperty(a.prototype,
  "cssAnimation",{get:function(){return this.Lj}});Object.defineProperty(a.prototype,"gyroscope",{get:function(){return this.qc}});Object.defineProperty(a.prototype,"deviceMotion",{get:function(){return this.zg}});Object.defineProperty(a.prototype,"deviceOrientation",{get:function(){return this.Cg}});Object.defineProperty(a.prototype,"deviceMotionAcceleration",{get:function(){return this.Ag}});Object.defineProperty(a.prototype,"deviceMotionRotationRate",{get:function(){return this.Bg}});Object.defineProperty(a.prototype,
  "deviceOrientationMagnetometer",{get:function(){return this.Eg}});Object.defineProperty(a.prototype,"dpi",{get:function(){return this.Qj}});Object.defineProperty(a.prototype,"screenWidth",{get:function(){return this.eh}});Object.defineProperty(a.prototype,"screenHeight",{get:function(){return this.bh}});Object.defineProperty(a.prototype,"screenOrientation",{get:function(){return this.dd}});Object.defineProperty(a.prototype,"orientation",{get:function(){return this.Ja}});Object.defineProperty(a.prototype,
  "lockOrientation",{get:function(){return this.pk}});Object.defineProperty(a.prototype,"unlockOrientation",{get:function(){return this.al}});Object.defineProperty(a.prototype,"onReady",{get:function(){return this.W}});return new a}(function(){return function(){this.la=!1;this.nb=this.jk=this.fa="";this.sc=0;this.Fg=this.Ne=this.qh=this.Rg=this.Og=this.cd=this.wg=this.Cj=this.Ng=this.rh=this.jh=!1;this.$j=0;this.vg=!1;this.xg=0;this.wd=!1;this.Lg=0;this.Ee=!1;this.Fe=0;this.xe=!1;this.Rj=0;this.ah=
  !1;this.Uk=0;this.gh=!1;this.Qb="";this.mb=0;this.hk=this.dl=!1;this.Dj=0;this.Kk=!1;this.ak=this.Xj=this.Ok=this.bk="";this.Jg=this.fk=this.Pk=this.ek=this.ck=!1;this.Kc=1;this.Mg=this.ik=this.Wk=this.Sb=this.Aj=this.Tj=this.qk=this.Jj=this.Jk=this.dk=this.Ej=this.Pg=this.Zj=this.Yj=this.uc=this.mh=this.Tb=this.Bj=this.Hj=this.Ij=this.Ca=this.Ig=this.kh=this.ph=this.Ug=this.Hg=this.Xg=this.nh=this.oh=this.sg=this.Tg=this.Qg=this.lh=this.Ge=this.Sg=this.Wg=this.el=this.Fj=this.$k=this.Da=this.Zk=
  this.Fk=this.Ae=this.hh=this.ve=this.tg=this.bl=!1;this.cl=this.ih="";this.Eg=this.Bg=this.Ag=this.Cg=this.zg=this.qc=this.Lj=this.Mj=this.Nj=this.Kj=!1;this.bd=this.ad=null;this.bh=this.eh=this.Qj=0;this.dd=!1;this.al=this.pk=this.Ja="";this.W=new r(this,!0);n.call(this,"Device");this.Rn()}});function ka(a){this.j=a;this.f=null}ka.prototype.constructor=ka;ka.prototype.boot=function(){this.f=this.c.bind(this);document.addEventListener(q.visibilityChange,this.f,!1);this.c()};
  ka.prototype.c=function(){var a=document[q.visibilityState];"string"===typeof a&&"visible"===a?this.j.resume(!0):this.j.pause(!0)};ka.prototype.destroy=function(){document.removeEventListener(q.visibilityChange,this.f,!1);this.j=this.f=null};function ma(a){this.j=a;this.m=!1;this.f=null;this.M=!1;this.c=null}g=ma.prototype;g.constructor=ma;
  g.boot=function(){for(var a=["ms","moz","webkit","o"],b=0;b<a.length&&!window.requestAnimationFrame;b++)window.requestAnimationFrame=window[a[b]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[a[b]+"CancelAnimationFrame"];this.c=window};
  g.start=function(a){this.c="undefined"!==typeof a&&(a===window||a instanceof VRDisplay)?a:window;this.M=!0;"undefined"===typeof this.c.requestAnimationFrame||"timeout"===this.j.config.update?(this.m=!0,this.f=function(){!0===this.M&&(this.j.update(0),this.i=window.setTimeout(this.f.bind(this),1E3/30))},this.i=window.setTimeout(this.f.bind(this),0)):(this.m=!1,this.f=function(a){!0===this.M&&(this.j.update(Math.floor(a)),this.i=this.c.requestAnimationFrame(this.f.bind(this)))},this.i=this.c.requestAnimationFrame(this.f.bind(this)))};
  g.stop=function(){this.m?clearTimeout(this.i):(this.c.cancelAnimationFrame(this.i),this.i=null);this.M=!1};g.destroy=function(){this.stop();this.c=this.f=this.j=null};Object.defineProperty(ma.prototype,"running",{get:function(){return this.M}});function oa(a){this.j=a;this.c=!1;n.call(this,"History")}oa.prototype=Object.create(n.prototype);oa.prototype.constructor=oa;var Le={enabled:!0};g=oa.prototype;
  g.ni=function(){var a=this.j.story.scene,b={viewer:{uid:this.j.uid},scene:{uid:a.uid},locale:this.j.i18n.locale},d=window.history.state;null===d?window.history.replaceState(b,a.name,this.Qe(a)):d.scene.uid!==b.scene.uid&&window.history.pushState(b,a.name,this.Qe(a))};
  g.mi=function(){var a=window.history.state,b;null===a?b=!1:(b="undefined"!==typeof a.scene&&"string"===typeof a.scene.uid,b=!0===("undefined"!==typeof a.viewer&&"string"===typeof a.viewer.uid)&&!0===b);b&&(b=p.get(a.scene.uid),a.locale=this.j.i18n.locale,window.history.replaceState(a,b.name,this.Qe(b)))};g.xk=function(a){if(null!==a.state){var b=p.get(a.state.viewer.uid);b.history.log("_onPopStateHandler");b.story.scene=a.state.scene.uid}};
  g.Qe=function(a,b){var d="";if(!1!==b){b=window.location.hash;for(var e=this.j.story.scenes.map(function(a){return a.slug}),h=/[&#]([^&]+)/g,k;null!==(k=h.exec(b));)"uid"===k[1].substr(0,3)||e.includes(k[1])||(d+="&"+k[1])}return"#"+a.slug+"&uid="+a.uid+d};
  g.ia=function(a){this.f=D.ta(Le,a);this.c="boolean"===typeof this.f.enabled?this.f.enabled:!0;!0===this.c&&(this.j.story.onSceneLoadStart.add(this.ni,this),this.j.i18n.onLocaleChangeComplete.add(this.mi,this),window.addEventListener("popstate",this.xk,!1))};g.destroy=function(){this.j.story.onSceneLoadStart.remove(this.ni,this);this.j.i18n.onLocaleChangeComplete.remove(this.mi,this);window.removeEventListener("popstate",this.xk,!1);this.j=null;n.prototype.destroy.call(this)};
  Object.defineProperty(oa.prototype,"enabled",{get:function(){return this.c}});function na(a){this.j=a;this.c=this.f=null;this.i=-1;this.u="";this.A=!0;this.m=this.o=null;n.call(this,"LocaleManager");this.c=new Je}na.prototype=Object.create(n.prototype);g=na.prototype;g.constructor=na;
  g.ia=function(a){this.f=a;this.A="boolean"===typeof a.enabled?a.enabled:!0;"undefined"!==typeof a.auto&&!0===a.auto&&""!==q.language?this.u=q.language:"string"===typeof a["default"]&&(this.u=a["default"]);if(!1===this.A)this.warn("$_LocaleManager: locale management is deactivated");else if("undefined"!==typeof a.locales){for(var b=!1,d=0,e=a.locales.length;d<e;d++){var h;var k=a.locales[d],l=Me(this,k.uid);-1===l?(h=new Ne(this.j),h.c.add(this.Bo,this),l=this.c.add(h)-1):h=this.c.get(l);h.ia(k);l===
  this.i||this.u.toLowerCase()===k.uid.toLowerCase()?(h.Dh(),-1===this.i&&Oe(this,l),h=!0):h=!1;!0===h&&(b=!0)}!1===b&&(-1===Me(this,this.u)&&(this.u=a.locales[0].uid),Oe(this,Me(this,a.locales[0].uid)))}};function Me(a,b){for(var d,e=0,h=a.c.size;e<h;e++)if(d=a.c.get(e),d.uid.toLowerCase()===b.toLowerCase())return e;return-1}
  function Oe(a,b){if(0>b||b>=a.c.size)throw"The locale you are trying to set doesn't exist";a.i===b?a.warn("$_LocaleManager: You're trying to set a locale that is already the actual locale"):(a.i=b,null!==a.o&&a.o.D(),a.c.get(a.i).Dh())}g.Bo=function(){null!==this.m&&this.m.D()};
  g.xc=function(a,b){if(-1===this.i)return this.warn("$_LocaleManager: You trying to get a value with no locale selected!"),a;var d=this.c.get(this.i).xc(a,b),e=Me(this,this.u);this.i!==e&&-1!==e&&d===a&&(d=this.c.get(e).xc(a,b));return d};g.Mb=function(a,b){if(-1===this.i)return!1;var d=this.c.get(this.i).Mb(a,b),e=Me(this,this.u);this.i!==e&&-1!==e&&!1===d&&(d=this.c.get(e).Mb(a,b));return d};
  g.destroy=function(){this.j=null;if(null!==this.c){for(var a=0,b=this.c.size;a<b;a++)this.c.get(a).destroy();this.c=null}null!==this.o&&(this.o.destroy(),this.o=null);null!==this.m&&(this.m.destroy(),this.m=null);n.prototype.destroy.call(this)};Object.defineProperty(na.prototype,"locale",{get:function(){return-1!==this.i?this.c.get(this.i).uid:""},set:function(a){var b;"number"===typeof a&&a<this.c.size?b=a:"string"===typeof a&&(b=Me(this,a));Oe(this,b)}});
  Object.defineProperty(na.prototype,"localeIndex",{get:function(){return this.i},set:function(a){"number"===typeof a&&a<this.c.size&&Oe(this,a)}});Object.defineProperty(na.prototype,"localeObject",{get:function(){return-1!==this.i?this.c.get(this.i):null}});Object.defineProperty(na.prototype,"locales",{get:function(){for(var a=[],b=0,d=this.c.size;b<d;b++)a.push(this.c.get(b).uid);return a}});
  Object.defineProperty(na.prototype,"onLocaleChangeRequest",{get:function(){null===this.o&&(this.o=new r(this));return this.o}});Object.defineProperty(na.prototype,"onLocaleChangeComplete",{get:function(){null===this.m&&(this.m=new r(this));return this.m}});function Na(a,b,d,e){this.j=a;this.f=b;this.m=d;this.i=e;this.c=null;n.call(this,"LocaleString")}Na.prototype=Object.create(n.prototype);Na.prototype.constructor=Na;Na.prototype.destroy=function(){this.j=null;n.prototype.destroy.call(this)};
  Object.defineProperty(Na.prototype,"key",{get:function(){return this.f},set:function(a){this.f=a}});Object.defineProperty(Na.prototype,"jsonKey",{get:function(){return this.m},set:function(a){this.m=a}});Object.defineProperty(Na.prototype,"value",{get:function(){if(""===this.j.i18n.locale)return"undefined"!==typeof this.i?this.i:this.f;this.c=this.j.i18n.xc(this.f,this.m);this.c===this.f&&"undefined"!==typeof this.i&&(this.c=this.i);return this.c}});
  Object.defineProperty(Na.prototype,"loaded",{get:function(){var a=this.j.i18n.xc(this.f,this.m);return"undefined"!==typeof a&&a!==this.f}});function Ne(a){this.j=a;this.m="";this.c=this.i=this.f=null;n.call(this,"Locale");this.f=new Je;this.i=new r(this);this.c=new r(this)}Ne.prototype=Object.create(n.prototype);g=Ne.prototype;g.constructor=Ne;
  g.ia=function(a){"string"===typeof a.uid&&(this.M=a.uid);""===this.m&&"string"===typeof a.name&&(this.m=a.name);if("undefined"!==typeof a.files)for(var b,d=0,e=a.files.length;d<e;d++)b=a.files[d],null===Pe(this,b.key)&&(b.Wb=!1,b.loaded=!1,this.f.add(b))};g.Dh=function(){if(!0===Qe(this))return this.c.D(),!0;for(var a,b=0,d=this.f.size;b<d;b++)a=this.f.get(b),!1===a.Wb&&!1===a.loaded&&!1===a.Wb&&!1===a.loaded&&(a.Wb=!0,this.j.load.json(a.key,a.url,this.zo,this))};
  function Pe(a,b){for(var d,e=0,h=a.f.size;e<h;e++)if(d=a.f.get(e),d.key===b)return d;return null}g.zo=function(a){a=Pe(this,a.key);a.Wb=!1;a.loaded=!0;this.i.D();!0===Qe(this)&&this.c.D()};function Qe(a){for(var b,d=0,e=a.f.size;d<e;d++)if(b=a.f.get(d),!1===b.loaded)return!1;return!0}
  g.xc=function(a,b){for(var d,e=0,h=this.f.size;e<h;e++)if(d=this.f.get(e),!0===this.j.cache.has(B.JSON,d.key)&&("undefined"===typeof b||b===d.key)&&(d=this.j.cache.get(B.JSON,d.key),"undefined"!==typeof d.data[a]))return d.data[a];"undefined"!==typeof b&&(this.warn("$_Locale: value not found into the specified JSON file, try to find it in all files."),this.xc(a));return a};
  g.Mb=function(a,b){for(var d,e=0,h=this.f.size;e<h;e++)if(d=this.f.get(e),!0===this.j.cache.has(B.JSON,d.key)&&("undefined"===typeof b||b===d.key)&&(d=this.j.cache.get(B.JSON,d.key),"undefined"!==typeof d.data[a]))return!0;"undefined"!==typeof b&&(this.warn("$_Locale: key not found into the specified JSON file, try to find it in all files."),this.Mb(a));return!1};
  g.zi=function(a,b){for(var d,e=0,h=this.f.size;e<h;e++)if(d=this.f.get(e),!0===this.j.cache.has(B.JSON,d.key)&&("undefined"===typeof b||b===d.key)){d=this.j.cache.get(B.JSON,d.key);for(var k in d.data)if(d.data[k]===a)return k}"undefined"!==typeof b&&(this.warn("$_Locale: value not found into the specified JSON file, try to find it in all files."),this.zi(a))};g.destroy=function(){this.f=this.j=null;this.i.destroy();this.i=null;this.c.destroy();this.c=null;n.prototype.destroy.call(this)};
  Object.defineProperty(Ne.prototype,"name",{get:function(){return this.m}});function Re(a,b,d,e){this.j=a;this.i=d||this;this.J=e||"";n.call(this,b)}Re.prototype=Object.create(n.prototype);Re.prototype.constructor=Re;Re.prototype.destroy=function(){this.i=null;n.prototype.destroy.call(this)};Object.defineProperty(Re.prototype,"name",{get:function(){return this.J}});Object.defineProperty(Re.prototype,"type",{get:function(){return this.Wa}});
  function $d(a,b,d,e,h,k,l,t){this.f=b;this.B=d||null;this.G=e||null;this.C=h||null;this.c=k;this.Ic=this.m=this.H=!1;this.F=this.I=this.Rb=0;this.A=this.u=this.o=null;Re.call(this,a,"KeyBinding",l,t);if("undefined"===typeof this.f||null===this.f)this.f=[];"undefined"===typeof this.c&&(this.c=null);if(!0===D.P(this.B,"string")||D.za(this.B,"string"))this.o=new Ia(this.j),this.o.f(this.B);if(!0===D.P(this.C,"string")||D.za(this.C,"string"))this.u=new Ia(this.j),this.u.f(this.C);if(!0===D.P(this.G,"string")||
  D.za(this.G,"string"))this.A=new Ia(this.j),this.A.f(this.G)}$d.prototype=Object.create(Re.prototype);g=$d.prototype;g.constructor=$d;g.Xe=function(a){return"number"===typeof this.f&&this.f===a?!0:"function"===typeof this.f.indexOf?-1!==this.f.indexOf(a):!1};g.zh=function(a){if(null!==this.c){if("number"===typeof this.c&&this.c===a)return!0;if("function"===typeof this.c.indexOf)return-1!==this.c.indexOf(a)}return!1};
  g.vi=function(a){this.Rb++;this.m=!0;"function"===typeof this.B?this.B.call(this.i,this,a):null!==this.o&&this.o.D()};g.Gm=function(){this.H=!0;var a=this.Rb;return function(){a===this.Rb&&(this.Ic=!0)}.bind(this)};g.xi=function(a){this.F++;this.Ic=this.m=!1;"function"===typeof this.G?this.G.call(this.i,this,a):null!==this.A&&this.A.D()};g.wi=function(){this.I++;"function"===typeof this.C?this.C.call(this.i,this):null!==this.u&&this.u.D()};
  g.destroy=function(){this.c=this.C=this.G=this.B=this.f=null;null!==this.o&&(this.o.destroy(),this.o=null);null!==this.u&&(this.u.destroy(),this.u=null);null!==this.A&&(this.A.destroy(),this.A=null);Re.prototype.destroy.call(this)};Object.defineProperty($d.prototype,"pressed",{get:function(){return this.m}});Object.defineProperty($d.prototype,"downCount",{get:function(){return this.Rb}});Object.defineProperty($d.prototype,"upCount",{get:function(){return this.F}});
  Object.defineProperty($d.prototype,"holdCount",{get:function(){return this.I}});Object.defineProperty($d.prototype,"hasToWaitToHold",{get:function(){return this.H}});Object.defineProperty($d.prototype,"downComplete",{get:function(){return this.Ic}});
  function ce(a,b,d,e,h,k,l,t){this.u=b;this.B=d||null;this.G=e||null;this.C=h||null;this.A=k;this.Ic=this.m=this.H=!1;this.F=this.I=this.Rb=0;this.o=this.c=this.f=null;Re.call(this,a,"ButtonBinding",l,t);if("undefined"===typeof this.u||null===this.u)this.u=[];"undefined"===typeof this.A&&(this.A=null);if(!0===D.P(this.B,"string")||D.za(this.B,"string"))this.f=new Ia(this.j),this.f.f(this.B);if(!0===D.P(this.C,"string")||D.za(this.C,"string"))this.c=new Ia(this.j),this.c.f(this.C);if(!0===D.P(this.G,
  "string")||D.za(this.G,"string"))this.o=new Ia(this.j),this.o.f(this.G)}ce.prototype=Object.create(Re.prototype);g=ce.prototype;g.constructor=ce;g.Kl=function(a){return this.u===a||"function"===typeof this.u.indexOf&&-1!==this.u.indexOf(a)};g.Wp=function(a){return null!==this.A&&(this.A===a||"function"===typeof this.A.indexOf&&-1!==this.A.indexOf(a))};g.Mh=function(a){this.m=!0;this.Rb++;"function"===typeof this.B?this.B.call(this.i,this,a):null!==this.f&&this.f.D()};
  g.Nh=function(){this.I++;"function"===typeof this.C?this.C.call(this.i,this):null!==this.c&&this.c.D()};g.Oh=function(a){this.Ic=this.m=!1;this.F++;"function"===typeof this.G?this.G.call(this.i,this,a):null!==this.o&&this.o.D()};g.om=function(){this.H=!0;var a=this.Rb;return function(){a===this.Rb&&(this.Ic=!0)}.bind(this)};
  g.destroy=function(){this.A=this.C=this.G=this.B=this.u=null;null!==this.f&&(this.f.destroy(),this.f=null);null!==this.c&&(this.c.destroy(),this.c=null);null!==this.o&&(this.o.destroy(),this.o=null);Re.prototype.destroy.call(this)};Object.defineProperty(ce.prototype,"pressed",{get:function(){return this.m}});Object.defineProperty(ce.prototype,"downCount",{get:function(){return this.Rb}});Object.defineProperty(ce.prototype,"upCount",{get:function(){return this.F}});
  Object.defineProperty(ce.prototype,"holdCount",{get:function(){return this.I}});Object.defineProperty(ce.prototype,"hasToWaitToHold",{get:function(){return this.H}});Object.defineProperty(ce.prototype,"downComplete",{get:function(){return this.Ic}});function de(a,b,d,e,h){this.u=b;this.c=d||null;this.f=null;Re.call(this,a,"AxisBinding",e,h);if(!0===D.P(this.c,"string")||D.za(this.c,"string"))this.f=new Ia(this.j),this.f.f(this.c)}de.prototype=Object.create(Re.prototype);de.prototype.constructor=de;
  de.prototype.o=function(a){this.m=!0;"function"===typeof this.c?this.c.call(this.i,this,a):null!==this.f&&this.f.D()};de.prototype.destroy=function(){this.c=null;null!==this.f&&(this.f.destroy(),this.f=null);Re.prototype.destroy.call(this)};Object.defineProperty(de.prototype,"axis",{get:function(){return this.u}});
  function va(a){this.j=a;this.i=!0;this.o=this.m=this.c=this.f=null;n.call(this,"Keyboard");this.f=[];this.c=[];this.m=this.wo.bind(this);this.o=this.xo.bind(this);window.addEventListener("keydown",this.m,!1);window.addEventListener("keyup",this.o,!1)}va.prototype=Object.create(n.prototype);g=va.prototype;g.constructor=va;g.wo=function(a){if(!1!==this.i){var b;b=a.keyCode;-1===this.c.indexOf(b)?(this.c.push(b),b=!0):b=!1;!0===b&&Se(this,a)}};
  g.xo=function(a){if(!1!==this.i){var b;b=this.c.indexOf(a.keyCode);-1!==b?(this.c.splice(b,1),b=!0):b=!1;if(!0===b)a:if(b=a.keyCode,!0!==this.Ch(b)){b=this.xh(b);for(var d,e=0,h=b.length;e<h;e++){d=b[e];for(var k=0,l=this.c.length;k<l;k++)if(d.Xe(this.c[k]))break a;d.xi(a);k=0;for(l=this.c.length;k<l;k++)if(d.zh(this.c[k])){var t=new KeyboardEvent("keydown",{Iq:this.c[k],ctrlKey:a.ctrlKey,shiftKey:a.shiftKey,altKey:a.altKey});Se(this,t)}}}}};
  function Te(a,b){if(null===a.f||!a.f.length)return-1;if("object"===typeof b&&"KeyBinding"===b.type)return a.f.indexOf(b);if("number"===typeof b)for(var d=0,e=a.f.length;d<e;d++)if(!0===a.f[d].Xe(b))return d;return-1}function Se(a,b){var d=b.keyCode;if(!0!==a.Ch(d)){a=a.xh(d);for(var e=0,h=a.length;e<h;e++)d=a[e],!1===d.pressed&&d.vi(b)}}g.update=function(){for(var a,b=0,d=this.f.length;b<d;b++)a=this.f[b],!0!==a.pressed||!0===a.hasToWaitToHold&&!1===a.downComplete||a.wi()};
  g.gq=function(a){return-1!==this.c.indexOf(a)};g.Ch=function(a){for(var b,d=0,e=this.f.length;d<e;d++)if(b=this.f[d],!0===b.pressed&&!0===b.zh(a))return!0;return!1};g.Ub=function(a){if("object"!==typeof a&&"KeyBinding"!==a.type)return!1;if(-1===Te(this,a))return this.f.push(a),!0;this.warn("Trying to add a duplicate key binding on keyboard!");return!1};g.yc=function(a){a=Te(this,a);return-1!==a?(this.f[a].destroy(),this.f.splice(a,1),!0):!1};g.Vp=function(a){return-1!==Te(this,a)};
  g.xh=function(a){for(var b=[],d=0,e=this.f.length;d<e;d++)!0===this.f[d].Xe(a)&&b.push(this.f[d]);return b};g.destroy=function(){this.j=null;window.removeEventListener("keydown",this.m,!1);window.removeEventListener("keyup",this.o,!1);for(var a=this.f.length;a--;)this.yc(this.f[a]);this.o=this.m=this.f=null;n.prototype.destroy.call(this)};Object.defineProperty(va.prototype,"enabled",{get:function(){return this.i},set:function(a){this.i=!!a}});
  function Ue(a){this.c=this.L=a;this.N=!1;this.f=null;this.i="";this.C=this.J=null;this.H=this.I=this.G=!1;this.m=null;this.O=200;this.F=this.K=1;this.S=Ve.LINEAR;this.B=this.u=this.A=this.o=null;n.call(this,"Drag");this.F=this.L.alpha}Ue.prototype=Object.create(n.prototype);g=Ue.prototype;g.constructor=Ue;
  function We(a,b){null!==a.c&&(null!==a.c&&(a.c.pointer.onPanStart.remove(a.ki,a),a.c.pointer.onPanMove.remove(a.ji,a),a.c.pointer.onPanEnd.remove(a.ii,a)),a.c=null);a.c=b;a.c.pointer.enabled=!0;a.c.pointer.onPanStart.add(a.ki,a);a.c.pointer.onPanMove.add(a.ji,a);a.c.pointer.onPanEnd.add(a.ii,a)}
  g.ki=function(a){var b=a.data;a=a.data.srcEvent;"undefined"!==typeof a.touches&&"object"===typeof a.touches[0]&&(a=a.touches[0]);if(b=!0!==this.H&&b.target===this.c.dom){if(null===this.f)b=!0;else var b=this.L.globalOffset,d=this.f.globalOffset,e=b.left+this.L.pixelWidth>d.left+this.f.innerWidth,h=b.top<d.top,k=b.top+this.L.pixelHeight>d.top+this.f.innerHeight,b=!0===b.left<d.left||!0===e||!0===h||!0===k?!1:!0;b=!1!==b}b&&(this.G=!0,this.J={x:this.L.x,y:this.L.y},this.L.top=null,this.L.right=null,
  this.L.bottom=null,this.L.left=null,this.C={x:a.pageX,y:a.pageY},this.K=this.L.alpha,this.L.alpha=this.F,null!==this.o&&this.o.D())};g.ii=function(){!0===this.G&&(this.G=!1,null!==this.u&&this.u.D(),!0===this.I&&null!==this.m?(this.H=!0,this.m.Gf({x:this.J.x,y:this.J.y},this.O,this.S).start()):this.L.alpha=this.K,this.C=this.J=null)};
  g.ji=function(a){if(!0===this.G){a=a.data.srcEvent;"undefined"!==typeof a.touches&&"object"===typeof a.touches[0]&&(a=a.touches[0]);var b={x:a.pageX,y:a.pageY};a=b.x-this.C.x;var d=b.y-this.C.y;this.C=b;if(null!==this.f){var b=this.L.globalOffset,e=this.L.parent.globalOffset,h=this.f.globalOffset;if(""===this.i||"x"===this.i)this.L.x=b.left+a<h.left?Math.abs(e.left-h.left):b.left+a+this.L.pixelWidth>h.left+this.f.innerWidth?Math.abs(e.left-h.left)+this.f.innerWidth-this.L.pixelWidth:this.L.x+a;if(""===
  this.i||"y"===this.i)this.L.y=b.top+d<h.top?Math.abs(e.top-h.top):b.top+d+this.L.pixelHeight>h.top+this.f.innerHeight?Math.abs(e.top-h.top)+this.f.innerHeight-this.L.pixelHeight:this.L.y+d}else{if(""===this.i||"x"===this.i)this.L.x+=a;if(""===this.i||"y"===this.i)this.L.y+=d}null!==this.A&&this.A.D()}};g.Qk=function(){this.H=!1;this.L.alpha=this.K;null!==this.B&&this.B.D()};g.enable=function(){this.N=!0;We(this,this.c)};g.li=function(){this.N=!1};
  g.destroy=function(){this.revert=!1;null!==this.o&&(this.o.destroy(),this.o=null);null!==this.A&&(this.A.destroy(),this.A=null);null!==this.u&&(this.u.destroy(),this.u=null);null!==this.B&&(this.B.destroy(),this.B=null);this.C=this.f=this.L=this.c=null;n.prototype.destroy.call(this)};Object.defineProperty(Ue.prototype,"enabled",{get:function(){return this.N},set:function(a){!0===!!a?this.enable():this.li()}});Object.defineProperty(Ue.prototype,"dragging",{get:function(){return this.G}});
  Object.defineProperty(Ue.prototype,"handle",{get:function(){return this.c},set:function(a){We(this,a)}});Object.defineProperty(Ue.prototype,"constrain",{get:function(){return this.f},set:function(a){this.f=a}});Object.defineProperty(Ue.prototype,"progress",{get:function(){if(null!==this.f){var a=this.L.globalOffset,b=this.f.globalOffset;return{x:(a.left-b.left)/(this.f.innerWidth-this.L.pixelWidth),y:(a.top-b.top)/(this.f.innerHeight-this.L.pixelHeight)}}}});
  Object.defineProperty(Ue.prototype,"axis",{get:function(){return this.i},set:function(a){"x"===a||"y"===a?this.i=a:this.i=""}});Object.defineProperty(Ue.prototype,"alpha",{get:function(){return this.F},set:function(a){"number"===typeof a&&(this.F=a)}});Object.defineProperty(Ue.prototype,"reverting",{get:function(){return this.H}});
  Object.defineProperty(Ue.prototype,"revert",{get:function(){return this.I},set:function(a){this.I=!!a;!0===this.I&&null===this.m?(this.m=new hc(this.L.viewer,this.L),this.m.onComplete.add(this.Qk,this),this.L.viewer.tween.add(this.m)):!1===this.I&&null!==this.m&&(this.L.viewer.tween.remove(this.m),this.m.onComplete.remove(this.Qk,this),this.m.destroy(),this.m=null)}});Object.defineProperty(Ue.prototype,"revertDuration",{get:function(){return this.O},set:function(a){"number"===typeof a&&(this.O=a)}});
  Object.defineProperty(Ue.prototype,"revertEasing",{get:function(){return this.S},set:function(a){"function"===typeof a&&(this.S=a)}});Object.defineProperty(Ue.prototype,"onStart",{get:function(){null===this.o&&(this.o=new r(this.L));return this.o}});Object.defineProperty(Ue.prototype,"onDrag",{get:function(){null===this.A&&(this.A=new r(this.L));return this.A}});Object.defineProperty(Ue.prototype,"onStop",{get:function(){null===this.u&&(this.u=new r(this.L));return this.u}});
  Object.defineProperty(Ue.prototype,"onRevert",{get:function(){null===this.B&&(this.B=new r(this.L));return this.B}});function V(a){this.L=a;this.f=!1;this.ha=Xe.DEFAULT;this.kb=null;this.Pd=[];this.R=this.c=this.i=this.m=this.A=this.u=this.X=this.K=this.O=this.S=this.I=this.F=this.H=this.B=this.C=this.G=this.J=this.N=this.o=this.aa=this.ga=this.V=this.ca=this.pa=this.ea=this.Z=this.oa=this.na=this.U=null;n.call(this,"Pointer");this.kb=new Hammer.Manager(this.L.dom);this.kb.set({enable:!1})}
  V.prototype=Object.create(n.prototype);g=V.prototype;g.constructor=V;function Ye(a,b,d,e){for(var h,k=0,l=a.Pd.length;k<l;k++)if(h=a.Pd[k],h.event===b&&h.Jp===d&&h.type===e)return k;return-1}function Ze(a,b,d,e){if(-1===Ye(a,b,d,e))if(a.Pd.push({event:b,Jp:d,type:e}),e===W.ab)a.L.dom.addEventListener(b,Hammer.bindFn(d,a));else if(e===W.ra)a.kb.on(b,Hammer.bindFn(d,a))}
  function $e(a,b,d){return function(){var e=Ye(this,a,b,d);-1!==e&&(this.Pd.splice(e,1),d===W.ab?this.L.dom.removeEventListener(a,b):d===W.ra&&this.kb.off(a))}}g.Yk=function(a){null!==this.aa&&!0===this.f&&this.aa.D(a)};g.Ii=function(a){null!==this.o&&!0===this.f&&this.o.D(a)};g.Qi=function(a){null!==this.N&&!0===this.f&&this.N.D(a)};g.Pi=function(a){null!==this.J&&!0===this.f&&this.J.D(a)};g.Li=function(a){null!==this.G&&!0===this.f&&this.G.D(a)};g.Ki=function(a){null!==this.C&&!0===this.f&&this.C.D(a)};
  g.Ji=function(a){null!==this.B&&!0===this.f&&this.B.D(a)};g.Oi=function(a){null!==this.H&&!0===this.f&&this.H.D(a)};g.Ni=function(a){null!==this.F&&!0===this.f&&this.F.D(a)};g.Mi=function(a){null!==this.I&&!0===this.f&&this.I.D(a)};g.Tk=function(a){null!==this.S&&!0===this.f&&this.S.D(a)};g.Sk=function(a){null!==this.O&&!0===this.f&&this.O.D(a)};g.Rk=function(a){null!==this.K&&!0===this.f&&this.K.D(a)};g.Xk=function(a){null!==this.X&&!0===this.f&&this.X.D(a)};
  g.Vj=function(a){null!==this.u&&!0===this.f&&this.u.D(a)};g.kk=function(a){null!==this.A&&!0===this.f&&this.A.D(a)};g.Hk=function(a){null!==this.m&&!0===this.f&&this.m.D(a)};g.Gk=function(a){null!==this.i&&!0===this.f&&this.i.D(a)};g.rk=function(a){null!==this.c&&!0===this.f&&this.c.D(a)};g.Ri=function(a){null!==this.R&&!0===this.f&&this.R.D(a)};
  g.enable=function(){!0===q.cssPointerEvents&&(this.L.dom.style.pointerEvents="auto");this.kb.set({enable:!0});null===this.U&&(this.U=new Hammer.Tap,this.kb.add(this.U));null===this.na&&(this.na=(new Hammer.Tap({event:V.events.$d,taps:2})).recognizeWith(this.U),this.kb.add(this.na));null===this.oa&&(this.oa=(new Hammer.Press).recognizeWith(this.U),this.kb.add(this.oa));null===this.Z&&(this.Z=new Hammer.Pan,this.kb.add(this.Z));null===this.ea&&(this.ea=new Hammer.Pinch,this.kb.add(this.ea));null===
  this.pa&&(this.pa=(new Hammer.Rotate).recognizeWith(this.ea),this.kb.add(this.pa));null===this.ca&&(this.ca=(new Hammer.Swipe).recognizeWith(this.Z),this.kb.add(this.ca));this.f=!0;null!==this.V&&this.V.D()};g.Cf=function(){!0===q.cssPointerEvents&&(this.L.dom.style.pointerEvents="none");this.f=!1;this.kb.set({enable:!1});null!==this.ga&&this.ga.D()};
  g.destroy=function(){this.Cf();this.ca=this.pa=this.ea=this.Z=this.oa=this.na=this.U=null;null!==this.V&&(this.V.destroy(),this.V=null);null!==this.ga&&(this.ga.destroy(),this.ga=null);null!==this.aa&&(this.aa.destroy(),this.aa=null);null!==this.o&&(this.o.destroy(),this.o=null);null!==this.N&&(this.N.destroy(),this.N=null);null!==this.J&&(this.J.destroy(),this.J=null);null!==this.G&&(this.G.destroy(),this.G=null);null!==this.C&&(this.C.destroy(),this.C=null);null!==this.B&&(this.B.destroy(),this.B=
  null);null!==this.H&&(this.H.destroy(),this.H=null);null!==this.F&&(this.F.destroy(),this.F=null);null!==this.I&&(this.I.destroy(),this.I=null);null!==this.S&&(this.S.destroy(),this.S=null);null!==this.O&&(this.O.destroy(),this.O=null);null!==this.K&&(this.K.destroy(),this.K=null);null!==this.X&&(this.X.destroy(),this.X=null);null!==this.u&&(this.u.destroy(),this.u=null);null!==this.A&&(this.A.destroy(),this.A=null);null!==this.m&&(this.m.destroy(),this.m=null);null!==this.i&&(this.i.destroy(),this.i=
  null);null!==this.c&&(this.c.destroy(),this.c=null);null!==this.R&&(this.R.destroy(),this.R=null);this.L=null;n.prototype.destroy.call(this)};
  function wc(a){if("function"===typeof a.target.getBoundingClientRect){var b=a.target.getBoundingClientRect();if("undefined"!==typeof a.center)var d=a.center.x,e=a.center.y;var h=a.clientX,k=a.clientY,l=a.pageX,t=a.pageY;"undefined"!==typeof a.srcEvent&&(h=a.srcEvent.clientX,k=a.srcEvent.clientY,l=a.srcEvent.pageX,t=a.srcEvent.pageY);return new THREE.Vector2((d||h||l)-b.left,(e||k||t)-b.top)}return null}
  Object.defineProperty(V.prototype,"enabled",{get:function(){return this.f},set:function(a){!0===!!a?this.enable():this.Cf()}});Object.defineProperty(V.prototype,"cursor",{get:function(){return this.ha},set:function(a){this.L.dom.style.cursor=a;if(a!==this.L.dom.style.cursor||""===this.L.dom.style.cursor)this.L.dom.style.cursor="-webkit-"+a;this.ha=a}});Object.defineProperty(V.prototype,"onEnable",{get:function(){null===this.V&&(this.V=new r(this));return this.V}});
  Object.defineProperty(V.prototype,"onDisable",{get:function(){null===this.ga&&(this.ga=new r(this));return this.ga}});Object.defineProperty(V.prototype,"onTap",{get:function(){null===this.aa&&(this.aa=new r(this.L),this.aa.onDestroy.ba($e(V.events.pg,this.Yk,W.ra),this),Ze(this,V.events.pg,this.Yk,W.ra));return this.aa}});Object.defineProperty(V.prototype,"onClick",{get:function(){return this.onTap}});
  Object.defineProperty(V.prototype,"onDoubleTap",{get:function(){null===this.o&&(this.o=new r(this.L),this.o.onDestroy.ba($e(V.events.$d,this.Ii,W.ra),this),Ze(this,V.events.$d,this.Ii,W.ra));return this.o}});Object.defineProperty(V.prototype,"onDoubleClick",{get:function(){return this.onDoubleTap}});Object.defineProperty(V.prototype,"onPressStart",{get:function(){null===this.N&&(this.N=new r(this.L),this.N.onDestroy.ba($e(V.events.gg,this.Qi,W.ra),this),Ze(this,V.events.gg,this.Qi,W.ra));return this.N}});
  Object.defineProperty(V.prototype,"onDown",{get:function(){return this.onPressStart}});Object.defineProperty(V.prototype,"onPressEnd",{get:function(){null===this.J&&(this.J=new r(this.L),this.J.onDestroy.ba($e(V.events.fg,this.Pi,W.ra),this),Ze(this,V.events.fg,this.Pi,W.ra));return this.J}});Object.defineProperty(V.prototype,"onUp",{get:function(){return this.onPressEnd}});
  Object.defineProperty(V.prototype,"onPanStart",{get:function(){null===this.G&&(this.G=new r(this.L),this.G.onDestroy.ba($e(V.events.$f,this.Li,W.ra),this),Ze(this,V.events.$f,this.Li,W.ra));return this.G}});Object.defineProperty(V.prototype,"onPanMove",{get:function(){null===this.C&&(this.C=new r(this.L),this.C.onDestroy.ba($e(V.events.Zf,this.Ki,W.ra),this),Ze(this,V.events.Zf,this.Ki,W.ra));return this.C}});
  Object.defineProperty(V.prototype,"onPanEnd",{get:function(){null===this.B&&(this.B=new r(this.L),this.B.onDestroy.ba($e(V.events.Yf,this.Ji,W.ra),this),Ze(this,V.events.Yf,this.Ji,W.ra));return this.B}});Object.defineProperty(V.prototype,"onPinchStart",{get:function(){null===this.H&&(this.H=new r(this.L),this.H.onDestroy.ba($e(V.events.dg,this.Oi,W.ra),this),Ze(this,V.events.dg,this.Oi,W.ra));return this.H}});
  Object.defineProperty(V.prototype,"onPinchMove",{get:function(){null===this.F&&(this.F=new r(this.L),this.F.onDestroy.ba($e(V.events.cg,this.Ni,W.ra),this),Ze(this,V.events.cg,this.Ni,W.ra));return this.F}});Object.defineProperty(V.prototype,"onPinchEnd",{get:function(){null===this.I&&(this.I=new r(this.L),this.I.onDestroy.ba($e(V.events.bg,this.Mi,W.ra),this),Ze(this,V.events.bg,this.Mi,W.ra));return this.I}});
  Object.defineProperty(V.prototype,"onRotateStart",{get:function(){null===this.S&&(this.S=new r(this.L),this.S.onDestroy.ba($e(V.events.kg,this.Tk,W.ra),this),Ze(this,V.events.kg,this.Tk,W.ra));return this.S}});Object.defineProperty(V.prototype,"onRotateMove",{get:function(){null===this.O&&(this.O=new r(this.L),this.O.onDestroy.ba($e(V.events.jg,this.Sk,W.ra),this),Ze(this,V.events.jg,this.Sk,W.ra));return this.O}});
  Object.defineProperty(V.prototype,"onRotateEnd",{get:function(){null===this.K&&(this.K=new r(this.L),this.K.onDestroy.ba($e(V.events.ig,this.Rk,W.ra),this),Ze(this,V.events.ig,this.Rk,W.ra));return this.K}});Object.defineProperty(V.prototype,"onSwipe",{get:function(){null===this.X&&(this.X=new r(this.L),this.X.onDestroy.ba($e(V.events.og,this.Xk,W.ra),this),Ze(this,V.events.og,this.Xk,W.ra));return this.X}});
  Object.defineProperty(V.prototype,"onEnter",{get:function(){null===this.u&&(this.u=new r(this.L),this.u.onDestroy.ba($e(V.events.Mf,this.Vj,W.ab),this),Ze(this,V.events.Mf,this.Vj,W.ab));return this.u}});Object.defineProperty(V.prototype,"onLeave",{get:function(){null===this.A&&(this.A=new r(this.L),this.A.onDestroy.ba($e(V.events.Sf,this.kk,W.ab),this),Ze(this,V.events.Sf,this.kk,W.ab));return this.A}});
  Object.defineProperty(V.prototype,"onOver",{get:function(){null===this.m&&(this.m=new r(this.L),this.m.onDestroy.ba($e(V.events.Wc,this.Hk,W.ab),this),Ze(this,V.events.Wc,this.Hk,W.ab));return this.m}});Object.defineProperty(V.prototype,"onOut",{get:function(){null===this.i&&(this.i=new r(this.L),this.i.onDestroy.ba($e(V.events.nc,this.Gk,W.ab),this),Ze(this,V.events.nc,this.Gk,W.ab));return this.i}});
  Object.defineProperty(V.prototype,"onMove",{get:function(){null===this.c&&(this.c=new r(this.L),this.c.onDestroy.ba($e(V.events.Uf,this.rk,W.ab),this),Ze(this,V.events.Uf,this.rk,W.ab));return this.c}});Object.defineProperty(V.prototype,"onWheel",{get:function(){null===this.R&&(this.R=new r(this.L),this.R.onDestroy.ba($e(V.events.rg,this.Ri,W.ab),this),Ze(this,V.events.rg,this.Ri,W.ab));return this.R}});var W={ab:0,ra:1};V.events={};V.events.pg="tap";V.events.$d="doubletap";V.events.gg="press";
  V.events.fg="pressup";V.events.$f="panstart";V.events.Zf="panmove";V.events.Yf="panend";V.events.dg="pinchstart";V.events.cg="pinchmove";V.events.bg="pinchend";V.events.kg="rotatestart";V.events.jg="rotatemove";V.events.ig="rotateend";V.events.og="swipe";V.events.Mf="mouseenter";V.events.Sf="mouseleave";V.events.Wc="mouseover";V.events.nc="mouseout";V.events.Uf="mousemove";V.events.rg="wheel";var Xe={DEFAULT:"default",jb:"pointer",En:"grab",Fn:"grabbing"};
  function wa(a){this.j=a;this.i=!0;this.c=this.f=null;n.call(this,"Gyroscope");!1!==q.deviceOrientation&&(window.addEventListener("deviceorientation",this.we.bind(this),!1),window.addEventListener("orientationchange",this.m.bind(this),!1))}wa.prototype=Object.create(n.prototype);wa.prototype.constructor=wa;wa.prototype.we=function(a){null!==this.f&&!0===this.i&&this.f.D(a)};wa.prototype.m=function(){null!==this.c&&!0===this.i&&this.c.D()};
  wa.prototype.destroy=function(){this.j=null;window.removeEventListener("deviceorientation",this.we.bind(this),!1);window.removeEventListener("orientationchange",this.m.bind(this),!1);n.prototype.destroy.call(this)};Object.defineProperty(wa.prototype,"enabled",{get:function(){return this.i},set:function(a){this.i=!!a}});Object.defineProperty(wa.prototype,"onDeviceOrientationChange",{get:function(){null===this.f&&(this.f=new r(this));return this.f}});
  Object.defineProperty(wa.prototype,"onScreenOrientationChange",{get:function(){null===this.c&&(this.c=new r(this));return this.c}});function xa(a){this.j=a;this.i=this.c=this.f=null;n.call(this,"GamepadsManager");!1===q.gamepad?this.warn("Gamepads are not available with your browser"):this.f=[]}xa.prototype=Object.create(n.prototype);xa.prototype.constructor=xa;function af(a,b){var d=a.f[b].name;a.f[b].destroy();a.f[b]=null;null!==a.i&&a.i.D(d)}
  xa.prototype.update=function(){if(null!==this.f)for(var a,b=navigator.getGamepads(),d=0,e=b.length;d<e;d++)if(a=b[d],"undefined"!==typeof a&&null!==a){var h;a:{h=0;for(var k=this.f.length;h<k;h++)if(this.f[h].name===a.id+"-"+a.index){h=!0;break a}h=!1}!1===h?(h=new bf(this.j,a),this.f[a.index]=h,null!==this.c&&this.c.D(h)):!0===q.edge&&(this.f[a.index].gamepad=a);this.f[d].update()}else null===a&&"undefined"!==typeof this.f[d]&&af(this,d)};
  xa.prototype.destroy=function(){this.j=null;for(var a=0,b=this.f.length;a<b;a++)af(this,a);this.f=null;null!==this.c&&(this.c.destroy(),this.c=null);null!==this.i&&(this.i.destroy(),this.i=null);n.prototype.destroy.call(this)};Object.defineProperty(xa.prototype,"onGamepadConnected",{get:function(){null===this.c&&(this.c=new r(this));return this.c}});Object.defineProperty(xa.prototype,"onGamepadDisconnected",{get:function(){null===this.i&&(this.i=new r(this));return this.i}});
  Object.defineProperty(xa.prototype,"all",{get:function(){return this.f||[]}});function bf(a,b){this.j=a;this.Da=b;this.o=0;this.m=!0;this.i=this.c=this.f=null;n.call(this,"Gamepad");this.M=this.Da.id+"-"+this.Da.index;ba(this);this.f=[];this.c=[];this.i=[]}bf.prototype=Object.create(n.prototype);g=bf.prototype;g.constructor=bf;
  function cf(a,b){if(null===a.f||!a.f.length)return-1;if("object"===typeof b){if("ButtonBinding"===b.type)return a.f.indexOf(b);if("AxisBinding"===b.type)return a.c.indexOf(b)}return-1}function df(a,b,d,e){for(var h=[],k=0,l=a.f.length;k<l;k++)!0===a.f[k].Kl(b)&&h.push(a.f[k]);b=0;for(k=h.length;b<k;b++)a=h[b],!0===e&&!1===a.pressed?a.Mh(d):!1===e&&!0===a.pressed&&a.Oh(d)}
  g.update=function(){if(!0===this.m){if(this.Da.timestamp>this.o){this.o=this.Da.timestamp;if("undefined"!==typeof this.Da.buttons)for(var a=this.Da.buttons,b,d,e=0,h=a.length;e<h;e++)b=a[e],d=this.i.indexOf(e),!0===b.pressed&&-1===d?(this.i.push(e),df(this,e,b.value,!0)):!1===b.pressed&&-1!==d&&(this.i.splice(d,1),df(this,e,b.value,!1));if("undefined"!==typeof this.Da.axes)for(a=this.Da.axes,b=0,d=a.length;b<d;b++){for(var e=b,h=[],k=0,l=this.c.length;k<l;k++)this.c[k].axis===e&&h.push(this.c[k]);
  e=h;h=0;for(k=e.length;h<k;h++)e[h].o(a[b])}}b=0;for(d=this.f.length;b<d;b++)a=this.f[b],!0!==a.pressed||!0===a.hasToWaitToHold&&!1===a.downComplete||a.Nh()}};g.Ub=function(a){if("object"!==typeof a&&"ButtonBinding"!==a.type&&"AxisBinding"!==a.type)return!1;if(-1===cf(this,a)){if("ButtonBinding"===a.type)return this.f.push(a),!0;if("AxisBinding"===a.type)return this.c.push(a),!0}else this.warn("Trying to add a duplicate binding on the gamepad !");return!1};
  g.yc=function(a){var b=cf(this,a);if(-1===b){if("ButtonBinding"===a.type)return this.f[b].destroy(),this.f.splice(b,1),!0;if("AxisBinding"===a.type)return this.c[b].destroy(),this.c.splice(b,1),!0}return!1};g.destroy=function(){this.j=null;for(var a;null!==this.f&&0<this.f.length;)a=this.f.pop(),a.destroy();for(this.f=null;null!==this.c&&0<this.c.length;)a=this.c.pop(),a.destroy();this.c=null;n.prototype.destroy.call(this)};
  Object.defineProperty(bf.prototype,"name",{get:function(){return this.Da.id+"-"+this.Da.index}});Object.defineProperty(bf.prototype,"mapping",{get:function(){return this.Da.mapping}});Object.defineProperty(bf.prototype,"hand",{get:function(){return this.Da.hand}});Object.defineProperty(bf.prototype,"position",{get:function(){return this.Da.pose}});Object.defineProperty(bf.prototype,"enabled",{get:function(){return this.m},set:function(a){this.m=!!a}});
  Object.defineProperty(bf.prototype,"gamepad",{get:function(){return this.Da},set:function(a){null!==a&&(this.Da=a)}});function ha(a){this.j=a;this.da=[];this.c=[];this.i=this.f=null;n.call(this,"DisplayList");this.f=this.qo.bind(this);document.addEventListener("fullscreenchange",this.f,!1);document.addEventListener("mozfullscreenchange",this.f,!1);document.addEventListener("webkitfullscreenchange",this.f,!1);document.addEventListener("MSFullscreenChange",this.f,!1)}ha.prototype=Object.create(n.prototype);
  g=ha.prototype;g.constructor=ha;
  g.qo=function(){if(null!==document[q.fullscreenElement])for(var a,b=this.da.length;b--;){if(a=this.da[b],a.dom===document[q.fullscreenElement]){b=a=this.i=a;b.X={x:b.G,y:b.I,width:b.A,unitWidth:b.C,height:b.u,unitHeight:b.B,top:b.mc,right:b.pa,bottom:b.ec,left:b.na};b.G=0;b.I=0;b.A=screen.width;b.C="px";b.c.style.width=b.A+"px";b.u=screen.height;b.B="px";b.c.style.height=b.u+"px";b.mc=null;b.pa=null;b.ec=null;b.na=null;b.c.style.top="0";b.c.style.left="0";b.ya({property:"both"});null!==a.jc&&a.jc.D();
  break}}else a=this.i,a.G=a.X.x,a.c.style.left=a.G+"px",a.I=a.X.y,a.c.style.top=a.I+"px",a.A=a.X.width,a.C=a.X.unitWidth,a.c.style.width=a.pixelWidth+"px",a.u=a.X.height,a.B=a.X.unitHeight,a.c.style.height=a.pixelHeight+"px",a.mc=a.X.top,a.pa=a.X.right,a.ec=a.X.bottom,a.na=a.X.left,a.ya({property:"both"}),a.X=null,null!==a.kc&&a.kc.D(),this.i=null};g.register=function(a,b){this.da.push(a);!0===b&&this.c.push(a)};
  g.unregister=function(a){this.da.splice(this.da.indexOf(a),1);a=this.c.indexOf(a);-1!==a&&this.c.splice(a,1)};g.update=function(){for(var a=0,b=this.c.length;a<b;a++)this.c[a].update()};
  g.destroy=function(){for(var a=this.da.length;a--;)this.da[a].destroy();this.da=[];this.c=[];document.removeEventListener("fullscreenchange",this.f,!1);document.removeEventListener("mozfullscreenchange",this.f,!1);document.removeEventListener("webkitfullscreenchange",this.f,!1);document.removeEventListener("MSFullscreenChange",this.f,!1);this.i=this.f=null};var ef="DisplayObject DisplayObjectContainer Image TextField Button VideoDash VideoHTML5 Canvas Sprite Iframe".split(" ");
  function U(a,b,d){this.j=a;this.c=b||null;this.o=null;this.$e=0;this.Pf="";this.I=this.G=0;this.fc=!1;this.A=0;this.C="px";this.ce=1;this.u=0;this.B="px";this.be=1;this.$c=this.Yc=!1;this.na=this.ec=this.pa=this.mc=null;this.Ze=1;this.af=0;this.Xc=this.Zc=null;this.sd="";this.od="solid";this.O=0;this.td="rgb(0, 0, 0)";this.df=0;this.S=!1;this.ge="";this.vb=null;this.la=!1;this.aa=!0;this.oa=null;this.ga=!1;this.kc=this.jc=this.zd=this.Ed=this.gc=this.hc=this.N=this.ic=this.lc=this.W=this.X=null;n.call(this,
  d||"DisplayObject");this.Ma()}U.prototype=Object.create(n.prototype);g=U.prototype;g.constructor=U;
  g.Ma=function(){!0!==this.la&&(ba(this),"undefined"===typeof this.c||null===this.c?this.c=document.createElement("div"):(this.A=ia.Jl(this.c),this.C=ia.Hl(this.c),this.u=ia.Il(this.c),this.B=ia.Gl(this.c)),this.c.style.width=this.A+""+this.C,this.c.style.height=this.u+""+this.B,this.c.style.display="block",this.c.style.position="relative",this.c.style.margin="0px",this.c.style.padding="0px",this.c.style.top=this.I+"px",this.c.style.left=this.G+"px",this.c.style.overflow="hidden",this.c.style.boxSizing=
  "border-box",!0===q.cssPointerEvents&&(this.c.style.pointerEvents="none"),this.c.style.i="none",this.c.style.webkitUserSelect="none",this.c.style.f="none",this.c.style.c="none",this.c.style.M="none",this.c.style.borderStyle=this.od,this.c.style.borderWidth=this.O+"px",this.c.style.borderColor=this.td,this.c.style.background=this.sd,this.oa=[],"DisplayObject"===this.Wa&&(this.j.display.register(this),ff(this),gf(this)))};function ff(a){!0!==a.la&&(a.la=!0,null!==a.W&&a.W.D())}
  g.Be=function(){null!==this.gc&&this.gc.D()};g.Jc=function(){!1!==this.Gd()&&null!==this.Ed&&!0===this.visible&&this.Ed.D()};g.Ce=function(){null!==this.zd&&!1===this.visible&&this.zd.D()};g.Vg=function(){null!==this.ic&&this.ic.D()};g.ya=function(a){hf(this);null!==this.lc&&this.lc.D(a)};function hf(a){null!==a.o&&a.A&&a.u&&(!0===a.Yc?a.horizontalCenter=!0:(a.left=a.na,a.right=a.pa),!0===a.$c?a.verticalCenter=!0:(a.top=a.mc,a.bottom=a.ec))}
  function jf(a,b){var d=-1!==b.toLowerCase().indexOf("height")||"both"===b,e=0;!0===(-1!==b.toLowerCase().indexOf("width")||"both"===b)&&"%"===a.C&&(a.c.style.width=a.pixelWidth+"px",a.c.width=a.pixelWidth,e+=1);!0===d&&"%"===a.B&&(a.c.style.height=a.pixelHeight+"px",a.c.height=a.pixelHeight,e+=2);switch(e){case 1:a.ya({property:"width"});break;case 2:a.ya({property:"height"});break;case 3:a.ya({property:"both"})}}function kf(a,b,d){a.oa.push({prop:b,value:d})}
  function gf(a){a.aa=!1;if(null!==a.oa&&0!==a.oa.length){a.ga=!0;for(var b=0,d=a.oa.length;b<d;b++)a[a.oa[b].prop]=a.oa[b].value;a.ga=!1;a.oa=[]}}g.hi=function(){this.c.style.display="block";this.Jc()};g.fi=function(){this.c.style.display="none";this.Ce()};g.yq=function(){this.visible=!this.visible};
  g.Xb=function(a){!0===a&&(this.S=!0,!0===this.aa&&kf(this,"maximized",!0));if(null!==this.o){this.fc=!1;a=this.pixelWidth;this.A=this.o.innerWidth;this.C="px";this.c.style.width=this.o.innerWidth+"px";this.c.width=this.o.innerWidth;var b=this.pixelHeight;this.u=this.o.innerHeight;this.B="px";this.c.style.height=this.o.innerHeight+"px";this.c.height=this.o.innerHeight;a===this.pixelWidth&&b===this.pixelHeight||this.ya({property:"both"})}};g.Gd=function(){return ia.has(this.c)};
  g.gi=function(a,b){null!==a&&"undefined"!==typeof a&&(this.width=a);null!==b&&"undefined"!==typeof b&&(this.height=b)};g.ul=function(){if(!0===document[q.fullscreenEnabled]&&!1===this.Fd())this.c[q.requestFullscreen]()};g.vl=function(){if(!0===document[q.fullscreenEnabled]&&!0===this.Fd())document[q.exitFullscreen]()};g.Fd=function(){return document[q.fullscreenElement]===this.c};
  g.destroy=function(){!1!==this.fb&&(this.j.display.unregister(this),null!==this.o&&(this.o.removeChild(this,!1),this.o=null),null!==this.Zc&&(this.Zc.destroy(),this.Zc=null),null!==this.Xc&&(this.Xc.destroy(),this.Xc=null),null!==this.lc&&(this.lc.destroy(),this.lc=null),null!==this.ic&&(this.ic.destroy(),this.ic=null),null!==this.W&&(this.W.destroy(),this.W=null),null!==this.hc&&(this.hc.destroy(),this.hc=null),null!==this.gc&&(this.gc.destroy(),this.gc=null),null!==this.jc&&(this.jc.destroy(),this.jc=
  null),null!==this.kc&&(this.kc.destroy(),this.kc=null),this.j=this.vb=this.c=null,n.prototype.destroy.call(this))};Object.defineProperty(U.prototype,"viewer",{get:function(){return this.j}});Object.defineProperty(U.prototype,"dom",{get:function(){return this.c}});Object.defineProperty(U.prototype,"id",{get:function(){return this.Pf},set:function(a){this.Pf=a;this.c.id=this.Pf}});Object.defineProperty(U.prototype,"ready",{get:function(){return this.la}});
  Object.defineProperty(U.prototype,"parent",{get:function(){return this.o},set:function(a){"object"===typeof a&&!1!==Array.isArray(a.children)&&a!==this.o&&(this.o=a,this.c.style.position="absolute",!0===this.S&&this.Xb(this.S),jf(this,"both"),hf(this),null!==this.hc&&this.hc.D(),!0===this.o.Gd()&&(this.Be(),this.Jc()))}});Object.defineProperty(U.prototype,"visible",{get:function(){return"block"===this.c.style.display},set:function(a){"boolean"===typeof a&&(!0===a?this.hi():this.fi())}});
  Object.defineProperty(U.prototype,"x",{get:function(){return this.G},set:function(a){if("number"===typeof a){var b=this.G;this.G=a;this.c.style.left=this.G+"px";null!==this.N&&b!==this.G&&this.N.D({property:"x"})}}});Object.defineProperty(U.prototype,"y",{get:function(){return this.I},set:function(a){if("number"===typeof a){var b=this.I;this.I=a;this.c.style.top=this.I+"px";null!==this.N&&b!==this.I&&this.N.D({property:"y"})}}});
  Object.defineProperty(U.prototype,"keepRatio",{get:function(){return this.fc},set:function(a){"boolean"===typeof a&&a!==this.fc&&(this.fc=a)}});
  Object.defineProperty(U.prototype,"width",{get:function(){return this.A},set:function(a){var b=this.A,d=this.C;if("string"===typeof a){var e=D.Gh(a);if(null===e.value||null===e.hd)throw"$_DisplayObject.width value "+a+" is incorrect";this.C=e.hd;this.A=e.value}else if("number"===typeof a)this.A=a;else return;!0===this.aa?kf(this,"width",this.A):(this.S=!1,this.c.style.width=this.pixelWidth+"px",this.c.width=this.pixelWidth,b===this.A&&d===this.C&&!0!==this.ga||this.ya({property:"width"}))}});
  Object.defineProperty(U.prototype,"pixelWidth",{get:function(){if("px"===this.C)return this.A;if("%"===this.C)return null!==this.o?this.o.innerWidth*this.A/100:0},set:function(a){if("number"===typeof a){var b=this.A,d=this.C;this.A=a;this.C="px";!0===this.aa?kf(this,"pixelWidth",a):(this.S=!1,this.c.style.width=this.pixelWidth+"px",this.c.width=this.pixelWidth,b===this.A&&"px"===d&&!0!==this.ga||this.ya({property:"pixelWidth"}))}}});
  Object.defineProperty(U.prototype,"percentWidth",{get:function(){if("%"===this.C)return this.A;if("px"===this.C)return null!==this.o?this.A/this.o.innerWidth*100:0},set:function(a){if("number"===typeof a){var b=this.A,d=this.C;this.A=a;this.C="%";!0===this.aa?kf(this,"percentWidth",a):(this.S=!1,this.c.style.width=this.pixelWidth+"px",this.c.width=this.pixelWidth,b===this.A&&"%"===d&&!0!==this.ga||this.ya({property:"percentWidth"}))}}});
  Object.defineProperty(U.prototype,"unitWidth",{get:function(){return this.C},set:function(a){if("string"===typeof a&&("px"===a||"%"===a)){var b=this.C;this.C=a;!0===this.aa?kf(this,"unitWidth",a):(this.S=!1,this.c.style.width=this.pixelWidth+"px",this.c.width=this.pixelWidth,b===this.C&&!0!==this.ga||this.ya({property:"unitWidth"}))}}});Object.defineProperty(U.prototype,"innerWidth",{get:function(){return this.pixelWidth-2*this.O}});
  Object.defineProperty(U.prototype,"height",{get:function(){return this.u},set:function(a){var b=this.u,d=this.B;if("string"===typeof a){var e=D.Gh(a);if(null===e.value||null===e.hd)throw"$_DisplayObject.height value "+a+" is incorrect";this.B=e.hd;this.u=e.value}else if("number"===typeof a)this.u=a;else return;!0===this.aa?kf(this,"height",this.u):(this.S=!1,this.c.style.height=this.pixelHeight+"px",this.c.height=this.pixelHeight,b===this.u&&d===this.B&&!0!==this.ga||this.ya({property:"height"}))}});
  Object.defineProperty(U.prototype,"pixelHeight",{get:function(){if("px"===this.B)return this.u;if("%"===this.B)return null!==this.o?this.o.innerHeight*this.u/100:0},set:function(a){if("number"===typeof a){var b=this.u,d=this.B;this.u=a;this.B="px";!0===this.aa?kf(this,"pixelHeight",a):(this.S=!1,this.c.style.height=this.pixelHeight+"px",this.c.height=this.pixelHeight,b===this.u&&"px"===d&&!0!==this.ga||this.ya({property:"pixelHeight"}))}}});
  Object.defineProperty(U.prototype,"percentHeight",{get:function(){if("%"===this.B)return this.u;if("px"===this.B)return null!==this.o?this.u/this.o.innerHeight*100:0},set:function(a){if("number"===typeof a){var b=this.u,d=this.B;this.u=a;this.B="%";!0===this.aa?kf(this,"percentHeight",a):(this.S=!1,this.c.style.height=this.pixelHeight+"px",this.c.height=this.pixelHeight,b===this.u&&"%"===d&&!0!==this.ga||this.ya({property:"percentHeight"}))}}});
  Object.defineProperty(U.prototype,"unitHeight",{get:function(){return this.B},set:function(a){if("string"===typeof a){var b=this.B;this.B=a;!0===this.aa?kf(this,"unitHeight",a):(this.S=!1,this.c.style.height=this.pixelHeight+"px",this.c.height=this.pixelHeight,b===this.B&&!0!==this.ga||this.ya({property:"unitHeight"}))}}});Object.defineProperty(U.prototype,"innerHeight",{get:function(){return this.pixelHeight-2*this.O}});
  Object.defineProperty(U.prototype,"maximized",{get:function(){return this.S},set:function(a){"boolean"===typeof a&&(this.S=a,!0===this.S&&this.Xb(!0))}});Object.defineProperty(U.prototype,"horizontalCenter",{get:function(){return this.Yc},set:function(a){"boolean"===typeof a&&(this.Yc=a,!0===this.Yc&&(this.pa=this.na=null),null!==this.o&&(a=this.G,this.G=(this.o.innerWidth-this.pixelWidth)/2,this.c.style.left=this.G+"px",null!==this.N&&a!==this.G&&this.N.D({property:"x"})))}});
  Object.defineProperty(U.prototype,"verticalCenter",{get:function(){return this.$c},set:function(a){"boolean"===typeof a&&(this.$c=a,!0===this.$c&&(this.ec=this.mc=null),null!==this.o&&(a=this.I,this.I=(this.o.innerHeight-this.pixelHeight)/2,this.c.style.top=this.I+"px",null!==this.N&&a!==this.I&&this.N.D({property:"y"})))}});
  Object.defineProperty(U.prototype,"top",{get:function(){return this.mc},set:function(a){if("number"===typeof a||null===a)if(this.mc=a,this.$c=!1,null!==this.o&&null!==this.mc){var b=this.I;this.I=a;this.c.style.top=this.I+"px";null!==this.N&&b!==this.I&&this.N.D({property:"y"})}}});
  Object.defineProperty(U.prototype,"right",{get:function(){return this.pa},set:function(a){if("number"===typeof a||null===a)if(this.pa=a,this.Yc=!1,null!==this.o&&null!==this.pa){var b=this.G;this.G=this.o.innerWidth-this.pixelWidth-a;this.c.style.left=this.G+"px";null!==this.N&&b!==this.G&&this.N.D({property:"x"})}}});
  Object.defineProperty(U.prototype,"bottom",{get:function(){return this.ec},set:function(a){if("number"===typeof a||null===a)if(this.ec=a,this.$c=!1,null!==this.o&&null!==this.ec){var b=this.I;this.I=this.o.innerHeight-this.pixelHeight-a;this.c.style.top=this.I+"px";null!==this.N&&b!==this.I&&this.N.D({property:"y"})}}});
  Object.defineProperty(U.prototype,"left",{get:function(){return this.na},set:function(a){if("number"===typeof a||null===a)if(this.na=a,this.Yc=!1,null!==this.o&&null!==this.na){var b=this.G;this.G=a;this.c.style.left=this.G+"px";null!==this.N&&b!==this.G&&this.N.D({property:"x"})}}});Object.defineProperty(U.prototype,"alpha",{get:function(){return this.Ze},set:function(a){"number"===typeof a&&a!==this.Ze&&(this.Ze=a,this.c.style.opacity=this.Ze)}});
  Object.defineProperty(U.prototype,"rotation",{get:function(){return this.af},set:function(a){"number"===typeof a&&a!==this.af&&(this.af=a,this.c.style.transform="rotate("+this.af+"deg)")}});Object.defineProperty(U.prototype,"background",{get:function(){return this.sd},set:function(a){"string"===typeof a&&a!==this.sd&&(this.sd=a,this.c.style.background=this.sd)}});
  Object.defineProperty(U.prototype,"borderStyle",{get:function(){return this.od},set:function(a){-1!=="none dotted dashed solid double groove ridge inset outset".split(" ").indexOf(a)&&a!==this.od&&(this.od=a,!0===this.aa?kf(this,"borderStyle",a):this.c.style.borderStyle=this.od)}});
  Object.defineProperty(U.prototype,"borderWidth",{get:function(){return this.O},set:function(a){if("number"===typeof a){var b=this.O;this.O=a;!0===this.aa?kf(this,"borderWidth",a):(this.c.style.borderWidth=this.O+"px",b===this.O&&!0!==this.ga||this.Vg())}}});Object.defineProperty(U.prototype,"borderColor",{get:function(){return this.td},set:function(a){"string"===typeof a&&a!==this.td&&(this.td=a,this.c.style.borderColor=this.td)}});
  Object.defineProperty(U.prototype,"borderRadius",{get:function(){return this.df},set:function(a){"number"!==typeof a&&"string"!==typeof a||a===this.df||("string"===typeof a&&(a=parseInt(a,10)),isNaN(a)||(this.df=a,this.c.style.borderRadius=this.df+"px"))}});Object.defineProperty(U.prototype,"globalOffset",{get:function(){var a=this.c,b=0,d=0;do b+=a.offsetTop||0,d+=a.offsetLeft||0,a=a.offsetParent;while(a);return{top:b,left:d}}});
  Object.defineProperty(U.prototype,"tooltip",{get:function(){return this.ge},set:function(a){"string"===typeof a&&a!==this.ge&&(this.ge=a,this.c.title=this.ge)}});Object.defineProperty(U.prototype,"index",{get:function(){return this.$e},set:function(a){"number"===typeof a&&a!==this.$e&&(this.$e=a,this.c.style.zIndex=this.$e)}});Object.defineProperty(U.prototype,"fullscreen",{set:function(a){"boolean"===typeof a&&(!0===a?this.ul():this.vl())}});
  Object.defineProperty(U.prototype,"pointer",{get:function(){null===this.Zc&&(this.Zc=new V(this));return this.Zc}});Object.defineProperty(U.prototype,"drag",{get:function(){null===this.Xc&&(this.Xc=new Ue(this));return this.Xc}});Object.defineProperty(U.prototype,"onResize",{get:function(){null===this.lc&&(this.lc=new r(this));return this.lc}});Object.defineProperty(U.prototype,"onBorderResize",{get:function(){null===this.ic&&(this.ic=new r(this));return this.ic}});
  Object.defineProperty(U.prototype,"onMove",{get:function(){null===this.N&&(this.N=new r(this));return this.N}});Object.defineProperty(U.prototype,"onReady",{get:function(){null===this.W&&(this.W=new r(this,!0));return this.W}});Object.defineProperty(U.prototype,"onAddedToParent",{get:function(){null===this.hc&&(this.hc=new r(this));return this.hc}});Object.defineProperty(U.prototype,"onAddedToDom",{get:function(){null===this.gc&&(this.gc=new r(this));return this.gc}});
  Object.defineProperty(U.prototype,"onShow",{get:function(){null===this.Ed&&(this.Ed=new r(this));return this.Ed}});Object.defineProperty(U.prototype,"onHide",{get:function(){null===this.zd&&(this.zd=new r(this));return this.zd}});Object.defineProperty(U.prototype,"onFullscreenEnter",{get:function(){null===this.jc&&(this.jc=new r(this));return this.jc}});Object.defineProperty(U.prototype,"onFullscreenExit",{get:function(){null===this.kc&&(this.kc=new r(this));return this.kc}});
  function w(a,b,d,e){this.i=[];this.R="undefined"!==typeof e?e:null;this.F=null;this.Gg=!1;this.ha="hidden";U.call(this,a,b,d||"DisplayObjectContainer")}w.prototype=Object.create(U.prototype);g=w.prototype;g.constructor=w;
  g.Ma=function(){U.prototype.Ma.call(this);if("DisplayObjectContainer"===this.Wa){var a=null!==this.R;!0===a&&(this.F={originalWidth:this.R.clientWidth,originalHeight:this.R.clientHeight,currentWidth:this.R.clientWidth,currentHeight:this.R.clientHeight,scaleWidth:1,scaleHeight:1,frameCount:0,frameInterval:10},this.A=this.F.currentWidth,this.c.style.width=this.pixelWidth+"px",this.u=this.F.currentHeight,this.c.style.height=this.pixelHeight+"px",this.c.style.position="absolute",this.R.appendChild(this.c));
  this.j.display.register(this,a);ff(this);gf(this)}};g.ya=function(a){for(var b=0,d=this.i.length;b<d;b++){var e=this.i[b],h=a;!0===e.S&&e.Xb(e.S);jf(e,h.property);hf(e)}U.prototype.ya.call(this,a)};g.Be=function(){U.prototype.Be.call(this);for(var a=0,b=this.i.length;a<b;a++)this.i[a].Be()};g.Jc=function(){U.prototype.Jc.call(this);for(var a=0,b=this.i.length;a<b;a++)this.i[a].Jc()};g.Ce=function(){U.prototype.Ce.call(this);for(var a=0,b=this.i.length;a<b;a++)this.i[a].Ce()};
  function lf(a,b){if(null===a.i)return-1;for(var d=0,e=a.i.length;d<e;d++)if(a.i[d]===b)return d;return-1}
  g.update=function(){this.F.frameCount++;if(!(this.F.frameCount<this.F.frameInterval)){this.F.frameCount=0;var a=this.R.clientWidth,b=this.R.clientHeight,d=!1;a!==this.F.currentWidth&&(this.F.currentWidth=a,this.F.scaleWidth=this.F.currentWidth/this.F.originalWidth,d=!0);b!==this.F.currentHeight&&(this.F.currentHeight=b,this.F.scaleHeight=this.F.currentHeight/this.F.scaleHeight,d=!0);!0===d&&this.gi(this.F.currentWidth,this.F.currentHeight)}};
  g.vc=function(a){if(a===this)throw"You can't add a $_DisplayObjectContainer to itself!";var b=a;a instanceof Element&&(b=new U(this.j,a));this.c.appendChild(b.dom);b.parent=this;a=this.i.push(b)-1;null===b.index&&(b.index=a)};g.Ip=function(a,b){var d=a;a instanceof Element&&(d=new U(this.j,a));this.c.appendChild(d.dom);d.parent=this;this.i.splice(b,0,d);d.index=b;b=0;for(d=this.i.length;b<d;b++)a=this.i[b],a.index=b};
  g.sl=function(){var a=this.i;if(0<a.length){this.Gg=!0;for(var b=0,d=a.length;b<d;b++)if(!0===a[b].Gd()&&!0===a[b].visible){var e=Math.max(a[b].width+a[b].x,a[b].width+a[b].left,a[b].width+a[b].right),h=Math.max(a[b].height+a[b].y,a[b].height+a[b].top,a[b].height+a[b].bottom);e>this.pixelWidth&&(this.width=e);h>this.pixelHeight&&(this.height=h)}}null!==this.parent&&!0===D.P(this.parent,"DisplayObjectContainer")&&!0===this.parent.Gg&&this.parent.sl()};
  g.removeChild=function(a,b){a=lf(this,a);-1!==a&&this.Ih(a,b)};g.Ih=function(a,b){if(0<=a&&a<this.i.length){var d=this.i[a];this.i.splice(a,1);this.c.removeChild(d.dom);"undefined"!==typeof b&&!0!==b||d.destroy();!0!==this.Gg||this.i.length||(this.height=this.width=0)}};g.ei=function(a){for(var b=this.i.length;b--;)this.Ih(b,a)};g.tm=function(a){return-1!==lf(this,a)};g.destroy=function(){this.ei(!1);this.F=this.R=this.i=null;U.prototype.destroy.call(this)};
  Object.defineProperty(w.prototype,"children",{get:function(){return this.i}});Object.defineProperty(w.prototype,"overflow",{get:function(){return this.ha},set:function(a){-1!==["hidden","visible","scroll"].indexOf(a)&&(this.ha=a,this.c.style.overflow=a)}});function mf(a,b){this.i=null;this.f=b||null;this.m="";this.R=!1;this.F="";this.U=this.K=null;this.V=!1;this.H=this.J=null;U.call(this,a,null,"Iframe")}mf.prototype=Object.create(U.prototype);g=mf.prototype;g.constructor=mf;
  g.Ma=function(){U.prototype.Ma.call(this);this.U=this.yo.bind(this);this.i=document.createElement("iframe");this.i.style.width="100%";this.i.style.height="100%";this.i.style.border=0;this.i.style.overflow="hidden";this.i.addEventListener("load",this.U,null!==this&&!!this);this.i.setAttribute("allowFullScreen","");this.c.appendChild(this.i);null!==this.f&&this.load(this.f);this.j.display.register(this);ff(this);gf(this)};g.wf=function(){!0===this.j.i18n.Mb(this.F)&&nf(this,this.K.value)};
  function nf(a,b){a.V=!1;null!==a.J&&a.J.D();a.m=b;a.i.src=a.m}g.yo=function(){""!==this.m&&(this.V=!0,null!==this.H&&this.H.D())};function of(a){!1===a.j.i18n.onLocaleChangeComplete.has(a.wf,a)&&a.j.i18n.onLocaleChangeComplete.add(a.wf,a)}
  g.load=function(a){"object"===typeof a&&null!==a?(this.R=a.i18n||!1,!0===this.R?(this.m="",this.F=a.url):this.m=a.url):(this.R=!1,this.m="","string"===typeof a&&(this.m=a));var b;!0===this.R&&"string"===typeof this.F&&""!==this.F?(this.K=new Na(this.j,this.F),of(this),b=this.K.value):"string"===typeof this.m&&""!==this.m&&(b=this.m);"undefined"!==typeof b&&nf(this,b)};
  g.destroy=function(){!1!==this.fb&&(null!==this.K&&(this.K.destroy(),this.K=null,this.j.i18n.onLocaleChangeComplete.remove(this.wf,this)),null!==this.J&&(this.J.destroy(),this.J=null),null!==this.H&&(this.H.destroy(),this.H=null),this.U=this.i=null,U.prototype.destroy.call(this))};
  Object.defineProperty(mf.prototype,"i18nUrl",{get:function(){return this.F},set:function(a){if("string"===typeof a){this.R=!0;this.F=a;var b;""!==this.F&&(this.K=new Na(this.j,this.F),of(this),b=this.K.value);"undefined"!==typeof b&&nf(this,b)}}});Object.defineProperty(mf.prototype,"url",{get:function(){return this.m},set:function(a){"string"===typeof a&&(this.R=!1,nf(this,a))}});Object.defineProperty(mf.prototype,"loaded",{get:function(){return this.V}});
  Object.defineProperty(mf.prototype,"onLoadStart",{get:function(){null===this.J&&(this.J=new r(this));return this.J}});Object.defineProperty(mf.prototype,"onLoadComplete",{get:function(){null===this.H&&(this.H=new r(this));return this.H}});
  function T(a,b){this.f=b;this.H="";this.m=!1;this.J=null;this.Z="";this.ca="rgb(0, 0, 0)";this.V=this.U=!0;this.Fa=0;this.R=this.Ga=!1;this.ea=null;this.Sa=!1;this.Ea=this.Aa=this.Ba=this.wa=this.va=this.ua=this.sa=this.Ra=this.La=this.Qa=this.Oa=this.Ka=this.Ia="";this.ja=this.ka=this.qa=this.i=this.Ha=null;this.ha=!1;this.F=this.K=null;U.call(this,a,null,"TextField")}T.prototype=Object.create(U.prototype);g=T.prototype;g.constructor=T;
  g.Ma=function(){U.prototype.Ma.call(this);this.qa=this.ho.bind(this);this.ka=this.Qn.bind(this);this.ja=this.Pn.bind(this);this.Ha=document.createElement("span");this.c.appendChild(this.Ha);"undefined"!==typeof this.f&&null!==this.f&&this.load(this.f);this.j.display.register(this);ff(this);gf(this)};g.ya=function(a){var b=a.property;-1!==b.toLowerCase().indexOf("width")&&"autoWidth"!==b&&(this.U=!1);-1!==b.toLowerCase().indexOf("height")&&"autoHeight"!==b&&(this.V=!1);U.prototype.ya.call(this,a)};
  g.Jc=function(){pf(this);U.prototype.Jc.call(this)};function qf(a,b){b!==a.Z&&(a.Z=String(b),a.Ha.innerHTML=b,pf(a),hf(a),null!==a.K&&a.K.D());if(!1===a.m||!0===a.m&&!0===a.J.loaded)a.ha=!0,null!==a.F&&a.F.D()}
  function pf(a){if(!1!==a.Gd()){if(!0===a.U){var b=a.pixelWidth;a.c.style.width="";var d=a.c.offsetWidth;0<d&&(d+=1);a.A=d;a.C="px";a.c.style.width=a.A+"px";b!==a.A&&a.ya({property:"autoWidth"})}!0===a.V&&(b=a.pixelHeight,a.c.style.height="",d=a.c.offsetHeight,0<d&&(d+=1),a.u=d,a.B="px",a.c.style.height=a.u+"px",b!==a.u&&a.ya({property:"autoHeight"}))}}function rf(a){null===a.J&&(a.J=new Na(a.j,a.H));qf(a,a.J.value)}
  function sf(a){!1===a.j.i18n.onLocaleChangeComplete.has(a.Ef,a)&&a.j.i18n.onLocaleChangeComplete.add(a.Ef,a)}g.Ef=function(){!0===this.j.i18n.Mb(this.H)&&(this.value=this.J.value)};
  g.ho=function(){!0===this.R&&null===this.i&&(this.i=document.createElement("textarea"),this.i.style.position="absolute",this.i.style.top="0px",this.i.style.left="0px",this.i.style.width="100%",this.i.style.height="100%",this.i.style.resize="none",this.i.style.margin="0px",this.i.style.padding="0px",this.i.style.overflowX="hidden",this.i.style.overflowY="auto",this.i.style.boxSizing="border-box",this.i.value=this.Z,this.i.addEventListener("input",this.ka,!1),this.i.addEventListener("blur",this.ja,
  !1),this.c.appendChild(this.i),this.i.focus())};g.Qn=function(){qf(this,this.i.value)};g.Pn=function(){this.yg()};g.yg=function(){null!==this.i&&(this.i.removeEventListener("input",this.ka,!1),this.i.removeEventListener("blur",this.ja,!1),this.c.removeChild(this.i),this.i=null)};
  g.load=function(a){this.ha=!1;"object"===typeof a&&null!==a?(a.color&&(this.color=a.color),a.font&&(this.font=a.font),a.fontFamily&&(this.fontFamily=a.fontFamily),a.fontWeight&&(this.fontWeight=a.fontWeight),a.fontSize&&(this.fontSize=a.fontSize),a.fontStyle&&(this.fontStyle=a.fontStyle),a.fontVariant&&(this.fontVariant=a.fontVariant),a.textAlign&&(this.textAlign=a.textAlign),a.textShadow&&(this.textShadow=a.textShadow),a.textDecoration&&(this.textDecoration=a.textDecoration),a.textOverflow&&(this.textOverflow=
  a.textOverflow),a.textTransform&&(this.textTransform=a.textTransform),a.whiteSpace&&(this.whiteSpace=a.whiteSpace),a.wordWrap&&(this.wordWrap=a.wordWrap),a.lineHeight&&(this.lineHeight=a.lineHeight),a.autoWidth&&(this.autoWidth=a.autoWidth),a.autoHeight&&(this.autoHeight=a.autoHeight),a.padding&&(this.padding=a.padding),a.selectable&&(this.selectable=a.selectable),a.editable&&(this.editable=a.editable),this.m=a.i18n||!1,!0===this.m?this.H=a.value:this.value=a.value):"string"===typeof a&&(this.m=!1,
  this.value=a);!0===this.m&&"string"===typeof this.H&&""!==this.H&&(rf(this),sf(this))};g.destroy=function(){!1!==this.fb&&(null!==this.J&&(this.J.destroy(),this.J=null,this.j.i18n.onLocaleChangeComplete.remove(this.Ef,this)),this.yg(),null!==this.F&&(this.F.destroy(),this.F=null),null!==this.K&&(this.K.destroy(),this.K=null),U.prototype.destroy.call(this))};
  Object.defineProperty(T.prototype,"i18nValue",{get:function(){return this.H},set:function(a){"string"===typeof a&&(""===this.H&&sf(this),this.m=!0,this.H=a,rf(this))}});Object.defineProperty(T.prototype,"i18n",{get:function(){return this.m}});Object.defineProperty(T.prototype,"value",{get:function(){return this.Z},set:function(a){if("string"===typeof a||"number"===typeof a)this.m=!1,qf(this,a)}});
  Object.defineProperty(T.prototype,"color",{get:function(){return this.ca},set:function(a){"string"===typeof a&&(this.ca=a,this.c.style.color=this.ca)}});Object.defineProperty(T.prototype,"font",{get:function(){return this.sa},set:function(a){"string"!==typeof a||2>a.split(" ").toString().length||(this.sa=a.replace(/"/g,'"'),this.c.style.font=this.sa)}});
  Object.defineProperty(T.prototype,"fontFamily",{get:function(){return this.ua},set:function(a){"string"===typeof a&&(this.ua=a.replace(/"/g,'"'),this.c.style.fontFamily=this.ua,pf(this))}});Object.defineProperty(T.prototype,"fontSize",{get:function(){return this.va},set:function(a){if("number"===typeof a||"string"===typeof a)"number"===typeof a&&(a+="px"),this.va=a,this.c.style.fontSize=this.va}});
  Object.defineProperty(T.prototype,"fontStyle",{get:function(){return this.wa},set:function(a){"string"===typeof a&&(this.wa=a,this.c.style.fontStyle=this.wa)}});Object.defineProperty(T.prototype,"fontWeight",{get:function(){return this.Ba},set:function(a){if("string"===typeof a||"number"===typeof a)this.Ba=a.toString(),this.c.style.fontWeight=this.Ba}});
  Object.defineProperty(T.prototype,"fontVariant",{get:function(){return this.Aa},set:function(a){"string"===typeof a&&(this.Aa=a,this.c.style.fontVariant=this.Aa)}});Object.defineProperty(T.prototype,"lineHeight",{get:function(){return this.Ea},set:function(a){if("number"===typeof a||"string"===typeof a)"number"===typeof a&&(a+="px"),this.Ea=a,this.c.style.lineHeight=this.Ea}});
  Object.defineProperty(T.prototype,"textAlign",{get:function(){return this.Ia},set:function(a){"string"===typeof a&&(this.Ia=a,this.c.style.textAlign=this.Ia)}});Object.defineProperty(T.prototype,"textShadow",{get:function(){return this.Oa},set:function(a){"string"===typeof a&&(this.Oa=a,this.c.style.textShadow=this.Oa)}});Object.defineProperty(T.prototype,"textDecoration",{get:function(){return this.Ka},set:function(a){"string"===typeof a&&(this.Ka=a,this.c.style.textDecoration=this.Ka)}});
  Object.defineProperty(T.prototype,"textTransform",{get:function(){return this.Qa},set:function(a){"string"===typeof a&&(this.Qa=a,this.c.style.textTransform=this.Qa)}});Object.defineProperty(T.prototype,"autoWidth",{get:function(){return this.U},set:function(a){"boolean"===typeof a&&(this.U=a,pf(this))}});Object.defineProperty(T.prototype,"autoHeight",{get:function(){return this.V},set:function(a){"boolean"===typeof a&&(this.V=a,pf(this))}});
  Object.defineProperty(T.prototype,"padding",{get:function(){return this.Fa},set:function(a){if("number"===typeof a||"string"===typeof a)this.Fa=a="string"===typeof a?a.split(" ",4).toString().replace(/,/g," "):a+"px",this.c.style.padding=this.Fa}});
  Object.defineProperty(T.prototype,"selectable",{get:function(){return this.Ga},set:function(a){"boolean"===typeof a&&(this.Ga=a,!1===this.Ga?(!1===this.R&&!0===this.Ua&&(this.Ua=this.pointer.enabled=!1),this.c.style.i="none",this.c.style.webkitUserSelect="none",this.c.style.f="none",this.c.style.c="none",this.c.style.M="none"):(!1===this.pointer.enabled&&(this.Ua=this.pointer.enabled=!0),this.c.style.i="text",this.c.style.webkitUserSelect="text",this.c.style.f="text",this.c.style.c="text",this.c.style.M=
  "inherit"))}});Object.defineProperty(T.prototype,"wordWrap",{get:function(){return this.Sa},set:function(a){"boolean"===typeof a&&(this.Sa=a,this.c.style.wordWrap=!1===this.Sa?"normal":"break-word")}});Object.defineProperty(T.prototype,"whiteSpace",{get:function(){return this.Ra},set:function(a){"string"===typeof a&&(this.Ra=a,this.c.style.whiteSpace=this.Ra)}});
  Object.defineProperty(T.prototype,"textOverflow",{get:function(){return this.La},set:function(a){"string"===typeof a&&(this.La=a,this.c.style.textOverflow=this.La)}});
  Object.defineProperty(T.prototype,"editable",{get:function(){return this.R},set:function(a){a=!!a;this.R!==a&&(this.R=a,!1===this.R?(this.c.removeEventListener("click",this.qa,null!==this&&!!this),this.j.keyboard.yc(this.ea),this.ea=null,this.pointer.enabled=!0,this.c.style.cursor="text"):(this.c.addEventListener("click",this.qa,null!==this&&!!this),this.ea=new $d(this.j,[13,27],this.yg,null,null,null,this),this.j.keyboard.Ub(this.ea),this.c.style.cursor="default"))}});
  Object.defineProperty(T.prototype,"loaded",{get:function(){return this.ha}});Object.defineProperty(T.prototype,"onLoadComplete",{get:function(){null===this.F&&(this.F=new r(this));return this.F}});Object.defineProperty(T.prototype,"onValueChange",{get:function(){null===this.K&&(this.K=new r(this));return this.K}});function Ke(a,b){this.f=b||null;this.H={};this.ea=this.J=this.V="";this.m=this.K=null;this.U=this.Z=!1;this.ca=0;w.call(this,a,null,"Button")}Ke.prototype=Object.create(w.prototype);
  Ke.prototype.constructor=Ke;Ke.states={nc:"out",Wc:"over",Dn:"down"};g=Ke.prototype;
  g.Ma=function(){w.prototype.Ma.call(this);this.J=Ke.states.nc;this.K=new Za(this.j);this.K.onLoadComplete.add(this.ye,this);this.K.onResize.add(this.ze,this);this.vc(this.K);this.m=new T(this.j);this.m.onLoadComplete.add(this.ye,this);this.m.onResize.add(this.ze,this);this.m.autoWidth=!0;this.m.autoHeight=!0;this.vc(this.m);this.pointer.enabled=!0;this.pointer.cursor=Xe.jb;this.pointer.onEnter.add(this.Go,this);this.pointer.onLeave.add(this.Ho,this);this.pointer.onPressStart.add(this.qm,this);this.pointer.onPressEnd.add(this.pm,
  this);this.j.display.register(this);ff(this);gf(this);this.j.i18n.onLocaleChangeComplete.add(this.Ph,this);this.load(this.f)};g.Go=function(){tf(this,Ke.states.Wc)};g.Ho=function(){tf(this,Ke.states.nc)};g.qm=function(){tf(this,Ke.states.Dn)};g.pm=function(){tf(this,Ke.states.Wc)};g.Ph=function(){tf(this,this.J)};g.ye=function(){this.ca++;2===this.ca&&(uf(this),vf(this))};g.ze=function(){uf(this);vf(this)};function wf(a,b){a.V=b;tf(a,a.J)}
  function tf(a,b){a.J=b;b=a.H[a.V];a.ca=0;var d=b.Ll(a.J);a.background=b.Va("background",a.J);a.borderStyle=b.Va("borderStyle",a.J);a.borderColor=b.Va("borderColor",a.J);a.borderRadius=b.Va("borderRadius",a.J);a.borderWidth=b.Va("borderWidth",a.J);a.Z=b.Va("autoWidth",a.J);a.U=b.Va("autoHeight",a.J);var e=b.Va("label",a.J);"undefined"!==typeof e&&a.m.load(e);!0===d&&a.K.load(b.Va("image",a.J))}
  function uf(a){var b=a.H[a.V],d=b.Va("align",a.J),e=b.Va("padding",a.J),h=b.Va("spacing",a.J);"label"===b.Va("first",a.J)?(b=a.m,a=a.K):(b=a.K,a=a.m);switch(d){case "left":b.left=e;b.verticalCenter=!0;a.left=b.left+h+b.pixelWidth;a.verticalCenter=!0;break;case "right":b.right=e;b.verticalCenter=!0;a.right=b.right+h+b.pixelWidth;a.verticalCenter=!0;break;case "top":b.top=e;b.horizontalCenter=!0;a.top=b.top+b.pixelHeight+h;a.horizontalCenter=!0;break;case "bottom":b.bottom=e;b.horizontalCenter=!0;a.bottom=
  b.bottom+h+b.pixelHeight;a.horizontalCenter=!0;break;default:b.horizontalCenter=!0,b.verticalCenter=!0,a.horizontalCenter=!0,a.verticalCenter=!0}}
  function vf(a){if(!1!==a.Z||!1!==a.U){var b=a.H[a.V].Va("padding",a.J);if(!0===a.Z){var d=a.pixelWidth;a.A=Math.max(a.m.x+a.m.pixelWidth,a.K.x+a.K.pixelWidth)-Math.min(a.m.x,a.K.x)+2*b+2*a.O;a.C="px";a.c.style.width=a.A+"px";d!==a.pixelWidth&&a.ya({property:"autoWidth"})}!0===a.U&&(d=a.pixelHeight,a.u=Math.max(a.m.y+a.m.pixelHeight,a.K.y+a.K.pixelHeight)-Math.min(a.m.y,a.K.y)+2*b+2*a.O,a.B="px",a.c.style.height=a.u+"px",d!==a.pixelHeight&&a.ya({property:"autoHeight"}))}}
  g.load=function(a){if("undefined"!==typeof a&&null!==a){if(!0===D.za(a.skins,"ButtonSkin"))for(var b=0,d=a.skins.length;b<d;b++)this.Lc(a.skins[b]);else if("object"===typeof a.skins&&0<a.skins.length)for(var d=0,e=a.skins.length;d<e;d++)b=new xf(a.skins[d].name,a.skins[d].states),this.Lc(b);D.P(a.skin,"ButtonSkin")?this.Lc(a.skin):"object"===typeof a.skin&&(b=new xf(a.skin.name,a.skin.states),this.Lc(b));!0===D.P(a["default"],"string")&&!0===this.Ml(a["default"])&&(this.ea=a["default"])}a=this.H||
  {};Object.keys(a).length||(b=new xf("default"),this.Lc(b));""===this.ea&&(this.ea=this.H[Object.keys(a)[0]].name);wf(this,this.ea)};g.Lc=function(a,b){if(!1===D.P(a,"ButtonSkin"))throw"$_Button: Invalid button skin!";a.Jh(Ke.states.nc);this.H[a.name]=a;!0===b&&wf(this,a.name)};g.gm=function(a){"string"===typeof a&&!0===D.P(this.H[a],"ButtonSkin")?wf(this,a):!0===D.P(a,"ButtonSkin")&&(this.H[a.name]===a?wf(this,a.name):"undefined"!==typeof this.H[a.name]&&null!==this.H[a.name]||this.Lc(a,!0))};
  g.Ml=function(a){return"undefined"!==typeof this.H[a]};g.Aq=function(){this.H[this.V].Jh(Ke.states.nc);wf(this,this.V)};
  g.destroy=function(){this.j.i18n.onLocaleChangeComplete.remove(this.Ph,this);if("undefined"!==typeof this.H&&0<this.H.length)for(var a in this.H)this.H.hasOwnProperty(a)&&this.H[a].destroy();this.H={};null!==this.K&&(this.K.onLoadComplete.remove(this.ye,this),this.K.onResize.remove(this.ze,this),this.removeChild(this.K,!0),this.K=null);null!==this.m&&(this.m.onLoadComplete.remove(this.ye,this),this.m.onResize.remove(this.ze,this),this.removeChild(this.m,!0),this.m=null);w.prototype.destroy.call(this)};
  Object.defineProperty(Ke.prototype,"skins",{get:function(){return this.H}});Object.defineProperty(Ke.prototype,"skin",{get:function(){return this.H[this.V]},set:function(a){this.gm(a)}});Object.defineProperty(Ke.prototype,"autoWidth",{get:function(){return this.Z},set:function(a){"boolean"===typeof a&&(this.Z=a,vf(this))}});Object.defineProperty(Ke.prototype,"autoHeight",{get:function(){return this.U},set:function(a){"boolean"===typeof a&&(this.U=a,vf(this))}});
  function xf(a,b){this.i=a||"";this.c=D.ta(yf,{});this.f=D.ta(b||{},{out:{},over:{},down:{}});n.call(this,"ButtonSkin")}xf.prototype=Object.create(n.prototype);xf.prototype.constructor=xf;
  var zf={key:"",url:"",i18n:!1,keepRatio:!0,maximized:!1,alpha:1},Af={value:"",i18n:!1,color:"",fontFamily:"",fontWeight:""},Bf={name:"",background:"",borderStyle:"solid",borderColor:"",borderRadius:0,borderWidth:0,autoWidth:!0,autoHeight:!0,align:"center",padding:0,spacing:0,first:"image",image:zf,label:Af},Cf={key:"",url:"",i18n:!1,keepRatio:!0,maximized:!1,alpha:1},Df={value:"Button",i18n:!1,color:"",fontFamily:"",fontWeight:""},yf={name:"default",background:"#eee",borderStyle:"solid",borderColor:"#555",
  borderRadius:5,borderWidth:2,autoWidth:!0,autoHeight:!0,align:"left",padding:5,spacing:0,first:"image",image:Cf,label:Df};xf.prototype.Jh=function(a){"undefined"!==typeof this.f[a]&&(this.c=this.f[a])};xf.prototype.Va=function(a,b){b=D.Ve(this.f,b+"."+a,D.Ve(this.c,a,D.Ve(Bf,a)));"object"===typeof b&&(b=D.ta(this.c[a],b));return b};xf.prototype.Ll=function(a){a=this.Va("image",a);return"undefined"!==typeof a&&"string"===typeof a.url&&""!==a.url};
  xf.prototype.m=function(a){a=this.Va("label",a);return"undefined"!==typeof a&&"string"===typeof a.value&&""!==a.value};Object.defineProperty(xf.prototype,"name",{get:function(){return this.i}});Object.defineProperty(xf.prototype,"default",{get:function(){return this.c},set:function(a){this.c=a}});Object.defineProperty(xf.prototype,"out",{get:function(){return this.f.out},set:function(a){this.f.out=a}});
  Object.defineProperty(xf.prototype,"over",{get:function(){return this.f.over},set:function(a){this.f.over=a}});Object.defineProperty(xf.prototype,"down",{get:function(){return this.f.down},set:function(a){this.f.down=a}});function ja(a){U.call(this,a,document.createElement("canvas"),"Canvas")}ja.prototype=Object.create(U.prototype);ja.prototype.constructor=ja;var Ef={IMAGE:"image",nj:"data"};ja.prototype.Ma=function(){U.prototype.Ma.call(this);this.j.display.register(this);ff(this);gf(this)};
  ja.prototype.capture=function(a){a=a||Ef.IMAGE;var b=this.c.toDataURL();switch(a){case Ef.nj:return b;case Ef.IMAGE:return a=new Image,a.src=b,a}};Object.defineProperty(ja.prototype,"context2D",{get:function(){return this.c.getContext("2d")}});Object.defineProperty(ja.prototype,"context3D",{get:function(){return this.c.getContext("webgl")}});Object.defineProperty(ja.prototype,"element",{get:function(){return this.c}});
  function Za(a,b,d){this.f=b||null;this.ka=this.K="";this.ca=!1;this.ha=this.wa="";this.m=this.Z=null;this.ja=!1;this.ea=this.i=null;this.sa="";this.V=this.qa=!1;this.ua=this.va=!0;this.H="";this.R=this.J=this.U=this.Ca=null;U.call(this,a,null,d||"Image")}Za.prototype=Object.create(U.prototype);Za.prototype.constructor=Za;var ed={CSS:"css",dc:"canvas"},Ff=ed.dc;g=Za.prototype;g.Ma=function(){U.prototype.Ma.call(this);this.fc=!0;null!==this.f&&this.load(this.f);this.j.display.register(this);ff(this)};
  g.ya=function(a){var b=a.property;-1!==b.toLowerCase().indexOf("width")&&"autoWidth"!==b&&(this.va=!1);-1!==b.toLowerCase().indexOf("height")&&"autoHeight"!==b&&(this.ua=!1);null!==this.m&&(this.H===ed.CSS?(Gf(this),Hf(this)):this.H===ed.dc&&null!==this.i&&If(this,this.i),!0===this.fc&&(-1!==b.toLowerCase().indexOf("width")?(b=this.pixelWidth/this.i.w,b!==this.ce&&(this.ce=b,!0===this.fc&&(this.be=b,this.height=this.i.h*this.be))):-1!==b.toLowerCase().indexOf("height")&&(b=this.pixelHeight/this.i.h,
  b!==this.be&&(this.be=b,!0===this.fc&&(this.ce=b,this.width=this.i.w*this.ce)))),U.prototype.ya.call(this,a))};g.Vg=function(){this.H===ed.CSS?this.c.style.backgroundPosition=-this.O+"px "+-this.O+"px":this.H===ed.dc&&(this.Ca.style.top=-this.O+"px",this.Ca.style.left=-this.O+"px");U.prototype.Vg.call(this)};g.xf=function(){var a=this.K+"_"+this.j.i18n.locale;if(a!==this.wa&&(this.wa=a,!0===this.j.i18n.Mb(this.ha))){var b=this.Z.value;this.V=!1;this.j.load.image(a,b,this.lk,this.mk,this)}};
  function Jf(a,b){if(b===ed.CSS||b===ed.dc)a.H=b;a.H===ed.CSS?a.c.style.backgroundRepeat="no-repeat":a.H===ed.dc&&null===a.Ca&&(a.Ca=document.createElement("canvas"),a.Ca.style.position="absolute",a.Ca.style.top="0px",a.Ca.style.left="0px",a.c.appendChild(a.Ca))}function Kf(a,b){a.i=b;!0===a.va&&(a.A=a.i.w,a.C="px",a.c.style.width=a.pixelWidth+"px");!0===a.ua&&(a.u=a.i.h,a.B="px",a.c.style.height=a.pixelHeight+"px");a.H===ed.CSS?(Gf(a),Hf(a)):a.H===ed.dc&&If(a,a.i)}
  function If(a,b){if(null!==a.m&&!1!==a.ja){a.Ca.width=a.innerWidth;a.Ca.height=a.innerHeight;var d=a.Ca.getContext("2d");d.clearRect(0,0,a.innerWidth,a.innerHeight);d.drawImage(a.m,b.x,b.y,b.w,b.h,0,0,a.innerWidth,a.innerHeight)}}function Gf(a){a.c.style.backgroundSize=a.pixelWidth/a.i.w*a.m.naturalWidth+"px "+a.pixelHeight/a.i.h*a.m.naturalHeight+"px"}function Hf(a){a.c.style.backgroundPosition=a.pixelWidth/a.i.w*(-a.i.x-a.O)+"px "+a.pixelHeight/a.i.h*(-a.i.y-a.O)+"px"}
  g.lk=function(a){!1!==this.fb&&(this.m=a.data,this.H===ed.CSS&&(this.c.style.backgroundImage="url('"+a.url+"')"),this.ja=!0,Lf(this))};g.mk=function(a){!1!==this.fb&&(this.warn(a.url+" load error"),null!==this.R&&this.R.D())};g.Ao=function(a){"undefined"!==typeof a.data.frames?this.ea=a.data.frames:this.warn("No frames found in file!");this.qa=!0;Lf(this)};
  function Lf(a){if(!0!==a.V&&!0===a.ja&&!0===a.qa){a.V=!0;var b;null!==a.i?b=a.i:null!==a.ea?b=a.ea[0].frame:b={x:0,y:0,w:a.m.naturalWidth,h:a.m.naturalHeight};Kf(a,b);hf(a);gf(a);null!==a.J&&a.J.D()}}
  g.yf=function(a){"object"===typeof a&&null!==a?(Jf(this,"string"===typeof a.renderMode?a.renderMode:Ff),this.K=a.key||"",this.ca=a.i18n||!1,!0===this.ca?(this.ka="",this.ha=a.url):this.ka=a.url,this.i=a.frame||null,"string"===typeof a.frames?this.sa=a.frames:"object"===typeof a.frames&&null!==a.frames&&(this.ea=a.frames),this.alpha=a.alpha,this.keepRatio=a.keepRatio,this.maximized=a.maximized,this.width=a.width,this.height=a.height):(Jf(this,Ff),this.ka=this.K="",this.ca=!1,"string"===typeof a&&(this.ka=
  a))};
  g.load=function(a){this.qa=this.ja=this.V=!1;this.yf(a);a=this.K;var b=this.ka;if(!0===this.ca&&"string"===typeof this.ha){this.Z=new Na(this.j,this.ha);!1===this.j.i18n.onLocaleChangeComplete.has(this.xf,this)&&this.j.i18n.onLocaleChangeComplete.add(this.xf,this);var d=this.j.i18n.locale;""!==d&&(a=this.K+"_"+d);!0===this.j.i18n.Mb(this.ha)&&(b=this.Z.value)}""!==b?(this.V=!1,this.j.load.image(a,b,this.lk,this.mk,this)):this.ja=!0;"string"===typeof this.sa&&""!==this.sa?(a=this.sa,this.V=!1,this.j.load.json(this.K+
  "-frames",a,this.Ao,this)):this.qa=!0};g.mf=function(){this.c.style.backgroundImage="";this.m=null};
  g.destroy=function(a){if(!1!==this.fb){null!==this.Z&&(this.Z.destroy(),this.Z=null,this.j.i18n.onLocaleChangeComplete.remove(this.xf,this));null!==this.U&&(this.U.destroy(),this.U=null);null!==this.J&&(this.J.destroy(),this.J=null);null!==this.R&&(this.R.destroy(),this.R=null);this.m=null;if("undefined"===typeof a||!0===a)if(!0===this.ca){a=this.j.i18n.locales;for(var b,d=0,e=a.length;d<e;d++)b=this.K+"_"+a[d],this.j.cache.remove(B.IMAGE,b)}else this.j.cache.remove(B.IMAGE,this.K);U.prototype.destroy.call(this)}};
  Object.defineProperty(Za.prototype,"loaded",{get:function(){return this.V}});Object.defineProperty(Za.prototype,"element",{get:function(){return this.m}});Object.defineProperty(Za.prototype,"canvas",{get:function(){return this.Ca}});Object.defineProperty(Za.prototype,"frame",{get:function(){return this.i},set:function(a){Kf(this,a)}});Object.defineProperty(Za.prototype,"frames",{get:function(){return this.ea}});Object.defineProperty(Za.prototype,"originalWidth",{get:function(){if(null!==this.m)return this.m.naturalWidth}});
  Object.defineProperty(Za.prototype,"originalHeight",{get:function(){if(null!==this.m)return this.m.naturalHeight}});Object.defineProperty(Za.prototype,"onLoadStart",{get:function(){null===this.U&&(this.U=new r(this));return this.U}});Object.defineProperty(Za.prototype,"onLoadComplete",{get:function(){null===this.J&&(this.J=new r(this));return this.J}});Object.defineProperty(Za.prototype,"onLoadError",{get:function(){null===this.R&&(this.R=new r(this));return this.R}});
  function fd(a,b){this.F=null;Za.call(this,a,b,"Sprite")}fd.prototype=Object.create(Za.prototype);g=fd.prototype;g.constructor=fd;g.Ma=function(){this.F=new Mf(this);Za.prototype.Ma.call(this);this.j.display.register(this,!0)};
  g.yf=function(a){Za.prototype.yf.call(this,a);"number"===typeof a.frameRate&&(this.F.frameRate=a.frameRate);!0===Array.isArray(a.animations)&&this.F.ia(a.animations);var b="number"===typeof a.frame&&!1===isNaN(a.frame)?a.frame:0;this.F.play("string"===typeof a.animation?a.animation:"default","boolean"===typeof a.loop?a.loop:!0,b);!0!==a.paused&&"number"!==typeof a.paused||this.F.pause(b)};g.play=function(a,b,d){this.F.play(a,b,d)};g.pause=function(a){this.F.pause(a)};g.resume=function(a){this.F.resume(a)};
  g.stop=function(){this.F.stop()};g.update=function(){this.F.update()};g.destroy=function(){!1!==this.fb&&(this.F.destroy(),this.F=null,Za.prototype.destroy.call(this))};Object.defineProperty(fd.prototype,"animations",{get:function(){return this.F}});Object.defineProperty(fd.prototype,"animation",{get:function(){return this.F.current}});
  function Mf(a){this.c=a;this.i={};this.o="default";this.m=30;this.f=[];n.call(this,"SpriteAnimationManager");this.add("default");!1===this.c.loaded&&this.c.onLoadComplete.ba(this.xp,this)}Mf.prototype=Object.create(n.prototype);g=Mf.prototype;g.constructor=Mf;g.xp=function(){for(var a,b,d=0,e=this.f.length;d<e;d++)a=this.f[d].method,b=this.f[d].args,Mf.prototype[a].apply(this,b);this.f=[]};
  g.ia=function(a){if(!0===Array.isArray(a))for(var b,d=0,e=a.length;d<e;d++)b=a[d],this.add(b.name,b.start,b.end,b.frameRate,b.loop)};
  g.add=function(a,b,d,e,h){if(!1===this.c.loaded)this.f.push({method:"add",args:arguments});else{a="string"===typeof a?a:"default";b=parseInt(b,10);d=parseInt(d,10);e="number"===typeof e?e:this.m;var k=this.c.frames;if("number"!==typeof b||!0===isNaN(b)||0>b||b>=k.length)b=0;if("number"!==typeof d||!0===isNaN(d)||0>d||d>=k.length)d=k.length-1;this.i[a]=new Nf(this.c,a,k.slice(b,d+1),e,"boolean"===typeof h?h:!0)}};
  g.play=function(a,b,d){!1===this.c.loaded?this.f.push({method:"play",args:[a,b,d]}):(a="string"===typeof a?a:null!==this.current?this.current.name:"default",b="boolean"===typeof b?b:!0,d="number"===typeof d&&!1===isNaN(d)?d:0,a=this.get(a),null!==a&&a.play(b,d))};g.pause=function(a){!1===this.c.loaded?this.f.push({method:"pause",args:[a]}):null!==this.current&&this.current.pause(a)};g.resume=function(a){!1===this.c.loaded?this.f.push({method:"resume",args:[a]}):null!==this.current&&this.current.resume(a)};
  g.stop=function(){!1===this.c.loaded?this.f.push({method:"stop",args:[]}):null!==this.current&&this.current.stop()};g.get=function(a){return!0===D.P(this.i[a],"SpriteAnimation")?this.i[a]:null};g.update=function(){null!==this.current&&this.current.update()};g.destroy=function(){for(var a in this.i)this.i[a].destroy(),this.i[a]=null;this.f=this.i=this.c=null;n.prototype.destroy.call(this)};
  Object.defineProperty(Mf.prototype,"frameRate",{get:function(){return this.m},set:function(a){"number"===typeof a&&(this.m=a)}});Object.defineProperty(Mf.prototype,"current",{get:function(){return this.get(this.o)},set:function(a){!0===D.P(a,"SpriteAnimation")&&(this.o=a.name)}});Object.defineProperty(Mf.prototype,"all",{get:function(){return this.i}});
  function Nf(a,b,d,e,h){this.I=a;this.aa=b;this.B=d||[];this.K=0;this.S=e||30;this.N=h||!1;this.X=0;this.C=1E3/e;this.F=this.H=0;this.O=1;this.J=this.f=this.G=!1;this.c=this.A=this.i=this.u=this.m=this.o=null;n.call(this,"SpriteAnimation")}Nf.prototype=Object.create(n.prototype);g=Nf.prototype;g.constructor=Nf;function Of(a,b){a.K="number"===typeof b&&0<=b&&b<a.B.length?b:0;a.I.frame=a.B[a.K].frame}
  g.play=function(a,b){"boolean"===typeof a&&(this.N=a);this.G=!0;this.f=this.J=!1;this.X=0;this.H=this.I.viewer.clock.time+this.C;Of(this,b);this.I.animations.current=this;null!==this.o&&this.o.D()};g.pause=function(a){!0!==this.f&&(this.f=!0,"number"===typeof a&&Of(this,a),null!==this.m&&this.m.D())};g.resume=function(a){!1!==this.f&&(this.f=!1,"number"===typeof a&&Of(this,a),this.G&&(this.H=this.I.viewer.clock.time+this.C),null!==this.u&&this.u.D())};
  g.stop=function(){this.G=!1;this.J=!0;this.f=!1;Of(this,0);null!==this.A&&this.A.D()};
  g.update=function(){if(!0!==this.f){var a=this.I.viewer.clock.time;!0===this.G&&a>=this.H&&(this.O=1,this.F=a-this.H,this.F>this.C&&(this.O=Math.floor(this.F/this.C),this.F-=this.O*this.C),this.H=a+(this.C-this.F),a=this.K+this.O,a>=this.B.length?!0===this.N?(a%=this.B.length,this.X++,null!==this.i&&this.i.D(),Of(this,a)):(Of(this,this.B.length-1),this.G=!1,this.J=!0,this.f=!1,null!==this.c&&this.c.D()):Of(this,a))}};
  g.destroy=function(){this.B=this.I=null;null!==this.o&&(this.o.destroy(),this.o=null);null!==this.m&&(this.m.destroy(),this.m=null);null!==this.u&&(this.u.destroy(),this.u=null);null!==this.c&&(this.c.destroy(),this.c=null);null!==this.i&&(this.i.destroy(),this.i=null);null!==this.A&&(this.A.destroy(),this.A=null);n.prototype.destroy.call(this)};Object.defineProperty(Nf.prototype,"name",{get:function(){return this.aa}});Object.defineProperty(Nf.prototype,"frames",{get:function(){return this.B}});
  Object.defineProperty(Nf.prototype,"frameIndex",{get:function(){return this.K}});Object.defineProperty(Nf.prototype,"frameRate",{get:function(){return this.S},set:function(a){"number"===typeof a&&(this.S=a,this.C=1E3/this.S)}});Object.defineProperty(Nf.prototype,"loop",{get:function(){return this.N},set:function(a){this.N=!!a}});Object.defineProperty(Nf.prototype,"loopCount",{get:function(){return this.X}});Object.defineProperty(Nf.prototype,"playing",{get:function(){return this.G}});
  Object.defineProperty(Nf.prototype,"paused",{get:function(){return this.f},set:function(a){!0===!!a?this.pause():this.resume()}});Object.defineProperty(Nf.prototype,"complete",{get:function(){return this.J}});Object.defineProperty(Nf.prototype,"onPlay",{get:function(){null===this.o&&(this.o=new r(this));return this.o}});Object.defineProperty(Nf.prototype,"onPause",{get:function(){null===this.m&&(this.m=new r(this));return this.m}});
  Object.defineProperty(Nf.prototype,"onResume",{get:function(){null===this.u&&(this.u=new r(this));return this.u}});Object.defineProperty(Nf.prototype,"onLoop",{get:function(){null===this.i&&(this.i=new r(this));return this.i}});Object.defineProperty(Nf.prototype,"onComplete",{get:function(){null===this.c&&(this.c=new r(this));return this.c}});Object.defineProperty(Nf.prototype,"onStop",{get:function(){null===this.A&&(this.A=new r(this));return this.A}});
  function Pf(a,b){this.ea=this.F=!1;this.Vf=this.bf=0;this.V=!1;U.call(this,a,null,b)}Pf.prototype=Object.create(U.prototype);g=Pf.prototype;g.constructor=Pf;g.Ma=function(){U.prototype.Ma.call(this);this.j.onPause.add(this.Sd,this);this.j.onResume.add(this.Sd,this)};
  g.Sd=function(a){var b=document[q.visibilityState];a=void 0===a.data.Hq;!0!==this.j.config.autoPause||"hidden"!==b&&!0!==a||!0!==this.F?!0!==this.j.config.autoResume||"visible"!==b&&!0!==a||!1!==this.F||!1!==this.V||this.play():(this.pause(),this.V=!1)};g.play=function(a,b){this.currentTime=a;this.loop=b};g.pause=function(){};g.destroy=function(){this.j.onPause.remove(this.Sd,this);this.j.onResume.remove(this.Sd,this);U.prototype.destroy.call(this)};Object.defineProperty(Pf.prototype,"playing",{get:function(){return this.F}});
  Object.defineProperty(Pf.prototype,"playCount",{get:function(){return this.bf}});Object.defineProperty(Pf.prototype,"canPlay",{get:function(){return this.ea}});Object.defineProperty(Pf.prototype,"paused",{get:function(){return this.V}});Object.defineProperty(Pf.prototype,"endCount",{get:function(){return this.Vf}});
  function K(a,b,d,e,h){this.ld=b;this.f=d||null;this.J=null;this.kd=e||Qf.cc;this.rb="";this.R=null;this.K=this.H=-1;this.eb=null;this.$b=!1;this.ub=null;this.zc=!1;this.tb=1;this.lb=!1;this.Rc=0;this.Gb=1;this.Zb=null;this.Yb=h||!1;this.jd=[0,1,2,3];this.Qc=!1;this.Ac=this.Bc=this.m=this.ac=this.bb=this.Lb=this.Hb=this.Jb=this.Kb=this.Ib=this.U=this.Ka=this.Z=this.Ha=this.Ia=this.La=this.Ya=this.Aa=this.Oa=this.Fa=this.Sa=this.cb=this.sa=this.qa=this.Qa=this.Ra=this.Za=this.ja=this.Ua=this.Ba=this.Ea=
  this.ha=this.ca=this.ka=this.Ga=this.va=this.wa=this.ua=null;Pf.call(this,a,"VideoHTML5")}K.prototype=Object.create(Pf.prototype);g=K.prototype;g.constructor=K;
  g.Ma=function(){Pf.prototype.Ma.call(this);!0===this.Yb&&!1===Rf(this)&&(this.Yb=!1);this.M=this.ld;ba(this);this.U=this.Xo.bind(this);this.Ib=this.Yo.bind(this);this.Kb=this.$o.bind(this);this.Jb=this.Zo.bind(this);this.Hb=this.Wo.bind(this);this.Lb=this.ap.bind(this);this.bb=this.Vo.bind(this);this.ac=this.bp.bind(this);this.m=this.Lo.bind(this);this.eb=this.j.clock.create(!1);this.ub=this.j.clock.create(!1);this.ub.Ff(500,this.Nn,this);this.j.audio.onVolumeChange.add(this.hj,this);this.j.audio.onDisable.add(this.gj,
  this);this.Z=new r(this,!0);null!==this.f&&this.load(this.f);this.j.display.register(this,Rf(this));ff(this);gf(this)};g.ya=function(a){var b=Sf(this);null!==b&&null!==b.element&&(b.element.setAttribute("width",this.pixelWidth),b.element.setAttribute("height",this.pixelHeight));U.prototype.ya.call(this,a)};function Tf(a,b){for(var d,e=0,h=a.R.length;e<h;e++)if(d=a.R[e],d===b)return e;return-1}function Uf(a,b){if(null===a.R)return null;a=a.R[b];return null!==a&&"undefined"!==typeof a?a:null}
  function Vf(a){return Uf(a,a.H)}function Sf(a){return Uf(a,a.K)}function Wf(a,b){a=Sf(a);return null!==a&&null!==a.element?a.element[b]:0}
  function Xf(a,b){if(-1!==b){b=a.R[b];var d=b.element;if("undefined"!==typeof d&&null!==d){d.removeEventListener("loadstart",a.m,!1);d.removeEventListener("durationchange",a.m,!1);d.removeEventListener("loadedmetadata",a.m,!1);d.removeEventListener("loadeddata",a.m,!1);d.removeEventListener("progress",a.m,!1);d.removeEventListener("canplay",a.m,!1);d.removeEventListener("canplaythrough",a.m,!1);d.removeEventListener("play",a.m,!1);d.removeEventListener("pause",a.m,!1);d.removeEventListener("timeupdate",
  a.m,!1);d.removeEventListener("volumechange",a.m,!1);d.removeEventListener("seeking",a.m,!1);d.removeEventListener("seeked",a.m,!1);d.removeEventListener("ended",a.m,!1);d.removeEventListener("error",a.m,!1);d.removeEventListener("waiting",a.m,!1);d.removeEventListener("stalled",a.m,!1);d.removeEventListener("playing",a.m,!1);d.removeEventListener("ratechange",a.m,!1);d.removeEventListener("error",a.U,!1);d.pause();d.src="";if(!0!==q.edge)for(var e,h=0,k=d.children.length;h<k;h++)e=d.children[h],
  e.removeEventListener("error",a.U,!1),e.src="",d.removeChild(e);d.load();d.parentNode===a.c&&a.c.removeChild(d)}b.element=null;null!==b.buffer&&(b.buffer.destroy(),b.buffer=null);null!==b.played&&(b.played.destroy(),b.played=null)}}
  function Yf(a,b,d){a.$b=d||!1;-1!==a.H&&a.H!==b&&Zf(a);d=b===a.H?!0:!1;a.H=b;null!==a.La&&a.La.D(b);if(b!==a.K&&!0!==d){d=a.H;var e=document.createElement("video");e.setAttribute("webkit-playsinline","true");e.setAttribute("playsinline","true");e.setAttribute("width",a.pixelWidth);e.setAttribute("height",a.pixelHeight);e.volume=0;e.playbackRate=a.Gb;e.crossOrigin="anonymous";e.id="FORGE-VideoHTML5-"+a.M+"-"+d;var h=new $f(e,"buffered"),k=new $f(e,"played");d=a.R[d];d.element=e;d.buffer=h;d.played=
  k;d.requestCount++;e=a.J[a.H];-1<a.K&&(d.element.addEventListener("loadstart",a.Ib,!1),d.element.addEventListener("error",a.U,!1));!0===q.edge?d.element.src=e.url:(h=document.createElement("source"),h.addEventListener("error",a.U,!1),h.src=e.url,h.type=e.mimeType,d.element.appendChild(h));a.Bc=a.Pj.bind(a);!0===Rf(a)?(a.i=a.j.audio.context,a.Zb=Omnitone.createFOADecoder(a.i,d.element,{channelMap:a.jd}),a.Ac=a.jo.bind(a),a.Zb.initialize().then(a.Bc,a.Ac)):a.Pj();-1===a.K?ag(a,b):(a.eb.add(2E4,a.rp,
  a),a.eb.start())}}g.Pj=function(){-1===this.H?Sf(this).element.load():Vf(this).element.load()};g.jo=function(){this.log("FOA decoder could not be initialized")};g.Yo=function(){var a=Vf(this).element;a.removeEventListener("loadstart",this.Ib,!1);a.addEventListener("loadedmetadata",this.Kb,!1)};g.$o=function(){var a=Vf(this).element;a.removeEventListener("loadedmetadata",this.Kb,!1);a.addEventListener("loadeddata",this.Jb,!1)};
  g.Zo=function(){var a=Vf(this).element;a.removeEventListener("loadeddata",this.Jb,!1);!0===q.desktop?(a.addEventListener("play",this.Hb,!1),a.play()):ag(this,this.H,!0)};g.Wo=function(){var a=Vf(this).element;a.pause();a.removeEventListener("play",this.Hb,!1);a.addEventListener("seeked",this.Lb,!1);var b=this.currentTime;a.currentTime=!0===this.F&&!1===this.$b?b+6:b};
  g.ap=function(){var a=Vf(this).element;a.removeEventListener("seeked",this.Lb,!1);a.readyState===HTMLMediaElement.HAVE_ENOUGH_DATA?(a.removeEventListener("error",this.U,!1),bg(this)):!0===q.edge||!0===q.ie?a.addEventListener("canplaythrough",this.bb,!1):a.addEventListener("canplay",this.bb,!1)};
  g.Vo=function(){var a=Vf(this).element;a.currentTime=this.currentTime;!0===q.edge||!0===q.ie?a.removeEventListener("canplaythrough",this.bb,!1):a.removeEventListener("canplay",this.bb,!1);a.removeEventListener("error",this.U,!1);bg(this)};
  function bg(a){var b=Sf(a);null!==b&&null!==b.element&&!1===a.$b&&(b.element.addEventListener("seeked",a.ac,!1),a.eb.Ff(10,a.Ep,a));if(!0!==q.edge)for(var b=Vf(a).element,d,e=0,h=b.children.length;e<h;e++)d=b.children[e],d.removeEventListener("error",a.U,!1);!0===a.$b&&ag(a,a.H)}g.bp=function(){var a=this.H;cg(this,!1);Yf(this,a)};g.Ep=function(){var a=Vf(this);null!==a&&this.currentTime>=a.element.currentTime&&this.currentTime<a.element.currentTime+.05&&ag(this,this.H)};g.rp=function(){cg(this,!0)};
  g.Xo=function(){cg(this,!0)};
  function ag(a,b,d){if(b!==a.K){a.c.innerHTML="";var e=Vf(a);!0===a.F&&e.element.play();dg(a,e);e.element.playbackRate=a.Gb;e=Sf(a);a.H=-1;a.K=b;b=Sf(a);b.currentCount++;!0===d&&null!==e&&(b.element.currentTime=e.element.currentTime);d=b.element;d.addEventListener("loadstart",a.m,!1);d.addEventListener("durationchange",a.m,!1);d.addEventListener("loadedmetadata",a.m,!1);d.addEventListener("loadeddata",a.m,!1);d.addEventListener("progress",a.m,!1);d.addEventListener("canplay",a.m,!1);d.addEventListener("canplaythrough",
  a.m,!1);d.addEventListener("play",a.m,!1);d.addEventListener("pause",a.m,!1);d.addEventListener("timeupdate",a.m,!1);d.addEventListener("volumechange",a.m,!1);d.addEventListener("seeking",a.m,!1);d.addEventListener("seeked",a.m,!1);d.addEventListener("ended",a.m,!1);d.addEventListener("error",a.m,!1);d.addEventListener("waiting",a.m,!1);d.addEventListener("stalled",a.m,!1);d.addEventListener("playing",a.m,!1);d.addEventListener("ratechange",a.m,!1);a.c.appendChild(b.element);null!==e&&null!==e.element&&
  (e.element.removeEventListener("seeked",a.ac,!1),d=Tf(a,e),-1!==d&&Xf(a,d));a.eb.stop(!0);null!==a.Ia&&a.Ia.D(a.K);""===a.rb&&eg(a,a.kd)}}
  g.Nn=function(){if(!1!==this.F&&-1===this.H){var a;a:{a=Sf(this);var b=a.element.currentTime;if(!1!==a.element.playing)if(b===a.lastTimeStamp){if(a.downCount++,3<=a.downCount){a.lastTimeStamp=0;a=!0;break a}}else a.lastTimeStamp=b,a.downCount=0;a=!1}!0===a?(Sf(this).leaveCount++,0<=this.K-1?Yf(this,this.K-1,!0):this.log("Can't downgrade video quality anymore!")):(a=Sf(this),!0===(null!==a&&null!==a.buffer&&a.buffer.Rl(a.element.currentTime,6)?!0:!1)&&this.K!==this.J.length-1&&(a=this.K+1,!this.R[a].abortCount&&
  1>=this.R[a].leaveCount?Yf(this,a):this.log("AutoQuality do not attempt to load an already aborted video")))}};function eg(a,b){!1===q.desktop&&(b=Qf.MANUAL,a.warn("Quality mode force to manual, you are not on desktop"));a.rb===b||b!==Qf.cc&&b!==Qf.MANUAL||(a.rb=b,a.ub.stop(!1),a.rb===Qf.cc&&a.ub.start(),null!==a.Ka&&a.Ka.D(a.rb))}function cg(a,b){var d=Vf(a);null!==d&&(!0===b&&d.abortCount++,Zf(a),a.eb.stop(!0),null!==a.Ha&&a.Ha.D())}
  function Zf(a){var b=Vf(a);if(null!==b){var d=b.element;d.removeEventListener("loadstart",a.Ib,!1);d.removeEventListener("loadedmetadata",a.Kb,!1);d.removeEventListener("loadeddata",a.Jb,!1);d.removeEventListener("play",a.Hb,!1);d.removeEventListener("seeked",a.Lb,!1);!0===q.edge||!0===q.ie?d.removeEventListener("canplaythrough",a.bb,!1):d.removeEventListener("canplay",a.bb,!1);d.removeEventListener("error",a.U,!1);b=Tf(a,b);-1!==b&&Xf(a,b);a.H=-1}}g.hj=function(){dg(this)};
  function dg(a,b){b=b||Sf(a);null!==b&&null!==b.element&&!0===a.j.audio.enabled&&(b.element.volume=a.tb*a.j.audio.volume)}g.gj=function(){var a=Sf(this);null!==a&&null!==a.element&&!1===this.j.audio.enabled&&(a.element.volume=0)};
  g.Lo=function(a){var b=Sf(this).element;switch(a.type){case "loadstart":null!==this.ua&&this.ua.D(a);break;case "durationchange":null!==this.ka&&b.readyState===HTMLMediaElement.HAVE_METADATA&&this.ka.D(a);break;case "loadedmetadata":this.Qc=!0;null!==this.wa&&this.wa.D(a);break;case "loadeddata":null!==this.va&&this.va.D(a);break;case "progress":null!==this.Ga&&this.Ga.D(a);break;case "canplay":this.ea=!0;null!==this.ca&&this.ca.D(a);break;case "canplaythrough":this.ea=!0;null!==this.ha&&this.ha.D(a);
  break;case "play":null!==this.Ea&&this.Ea.D(a);break;case "pause":this.F=!1;null!==this.Ba&&this.Ba.D(a);break;case "timeupdate":null!==this.Ua&&this.Ua.D(a);break;case "volumechange":null!==this.Za&&b.readyState!==HTMLMediaElement.HAVE_NOTHING&&this.Za.D(a);break;case "seeking":this.ea=!1;null!==this.Ra&&this.Ra.D(a);break;case "seeked":this.ea=!1;null!==this.Qa&&this.Qa.D(a);break;case "ended":this.F=!1;this.currentTime=0;this.Vf++;!0===this.zc&&this.play(0);null!==this.qa&&this.qa.D(a);break;case "error":null!==
  this.sa&&this.sa.D(a);break;case "waiting":null!==this.cb&&this.cb.D(a);break;case "stalled":null!==this.Sa&&this.Sa.D(a);break;case "playing":null!==this.Fa&&this.Fa.D(a);break;case "ratechange":null!==this.Oa&&this.Oa.D(a);break;default:this.warn('The event "'+a.type+'" is not handled.')}};function Rf(a){return!0===a.Yb&&!0===a.j.audio.useWebAudio&&"undefined"!==typeof Omnitone}g.update=function(){null!==this.Zb&&!0===this.F&&this.Zb.setRotationMatrixFromCamera(this.j.renderer.camera.modelViewInverse)};
  g.load=function(a){if(null!==a)if(!0===D.P(a,"string")?a=[a]:!0===D.P(a,"VideoQuality")&&(a=[a]),!0===D.za(a,"string")){for(var b=[],d,e=0,h=a.length;e<h;e++)d=new fg(a[e]),b.push(d);this.J=b}else!0===D.za(a,"VideoQuality")&&(this.J=a);null!==this.Z&&this.Z.D(this.J);if(null===this.J||!this.J.length)throw"$_VideoHTML5.load: Can't create video with no qualities set!";a=this.J.length;b=[];for(e=0;e<a;e++)d={index:e,element:null,buffer:null,played:null,requestCount:0,currentCount:0,abortCount:0,leaveCount:0,
  Gq:0,lastTimeStamp:0},b[e]=d;this.R=b;Yf(this,0)};g.play=function(a,b){Pf.prototype.play.call(this,a,b);a=Sf(this);null!==a&&null!==a.element&&(a=a.element.play(),"undefined"!==typeof a&&"undefined"!==typeof Promise&&a instanceof Promise?a.then(function(){this.F=!0;this.V=!1;this.bf++}.bind(this)).catch(function(a){this.log("error while playing the video : "+a)}.bind(this)):(this.V=this.F=!0,this.bf++))};
  g.pause=function(){var a=Sf(this);null!==a&&null!==a.element&&(a.element.pause(),this.F=!1,this.V=!0)};g.stop=function(){var a=Sf(this);null!==a&&null!==a.element&&(a.element.pause(),a.element.currentTime=0,this.F=!1,this.V=!0)};g.Bn=function(){!0===this.F||!1===this.j.audio.enabled?this.pause():this.play()};g.ob=function(){!0!==this.lb&&!1!==this.j.audio.enabled&&(this.lb=!0,this.Rc=this.tb,this.tb=0,dg(this),null!==this.Aa&&this.Aa.D())};
  g.ij=function(a){!1!==this.lb&&(a="number"===typeof a?a:this.Rc,this.lb=!1,this.tb=H.$(a,0,1),dg(this),null!==this.Ya&&this.Ya.D())};
  g.destroy=function(){Zf(this);this.eb.destroy();this.eb=null;this.ub.destroy();this.ub=null;null!==this.ua&&(this.ua.destroy(),this.ua=null);null!==this.wa&&(this.wa.destroy(),this.wa=null);null!==this.va&&(this.va.destroy(),this.va=null);null!==this.Ga&&(this.Ga.destroy(),this.Ga=null);null!==this.ka&&(this.ka.destroy(),this.ka=null);null!==this.ca&&(this.ca.destroy(),this.ca=null);null!==this.ha&&(this.ha.destroy(),this.ha=null);null!==this.Ea&&(this.Ea.destroy(),this.Ea=null);null!==this.Ba&&(this.Ba.destroy(),
  this.Ba=null);null!==this.Ua&&(this.Ua.destroy(),this.Ua=null);null!==this.ja&&(this.ja.destroy(),this.ja=null);null!==this.Za&&(this.Za.destroy(),this.Za=null);null!==this.Ra&&(this.Ra.destroy(),this.Ra=null);null!==this.Qa&&(this.Qa.destroy(),this.Qa=null);null!==this.qa&&(this.qa.destroy(),this.qa=null);null!==this.sa&&(this.sa.destroy(),this.sa=null);null!==this.cb&&(this.cb.destroy(),this.cb=null);null!==this.Sa&&(this.Sa.destroy(),this.Sa=null);null!==this.Fa&&(this.Fa.destroy(),this.Fa=null);
  null!==this.Oa&&(this.Oa.destroy(),this.Oa=null);null!==this.Aa&&(this.Aa.destroy(),this.Aa=null);null!==this.Ya&&(this.Ya.destroy(),this.Ya=null);null!==this.La&&(this.La.destroy(),this.La=null);null!==this.Ia&&(this.Ia.destroy(),this.Ia=null);null!==this.Ha&&(this.Ha.destroy(),this.Ha=null);null!==this.Ka&&(this.Ka.destroy(),this.Ka=null);null!==this.Z&&(this.Z.destroy(),this.Z=null);for(var a=0,b=this.R.length;a<b;a++)Xf(this,a);this.m=this.ac=this.bb=this.Lb=this.Hb=this.Jb=this.Kb=this.Ib=this.U=
  this.Ac=this.Bc=null;this.j.audio.onVolumeChange.remove(this.hj,this);this.j.audio.onDisable.remove(this.gj,this);this.R=this.J=this.f=null;Pf.prototype.destroy.call(this)};
  Object.defineProperty(K.prototype,"quality",{get:function(){return this.J[this.K]},set:function(a){if("number"===typeof a&&0<=a&&a<this.J.length)eg(this,Qf.MANUAL),Yf(this,a);else if(!0===D.P(a,"VideoQuality")){a:{for(var b,d=0,e=this.J.length;d<e;d++)if(b=this.J[d],b===a){a=d;break a}a=-1}if(-1!==a)eg(this,Qf.MANUAL),Yf(this,a);else throw"Unknown quality";}else throw"Video quality "+a+" out of bounds";}});
  Object.defineProperty(K.prototype,"qualityMode",{get:function(){return this.rb},set:function(a){a!==Qf.cc&&a!==Qf.MANUAL||eg(this,a)}});Object.defineProperty(K.prototype,"qualities",{get:function(){return this.J}});Object.defineProperty(K.prototype,"requestIndex",{get:function(){return this.H}});Object.defineProperty(K.prototype,"currentIndex",{get:function(){return this.K}});Object.defineProperty(K.prototype,"videos",{get:function(){return this.R}});
  Object.defineProperty(K.prototype,"element",{get:function(){var a=Sf(this);return null!==a&&null!==a.element?a.element:null}});Object.defineProperty(K.prototype,"buffer",{get:function(){var a=Sf(this);return null!==a&&null!==a.buffer?a.buffer:null}});Object.defineProperty(K.prototype,"played",{get:function(){var a=Sf(this);return null!==a&&null!==a.played?a.played:null}});Object.defineProperty(K.prototype,"originalWidth",{get:function(){return Wf(this,"videoWidth")}});
  Object.defineProperty(K.prototype,"originalHeight",{get:function(){return Wf(this,"videoHeight")}});Object.defineProperty(K.prototype,"currentTime",{get:function(){return Wf(this,"currentTime")},set:function(a){if("number"===typeof a){var b=Sf(this);null!==b&&null!==b.element&&(b.element.currentTime=a,null!==this.ja&&this.ja.D(a))}}});Object.defineProperty(K.prototype,"currentTimeMS",{get:function(){return 1E3*this.currentTime},set:function(a){this.currentTime=a/1E3}});
  Object.defineProperty(K.prototype,"remainingTime",{get:function(){return this.duration-this.currentTime}});Object.defineProperty(K.prototype,"duration",{get:function(){return Wf(this,"duration")}});Object.defineProperty(K.prototype,"durationMS",{get:function(){return Math.round(1E3*this.duration)}});Object.defineProperty(K.prototype,"metaDataLoaded",{get:function(){return this.Qc}});
  Object.defineProperty(K.prototype,"loop",{get:function(){return this.zc},set:function(a){"boolean"===typeof a&&(this.zc=a)}});Object.defineProperty(K.prototype,"volume",{get:function(){return this.tb},set:function(a){"number"===typeof a&&(this.tb=H.$(a,0,1),this.lb=!1,dg(this))}});Object.defineProperty(K.prototype,"muted",{get:function(){return this.lb},set:function(a){!0===!!a?this.ob():this.ij()}});
  Object.defineProperty(K.prototype,"playbackRate",{get:function(){return this.Gb},set:function(a){"number"===typeof a&&(this.Gb=Math.abs(a),a=Sf(this),null!==a&&null!==a.element&&(a.element.playbackRate=this.Gb))}});Object.defineProperty(K.prototype,"ambisonic",{get:function(){return this.Yb}});Object.defineProperty(K.prototype,"onLoadStart",{get:function(){null===this.ua&&(this.ua=new r(this));return this.ua}});
  Object.defineProperty(K.prototype,"onLoadedMetaData",{get:function(){null===this.wa&&(this.wa=new r(this));return this.wa}});Object.defineProperty(K.prototype,"onLoadedData",{get:function(){null===this.va&&(this.va=new r(this));return this.va}});Object.defineProperty(K.prototype,"onProgress",{get:function(){null===this.Ga&&(this.Ga=new r(this));return this.Ga}});Object.defineProperty(K.prototype,"onDurationChange",{get:function(){null===this.ka&&(this.ka=new r(this));return this.ka}});
  Object.defineProperty(K.prototype,"onCanPlay",{get:function(){null===this.ca&&(this.ca=new r(this));return this.ca}});Object.defineProperty(K.prototype,"onCanPlayThrough",{get:function(){null===this.ha&&(this.ha=new r(this));return this.ha}});Object.defineProperty(K.prototype,"onPlay",{get:function(){null===this.Ea&&(this.Ea=new r(this));return this.Ea}});Object.defineProperty(K.prototype,"onPause",{get:function(){null===this.Ba&&(this.Ba=new r(this));return this.Ba}});
  Object.defineProperty(K.prototype,"onTimeUpdate",{get:function(){null===this.Ua&&(this.Ua=new r(this));return this.Ua}});Object.defineProperty(K.prototype,"onCurrentTimeChange",{get:function(){null===this.ja&&(this.ja=new r(this));return this.ja}});Object.defineProperty(K.prototype,"onVolumeChange",{get:function(){null===this.Za&&(this.Za=new r(this));return this.Za}});Object.defineProperty(K.prototype,"onSeeking",{get:function(){null===this.Ra&&(this.Ra=new r(this));return this.Ra}});
  Object.defineProperty(K.prototype,"onSeeked",{get:function(){null===this.Qa&&(this.Qa=new r(this));return this.Qa}});Object.defineProperty(K.prototype,"onEnded",{get:function(){null===this.qa&&(this.qa=new r(this));return this.qa}});Object.defineProperty(K.prototype,"onError",{get:function(){null===this.sa&&(this.sa=new r(this));return this.sa}});Object.defineProperty(K.prototype,"onWaiting",{get:function(){null===this.cb&&(this.cb=new r(this));return this.cb}});
  Object.defineProperty(K.prototype,"onStalled",{get:function(){null===this.Sa&&(this.Sa=new r(this));return this.Sa}});Object.defineProperty(K.prototype,"onPlaying",{get:function(){null===this.Fa&&(this.Fa=new r(this));return this.Fa}});Object.defineProperty(K.prototype,"onRateChange",{get:function(){null===this.Oa&&(this.Oa=new r(this));return this.Oa}});Object.defineProperty(K.prototype,"onMute",{get:function(){null===this.Aa&&(this.Aa=new r(this));return this.Aa}});
  Object.defineProperty(K.prototype,"onUnmute",{get:function(){null===this.Ya&&(this.Ya=new r(this));return this.Ya}});Object.defineProperty(K.prototype,"onQualityRequest",{get:function(){null===this.La&&(this.La=new r(this));return this.La}});Object.defineProperty(K.prototype,"onQualityChange",{get:function(){null===this.Ia&&(this.Ia=new r(this));return this.Ia}});Object.defineProperty(K.prototype,"onQualityAbort",{get:function(){null===this.Ha&&(this.Ha=new r(this));return this.Ha}});
  Object.defineProperty(K.prototype,"onQualityModeChange",{get:function(){null===this.Ka&&(this.Ka=new r(this));return this.Ka}});Object.defineProperty(K.prototype,"onQualitiesLoaded",{get:function(){null===this.Z&&(this.Z=new r(this,!0));return this.Z}});
  function J(a,b,d,e){this.Ln=b;this.f=d||null;this.eb="";this.Ra=null;this.In=e||Qf.cc;this.bb="";this.m=null;this.Qf=!1;this.Ya=1;this.Qa=!1;this.vj=0;this.rb=1;this.uj=!1;this.lb=this.i=null;this.Tf=this.Rf=this.Sa=this.cb=0;this.Yb=this.Xf=this.Ac=this.Bc=this.ac=this.Qc=this.kd=this.Za=this.Ib=this.Rc=this.jd=this.Td=this.ld=this.Zb=this.$b=this.Gb=this.ub=this.Hb=this.zc=this.Kb=this.Lb=this.Jb=this.Oa=this.Aa=this.H=this.Ua=this.wa=this.Ba=this.ua=this.Ea=this.Ha=this.ca=this.Z=this.Fa=this.Ga=
  this.Ka=this.R=this.Ia=this.qa=this.sa=this.K=this.J=this.U=this.va=this.ja=this.ka=this.ha=this.tb=this.La=this.Wd=this.ae=null;Pf.call(this,a,"VideoDash")}J.prototype=Object.create(Pf.prototype);J.prototype.constructor=J;var gg={VIDEO:"video",AUDIO:"audio"};g=J.prototype;
  g.Ma=function(){Pf.prototype.Ma.call(this);if("undefined"===typeof dashjs)throw"$_VideoDash._boot: Can't create MPEG-DASH video stream without dash.js Media Player.";this.M=this.Ln;ba(this);this.Jb=this.No.bind(this);this.Hb=this.Jo.bind(this);this.Lb=this.vn.bind(this);this.Kb=this.Oo.bind(this);this.zc=this.Ro.bind(this);this.ub=this.Io.bind(this);this.Gb=this.tn.bind(this);this.$b=this.xn.bind(this);this.Zb=this.wn.bind(this);this.ld=this.hp.bind(this);this.Td=this.op.bind(this);this.jd=this.ep.bind(this);
  this.Rc=this.yn.bind(this);this.Ib=this.un.bind(this);this.Za=this.Ko.bind(this);this.kd=this.fp.bind(this);this.Qc=this.Uo.bind(this);this.ac=this.Qo.bind(this);this.Bc=this.To.bind(this);this.Ac=this.So.bind(this);this.Xf=this.gp.bind(this);this.Yb=this.Po.bind(this);this.j.audio.onVolumeChange.add(this.ej,this);this.j.audio.onDisable.add(this.dj,this);this.H=new r(this,!0);null!==this.f&&this.load(this.f);this.j.display.register(this);ff(this);gf(this)};
  g.ya=function(a){var b=this.m;null!==b&&null!==b.element&&(b.element.setAttribute("width",this.pixelWidth),b.element.setAttribute("height",this.pixelHeight));U.prototype.ya.call(this,a)};function hg(a,b){a=a.m;return null!==a&&null!==a.element?a.element[b]:0}
  g.No=function(a){var b=this.eb,d=this.i.getBitrateInfoListFor(gg.VIDEO),e=[],h;if(null!==d){for(var k=0,l=d.length;k<l;k++)h=new fg(b),h.id=d[k].qualityIndex,h.bitrate=d[k].bitrate,h.width=d[k].width,h.height=d[k].height,e.push(h);this.Ra=e;null!==this.H&&this.H.D(e)}else this.destroy();null!==this.ha&&this.ha.D(a)};g.gp=function(a){this.lb=a.toStreamInfo};
  g.Po=function(a){null===this.ae&&(this.ae=this.i.getMetricsFor(gg.VIDEO));null===this.Wd&&(this.Wd=this.i.getMetricsFor(gg.AUDIO));null===this.La&&(this.La=this.i.getDashMetrics());if(null!==this.Oa){var b;a.mediaType===gg.VIDEO&&(b=ig(this,gg.VIDEO,this.ae,this.La))&&(this.tb={videoBitrate:b.bitrate,videoIndex:b.index,videoPendingIndex:b.bm,videoMaxIndex:b.Wl,videoBufferLength:b.ml,videoDroppedFrames:b.droppedFrames});a.mediaType===gg.AUDIO&&(b=ig(this,gg.AUDIO,this.Wd,this.La))&&(this.tb={audioBitrate:b.bitrate,
  audioIndex:b.index,audioPendingIndex:b.bm,audioMaxIndex:b.Wl,audioBufferLength:b.ml,audioDroppedFrames:b.droppedFrames});this.Oa.D(a)}};
  function ig(a,b,d,e){if(null!==d&&null!==e){var h=a.lb.index,k,l,t,v,C,ea;k=e.getCurrentRepresentationSwitch(d);null!==k&&(l=Math.round(e.getBandwidthForRepresentation(k.to,h)/1E3));if(isNaN(l)||void 0===l)l=0;b===gg.VIDEO?(t=a.cb+1,v=a.Sa+1):b===gg.AUDIO&&(t=a.Rf+1,v=a.Tf+1);if(isNaN(t)||void 0===t)t=0;if(isNaN(v)||void 0===v)v=0;a=e.getMaxIndexForBufferType(b,h);if(isNaN(a)||void 0===a)a=0;b=e.getCurrentBufferLevel(d);null!==b&&(C=b.toPrecision(5));if(isNaN(C)||void 0===C)C=0;d=e.getCurrentDroppedFrames(d);
  null!==d&&(ea=d.droppedFrames);return{bitrate:l,index:t,bm:v,Wl:a,ml:C,droppedFrames:ea}}return null}g.So=function(a){a.mediaType===gg.AUDIO?this.Tf=this.Rf=a.newQuality:a.mediaType===gg.VIDEO&&(this.Sa=this.cb=a.newQuality,null!==this.wa&&this.wa.D(this.Sa))};g.To=function(a){a.mediaType===gg.AUDIO?(this.Rf=a.oldQuality,this.Tf=a.newQuality):a.mediaType===gg.VIDEO&&(this.cb=a.oldQuality,this.Sa=a.newQuality,null!==this.Ba&&this.Ba.D(this.Sa))};
  g.Jo=function(a){var b=this.m.element;null!==this.U&&b.readyState===HTMLMediaElement.HAVE_METADATA&&this.U.D(a)};g.vn=function(a){this.uj=!0;null!==this.ka&&this.ka.D(a)};g.Oo=function(a){null!==this.ja&&this.ja.D(a)};g.Ro=function(a){null!==this.va&&this.va.D(a)};g.Io=function(a){this.ea=!0;null!==this.J&&this.J.D(a)};g.tn=function(a){this.ea=!0;null!==this.K&&this.K.D(a)};g.xn=function(a){null!==this.sa&&this.sa.D(a)};g.wn=function(a){this.F=!1;null!==this.qa&&this.qa.D(a)};
  g.hp=function(a){null!==this.Ia&&this.Ia.D(a)};g.op=function(a){var b=this.m.element;null!==this.Ka&&b.readyState!==HTMLMediaElement.HAVE_NOTHING&&this.Ka.D(a)};g.ep=function(a){this.ea=!1;null!==this.Ga&&this.Ga.D(a)};g.yn=function(a){this.ea=!1;null!==this.Fa&&this.Fa.D(a)};g.un=function(a){this.F=!1;this.Vf++;!0===this.Qf&&this.play();null!==this.Z&&this.Z.D(a)};g.Ko=function(a){null!==this.ca&&this.ca.D(a)};g.fp=function(a){null!==this.Ha&&this.Ha.D(a)};g.Uo=function(a){null!==this.Ea&&this.Ea.D(a)};
  g.Qo=function(a){null!==this.ua&&this.ua.D(a)};g.dj=function(){var a=this.m;null!==a&&null!==a.element&&!1===this.j.audio.enabled&&this.i.setVolume(0)};g.ej=function(){jg(this)};function jg(a){var b=a.m;null!==b&&null!==b.element&&!0===a.j.audio.enabled&&(a.i.setVolume(a.Ya*a.j.audio.volume),!0===a.Qa?a.i.setMute(!0):a.i.setMute(!1))}
  function kg(a,b){a.Sa=b;if(null!==a.lb&&null!==a.i&&!0===a.i.isReady()&&null!==a.La){var d=a.lb.index,e=a.La.getMaxIndexForBufferType(gg.VIDEO,d),d=a.La.getMaxIndexForBufferType(gg.AUDIO,d),h=b;h>=e&&(h=e-1);0>h&&(h=0);b>=d&&(b=d-1);0>b&&(b=0);a.i.setQualityFor(gg.VIDEO,h);a.i.setQualityFor(gg.AUDIO,b)}jg(a)}
  function lg(a,b){a.bb===b||b!==Qf.cc&&b!==Qf.MANUAL||(a.bb=b,null!==a.i&&!0===a.i.isReady()&&(b===Qf.MANUAL?(a.i.setAutoSwitchQualityFor(gg.VIDEO,!1),a.i.setAutoSwitchQualityFor(gg.AUDIO,!1)):(a.i.setAutoSwitchQualityFor(gg.VIDEO,!0),a.i.setAutoSwitchQualityFor(gg.AUDIO,!0))),null!==a.Aa&&a.Aa.D(a.bb))}
  g.load=function(a){null!==a&&(!0===D.P(a,"string")?a=[a]:!0===D.P(a,"VideoQuality")&&(a=[a]),!0===D.za(a,"string")?this.eb=a[0]:!0===D.za(a,"VideoQuality")&&(this.eb=a[0].url));if(""===this.eb)throw"$_VideoDash : Can't create video with no manifest!";this.m={index:0,element:null,buffer:null,played:null};a=document.createElement("video");a.setAttribute("webkit-playsinline","webkit-playsinline");a.setAttribute("width",this.pixelWidth);a.setAttribute("height",this.pixelHeight);a.volume=0;a.playbackRate=
  this.rb;a.crossOrigin="anonymous";a.id="FORGE-VideoDash-"+this.M;var b=new $f(a,"buffered"),d=new $f(a,"played"),e=this.m;e.element=a;e.buffer=b;e.played=d;e.lastTimeStamp=0;this.i=dashjs.MediaPlayer().create();this.i.getDebug().setLogToBrowserConsole(!1);this.i.initialize();this.i.setAutoPlay(!1);this.i.setScheduleWhilePaused(!0);this.i.setFastSwitchEnabled(!0);this.i.attachView(this.m.element);this.i.attachSource(this.eb);!0===this.i.isReady()&&(this.i.on(dashjs.MediaPlayer.events.CAN_PLAY,this.ub),
  this.i.on(dashjs.MediaPlayer.events.ERROR,this.Za),this.i.on(dashjs.MediaPlayer.events.PLAYBACK_ENDED,this.Ib),this.i.on(dashjs.MediaPlayer.events.PLAYBACK_ERROR,this.Za),this.i.on(dashjs.MediaPlayer.events.PLAYBACK_METADATA_LOADED,this.Lb),this.i.on(dashjs.MediaPlayer.events.PLAYBACK_PAUSED,this.Zb),this.i.on(dashjs.MediaPlayer.events.PLAYBACK_PROGRESS,this.zc),this.i.on(dashjs.MediaPlayer.events.PLAYBACK_SEEKING,this.jd),this.i.on(dashjs.MediaPlayer.events.PLAYBACK_SEEKED,this.Rc),this.i.on(dashjs.MediaPlayer.events.PLAYBACK_STARTED,
  this.$b),this.i.on(dashjs.MediaPlayer.events.PLAYBACK_TIME_UPDATED,this.ld),this.i.on(dashjs.MediaPlayer.events.QUALITY_CHANGE_RENDERED,this.Ac),this.i.on(dashjs.MediaPlayer.events.QUALITY_CHANGE_REQUESTED,this.Bc),this.i.on(dashjs.MediaPlayer.events.STREAM_INITIALIZED,this.Jb),this.i.on(dashjs.MediaPlayer.events.PLAYBACK_PLAYING,this.ac),this.i.on(dashjs.MediaPlayer.events.BUFFER_EMPTY,this.kd),this.i.on(dashjs.MediaPlayer.events.PLAYBACK_RATE_CHANGED,this.Qc),this.i.on(dashjs.MediaPlayer.events.PERIOD_SWITCH_COMPLETED,
  this.Xf),this.i.on(dashjs.MediaPlayer.events.METRIC_CHANGED,this.Yb),this.m.element.addEventListener("loadeddata",this.Kb,!1),this.m.element.addEventListener("durationchange",this.Hb,!1),this.m.element.addEventListener("canplaythrough",this.Gb,!1),this.m.element.addEventListener("volumechange",this.Td,!1),this.c.innerHTML="",this.c.appendChild(this.m.element));""===this.bb&&lg(this,this.In)};
  g.play=function(a,b){Pf.prototype.play.call(this,a,b);null!==this.i&&!0===this.i.isReady()&&(this.i.play(),this.F=!0,this.V=!1,this.bf++)};g.pause=function(){null!==this.i&&!0===this.i.isReady()&&(this.i.pause(),this.F=!1,this.V=!0)};g.stop=function(){null!==this.i&&!0===this.i.isReady()&&(this.i.pause(),this.i.seek(0),this.m.element.currentTime=0,this.F=!1,this.V=!0)};g.An=function(){!0===this.F||!1===this.j.audio.enabled?this.pause():this.play()};
  g.ob=function(){!0!==this.Qa&&!1!==this.j.audio.enabled&&(this.Qa=!0,this.vj=this.Ya,this.Ya=0,jg(this))};g.fj=function(a){!1!==this.Qa&&(a="number"===typeof a?a:this.vj,this.Qa=!1,this.Ya=H.$(a,0,1),jg(this))};g.zn=function(a){null!==this.i&&!0===this.i.isReady()&&this.i.enableBufferOccupancyABR(a)};
  g.destroy=function(){null!==this.i&&!0===this.i.isReady()&&(this.i.off(dashjs.MediaPlayer.events.CAN_PLAY,this.ub),this.i.off(dashjs.MediaPlayer.events.ERROR,this.Za),this.i.off(dashjs.MediaPlayer.events.PLAYBACK_ENDED,this.Ib),this.i.off(dashjs.MediaPlayer.events.PLAYBACK_ERROR,this.Za),this.i.off(dashjs.MediaPlayer.events.PLAYBACK_METADATA_LOADED,this.Lb),this.i.off(dashjs.MediaPlayer.events.PLAYBACK_PAUSED,this.Zb),this.i.off(dashjs.MediaPlayer.events.PLAYBACK_PROGRESS,this.zc),this.i.off(dashjs.MediaPlayer.events.PLAYBACK_SEEKING,
  this.jd),this.i.off(dashjs.MediaPlayer.events.PLAYBACK_SEEKED,this.Rc),this.i.off(dashjs.MediaPlayer.events.PLAYBACK_STARTED,this.$b),this.i.off(dashjs.MediaPlayer.events.PLAYBACK_TIME_UPDATED,this.ld),this.i.off(dashjs.MediaPlayer.events.QUALITY_CHANGE_RENDERED,this.Ac),this.i.off(dashjs.MediaPlayer.events.QUALITY_CHANGE_REQUESTED,this.Bc),this.i.off(dashjs.MediaPlayer.events.STREAM_INITIALIZED,this.Jb),this.i.off(dashjs.MediaPlayer.events.PLAYBACK_PLAYING,this.ac),this.i.off(dashjs.MediaPlayer.events.BUFFER_EMPTY,
  this.kd),this.i.off(dashjs.MediaPlayer.events.PLAYBACK_RATE_CHANGED,this.Qc),this.i.off(dashjs.MediaPlayer.events.PERIOD_SWITCH_COMPLETED,this.Xf),this.i.off(dashjs.MediaPlayer.events.METRIC_CHANGED,this.Yb),this.m.element.removeEventListener("loadeddata",this.Kb,!1),this.m.element.removeEventListener("durationchange",this.Hb,!1),this.m.element.removeEventListener("canplaythrough",this.Gb,!1),this.m.element.removeEventListener("volumechange",this.Td,!1),this.i.pause(),this.i.reset());var a=this.m,
  b=a.element;"undefined"!==typeof b&&null!==b&&b.parentNode===this.c&&this.c.removeChild(b);a.element=null;null!==a.buffer&&(a.buffer.destroy(),a.buffer=null);null!==a.played&&(a.played.destroy(),a.played=null);null!==this.ha&&(this.ha.destroy(),this.ha=null);null!==this.ka&&(this.ka.destroy(),this.ka=null);null!==this.ja&&(this.ja.destroy(),this.ja=null);null!==this.va&&(this.va.destroy(),this.va=null);null!==this.U&&(this.U.destroy(),this.U=null);null!==this.J&&(this.J.destroy(),this.J=null);null!==
  this.K&&(this.K.destroy(),this.K=null);null!==this.sa&&(this.sa.destroy(),this.sa=null);null!==this.qa&&(this.qa.destroy(),this.qa=null);null!==this.Ia&&(this.Ia.destroy(),this.Ia=null);null!==this.R&&(this.R.destroy(),this.R=null);null!==this.Ka&&(this.Ka.destroy(),this.Ka=null);null!==this.Ga&&(this.Ga.destroy(),this.Ga=null);null!==this.Fa&&(this.Fa.destroy(),this.Fa=null);null!==this.Z&&(this.Z.destroy(),this.Z=null);null!==this.ca&&(this.ca.destroy(),this.ca=null);null!==this.Ha&&(this.Ha.destroy(),
  this.Ha=null);null!==this.Ea&&(this.Ea.destroy(),this.Ea=null);null!==this.ua&&(this.ua.destroy(),this.ua=null);null!==this.Ba&&(this.Ba.destroy(),this.Ba=null);null!==this.wa&&(this.wa.destroy(),this.wa=null);null!==this.Ua&&(this.Ua.destroy(),this.Ua=null);null!==this.H&&(this.H.destroy(),this.H=null);null!==this.Aa&&(this.Aa.destroy(),this.Aa=null);null!==this.Oa&&(this.Oa.destroy(),this.Oa=null);this.Yb=this.Ac=this.Bc=this.Qc=this.kd=this.ac=this.Za=this.Ib=this.Rc=this.jd=this.Td=this.ld=this.Zb=
  this.$b=this.Gb=this.ub=this.Hb=this.zc=this.Kb=this.Lb=this.Jb=null;this.j.audio.onVolumeChange.remove(this.ej,this);this.j.audio.onDisable.remove(this.dj,this);this.m=this.Ra=this.f=this.lb=this.tb=this.La=this.Wd=this.ae=this.i=null;Pf.prototype.destroy.call(this)};Object.defineProperty(J.prototype,"monitoring",{get:function(){return this.tb}});
  Object.defineProperty(J.prototype,"quality",{get:function(){return this.Ra[this.cb]},set:function(a){if("number"===typeof a&&0<=a&&a<this.Ra.length)lg(this,Qf.MANUAL),kg(this,a);else if(!0===D.P(a,"VideoQuality")){a:{for(var b,d=0,e=this.Ra.length;d<e;d++)if(b=this.Ra[d],b===a){a=d;break a}a=-1}if(-1!==a)lg(this,Qf.MANUAL),kg(this,a);else throw"Unknown quality";}else throw"Video quality "+a+" out of bounds";}});
  Object.defineProperty(J.prototype,"qualityMode",{get:function(){return this.bb},set:function(a){a!==Qf.cc&&a!==Qf.MANUAL||lg(this,a)}});Object.defineProperty(J.prototype,"qualities",{get:function(){return this.Ra}});Object.defineProperty(J.prototype,"requestIndex",{get:function(){return this.Sa}});Object.defineProperty(J.prototype,"currentIndex",{get:function(){return this.cb}});Object.defineProperty(J.prototype,"video",{get:function(){return this.m}});
  Object.defineProperty(J.prototype,"element",{get:function(){var a=this.m;return null!==a&&null!==a.element?a.element:null}});Object.defineProperty(J.prototype,"buffer",{get:function(){var a=this.m;return null!==a&&null!==a.buffer?a.buffer:null}});Object.defineProperty(J.prototype,"played",{get:function(){var a=this.m;return null!==a&&null!==a.played?a.played:null}});Object.defineProperty(J.prototype,"originalWidth",{get:function(){return hg(this,"videoWidth")}});
  Object.defineProperty(J.prototype,"originalHeight",{get:function(){return hg(this,"videoHeight")}});Object.defineProperty(J.prototype,"currentTime",{get:function(){return this.i.time()},set:function(a){"number"===typeof a&&(this.i.seek(a),null!==this.R&&this.R.D(a))}});Object.defineProperty(J.prototype,"currentTimeMS",{get:function(){return 1E3*this.currentTime},set:function(a){this.currentTime=a/1E3}});Object.defineProperty(J.prototype,"remainingTime",{get:function(){return this.duration-this.currentTime}});
  Object.defineProperty(J.prototype,"duration",{get:function(){return this.i.duration()}});Object.defineProperty(J.prototype,"durationMS",{get:function(){return Math.round(1E3*this.duration)}});Object.defineProperty(J.prototype,"metaDataLoaded",{get:function(){return this.uj}});Object.defineProperty(J.prototype,"loop",{get:function(){return this.Qf},set:function(a){"boolean"===typeof a&&(this.Qf=a)}});
  Object.defineProperty(J.prototype,"volume",{get:function(){return this.Ya},set:function(a){"number"===typeof a&&(this.Ya=H.$(a,0,1),this.Qa=!1,jg(this))}});Object.defineProperty(J.prototype,"muted",{get:function(){return this.Qa},set:function(a){!0===!!a?this.ob():this.fj()}});Object.defineProperty(J.prototype,"playbackRate",{get:function(){return this.rb},set:function(a){"number"===typeof a&&(this.rb=Math.abs(a),null!==this.m&&null!==this.m.element&&(this.m.element.playbackRate=this.rb))}});
  Object.defineProperty(J.prototype,"onLoadStart",{get:function(){null===this.ha&&(this.ha=new r(this));return this.ha}});Object.defineProperty(J.prototype,"onLoadedMetaData",{get:function(){null===this.ka&&(this.ka=new r(this));return this.ka}});Object.defineProperty(J.prototype,"onLoadedData",{get:function(){null===this.ja&&(this.ja=new r(this));return this.ja}});Object.defineProperty(J.prototype,"onProgress",{get:function(){null===this.va&&(this.va=new r(this));return this.va}});
  Object.defineProperty(J.prototype,"onDurationChange",{get:function(){null===this.U&&(this.U=new r(this));return this.U}});Object.defineProperty(J.prototype,"onCanPlay",{get:function(){null===this.J&&(this.J=new r(this));return this.J}});Object.defineProperty(J.prototype,"onCanPlayThrough",{get:function(){null===this.K&&(this.K=new r(this));return this.K}});Object.defineProperty(J.prototype,"onPlay",{get:function(){null===this.sa&&(this.sa=new r(this));return this.sa}});
  Object.defineProperty(J.prototype,"onPause",{get:function(){null===this.qa&&(this.qa=new r(this));return this.qa}});Object.defineProperty(J.prototype,"onTimeUpdate",{get:function(){null===this.Ia&&(this.Ia=new r(this));return this.Ia}});Object.defineProperty(J.prototype,"onCurrentTimeChange",{get:function(){null===this.R&&(this.R=new r(this));return this.R}});Object.defineProperty(J.prototype,"onVolumeChange",{get:function(){null===this.Ka&&(this.Ka=new r(this));return this.Ka}});
  Object.defineProperty(J.prototype,"onSeeking",{get:function(){null===this.Ga&&(this.Ga=new r(this));return this.Ga}});Object.defineProperty(J.prototype,"onSeeked",{get:function(){null===this.Fa&&(this.Fa=new r(this));return this.Fa}});Object.defineProperty(J.prototype,"onEnded",{get:function(){null===this.Z&&(this.Z=new r(this));return this.Z}});Object.defineProperty(J.prototype,"onError",{get:function(){null===this.ca&&(this.ca=new r(this));return this.ca}});
  Object.defineProperty(J.prototype,"onStalled",{get:function(){null===this.Ha&&(this.Ha=new r(this));return this.Ha}});Object.defineProperty(J.prototype,"onRateChange",{get:function(){null===this.Ea&&(this.Ea=new r(this));return this.Ea}});Object.defineProperty(J.prototype,"onWaiting",{get:function(){return this.onStalled}});Object.defineProperty(J.prototype,"onPlaying",{get:function(){null===this.ua&&(this.ua=new r(this));return this.ua}});
  Object.defineProperty(J.prototype,"onQualityRequest",{get:function(){null===this.Ba&&(this.Ba=new r(this));return this.Ba}});Object.defineProperty(J.prototype,"onQualityChange",{get:function(){null===this.wa&&(this.wa=new r(this));return this.wa}});Object.defineProperty(J.prototype,"onQualityAbort",{get:function(){null===this.Ua&&(this.Ua=new r(this));return this.Ua}});Object.defineProperty(J.prototype,"onMetricsChanged",{get:function(){null===this.Oa&&(this.Oa=new r(this));return this.Oa}});
  Object.defineProperty(J.prototype,"onQualitiesLoaded",{get:function(){null===this.H&&(this.H=new r(this,!0));return this.H}});Object.defineProperty(J.prototype,"onQualityModeChange",{get:function(){null===this.Aa&&(this.Aa=new r(this));return this.Aa}});function $f(a,b){this.f=a;this.c=b;n.call(this,"VideoTimeRanges")}$f.prototype=Object.create(n.prototype);$f.prototype.constructor=$f;
  $f.prototype.i=function(a){var b=this.f[this.c];if(!this.length)return this.warn("No available range for now"),null;if(a>this.length-1)return this.warn("Time range out of bounds, returning the last available range"),this.i(this.length-1);if(0>a)return this.warn("Time range out of bounds, returning the first available range"),this.i(0);var d=b.start(a);a=b.end(a);return{start:d,end:a}};
  $f.prototype.Rl=function(a,b){"number"!==typeof b&&(b=0);for(var d=this.f[this.c],e,h,k=this.length;k--;)if(e=d.start(k),h=d.end(k),a>=e&&a+b<=h)return!0;return!1};Object.defineProperty($f.prototype,"length",{get:function(){return this.f[this.c].length}});function fg(a){this.i="";this.m=a||"";this.o=this.f="";this.c=this.u=this.A=0;n.call(this,"VideoQuality")}fg.prototype=Object.create(n.prototype);fg.prototype.constructor=fg;
  function mg(a){var b=["mp4","webm","ogg"];a=Ka(a);if(""!==a.extension&&-1!==b.indexOf(a.extension))return"video/"+a.extension;b=["mpd"];return""!==a.extension&&-1!==b.indexOf(a.extension)?"application/dash+xml":""}Object.defineProperty(fg.prototype,"id",{get:function(){return this.i},set:function(a){if("number"===typeof a||"string"===typeof a)this.i=a}});Object.defineProperty(fg.prototype,"url",{get:function(){return this.m},set:function(a){"string"===typeof a&&(this.m=a)}});
  Object.defineProperty(fg.prototype,"mimeType",{get:function(){""===this.f&&""!==this.m&&(this.f=mg(this.m));return this.f}});Object.defineProperty(fg.prototype,"name",{get:function(){return this.o},set:function(a){"string"===typeof a&&(this.o=a)}});Object.defineProperty(fg.prototype,"framerate",{get:function(){return 0}});Object.defineProperty(fg.prototype,"bitrate",{get:function(){return this.A},set:function(a){"number"===typeof a&&(this.A=a)}});
  Object.defineProperty(fg.prototype,"width",{get:function(){return this.u},set:function(a){"number"===typeof a&&(this.u=a)}});Object.defineProperty(fg.prototype,"height",{get:function(){return this.c},set:function(a){"number"===typeof a&&(this.c=a)}});Object.defineProperty(fg.prototype,"speed",{get:function(){return 1}});var Qf={cc:"auto",MANUAL:"manual"},cb={Kf:"dash",Hn:"html5",te:"unknown"};function ya(a){this.j=a;this.i=new Ua;this.m=new Ua;this.c=new Ua;this.f=new Ua;this.M=0}
  var B={JSON:"json",pc:"xml",IMAGE:"image",Fb:"sound"},ng={qd:["forge","forgejs","FORGE"]};ng.JSON=["forge.story.config"].concat(ng.qd);ng.pc=[].concat(ng.qd);ng.IMAGE=[].concat(ng.qd);ng.Fb=[].concat(ng.qd);function og(a,b){var d=null;switch(b){case B.JSON:d=a.i;break;case B.pc:d=a.m;break;case B.IMAGE:d=a.c;break;case B.Fb:d=a.f}return d}function pg(a,b,d){var e=og(a,b),h=(d||"FORGE-cache")+"-"+a.M;a.M++;return!1===e.has(h)&&!1===qg(b,h)?h:pg(a,b,d)}
  function qg(a,b){var d=null;switch(a){case B.JSON:d=ng.JSON;break;case B.pc:d=ng.pc;break;case B.IMAGE:d=ng.IMAGE;break;case B.Fb:d=ng.Fb}a=d;return null!==a?-1!==a.indexOf(b.toLowerCase()):!1}g=ya.prototype;g.has=function(a,b){a=og(this,a);return null!==a?a.has(b):!1};g.get=function(a,b){return!0===this.has(a,b)&&(a=og(this,a),null!==a)?a.get(b):null};
  g.add=function(a,b,d){var e;(e="string"!==typeof b||""===b)||(e=og(this,a),e=!0===(!0===qg(a,b)&&!0===e.has(b)));e&&(b=pg(this,a,a+"-cache"));return!1===this.has(b,a)&&(a=og(this,a),null!==a)?(a.set(b,d),!0):!1};g.remove=function(a,b){return!0===this.has(a,b)&&(a=og(this,a),null!==a)?(a.delete(b),!0):!1};g.destroy=function(){this.f=this.c=this.i=this.j=null};function rg(){}g=rg.prototype;g.key="";g.url="";g.type="";g.data=null;g.Cq=null;g.Wb=!1;g.vm=!1;g.um="";g.constructor=rg;
  function za(a){this.j=a;n.call(this,"Loader")}za.prototype=Object.create(n.prototype);g=za.prototype;g.constructor=za;g.json=function(a,b,d,e,h,k){var l=new rg;l.type="json";l.key=a;l.url=b;l.f=d;l.c=e;l.i=h;l.M=k;sg(this,l,"text",this.uo,this.vo)};
  g.uo=function(a,b){if(b.responseText){if(a.data=Object(JSON.parse(b.responseText)),!1===this.j.cache.has(B.JSON,a.key)?this.j.cache.add(B.JSON,a.key,a):this.log("$_Loader.json : JSON file already exists"),"function"===typeof a.f&&null!==a.c){b=a.f;var d=a.c;a.f=null;a.c=null;a.i=null;a.M=null;b.call(d,a)}}else throw"$_Loader.json : JSON file empty ?";};
  g.vo=function(a,b){if(b.responseText){if("function"===typeof a.i&&null!==a.M){b=a.i;var d=a.M;a.f=null;a.c=null;a.i=null;a.M=null;b.call(d,a)}}else throw"$_Loader.json : JSON file empty ?";};g.Hm=function(a,b,d,e,h,k){h=new rg;h.type="xml";h.key=a;h.url=b;h.f=d;h.c=e;h.i=d;h.M=k;sg(this,h,"document",this.Fp,this.Gp)};
  g.Fp=function(a,b){if(b.responseXML){if(a.data=b.responseXML,!1===this.j.cache.has(B.pc,a.key)?this.j.cache.add(B.pc,a.key,a):this.log("$_Loader.xml : XML file already exists"),"function"===typeof a.f&&null!==a.c){b=a.f;var d=a.c;a.f=null;a.c=null;a.i=null;a.M=null;b.call(d,a)}}else throw"$_Loader.xml : XML file empty ?";};
  g.Gp=function(a,b){if(b.responseXML){if("function"===typeof a.i&&null!==a.M){b=a.i;var d=a.M;a.f=null;a.c=null;a.i=null;a.M=null;b.call(d,a)}}else throw"$_Loader.xml : JSON file empty ?";};g.sound=function(a,b,d,e,h){var k=new rg;k.type="sound";k.key=a;k.url=b;k.f=d;k.c=e;!0===this.j.audio.useWebAudio&&!0!==h?sg(this,k,"arraybuffer",this.Vk):!0!==this.j.audio.useAudioTag&&!0!==h||tg(k,this.Vk,this)};
  g.Vk=function(a,b){!0===this.j.audio.useWebAudio&&"undefined"!==typeof b&&(a.data=b.response);this.j.cache.add(B.Fb,a.key,a);"function"===typeof a.f&&null!==a.c&&a.f.call(a.c,a)};
  function tg(a,b,d){function e(){this.removeEventListener("canplay",h);this.removeEventListener("error",e);throw"$_Loader : Could not load HTMLMediaElement "+a.url;}function h(){this.removeEventListener("canplay",h);this.removeEventListener("error",e);"function"===typeof b&&(a.data=this,b.call(d,a))}var k=new Audio;k.addEventListener("canplay",h);k.addEventListener("error",e);k.preload="auto";k.crossOrigin="anonymous";k.src=a.url;k.load()}
  function sg(a,b,d,e,h){b.Wb=!0;var k=new XMLHttpRequest;k.open("GET",b.url,!0);k.responseType=d;k.onreadystatechange=function(){if(k.readyState===XMLHttpRequest.DONE){if(200!==k.status&&k.status)throw"$_Loader._xhr : Could not load "+b.url;this.onreadystatechange=null;"function"===typeof e&&(b.loaded=!0,e.call(this,b,k))}}.bind(a);k.onerror=function(){"function"===typeof h&&h.call(this,b,k)}.bind(a);k.send()}
  g.image=function(a,b,d,e,h){var k=new rg;k.type="image";k.key=a;k.url=b;k.data=new Image;k.data.crossOrigin="anonymous";k.data.onload=function(){k.data.onload=null;k.data.onerror=null;k.Wb=!1;k.loaded=!0;this.j.cache.add(B.IMAGE,k.key,k);"function"===typeof d&&d.call(h,k)}.bind(this);k.data.onerror=function(){k.data.onload=null;k.data.onerror=null;if("function"===typeof e)e.call(h,k);else throw"ERROR : $_Loader.image, failed to load image key : "+a+" at url "+b;};k.data.src=k.url;k.Wb=!0};
  g.em=function(a,b,d){for(var e=document.getElementsByTagName("head")[0],h=e.getElementsByTagName("script"),k=0,l=h.length;k<l;k++)if(h[k].src===a){this.warn("Attempt to load an already loaded script!");b.call(d);return}var t=document.createElement("script");t.type="text/javascript";t.onload=function(){t.onload=null;b.call(d)};t.src=a;e.appendChild(t)};
  g.pl=function(a,b,d){var e=document.createElement("link");e.type="text/css";e.rel="stylesheet";"undefined"!==typeof b&&"undefined"!==typeof d&&(e.onload=function(){e.onload=null;b.call(d)});e.href=a;document.getElementsByTagName("head")[0].appendChild(e)};g.destroy=function(){this.j=null;n.prototype.destroy.call(this)};function la(a){this.j=a;this.c=0;this.f=null;n.call(this,"Clock");this.c=Date.now();this.f=[]}la.prototype=Object.create(n.prototype);g=la.prototype;g.constructor=la;
  g.ip=function(a){a:{if(null!==this.f)for(var b,d=0,e=this.f.length;d<e;d++)if(b=this.f[d],b===a.emitter){a=d;break a}a=-1}-1!==a&&this.f.splice(a,1)};g.create=function(a){return this.add(new X(this.j,a))};g.add=function(a){this.f.push(a);a.onDestroy.add(this.ip,this);return a};g.update=function(){this.c=Date.now();for(var a=0,b=this.f.length;a<b;a++)this.f[a].update(this.c)};g.destroy=function(){this.j=null;for(var a=this.f.length;a--;)this.f[a].destroy();this.f=null};
  Object.defineProperty(la.prototype,"time",{get:function(){return this.c}});function X(a,b){this.j=a;this.N="undefined"!==typeof b?b:!0;this.I=0;this.i=!1;this.H=this.J=0;this.m=!1;this.c=0;this.F=!1;this.u=this.G=this.B=this.A=this.C=this.f=null;n.call(this,"Timer");this.f=[];this.c=Date.now()}X.prototype=Object.create(n.prototype);g=X.prototype;g.constructor=X;function ug(a,b){for(var d=0;d<a.f.length;d++){var e=a.f[d];if(!1===e.c){var h=e.f-b;0>h&&(h=0);e.f=a.c+h}}b=a.o-b;a.o=0>b?a.c:a.c+b}
  function vg(a){0<a.f.length&&(a.f.sort(a.vp),a.o=a.f[0].f)}g.vp=function(a,b){return a.f<b.f?-1:a.f>b.f?1:0};g.create=function(a,b,d,e,h,k){var l=a=Math.round(a);this.c?l+=this.c:l+=this.j.clock.time;a=new wg(0,a,l,d,b,e,h,k);this.f.push(a);vg(this);this.F=!1;return a};g.add=function(a,b,d,e){return this.create(a,!1,0,b,d,Array.prototype.splice.call(arguments,3))};g.sn=function(a,b,d,e){return this.create(a,!1,b,d,e,Array.prototype.splice.call(arguments,4))};
  g.Ff=function(a,b,d){return this.create(a,!0,0,b,d,Array.prototype.splice.call(arguments,3))};g.remove=function(a){for(var b=0;b<this.f.length;b++)if(this.f[b]===a)return this.f[b].c=!0;return!1};g.start=function(){if(!0!==this.i){this.I=this.j.clock.time;this.i=!0;for(var a,b=0;b<this.f.length;b++)a=this.f[b],a.f=a.delay+this.I;null!==this.C&&this.C.D()}};g.stop=function(a){this.i=!1;!1!==a&&(this.f.length=0);null!==this.G&&this.G.D()};
  g.pause=function(){!1!==this.i&&!0!==this.m&&(this.J=this.j.clock.time,this.m=!0,null!==this.A&&this.A.D())};g.resume=function(){if(!1!==this.m){var a=this.j.clock.time;this.H+=a-this.c;this.c=a;ug(this,this.J);this.m=!1;null!==this.B&&this.B.D()}};
  g.update=function(a){if(!0!==this.m){var b=a-this.c;this.c=a;1E3<b&&ug(this,a-b);for(a=this.f.length;a--;)!0===this.f[a].c&&this.f.splice(a,1);a=this.f.length;var d=b=0;if(!0===this.i&&this.c>=this.o&&0<a){for(var e;b<a&&!0===this.i;)if(e=this.f[b],this.c>=e.f&&!1===e.c){var h=this.c+e.delay-(this.c-e.f);0>h&&(h=this.c+e.delay);!0===e.loop?e.f=h:0<e.i?(e.i--,e.f=h):(d++,e.c=!0);e.Vb();b++}else break;this.f.length>d?vg(this):(this.F=!0,this.i=!1,null!==this.u&&this.u.D())}this.F&&this.N&&this.destroy()}};
  g.destroy=function(){this.i=!1;this.f=[];n.prototype.destroy.call(this)};Object.defineProperty(X.prototype,"autoDestroy",{get:function(){return this.N}});Object.defineProperty(X.prototype,"running",{get:function(){return this.i}});Object.defineProperty(X.prototype,"paused",{get:function(){return this.m}});Object.defineProperty(X.prototype,"next",{get:function(){return this.o}});Object.defineProperty(X.prototype,"duration",{get:function(){return this.i&&this.o>this.c?this.o-this.c:0}});
  Object.defineProperty(X.prototype,"length",{get:function(){return this.f.length}});Object.defineProperty(X.prototype,"ms",{get:function(){return this.i?this.c-this.I-this.H:0}});Object.defineProperty(X.prototype,"seconds",{get:function(){return this.i?.001*this.ms:0}});Object.defineProperty(X.prototype,"onStart",{get:function(){null===this.C&&(this.C=new r(this));return this.C}});Object.defineProperty(X.prototype,"onPause",{get:function(){null===this.A&&(this.A=new r(this));return this.A}});
  Object.defineProperty(X.prototype,"onResume",{get:function(){null===this.B&&(this.B=new r(this));return this.B}});Object.defineProperty(X.prototype,"onStop",{get:function(){null===this.G&&(this.G=new r(this));return this.G}});Object.defineProperty(X.prototype,"onComplete",{get:function(){null===this.u&&(this.u=new r(this));return this.u}});function wg(a,b,d,e,h,k,l,t){this.delay=b;this.f=d;this.i=e-1;this.loop=h;this.m=k;this.o=l;this.M=t;this.c=!1}wg.prototype.constructor=wg;
  wg.prototype.Vb=function(){this.m.apply(this.o,this.M)};function Aa(a){this.j=a;this.f=[];n.call(this,"TweenManager")}Aa.prototype=Object.create(n.prototype);g=Aa.prototype;g.constructor=Aa;g.Cp=function(a){this.remove(a.emitter)};g.add=function(a){this.f.push(a);a.onDestroy.ba(this.Cp,this)};g.remove=function(a){a:{for(var b=0,d=this.f.length;b<d;b++)if(a===this.f[b]){a=b;break a}a=-1}-1!==a&&this.f.splice(a,1)};g.update=function(){for(var a=0,b=this.f.length;a<b;a++)this.f[a].update()};
  g.destroy=function(){for(var a=this.f.length;a--;)this.f[a].destroy();this.j=this.f=null;n.prototype.destroy.call(this)};function hc(a,b){this.j=a;this.B=b;this.c=null;this.f=Ve.LINEAR;this.G=null;this.A=this.C=this.I=!1;this.u=this.i=this.m=this.o=null;n.call(this,"Tween")}hc.prototype=Object.create(n.prototype);g=hc.prototype;g.constructor=hc;
  g.Gf=function(a,b,d){null===this.c&&(this.c={});for(var e in a)this.c[e]={name:e,min:null,max:a[e],duration:"number"===typeof b?b:0,easing:"function"===typeof d?d:null,started:!1,complete:!1,startTime:null};return this};g.start=function(){this.G=Date.now();this.I=!0;this.A=this.C=!1;var a,b;for(b in this.c)a=this.c[b],a.min=this.B[b],a.max="string"===typeof this.c[b].max?a.min+parseInt(this.c[b].max,10):a.max,a.started=!0,a.startTime=this.G;null!==this.o&&this.o.D();return this};
  g.stop=function(){this.C=!0;null!==this.u&&this.u.D();return this};g.update=function(){if(!1!==this.I&&!0!==this.A&&!0!==this.C){var a,b=0,d;for(d in this.c){a=this.c[d];if(!1===a.complete){var e=a,h=Date.now()-e.startTime;e.complete=h>=e.duration;!1===e.complete?(h=(null!==e.easing?e.easing:this.f)(h/e.duration),this.B[e.name]=h*(e.max-e.min)+e.min):this.B[e.name]=e.max}!1===a.complete&&b++}null!==this.m&&this.m.D();b||(this.A=!0,null!==this.i&&this.i.D())}};
  g.destroy=function(){this.stop();this.f=this.c=this.B=this.j=null;null!==this.o&&(this.o.destroy(),this.o=null);null!==this.m&&(this.m.destroy(),this.m=null);null!==this.i&&(this.i.destroy(),this.i=null);null!==this.u&&(this.u.destroy(),this.u=null);n.prototype.destroy.call(this)};
  Object.defineProperty(hc.prototype,"easing",{get:function(){return this.f},set:function(a){if("string"===typeof a)switch(a){case Y.LINEAR:this.f=Ve.LINEAR;break;case Y.pe:this.f=Ve.pe;break;case Y.qe:this.f=Ve.qe;break;case Y.re:this.f=Ve.re;break;case Y.le:this.f=Ve.le;break;case Y.me:this.f=Ve.me;break;case Y.ne:this.f=Ve.ne;break;case Y.Xd:this.f=Ve.Xd;break;case Y.Yd:this.f=Ve.Yd;break;case Y.Zd:this.f=Ve.Zd;break;case Y.pd:this.f=Ve.pd;break;case Y.Vd:this.f=Ve.Vd;break;default:this.f=Ve.LINEAR}else"function"===
  typeof a&&(this.f=a)}});Object.defineProperty(hc.prototype,"complete",{get:function(){return this.A}});Object.defineProperty(hc.prototype,"onStart",{get:function(){null===this.o&&(this.o=new r(this));return this.o}});Object.defineProperty(hc.prototype,"onProgress",{get:function(){null===this.m&&(this.m=new r(this));return this.m}});Object.defineProperty(hc.prototype,"onComplete",{get:function(){null===this.i&&(this.i=new r(this));return this.i}});
  Object.defineProperty(hc.prototype,"onStop",{get:function(){null===this.u&&(this.u=new r(this));return this.u}});
  var Ve={LINEAR:function(a){return H.$(a,0,1)},pe:function(a){return H.$(1+Math.sin(Math.PI/2*(a-1)),0,1)},qe:function(a){return H.$(.5*(1+Math.sin(Math.PI/2*(2*a-1))),0,1)},re:function(a){return H.$(Math.sin(Math.PI/2*a),0,1)},le:function(a){return H.$(a*a,0,1)},me:function(a){return H.$(.5>a?2*a*a:1-2*(a-1)*(a-1),0,1)},ne:function(a){a=1-a;return H.$(1-a*a,0,1)},Xd:function(a){return H.$(a*a*a,0,1)},Yd:function(a){return H.$(.5>a?4*a*a*a:1+4*(a-1)*(a-1)*(a-1),0,1)},Zd:function(a){a=1-a;return H.$(1-
  a*a*a,0,1)},pd:function(a){a<1/2.75?a*=7.5625*a:a<2/2.75?(a-=1.5/2.75,a=7.5625*a*a+.75):a<2.5/2.75?(a-=2.25/2.75,a=7.5625*a*a+.9375):(a-=2.625/2.75,a=7.5625*a*a+.984375);return H.$(a,0,1)},Vd:function(a){return 1-Ve.pd(1-a)}},Y={LINEAR:"linear",pe:"easeInSine",qe:"easeInOutSine",re:"easeOutSine",le:"easeInQuad",me:"easeInOutQuad",ne:"easeOutQuad",Xd:"easeInCubic",Yd:"easeInOutCubic",Zd:"easeOutCubic",pd:"easeOutBounce",Vd:"easeInBounce"},D={Gh:function(a){var b={value:null,hd:null};if("string"===
  typeof a){var d=parseInt(a,10);!1===isNaN(d)&&(b.value=d);-1<a.indexOf("%")?b.hd="%":-1<a.indexOf("px")&&(b.hd="px")}return b},ta:function(a,b,d){var e={};a="undefined"!==typeof a?a:{};b="undefined"!==typeof b?b:{};for(var h in a)a.hasOwnProperty(h)&&(e[h]=a[h]);for(var k in b)b.hasOwnProperty(k)&&(e[k]=!1!==d&&null!==a&&null!==b[k]&&"undefined"!==typeof b[k]&&b[k].constructor===Object?D.ta(a[k],b[k],!0):b[k]);return e},hb:function(a){for(var b=arguments,d={},e=0,h=b.length;e<h;e++)d=D.ta(d,b[e],
  !0);return d},ed:function(a,b){if(typeof a!==typeof b)return!1;if("function"===typeof a)return a.toString()===b.toString();if(a instanceof Object&&b instanceof Object){if(D.uh(a)!==D.uh(b))return!1;for(var d in a)if(!1===D.ed(a[d],b[d]))return!1;return!0}return a===b},uh:function(a){var b=0,d;for(d in a)a.hasOwnProperty(d)&&b++;return b},clone:function(a){if(!(a instanceof Object))return a;var b=new a.constructor,d;for(d in a)b[d]=D.clone(a[d]);return b},fq:function(a){return null!==a&&"object"===
  typeof a&&"string"===typeof a.className&&-1!==ef.indexOf(a.className)?!0:!1},P:function(a,b){if("string"===typeof b&&(null!==a&&"object"===typeof a&&"string"===typeof a.className&&a.className.toLowerCase()===b.toLowerCase()||typeof a===b.toLowerCase()))return!0;if(!0===Array.isArray(b)&&!0===D.za(b,"string"))for(var d=0,e=b.length;d<e;d++)if(!0===D.P(a,b[d]))return!0;return!1},iq:function(a,b,d){b=b.split(".");for(var e=0,h=b.length;e<h;e++){a=a[b[e]];if(e===h-1)return D.P(a,d);if("undefined"===typeof a)break}return!1},
  za:function(a,b){if("object"===typeof a&&!0===Array.isArray(a)){for(var d=0,e=a.length;d<e;d++)if(!1===D.P(a[d],b))return!1;return!0}return!1},Ve:function(a,b,d){b=b.split(".");for(var e=0,h=b.length;e<h;e++){a=a[b[e]];if("undefined"===typeof a)break;if(e===h-1)return a}return d},Pc:function(a,b){var d=b.split("."),e=d.length;a.sort(function(a,b){for(var h=0;h<e;)a=a[d[h]],b=b[d[h]],h++;return a<b?-1:a>b?1:0});return a},Ld:function(a){a=a.slice();for(var b,d,e=a.length-1;0<e;e--)d=~~(Math.random()*
  (e+1)),b=a[e],a[e]=a[d],a[d]=b;return a},cf:function(a,b,d){for(a=String(a);a.length<d;)a=b+a;return a},$l:function(a){a={input:a,hours:0,minutes:0,seconds:0};if("number"!==typeof a.input||isNaN(a.input))return a;a.bq=parseInt(a.input/3600,10)%24;a.kq=parseInt(a.input/60,10)%60;a.seconds=parseInt(a.input%60,10);return a},Pp:function(a,b){a=D.$l(a);var d="string"===typeof b?b:"H:M:S";b=0;-1!==d.indexOf("H")?b=2:-1!==d.indexOf("h")&&(b=1);var e=0;-1!==d.indexOf("M")?e=2:-1!==d.indexOf("m")&&(e=1);var h=
  0;-1!==d.indexOf("S")?h=2:-1!==d.indexOf("s")&&(h=1);d=d.toLowerCase();0<b&&(d=d.replace("h",D.cf(a.bq,0,b)));0<e&&(d=d.replace("m",D.cf(a.kq,0,e)));0<h&&(d=d.replace("s",D.cf(a.seconds,0,h)));return d},kl:function(a,b){return a.filter(function(a){return 0>b.indexOf(a)})},ll:function(a){return a.filter(function(a,d,e){return e.indexOf(a)===d})},nq:function(a,b){return b>=a.length?null:a.splice(b,1)},endsWith:function(a,b){return"function"!==typeof String.prototype.endsWith?-1!==a.indexOf(b,a.length-
  b.length):a.endsWith(b)},th:function(a){if(!Array.prototype.keys){var b,d={},e=0;b=a.length;d.array=[];for(d.length=a.length;0<b;)d.array[--b]=b;d.next=function(){return e<a.length?{value:e++,done:!1}:{done:!0}};return d}return a.keys()},Fh:function(){var a,b,d=new Promise(function(d,h){a=d;b=h});d.resolve=a;d.reject=b;return d}},ia={Cd:function(a,b){var d=window.getComputedStyle(a,null).getPropertyValue("display");a.style.display="none";b=window.getComputedStyle(a,null).getPropertyValue(b);a.style.display=
  d;return b},Hl:function(a){a=ia.Cd(a,"width");var b="px";-1<a.indexOf("%")&&(b="%");-1<a.indexOf("px")&&(b="px");return b},Jl:function(a){a=parseInt(ia.Cd(a,"width"),10);return isNaN(a)?0:a},Gl:function(a){a=ia.Cd(a,"height");var b="px";-1<a.indexOf("%")&&(b="%");-1<a.indexOf("px")&&(b="px");return b},Il:function(a){a=parseInt(ia.Cd(a,"height"),10);return isNaN(a)?0:a},has:function(a){return document.body.contains(a)},Bh:function(a){return a instanceof HTMLElement},Sp:function(a){var b,d;d=["MouseEvent",
  "PointerEvent","TouchEvent"];"object"===typeof a.srcEvent&&d.indexOf(a.srcEvent.constructor.toString())?(b=a.target.getBoundingClientRect(),d=a.srcEvent.clientX-b.left,a=a.srcEvent.clientY-b.top):(b=(a.currentTarget||a.target||a.srcElement).getBoundingClientRect(),d=a.clientX-b.left,a=a.clientY-b.top);return{x:d,y:a}}};function Ua(){this.c=0;this.f={}}g=Ua.prototype;g.constructor=Ua;g.set=function(a,b){if("undefined"!==typeof a)return void 0===this.f[a]&&this.c++,this.f[a]=b,this.c};
  g.delete=function(a){if("undefined"!==typeof a&&void 0!==this.f[a])return delete this.f[a],--this.c};g.get=function(a){return this.f[a]};g.Im=function(){var a=new Je,b;for(b in this.f)a.add(b);return a.lf()};g.Jm=function(){var a=new Je,b;for(b in this.f)a.add(this.f[b]);return a.lf()};g.zf=function(){var a=new Je,b;for(b in this.f){var d=[];d.push(b);d.push(this.f[b]);a.add(d)}return a.lf()};g.Ai=function(){for(var a in this.f)this.delete(a)};g.has=function(a){return 0<this.c&&void 0!==this.f[a]};
  Object.defineProperty(Ua.prototype,"size",{get:function(){return this.c}});function Je(){this.f=[]}g=Je.prototype;g.constructor=Je;g.add=function(a){this.f.push(a);return this.f.length};g.remove=function(a){for(var b=0,d=this.f.length;b<d;b++)this.f[b]===a&&this.f.splice(b,1)};g.get=function(a){return this.f[a]};g.lf=function(){return this.f};Object.defineProperty(Je.prototype,"size",{get:function(){return this.f.length}});
  function xg(a){this.m=a;this.f=this.C=this.c=this.A=this.u=this.B="";this.o=null;this.i="";n.call(this,"URL")}xg.prototype=Object.create(n.prototype);xg.prototype.constructor=xg;
  function Ka(a){var b=new xg;"string"!==typeof a&&(a=window.location.toString());b.m=a;a=document.createElement("a");a.href=b.m;b.B=a.protocol;b.u=a.hostname;b.A=a.port;b.c=a.pathname;b.C=a.search;b.f=a.hash;b.i=b.c.substr(b.c.lastIndexOf(".")+1);if(""!==b.f){a=b.f.replace("#","").split("&");var d={};d.slug=a[0];for(var e=1,h=a.length;e<h;e++){var k=a[e].split("=");d[k[0]]=decodeURIComponent(k[1])}b.o=d}return b}Object.defineProperty(xg.prototype,"url",{get:function(){return this.m}});
  Object.defineProperty(xg.prototype,"protocol",{get:function(){return this.B}});Object.defineProperty(xg.prototype,"host",{get:function(){return this.u}});Object.defineProperty(xg.prototype,"port",{get:function(){return this.A}});Object.defineProperty(xg.prototype,"path",{get:function(){return this.c}});Object.defineProperty(xg.prototype,"query",{get:function(){return this.C}});Object.defineProperty(xg.prototype,"hash",{get:function(){return this.f}});
  Object.defineProperty(xg.prototype,"hashParameters",{get:function(){return this.o}});Object.defineProperty(xg.prototype,"extension",{get:function(){return this.i}});
  var Z={pq:function(a,b,d){a/=255;b/=255;d/=255;var e=Math.max(a,b,d),h=Math.min(a,b,d),k,l=(e+h)/2;if(e===h)k=h=0;else{var t=e-h,h=.5<l?t/(2-e-h):t/(e+h);switch(e){case a:k=(b-d)/t+(b<d?6:0);break;case b:k=(d-a)/t+2;break;case d:k=(a-b)/t+4}k/=6}return{h:k,s:h,l:l}},cq:function(a,b,d){if(b){var e=.5>d?d*(1+b):d+b-d*b,h=2*d-e;d=Z.Ye(h,e,a+1/3);b=Z.Ye(h,e,a);a=Z.Ye(h,e,a-1/3)}else d=b=a=d;return{r:255*d,g:255*b,b:255*a}},Ye:function(a,b,d){if(!(0>d||1<d)){if(d<1/6)return a+6*(b-a)*d;if(.5>d)return b;
  if(d<2/3)return a+(b-a)*(2/3-d)*6}return a},qq:function(a,b,d){a/=255;b/=255;d/=255;var e=Math.max(a,b,d),h=Math.min(a,b,d),k,l=e-h;if(e===h)k=0;else{switch(e){case a:k=(b-d)/l+(b<d?6:0);break;case b:k=(d-a)/l+2;break;case d:k=(a-b)/l+4}k/=6}return{h:k,s:e?l/e:0,v:e}},eq:function(a,b,d){var e,h,k,l=Math.floor(6*a),t=6*a-l;a=d*(1-b);var v=d*(1-t*b);b=d*(1-(1-t)*b);switch(l%6){case 0:e=d;h=b;k=a;break;case 1:e=v;h=d;k=a;break;case 2:e=a;h=d;k=b;break;case 3:e=a;h=v;k=d;break;case 4:e=b;h=a;k=d;break;
  case 5:e=d,h=a,k=v}return{r:255*e,g:255*h,b:255*k}},Oe:function(a){a=a.toString(16);return 1===a.length?"0"+a:a},oq:function(a,b,d){return"#"+Z.Oe(a)+Z.Oe(b)+Z.Oe(d)},Qp:function(a){a=a.split("(")[1].split(")")[0].split(",");var b={r:parseInt(a[0],10),g:parseInt(a[1],10),b:parseInt(a[2],10)};3<a.length&&(b.a=parseInt(a[3],10));return b},aq:function(a){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,d,e,h){return d+d+e+e+h+h});return(a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a))?
  {r:parseInt(a[1],16),g:parseInt(a[2],16),b:parseInt(a[3],16)}:null},rq:function(a){a=new THREE.Vector3(a.r,a.g,a.b);var b=(new THREE.Matrix3).set(.299,.587,.114,-.169,-.331,.5,.5,-.419,-.081),d=new THREE.Vector3(0,128,128);a.applyMatrix3(b).add(d);return{Y:a.x,Cr:a.y,Cb:a.z}},Eq:function(a){a=new THREE.Vector3(a.Y,a.Cr,a.Cb);var b=new THREE.Vector3(0,-128,-128),d=(new THREE.Matrix3).set(1,0,1.4,1,-.343,-.711,1,1.765,0);a.add(b).applyMatrix3(d);return{r:a.x,g:a.y,b:a.z}},Dq:function(a,b){var d=H.T(b);
  b=Math.cos(d);d=Math.sin(d);return{Y:a.Y,Cb:a.Cb*b-a.Cr*d,Cr:a.Cb*d+a.Cr*b}},distance:function(a,b){return Math.sqrt((a.Cb-b.Cb)*(a.Cb-b.Cb)+(a.Cr-b.Cr)*(a.Cr-b.Cr))}};function yc(a,b,d,e){this.alpha=e}window.FORGE=window.FORGE||{};window.FORGE.BaseObject=n;window.FORGE.Viewer=u;window.FORGE.Tags=ca;window.FORGE.UID=p;window.FORGE.EventDispatcher=r;window.FORGE.Event=Fa;window.FORGE.Listener=Da;window.FORGE.Story=y;window.FORGE.Group=F;window.FORGE.Scene=E;window.FORGE.Rectangle=Qa;
  window.FORGE.Size=Ra;window.FORGE.MediaStore=Ta;window.FORGE.MediaTexture=$a;window.FORGE.Media=Oa;window.FORGE.RenderManager=z;window.FORGE.RenderScene=sb;window.FORGE.RenderPipeline=ib;window.FORGE.RenderDisplay=gb;window.FORGE.RenderParams=Jb;window.FORGE.BackgroundRenderer=P;window.FORGE.BackgroundMeshRenderer=rb;window.FORGE.BackgroundPyramidRenderer=O;window.FORGE.BackgroundShaderRenderer=qb;window.FORGE.PostProcessing=ua;window.FORGE.EffectComposer=tb;window.FORGE.TexturePass=xb;
  window.FORGE.ShaderPass=zb;window.FORGE.AdditionPass=Cb;window.FORGE.RenderPass=vb;window.FORGE.ViewManager=eb;window.FORGE.ViewBase=Q;window.FORGE.ViewFlat=Xb;window.FORGE.ViewGoPro=Wb;window.FORGE.ViewRectilinear=Yb;window.FORGE.Timeline=ec;window.FORGE.Keyframe=fc;window.FORGE.Animation=gc;window.FORGE.MetaAnimation=kc;window.FORGE.Track=nc;window.FORGE.Object3D=oc;window.FORGE.ObjectRenderer=hb;window.FORGE.Raycaster=uc;window.FORGE.PickingDrawPass=zc;window.FORGE.PickingManager=fb;
  window.FORGE.Tile=Rb;window.FORGE.HotspotManager=ra;window.FORGE.HotspotDOM=Mc;window.FORGE.Hotspot3D=Lc;window.FORGE.HotspotSound=Uc;window.FORGE.HotspotMaterial=Tc;window.FORGE.HotspotGeometry=Sc;window.FORGE.HotspotTransform=Pc;window.FORGE.HotspotTransformValues=kd;window.FORGE.HotspotAnimation=Rc;window.FORGE.HotspotAnimationTrack=Nc;window.FORGE.HotspotStates=Vc;window.FORGE.Camera=L;window.FORGE.CameraAnimation=Md;window.FORGE.CameraGaze=rd;window.FORGE.ControllerManager=pa;
  window.FORGE.ControllerBase=R;window.FORGE.ControllerPointer=Ud;window.FORGE.ControllerKeyboard=Vd;window.FORGE.ControllerGyroscope=Wd;window.FORGE.ControllerGamepad=Xd;window.FORGE.SoundManager=x;window.FORGE.Sound=N;window.FORGE.Playlist=S;window.FORGE.PlaylistManager=A;window.FORGE.PlaylistTrack=re;window.FORGE.Director=ta;window.FORGE.DirectorTrack=Ld;window.FORGE.ActionEventDispatcher=Ia;window.FORGE.Action=te;window.FORGE.ActionManager=sa;window.FORGE.Plugin=we;window.FORGE.PluginEngine=Be;
  window.FORGE.PluginManager=qa;window.FORGE.PluginObjectFactory=Ae;window.FORGE.Device=q;window.FORGE.System=ka;window.FORGE.RequestAnimationFrame=ma;window.FORGE.History=oa;window.FORGE.LocaleManager=na;window.FORGE.LocaleString=Na;window.FORGE.Locale=Ne;window.FORGE.BaseBinding=Re;window.FORGE.KeyBinding=$d;window.FORGE.ButtonBinding=ce;window.FORGE.AxisBinding=de;window.FORGE.Keyboard=va;window.FORGE.Drag=Ue;window.FORGE.Pointer=V;window.FORGE.Gyroscope=wa;window.FORGE.GamepadsManager=xa;
  window.FORGE.Gamepad=bf;window.FORGE.DisplayList=ha;window.FORGE.DisplayObject=U;window.FORGE.DisplayObjectContainer=w;window.FORGE.Iframe=mf;window.FORGE.TextField=T;window.FORGE.Button=Ke;window.FORGE.ButtonSkin=xf;window.FORGE.Canvas=ja;window.FORGE.Image=Za;window.FORGE.Sprite=fd;window.FORGE.SpriteAnimationManager=Mf;window.FORGE.SpriteAnimation=Nf;window.FORGE.VideoBase=Pf;window.FORGE.VideoHTML5=K;window.FORGE.VideoDash=J;window.FORGE.VideoTimeRanges=$f;window.FORGE.VideoQuality=fg;
  window.FORGE.Cache=ya;window.FORGE.File=rg;window.FORGE.Loader=za;window.FORGE.Clock=la;window.FORGE.Timer=X;window.FORGE.TimerEvent=wg;window.FORGE.TweenManager=Aa;window.FORGE.Tween=hc;window.FORGE.Map=Ua;window.FORGE.Collection=Je;window.FORGE.URL=xg;window.FORGE.ColorRGBA=yc;n.prototype.log=n.prototype.log;n.prototype.warn=n.prototype.warn;n.prototype.destroy=n.prototype.destroy;u.prototype.update=u.prototype.update;u.prototype.pause=u.prototype.pause;u.prototype.resume=u.prototype.resume;
  u.prototype.destroy=u.prototype.destroy;r.prototype.add=r.prototype.add;r.prototype.addOnce=r.prototype.ba;r.prototype.remove=r.prototype.remove;r.prototype.has=r.prototype.has;r.prototype.dispatch=r.prototype.D;r.prototype.destroy=r.prototype.destroy;Da.prototype.execute=Da.prototype.Vb;Da.prototype.detach=Da.prototype.yi;Da.prototype.destroy=Da.prototype.destroy;y.prototype.boot=y.prototype.boot;y.prototype.load=y.prototype.load;y.prototype.hasScenes=y.prototype.mn;y.prototype.hasGroups=y.prototype.Nc;
  y.prototype.nextScene=y.prototype.nn;y.prototype.previousScene=y.prototype.pn;y.prototype.loadScene=y.prototype.gd;y.prototype.loadGroup=y.prototype.Eh;y.prototype.notifySceneConfigLoadComplete=y.prototype.Zl;y.prototype.destroy=y.prototype.destroy;F.prototype.load=F.prototype.load;F.prototype.hasChild=F.prototype.sf;F.prototype.hasScene=F.prototype.fd;F.prototype.hasGroup=F.prototype.Dd;F.prototype.hasChildren=F.prototype.Xp;F.prototype.hasTypeOfChild=F.prototype.Ah;F.prototype.hasScenes=F.prototype.tf;
  F.prototype.hasGroups=F.prototype.Nc;F.prototype.getChildrenUids=F.prototype.Bd;F.prototype.getChildren=F.prototype.Se;F.prototype.nextScene=F.prototype.wm;F.prototype.previousScene=F.prototype.xm;F.prototype.destroy=F.prototype.destroy;E.prototype.addConfig=E.prototype.ia;E.prototype.load=E.prototype.load;E.prototype.loadStart=E.prototype.Ul;E.prototype.unload=E.prototype.mf;E.prototype.hasGroup=E.prototype.Dd;E.prototype.hasGroups=E.prototype.Nc;E.prototype.hasSoundSource=E.prototype.Nl;
  E.prototype.hasSoundTarget=E.prototype.Ol;E.prototype.isAmbisonic=E.prototype.Ql;E.prototype.destroy=E.prototype.destroy;Ta.prototype.get=Ta.prototype.get;Ta.prototype.has=Ta.prototype.has;Ta.prototype.discardTileTexture=Ta.prototype.Mp;Ta.prototype.destroy=Ta.prototype.destroy;$a.prototype.destroy=$a.prototype.destroy;Oa.prototype.destroy=Oa.prototype.destroy;z.prototype.update=z.prototype.update;z.prototype.render=z.prototype.render;z.prototype.enableVR=z.prototype.Xi;z.prototype.disableVR=z.prototype.Wi;
  z.prototype.toggleVR=z.prototype.xq;z.prototype.destroy=z.prototype.destroy;sb.prototype.setSize=sb.prototype.setSize;sb.prototype.destroy=sb.prototype.destroy;ib.prototype.enablePicking=ib.prototype.vh;ib.prototype.addBackground=ib.prototype.sh;ib.prototype.addRenderScenes=ib.prototype.gl;ib.prototype.addGlobalFx=ib.prototype.fl;ib.prototype.getShaderPassByUID=ib.prototype.Up;ib.prototype.setSize=ib.prototype.setSize;ib.prototype.render=ib.prototype.render;ib.prototype.clear=ib.prototype.Df;
  ib.prototype.destroy=ib.prototype.destroy;gb.prototype.enableVR=gb.prototype.Ui;gb.prototype.disableVR=gb.prototype.Ti;gb.prototype.getQuaternionFromPose=gb.prototype.Bl;gb.prototype.getRenderParams=gb.prototype.Dl;gb.prototype.setSize=gb.prototype.setSize;gb.prototype.submitFrame=gb.prototype.Vi;gb.prototype.destroy=gb.prototype.destroy;P.prototype.updateAfterViewChange=P.prototype.bc;P.prototype.setSize=P.prototype.setSize;P.prototype.render=P.prototype.render;P.prototype.isObjectInFrustum=P.prototype.Sl;
  P.prototype.isObjectInScene=P.prototype.Tl;P.prototype.update=P.prototype.update;P.prototype.destroy=P.prototype.destroy;rb.prototype.updateAfterViewChange=rb.prototype.bc;rb.prototype.render=rb.prototype.render;rb.prototype.destroy=rb.prototype.destroy;O.prototype.updateAfterViewChange=O.prototype.bc;O.prototype.getParentTile=O.prototype.Al;O.prototype.getTile=O.prototype.wc;O.prototype.nbTilesPerAxis=O.prototype.Na;O.prototype.nbTiles=O.prototype.Xl;O.prototype.tileSize=O.prototype.wq;
  O.prototype.selectLevel=O.prototype.fm;O.prototype.addToRenderList=O.prototype.hl;O.prototype.render=O.prototype.render;O.prototype.destroy=O.prototype.destroy;qb.prototype.render=qb.prototype.render;qb.prototype.updateAfterViewChange=qb.prototype.bc;qb.prototype.destroy=qb.prototype.destroy;ua.prototype.parseShaderPasses=ua.prototype.ef;ua.prototype.getFxSetByUID=ua.prototype.Te;ua.prototype.addConfig=ua.prototype.ia;ua.prototype.destroy=ua.prototype.destroy;tb.prototype.render=tb.prototype.render;
  tb.prototype.destroy=tb.prototype.destroy;zb.prototype.render=zb.prototype.render;Cb.prototype.destroy=Cb.prototype.destroy;eb.prototype.notifyChange=eb.prototype.Db;eb.prototype.load=eb.prototype.load;eb.prototype.enableVR=eb.prototype.kj;eb.prototype.disableVR=eb.prototype.jj;eb.prototype.worldToScreen=eb.prototype.worldToScreen;eb.prototype.screenToWorld=eb.prototype.screenToWorld;eb.prototype.destroy=eb.prototype.destroy;Q.prototype.updateUniforms=Q.prototype.qb;Q.prototype.worldToScreen=Q.prototype.worldToScreen;
  Q.prototype.screenToWorld=Q.prototype.screenToWorld;Q.prototype.getProjectionFov=Q.prototype.We;Q.prototype.destroy=Q.prototype.destroy;Xb.prototype.updateUniforms=Xb.prototype.qb;Xb.prototype.worldToScreen=Xb.prototype.worldToScreen;Xb.prototype.screenToWorld=Xb.prototype.screenToWorld;Xb.prototype.destroy=Xb.prototype.destroy;Wb.prototype.updateUniforms=Wb.prototype.qb;Wb.prototype.worldToScreen=Wb.prototype.worldToScreen;Wb.prototype.screenToWorld=Wb.prototype.screenToWorld;
  Wb.prototype.getProjectionFov=Wb.prototype.We;Wb.prototype.destroy=Wb.prototype.destroy;Yb.prototype.updateUniforms=Yb.prototype.qb;Yb.prototype.worldToScreen=Yb.prototype.worldToScreen;Yb.prototype.screenToWorld=Yb.prototype.screenToWorld;Yb.prototype.destroy=Yb.prototype.destroy;ec.prototype.hasKeyframes=ec.prototype.Yp;ec.prototype.addKeyframe=ec.prototype.Ab;ec.prototype.getKeyframes=ec.prototype.Rp;ec.prototype.getKeyframesIndexes=ec.prototype.Ue;ec.prototype.getSideKeyframes=ec.prototype.El;
  ec.prototype.getSideKeyframesIndexes=ec.prototype.Fl;ec.prototype.emptyKeyframes=ec.prototype.Op;ec.prototype.destroy=ec.prototype.destroy;gc.prototype.play=gc.prototype.play;gc.prototype.stop=gc.prototype.stop;gc.prototype.resume=gc.prototype.resume;gc.prototype.destroy=gc.prototype.destroy;kc.prototype.stop=kc.prototype.stop;kc.prototype.resume=kc.prototype.resume;kc.prototype.destroy=kc.prototype.destroy;nc.prototype.destroy=nc.prototype.destroy;oc.prototype.click=oc.prototype.click;
  oc.prototype.over=oc.prototype.Sc;oc.prototype.out=oc.prototype.Dc;oc.prototype.destroy=oc.prototype.destroy;hb.prototype.register=hb.prototype.register;hb.prototype.unregister=hb.prototype.unregister;hb.prototype.createRenderScenes=hb.prototype.ol;hb.prototype.getRaycastable=hb.prototype.Cl;hb.prototype.getByMesh=hb.prototype.yl;hb.prototype.clear=hb.prototype.Bf;hb.prototype.destroy=hb.prototype.destroy;uc.prototype.start=uc.prototype.start;uc.prototype.stop=uc.prototype.stop;
  uc.prototype.click=uc.prototype.click;uc.prototype.clear=uc.prototype.Si;zc.prototype.start=zc.prototype.start;zc.prototype.stop=zc.prototype.stop;zc.prototype.click=zc.prototype.click;zc.prototype.setSize=zc.prototype.setSize;zc.prototype.clear=zc.prototype.Bi;zc.prototype.destroy=zc.prototype.destroy;fb.prototype.updateForViewType=fb.prototype.jm;fb.prototype.clear=fb.prototype.Ci;fb.prototype.setSize=fb.prototype.setSize;fb.prototype.click=fb.prototype.click;fb.prototype.start=fb.prototype.start;
  fb.prototype.stop=fb.prototype.stop;fb.prototype.destroy=fb.prototype.destroy;Rb.prototype.getParentName=Rb.prototype.Tp;Rb.prototype.refreshDisplayTS=Rb.prototype.Hh;Rb.prototype.destroy=Rb.prototype.destroy;ra.prototype.create=ra.prototype.create;ra.prototype.remove=ra.prototype.remove;ra.prototype.boot=ra.prototype.boot;ra.prototype.getByType=ra.prototype.Dm;ra.prototype.addConfig=ra.prototype.ia;ra.prototype.addTracks=ra.prototype.il;ra.prototype.update=ra.prototype.update;
  ra.prototype.clear=ra.prototype.vf;ra.prototype.dump=ra.prototype.Cm;ra.prototype.destroy=ra.prototype.destroy;Mc.prototype.show=Mc.prototype.si;Mc.prototype.hide=Mc.prototype.Am;Mc.prototype.update=Mc.prototype.update;Mc.prototype.destroy=Mc.prototype.destroy;Lc.prototype.over=Lc.prototype.Sc;Lc.prototype.out=Lc.prototype.Dc;Lc.prototype.update=Lc.prototype.update;Lc.prototype.dump=Lc.prototype.pi;Lc.prototype.destroy=Lc.prototype.destroy;Uc.prototype.load=Uc.prototype.load;Uc.prototype.update=Uc.prototype.update;
  Uc.prototype.destroy=Uc.prototype.destroy;Tc.prototype.updateShader=Tc.prototype.km;Tc.prototype.load=Tc.prototype.load;Tc.prototype.update=Tc.prototype.update;Tc.prototype.setTextureFrame=Tc.prototype.Kh;Tc.prototype.dump=Tc.prototype.ti;Tc.prototype.destroy=Tc.prototype.destroy;Sc.prototype.load=Sc.prototype.load;Sc.prototype.dump=Sc.prototype.o;Sc.prototype.destroy=Sc.prototype.destroy;Pc.prototype.updateFromObject3D=Pc.prototype.zq;Pc.prototype.notifyChange=Pc.prototype.Db;Pc.prototype.load=Pc.prototype.load;
  Pc.prototype.dump=Pc.prototype.ui;Pc.prototype.destroy=Pc.prototype.destroy;kd.prototype.load=kd.prototype.load;kd.prototype.dump=kd.prototype.c;kd.prototype.destroy=kd.prototype.destroy;Rc.prototype.load=Rc.prototype.load;Rc.prototype.play=Rc.prototype.play;Rc.prototype.destroy=Rc.prototype.destroy;Vc.prototype.addConfig=Vc.prototype.ia;Vc.prototype.load=Vc.prototype.load;Vc.prototype.toggle=Vc.prototype.Fm;Vc.prototype.destroy=Vc.prototype.destroy;L.prototype.load=L.prototype.load;
  L.prototype.lookAt=L.prototype.Vl;L.prototype.update=L.prototype.update;L.prototype.destroy=L.prototype.destroy;Md.prototype.play=Md.prototype.play;Md.prototype.destroy=Md.prototype.destroy;rd.prototype.load=rd.prototype.load;rd.prototype.start=rd.prototype.start;rd.prototype.stop=rd.prototype.stop;rd.prototype.update=rd.prototype.update;rd.prototype.destroy=rd.prototype.destroy;pa.prototype.notifyControlStart=pa.prototype.Kd;pa.prototype.notifyControlEnd=pa.prototype.Jd;pa.prototype.update=pa.prototype.update;
  pa.prototype.addConfig=pa.prototype.ia;pa.prototype.getByType=pa.prototype.rm;pa.prototype.destroy=pa.prototype.destroy;R.prototype.enable=R.prototype.enable;R.prototype.disable=R.prototype.Xa;R.prototype.destroy=R.prototype.destroy;Ud.prototype.enable=Ud.prototype.enable;Ud.prototype.disable=Ud.prototype.Xa;Ud.prototype.update=Ud.prototype.update;Ud.prototype.destroy=Ud.prototype.destroy;Vd.prototype.enable=Vd.prototype.enable;Vd.prototype.disable=Vd.prototype.Xa;Vd.prototype.update=Vd.prototype.update;
  Vd.prototype.destroy=Vd.prototype.destroy;Wd.prototype.enable=Wd.prototype.enable;Wd.prototype.disable=Wd.prototype.Xa;Wd.prototype.update=Wd.prototype.update;Wd.prototype.destroy=Wd.prototype.destroy;Xd.prototype.enable=Xd.prototype.enable;Xd.prototype.disable=Xd.prototype.Xa;Xd.prototype.update=Xd.prototype.update;Xd.prototype.destroy=Xd.prototype.destroy;x.prototype.boot=x.prototype.boot;x.prototype.addConfig=x.prototype.ia;x.prototype.update=x.prototype.update;x.prototype.add=x.prototype.add;
  x.prototype.remove=x.prototype.remove;x.prototype.suspend=x.prototype.suspend;x.prototype.resume=x.prototype.resume;x.prototype.pauseAll=x.prototype.am;x.prototype.resumeAll=x.prototype.dm;x.prototype.mute=x.prototype.ob;x.prototype.unmute=x.prototype.Zi;x.prototype.destroy=x.prototype.destroy;N.prototype.update=N.prototype.update;N.prototype.play=N.prototype.play;N.prototype.stop=N.prototype.stop;N.prototype.pause=N.prototype.pause;N.prototype.resume=N.prototype.resume;N.prototype.mute=N.prototype.ob;
  N.prototype.unmute=N.prototype.cj;N.prototype.destroy=N.prototype.destroy;S.prototype.hasTracks=S.prototype.an;S.prototype.play=S.prototype.play;S.prototype.stop=S.prototype.stop;S.prototype.pause=S.prototype.pause;S.prototype.resume=S.prototype.resume;S.prototype.nextTrack=S.prototype.Id;S.prototype.previousTrack=S.prototype.gf;S.prototype.destroy=S.prototype.destroy;A.prototype.boot=A.prototype.boot;A.prototype.addConfig=A.prototype.ia;A.prototype.add=A.prototype.add;A.prototype.addTrack=A.prototype.Ei;
  A.prototype.hasPlaylists=A.prototype.Zp;A.prototype.hasTracks=A.prototype.Vm;A.prototype.play=A.prototype.play;A.prototype.stop=A.prototype.stop;A.prototype.pause=A.prototype.pause;A.prototype.resume=A.prototype.resume;A.prototype.nextTrack=A.prototype.Id;A.prototype.previousTrack=A.prototype.gf;A.prototype.destroy=A.prototype.destroy;re.prototype.play=re.prototype.play;re.prototype.stop=re.prototype.stop;re.prototype.pause=re.prototype.pause;re.prototype.resume=re.prototype.resume;
  re.prototype.destroy=re.prototype.destroy;ta.prototype.load=ta.prototype.load;ta.prototype.play=ta.prototype.play;ta.prototype.stop=ta.prototype.stop;ta.prototype.destroy=ta.prototype.destroy;Ia.prototype.addActions=Ia.prototype.f;Ia.prototype.dispatch=Ia.prototype.D;Ia.prototype.destroy=Ia.prototype.destroy;te.prototype.execute=te.prototype.Vb;te.prototype.destroy=te.prototype.destroy;sa.prototype.get=sa.prototype.get;sa.prototype.addConfig=sa.prototype.ia;sa.prototype.destroy=sa.prototype.destroy;
  we.prototype.instantiate=we.prototype.Pl;we.prototype.notifyInstanceReady=we.prototype.mq;we.prototype.update=we.prototype.update;we.prototype.resetInstance=we.prototype.cm;we.prototype.destroy=we.prototype.destroy;Be.prototype.load=Be.prototype.load;Be.prototype.getNewInstance=Be.prototype.zl;Be.prototype.destroy=Be.prototype.destroy;qa.prototype.boot=qa.prototype.boot;qa.prototype.addConfig=qa.prototype.ia;qa.prototype.getById=qa.prototype.Re;qa.prototype.getByIndex=qa.prototype.xl;
  qa.prototype.get=qa.prototype.get;qa.prototype.remove=qa.prototype.remove;qa.prototype.update=qa.prototype.update;qa.prototype.render=qa.prototype.render;qa.prototype.destroy=qa.prototype.destroy;Ae.prototype.string=Ae.prototype.uq;Ae.prototype.textField=Ae.prototype.vq;Ae.prototype.sound=Ae.prototype.sound;Ae.prototype.displayObjectContainer=Ae.prototype.Np;Ae.prototype.displayObject=Ae.prototype.dn;Ae.prototype.image=Ae.prototype.image;Ae.prototype.sprite=Ae.prototype.sprite;
  Ae.prototype.button=Ae.prototype.cn;Ae.prototype.video=Ae.prototype.fn;Ae.prototype.canvas=Ae.prototype.canvas;Ae.prototype.tween=Ae.prototype.en;Ae.prototype.destroyAllObjects=Ae.prototype.ql;Ae.prototype.destroy=Ae.prototype.destroy;ka.prototype.boot=ka.prototype.boot;ka.prototype.destroy=ka.prototype.destroy;ma.prototype.boot=ma.prototype.boot;ma.prototype.start=ma.prototype.start;ma.prototype.stop=ma.prototype.stop;ma.prototype.destroy=ma.prototype.destroy;oa.prototype.generateHash=oa.prototype.Qe;
  oa.prototype.addConfig=oa.prototype.ia;oa.prototype.destroy=oa.prototype.destroy;na.prototype.addConfig=na.prototype.ia;na.prototype.getValue=na.prototype.xc;na.prototype.hasValue=na.prototype.Mb;na.prototype.destroy=na.prototype.destroy;Na.prototype.destroy=Na.prototype.destroy;Ne.prototype.addConfig=Ne.prototype.ia;Ne.prototype.loadFiles=Ne.prototype.Dh;Ne.prototype.getValue=Ne.prototype.xc;Ne.prototype.hasValue=Ne.prototype.Mb;Ne.prototype.getKey=Ne.prototype.zi;Ne.prototype.destroy=Ne.prototype.destroy;
  Re.prototype.destroy=Re.prototype.destroy;$d.prototype.hasKeyIn=$d.prototype.Xe;$d.prototype.hasKeyOut=$d.prototype.zh;$d.prototype.down=$d.prototype.vi;$d.prototype.waitToHold=$d.prototype.Gm;$d.prototype.up=$d.prototype.xi;$d.prototype.hold=$d.prototype.wi;$d.prototype.destroy=$d.prototype.destroy;ce.prototype.hasButtonIn=ce.prototype.Kl;ce.prototype.hasButtonOut=ce.prototype.Wp;ce.prototype.down=ce.prototype.Mh;ce.prototype.hold=ce.prototype.Nh;ce.prototype.up=ce.prototype.Oh;
  ce.prototype.waitToHold=ce.prototype.om;ce.prototype.destroy=ce.prototype.destroy;de.prototype.change=de.prototype.o;de.prototype.destroy=de.prototype.destroy;va.prototype.update=va.prototype.update;va.prototype.isKeyPressed=va.prototype.gq;va.prototype.isKeyOut=va.prototype.Ch;va.prototype.addBinding=va.prototype.Ub;va.prototype.removeBinding=va.prototype.yc;va.prototype.hasBinding=va.prototype.Vp;va.prototype.getBindings=va.prototype.xh;va.prototype.destroy=va.prototype.destroy;
  Ue.prototype.enable=Ue.prototype.enable;Ue.prototype.disable=Ue.prototype.li;Ue.prototype.destroy=Ue.prototype.destroy;V.prototype.enable=V.prototype.enable;V.prototype.disable=V.prototype.Cf;V.prototype.destroy=V.prototype.destroy;wa.prototype.destroy=wa.prototype.destroy;xa.prototype.update=xa.prototype.update;xa.prototype.destroy=xa.prototype.destroy;bf.prototype.update=bf.prototype.update;bf.prototype.addBinding=bf.prototype.Ub;bf.prototype.removeBinding=bf.prototype.yc;bf.prototype.destroy=bf.prototype.destroy;
  ha.prototype.register=ha.prototype.register;ha.prototype.unregister=ha.prototype.unregister;ha.prototype.update=ha.prototype.update;ha.prototype.destroy=ha.prototype.destroy;U.prototype.show=U.prototype.hi;U.prototype.hide=U.prototype.fi;U.prototype.toggleVisibility=U.prototype.yq;U.prototype.maximize=U.prototype.Xb;U.prototype.isInDom=U.prototype.Gd;U.prototype.resize=U.prototype.gi;U.prototype.fullscreenEnter=U.prototype.ul;U.prototype.fullscreenExit=U.prototype.vl;U.prototype.isFullscreen=U.prototype.Fd;
  U.prototype.destroy=U.prototype.destroy;w.prototype.update=w.prototype.update;w.prototype.addChild=w.prototype.vc;w.prototype.addChildAt=w.prototype.Ip;w.prototype.fitToContent=w.prototype.sl;w.prototype.removeChild=w.prototype.removeChild;w.prototype.removeChildAt=w.prototype.Ih;w.prototype.empty=w.prototype.ei;w.prototype.hasChild=w.prototype.tm;w.prototype.destroy=w.prototype.destroy;mf.prototype.load=mf.prototype.load;mf.prototype.destroy=mf.prototype.destroy;T.prototype.load=T.prototype.load;
  T.prototype.destroy=T.prototype.destroy;Ke.prototype.load=Ke.prototype.load;Ke.prototype.addSkin=Ke.prototype.Lc;Ke.prototype.setSkin=Ke.prototype.gm;Ke.prototype.hasSkin=Ke.prototype.Ml;Ke.prototype.updateSkin=Ke.prototype.Aq;Ke.prototype.destroy=Ke.prototype.destroy;xf.prototype.setDefaultFromState=xf.prototype.Jh;xf.prototype.getProperty=xf.prototype.Va;xf.prototype.hasImage=xf.prototype.Ll;xf.prototype.hasLabel=xf.prototype.m;ja.prototype.capture=ja.prototype.capture;Za.prototype.load=Za.prototype.load;
  Za.prototype.unload=Za.prototype.mf;Za.prototype.destroy=Za.prototype.destroy;fd.prototype.play=fd.prototype.play;fd.prototype.pause=fd.prototype.pause;fd.prototype.resume=fd.prototype.resume;fd.prototype.stop=fd.prototype.stop;fd.prototype.update=fd.prototype.update;fd.prototype.destroy=fd.prototype.destroy;Mf.prototype.addConfig=Mf.prototype.ia;Mf.prototype.add=Mf.prototype.add;Mf.prototype.play=Mf.prototype.play;Mf.prototype.pause=Mf.prototype.pause;Mf.prototype.resume=Mf.prototype.resume;
  Mf.prototype.stop=Mf.prototype.stop;Mf.prototype.get=Mf.prototype.get;Mf.prototype.update=Mf.prototype.update;Mf.prototype.destroy=Mf.prototype.destroy;Nf.prototype.play=Nf.prototype.play;Nf.prototype.pause=Nf.prototype.pause;Nf.prototype.resume=Nf.prototype.resume;Nf.prototype.stop=Nf.prototype.stop;Nf.prototype.update=Nf.prototype.update;Nf.prototype.destroy=Nf.prototype.destroy;Pf.prototype.play=Pf.prototype.play;Pf.prototype.pause=Pf.prototype.pause;Pf.prototype.destroy=Pf.prototype.destroy;
  K.prototype.update=K.prototype.update;K.prototype.load=K.prototype.load;K.prototype.play=K.prototype.play;K.prototype.pause=K.prototype.pause;K.prototype.stop=K.prototype.stop;K.prototype.togglePlayback=K.prototype.Bn;K.prototype.mute=K.prototype.ob;K.prototype.unmute=K.prototype.ij;K.prototype.destroy=K.prototype.destroy;J.prototype.load=J.prototype.load;J.prototype.play=J.prototype.play;J.prototype.pause=J.prototype.pause;J.prototype.stop=J.prototype.stop;J.prototype.togglePlayback=J.prototype.An;
  J.prototype.mute=J.prototype.ob;J.prototype.unmute=J.prototype.fj;J.prototype.enableBufferOccupancyABR=J.prototype.zn;J.prototype.destroy=J.prototype.destroy;$f.prototype.getTimeRange=$f.prototype.i;$f.prototype.isInRanges=$f.prototype.Rl;ya.prototype.has=ya.prototype.has;ya.prototype.get=ya.prototype.get;ya.prototype.add=ya.prototype.add;ya.prototype.remove=ya.prototype.remove;ya.prototype.destroy=ya.prototype.destroy;rg.prototype.key=rg.prototype.key;rg.prototype.url=rg.prototype.url;
  rg.prototype.type=rg.prototype.type;rg.prototype.data=rg.prototype.data;rg.prototype.xhr=rg.prototype.Cq;rg.prototype.loading=rg.prototype.Wb;rg.prototype.loaded=rg.prototype.vm;rg.prototype.error=rg.prototype.um;za.prototype.json=za.prototype.json;za.prototype.xml=za.prototype.Hm;za.prototype.sound=za.prototype.sound;za.prototype.image=za.prototype.image;za.prototype.script=za.prototype.em;za.prototype.css=za.prototype.pl;za.prototype.destroy=za.prototype.destroy;la.prototype.create=la.prototype.create;
  la.prototype.add=la.prototype.add;la.prototype.update=la.prototype.update;la.prototype.destroy=la.prototype.destroy;X.prototype.create=X.prototype.create;X.prototype.add=X.prototype.add;X.prototype.repeat=X.prototype.sn;X.prototype.loop=X.prototype.Ff;X.prototype.remove=X.prototype.remove;X.prototype.start=X.prototype.start;X.prototype.stop=X.prototype.stop;X.prototype.pause=X.prototype.pause;X.prototype.resume=X.prototype.resume;X.prototype.update=X.prototype.update;X.prototype.destroy=X.prototype.destroy;
  wg.prototype.execute=wg.prototype.Vb;Aa.prototype.add=Aa.prototype.add;Aa.prototype.remove=Aa.prototype.remove;Aa.prototype.update=Aa.prototype.update;Aa.prototype.destroy=Aa.prototype.destroy;hc.prototype.to=hc.prototype.Gf;hc.prototype.start=hc.prototype.start;hc.prototype.stop=hc.prototype.stop;hc.prototype.update=hc.prototype.update;hc.prototype.destroy=hc.prototype.destroy;Ua.prototype.set=Ua.prototype.set;Ua.prototype["delete"]=Ua.prototype.delete;Ua.prototype.get=Ua.prototype.get;
  Ua.prototype.keys=Ua.prototype.Im;Ua.prototype.values=Ua.prototype.Jm;Ua.prototype.entries=Ua.prototype.zf;Ua.prototype.clear=Ua.prototype.Ai;Ua.prototype.has=Ua.prototype.has;Je.prototype.add=Je.prototype.add;Je.prototype.remove=Je.prototype.remove;Je.prototype.get=Je.prototype.get;Je.prototype.toArray=Je.prototype.lf;window.FORGE.Math=H;H.degToRad=H.T;H.radToDeg=H.xa;H.round10=H.hf;H.clamp=H.$;H.wrap=H.ib;H.mix=H.lq;H.smoothStep=H.sq;H.isPowerOfTwo=H.Hd;H.rotationMatrixToEuler=H.Oc;
  H.eulerToRotationMatrix=H.Mc;H.sphericalToCartesian=H.kf;H.cartesianToSpherical=H.Ad;window.FORGE.Quaternion=I;I.toEuler=I.Md;I.fromEuler=I.Bb;I.toRotationMatrix=I.im;I.fromRotationMatrix=I.tl;I.cancelRoll=I.cancelRoll;I.diffBetweenQuaternions=I.rl;I.angularDistance=I.jl;I.multiplyScalar=I.multiplyScalar;I.add=I.add;I.log=I.log;I.exp=I.exp;I.slerp=I.slerp;I.squad=I.tq;I.nlerpNoInvert=I.Yl;I.slerpNoInvert=I.jf;I.squadNoInvert=I.hm;I.spline=I.Lh;tb.getUniqueName=Tb;Mb.parseIncludes=Mb.pb;
  zc.colorFrom3DObject=qc;Rb.createName=Qb;Rb.getParentTileCoordinates=Hc;V.getRelativeMousePosition=wc;xf.isValid=function(a){return a?!0:!1};fg.mimeTypeFromURL=mg;window.FORGE.Utils=D;D.parseSizeString=D.Gh;D.extendSimpleObject=D.ta;D.extendMultipleObjects=D.hb;D.compareObjects=D.ed;D.countProperties=D.uh;D.clone=D.clone;D.isDisplayObject=D.fq;D.isTypeOf=D.P;D.isTypeOfRecursive=D.iq;D.isArrayOf=D.za;D.getObjectProperty=D.Ve;D.sortArrayByProperty=D.Pc;D.randomize=D.Ld;D.leftFill=D.cf;D.parseTime=D.$l;
  D.formatTime=D.Pp;D.arrayByDifference=D.kl;D.arrayUnique=D.ll;D.removeItemFromArrayAtIndex=D.nq;D.endsWith=D.endsWith;D.arrayKeys=D.th;D.makePromise=D.Fh;window.FORGE.Dom=ia;ia.getCssProperty=ia.Cd;ia.getUnitWidth=ia.Hl;ia.getValueWidth=ia.Jl;ia.getUnitHeight=ia.Gl;ia.getValueHeight=ia.Il;ia.has=ia.has;ia.isHtmlElement=ia.Bh;ia.getMouseEventOffset=ia.Sp;xg.parse=Ka;
  xg.exists=function(a,b,d,e){var h=new XMLHttpRequest,k=null;h.onreadystatechange=function(){this.readyState===XMLHttpRequest.DONE&&200===this.status&&(clearTimeout(k),"function"===typeof b&&b.call(e))};h.onerror=function(a){console.log(a)};h.open("HEAD",a);h.send();k=window.setTimeout(function(){"function"===typeof d&&d.call(e)},500)};
  xg.isValid=function(a){return/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-]*)?\??(?:[\-\+=&;%@\.\w]*)#?(?:[\.\!\/\\\w]*))?)/.test(a)?!0:!1};window.FORGE.Color=Z;Z.rgbToHsl=Z.pq;Z.hslToRgb=Z.cq;Z.hueToRgb=Z.Ye;Z.rgbToHsv=Z.qq;Z.hsvToRgb=Z.eq;Z.componentToHex=Z.Oe;Z.rgbToHex=Z.oq;Z.fromRgbaString=Z.Qp;Z.hexToRgb=Z.aq;Z.rgbToYcbcr=Z.rq;Z.ycbcrToRgb=Z.Eq;Z.ycbcrRotate=Z.Dq;Z.distance=Z.distance;q.canPlayAudio=q.Kp;
  q.canPlayVideo=q.Lp;q.isLowBattery=q.hq;q.check=q.check;q.checkValue=q.nl;p.generate=p.wh;p.validate=p.lm;p.register=p.register;p.unregister=p.unregister;p.getUids=p.yh;p.filterType=p.Pe;p.get=p.get;p.isTypeOf=p.P;p.exists=p.gb;ca.register=ca.register;ca.getUids=ca.yh;ca.get=ca.get;ca.hasTypeOf=ca.$p;ca.exists=ca.gb;window.FORGE.VIEWERS=aa;window.FORGE.VERSION="0.9.5";window.FORGE.DEBUG=!1;window.FORGE.WARNING=!0;u.DEFAULT_CONFIG=ga;window.FORGE.Math=H;H.DEGREES=H.Pa;H.RADIANS=H.sb;H.DEG2RAD=H.pj;
  H.RAD2DEG=H.wj;H.TWOPI=H.zj;window.FORGE.MediaType=G;G.UNDEFINED=G.Pb;G.IMAGE=G.IMAGE;G.VIDEO=G.VIDEO;G.GRID=G.Fc;window.FORGE.MediaFormat=Sa;Sa.EQUIRECTANGULAR=Sa.Ec;Sa.CUBE=Sa.rd;Sa.FLAT=Sa.$a;Sa.HOTSPOT=Sa.Gn;window.FORGE.BackgroundType=db;db.UNDEFINED=db.Pb;db.SHADER=db.oe;db.MESH=db.Vc;db.PYRAMID=db.hg;window.FORGE.EffectComposerType=ub;ub.MAIN=ub.sj;ub.RENDER=ub.oc;ub.PICKING=ub.ag;window.FORGE.PassPosition=wb;wb.UNKNOWN=wb.te;wb.BACKGROUND=wb.Ud;wb.RENDER=wb.oc;wb.GLOBAL=wb.Nf;
  window.FORGE.ViewType=lb;lb.UNDEFINED=lb.Pb;lb.FLAT=lb.$a;lb.RECTILINEAR=lb.Eb;lb.GOPRO=lb.ee;Xb.DEFAULT_OPTIONS=ac;window.FORGE.PickingManager.modes=pb;pb.POINTER=pb.jb;pb.GAZE=pb.Uc;window.FORGE.HotspotMaterial.types=Yc;Yc.IMAGE=Yc.IMAGE;Yc.SPRITE=Yc.se;Yc.VIDEO=Yc.VIDEO;Yc.PLUGIN=Yc.ke;Yc.GRAPHICS=Yc.Of;window.FORGE.HotspotMaterial.sides=Zc;Zc.FRONT=Zc.FRONT;Zc.BACK=Zc.BACK;Zc.DOUBLE=Zc.Lf;window.FORGE.HotspotMaterial.presets=$c;$c.TRANSPARENT=$c.Mn;$c.DEBUG=$c.oj;Sc.DEFAULT_CONFIG=gd;
  Sc.DEFAULT_OFFSET=hd;window.FORGE.HotspotGeometryType=jd;jd.PLANE=jd.eg;jd.BOX=jd.If;jd.SPHERE=jd.ng;jd.CYLINDER=jd.Jf;jd.SHAPE=jd.mg;window.FORGE.HotspotType=Kc;Kc.THREE_DIMENSIONAL=Kc.qg;Kc.DOM=Kc.rj;L.RADIUS=50;L.DEFAULT_CONFIG=sd;window.FORGE.ControllerType=Sd;Sd.BASE=Sd.mj;Sd.POINTER=Sd.jb;Sd.KEYBOARD=Sd.je;Sd.GYROSCOPE=Sd.fe;Sd.GAMEPAD=Sd.de;pa.DEFAULT_CONFIG=Td;window.FORGE.SoundType=Pa;Pa.STEREO=Pa.Kn;Pa.SPATIAL=Pa.Jn;Pa.AMBISONIC=Pa.Hf;window.FORGE.Action.operation=ue;ue.SET=ue.lg;
  ue.ADD=ue.lj;ue.SUBSTRACT=ue.xj;ue.MULTIPLY=ue.tj;ue.DIVIDE=ue.qj;ue.TOGGLE=ue.yj;oa.DEFAULT_CONFIG=Le;window.FORGE.Pointer.listenerTypes=W;W.NATIVE=W.ab;W.HAMMER=W.ra;window.FORGE.Pointer.events=V.events;V.events.TAP=V.events.pg;V.events.DOUBLE_TAP=V.events.$d;V.events.PRESS_START=V.events.gg;V.events.PRESS_END=V.events.fg;V.events.PAN_START=V.events.$f;V.events.PAN_MOVE=V.events.Zf;V.events.PAN_END=V.events.Yf;V.events.PINCH_START=V.events.dg;V.events.PINCH_MOVE=V.events.cg;V.events.PINCH_END=V.events.bg;
  V.events.ROTATE_START=V.events.kg;V.events.ROTATE_MOVE=V.events.jg;V.events.ROTATE_END=V.events.ig;V.events.SWIPE=V.events.og;V.events.ENTER=V.events.Mf;V.events.LEAVE=V.events.Sf;V.events.OVER=V.events.Wc;V.events.OUT=V.events.nc;V.events.MOVE=V.events.Uf;V.events.WHEEL=V.events.rg;window.FORGE.Pointer.cursors=Xe;Xe.DEFAULT=Xe.DEFAULT;Xe.POINTER=Xe.jb;Xe.GRAB=Xe.En;Xe.GRABBING=Xe.Fn;xf.EMPTY_STATE_IMAGE=zf;xf.EMPTY_STATE_LABEL=Af;xf.EMPTY_STATE=Bf;xf.DEFAULT_STATE_IMAGE=Cf;
  xf.DEFAULT_STATE_LABEL=Df;xf.DEFAULT_STATE=yf;window.FORGE.Canvas.formats=Ef;Ef.IMAGE=Ef.IMAGE;Ef.DATA=Ef.nj;window.FORGE.Image.renderModes=ed;ed.CSS=ed.CSS;ed.CANVAS=ed.dc;window.FORGE.VideoDash.mediaType=gg;gg.VIDEO=gg.VIDEO;gg.AUDIO=gg.AUDIO;window.FORGE.VideoQualityMode=Qf;Qf.AUTO=Qf.cc;Qf.MANUAL=Qf.MANUAL;window.FORGE.VideoFormat=cb;cb.DASH=cb.Kf;cb.HTML5=cb.Hn;cb.UNKNOWN=cb.te;B.JSON=B.JSON;B.XML=B.pc;B.IMAGE=B.IMAGE;B.SOUND=B.Fb;window.FORGE.Cache.reserved=ng;ng.COMMON=ng.qd;ng.JSON=ng.JSON;
  ng.XML=ng.pc;ng.IMAGE=ng.IMAGE;ng.SOUND=ng.Fb;window.FORGE.EasingType=Y;Y.LINEAR=Y.LINEAR;Y.SINE_IN=Y.pe;Y.SINE_IN_OUT=Y.qe;Y.SINE_OUT=Y.re;Y.QUAD_IN=Y.le;Y.QUAD_IN_OUT=Y.me;Y.QUAD_OUT=Y.ne;Y.CUBIC_IN=Y.Xd;Y.CUBIC_IN_OUT=Y.Yd;Y.CUBIC_OUT=Y.Zd;Y.BOUNCE_OUT=Y.pd;Y.BOUNCE_IN=Y.Vd;
    root.FORGE = window.FORGE;
  }).call(this);
  
  