1557 lines
790 KiB
JavaScript
1557 lines
790 KiB
JavaScript
/*
|
||
For license information please see game.js.LEGAL.txt */
|
||
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(M){var Z=0;return function(){return Z<M.length?{done:!1,value:M[Z++]}:{done:!0}}};$jscomp.arrayIterator=function(M){return{next:$jscomp.arrayIteratorImpl(M)}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
|
||
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(M,Z,fa){if(M==Array.prototype||M==Object.prototype)return M;M[Z]=fa.value;return M};$jscomp.getGlobal=function(M){M=["object"==typeof globalThis&&globalThis,M,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var Z=0;Z<M.length;++Z){var fa=M[Z];if(fa&&fa.Math==Math)return fa}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
|
||
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(M,Z,fa){if(!fa||null!=M){fa=$jscomp.propertyToPolyfillSymbol[Z];if(null==fa)return M[Z];fa=M[fa];return void 0!==fa?fa:M[Z]}};
|
||
$jscomp.polyfill=function(M,Z,fa,la){Z&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(M,Z,fa,la):$jscomp.polyfillUnisolated(M,Z,fa,la))};$jscomp.polyfillUnisolated=function(M,Z,fa,la){fa=$jscomp.global;M=M.split(".");for(la=0;la<M.length-1;la++){var ra=M[la];if(!(ra in fa))return;fa=fa[ra]}M=M[M.length-1];la=fa[M];Z=Z(la);Z!=la&&null!=Z&&$jscomp.defineProperty(fa,M,{configurable:!0,writable:!0,value:Z})};
|
||
$jscomp.polyfillIsolated=function(M,Z,fa,la){var ra=M.split(".");M=1===ra.length;la=ra[0];la=!M&&la in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var qb=0;qb<ra.length-1;qb++){var ua=ra[qb];if(!(ua in la))return;la=la[ua]}ra=ra[ra.length-1];fa=$jscomp.IS_SYMBOL_NATIVE&&"es6"===fa?la[ra]:null;Z=Z(fa);null!=Z&&(M?$jscomp.defineProperty($jscomp.polyfills,ra,{configurable:!0,writable:!0,value:Z}):Z!==fa&&(void 0===$jscomp.propertyToPolyfillSymbol[ra]&&(fa=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[ra]=
|
||
$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(ra):$jscomp.POLYFILL_PREFIX+fa+"$"+ra),$jscomp.defineProperty(la,$jscomp.propertyToPolyfillSymbol[ra],{configurable:!0,writable:!0,value:Z})))};$jscomp.initSymbol=function(){};
|
||
$jscomp.polyfill("Symbol",function(M){if(M)return M;var Z=function(qb,ua){this.$jscomp$symbol$id_=qb;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:ua})};Z.prototype.toString=function(){return this.$jscomp$symbol$id_};var fa="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",la=0,ra=function(qb){if(this instanceof ra)throw new TypeError("Symbol is not a constructor");return new Z(fa+(qb||"")+"_"+la++,qb)};return ra},"es6","es3");
|
||
$jscomp.polyfill("Symbol.iterator",function(M){if(M)return M;M=Symbol("Symbol.iterator");for(var Z="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),fa=0;fa<Z.length;fa++){var la=$jscomp.global[Z[fa]];"function"===typeof la&&"function"!=typeof la.prototype[M]&&$jscomp.defineProperty(la.prototype,M,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}})}return M},
|
||
"es6","es3");$jscomp.iteratorPrototype=function(M){M={next:M};M[Symbol.iterator]=function(){return this};return M};$jscomp.createTemplateTagFirstArg=function(M){return M.raw=M};$jscomp.createTemplateTagFirstArgWithRaw=function(M,Z){M.raw=Z;return M};$jscomp.makeIterator=function(M){var Z="undefined"!=typeof Symbol&&Symbol.iterator&&M[Symbol.iterator];if(Z)return Z.call(M);if("number"==typeof M.length)return $jscomp.arrayIterator(M);throw Error(String(M)+" is not an iterable or ArrayLike");};
|
||
$jscomp.arrayFromIterator=function(M){for(var Z,fa=[];!(Z=M.next()).done;)fa.push(Z.value);return fa};$jscomp.arrayFromIterable=function(M){return M instanceof Array?M:$jscomp.arrayFromIterator($jscomp.makeIterator(M))};$jscomp.objectCreate=$jscomp.ASSUME_ES5||"function"==typeof Object.create?Object.create:function(M){var Z=function(){};Z.prototype=M;return new Z};
|
||
$jscomp.getConstructImplementation=function(){function M(){function fa(){}new fa;Reflect.construct(fa,[],function(){});return new fa instanceof fa}if($jscomp.TRUST_ES6_POLYFILLS&&"undefined"!=typeof Reflect&&Reflect.construct){if(M())return Reflect.construct;var Z=Reflect.construct;return function(fa,la,ra){fa=Z(fa,la);ra&&Reflect.setPrototypeOf(fa,ra.prototype);return fa}}return function(fa,la,ra){void 0===ra&&(ra=fa);ra=$jscomp.objectCreate(ra.prototype||Object.prototype);return Function.prototype.apply.call(fa,
|
||
ra,la)||ra}};$jscomp.construct={valueOf:$jscomp.getConstructImplementation}.valueOf();$jscomp.underscoreProtoCanBeSet=function(){var M={a:!0},Z={};try{return Z.__proto__=M,Z.a}catch(fa){}return!1};$jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(M,Z){M.__proto__=Z;if(M.__proto__!==Z)throw new TypeError(M+" is not extensible");return M}:null;
|
||
$jscomp.inherits=function(M,Z){M.prototype=$jscomp.objectCreate(Z.prototype);M.prototype.constructor=M;if($jscomp.setPrototypeOf){var fa=$jscomp.setPrototypeOf;fa(M,Z)}else for(fa in Z)if("prototype"!=fa)if(Object.defineProperties){var la=Object.getOwnPropertyDescriptor(Z,fa);la&&Object.defineProperty(M,fa,la)}else M[fa]=Z[fa];M.superClass_=Z.prototype};$jscomp.generator={};
|
||
$jscomp.generator.ensureIteratorResultIsObject_=function(M){if(!(M instanceof Object))throw new TypeError("Iterator result "+M+" is not an object");};$jscomp.generator.Context=function(){this.isRunning_=!1;this.yieldAllIterator_=null;this.yieldResult=void 0;this.nextAddress=1;this.finallyAddress_=this.catchAddress_=0;this.finallyContexts_=this.abruptCompletion_=null};
|
||
$jscomp.generator.Context.prototype.start_=function(){if(this.isRunning_)throw new TypeError("Generator is already running");this.isRunning_=!0};$jscomp.generator.Context.prototype.stop_=function(){this.isRunning_=!1};$jscomp.generator.Context.prototype.jumpToErrorHandler_=function(){this.nextAddress=this.catchAddress_||this.finallyAddress_};$jscomp.generator.Context.prototype.next_=function(M){this.yieldResult=M};
|
||
$jscomp.generator.Context.prototype.throw_=function(M){this.abruptCompletion_={exception:M,isException:!0};this.jumpToErrorHandler_()};$jscomp.generator.Context.prototype.return=function(M){this.abruptCompletion_={return:M};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.jumpThroughFinallyBlocks=function(M){this.abruptCompletion_={jumpTo:M};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.yield=function(M,Z){this.nextAddress=Z;return{value:M}};
|
||
$jscomp.generator.Context.prototype.yieldAll=function(M,Z){M=$jscomp.makeIterator(M);var fa=M.next();$jscomp.generator.ensureIteratorResultIsObject_(fa);if(fa.done)this.yieldResult=fa.value,this.nextAddress=Z;else return this.yieldAllIterator_=M,this.yield(fa.value,Z)};$jscomp.generator.Context.prototype.jumpTo=function(M){this.nextAddress=M};$jscomp.generator.Context.prototype.jumpToEnd=function(){this.nextAddress=0};
|
||
$jscomp.generator.Context.prototype.setCatchFinallyBlocks=function(M,Z){this.catchAddress_=M;void 0!=Z&&(this.finallyAddress_=Z)};$jscomp.generator.Context.prototype.setFinallyBlock=function(M){this.catchAddress_=0;this.finallyAddress_=M||0};$jscomp.generator.Context.prototype.leaveTryBlock=function(M,Z){this.nextAddress=M;this.catchAddress_=Z||0};
|
||
$jscomp.generator.Context.prototype.enterCatchBlock=function(M){this.catchAddress_=M||0;M=this.abruptCompletion_.exception;this.abruptCompletion_=null;return M};$jscomp.generator.Context.prototype.enterFinallyBlock=function(M,Z,fa){fa?this.finallyContexts_[fa]=this.abruptCompletion_:this.finallyContexts_=[this.abruptCompletion_];this.catchAddress_=M||0;this.finallyAddress_=Z||0};
|
||
$jscomp.generator.Context.prototype.leaveFinallyBlock=function(M,Z){Z=this.finallyContexts_.splice(Z||0)[0];if(Z=this.abruptCompletion_=this.abruptCompletion_||Z){if(Z.isException)return this.jumpToErrorHandler_();void 0!=Z.jumpTo&&this.finallyAddress_<Z.jumpTo?(this.nextAddress=Z.jumpTo,this.abruptCompletion_=null):this.nextAddress=this.finallyAddress_}else this.nextAddress=M};$jscomp.generator.Context.prototype.forIn=function(M){return new $jscomp.generator.Context.PropertyIterator(M)};
|
||
$jscomp.generator.Context.PropertyIterator=function(M){this.object_=M;this.properties_=[];for(var Z in M)this.properties_.push(Z);this.properties_.reverse()};$jscomp.generator.Context.PropertyIterator.prototype.getNext=function(){for(;0<this.properties_.length;){var M=this.properties_.pop();if(M in this.object_)return M}return null};$jscomp.generator.Engine_=function(M){this.context_=new $jscomp.generator.Context;this.program_=M};
|
||
$jscomp.generator.Engine_.prototype.next_=function(M){this.context_.start_();if(this.context_.yieldAllIterator_)return this.yieldAllStep_(this.context_.yieldAllIterator_.next,M,this.context_.next_);this.context_.next_(M);return this.nextStep_()};
|
||
$jscomp.generator.Engine_.prototype.return_=function(M){this.context_.start_();var Z=this.context_.yieldAllIterator_;if(Z)return this.yieldAllStep_("return"in Z?Z["return"]:function(fa){return{value:fa,done:!0}},M,this.context_.return);this.context_.return(M);return this.nextStep_()};
|
||
$jscomp.generator.Engine_.prototype.throw_=function(M){this.context_.start_();if(this.context_.yieldAllIterator_)return this.yieldAllStep_(this.context_.yieldAllIterator_["throw"],M,this.context_.next_);this.context_.throw_(M);return this.nextStep_()};
|
||
$jscomp.generator.Engine_.prototype.yieldAllStep_=function(M,Z,fa){try{var la=M.call(this.context_.yieldAllIterator_,Z);$jscomp.generator.ensureIteratorResultIsObject_(la);if(!la.done)return this.context_.stop_(),la;var ra=la.value}catch(qb){return this.context_.yieldAllIterator_=null,this.context_.throw_(qb),this.nextStep_()}this.context_.yieldAllIterator_=null;fa.call(this.context_,ra);return this.nextStep_()};
|
||
$jscomp.generator.Engine_.prototype.nextStep_=function(){for(;this.context_.nextAddress;)try{var M=this.program_(this.context_);if(M)return this.context_.stop_(),{value:M.value,done:!1}}catch(Z){this.context_.yieldResult=void 0,this.context_.throw_(Z)}this.context_.stop_();if(this.context_.abruptCompletion_){M=this.context_.abruptCompletion_;this.context_.abruptCompletion_=null;if(M.isException)throw M.exception;return{value:M.return,done:!0}}return{value:void 0,done:!0}};
|
||
$jscomp.generator.Generator_=function(M){this.next=function(Z){return M.next_(Z)};this.throw=function(Z){return M.throw_(Z)};this.return=function(Z){return M.return_(Z)};this[Symbol.iterator]=function(){return this}};$jscomp.generator.createGenerator=function(M,Z){Z=new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(Z));$jscomp.setPrototypeOf&&M.prototype&&$jscomp.setPrototypeOf(Z,M.prototype);return Z};
|
||
$jscomp.getRestArguments=function(){for(var M=Number(this),Z=[],fa=M;fa<arguments.length;fa++)Z[fa-M]=arguments[fa];return Z};$jscomp.polyfill("Reflect",function(M){return M?M:{}},"es6","es3");$jscomp.polyfill("Reflect.construct",function(M){return $jscomp.construct},"es6","es3");$jscomp.polyfill("Reflect.setPrototypeOf",function(M){if(M)return M;if($jscomp.setPrototypeOf){var Z=$jscomp.setPrototypeOf;return function(fa,la){try{return Z(fa,la),!0}catch(ra){return!1}}}return null},"es6","es5");
|
||
$jscomp.polyfill("Object.getOwnPropertySymbols",function(M){return M?M:function(){return[]}},"es6","es5");$jscomp.polyfill("Reflect.ownKeys",function(M){return M?M:function(Z){var fa=[],la=Object.getOwnPropertyNames(Z);Z=Object.getOwnPropertySymbols(Z);for(var ra=0;ra<la.length;ra++)("jscomp_symbol_"==la[ra].substring(0,14)?Z:fa).push(la[ra]);return fa.concat(Z)}},"es6","es5");
|
||
$jscomp.polyfill("Object.getOwnPropertyDescriptors",function(M){return M?M:function(Z){for(var fa={},la=Reflect.ownKeys(Z),ra=0;ra<la.length;ra++)fa[la[ra]]=Object.getOwnPropertyDescriptor(Z,la[ra]);return fa}},"es8","es5");
|
||
$jscomp.polyfill("Promise",function(M){function Z(){this.batch_=null}function fa(ua){return ua instanceof ra?ua:new ra(function(cb,Ca){cb(ua)})}if(M&&(!($jscomp.FORCE_POLYFILL_PROMISE||$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION&&"undefined"===typeof $jscomp.global.PromiseRejectionEvent)||!$jscomp.global.Promise||-1===$jscomp.global.Promise.toString().indexOf("[native code]")))return M;Z.prototype.asyncExecute=function(ua){if(null==this.batch_){this.batch_=[];var cb=this;this.asyncExecuteFunction(function(){cb.executeBatch_()})}this.batch_.push(ua)};
|
||
var la=$jscomp.global.setTimeout;Z.prototype.asyncExecuteFunction=function(ua){la(ua,0)};Z.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var ua=this.batch_;this.batch_=[];for(var cb=0;cb<ua.length;++cb){var Ca=ua[cb];ua[cb]=null;try{Ca()}catch(Ia){this.asyncThrow_(Ia)}}}this.batch_=null};Z.prototype.asyncThrow_=function(ua){this.asyncExecuteFunction(function(){throw ua;})};var ra=function(ua){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];this.isRejectionHandled_=
|
||
!1;var cb=this.createResolveAndReject_();try{ua(cb.resolve,cb.reject)}catch(Ca){cb.reject(Ca)}};ra.prototype.createResolveAndReject_=function(){function ua(Ia){return function(Ra){Ca||(Ca=!0,Ia.call(cb,Ra))}}var cb=this,Ca=!1;return{resolve:ua(this.resolveTo_),reject:ua(this.reject_)}};ra.prototype.resolveTo_=function(ua){if(ua===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(ua instanceof ra)this.settleSameAsPromise_(ua);else{a:switch(typeof ua){case "object":var cb=
|
||
null!=ua;break a;case "function":cb=!0;break a;default:cb=!1}cb?this.resolveToNonPromiseObj_(ua):this.fulfill_(ua)}};ra.prototype.resolveToNonPromiseObj_=function(ua){var cb=void 0;try{cb=ua.then}catch(Ca){this.reject_(Ca);return}"function"==typeof cb?this.settleSameAsThenable_(cb,ua):this.fulfill_(ua)};ra.prototype.reject_=function(ua){this.settle_(2,ua)};ra.prototype.fulfill_=function(ua){this.settle_(1,ua)};ra.prototype.settle_=function(ua,cb){if(0!=this.state_)throw Error("Cannot settle("+ua+
|
||
", "+cb+"): Promise already settled in state"+this.state_);this.state_=ua;this.result_=cb;2===this.state_&&this.scheduleUnhandledRejectionCheck_();this.executeOnSettledCallbacks_()};ra.prototype.scheduleUnhandledRejectionCheck_=function(){var ua=this;la(function(){if(ua.notifyUnhandledRejection_()){var cb=$jscomp.global.console;"undefined"!==typeof cb&&cb.error(ua.result_)}},1)};ra.prototype.notifyUnhandledRejection_=function(){if(this.isRejectionHandled_)return!1;var ua=$jscomp.global.CustomEvent,
|
||
cb=$jscomp.global.Event,Ca=$jscomp.global.dispatchEvent;if("undefined"===typeof Ca)return!0;"function"===typeof ua?ua=new ua("unhandledrejection",{cancelable:!0}):"function"===typeof cb?ua=new cb("unhandledrejection",{cancelable:!0}):(ua=$jscomp.global.document.createEvent("CustomEvent"),ua.initCustomEvent("unhandledrejection",!1,!0,ua));ua.promise=this;ua.reason=this.result_;return Ca(ua)};ra.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var ua=0;ua<this.onSettledCallbacks_.length;++ua)qb.asyncExecute(this.onSettledCallbacks_[ua]);
|
||
this.onSettledCallbacks_=null}};var qb=new Z;ra.prototype.settleSameAsPromise_=function(ua){var cb=this.createResolveAndReject_();ua.callWhenSettled_(cb.resolve,cb.reject)};ra.prototype.settleSameAsThenable_=function(ua,cb){var Ca=this.createResolveAndReject_();try{ua.call(cb,Ca.resolve,Ca.reject)}catch(Ia){Ca.reject(Ia)}};ra.prototype.then=function(ua,cb){function Ca(Vc,ef){return"function"==typeof Vc?function(bj){try{Ia(Vc(bj))}catch(cj){Ra(cj)}}:ef}var Ia,Ra,zb=new ra(function(Vc,ef){Ia=Vc;Ra=
|
||
ef});this.callWhenSettled_(Ca(ua,Ia),Ca(cb,Ra));return zb};ra.prototype.catch=function(ua){return this.then(void 0,ua)};ra.prototype.callWhenSettled_=function(ua,cb){function Ca(){switch(Ia.state_){case 1:ua(Ia.result_);break;case 2:cb(Ia.result_);break;default:throw Error("Unexpected state: "+Ia.state_);}}var Ia=this;null==this.onSettledCallbacks_?qb.asyncExecute(Ca):this.onSettledCallbacks_.push(Ca);this.isRejectionHandled_=!0};ra.resolve=fa;ra.reject=function(ua){return new ra(function(cb,Ca){Ca(ua)})};
|
||
ra.race=function(ua){return new ra(function(cb,Ca){for(var Ia=$jscomp.makeIterator(ua),Ra=Ia.next();!Ra.done;Ra=Ia.next())fa(Ra.value).callWhenSettled_(cb,Ca)})};ra.all=function(ua){var cb=$jscomp.makeIterator(ua),Ca=cb.next();return Ca.done?fa([]):new ra(function(Ia,Ra){function zb(bj){return function(cj){Vc[bj]=cj;ef--;0==ef&&Ia(Vc)}}var Vc=[],ef=0;do Vc.push(void 0),ef++,fa(Ca.value).callWhenSettled_(zb(Vc.length-1),Ra),Ca=cb.next();while(!Ca.done)})};return ra},"es6","es3");
|
||
$jscomp.owns=function(M,Z){return Object.prototype.hasOwnProperty.call(M,Z)};$jscomp.assign=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.assign?Object.assign:function(M,Z){for(var fa=1;fa<arguments.length;fa++){var la=arguments[fa];if(la)for(var ra in la)$jscomp.owns(la,ra)&&(M[ra]=la[ra])}return M};$jscomp.polyfill("Object.assign",function(M){return M||$jscomp.assign},"es6","es3");
|
||
$jscomp.polyfill("Object.is",function(M){return M?M:function(Z,fa){return Z===fa?0!==Z||1/Z===1/fa:Z!==Z&&fa!==fa}},"es6","es3");$jscomp.polyfill("Array.prototype.includes",function(M){return M?M:function(Z,fa){var la=this;la instanceof String&&(la=String(la));var ra=la.length;fa=fa||0;for(0>fa&&(fa=Math.max(fa+ra,0));fa<ra;fa++){var qb=la[fa];if(qb===Z||Object.is(qb,Z))return!0}return!1}},"es7","es3");
|
||
$jscomp.checkStringArgs=function(M,Z,fa){if(null==M)throw new TypeError("The 'this' value for String.prototype."+fa+" must not be null or undefined");if(Z instanceof RegExp)throw new TypeError("First argument to String.prototype."+fa+" must not be a regular expression");return M+""};$jscomp.polyfill("String.prototype.includes",function(M){return M?M:function(Z,fa){return-1!==$jscomp.checkStringArgs(this,Z,"includes").indexOf(Z,fa||0)}},"es6","es3");
|
||
$jscomp.polyfill("Object.values",function(M){return M?M:function(Z){var fa=[],la;for(la in Z)$jscomp.owns(Z,la)&&fa.push(Z[la]);return fa}},"es8","es3");$jscomp.iteratorFromArray=function(M,Z){M instanceof String&&(M+="");var fa=0,la=!1,ra={next:function(){if(!la&&fa<M.length){var qb=fa++;return{value:Z(qb,M[qb]),done:!1}}la=!0;return{done:!0,value:void 0}}};ra[Symbol.iterator]=function(){return ra};return ra};
|
||
$jscomp.polyfill("Array.prototype.keys",function(M){return M?M:function(){return $jscomp.iteratorFromArray(this,function(Z){return Z})}},"es6","es3");$jscomp.polyfill("Object.setPrototypeOf",function(M){return M||$jscomp.setPrototypeOf},"es6","es5");$jscomp.checkEs6ConformanceViaProxy=function(){try{var M={},Z=Object.create(new $jscomp.global.Proxy(M,{get:function(fa,la,ra){return fa==M&&"q"==la&&ra==Z}}));return!0===Z.q}catch(fa){return!1}};$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS=!1;
|
||
$jscomp.ES6_CONFORMANCE=$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS&&$jscomp.checkEs6ConformanceViaProxy();
|
||
$jscomp.polyfill("WeakMap",function(M){function Z(){if(!M||!Object.seal)return!1;try{var Ia=Object.seal({}),Ra=Object.seal({}),zb=new M([[Ia,2],[Ra,3]]);if(2!=zb.get(Ia)||3!=zb.get(Ra))return!1;zb.delete(Ia);zb.set(Ra,4);return!zb.has(Ia)&&4==zb.get(Ra)}catch(Vc){return!1}}function fa(){}function la(Ia){var Ra=typeof Ia;return"object"===Ra&&null!==Ia||"function"===Ra}function ra(Ia){if(!$jscomp.owns(Ia,ua)){var Ra=new fa;$jscomp.defineProperty(Ia,ua,{value:Ra})}}function qb(Ia){if(!$jscomp.ISOLATE_POLYFILLS){var Ra=
|
||
Object[Ia];Ra&&(Object[Ia]=function(zb){if(zb instanceof fa)return zb;Object.isExtensible(zb)&&ra(zb);return Ra(zb)})}}if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(M&&$jscomp.ES6_CONFORMANCE)return M}else if(Z())return M;var ua="$jscomp_hidden_"+Math.random();qb("freeze");qb("preventExtensions");qb("seal");var cb=0,Ca=function(Ia){this.id_=(cb+=Math.random()+1).toString();if(Ia){Ia=$jscomp.makeIterator(Ia);for(var Ra;!(Ra=Ia.next()).done;)Ra=Ra.value,this.set(Ra[0],Ra[1])}};Ca.prototype.set=
|
||
function(Ia,Ra){if(!la(Ia))throw Error("Invalid WeakMap key");ra(Ia);if(!$jscomp.owns(Ia,ua))throw Error("WeakMap key fail: "+Ia);Ia[ua][this.id_]=Ra;return this};Ca.prototype.get=function(Ia){return la(Ia)&&$jscomp.owns(Ia,ua)?Ia[ua][this.id_]:void 0};Ca.prototype.has=function(Ia){return la(Ia)&&$jscomp.owns(Ia,ua)&&$jscomp.owns(Ia[ua],this.id_)};Ca.prototype.delete=function(Ia){return la(Ia)&&$jscomp.owns(Ia,ua)&&$jscomp.owns(Ia[ua],this.id_)?delete Ia[ua][this.id_]:!1};return Ca},"es6","es3");
|
||
$jscomp.MapEntry=function(){};
|
||
$jscomp.polyfill("Map",function(M){function Z(){if($jscomp.ASSUME_NO_NATIVE_MAP||!M||"function"!=typeof M||!M.prototype.entries||"function"!=typeof Object.seal)return!1;try{var Ca=Object.seal({x:4}),Ia=new M($jscomp.makeIterator([[Ca,"s"]]));if("s"!=Ia.get(Ca)||1!=Ia.size||Ia.get({x:4})||Ia.set({x:4},"t")!=Ia||2!=Ia.size)return!1;var Ra=Ia.entries(),zb=Ra.next();if(zb.done||zb.value[0]!=Ca||"s"!=zb.value[1])return!1;zb=Ra.next();return zb.done||4!=zb.value[0].x||"t"!=zb.value[1]||!Ra.next().done?
|
||
!1:!0}catch(Vc){return!1}}if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(M&&$jscomp.ES6_CONFORMANCE)return M}else if(Z())return M;var fa=new WeakMap,la=function(Ca){this[0]={};this[1]=ua();this.size=0;if(Ca){Ca=$jscomp.makeIterator(Ca);for(var Ia;!(Ia=Ca.next()).done;)Ia=Ia.value,this.set(Ia[0],Ia[1])}};la.prototype.set=function(Ca,Ia){Ca=0===Ca?0:Ca;var Ra=ra(this,Ca);Ra.list||(Ra.list=this[0][Ra.id]=[]);Ra.entry?Ra.entry.value=Ia:(Ra.entry={next:this[1],previous:this[1].previous,head:this[1],
|
||
key:Ca,value:Ia},Ra.list.push(Ra.entry),this[1].previous.next=Ra.entry,this[1].previous=Ra.entry,this.size++);return this};la.prototype.delete=function(Ca){Ca=ra(this,Ca);return Ca.entry&&Ca.list?(Ca.list.splice(Ca.index,1),Ca.list.length||delete this[0][Ca.id],Ca.entry.previous.next=Ca.entry.next,Ca.entry.next.previous=Ca.entry.previous,Ca.entry.head=null,this.size--,!0):!1};la.prototype.clear=function(){this[0]={};this[1]=this[1].previous=ua();this.size=0};la.prototype.has=function(Ca){return!!ra(this,
|
||
Ca).entry};la.prototype.get=function(Ca){return(Ca=ra(this,Ca).entry)&&Ca.value};la.prototype.entries=function(){return qb(this,function(Ca){return[Ca.key,Ca.value]})};la.prototype.keys=function(){return qb(this,function(Ca){return Ca.key})};la.prototype.values=function(){return qb(this,function(Ca){return Ca.value})};la.prototype.forEach=function(Ca,Ia){for(var Ra=this.entries(),zb;!(zb=Ra.next()).done;)zb=zb.value,Ca.call(Ia,zb[1],zb[0],this)};la.prototype[Symbol.iterator]=la.prototype.entries;
|
||
var ra=function(Ca,Ia){var Ra=Ia&&typeof Ia;"object"==Ra||"function"==Ra?fa.has(Ia)?Ra=fa.get(Ia):(Ra=""+ ++cb,fa.set(Ia,Ra)):Ra="p_"+Ia;var zb=Ca[0][Ra];if(zb&&$jscomp.owns(Ca[0],Ra))for(Ca=0;Ca<zb.length;Ca++){var Vc=zb[Ca];if(Ia!==Ia&&Vc.key!==Vc.key||Ia===Vc.key)return{id:Ra,list:zb,index:Ca,entry:Vc}}return{id:Ra,list:zb,index:-1,entry:void 0}},qb=function(Ca,Ia){var Ra=Ca[1];return $jscomp.iteratorPrototype(function(){if(Ra){for(;Ra.head!=Ca[1];)Ra=Ra.previous;for(;Ra.next!=Ra.head;)return Ra=
|
||
Ra.next,{done:!1,value:Ia(Ra)};Ra=null}return{done:!0,value:void 0}})},ua=function(){var Ca={};return Ca.previous=Ca.next=Ca.head=Ca},cb=0;return la},"es6","es3");$jscomp.polyfill("Array.prototype.entries",function(M){return M?M:function(){return $jscomp.iteratorFromArray(this,function(Z,fa){return[Z,fa]})}},"es6","es3");
|
||
$jscomp.polyfill("Array.from",function(M){return M?M:function(Z,fa,la){fa=null!=fa?fa:function(cb){return cb};var ra=[],qb="undefined"!=typeof Symbol&&Symbol.iterator&&Z[Symbol.iterator];if("function"==typeof qb){Z=qb.call(Z);for(var ua=0;!(qb=Z.next()).done;)ra.push(fa.call(la,qb.value,ua++))}else for(qb=Z.length,ua=0;ua<qb;ua++)ra.push(fa.call(la,Z[ua],ua));return ra}},"es6","es3");
|
||
$jscomp.polyfill("Array.prototype.values",function(M){return M?M:function(){return $jscomp.iteratorFromArray(this,function(Z,fa){return fa})}},"es8","es3");
|
||
$jscomp.polyfill("Set",function(M){function Z(){if($jscomp.ASSUME_NO_NATIVE_SET||!M||"function"!=typeof M||!M.prototype.entries||"function"!=typeof Object.seal)return!1;try{var la=Object.seal({x:4}),ra=new M($jscomp.makeIterator([la]));if(!ra.has(la)||1!=ra.size||ra.add(la)!=ra||1!=ra.size||ra.add({x:4})!=ra||2!=ra.size)return!1;var qb=ra.entries(),ua=qb.next();if(ua.done||ua.value[0]!=la||ua.value[1]!=la)return!1;ua=qb.next();return ua.done||ua.value[0]==la||4!=ua.value[0].x||ua.value[1]!=ua.value[0]?
|
||
!1:qb.next().done}catch(cb){return!1}}if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(M&&$jscomp.ES6_CONFORMANCE)return M}else if(Z())return M;var fa=function(la){this.map_=new Map;if(la){la=$jscomp.makeIterator(la);for(var ra;!(ra=la.next()).done;)this.add(ra.value)}this.size=this.map_.size};fa.prototype.add=function(la){la=0===la?0:la;this.map_.set(la,la);this.size=this.map_.size;return this};fa.prototype.delete=function(la){la=this.map_.delete(la);this.size=this.map_.size;return la};fa.prototype.clear=
|
||
function(){this.map_.clear();this.size=0};fa.prototype.has=function(la){return this.map_.has(la)};fa.prototype.entries=function(){return this.map_.entries()};fa.prototype.values=function(){return this.map_.values()};fa.prototype.keys=fa.prototype.values;fa.prototype[Symbol.iterator]=fa.prototype.values;fa.prototype.forEach=function(la,ra){var qb=this;this.map_.forEach(function(ua){return la.call(ra,ua,ua,qb)})};return fa},"es6","es3");
|
||
$jscomp.findInternal=function(M,Z,fa){M instanceof String&&(M=String(M));for(var la=M.length,ra=0;ra<la;ra++){var qb=M[ra];if(Z.call(fa,qb,ra,M))return{i:ra,v:qb}}return{i:-1,v:void 0}};$jscomp.polyfill("Array.prototype.find",function(M){return M?M:function(Z,fa){return $jscomp.findInternal(this,Z,fa).v}},"es6","es3");
|
||
$jscomp.polyfill("String.prototype.repeat",function(M){return M?M:function(Z){var fa=$jscomp.checkStringArgs(this,null,"repeat");if(0>Z||1342177279<Z)throw new RangeError("Invalid count value");Z|=0;for(var la="";Z;)if(Z&1&&(la+=fa),Z>>>=1)fa+=fa;return la}},"es6","es3");
|
||
$jscomp.polyfill("Array.prototype.fill",function(M){return M?M:function(Z,fa,la){var ra=this.length||0;0>fa&&(fa=Math.max(0,ra+fa));if(null==la||la>ra)la=ra;la=Number(la);0>la&&(la=Math.max(0,ra+la));for(fa=Number(fa||0);fa<la;fa++)this[fa]=Z;return this}},"es6","es3");$jscomp.typedArrayFill=function(M){return M?M:Array.prototype.fill};$jscomp.polyfill("Int8Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Uint8Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");
|
||
$jscomp.polyfill("Uint8ClampedArray.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Int16Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Uint16Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Int32Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Uint32Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Float32Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");
|
||
$jscomp.polyfill("Float64Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Math.sign",function(M){return M?M:function(Z){Z=Number(Z);return 0===Z||isNaN(Z)?Z:0<Z?1:-1}},"es6","es3");$jscomp.polyfill("Number.isNaN",function(M){return M?M:function(Z){return"number"===typeof Z&&isNaN(Z)}},"es6","es3");$jscomp.polyfill("Math.log2",function(M){return M?M:function(Z){return Math.log(Z)/Math.LN2}},"es6","es3");
|
||
$jscomp.polyfill("Math.trunc",function(M){return M?M:function(Z){Z=Number(Z);if(isNaN(Z)||Infinity===Z||-Infinity===Z||0===Z)return Z;var fa=Math.floor(Math.abs(Z));return 0>Z?-fa:fa}},"es6","es3");
|
||
(function(){var M,Z,fa,la,ra,qb,ua,cb,Ca,Ia,Ra,zb,Vc,ef,bj,cj,Nw,Ow,Pw,Qw,Rw,Sw,Tw,Uw,Vw,Rq,Sq;function wJ(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw Error("Unable to locate global object.");}function Ww(){return new Promise(function(v,x){try{var G=!0,L=self.indexedDB.open("validate-browser-context-for-indexeddb-analytics-module");L.onsuccess=function(){L.result.close();G||self.indexedDB.deleteDatabase("validate-browser-context-for-indexeddb-analytics-module");
|
||
v(!0)};L.onupgradeneeded=function(){G=!1};L.onerror=function(){var K;x((null===(K=L.error)||void 0===K?void 0:K.message)||"")}}catch(K){x(K)}})}function xJ(v,x){return v.replace(Xw,function(G,L){G=x[L];return null!=G?String(G):"<"+L+"?>"})}function Tq(v,x){if(v===x)return!0;for(var G=Object.keys(v),L=Object.keys(x),K=$jscomp.makeIterator(G),u=K.next();!u.done;u=K.next()){var P=u.value;if(!L.includes(P))return!1;u=v[P];P=x[P];if(null!==u&&"object"===typeof u&&null!==P&&"object"===typeof P){if(!Tq(u,
|
||
P))return!1}else if(u!==P)return!1}v=$jscomp.makeIterator(L);for(x=v.next();!x.done;x=v.next())if(!G.includes(x.value))return!1;return!0}function yJ(v){var x=new Promise(function(G,L){var K=function(){v.removeEventListener("success",u);v.removeEventListener("error",P)},u=function(){G(Pf(v.result));K()},P=function(){L(v.error);K()};v.addEventListener("success",u);v.addEventListener("error",P)});x.then(function(G){G instanceof IDBCursor&&Uq.set(G,v)}).catch(function(){});Nm.set(x,v);return x}function zJ(v){if(!Om.has(v)){var x=
|
||
new Promise(function(G,L){var K=function(){v.removeEventListener("complete",u);v.removeEventListener("error",P);v.removeEventListener("abort",P)},u=function(){G();K()},P=function(){L(v.error||new DOMException("AbortError","AbortError"));K()};v.addEventListener("complete",u);v.addEventListener("error",P);v.addEventListener("abort",P)});Om.set(v,x)}}function AJ(v){return v!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(Yw||(Yw=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,
|
||
IDBCursor.prototype.continuePrimaryKey])).includes(v)?function(){var x=$jscomp.getRestArguments.apply(0,arguments);v.apply(Pm(this),x);return Pf(Uq.get(this))}:function(){var x=$jscomp.getRestArguments.apply(0,arguments);return Pf(v.apply(Pm(this),x))}:function(x){var G=$jscomp.getRestArguments.apply(1,arguments);G=v.call.apply(v,[Pm(this),x].concat($jscomp.arrayFromIterable(G)));Vq.set(G,x.sort?x.sort():[x]);return Pf(G)}}function Pf(v){if(v instanceof IDBRequest)return yJ(v);if(Qm.has(v))return Qm.get(v);
|
||
if("function"===typeof v)var x=AJ(v);else v instanceof IDBTransaction&&zJ(v),x=Zw(v,$w||($w=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(v,Rm):v;x!==v&&(Qm.set(v,x),Nm.set(x,v));return x}function Sm(v,x,G){G=void 0===G?{}:G;var L=G.blocked,K=G.upgrade,u=G.blocking,P=G.terminated,aa=indexedDB.open(v,x);v=Pf(aa);K&&aa.addEventListener("upgradeneeded",function(da){K(Pf(aa.result),da.oldVersion,da.newVersion,Pf(aa.transaction),da)});L&&aa.addEventListener("blocked",function(da){return L(da.oldVersion,
|
||
da.newVersion,da)});v.then(function(da){P&&da.addEventListener("close",function(){return P()});u&&da.addEventListener("versionchange",function(ba){return u(ba.oldVersion,ba.newVersion,ba)})}).catch(function(){});return v}function Wq(v,x){var G=(void 0===x?{}:x).blocked;v=indexedDB.deleteDatabase(v);G&&v.addEventListener("blocked",function(L){return G(L.oldVersion,L)});return Pf(v).then(function(){})}function ax(v,x){if(v instanceof IDBDatabase&&!(x in v)&&"string"===typeof x){if(Tm.get(x))return Tm.get(x);
|
||
var G=x.replace(/FromIndex$/,""),L=x!==G,K=bx.includes(G);if(G in(L?IDBIndex:IDBObjectStore).prototype&&(K||cx.includes(G)))return v=function(u){var P=$jscomp.getRestArguments.apply(1,arguments);return gb(this,null,function da(){var ba=this,wa,Ga;return $jscomp.generator.createGenerator(da,function(za){return 1==za.nextAddress?(wa=ba.transaction(u,K?"readwrite":"readonly"),Ga=wa.store,L&&(Ga=Ga.index(P.shift())),za.yield(Promise.all([Ga[G].apply(Ga,$jscomp.arrayFromIterable(P)),K&&wa.done]),2)):za.return(za.yieldResult[0])})})},
|
||
Tm.set(x,v),v}}function dx(v,x){try{v.container.addComponent(x)}catch(G){ff.debug("Component "+x.name+" failed to register with FirebaseApp "+v.name,G)}}function Jh(v){var x=v.name;if(Um.has(x))return ff.debug("There were multiple attempts to register component "+x+"."),!1;Um.set(x,v);x=$jscomp.makeIterator(Gk.values());for(var G=x.next();!G.done;G=x.next())dx(G.value,v);x=$jscomp.makeIterator(ex.values());for(G=x.next();!G.done;G=x.next())dx(G.value,v);return!0}function Xq(v,x){var G=v.container.getProvider("heartbeat").getImmediate({optional:!0});
|
||
G&&G.triggerHeartbeat();return v.container.getProvider(x)}function Yq(v,x){x=void 0===x?{}:x;"object"!==typeof x&&(x={name:x});var G=Object.assign({name:Vm,automaticDataCollectionEnabled:!1},x);x=G.name;if("string"!==typeof x||!x)throw Qf.create("bad-app-name",{appName:String(x)});v||(v=Zq());if(!v)throw Qf.create("no-options");var L=Gk.get(x);if(L){if(Tq(v,L.options)&&Tq(G,L.config))return L;throw Qf.create("duplicate-app",{appName:x});}L=new dj(x);for(var K=$jscomp.makeIterator(Um.values()),u=K.next();!u.done;u=
|
||
K.next())L.addComponent(u.value);v=new Wm(v,G,L);Gk.set(x,v);return v}function BJ(v){v=void 0===v?Vm:v;var x=Gk.get(v);if(!x&&v===Vm&&Zq())return Yq();if(!x)throw Qf.create("no-app",{appName:v});return x}function Dg(v,x,G){var L,K=null!==(L=fx[v])&&void 0!==L?L:v;G&&(K+="-"+G);v=K.match(/\s|\//);G=x.match(/\s|\//);v||G?(L=['Unable to register library "'+K+'" with version "'+x+'":'],v&&L.push('library name "'+K+'" contains illegal characters (whitespace or "/")'),v&&G&&L.push("and"),G&&L.push('version name "'+
|
||
x+'" contains illegal characters (whitespace or "/")'),ff.warn(L.join(" "))):Jh(new be(K+"-version",function(){return{library:K,version:x}},"VERSION"))}function gx(){Xm||(Xm=Sm(hx,ix,{upgrade:function(v,x){switch(x){case 0:try{v.createObjectStore(ej)}catch(G){console.warn(G)}}}}).catch(function(v){throw Qf.create("idb-open",{originalErrorMessage:v.message});}));return Xm}function CJ(v){return gb(this,null,function G(){var L,K,u,P,aa;return $jscomp.generator.createGenerator(G,function(da){switch(da.nextAddress){case 1:return da.setCatchFinallyBlocks(2),
|
||
da.yield(gx(),4);case 4:return L=da.yieldResult,K=L.transaction(ej),da.yield(K.objectStore(ej).get(v.name+"!"+v.options.appId),5);case 5:return u=da.yieldResult,da.yield(K.done,6);case 6:return da.return(u);case 2:P=da.enterCatchBlock(),P instanceof Hk?ff.warn(P.message):(aa=Qf.create("idb-get",{originalErrorMessage:null===P||void 0===P?void 0:P.message}),ff.warn(aa.message)),da.jumpToEnd()}})})}function jx(v,x){return gb(this,null,function L(){var K,u,P,aa,da;return $jscomp.generator.createGenerator(L,
|
||
function(ba){switch(ba.nextAddress){case 1:return ba.setCatchFinallyBlocks(2),ba.yield(gx(),4);case 4:return K=ba.yieldResult,u=K.transaction(ej,"readwrite"),P=u.objectStore(ej),ba.yield(P.put(x,v.name+"!"+v.options.appId),5);case 5:return ba.yield(u.done,6);case 6:ba.leaveTryBlock(0);break;case 2:aa=ba.enterCatchBlock(),aa instanceof Hk?ff.warn(aa.message):(da=Qf.create("idb-set",{originalErrorMessage:null===aa||void 0===aa?void 0:aa.message}),ff.warn(da.message)),ba.jumpToEnd()}})})}function DJ(v,
|
||
x){x=void 0===x?kx:x;var G=[],L=v.slice();v=$jscomp.makeIterator(v);for(var K=v.next(),u={};!K.done;u={singleDateHeartbeat:void 0},K=v.next()){u.singleDateHeartbeat=K.value;if(K=G.find(function(P){return function(aa){return aa.agent===P.singleDateHeartbeat.agent}}(u))){if(K.dates.push(u.singleDateHeartbeat.date),lx(G)>x){K.dates.pop();break}}else if(G.push({agent:u.singleDateHeartbeat.agent,dates:[u.singleDateHeartbeat.date]}),lx(G)>x){G.pop();break}L=L.slice(1)}return{heartbeatsToSend:G,unsentEntries:L}}
|
||
function lx(v){return $q(JSON.stringify({version:2,heartbeats:v})).length}function EJ(v){Jh(new be("platform-logger",function(x){return new ar(x)},"PRIVATE"));Jh(new be("heartbeat",function(x){return new Ym(x)},"PRIVATE"));Dg(Zm,br,v);Dg(Zm,br,"esm2017");Dg("fire-js","")}function mx(v){return v instanceof Hk&&v.code.includes("request-failed")}function nx(v){return ox+"/projects/"+v.projectId+"/installations"}function px(v){return{token:v.token,requestStatus:2,expiresIn:Number(v.expiresIn.replace("s",
|
||
"000")),creationTime:Date.now()}}function qx(v,x){return gb(this,null,function L(){var K,u;return $jscomp.generator.createGenerator(L,function(P){if(1==P.nextAddress)return P.yield(x.json(),2);K=P.yieldResult;u=K.error;return P.return(Eg.create("request-failed",{requestName:v,serverCode:u.code,serverMessage:u.message,serverStatus:u.status}))})})}function rx(v){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":v.apiKey})}function FJ(v,x){x=x.refreshToken;
|
||
v=rx(v);v.append("Authorization",cr+" "+x);return v}function sx(v){return gb(this,null,function G(){var L;return $jscomp.generator.createGenerator(G,function(K){if(1==K.nextAddress)return K.yield(v(),2);L=K.yieldResult;return 500<=L.status&&600>L.status?K.return(v()):K.return(L)})})}function GJ(v,x){return gb(this,arguments,function u(L,K){var P,aa,da,ba,wa,Ga,za,pc,zd,Kb,ub,Qb,h,k;return $jscomp.generator.createGenerator(u,function(m){switch(m.nextAddress){case 1:P=L;aa=P.appConfig;da=P.heartbeatServiceProvider;
|
||
ba=K;wa=ba.fid;Ga=nx(aa);za=rx(aa);pc=da.getImmediate({optional:!0});if(!pc){m.jumpTo(2);break}return m.yield(pc.getHeartbeatsHeader(),3);case 3:(zd=m.yieldResult)&&za.append("x-firebase-client",zd);case 2:return Kb={fid:wa,authVersion:cr,appId:aa.appId,sdkVersion:dr},ub={method:"POST",headers:za,body:JSON.stringify(Kb)},m.yield(sx(function(){return fetch(Ga,ub)}),4);case 4:return Qb=m.yieldResult,Qb.ok?m.yield(Qb.json(),8):m.yield(qx("Create Installation",Qb),7);case 7:throw m.yieldResult;case 8:return h=
|
||
m.yieldResult,k={fid:h.fid||wa,registrationStatus:2,refreshToken:h.refreshToken,authToken:px(h.authToken)},m.return(k)}})})}function tx(v){return new Promise(function(x){setTimeout(x,v)})}function Ik(v){return v.appName+"!"+v.appId}function er(v,x){if(v=fr.get(v)){v=$jscomp.makeIterator(v);for(var G=v.next();!G.done;G=v.next())G=G.value,G(x)}}function ux(v,x){var G=HJ();G&&G.postMessage({key:v,fid:x});0===fr.size&&Fg&&(Fg.close(),Fg=null)}function HJ(){!Fg&&"BroadcastChannel"in self&&(Fg=new BroadcastChannel("[Firebase] FID Change"),
|
||
Fg.onmessage=function(v){er(v.data.key,v.data.fid)});return Fg}function gr(){$m||($m=Sm(vx,wx,{upgrade:function(v,x){switch(x){case 0:v.createObjectStore(Gg)}}}));return $m}function an(v,x){return gb(this,null,function L(){var K,u,P,aa,da;return $jscomp.generator.createGenerator(L,function(ba){switch(ba.nextAddress){case 1:return K=Ik(v),ba.yield(gr(),2);case 2:return u=ba.yieldResult,P=u.transaction(Gg,"readwrite"),aa=P.objectStore(Gg),ba.yield(aa.get(K),3);case 3:return da=ba.yieldResult,ba.yield(aa.put(x,
|
||
K),4);case 4:return ba.yield(P.done,5);case 5:if(!da||da.fid!==x.fid){var wa=x.fid,Ga=Ik(v);er(Ga,wa);ux(Ga,wa)}return ba.return(x)}})})}function xx(v){return gb(this,null,function G(){var L,K,u;return $jscomp.generator.createGenerator(G,function(P){return 1==P.nextAddress?(L=Ik(v),P.yield(gr(),2)):3!=P.nextAddress?(K=P.yieldResult,u=K.transaction(Gg,"readwrite"),P.yield(u.objectStore(Gg).delete(L),3)):P.yield(u.done,0)})})}function bn(v,x){return gb(this,null,function L(){var K,u,P,aa,da,ba;return $jscomp.generator.createGenerator(L,
|
||
function(wa){switch(wa.nextAddress){case 1:return K=Ik(v),wa.yield(gr(),2);case 2:return u=wa.yieldResult,P=u.transaction(Gg,"readwrite"),aa=P.objectStore(Gg),wa.yield(aa.get(K),3);case 3:return da=wa.yieldResult,ba=x(da),void 0===ba?wa.yield(aa.delete(K),5):wa.yield(aa.put(ba,K),5);case 5:return wa.yield(P.done,8);case 8:if(ba&&(!da||da.fid!==ba.fid)){var Ga=ba.fid,za=Ik(v);er(za,Ga);ux(za,Ga)}return wa.return(ba)}})})}function hr(v){return gb(this,null,function G(){var L,K;return $jscomp.generator.createGenerator(G,
|
||
function(u){switch(u.nextAddress){case 1:return u.yield(bn(v.appConfig,function(P){if(!P){try{var aa=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(aa);aa[0]=112+aa[0]%16;var da=btoa(String.fromCharCode.apply(String,$jscomp.arrayFromIterable(aa))).replace(/\+/g,"-").replace(/\//g,"_").substr(0,22);var ba=yx.test(da)?da:cn}catch(wa){ba=cn}P={fid:ba,registrationStatus:0}}ba=zx(P);0===ba.registrationStatus?navigator.onLine?(ba={fid:ba.fid,registrationStatus:1,registrationTime:Date.now()},
|
||
aa=IJ(v,ba),ba={installationEntry:ba,registrationPromise:aa}):(aa=Promise.reject(Eg.create("app-offline")),ba={installationEntry:ba,registrationPromise:aa}):ba=1===ba.registrationStatus?{installationEntry:ba,registrationPromise:JJ(v)}:{installationEntry:ba};L=ba.registrationPromise;return ba.installationEntry}),2);case 2:K=u.yieldResult;if(K.fid!==cn){u.jumpTo(3);break}return u.yield(L,4);case 4:return u.return({installationEntry:u.yieldResult});case 3:return u.return({installationEntry:K,registrationPromise:L})}})})}
|
||
function IJ(v,x){return gb(this,null,function L(){var K,u;return $jscomp.generator.createGenerator(L,function(P){switch(P.nextAddress){case 1:return P.setCatchFinallyBlocks(2),P.yield(GJ(v,x),4);case 4:return K=P.yieldResult,P.return(an(v.appConfig,K));case 2:return u=P.enterCatchBlock(),mx(u)&&409===u.customData.serverCode?P.yield(xx(v.appConfig),6):P.yield(an(v.appConfig,{fid:x.fid,registrationStatus:0}),6);case 6:throw u;}})})}function JJ(v){return gb(this,null,function G(){var L,K,u,P;return $jscomp.generator.createGenerator(G,
|
||
function(aa){switch(aa.nextAddress){case 1:return aa.yield(Ax(v.appConfig),2);case 2:L=aa.yieldResult;case 3:if(1!==L.registrationStatus){if(0!==L.registrationStatus){aa.jumpTo(8);break}return aa.yield(hr(v),9)}return aa.yield(tx(100),6);case 6:return aa.yield(Ax(v.appConfig),7);case 7:L=aa.yieldResult;aa.jumpTo(3);break;case 9:return K=aa.yieldResult,u=K.installationEntry,(P=K.registrationPromise)?aa.return(P):aa.return(u);case 8:return aa.return(L)}})})}function Ax(v){return bn(v,function(x){if(!x)throw Eg.create("installation-not-found");
|
||
return zx(x)})}function zx(v){return 1===v.registrationStatus&&v.registrationTime+ir<Date.now()?{fid:v.fid,registrationStatus:0}:v}function KJ(v,x){return gb(this,arguments,function u(L,K){var P,aa,da,ba,wa,Ga,za,pc,zd,Kb,ub,Qb;return $jscomp.generator.createGenerator(u,function(h){switch(h.nextAddress){case 1:P=L;aa=P.appConfig;da=P.heartbeatServiceProvider;ba=LJ(aa,K);wa=FJ(aa,K);Ga=da.getImmediate({optional:!0});if(!Ga){h.jumpTo(2);break}return h.yield(Ga.getHeartbeatsHeader(),3);case 3:(za=h.yieldResult)&&
|
||
wa.append("x-firebase-client",za);case 2:return pc={installation:{sdkVersion:dr,appId:aa.appId}},zd={method:"POST",headers:wa,body:JSON.stringify(pc)},h.yield(sx(function(){return fetch(ba,zd)}),4);case 4:return Kb=h.yieldResult,Kb.ok?h.yield(Kb.json(),8):h.yield(qx("Generate Auth Token",Kb),7);case 7:throw h.yieldResult;case 8:return ub=h.yieldResult,Qb=px(ub),h.return(Qb)}})})}function LJ(v,x){x=x.fid;return nx(v)+"/"+x+"/authTokens:generate"}function jr(v,x){x=void 0===x?!1:x;return gb(this,null,
|
||
function L(){var K,u,P,aa;return $jscomp.generator.createGenerator(L,function(da){switch(da.nextAddress){case 1:return da.yield(bn(v.appConfig,function(ba){if(void 0===ba||2!==ba.registrationStatus)throw Eg.create("not-registered");var wa=ba.authToken,Ga;(Ga=x)||(Ga=2!==wa.requestStatus)||(Ga=Date.now(),Ga=Ga<wa.creationTime||wa.creationTime+wa.expiresIn<Ga+Bx);if(Ga){if(1===wa.requestStatus)return K=MJ(v,x),ba;if(!navigator.onLine)throw Eg.create("app-offline");wa={requestStatus:1,requestTime:Date.now()};
|
||
ba=Object.assign(Object.assign({},ba),{authToken:wa});K=NJ(v,ba);return ba}return ba}),2);case 2:u=da.yieldResult;if(!K){P=u.authToken;da.jumpTo(3);break}return da.yield(K,4);case 4:P=da.yieldResult;case 3:return aa=P,da.return(aa)}})})}function MJ(v,x){return gb(this,null,function L(){var K,u;return $jscomp.generator.createGenerator(L,function(P){switch(P.nextAddress){case 1:return P.yield(Cx(v.appConfig),2);case 2:K=P.yieldResult;case 3:if(1!==K.authToken.requestStatus){P.jumpTo(5);break}return P.yield(tx(100),
|
||
6);case 6:return P.yield(Cx(v.appConfig),7);case 7:K=P.yieldResult;P.jumpTo(3);break;case 5:return u=K.authToken,0===u.requestStatus?P.return(jr(v,x)):P.return(u)}})})}function Cx(v){return bn(v,function(x){if(void 0===x||2!==x.registrationStatus)throw Eg.create("not-registered");var G=x.authToken;return 1===G.requestStatus&&G.requestTime+ir<Date.now()?Object.assign(Object.assign({},x),{authToken:{requestStatus:0}}):x})}function NJ(v,x){return gb(this,null,function L(){var K,u,P,aa;return $jscomp.generator.createGenerator(L,
|
||
function(da){switch(da.nextAddress){case 1:return da.setCatchFinallyBlocks(2),da.yield(KJ(v,x),4);case 4:return K=da.yieldResult,u=Object.assign(Object.assign({},x),{authToken:K}),da.yield(an(v.appConfig,u),5);case 5:return da.return(K);case 2:P=da.enterCatchBlock();if(mx(P)&&(401===P.customData.serverCode||404===P.customData.serverCode))return da.yield(xx(v.appConfig),7);aa=Object.assign(Object.assign({},x),{authToken:{requestStatus:0}});return da.yield(an(v.appConfig,aa),7);case 7:throw P;}})})}
|
||
function OJ(v){return gb(this,null,function G(){var L,K,u,P;return $jscomp.generator.createGenerator(G,function(aa){if(1==aa.nextAddress)return L=v,aa.yield(hr(L),2);K=aa.yieldResult;u=K.installationEntry;(P=K.registrationPromise)?P.catch(console.error):jr(L).catch(console.error);return aa.return(u.fid)})})}function PJ(v,x){x=void 0===x?!1:x;return gb(this,null,function L(){var K,u;return $jscomp.generator.createGenerator(L,function(P){if(1==P.nextAddress)return K=v,P.yield(QJ(K),2);if(3!=P.nextAddress)return P.yield(jr(K,
|
||
x),3);u=P.yieldResult;return P.return(u.token)})})}function QJ(v){return gb(this,null,function G(){var L,K;return $jscomp.generator.createGenerator(G,function(u){if(1==u.nextAddress)return u.yield(hr(v),2);L=u.yieldResult;return(K=L.registrationPromise)?u.yield(K,0):u.jumpTo(0)})})}function RJ(v){if(!v||!v.options)throw kr("App Configuration");if(!v.name)throw kr("App Name");for(var x=$jscomp.makeIterator(["projectId","apiKey","appId"]),G=x.next();!G.done;G=x.next())if(G=G.value,!v.options[G])throw kr(G);
|
||
return{appName:v.name,projectId:v.options.projectId,apiKey:v.options.apiKey,appId:v.options.appId}}function kr(v){return Eg.create("missing-app-config-values",{valueName:v})}function Rf(v){v=new Uint8Array(v);return btoa(String.fromCharCode.apply(String,$jscomp.arrayFromIterable(v))).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function SJ(v){return gb(this,null,function G(){var L=this,K,u,P,aa,da;return $jscomp.generator.createGenerator(G,function(ba){switch(ba.nextAddress){case 1:K=L;
|
||
if(!("databases"in indexedDB)){ba.jumpTo(2);break}return ba.yield(indexedDB.databases(),3);case 3:if(u=ba.yieldResult,P=u.map(function(wa){return wa.name}),!P.includes(dn))return ba.return(null);case 2:return aa=null,ba.yield(Sm(dn,Dx,{upgrade:function(wa,Ga,za,pc){return gb(K,null,function Kb(){var ub,Qb,h,k,m,q;return $jscomp.generator.createGenerator(Kb,function(t){if(1==t.nextAddress){if(2>Ga||!wa.objectStoreNames.contains(lr))return t.return();Qb=pc.objectStore(lr);return t.yield(Qb.index("fcmSenderId").get(v),
|
||
2)}if(3!=t.nextAddress)return h=t.yieldResult,t.yield(Qb.clear(),3);if(!h)return t.return();if(2===Ga){k=h;if(!k.auth||!k.p256dh||!k.endpoint)return t.return();aa={token:k.fcmToken,createTime:null!==(ub=k.createTime)&&void 0!==ub?ub:Date.now(),subscriptionOptions:{auth:k.auth,p256dh:k.p256dh,endpoint:k.endpoint,swScope:k.swScope,vapidKey:"string"===typeof k.vapidKey?k.vapidKey:Rf(k.vapidKey)}}}else 3===Ga?(m=h,aa={token:m.fcmToken,createTime:m.createTime,subscriptionOptions:{auth:Rf(m.auth),p256dh:Rf(m.p256dh),
|
||
endpoint:m.endpoint,swScope:m.swScope,vapidKey:Rf(m.vapidKey)}}):4===Ga&&(q=h,aa={token:q.fcmToken,createTime:q.createTime,subscriptionOptions:{auth:Rf(q.auth),p256dh:Rf(q.p256dh),endpoint:q.endpoint,swScope:q.swScope,vapidKey:Rf(q.vapidKey)}});t.jumpToEnd()})})}}),4);case 4:return da=ba.yieldResult,da.close(),ba.yield(Wq(dn),5);case 5:return ba.yield(Wq("fcm_vapid_details_db"),6);case 6:return ba.yield(Wq("undefined"),7);case 7:return ba.return(TJ(aa)?aa:null)}})})}function TJ(v){if(!v||!v.subscriptionOptions)return!1;
|
||
var x=v.subscriptionOptions;return"number"===typeof v.createTime&&0<v.createTime&&"string"===typeof v.token&&0<v.token.length&&"string"===typeof x.auth&&0<x.auth.length&&"string"===typeof x.p256dh&&0<x.p256dh.length&&"string"===typeof x.endpoint&&0<x.endpoint.length&&"string"===typeof x.swScope&&0<x.swScope.length&&"string"===typeof x.vapidKey&&0<x.vapidKey.length}function mr(){en||(en=Sm(Ex,Fx,{upgrade:function(v,x){switch(x){case 0:v.createObjectStore(Hg)}}}));return en}function Gx(v){return gb(this,
|
||
null,function G(){var L,K,u,P;return $jscomp.generator.createGenerator(G,function(aa){switch(aa.nextAddress){case 1:return L=v.appConfig.appId,aa.yield(mr(),2);case 2:return K=aa.yieldResult,aa.yield(K.transaction(Hg).objectStore(Hg).get(L),3);case 3:return(u=aa.yieldResult)?aa.return(u):aa.yield(SJ(v.appConfig.senderId),5);case 5:P=aa.yieldResult;if(!P){aa.jumpTo(0);break}return aa.yield(nr(v,P),7);case 7:return aa.return(P)}})})}function nr(v,x){return gb(this,null,function L(){var K,u,P;return $jscomp.generator.createGenerator(L,
|
||
function(aa){switch(aa.nextAddress){case 1:return K=v.appConfig.appId,aa.yield(mr(),2);case 2:return u=aa.yieldResult,P=u.transaction(Hg,"readwrite"),aa.yield(P.objectStore(Hg).put(x,K),3);case 3:return aa.yield(P.done,4);case 4:return aa.return(x)}})})}function UJ(v){return gb(this,null,function G(){var L,K,u;return $jscomp.generator.createGenerator(G,function(P){return 1==P.nextAddress?(L=v.appConfig.appId,P.yield(mr(),2)):3!=P.nextAddress?(K=P.yieldResult,u=K.transaction(Hg,"readwrite"),P.yield(u.objectStore(Hg).delete(L),
|
||
3)):P.yield(u.done,0)})})}function VJ(v,x){return gb(this,null,function L(){var K,u,P,aa,da,ba,wa;return $jscomp.generator.createGenerator(L,function(Ga){switch(Ga.nextAddress){case 1:return Ga.yield(or(v),2);case 2:return K=Ga.yieldResult,u=Hx(x),P={method:"POST",headers:K,body:JSON.stringify(u)},Ga.setCatchFinallyBlocks(3),Ga.yield(fetch(pr(v.appConfig),P),5);case 5:return da=Ga.yieldResult,Ga.yield(da.json(),6);case 6:aa=Ga.yieldResult;Ga.leaveTryBlock(4);break;case 3:throw ba=Ga.enterCatchBlock(),
|
||
id.create("token-subscribe-failed",{errorInfo:null===ba||void 0===ba?void 0:ba.toString()});case 4:if(aa.error)throw wa=aa.error.message,id.create("token-subscribe-failed",{errorInfo:wa});if(!aa.token)throw id.create("token-subscribe-no-token");return Ga.return(aa.token)}})})}function WJ(v,x){return gb(this,null,function L(){var K,u,P,aa,da,ba,wa;return $jscomp.generator.createGenerator(L,function(Ga){switch(Ga.nextAddress){case 1:return Ga.yield(or(v),2);case 2:return K=Ga.yieldResult,u=Hx(x.subscriptionOptions),
|
||
P={method:"PATCH",headers:K,body:JSON.stringify(u)},Ga.setCatchFinallyBlocks(3),Ga.yield(fetch(pr(v.appConfig)+"/"+x.token,P),5);case 5:return da=Ga.yieldResult,Ga.yield(da.json(),6);case 6:aa=Ga.yieldResult;Ga.leaveTryBlock(4);break;case 3:throw ba=Ga.enterCatchBlock(),id.create("token-update-failed",{errorInfo:null===ba||void 0===ba?void 0:ba.toString()});case 4:if(aa.error)throw wa=aa.error.message,id.create("token-update-failed",{errorInfo:wa});if(!aa.token)throw id.create("token-update-no-token");
|
||
return Ga.return(aa.token)}})})}function Ix(v,x){return gb(this,null,function L(){var K,u,P,aa,da,ba;return $jscomp.generator.createGenerator(L,function(wa){switch(wa.nextAddress){case 1:return wa.yield(or(v),2);case 2:return K=wa.yieldResult,u={method:"DELETE",headers:K},wa.setCatchFinallyBlocks(3),wa.yield(fetch(pr(v.appConfig)+"/"+x,u),5);case 5:return P=wa.yieldResult,wa.yield(P.json(),6);case 6:aa=wa.yieldResult;if(aa.error)throw da=aa.error.message,id.create("token-unsubscribe-failed",{errorInfo:da});
|
||
wa.leaveTryBlock(0);break;case 3:throw ba=wa.enterCatchBlock(),id.create("token-unsubscribe-failed",{errorInfo:null===ba||void 0===ba?void 0:ba.toString()});}})})}function pr(v){return Jx+"/projects/"+v.projectId+"/registrations"}function or(v){return gb(this,arguments,function L(G){var K,u,P,aa;return $jscomp.generator.createGenerator(L,function(da){if(1==da.nextAddress)return K=G,u=K.appConfig,P=K.installations,da.yield(P.getToken(),2);aa=da.yieldResult;return da.return(new Headers({"Content-Type":"application/json",
|
||
Accept:"application/json","x-goog-api-key":u.apiKey,"x-goog-firebase-installations-auth":"FIS "+aa}))})})}function Hx(v){var x=v.vapidKey;v={web:{endpoint:v.endpoint,auth:v.auth,p256dh:v.p256dh}};x!==qr&&(v.web.applicationPubKey=x);return v}function XJ(v){return gb(this,null,function G(){var L,K,u,P;return $jscomp.generator.createGenerator(G,function(aa){switch(aa.nextAddress){case 1:return aa.yield(YJ(v.swRegistration,v.vapidKey),2);case 2:return L=aa.yieldResult,K={vapidKey:v.vapidKey,swScope:v.swRegistration.scope,
|
||
endpoint:L.endpoint,auth:Rf(L.getKey("auth")),p256dh:Rf(L.getKey("p256dh"))},aa.yield(Gx(v.firebaseDependencies),3);case 3:u=aa.yieldResult;if(!u)return aa.return(Kx(v.firebaseDependencies,K));var da=u.subscriptionOptions,ba=K.endpoint===da.endpoint,wa=K.auth===da.auth,Ga=K.p256dh===da.p256dh;if(K.vapidKey===da.vapidKey&&ba&&wa&&Ga)return Date.now()>=u.createTime+Lx?aa.return(ZJ(v,{token:u.token,createTime:Date.now(),subscriptionOptions:K})):aa.return(u.token);aa.setCatchFinallyBlocks(6);return aa.yield(Ix(v.firebaseDependencies,
|
||
u.token),8);case 8:aa.leaveTryBlock(7);break;case 6:P=aa.enterCatchBlock(),console.warn(P);case 7:return aa.return(Kx(v.firebaseDependencies,K))}})})}function $J(v){return gb(this,null,function G(){var L,K;return $jscomp.generator.createGenerator(G,function(u){switch(u.nextAddress){case 1:return u.yield(Gx(v.firebaseDependencies),2);case 2:L=u.yieldResult;if(!L){u.jumpTo(3);break}return u.yield(Ix(v.firebaseDependencies,L.token),4);case 4:return u.yield(UJ(v.firebaseDependencies),3);case 3:return u.yield(v.swRegistration.pushManager.getSubscription(),
|
||
6);case 6:return(K=u.yieldResult)?u.return(K.unsubscribe()):u.return(!0)}})})}function ZJ(v,x){return gb(this,null,function L(){var K,u,P;return $jscomp.generator.createGenerator(L,function(aa){switch(aa.nextAddress){case 1:return aa.setCatchFinallyBlocks(2),aa.yield(WJ(v.firebaseDependencies,x),4);case 4:return K=aa.yieldResult,u=Object.assign(Object.assign({},x),{token:K,createTime:Date.now()}),aa.yield(nr(v.firebaseDependencies,u),5);case 5:return aa.return(K);case 2:throw P=aa.enterCatchBlock(),
|
||
P;}})})}function Kx(v,x){return gb(this,null,function L(){var K,u;return $jscomp.generator.createGenerator(L,function(P){return 1==P.nextAddress?P.yield(VJ(v,x),2):3!=P.nextAddress?(K=P.yieldResult,u={token:K,createTime:Date.now(),subscriptionOptions:x},P.yield(nr(v,u),3)):P.return(u.token)})})}function YJ(v,x){return gb(this,null,function L(){var K;return $jscomp.generator.createGenerator(L,function(u){if(1==u.nextAddress)return u.yield(v.pushManager.getSubscription(),2);if(K=u.yieldResult)return u.return(K);
|
||
var P=u.return,aa=v.pushManager,da=aa.subscribe,ba="=".repeat((4-x.length%4)%4);ba=(x+ba).replace(/\-/g,"+").replace(/_/g,"/");ba=atob(ba);for(var wa=new Uint8Array(ba.length),Ga=0;Ga<ba.length;++Ga)wa[Ga]=ba.charCodeAt(Ga);return P.call(u,da.call(aa,{userVisibleOnly:!0,applicationServerKey:wa}))})})}function Mx(v){var x={from:v.from,collapseKey:v.collapse_key,messageId:v.fcmMessageId};if(v.notification){x.notification={};var G=v.notification.title;G&&(x.notification.title=G);if(G=v.notification.body)x.notification.body=
|
||
G;if(G=v.notification.image)x.notification.image=G;if(G=v.notification.icon)x.notification.icon=G}v.data&&(x.data=v.data);var L,K,u,P,aa;if(v.fcmOptions||null!==(L=v.notification)&&void 0!==L&&L.click_action){x.fcmOptions={};if(L=null!==(u=null===(K=v.fcmOptions)||void 0===K?void 0:K.link)&&void 0!==u?u:null===(P=v.notification)||void 0===P?void 0:P.click_action)x.fcmOptions.link=L;if(v=null===(aa=v.fcmOptions)||void 0===aa?void 0:aa.analytics_label)x.fcmOptions.analyticsLabel=v}return x}function aK(v,
|
||
x){for(var G=[],L=0;L<v.length;L++)G.push(v.charAt(L)),L<x.length&&G.push(x.charAt(L));return G.join("")}function rr(v){return id.create("missing-app-config-values",{valueName:v})}function Nx(v){return gb(this,null,function G(){var L,K;return $jscomp.generator.createGenerator(G,function(u){if(1==u.nextAddress)return u.setCatchFinallyBlocks(2),L=v,u.yield(navigator.serviceWorker.register(Ox,{scope:Px}),4);if(2!=u.nextAddress)return L.swRegistration=u.yieldResult,v.swRegistration.update().catch(function(){}),
|
||
u.leaveTryBlock(0);K=u.enterCatchBlock();throw id.create("failed-service-worker-registration",{browserErrorMessage:null===K||void 0===K?void 0:K.message});})})}function bK(v,x){return gb(this,null,function L(){return $jscomp.generator.createGenerator(L,function(K){if(1==K.nextAddress)return x||v.swRegistration?K.jumpTo(2):K.yield(Nx(v),2);if(!x&&v.swRegistration)return K.return();if(!(x instanceof ServiceWorkerRegistration))throw id.create("invalid-sw-registration");v.swRegistration=x;K.jumpToEnd()})})}
|
||
function cK(v,x){return gb(this,null,function L(){return $jscomp.generator.createGenerator(L,function(K){x?v.vapidKey=x:v.vapidKey||(v.vapidKey=qr);K.jumpToEnd()})})}function Qx(v,x){return gb(this,null,function L(){return $jscomp.generator.createGenerator(L,function(K){switch(K.nextAddress){case 1:if(!navigator)throw id.create("only-available-in-window");if("default"!==Notification.permission){K.jumpTo(2);break}return K.yield(Notification.requestPermission(),2);case 2:if("granted"!==Notification.permission)throw id.create("permission-blocked");
|
||
return K.yield(cK(v,null===x||void 0===x?void 0:x.vapidKey),4);case 4:return K.yield(bK(v,null===x||void 0===x?void 0:x.serviceWorkerRegistration),5);case 5:return K.return(XJ(v))}})})}function dK(v,x,G){return gb(this,null,function K(){var u,P;return $jscomp.generator.createGenerator(K,function(aa){if(1==aa.nextAddress){a:switch(x){case Jk.NOTIFICATION_CLICKED:var da="notification_open";break a;case Jk.PUSH_RECEIVED:da="notification_foreground";break a;default:throw Error();}u=da;return aa.yield(v.firebaseDependencies.analyticsProvider.get(),
|
||
2)}P=aa.yieldResult;P.logEvent(u,{message_id:G[sr],message_name:G[Rx],message_time:G[Sx],message_device_time:Math.floor(Date.now()/1E3)});aa.jumpToEnd()})})}function eK(v,x){return gb(this,null,function L(){var K,u;return $jscomp.generator.createGenerator(L,function(P){K=x.data;if(!K.isFirebaseMessaging)return P.return();if(v.onMessageHandler&&K.messageType===Jk.PUSH_RECEIVED)if("function"===typeof v.onMessageHandler)v.onMessageHandler(Mx(K));else v.onMessageHandler.next(Mx(K));u=K.data;return"object"===
|
||
typeof u&&u&&sr in u&&"1"===u[Tx]?P.yield(dK(v,K.messageType,u),0):P.jumpTo(0)})})}function tr(){return gb(this,null,function x(){return $jscomp.generator.createGenerator(x,function(G){switch(G.nextAddress){case 1:return G.setCatchFinallyBlocks(2),G.yield(Ww(),4);case 4:G.leaveTryBlock(3);break;case 2:return G.enterCatchBlock(),G.return(!1);case 3:var L=G.return,K;if(K="undefined"!==typeof window&&"object"===typeof indexedDB)K="undefined"!==typeof navigator&&navigator.cookieEnabled?!0:!1;return L.call(G,
|
||
K&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey"))}})})}function fK(v){return gb(this,null,function G(){return $jscomp.generator.createGenerator(G,function(L){if(1==L.nextAddress){if(!navigator)throw id.create("only-available-in-window");return v.swRegistration?L.jumpTo(2):L.yield(Nx(v),2)}return L.return($J(v))})})}function Ux(v){v=
|
||
void 0===v?BJ():v;tr().then(function(x){if(!x)throw id.create("unsupported-browser");},function(x){throw id.create("indexed-db-unsupported");});return Xq(v&&v._delegate?v._delegate:v,"messaging").getImmediate()}function ur(v,x){return gb(this,null,function L(){return $jscomp.generator.createGenerator(L,function(K){v=v&&v._delegate?v._delegate:v;return K.return(Qx(v,x))})})}function gK(v){v=v&&v._delegate?v._delegate:v;return fK(v)}var hK=Object.create,vr=Object.defineProperty,iK=Object.defineProperties,
|
||
jK=Object.getOwnPropertyDescriptor,kK=Object.getOwnPropertyDescriptors,wr=Object.getOwnPropertyNames,Vx=Object.getOwnPropertySymbols,lK=Object.getPrototypeOf,Wx=Object.prototype.hasOwnProperty,mK=Object.prototype.propertyIsEnumerable,Ad=Math.pow,Xx=function(v,x,G){return x in v?vr(v,x,{enumerable:!0,configurable:!0,writable:!0,value:G}):v[x]=G},nK=function(v,x){for(var G in x||(x={}))Wx.call(x,G)&&Xx(v,G,x[G]);if(Vx){var L=$jscomp.makeIterator(Vx(x));for(G=L.next();!G.done;G=L.next())G=G.value,mK.call(x,
|
||
G)&&Xx(v,G,x[G])}return v},oK=function(v,x){return iK(v,kK(x))},Je=function(v,x){return function(){return v&&(x=(0,v[wr(v)[0]])(v=0)),x}},Yx=function(v,x){return function(){return x||(0,v[wr(v)[0]])((x={exports:{}}).exports,x),x.exports}},pK=function(v,x,G,L){if(x&&"object"===typeof x||"function"===typeof x)for(var K=$jscomp.makeIterator(wr(x)),u=K.next(),P={};!u.done;P={key$jscomp$57:void 0},u=K.next())P.key$jscomp$57=u.value,Wx.call(v,P.key$jscomp$57)||P.key$jscomp$57===G||vr(v,P.key$jscomp$57,
|
||
{get:function(aa){return function(){return x[aa.key$jscomp$57]}}(P),enumerable:!(L=jK(x,P.key$jscomp$57))||L.enumerable});return v},qK=function(v,x,G){return G=null!=v?hK(lK(v)):{},pK(!x&&v&&v.__esModule?G:vr(G,"default",{value:v,enumerable:!0}),v)},gb=function(v,x,G){return new Promise(function(L,K){var u=function(da){try{aa(G.next(da))}catch(ba){K(ba)}},P=function(da){try{aa(G.throw(da))}catch(ba){K(ba)}},aa=function(da){return da.done?L(da.value):Promise.resolve(da.value).then(u,P)};aa((G=G.apply(v,
|
||
x)).next())})},Zx={},rK=Yx((Zx["node_modules/@vkontakte/vk-bridge/dist/index.umd.js"]=function(v,x){!function(G,L){"object"==typeof v&&"undefined"!=typeof x?L(v):"function"==typeof define&&define.amd?define(["exports"],L):L((G="undefined"!=typeof globalThis?globalThis:G||self).vkBridge={})}(v,function(G){function L(m,q,t,z){return new (t||(t=Promise))(function(D,C){function J(W){try{T(z.next(W))}catch(Y){C(Y)}}function N(W){try{T(z.throw(W))}catch(Y){C(Y)}}function T(W){var Y;W.done?D(W.value):(Y=
|
||
W.value,Y instanceof t?Y:new t(function(ca){ca(Y)})).then(J,N)}T((z=z.apply(m,q||[])).next())})}function K(m,q){function t(T){return function(W){return function(Y){if(z)throw new TypeError("Generator is already executing.");for(;J&&(J=0,Y[0]&&(N=0)),N;)try{if(z=1,D&&(C=2&Y[0]?D.return:Y[0]?D.throw||((C=D.return)&&C.call(D),0):D.next)&&!(C=C.call(D,Y[1])).done)return C;switch(D=0,C&&(Y=[2&Y[0],C.value]),Y[0]){case 0:case 1:C=Y;break;case 4:return N.label++,{value:Y[1],done:!1};case 5:N.label++;D=Y[1];
|
||
Y=[0];continue;case 7:Y=N.ops.pop();N.trys.pop();continue;default:if(!(C=N.trys,(C=0<C.length&&C[C.length-1])||6!==Y[0]&&2!==Y[0])){N=0;continue}if(3===Y[0]&&(!C||Y[1]>C[0]&&Y[1]<C[3]))N.label=Y[1];else if(6===Y[0]&&N.label<C[1])N.label=C[1],C=Y;else if(C&&N.label<C[2])N.label=C[2],N.ops.push(Y);else{C[2]&&N.ops.pop();N.trys.pop();continue}}Y=q.call(m,N)}catch(ca){Y=[6,ca],D=0}finally{z=C=0}if(5&Y[0])throw Y[1];return{value:Y[0]?Y[1]:void 0,done:!0}}([T,W])}}var z,D,C,J,N={label:0,sent:function(){if(1&
|
||
C[0])throw C[1];return C[1]},trys:[],ops:[]};return J={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(J[Symbol.iterator]=function(){return this}),J}function u(m,q,t){if(t||2===arguments.length)for(var z,D=0,C=q.length;D<C;D++)!z&&D in q||(z||(z=Array.prototype.slice.call(q,0,D)),z[D]=q[D]);return m.concat(z||Array.prototype.slice.call(q))}function P(m,q,t){var z=function(D){var C={current:0,next:function(){return++this.current}},J={};return{add:function(N,T){T=null!=T?T:"".concat(C.next(),
|
||
"_").concat(D);return J[T]=N,T},resolve:function(N,T,W){var Y=J[N];Y&&(W(T)?Y.resolve(T):Y.reject(T),J[N]=null)}}}(t);return q(function(D){if(D.detail&&D.detail.data&&"object"==typeof D.detail.data&&"request_id"in D.detail.data){var C=D.detail.data;D=C.request_id;C=function(J,N){var T={},W;for(W in J)Object.prototype.hasOwnProperty.call(J,W)&&0>N.indexOf(W)&&(T[W]=J[W]);if(null!=J&&"function"==typeof Object.getOwnPropertySymbols){var Y=0;for(W=Object.getOwnPropertySymbols(J);Y<W.length;Y++)0>N.indexOf(W[Y])&&
|
||
Object.prototype.propertyIsEnumerable.call(J,W[Y])&&(T[W[Y]]=J[W[Y]])}return T}(C,["request_id"]);D&&z.resolve(D,C,function(J){return!("error_type"in J)})}}),function(D,C){return void 0===C&&(C={}),new Promise(function(J,N){J=z.add({resolve:J,reject:N},C.request_id);m(D,aa(aa({},C),{request_id:J}))})}}var aa=function(){return aa=Object.assign||function(m){for(var q,t=1,z=arguments.length;t<z;t++)for(var D in q=arguments[t])Object.prototype.hasOwnProperty.call(q,D)&&(m[D]=q[D]);return m},aa.apply(this,
|
||
arguments)},da,ba="undefined"!=typeof window,wa=!(!ba||!window.AndroidBridge),Ga=!!(ba&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.VKWebAppClose),za=!(!ba||!window.ReactNativeWebView||"function"!=typeof window.ReactNativeWebView.postMessage),pc=ba&&!wa&&!Ga,zd=pc&&/(^\?|&)vk_platform=mobile_web(&|$)/.test(location.search),Kb=pc?"message":"VKWebAppEvent",ub=u("VKWebAppInit VKWebAppGetCommunityAuthToken VKWebAppAddToCommunity VKWebAppAddToHomeScreenInfo VKWebAppClose VKWebAppCopyText VKWebAppCreateHash VKWebAppGetUserInfo VKWebAppSetLocation VKWebAppSendToClient VKWebAppGetClientVersion VKWebAppGetPhoneNumber VKWebAppGetEmail VKWebAppGetGroupInfo VKWebAppGetGeodata VKWebAppGetCommunityToken VKWebAppGetConfig VKWebAppGetLaunchParams VKWebAppSetTitle VKWebAppGetAuthToken VKWebAppCallAPIMethod VKWebAppJoinGroup VKWebAppLeaveGroup VKWebAppAllowMessagesFromGroup VKWebAppDenyNotifications VKWebAppAllowNotifications VKWebAppOpenPayForm VKWebAppOpenApp VKWebAppShare VKWebAppShowWallPostBox VKWebAppScroll VKWebAppShowOrderBox VKWebAppShowLeaderBoardBox VKWebAppShowInviteBox VKWebAppShowRequestBox VKWebAppAddToFavorites VKWebAppShowStoryBox VKWebAppStorageGet VKWebAppStorageGetKeys VKWebAppStorageSet VKWebAppFlashGetInfo VKWebAppSubscribeStoryApp VKWebAppOpenWallPost VKWebAppCheckAllowedScopes VKWebAppCheckBannerAd VKWebAppHideBannerAd VKWebAppShowBannerAd VKWebAppCheckNativeAds VKWebAppShowNativeAds VKWebAppRetargetingPixel VKWebAppConversionHit VKWebAppShowSubscriptionBox VKWebAppCheckSurvey VKWebAppShowSurvey VKWebAppScrollTop VKWebAppScrollTopStart VKWebAppScrollTopStop VKWebAppShowSlidesSheet VKWebAppTranslate VKWebAppRecommend VKWebAppAddToProfile VKWebAppGetFriends".split(" "),
|
||
pc&&!zd?"VKWebAppResizeWindow VKWebAppAddToMenu VKWebAppShowInstallPushBox VKWebAppShowCommunityWidgetPreviewBox VKWebAppCallStart VKWebAppCallJoin VKWebAppCallGetStatus".split(" "):["VKWebAppShowImages"],!0),Qb=ba?window.AndroidBridge:void 0,h=Ga?window.webkit.messageHandlers:void 0,k=pc?parent:void 0;G.EAdsFormats=void 0;(ba=G.EAdsFormats||(G.EAdsFormats={})).REWARD="reward";ba.INTERSTITIAL="interstitial";G.BannerAdLayoutType=void 0;(ba=G.BannerAdLayoutType||(G.BannerAdLayoutType={})).RESIZE="resize";
|
||
ba.OVERLAY="overlay";G.BannerAdLocation=void 0;(ba=G.BannerAdLocation||(G.BannerAdLocation={})).TOP="top";ba.BOTTOM="bottom";G.BannerAdAlign=void 0;(ba=G.BannerAdAlign||(G.BannerAdAlign={})).LEFT="left";ba.RIGHT="right";ba.CENTER="center";G.BannerAdHeightType=void 0;(ba=G.BannerAdHeightType||(G.BannerAdHeightType={})).COMPACT="compact";ba.REGULAR="regular";G.BannerAdOrientation=void 0;(ba=G.BannerAdOrientation||(G.BannerAdOrientation={})).HORIZONTAL="horizontal";ba.VERTICAL="vertical";G.EGrantedPermission=
|
||
void 0;(ba=G.EGrantedPermission||(G.EGrantedPermission={})).CAMERA="camera";ba.LOCATION="location";ba.PHOTO="photo";G.EGetLaunchParamsResponseLanguages=void 0;(ba=G.EGetLaunchParamsResponseLanguages||(G.EGetLaunchParamsResponseLanguages={})).RU="ru";ba.UK="uk";ba.UA="ua";ba.EN="en";ba.BE="be";ba.KZ="kz";ba.PT="pt";ba.ES="es";G.EGetLaunchParamsResponseGroupRole=void 0;(ba=G.EGetLaunchParamsResponseGroupRole||(G.EGetLaunchParamsResponseGroupRole={})).ADMIN="admin";ba.EDITOR="editor";ba.MEMBER="member";
|
||
ba.MODER="moder";ba.NONE="none";G.EGetLaunchParamsResponsePlatforms=void 0;(ba=G.EGetLaunchParamsResponsePlatforms||(G.EGetLaunchParamsResponsePlatforms={})).DESKTOP_WEB="desktop_web";ba.DESKTOP_WEB_MESSENGER="desktop_web_messenger";ba.DESKTOP_APP_MESSENGER="desktop_app_messenger";ba.MOBILE_WEB="mobile_web";ba.MOBILE_ANDROID="mobile_android";ba.MOBILE_ANDROID_MESSENGER="mobile_android_messenger";ba.MOBILE_IPHONE="mobile_iphone";ba.MOBILE_IPHONE_MESSENGER="mobile_iphone_messenger";ba.MOBILE_IPAD="mobile_ipad";
|
||
ba=function(m){function q(ca){T.push(ca)}function t(ca){return console.warn("This method is deprecated. Use supportsAsync instead."),wa?!(!Qb||"function"!=typeof Qb[ca]):Ga?!(!h||!h[ca]||"function"!=typeof h[ca].postMessage):!!pc&&ub.includes(ca)}function z(){return Ga||wa}function D(){return pc&&window.parent!==window}function C(){return z()||D()}function J(ca){if(Ga||wa)return u([],T,!0).map(function(ta){return ta.call(null,ca)});var U=null==ca?void 0:ca.data;if(pc&&U){if(za&&"string"==typeof U)try{U=
|
||
JSON.parse(U)}catch(ta){}var ha=U.type,V=U.data;U=U.frameId;ha&&("VKWebAppSettings"!==ha?u([],T,!0).map(function(ta){return ta({detail:{type:ha,data:V}})}):N=U)}}var N=void 0,T=[],W=Math.random().toString(36).substring(2,5);za&&/(android)/i.test(navigator.userAgent)?document.addEventListener(Kb,J):"undefined"!=typeof window&&"addEventListener"in window&&window.addEventListener(Kb,J);var Y=P(function(ca,U){Qb&&Qb[ca]?Qb[ca](JSON.stringify(U)):h&&h[ca]&&"function"==typeof h[ca].postMessage?h[ca].postMessage(U):
|
||
za?window.ReactNativeWebView.postMessage(JSON.stringify({handler:ca,params:U})):k&&"function"==typeof k.postMessage&&k.postMessage({handler:ca,params:U,type:"vk-connect",webFrameId:N,connectVersion:m},"*")},q,W);return q(function(ca){ca.detail&&"SetSupportedHandlers"===ca.detail.type&&(da=ca.detail.data.supportedHandlers)}),{send:Y,sendPromise:Y,subscribe:q,unsubscribe:function(ca){ca=T.indexOf(ca);-1<ca&&T.splice(ca,1)},supports:t,supportsAsync:function(ca){return L(this,void 0,void 0,function(){var U;
|
||
return K(this,function(ha){switch(ha.label){case 0:if(wa||Ga)return[2,t(ca)];if(da)return[2,da.includes(ca)];ha.label=1;case 1:return ha.trys.push([1,3,,4]),[4,Y("SetSupportedHandlers")];case 2:return U=ha.sent(),[2,(da=U.supportedHandlers).includes(ca)];case 3:return ha.sent(),[2,(da=["VKWebAppInit"]).includes(ca)];case 4:return[2]}})})},isWebView:z,isIframe:D,isEmbedded:C,isStandalone:function(){return!C()}}}("2.15.3");G.applyMiddleware=function q(){for(var t=[],z=0;z<arguments.length;z++)t[z]=
|
||
arguments[z];return t.includes(void 0)||t.includes(null)?q.apply(void 0,t.filter(function(D){return"function"==typeof D})):function(D){if(0===t.length)return D;var C,J={subscribe:D.subscribe,send:function(){for(var N=[],T=0;T<arguments.length;T++)N[T]=arguments[T];return D.send.apply(D,N)}};return C=t.filter(function(N){return"function"==typeof N}).map(function(N){return N(J)}).reduce(function(N,T){return function(W){return N(T(W))}})(D.send),aa(aa({},D),{send:C})}};G.default=ba;G.parseURLSearchParamsForGetLaunchParams=
|
||
function(q){var t={};try{(new URLSearchParams(q)).forEach(function(z,D){switch(D){case "vk_ts":case "vk_is_recommended":case "vk_profile_id":case "vk_has_profile_button":case "vk_testing_group_id":case "vk_user_id":case "vk_app_id":case "vk_group_id":t[D]=Number(z);break;case "sign":case "vk_chat_id":case "vk_ref":case "vk_access_token_settings":t[D]=z;break;case "odr_enabled":t.odr_enabled="1"===z?1:void 0;break;case "vk_is_app_user":case "vk_are_notifications_enabled":case "vk_is_favorite":a:switch(z){case "0":z=
|
||
0;break a;case "1":z=1;break a;default:z=void 0}t[D]=z;break;case "vk_language":t.vk_language=function(C){return Object.values(G.EGetLaunchParamsResponseLanguages).some(function(J){return J===C})}(z)?z:void 0;break;case "vk_viewer_group_role":t.vk_viewer_group_role=function(C){return Object.values(G.EGetLaunchParamsResponseGroupRole).some(function(J){return J===C})}(z)?z:void 0;break;case "vk_platform":t.vk_platform=function(C){return Object.values(G.EGetLaunchParamsResponsePlatforms).some(function(J){return J===
|
||
C})}(z)?z:void 0}})}catch(z){console.warn(z)}return t};Object.defineProperty(G,"__esModule",{value:!0})})},Zx)),xr,$x,yr,zr,ay,$q,by,cy,dy,ey,fy,Zq,Ar,Hk,fj,Xw,gy={},Kk=Je((gy["node_modules/@firebase/util/dist/index.esm2017.js"]=function(){xr=function(x){for(var G=[],L=0,K=0;K<x.length;K++){var u=x.charCodeAt(K);128>u?G[L++]=u:(2048>u?G[L++]=u>>6|192:(55296===(u&64512)&&K+1<x.length&&56320===(x.charCodeAt(K+1)&64512)?(u=65536+((u&1023)<<10)+(x.charCodeAt(++K)&1023),G[L++]=u>>18|240,G[L++]=u>>12&63|
|
||
128):G[L++]=u>>12|224,G[L++]=u>>6&63|128),G[L++]=u&63|128)}return G};$x=function(x){for(var G=[],L=0,K=0;L<x.length;){var u=x[L++];if(128>u)G[K++]=String.fromCharCode(u);else if(191<u&&224>u){var P=x[L++];G[K++]=String.fromCharCode((u&31)<<6|P&63)}else if(239<u&&365>u){P=x[L++];var aa=x[L++],da=x[L++];u=((u&7)<<18|(P&63)<<12|(aa&63)<<6|da&63)-65536;G[K++]=String.fromCharCode(55296+(u>>10));G[K++]=String.fromCharCode(56320+(u&1023))}else P=x[L++],aa=x[L++],G[K++]=String.fromCharCode((u&15)<<12|(P&
|
||
63)<<6|aa&63)}return G.join("")};yr={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"===typeof atob,encodeByteArray:function(x,G){if(!Array.isArray(x))throw Error("encodeByteArray takes an array as a parameter");this.init_();
|
||
G=G?this.byteToCharMapWebSafe_:this.byteToCharMap_;for(var L=[],K=0;K<x.length;K+=3){var u=x[K],P=K+1<x.length,aa=P?x[K+1]:0,da=K+2<x.length,ba=da?x[K+2]:0,wa=u>>2;u=(u&3)<<4|aa>>4;aa=(aa&15)<<2|ba>>6;ba&=63;da||(ba=64,P||(aa=64));L.push(G[wa],G[u],G[aa],G[ba])}return L.join("")},encodeString:function(x,G){return this.HAS_NATIVE_SUPPORT&&!G?btoa(x):this.encodeByteArray(xr(x),G)},decodeString:function(x,G){return this.HAS_NATIVE_SUPPORT&&!G?atob(x):$x(this.decodeStringToByteArray(x,G))},decodeStringToByteArray:function(x,
|
||
G){this.init_();G=G?this.charToByteMapWebSafe_:this.charToByteMap_;for(var L=[],K=0;K<x.length;){var u=G[x.charAt(K++)],P=K<x.length?G[x.charAt(K)]:0;++K;var aa=K<x.length?G[x.charAt(K)]:64;++K;var da=K<x.length?G[x.charAt(K)]:64;++K;if(null==u||null==P||null==aa||null==da)throw new zr;L.push(u<<2|P>>4);64!==aa&&(L.push(P<<4&240|aa>>2),64!==da&&L.push(aa<<6&192|da))}return L},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={};this.charToByteMap_={};this.byteToCharMapWebSafe_={};this.charToByteMapWebSafe_=
|
||
{};for(var x=0;x<this.ENCODED_VALS.length;x++)this.byteToCharMap_[x]=this.ENCODED_VALS.charAt(x),this.charToByteMap_[this.byteToCharMap_[x]]=x,this.byteToCharMapWebSafe_[x]=this.ENCODED_VALS_WEBSAFE.charAt(x),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[x]]=x,x>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(x)]=x,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(x)]=x)}}};zr=function(){var x=Error.apply(this,arguments);this.message=x.message;"stack"in
|
||
x&&(this.stack=x.stack);this.name="DecodeBase64StringError"};$jscomp.inherits(zr,Error);ay=function(x){x=xr(x);return yr.encodeByteArray(x,!0)};$q=function(x){return ay(x).replace(/\./g,"")};by=function(x){try{return yr.decodeString(x,!0)}catch(G){console.error("base64Decode failed: ",G)}return null};cy=function(){return wJ().__FIREBASE_DEFAULTS__};dy=function(){if("undefined"!==typeof process&&"undefined"!==typeof process.env){var x=process.env.__FIREBASE_DEFAULTS__;if(x)return JSON.parse(x)}};ey=
|
||
function(){if("undefined"!==typeof document){try{var x=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(G){return}return(x=x&&by(x[1]))&&JSON.parse(x)}};fy=function(){try{return cy()||dy()||ey()}catch(x){console.info("Unable to get __FIREBASE_DEFAULTS__ due to: "+x)}};Zq=function(){var x;return null===(x=fy())||void 0===x?void 0:x.config};Ar=function(){var x=this;this.reject=function(){};this.resolve=function(){};this.promise=new Promise(function(G,L){x.resolve=G;x.reject=L})};Ar.prototype.wrapCallback=
|
||
function(x){var G=this;return function(L,K){L?G.reject(L):G.resolve(K);"function"===typeof x&&(G.promise.catch(function(){}),1===x.length?x(L):x(L,K))}};var v=function(x,G,L){G=Error.call(this,G);this.message=G.message;"stack"in G&&(this.stack=G.stack);this.code=x;this.customData=L;this.name="FirebaseError";Object.setPrototypeOf(this,v.prototype);Error.captureStackTrace&&Error.captureStackTrace(this,fj.prototype.create)};$jscomp.inherits(v,Error);Hk=v;fj=function(x,G,L){this.service=x;this.serviceName=
|
||
G;this.errors=L};fj.prototype.create=function(x){var G=$jscomp.getRestArguments.apply(1,arguments)[0]||{},L=this.service+"/"+x,K=this.errors[x];K=K?xJ(K,G):"Error";return new Hk(L,this.serviceName+": "+K+" ("+L+").",G)};Xw=/\{\$([^}]+)}/g},gy)),be,jd,dj,hy={},Br=Je((hy["node_modules/@firebase/component/dist/esm/index.esm2017.js"]=function(){Kk();be=function(v,x,G){this.name=v;this.instanceFactory=x;this.type=G;this.multipleInstances=!1;this.serviceProps={};this.instantiationMode="LAZY";this.onInstanceCreated=
|
||
null};be.prototype.setInstantiationMode=function(v){this.instantiationMode=v;return this};be.prototype.setMultipleInstances=function(v){this.multipleInstances=v;return this};be.prototype.setServiceProps=function(v){this.serviceProps=v;return this};be.prototype.setInstanceCreatedCallback=function(v){this.onInstanceCreated=v;return this};jd=function(v,x){this.name=v;this.container=x;this.component=null;this.instances=new Map;this.instancesDeferred=new Map;this.instancesOptions=new Map;this.onInitCallbacks=
|
||
new Map};jd.prototype.get=function(v){v=this.normalizeInstanceIdentifier(v);if(!this.instancesDeferred.has(v)){var x=new Ar;this.instancesDeferred.set(v,x);if(this.isInitialized(v)||this.shouldAutoInitialize())try{var G=this.getOrInitializeService({instanceIdentifier:v});G&&x.resolve(G)}catch(L){}}return this.instancesDeferred.get(v).promise};jd.prototype.getImmediate=function(v){var x,G=this.normalizeInstanceIdentifier(null===v||void 0===v?void 0:v.identifier);v=null!==(x=null===v||void 0===v?void 0:
|
||
v.optional)&&void 0!==x?x:!1;if(this.isInitialized(G)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:G})}catch(L){if(v)return null;throw L;}else{if(v)return null;throw Error("Service "+this.name+" is not available");}};jd.prototype.getComponent=function(){return this.component};jd.prototype.setComponent=function(v){if(v.name!==this.name)throw Error("Mismatching Component "+v.name+" for Provider "+this.name+".");if(this.component)throw Error("Component for "+
|
||
this.name+" has already been provided");this.component=v;if(this.shouldAutoInitialize()){if("EAGER"===v.instantiationMode)try{this.getOrInitializeService({instanceIdentifier:"[DEFAULT]"})}catch(K){}v=$jscomp.makeIterator(this.instancesDeferred.entries());for(var x=v.next();!x.done;x=v.next()){var G=$jscomp.makeIterator(x.value);x=G.next().value;G=G.next().value;x=this.normalizeInstanceIdentifier(x);try{var L=this.getOrInitializeService({instanceIdentifier:x});G.resolve(L)}catch(K){}}}};jd.prototype.clearInstance=
|
||
function(v){v=void 0===v?"[DEFAULT]":v;this.instancesDeferred.delete(v);this.instancesOptions.delete(v);this.instances.delete(v)};jd.prototype.delete=function(){return gb(this,null,function x(){var G=this,L;return $jscomp.generator.createGenerator(x,function(K){L=Array.from(G.instances.values());return K.yield(Promise.all([].concat($jscomp.arrayFromIterable(L.filter(function(u){return"INTERNAL"in u}).map(function(u){return u.INTERNAL.delete()})),$jscomp.arrayFromIterable(L.filter(function(u){return"_delete"in
|
||
u}).map(function(u){return u._delete()})))),0)})})};jd.prototype.isComponentSet=function(){return null!=this.component};jd.prototype.isInitialized=function(v){return this.instances.has(void 0===v?"[DEFAULT]":v)};jd.prototype.getOptions=function(v){return this.instancesOptions.get(void 0===v?"[DEFAULT]":v)||{}};jd.prototype.initialize=function(v){var x=v=void 0===v?{}:v;x=void 0===x.options?{}:x.options;v=this.normalizeInstanceIdentifier(v.instanceIdentifier);if(this.isInitialized(v))throw Error(this.name+
|
||
"("+v+") has already been initialized");if(!this.isComponentSet())throw Error("Component "+this.name+" has not been registered yet");x=this.getOrInitializeService({instanceIdentifier:v,options:x});for(var G=$jscomp.makeIterator(this.instancesDeferred.entries()),L=G.next();!L.done;L=G.next()){var K=$jscomp.makeIterator(L.value);L=K.next().value;K=K.next().value;L=this.normalizeInstanceIdentifier(L);v===L&&K.resolve(x)}return x};jd.prototype.onInit=function(v,x){var G;x=this.normalizeInstanceIdentifier(x);
|
||
var L=null!==(G=this.onInitCallbacks.get(x))&&void 0!==G?G:new Set;L.add(v);this.onInitCallbacks.set(x,L);(G=this.instances.get(x))&&v(G,x);return function(){L.delete(v)}};jd.prototype.invokeOnInitCallbacks=function(v,x){var G=this.onInitCallbacks.get(x);if(G){G=$jscomp.makeIterator(G);for(var L=G.next();!L.done;L=G.next()){L=L.value;try{L(v,x)}catch(K){}}}};jd.prototype.getOrInitializeService=function(v){var x=v.instanceIdentifier;v=void 0===v.options?{}:v.options;var G=this.instances.get(x);if(!G&&
|
||
this.component&&(G=this.component.instanceFactory(this.container,{instanceIdentifier:"[DEFAULT]"===x?void 0:x,options:v}),this.instances.set(x,G),this.instancesOptions.set(x,v),this.invokeOnInitCallbacks(G,x),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,x,G)}catch(L){}return G||null};jd.prototype.normalizeInstanceIdentifier=function(v){v=void 0===v?"[DEFAULT]":v;return this.component?this.component.multipleInstances?v:"[DEFAULT]":v};jd.prototype.shouldAutoInitialize=
|
||
function(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode};dj=function(v){this.name=v;this.providers=new Map};dj.prototype.addComponent=function(v){var x=this.getProvider(v.name);if(x.isComponentSet())throw Error("Component "+v.name+" has already been registered with "+this.name);x.setComponent(v)};dj.prototype.addOrOverwriteComponent=function(v){this.getProvider(v.name).isComponentSet()&&this.providers.delete(v.name);this.addComponent(v)};dj.prototype.getProvider=function(v){if(this.providers.has(v))return this.providers.get(v);
|
||
var x=new jd(v,this);this.providers.set(v,x);return x};dj.prototype.getProviders=function(){return Array.from(this.providers.values())}},hy)),iy,cc,jy,ky,ly,my,Sf,ny={},sK=Je((ny["node_modules/@firebase/logger/dist/esm/index.esm2017.js"]=function(){iy=[];(function(x){x[x.DEBUG=0]="DEBUG";x[x.VERBOSE=1]="VERBOSE";x[x.INFO=2]="INFO";x[x.WARN=3]="WARN";x[x.ERROR=4]="ERROR";x[x.SILENT=5]="SILENT"})(cc||(cc={}));jy={debug:cc.DEBUG,verbose:cc.VERBOSE,info:cc.INFO,warn:cc.WARN,error:cc.ERROR,silent:cc.SILENT};
|
||
ky=cc.INFO;var v={};ly=(v[cc.DEBUG]="log",v[cc.VERBOSE]="log",v[cc.INFO]="info",v[cc.WARN]="warn",v[cc.ERROR]="error",v);my=function(x,G){var L=$jscomp.getRestArguments.apply(2,arguments);if(!(G<x.logLevel)){var K=(new Date).toISOString(),u=ly[G];if(u)console[u].apply(console,["["+K+"] "+x.name+":"].concat($jscomp.arrayFromIterable(L)));else throw Error("Attempted to log a message with an invalid logType (value: "+G+")");}};Sf=function(x){this.name=x;this._logLevel=ky;this._logHandler=my;this._userLogHandler=
|
||
null;iy.push(this)};Sf.prototype.setLogLevel=function(x){this._logLevel="string"===typeof x?jy[x]:x};Sf.prototype.debug=function(){var x=$jscomp.getRestArguments.apply(0,arguments);this._userLogHandler&&this._userLogHandler.apply(this,[this,cc.DEBUG].concat($jscomp.arrayFromIterable(x)));this._logHandler.apply(this,[this,cc.DEBUG].concat($jscomp.arrayFromIterable(x)))};Sf.prototype.log=function(){var x=$jscomp.getRestArguments.apply(0,arguments);this._userLogHandler&&this._userLogHandler.apply(this,
|
||
[this,cc.VERBOSE].concat($jscomp.arrayFromIterable(x)));this._logHandler.apply(this,[this,cc.VERBOSE].concat($jscomp.arrayFromIterable(x)))};Sf.prototype.info=function(){var x=$jscomp.getRestArguments.apply(0,arguments);this._userLogHandler&&this._userLogHandler.apply(this,[this,cc.INFO].concat($jscomp.arrayFromIterable(x)));this._logHandler.apply(this,[this,cc.INFO].concat($jscomp.arrayFromIterable(x)))};Sf.prototype.warn=function(){var x=$jscomp.getRestArguments.apply(0,arguments);this._userLogHandler&&
|
||
this._userLogHandler.apply(this,[this,cc.WARN].concat($jscomp.arrayFromIterable(x)));this._logHandler.apply(this,[this,cc.WARN].concat($jscomp.arrayFromIterable(x)))};Sf.prototype.error=function(){var x=$jscomp.getRestArguments.apply(0,arguments);this._userLogHandler&&this._userLogHandler.apply(this,[this,cc.ERROR].concat($jscomp.arrayFromIterable(x)));this._logHandler.apply(this,[this,cc.ERROR].concat($jscomp.arrayFromIterable(x)))};$jscomp.global.Object.defineProperties(Sf.prototype,{logLevel:{configurable:!0,
|
||
enumerable:!0,get:function(){return this._logLevel},set:function(x){if(!(x in cc))throw new TypeError('Invalid value "'+x+'" assigned to `logLevel`');this._logLevel=x}},logHandler:{configurable:!0,enumerable:!0,get:function(){return this._logHandler},set:function(x){if("function"!==typeof x)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=x}},userLogHandler:{configurable:!0,enumerable:!0,get:function(){return this._userLogHandler},set:function(x){this._userLogHandler=
|
||
x}}})},ny)),Zw,$w,Yw,Uq,Om,Vq,Qm,Nm,Rm,Pm,oy={},py=Je((oy["node_modules/idb/build/wrap-idb-value.js"]=function(){Zw=function(v,x){return x.some(function(G){return v instanceof G})};Uq=new WeakMap;Om=new WeakMap;Vq=new WeakMap;Qm=new WeakMap;Nm=new WeakMap;Rm={get:function(v,x,G){if(v instanceof IDBTransaction){if("done"===x)return Om.get(v);if("objectStoreNames"===x)return v.objectStoreNames||Vq.get(v);if("store"===x)return G.objectStoreNames[1]?void 0:G.objectStore(G.objectStoreNames[0])}return Pf(v[x])},
|
||
set:function(v,x,G){v[x]=G;return!0},has:function(v,x){return v instanceof IDBTransaction&&("done"===x||"store"===x)?!0:x in v}};Pm=function(v){return Nm.get(v)}},oy)),cx,bx,Tm,qy={},Cr=Je((qy["node_modules/idb/build/index.js"]=function(){py();py();cx=["get","getKey","getAll","getAllKeys","count"];bx=["put","add","delete","clear"];Tm=new Map;Rm=function(v){return oK(nK({},v),{get:function(x,G,L){return ax(x,G)||v.get(x,G,L)},has:function(x,G){return!!ax(x,G)||v.has(x,G)}})}(Rm)},qy)),ar,Zm,br,ff,
|
||
Vm,fx,Gk,ex,Um,ry,Qf,Wm,hx,ix,ej,Xm,kx,Ym,gj,sy={},fn=Je((sy["node_modules/@firebase/app/dist/esm/index.esm2017.js"]=function(){Br();sK();Kk();Kk();Cr();ar=function(x){this.container=x};ar.prototype.getPlatformInfoString=function(){return this.container.getProviders().map(function(x){var G=x.getComponent();return"VERSION"===(null===G||void 0===G?void 0:G.type)?(x=x.getImmediate(),x.library+"/"+x.version):null}).filter(function(x){return x}).join(" ")};Zm="@firebase/app";br="0.10.15";ff=new Sf("@firebase/app");
|
||
Vm="[DEFAULT]";var v={};fx=(v[Zm]="fire-core",v["@firebase/app-compat"]="fire-core-compat",v["@firebase/analytics"]="fire-analytics",v["@firebase/analytics-compat"]="fire-analytics-compat",v["@firebase/app-check"]="fire-app-check",v["@firebase/app-check-compat"]="fire-app-check-compat",v["@firebase/auth"]="fire-auth",v["@firebase/auth-compat"]="fire-auth-compat",v["@firebase/database"]="fire-rtdb",v["@firebase/data-connect"]="fire-data-connect",v["@firebase/database-compat"]="fire-rtdb-compat",v["@firebase/functions"]=
|
||
"fire-fn",v["@firebase/functions-compat"]="fire-fn-compat",v["@firebase/installations"]="fire-iid",v["@firebase/installations-compat"]="fire-iid-compat",v["@firebase/messaging"]="fire-fcm",v["@firebase/messaging-compat"]="fire-fcm-compat",v["@firebase/performance"]="fire-perf",v["@firebase/performance-compat"]="fire-perf-compat",v["@firebase/remote-config"]="fire-rc",v["@firebase/remote-config-compat"]="fire-rc-compat",v["@firebase/storage"]="fire-gcs",v["@firebase/storage-compat"]="fire-gcs-compat",
|
||
v["@firebase/firestore"]="fire-fst",v["@firebase/firestore-compat"]="fire-fst-compat",v["@firebase/vertexai"]="fire-vertex",v["fire-js"]="fire-js",v.firebase="fire-js-all",v);Gk=new Map;ex=new Map;Um=new Map;v={};ry=(v["no-app"]="No Firebase App '{$appName}' has been created - call initializeApp() first",v["bad-app-name"]="Illegal App name: '{$appName}'",v["duplicate-app"]="Firebase App named '{$appName}' already exists with different options or config",v["app-deleted"]="Firebase App named '{$appName}' already deleted",
|
||
v["server-app-deleted"]="Firebase Server App has been deleted",v["no-options"]="Need to provide options, when not being deployed to hosting via source.",v["invalid-app-argument"]="firebase.{$appName}() takes either no argument or a Firebase App instance.",v["invalid-log-argument"]="First argument to `onLog` must be null or a function.",v["idb-open"]="Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.",v["idb-get"]="Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.",
|
||
v["idb-set"]="Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.",v["idb-delete"]="Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.",v["finalization-registry-not-supported"]="FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.",v["invalid-server-app-environment"]="FirebaseServerApp is not for use in browser environments.",v);Qf=new fj("app","Firebase",ry);Wm=function(x,G,L){var K=this;
|
||
this._isDeleted=!1;this._options=Object.assign({},x);this._config=Object.assign({},G);this._name=G.name;this._automaticDataCollectionEnabled=G.automaticDataCollectionEnabled;this._container=L;this.container.addComponent(new be("app",function(){return K},"PUBLIC"))};Wm.prototype.checkDestroyed=function(){if(this.isDeleted)throw Qf.create("app-deleted",{appName:this._name});};$jscomp.global.Object.defineProperties(Wm.prototype,{automaticDataCollectionEnabled:{configurable:!0,enumerable:!0,get:function(){this.checkDestroyed();
|
||
return this._automaticDataCollectionEnabled},set:function(x){this.checkDestroyed();this._automaticDataCollectionEnabled=x}},name:{configurable:!0,enumerable:!0,get:function(){this.checkDestroyed();return this._name}},options:{configurable:!0,enumerable:!0,get:function(){this.checkDestroyed();return this._options}},config:{configurable:!0,enumerable:!0,get:function(){this.checkDestroyed();return this._config}},container:{configurable:!0,enumerable:!0,get:function(){return this._container}},isDeleted:{configurable:!0,
|
||
enumerable:!0,get:function(){return this._isDeleted},set:function(x){this._isDeleted=x}}});hx="firebase-heartbeat-database";ix=1;ej="firebase-heartbeat-store";Xm=null;kx=1024;Ym=function(x){var G=this;this.container=x;this._heartbeatsCache=null;x=this.container.getProvider("app").getImmediate();this._storage=new gj(x);this._heartbeatsCachePromise=this._storage.read().then(function(L){return G._heartbeatsCache=L})};Ym.prototype.triggerHeartbeat=function(){return gb(this,null,function G(){var L,K,u=
|
||
this,P,aa,da,ba;return $jscomp.generator.createGenerator(G,function(wa){switch(wa.nextAddress){case 1:wa.setCatchFinallyBlocks(2);P=u.container.getProvider("platform-logger").getImmediate();aa=P.getPlatformInfoString();da=(new Date).toISOString().substring(0,10);if(null!=(null===(L=u._heartbeatsCache)||void 0===L?void 0:L.heartbeats)){wa.jumpTo(4);break}return wa.yield(u._heartbeatsCachePromise,5);case 5:if(u._heartbeatsCache=wa.yieldResult,null==(null===(K=u._heartbeatsCache)||void 0===K?void 0:
|
||
K.heartbeats))return wa.return();case 4:if(u._heartbeatsCache.lastSentHeartbeatDate===da||u._heartbeatsCache.heartbeats.some(function(Ga){return Ga.date===da}))return wa.return();u._heartbeatsCache.heartbeats.push({date:da,agent:aa});u._heartbeatsCache.heartbeats=u._heartbeatsCache.heartbeats.filter(function(Ga){Ga=(new Date(Ga.date)).valueOf();return 2592E6>=Date.now()-Ga});return wa.return(u._storage.overwrite(u._heartbeatsCache));case 2:ba=wa.enterCatchBlock(),ff.warn(ba),wa.jumpToEnd()}})})};
|
||
Ym.prototype.getHeartbeatsHeader=function(){return gb(this,null,function G(){var L,K=this,u,P,aa,da,ba,wa;return $jscomp.generator.createGenerator(G,function(Ga){switch(Ga.nextAddress){case 1:Ga.setCatchFinallyBlocks(2);if(null!==K._heartbeatsCache){Ga.jumpTo(4);break}return Ga.yield(K._heartbeatsCachePromise,4);case 4:if(null==(null===(L=K._heartbeatsCache)||void 0===L?void 0:L.heartbeats)||0===K._heartbeatsCache.heartbeats.length)return Ga.return("");u=(new Date).toISOString().substring(0,10);P=
|
||
DJ(K._heartbeatsCache.heartbeats);aa=P.heartbeatsToSend;da=P.unsentEntries;ba=$q(JSON.stringify({version:2,heartbeats:aa}));K._heartbeatsCache.lastSentHeartbeatDate=u;if(!(0<da.length)){K._heartbeatsCache.heartbeats=[];K._storage.overwrite(K._heartbeatsCache);Ga.jumpTo(6);break}K._heartbeatsCache.heartbeats=da;return Ga.yield(K._storage.overwrite(K._heartbeatsCache),6);case 6:return Ga.return(ba);case 2:return wa=Ga.enterCatchBlock(),ff.warn(wa),Ga.return("")}})})};gj=function(x){this.app=x;this._canUseIndexedDBPromise=
|
||
this.runIndexedDBEnvironmentCheck()};gj.prototype.runIndexedDBEnvironmentCheck=function(){return gb(this,null,function G(){return $jscomp.generator.createGenerator(G,function(L){return"object"===typeof indexedDB?L.return(Ww().then(function(){return!0}).catch(function(){return!1})):L.return(!1)})})};gj.prototype.read=function(){return gb(this,null,function G(){var L=this,K,u;return $jscomp.generator.createGenerator(G,function(P){if(1==P.nextAddress)return P.yield(L._canUseIndexedDBPromise,2);if(4!=
|
||
P.nextAddress)return(K=P.yieldResult)?P.yield(CJ(L.app),4):P.return({heartbeats:[]});u=P.yieldResult;return(null===u||void 0===u?0:u.heartbeats)?P.return(u):P.return({heartbeats:[]})})})};gj.prototype.overwrite=function(x){return gb(this,null,function L(){var K,u=this,P,aa;return $jscomp.generator.createGenerator(L,function(da){if(1==da.nextAddress)return da.yield(u._canUseIndexedDBPromise,2);if(4!=da.nextAddress)return(P=da.yieldResult)?da.yield(u.read(),4):da.return();aa=da.yieldResult;return da.return(jx(u.app,
|
||
{lastSentHeartbeatDate:null!==(K=x.lastSentHeartbeatDate)&&void 0!==K?K:aa.lastSentHeartbeatDate,heartbeats:x.heartbeats}))})})};gj.prototype.add=function(x){return gb(this,null,function L(){var K,u=this,P,aa;return $jscomp.generator.createGenerator(L,function(da){if(1==da.nextAddress)return da.yield(u._canUseIndexedDBPromise,2);if(4!=da.nextAddress)return(P=da.yieldResult)?da.yield(u.read(),4):da.return();aa=da.yieldResult;return da.return(jx(u.app,{lastSentHeartbeatDate:null!==(K=x.lastSentHeartbeatDate)&&
|
||
void 0!==K?K:aa.lastSentHeartbeatDate,heartbeats:[].concat($jscomp.arrayFromIterable(aa.heartbeats),$jscomp.arrayFromIterable(x.heartbeats))}))})})};EJ("")},sy)),ty={},tK=Je((ty["node_modules/firebase/app/dist/esm/index.esm.js"]=function(){fn();fn();Dg("firebase","11.0.1","app")},ty)),ir,dr,cr,ox,Bx,uy,Eg,yx,cn,fr,Fg,vx,wx,Gg,$m,vy,wy,xy={},uK=Je((xy["node_modules/@firebase/installations/dist/esm/index.esm2017.js"]=function(){fn();Br();Kk();Cr();ir=1E4;dr="w:0.6.10";cr="FIS_v2";ox="https://firebaseinstallations.googleapis.com/v1";
|
||
Bx=36E5;var v={};uy=(v["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',v["not-registered"]="Firebase Installation is not registered.",v["installation-not-found"]="Firebase Installation not found.",v["request-failed"]='{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',v["app-offline"]="Could not process request. Application offline.",v["delete-pending-registration"]="Can't delete installation while there is a pending registration request.",
|
||
v);Eg=new fj("installations","Installations",uy);yx=/^[cdef][\w-]{21}$/;cn="";fr=new Map;Fg=null;vx="firebase-installations-database";wx=1;Gg="firebase-installations-store";$m=null;vy=function(x){x=x.getProvider("app").getImmediate();var G=RJ(x),L=Xq(x,"heartbeat");return{app:x,appConfig:G,heartbeatServiceProvider:L,_delete:function(){return Promise.resolve()}}};wy=function(x){x=x.getProvider("app").getImmediate();var G=Xq(x,"installations").getImmediate();return{getId:function(){return OJ(G)},getToken:function(L){return PJ(G,
|
||
L)}}};Jh(new be("installations",vy,"PUBLIC"));Jh(new be("installations-internal",wy,"PRIVATE"));Dg("@firebase/installations","0.6.10");Dg("@firebase/installations","0.6.10","esm2017")},xy)),Ox,Px,qr,Jx,sr,Rx,Sx,Tx,yy,Jk,dn,Dx,lr,Ex,Fx,Hg,en,zy,id,Lx,Dr,Ay,By,Cy={},vK=Je((Cy["node_modules/@firebase/messaging/dist/esm/index.esm2017.js"]=function(){uK();Br();Cr();Kk();fn();Ox="/firebase-messaging-sw.js";Px="/firebase-cloud-messaging-push-scope";qr="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4";
|
||
Jx="https://fcmregistrations.googleapis.com/v1";sr="google.c.a.c_id";Rx="google.c.a.c_l";Sx="google.c.a.ts";Tx="google.c.a.e";(function(x){x[x.DATA_MESSAGE=1]="DATA_MESSAGE";x[x.DISPLAY_NOTIFICATION=3]="DISPLAY_NOTIFICATION"})(yy||(yy={}));(function(x){x.PUSH_RECEIVED="push-received";x.NOTIFICATION_CLICKED="notification-clicked"})(Jk||(Jk={}));dn="fcm_token_details_db";Dx=5;lr="fcm_token_object_Store";Ex="firebase-messaging-database";Fx=1;Hg="firebase-messaging-store";en=null;var v={};zy=(v["missing-app-config-values"]=
|
||
'Missing App configuration value: "{$valueName}"',v["only-available-in-window"]="This method is available in a Window context.",v["only-available-in-sw"]="This method is available in a service worker context.",v["permission-default"]="The notification permission was not granted and dismissed instead.",v["permission-blocked"]="The notification permission was not granted and blocked instead.",v["unsupported-browser"]="This browser doesn't support the API's required to use the Firebase SDK.",v["indexed-db-unsupported"]=
|
||
"This browser doesn't support indexedDb.open() (ex. Safari iFrame, Firefox Private Browsing, etc)",v["failed-service-worker-registration"]="We are unable to register the default service worker. {$browserErrorMessage}",v["token-subscribe-failed"]="A problem occurred while subscribing the user to FCM: {$errorInfo}",v["token-subscribe-no-token"]="FCM returned no token when subscribing the user to push.",v["token-unsubscribe-failed"]="A problem occurred while unsubscribing the user from FCM: {$errorInfo}",
|
||
v["token-update-failed"]="A problem occurred while updating the user from FCM: {$errorInfo}",v["token-update-no-token"]="FCM returned no token when updating the user to push.",v["use-sw-after-get-token"]="The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.",v["invalid-sw-registration"]="The input to useServiceWorker() must be a ServiceWorkerRegistration.",v["invalid-bg-handler"]="The input to setBackgroundMessageHandler() must be a function.",
|
||
v["invalid-vapid-key"]="The public VAPID key must be a string.",v["use-vapid-key-after-get-token"]="The usePublicVapidKey() method may only be called once and must be called before calling getToken() to ensure your VAPID key is used.",v);id=new fj("messaging","Messaging",zy);Lx=6048E5;aK("AzSCbw63g1R0nCw85jG8","Iaya3yLKwmgvh7cF0q4");Dr=function(x,G,L){this.deliveryMetricsExportedToBigQueryEnabled=!1;this.onMessageHandler=this.onBackgroundMessageHandler=null;this.logEvents=[];this.isLogServiceStarted=
|
||
!1;if(!x||!x.options)throw rr("App Configuration Object");if(!x.name)throw rr("App Name");for(var K=x.options,u=$jscomp.makeIterator(["projectId","apiKey","appId","messagingSenderId"]),P=u.next();!P.done;P=u.next())if(P=P.value,!K[P])throw rr(P);this.firebaseDependencies={app:x,appConfig:{appName:x.name,projectId:K.projectId,apiKey:K.apiKey,appId:K.appId,senderId:K.messagingSenderId},installations:G,analyticsProvider:L}};Dr.prototype._delete=function(){return Promise.resolve()};Ay=function(x){var G=
|
||
new Dr(x.getProvider("app").getImmediate(),x.getProvider("installations-internal").getImmediate(),x.getProvider("analytics-internal"));navigator.serviceWorker.addEventListener("message",function(L){return eK(G,L)});return G};By=function(x){var G=x.getProvider("messaging").getImmediate();return{getToken:function(L){return Qx(G,L)}}};Jh(new be("messaging",Ay,"PUBLIC"));Jh(new be("messaging-internal",By,"PRIVATE"));Dg("@firebase/messaging","0.12.13");Dg("@firebase/messaging","0.12.13","esm2017")},Cy)),
|
||
Dy={},wK=Je((Dy["node_modules/firebase/messaging/dist/esm/index.esm.js"]=function(){vK()},Dy)),Kh,Ey,F,Fy,Gy,Er,jc,Fr,Gr,Lh,gf,Nd,Hy,Iy,Ke,Wa,Ab,Hr,Jy,gn,hn,Ky,Ly,My,Ny,Oy,Py,Qy,Lk,Ry,Sy,Ty,Uy,Vy,Wy,Xy,Yy,Zy,$y,az,bz,cz,dz,ez,fz,gz,hz,iz,jz,kz,Mh,Tf,Le,lz,mz,nz,oz,pz,xb,qz,rz,sz,tz,uz,vz,wz,xz,yz,zz,Az,Bz,Cz,Dz,Od,Ez,Fz,Gz,Hz,Mk,Uf,Iz,Jz,Kz,Lz,Mz,Nz,Oz,pd,Ir,jn,hj,kn,Pz,Qz,Bd,se,Me,Ne,Jr,Nk,Rz,Sz,Tz,Uz,Vz,Wz,Xz,Kr,Yz,Zz,$z,aA,bA,cA,dA,eA,Ig,Ok,Lr,ln,mn,Pk,ij,Mr,Nr,Or,Pr,Qk,fA,Nh,gA,hA,iA,jA,kA,lA,
|
||
mA,nA,nn,jj,oA,pA,Qr,Rr,Vf,Sr,Tr,Jg,Rk,Ur,qA,Sk,rA,sA,Vr,Wr,Xr,Yr,Zr,Kg,tA,uA,vA,Oh,on,wA,xA,yA,Ph,pn,fb,Lg,Qh,Rh,zA,AA,BA,CA,qn,DA,EA,FA,GA,HA,IA,JA,KA,LA,MA,NA,OA,PA,QA,RA,SA,TA,UA,VA,Tk,$r,WA,XA,YA,Uk,ZA,$A,aB,bB,cB,dB,eB,fB,gB,hB,iB,jB,kB,lB,mB,nB,oB,pB,qB,rB,sB,tB,uB,vB,wB,xB,yB,zB,AB,BB,CB,DB,EB,GB,as,HB,IB,bs,JB,KB,LB,MB,NB,OB,Sh,rn,kj,Bc,sn,Pc,PB,QB,lj,RB,SB,hf,jf,mj,nj,kf,lf,TB={},xK=Je((TB["src/cannon.js"]=function(){var v=function(h){void 0===h&&(h=[0,0,0,0,0,0,0,0,0]);this.elements=h};
|
||
v.prototype.identity=function(){var h=this.elements;h[0]=1;h[1]=0;h[2]=0;h[3]=0;h[4]=1;h[5]=0;h[6]=0;h[7]=0;h[8]=1};v.prototype.setZero=function(){var h=this.elements;h[0]=0;h[1]=0;h[2]=0;h[3]=0;h[4]=0;h[5]=0;h[6]=0;h[7]=0;h[8]=0};v.prototype.setTrace=function(h){var k=this.elements;k[0]=h.x;k[4]=h.y;k[8]=h.z};v.prototype.getTrace=function(h){void 0===h&&(h=new F);var k=this.elements;h.x=k[0];h.y=k[4];h.z=k[8];return h};v.prototype.vmult=function(h,k){void 0===k&&(k=new F);var m=this.elements,q=h.x,
|
||
t=h.y;h=h.z;k.x=m[0]*q+m[1]*t+m[2]*h;k.y=m[3]*q+m[4]*t+m[5]*h;k.z=m[6]*q+m[7]*t+m[8]*h;return k};v.prototype.smult=function(h){for(var k=0;k<this.elements.length;k++)this.elements[k]*=h};v.prototype.mmult=function(h,k){void 0===k&&(k=new v);var m=this.elements,q=h.elements;h=k.elements;var t=m[0],z=m[1],D=m[2],C=m[3],J=m[4],N=m[5],T=m[6],W=m[7];m=m[8];var Y=q[0],ca=q[1],U=q[2],ha=q[3],V=q[4],ta=q[5],Na=q[6],Qa=q[7];q=q[8];h[0]=t*Y+z*ha+D*Na;h[1]=t*ca+z*V+D*Qa;h[2]=t*U+z*ta+D*q;h[3]=C*Y+J*ha+N*Na;
|
||
h[4]=C*ca+J*V+N*Qa;h[5]=C*U+J*ta+N*q;h[6]=T*Y+W*ha+m*Na;h[7]=T*ca+W*V+m*Qa;h[8]=T*U+W*ta+m*q;return k};v.prototype.scale=function(h,k){void 0===k&&(k=new v);for(var m=this.elements,q=k.elements,t=0;3!==t;t++)q[3*t]=h.x*m[3*t],q[3*t+1]=h.y*m[3*t+1],q[3*t+2]=h.z*m[3*t+2];return k};v.prototype.solve=function(h,k){void 0===k&&(k=new F);var m=[],q,t;for(q=0;12>q;q++)m.push(0);for(q=0;3>q;q++)for(t=0;3>t;t++)m[q+4*t]=this.elements[q+3*t];m[3]=h.x;m[7]=h.y;m[11]=h.z;var z=3,D=z;do{q=D-z;if(0===m[q+4*q])for(t=
|
||
q+1;t<D;t++)if(0!==m[q+4*t]){var C=4;do{var J=4-C;m[J+4*q]+=m[J+4*t]}while(--C);break}if(0!==m[q+4*q])for(t=q+1;t<D;t++){var N=m[q+4*t]/m[q+4*q];C=4;do J=4-C,m[J+4*t]=J<=q?0:m[J+4*t]-m[J+4*q]*N;while(--C)}}while(--z);k.z=m[11]/m[10];k.y=(m[7]-m[6]*k.z)/m[5];k.x=(m[3]-m[2]*k.z-m[1]*k.y)/m[0];if(isNaN(k.x)||isNaN(k.y)||isNaN(k.z)||Infinity===k.x||Infinity===k.y||Infinity===k.z)throw"Could not solve equation! Got x=["+k.toString()+"], b=["+h.toString()+"], A=["+this.toString()+"]";return k};v.prototype.e=
|
||
function(h,k,m){if(void 0===m)return this.elements[k+3*h];this.elements[k+3*h]=m};v.prototype.copy=function(h){for(var k=0;k<h.elements.length;k++)this.elements[k]=h.elements[k];return this};v.prototype.toString=function(){for(var h="",k=0;9>k;k++)h+=this.elements[k]+",";return h};v.prototype.reverse=function(h){void 0===h&&(h=new v);var k=Ey,m,q;for(m=0;3>m;m++)for(q=0;3>q;q++)k[m+6*q]=this.elements[m+3*q];k[3]=1;k[9]=0;k[15]=0;k[4]=0;k[10]=1;k[16]=0;k[5]=0;k[11]=0;k[17]=1;var t=3,z=t;do{m=z-t;if(0===
|
||
k[m+6*m])for(q=m+1;q<z;q++)if(0!==k[m+6*q]){var D=6;do{var C=6-D;k[C+6*m]+=k[C+6*q]}while(--D);break}if(0!==k[m+6*m])for(q=m+1;q<z;q++){var J=k[m+6*q]/k[m+6*m];D=6;do C=6-D,k[C+6*q]=C<=m?0:k[C+6*q]-k[C+6*m]*J;while(--D)}}while(--t);m=2;do{q=m-1;do{t=k[m+6*q]/k[m+6*m];D=6;do C=6-D,k[C+6*q]-=k[C+6*m]*t;while(--D)}while(q--)}while(--m);m=2;do{q=1/k[m+6*m];D=6;do C=6-D,k[C+6*m]*=q;while(--D)}while(m--);m=2;do{q=2;do{C=k[3+q+6*m];if(isNaN(C)||Infinity===C)throw"Could not reverse! A=["+this.toString()+
|
||
"]";h.e(m,q,C)}while(q--)}while(m--);return h};v.prototype.setRotationFromQuaternion=function(h){var k=h.x,m=h.y,q=h.z,t=h.w,z=k+k,D=m+m,C=q+q;h=k*z;var J=k*D;k*=C;var N=m*D;m*=C;q*=C;z*=t;D*=t;t*=C;C=this.elements;C[0]=1-(N+q);C[1]=J-t;C[2]=k+D;C[3]=J+t;C[4]=1-(h+q);C[5]=m-z;C[6]=k-D;C[7]=m+z;C[8]=1-(h+N);return this};v.prototype.transpose=function(h){void 0===h&&(h=new v);var k=this.elements,m=h.elements;m[0]=k[0];m[4]=k[4];m[8]=k[8];var q=k[1];m[1]=k[3];m[3]=q;q=k[2];m[2]=k[6];m[6]=q;q=k[5];m[5]=
|
||
k[7];m[7]=q;return h};Kh=v;Ey=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];var x=function(h,k,m){void 0===h&&(h=0);void 0===k&&(k=0);void 0===m&&(m=0);this.x=h;this.y=k;this.z=m};x.prototype.cross=function(h,k){void 0===k&&(k=new x);var m=h.x,q=h.y;h=h.z;var t=this.x,z=this.y,D=this.z;k.x=z*h-D*q;k.y=D*m-t*h;k.z=t*q-z*m;return k};x.prototype.set=function(h,k,m){this.x=h;this.y=k;this.z=m;return this};x.prototype.setZero=function(){this.x=this.y=this.z=0};x.prototype.vadd=function(h,k){if(k)k.x=h.x+this.x,
|
||
k.y=h.y+this.y,k.z=h.z+this.z;else return new x(this.x+h.x,this.y+h.y,this.z+h.z)};x.prototype.vsub=function(h,k){if(k)k.x=this.x-h.x,k.y=this.y-h.y,k.z=this.z-h.z;else return new x(this.x-h.x,this.y-h.y,this.z-h.z)};x.prototype.crossmat=function(){return new Kh([0,-this.z,this.y,this.z,0,-this.x,-this.y,this.x,0])};x.prototype.normalize=function(){var h=this.x,k=this.y,m=this.z;h=Math.sqrt(h*h+k*k+m*m);0<h?(k=1/h,this.x*=k,this.y*=k,this.z*=k):this.z=this.y=this.x=0;return h};x.prototype.unit=function(h){void 0===
|
||
h&&(h=new x);var k=this.x,m=this.y,q=this.z,t=Math.sqrt(k*k+m*m+q*q);0<t?(t=1/t,h.x=k*t,h.y=m*t,h.z=q*t):(h.x=1,h.y=0,h.z=0);return h};x.prototype.length=function(){var h=this.x,k=this.y,m=this.z;return Math.sqrt(h*h+k*k+m*m)};x.prototype.lengthSquared=function(){return this.dot(this)};x.prototype.distanceTo=function(h){var k=this.x,m=this.y,q=this.z,t=h.x,z=h.y;h=h.z;return Math.sqrt((t-k)*(t-k)+(z-m)*(z-m)+(h-q)*(h-q))};x.prototype.distanceSquared=function(h){var k=this.x,m=this.y,q=this.z,t=h.x,
|
||
z=h.y;h=h.z;return(t-k)*(t-k)+(z-m)*(z-m)+(h-q)*(h-q)};x.prototype.scale=function(h,k){void 0===k&&(k=new x);var m=this.y,q=this.z;k.x=h*this.x;k.y=h*m;k.z=h*q;return k};x.prototype.vmul=function(h,k){void 0===k&&(k=new x);k.x=h.x*this.x;k.y=h.y*this.y;k.z=h.z*this.z;return k};x.prototype.addScaledVector=function(h,k,m){void 0===m&&(m=new x);m.x=this.x+h*k.x;m.y=this.y+h*k.y;m.z=this.z+h*k.z;return m};x.prototype.dot=function(h){return this.x*h.x+this.y*h.y+this.z*h.z};x.prototype.isZero=function(){return 0===
|
||
this.x&&0===this.y&&0===this.z};x.prototype.negate=function(h){void 0===h&&(h=new x);h.x=-this.x;h.y=-this.y;h.z=-this.z;return h};x.prototype.tangents=function(h,k){var m=this.length();if(0<m){var q=Fy;m=1/m;q.set(this.x*m,this.y*m,this.z*m);m=Gy;.9>Math.abs(q.x)?m.set(1,0,0):m.set(0,1,0);q.cross(m,h);q.cross(h,k)}else h.set(1,0,0),k.set(0,1,0)};x.prototype.toString=function(){return this.x+","+this.y+","+this.z};x.prototype.toArray=function(){return[this.x,this.y,this.z]};x.prototype.copy=function(h){this.x=
|
||
h.x;this.y=h.y;this.z=h.z;return this};x.prototype.lerp=function(h,k,m){var q=this.x,t=this.y,z=this.z;m.x=q+(h.x-q)*k;m.y=t+(h.y-t)*k;m.z=z+(h.z-z)*k};x.prototype.almostEquals=function(h,k){void 0===k&&(k=1E-6);return Math.abs(this.x-h.x)>k||Math.abs(this.y-h.y)>k||Math.abs(this.z-h.z)>k?!1:!0};x.prototype.almostZero=function(h){void 0===h&&(h=1E-6);return Math.abs(this.x)>h||Math.abs(this.y)>h||Math.abs(this.z)>h?!1:!0};x.prototype.isAntiparallelTo=function(h,k){this.negate(Er);return Er.almostEquals(h,
|
||
k)};x.prototype.clone=function(){return new x(this.x,this.y,this.z)};F=x;F.ZERO=new F(0,0,0);F.UNIT_X=new F(1,0,0);F.UNIT_Y=new F(0,1,0);F.UNIT_Z=new F(0,0,1);Fy=new F;Gy=new F;Er=new F;var G=function(h){void 0===h&&(h={});this.lowerBound=new F;this.upperBound=new F;h.lowerBound&&this.lowerBound.copy(h.lowerBound);h.upperBound&&this.upperBound.copy(h.upperBound)};G.prototype.setFromPoints=function(h,k,m,q){var t=this.lowerBound,z=this.upperBound;t.copy(h[0]);m&&m.vmult(t,t);z.copy(t);for(var D=1;D<
|
||
h.length;D++){var C=h[D];m&&(m.vmult(C,Fr),C=Fr);C.x>z.x&&(z.x=C.x);C.x<t.x&&(t.x=C.x);C.y>z.y&&(z.y=C.y);C.y<t.y&&(t.y=C.y);C.z>z.z&&(z.z=C.z);C.z<t.z&&(t.z=C.z)}k&&(k.vadd(t,t),k.vadd(z,z));q&&(t.x-=q,t.y-=q,t.z-=q,z.x+=q,z.y+=q,z.z+=q);return this};G.prototype.copy=function(h){this.lowerBound.copy(h.lowerBound);this.upperBound.copy(h.upperBound);return this};G.prototype.clone=function(){return(new G).copy(this)};G.prototype.extend=function(h){this.lowerBound.x=Math.min(this.lowerBound.x,h.lowerBound.x);
|
||
this.upperBound.x=Math.max(this.upperBound.x,h.upperBound.x);this.lowerBound.y=Math.min(this.lowerBound.y,h.lowerBound.y);this.upperBound.y=Math.max(this.upperBound.y,h.upperBound.y);this.lowerBound.z=Math.min(this.lowerBound.z,h.lowerBound.z);this.upperBound.z=Math.max(this.upperBound.z,h.upperBound.z)};G.prototype.overlaps=function(h){var k=this.lowerBound,m=this.upperBound,q=h.lowerBound;h=h.upperBound;var t=q.y<=m.y&&m.y<=h.y||k.y<=h.y&&h.y<=m.y,z=q.z<=m.z&&m.z<=h.z||k.z<=h.z&&h.z<=m.z;return(q.x<=
|
||
m.x&&m.x<=h.x||k.x<=h.x&&h.x<=m.x)&&t&&z};G.prototype.volume=function(){var h=this.lowerBound,k=this.upperBound;return(k.x-h.x)*(k.y-h.y)*(k.z-h.z)};G.prototype.contains=function(h){var k=this.lowerBound,m=this.upperBound,q=h.lowerBound;h=h.upperBound;return k.x<=q.x&&m.x>=h.x&&k.y<=q.y&&m.y>=h.y&&k.z<=q.z&&m.z>=h.z};G.prototype.getCorners=function(h,k,m,q,t,z,D,C){var J=this.lowerBound,N=this.upperBound;h.copy(J);k.set(N.x,J.y,J.z);m.set(N.x,N.y,J.z);q.set(J.x,N.y,N.z);t.set(N.x,J.y,N.z);z.set(J.x,
|
||
N.y,J.z);D.set(J.x,J.y,N.z);C.copy(N)};G.prototype.toLocalFrame=function(h,k){var m=Gr;this.getCorners(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7]);for(var q=0;8!==q;q++){var t=m[q];h.pointToLocal(t,t)}return k.setFromPoints(m)};G.prototype.toWorldFrame=function(h,k){var m=Gr;this.getCorners(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7]);for(var q=0;8!==q;q++){var t=m[q];h.pointToWorld(t,t)}return k.setFromPoints(m)};G.prototype.overlapsRay=function(h){var k=h.direction;h=h.from;var m=1/k.x,q=1/k.y,t=1/k.z;
|
||
k=(this.lowerBound.x-h.x)*m;m*=this.upperBound.x-h.x;var z=(this.lowerBound.y-h.y)*q;q*=this.upperBound.y-h.y;var D=(this.lowerBound.z-h.z)*t;h=(this.upperBound.z-h.z)*t;t=Math.min(Math.min(Math.max(k,m),Math.max(z,q)),Math.max(D,h));return 0>t||Math.max(Math.max(Math.min(k,m),Math.min(z,q)),Math.min(D,h))>t?!1:!0};jc=G;Fr=new F;Gr=[new F,new F,new F,new F,new F,new F,new F,new F];Lh=function(){this.matrix=[]};Lh.prototype.get=function(h,k){h=h.index;k=k.index;if(k>h){var m=k;k=h;h=m}return this.matrix[(h*
|
||
(h+1)>>1)+k-1]};Lh.prototype.set=function(h,k,m){h=h.index;k=k.index;if(k>h){var q=k;k=h;h=q}this.matrix[(h*(h+1)>>1)+k-1]=m?1:0};Lh.prototype.reset=function(){var h=this.matrix;if(h.fill)h.fill(0);else for(var k=0,m=h.length;k!==m;k++)h[k]=0};Lh.prototype.setNumObjects=function(h){this.matrix.length=h*(h-1)>>1};gf=function(){};gf.prototype.addEventListener=function(h,k){void 0===this._listeners&&(this._listeners={});var m=this._listeners;void 0===m[h]&&(m[h]=[]);m[h].includes(k)||m[h].push(k);return this};
|
||
gf.prototype.hasEventListener=function(h,k){if(void 0===this._listeners)return!1;var m=this._listeners;return void 0!==m[h]&&m[h].includes(k)?!0:!1};gf.prototype.hasAnyEventListener=function(h){return void 0===this._listeners?!1:void 0!==this._listeners[h]};gf.prototype.removeEventListener=function(h,k){if(void 0===this._listeners)return this;var m=this._listeners;if(void 0===m[h])return this;k=m[h].indexOf(k);-1!==k&&m[h].splice(k,1);return this};gf.prototype.dispatchEvent=function(h){if(void 0===
|
||
this._listeners)return this;var k=this._listeners[h.type];if(void 0!==k){h.target=this;for(var m=0,q=k.length;m<q;m++)k[m].call(this,h)}return this};var L=function(h,k,m,q){void 0===h&&(h=0);void 0===k&&(k=0);void 0===m&&(m=0);void 0===q&&(q=1);this.x=h;this.y=k;this.z=m;this.w=q};L.prototype.set=function(h,k,m,q){this.x=h;this.y=k;this.z=m;this.w=q;return this};L.prototype.toString=function(){return this.x+","+this.y+","+this.z+","+this.w};L.prototype.toArray=function(){return[this.x,this.y,this.z,
|
||
this.w]};L.prototype.setFromAxisAngle=function(h,k){var m=Math.sin(.5*k);this.x=h.x*m;this.y=h.y*m;this.z=h.z*m;this.w=Math.cos(.5*k);return this};L.prototype.toAxisAngle=function(h){void 0===h&&(h=new F);this.normalize();var k=2*Math.acos(this.w),m=Math.sqrt(1-this.w*this.w);.001>m?(h.x=this.x,h.y=this.y,h.z=this.z):(h.x=this.x/m,h.y=this.y/m,h.z=this.z/m);return[h,k]};L.prototype.setFromVectors=function(h,k){if(h.isAntiparallelTo(k))k=Hy,h.tangents(k,Iy),this.setFromAxisAngle(k,Math.PI);else{var m=
|
||
h.cross(k);this.x=m.x;this.y=m.y;this.z=m.z;this.w=Math.sqrt(Ad(h.length(),2)*Ad(k.length(),2))+h.dot(k);this.normalize()}return this};L.prototype.mult=function(h,k){void 0===k&&(k=new L);var m=this.x,q=this.y,t=this.z,z=this.w,D=h.x,C=h.y,J=h.z;h=h.w;k.x=m*h+z*D+q*J-t*C;k.y=q*h+z*C+t*D-m*J;k.z=t*h+z*J+m*C-q*D;k.w=z*h-m*D-q*C-t*J;return k};L.prototype.inverse=function(h){void 0===h&&(h=new L);var k=this.x,m=this.y,q=this.z,t=this.w;this.conjugate(h);k=1/(k*k+m*m+q*q+t*t);h.x*=k;h.y*=k;h.z*=k;h.w*=
|
||
k;return h};L.prototype.conjugate=function(h){void 0===h&&(h=new L);h.x=-this.x;h.y=-this.y;h.z=-this.z;h.w=this.w;return h};L.prototype.normalize=function(){var h=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);0===h?this.w=this.z=this.y=this.x=0:(h=1/h,this.x*=h,this.y*=h,this.z*=h,this.w*=h);return this};L.prototype.normalizeFast=function(){var h=(3-(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w))/2;0===h?this.w=this.z=this.y=this.x=0:(this.x*=h,this.y*=h,this.z*=h,
|
||
this.w*=h);return this};L.prototype.vmult=function(h,k){void 0===k&&(k=new F);var m=h.x,q=h.y,t=h.z;h=this.x;var z=this.y,D=this.z,C=this.w,J=C*m+z*t-D*q,N=C*q+D*m-h*t,T=C*t+h*q-z*m;m=-h*m-z*q-D*t;k.x=J*C+m*-h+N*-D-T*-z;k.y=N*C+m*-z+T*-h-J*-D;k.z=T*C+m*-D+J*-z-N*-h;return k};L.prototype.copy=function(h){this.x=h.x;this.y=h.y;this.z=h.z;this.w=h.w;return this};L.prototype.toEuler=function(h,k){void 0===k&&(k="YZX");var m=this.x,q=this.y,t=this.z,z=this.w;switch(k){case "YZX":k=m*q+t*z;if(.499<k){var D=
|
||
2*Math.atan2(m,z);var C=Math.PI/2;var J=0}-.499>k&&(D=-2*Math.atan2(m,z),C=-Math.PI/2,J=0);void 0===D&&(J=t*t,D=Math.atan2(2*q*z-2*m*t,1-2*q*q-2*J),C=Math.asin(2*k),J=Math.atan2(2*m*z-2*q*t,1-2*m*m-2*J));break;default:throw Error("Euler order "+k+" not supported yet.");}h.y=D;h.z=C;h.x=J};L.prototype.setFromEuler=function(h,k,m,q){void 0===q&&(q="XYZ");var t=Math.cos(h/2),z=Math.cos(k/2),D=Math.cos(m/2);h=Math.sin(h/2);k=Math.sin(k/2);m=Math.sin(m/2);"XYZ"===q?(this.x=h*z*D+t*k*m,this.y=t*k*D-h*z*
|
||
m,this.z=t*z*m+h*k*D,this.w=t*z*D-h*k*m):"YXZ"===q?(this.x=h*z*D+t*k*m,this.y=t*k*D-h*z*m,this.z=t*z*m-h*k*D,this.w=t*z*D+h*k*m):"ZXY"===q?(this.x=h*z*D-t*k*m,this.y=t*k*D+h*z*m,this.z=t*z*m+h*k*D,this.w=t*z*D-h*k*m):"ZYX"===q?(this.x=h*z*D-t*k*m,this.y=t*k*D+h*z*m,this.z=t*z*m-h*k*D,this.w=t*z*D+h*k*m):"YZX"===q?(this.x=h*z*D+t*k*m,this.y=t*k*D+h*z*m,this.z=t*z*m-h*k*D,this.w=t*z*D-h*k*m):"XZY"===q&&(this.x=h*z*D-t*k*m,this.y=t*k*D-h*z*m,this.z=t*z*m+h*k*D,this.w=t*z*D+h*k*m);return this};L.prototype.clone=
|
||
function(){return new L(this.x,this.y,this.z,this.w)};L.prototype.slerp=function(h,k,m){void 0===m&&(m=new L);var q=this.x,t=this.y,z=this.z,D=this.w,C=h.x,J=h.y,N=h.z;h=h.w;var T=q*C+t*J+z*N+D*h;0>T&&(T=-T,C=-C,J=-J,N=-N,h=-h);if(1E-6<1-T){var W=Math.acos(T);var Y=Math.sin(W);T=Math.sin((1-k)*W)/Y;k=Math.sin(k*W)/Y}else T=1-k;m.x=T*q+k*C;m.y=T*t+k*J;m.z=T*z+k*N;m.w=T*D+k*h;return m};L.prototype.integrate=function(h,k,m,q){void 0===q&&(q=new L);var t=h.x*m.x,z=h.y*m.y;h=h.z*m.z;m=this.x;var D=this.y,
|
||
C=this.z,J=this.w;k*=.5;q.x+=k*(t*J+z*C-h*D);q.y+=k*(z*J+h*m-t*C);q.z+=k*(h*J+t*D-z*m);q.w+=k*(-t*m-z*D-h*C);return q};Nd=L;Hy=new F;Iy=new F;Ke={SPHERE:1,PLANE:2,BOX:4,COMPOUND:8,CONVEXPOLYHEDRON:16,HEIGHTFIELD:32,PARTICLE:64,CYLINDER:128,TRIMESH:256};var K=function(h){void 0===h&&(h={});this.id=K.idCounter++;this.type=h.type||0;this.boundingSphereRadius=0;this.collisionResponse=h.collisionResponse?h.collisionResponse:!0;this.collisionFilterGroup=void 0!==h.collisionFilterGroup?h.collisionFilterGroup:
|
||
1;this.collisionFilterMask=void 0!==h.collisionFilterMask?h.collisionFilterMask:-1;this.material=h.material?h.material:null;this.body=null};K.prototype.updateBoundingSphereRadius=function(){throw"computeBoundingSphereRadius() not implemented for shape type "+this.type;};K.prototype.volume=function(){throw"volume() not implemented for shape type "+this.type;};K.prototype.calculateLocalInertia=function(h,k){throw"calculateLocalInertia() not implemented for shape type "+this.type;};K.prototype.calculateWorldAABB=
|
||
function(h,k,m,q){throw"calculateWorldAABB() not implemented for shape type "+this.type;};Wa=K;Wa.idCounter=0;Wa.types=Ke;var u=function(h){void 0===h&&(h={});this.position=new F;this.quaternion=new Nd;h.position&&this.position.copy(h.position);h.quaternion&&this.quaternion.copy(h.quaternion)};u.prototype.pointToLocal=function(h,k){return u.pointToLocalFrame(this.position,this.quaternion,h,k)};u.prototype.pointToWorld=function(h,k){return u.pointToWorldFrame(this.position,this.quaternion,h,k)};u.prototype.vectorToWorldFrame=
|
||
function(h,k){void 0===k&&(k=new F);this.quaternion.vmult(h,k);return k};u.pointToLocalFrame=function(h,k,m,q){void 0===q&&(q=new F);m.vsub(h,q);k.conjugate(Hr);Hr.vmult(q,q);return q};u.pointToWorldFrame=function(h,k,m,q){void 0===q&&(q=new F);k.vmult(m,q);q.vadd(h,q);return q};u.vectorToWorldFrame=function(h,k,m){void 0===m&&(m=new F);h.vmult(k,m);return m};u.vectorToLocalFrame=function(h,k,m,q){void 0===q&&(q=new F);k.w*=-1;k.vmult(m,q);k.w*=-1;return q};Ab=u;Hr=new Nd;var P=function(h){void 0===
|
||
h&&(h={});var k=h;h=void 0===k.vertices?[]:k.vertices;var m=void 0===k.faces?[]:k.faces,q=void 0===k.normals?[]:k.normals,t=k.axes,z=k.boundingSphereRadius,D=k.adjacentFaces,C=k.uniqueEdges;k=Wa.call(this,{type:Wa.types.CONVEXPOLYHEDRON})||this;k.vertices=h;k.faces=m;k.faceNormals=q;0===k.faceNormals.length&&k.computeNormals();z?k.boundingSphereRadius=z:k.updateBoundingSphereRadius();k.worldVertices=[];k.worldVerticesNeedsUpdate=!0;k.worldFaceNormals=[];k.worldFaceNormalsNeedsUpdate=!0;k.uniqueAxes=
|
||
t;C?k.uniqueEdges=C:(k.uniqueEdges=[],k.computeEdges());D?k.adjacentFaces=D:(k.adjacentFaces=[],k.computeAdjacentFaces());return k};$jscomp.inherits(P,Wa);P.prototype.computeEdges=function(){P.computeEdges(this.faces,this.vertices,this.uniqueEdges)};P.computeEdges=function(h,k,m){m.length=0;for(var q=Ny,t=0,z=h.length;t<z;t++)for(var D=h[t],C=D.length,J=0;J<C;J++){k[D[J]].vsub(k[D[(J+1)%C]],q);q.normalize();for(var N=!1,T=0,W=m.length;T<W;T++)if(m[T].almostEquals(q)){N=!0;break}N||m.push(q.clone())}};
|
||
P.prototype.computeAdjacentFaces=function(){P.computeAdjacentFaces(this.faces,this.adjacentFaces)};P.computeAdjacentFaces=function(h,k){for(var m=k.length=0,q=h.length;m<q;++m)for(var t=h[m],z=t.length,D=k[m]=[],C=0;C<z;C++)for(var J=t[C],N=t[(C+1)%z],T=0;T<q;++T)if(T!==m){var W=h[T];if(-1!==W.indexOf(J)&&-1!==W.indexOf(N)){D[C]=T;break}}};P.prototype.computeNormals=function(){var h=this.faces,k=h.length,m=this.faceNormals;m.length=k;for(var q=this.vertices,t=0;t<k;t++){for(var z=h[t],D=z.length,
|
||
C=0;C<D;C++)if(!q[z[C]])throw Error("Vertex "+z[C]+" not found!");C=m[t]||(m[t]=new F);this.getFaceNormal(t,C);C.negate(C);if(0>C.dot(q[z[0]]))for(console.error(".faceNormals["+t+"] = Vec3("+C.toString()+") looks like it points into the shape? The vertices follow. Make sure they are ordered CCW around the normal, using the right hand rule."),C=0;C<D;C++)console.warn(".vertices["+z[C]+"] = Vec3("+this.vertices[z[C]].toString()+")")}};P.prototype.getFaceNormal=function(h,k){h=this.faces[h];var m=this.vertices;
|
||
P.computeNormal(m[h[0]],m[h[1]],m[h[2]],k)};P.computeNormal=function(h,k,m,q){var t=Py,z=Oy;k.vsub(h,z);m.vsub(k,t);t.cross(z,q);q.isZero()||q.normalize()};P.prototype.clipAgainstHull=function(h,k,m,q,t,z,D,C,J){for(var N=Qy,T=-1,W=-Number.MAX_VALUE,Y=m.faces,ca=m.faceNormals,U=0,ha=Y.length;U<ha;U++){N.copy(ca[U]);t.vmult(N,N);var V=N.dot(z);V>W&&(W=V,T=U)}if(0<=T){N=Ry.reset();T=Y[T];m=m.vertices;Y=0;for(W=T.length;Y<W;Y++)ca=m[T[Y]],U=N.getFree(),t.vmult(ca,U),q.vadd(U,U);this.clipFaceAgainstHull(z,
|
||
h,k,N,D,C,J)}};P.prototype.findSeparatingAxis=function(h,k,m,q,t,z,D,C){var J=Sy,N=Ty,T=Uy,W=Vy,Y=Wy,ca=Xy,U=Number.MAX_VALUE;if(this.uniqueAxes){D=0;for(var ha=this.uniqueAxes,V=ha.length;D<V;D++){m.vmult(ha[D],J);var ta=this.testSepAxis(J,h,k,m,q,t);if(!1===ta)return!1;ta<U&&(U=ta,z.copy(J))}}else for(ha=D?D.length:this.faces.length,V=0,ta=this.faceNormals;V<ha;V++){m.vmult(ta[D?D[V]:V],J);var Na=this.testSepAxis(J,h,k,m,q,t);if(!1===Na)return!1;Na<U&&(U=Na,z.copy(J))}if(h.uniqueAxes)for(C=0,J=
|
||
h.uniqueAxes,D=J.length;C<D;C++){t.vmult(J[C],N);ha=this.testSepAxis(N,h,k,m,q,t);if(!1===ha)return!1;ha<U&&(U=ha,z.copy(N))}else for(J=C?C.length:h.faces.length,D=0,ha=h.faceNormals;D<J;D++){t.vmult(ha[C?C[D]:D],N);V=this.testSepAxis(N,h,k,m,q,t);if(!1===V)return!1;V<U&&(U=V,z.copy(N))}N=0;C=this.uniqueEdges;J=C.length;D=h.uniqueEdges;for(ha=D.length;N<J;N++)for(m.vmult(C[N],W),V=0;V<ha;V++)if(t.vmult(D[V],Y),W.cross(Y,ca),!ca.almostZero()){ca.normalize();ta=this.testSepAxis(ca,h,k,m,q,t);if(!1===
|
||
ta)return!1;ta<U&&(U=ta,z.copy(ca))}q.vsub(k,T);0<T.dot(z)&&z.negate(z);return!0};P.prototype.testSepAxis=function(h,k,m,q,t,z){P.project(this,h,m,q,gn);P.project(k,h,t,z,hn);m=gn[0];h=gn[1];k=hn[0];q=hn[1];if(m<q||k<h)return!1;m-=q;h=k-h;return m<h?m:h};P.prototype.calculateLocalInertia=function(h,k){var m=Yy,q=Zy;this.computeLocalAABB(q,m);var t=m.x-q.x,z=m.y-q.y;m=m.z-q.z;k.x=1/12*h*(4*z*z+4*m*m);k.y=1/12*h*(4*t*t+4*m*m);k.z=1/12*h*(4*z*z+4*t*t)};P.prototype.getPlaneConstantOfFace=function(h){return-this.faceNormals[h].dot(this.vertices[this.faces[h][0]])};
|
||
P.prototype.clipFaceAgainstHull=function(h,k,m,q,t,z,D){for(var C=-1,J=Number.MAX_VALUE,N=this.faces,T=N.length,W=this.faceNormals,Y=$y,ca=0;ca<T;ca++){m.vmult(W[ca],Y);var U=Y.dot(h);U<J&&(J=U,C=ca)}if(!(0>C)){J=N[C];N=this.adjacentFaces[C];T=az;Y=bz;ca=cz;U=dz;var ha=ez;h=fz;var V=gz.reset(),ta=J.length,Na=this.vertices;m.vmult(W[C],ca);k.vadd(ca,ca);for(var Qa=0;Qa<ta;Qa++){var Ma=Na[J[Qa]];Ma.vsub(Na[J[(Qa+1)%ta]],T);m.vmult(T,Y);k.vadd(Y,Y);Y.cross(ca,U);U.negate(U);m.vmult(Ma,ha);k.vadd(ha,
|
||
ha);Ma=N[Qa];m.vmult(W[Ma],h);Ma=this.getPlaneConstantOfFace(Ma)-h.dot(k);this.clipFaceAgainstPlane(q,V,h,Ma);Ma=q;q=V;V=Ma.reset()}J=this.getPlaneConstantOfFace(C);m.vmult(W[C],h);k=J-h.dot(k);m=0;C=q.length;for(W=q.array;m<C;m++)q=h.dot(W[m])+k,q<=t&&(console.log("clamped: depth="+q+" to minDist="+t),q=t),q<=z&&(J=W[m],1E-6>=q&&D.push(J,h,q))}};P.prototype.clipFaceAgainstPlane=function(h,k,m,q){var t=h.length,z=h.array;if(2>t)return k;var D=z[t-1];h=m.dot(D)+q;for(var C=0;C<t;C++){var J=z[C];var N=
|
||
m.dot(J)+q;if(0>h)if(0>N)k.getFree().copy(J);else{var T=k.getFree();D.lerp(J,h/(h-N),T)}else 0>N&&(T=k.getFree(),D.lerp(J,h/(h-N),T),k.getFree().copy(J));D=J;h=N}return k};P.prototype.computeWorldVertices=function(h,k){for(var m=this.worldVertices,q=this.vertices,t=q.length;m.length<t;)m.push(new F);for(var z=0;z<t;z++){var D=m[z];k.vmult(q[z],D);h.vadd(D,D)}this.worldVerticesNeedsUpdate=!1};P.prototype.computeLocalAABB=function(h,k){var m=this.vertices;h.set(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE);
|
||
k.set(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(var q=0,t=m.length;q<t;q++){var z=m[q];z.x<h.x?h.x=z.x:z.x>k.x&&(k.x=z.x);z.y<h.y?h.y=z.y:z.y>k.y&&(k.y=z.y);z.z<h.z?h.z=z.z:z.z>k.z&&(k.z=z.z)}};P.prototype.computeWorldFaceNormals=function(h){for(var k=this.worldFaceNormals,m=this.faceNormals,q=m.length;k.length<q;)k.push(new F);for(var t=0;t<q;t++)h.vmult(m[t],k[t]);this.worldFaceNormalsNeedsUpdate=!1};P.prototype.updateBoundingSphereRadius=function(){for(var h=0,k=this.vertices,
|
||
m=0,q=k.length;m<q;m++){var t=k[m].lengthSquared();t>h&&(h=t)}this.boundingSphereRadius=Math.sqrt(h)};P.prototype.calculateWorldAABB=function(h,k,m,q){for(var t=this.vertices,z,D,C,J,N,T,W=hz,Y=0;Y<t.length;Y++){k.vmult(t[Y],W);h.vadd(W,W);if(void 0===z||W.x<z)z=W.x;if(void 0===J||W.x>J)J=W.x;if(void 0===D||W.y<D)D=W.y;if(void 0===N||W.y>N)N=W.y;if(void 0===C||W.z<C)C=W.z;if(void 0===T||W.z>T)T=W.z}m.set(z,D,C);q.set(J,N,T)};P.prototype.volume=function(){return 4*Math.PI*this.boundingSphereRadius/
|
||
3};P.prototype.getAveragePointLocal=function(h){void 0===h&&(h=new F);for(var k=this.vertices,m=k.length,q=0;q<m;q++)h.vadd(k[q],h);h.scale(1/m,h);return h};P.prototype.transformAllPoints=function(h,k){var m=this.vertices,q=m.length;if(k){for(var t=0;t<q;t++){var z=m[t];k.vmult(z,z)}t=0;z=this.faceNormals;for(var D=z.length;t<D;t++){var C=z[t];k.vmult(C,C)}}if(h)for(k=0;k<q;k++)t=m[k],t.vadd(h,t)};P.prototype.pointIsInside=function(h){var k=this.vertices,m=this.faces,q=this.faceNormals,t=iz;this.getAveragePointLocal(t);
|
||
for(var z=jz,D=kz,C=0,J=m.length;C<J;C++){var N=q[C],T=k[m[C][0]];h.vsub(T,z);var W=N.dot(z);t.vsub(T,D);N=N.dot(D);if(0>W&&0<N||0<W&&0>N)return!1}return-1};P.project=function(h,k,m,q,t){var z=h.vertices.length;Ky;var D=Ly,C=My;h=h.vertices;C.setZero();Ab.vectorToLocalFrame(m,q,k,D);Ab.pointToLocalFrame(m,q,C,C);q=C.dot(D);m=k=h[0].dot(D);for(C=1;C<z;C++){var J=h[C].dot(D);J>k&&(k=J);J<m&&(m=J)}m-=q;k-=q;m>k&&(z=m,m=k,k=z);t[0]=k;t[1]=m};Jy=P;gn=[];hn=[];Ky=new F;Ly=new F;My=new F;Ny=new F;Oy=new F;
|
||
Py=new F;Qy=new F;Lk=function(h){h=void 0===h?0:h;this.array=[];for(var k=this.length=0,m=this.array;k<h;++k)m[k]=new F};Lk.prototype.getFree=function(){return this.array[this.length++]||(this.array[this.length-1]=new F)};Lk.prototype.reset=function(){this.length=0;return this};Ry=new Lk(10);Sy=new F;Ty=new F;Uy=new F;Vy=new F;Wy=new F;Xy=new F;Yy=new F;Zy=new F;$y=new F;az=new F;bz=new F;cz=new F;dz=new F;ez=new F;fz=new F;gz=new Lk(10);hz=new F;iz=new F;jz=new F;kz=new F;var aa=function(h){var k=
|
||
Wa.call(this,{type:Wa.types.BOX})||this;k.halfExtents=h;k.convexPolyhedronRepresentation=null;k.updateConvexPolyhedronRepresentation();k.updateBoundingSphereRadius();return k};$jscomp.inherits(aa,Wa);aa.prototype.updateConvexPolyhedronRepresentation=function(){var h=this.halfExtents.x,k=this.halfExtents.y,m=this.halfExtents.z;h=[new F(-h,-k,-m),new F(h,-k,-m),new F(h,k,-m),new F(-h,k,-m),new F(-h,-k,m),new F(h,-k,m),new F(h,k,m),new F(-h,k,m)];this.convexPolyhedronRepresentation=h=new Jy({vertices:h,
|
||
faces:lz,axes:nz,normals:mz,adjacentFaces:oz,uniqueEdges:pz});h.material=this.material};aa.prototype.calculateLocalInertia=function(h,k){void 0===k&&(k=new F);aa.calculateInertia(this.halfExtents,h,k);return k};aa.calculateInertia=function(h,k,m){m.x=1/12*k*(4*h.y*h.y+4*h.z*h.z);m.y=1/12*k*(4*h.x*h.x+4*h.z*h.z);m.z=1/12*k*(4*h.y*h.y+4*h.x*h.x)};aa.prototype.getSideNormals=function(h,k){var m=this.halfExtents;h[0].set(m.x,0,0);h[1].set(0,m.y,0);h[2].set(0,0,m.z);h[3].set(-m.x,0,0);h[4].set(0,-m.y,
|
||
0);h[5].set(0,0,-m.z);if(void 0!==k){m=0;for(var q=h.length;m<q;m++){var t=h[m];k.vmult(t,t)}}return h};aa.prototype.volume=function(){return 8*this.halfExtents.x*this.halfExtents.y*this.halfExtents.z};aa.prototype.updateBoundingSphereRadius=function(){this.boundingSphereRadius=this.halfExtents.length()};aa.prototype.forEachWorldCorner=function(h,k,m){var q=this.halfExtents;q=[[q.x,q.y,q.z],[-q.x,q.y,q.z],[-q.x,-q.y,q.z],[-q.x,-q.y,-q.z],[q.x,-q.y,-q.z],[q.x,q.y,-q.z],[-q.x,q.y,-q.z],[q.x,-q.y,q.z]];
|
||
for(var t=0;t<q.length;t++)Tf.set(q[t][0],q[t][1],q[t][2]),k.vmult(Tf,Tf),h.vadd(Tf,Tf),m(Tf.x,Tf.y,Tf.z)};aa.prototype.calculateWorldAABB=function(h,k,m,q){var t=this.halfExtents;Le[0].set(t.x,t.y,t.z);Le[1].set(-t.x,t.y,t.z);Le[2].set(-t.x,-t.y,t.z);Le[3].set(-t.x,-t.y,-t.z);Le[4].set(t.x,-t.y,-t.z);Le[5].set(t.x,t.y,-t.z);Le[6].set(-t.x,t.y,-t.z);Le[7].set(t.x,-t.y,t.z);t=Le[0];k.vmult(t,t);h.vadd(t,t);q.copy(t);m.copy(t);for(t=1;8>t;t++){var z=Le[t];k.vmult(z,z);h.vadd(z,z);var D=z.x,C=z.y;z=
|
||
z.z;D>q.x&&(q.x=D);C>q.y&&(q.y=C);z>q.z&&(q.z=z);D<m.x&&(m.x=D);C<m.y&&(m.y=C);z<m.z&&(m.z=z)}};Mh=aa;Tf=new F;Le=[new F,new F,new F,new F,new F,new F,new F,new F];lz=[[3,2,1,0],[4,5,6,7],[5,4,0,1],[2,3,7,6],[0,4,7,3],[1,2,6,5]];mz=[new F(0,0,-1),new F(0,0,1),new F(0,-1,0),new F(0,1,0),new F(-1,0,0),new F(1,0,0)];nz=[new F(0,0,1),new F(0,1,0),new F(1,0,0)];oz=[[3,5,2,4],[2,5,3,4],[1,4,0,5],[0,4,1,5],[2,1,3,0],[0,3,1,2]];pz=[new F(-1,0,0),new F(0,1,0),new F(1,0,0),new F(0,-1,0),new F(0,0,1),new F(0,
|
||
0,-1)];var da=function(h){void 0===h&&(h={});var k=gf.call(this)||this;k.id=da.idCounter++;k.index=-1;k.world=null;k.vlambda=new F;k.collisionFilterGroup="number"===typeof h.collisionFilterGroup?h.collisionFilterGroup:1;k.collisionFilterMask="number"===typeof h.collisionFilterMask?h.collisionFilterMask:-1;k.collisionResponse="boolean"===typeof h.collisionResponse?h.collisionResponse:!0;k.position=new F;h.position&&k.position.copy(h.position);k.velocity=new F;h.velocity&&k.velocity.copy(h.velocity);
|
||
k.force=new F;var m="number"===typeof h.mass?h.mass:0;k.mass=m;k.invMass=0<m?1/m:0;k.material=h.material||null;k.linearDamping="number"===typeof h.linearDamping?h.linearDamping:.01;k.type=0>=m?da.STATIC:da.DYNAMIC;typeof h.type===typeof da.STATIC&&(k.type=h.type);k.allowSleep="undefined"!==typeof h.allowSleep?h.allowSleep:!0;k.sleepState=da.AWAKE;k.sleepSpeedLimit="undefined"!==typeof h.sleepSpeedLimit?h.sleepSpeedLimit:.1;k.sleepTimeLimit="undefined"!==typeof h.sleepTimeLimit?h.sleepTimeLimit:1;
|
||
k.timeLastSleepy=0;k.wakeUpAfterNarrowphase=!1;k.torque=new F;k.quaternion=new Nd;h.quaternion&&k.quaternion.copy(h.quaternion);k.angularVelocity=new F;h.angularVelocity&&k.angularVelocity.copy(h.angularVelocity);k.shapes=[];k.shapeOffsets=[];k.shapeOrientations=[];k.inertia=new F;k.invInertia=new F;k.invInertiaWorld=new Kh;k.invMassSolve=0;k.invInertiaSolve=new F;k.invInertiaWorldSolve=new Kh;k.fixedRotation="undefined"!==typeof h.fixedRotation?h.fixedRotation:!1;k.angularDamping="undefined"!==typeof h.angularDamping?
|
||
h.angularDamping:.01;k.linearFactor=new F(1,1,1);h.linearFactor&&k.linearFactor.copy(h.linearFactor);k.angularFactor=new F(1,1,1);h.angularFactor&&k.angularFactor.copy(h.angularFactor);k.aabb=new jc;k.aabbNeedsUpdate=!0;k.boundingRadius=0;k.wlambda=new F;k.isTrigger=!!h.isTrigger;h.shape&&k.addShape(h.shape);k.updateMassProperties();return k};$jscomp.inherits(da,gf);da.prototype.wakeUp=function(){var h=this.sleepState;this.sleepState=da.AWAKE;this.wakeUpAfterNarrowphase=!1;h===da.SLEEPING&&this.dispatchEvent(da.wakeupEvent)};
|
||
da.prototype.sleep=function(){this.sleepState=da.SLEEPING;this.velocity.set(0,0,0);this.angularVelocity.set(0,0,0);this.wakeUpAfterNarrowphase=!1};da.prototype.sleepTick=function(h){if(this.allowSleep){var k=this.sleepState,m=this.velocity.lengthSquared()+this.angularVelocity.lengthSquared(),q=Ad(this.sleepSpeedLimit,2);k===da.AWAKE&&m<q?(this.sleepState=da.SLEEPY,this.timeLastSleepy=h,this.dispatchEvent(da.sleepyEvent)):k===da.SLEEPY&&m>q?this.wakeUp():k===da.SLEEPY&&h-this.timeLastSleepy>this.sleepTimeLimit&&
|
||
(this.sleep(),this.dispatchEvent(da.sleepEvent))}};da.prototype.updateSolveMassProperties=function(){this.sleepState===da.SLEEPING||this.type===da.KINEMATIC?(this.invMassSolve=0,this.invInertiaSolve.setZero(),this.invInertiaWorldSolve.setZero()):(this.invMassSolve=this.invMass,this.invInertiaSolve.copy(this.invInertia),this.invInertiaWorldSolve.copy(this.invInertiaWorld))};da.prototype.pointToLocalFrame=function(h,k){void 0===k&&(k=new F);h.vsub(this.position,k);this.quaternion.conjugate().vmult(k,
|
||
k);return k};da.prototype.vectorToLocalFrame=function(h,k){void 0===k&&(k=new F);this.quaternion.conjugate().vmult(h,k);return k};da.prototype.pointToWorldFrame=function(h,k){void 0===k&&(k=new F);this.quaternion.vmult(h,k);k.vadd(this.position,k);return k};da.prototype.vectorToWorldFrame=function(h,k){void 0===k&&(k=new F);this.quaternion.vmult(h,k);return k};da.prototype.addShape=function(h,k,m){var q=new F,t=new Nd;k&&q.copy(k);m&&t.copy(m);this.shapes.push(h);this.shapeOffsets.push(q);this.shapeOrientations.push(t);
|
||
this.updateMassProperties();this.updateBoundingRadius();this.aabbNeedsUpdate=!0;h.body=this;return this};da.prototype.removeShape=function(h){var k=this.shapes.indexOf(h);if(-1===k)return console.warn("Shape does not belong to the body"),this;this.shapes.splice(k,1);this.shapeOffsets.splice(k,1);this.shapeOrientations.splice(k,1);this.updateMassProperties();this.updateBoundingRadius();this.aabbNeedsUpdate=!0;h.body=null;return this};da.prototype.updateBoundingRadius=function(){for(var h=this.shapes,
|
||
k=this.shapeOffsets,m=h.length,q=0,t=0;t!==m;t++){var z=h[t];z.updateBoundingSphereRadius();var D=k[t].length();z=z.boundingSphereRadius;D+z>q&&(q=D+z)}this.boundingRadius=q};da.prototype.updateAABB=function(){for(var h=this.shapes,k=this.shapeOffsets,m=this.shapeOrientations,q=h.length,t=qz,z=rz,D=this.quaternion,C=this.aabb,J=sz,N=0;N!==q;N++){var T=h[N];D.vmult(k[N],t);t.vadd(this.position,t);D.mult(m[N],z);T.calculateWorldAABB(t,z,J.lowerBound,J.upperBound);0===N?C.copy(J):C.extend(J)}this.aabbNeedsUpdate=
|
||
!1};da.prototype.updateInertiaWorld=function(h){var k=this.invInertia;if(k.x!==k.y||k.y!==k.z||h){h=tz;var m=uz;vz;h.setRotationFromQuaternion(this.quaternion);h.transpose(m);h.scale(k,h);h.mmult(m,this.invInertiaWorld)}};da.prototype.applyForce=function(h,k){void 0===k&&(k=new F);if(this.type===da.DYNAMIC){this.sleepState===da.SLEEPING&&this.wakeUp();var m=wz;k.cross(h,m);this.force.vadd(h,this.force);this.torque.vadd(m,this.torque)}};da.prototype.applyLocalForce=function(h,k){void 0===k&&(k=new F);
|
||
if(this.type===da.DYNAMIC){var m=xz,q=yz;this.vectorToWorldFrame(h,m);this.vectorToWorldFrame(k,q);this.applyForce(m,q)}};da.prototype.applyTorque=function(h){this.type===da.DYNAMIC&&(this.sleepState===da.SLEEPING&&this.wakeUp(),this.torque.vadd(h,this.torque))};da.prototype.applyImpulse=function(h,k){void 0===k&&(k=new F);if(this.type===da.DYNAMIC){this.sleepState===da.SLEEPING&&this.wakeUp();var m=zz;m.copy(h);m.scale(this.invMass,m);this.velocity.vadd(m,this.velocity);m=Az;k.cross(h,m);this.invInertiaWorld.vmult(m,
|
||
m);this.angularVelocity.vadd(m,this.angularVelocity)}};da.prototype.applyLocalImpulse=function(h,k){void 0===k&&(k=new F);if(this.type===da.DYNAMIC){var m=Bz,q=Cz;this.vectorToWorldFrame(h,m);this.vectorToWorldFrame(k,q);this.applyImpulse(m,q)}};da.prototype.updateMassProperties=function(){var h=Dz;this.invMass=0<this.mass?1/this.mass:0;var k=this.inertia,m=this.fixedRotation;this.updateAABB();h.set((this.aabb.upperBound.x-this.aabb.lowerBound.x)/2,(this.aabb.upperBound.y-this.aabb.lowerBound.y)/
|
||
2,(this.aabb.upperBound.z-this.aabb.lowerBound.z)/2);Mh.calculateInertia(h,this.mass,k);this.invInertia.set(0<k.x&&!m?1/k.x:0,0<k.y&&!m?1/k.y:0,0<k.z&&!m?1/k.z:0);this.updateInertiaWorld(!0)};da.prototype.getVelocityAtWorldPoint=function(h,k){var m=new F;h.vsub(this.position,m);this.angularVelocity.cross(m,k);this.velocity.vadd(k,k);return k};da.prototype.integrate=function(h,k,m){if((this.type===da.DYNAMIC||this.type===da.KINEMATIC)&&this.sleepState!==da.SLEEPING){var q=this.velocity,t=this.angularVelocity,
|
||
z=this.position,D=this.force,C=this.torque,J=this.quaternion,N=this.invInertiaWorld,T=this.linearFactor,W=this.invMass*h;q.x+=D.x*W*T.x;q.y+=D.y*W*T.y;q.z+=D.z*W*T.z;D=N.elements;W=this.angularFactor;N=C.x*W.x;T=C.y*W.y;C=C.z*W.z;t.x+=h*(D[0]*N+D[1]*T+D[2]*C);t.y+=h*(D[3]*N+D[4]*T+D[5]*C);t.z+=h*(D[6]*N+D[7]*T+D[8]*C);z.x+=q.x*h;z.y+=q.y*h;z.z+=q.z*h;J.integrate(this.angularVelocity,h,this.angularFactor,J);k&&(m?J.normalizeFast():J.normalize());this.aabbNeedsUpdate=!0;this.updateInertiaWorld()}};
|
||
xb=da;xb.idCounter=0;xb.COLLIDE_EVENT_NAME="collide";xb.DYNAMIC=1;xb.STATIC=2;xb.KINEMATIC=4;xb.AWAKE=0;xb.SLEEPY=1;xb.SLEEPING=2;xb.wakeupEvent={type:"wakeup"};xb.sleepyEvent={type:"sleepy"};xb.sleepEvent={type:"sleep"};qz=new F;rz=new Nd;sz=new jc;tz=new Kh;uz=new Kh;vz=new Kh;wz=new F;xz=new F;yz=new F;zz=new F;Az=new F;Bz=new F;Cz=new F;Dz=new F;Od=function(){this.world=null;this.useBoundingBoxes=!1;this.dirty=!0};Od.prototype.collisionPairs=function(h,k,m){throw Error("collisionPairs not implemented for this BroadPhase class!");
|
||
};Od.prototype.needBroadphaseCollision=function(h,k){return 0!==(h.collisionFilterGroup&k.collisionFilterMask)&&0!==(k.collisionFilterGroup&h.collisionFilterMask)&&(0===(h.type&xb.STATIC)&&h.sleepState!==xb.SLEEPING||0===(k.type&xb.STATIC)&&k.sleepState!==xb.SLEEPING)?!0:!1};Od.prototype.intersectionTest=function(h,k,m,q){this.useBoundingBoxes?this.doBoundingBoxBroadphase(h,k,m,q):this.doBoundingSphereBroadphase(h,k,m,q)};Od.prototype.doBoundingSphereBroadphase=function(h,k,m,q){var t=Ez;k.position.vsub(h.position,
|
||
t);var z=Ad(h.boundingRadius+k.boundingRadius,2);t.lengthSquared()<z&&(m.push(h),q.push(k))};Od.prototype.doBoundingBoxBroadphase=function(h,k,m,q){h.aabbNeedsUpdate&&h.updateAABB();k.aabbNeedsUpdate&&k.updateAABB();h.aabb.overlaps(k.aabb)&&(m.push(h),q.push(k))};Od.prototype.makePairsUnique=function(h,k){for(var m=Fz,q=Gz,t=Hz,z=h.length,D=0;D!==z;D++)q[D]=h[D],t[D]=k[D];h.length=0;for(D=k.length=0;D!==z;D++){var C=q[D].id,J=t[D].id;C=C<J?C+","+J:J+","+C;m[C]=D;m.keys.push(C)}for(z=0;z!==m.keys.length;z++)D=
|
||
m.keys.pop(),C=m[D],h.push(q[C]),k.push(t[C]),delete m[D]};Od.prototype.setWorld=function(h){};Od.boundingSphereCheck=function(h,k){var m=new F;h.position.vsub(k.position,m);return Math.pow(h.shapes[0].boundingSphereRadius+k.shapes[0].boundingSphereRadius,2)>m.lengthSquared()};Od.prototype.aabbQuery=function(h,k,m){console.warn(".aabbQuery is not implemented in this Broadphase subclass.");return[]};Ez=new F;new F;new Nd;new F;Fz={keys:[]};Gz=[];Hz=[];new F;new F;new F;Mk=function(){return Od.call(this)||
|
||
this};$jscomp.inherits(Mk,Od);Mk.prototype.collisionPairs=function(h,k,m){h=h.bodies;for(var q=h.length,t,z,D=0;D!==q;D++)for(var C=0;C!==D;C++)t=h[D],z=h[C],this.needBroadphaseCollision(t,z)&&this.intersectionTest(t,z,k,m)};Mk.prototype.aabbQuery=function(h,k,m){void 0===m&&(m=[]);for(var q=0;q<h.bodies.length;q++){var t=h.bodies[q];t.aabbNeedsUpdate&&t.updateAABB();t.aabb.overlaps(k)&&m.push(t)}return m};Uf=function(){this.rayFromWorld=new F;this.rayToWorld=new F;this.hitNormalWorld=new F;this.hitPointWorld=
|
||
new F;this.hasHit=!1;this.body=this.shape=null;this.distance=this.hitFaceIndex=-1;this.shouldStop=!1};Uf.prototype.reset=function(){this.rayFromWorld.setZero();this.rayToWorld.setZero();this.hitNormalWorld.setZero();this.hitPointWorld.setZero();this.hasHit=!1;this.body=this.shape=null;this.distance=this.hitFaceIndex=-1;this.shouldStop=!1};Uf.prototype.abort=function(){this.shouldStop=!0};Uf.prototype.set=function(h,k,m,q,t,z,D){this.rayFromWorld.copy(h);this.rayToWorld.copy(k);this.hitNormalWorld.copy(m);
|
||
this.hitPointWorld.copy(q);this.shape=t;this.body=z;this.distance=D};Iz=Wa.types.SPHERE;Jz=Wa.types.PLANE;Kz=Wa.types.BOX;Lz=Wa.types.CYLINDER;Mz=Wa.types.CONVEXPOLYHEDRON;Nz=Wa.types.HEIGHTFIELD;Oz=Wa.types.TRIMESH;var ba=function(h,k){void 0===h&&(h=new F);void 0===k&&(k=new F);this.from=h.clone();this.to=k.clone();this.direction=new F;this.precision=1E-4;this.checkCollisionResponse=!0;this.skipBackfaces=!1;this.collisionFilterGroup=this.collisionFilterMask=-1;this.mode=ba.ANY;this.result=new Uf;
|
||
this.hasHit=!1;this.callback=function(m){}};$jscomp.global.Object.defineProperty(ba.prototype,Iz,{configurable:!0,enumerable:!0,get:function(){return this._intersectSphere}});$jscomp.global.Object.defineProperty(ba.prototype,Jz,{configurable:!0,enumerable:!0,get:function(){return this._intersectPlane}});$jscomp.global.Object.defineProperty(ba.prototype,Kz,{configurable:!0,enumerable:!0,get:function(){return this._intersectBox}});$jscomp.global.Object.defineProperty(ba.prototype,Lz,{configurable:!0,
|
||
enumerable:!0,get:function(){return this._intersectConvex}});$jscomp.global.Object.defineProperty(ba.prototype,Mz,{configurable:!0,enumerable:!0,get:function(){return this._intersectConvex}});$jscomp.global.Object.defineProperty(ba.prototype,Nz,{configurable:!0,enumerable:!0,get:function(){return this._intersectHeightfield}});$jscomp.global.Object.defineProperty(ba.prototype,Oz,{configurable:!0,enumerable:!0,get:function(){return this._intersectTrimesh}});ba.prototype.intersectWorld=function(h,k){this.mode=
|
||
k.mode||ba.ANY;this.result=k.result||new Uf;this.skipBackfaces=!!k.skipBackfaces;this.collisionFilterMask="undefined"!==typeof k.collisionFilterMask?k.collisionFilterMask:-1;this.collisionFilterGroup="undefined"!==typeof k.collisionFilterGroup?k.collisionFilterGroup:-1;this.checkCollisionResponse="undefined"!==typeof k.checkCollisionResponse?k.checkCollisionResponse:!0;k.from&&this.from.copy(k.from);k.to&&this.to.copy(k.to);this.callback=k.callback||function(){};this.hasHit=!1;this.result.reset();
|
||
this.updateDirection();this.getAABB(Ir);jn.length=0;h.broadphase.aabbQuery(h,Ir,jn);this.intersectBodies(jn);return this.hasHit};ba.prototype.intersectBody=function(h,k){k&&(this.result=k,this.updateDirection());k=this.checkCollisionResponse;if((!k||h.collisionResponse)&&0!==(this.collisionFilterGroup&h.collisionFilterMask)&&0!==(h.collisionFilterGroup&this.collisionFilterMask))for(var m=Pz,q=Qz,t=0,z=h.shapes.length;t<z;t++){var D=h.shapes[t];if(!k||D.collisionResponse)if(h.quaternion.mult(h.shapeOrientations[t],
|
||
q),h.quaternion.vmult(h.shapeOffsets[t],m),m.vadd(h.position,m),this.intersectShape(D,q,m,h),this.result.shouldStop)break}};ba.prototype.intersectBodies=function(h,k){k&&(this.result=k,this.updateDirection());k=0;for(var m=h.length;!this.result.shouldStop&&k<m;k++)this.intersectBody(h[k])};ba.prototype.updateDirection=function(){this.to.vsub(this.from,this.direction);this.direction.normalize()};ba.prototype.intersectShape=function(h,k,m,q){var t=this.from,z=this.direction;m.vsub(t,Ig);var D=Ig.dot(z);
|
||
z.scale(D,Ok);Ok.vadd(t,Ok);m.distanceTo(Ok)>h.boundingSphereRadius||(t=this[h.type])&&t.call(this,h,k,m,q,h)};ba.prototype._intersectBox=function(h,k,m,q,t){return this._intersectConvex(h.convexPolyhedronRepresentation,k,m,q,t)};ba.prototype._intersectPlane=function(h,k,m,q,t){h=this.from;var z=this.to,D=this.direction,C=new F(0,0,1);k.vmult(C,C);var J=new F;h.vsub(m,J);k=J.dot(C);z.vsub(m,J);J=J.dot(C);if(!(0<k*J||h.distanceTo(z)<k||(J=C.dot(D),Math.abs(J)<this.precision))){var N=new F;z=new F;
|
||
k=new F;h.vsub(m,N);m=-C.dot(N)/J;D.scale(m,z);h.vadd(z,k);this.reportIntersection(C,k,t,q,-1)}};ba.prototype.getAABB=function(h){var k=h.lowerBound;h=h.upperBound;var m=this.to,q=this.from;k.x=Math.min(m.x,q.x);k.y=Math.min(m.y,q.y);k.z=Math.min(m.z,q.z);h.x=Math.max(m.x,q.x);h.y=Math.max(m.y,q.y);h.z=Math.max(m.z,q.z)};ba.prototype._intersectHeightfield=function(h,k,m,q,t){h.data;h.elementSize;var z=Rz;z.from.copy(this.from);z.to.copy(this.to);Ab.pointToLocalFrame(m,k,z.from,z.from);Ab.pointToLocalFrame(m,
|
||
k,z.to,z.to);z.updateDirection();var D=Sz,C,J;var N=C=0;var T=J=h.data.length-1;var W=new jc;z.getAABB(W);h.getIndexOfPosition(W.lowerBound.x,W.lowerBound.y,D,!0);N=Math.max(N,D[0]);C=Math.max(C,D[1]);h.getIndexOfPosition(W.upperBound.x,W.upperBound.y,D,!0);T=Math.min(T,D[0]+1);J=Math.min(J,D[1]+1);for(D=N;D<T;D++)for(N=C;N<J;N++){if(this.result.shouldStop)return;h.getAabbAtIndex(D,N,W);if(W.overlapsRay(z)){h.getConvexTrianglePillar(D,N,!1);Ab.pointToWorldFrame(m,k,h.pillarOffset,Nk);this._intersectConvex(h.pillarConvex,
|
||
k,Nk,q,t,Jr);if(this.result.shouldStop)return;h.getConvexTrianglePillar(D,N,!0);Ab.pointToWorldFrame(m,k,h.pillarOffset,Nk);this._intersectConvex(h.pillarConvex,k,Nk,q,t,Jr)}}};ba.prototype._intersectSphere=function(h,k,m,q,t){k=this.from;var z=this.to,D=h.radius;h=Ad(z.x-k.x,2)+Ad(z.y-k.y,2)+Ad(z.z-k.z,2);var C=2*((z.x-k.x)*(k.x-m.x)+(z.y-k.y)*(k.y-m.y)+(z.z-k.z)*(k.z-m.z));D=Ad(k.x-m.x,2)+Ad(k.y-m.y,2)+Ad(k.z-m.z,2)-Ad(D,2);var J=Ad(C,2)-4*h*D;D=Tz;var N=Uz;if(!(0>J))if(0===J)k.lerp(z,J,D),D.vsub(m,
|
||
N),N.normalize(),this.reportIntersection(N,D,t,q,-1);else{var T=(-C-Math.sqrt(J))/(2*h);h=(-C+Math.sqrt(J))/(2*h);0<=T&&1>=T&&(k.lerp(z,T,D),D.vsub(m,N),N.normalize(),this.reportIntersection(N,D,t,q,-1));!this.result.shouldStop&&0<=h&&1>=h&&(k.lerp(z,h,D),D.vsub(m,N),N.normalize(),this.reportIntersection(N,D,t,q,-1))}};ba.prototype._intersectConvex=function(h,k,m,q,t,z){Wz;var D=Vz,C=Kr;Xz;z=z&&z.faceList||null;var J=h.faces,N=h.vertices;h=h.faceNormals;for(var T=this.direction,W=this.from,Y=W.distanceTo(this.to),
|
||
ca=z?z.length:J.length,U=this.result,ha=0;!U.shouldStop&&ha<ca;ha++){var V=z?z[ha]:ha,ta=J[V],Na=h[V],Qa=k,Ma=m;C.copy(N[ta[0]]);Qa.vmult(C,C);C.vadd(Ma,C);C.vsub(W,C);Qa.vmult(Na,D);Na=T.dot(D);if(!(Math.abs(Na)<this.precision||(Na=D.dot(C)/Na,0>Na)))for(T.scale(Na,Bd),Bd.vadd(W,Bd),se.copy(N[ta[0]]),Qa.vmult(se,se),Ma.vadd(se,se),Na=1;!U.shouldStop&&Na<ta.length-1;Na++){Me.copy(N[ta[Na]]);Ne.copy(N[ta[Na+1]]);Qa.vmult(Me,Me);Qa.vmult(Ne,Ne);Ma.vadd(Me,Me);Ma.vadd(Ne,Ne);var $a=Bd.distanceTo(W);
|
||
!ba.pointInTriangle(Bd,se,Me,Ne)&&!ba.pointInTriangle(Bd,Me,se,Ne)||$a>Y||this.reportIntersection(D,Bd,t,q,V)}}};ba.prototype._intersectTrimesh=function(h,k,m,q,t,z){z=Yz;var D=dA,C=eA,J=Kr,N=Zz,T=$z,W=aA,Y=cA,ca=bA,U=h.indices;h.vertices;var ha=this.from,V=this.to,ta=this.direction;C.position.copy(m);C.quaternion.copy(k);Ab.vectorToLocalFrame(m,k,ta,N);Ab.pointToLocalFrame(m,k,ha,T);Ab.pointToLocalFrame(m,k,V,W);W.x*=h.scale.x;W.y*=h.scale.y;W.z*=h.scale.z;T.x*=h.scale.x;T.y*=h.scale.y;T.z*=h.scale.z;
|
||
W.vsub(T,N);N.normalize();W=T.distanceSquared(W);h.tree.rayQuery(this,C,D);C=0;for(ha=D.length;!this.result.shouldStop&&C!==ha;C++)V=D[C],h.getNormal(V,z),h.getVertex(U[3*V],se),se.vsub(T,J),ta=N.dot(z),ta=z.dot(J)/ta,0>ta||(N.scale(ta,Bd),Bd.vadd(T,Bd),h.getVertex(U[3*V+1],Me),h.getVertex(U[3*V+2],Ne),ta=Bd.distanceSquared(T),!ba.pointInTriangle(Bd,Me,se,Ne)&&!ba.pointInTriangle(Bd,se,Me,Ne)||ta>W||(Ab.vectorToWorldFrame(k,z,ca),Ab.pointToWorldFrame(m,k,Bd,Y),this.reportIntersection(ca,Y,t,q,V)));
|
||
D.length=0};ba.prototype.reportIntersection=function(h,k,m,q,t){var z=this.from,D=this.to,C=z.distanceTo(k),J=this.result;if(!(this.skipBackfaces&&0<h.dot(this.direction)))switch(J.hitFaceIndex="undefined"!==typeof t?t:-1,this.mode){case ba.ALL:this.hasHit=!0;J.set(z,D,h,k,m,q,C);J.hasHit=!0;this.callback(J);break;case ba.CLOSEST:if(C<J.distance||!J.hasHit)this.hasHit=!0,J.hasHit=!0,J.set(z,D,h,k,m,q,C);break;case ba.ANY:this.hasHit=!0,J.hasHit=!0,J.set(z,D,h,k,m,q,C),J.shouldStop=!0}};ba.pointInTriangle=
|
||
function(h,k,m,q){q.vsub(k,Ig);m.vsub(k,hj);h.vsub(k,kn);h=Ig.dot(Ig);k=Ig.dot(hj);m=Ig.dot(kn);q=hj.dot(hj);var t=hj.dot(kn),z,D;return-1E-6<=(z=q*m-k*t)&&-1E-6<=(D=h*t-k*m)&&z+D<h*q-k*k};pd=ba;pd.CLOSEST=1;pd.ANY=2;pd.ALL=4;Ir=new jc;jn=[];hj=new F;kn=new F;Pz=new F;Qz=new Nd;Bd=new F;se=new F;Me=new F;Ne=new F;new F;new Uf;Jr={faceList:[0]};Nk=new F;Rz=new pd;Sz=[];Tz=new F;Uz=new F;Vz=new F;Wz=new F;Xz=new F;Kr=new F;Yz=new F;Zz=new F;$z=new F;aA=new F;bA=new F;cA=new F;new jc;dA=[];eA=new Ab;
|
||
Ig=new F;Ok=new F;var wa=function(h){var k=Od.call(this)||this;k.axisList=[];k.world=null;k.axisIndex=0;var m=k.axisList;k._addBodyHandler=function(q){m.push(q.body)};k._removeBodyHandler=function(q){q=m.indexOf(q.body);-1!==q&&m.splice(q,1)};h&&k.setWorld(h);return k};$jscomp.inherits(wa,Od);wa.checkBounds=function(h,k,m){if(0===m){var q=h.position.x;var t=k.position.x}else 1===m?(q=h.position.y,t=k.position.y):2===m&&(q=h.position.z,t=k.position.z);return t-k.boundingRadius<q+h.boundingRadius};
|
||
wa.insertionSortX=function(h){for(var k=1,m=h.length;k<m;k++){var q=h[k],t;for(t=k-1;0<=t&&!(h[t].aabb.lowerBound.x<=q.aabb.lowerBound.x);t--)h[t+1]=h[t];h[t+1]=q}return h};wa.insertionSortY=function(h){for(var k=1,m=h.length;k<m;k++){var q=h[k],t;for(t=k-1;0<=t&&!(h[t].aabb.lowerBound.y<=q.aabb.lowerBound.y);t--)h[t+1]=h[t];h[t+1]=q}return h};wa.insertionSortZ=function(h){for(var k=1,m=h.length;k<m;k++){var q=h[k],t;for(t=k-1;0<=t&&!(h[t].aabb.lowerBound.z<=q.aabb.lowerBound.z);t--)h[t+1]=h[t];h[t+
|
||
1]=q}return h};wa.prototype.setWorld=function(h){for(var k=this.axisList.length=0;k<h.bodies.length;k++)this.axisList.push(h.bodies[k]);h.removeEventListener("addBody",this._addBodyHandler);h.removeEventListener("removeBody",this._removeBodyHandler);h.addEventListener("addBody",this._addBodyHandler);h.addEventListener("removeBody",this._removeBodyHandler);this.world=h;this.dirty=!0};wa.prototype.collisionPairs=function(h,k,m){h=this.axisList;var q=h.length,t=this.axisIndex,z,D;this.dirty&&(this.sortList(),
|
||
this.dirty=!1);for(z=0;z!==q;z++){var C=h[z];for(D=z+1;D<q;D++){var J=h[D];if(this.needBroadphaseCollision(C,J)){if(!wa.checkBounds(C,J,t))break;this.intersectionTest(C,J,k,m)}}}};wa.prototype.sortList=function(){for(var h=this.axisList,k=this.axisIndex,m=h.length,q=0;q!==m;q++){var t=h[q];t.aabbNeedsUpdate&&t.updateAABB()}0===k?wa.insertionSortX(h):1===k?wa.insertionSortY(h):2===k&&wa.insertionSortZ(h)};wa.prototype.autoDetectAxis=function(){for(var h=0,k=0,m=0,q=0,t=0,z=0,D=this.axisList,C=D.length,
|
||
J=1/C,N=0;N!==C;N++){var T=D[N],W=T.position.x;h+=W;k+=W*W;W=T.position.y;m+=W;q+=W*W;T=T.position.z;t+=T;z+=T*T}h=k-h*h*J;m=q-m*m*J;t=z-t*t*J;this.axisIndex=h>m?h>t?0:2:m>t?1:2};wa.prototype.aabbQuery=function(h,k,m){void 0===m&&(m=[]);this.dirty&&(this.sortList(),this.dirty=!1);h=this.axisList;for(var q=0;q<h.length;q++){var t=h[q];t.aabbNeedsUpdate&&t.updateAABB();t.aabb.overlaps(k)&&m.push(t)}return m};Lr=wa;ln=function(){};ln.defaults=function(h,k){void 0===h&&(h={});for(var m in k)m in h||(h[m]=
|
||
k[m]);return h};var Ga=function(h,k,m){void 0===m&&(m={});m=ln.defaults(m,{collideConnected:!0,wakeUpBodies:!0});this.equations=[];this.bodyA=h;this.bodyB=k;this.id=Ga.idCounter++;this.collideConnected=m.collideConnected;m.wakeUpBodies&&(h&&h.wakeUp(),k&&k.wakeUp())};Ga.prototype.update=function(){throw Error("method update() not implmemented in this Constraint subclass!");};Ga.prototype.enable=function(){for(var h=this.equations,k=0;k<h.length;k++)h[k].enabled=!0};Ga.prototype.disable=function(){for(var h=
|
||
this.equations,k=0;k<h.length;k++)h[k].enabled=!1};mn=Ga;mn.idCounter=0;Pk=function(){this.spatial=new F;this.rotational=new F};Pk.prototype.multiplyElement=function(h){return h.spatial.dot(this.spatial)+h.rotational.dot(this.rotational)};Pk.prototype.multiplyVectors=function(h,k){return h.dot(this.spatial)+k.dot(this.rotational)};var za=function(h,k,m,q){void 0===m&&(m=-1E6);void 0===q&&(q=1E6);this.id=za.idCounter++;this.minForce=m;this.maxForce=q;this.bi=h;this.bj=k;this.eps=this.b=this.a=0;this.jacobianElementA=
|
||
new Pk;this.jacobianElementB=new Pk;this.enabled=!0;this.multiplier=0;this.setSpookParams(1E7,4,1/60)};za.prototype.setSpookParams=function(h,k,m){this.a=4/(m*(1+4*k));this.b=4*k/(1+4*k);this.eps=4/(m*m*h*(1+4*k))};za.prototype.computeB=function(h,k,m){var q=this.computeGW(),t=this.computeGq(),z=this.computeGiMf();return-t*h-q*k-z*m};za.prototype.computeGq=function(){var h=this.jacobianElementB,k=this.bj.position;return this.jacobianElementA.spatial.dot(this.bi.position)+h.spatial.dot(k)};za.prototype.computeGW=
|
||
function(){var h=this.jacobianElementB,k=this.bi,m=this.bj,q=m.velocity;m=m.angularVelocity;return this.jacobianElementA.multiplyVectors(k.velocity,k.angularVelocity)+h.multiplyVectors(q,m)};za.prototype.computeGWlambda=function(){var h=this.jacobianElementB,k=this.bi,m=this.bj,q=m.vlambda;m=m.wlambda;return this.jacobianElementA.multiplyVectors(k.vlambda,k.wlambda)+h.multiplyVectors(q,m)};za.prototype.computeGiMf=function(){var h=this.jacobianElementA,k=this.jacobianElementB,m=this.bi,q=this.bj,
|
||
t=m.torque,z=q.force,D=q.torque,C=q.invMassSolve;m.force.scale(m.invMassSolve,Mr);z.scale(C,Nr);m.invInertiaWorldSolve.vmult(t,Or);q.invInertiaWorldSolve.vmult(D,Pr);return h.multiplyVectors(Mr,Or)+k.multiplyVectors(Nr,Pr)};za.prototype.computeGiMGt=function(){var h=this.jacobianElementA,k=this.jacobianElementB,m=this.bi,q=this.bj,t=q.invInertiaWorldSolve;q=m.invMassSolve+q.invMassSolve;m.invInertiaWorldSolve.vmult(h.rotational,Qk);q+=Qk.dot(h.rotational);t.vmult(k.rotational,Qk);return q+=Qk.dot(k.rotational)};
|
||
za.prototype.addToWlambda=function(h){var k=this.jacobianElementA,m=this.jacobianElementB,q=this.bi,t=this.bj,z=fA;q.vlambda.addScaledVector(q.invMassSolve*h,k.spatial,q.vlambda);t.vlambda.addScaledVector(t.invMassSolve*h,m.spatial,t.vlambda);q.invInertiaWorldSolve.vmult(k.rotational,z);q.wlambda.addScaledVector(h,z,q.wlambda);t.invInertiaWorldSolve.vmult(m.rotational,z);t.wlambda.addScaledVector(h,z,t.wlambda)};za.prototype.computeC=function(){return this.computeGiMGt()+this.eps};ij=za;ij.idCounter=
|
||
0;Mr=new F;Nr=new F;Or=new F;Pr=new F;Qk=new F;fA=new F;Nh=function(h,k,m){void 0===m&&(m=1E6);h=ij.call(this,h,k,0,m)||this;h.restitution=0;h.ri=new F;h.rj=new F;h.ni=new F;return h};$jscomp.inherits(Nh,ij);Nh.prototype.computeB=function(h){var k=this.a,m=this.b,q=this.bi,t=this.bj,z=this.ri,D=this.rj,C=gA,J=hA,N=q.velocity,T=q.angularVelocity;q.force;q.torque;var W=t.velocity,Y=t.angularVelocity;t.force;t.torque;var ca=iA,U=this.jacobianElementA,ha=this.jacobianElementB,V=this.ni;z.cross(V,C);D.cross(V,
|
||
J);V.negate(U.spatial);C.negate(U.rotational);ha.spatial.copy(V);ha.rotational.copy(J);ca.copy(t.position);ca.vadd(D,ca);ca.vsub(q.position,ca);ca.vsub(z,ca);q=V.dot(ca);t=this.restitution+1;C=t*W.dot(V)-t*N.dot(V)+Y.dot(J)-T.dot(C);J=this.computeGiMf();return-q*k-C*m-h*J};Nh.prototype.getImpactVelocityAlongNormal=function(){var h=jA,k=kA,m=lA,q=mA,t=nA;this.bi.position.vadd(this.ri,m);this.bj.position.vadd(this.rj,q);this.bi.getVelocityAtWorldPoint(m,h);this.bj.getVelocityAtWorldPoint(q,k);h.vsub(k,
|
||
t);return this.ni.dot(t)};gA=new F;hA=new F;iA=new F;jA=new F;kA=new F;lA=new F;mA=new F;nA=new F;new F;new F;new F;new F;new F;new F;nn=function(h,k,m,q){void 0===q&&(q=1E6);var t=mn.call(this,h,k)||this;"undefined"===typeof m&&(m=h.position.distanceTo(k.position));t.distance=m;h=t.distanceEquation=new Nh(h,k);t.equations.push(h);h.minForce=-q;h.maxForce=q;return t};$jscomp.inherits(nn,mn);nn.prototype.update=function(){var h=this.distanceEquation,k=.5*this.distance,m=h.ni;this.bodyB.position.vsub(this.bodyA.position,
|
||
m);m.normalize();m.scale(k,h.ri);m.scale(-k,h.rj)};new F;new F;new F;new F;jj=function(h,k,m){h=ij.call(this,h,k,-m,m)||this;h.ri=new F;h.rj=new F;h.t=new F;return h};$jscomp.inherits(jj,ij);jj.prototype.computeB=function(h){this.a;var k=this.b;this.bi;this.bj;var m=this.rj,q=oA,t=pA,z=this.t;this.ri.cross(z,q);m.cross(z,t);m=this.jacobianElementA;var D=this.jacobianElementB;z.negate(m.spatial);q.negate(m.rotational);D.spatial.copy(z);D.rotational.copy(t);q=this.computeGW();t=this.computeGiMf();return-q*
|
||
k-h*t};oA=new F;pA=new F;var pc=function(h,k,m){m=ln.defaults(m,{friction:.3,restitution:.3,contactEquationStiffness:1E7,contactEquationRelaxation:3,frictionEquationStiffness:1E7,frictionEquationRelaxation:3});this.id=pc.idCounter++;this.materials=[h,k];this.friction=m.friction;this.restitution=m.restitution;this.contactEquationStiffness=m.contactEquationStiffness;this.contactEquationRelaxation=m.contactEquationRelaxation;this.frictionEquationStiffness=m.frictionEquationStiffness;this.frictionEquationRelaxation=
|
||
m.frictionEquationRelaxation};Qr=pc;Qr.idCounter=0;var zd=function(h){void 0===h&&(h={});var k="";"string"===typeof h&&(k=h,h={});this.name=k;this.id=zd.idCounter++;this.friction="undefined"!==typeof h.friction?h.friction:-1;this.restitution="undefined"!==typeof h.restitution?h.restitution:-1};Rr=zd;Rr.idCounter=0;new F;new F;new F;new F;new F;new F;new F;new F;new F;new F;new F;new F;new F;new F;new F;new F;new F;new F;new F;new pd;new F;new F;new F;new F(1,0,0);new F(0,1,0);new F(0,0,1);new F;new F;
|
||
new F;new F;new F;new F;new F;new F;new F;new F;new F;Vf=function(h){var k=Wa.call(this,{type:Wa.types.SPHERE})||this;k.radius=void 0!==h?h:1;if(0>k.radius)throw Error("The sphere radius cannot be negative.");k.updateBoundingSphereRadius();return k};$jscomp.inherits(Vf,Wa);Vf.prototype.calculateLocalInertia=function(h,k){void 0===k&&(k=new F);h=2*h*this.radius*this.radius/5;k.x=h;k.y=h;k.z=h;return k};Vf.prototype.volume=function(){return 4*Math.PI*Math.pow(this.radius,3)/3};Vf.prototype.updateBoundingSphereRadius=
|
||
function(){this.boundingSphereRadius=this.radius};Vf.prototype.calculateWorldAABB=function(h,k,m,q){k=this.radius;for(var t=["x","y","z"],z=0;z<t.length;z++){var D=t[z];m[D]=h[D]-k;q[D]=h[D]+k}};new F;new F;new F;new F;new F;new F;new F;new F;new F;new F;new F;new F;new F;new F;new F;new F;new F;new F;new F;var Kb=function(h){void 0===h&&(h={});this.root=h.root||null;this.aabb=h.aabb?h.aabb.clone():new jc;this.data=[];this.children=[]};Kb.prototype.reset=function(){this.children.length=this.data.length=
|
||
0};Kb.prototype.insert=function(h,k,m){void 0===m&&(m=0);var q=this.data;if(!this.aabb.contains(h))return!1;var t=this.children;if(m<(this.maxDepth||this.root.maxDepth)){var z=!1;t.length||(this.subdivide(),z=!0);for(var D=0;8!==D;D++)if(t[D].insert(h,k,m+1))return!0;z&&(t.length=0)}q.push(k);return!0};Kb.prototype.subdivide=function(){var h=this.aabb,k=h.lowerBound,m=h.upperBound;h=this.children;h.push(new Kb({aabb:new jc({lowerBound:new F(0,0,0)})}),new Kb({aabb:new jc({lowerBound:new F(1,0,0)})}),
|
||
new Kb({aabb:new jc({lowerBound:new F(1,1,0)})}),new Kb({aabb:new jc({lowerBound:new F(1,1,1)})}),new Kb({aabb:new jc({lowerBound:new F(0,1,1)})}),new Kb({aabb:new jc({lowerBound:new F(0,0,1)})}),new Kb({aabb:new jc({lowerBound:new F(1,0,1)})}),new Kb({aabb:new jc({lowerBound:new F(0,1,0)})}));m.vsub(k,Jg);Jg.scale(.5,Jg);m=this.root||this;for(var q=0;8!==q;q++){var t=h[q];t.root=m;var z=t.aabb.lowerBound;z.x*=Jg.x;z.y*=Jg.y;z.z*=Jg.z;z.vadd(k,z);z.vadd(Jg,t.aabb.upperBound)}};Kb.prototype.aabbQuery=
|
||
function(h,k){this.data;this.children;for(var m=[this];m.length;){var q=m.pop();q.aabb.overlaps(h)&&Array.prototype.push.apply(k,q.data);Array.prototype.push.apply(m,q.children)}return k};Kb.prototype.rayQuery=function(h,k,m){h.getAABB(Rk);Rk.toLocalFrame(k,Rk);this.aabbQuery(Rk,m);return m};Kb.prototype.removeEmptyNodes=function(){for(var h=this.children.length-1;0<=h;h--)this.children[h].removeEmptyNodes(),this.children[h].children.length||this.children[h].data.length||this.children.splice(h,1)};
|
||
Sr=Kb;Tr=function(h,k){void 0===k&&(k={});h=Sr.call(this,{root:null,aabb:h})||this;h.maxDepth="undefined"!==typeof k.maxDepth?k.maxDepth:8;return h};$jscomp.inherits(Tr,Sr);Jg=new F;Rk=new jc;var ub=function(h,k){var m=Wa.call(this,{type:Wa.types.TRIMESH})||this;m.vertices=new Float32Array(h);m.indices=new Int16Array(k);m.normals=new Float32Array(k.length);m.aabb=new jc;m.edges=null;m.scale=new F(1,1,1);m.tree=new Tr;m.updateEdges();m.updateNormals();m.updateAABB();m.updateBoundingSphereRadius();
|
||
m.updateTree();return m};$jscomp.inherits(ub,Wa);ub.prototype.updateTree=function(){var h=this.tree;h.reset();h.aabb.copy(this.aabb);var k=this.scale;h.aabb.lowerBound.x*=1/k.x;h.aabb.lowerBound.y*=1/k.y;h.aabb.lowerBound.z*=1/k.z;h.aabb.upperBound.x*=1/k.x;h.aabb.upperBound.y*=1/k.y;h.aabb.upperBound.z*=1/k.z;k=new jc;for(var m=new F,q=new F,t=new F,z=[m,q,t],D=0;D<this.indices.length/3;D++){var C=3*D;this._getUnscaledVertex(this.indices[C],m);this._getUnscaledVertex(this.indices[C+1],q);this._getUnscaledVertex(this.indices[C+
|
||
2],t);k.setFromPoints(z);h.insert(k,D)}h.removeEmptyNodes()};ub.prototype.getTrianglesInAABB=function(h,k){Sk.copy(h);var m=this.scale;h=m.x;var q=m.y;m=m.z;var t=Sk.lowerBound,z=Sk.upperBound;t.x/=h;t.y/=q;t.z/=m;z.x/=h;z.y/=q;z.z/=m;return this.tree.aabbQuery(Sk,k)};ub.prototype.setScale=function(h){var k=h.x===h.y&&h.y===h.z;this.scale.x===this.scale.y&&this.scale.y===this.scale.z&&k||this.updateNormals();this.scale.copy(h);this.updateAABB();this.updateBoundingSphereRadius()};ub.prototype.updateNormals=
|
||
function(){for(var h=qA,k=this.normals,m=0;m<this.indices.length/3;m++){var q=3*m,t=this.indices[q+1],z=this.indices[q+2];this.getVertex(this.indices[q],Xr);this.getVertex(t,Yr);this.getVertex(z,Zr);ub.computeNormal(Yr,Xr,Zr,h);k[q]=h.x;k[q+1]=h.y;k[q+2]=h.z}};ub.prototype.updateEdges=function(){for(var h={},k=function(D,C){h[D<C?D+"_"+C:C+"_"+D]=!0},m=0;m<this.indices.length/3;m++){var q=3*m,t=this.indices[q],z=this.indices[q+1];q=this.indices[q+2];k(t,z);k(z,q);k(q,t)}k=Object.keys(h);this.edges=
|
||
new Int16Array(2*k.length);for(m=0;m<k.length;m++)t=k[m].split("_"),this.edges[2*m]=parseInt(t[0],10),this.edges[2*m+1]=parseInt(t[1],10)};ub.prototype.getEdgeVertex=function(h,k,m){this.getVertex(this.edges[2*h+(k?1:0)],m)};ub.prototype.getEdgeVector=function(h,k){var m=rA,q=sA;this.getEdgeVertex(h,0,m);this.getEdgeVertex(h,1,q);q.vsub(m,k)};ub.computeNormal=function(h,k,m,q){k.vsub(h,Wr);m.vsub(k,Vr);Vr.cross(Wr,q);q.isZero()||q.normalize()};ub.prototype.getVertex=function(h,k){var m=this.scale;
|
||
this._getUnscaledVertex(h,k);k.x*=m.x;k.y*=m.y;k.z*=m.z;return k};ub.prototype._getUnscaledVertex=function(h,k){h*=3;var m=this.vertices;return k.set(m[h],m[h+1],m[h+2])};ub.prototype.getWorldVertex=function(h,k,m,q){this.getVertex(h,q);Ab.pointToWorldFrame(k,m,q,q);return q};ub.prototype.getTriangleVertices=function(h,k,m,q){h*=3;this.getVertex(this.indices[h],k);this.getVertex(this.indices[h+1],m);this.getVertex(this.indices[h+2],q)};ub.prototype.getNormal=function(h,k){h*=3;return k.set(this.normals[h],
|
||
this.normals[h+1],this.normals[h+2])};ub.prototype.calculateLocalInertia=function(h,k){this.computeLocalAABB(Kg);var m=Kg.upperBound.x-Kg.lowerBound.x,q=Kg.upperBound.y-Kg.lowerBound.y,t=Kg.upperBound.z-Kg.lowerBound.z;return k.set(1/12*h*(4*q*q+4*t*t),1/12*h*(4*m*m+4*t*t),1/12*h*(4*q*q+4*m*m))};ub.prototype.computeLocalAABB=function(h){var k=h.lowerBound;h=h.upperBound;var m=this.vertices.length;this.vertices;var q=tA;this.getVertex(0,q);k.copy(q);h.copy(q);for(var t=0;t!==m;t++)this.getVertex(t,
|
||
q),q.x<k.x?k.x=q.x:q.x>h.x&&(h.x=q.x),q.y<k.y?k.y=q.y:q.y>h.y&&(h.y=q.y),q.z<k.z?k.z=q.z:q.z>h.z&&(h.z=q.z)};ub.prototype.updateAABB=function(){this.computeLocalAABB(this.aabb)};ub.prototype.updateBoundingSphereRadius=function(){var h=0,k=this.vertices,m=new F,q=0;for(k=k.length/3;q!==k;q++){this.getVertex(q,m);var t=m.lengthSquared();t>h&&(h=t)}this.boundingSphereRadius=Math.sqrt(h)};ub.prototype.calculateWorldAABB=function(h,k,m,q){var t=uA,z=vA;t.position=h;t.quaternion=k;this.aabb.toWorldFrame(t,
|
||
z);m.copy(z.lowerBound);q.copy(z.upperBound)};ub.prototype.volume=function(){return 4*Math.PI*this.boundingSphereRadius/3};ub.createTorus=function(h,k,m,q,t){void 0===h&&(h=1);void 0===k&&(k=.5);void 0===m&&(m=8);void 0===q&&(q=6);void 0===t&&(t=2*Math.PI);for(var z=[],D=[],C=0;C<=m;C++)for(var J=0;J<=q;J++){var N=J/q*t,T=C/m*Math.PI*2;z.push((h+k*Math.cos(T))*Math.cos(N),(h+k*Math.cos(T))*Math.sin(N),k*Math.sin(T))}for(h=1;h<=m;h++)for(k=1;k<=q;k++)t=(q+1)*(h-1)+k-1,C=(q+1)*(h-1)+k,J=(q+1)*h+k,D.push((q+
|
||
1)*h+k-1,t,J),D.push(t,C,J);return new ub(z,D)};Ur=ub;qA=new F;Sk=new jc;rA=new F;sA=new F;Vr=new F;Wr=new F;Xr=new F;Yr=new F;Zr=new F;Kg=new jc;tA=new F;uA=new Ab;vA=new jc;Oh=function(){this.equations=[]};Oh.prototype.solve=function(h,k){return 0};Oh.prototype.addEquation=function(h){!h.enabled||h.bi.isTrigger||h.bj.isTrigger||this.equations.push(h)};Oh.prototype.removeEquation=function(h){var k=this.equations;h=k.indexOf(h);-1!==h&&k.splice(h,1)};Oh.prototype.removeAllEquations=function(){this.equations.length=
|
||
0};on=function(){var h=Oh.call(this)||this;h.iterations=10;h.tolerance=1E-7;return h};$jscomp.inherits(on,Oh);on.prototype.solve=function(h,k){var m=0,q=this.iterations,t=this.tolerance*this.tolerance,z=this.equations,D=z.length,C=k.bodies,J=C.length,N;if(0!==D)for(k=0;k!==J;k++)C[k].updateSolveMassProperties();var T=xA,W=yA;k=wA;T.length=D;W.length=D;k.length=D;for(N=0;N!==D;N++){var Y=z[N];k[N]=0;W[N]=Y.computeB(h);T[N]=1/Y.computeC()}if(0!==D){for(m=0;m!==J;m++)N=C[m],Y=N.wlambda,N.vlambda.set(0,
|
||
0,0),Y.set(0,0,0);for(m=0;m!==q;m++){for(var ca=N=0;ca!==D;ca++){var U=z[ca];var ha=W[ca];var V=T[ca];Y=k[ca];var ta=U.computeGWlambda();ha=V*(ha-ta-U.eps*Y);Y+ha<U.minForce?ha=U.minForce-Y:Y+ha>U.maxForce&&(ha=U.maxForce-Y);k[ca]+=ha;N+=0<ha?ha:-ha;U.addToWlambda(ha)}if(N*N<t)break}for(q=0;q!==J;q++)t=C[q],D=t.velocity,T=t.angularVelocity,t.vlambda.vmul(t.linearFactor,t.vlambda),D.vadd(t.vlambda,D),t.wlambda.vmul(t.angularFactor,t.wlambda),T.vadd(t.wlambda,T);C=z.length;for(h=1/h;C--;)z[C].multiplier=
|
||
k[C]*h}return m};wA=[];xA=[];yA=[];Ph=function(){this.objects=[];this.type=Object};Ph.prototype.release=function(){for(var h=arguments.length,k=0;k!==h;k++)this.objects.push(0>k||arguments.length<=k?void 0:arguments[k]);return this};Ph.prototype.get=function(){return 0===this.objects.length?this.constructObject():this.objects.pop()};Ph.prototype.constructObject=function(){throw Error("constructObject() not implemented in this Pool subclass yet!");};Ph.prototype.resize=function(h){for(var k=this.objects;k.length>
|
||
h;)k.pop();for(;k.length<h;)k.push(this.constructObject());return this};pn=function(){var h=Ph.apply(this,arguments)||this;h.type=F;return h};$jscomp.inherits(pn,Ph);pn.prototype.constructObject=function(){return new F};M=Wa.types.SPHERE;Z=Wa.types.SPHERE|Wa.types.PLANE;fa=Wa.types.BOX|Wa.types.BOX;la=Wa.types.SPHERE|Wa.types.BOX;ra=Wa.types.PLANE|Wa.types.BOX;qb=Wa.types.CONVEXPOLYHEDRON;ua=Wa.types.SPHERE|Wa.types.CONVEXPOLYHEDRON;cb=Wa.types.PLANE|Wa.types.CONVEXPOLYHEDRON;Ca=Wa.types.BOX|Wa.types.CONVEXPOLYHEDRON;
|
||
Ia=Wa.types.SPHERE|Wa.types.HEIGHTFIELD;Ra=Wa.types.BOX|Wa.types.HEIGHTFIELD;zb=Wa.types.CONVEXPOLYHEDRON|Wa.types.HEIGHTFIELD;Vc=Wa.types.PARTICLE|Wa.types.SPHERE;ef=Wa.types.PLANE|Wa.types.PARTICLE;bj=Wa.types.BOX|Wa.types.PARTICLE;cj=Wa.types.PARTICLE|Wa.types.CONVEXPOLYHEDRON;Nw=Wa.types.CYLINDER;Ow=Wa.types.SPHERE|Wa.types.CYLINDER;Pw=Wa.types.PLANE|Wa.types.CYLINDER;Qw=Wa.types.BOX|Wa.types.CYLINDER;Rw=Wa.types.CONVEXPOLYHEDRON|Wa.types.CYLINDER;Sw=Wa.types.HEIGHTFIELD|Wa.types.CYLINDER;Tw=
|
||
Wa.types.PARTICLE|Wa.types.CYLINDER;Uw=Wa.types.SPHERE|Wa.types.TRIMESH;Vw=Wa.types.PLANE|Wa.types.TRIMESH;Sq=Rq=void 0;fb=function(h){this.contactPointPool=[];this.frictionEquationPool=[];this.result=[];this.frictionResult=[];this.v3pool=new pn;this.world=h;this.currentContactMaterial=h.defaultContactMaterial;this.enableFrictionReduction=!1};$jscomp.global.Object.defineProperty(fb.prototype,M,{configurable:!0,enumerable:!0,get:function(){return this.sphereSphere}});$jscomp.global.Object.defineProperty(fb.prototype,
|
||
Z,{configurable:!0,enumerable:!0,get:function(){return this.spherePlane}});$jscomp.global.Object.defineProperty(fb.prototype,fa,{configurable:!0,enumerable:!0,get:function(){return this.boxBox}});$jscomp.global.Object.defineProperty(fb.prototype,la,{configurable:!0,enumerable:!0,get:function(){return this.sphereBox}});$jscomp.global.Object.defineProperty(fb.prototype,ra,{configurable:!0,enumerable:!0,get:function(){return this.planeBox}});$jscomp.global.Object.defineProperty(fb.prototype,qb,{configurable:!0,
|
||
enumerable:!0,get:function(){return this.convexConvex}});$jscomp.global.Object.defineProperty(fb.prototype,ua,{configurable:!0,enumerable:!0,get:function(){return this.sphereConvex}});$jscomp.global.Object.defineProperty(fb.prototype,cb,{configurable:!0,enumerable:!0,get:function(){return this.planeConvex}});$jscomp.global.Object.defineProperty(fb.prototype,Ca,{configurable:!0,enumerable:!0,get:function(){return this.boxConvex}});$jscomp.global.Object.defineProperty(fb.prototype,Ia,{configurable:!0,
|
||
enumerable:!0,get:function(){return this.sphereHeightfield}});$jscomp.global.Object.defineProperty(fb.prototype,Ra,{configurable:!0,enumerable:!0,get:function(){return this.boxHeightfield}});$jscomp.global.Object.defineProperty(fb.prototype,zb,{configurable:!0,enumerable:!0,get:function(){return this.convexHeightfield}});$jscomp.global.Object.defineProperty(fb.prototype,Vc,{configurable:!0,enumerable:!0,get:function(){return this.sphereParticle}});$jscomp.global.Object.defineProperty(fb.prototype,
|
||
ef,{configurable:!0,enumerable:!0,get:function(){return this.planeParticle}});$jscomp.global.Object.defineProperty(fb.prototype,bj,{configurable:!0,enumerable:!0,get:function(){return this.boxParticle}});$jscomp.global.Object.defineProperty(fb.prototype,cj,{configurable:!0,enumerable:!0,get:function(){return this.convexParticle}});$jscomp.global.Object.defineProperty(fb.prototype,Nw,{configurable:!0,enumerable:!0,get:function(){return this.convexConvex}});$jscomp.global.Object.defineProperty(fb.prototype,
|
||
Ow,{configurable:!0,enumerable:!0,get:function(){return this.sphereConvex}});$jscomp.global.Object.defineProperty(fb.prototype,Pw,{configurable:!0,enumerable:!0,get:function(){return this.planeConvex}});$jscomp.global.Object.defineProperty(fb.prototype,Qw,{configurable:!0,enumerable:!0,get:function(){return this.boxConvex}});$jscomp.global.Object.defineProperty(fb.prototype,Rw,{configurable:!0,enumerable:!0,get:function(){return this.convexConvex}});$jscomp.global.Object.defineProperty(fb.prototype,
|
||
Sw,{configurable:!0,enumerable:!0,get:function(){return this.heightfieldCylinder}});$jscomp.global.Object.defineProperty(fb.prototype,Tw,{configurable:!0,enumerable:!0,get:function(){return this.particleCylinder}});$jscomp.global.Object.defineProperty(fb.prototype,Uw,{configurable:!0,enumerable:!0,get:function(){return this.sphereTrimesh}});$jscomp.global.Object.defineProperty(fb.prototype,Vw,{configurable:!0,enumerable:!0,get:function(){return this.planeTrimesh}});fb.prototype.createContactEquation=
|
||
function(h,k,m,q,t,z){if(this.contactPointPool.length){var D=this.contactPointPool.pop();D.bi=h;D.bj=k}else D=new Nh(h,k);D.enabled=h.collisionResponse&&k.collisionResponse&&m.collisionResponse&&q.collisionResponse;var C=this.currentContactMaterial;D.restitution=C.restitution;D.setSpookParams(C.contactEquationStiffness,C.contactEquationRelaxation,this.world.dt);h=m.material||h.material;k=q.material||k.material;h&&k&&0<=h.restitution&&0<=k.restitution&&(D.restitution=h.restitution*k.restitution);D.si=
|
||
t||m;D.sj=z||q;return D};fb.prototype.createFrictionEquationsFromContact=function(h,k){var m=h.bi,q=h.bj,t=this.world,z=this.currentContactMaterial,D=z.friction,C=h.si.material||m.material,J=h.sj.material||q.material;C&&J&&0<=C.friction&&0<=J.friction&&(D=C.friction*J.friction);if(0<D){D*=(t.frictionGravity||t.gravity).length();C=m.invMass+q.invMass;0<C&&(C=1/C);var N=this.frictionEquationPool;J=N.length?N.pop():new jj(m,q,D*C);N=N.length?N.pop():new jj(m,q,D*C);J.bi=N.bi=m;J.bj=N.bj=q;J.minForce=
|
||
N.minForce=-D*C;J.maxForce=N.maxForce=D*C;J.ri.copy(h.ri);J.rj.copy(h.rj);N.ri.copy(h.ri);N.rj.copy(h.rj);h.ni.tangents(J.t,N.t);J.setSpookParams(z.frictionEquationStiffness,z.frictionEquationRelaxation,t.dt);N.setSpookParams(z.frictionEquationStiffness,z.frictionEquationRelaxation,t.dt);J.enabled=N.enabled=h.enabled;k.push(J,N);return!0}return!1};fb.prototype.createFrictionFromAverage=function(h){var k=this.result[this.result.length-1];if(this.createFrictionEquationsFromContact(k,this.frictionResult)&&
|
||
1!==h){var m=this.frictionResult[this.frictionResult.length-2],q=this.frictionResult[this.frictionResult.length-1];Lg.setZero();Qh.setZero();Rh.setZero();var t=k.bi;k.bj;for(var z=0;z!==h;z++)k=this.result[this.result.length-1-z],k.bi!==t?(Lg.vadd(k.ni,Lg),Qh.vadd(k.ri,Qh),Rh.vadd(k.rj,Rh)):(Lg.vsub(k.ni,Lg),Qh.vadd(k.rj,Qh),Rh.vadd(k.ri,Rh));h=1/h;Qh.scale(h,m.ri);Rh.scale(h,m.rj);q.ri.copy(m.ri);q.rj.copy(m.rj);Lg.normalize();Lg.tangents(m.t,q.t)}};fb.prototype.getContacts=function(h,k,m,q,t,z,
|
||
D){this.contactPointPool=t;this.frictionEquationPool=D;this.result=q;this.frictionResult=z;q=BA;t=CA;z=zA;D=AA;for(var C=0,J=h.length;C!==J;C++){var N=h[C],T=k[C],W=null;N.material&&T.material&&(W=m.getContactMaterial(N.material,T.material)||null);for(var Y=N.type&xb.KINEMATIC&&T.type&xb.STATIC||N.type&xb.STATIC&&T.type&xb.KINEMATIC||N.type&xb.KINEMATIC&&T.type&xb.KINEMATIC,ca=0;ca<N.shapes.length;ca++){N.quaternion.mult(N.shapeOrientations[ca],q);N.quaternion.vmult(N.shapeOffsets[ca],z);z.vadd(N.position,
|
||
z);for(var U=N.shapes[ca],ha=0;ha<T.shapes.length;ha++){T.quaternion.mult(T.shapeOrientations[ha],t);T.quaternion.vmult(T.shapeOffsets[ha],D);D.vadd(T.position,D);var V=T.shapes[ha];if(U.collisionFilterMask&V.collisionFilterGroup&&V.collisionFilterMask&U.collisionFilterGroup&&!(z.distanceTo(D)>U.boundingSphereRadius+V.boundingSphereRadius)){var ta=null;U.material&&V.material&&(ta=m.getContactMaterial(U.material,V.material)||null);this.currentContactMaterial=ta||W||m.defaultContactMaterial;(ta=this[U.type|
|
||
V.type])&&(U.type<V.type?ta.call(this,U,V,z,D,q,t,N,T,U,V,Y):ta.call(this,V,U,D,z,t,q,T,N,U,V,Y))&&Y&&(m.shapeOverlapKeeper.set(U.id,V.id),m.bodyOverlapKeeper.set(N.id,T.id))}}}}};fb.prototype.sphereSphere=function(h,k,m,q,t,z,D,C,J,N,T){if(T)return m.distanceSquared(q)<Ad(h.radius+k.radius,2);t=this.createContactEquation(D,C,h,k,J,N);q.vsub(m,t.ni);t.ni.normalize();t.ri.copy(t.ni);t.rj.copy(t.ni);t.ri.scale(h.radius,t.ri);t.rj.scale(-k.radius,t.rj);t.ri.vadd(m,t.ri);t.ri.vsub(D.position,t.ri);t.rj.vadd(q,
|
||
t.rj);t.rj.vsub(C.position,t.rj);this.result.push(t);this.createFrictionEquationsFromContact(t,this.frictionResult)};fb.prototype.spherePlane=function(h,k,m,q,t,z,D,C,J,N,T){k=this.createContactEquation(D,C,h,k,J,N);k.ni.set(0,0,1);z.vmult(k.ni,k.ni);k.ni.negate(k.ni);k.ni.normalize();k.ni.scale(h.radius,k.ri);m.vsub(q,Tk);k.ni.scale(k.ni.dot(Tk),$r);Tk.vsub($r,k.rj);if(-Tk.dot(k.ni)<=h.radius){if(T)return!0;h=k.ri;z=k.rj;h.vadd(m,h);h.vsub(D.position,h);z.vadd(q,z);z.vsub(C.position,z);this.result.push(k);
|
||
this.createFrictionEquationsFromContact(k,this.frictionResult)}};fb.prototype.boxBox=function(h,k,m,q,t,z,D,C,J,N,T){h.convexPolyhedronRepresentation.material=h.material;k.convexPolyhedronRepresentation.material=k.material;h.convexPolyhedronRepresentation.collisionResponse=h.collisionResponse;k.convexPolyhedronRepresentation.collisionResponse=k.collisionResponse;return this.convexConvex(h.convexPolyhedronRepresentation,k.convexPolyhedronRepresentation,m,q,t,z,D,C,h,k,T)};fb.prototype.sphereBox=function(h,
|
||
k,m,q,t,z,D,C,J,N,T){t=bB;m.vsub(q,Uk);k.getSideNormals(t,z);z=h.radius;for(var W=!1,Y=dB,ca=eB,U=fB,ha=null,V=0,ta=0,Na=0,Qa=null,Ma=0,$a=t.length;Ma!==$a&&!1===W;Ma++){var Da=ZA;Da.copy(t[Ma]);var sb=Da.length();Da.normalize();var Hc=Uk.dot(Da);if(Hc<sb+z&&0<Hc){var qd=$A,Wc=aB;qd.copy(t[(Ma+1)%3]);Wc.copy(t[(Ma+2)%3]);var Eb=qd.length(),Cb=Wc.length();qd.normalize();Wc.normalize();var te=Uk.dot(qd),kb=Uk.dot(Wc);if(te<Eb&&te>-Eb&&kb<Cb&&kb>-Cb&&(Hc=Math.abs(Hc-sb-z),null===Qa||Hc<Qa)&&(Qa=Hc,ta=
|
||
te,Na=kb,ha=sb,Y.copy(Da),ca.copy(qd),U.copy(Wc),V++,T))return!0}}V&&(W=!0,V=this.createContactEquation(D,C,h,k,J,N),Qa=V.ri,Ma=V.rj,Y.scale(-z,Qa),$a=V.ni,$a.copy(Y),$a.negate($a),Y.scale(ha,Y),ca.scale(ta,ca),Y.vadd(ca,Y),U.scale(Na,U),Y.vadd(U,Ma),Qa.vadd(m,Qa),Qa.vsub(D.position,Qa),Ma.vadd(q,Ma),Ma.vsub(C.position,Ma),this.result.push(V),this.createFrictionEquationsFromContact(V,this.frictionResult));Y=gB;ca=cB;for(U=0;2!==U&&!W;U++)for(ha=0;2!==ha&&!W;ha++)for(ta=0;2!==ta&&!W;ta++)if(Y.set(0,
|
||
0,0),U?Y.vadd(t[0],Y):Y.vsub(t[0],Y),ha?Y.vadd(t[1],Y):Y.vsub(t[1],Y),ta?Y.vadd(t[2],Y):Y.vsub(t[2],Y),q.vadd(Y,ca),ca.vsub(m,ca),ca.lengthSquared()<z*z){if(T)return!0;W=!0;Na=this.createContactEquation(D,C,h,k,J,N);V=Na.ri;Qa=Na.rj;V.copy(ca);V.normalize();Na.ni.copy(V);V.scale(z,V);Qa.copy(Y);V.vadd(m,V);V.vsub(D.position,V);Qa.vadd(q,Qa);Qa.vsub(C.position,Qa);this.result.push(Na);this.createFrictionEquationsFromContact(Na,this.frictionResult)}Y=hB;ca=iB;U=jB;ha=kB;ta=lB;Na=t.length;for(V=0;V!==
|
||
Na&&!W;V++)for(Qa=0;Qa!==Na&&!W;Qa++)if(V%3!==Qa%3){t[Qa].cross(t[V],Y);Y.normalize();t[V].vadd(t[Qa],ca);U.copy(m);U.vsub(ca,U);U.vsub(q,U);$a=U.dot(Y);Y.scale($a,ha);for(Ma=0;Ma===V%3||Ma===Qa%3;)Ma++;ta.copy(m);ta.vsub(ha,ta);ta.vsub(ca,ta);ta.vsub(q,ta);$a=Math.abs($a);Da=ta.length();if($a<t[Ma].length()&&Da<z){if(T)return!0;W=!0;Ma=this.createContactEquation(D,C,h,k,J,N);$a=Ma.ri;Da=Ma.rj;sb=Ma.ni;ca.vadd(ha,Da);Da.copy(Da);ta.negate(sb);sb.normalize();$a.copy(Da);$a.vadd(q,$a);$a.vsub(m,$a);
|
||
$a.normalize();$a.scale(z,$a);$a.vadd(m,$a);$a.vsub(D.position,$a);Da.vadd(q,Da);Da.vsub(C.position,Da);this.result.push(Ma);this.createFrictionEquationsFromContact(Ma,this.frictionResult)}}};fb.prototype.planeBox=function(h,k,m,q,t,z,D,C,J,N,T){k.convexPolyhedronRepresentation.material=k.material;k.convexPolyhedronRepresentation.collisionResponse=k.collisionResponse;k.convexPolyhedronRepresentation.id=k.id;return this.planeConvex(h,k.convexPolyhedronRepresentation,m,q,t,z,D,C,h,k,T)};fb.prototype.convexConvex=
|
||
function(h,k,m,q,t,z,D,C,J,N,T,W,Y){var ca=AB;if(!(m.distanceTo(q)>h.boundingSphereRadius+k.boundingSphereRadius)&&h.findSeparatingAxis(k,m,t,q,z,ca,W,Y)){W=DA.reset();Y=BB;h.clipAgainstHull(m,t,k,q,z,ca,-100,100,W);z=t=0;for(var U=W.length;z<U;z++){if(T)return!0;var ha=W.array[z],V=this.createContactEquation(D,C,h,k,J,N),ta=V.ri,Na=V.rj;ca.negate(V.ni);ha.normal.negate(Y);Y.scale(ha.depth,Y);ha.point.vadd(Y,ta);Na.copy(ha.point);ta.vsub(m,ta);Na.vsub(q,Na);ta.vadd(m,ta);ta.vsub(D.position,ta);Na.vadd(q,
|
||
Na);Na.vsub(C.position,Na);this.result.push(V);t++;this.enableFrictionReduction||this.createFrictionEquationsFromContact(V,this.frictionResult)}this.enableFrictionReduction&&t&&this.createFrictionFromAverage(t)}};fb.prototype.sphereConvex=function(h,k,m,q,t,z,D,C,J,N,T){t=this.v3pool;m.vsub(q,mB);for(var W=k.faceNormals,Y=k.faces,ca=k.vertices,U=h.radius,ha=0;ha!==ca.length;ha++){var V=qB;z.vmult(ca[ha],V);q.vadd(V,V);var ta=pB;V.vsub(m,ta);if(ta.lengthSquared()<U*U){if(T)return!0;t=this.createContactEquation(D,
|
||
C,h,k,J,N);t.ri.copy(ta);t.ri.normalize();t.ni.copy(t.ri);t.ri.scale(U,t.ri);V.vsub(q,t.rj);t.ri.vadd(m,t.ri);t.ri.vsub(D.position,t.ri);t.rj.vadd(q,t.rj);t.rj.vsub(C.position,t.rj);this.result.push(t);this.createFrictionEquationsFromContact(t,this.frictionResult);return}}ta=0;for(ha=Y.length;ta!==ha;ta++){var Na=Y[ta],Qa=rB;z.vmult(W[ta],Qa);V=sB;z.vmult(ca[Na[0]],V);V.vadd(q,V);var Ma=tB;Qa.scale(-U,Ma);m.vadd(Ma,Ma);var $a=uB;Ma.vsub(V,$a);Ma=$a.dot(Qa);$a=vB;m.vsub(V,$a);if(0>Ma&&0<$a.dot(Qa)){V=
|
||
[];$a=0;for(var Da=Na.length;$a!==Da;$a++){var sb=t.get();z.vmult(ca[Na[$a]],sb);q.vadd(sb,sb);V.push(sb)}a:{$a=V;Da=Qa;sb=m;for(var Hc=null,qd=$a.length,Wc=0;Wc!==qd;Wc++){var Eb=$a[Wc],Cb=WA;$a[(Wc+1)%qd].vsub(Eb,Cb);var te=XA;Cb.cross(Da,te);Cb=YA;sb.vsub(Eb,Cb);Eb=te.dot(Cb);if(null===Hc||0<Eb&&!0===Hc||0>=Eb&&!1===Hc)null===Hc&&(Hc=0<Eb);else{$a=!1;break a}}$a=!0}if($a){if(T)return!0;h=this.createContactEquation(D,C,h,k,J,N);Qa.scale(-U,h.ri);Qa.negate(h.ni);k=t.get();Qa.scale(-Ma,k);z=t.get();
|
||
Qa.scale(-U,z);m.vsub(q,h.rj);h.rj.vadd(z,h.rj);h.rj.vadd(k,h.rj);h.rj.vadd(q,h.rj);h.rj.vsub(C.position,h.rj);h.ri.vadd(m,h.ri);h.ri.vsub(D.position,h.ri);t.release(k);t.release(z);this.result.push(h);this.createFrictionEquationsFromContact(h,this.frictionResult);m=0;for(q=V.length;m!==q;m++)t.release(V[m]);break}else for(Hc=0;Hc!==Na.length;Hc++){Qa=t.get();Ma=t.get();z.vmult(ca[Na[(Hc+1)%Na.length]],Qa);z.vmult(ca[Na[(Hc+2)%Na.length]],Ma);q.vadd(Qa,Qa);q.vadd(Ma,Ma);qd=nB;Ma.vsub(Qa,qd);sb=oB;
|
||
qd.unit(sb);$a=t.get();Da=t.get();m.vsub(Qa,Da);Wc=Da.dot(sb);sb.scale(Wc,$a);$a.vadd(Qa,$a);sb=t.get();$a.vsub(m,sb);if(0<Wc&&Wc*Wc<qd.lengthSquared()&&sb.lengthSquared()<U*U){if(T)return!0;h=this.createContactEquation(D,C,h,k,J,N);$a.vsub(q,h.rj);$a.vsub(m,h.ni);h.ni.normalize();h.ni.scale(U,h.ri);h.rj.vadd(q,h.rj);h.rj.vsub(C.position,h.rj);h.ri.vadd(m,h.ri);h.ri.vsub(D.position,h.ri);this.result.push(h);this.createFrictionEquationsFromContact(h,this.frictionResult);m=0;for(q=V.length;m!==q;m++)t.release(V[m]);
|
||
t.release(Qa);t.release(Ma);t.release($a);t.release(sb);t.release(Da);return}t.release(Qa);t.release(Ma);t.release($a);t.release(sb);t.release(Da)}Na=0;for(Qa=V.length;Na!==Qa;Na++)t.release(V[Na])}}};fb.prototype.planeConvex=function(h,k,m,q,t,z,D,C,J,N,T){var W=wB,Y=xB;Y.set(0,0,1);t.vmult(Y,Y);t=0;for(var ca=yB,U=0;U!==k.vertices.length;U++)if(W.copy(k.vertices[U]),z.vmult(W,W),q.vadd(W,W),W.vsub(m,ca),0>=Y.dot(ca)){if(T)return!0;var ha=this.createContactEquation(D,C,h,k,J,N),V=zB;Y.scale(Y.dot(ca),
|
||
V);W.vsub(V,V);V.vsub(m,ha.ri);ha.ni.copy(Y);W.vsub(q,ha.rj);ha.ri.vadd(m,ha.ri);ha.ri.vsub(D.position,ha.ri);ha.rj.vadd(q,ha.rj);ha.rj.vsub(C.position,ha.rj);this.result.push(ha);t++;this.enableFrictionReduction||this.createFrictionEquationsFromContact(ha,this.frictionResult)}this.enableFrictionReduction&&t&&this.createFrictionFromAverage(t)};fb.prototype.boxConvex=function(h,k,m,q,t,z,D,C,J,N,T){h.convexPolyhedronRepresentation.material=h.material;h.convexPolyhedronRepresentation.collisionResponse=
|
||
h.collisionResponse;return this.convexConvex(h.convexPolyhedronRepresentation,k,m,q,t,z,D,C,h,k,T)};fb.prototype.sphereHeightfield=function(h,k,m,q,t,z,D,C,J,N,T){var W=k.data,Y=h.radius,ca=k.elementSize;J=OB;var U=NB;Ab.pointToLocalFrame(q,z,m,U);var ha=Math.floor((U.x-Y)/ca)-1;N=Math.ceil((U.x+Y)/ca)+1;var V=Math.floor((U.y-Y)/ca)-1;ca=Math.ceil((U.y+Y)/ca)+1;if(!(0>N||0>ca||ha>W.length||V>W[0].length)){0>ha&&(ha=0);0>N&&(N=0);0>V&&(V=0);0>ca&&(ca=0);ha>=W.length&&(ha=W.length-1);N>=W.length&&(N=
|
||
W.length-1);ca>=W[0].length&&(ca=W[0].length-1);V>=W[0].length&&(V=W[0].length-1);W=[];k.getRectMinMax(ha,V,N,ca,W);var ta=W[0];if(!(U.z-Y>W[1]||U.z+Y<ta))for(Y=this.result;ha<N;ha++)for(U=V;U<ca;U++){W=Y.length;ta=!1;k.getConvexTrianglePillar(ha,U,!1);Ab.pointToWorldFrame(q,z,k.pillarOffset,J);m.distanceTo(J)<k.pillarConvex.boundingSphereRadius+h.boundingSphereRadius&&(ta=this.sphereConvex(h,k.pillarConvex,m,J,t,z,D,C,h,k,T));if(T&&ta)return!0;k.getConvexTrianglePillar(ha,U,!0);Ab.pointToWorldFrame(q,
|
||
z,k.pillarOffset,J);m.distanceTo(J)<k.pillarConvex.boundingSphereRadius+h.boundingSphereRadius&&(ta=this.sphereConvex(h,k.pillarConvex,m,J,t,z,D,C,h,k,T));if(T&&ta)return!0;if(2<Y.length-W)return}}};fb.prototype.boxHeightfield=function(h,k,m,q,t,z,D,C,J,N,T){h.convexPolyhedronRepresentation.material=h.material;h.convexPolyhedronRepresentation.collisionResponse=h.collisionResponse;return this.convexHeightfield(h.convexPolyhedronRepresentation,k,m,q,t,z,D,C,h,k,T)};fb.prototype.convexHeightfield=function(h,
|
||
k,m,q,t,z,D,C,J,N,T){var W=k.data,Y=k.elementSize,ca=h.boundingSphereRadius;J=LB;N=MB;var U=KB;Ab.pointToLocalFrame(q,z,m,U);var ha=Math.floor((U.x-ca)/Y)-1,V=Math.ceil((U.x+ca)/Y)+1,ta=Math.floor((U.y-ca)/Y)-1;Y=Math.ceil((U.y+ca)/Y)+1;if(!(0>V||0>Y||ha>W.length||ta>W[0].length)){0>ha&&(ha=0);0>V&&(V=0);0>ta&&(ta=0);0>Y&&(Y=0);ha>=W.length&&(ha=W.length-1);V>=W.length&&(V=W.length-1);Y>=W[0].length&&(Y=W[0].length-1);ta>=W[0].length&&(ta=W[0].length-1);W=[];k.getRectMinMax(ha,ta,V,Y,W);var Na=W[0];
|
||
if(!(U.z-ca>W[1]||U.z+ca<Na))for(ca=ha;ca<V;ca++)for(U=ta;U<Y;U++){ha=!1;k.getConvexTrianglePillar(ca,U,!1);Ab.pointToWorldFrame(q,z,k.pillarOffset,J);m.distanceTo(J)<k.pillarConvex.boundingSphereRadius+h.boundingSphereRadius&&(ha=this.convexConvex(h,k.pillarConvex,m,J,t,z,D,C,null,null,T,N,null));if(T&&ha)return!0;k.getConvexTrianglePillar(ca,U,!0);Ab.pointToWorldFrame(q,z,k.pillarOffset,J);m.distanceTo(J)<k.pillarConvex.boundingSphereRadius+h.boundingSphereRadius&&(ha=this.convexConvex(h,k.pillarConvex,
|
||
m,J,t,z,D,C,null,null,T,N,null));if(T&&ha)return!0}}};fb.prototype.sphereParticle=function(h,k,m,q,t,z,D,C,J,N,T){t=GB;t.set(0,0,1);q.vsub(m,t);if(t.lengthSquared()<=h.radius*h.radius){if(T)return!0;k=this.createContactEquation(C,D,k,h,J,N);t.normalize();k.rj.copy(t);k.rj.scale(h.radius,k.rj);k.ni.copy(t);k.ni.negate(k.ni);k.ri.set(0,0,0);this.result.push(k);this.createFrictionEquationsFromContact(k,this.frictionResult)}};fb.prototype.planeParticle=function(h,k,m,q,t,z,D,C,J,N,T){m=CB;m.set(0,0,1);
|
||
D.quaternion.vmult(m,m);t=DB;q.vsub(D.position,t);if(0>=m.dot(t)){if(T)return!0;h=this.createContactEquation(C,D,k,h,J,N);h.ni.copy(m);h.ni.negate(h.ni);h.ri.set(0,0,0);k=EB;m.scale(m.dot(q),k);q.vsub(k,k);h.rj.copy(k);this.result.push(h);this.createFrictionEquationsFromContact(h,this.frictionResult)}};fb.prototype.boxParticle=function(h,k,m,q,t,z,D,C,J,N,T){h.convexPolyhedronRepresentation.material=h.material;h.convexPolyhedronRepresentation.collisionResponse=h.collisionResponse;return this.convexParticle(h.convexPolyhedronRepresentation,
|
||
k,m,q,t,z,D,C,h,k,T)};fb.prototype.convexParticle=function(h,k,m,q,t,z,D,C,J,N,T){var W=-1;z=IB;var Y=JB,ca=null,U=HB;U.copy(q);U.vsub(m,U);t.conjugate(as);as.vmult(U,U);if(h.pointIsInside(U)){h.worldVerticesNeedsUpdate&&h.computeWorldVertices(m,t);h.worldFaceNormalsNeedsUpdate&&h.computeWorldFaceNormals(t);t=0;for(U=h.faces.length;t!==U;t++){var ha=h.worldFaceNormals[t];q.vsub(h.worldVertices[h.faces[t][0]],bs);var V=-ha.dot(bs);if(null===ca||Math.abs(V)<Math.abs(ca)){if(T)return!0;ca=V;W=t;z.copy(ha)}}-1!==
|
||
W?(h=this.createContactEquation(C,D,k,h,J,N),z.scale(ca,Y),Y.vadd(q,Y),Y.vsub(m,Y),h.rj.copy(Y),z.negate(h.ni),h.ri.set(0,0,0),k=h.ri,J=h.rj,k.vadd(q,k),k.vsub(C.position,k),J.vadd(m,J),J.vsub(D.position,J),this.result.push(h),this.createFrictionEquationsFromContact(h,this.frictionResult)):console.warn("Point found inside convex, but did not find penetrating face!")}};fb.prototype.heightfieldCylinder=function(h,k,m,q,t,z,D,C,J,N,T){return this.convexHeightfield(k,h,q,m,z,t,C,D,J,N,T)};fb.prototype.particleCylinder=
|
||
function(h,k,m,q,t,z,D,C,J,N,T){return this.convexParticle(k,h,q,m,z,t,C,D,J,N,T)};fb.prototype.sphereTrimesh=function(h,k,m,q,t,z,D,C,J,N,T){var W=LA,Y=MA,ca=NA,U=OA;t=PA;var ha=QA,V=UA,ta=KA,Na=IA,Qa=VA;Ab.pointToLocalFrame(q,z,m,t);var Ma=h.radius;V.lowerBound.set(t.x-Ma,t.y-Ma,t.z-Ma);V.upperBound.set(t.x+Ma,t.y+Ma,t.z+Ma);k.getTrianglesInAABB(V,Qa);V=JA;Ma=h.radius*h.radius;for(var $a=0;$a<Qa.length;$a++)for(var Da=0;3>Da;Da++)if(k.getVertex(k.indices[3*Qa[$a]+Da],V),V.vsub(t,Na),Na.lengthSquared()<=
|
||
Ma){ta.copy(V);Ab.pointToWorldFrame(q,z,ta,V);V.vsub(m,Na);if(T)return!0;var sb=this.createContactEquation(D,C,h,k,J,N);sb.ni.copy(Na);sb.ni.normalize();sb.ri.copy(sb.ni);sb.ri.scale(h.radius,sb.ri);sb.ri.vadd(m,sb.ri);sb.ri.vsub(D.position,sb.ri);sb.rj.copy(V);sb.rj.vsub(C.position,sb.rj);this.result.push(sb);this.createFrictionEquationsFromContact(sb,this.frictionResult)}for(ta=0;ta<Qa.length;ta++)for(Na=0;3>Na;Na++)if(k.getVertex(k.indices[3*Qa[ta]+Na],W),k.getVertex(k.indices[3*Qa[ta]+(Na+1)%
|
||
3],Y),Y.vsub(W,ca),t.vsub(Y,ha),V=ha.dot(ca),t.vsub(W,ha),Ma=ha.dot(ca),0<Ma&&0>V&&(t.vsub(W,ha),U.copy(ca),U.normalize(),Ma=ha.dot(U),U.scale(Ma,ha),ha.vadd(W,ha),ha.distanceTo(t)<h.radius)){if(T)return!0;V=this.createContactEquation(D,C,h,k,J,N);ha.vsub(t,V.ni);V.ni.normalize();V.ni.scale(h.radius,V.ri);V.ri.vadd(m,V.ri);V.ri.vsub(D.position,V.ri);Ab.pointToWorldFrame(q,z,ha,ha);ha.vsub(C.position,V.rj);Ab.vectorToWorldFrame(z,V.ni,V.ni);Ab.vectorToWorldFrame(z,V.ri,V.ri);this.result.push(V);this.createFrictionEquationsFromContact(V,
|
||
this.frictionResult)}W=RA;Y=SA;ca=TA;U=HA;ta=0;for(Na=Qa.length;ta!==Na;ta++)if(k.getTriangleVertices(Qa[ta],W,Y,ca),k.getNormal(Qa[ta],U),t.vsub(W,ha),V=ha.dot(U),U.scale(V,ha),t.vsub(ha,ha),V=ha.distanceTo(t),pd.pointInTriangle(ha,W,Y,ca)&&V<h.radius){if(T)return!0;V=this.createContactEquation(D,C,h,k,J,N);ha.vsub(t,V.ni);V.ni.normalize();V.ni.scale(h.radius,V.ri);V.ri.vadd(m,V.ri);V.ri.vsub(D.position,V.ri);Ab.pointToWorldFrame(q,z,ha,ha);ha.vsub(C.position,V.rj);Ab.vectorToWorldFrame(z,V.ni,V.ni);
|
||
Ab.vectorToWorldFrame(z,V.ri,V.ri);this.result.push(V);this.createFrictionEquationsFromContact(V,this.frictionResult)}Qa.length=0};fb.prototype.planeTrimesh=function(h,k,m,q,t,z,D,C,J,N,T){var W=new F,Y=EA;Y.set(0,0,1);t.vmult(Y,Y);for(t=0;t<k.vertices.length/3;t++){k.getVertex(t,W);var ca=new F;ca.copy(W);Ab.pointToWorldFrame(q,z,ca,W);ca=FA;W.vsub(m,ca);if(0>=Y.dot(ca)){if(T)return!0;var U=this.createContactEquation(D,C,h,k,J,N);U.ni.copy(Y);var ha=GA;Y.scale(ca.dot(Y),ha);W.vsub(ha,ha);U.ri.copy(ha);
|
||
U.ri.vsub(D.position,U.ri);U.rj.copy(W);U.rj.vsub(C.position,U.rj);this.result.push(U);this.createFrictionEquationsFromContact(U,this.frictionResult)}}};Lg=new F;Qh=new F;Rh=new F;zA=new F;AA=new F;BA=new Nd;CA=new Nd;qn=function(){this.array=[];this.length=0};qn.prototype.push=function(h,k,m){var q=this.array[this.length++];q?(q.point=h,q.normal=k,q.depth=m):this.array[this.length-1]={point:h,normal:k,depth:m}};qn.prototype.reset=function(){this.length=0;return this};DA=new qn;EA=new F;FA=new F;
|
||
GA=new F;HA=new F;IA=new F;new F;JA=new F;KA=new F;LA=new F;MA=new F;NA=new F;OA=new F;PA=new F;QA=new F;RA=new F;SA=new F;TA=new F;UA=new jc;VA=[];Tk=new F;$r=new F;WA=new F;XA=new F;YA=new F;Uk=new F;ZA=new F;$A=new F;aB=new F;bB=[new F,new F,new F,new F,new F,new F];cB=new F;dB=new F;eB=new F;fB=new F;gB=new F;hB=new F;iB=new F;jB=new F;kB=new F;lB=new F;mB=new F;nB=new F;oB=new F;pB=new F;qB=new F;rB=new F;sB=new F;tB=new F;uB=new F;vB=new F;wB=new F;xB=new F;yB=new F;zB=new F;AB=new F;BB=new F;
|
||
CB=new F;DB=new F;EB=new F;GB=new F;as=new Nd;HB=new F;IB=new F;bs=new F;JB=new F;KB=new F;LB=new F;MB=[0];NB=new F;OB=new F;Sh=function(){this.current=[];this.previous=[]};Sh.prototype.getKey=function(h,k){if(k<h){var m=k;k=h;h=m}return h<<16|k};Sh.prototype.set=function(h,k){h=this.getKey(h,k);k=this.current;for(var m=0;h>k[m];)m++;if(h!==k[m]){for(var q=k.length-1;q>=m;q--)k[q+1]=k[q];k[m]=h}};Sh.prototype.tick=function(){var h=this.current;this.current=this.previous;this.previous=h;this.current.length=
|
||
0};Sh.prototype.getDiff=function(h,k){for(var m=this.current,q=this.previous,t=m.length,z=q.length,D=0,C=0;C<t;C++){for(var J=m[C];J>q[D];)D++;J===q[D]||h.push((J&4294901760)>>16,J&65535)}for(h=D=0;h<z;h++){for(t=q[h];t>m[D];)D++;m[D]===t||k.push((t&4294901760)>>16,t&65535)}};rn=function(h,k){return h<k?h+"-"+k:k+"-"+h};kj=function(){this.data={keys:[]}};kj.prototype.get=function(h,k){h=rn(h,k);return this.data[h]};kj.prototype.set=function(h,k,m){var q=rn(h,k);this.get(h,k)||this.data.keys.push(q);
|
||
this.data[q]=m};kj.prototype.delete=function(h,k){h=rn(h,k);k=this.data.keys.indexOf(h);-1!==k&&this.data.keys.splice(k,1);delete this.data[h]};kj.prototype.reset=function(){for(var h=this.data,k=h.keys;0<k.length;){var m=k.pop();delete h[m]}};Bc=function(h){void 0===h&&(h={});var k=gf.call(this)||this;k.dt=-1;k.allowSleep=!!h.allowSleep;k.contacts=[];k.contactEquationsPool=[];k.frictionEquations=[];k.frictionEquationsPool=[];k.quatNormalizeSkip=void 0!==h.quatNormalizeSkip?h.quatNormalizeSkip:0;
|
||
k.quatNormalizeFast=void 0!==h.quatNormalizeFast?h.quatNormalizeFast:!1;k.time=0;k.stepnumber=0;k.default_dt=1/60;k.nextId=0;k.gravity=new F;h.gravity&&k.gravity.copy(h.gravity);h.frictionGravity&&(k.frictionGravity=new F,k.frictionGravity.copy(h.frictionGravity));k.broadphase=void 0!==h.broadphase?h.broadphase:new Mk;k.bodies=[];k.hasActiveBodies=!1;k.solver=void 0!==h.solver?h.solver:new on;k.constraints=[];k.narrowphase=new fb(k);k.collisionMatrix=new Lh;k.collisionMatrixPrevious=new Lh;k.bodyOverlapKeeper=
|
||
new Sh;k.shapeOverlapKeeper=new Sh;k.contactmaterials=[];k.contactMaterialTable=new kj;k.defaultMaterial=new Rr("default");k.defaultContactMaterial=new Qr(k.defaultMaterial,k.defaultMaterial,{friction:.3,restitution:0});k.doProfiling=!1;k.profile={solve:0,makeContactConstraints:0,broadphase:0,integrate:0,narrowphase:0};k.accumulator=0;k.subsystems=[];k.addBodyEvent={type:"addBody",body:null};k.removeBodyEvent={type:"removeBody",body:null};k.idToBodyMap={};k.broadphase.setWorld(k);return k};$jscomp.inherits(Bc,
|
||
gf);Bc.prototype.getContactMaterial=function(h,k){return this.contactMaterialTable.get(h.id,k.id)};Bc.prototype.collisionMatrixTick=function(){var h=this.collisionMatrixPrevious;this.collisionMatrixPrevious=this.collisionMatrix;this.collisionMatrix=h;this.collisionMatrix.reset();this.bodyOverlapKeeper.tick();this.shapeOverlapKeeper.tick()};Bc.prototype.addConstraint=function(h){this.constraints.push(h)};Bc.prototype.removeConstraint=function(h){h=this.constraints.indexOf(h);-1!==h&&this.constraints.splice(h,
|
||
1)};Bc.prototype.rayTest=function(h,k,m){m instanceof Uf?this.raycastClosest(h,k,{skipBackfaces:!0},m):this.raycastAll(h,k,{skipBackfaces:!0},m)};Bc.prototype.raycastAll=function(h,k,m,q){void 0===m&&(m={});m.mode=pd.ALL;m.from=h;m.to=k;m.callback=q;return sn.intersectWorld(this,m)};Bc.prototype.raycastAny=function(h,k,m,q){void 0===m&&(m={});m.mode=pd.ANY;m.from=h;m.to=k;m.result=q;return sn.intersectWorld(this,m)};Bc.prototype.raycastClosest=function(h,k,m,q){void 0===m&&(m={});m.mode=pd.CLOSEST;
|
||
m.from=h;m.to=k;m.result=q;return sn.intersectWorld(this,m)};Bc.prototype.addBody=function(h){var k=this.bodies;k.includes(h)||(h.index=k.length,k.push(h),h.world=this,h.timeLastSleepy=this.time,this.collisionMatrix.setNumObjects(this.bodies.length),this.addBodyEvent.body=h,this.idToBodyMap[h.id]=h,this.dispatchEvent(this.addBodyEvent))};Bc.prototype.removeBody=function(h){var k=h.index;if(-1!==k){h.world=null;h.index=-1;var m=this.bodies,q=m.length-1;q!==k&&((m[k]=m[q]).index=k);m.length=q;this.collisionMatrix.setNumObjects(q);
|
||
this.removeBodyEvent.body=h;this.idToBodyMap[h.id]=void 0;this.dispatchEvent(this.removeBodyEvent)}};Bc.prototype.getBodyById=function(h){return this.idToBodyMap[h]};Bc.prototype.getShapeById=function(h){for(var k=this.bodies,m=0;m<k.length;m++)for(var q=k[m].shapes,t=0;t<q.length;t++){var z=q[t];if(z.id===h)return z}return null};Bc.prototype.addContactMaterial=function(h){this.contactmaterials.push(h);this.contactMaterialTable.set(h.materials[0].id,h.materials[1].id,h)};Bc.prototype.removeContactMaterial=
|
||
function(h){var k=this.contactmaterials.indexOf(h);-1!==k&&(this.contactmaterials.splice(k,1),this.contactMaterialTable.delete(h.materials[0].id,h.materials[1].id))};Bc.prototype.fixedStep=function(h,k){void 0===h&&(h=1/60);void 0===k&&(k=10);var m=Pc.now()/1E3;this.lastCallTime?this.step(h,m-this.lastCallTime,k):this.step(h,void 0,k);this.lastCallTime=m};Bc.prototype.step=function(h,k,m){void 0===m&&(m=10);if(void 0===k)this.internalStep(h),this.time+=h;else{this.accumulator+=k;for(var q=Pc.now(),
|
||
t=0;this.accumulator>=h&&t<m&&!(this.internalStep(h),this.accumulator-=h,t++,Pc.now()-q>1E3*h););this.accumulator%=h;this.time+=k}};Bc.prototype.internalStep=function(h){this.dt=h;var k=this.contacts,m=RB,q=SB,t=this.bodies,z=t.length,D=this.solver,C=this.gravity,J=this.doProfiling,N=this.profile,T=xb.DYNAMIC,W=-Infinity,Y=this.constraints,ca=this.frictionEquationsPool;C.length();var U=C.x,ha=C.y,V=C.z;J&&(W=Pc.now());for(C=0;C!==z;C++){var ta=t[C];if(ta.type===T){var Na=ta.force;ta=ta.mass;Na.x+=
|
||
ta*U;Na.y+=ta*ha;Na.z+=ta*V}}C=0;for(U=this.subsystems.length;C!==U;C++)this.subsystems[C].update();J&&(W=Pc.now());m.length=0;q.length=0;this.broadphase.collisionPairs(this,m,q);J&&(N.broadphase=Pc.now()-W);U=Y.length;for(C=0;C<U;C++)if(ha=Y[C],!ha.collideConnected)for(V=m.length-1;0<=V;--V)if(ha.bodyA===m[V]&&ha.bodyB===q[V]||ha.bodyB===m[V]&&ha.bodyA===q[V])m.splice(V,1),q.splice(V,1);this.collisionMatrixTick();J&&(W=Pc.now());ha=this.contactEquationsPool;U=k.length;for(C=0;C<U;C++)ha.push(k[C]);
|
||
k.length=0;U=this.frictionEquations;V=U.length;for(C=0;C<V;C++)ca.push(U[C]);this.frictionEquations.length=0;this.narrowphase.getContacts(m,q,this,k,ha,U,ca);J&&(N.narrowphase=Pc.now()-W);J&&(W=Pc.now());C=0;for(m=U.length;C<m;C++)D.addEquation(U[C]);C=k.length;for(m=0;m<C;m++)q=k[m],ca=q.bi,U=q.bj,ha=q.si,V=q.sj,Na=ca.material&&U.material?this.getContactMaterial(ca.material,U.material)||this.defaultContactMaterial:this.defaultContactMaterial,Na.friction,ca.material&&U.material&&(0<=ca.material.friction&&
|
||
0<=U.material.friction&&ca.material.friction*U.material.friction,0<=ca.material.restitution&&0<=U.material.restitution&&(q.restitution=ca.material.restitution*U.material.restitution)),D.addEquation(q),ca.allowSleep&&ca.type===xb.DYNAMIC&&ca.sleepState===xb.SLEEPING&&U.sleepState===xb.AWAKE&&U.type!==xb.STATIC&&!U.isTrigger&&(Na=U.velocity.lengthSquared()+U.angularVelocity.lengthSquared(),ta=Ad(U.sleepSpeedLimit,2),Na>=2*ta&&(ca.wakeUpAfterNarrowphase=!0)),U.allowSleep&&U.type===xb.DYNAMIC&&U.sleepState===
|
||
xb.SLEEPING&&ca.sleepState===xb.AWAKE&&ca.type!==xb.STATIC&&!ca.isTrigger&&(Na=ca.velocity.lengthSquared()+ca.angularVelocity.lengthSquared(),ta=Ad(ca.sleepSpeedLimit,2),Na>=2*ta&&(U.wakeUpAfterNarrowphase=!0)),this.collisionMatrix.set(ca,U,!0),this.collisionMatrixPrevious.get(ca,U)||(lj.body=U,lj.contact=q,ca.dispatchEvent(lj),lj.body=ca,U.dispatchEvent(lj)),this.bodyOverlapKeeper.set(ca.id,U.id),this.shapeOverlapKeeper.set(ha.id,V.id);this.emitContactEvents();J&&(N.makeContactConstraints=Pc.now()-
|
||
W,W=Pc.now());for(C=0;C!==z;C++)k=t[C],k.wakeUpAfterNarrowphase&&(k.wakeUp(),k.wakeUpAfterNarrowphase=!1);U=Y.length;for(C=0;C!==U;C++)for(k=Y[C],k.update(),m=0,q=k.equations.length;m!==q;m++)D.addEquation(k.equations[m]);D.solve(h,this);J&&(N.solve=Pc.now()-W);D.removeAllEquations();D=Math.pow;for(C=0;C!==z;C++)if(Y=t[C],Y.type&T&&(k=D(1-Y.linearDamping,h),m=Y.velocity,m.scale(k,m),k=Y.angularVelocity))Y=D(1-Y.angularDamping,h),k.scale(Y,k);this.dispatchEvent(QB);J&&(W=Pc.now());T=0===this.stepnumber%
|
||
(this.quatNormalizeSkip+1);D=this.quatNormalizeFast;for(C=0;C!==z;C++)t[C].integrate(h,T,D);this.clearForces();this.broadphase.dirty=!0;J&&(N.integrate=Pc.now()-W);this.stepnumber+=1;this.dispatchEvent(PB);h=!0;if(this.allowSleep)for(h=!1,C=0;C!==z;C++)J=t[C],J.sleepTick(this.time),J.sleepState!==xb.SLEEPING&&(h=!0);this.hasActiveBodies=h};Bc.prototype.emitContactEvents=function(){var h=this.hasAnyEventListener("beginContact"),k=this.hasAnyEventListener("endContact");(h||k)&&this.bodyOverlapKeeper.getDiff(hf,
|
||
jf);if(h){h=0;for(var m=hf.length;h<m;h+=2)mj.bodyA=this.getBodyById(hf[h]),mj.bodyB=this.getBodyById(hf[h+1]),this.dispatchEvent(mj);mj.bodyA=mj.bodyB=null}if(k){k=0;for(h=jf.length;k<h;k+=2)nj.bodyA=this.getBodyById(jf[k]),nj.bodyB=this.getBodyById(jf[k+1]),this.dispatchEvent(nj);nj.bodyA=nj.bodyB=null}hf.length=jf.length=0;h=this.hasAnyEventListener("beginShapeContact");k=this.hasAnyEventListener("endShapeContact");(h||k)&&this.shapeOverlapKeeper.getDiff(hf,jf);if(h){h=0;for(m=hf.length;h<m;h+=
|
||
2){var q=this.getShapeById(hf[h]),t=this.getShapeById(hf[h+1]);kf.shapeA=q;kf.shapeB=t;q&&(kf.bodyA=q.body);t&&(kf.bodyB=t.body);this.dispatchEvent(kf)}kf.bodyA=kf.bodyB=kf.shapeA=kf.shapeB=null}if(k){k=0;for(h=jf.length;k<h;k+=2)m=this.getShapeById(jf[k]),q=this.getShapeById(jf[k+1]),lf.shapeA=m,lf.shapeB=q,m&&(lf.bodyA=m.body),q&&(lf.bodyB=q.body),this.dispatchEvent(lf);lf.bodyA=lf.bodyB=lf.shapeA=lf.shapeB=null}};Bc.prototype.clearForces=function(){for(var h=this.bodies,k=h.length,m=0;m!==k;m++){var q=
|
||
h[m];q.force;q.torque;q.force.set(0,0,0);q.torque.set(0,0,0)}};new jc;sn=new pd;Pc=window.performance||{};if(!Pc.now){var Qb=Date.now();Pc.timing&&Pc.timing.navigationStart&&(Qb=Pc.timing.navigationStart);Pc.now=function(){return Date.now()-Qb}}new F;PB={type:"postStep"};QB={type:"preStep"};lj={type:xb.COLLIDE_EVENT_NAME,body:null,contact:null};RB=[];SB=[];hf=[];jf=[];mj={type:"beginContact",bodyA:null,bodyB:null};nj={type:"endContact",bodyA:null,bodyB:null};kf={type:"beginShapeContact",bodyA:null,
|
||
bodyB:null,shapeA:null,shapeB:null};lf={type:"endShapeContact",bodyA:null,bodyB:null,shapeA:null,shapeB:null}},TB)),UB={};Yx((UB["build/js/game.js.tmp.js"]=function(v,x){function G(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}function L(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if("number"==typeof a.length)return{next:G(a)};throw Error(String(a)+" is not an iterable or ArrayLike");}function K(a,b){if(b)a:{var c=
|
||
Db;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&tn(c,a,{configurable:!0,writable:!0,value:b})}}function u(a,b){a.prototype=yK(b.prototype);a.prototype.constructor=a;if(VB)VB(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.kp=b.prototype}function P(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-
|
||
a]=arguments[c];return b}function aa(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}function da(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}function ba(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function wa(a){return a?a:Array.prototype.fill}function Ga(a,b){b=Error.call(this,b);this.message=b.message;
|
||
"stack"in b&&(this.stack=b.stack);this.code=a}function za(){var a=P.apply(0,arguments).slice();if(0<a.length){var b=a[0];if(b instanceof Error)b=b.toString();else if("object"===typeof b)try{b=JSON.stringify(b)}catch(c){}a[0]=b}"undefined"!==typeof console&&console.log&&("object"===typeof console.log?console.log(a.join(", ")):console.log.apply(console,a),WB.push(a.join(", ")))}function pc(){return(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)===
|
||
document.documentElement}function zd(){return window.innerWidth||(document.documentElement?document.documentElement.clientWidth:0)||(document.body?document.body.clientWidth:0)}function Kb(){return window.innerHeight||(document.documentElement?document.documentElement.clientHeight:0)||(document.body?document.body.clientHeight:0)}function ub(a,b,c){var d=(((window.screen?window.screen.left:0)||window.screenLeft||window.screenX)+(document.documentElement?document.documentElement.clientLeft:0)||(document.body?
|
||
document.body.clientLeft:0))+Math.round((zd()-b)/2),e=(((window.screen?window.screen.top:0)||window.screenTop||window.screenY)+(document.documentElement?document.documentElement.clientTop:0)||(document.body?document.body.clientTop:0))+Math.round((Kb()-c)/2);try{window.open(a,"intent","scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,status=no,width="+b+",height="+c+",left="+d+",top="+e)}catch(f){}}function Qb(a,b,c,d){b=void 0===b?"GET":b;c=void 0===c?{}:c;d=void 0===d?0:d;return new Promise(function(e,
|
||
f){try{var g=new ActiveXObject("Msxml2.XMLHTTP")}catch(w){try{g=new ActiveXObject("Microsoft.XMLHTTP")}catch(y){g=!1}}!g&&window.XMLHttpRequest&&(g=new XMLHttpRequest);if(g){g.open(b,a,!0);var l=-1;g.onreadystatechange=function(){4===g.readyState&&(-1!==l&&(window.clearTimeout(l),l=-1),200===g.status?e(g.responseText):f(new XB(g.status,"Loading ["+a+"] "+g.status+" ("+(g.statusText||g.responseText)+")")))};0<d&&(l=window.setTimeout(function(){g.onreadystatechange=null;g.abort();window.clearTimeout(l);
|
||
l=-1;f(Error("Loading ["+a+"] timeout"))},1E3*d));var n=[],r;for(r in c)n.push(encodeURIComponent(r)+"="+encodeURIComponent(c[r]));g.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=utf-8");g.send(n.join("&").replace(/%20/g,"+"))}else f(Error("Loading ["+a+"] no XHR"))})}function h(a){a=un["com.gemioli."+a];return void 0===a||null===a?!1:0!==parseInt(a,10)}function k(){var a=un["com.gemioli.god_friends_limit"];return void 0===a||null===a?30:parseInt(a,10)}function m(a,b){a=
|
||
un["com.gemioli."+a];return void 0===a||null===a?b:a}function q(a){for(var b=5381,c=0,d=a.length;c<d;++c)b=(b<<5)+b+a.charCodeAt(c),b&=4294967295;return b}function t(a){if(window.navigator&&window.navigator.clipboard&&window.navigator.clipboard.writeText)window.navigator.clipboard.writeText(a).catch(function(c){za("Oops, unable to copy text: "+c)});else{var b=document.createElement("textarea");b.style.position="fixed";b.style.top="0";b.style.left="0";b.style.width="2em";b.style.height="2em";b.style.padding=
|
||
"0";b.style.border="none";b.style.outline="none";b.style.boxShadow="none";b.style.background="transparent";b.value=a;document.body.appendChild(b);b.focus();b.select();try{document.execCommand("copy")}catch(c){za("Oops, unable to copy text")}document.body.removeChild(b)}}function z(){var a=(new Date).getTime(),b=window.performance&&performance.now&&1E3*performance.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(c){var d=16*Math.random();0<a?(d=(a+d)%16|0,a=Math.floor(a/
|
||
16)):(d=(b+d)%16|0,b=Math.floor(b/16));return("x"==c?d:d&7|8).toString(16)})}function D(a,b){var c=a.length,d=arguments.length-2;if(0<d){if(b<c){c-=b;for(var e=b+d+c-1,f=b+c-1;0<c;--c)a[e--]=a[f--]}c=0;e=b;for(f=2;c<d;++c)a[e++]=arguments[f++]}}function C(a,b){var c=a.length;b<c&&(b!==--c&&(a[b]=a[c]),a.length=c)}function J(a,b){for(var c=a.length,d=0;d<c;++d)if(a[d]===b){d!==--c&&(a[d]=a[c]);a.length=c;break}}function N(a,b){var c=a.length;if(0===c)return[];for(var d=Array(c-1),e=0,f=0;e<c;++e)e!==
|
||
b&&(d[f++]=a[e]);return d}function T(a,b){var c=a.length;if(0===c)return[];for(var d=Array(c-1),e=0,f=0;e<c;++e)a[e]!==b&&(d[f++]=a[e]);return d}function W(a,b,c,d){d=void 0===d?a.length:d;for(c=void 0===c?0:c;c<d;++c)a[c]=b;return a}function Y(a){return a instanceof YB||a instanceof ZB||a instanceof zK||a instanceof Th||a instanceof cs||a instanceof Pd}function ca(a,b,c,d){for(;b<c;){var e=a[b+c>>1],f=b,g=c;do{for(;0>d(a[f],e);)++f;for(;0<d(a[g],e);)--g;if(f<=g){var l=a[f];a[f]=a[g];a[g]=l;++f;--g}}while(f<=
|
||
g);g-b<c-f?(ca(a,b,g,d),b=f):(ca(a,f,c,d),c=g)}}function U(a){return a[Math.floor(2147483647*Math.random())%a.length]}function ha(a){for(var b=0,c=a.length,d,e;b<c;++b)e=Math.floor(Math.random()*c),d=a[b],a[b]=a[e],a[e]=d}function V(a){if(a){var b=a.lastIndexOf("/"),c=a.lastIndexOf("\\");return b<c?0<c?a.substring(0,c):"":c<b?0<b?a.substring(0,b):"":""}return""}function ta(a){if(a){var b=a.lastIndexOf("/"),c=a.lastIndexOf("\\");b<c?a=a.substring(c+1):c<b&&(a=a.substring(b+1));b=a.indexOf("?");-1!==
|
||
b&&(a=a.substring(0,b));b=a.lastIndexOf(".");return-1!==b?a.substring(b+1):""}return""}function Na(a){if(a){var b=a.lastIndexOf("/"),c=a.lastIndexOf("\\");b<c?a=a.substring(c+1):c<b&&(a=a.substring(b+1));b=a.indexOf("?");-1!==b&&(a=a.substring(0,b));return a}return""}function Qa(a,b){b=void 0===b?NaN:b;return AK.test(a)?Number(a):b}function Ma(a,b){b=void 0===b?NaN:b;return BK.test(a)?Number(a):b}function $a(a,b){return 0!==Qa(a,(void 0===b?0:b)?1:0)}function Da(a,b,c){return a<b?b:a>c?c:a}function sb(a,
|
||
b,c){return(b-a)*c+a}function Hc(a){return a*(2-a)}function qd(a){--a;return a*a*a+1}function Wc(a){return a*a*a*a}function Eb(a){var b=void 0===b?1.70158:b;return a*a*((b+1)*a-b)}function Cb(a){var b=void 0===b?1.70158:b;--a;return a*a*((b+1)*a+b)+1}function te(a,b,c,d,e){b=.5*(d-b);e=.5*(e-c);var f=a*a;return c+b*a+(-3*c+3*d-2*b-e)*f+(2*c-2*d+b+e)*f*a}function kb(a,b){this.x=void 0===a?0:a;this.y=void 0===b?0:b}function Uh(a,b,c,d){d=void 0===d?a:d;d.x=a.x+b.x*c;d.y=a.y+b.y*c;return d}function ds(a,
|
||
b){b=void 0===b?a:b;var c=a.x;b.x=-a.y;b.y=c;return b}function E(a,b,c){this.x=void 0===a?0:a;this.y=void 0===b?0:b;this.z=void 0===c?0:c}function es(a,b,c){var d=c.x-b.x,e=c.y-b.y,f=c.z-b.z,g=a.x-b.x,l=a.y-b.y,n=a.z-b.z,r=d*g+e*l+f*n;if(0>=r)return Math.sqrt(g*g+l*l+n*n);g=a.x-c.x;l=a.y-c.y;c=a.z-c.z;if(0<=d*g+e*l+f*c)return Math.sqrt(g*g+l*l+c*c);c=1/Math.sqrt(d*d+e*e+f*f);r=r*c*c;d=d*r+b.x-a.x;e=e*r+b.y-a.y;a=f*r+b.z-a.z;return Math.sqrt(d*d+e*e+a*a)}function vn(a,b,c,d,e){var f=void 0===f?a:f;
|
||
e=Math.max(void 0===e?.1:e,1E-4);e=2/e;var g=e*d;g=1/(1+g+.48*g*g+.235*g*g*g);var l=a.x-b.x,n=a.y-b.y;a=a.z-b.z;var r=(c.x+e*l)*d,w=(c.y+e*n)*d;d*=c.z+e*a;c.x=(c.x-e*r)*g;c.y=(c.y-e*w)*g;c.z=(c.z-e*d)*g;f.x=b.x+(l+r)*g;f.y=b.y+(n+w)*g;f.z=b.z+(a+d)*g;return f}function oj(a){return new E(a[0],a[1],a[2])}function dc(a,b,c,d){this.x=void 0===a?0:a;this.y=void 0===b?0:b;this.z=void 0===c?0:c;this.w=void 0===d?0:d}function fs(a,b,c,d,e){return a.x===b&&a.y===c&&a.z===d&&a.w===e}function Oe(a,b,c,d,e,f){this.a=
|
||
void 0===a?1:a;this.b=void 0===b?0:b;this.c=void 0===c?0:c;this.d=void 0===d?1:d;this.ub=void 0===e?0:e;this.vb=void 0===f?0:f}function Tb(a){a=void 0===a?gs.elements:a;this.elements=new Pd(a)}function $B(a,b,c,d){var e=a.elements,f=b.elements;b=e[0];a=e[1];var g=e[2],l=e[3],n=e[4],r=e[5],w=e[6],y=e[7],A=e[8],H=e[9],I=e[10],O=e[11],S=e[12],R=e[13],ja=e[14];e=e[15];var ka=f[0],ea=f[1],ma=f[2],pa=f[3],va=f[4],Ka=f[5],Aa=f[6],Fa=f[7],xa=f[8],Ja=f[9],La=f[10],Ha=f[11],Gb=f[12],qc=f[13],Nb=f[14];f=f[15];
|
||
c[d++]=b*ka+n*ea+A*ma+S*pa;c[d++]=a*ka+r*ea+H*ma+R*pa;c[d++]=g*ka+w*ea+I*ma+ja*pa;c[d++]=l*ka+y*ea+O*ma+e*pa;c[d++]=b*va+n*Ka+A*Aa+S*Fa;c[d++]=a*va+r*Ka+H*Aa+R*Fa;c[d++]=g*va+w*Ka+I*Aa+ja*Fa;c[d++]=l*va+y*Ka+O*Aa+e*Fa;c[d++]=b*xa+n*Ja+A*La+S*Ha;c[d++]=a*xa+r*Ja+H*La+R*Ha;c[d++]=g*xa+w*Ja+I*La+ja*Ha;c[d++]=l*xa+y*Ja+O*La+e*Ha;c[d++]=b*Gb+n*qc+A*Nb+S*f;c[d++]=a*Gb+r*qc+H*Nb+R*f;c[d++]=g*Gb+w*qc+I*Nb+ja*f;c[d++]=l*Gb+y*qc+O*Nb+e*f}function Vh(a,b){var c=void 0===c?b:c,d=b.x,e=b.y,f=b.z;b=b.w;a=a.elements;
|
||
c.x=a[0]*d+a[4]*e+a[8]*f+a[12]*b;c.y=a[1]*d+a[5]*e+a[9]*f+a[13]*b;c.z=a[2]*d+a[6]*e+a[10]*f+a[14]*b;c.w=a[3]*d+a[7]*e+a[11]*f+a[15]*b;return c}function aC(a,b,c){c=void 0===c?b:c;var d=b.x,e=b.y;b=b.z;a=a.elements;var f=1/(a[3]*d+a[7]*e+a[11]*b+a[15]);c.x=(a[0]*d+a[4]*e+a[8]*b+a[12])*f;c.y=(a[1]*d+a[5]*e+a[9]*b+a[13])*f;c.z=(a[2]*d+a[6]*e+a[10]*b+a[14])*f;return c}function bC(a,b,c,d,e,f,g){var l=2*f,n=c-b,r=e-d,w=1/(f-g),y=a.elements;y[0]=l/n;y[1]=0;y[2]=0;y[3]=0;y[4]=0;y[5]=l/r;y[6]=0;y[7]=0;y[8]=
|
||
(c+b)/n;y[9]=(e+d)/r;y[10]=(f+g)*w;y[11]=-1;y[12]=0;y[13]=0;y[14]=2*g*f*w;y[15]=0;return a}function Ic(a,b,c,d){this.x=void 0===a?0:a;this.y=void 0===b?0:b;this.z=void 0===c?0:c;this.w=void 0===d?1:d}function pj(a,b,c){c/=2;var d=Math.sin(c);a.x=b.x*d;a.y=b.y*d;a.z=b.z*d;a.w=Math.cos(c);return a}function hs(a){return new Ic(a[0],a[1],a[2],a[3])}function kc(a,b,c,d){dc.call(this,void 0===a?0:a,void 0===b?0:b,void 0===c?0:c,void 0===d?0:d)}function wn(a,b){a.w=(b>>24&255)/255;a.x=(b>>16&255)/255;a.y=
|
||
(b>>8&255)/255;a.z=(b&255)/255}function xn(a){return new kc((a>>16&255)/255,(a>>8&255)/255,(a&255)/255,(a>>24&255)/255)}function Xb(a,b,c,d){dc.call(this,void 0===a?0:a,void 0===b?0:b,void 0===c?0:c,void 0===d?0:d)}function qj(a,b,c,d,e,f){this.min=new E(void 0===a?0:a,void 0===b?0:b,void 0===c?0:c);this.max=new E(void 0===d?0:d,void 0===e?0:e,void 0===f?0:f)}function is(a,b,c){return(void 0===c?b:c).copy(b).Dk(a.min,a.max)}function rj(a,b){this.V=new E(void 0===a?0:a,void 0===b?0:b,0);this.radius=
|
||
0}function js(a,b,c,d,e,f){a=void 0===a?new ce:a;b=void 0===b?new ce:b;c=void 0===c?new ce:c;d=void 0===d?new ce:d;e=void 0===e?new ce:e;f=void 0===f?new ce:f;this.Ce=[a,b,c,d,e,f]}function ce(a,b,c,d){this.$b=new E(void 0===a?0:a,void 0===b?0:b,void 0===c?1:c);this.ea=void 0===d?0:d}function CK(a){var b=ks,c=ls,d=b.start;b=b.end.sub(d,DK);var e=a.$b,f=e.dot(b);if(0===f)return 0===a.Ne(d)?(c.copy(d),!0):!1;a=-(d.dot(e)+a.ea)/f;if(0>a||1<=a)return!1;c.copy(b).scale(a).add(d);return!0}function yn(a,
|
||
b){a=void 0===a?new E:a;b=void 0===b?new E:b;this.start=a;this.end=b}function zn(a){a=void 0===a?cC:a;this.g=Math.max(a,1);this.j=null;this.M=this.g}function An(a){a=void 0===a?cC:a;this.g=Math.max(a,1);this.j=null;this.M=this.g}function yb(a,b){a=void 0===a?0:a;b=void 0===b?0:b;zn.call(this);this.keys=[];if(Array.isArray(a)){b=0;for(var c=a.length,d=this.keys,e;b<c;++b)e=a[b],Array.isArray(e)?d.push({time:e[0],value:e[1],fb:e[2]||0}):d.push({time:b/(1===c?1:c-1),value:e,fb:0})}else this.keys.push({time:0,
|
||
value:a,fb:b})}function sj(a,b){a=a.keys;var c=a.length;switch(c){case 0:return 0;case 1:var d=a[0];return d.value+d.fb*(2*Math.random()-1);default:for(var e=0,f=c-1,g=a[e].time,l=a[f].time,n;1<f-e;)d=f+e>>1,n=a[d].time,n<=b?(e=d,g=n):(f=d,l=n);0<e?(d=a[e-1],n=d.value+d.fb*(2*Math.random()-1)):(d=a[0],n=2*(d.value+d.fb*(2*Math.random()-1)),d=a[1],n-=d.value+d.fb*(2*Math.random()-1));d=a[e];e=d.value+d.fb*(2*Math.random()-1);d=a[f++];var r=d.value+d.fb*(2*Math.random()-1);f<c?(d=a[f],f=d.value+d.fb*
|
||
(2*Math.random()-1)):(d=a[c-1],f=2*(d.value+d.fb*(2*Math.random()-1)),d=a[c-2],f-=d.value+d.fb*(2*Math.random()-1));return te((b-g)/(l-g),n,e,r,f)}}function Mg(a,b){a=void 0===a?new E:a;b=void 0===b?new E:b;An.call(this);this.keys=[];if(Array.isArray(a)){b=0;for(var c=a.length,d=this.keys,e;b<c;++b)e=a[b],Array.isArray(e)?d.push({time:e[0],value:e[1],fb:e[2]||new E(0,0,0)}):d.push({time:b/(1===c?1:c-1),value:e,fb:new E(0,0,0)})}else this.keys.push({time:0,value:a,fb:b})}function Cc(){this.M=null}
|
||
function lc(){this.M=null;this.state=Ib;this.options={};this.error=null}function Ng(){lc.call(this);this.urls=[]}function ms(){this.g=this.M=null;try{window.g&&window.g.getItem&&window.g.setItem?this.g=window.g:this.g=window.localStorage,this.g.setItem("test","1")}catch(c){var a={},b=function(){};b.prototype.setItem=function(d,e){a[d]=e};b.prototype.getItem=function(d){return a[d]};b.prototype.removeItem=function(d){delete a[d]};this.g=new b}this.sl=this.path=""}function Og(a,b){var c=a.path;(a=a.sl)&&
|
||
(c+="."+a);b&&(c+="."+b);return c}function ns(a){var b=this;this.app=a;this.version=null;this.g=[];this.M={};this.j=new Map;this.Z=0;this.D=function(c){var d=c.target;c=b.j;var e=c.get(d);if(4===d.readyState){var f=d.response;if(400>d.status&&null!==f)if(d.onreadystatechange=function(){},d.abort(),e.he=e.error=null,c.delete(d),"blob"===e.responseType)d=e.he=document.createElement("img"),d.addEventListener("load",b.l,!1),d.addEventListener("error",b.o,!1),d.addEventListener("abort",b.m,!1),c.set(d,
|
||
e),d.src=window.URL.createObjectURL(f);else{if("json"===e.responseType)try{f=JSON.parse(f.toString())}catch(g){Wf(b,e,g.message||g.toString());return}b.g=T(b.g,e);delete b.M[e.url];e.Ac(e.url,f)}else Wf(b,e,"loading issue "+d.status+" ("+d.statusText+")")}};this.O=function(c){c=c.target;var d=b.j,e=d.get(c);c.removeEventListener("load",b.O,!1);c.removeEventListener("error",b.C,!1);c.removeEventListener("abort",b.u,!1);e.he=e.error=null;d.delete(c);b.g=T(b.g,e);delete b.M[e.url];e.Ac(e.url,c)};this.C=
|
||
function(c){Wf(b,b.j.get(c.target),"loading error")};this.u=function(c){Wf(b,b.j.get(c.target),"loading abort")};this.l=function(c){c=c.target;var d=b.j,e=d.get(c);c.complete&&0<c.width&&0<c.height?(window.URL.revokeObjectURL(c.src),c.removeEventListener("load",b.l,!1),c.removeEventListener("error",b.o,!1),c.removeEventListener("abort",b.m,!1),e.he=e.error=null,d.delete(c),b.g=T(b.g,e),delete b.M[e.url],e.Ac(e.url,c)):Wf(b,e,"loading issue")};this.o=function(c){Wf(b,b.j.get(c.target),"loading error")};
|
||
this.m=function(c){Wf(b,b.j.get(c.target),"loading abort")}}function Wf(a,b,c){var d=b.he;d&&("js"===b.responseType?(d.removeEventListener("load",a.O,!1),d.removeEventListener("error",a.C,!1),d.removeEventListener("abort",a.u,!1),d.parentNode.removeChild(d),d.src=""):d instanceof XMLHttpRequest?(d.onreadystatechange=function(){},d.abort()):"blob"===b.responseType&&(window.URL.revokeObjectURL(d.src),d.removeEventListener("load",a.l,!1),d.removeEventListener("error",a.o,!1),d.removeEventListener("abort",
|
||
a.m,!1),d.src=EK),b.he=null,a.j.delete(d));b.error=c}function FK(a,b,c,d,e,f,g,l,n,r,w){this.url=a;this.Xa=b;this.crossOrigin=c;this.responseType=d;this.priority=e;this.Ga=f;this.bo=g;this.$c=l;this.timeout=n;this.Ac=r;this.ac=w;this.time=this.jj=this.Km=0;this.error=this.he=null}function dC(a){var b=this;this.app=a;this.j=!1;this.g={};this.oa={};this.Ac=function(c,d){c=b.oa[c];var e=c.Ea,f=e.alpha;e.image=d;e.loaded=!0;a.X.enabled&&Wh(a.X,e);f&&!f.loaded||c.A(c.state=Ib)};this.ac=function(c,d){c=
|
||
b.oa[c];c.Ea.image=Xf;c.A(c.state=db,c.error=d)};this.l=function(c,d){c=c.substring(0,c.length-6);c=b.oa[c];var e=c.Ea,f=e.alpha;f.image=d;f.loaded=!0;a.X.enabled&&Wh(a.X,f);e.loaded&&c.A(c.state=Ib)};this.o=function(c,d){c=c.substring(0,c.length-6);c=b.oa[c];c.Ea.alpha.image=Xf;c.A(c.state=db,c.error=d)};this.m=function(c,d){var e=V(c)+"/",f=b.g[c],g=mc({},f.options),l=f.urls,n=f.urls=[],r=f.wm=[],w=b.oa,y=a.da,A=1,H,I;g.Xa&&delete g.Xa;var O={},S;for(S in d){O={Nj:void 0};var R=d[S],ja=1/R.w,ka=
|
||
1/R.h;O.Nj=R.rs;for(I in O.Nj){R=O.Nj[I];c=e+I;n.push(c);y.remove(c);var ea=w[c]||(w[c]=new Pe);ea.hd=R.x*ja;ea.jd=R.y*ka;ea.Wf=R.w*ja;ea.Xf=R.h*ka;ea.ff=ea.hd+ea.Wf;ea.hf=ea.jd+ea.Xf;ea.state=rc}++A;c=e+S;n.push(c);r.push(c);b.get(c,g,function(ma){return function(pa){H=pa.Ea;for(I in ma.Nj)c=e+I,ea=w[c]||(w[c]=new Pe),ea.Ea.dispose(),ea.Ea=H,ea.A(ea.state=Ib);0===--A&&f.A(f.state=Ib)}}(O),function(ma){f.A(f.state=db,f.error=ma)})}for(d=0;d<l.length;++d)c=l[d],-1===n.indexOf(c)&&b.remove(c);0===--A&&
|
||
f.A(f.state=Ib)};this.M=function(c,d){c=b.g[c];c.A(c.state=db,c.error=d)}}function eC(){Ng.call(this);this.wm=[]}function Vk(a){var b=this;this.app=a;this.fonts={};this.Ac=function(c,d){GK(b,c,d)};this.ac=function(c,d){c=b.fonts[c];c.A(c.state=db,c.error=d)}}function GK(a,b,c){var d=a.fonts,e=d[b]||(d[b]=new Wk),f=c.pageWidth,g=c.pageHeight;b=V(b)+"/";var l=e.Te,n=c.pages;a=a.app.oa;var r=1,w,y,A,H,I,O=mc(e.options,O);O.Xa&&delete O.Xa;e.state=rc;e.lineHeight=e.lineHeight||c.lineHeight;e.height=0;
|
||
e.gh=0;e.ii=0;c={};for(var S in n)c={Lj:c.Lj},c.Lj=S,++r,a.get(b+c.Lj,O,function(R){return function(ja){e.qb=ja;w=n[R.Lj];for(y in w){A=w[y];H=A.k;I={};if(H)for(var ka in H)I[Qa(ka,0)]=H[ka];l[Qa(y,0)]=new Yf(A.w,A.h,A.x/f,A.y/g,(A.x+A.w)/f,(A.y+A.h)/g,A.xo,A.yo,A.xa,ja,I)}0===--r&&(fC(e),e.A(e.state=Ib))}}(c),function(R){e.A(e.state=db,e.error=R)});0===--r&&(fC(e),e.A(e.state=Ib))}function Bn(a){this.M=null;var b=this;this.app=a;this.m=a.focused?1:0;this.C=1;try{this.context=gC?new gC:null,this.context.createGainNode||
|
||
this.context.createGain||(this.context=null)}catch(f){this.context=null}za("WebAudio "+(this.context?"enabled":"disabled"));this.O=!1;this.o=this.gain=this.Pi=this.Hi=null;if(this.context){for(var c="mousedown mouseup click dblclick touchend keydown keyup auxclick contextmenu".split(" "),d=function(){b.O=!0;Cn(b)},e=0;e<c.length;++e)document.addEventListener(c[e],d,!0);c=function(){Cn(b)};this.context.addEventListener&&this.context.addEventListener("statechange",c,!0);this.context.onstatechange=c;
|
||
window.navigator&&window.navigator.audioSession&&(window.navigator.audioSession.type="playback");this.context.createDynamicsCompressor?(this.o=this.context.createDynamicsCompressor(),this.gain=this.context.createGain?this.context.createGain():this.context.createGainNode(),this.gain.connect(this.o)):this.o=this.gain=this.context.createGain?this.context.createGain():this.context.createGainNode();this.Pi=this.context.createGain?this.context.createGain():this.context.createGainNode();this.Pi.connect(this.gain);
|
||
this.Hi=this.context.createGain?this.context.createGain():this.context.createGainNode();this.Hi.connect(this.gain);hC=this.context.createBuffer(1,1,22050)}this.j={};this.g={};(c=document.createElement("audio"))&&c.canPlayType?(d=c.canPlayType("audio/ogg"),this.Z=""!==d&&"no"!==d,d=c.canPlayType("audio/m4a"),this.l=""!==d&&"no"!==d,d=c.canPlayType("audio/mp4"),this.l=this.l||""!==d&&"no"!==d):this.Z=this.l=!1;this.Ac=function(f,g){var l=b.g[f];++a.da.count;try{b.context.decodeAudioData(g,function(n){l.buffer=
|
||
n;l.start=0;l.end=n.duration;--a.da.count;l.A(l.state=Ib)},function(n){--a.da.count;za("decodeAudioData of ["+f+"] internal error: "+n);l.A(l.state=Ib)})}catch(n){--a.da.count,za("decodeAudioData of ["+f+"] error: "+n),l.A(l.state=Ib)}};this.ac=function(f,g){f=b.g[f];f.A(f.state=db,f.error=g)};this.J=function(f,g){var l=V(f)+"/",n=b.j[f],r=mc({},n.options),w=n.urls,y=b.g,A=a.da,H=1,I;r.Xa&&delete r.Xa;var O={},S;for(S in g){O={ij:void 0};O.ij=g[S];for(I in O.ij){var R=O.ij[I];f=l+I;w.push(f);A.remove(f);
|
||
var ja=y[f]||(y[f]=new Xh);ja.start=R.s;ja.end=R.e;ja.state=rc}++H;f=l+S;w.push(f);b.get(f,r,function(ka){return function(ea){for(I in ka.ij)f=l+I,ja=y[f]||(y[f]=new Xh),ja.buffer=ea.buffer;0===--H&&n.A(n.state=Ib)}}(O),function(ka){n.A(n.state=db,n.error=ka)})}0===--H&&n.A(n.state=Ib)};this.H=function(f,g){f=b.j[f];f.A(f.state=db,f.error=g)};a.on(mf,this.K=function(){b.start()});a.on(Yh,this.P=function(){b.stop()});a.on(tj,this.W=function(){b.m=0;Zh(b);Cn(b)});a.on(uj,this.wa=function(){b.m=1;Zh(b);
|
||
Cn(b)});this.de=[];this.ef=[];this.Fg={};this.om=new E}function Dn(a){a.D=a.Qg?1:0}function En(a){a.u=a.Eg?1:0}function iC(a,b,c,d){c=void 0===c?!1:c;b=b?a.get(b,d):jC;return a.app.S.aa(vj).Uh(b,c,1)}function Zh(a){var b=a.gain;if(b){b=b.gain;var c=a.Dg*a.m*a.volume;b.value!==c&&(b.value=c)}if(b=a.Pi)b=b.gain,c=a.D,b.value!==c&&(b.value=c);if(b=a.Hi)b=b.gain,c=a.u,b.value!==c&&(b.value=c)}function Cn(a){var b=a.context;b&&(0<a.m?"running"!==b.state&&"closed"!==b.state&&a.O&&"function"===typeof b.resume&&
|
||
((b=b.resume())&&b.then(os,os).catch(os),a.A(kC)):"running"!==b.state&&a.A(lC))}function os(){}function mC(a){var b=this;this.app=a;this.g={};this.Zb={};this.Ac=function(c,d){nC(b,c,d)};this.ac=function(c,d){c=b.Zb[c];c.A(c.state=db,c.error=d)};this.M=function(c,d){var e=V(c)+"/",f=b.g[c];c=mc({},f.options);var g=f.urls,l=b.app.da,n=1;c.Xa&&delete c.Xa;for(var r in d){var w=e+r;g.push(w);l.remove(w);++n;nC(b,w,d[r],c).ia(function(){0===--n&&f.A(f.state=Ib)},function(y){f.A(f.state=db,f.error=y)})}0===
|
||
--n&&f.A(f.state=Ib)};this.j=function(c,d){c=b.g[c];c.A(c.state=db,c.error=d)}}function nC(a,b,c,d){var e=a.app,f=V(b)+"/",g=c.geometry,l=g.attributes,n=l.position.length/3,r=1,w=a.Zb[b]||(a.Zb[b]=new Xk);a=w.Za;d=mc(w.options,d);w.state=rc;for(var y in l)a.attributes[y]=new Yb(l[y],l[y].length/n,0,0);a.Kb=new de(g.indices);g.bs?a.Tf.hg(g.bs):wj(a);d.ip&&HK(a);d.Jj&&Fn(a,d.Jj);d.Pn||ps(a);c.diffuseMap&&(++r,d=mc({},d),delete d.Xa,e.oa.get(f+c.diffuseMap,d,function(A){w.ke=A;0===--r&&w.A(w.state=Ib)},
|
||
function(A){w.A(w.state=db,w.error=A)}));if(c.bones){f=c.bones;d=f.length;g=Array(d);for(l=0;l<d;++l)g[l]=f[l];w.Le=g}if(c.skeleton){l=c.skeleton;f=l.length;d=new qs;g=d.Le=Array(f);n=d.Hb;y=0;for(b=a=void 0;y<f;++y)a=l[y],b=new Gn(e),b.name=a.n,n[b.name]=b,a.p&&IK(b,a.p),a.q&&JK(b,a.q),a.s&&KK(b,a.s),g[y]=b;e=0;for(y=n=void 0;e<f;++e)n=l[e],y=g[e],-1!==n.pi&&g[n.pi].i(y);e=0;for(l=void 0;e<f;++e)l=g[e],l.parent||l.U();e=0;for(l=void 0;e<f;++e)l=g[e],l.Oa.Fc(l.Bj);w.Wa=d}else w.Wa=null;c.influences&&
|
||
(w.In=c.influences);0===--r&&w.A(w.state=Ib);return w}function Yk(a){var b=this;this.app=a;this.g={};this.xd={};this.Ac=function(c,d){oC(b,c,d)};this.ac=function(c,d){c=b.xd[c];c.A(c.state=db,c.error=d)};this.M=function(c,d){var e=V(c)+"/",f=b.g[c],g=f.urls,l=a.da,n;for(n in d)c=e+n,g.push(c),l.remove(c),oC(b,c,d[n]);f.A(f.state=Ib)};this.j=function(c,d){c=b.g[c];c.A(c.state=db,c.error=d)}}function oC(a,b,c){a=a.xd;b=a[b]||(a[b]=new rs);a=b.hm;var d,e,f;for(f in c){a[f]=d=[];var g=c[f],l=g.length,
|
||
n=0;if(0<l){var r=g[0],w=r.f;void 0!==w&&(n=w);var y=r.p?oj(r.p):Zk,A=r.q?hs(r.q).normalize():$k,H=r.s?oj(r.s):ss;d[0]={frame:n,position:y,rotation:A,scale:H}}for(e=1;e<l;++e)r=g[e],w=r.f,void 0===w?++n:n=w,d[e]={frame:n,position:r.p?y=oj(r.p):y,rotation:r.q?A=hs(r.q).normalize():A,scale:r.s?H=oj(r.s):H};if(A===$k)for(e=0;e<l;++e)d[e].rotation=null;if(H===ss)for(e=0;e<l;++e)d[e].scale=null}b.A(b.state=Ib)}function al(a){var b=this;this.app=a;this.g={};this.We={};this.Ac=function(c,d){pC(b,c,d)};this.ac=
|
||
function(c,d){c=b.We[c];c.A(c.state=db,c.error=d)};this.M=function(c,d){var e=V(c)+"/",f=b.g[c],g=f.urls,l=a.da,n;for(n in d)c=e+n,g.push(c),l.remove(c),pC(b,c,d[n]);f.A(f.state=Ib)};this.j=function(c,d){c=b.g[c];c.A(c.state=db,c.error=d)}}function qC(a,b){var c={id:b.id,name:b.n,position:b.p?oj(b.p):Zk,rotation:b.q?hs(b.q):$k,scale:b.s?oj(b.s):ss,children:[]};if(b.c){var d=0;b=b.c;for(var e=b.length;d<e;++d)c.children[d]=qC(a,b[d])}return c}function pC(a,b,c){var d=a.We;b=d[b]||(d[b]=new ts);if(c){d=
|
||
c.objects;c=c.bb;for(var e=0,f=d.length,g;e<f;++e)g=d[e],b.Id.push(qC(a,g));c&&(b.aabb.min.hg(c.min),b.aabb.max.hg(c.max))}b.A(b.state=Ib)}function $h(a){this.M=null;var b=this;this.app=a;this.j="en";this.m=!1;this.g=["en"];this.o={};a.on(mf,this.l=function(){b.start()})}function us(a,b){a.on(Hn,b);b()}function vs(a,b){var c=a.g;if(-1===c.indexOf(b)){switch(b){case "be":case "kk":case "uk":case "uz":b="ru"}-1===c.indexOf(b)&&(b=a.j)}a.j=b}function rC(a){for(var b=a.language,c=0,d=a.g,e=d.length;c<
|
||
e;++c)if(d[c]===b){a.language=d[(c+1)%e];break}}function In(a,b,c){switch(a.Aa(b)){case ws:return a.ma(c,"_single");case sC:return a.ma(c,"_few");default:return a.ma(c)}}function tC(a){a.m=!1;switch(a.language){case "ar":case "fa":a.m=!0}}function bl(a,b){return void 0===b?a.m:1536<=b&&1791>=b||64336<=b&&65023>=b||65136<=b&&65279>=b?!0:!1}function cl(a){var b=this;this.app=a;this.g={};this.wc={};this.Ac=function(c,d){uC(b,c,d)};this.ac=function(c,d){c=b.wc[c];c.A(c.state=db,c.error=d)};this.M=function(c,
|
||
d){var e=V(c)+"/",f=b.g[c],g=mc({},f.options),l=f.urls,n=a.da,r=1;g.Xa&&delete g.Xa;for(var w in d)c=e+w,l.push(c),n.remove(c),c=uC(b,c,d[w],g),++r,c.ia(function(){0===--r&&f.A(f.state=Ib)},function(y){f.A(f.state=db,f.error=y)});0===r&&f.A(f.state=Ib)};this.j=function(c,d){c=b.g[c];c.A(c.state=db,c.error=d)}}function uC(a,b,c,d){return(a.wc[b]||(a.wc[b]=new xj)).load(a.app,c,V(b)+"/",d)}function vC(a){this.app=a;this.g=[];this.j={}}function yj(a,b){return(a=a.j[b])?a.aa():null}function Cd(a){return void 0!==
|
||
a.Pf}function Jn(a,b){var c=a.j[b];c&&c instanceof ai&&(a.unregister(c.ak),delete a.j[b])}function ai(a,b,c){this.app=a;this.ak=b;this.g=[];this.resize(void 0===c?0:c)}function xs(a){this.M=null;var b=this;this.app=a;this.g=!0;this.j=[];this.Jb=null;this.Uk=0;this.Gi=-1;this.O=this.D=this.Z=0;this.l=function(d){dl(b,d);if(b.g){var e=a.Li;b.j.push(d.pointerId);a.screen.nc(nf,d.pointerId,d.clientX*e,d.clientY*e,d.pressure)}};this.u=function(d){dl(b,d);if(b.g){var e=a.Li;a.screen.nc(bi,d.pointerId,d.clientX*
|
||
e,d.clientY*e,d.pressure)}};this.C=function(d){dl(b,d);if(b.g){J(b.j,d.pointerId);var e=a.Li;a.screen.nc(el,d.pointerId,d.clientX*e,d.clientY*e)}};this.o=function(d){dl(b,d);b.g&&(J(b.j,d.pointerId),a.screen.nc(zj,d.pointerId))};this.P=function(d){dl(b,d);b.g&&(J(b.j,d.pointerId),a.screen.nc(zj,d.pointerId))};this.m=function(d){if(fl&&Kn&&122===d.keyCode)d.cancelable&&d.preventDefault(),d.stopPropagation(),wC();else if(b.g){var e=d.keyCode;switch(e){case 10009:e=Q.BACK}b.A(Qe,e)&&(d.cancelable&&d.preventDefault(),
|
||
d.stopPropagation())}};this.K=function(d){if(b.g){var e=d.keyCode;switch(e){case 10009:e=Q.BACK}b.A(ys,e)&&(d.cancelable&&d.preventDefault(),d.stopPropagation())}};this.sh=function(d){b.g&&a.screen.nc(xC,d.deltaX,d.deltaY);d.cancelable&&d.preventDefault();d.stopPropagation()};var c=Ln.now();this.H=function(d){var e=c;800>=(c=Ln.now())-e&&d.preventDefault()};this.J={passive:!1};a.on(mf,this.W=function(){b.start()});a.on(Yh,this.wa=function(){b.stop()})}function dl(a,b){if("mouse"===b.pointerType)switch(b.type){case "pointerout":case "pointercancel":a.Gi=
|
||
-1;break;default:a.Gi=b.pointerId;var c=a.app.Li;a.Z=b.clientX*c;a.D=b.clientY*c;a.O=b.pressure}}function yC(a){this.app=a;this.g=[];this.Tl=new zC;this.clearDepth=this.clearColor=!0;this.clearStencil=!1}function Zf(a){a=a.g;var b=a.length;return 0<b?a[b-1]:null}function gl(a){var b=this;this.app=a;this.scripts={};this.Ac=function(c){c=b.scripts[c];c.A(c.state=Ib)};this.ac=function(c,d){c=b.scripts[c];c.A(c.state=db,c.error=d)}}function AC(a){var b=this;this.app=a;this.wb={alpha:!1,depth:!0,stencil:!0,
|
||
antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,failIfMajorPerformanceCaveat:!1};this.canvas=document.createElement("canvas");this.ca=null;this.enabled=!1;this.frame=0;this.Bk=new BC;this.na={};this.WEBGL_compressed_texture_pvrtc=this.WEBGL_compressed_texture_etc1=this.WEBGL_compressed_texture_s3tc=this.ANGLE_instanced_arrays=null;this.vc=[];this.li=new Xb(0,0,0,0);this.viewport=new Xb(0,0,0,0);this.clearColor=new kc(0,0,0,1);this.clearDepth=1;this.clearStencil=0;this.colorMask=[!0,!0,
|
||
!0,!0];this.P=!1;this.blendColor=new kc(0,0,0,1);this.H=this.K=of;this.D=this.W=this.J=this.wa=Pg;this.scissor=new Xb(0,0,0,0);this.uh=!1;this.Qc=!0;this.depthFunc=CC;this.depthMask=!0;this.Mb=!1;this.ee=this.Bb=DC;this.sb=this.Rb=this.ud=this.te=this.If=this.ua=EC;this.frontFace=FC;this.l=!0;this.cullFace=Mn;this.lineWidth=1;this.af=this.$e=0;this.O=this.C=this.Z=this.Xh=this.m=null;this.M={};this.g=null;this.u={};this.o=0;this.Yh=[];this.Bh={};this.ug=[];this.Wh=[];this.og=null;this.Eh={};this.Sf=
|
||
null;this.j={};this.Lc=function(c){var d=b.M,e=c.id,f=d[e];f&&(b.m===c&&(b.m=null,b.Xh=null,b.Z=null,b.C=null,b.O=null),f.dispose(b.enabled),delete d[e])};this.xb=function(c){var d=b.u,e=c.id,f=d[e];f&&(b.g===c&&(b.g=null),f.dispose(b.enabled),delete d[e])};this.He=function(c){var d=b.Bh,e=c.id,f=d[e];if(f){for(var g=0,l=b.Yh,n=l.length;g<n;++g)l[g]===c&&(l[g]=null);f.dispose(b.enabled);delete d[e]}};this.Zc=function(c){var d=b.Eh,e=c.id,f=d[e];if(f){for(var g=0,l=b.Wh,n=l.length;g<n;++g)l[g].eb===
|
||
c&&(l[g].eb=null);b.og===c&&(b.og=null);f.dispose(b.enabled);delete d[e]}};this.Cc=function(c){var d=b.j,e=c.id,f=d[e];f&&(b.Sf===c&&(b.Sf=null),f.dispose(b.enabled),delete d[e])};this.Ic=function(){GC(b)};this.rd=function(){HC(b)};a.on(mf,this.dc=function(){b.start()});a.on(Yh,this.kd=function(){b.stop()})}function GC(a){a.enabled=!1;a.m=null;a.Xh=null;a.Z=null;a.C=null;a.O=null;var b=a.M,c;for(c in b)b[c].dispose(!1);a.g=null;b=a.u;for(var d in b)b[d].dispose(!1);d=0;b=a.Yh;for(c=b.length;d<c;++d)b[d]=
|
||
null;d=a.Bh;for(var e in d)d[e].dispose(!1);e=0;d=a.Wh;for(b=d.length;e<b;++e)d[e].eb=null;a.og=null;e=a.Eh;for(var f in e)e[f].dispose(!1);a.Sf=null;a=a.j;for(var g in a)a[g].dispose(!1)}function HC(a){a.enabled=!0;var b=a.ca,c=a.canvas,d=a.vc,e=a.viewport,f=a.scissor,g=a.clearColor,l=a.colorMask,n=a.blendColor,r=a.M,w=a.u,y=a.Bh,A=a.Eh,H=a.j;b.viewport(e.x,Math.round(c.height-e.y-e.height),e.width,e.height);b.clearColor(g.r,g.mi,g.b,g.a);b.clearDepth(a.clearDepth);b.clearStencil(a.clearStencil);
|
||
b.scissor(f.x,Math.round(c.height-f.y-f.height),f.width,f.height);a.uh?b.enable(b.SCISSOR_TEST):b.disable(b.SCISSOR_TEST);b.colorMask(l[0],l[1],l[2],l[3]);a.P?b.enable(b.BLEND):b.disable(b.BLEND);b.blendColor(n.r,n.mi,n.b,n.a);b.blendEquationSeparate(d[a.K],d[a.H]);b.blendFuncSeparate(d[a.wa],d[a.W],d[a.J],d[a.D]);a.Qc?b.enable(b.DEPTH_TEST):b.disable(b.DEPTH_TEST);b.depthFunc(d[a.depthFunc]);b.depthMask(a.depthMask);a.Mb?b.enable(b.STENCIL_TEST):b.disable(b.STENCIL_TEST);a.Bb===a.ee?b.stencilFuncSeparate(b.FRONT_AND_BACK,
|
||
d[a.Bb],0,4294967295):(b.stencilFuncSeparate(b.FRONT,d[a.Bb],0,4294967295),b.stencilFuncSeparate(b.BACK,d[a.ee],0,4294967295));b.stencilMaskSeparate(b.FRONT_AND_BACK,4294967295);a.ua===a.ud&&a.Rb===a.Rb&&a.sb===a.sb?b.stencilOpSeparate(b.FRONT_AND_BACK,d[a.ua],d[a.If],d[a.te]):(b.stencilOpSeparate(b.FRONT,d[a.ua],d[a.If],d[a.te]),b.stencilOpSeparate(b.BACK,d[a.ud],d[a.Rb],d[a.sb]));b.frontFace(d[a.frontFace]);a.l?b.enable(b.CULL_FACE):b.disable(b.CULL_FACE);b.cullFace(d[a.cullFace]);b.lineWidth(a.lineWidth);
|
||
a.$e||a.af?(b.enable(b.POLYGON_OFFSET_FILL),b.polygonOffset(a.$e,a.af)):b.disable(b.POLYGON_OFFSET_FILL);for(var I in r)r[I].upload();for(var O in w)w[O].upload();b.activeTexture(b.TEXTURE0+a.o);for(var S in y)y[S].upload();c=0;a=a.ug;for(d=a.length;c<d;++c)a[c]?b.enableVertexAttribArray(c):b.disableVertexAttribArray(c);for(var R in A)A[R].upload();for(var ja in H)H[ja].upload()}function Aj(a,b,c,d,e){var f=a.viewport;b=Math.round(b);c=Math.round(c);d=Math.round(d);e=Math.round(e);fs(f,b,c,d,e)||
|
||
(f.set(b,c,d,e),a.enabled&&a.ca.viewport(b,Math.round(a.li.height-c-e),d,e))}function zs(a,b,c,d,e){var f=a.scissor;b=Math.round(b);c=Math.round(c);d=Math.round(d);e=Math.round(e);fs(f,b,c,d,e)||(f.set(b,c,d,e),a.enabled&&a.ca.scissor(b,Math.round(a.canvas.height-c-e),d,e))}function ci(a,b){a.uh!==b&&(a.uh=b,a=a.ca,b?a.enable(a.SCISSOR_TEST):a.disable(a.SCISSOR_TEST))}function As(a,b,c,d,e){var f=a.clearColor;fs(f,b,c,d,e)||(f.set(b,c,d,e),a.ca.clearColor(b,c,d,e))}function di(a,b,c,d,e){var f=a.colorMask;
|
||
if(f[0]!==b||f[1]!==c||f[2]!==d||f[3]!==e)f[0]=b,f[1]=c,f[2]=d,f[3]=e,a.ca.colorMask(b,c,d,e)}function ei(a,b){a.P!==b&&(a.P=b,a=a.ca,b?a.enable(a.BLEND):a.disable(a.BLEND))}function Bs(a,b,c){c=void 0===c?a.H:c;if(a.K!==b||a.H!==c){a.K=b;a.H=c;var d=a.vc;a.ca.blendEquationSeparate(d[b],d[c])}}function Cs(a,b,c,d,e){d=void 0===d?a.J:d;e=void 0===e?a.D:e;if(a.wa!==b||a.W!==c||a.J!==d||a.D!==e){a.wa=b;a.W=c;a.J=d;a.D=e;var f=a.vc;a.ca.blendFuncSeparate(f[b],f[c],f[d],f[e])}}function fi(a,b){a.depthMask!==
|
||
b&&(a.depthMask=b,a.ca.depthMask(b))}function IC(a){!0!==a.Mb&&(a.Mb=!0,a=a.ca,a.enable(a.STENCIL_TEST))}function pf(a,b){var c=0;a=a.Z;for(var d=a.length,e,f;c<d;++c)e=a[c],f=b[e.name],void 0!==f&&e.set(f)}function Ds(a,b,c){c=void 0===c?!1:c;if(b){var d=a.u[b.id];d||(a.u[b.id]=d=new Es(a,b),b.once(Fs,a.xb));var e=d.version!==b.version||!1!==c&&c!==d.depth;e&&d.upload(c);a.g!==b&&(e||(c=a.ca,c.bindFramebuffer(c.FRAMEBUFFER,d.Fh)),a.g=b,a.li.set(0,0,b.Sd,b.Qd))}else b=a.ca,d=a.canvas,b.bindFramebuffer(b.FRAMEBUFFER,
|
||
a.g=null),a.li.set(0,0,d.width,d.height)}function Wh(a,b,c){c=void 0===c?0:c;var d=a.Bh[b.id],e=a.Yh;d||(a.Bh[b.id]=d=new Gs(a,b),b.once(Fs,a.He));var f=d.version!==b.version;if(f){if(a.o!==c){a.o=c;var g=a.ca;g.activeTexture(g.TEXTURE0+c)}d.upload()}e[c]!==b&&(f||(f=a.ca,a.o!==c&&(a.o=c,f.activeTexture(f.TEXTURE0+c)),f.bindTexture(f.TEXTURE_2D,d.Xg)),e[c]=b)}function JC(a,b){var c=a.Eh[b.id];c||(a.Eh[b.id]=c=new Hs(a,b),b.once(KC,a.Zc));var d=c.version!==b.version;d&&c.upload();a.og!==b&&(d||(d=
|
||
a.ca,d.bindBuffer(d.ARRAY_BUFFER,c.ge)),a.og=b)}function Bj(a,b){var c=a.j[b.id];c||(a.j[b.id]=c=new Is(a,b),b.once(LC,a.Cc));var d=c.version!==b.version;d&&c.upload();a.Sf!==b&&(d||(d=a.ca,d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,c.ge)),a.Sf=b)}function Qg(a,b,c,d,e){var f=a.Sf,g=a.ca,l=a.vc;f&&c?g.drawElements(l[b],e,a.j[f.id].dataType,d):g.drawArrays(l[b],d,e)}function Rg(a,b){var c=b.Za;if(a.enabled){var d=c.attributes,e;for(e in d)JC(a,d[e].eb);c.Kb&&Bj(a,c.Kb)}b=b.pa;if(a.enabled){c=b.hb;for(var f in c)a.cb(c[f].Cb);
|
||
c=b.ig;for(var g in c)a.cb(c[g].Cb)}}function BC(){this.g=this.j=this.M=this.m="lowp";this.l=this.Ij=this.o=this.u=this.O=this.C=this.Di=0}function Js(a,b){this.X=a;this.Cb=b;this.Gh=null;this.attributes={};this.tk=[];this.ug=[];this.Ja={};this.Al=[];this.version=-1}function MC(a,b,c,d){this.X=a;this.name=b;this.location=c;this.size=d}function ec(a,b,c){this.name=b;this.X=a;this.location=c}function Ks(a,b,c){ec.call(this,a,b,c);this.value=0;a.ca.uniform1f(c,0)}function Ls(a,b,c){ec.call(this,a,b,
|
||
c)}function Ms(a,b,c){ec.call(this,a,b,c);this.value=new kb(0,0);a.ca.uniform2f(c,0,0)}function Ns(a,b,c){ec.call(this,a,b,c)}function Os(a,b,c){ec.call(this,a,b,c);this.value=new E(0,0,0);a.ca.uniform3f(c,0,0,0)}function Ps(a,b,c){ec.call(this,a,b,c)}function Qs(a,b,c){ec.call(this,a,b,c);this.value=new dc(0,0,0,0);a.ca.uniform4f(c,0,0,0,0)}function Rs(a,b,c){ec.call(this,a,b,c)}function Ss(a,b,c){ec.call(this,a,b,c);this.value=new Tb;a.ca.uniformMatrix4fv(c,!1,this.value.elements)}function Ts(a,
|
||
b,c){ec.call(this,a,b,c)}function Us(a,b,c){ec.call(this,a,b,c);this.value=null;this.frame=a.frame}function Vs(a,b,c,d){ec.call(this,a,b,c);this.unit=d;this.g=b+"Alpha";a.ca.uniform1i(c,d)}function Es(a,b){this.X=a;this.Ea=b;this.version=-1;this.g=null;this.depth=!1;this.Fh=null}function Gs(a,b){this.X=a;this.Ea=b;this.Xg=null;this.version=-1}function Hs(a,b){this.X=a;this.eb=b;this.dataType=this.data=this.ge=null;this.Oe=!1;this.version=-1}function Is(a,b){this.X=a;this.Kb=b;this.dataType=this.data=
|
||
this.ge=null;this.Oe=!1;this.version=-1}function Ws(a){this.app=a;this.j=[];this.m=this.o=this.l=this.M=this.g=0;this.od=null;this.C=new E}function NC(a,b){if(b.Xk&&(!b.mh||a.od.ze(b.Hh))){var c=b.Oa.elements;c=a.m*c[12]+a.o*c[13]+a.l*c[14]+a.M;for(var d=b.pa,e=d.qc,f=b.Za,g=f.id,l=0,n=d.hb,r=n.length,w,y=a.j,A;l<r;++l)w=n[l],A=a.g++,A=A===y.length?y[A]=new hl:y[A],A.object=b,A.qc=e,A.pa=d,A.Ze=w,A.bc=w.id,A.Za=f,A.Ec=g,A.z=c}c=0;b=b.children;for(d=b.length;c<d;++c)e=b[c],e.visible&&NC(a,e)}function hl(){this.object=
|
||
null;this.qc=0;this.Ze=this.pa=null;this.bc=0;this.Za=null;this.z=this.Ec=0}function gi(){this.M=null;for(var a=this,b=this.ai={},c=(window.location.search?window.location.search.substring(1):"").split("&"),d=0,e=c.length,f=void 0,g=void 0,l=void 0;d<e;++d)f=c[d].split("="),g=f[0],""!==g&&(1===f.length?l=!0:isNaN(Qa(f[1]))&&isNaN(Ma(f[1]))?"false"===f[1]?l=!1:"true"===f[1]?l=!0:l=f[1]:l=Number(f[1]),void 0===b[g]?b[g]=l:Array.isArray(b[g])?b[g].push(l):b[g]=[b[g],l]);this.Dh=void 0!==document.documentElement&&
|
||
void 0!==document.documentElement.ontouchstart||void 0!==window.ontouchstart;this.m=!!b.tv;this.mobile=function(){var n=!1,r=navigator.userAgent||navigator.vendor||window.opera;if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(r)||
|
||
/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(r.substring(0,
|
||
4)))n=!0;return n}();this.focused=!1;this.Cd=!0;b=this.Li=window.devicePixelRatio||1;c=zd();d=Kb();e=this.Sd=c*b;f=this.Qd=d*b;window.scrollTo(0,0);za("Size "+c+"x"+d+" pixelRatio "+b);this.input=new xs(this);this.storage=new ms;this.locale=new $h(this);this.da=new ns(this);this.oa=new dC(this);this.fonts=new Vk(this);this.audio=new Bn(this);this.Zb=new mC(this);this.xd=new Yk(this);this.We=new al(this);this.wc=new cl(this);this.scripts=new gl(this);this.S=new vC(this);this.X=new AC(this);this.X.Eb(e,
|
||
f,c,d);this.screen=new yC(this);this.Pj=new Ws(this);this.j=-1;this.time=Ln.now();this.rl=[];this.C=function(){try{var n=Ln.now(),r=Da(.001*(n-a.time),0,1/30);a.time=n;var w=a.Li,y=zd(),A=Kb();n=y*w;var H=A*w;if(a.Sd!==n||a.Qd!==H)a.Sd=n,a.Qd=H,window.scrollTo(0,0),a.X.Eb(n,H,y,A),za("Resize "+y+"x"+A+" pixelRatio "+w),a.screen.layout();a.input.update();a.da.update(r);a.update(r);a.ob();a.audio.update(r);a.A(Xs);-1!==a.j&&(a.j=OC.call(window,a.C))}catch(I){a.error(I)}};this.g=function(n){try{"pagehide"===
|
||
n.type||"blur"===n.type||"pageshow"===n.type||"focus"===n.type?"pagehide"===n.type||"blur"===n.type?a.focused&&a.Cd&&(a.focused=!1,a.A(tj)):"pageshow"!==n.type&&"focus"!==n.type||a.focused||!a.Cd||(a.focused=!0,a.A(uj)):document.hidden||document.mozHidden||document.msHidden||document.webkitHidden||"pause"===n.type?a.focused&&a.Cd&&(a.focused=!1,a.A(tj)):!a.focused&&a.Cd&&(a.focused=!0,a.A(uj))}catch(r){a.error(r)}};this.u=function(){a.A(PC)}}function wC(){var a=!pc();fl&&Kn&&pc()!==a&&(a?Kn.call(document.documentElement):
|
||
LK.call(document))}function Sg(a){this.M=null;var b=this;this.app=a;this.timestamp=Math.floor((new window.Date).getTime()/1E3);window.setInterval(function(){++b.timestamp},1E3);this.O="start_time";this.W="terms_accepted";this.country="XX";this.B=null;this.zi=0;this.va=MK;this.ud={};this.rd=["https://gemioli.com"];this.Z=0;this.j=null;this.m=!1;this.P="https://gemioli.com/";this.Rk=null;this.yc="https://gemioli.com";this.Re="do.php";this.J={apiKey:"AIzaSyDbVR0af8DZcOmMLRobVsIRmhwvs0s-qFU",projectId:"gemioli-backend",
|
||
messagingSenderId:"548354301369",appId:"1:548354301369:web:97900211f6d217f285aa68",vapidKey:"BD70zD80xTZHU4Xg426kcnBDhYKW_Nlkg63MVtXg-QVDboToQRmXQN0sp2pehMAhhbgGSL0Aksapggjc5Z0HlaA"};this.g=this.H=this.o=this.u=this.Bb=this.K=null;this.D=!1;this.Wg=this.l=this.ji=this.ua=this.sb=null;this.Om=32211036;this.wa={};this.ec=null;this.Rb=[];this.eo=this.C=null;this.Jh={scopes:!1};this.na=!1;var c=function(){function g(y,A,H){this.url=y;this.gc=!(void 0===H||!H);this.depth=null}function l(y,A){this.mi=y;
|
||
this.Fn=A}function n(y){n[" "](y);return y}n[" "]=function(){};var r=window,w=/^https?:\/\/(\w|-)+\.cdn\.ampproject\.(net|org)(\?|\/|$)/;return function(){var y="",A=void 0;if(void 0===A){A=r;var H=[],I=null;do{var O=A;try{var S;if(S=!!O&&null!=O.location.href)a:{try{S=(n(O.foo),!0);break a}catch(ja){}S=!1}var R=S}catch(ja){R=!1}R?(R=O.location.href,I=O.document&&O.document.referrer||null):(R=I,I=null);H.push(new g(R||"",O));try{A=O.parent}catch(ja){A=null}}while(A&&O!=A);A=0;for(O=H.length-1;A<=
|
||
O;++A)H[A].depth=O-A;O=r;if(O.location&&O.location.ancestorOrigins&&O.location.ancestorOrigins.length==H.length-1)for(A=1;A<H.length;++A)R=H[A],R.url||(R.url=O.location.ancestorOrigins[A-1]||"",R.gc=!0);A=H}R=new g(r.location.href,r,!1);S=null;for(I=H=A.length-1;0<=I;--I)if(O=A[I],!S&&w.test(O.url)&&(S=O),O.url&&!O.gc){R=O;break}I=null;O=A.length&&A[H].url;0!=R.depth&&O&&(I=A[H]);A=new l(R,I,S);R=A.Fn;A=A.mi;R&&R.url?y=R.url:A&&A.url&&(y=A.url);return y}()}(),d=c.split("/");za("URI: "+c);if(window.location&&
|
||
window.location.ancestorOrigins){for(var e=[],f=0;f<window.location.ancestorOrigins.length;++f)e.push(window.location.ancestorOrigins[f]);za("Origins: "+e.join(", "))}window.navigator&&window.navigator.userAgent&&za("UserAgent: "+window.navigator.userAgent);this.Mb=(-1===c.indexOf("://")?d[0]:d.slice(0,3).join("/")).toLowerCase();this.Ic=window.location&&window.location.href||"";a.once(mf,function(){var g=a.ai,l=b.Ic;if(!b.l||0!==l.indexOf("https://storage-direct.y8.com")&&0!==l.indexOf("https://storage.y8.com"))if((g.vk_app_id||
|
||
g.api_id)===b.Wg)b.va=nc;else{for(var n=!1,r=0,w=b.rd;r<w.length;++r)if(0===l.indexOf(w[r])){n=!0;break}if(n){b.yc="";l=null;try{l=window.frameElement}catch(O){l=null}n=!0;if(l)try{n=l.hasAttribute("sandbox")}catch(O){}else try{document.domain=document.domain,n=!1}catch(O){}if(n)throw new Ys(b.Mb);l=b.Mb;var y;-1!==(y=l.lastIndexOf("//"))&&(l=l.substring(y+2));-1!==(y=l.indexOf("@"))&&(l=l.substring(y+1));-1!==(y=l.indexOf(":"))&&(l=l.substring(0,y));b.va=hi;y=b.ud;n=l.length;for(var A in y)for(r=
|
||
y[A],w=0;w<r.length;++w){var H=QC(r[w]),I=l.indexOf(H);-1!==I&&I+H.length===n&&(b.va=A)}}else throw Error("Unknown host");}else b.va=Re;switch(b.va){case nc:a.storage.sl="vkontakte";fl=!1;vs(a.locale,(g.vk_language||"ru").substring(0,2).toLowerCase());break;case rd:a.storage.sl="telecoming";break;case sc:fl=!1,a.rl.push(NK(b))}})}function Cj(a){switch(a.va){case sc:var b=a.ec&&a.ec.serverTime?a.ec.serverTime()/1E3:a.timestamp;a.timestamp=b}return a.timestamp}function OK(a){switch(a.va){case nc:return a=
|
||
a.app.ai,a.vk_platform?"desktop_web"!==a.vk_platform&&"mobile_web"!==a.vk_platform&&"desktop_app_messenger"!==a.vk_platform&&"desktop_web_messenger"!==a.vk_platform&&"mvk_external"!==a.vk_platform&&"web_external"!==a.vk_platform:"web"!==a.platform;default:return!1}}function Zs(a){switch(a.va){case rd:case Re:case nc:case sc:return!1;default:return!a.B.nh(a.W,!1)}}function RC(a,b){switch(a.va){case rd:return!1;case sc:return a.C&&"https://gemioli.com"===b;default:return!0}}function ue(a,b){switch(a.va){case Re:"https://gemioli.com"===
|
||
b&&(b="https://y8.com/studios/gemioli");break;case nc:"https://gemioli.com"===b&&(b="https://vk.com/gemioli");Xc.default.isWebView()&&(b=b.replace("https","vk"));break;case sc:for(var c=a.Rb,d=c.length,e=0;e<d&&c[e].url!==b;++e);e===d&&(b=a.C)}if(b)try{var f=window.document.createElement("a");f.setAttribute("href",b);f.setAttribute("target","_blank");f.click()}catch(g){za(g)}else za("Unknown external url")}function SC(a){switch(a.va){case rd:return!1;case sc:return!!a.C;default:return!0}}function TC(a){switch(a.va){case rd:case nc:case sc:new il(a.app);
|
||
default:a=new jl(a.app)}UC(a);return a}function Nn(a,b){var c=a.B;a.B=b;c&&c.dispose();b.Xd()&&b.tf()&&(a.app.storage.rc("login",b.pd()),b.once(VC,function(){a.app.storage.remove("login");var d=TC(a);return a.Xj(function(){Nn(a,d)},d)}));b.has(a.O)||b.kc(a.O,Cj(a));a.A(qf,b);b.qf().then(function(d){$s(a)&&!d&&b.A(kl)});b.rf().then(function(){a:switch(a.va){case rd:case sc:var d=!1;break a;default:d=!0}d&&b.Xd()&&b.A(On)});b.hh();b.rg()}function at(a){switch(a.va){case nc:case rd:return!1;default:return!a.Xd()}}
|
||
function Dj(a,b){a:switch(a.va){case sc:switch(b){case "loaded":case "play":case "pause":var c=!0;break a;default:c=!1;break a}default:c=!1}if(c)switch(a.va){case sc:switch(b){case "loaded":var d;null==(d=a.ec.features.LoadingAPI)||d.ready();a.adBreak({type:"preroll",name:"game-loaded"});break;case "play":var e;null==(e=a.ec.features.GameplayAPI)||e.start();break;case "pause":var f;null==(f=a.ec.features.GameplayAPI)||f.stop()}}}function $s(a){switch(a.va){case rd:case sc:return!1;default:return!0}}
|
||
function WC(a){switch(a.va){case nc:return!0;default:return!1}}function PK(a){a.process(function(){switch(a.va){case nc:return QK();default:return Promise.reject("Invite is not implemented")}})}function XC(a){switch(a.va){case nc:return!0;default:return!1}}function YC(a){switch(a.va){case hi:a.m=ZC(a)}return a.m}function bt(a){switch(a.va){case nc:var b=RK();break;case sc:b=SK(a);break;case hi:b=Promise.resolve(ZC(a));break;default:b=Promise.resolve(!1)}b.then(function(c){return a.m=c},function(c){za(c);
|
||
return a.m})}function Pn(a){switch(a.va){case hi:return!0;default:return!1}}function $C(a){switch(a.va){case nc:return!0;case hi:return window==window.top;default:return!1}}function Tg(a,b,c,d){switch(a.va){case nc:return"https://vk.com/app"+a.Wg;default:return a.dm(b,c,d)}}function Ej(a,b,c,d,e){var f=void 0,g=!1;a.adBreak({type:"reward",name:b,Ul:function(l){g=!0;c(l)},Sl:function(){f=!0},Rl:function(){f=!1},qk:function(l){"ignored"!==l.Xl&&(g?void 0===f?a.Wj("rewardAdBreak error").then(function(){Ej(a,
|
||
b,c,d,e)}):f?d():Ej(a,b,c,d,e):e())}})}function TK(a){window.navigator&&window.navigator.serviceWorker&&(navigator.serviceWorker.register("/sw.js").then(function(d){za("GEMIOLI SW registered at "+d.scope);if(a.J){var e=Yq(a.J,"[GEMIOLI]");return tr().then(function(f){f&&(a.K=Ux(e),a.Bb={vapidKey:a.J.vapidKey,serviceWorkerRegistration:d},aD(a))},function(f){za(f)})}},function(d){za("GEMIOLI SW not allowed. ",d)}),navigator.serviceWorker.register("./sw.js").then(function(d){za("SW registered at "+d.scope);
|
||
if(a.u){var e=Yq(a.u);return tr().then(function(f){f&&(a.o=Ux(e),a.H={vapidKey:a.u.vapidKey,serviceWorkerRegistration:d},a.B&&ct(a))},function(f){za(f)})}},function(d){za("SW not allowed. ",d)}));a.on(qf,function(){ct(a)});window.addEventListener("beforeinstallprompt",function(d){d.preventDefault();a.g=d;return!1});window.addEventListener("appinstalled",function(){a.g=null;a.m=!1});var b=void 0,c=a.app.storage.ma("login","");if(0===c.indexOf(dt)||0===c.indexOf("fb"))b=UK(a);return Promise.resolve(b)}
|
||
function aD(a){a.K&&et()&&ur(a.K,a.Bb).then(function(b){if(b&&m("token")!==b)return Qb(a.yc+"/backend/do.php","POST",{token:b,action:"subscribe"}).then(function(){un["com.gemioli.token"]=b})}).catch(function(b){za(b)})}function ct(a){if(a.o&&et()){var b=a.app.storage,c=a.B,d=b.ma("firebaseMessagingToken"),e=b.ma("firebaseMessagingTokenOwner"),f=null;ur(a.o,a.H).then(function(g){return c===a.B?void 0!==e&&e!==c.pd()?gK(a.o).then(function(){return c===a.B?(b.remove("firebaseMessagingToken"),b.remove("firebaseMessagingTokenOwner"),
|
||
ur(a.o,a.H)):Promise.reject()}):g:Promise.reject()}).then(function(g){f=g;if(c===a.B&&d!==f)return c.vm(f)}).then(function(){c===a.B&&(b.rc("firebaseMessagingToken",f),b.rc("firebaseMessagingTokenOwner",c.pd()),c.Xd()||c.A(On))}).catch(function(g){g&&za(g)})}}function bD(){try{return window==window.top&&window.Notification&&window.Notification.requestPermission&&"granted"!==window.Notification.permission}catch(a){return!1}}function et(){try{return window==window.top&&window.Notification&&"granted"===
|
||
window.Notification.permission}catch(a){return!1}}function ZC(a){try{return!!a.g&&!(window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches)}catch(b){return!1}}function VK(a){return new Promise(function(b,c){var d=a.g;d.prompt();d.userChoice.then(function(e){"accepted"===e.outcome?(a.g=null,b(!0)):window.setTimeout(function(){d===a.g&&(a.g=null);b(!1)},100)},function(e){c(e)})})}function WK(a,b,c,d,e){var f={url:Tg(a,null,c,e),text:b};return a.app.mobile&&window.navigator&&window.navigator.share&&
|
||
window.navigator.canShare&&window.navigator.canShare(f)?window.navigator.share(f).then(function(){return!0},function(g){if("AbortError"!==g.name)throw g;}):a.Fm(b,c,d,e)}function cD(a,b){var c=void 0===c?180:c;return"reward"!==b.type&&Cj(a)>=a.Z&&Cj(a)-a.Z<c}function XK(a,b){if(cD(a,b))b.adBreakDone({breakStatus:"frequencyCapped"});else if(a.D){var c=b.adBreakDone;b.adBreakDone=function(d){d=void 0===d?{}:d;var e=d.breakStatus;"viewed"===e||"dismissed"===e||"ignored"===e?c(d):(b.adBreakDone=c,dD(a,
|
||
b))};window.adBreak(b)}else dD(a,b)}function dD(a,b){var c="reward"===b.type,d=c?a.ua:a.sb;if(d)if(d.isLoaded()){var e=function(){function f(){d.removeEventListener("ad_closed",f);d.load();c&&b.adViewed();b.afterAd();b.adBreakDone({breakStatus:"viewed"})}b.beforeAd();d.addEventListener("ad_closed",f);d.show()};c?(a.j=b,b.beforeReward(e)):e()}else d.load(),b.adBreakDone({breakStatus:"noAdPreloaded"});else b.adBreakDone({breakStatus:"notReady"})}function eD(a,b,c,d){function e(){window.adConfig({sound:!g.isEnabled()||
|
||
g.Qg&&g.Eg?"off":"on"})}d=void 0===d?"30s":d;window.adsbygoogle=window.adsbygoogle||[];window.adBreak=window.adConfig=function(l){window.adsbygoogle.push(l)};var f=document.createElement("script");f.setAttribute("type","text/javascript");b&&f.setAttribute("data-ad-client",b);c&&f.setAttribute("data-ad-channel",c);f.setAttribute("data-ad-frequency-hint",d);f.setAttribute("crossorigin","anonymous");f.src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js";f.async=!0;b=document.getElementsByTagName("script")[0];
|
||
b.parentNode.insertBefore(f,b);var g=a.app.audio;window.adConfig({preloadAdBreaks:"on",sound:!g.isEnabled()||g.Qg&&g.Eg?"off":"on",onReady:function(){a.D=!0;za("H5 ready")}});g.on(Qn,e).on(Rn,e)}function YK(a){(function(b){var c=window.cpmstarx=window.cpmstarx||{},d=Math.round(999999*Math.random()),e=document.createElement("script");e.type="text/javascript";e.async=!0;e.onerror=function(){function g(l){l&&"object"===typeof l&&l.Cn&&l.Cn()}c&&Array.isArray(c.Yl)&&c.Yl.forEach(g)&&(c.Yl.length=0);window.cpmstarAPI=
|
||
window["_"+b]=g};var f=document.location.protocol;f="https:"==f||"file:"==f?"https://server":"//cdn";"#cpmstarDev"==window.location.hash&&(f="//dev.server");"#cpmstarStaging"==window.location.hash&&(f="//staging.server");e.src=f+".cpmstar.com/cached/zonefiles/"+b+".js?rnd="+d;d=document.getElementsByTagName("script")[0];d.parentNode.insertBefore(e,d);window.cpmstarAPI=function(g){(c.cmd=c.cmd||[]).push(g)}})("912_31707_gameapi");window.cpmstarAPI(function(b){(a.sb=new b.game.InterstitialView("interstitial")).load();
|
||
(a.ua=new b.game.RewardedVideoView("rewardedvideo")).load()})}function fD(a){return window.FB?Promise.resolve():new Promise(function(b,c){var d=a.app;d.scripts.get("https://connect.facebook.net/"+d.locale.ma("en_US")+"/sdk.js",{Ga:1,timeout:10},function(){window.FB?(FB.init({appId:a.ji,version:"v21.0"}),b()):c("Can't load Facebook SDK")},c)})}function UK(a){return fD(a).then(function(){return new Promise(function(b,c){var d=window.setTimeout(function(){d=-1;c("FB.getLoginStatus timeout")},15E3);FB.getLoginStatus(function(e){za("FB status: "+
|
||
JSON.stringify(e));if(-1!==d){window.clearTimeout(d);d=-1;var f=e.error;f?c(f):"connected"===e.status?b(ft(a,e.authResponse)):(a.app.storage.remove("login"),b())}})})}).catch(function(b){za(b)}).then(function(b){var c=a.app.storage.ma("login","");if(b){var d=b.pd();c!==d&&a.app.storage.rc("login",d)}else 0===c.indexOf(dt)&&(b=ft(a,{userID:c.substring(c.indexOf(".")+1)}));return b})}function ZK(a){a.Ef(Ug);return fD(a).then(function(){a.Ef(Fj);return new Promise(function(b,c){FB.login(function(d){var e=
|
||
d.error;e?c(e):"connected"===d.status?b(ft(a,d.authResponse)):c()},{scope:"public_profile, user_friends"})})})}function ft(a,b){var c=new gt(a.app);c.appId=a.ji;c.o=b.accessToken;c.O=b.userID;return c}function $K(a){return Xc.default.send("VKWebAppInit",{}).then(function(){za("VKWebAppInit success");return new ht(a.app)})}function QK(){return Xc.default.send("VKWebAppShowInviteBox",{}).then(function(a){return a.success},function(a){if(a&&"client_error"===a.error_type)return!1;throw a;})}function aL(a,
|
||
b){return Xc.default.send("VKWebAppShowRequestBox",{uid:b[0],message:a,requestKey:""}).then(function(c){return c.success},function(c){if(c&&"client_error"===c.error_type)return!1;throw c;})}function RK(){return Xc.default.send("VKWebAppAddToHomeScreenInfo").then(function(a){return a.is_feature_supported&&!a.is_added_to_home_screen})}function bL(){return Xc.default.send("VKWebAppAddToHomeScreen").then(function(a){return a.result},function(a){if(a&&"client_error"===a.error_type)return!1;throw a;})}
|
||
function gD(a,b,c,d){if(a.va===nc)return b?Promise.reject("StoryBox is not implemented"):Xc.default.send("VKWebAppShare",{link:Tg(a,void 0,void 0,d)}).then(function(e){return!!e.result},function(e){if(e&&"client_error"===e.error_type)return!1;throw e;});ub("https://vk.com/share.php?noparse=true&url="+encodeURIComponent(Tg(a,void 0,c,d))+"&title="+encodeURIComponent(b||""),626,436);return Promise.resolve()}function Sn(a,b){a.wa[b]=!1;Xc.default.send("VKWebAppCheckNativeAds",{ad_format:b}).then(function(c){a.wa[b]=
|
||
!!c.result},function(c){za(c)})}function cL(a,b){var c=b.type;if("start"===c)b.adBreakDone({breakStatus:"other"});else if(cD(a,b))b.adBreakDone({breakStatus:"frequencyCapped"});else{var d="reward"===c,e=d?"reward":"interstitial";a.wa[e]?(c=function(){b.beforeAd();var f="other";Xc.default.send("VKWebAppShowNativeAds",{ad_format:e}).then(function(g){g.result&&(f="viewed")},function(g){za(g)}).then(function(){Sn(a,e);d&&"viewed"===f&&b.adViewed();b.afterAd();b.adBreakDone({breakStatus:f})})},d?(a.j=
|
||
b,b.beforeReward(c)):c()):(Sn(a,e),b.adBreakDone({breakStatus:"noAdPreloaded"}))}}function NK(a){var b=a.app;return new Promise(function(c,d){b.scripts.get("/sdk.js",{Xa:"/sdk.js"},function(){window.YaGames?YaGames.init({}).then(function(e){if(e.environment.app.id){vs(b.locale,e.environment.i18n.lang);a.ec=e;if(b.Ub=e.deviceInfo.isTV())e.on(e.EVENTS.HISTORY_BACK,function(){b.input.A(Qe,Q.BACK);b.input.A(ys,Q.BACK)});var f=1;e.on("game_api_pause",function(){f=b.audio.Dg;b.audio.Dg=0;b.input.cancel();
|
||
b.Cd=!1;b.focused&&(b.focused=!1,b.A(tj))});e.on("game_api_resume",function(){0!==f&&(b.audio.Dg=f);b.Cd=!0;b.focused||(b.focused=!0,b.A(uj))});e.features.GamesAPI.getAllGames().then(function(g){a.Rb=g.games||a.Rb;a.C=g.developerURL},function(g){za(g)});za("Yandex SDK inited on device '"+e.deviceInfo.type+"'");c()}else d("Yandex app id is unknown")},function(e){d(e)}):d("Can't load Yandex SDK")})})}function dL(a){var b=a.app;return a.ec.getPlayer(a.Jh).then(function(c){var d=new ll(b,c),e=b.storage;
|
||
e.has("yandex")&&(e.rc(d.pd(),e.ma("yandex")),e.rc("yandex_old",e.ma("yandex")),e.remove("yandex"));c.onLogout&&c.onLogout(function(){!a.na&&window.location&&window.location.reload()});return d})}function eL(a){a.na=!0;return a.ec.getPlayer(a.Jh).then(function(b){return"lite"===b.getMode()?(a.$f(),a.ec.auth.openAuthDialog().then(function(){return a.ec.getPlayer(a.Jh).then(function(c){return"lite"===c.getMode()?Promise.reject("Yandex Auth failured."):new ll(a.app,c)})},function(c){c&&c.code&&("AUTH_DIALOG_CANCEL"===
|
||
c.code||"AUTH_WINDOW_REJECTED"===c.code||"AUTH_TIMEOUT"===c.code)&&(c=void 0);return Promise.reject(c)})):new ll(a.app,b)})}function SK(a){a=a.ec;return a.shortcut&&a.shortcut.canShowPrompt?a.shortcut.canShowPrompt().then(function(b){return!!b.canShow}):Promise.resolve(!1)}function fL(a){return a.ec.shortcut.showPrompt().then(function(b){return"accepted"===b.outcome})}function gL(a,b){var c=b.type;if("start"===c)b.adBreakDone({breakStatus:"other"});else if(a.ec&&a.ec.adv&&a.ec.adv.showFullscreenAdv&&
|
||
a.ec.adv.showRewardedVideo){var d="reward"===c;c=function(){b.beforeAd();var e="other";if(d){a.Ef(Ug);var f=!0;a.ec.adv.showRewardedVideo({callbacks:{onClose:function(){f&&(f=!1,a.$f());"dismissed"===e&&b.adDismissed();b.afterAd();b.adBreakDone({breakStatus:e})},onError:function(g){"viewed"!==e&&(e="other");za(g)},onRewarded:function(){e="viewed";b.adViewed()},onOpen:function(){f&&(f=!1,a.$f());e="dismissed"}}})}else a.ec.adv.showFullscreenAdv({callbacks:{onClose:function(g){g&&(e="viewed");b.afterAd();
|
||
b.adBreakDone({breakStatus:e})},onError:function(g){za(g)}}})};d?(a.j=b,b.beforeReward(c)):c()}else b.adBreakDone({breakStatus:"notReady"})}function it(){var a=Error.call(this,"Notifications are blocked");this.message=a.message;"stack"in a&&(this.stack=a.stack)}function Ys(a){var b=Error.call(this,"Notifications are blocked at "+a);this.message=b.message;"stack"in b&&(this.stack=b.stack);this.g=a}function jt(){var a=Error.call(this,"Data version was changed on the server in another session.");this.message=
|
||
a.message;"stack"in a&&(this.stack=a.stack)}function Tn(){var a=Error.call(this,"Email wrong");this.message=a.message;"stack"in a&&(this.stack=a.stack)}function kt(){var a=Error.call(this,"Email code wrong");this.message=a.message;"stack"in a&&(this.stack=a.stack)}function lt(a){this.id=a}function il(a){this.M=null;var b=this;this.app=a;this.cache={};this.Z=!1;this.Ni=null;a.on(Xs,this.H=function(){if(b.Z&&!b.Ni){b.Z=!1;var c=b.getData(),d=c.v=z();(b.Ni=b.Yi(c)).then(function(){b.Ni=null;b.rc("v",
|
||
d)},function(e){za(e);b.Ni=null})}});this.D=null}function ml(a,b){var c=JSON.stringify(a.cache);c=hL(c);5<c.length&&(c=c.substring(0,5)+U("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=")+c.substring(5));a.app.storage.rc(a.pd(),c);"v"!==b&&(a.Z=!0)}function UC(a){var b=a.app.storage.ma(a.pd());if(b){6<b.length&&(b=b.substring(0,5)+b.substring(6));try{b=QC(b)}catch(d){b="{}"}}else b="{}";try{var c=JSON.parse(b)}catch(d){c={}}a.cache=c}function mt(a,b){b=b||[];return(a.D?a.D(b):Promise.resolve()).then(function(c){c=
|
||
c||b;a.A(Un,c)},function(c){za(c)})}function jl(a){il.call(this,a);this.g=!1}function Vn(a){return a?(a=String(a),156>a.length&&a.toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)):!1}function hD(a,b){var c=a.app,d=c.locale;return new Promise(function(e,f){c.scripts.get("https://widget.payselection.com/lib/pay-widget.js",function(){(new pw.PayWidget).pay({serviceId:"23155",key:"043604d0a6cf5f99c7af3e431eb5efcfd4e912668e11a8d73bfcdd5012e9a2fa83e897c760b94b3e7db160ac3a76b3a6a55da0b05ed694abcbb7de79a741845ce0"},
|
||
{MetaData:{PaymentType:"Pay"},CustomerInfo:{Language:d.language},PaymentRequest:{OrderId:b,Amount:null.lp(),Currency:null.Ll(),Description:d.ma(null.title)+": "+d.ma(null.description),ExtraData:{ShortDescription:d.ma(null.title)}}},{onSuccess:function(){e(new lt(null.id))},onError:function(g){f(g)},onClose:function(){f()}})},f)})}function Yc(a){jl.call(this,a);var b=this;this.j=this.m=null;this.D=function(c){var d=a.platform,e=d.Pb();if(void 0!==e&&0<c.length){for(var f=[],g={},l=0;l<c.length;++l){var n=
|
||
c[l],r=n.id;f.push(r);g[r]=n}return nl(b,d.yc+"/backend/"+d.Re,{action:"bestscores",ids:f.join(",")}).then(function(w){w=w.split(",");for(var y=0;y<f.length;++y)g[f[y]].xe="undefined"!==typeof GEMIOLI_DEBUG_FRIENDS&&GEMIOLI_DEBUG_FRIENDS?e+Math.floor(2147483647*Math.random())%(GEMIOLI_DEBUG_FRIENDS||1E3):Qa(w[y],0)})}return Promise.resolve()}}function Wn(a,b){var c=a.app.platform;b.action="load";return Qb(c.yc+"/backend/"+c.Re,"POST",b).then(function(d){return d?(d=JSON.parse(d),a.m=d.sid,a.j=null,
|
||
d.data):Promise.reject("No load response")})}function nl(a,b,c){var d="POST";d=void 0===d?"GET":d;c=void 0===c?{}:c;var e=void 0===e?0:e;if(!a.m)return Promise.reject("No session");c.sid=a.m;return Qb(b,d,c,e).catch(function(f){if(f instanceof XB&&403===f.code||h("god_session"))return new Promise(function(g,l){var n=a.j;(n||(a.j=[])).push(function(r){r?(c.sid=r,g(Qb(b,d,c,e))):l(f)});n||(n=a.j,a.vf().then(function(r){return r&&a.ma("v","")!==r.v?(a.m=null,a.app.platform.Wj(new jt),null):a.m},function(r){za(r);
|
||
return null}).then(function(r){a.j===n&&(a.j=null);for(var w=0;w<n.length;++w)n[w](r)}))});throw f;})}function gt(a){Yc.call(this,a);this.l=this.email=this.O=this.o=this.appId=null;this.u=this.C=!1}function iL(a){return null===a.email?new Promise(function(b){FB.api("/me","GET",{fields:"email"},function(c){var d=c.error;d&&za(d);a.email=c.email||"";b()})}):Promise.resolve()}function iD(a){return new Promise(function(b,c){FB.api("/me/permissions",function(d){var e=d.error;if(e)c(e);else{d=d.data;e=
|
||
!1;for(var f=0;f<d.length;++f){var g=d[f];if(g.permission===a){e="granted"===g.status;break}}b(e)}})})}function jD(a,b){return new Promise(function(c,d){FB.login(function(e){var f,g=e.error;if(g)d(g);else if("connected"===e.status&&(f=e.authResponse)){a.o=f.accessToken;e=!1;if(f=f.grantedScopes)for(f=f.split(","),g=0;g<f.length;++g)if(f[g]===b){e=!0;break}c(e)}else c(!1)},{scope:b,auth_type:"rerequest",return_scopes:!0})})}function ht(a){Yc.call(this,a);a=a.ai;this.O=a.vk_user_id||a.viewer_id;this.nd=
|
||
null;this.C=this.u=this.g=this.o=this.l=!1}function kD(a){return Xc.default.send("VKWebAppGetAuthToken",{app_id:a.app.platform.Wg,scope:""}).then(function(b){return b.access_token})}function nt(a){return Xc.default.send("VKWebAppCheckAllowedScopes",{scopes:a}).then(function(b){return(b=b.result)&&Array.isArray(b)&&0<b.length&&b[0].allowed})}function ll(a,b){Yc.call(this,a);this.B=b}function ve(a){this.M=null;this.app=a;this.id=++lD;this.name=null}function Xn(a,b,c,d,e,f,g,l){c=void 0===c?Pg:c;d=void 0===
|
||
d?Pg:d;e=void 0===e?of:e;f=void 0===f?Pg:f;g=void 0===g?Pg:g;l=void 0===l?of:l;this.name=a;mD[a]=this;this.enabled=void 0===b?!1:b;this.src=c;this.Hk=d;this.Kk=e;this.ql=f;this.Ik=g;this.Lk=l}function sd(a,b){this.M=null;this.id=jL++;this.version=0;this.Jf=a||nD.Jf;this.Qe=b||nD.Qe}function rf(a,b,c){a=void 0===a?Xf:a;this.M=null;this.id=kL++;this.version=0;this.Pc=ol;this.o=a;this.Sd=void 0===b?0:b;this.Qd=void 0===c?0:c;this.j=this.m=!1;this.O=this.C=oD;this.u=this.l=pl;this.g=null;this.loaded=
|
||
!0}function pD(){var a=new rf(null,512,512);a.Fi=pl;return a}function Qd(a,b){a=void 0===a?[]:a;b=void 0===b?!1:b;this.M=null;this.id=lL++;this.version=0;Y(a)||(a=new Pd(a));this.data=a;this.Oe=b;this.ib=this.Hf=0}function Yb(a,b,c,d,e){b=void 0===b?0:b;c=void 0===c?0:c;d=void 0===d?0:d;e=void 0===e?!1:e;a instanceof Qd||(a=new Qd(a));this.eb=a;this.size=b;this.offset=c;this.stride=d;this.wi=e}function de(a,b){a=void 0===a?[]:a;b=void 0===b?!1:b;this.M=null;this.id=mL++;this.version=0;Y(a)||(a=new Th(a));
|
||
this.data=a;this.Oe=b;this.Fk=this.ib=this.Hf=0;this.sg=-1}function Dd(){this.M=null;this.id=nL++;this.attributes={};this.Kb=null;this.Tf=new rj;this.bh=0;this.vk={}}function Fn(a,b){var c=a.bh;if(c!==b){c=c||1;var d=a.attributes,e=0,f,g=a.Kb;if(f=d.position)e=Math.floor(f.eb.data.length/c/(f.stride>>2||3)),b=Math.min(b,Math.floor(32767/e));a.bh=b;if(g){var l=g.data;a=l.length/c;for(var n=g.data=new Th(b*a),r=0;r<b;++r)for(var w=0,y=r*a,A=r*e;w<a;)n[y++]=l[w++]+A;g.upload()}for(var H in d)if("batchIndex"!==
|
||
H&&(f=d[H],0===f.offset)){l=f.eb;n=l.data;a=n.length/c;n=n.subarray(0,a);g=l.data=new Pd(b*a);for(r=0;r<b;)g.set(n,r++*a);l.upload()}g=new Pd(b*e);for(c=0;c<b;++c)for(H=c*e,a=(c+1)*e;H<a;)g[H++]=c;(f=d.batchIndex)&&f.dispose();d.batchIndex=new Yb(g,1)}}function wj(a){var b=a.attributes.position,c,d,e;a=a.Tf||(a.Tf=new rj);if(b&&(c=b.eb)&&(d=c.data)&&0<(e=d.length)){var f=a.V,g=c=b.offset/4;b=b.stride/4||3;for(var l=d[g],n=l,r=d[g+1],w=r,y=d[g+2],A=y,H,I,O;(g+=b)<e;)H=d[g],I=d[g+1],O=d[g+2],H<l&&(l=
|
||
H),H>n&&(n=H),I<r&&(r=I),I>w&&(w=I),O<y&&(y=O),O>A&&(A=O);f.set(.5*(l+n),.5*(r+w),.5*(y+A));l=0;n=f.x;r=f.y;f=f.z;for(g=c;g<e;)H=d[g]-n,I=d[g+1]-r,O=d[g+2]-f,l=Math.max(l,H*H+I*I+O*O),g+=b;a.radius=Math.sqrt(l)}}function HK(a){var b=a.attributes,c=b.position,d,e,f;if(c&&(d=c.eb)&&(e=d.data)&&0<(f=e.length)){var g=b.normal;d=c.offset/4;var l=c.stride/4||3;f=f/l*3;g&&g.dispose();c=new Pd(f);for(g=0;g<f;++g)c[g]=0;var n=(a=a.Kb)?a.data:null;if(n)for(var r=0,w=n.length,y,A,H;r<w;){y=n[r++];d=y*l;a=e[d];
|
||
g=e[d+1];var I=e[d+2];A=n[r++];d=A*l;var O=e[d]-a,S=e[d+1]-g,R=e[d+2]-I;H=n[r++];d=H*l;var ja=e[d]-a,ka=e[d+1]-g;g=e[d+2]-I;a=S*g-R*ka;g=R*ja-O*g;I=O*ka-S*ja;d=3*y;c[d++]+=a;c[d++]+=g;c[d++]+=I;d=3*A;c[d++]+=a;c[d++]+=g;c[d++]+=I;d=3*H;c[d++]+=a;c[d++]+=g;c[d++]+=I}else for(n=0;n<f;)a=e[d],g=e[d+1],I=e[d+2],d+=l,O=e[d]-a,S=e[d+1]-g,R=e[d+2]-I,d+=l,ja=e[d]-a,ka=e[d+1]-g,g=e[d+2]-I,d+=l,a=S*g-R*ka,g=R*ja-O*g,I=O*ka-S*ja,c[n++]+=a,c[n++]+=g,c[n++]+=I,c[n++]+=a,c[n++]+=g,c[n++]+=I,c[n++]+=a,c[n++]+=g,
|
||
c[n++]+=I;for(e=0;e<f;)d=e,a=c[d++],g=c[d++],I=c[d++],d=Math.sqrt(a*a+g*g+I*I),d=0===d?0:1/d,c[e++]=a*d,c[e++]=g*d,c[e++]=I*d;b.normal=new Yb(c,3)}}function ps(a){var b=a.attributes,c=0,d=0;a=[];for(var e in b){var f=b[e];0<f.size&&(c+=f.count*f.size,d+=f.size);-1===a.indexOf(f.eb)&&a.push(f.eb)}e=new Pd(c);var g=new Qd(e,!1),l=0;for(I in b)if(f=b[I],0<f.size){c=f.size;for(var n=0,r=f.count,w=f.stride/4||c,y=f.offset/4,A=f.eb.data;n<r;++n)for(var H=0;H<c;++H)e[n*d+l+H]=A[n*w+y+H];f.eb=g;f.offset=
|
||
4*l;f.stride=4*d;l+=f.size}var I=0;for(b=a.length;I<b;++I)a[I].dispose()}function ot(a){var b=new Dd;b.Tf.set(0,0,0,void 0===a?0:a);return b}function qD(a){a=void 0===a?{}:a;this.id=oL++;this.fg=a.fg||Yn;this.Sa=a.Sa||null;this.depthFunc=a.depthFunc||rD;this.Qc=void 0===a.Qc?!0:a.Qc;this.Vf=void 0===a.Vf?!0:a.Vf;this.nj=void 0===a.nj?!0:a.nj;this.cullFace=a.cullFace||Mn;this.$e=a.$e||0;this.af=a.af||0;this.lineWidth=a.lineWidth||1;this.Vg=a.Vg||"void main() {\n gl_Position = vec4(0.0, 0.0, 0.0, 1.0);\n}";
|
||
this.wg=a.wg||"void main() {\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n}";this.Cb=null}function we(a){a=void 0===a?{}:a;this.id=pL++;this.qc=a.qc||Vg;this.we=0;this.Ja=a.Ja||{};this.Uf=a.Uf||{};this.hb=[];this.ig=[];if(a.hb){var b=0,c=this.hb,d=this.ig;a=a.hb;for(var e=a.length,f,g;b<e;++b)f=a[b],g=new qD(f),f=f.tag,void 0===f?c.push(g):d[f]=g}this.cg()}function sD(a,b,c){var d=a.Ja;if(c){if(d[b]=c,d[b+"OR"].set(c.hd,c.jd,c.Wf,c.Xf),c.Ea.alpha?a.define(b+"ALPHA"):sf(a,b+"ALPHA"),!c.isLoaded())c.once(Ib,
|
||
function(){d[b]===c&&sD(a,b,c)})}else d[b]=Ed,sf(a,b+"ALPHA");return a}function sf(a,b){void 0!==a.Uf[b]&&(delete a.Uf[b],a.cg());return a}function ii(a,b){return void 0!==a.Uf[b]}function tD(a,b){for(var c=0,d=b.length,e,f,g,l;c<d;++c)e=b[c],f=a+e.Vg,g=a+e.wg,(l=uD[f])||(l=uD[f]={}),(e.Cb=l[g])||(e.Cb=l[g]=new sd(f,g))}function Zc(a){this.g=void 0===a?!1:a}function tf(a,b,c){a=void 0===a?0:a;b=void 0===b?!1:b;Zc.call(this,void 0===c?!1:c);this.radius=a;this.j=b}function Gj(a,b,c,d,e){a=void 0===
|
||
a?0:a;b=void 0===b?0:b;c=void 0===c?0:c;d=void 0===d?!1:d;Zc.call(this,void 0===e?!1:e);this.length=a;this.width=b;this.height=c;this.j=d}function Hj(a,b,c,d,e){a=void 0===a?0:a;b=void 0===b?0:b;c=void 0===c?360:c;d=void 0===d?!1:d;Zc.call(this,void 0===e?!1:e);this.radius=a;this.start=b;this.end=c;this.j=d}function ql(a,b,c){tf.call(this,void 0===a?0:a,void 0===b?!1:b,void 0===c?!1:c)}function Pe(a){a=void 0===a?new rf:a;lc.call(this);this.Ea=a;this.hd=0;this.ff=1;this.jd=0;this.Xf=this.Wf=this.hf=
|
||
1}function Yf(a,b,c,d,e,f,g,l,n,r,w){w=void 0===w?{}:w;this.width=void 0===a?0:a;this.height=void 0===b?0:b;this.hd=void 0===c?0:c;this.jd=void 0===d?0:d;this.ff=void 0===e?0:e;this.hf=void 0===f?0:f;this.dk=void 0===g?0:g;this.jf=void 0===l?0:l;this.advance=void 0===n?0:n;this.qb=void 0===r?null:r;this.g=w}function Wk(){lc.call(this);this.Te={};this.lineHeight=this.height=this.ii=this.gh=0;this.qb=null;this.Qj={};this.zm={}}function fC(a){var b=a.Te;if(!a.height){var c=b[65]||b[49];a.height=c?c.height:
|
||
0}a.lineHeight=a.lineHeight||1.2*a.height;var d=c=0,e;for(e in b){var f=b[e],g=f.jf;g<c&&(c=f.jf);f=g+f.height;f>d&&(d=f)}a.gh=a.gh||-c+a.height;a.ii=a.ii||d-a.height}function pt(a){lc.call(this);this.url=a}function Xh(){lc.call(this);this.buffer=null;this.start=0;this.end=1}function qs(){this.Le=[];this.Hb={}}function Xk(){lc.call(this);this.Za=new Dd;this.Wa=this.ke=null;this.In=2}function rs(){lc.call(this);this.hm={}}function ts(){lc.call(this);this.Id=[];this.aabb=new qj}function qt(){lc.call(this);
|
||
this.visible=!0;this.name="";this.duration=5;this.loop=!0;this.count=1;this.rate=new yb(10);this.Gj=new yb(5);this.Ah=qL;this.Mi=rt;this.Zj=new yb(5);this.Wb=new yb(5);this.Xb=new yb(5);this.Nd=new yb(5);this.speed=new yb(5);this.size=new yb(10);this.rotation=new yb(0);this.color=new Mg(new E(1,1,1));this.alpha=new yb(1);this.lh=new Zc;this.Ad=new yb(0);this.Bd=new yb(0);this.Yf=new yb(0);this.Sa=this.g=this.ke=null;this.Qc=!0;this.world=!1}function xj(a){a=void 0===a?[]:a;lc.call(this);this.Fb=a}
|
||
function rL(a){var b=a.Fb;a.Fb=[];a=0;for(var c=b.length;a<c;++a)b[a].dispose()}function Rd(a){ve.call(this,a);var b=this;this.Rd=this.lg=0;this.mg=!0;var c=a.audio.context;c?(this.u=c,this.g=c.createGain?c.createGain():c.createGainNode()):this.u=this.g=null;this.m=null;this.sb=0;this.O=this.o=null;this.Rb=0;this.D=!1;this.C=1;this.K=!1;this.Z=this.H=0;this.j=-1;this.Mb=function(){var d=b.o;d&&(Zn(d),b.o=null);if(b.D){d=b.u;var e=b.m,f=b.Z;if(d&&e){var g=b.Rb=(d.currentTime||0)+f;b.o=b.O;d=b.O=d.createBufferSource();
|
||
d.buffer=e;d.connect(b.ek());d.start?d.start(g,b.H,f):d.noteGrainOn(g,b.H,f)}b.j=window.setTimeout(b.Mb,1E3*f);b.A(sL)}else{b.j=-1;if(b.g)try{b.g.disconnect(0)}catch(l){}b.m=null;a.audio.ef.push(b);b.A($n)}};a.audio.on(lC,function(){var d=b.u,e=b.m;if(d&&e&&-1!==b.j){var f=b.Z;b.sb=Da(f-(b.Rb-d.currentTime),0,f);ao(b);b.m=e}}).on(kC,function(){var d=b.m;b.u&&d&&-1===b.j&&vD(b)})}function vD(a){var b=a.u,c=a.Z,d=a.sb,e=a.m;if(b&&e){var f=a.H,g=a.o=b.createBufferSource(),l=a.ek(),n=a.Rb=(b.currentTime||
|
||
0)+c-d;g.buffer=a.m=e;g.connect(l);g.start?g.start(0,f+d,c-d):g.noteGrainOn(0,f+d,c-d);a.D&&(a.O=g=b.createBufferSource(),g.buffer=e,g.connect(l),g.start?g.start(n,f,c):g.noteGrainOn(n,f,c));a.g.gain.value=a.C;a.g.connect(a.mg?a.app.audio.Pi:a.app.audio.Hi)}a.j=window.setTimeout(a.Mb,1E3*(c-d));return a}function ao(a){if(-1!==a.j){window.clearTimeout(a.j);a.j=-1;a.o&&(Zn(a.o),a.o=null);a.O&&(Zn(a.O),a.O=null);if(a.g)try{a.g.disconnect(0)}catch(b){}a.m=null}}function Zn(a){try{a.stop?a.stop(0):a.noteOff(0),
|
||
a.disconnect(0)}catch(b){}try{a.buffer=hC}catch(b){}}function ji(a){Rd.call(this,a);this.wd=""}function vj(a){Rd.call(this,a);this.P=1E4;this.J="linear";this.wa=this.W=1;this.na=this.Bb=this.ua=0;(a=a.audio.context)?(a=this.l=a.createPanner(),a.connect(this.g),a.distanceModel=this.J,a.refDistance=this.refDistance,a.jp=this.rolloffFactor,a.coneInnerAngle=360,a.coneOuterAngle=0,a.coneOuterGain=0,a.maxDistance=this.maxDistance):this.l=null}function Wg(a){ve.call(this,a);this.nk=this.Rd=this.lg=0;this.Vh=
|
||
1;this.mg=!0;(a=a.audio.context)?(this.l=a,this.g=a.createGain?a.createGain():a.createGainNode()):this.l=this.g=null;this.j=null;this.m=this.o=1;this.u=!1}function st(a){a.j&&(Zn(a.j),a.j=null);if(a.g)try{a.g.disconnect(0)}catch(b){}}function Ij(a){Wg.call(this,a);this.wd=""}function xe(a,b,c){c=void 0===c?{}:c;this.M=null;"string"===typeof b&&(b=a.app.xd.get(b));this.object=a;this.animation=b;this.xd=c;this.g=null;this.channels=[]}function $f(a,b,c){c=Xg(a,void 0===c?0:c);if(b){c.Ue={};for(var d=
|
||
0,e=b.length;d<e;++d)c.Ue[b[d]]=!0}else c.Ue=null;a.g=null}function Xg(a,b){b=void 0===b?0:b;var c=a.channels[b];c||(a.channels[b]=c=new tL(0===b?1:0),a.g=null);return c}function uf(a,b){a.object=b;a.g=null;return a}function tL(a){this.weight=a;this.animationName=this.Ue=null;this.time=1;this.loop=!1;this.timestamp=this.frame=this.T=this.Y=0}function zC(){this.X=null;this.viewport=new Xb;this.Pl=[];this.pk=0;this.scissor=new Xb;this.Ic=[];this.W=0;this.l=new Tb;this.na=[];this.K=0;this.matrix=new Oe;
|
||
this.Z=[];this.j=0;this.color=new kc(1,1,1,1);this.mk=[];this.Th=0;this.Sa=Dc;this.Rb=[];this.sb=0;this.g=!1;this.ua=[];this.Bb=0;this.D=new kb(0,0);this.Mb=[];this.H=0;this.O=new de([],!1);this.o=new Qd([],!0);this.ud=[this.o];this.rd=0;this.C=Dc;this.J=null;var a=this.u=Yg,b=this.wa=[],c;for(c in this.u)b.push(a[c]);this.m={projectionViewWorldMatrix:this.l};this.P=this.M=0}function wD(a,b){var c=a.Ic,d=a.scissor;c.length===a.W&&c.push(new Xb);c[a.W++].copy(d);d.Ha(b)||(a.flush(),d.copy(b),zs(a.X,
|
||
d.x,d.y,d.width,d.height))}function xD(a){a.flush();var b=a.scissor,c=a.Ic[--a.W];b.Ha(c)||(a.flush(),b.copy(c),zs(a.X,b.x,b.y,b.width,b.height))}function yD(a,b){var c=a.na,d=a.l;c.length===a.K&&c.push(new Tb);c[a.K++].copy(d);d.Ha(b)||(a.flush(),d.copy(b))}function zD(a){a.flush();var b=a.l,c=a.na[--a.K];b.Ha(c)||(a.flush(),b.copy(c))}function Zg(a,b){var c=a.Z,d=a.matrix;c.length===a.j&&c.push(new Oe);c[a.j++].copy(d);d.mb(b)}function AD(a,b){var c=a.Z,d=a.matrix;c.length===a.j&&c.push(new Oe);
|
||
c[a.j++].copy(d);d.copy(b)}function vf(a){a.matrix.copy(a.Z[--a.j])}function BD(a,b){var c=a.mk,d=a.color;c.length===a.Th&&c.push(new kc(1,1,1,1));c[a.Th++].copy(d);d.mb(b)}function tt(a){a.color.copy(a.mk[--a.Th])}function bo(a,b){a.Rb[a.sb++]=a.Sa;a.Sa=b}function co(a){a.Sa=a.Rb[--a.sb]}function ag(a,b){a=a.o;b=a.ib+b;b>a.data.length&&a.resize(2*b);return a}function bg(a,b){if((a.M+=b)>a.P){var c=a.M,d=a.P;for(b=d||1;b<c;)b*=2;c=a.O;var e=c.data,f=new Th(6*b);f.set(e,0);e=6*d;d*=4;for(var g=6*b;e<
|
||
g;d+=4)f[e++]=d,f[e++]=d+2,f[e++]=d+1,f[e++]=d,f[e++]=d+3,f[e++]=d+2;c.data=f;c.upload();a.P=b}}function CD(a,b){var c=a.ud,d=c[b];d||(c[b]=d=new Qd([],!0));c=0;for(var e=a.wa,f=e.length;c<f;++c)e[c].eb=d;a.rd=b;a.o=d}function sa(a,b,c,d,e){b=void 0===b?0:b;c=void 0===c?0:c;d=void 0===d?0:d;e=void 0===e?0:e;ve.call(this,a);this.Mb=!0;this.Z=this.O=0;this.rd=d;this.ud=e;this.Sd=b;this.Qd=c;this.Kl=this.ee=0;this.Jl=1;this.If=!1;this.te=this.Bb=1;this.j=!0;this.Ic=new Oe;this.parent=this.Sa=this.Rb=
|
||
null;this.children=[];this.Xe=!1}function fd(a){a.Kg=.5;return a}function Sd(a,b){a.Kg=.5;a.dg=b;return a}function uL(a){a.Wc=-1;return a}function DD(a){var b=a.Ic,c=a.rotation,d=a.Db,e=a.Wc,f=a.Kg,g=a.dg;if(0===c)0===f?0===g?b.set(d,0,0,e,a.x,a.y):b.set(d,0,0,e,a.x,a.y-g*a.height*e):0===g?b.set(d,0,0,e,a.x-f*a.width*d,a.y):b.set(d,0,0,e,a.x-f*a.width*d,a.y-g*a.height*e);else{var l=a.Kl,n=a.Jl;a.If&&(c*=cg,l=a.Kl=Math.sin(c),n=a.Jl=Math.cos(c),a.If=!1);c=d*n;d*=l;l*=-e;e*=n;0===f?0===g?b.set(c,d,
|
||
l,e,a.x,a.y):(g*=a.height,b.set(c,d,l,e,a.x-g*l,a.y-g*e)):(f*=a.width,0===g?b.set(c,d,l,e,a.x-f*c,a.y-f*d):(g*=a.height,b.set(c,d,l,e,a.x-f*c-g*l,a.y-f*d-g*e)))}a.j=!1;return b}function ED(a,b){a.Kg=a.dg=0;a.x=b.ub;a.y=b.vb;var c=b.a,d=b.b,e=b.c;b=b.d;var f=Math.sqrt(c*c+d*d),g=Math.sqrt(e*e+b*b);0>c*b-d*e&&(0===d&&0===e&&1===b?f=-f:g=-g);a.Db=f;a.Wc=g;a.rotation=Math.atan2(d,0>f?-c:c)*rl}function eo(a,b){var c=void 0===c?b:c,d=vL,e=a.parent;for(d.copy(a.matrix);e;)e.matrix.mb(d,d),e=e.parent;return d.Fc().transformPoint(b,
|
||
c)}function $c(a,b){a.opacity=b;return a}function ee(a,b,c){null!==b.parent&&b.parent.removeChild(b);D(a.children,c,b);b.parent=a;b.A($g);return a}function Fd(a,b){return a.Pg(fo(a.children,void 0===b?0:b))}function fo(a,b){b=void 0===b?0:b;for(var c=0,d=null,e=0;e<a.length;++e){var f=a[e];f.visible&&(d?c+=f.width+b:(c+=f.width,d=f))}if(d)for(e=d=0;d<a.length;++d)f=a[d],f.visible&&(f.x=e+f.width*f.Kg,e+=f.width+b);return c}function tb(a,b,c){b=void 0===b?1536:b;c=void 0===c?2048:c;sa.call(this,a,
|
||
b,c);var d=this;this.Hn=b;this.Gn=c;this.Pd=!1;this.priority=0;this.on($g,this.Nc).on(Jj,this.yb);this.m=null;this.Gg=0;this.o={};this.o[Q.Zg]={};this.o[Q.Sh]={};this.o[Q.$g]={};this.o[Q.Lh]={};this.Ph=this.wa=void 0;this.Qh=!0;this.on(Qe,function(e){if(a.Ub)switch(e){case Q.Zg:case Q.$g:case Q.Sh:case Q.Lh:return d.Ob(d.o[e][d.m?d.m.id:0],e)||!!d.m}})}function go(a){return Zf(a.app.screen)===a}function vb(a,b,c){a.o[Q.$g][b?b.id:0]=c;b&&c&&(a.o[Q.Zg][c.id]=b)}function ad(a,b,c){a.o[Q.Lh][b?b.id:
|
||
0]=c;b&&c&&(a.o[Q.Sh][c.id]=b)}function ye(a,b,c,d){a.o[Q.Sh][b?b.id:0]=c;(void 0===d||d)&&b&&c&&(a.o[Q.Lh][c.id]=b)}function Rb(a,b,c,d){a.wa=b;a.Ph=c;a.Qh=void 0===d?!0:d}function Ea(a,b,c,d,e,f){d=void 0===d?null:d;sa.call(this,a,void 0===b?0:b,void 0===c?0:c,void 0===e?0:e,void 0===f?0:f);"string"===typeof d&&(d=a.oa.get(d));this.l=d;this.Cb=ut;this.g=vt}function ho(a,b,c,d,e,f){Ea.call(this,a,void 0===b?0:b,void 0===c?0:c,void 0===d?null:d,void 0===e?0:e,void 0===f?0:f);this.m=null}function FD(a){a.m=
|
||
wL;return a}function ki(a,b,c,d,e,f,g,l,n){g=void 0===g?new Xb(e/2,f/2,0,0):g;l=void 0===l?sl:l;n=void 0===n?.5:n;Ea.call(this,a,b,c,d);this.C=e;this.u=f;this.o=g;this.type=l;this.m=n}function li(a,b,c,d,e,f,g){Ea.call(this,a,b,c,void 0,void 0===e?0:e,void 0===f?0:f);var l=this;this.ve=this.m=null;us(a.locale,this.o=function(){if(l.ve){var n=a.locale.language;l.qb=a.oa.get(l.ve+("en"===n?"":n+".")+l.m,g)}});d&&tl(this,d)}function tl(a,b){if(b){var c=a.m=ta(b);a.ve=b.replace(c,"")}else a.ve=a.m=null;
|
||
a.o();return a}function ah(a,b,c,d,e,f){Ea.call(this,a,void 0===b?0:b,void 0===c?0:c,void 0===d?null:d,void 0===e?0:e,void 0===f?0:f);this.value=0;this.type=xL}function wt(a,b){a.value=b;return a}function Se(a,b,c,d){d=void 0===d?[]:d;sa.call(this,a,b,c,.5,.5);this.pointerId=-1;this.keys=d;this.u=Ec;this.on(nf,this.Fl).on(el,this.Hl).on(bi,this.Gl).on(zj,this.El).on(Qe,this.Um).on(xt,this.Sn).on(Kj,this.Il)}function rb(a,b,c,d,e){c=void 0===c?"":c;sa.call(this,a,0,0,void 0===d?0:d,void 0===e?0:e);
|
||
this.Cb=ut;this.l=vt;this.wa=this.Cc=0;this.lf=[];this.g=!0;this.mf=!1;this.wb=this.xb=0;this.dc=GD;this.He=1;this.kf=this.Lc=this.Zc=this.Od=0;this.na=1;this.kg=[];this.m=c.toString();this.o=[];"string"===typeof b&&(b=a.fonts.get(b));this.ua=b}function bh(a,b){a.text=b;return a}function hb(a,b,c){a.kg[b]=c;a.g=a.j=!0;return a}function lb(a){a.K=.5;return a}function bd(a,b){a.C=b;return a}function Ta(a,b,c,d){a.C=b;a.P=c;void 0!==d&&(a.Ph=d);return a}function Lb(a,b){a.J=b;return a}function wf(a){a.W=
|
||
!0;return a}function nb(a,b,c,d,e){c=void 0===c?"":c;rb.call(this,a,b,c,void 0===d?0:d,void 0===e?0:e);var f=this;this.kd=c;this.H="";us(a.locale,this.D=function(){f.text=a.locale.ma(f.fc,f.Qh)})}function gd(a,b,c){a.fc=b;a.Qh=void 0===c?"":c;return a}function yt(a,b){sa.call(this,a);var c=this;this.Cb=ut;this.u=vt;this.$d=b;this.o=[];this.time=this.active=0;this.ce=1;this.m=0;this.Ad=new yb(0);this.Bd=new yb(0);this.g=!1;this.world=!0;this.l=!1;b.ia(function(){for(var d=c.$d,e=0,f=d.count,g=c.o=
|
||
Array(f);e<f;++e)g[e]=new yL;c.visible=d.visible;c.world=d.world;c.Sa=d.Sa;c.pb()});this.on(Jj,this.Vm)}function yL(){this.time=0;this.ce=1;this.y=this.x=0;this.Wb=new yb(0);this.Xb=new yb(0);this.speed=new yb(1);this.size=new yb(1);this.rotation=new yb(0);this.color=new Mg(new E(1,1,1));this.alpha=new yb(1)}function ch(a,b){"string"===typeof b&&(b=a.wc.get(b));sa.call(this,a);var c=this;this.Fb=[];this.g=b;b.ia(function(){for(var d=0,e=c.Fb,f=e.length;d<f;++d)c.removeChild(e[d]);d=c.app;e=c.g.Fb;
|
||
f=e.length;for(var g=c.Fb=Array(f),l=0,n;l<f;++l)n=g[l]=new yt(d,e[l]),n.g=!0,c.i(n)})}function Lj(a){tb.call(this,a);this.i(this.g=FD(new ho(a)).setColor(0));this.u=this.C=null;this.speed=2;this.l=!1}function zt(a,b,c,d,e){a.show(d,void 0===e?null:e,void 0,void 0);b&&(a.l=!1,a.app.platform.adBreak({type:b,name:c,qk:function(){a.l=!0}}))}function dg(a){tb.call(this,a);this.i(this.l=FD(new ho(a)).setColor(0));this.g=0}function xf(a,b,c,d,e){b=void 0===b?0:b;c=void 0===c?0:c;sa.call(this,a,b,c,void 0===
|
||
d?0:d,void 0===e?0:e);this.Va=new At(a);this.Ca=(new mi(a)).gd(45,b/c,.1,5E3);this.clearDepth=this.clearColor=!0;this.clearStencil=!1;this.o=new Tb;this.m=new Xb;this.g=new Xb}function ul(a,b,c){sa.call(this,a,b,c);this.Ck=new Xb;this.pointerId=-1;this.H=new kb;this.D=new kb;this.u=new kb;this.qe=new kb(0,0);this.J=new kb;this.l=new kb;this.m=new kb;this.o=new kb;this.g=1E3;this.K=new Xb;this.P=new Oe;this.on(nf,this.Wm);this.on(el,this.fk);this.on(bi,this.Xm);this.on(zj,this.fk);this.on(xC,this.sh);
|
||
this.C=new kb(0,0)}function HD(a,b,c){a.C.set(b,c);return a}function Mj(a,b,c,d,e){ul.call(this,a,b,c);this.Ve=new kb(d,e)}function io(a){return a.qe.x/a.Ve.x}function ib(a){ve.call(this,a);this.Xk=!1;this.Rb=!0;this.pe=this.oe=this.ne=this.z=this.y=this.x=0;this.cf=this.Wc=this.Db=this.me=1;this.Oa=new Tb;this.parent=null;this.children=[]}function IK(a,b){a.x=b[0];a.y=b[1];a.z=b[2]}function JK(a,b){a.ne=b[0];a.oe=b[1];a.pe=b[2];a.me=b[3]}function yf(a,b){a.ne=b.x;a.oe=b.y;a.pe=b.z;a.me=b.w;return a}
|
||
function JD(a,b){var c=void 0===c?td:c;return a.Cg(b.x,b.y,b.z,c)}function KK(a,b){a.Db=b[0];a.Wc=b[1];a.cf=b[2]}function KD(a,b){return b.Zl(jo.set(a.x,a.y,a.z),dh.set(a.ne,a.oe,a.pe,a.me),Bt.set(a.Db,a.Wc,a.cf))}function ni(a,b){a=a.Oa.elements;b.x=a[12];b.y=a[13];b.z=a[14];return b}function oi(a,b){a=a.Oa.elements;var c=b.Oa.elements;b=c[12]-a[12];var d=c[13]-a[13];a=c[14]-a[14];return b*b+d*d+a*a}function Gn(a){ib.call(this,a);this.Bj=new Tb;this.g=null;this.j=0}function mi(a){ib.call(this,a);
|
||
this.type=Ct;this.bottom=this.top=this.right=this.left=0;this.j=.1;this.g=5E3;this.Pk=45;this.hj=1;this.lc=new E(0,0,1);this.bf=new Tb;this.Ui=new Tb;this.zf=new Tb;this.od=new js;vl(this)}function vl(a){switch(a.type){case Ct:a.bf.Tj(a.left,a.right,a.top,a.bottom,a.j,a.g);break;case LD:a.bf.gd(a.Pk,a.hj,a.j,a.g);break;case zL:bC(a.bf,a.left,a.right,a.bottom,a.top,a.j,a.g);break;default:throw Error("Unknown camera type "+a.type);}ko(a);return a}function ko(a){var b=a.od;a=a.bf.mb(a.Ui,a.zf);b=b.Ce;
|
||
var c=a.elements;a=c[0];var d=c[1],e=c[2],f=c[3],g=c[4],l=c[5],n=c[6],r=c[7],w=c[8],y=c[9],A=c[10],H=c[11],I=c[12],O=c[13],S=c[14];c=c[15];b[0].set(f+e,r+n,H+A,c+S).normalize();b[1].set(f-e,r-n,H-A,c-S).normalize();b[2].set(f+a,r+g,H+w,c+I).normalize();b[3].set(f-a,r-g,H-w,c-I).normalize();b[4].set(f-d,r-l,H-y,c-O).normalize();b[5].set(f+d,r+l,H+y,c+O).normalize()}function Dt(){we.call(this,{Ja:{diffuseMap:Ed,diffuseMapOR:new dc(0,0,1,1),alphaTest:0,alpha:1},hb:[{Vg:AL,wg:BL}]})}function ac(a,b,c){c=
|
||
void 0===c?CL:c;ib.call(this,a);this.Xk=!0;this.Za=b;this.pa=c;this.Ja={worldMatrix:this.Oa};this.mh=!0;this.Hh=new rj}function Oa(a,b,c){c=void 0===c?new Dt:c;"string"===typeof b&&(b=a.Zb.get(b));ac.call(this,a,b.Za,c);var d=this;this.model=b;this.Wa=null;b!==DL&&b.ia(function(){var e=d.model,f=d.pa,g=e.Wa;e.ke&&f.Ja.diffuseMap===Ed&&f.Ld(e.ke);g&&(d.Wa=e.Wa.clone(d,d.Ja.bones=new Pd(16*g.Le.length)));Rg(d.app.X,d)})}function At(a,b){b=void 0===b?!0:b;ib.call(this,a);this.fe=b}function Et(a,b,c){c=
|
||
void 0===c?new Nj:c;ac.call(this,a,new Dd,c);var d=this;this.$d=b;this.m=[];this.time=this.active=0;this.ce=1;this.j=0;this.Ad=new yb(0);this.Bd=new yb(0);this.Yf=new yb(0);this.g=!1;this.Ja.color=new kc(1,1,1,1);this.Ti=new Qd;b.ia(function(){for(var e=d.$d,f=e.count,g=d.Za,l=g.attributes,n=0,r=d.m=Array(f);n<f;++n)r[n]=new EL(e);n=new Th(6*f);r=0;for(var w=4*f,y=0;r<w;r+=4)n[y++]=r,n[y++]=r+2,n[y++]=r+1,n[y++]=r,n[y++]=r+3,n[y++]=r+2;g.Kb=new de(n,!1);g=new Pd(8*f);for(r=n=0;n<f;++n)g[r++]=0,g[r++]=
|
||
0,g[r++]=1,g[r++]=0,g[r++]=1,g[r++]=1,g[r++]=0,g[r++]=1;l.uv=new Yb(g);f=d.Ti=new Qd(new Pd(36*f),!0);l.position=new Yb(f,3,0,36);l.pcolor=new Yb(f,4,12,36);l.sr=new Yb(f,2,28,36);d.visible=e.visible;d.pa.setWorld(e.world).Ld(e.ke).ya(e.Sa).Kd(e.Qc);d.pb();Rg(d.app.X,d)}).on(MD,function(){d.Za.dispose()});this.on(eh,this.Ym)}function EL(a){this.time=0;this.ce=1;this.z=this.y=this.x=0;this.Wb=new yb;this.Xb=new yb;this.Nd=new yb;switch(a.Ah){case 2:a.Wb.Pa(this.Wb);a.Xb.Pa(this.Xb);a.Nd.Pa(this.Nd);
|
||
this.speed=new yb(1);break;case 1:a.speed.Pa(this.speed=new yb);break;default:this.speed=new yb(1)}a.size.Pa(this.size=new yb);a.rotation.Pa(this.rotation=new yb);a.color.Pa(this.color=new Mg);a.alpha.Pa(this.alpha=new yb)}function Nj(){we.call(this,{qc:4E3,Ja:{diffuseMap:Ed,diffuseMapOR:new dc(0,0,1,1)},hb:[{Vf:!1,Vg:FL,wg:GL}]})}function wb(a,b){"string"===typeof b&&(b=a.wc.get(b));ib.call(this,a);var c=this;this.Oc=new kc(1,1,1,1);this.g=!0;this.j=4E3;this.Fb=[];this.m=b;this.on(wl,this.Zm);b.ia(function(){for(var d=
|
||
0,e=c.Fb,f=e.length;d<f;++d)c.removeChild(e[d]);d=0;e=c.app;f=c.m.Fb;for(var g=f.length,l=c.g,n=c.j,r=c.visible,w=c.Fb=Array(g),y=c.Oc,A;d<g;++d)A=w[d]=new Et(e,f[d],new Nj),A.g=!0,A.mh=l,A.pa.qc=n,A.visible=r&&A.$d.visible,A.Ja.color=y,c.i(A)})}function ze(a,b,c,d){c=void 0===c?new we:c;d=void 0===d?new Dd:d;ac.call(this,a,d,c);this.g=b;this.j=new Tb;this.m=new Oe}function Oj(a){ib.call(this,a);var b=this;this.wd=null;this.j=!1;this.Z=void 0;this.l=1E4;this.o="linear";this.Nh=this.O=this.C=1;this.m=
|
||
this.u=!1;this.g=null;this.on(Ae,this.gk).on(eh,this.hk);this.D=function(){b.g=null}}function Ft(a,b,c,d,e){E.call(this,a,b,c);this.local=new E(a,b,c);this.qh=this.ph=null;this.direction=new E;this.lc=new E;this.width=d;this.usage=e;this.Zd=[];this.eg=[]}function ND(){this.points=[]}function Xa(a,b,c,d,e,f){a.points.push(new Ft(b,c,d,e,f));return a}function Td(a,b){var c=a.points;c[c.length-1].ph=b;return a}function Ud(a){a=a.points;a[a.length-1].qh=td}function ob(a,b,c){var d=a.points;b=d[b];c=d[c];
|
||
b.Zd.push(c);c.eg.push(b);return a}function fe(a,b,c){var d=b[0];Xa(a,d.x,d.y,d.z,c);for(d=1;d<b.length;++d){var e=b[d];Xa(a,e.x,e.y,e.z,c);ob(a,d-1,d)}return a}function OD(a,b,c){var d=b.Zd,e=b.direction;if(!b.ph&&c)if(1<d.length){e.set(0,0,0);for(var f=0;f<d.length;++f)e.add(d[f].sub(b,Gt));e.normalize()}else c?b.sub(c,e).normalize():e.set(1,0,0);if(!b.qh&&c){var g=c.direction;f=g.Fa(e,Gt);1E-4<f.Ff?(e=Math.acos(Da(g.dot(e),-1,1)),b.lc.add(pj(HL,f,e).Gf(c.lc,Gt))):b.lc.add(c.lc)}for(c=0;c<d.length;++c)OD(a,
|
||
d[c],b)}function PD(){this.distance=Infinity;this.Kf=this.ue=null}function xl(){this.M=[];this.g=[];this.j=[]}function pi(a,b,c,d,e){c=void 0===c?!0:c;if(d){do{if(c){if(0===d.Zd.length)for(var f=a.g,g=0;g<f.length;++g){var l=f[g];if(1>l.De(d)){d=l;break}}}else if(0===d.eg.length)for(f=a.j,g=0;g<f.length;++g)if(l=f[g],1>l.De(d)){d=l;break}if(f=a.Hd(d,c,b)){g=f.sub(d,QD).normalize();l=b.sub(f,yl);var n=c?zl(a,f):Al(a,f);if(0===n.length){var r=g.dot(l);0<=r&&(d=f,e&&e(f))}else for(var w=0;w<n.length;++w)if(r=
|
||
n[w].sub(f,lo).normalize().add(g).dot(l),0<=r){d=f;e&&e(f);break}}}while(f&&0<=r);return d}a=a.search(b);return c?a.ue:a.Kf}function zl(a,b){if(0===b.Zd.length){a=a.g;for(var c=0;c<a.length;++c){var d=a[c];if(1>d.De(b))return d.Zd}return[]}return b.Zd}function Al(a,b){if(0===b.eg.length){a=a.j;for(var c=0;c<a.length;++c){var d=a[c];if(1>d.De(b))return d.eg}return[]}return b.eg}function mo(a,b,c,d,e){e=void 0===e?!0:e;for(var f=c.sub(b,QD).normalize(),g=Infinity,l=e?zl(a,c):Al(a,c),n=0;n<l.length;++n){var r=
|
||
l[n].sub(c,lo).normalize().add(f).normalize();r=f.scale(-(r.dot(d)-r.dot(c))/r.dot(f),yl).Ff;r<g&&(g=r)}l=Infinity;n=e?zl(a,b):Al(a,b);for(r=0;r<n.length;++r)if(n[r]!==c){var w=n[r].sub(b,lo).normalize().add(f).normalize();w=f.scale(-(w.dot(d)-w.dot(b))/w.dot(f),yl).Ff;w<l&&(l=w)}a=e?Al(a,b):zl(a,b);if(0<a.length)for(c=0;c<a.length;++c)e=b.sub(a[c],lo).normalize().add(f).normalize(),e=f.scale(-(e.dot(d)-e.dot(b))/e.dot(f),yl).Ff,e<l&&(l=e);else a=b.direction.add(f).normalize(),b=f.scale(-(a.dot(d)-
|
||
a.dot(b))/a.dot(f),yl).Ff,b<l&&(l=b);if(Infinity===g||Infinity===l)return 0;g=Math.sqrt(g);l=Math.sqrt(l);return l/(g+l)}function Bl(a){this.app=a;this.C=this.O=this.Z=this.u=0;this.od=null;this.focus=25;this.M=[];for(var b=0,c=this.M;550>b;++b)c[b]=new hl;this.m=0;this.j=new Pe(pD().ll(pl));this.D=new Pe(pD().ll(pl));a=a.X;a.cb(RD);a.cb(SD);this.l=new Tb;this.o=[];a=0;for(b=this.o;550>a;++a)b[a]=new hl;this.g=0;this.viewport=new Xb;this.clearColor=new kc}function TD(a,b){if(b.Xk){var c=!b.mh,d=b.Oa.elements,
|
||
e=d[12],f=d[13];d=d[14];var g=b.pa,l=g.hb,n=b.Za,r=n.id,w=!1;if(c||a.od.ze(b.Hh)){w=a.C*e+a.O*f+a.Z*d+a.u;e=a.M;f=g.qc;for(var y=0;y<l.length;++y){var A=l[y],H=a.m++;H=H===e.length?e[H]=new hl:e[H];H.object=b;H.qc=f;H.pa=g;H.Ze=A;H.bc=A.id;H.Za=n;H.Ec=r;H.z=w}w=!0}if(e=l=g.ig[Cl])(c=w||c)||(w=b.Hh,c=w.V,w=-w.radius,c=UD.Ne(c)>=w&&VD.Ne(c)>=w&&WD.Ne(c)>=w&&XD.Ne(c)>=w),e=c;e&&(c=a.o,w=a.g++,c=w===c.length?c[w]=new hl:c[w],c.object=b,c.pa=g,c.Ze=l,c.bc=l.id,c.Za=n,c.Ec=r,c.z=d)}d=0;b=b.children;for(g=
|
||
b.length;d<g;++d)n=b[d],n.visible&&0!==n.Db&&TD(a,n)}function na(a){a=void 0===a?{Ja:{diffuseMap:Ed,diffuseMapOR:new dc(0,0,1,1),alphaTest:0,backgroundMap:no,fov:oo,fog:Ht},Uf:{BATCHING:""},hb:[{Vg:YD,wg:ZD}]}:a;we.call(this,a)}function po(a){a.define("COLOR");return a}function eg(a){a.define("ALPHA");return a}function Za(a,b){if(b&IL){if(!a.ig[Cl]){var c=Cl,d=new qD({Vg:"#define CASTER\n#define NODIFFUSEMAP\n"+YD,wg:"#define CASTER\n#define NODIFFUSEMAP\n"+ZD,cullFace:a.hb[0].cullFace});void 0===
|
||
c?a.hb.push(d):a.ig[c]=d;a.cg()}c=a.Ja.caster||(a.Ja.caster=new dc(0,0,0,1));c.x=b&kd?1:0;c.y=b&Jc?1:0;c.z=b&Wb?1:0}else C(a.ig,Cl);b&JL?(a.define("SHADOWMAP"),c=a.Ja.receiver||(a.Ja.receiver=new dc),c.x=b&Gd?1:0,c.y=b&qo?1:0,c.z=b&tc?1:0):sf(a,"SHADOWMAP");return a}function Fb(a){na.call(this,a);sf(this,"BATCHING")}function It(a){ac.call(this,a,KL,LL);this.mh=!1;Rg(a.X,this)}function qi(a){ac.call(this,a,ML,NL);Rg(a.X,this);this.aabb=new qj}function $D(a){ib.call(this,a);this.i(new Oa(a,"assets/general/sphere.mdl",
|
||
aE))}function Jt(a){ib.call(this,a);this.i(this.g=new ac(a,OL,aE))}function ro(a,b){ac.call(this,a,PL,b);this.color=this.Ja.color=new kc;Rg(a.X,this)}function ri(a,b,c,d,e){nb.call(this,a,b,void 0===c?"":c,void 0===d?0:d,void 0===e?0:e);a.X.cb(this.Cb=QL);a.X.cb(this.l=RL)}function Kc(a){ib.call(this,a);this.body=this.$l();this.Sc=null;this.H=!0;this.on(Ae,this.ha).on(eh,this.jb).on(Dl,this.nb)}function bE(a){var b=a.body,c=a.app.play;a=c.B;c=c.world.collisionMatrix;return c.get(b,a.body)||c.get(b,
|
||
a.tc.body)}function so(a){a.body.isTrigger=!0;return a}function Va(a,b){a.Sc=b;return a}function Vd(a,b){a.body.collisionFilterGroup=b;return a}function El(a,b){a.body.collisionFilterMask=b;return a}function Pa(a,b,c){Kc.call(this,a);this.i(this.ik=new Oa(a,b,c))}function cd(a,b,c){Pa.call(this,a,b,c)}function Fc(a,b,c,d){Pa.call(this,a,b,c);this.l=d}function ud(a){Kc.call(this,a);this.Be=new E;this.Ye=new E;this.rd=new Ic;this.ud=new Ic;this.K=new E;this.oi=0}function Kt(a,b,c){a.body.linearDamping=
|
||
b;a.body.angularDamping=c;return a}function Fl(a){var b=a.body,c=b.shapes.length;b=b.shapeOffsets;a=a.K;for(var d=0;d<c;++d){var e=b[d];e.vsub(a,e)}a.set(0,0,0)}function to(a){for(var b=a.body,c=b.shapes,d=c.length,e=0,f=0;f<d;++f)e+=c[f].volume();b=b.shapeOffsets;f=a.K;for(var g=0;g<d;++g)f.sub(b[g].scale(c[g].volume()/e,Be));for(c=0;c<d;++c)e=b[c],e.vadd(f,e);return a}function uo(a,b,c){ud.call(this,a);this.i(this.j=new Oa(a,b,c))}function Pj(a,b){b=Lr.call(this,b)||this;b.app=a;b.radius=200;return b}
|
||
function cE(a,b,c){c=void 0===c?5:c;a=Ur.call(this,a,b)||this;a.type=Ke.Wi;a.Jm=c;a.aabb.lowerBound.z-=c;return a}function Qj(a){return fb.call(this,a)||this}function Lt(){return pd.call(this)||this}function Sa(a,b,c){Pa.call(this,a,a.Zb.get(b,{Pn:!0}),c);var d=this;this.ik.model.ia(function(e){var f=e.Za;e=f.attributes.position.eb.data;var g=f.Kb.data;f=f.bh;0<f&&(e=new Pd(e.buffer,0,e.length/f),g=new Th(g.buffer,0,g.length/f));d.body.addShape(new cE(e,g))});this.g=new ND;this.j=!1;this.type=Mt;
|
||
this.color=null;c&&Za(c,Gd|qo|tc);Vd(this,4)}function Gl(a){Kc.call(this,a);this.i(this.j=new Oa(a,"assets/general/Coin01.mdl",dE)).i(this.second=new Oa(a,"assets/general/Coin01.mdl",dE)).i(this.g=new wb(a,"assets/general/coin_double.vfx"));this.o=!1;this.m=this.time=this.speed=this.l=0;El(Vd(so(this.gj(1.5)),16),2)}function uc(a){Kc.call(this,a);this.time=0;this.g=this.j=this.effect=null;this.m=!0;El(Vd(so(this.gj(1.5)),16),2)}function Hl(a,b,c){Nt(a,new Oa(a.app,b,c))}function eE(a,b,c){b=void 0===
|
||
b?Te:b;c=void 0===c?Ot:c;var d=a.app.S;(b=a.effect=d.aa(b))&&a.i(b);(c=a.j=d.aa(c))&&a.i(c)}function Nt(a,b){var c=a.g;c&&(a.Vc(c),c.L(!0));(a.g=b)&&a.i(b)}function fg(){na.call(this);sf(this,"BATCHING").Da(4E3)}function Pt(a){uc.call(this,a);Hl(this,"assets/general/CoinDuble01.mdl",SL)}function Qt(a){uc.call(this,a);Hl(this,"assets/general/Kanistra01.mdl",TL)}function Rt(a){uc.call(this,a);Hl(this,"assets/general/Nitro01.mdl",UL)}function St(a){uc.call(this,a);Hl(this,"assets/general/Mnoj01.mdl",
|
||
VL);this.m=!1}function Tt(a){uc.call(this,a);Hl(this,"assets/general/Magnit01.mdl",WL)}function Rj(a){uc.call(this,a);this.description=null}function Il(a,b){ud.call(this,a);this.ie=b;this.$j={};Va(Vd(this.Td(b.radius).sd(1),8),"assets/general/hit_metal.wav").on(Ut,this.g)}function vc(a,b){ud.call(this,a);this.ae=null;this.g=!0;this.speed=0;this.bd=!1;this.na=new E;this.Wd=null;this.D=!0;this.Kj=void 0;this.radius=b;Va(this,"assets/general/hit_metal.wav");a=this.tc=new Il(a,this);(this.If=new nn(this.body,
|
||
a.body,0)).collideConnected=!1}function Lc(a,b,c,d,e){vc.call(this,a,b);var f=this;Va(this,"assets/general/hit_metal.wav");this.Hd=new E;this.l=void 0;this.Ic=new Ic;this.cd=!1;this.J=.5;this.Z=null;this.dc=30;this.o=this.Bb=this.W=null;this.te=0;this.i(this.model=new Oa(a,d,e));Za(e,kd);this.rk(c);a=this.P=new xb({type:xb.DYNAMIC,mass:1,isTrigger:!0,collisionFilterMask:-29});a.addShape(new Mh(XL),YL);a.addEventListener("collide",function(g){g.body!==f.body&&f.dl()});this.wa=null;this.sb=[]}function si(a,
|
||
b,c,d,e){Lc.call(this,a,b,c,d,e);this.m=Vt;this.ee=this.j=0;this.O=!1;this.u=0;this.Mb=this.C=null}function Jl(a,b,c){Kc.call(this,a);this.i(this.model=new Oa(a,b,c));this.direction=this.g=2}function hd(a,b,c,d,e,f,g,l,n){Pa.call(this,a,b,c);Za(c,Wb);this.j=g;this.g=Math.abs(l);this.level=null;this.F(d,e,f,g,l,n).F(d,e,f,g,-l,n)}function vo(a,b,c,d,e,f,g,l,n){hd.call(this,a,b,c,d,e,f,g,l,n)}function wo(a,b,c,d,e,f,g,l,n){hd.call(this,a,b,c,d,e,f,g,l,n)}function xo(a,b,c,d,e,f,g,l,n){hd.call(this,
|
||
a,b,c,d,e,f,g,l,n)}function Ba(a,b,c){uo.call(this,a,b,c);Za(c,kd|tc);this.Ak=null;this.cd=!1;this.event=null;Kt(this.sd(5),.7,.5).oi=-1}function Qc(a,b,c,d){ib.call(this,a);this.l=b;this.m=c;this.o=d;this.g=[];this.cd=!1;this.Sc=null;this.effect=Wt;this.event=null;this.on(eh,this.j)}function fh(a,b,c){Pa.call(this,a,b,c);Vd(this,4);this.type=3}function zf(a){Oj.call(this,a);var b=this;this.H=function(){b.yh(!0)};this.J=function(){b.yh(!1)};this.D=function(){b.g=null;if(!b.j){var c=a.play;b.parent===
|
||
c.Va&&c.remove(b)}}}function Vb(a){Oa.call(this,a,"assets/general/LightUp.mdl",ZL);this.Ya("color",this.color=new kc(1,1,1,1))}function gg(a,b){wn(a.color,b);return a}function Ob(a,b){wb.call(this,a,b);this.on(Ae,this.o)}function Wt(a){Ob.call(this,a,"assets/general/break.vfx")}function Xt(a){Ob.call(this,a,"assets/general/break_box.vfx")}function Sj(a){Ob.call(this,a,"assets/general/break_red_white.vfx")}function Yt(a){Ob.call(this,a,"assets/general/break_tree.vfx")}function Zt(a){Ob.call(this,a,
|
||
"assets/general/break_stone.vfx")}function $t(a){Ob.call(this,a,"assets/general/break_trash.vfx")}function au(a){Ob.call(this,a,"assets/general/sparks.vfx")}function bu(a){Ob.call(this,a,"assets/general/color_drops.vfx")}function cu(a){Ob.call(this,a,"assets/general/stone_drops.vfx")}function du(a){Ob.call(this,a,"assets/general/earth.vfx")}function eu(a){Ob.call(this,a,"assets/general/magnet.vfx")}function fu(a){Ob.call(this,a,"assets/general/coin.vfx")}function yo(a){Ob.call(this,a,"assets/general/coinsgates.vfx")}
|
||
function zo(a){Ob.call(this,a,"assets/general/gasgates.vfx")}function Ao(a){Ob.call(this,a,"assets/general/nitrogates.vfx")}function Te(a,b){wb.call(this,a,void 0===b?"assets/general/bonus.vfx":b);this.Da(3999)}function Ot(a,b){wb.call(this,a,void 0===b?"assets/general/bonus_end.vfx":b)}function gu(a){wb.call(this,a,"assets/general/asphalt.vfx")}function hu(a){wb.call(this,a,"assets/general/asphalt_3.vfx")}function iu(a){wb.call(this,a,"assets/general/dust.vfx")}function ju(a){wb.call(this,a,"assets/general/dust_3.vfx")}
|
||
function ku(a){wb.call(this,a,"assets/general/bitum.vfx")}function lu(a){wb.call(this,a,"assets/general/bitum_3.vfx")}function mu(a){wb.call(this,a,"assets/general/accel.vfx")}function nu(a){wb.call(this,a,"assets/general/accel_3.vfx")}function ou(a){wb.call(this,a,"assets/general/pink_accel.vfx")}function pu(a){wb.call(this,a,"assets/general/val_accel.vfx")}function qu(a){wb.call(this,a,"assets/general/nitro.vfx")}function ru(a){wb.call(this,a,"assets/general/nitro_3.vfx")}function su(a){wb.call(this,
|
||
a,"assets/general/pink_nitro.vfx")}function tu(a){wb.call(this,a,"assets/general/val_nitro.vfx")}function Rc(a,b,c){b=void 0===b?(new Fb).define("TRAIL").tb(Sc):b;c=void 0===c?100:c;ib.call(this,a);this.i(this.g=new ac(a,new fE(c),b));this.Be=new E;this.alpha=this.m=this.o=this.distance=0;this.l=1;this.offset=new E(0,.5,0);this.on(Ae,this.C);Rg(a.X,this.g)}function fE(a){Dd.call(this);this.Tf.radius=5;this.Ti=null;this.xm=0;this.dispose();var b=this.attributes,c=this.Ti=new Qd(new Pd(12*a),!0);b.position=
|
||
new Yb(c,3,0,24);b.uv=new Yb(c,2,12,24);b.trailAlpha=new Yb(c,1,20,24);b=[];for(var d=c=0;d<a-1;++d)b[c++]=2*d,b[c++]=2*d+1,b[c++]=2*d+2,b[c++]=2*d+1,b[c++]=2*d+3,b[c++]=2*d+2;b[c++]=2*(a-1);b[c++]=2*(a-1)+1;b[c++]=0;b[c++]=2*(a-1)+1;b[c++]=1;b[c++]=0;this.Kb=new de(b);this.xm=a}function gh(a){Rc.call(this,a,gE);this.l=.1;this.j=0;this.g.Ya("color",this.color=new kc);this.effect=null;this.Ql=!1;this.Uc=this.la=null;this.u=0}function hE(a){var b=a.effect;b&&(b.Oc.a=0,a.removeChild(b),a.app.S.release(b),
|
||
a.effect=null);if(b=a.la)b.Oc.a=0,a.removeChild(b),a.app.S.release(b),a.la=null;if(b=a.Uc)b.Oc.a=0,a.removeChild(b),a.app.S.release(b),a.Uc=null}function ti(a){Rc.call(this,a,iE);this.l=.1;this.effect=null}function jE(a){var b=a.effect;b&&(b.Oc.a=0,a.removeChild(b),a.app.S.release(b),a.effect=null)}function hh(a){Rc.call(this,a,kE);this.l=.1;this.effect=null;this.j=0}function lE(a){var b=a.effect;b&&(b.Oc.a=0,a.removeChild(b),a.app.S.release(b),a.effect=null)}function ih(a){Rc.call(this,a,mE);this.time=
|
||
0;this.ie=null}function Bo(a,b,c,d){ib.call(this,a);var e=this;this.data=b;this.type=c;this.usage=d;this.uf=[];this.l=function(f){J(e.uf,f);f.off(uu,e.l)};this.o=new qj;this.m=new Tb;this.Zd=[];this.j=this.g=!1;this.vj=-1;this.Ml=this.cm=0;this.on(Ae,this.$m).on(eh,this.an)}function nE(a){var b=this;this.app=a;for(var c=this.Id=[{id:"Avtomat01",type:oE,count:14},{id:"BachokMesh01",type:pE,count:14},{id:"BackHouses",type:qE,count:16},{id:"Ballon01",type:rE,count:1},{id:"Ballon02",type:sE,count:1},
|
||
{id:"bankomat",type:tE,count:7},{id:"Banner00",type:uE,count:2},{id:"Blok01",type:vE,count:116},{id:"BochkaPrepztst",type:wE,count:19},{id:"BrBach01",type:xE,count:14},{id:"BrBach02",type:yE,count:14},{id:"BrShl01",type:zE,count:6},{id:"BrShl02",type:AE,count:6},{id:"BrShl03",type:BE,count:6},{id:"BrShl04",type:CE,count:6},{id:"BrTreeKus01",type:DE,count:22},{id:"BrTreeKus02",type:EE,count:22},{id:"BrTreeKus03",type:FE,count:22},{id:"Budka01",type:GE,count:4},{id:"klBrTr01",type:HE,count:22},{id:"BrTreeMesh01",
|
||
type:IE,count:22},{id:"chemodan01",type:Co,count:20},{id:"Doski01",type:JE,count:2},{id:"Elka01",type:vu,count:105},{id:"Fonar",type:wu,count:60},{id:"Fonar02",type:Do,count:48},{id:"FromPereul01",type:KE,count:3},{id:"GarajR",type:LE,count:28},{id:"Gazon01",type:ME,count:7},{id:"Gidrant01",type:NE,count:16},{id:"GorodKr01",type:OE,count:2},{id:"GorodKr02",type:PE,count:2},{id:"GorodKr03",type:QE,count:2},{id:"GorodPovL01",type:RE,count:2},{id:"GorodPovR01",type:SE,count:2},{id:"Gruz01",type:ge,count:12},
|
||
{id:"Gruz02",type:Eo,count:12},{id:"Gruz03",type:Fo,count:14},{id:"Hiway01",type:Go,count:1},{id:"House01_02",type:TE,count:47},{id:"House02",type:UE,count:13},{id:"House03",type:VE,count:31},{id:"House04",type:WE,count:30},{id:"House06",type:XE,count:12},{id:"House07",type:YE,count:34},{id:"House08",type:ZE,count:11},{id:"House09",type:$E,count:62},{id:"House12",type:aF,count:21},{id:"House013",type:bF,count:13},{id:"House13",type:cF,count:21},{id:"House017",type:Ho,count:16},{id:"HouseLittle",type:dF,
|
||
count:12},{id:"HouseLong01",type:eF,count:7},{id:"Ink01",type:Tj,count:1},{id:"Klumba01",type:fF,count:17},{id:"klumba02",type:gF,count:24},{id:"KolTunn01",type:hF,count:8},{id:"Konstr01",type:xu,count:12},{id:"Konus01",type:iF,count:58},{id:"Kust001",type:jF,count:59},{id:"Legk01",type:Ue,count:7},{id:"Legk02",type:yu,count:10},{id:"Legk03",type:zu,count:10},{id:"MagistIn01",type:kF,count:3},{id:"MagistTile01",type:lF,count:41},{id:"Market",type:mF,count:10},{id:"Maslo01",type:Io,count:12},{id:"Meshok01",
|
||
type:nF,count:12},{id:"Meshok02",type:oF,count:12},{id:"Meshok03",type:pF,count:12},{id:"Musorka01",type:qF,count:21},{id:"Ogr003",type:rF,count:66},{id:"Ostanovka01",type:sF,count:4},{id:"Pandus01",type:Au,count:28},{id:"PandusIn01",type:tF,count:6},{id:"ParkGr01",type:uF,count:10},{id:"PerehPark01",type:vF,count:2},{id:"PerehPark01_02",type:wF,count:2},{id:"PerekrKrest01",type:xF,count:6},{id:"Perekrvstr01",type:yF,count:2},{id:"PerekrY01",type:zF,count:1},{id:"PerKriv01",type:AF,count:2},{id:"PerKriv02",
|
||
type:BF,count:2},{id:"Pernatri0_2",type:CF,count:3},{id:"Pernatri01",type:DF,count:2},{id:"PerPovL01",type:EF,count:2},{id:"PerPovR01",type:FF,count:2},{id:"Pna5Polos01",type:GF,count:4},{id:"Poloska01",type:Bu,count:31},{id:"PoloskaDop01",type:Cu,count:13},{id:"Proj01",type:Jo,count:64},{id:"PS5Polos01",type:HF,count:3},{id:"Rekl03",type:IF,count:2},{id:"Road3Pol01",type:JF,count:10},{id:"Road3PolKr01",type:KF,count:2},{id:"Road3PolKr02",type:LF,count:2},{id:"Road3PolKr03",type:MF,count:2},{id:"RoadBig01",
|
||
type:NF,count:13},{id:"RoadOsn01",type:OF,count:20},{id:"RoadOsnDop01",type:PF,count:18},{id:"RoadPereul01",type:QF,count:9},{id:"RoadRazdel01",type:RF,count:12},{id:"RoadYama01",type:SF,count:2},{id:"Rock01",type:Du,count:156},{id:"shlagbaum01",type:TF,count:2},{id:"shtender01",type:UF,count:16},{id:"skameyka01",type:VF,count:24},{id:"SlMesh01",type:WF,count:6},{id:"Stat01",type:XF,count:3},{id:"StatBr01",type:YF,count:3},{id:"StatBr02",type:ZF,count:3},{id:"stend01",type:$F,count:7},{id:"Stol01",
|
||
type:aG,count:8},{id:"Stolb01",type:bG,count:48},{id:"StrMesh01",type:cG,count:30},{id:"StrBr01",type:Eu,count:30},{id:"StrBr02",type:Fu,count:30},{id:"StrBr03",type:Gu,count:30},{id:"stroyCl01",type:dG,count:5},{id:"StrClBr01",type:eG,count:5},{id:"StrClBr02",type:fG,count:5},{id:"StrClBr03",type:gG,count:5},{id:"Stul01",type:hG,count:32},{id:"SvetDown",type:iG,count:12},{id:"Svetof01",type:Kl,count:12},{id:"Telejka01",type:jG,count:12},{id:"ToPereul01",type:kG,count:3},{id:"Tr03",type:lG,count:12},
|
||
{id:"Tramplin01",type:Hu,count:10},{id:"TramplinLittl01",type:Iu,count:13},{id:"tree00",type:Ju,count:54},{id:"TreeSS",type:Ku,count:120},{id:"TriPovL01",type:mG,count:3},{id:"TriPovR01",type:nG,count:3},{id:"Tunnel01",type:Ll,count:3},{id:"TunnelIN01",type:Ko,count:19},{id:"Urna01",type:oG,count:6},{id:"vent_tube01",type:pG,count:4},{id:"Vorota01",type:qG,count:16},{id:"Vorota02",type:rG,count:13},{id:"Vorota03",type:sG,count:16},{id:"wall01",type:Lu,count:152},{id:"Water_tower01",type:tG,count:2},
|
||
{id:"Yasch01",type:uG,count:36},{id:"YaBr01",type:vG,count:36},{id:"YaBr02",type:wG,count:36},{id:"YaBr03",type:xG,count:36},{id:"Zabor001",type:yG,count:128},{id:"Zabor01",type:zG,count:94},{id:"Zaborchik01",type:AG,count:60},{id:"Znak01",type:BG,count:5},{id:"ZnakBr01",type:CG,count:1},{id:"Znakogr01",type:DG,count:12},{id:"ZnakStr01",type:EG,count:3},{id:"Znakvstr01",type:FG,count:4},{id:"ZnStop01",type:GG,count:18},{id:"ZnWay01",type:HG,count:16}],d=0;d<c.length;++d){var e=c[d];a.ba(e.id,e.type,
|
||
e.count||1)}a.Zb.gb("assets/location/models.json");a.oa.gb("assets/location/opacity.json",{Pc:ui});a.audio.gb("assets/location/music.json");a.audio.gb("assets/location/sounds.json");this.Fj=[];this.Si={};this.km=[];this.wl={};this.im=[];this.ul={};this.mm=[];this.yl={};this.jm=[];this.vl={};this.lm=[];this.xl={};this.nm=[];this.l=[];a.We.gb("assets/location/levels.json",function(f){f=f.urls;for(var g=a.We,l=a.S,n={},r=0;r<f.length;n={$k:void 0,vd:void 0,se:void 0},++r){n.vd=f[r];n.$k=g.get(n.vd);
|
||
var w=n.vd.substring(16),y=n.se=void 0;switch(w.substring(0,2)){case "RA":n.se=hg;b.jm.push(n.vd);y=1;break;case "AD":n.se=ig;b.lm.push(n.vd);y=1;break;default:switch(w[0]){case "D":n.se=Mu;b.Fj.push(n.vd);y=2;break;case "R":n.se=IG;b.im.push(n.vd);y=2;break;case "P":n.se=Nu;b.km.push(n.vd);y=1;break;case "A":n.se=jg;b.mm.push(n.vd);y=1;break;case "C":n.se=JG;b.nm.push(n.vd);y=2;break;case "T":"T2.lvl"===w&&(n.se=Ou);y=2;break;default:n.se=-1,y=1}}b.l.push(n.vd);w=function(S){return function(R){Bo.call(this,
|
||
R,S.$k,S.vd,S.se)}}(n);u(w,Bo);l.ba(n.vd,w,y);y=0;w=n.$k.Id;for(var A=[];y<w.length;++y){A.length=0;switch(w[y].id){case "shlagbaum01":case "SlMesh01":A.push(Lo);break;case "Blok01":A.push(Mo);break;case "Vorota01":A.push(No);A.push(Oo);A.push(Po);break;case "chemodan01":A.push(Qo);break;case "bankomat":A.push(Ro);break;case "Znakogr01":A.push(So);break;case "BochkaPrepztst":A.push(To);break;case "BrTreeMesh01":A.push(Uo);break;case "Pandus01":A.push(Vo);break;case "Gidrant01":A.push(Wo);break;case "StrMesh01":case "stroyCl01":A.push(Ml);
|
||
break;case "Znak01":case "ZnakBr01":A.push(Nl);break;case "Stat01":A.push(Xo);break;case "klumba02":A.push(Yo);break;case "Meshok01":case "Meshok02":case "Meshok03":A.push(Uj);break;case "BachokMesh01":A.push(Zo);break;case "Musorka01":A.push($o);break;case "Proj01":A.push(ap);break;case "Stol01":A.push(bp);break;case "Telejka01":A.push(cp);break;case "Konus01":A.push(dp);break;case "Maslo01":A.push(Pu)}for(var H=0;H<A.length;++H){var I=A[H],O=null;switch(n.se){case Mu:O=b.Si[I]||(b.Si[I]=[]);break;
|
||
case Nu:O=b.wl[I]||(b.wl[I]=[]);break;case IG:O=b.ul[I]||(b.ul[I]=[]);break;case jg:O=b.yl[I]||(b.yl[I]=[]);break;case hg:O=b.vl[I]||(b.vl[I]=[]);break;case ig:O=b.xl[I]||(b.xl[I]=[])}O&&-1===O.indexOf(n.vd)&&O.push(n.vd)}}}});c=this.D={};c[Qo]=25;c[Mo]=72;c[$o]=70;c[To]=40;c[Vo]=70;c[bp]=80;c[ep]=17;c[Xo]=70;c[Ml]=31;c[ap]=25;c[fp]=90;c[Uo]=50;c[Ro]=80;c[So]=30;c[dp]=15;c[Uj]=56;c[cp]=48;c[Yo]=50;c[Wo]=25;c[Zo]=60;c[Nl]=75;this.C=new It(a);a.oa.get("assets/location/fog.png",function(f){no.Ea=f.Ea;
|
||
f.Ea.Vi=Vj});Ht.set(0,.431,.713,0);this.u=(new ze(a,(new sa(a)).R(-.2).i(Ta(lb(new nb(a,"assets/common/font.json","BEST:",.5)).setColor(4294944542),350,100,ab).setScale(.015).Ia(-20).setPosition(-.5,-2.5)).i(this.xe=Ta(lb(new rb(a,"assets/common/font.json","%0",.5)).setColor(4294944542),300,100,ab).setScale(.015).Ia(-20).setPosition(0,-.7)).i((new sa(a)).setScale(.007).setPosition(-.5,2.5).Ia(-20).i((new Af(a,500,150,0,.5)).setColor(1342177280).setPosition(30,-20)).i(this.exp=(new Af(a,500,150,0,
|
||
.5)).setColor(4280332490).setPosition(30,-20)).i(this.O=Lb(bd(lb(new rb(a,"assets/common/font.json","%0/%1",.5,.5)),300).Ra(315).R(-20),.75)).i((new Ea(a,350,350,"assets/common/star.png",.5,.5)).i(this.Z=Ta(lb(new nb(a,"assets/common/digits.json","x%0",.5,.5)),130,120,ab).setPosition(175,175).Ia(5)))).i((new sa(a)).setScale(.007).setPosition(1.1,3.2).Ia(-20).i((new Af(a,330,130,0,.5)).setColor(1342177280)).i((new Ea(a,160,160,"assets/common/coin.png",.5,.5)).Ia(10)).i(this.ja=Lb(bd(lb(new rb(a,"assets/common/font.json",
|
||
"%0",.5,.5)),220).Ra(180),.75))),(new Fb).ya(Dc).Da(vi).td(-1,-10).ab(!1))).kl(!1);this.si=1;this.Aj=!1;this.m=this.o=this.j=this.g=this.M=null;this.zc="assets/location/gameplay.wav";this.Ab="assets/location/tonnel.wav";c=a.play;$L(c);KG(c,LG)}function MG(a){var b=Math.random(),c=a.app.sa.yg();c=c?c.Pe:-1;switch(c){case Qu:case Ru:case Su:case fp:case Tu:case ep:case Uu:100*Math.random()<NG(a,c)&&(b*=.6)}a.si=.6<b?0:.3<b?1:2}function NG(a,b){a=a.D[b];return 0===a?0:a||100}function jh(a,b,c,d){return 100*
|
||
Math.random()<NG(a,b)?c[b]||d:d}function oE(a){Ba.call(this,a,"assets/location/Avtomat01.mdl",aM);Va(this.F(1.752,1.752,4.075),"assets/general/hit_metal.wav")}function pE(a){Qc.call(this,a,bM,cM);this.effect=$t;this.event=Zo}function qE(a){Oa.call(this,a,"assets/location/BackHouses.mdl",dM)}function rE(a){Oa.call(this,a,"assets/location/Ballon01.mdl",eM)}function sE(a){Oa.call(this,a,"assets/location/Ballon02.mdl",fM)}function tE(a){Ba.call(this,a,"assets/location/bankomat.mdl",gM);Va(this.F(2.553,
|
||
2.553,6.069).sd(50),"assets/general/hit_metal.wav").cc(Ro)}function uE(a){Oa.call(this,a,"assets/location/Banner00.mdl",hM)}function wE(a){Ba.call(this,a,"assets/location/BochkaPrepztst.mdl",iM);Va(this.F(3.034,3.034,5.097,0,0,2.535).sd(50).cc(To),"assets/location/hit_barrel.wav")}function vE(a){Ba.call(this,a,"assets/location/Blok01.mdl",jM);Va(this.F(2.523,6.787,3.346,0,0,1.673).sd(20),"assets/general/hit_plast.wav").cc(Mo)}function xE(a){Ba.call(this,a,"assets/location/BrBach01.mdl",OG);Va(this.F(1.729,
|
||
1.729,2.852,0,0,1.426),"assets/location/hit_trash.wav")}function yE(a){Ba.call(this,a,"assets/location/BrBach02.mdl",OG);Va(this.F(2.184,2.184,.628,.088,.038,.079,-21.009,13.408,-5.089),"assets/location/hit_trash.wav")}function zE(a){Ba.call(this,a,"assets/location/BrShl01.mdl",gp);Va(this.F(.477,1.041,7.933,0,.115,0,-90),"assets/general/hit_wood.wav")}function AE(a){Ba.call(this,a,"assets/location/BrShl02.mdl",gp);Va(this.F(.477,1.041,7.933,0,-.135,0,-90),"assets/general/hit_wood.wav")}function BE(a){Ba.call(this,
|
||
a,"assets/location/BrShl03.mdl",gp);Va(this.F(.477,1.041,7.933,.221,-.345,.013,-90),"assets/general/hit_wood.wav")}function CE(a){Ba.call(this,a,"assets/location/BrShl04.mdl",gp);Va(this.F(1.766,1.674,4.288,-.023,0,-.029),"assets/general/hit_wood.wav")}function DE(a){Ba.call(this,a,"assets/location/BrTreeKus01.mdl",Vu);Va(this.F(.509,.489,2.489,.055,-.028,.076),"assets/general/hit_wood.wav")}function EE(a){Ba.call(this,a,"assets/location/BrTreeKus02.mdl",Vu);Va(this.F(.509,.489,1.398,.991,-1.289,
|
||
-2.195).F(.509,.489,2.167,.62,-.386,-.626,-33.62,-11.586,8.671).F(1.989,2.057,2.167,.131,.376,1.503),"assets/general/hit_wood.wav")}function FE(a){Ba.call(this,a,"assets/location/BrTreeKus03.mdl",Vu);Va(this.F(.509,.489,.825,-.307,-.294,-1.26,36.196).F(3.779,2.097,1.625,-.109,-.137,.418,0,0,30.803),"assets/general/hit_wood.wav")}function GE(a){Ba.call(this,a,"assets/location/Budka01.mdl",kM);Va(this.F(8.055,8.203,8.102,-.515,.021,4.051).sd(1E4),"assets/general/hit_stone.wav")}function HE(a){Oa.call(this,
|
||
a,"assets/location/klBrTr01.mdl",lM)}function IE(a){Qc.call(this,a,mM,nM);this.effect=Yt;this.event=Uo;this.Sc="assets/location/tree.wav"}function Co(a){Ba.call(this,a,"assets/location/chemodan01.mdl",PG);Va(this.F(1.685,4.588,4.045,0,0,-.133).cc(Qo),"assets/location/hit_suitcase.wav")}function JE(a){Oa.call(this,a,"assets/location/Doski01.mdl",oM)}function vu(a){Pa.call(this,a,"assets/location/Elka01.mdl",pM);Va(this,"assets/general/hit_wood.wav")}function wu(a){Pa.call(this,a,"assets/location/Fonar.mdl",
|
||
qM);Va(this.F(2,2,12,0,0,6),"assets/general/hit_metal.wav").i(this.effect=new wb(a,"assets/general/fonar.vfx"))}function Do(a){Pa.call(this,a,"assets/location/Fonar02.mdl",rM);Va(this.F(2,2,12,0,0,6),"assets/general/hit_metal.wav");this.g=null}function KE(a){Sa.call(this,a,"assets/location/FromPereul01.mdl",Ub);ob(Xa(Xa(this.g,0,0,0,31.7),30,0,0,31.7),0,1)}function LE(a){Pa.call(this,a,"assets/location/GarajR.mdl",sM);this.F(26.25,17.29,30,0,0,13.113)}function ME(a){Oa.call(this,a,"assets/location/Gazon01.mdl",
|
||
tM)}function NE(a){Ba.call(this,a,"assets/location/Gidrant01.mdl",uM);Va(this.F(2.212,2.136,5.504,.104,0,2.752).sd(30),"assets/general/hit_metal.wav").cc(Wo)}function OE(a){Sa.call(this,a,"assets/location/GorodKr01.mdl",Ub);Ud(Td(ob(ob(ob(ob(ob(ob(ob(ob(ob(ob(ob(ob(ob(ob(ob(ob(Xa(Xa(Xa(Xa(Xa(Xa(Xa(Xa(Xa(Xa(Xa(Xa(Xa(Xa(Xa(Xa(Xa(this.g,0,0,0,40),20,0,-1,40),40,0,-1,40),60,0,1,40),75,0,4,40),90,0,6,40),105,0,6,40),120,0,4,40),135,0,0,40),150,0,-4,40),165,0,-6,40),180,0,-6,40),195,0,-4,40),210,0,0,40),
|
||
225,0,2,40),240,0,2,40),300,0,0,40),0,1),1,2),2,3),3,4),4,5),5,6),6,7),7,8),8,9),9,10),10,11),11,12),12,13),13,14),14,15),15,16),Ce))}function PE(a){Sa.call(this,a,"assets/location/GorodKr02.mdl",Ub);Ud(Td(fe(this.g,vM,40),Ce))}function QE(a){Sa.call(this,a,"assets/location/GorodKr03.mdl",Ub);Ud(Td(fe(this.g,wM,40),Ce))}function RE(a){Sa.call(this,a,"assets/location/GorodPovL01.mdl",Ub);Ud(Td(fe(this.g,xM,40),hp))}function SE(a){Sa.call(this,a,"assets/location/GorodPovR01.mdl",Ub);Ud(Td(fe(this.g,
|
||
yM,40),Wu))}function ge(a,b){Lc.call(this,a,2,zM,void 0===b?"assets/location/Gruz01.mdl":b,Xu);this.sd(50);this.model.z=-2;this.wa=QG;this.Z=AM;this.Bb=BM}function Eo(a){ge.call(this,a,"assets/location/Gruz02.mdl")}function Fo(a){ge.call(this,a,"assets/location/Gruz03.mdl")}function Go(a){Jl.call(this,a,"assets/location/Hiway01.mdl",CM);this.F(1.376,11.87,6.276,0,0,9.3).F(1.376,1.376,6.276,0,-3,3.085).F(1.376,1.376,6.276,0,2.5,3.085);this.model.i(this.m=new Oa(a,"assets/location/Hiway01_a1.mdl",RG)).i(this.o=
|
||
new Oa(a,"assets/location/Hiway01_a2.mdl",RG)).i((new ze(a,Ta(lb(new ri(a,"assets/common/font.json","HIGHWAY",.5,.5)).setColor(4280499018),550,200).setScale(.02),SG,TG)).setPosition(-.359,0,9.5).I(-90,0,-90)).i((new ze(a,Ta(lb(new ri(a,"assets/common/font.json","HIGHWAY",.5,.5)).setColor(4280499018),550,200).setScale(.02),SG,TG)).setPosition(.359,0,9.5).I(-90,0,90));this.j=0}function TE(a){Pa.call(this,a,"assets/location/House01_02.mdl",DM);this.F(13,13,30,0,0,13.113)}function UE(a){Pa.call(this,
|
||
a,"assets/location/House02.mdl",EM);this.F(21,13,30,0,0,13.113)}function VE(a){Pa.call(this,a,"assets/location/House03.mdl",FM);this.F(20,15,30,0,0,13.113)}function WE(a){Pa.call(this,a,"assets/location/House04.mdl",GM);this.F(14,14,30,0,0,13.113)}function XE(a){Pa.call(this,a,"assets/location/House06.mdl",HM);this.F(11,23.4,30,3.708,-.275,13.113).F(11,14,30,-4.821,4.176,13.113)}function YE(a){Oa.call(this,a,"assets/location/House07.mdl",IM)}function ZE(a){Oa.call(this,a,"assets/location/House08.mdl",
|
||
JM)}function $E(a){Oa.call(this,a,"assets/location/House09.mdl",KM)}function aF(a){Pa.call(this,a,"assets/location/House12.mdl",LM);this.F(32,36.453,30,-.695,0,13.113)}function bF(a){Pa.call(this,a,"assets/location/House013.mdl",MM);this.F(23,16,30,0,0,13.113)}function cF(a){Pa.call(this,a,"assets/location/House13.mdl",NM);this.F(36.8,24.16,30,0,0,13.113)}function Ho(a){Pa.call(this,a,"assets/location/House017.mdl",UG);this.on(Ae,this.ha);this.F(14.513,29.234,30,7.899,0,13.113).F(14.513,14,30,-6.85,
|
||
7.677,13.113)}function dF(a){Pa.call(this,a,"assets/location/HouseLittle.mdl",OM);this.F(25.542,22,30,0,0,13.113)}function eF(a){Pa.call(this,a,"assets/location/HouseLong01.mdl",PM);this.F(40.337,38.576,30,-27.973,-6.769,13.113).F(41.547,26.33,30,1.36,14.208,13.113).F(24.928,39.151,30,35.277,6.195,13.113)}function Tj(a){si.call(this,a,2.45,QM,"assets/location/Ink01.mdl",RM);this.sd(50);this.model.z=wi;this.wa=QG;var b=this.ua=[];this.Z="assets/location/ink_loop.wav";this.dc=60;this.Mb="assets/general/brakes.wav";
|
||
this.i((new Oa(a,"assets/location/Ink01_1.mdl",SM)).be(wi)).i(this.effect=(new wb(a,"assets/general/Ink01.vfx")).be(wi)).i(b[0]=new kh(a,-2.966,.763,2.511+wi)).i(b[1]=new kh(a,-2.953,-.616,2.561+wi)).i(b[2]=new kh(a,-1.405,.763,2.796+wi)).i(b[3]=new kh(a,-1.405,-.656,2.722+wi))}function kh(a,b,c,d){Oa.call(this,a,"assets/location/Money01.mdl",TM);this.setPosition(b,c,this.g=d);this.time=-1}function fF(a){Oa.call(this,a,"assets/location/Klumba01.mdl",UM)}function gF(a){Ba.call(this,a,"assets/location/klumba02.mdl",
|
||
VM);Va(this.F(1.104,4.388,3.54,0,0,1.77),"assets/general/hit_wood.wav").cc(Yo)}function hF(a){Fc.call(this,a,"assets/location/KolTunn01.mdl",WM,XM);Va(Vd(this.F(60,8,22,30,0,11),4),"assets/general/hit_stone.wav")}function xu(a){Pa.call(this,a,"assets/location/Konstr01.mdl",YM);Va(this,"assets/general/hit_metal.wav")}function iF(a){Ba.call(this,a,"assets/location/Konus01.mdl",ZM);Va(this.Td(.969,0,0,.969),"assets/general/hit_plast.wav").cc(dp)}function jF(a){Oa.call(this,a,"assets/location/Kust001.mdl",
|
||
$M)}function Ue(a,b){Lc.call(this,a,1.9,aN,void 0===b?"assets/location/Legk01.mdl":b,Yu);this.sd(40);this.model.x=1;this.model.z=-1.9;this.wa=bN;this.Z=cN;this.Bb=dN}function yu(a){Ue.call(this,a,"assets/location/Legk02.mdl")}function zu(a){Ue.call(this,a,"assets/location/Legk03.mdl")}function kF(a){Fc.call(this,a,"assets/location/MagistIn01.mdl",eN,VG);Va(Vd(this.F(30,17,25,-14.6,24.5,12.5).F(30,17,25,-14.6,-24.5,12.5),4),"assets/general/hit_stone.wav")}function lF(a){Fc.call(this,a,"assets/location/MagistTile01.mdl",
|
||
fN,VG);Va(Vd(this.F(30,17,25,15,24.5,12.5).F(30,17,25,15,-24.5,12.5),4),"assets/general/hit_stone.wav")}function Io(a){Pa.call(this,a,"assets/location/Maslo01.mdl",gN);El(Vd(so(this).Td(3.5),16),2);this.g=!1}function mF(a){Pa.call(this,a,"assets/location/Market.mdl",hN);this.F(90,27,30,0,0,13.113)}function nF(a){Ba.call(this,a,"assets/location/Meshok01.mdl",iN);Va(this.Td(1.227,.074,-.091,-.558),"assets/general/hit_plast.wav").cc(Uj)}function oF(a){Ba.call(this,a,"assets/location/Meshok02.mdl",jN);
|
||
Va(this.Td(.982,.014,-.013,-.482),"assets/general/hit_plast.wav").cc(Uj)}function pF(a){Ba.call(this,a,"assets/location/Meshok03.mdl",kN);Va(this.Td(1.224,.072,-.004,-.547),"assets/general/hit_plast.wav").cc(Uj)}function qF(a){Ba.call(this,a,"assets/location/Musorka01.mdl",lN);Va(this.F(3.29,5.331,5.38,0,0,2.69).sd(50),"assets/location/hit_trash.wav").cc($o)}function rF(a){Pa.call(this,a,"assets/location/Ogr003.mdl",mN);Va(this.F(11.187,1.803,30,0,0,15),"assets/general/hit_wood.wav")}function sF(a){Pa.call(this,
|
||
a,"assets/location/Ostanovka01.mdl",nN);this.F(15,5.512,7.321,0,0,3.552)}function Au(a){Fc.call(this,a,"assets/location/Pandus01.mdl",WG,Zu);this.type=3;Va(Vd(this,4).F(30,8.612,6,15,0,3),"assets/general/hit_stone.wav");this.i(new Oa(a,"assets/location/Pandus01_1.mdl",XG))}function tF(a){Fc.call(this,a,"assets/location/PandusIn01.mdl",WG,Zu);this.type=3;Va(Vd(this,4).F(25.217,8.612,6,12.499,0,-.009,0,-13.925),"assets/general/hit_stone.wav");this.i(new Oa(a,"assets/location/PandusIn01_1.mdl",XG))}
|
||
function uF(a){Sa.call(this,a,"assets/location/ParkGr01.mdl",oN);ob(Xa(Xa(this.g,0,0,0,40),100,0,0,40),0,1);this.type=2;this.color=YG}function vF(a){Sa.call(this,a,"assets/location/PerehPark01.mdl",ZG);ob(Xa(Xa(this.g,0,0,0,40),110,0,0,40),0,1);this.type=2;this.color=YG}function wF(a){Sa.call(this,a,"assets/location/PerehPark01_02.mdl",ZG);ob(Xa(Xa(this.g,0,0,0,40),110,0,0,40),0,1)}function xF(a){Sa.call(this,a,"assets/location/PerekrKrest01.mdl",Ub);ob(Xa(Xa(this.g,0,0,0,40),120,0,0,40),0,1)}function yF(a){Sa.call(this,
|
||
a,"assets/location/Perekrvstr01.mdl",Ub);ob(Xa(Xa(this.g,0,0,0,31.7),104,0,0,31.7),0,1)}function zF(a){Sa.call(this,a,"assets/location/PerekrY01.mdl",Ub);a=ob(ob(Xa(Xa(ob(ob(Xa(Xa(ob(ob(Xa(Xa(Xa(this.g,0,0,0,40),50.219,0,0,40,4),50.219,0,0,31.7,4),0,1),1,2),69.922,-17.702,0,31.7),93.299,-41.08,0,31.7,2),2,3),3,4),69.922,17.702,0,31.7),93.299,41.08,0,31.7,1),2,5),5,6);a.points[4].qh=td;a.points[4].ph=pN;a.points[6].qh=td;a.points[6].ph=qN}function AF(a){Sa.call(this,a,"assets/location/PerKriv01.mdl",
|
||
Ub);Ud(Td(fe(this.g,rN,31.7),Ce));this.type=2;this.color=Ol}function BF(a){Sa.call(this,a,"assets/location/PerKriv02.mdl",Ub);Ud(Td(fe(this.g,sN,31.7),Ce));this.type=2;this.color=Ol}function CF(a){Sa.call(this,a,"assets/location/Pernatri0_2.mdl",Ub);ob(ob(ob(Xa(Xa(Xa(Xa(this.g,0,0,0,31.7),60,0,0,31.7),67.2,0,0,40),120,0,0,40),0,1),1,2),2,3)}function DF(a){Sa.call(this,a,"assets/location/Pernatri01.mdl",Ub);ob(ob(ob(Xa(Xa(Xa(Xa(this.g,0,0,0,40),52.8,0,0,40),60,0,0,31.7),120,0,0,31.7),0,1),1,2),2,3)}
|
||
function EF(a){Sa.call(this,a,"assets/location/PerPovL01.mdl",Ub);Ud(Td(fe(this.g,tN,31.7),hp));this.type=2;this.color=Ol}function FF(a){Sa.call(this,a,"assets/location/PerPovR01.mdl",Ub);Ud(Td(fe(this.g,uN,31.7),Wu));this.type=2;this.color=Ol}function GF(a){Sa.call(this,a,"assets/location/Pna5Polos01.mdl",Ub);ob(ob(Xa(Xa(Xa(this.g,0,0,0,40),41.307,0,0,40),60,0,0,48),0,1),1,2)}function Ve(a,b,c){Pa.call(this,a,b,c);El(so(this),2);this.time=0;this.g=!1}function Bu(a){Ve.call(this,a,"assets/location/Poloska01.mdl",
|
||
$G);this.F(44,6,3);this.i(this.j=new Oa(a,"assets/location/Poloska01_a.mdl",aH))}function Cu(a){Ve.call(this,a,"assets/location/PoloskaDop01.mdl",$G);this.F(27,6,3);this.i(this.j=new Oa(a,"assets/location/Poloska01_a.mdl",aH))}function Jo(a){Ba.call(this,a,"assets/location/Proj01.mdl",vN);this.Td(1.862,0,0,1.571);this.Sc="assets/general/hit_metal.wav";this.g=null;this.event=ap}function HF(a){Sa.call(this,a,"assets/location/PS5Polos01.mdl",Ub);ob(ob(Xa(Xa(Xa(this.g,0,0,0,48),18.693,0,0,40),60,0,0,
|
||
40),0,1),1,2)}function IF(a){Oa.call(this,a,"assets/location/Rekl03.mdl",wN)}function JF(a){Sa.call(this,a,"assets/location/Road3Pol01.mdl",Ub);ob(Xa(Xa(this.g,0,0,0,31.7),120,0,0,31.7),0,1)}function KF(a){Sa.call(this,a,"assets/location/Road3PolKr01.mdl",Ub);Ud(Td(fe(this.g,xN,31.7),Ce))}function LF(a){Sa.call(this,a,"assets/location/Road3PolKr02.mdl",Ub);Ud(Td(fe(this.g,yN,31.7),Ce))}function MF(a){Sa.call(this,a,"assets/location/Road3PolKr03.mdl",Ub);Ud(Td(fe(this.g,zN,31.7),Ce))}function NF(a){Sa.call(this,
|
||
a,"assets/location/RoadBig01.mdl",Ub);ob(Xa(Xa(this.g,0,0,0,48),120,0,0,48),0,1)}function OF(a){Sa.call(this,a,"assets/location/RoadOsn01.mdl",Ub);ob(Xa(Xa(this.g,0,0,0,40),120,0,0,40),0,1)}function PF(a){Sa.call(this,a,"assets/location/RoadOsnDop01.mdl",Ub);ob(Xa(Xa(this.g,0,0,0,40),60,0,0,40),0,1)}function QF(a){Sa.call(this,a,"assets/location/RoadPereul01.mdl",Ub);ob(Xa(Xa(this.g,0,0,0,31.7),120,0,0,31.7),0,1);this.type=2;this.color=Ol}function RF(a){Sa.call(this,a,"assets/location/RoadRazdel01.mdl",
|
||
Ub);ob(Xa(Xa(this.g,0,0,0,48),120,0,0,48),0,1)}function SF(a){Sa.call(this,a,"assets/location/RoadYama01.mdl",Ub);ob(Xa(Xa(this.g,0,0,0,40),120,0,0,40),0,1);this.F(15,34,20,66.5,0,-10)}function Du(a){Pa.call(this,a,"assets/location/Rock01.mdl",AN)}function TF(a){Qc.call(this,a,bH,BN,CN);this.effect=Sj;this.event=Lo}function UF(a){Ba.call(this,a,"assets/location/shtender01.mdl",DN);Va(this.F(.261,3.015,4.882,-.749,0,2.36,0,14.739,0).F(.261,3.015,4.882,.743,0,2.36,0,-14.739,0),"assets/general/hit_metal.wav")}
|
||
function VF(a){Pa.call(this,a,"assets/location/skameyka01.mdl",EN);Va(this.F(6.993,3.118,2.9,0,0,1.45),"assets/general/hit_wood.wav")}function WF(a){Qc.call(this,a,bH,FN);this.effect=Sj;this.event=Lo}function XF(a){Qc.call(this,a,GN,HN);this.effect=Zt;this.event=Xo}function YF(a){Ba.call(this,a,"assets/location/StatBr01.mdl",IN);Va(this.F(2.359,2.211,5.291,.135,.136,-.134),"assets/general/hit_stone.wav")}function ZF(a){Ba.call(this,a,"assets/location/StatBr02.mdl",JN);Va(this.F(2.679,2.508,3.589),
|
||
"assets/general/hit_stone.wav")}function $F(a){Pa.call(this,a,"assets/location/stend01.mdl",KN);Va(this.F(1.239,3.776,8.456,0,0,4.228),"assets/general/hit_metal.wav")}function aG(a){Ba.call(this,a,"assets/location/Stol01.mdl",LN);Va(this.F(4.197,4.197,.584,0,0,1.06).F(1.4,1.4,2.421,0,0,-.063),"assets/general/hit_wood.wav").cc(bp)}function bG(a){Pa.call(this,a,"assets/location/Stolb01.mdl",MN);this.F(1,1,20.875,0,23.212,10.227).F(1,1,20.875,0,-23.212,10.227)}function cG(a){Qc.call(this,a,NN,ON);this.effect=
|
||
Sj;this.event=Ml}function Eu(a){Ba.call(this,a,"assets/location/StrBr01.mdl",PN);Va(this.F(.664,3.827,5.322,-.017,0,-.592),"assets/general/hit_wood.wav")}function Fu(a){Ba.call(this,a,"assets/location/StrBr02.mdl",QN);Va(this.F(.517,3.671,3.725,0,0,-.059),"assets/general/hit_wood.wav")}function Gu(a){Ba.call(this,a,"assets/location/StrBr03.mdl",RN);Va(this.F(.535,4.62,1.642,0,0,-.45),"assets/general/hit_wood.wav")}function dG(a){Qc.call(this,a,SN,TN);this.effect=Sj;this.event=Ml}function eG(a){Ba.call(this,
|
||
a,"assets/location/StrClBr01.mdl",UN);Va(this.F(.444,4.54,2.15,.026,-.338,-.183),"assets/general/hit_wood.wav");this.j.i((new ze(a,wf(Ta(lb(new ri(a,"assets/common/font.json","ROAD CLOSED",.5,.5)).setColor(4280499018),3.5,2.3,ab)),VN,WN)).setPosition(-.52,.792,-.3735).I(-90,0,-90))}function fG(a){Ba.call(this,a,"assets/location/StrClBr02.mdl",XN);Va(this.F(.491,3.475,5.393,.01,.054,-.556),"assets/general/hit_wood.wav")}function gG(a){Ba.call(this,a,"assets/location/StrClBr03.mdl",YN);Va(this.F(.51,
|
||
3.662,3.716,0,0,-.063),"assets/general/hit_wood.wav")}function hG(a){Ba.call(this,a,"assets/location/Stul01.mdl",ZN);Va(this.F(2.135,1.7,1.657,0,0,-.936,0,0,-5.881).F(.515,1.7,1.886,.771,-.104,.865,-.503,4.868,-5.902),"assets/general/hit_wood.wav")}function iG(a){Ba.call(this,a,"assets/location/SvetDown.mdl",$N);Va(this.F(1.209,1.209,5.584,0,0,2.792),"assets/general/hit_metal.wav").cc(aO)}function Kl(a){Pa.call(this,a,"assets/location/Svetof01.mdl",bO);this.Sc="assets/general/hit_metal.wav";this.i(this.g=
|
||
(new ro(a,$u)).setPosition(-.465,-10.1,17.28).setScale(5).setColor(av)).i(this.j=(new ro(a,$u)).setPosition(.483,-11.519,17.28).I(0,0,180).setScale(5).setColor(av));this.time=0}function jG(a){Ba.call(this,a,"assets/location/Telejka01.mdl",cO);Va(this.F(3.24,2.322,3.62,-.124,0,1.81).cc(cp),"assets/location/hit_cart.wav")}function kG(a){Sa.call(this,a,"assets/location/ToPereul01.mdl",Ub);ob(Xa(Xa(this.g,0,0,0,31.7),30,0,0,31.7),0,1)}function lG(a){fh.call(this,a,"assets/location/Tr03.mdl",dO);Va(this.F(19.55,
|
||
7.834,3.276,-.351,0,.077,0,-10.656),"assets/general/hit_wood.wav")}function Hu(a){fh.call(this,a,"assets/location/Tramplin01.mdl",cH);Va(this.F(13.023,5.56,15.585,-.138,0,-2.205,90,-26.881),"assets/general/hit_metal.wav");this.i(new Oa(a,"assets/location/Tramplin01_1.mdl",dH)).i(this.g=(new Oa(a,"assets/location/Tramplin01_a.mdl",bv)).setPosition(-.03,-3.68,0)).i(this.j=(new Oa(a,"assets/location/Tramplin01_a.mdl",bv)).setPosition(-.03,3.81,0));this.time=0}function Iu(a){fh.call(this,a,"assets/location/TramplinLittl01.mdl",
|
||
cH);Va(this.F(13.023,5.56,7.793,-.138,-.038,-2.205,90,-26.881),"assets/general/hit_metal.wav");this.i(new Oa(a,"assets/location/TramplinLittl01_1.mdl",dH));this.i(this.g=(new Oa(a,"assets/location/Tramplin01_a.mdl",bv)).Ra(-.03));this.time=0}function Ju(a){Pa.call(this,a,"assets/location/tree00.mdl",eO);Va(this,"assets/general/hit_wood.wav")}function Ku(a){Pa.call(this,a,"assets/location/TreeSS.mdl",fO);Va(this,"assets/general/hit_wood.wav")}function mG(a){Sa.call(this,a,"assets/location/TriPovL01.mdl",
|
||
Ub);Ud(Td(fe(this.g,gO,31.7),hp))}function nG(a){Sa.call(this,a,"assets/location/TriPovR01.mdl",Ub);Ud(Td(fe(this.g,hO,31.7),Wu))}function Ll(a){Fc.call(this,a,"assets/location/Tunnel01.mdl",eH,fH);Va(Vd(this.F(60,8,22,30,25.8532,11).F(60,8,22,30,-25.8532,11),4),"assets/general/hit_stone.wav");this.g=this.j=this.m=this.o=this.Ab=null}function Ko(a){Fc.call(this,a,"assets/location/TunnelIN01.mdl",eH,fH);Va(Vd(this.F(60,8,22,30,25.8532,11).F(60,8,22,30,-25.8532,11),4),"assets/general/hit_stone.wav");
|
||
this.g=this.j=this.m=this.o=this.Ab=null}function oG(a){Ba.call(this,a,"assets/location/Urna01.mdl",iO);Va(this.F(2.098,2.122,3.838,0,0,1.919),"assets/location/hit_trash.wav")}function pG(a){Pa.call(this,a,"assets/location/vent_tube01.mdl",jO);Va(this.F(2.104,1.203,6.067,.007,2.957,3.034).F(2.104,1.203,6.067,.007,-3.09,3.034).F(2.104,7.077,1.371,.007,.057,6.774),"assets/general/hit_metal.wav")}function qG(a){hd.call(this,a,"assets/location/Vorota01.mdl",kO,2,2,10,.414,4.154,5);this.Sc="assets/general/hit_metal.wav"}
|
||
function rG(a){hd.call(this,a,"assets/location/Vorota02.mdl",lO,2,2,10,.414,4.154,5);this.Sc="assets/general/hit_metal.wav"}function sG(a){hd.call(this,a,"assets/location/Vorota03.mdl",mO,2,2,10,.414,4.154,5);this.Sc="assets/general/hit_metal.wav"}function Lu(a){Pa.call(this,a,"assets/location/wall01.mdl",nO);Va(this,"assets/general/hit_stone.wav")}function tG(a){Oa.call(this,a,"assets/location/Water_tower01.mdl",oO)}function uG(a){Qc.call(this,a,pO,qO);this.effect=Xt;this.event=ip;this.Sc="assets/location/crate.wav"}
|
||
function vG(a){Ba.call(this,a,"assets/location/YaBr01.mdl",rO);Va(this.F(4.484,2.032,3.958,0,.24).Td(2,0,.24,0),"assets/general/hit_wood.wav")}function wG(a){Ba.call(this,a,"assets/location/YaBr02.mdl",sO);Va(this.F(4.543,2.639,3.952,0,-.291).Td(2,0,-.291,0),"assets/general/hit_wood.wav")}function xG(a){Ba.call(this,a,"assets/location/YaBr03.mdl",tO);Va(this.F(3.173,4.543,1.206,.309,0,-.273,0,-40).Td(2,.309,0,-.273),"assets/general/hit_wood.wav")}function yG(a){Pa.call(this,a,"assets/location/Zabor001.mdl",
|
||
uO);Va(this.F(9.5,.6,3,0,0,1.5),"assets/general/hit_wood.wav")}function zG(a){Pa.call(this,a,"assets/location/Zabor01.mdl",vO);Va(this.F(12,.7,3,0,0,1.5),"assets/general/hit_wood.wav")}function AG(a){Pa.call(this,a,"assets/location/Zaborchik01.mdl",wO);this.F(12.705,.809,3.838,0,.578,2.033)}function BG(a){Ba.call(this,a,"assets/location/Znak01.mdl",xO);Va(this.F(.491,.491,5.44,0,0,2.925).F(.491,3.111,3.319,0,0,7.323),"assets/general/hit_metal.wav").cc(Nl)}function CG(a){Ba.call(this,a,"assets/location/ZnakBr01.mdl",
|
||
yO);Va(this.F(.491,.491,5.44,0,0,2.925).F(.491,3.111,3.319,-.807,.04,7.21,0,-15.861,19.359),"assets/general/hit_metal.wav").cc(Nl)}function DG(a){Ba.call(this,a,"assets/location/Znakogr01.mdl",zO);Va(this.F(.491,.491,5.44,0,0,2.925).F(.491,3.111,3.319,0,0,7.323),"assets/general/hit_metal.wav").cc(So)}function EG(a){Ba.call(this,a,"assets/location/ZnakStr01.mdl",AO);Va(this.F(.491,.491,5.44,0,0,2.925).F(.491,3.111,3.319,0,0,7.323,-45),"assets/general/hit_metal.wav")}function FG(a){Ba.call(this,a,"assets/location/Znakvstr01.mdl",
|
||
BO);Va(this.F(.491,.491,5.44,0,0,2.925).F(.491,3.111,4.082,0,0,7.048),"assets/general/hit_metal.wav")}function GG(a){Oa.call(this,a,"assets/location/ZnStop01.mdl",CO)}function HG(a){Oa.call(this,a,"assets/location/ZnWay01.mdl",DO)}function jp(a){vc.call(this,a,1.5);this.Ua=this.sb=this.lb=this.Gc=null;this.l=new xe(this,"assets/general/CarBone01.anm",De);this.Ta=new xe(this,"assets/general/Body01.anm",De);this.P=new Oa(a,"assets/general/MagnitKart01.mdl",new Fb);this.Mb=[];this.al=new E;this.je=this.C=
|
||
null;this.O=new xe(null,null,De);Fl(El(Vd(this.sd(70),2),-5).F(4,2.5,2.2,0,0,-(1.4-1.1)));this.wa=0;this.Hd=null;this.Mj=new E;this.kd=new E;this.Ki=new E;this.level=null;this.ja=this.fd=this.Mg=0;this.Qa=[];this.exp=0;this.ua=1;this.W=this.J=this.o=this.Z=this.qg=this.Ae=this.m=this.te=this.Bi=this.ed=this.pj=this.ee=this.Ai=this.ad=this.dc=this.Ei=this.j=this.Ci=this.Uc=this.Rc=this.u=this.le=0;this.fj=!1;this.Gb=this.Qf=0;this.kj=kp;this.Ab=!1;this.state=Pl;this.startTime=0;this.Ic=new Tb;this.wc=
|
||
[];this.Bb=[];this.Kj=function(b){a.play.location.Kj(b)};this.i(this.Yb=new lp(a))}function gH(a){var b=a.Ta,c=a.l;a=a.O;for(var d=1;d<We;++d)b.za(0,d),c.za(0,d),a.za(0,d),b.stop(d),c.stop(d),a.stop(d)}function lh(a,b){a.exp+=EO*b;a.fd+=b*a.ua*(a.j?2:1);a.app.play.A(hH,b)}function xi(a,b){a.ja+=b;a.app.play.A(Ql,b);lh(a,10*b)}function cv(a,b){if(0<a.Ta.Ed(Wj)){var c=a.app,d=c.S.aa(eu);c.play.add(d,a.P);a.wc.push(d)}Bf(a,a.app.S.aa(fu),b)}function dv(a,b){a.Rc=Math.min(a.Rc+(void 0===b?10:b),a.u)}
|
||
function ev(a,b){b=void 0===b?a.Ci:b;a.Uc=Math.min(a.Uc+b,a.Ci)}function iH(a,b){b=void 0===b?a.dc:b;a.j=0===a.j?a.Ei=b:Da(a.j+b,0,a.Ei)}function jH(a,b){b=void 0===b?a.ee:b;a.ad=0===a.ad?a.Ai=b:Da(a.ad+b,0,a.Ai)}function kH(a,b){b=void 0===b?a.te:b;a.ed=0===a.ed?a.Bi=b:Da(a.ed+b,0,a.Bi)}function lH(a,b){a.l.update(b);a.Ta.update(b);var c=a.O;c.za(a.je&&a.je.Ue?1:0,mp);c.update(b);(c=a.C)&&c.update(b);ni(a.P,a.al);(a=a.Gc)&&a.update(b)}function Bf(a,b,c){a.Ic.transformPoint(c,b);a.app.play.add(b,
|
||
a);a.wc.push(b)}function lp(a){ze.call(this,a,new sa(a),(new Fb).Kd(!1).ya(Dc).Da(4E3));this.I(-90,0,-90).setScale(.02).setPosition(0,0,2);this.Yb=[];this.o=[new kb(50,150),new kb(-130,100),new kb(50,50)];a.S.register(np,5)}function Xe(a,b,c,d,e){for(var f=a.o,g=a.Yb,l=f.length-1,n=null;0<=l&&!n;){n=f[l];for(var r=g.length-1;0<=r&&n;){var w=g[r];n.Ha(w)&&.9<w.time&&(n=null);--r}--l}n&&(f=a.app.S.aa(np),f.set(b,c,d,e),a.g.i(f.Bc(n)),g.push(f))}function Rl(a){sa.call(this,a);this.time=0;this.i(this.Ab=
|
||
Sd(new sa(a),.5).Ra(50))}function np(a){Rl.call(this,a);var b=this.Ab,c=b.i,d=fd(new sa(a)).Ia(-3),e=d.i,f=(new Gc(a,0,0,"assets/common/sbase_s.png",210,20,47)).Ra(-17).setColor(fc);f.dg=.5;d=e.call(d,this.C=f);e=d.i;f=(new dd(a,0,0)).setColor(new kc(1,1,1,1));f.dg=.5;c.call(b,this.g=e.call(d,this.u=f).i(this.m=Sd(new Ea(a),.5)).i(this.value=lb((new rb(a,"assets/common/font.json","",.5,.5)).Ra(30)))).i(this.title=(new li(a,0,0,"assets/common/combo.png",.5,.5)).i(this.l=(new Ea(a,120,120,"assets/common/combo_circle.png",
|
||
.5,.5)).setPosition(390,60).setColor(4278946528)).i(this.o=Ta((new rb(a,"assets/common/font.json","x%0",0,.5)).Ia(5).setPosition(360,60),130,100,ab)))}function fv(a){ib.call(this,a);var b=this;this.ie=new Oa(a,"assets/general/PoliceCar01.mdl",Za((new Fb).define("SKINNING"),kd));this.Gk=new Oa(a,"assets/general/Policeman01.mdl",Za((new Fb).define("SKINNING"),kd).tb(Sc));this.g=new xe(this.ie,"assets/general/PolCarBone01.anm",De);this.j=(new xe(this.Gk,"assets/general/PoliceBone01.anm",De)).on(op,function(c){switch(b.state){case gv:switch(c){case 329:a.audio.play(U(FO));
|
||
break;case 383:a.audio.play(U(GO));break;case 213:b.play(.5>Math.random()?"cop_add1":"cop_add2",!1);break;case 382:case 420:b.play("home",!0)}break;case pp:240===c?a.audio.play("assets/general/cop_start.wav"):255===c&&(a.audio.play("assets/general/brakes.wav").volume=.7);break;case Sl:284===c?(c=a.audio,c.play("assets/general/cop_end.wav"),c.play("assets/general/hit_metal.wav")):310===c&&a.audio.play(a.play.B.Ua.Jk)}});this.vg=new xe(this,"assets/general/PoliceBone01.anm",De);this.vg.object=null;
|
||
this.state=gv;this.gg=0;this.on(Ae,this.bn).on(eh,this.cn)}function kg(a,b,c,d){d=void 0===d?[]:d;Se.call(this,a,b,c,d);this.W=this.P=0;this.Cd=!0;this.m=null}function Cf(a,b,c,d,e,f){Ea.call(this,a,void 0===b?0:b,void 0===c?0:c,void 0===d?null:d,void 0===e?0:e,void 0===f?0:f);this.Cb=Tl;this.g=Ul}function ld(a,b,c,d,e){e=void 0===e?[]:e;kg.call(this,a,b,c,e);this.i(this.m=(new Ea(a,b,c,d)).cb(Tl,Ul)).i(new Ea(a,b,c,d));this.effect=null}function mb(a){tb.call(this,a);var b=this;this.i(this.u=(new Ea(a,
|
||
0,0,"assets/common/w.png")).setColor(0).on(nf,function(){a.input.Jb||b.fa()})).i(this.V=new sa(a));this.Tb=!1;this.rb=0}function Df(a,b,c,d,e,f){Ea.call(this,a,b,c,d,void 0===e?0:e,void 0===f?0:f);var g=this;this.on(nf,function(l,n,r){if(g.$a(n,r))return!0})}function Vl(a){tb.call(this,a);this.i(this.g=Sd(new ki(a,0,0,"assets/common/w.png",32,32,new Xb(0,0,1024,1024)),.5).cb(hv,hv))}function Ya(a){tb.call(this,a);this.i(this.top=(new sa(a)).i(this.ua=(new sa(a)).Ia(-1).i(this.He=Sd((new ki(a,500,
|
||
183,"assets/common/pattern_s.png",225,183,new Xb(0,0,225,183),mh)).R(135),0)).i(this.kd=Sd((new ki(a,500,639,"assets/common/pattern.png",225,639,new Xb(0,0,225,639),mh)).R(-500),0)).i(this.title=Ta(Lb(new nb(a,"assets/common/font.json","HELLO",.5,.5),1.5).R(20),1500,100)))).i(this.V=new sa(a)).i(this.g=new sa(a));this.Kc=!1;this.re=0;this.H=this.C=!1;this.J=!0;this.dc=0}function Gc(a,b,c,d,e,f,g,l,n){Ea.call(this,a,b,c,d,void 0===l?0:l,void 0===n?0:n);this.u=e;this.o=f;this.m=g}function Af(a,b,c,
|
||
d,e){Gc.call(this,a,b,c,"assets/common/base.png",162,26,36,void 0===d?0:d,void 0===e?0:e)}function qp(a,b,c,d,e){Gc.call(this,a,b+20,c+28,"assets/common/base_s.png",182,26,46,void 0===d?0:d,void 0===e?0:e)}function yi(a,b,c,d,e){sa.call(this,a,b,c,void 0===d?0:d,void 0===e?0:e);this.i((new qp(a,b,c)).setPosition(-10,-14).setColor(fc))}function dd(a,b,c,d,e){Gc.call(this,a,b,c,"assets/common/sbase.png",176,20,30,void 0===d?0:d,void 0===e?0:e)}function iv(a,b,c,d,e){Gc.call(this,a,b+33,c+33,"assets/common/sbase_s.png",
|
||
209,20,46.5,void 0===d?0:d,void 0===e?0:e)}function jv(a,b,c,d,e){sa.call(this,a,b,c,void 0===d?0:d,void 0===e?0:e);this.i((new iv(a,b,c)).setPosition(-16.5,-16.5).setColor(fc))}function zi(a,b,c,d,e){Gc.call(this,a,b,c,"assets/common/tbase.png",207,20,60,void 0===d?0:d,void 0===e?0:e)}function rp(a,b,c,d,e){Gc.call(this,a,b,c,"assets/common/bbase.png",160,26,26,void 0===d?0:d,void 0===e?0:e)}function Xj(a){sa.call(this,a,700,232,.5,.5);this.i(this.left=(new sa(a)).setPosition(234,232).i(this.l=(new Ea(a,
|
||
164,164,"assets/common/c_wheel.png",.5,.5)).R(-82))).i(this.right=(new sa(a)).setPosition(600,232).i(this.H=(new Ea(a,164,164,"assets/common/c_wheel.png",.5,.5)).setScale(117/164).R(-117/164*82))).i(this.ve=(new Ea(a,199,64,"assets/common/c_base.png",.5,.5)).setPosition(427,165)).i(this.J=(new Ea(a,175,123,"assets/common/c_seat.png",114/175,107/123)).setPosition(401,105)).i(this.o=(new Ea(a,183,73,"assets/common/c_back.png")).setPosition(129,19)).i(this.m=(new Ea(a,237,117,"assets/common/c_front.png",
|
||
.5,.5)).setPosition(569,88)).i(this.u=(new Ea(a,27,27,"assets/common/c_point.png",.5,.5)).setPosition(12,218)).i(this.C=(new Ea(a,27,27,"assets/common/c_point.png",.5,.5)).setPosition(70,218)).i(this.D=(new Ea(a,27,27,"assets/common/c_point.png",.5,.5)).setPosition(128,218));this.g=0}function lg(a,b,c,d,e){xf.call(this,a,void 0===b?0:b,void 0===c?0:c,void 0===d?0:d,void 0===e?0:e);this.focus=25}function Ee(a,b,c,d,e,f,g,l,n,r){r=void 0===r?[]:r;kg.call(this,a,b,c,r);this.i(this.m=(new sa(a)).i((new Gc(a,
|
||
b+2*e,c+2*f,d,g,l,n)).cb(Tl,Ul).setPosition(-e,-f))).i((new Gc(a,b+2*e,c+2*f,d,g,l,n)).setPosition(-e,-f)).on(kv,this.C);this.o=this.g=null;this.K=this.offset=0;this.effect=null}function bb(a,b,c,d,e,f,g){c=void 0===c?0:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?20:f;a.offset=f;a.K=void 0===g?10:g;g=!!a.g;var l=a.app,n=a.width;g?a.o.Jc(b).Eb(c,d).setPosition(n/2,f):a.m.i(a.o=(new Cf(l,c,d,b,.5,.5)).setPosition(n/2,f));g?a.g.Jc(b).Eb(c,d).setPosition(n/2,f):e?a.i(a.g=(new li(l,c,d,b,.5,.5)).setPosition(n/
|
||
2,f)):a.i(a.g=(new Ea(l,c,d,b,.5,.5)).setPosition(n/2,f));a.g.visible=a.o.visible=!!b;return a}function lv(a,b,c,d){d=void 0===d?[]:d;Ee.call(this,a,b,c,"assets/common/btn_a_b.png",19,19,410,50,69,d)}function jb(a,b,c,d){d=void 0===d?[]:d;Ee.call(this,a,b,c,"assets/common/btn_s_b.png",19,19,381,50,69,d)}function md(a,b,c,d){d=void 0===d?[]:d;Ee.call(this,a,b,c,"assets/common/btn_n_o.png",19,19,551,50,69,d)}function Wl(a,b,c,d){d=void 0===d?[]:d;Ee.call(this,a,b,c,"assets/common/btn_s_g.png",19,19,
|
||
381,50,69,d)}function Wd(a,b,c,d){d=void 0===d?[]:d;md.call(this,a,b,c,d);c=b/2-80;b=b/2+80;this.i(this.l=(new Ea(a,205,255,"assets/common/aorange.png",.5,.5)).setPosition(c,40)).i(this.D=(new Ea(a,205,255,"assets/common/aorange.png",.5,.5)).setPosition(b,40));this.m.i(this.H=(new Cf(a,205,255,"assets/common/aorange.png",.5,.5)).setPosition(c,40)).i(this.J=(new Cf(a,205,255,"assets/common/aorange.png",.5,.5)).setPosition(b,40))}function Ai(a,b,c,d,e,f,g){e=void 0===e?null:e;Ea.call(this,a,void 0===
|
||
b?0:b,void 0===c?0:c,void 0===d?null:d,void 0===f?0:f,void 0===g?0:g);"string"===typeof e&&(e=a.oa.get(e));this.m=e;this.Cb=mH;this.g=nH}function nh(a,b){sa.call(this,a);this.effect=null;a=this.wc=[this.o=new ch(a,"assets/common/"+b+".vfx"),this.u=new ch(a,"assets/common/val_"+b+".vfx"),this.l=new ch(a,"assets/common/patrick_"+b+".vfx")];for(b=0;b<a.length;++b)this.i(a[b].L(!1))}function oh(a){nh.call(this,a,"opened");this.m=[];for(var b=this.g=0;6>b;++b)ee(this,this.m[b]=(new Ea(a,250,250,"assets/common/ray.png",
|
||
.5,1)).ya(ph).setColor(4294951424),b);this.pb()}function Ye(a){ib.call(this,a);var b=this;this.lb=this.Gc=null;this.m=new xe(this,"assets/general/CarBone01.anm",De);this.Ua=this.j=null;this.Ta=(new xe(this,"assets/general/Body01.anm",De)).on(op,function(c){var d=b.Ta,e=b.Ua;switch(b.state){case Ef:c===De["in"].T&&b.za(0,Xd);0===b.mc&&0===d.Ed(mv)&&(b.Ta.play("karts_hi",!1,he),e&&1<=b.Db&&a.audio.play(e.zj),b.mc=4+4*Math.random());break;case Xl:c===De[e.$].T&&0===b.mc&&(b.play("hi",!1,he),a.audio.play(e.zj),
|
||
b.mc=4+4*Math.random());break;case Yj:c===De.out.T&&b.Ta.play(b.Ua&&b.Ua.gm||"kart_unlock",!0,Xd);break;case Yl:1778!==c&&1870!==c||a.audio.play(e.zj);break;case sp:0===b.mc&&(b.Ta.play("advice",!1,he),b.mc=4+4*Math.random())}});this.g=null;this.o=new xe(null,null,De);this.je=null;this.i(this.Hc=new Zl(a));this.state=-1;this.l=this.mc=0;this.C=this.O=null;this.u=0;this.on(wl,this.dn)}function HO(a,b){var c=a.Gc;c&&c.ia(void 0,b);(c=a.j)&&c.ia(void 0,b);(a=a.g)&&a.ia(void 0,b)}function nv(a,b,c){a=
|
||
a.Ta;a.za(Da(a.Ed(c)+b,0,1),c)}function Zl(a){ib.call(this,a);this.i(this.Ab=(new Oa(a,"assets/general/star.mdl",oH)).setScale(.8));this.time=0}function Bi(a){ac.call(this,a,IO,JO);Rg(a.X,this)}function Zj(a){tb.call(this,a);var b=this;this.K=!OK(a.platform);var c=this.i,d=(new sa(a)).L(!1).i(this.na=new Ea(a,4096,2048,"assets/preloader/back.png",.5,.5)).i((new Ea(a,1134,844,"assets/preloader/image.png",.5,.5)).setScale(1.4).setPosition(-100,200)),e=d.i,f=Sd(new ld(a,413,303,"assets/preloader/logo.png"),
|
||
.5),g=f.L;a:switch(a.platform.va){case rd:var l=!1;break a;default:l=!0}c.call(this,this.V=e.call(d,this.u=g.call(f,l).ka(Zb).on(Yd,function(){var n=a.platform;ue(n,n.yc||"/")}))).i(this.J=(new sa(a)).L(!1).i(this.W=(new Ea(a,909,225,"assets/preloader/progress_back.png",.5,.5)).R(-144).i(this.dc=(new ah(a,803,93,"assets/preloader/progress_bar.png")).setPosition(51,62))).i(this.ready=(new sa(a)).L(!1))).on(nf,this.H).on(Qe,function(n){Q.any(n)&&(a.audio.play("assets/general/click.wav"),b.H())});this.ua=
|
||
0;this.D=null;this.g=0;this.C=!1;this.l=this.P=null}function qh(a){mb.call(this,a);var b=this;this.V.i((new Df(a,1400,1E3,"assets/common/panel.png",.5,.5)).i(this.title=Lb(lb(wf(new nb(a,"assets/common/font.json","",.5,.5)).setPosition(700,550)),.9)).i(this.g=bb(new jb(a,550,250,[Q.Ka,Q.La,Q.Mc,Q.BACK,Q.Fe,Q.aj]),"assets/common/check.png",304,265,!1,40,30).setPosition(700,800).N(function(){b.fa()})));Rb(this,this.g)}function $l(a){Ya.call(this,a);var b=this;this.kd.setScale(1.15);Ta(lb(Lb(wf(this.title).R(60),
|
||
.85)),1400,240,ab);this.V.i(this.na=new lg(a,3E3,2600,.5,.5));fd(this.g).i(this.login=(new jb(a,600,240,[Q.Oh])).i(Ta((new nb(a,"assets/common/font.json"," LOG IN",.5,.5)).setPosition(300,100),520,150,ab)).N(function(){a.platform.login().then(function(e){e&&window.ga&&ga("send","event","Kart Hooligans Logged In From Advice",0,a.da.version)})})).i(this.l=(new jb(a,600,240,[Q.jg])).i(Ta((new nb(a,"assets/common/font.json","GRANT",.5,.5)).setPosition(300,100),520,150,ab)).N(function(){a.platform.Zf().then(function(e){e&&
|
||
window.ga&&ga("send","event","Kart Hooligans Friends Permitted From Advice",0,a.da.version)})})).i(this.Ee=bb(new jb(a,343,240,[Q.Of]),"assets/common/bell.png",237,258).N(function(){a.platform.Ee().then(function(e){e&&window.ga&&ga("send","event","Kart Hooligans Subscribed From Advice",0,a.da.version)})})).i(this.nf=bb(new jb(a,343,240,[Q.ue,Q.Cl]),"assets/common/favorites.png",287,294).N(function(){a.platform.nf().then(function(e){e&&window.ga&&ga("send","event","Kart Hooligans Added To Favorites From Advice",
|
||
0,a.da.version)})})).i(this.Vd=(new jb(a,600,240,[Q.Mh])).i(Ta((new nb(a,"assets/common/font.json","FOLLOW",.5,.5)).setPosition(300,100),520,150,ab)).N(function(){b.app.platform.Vd()})).i(this.fh=bb(new jb(a,343,240,[Q.ue,Q.Cl]),"assets/common/add.png",279,295).N(function(){a.platform.fh().then(function(e){e&&window.ga&&ga("send","event","Kart Hooligans Added To Home Screen From Advice",0,a.da.version)})})).i(this.share=bb(new jb(a,343,240,[Q.Of]),"assets/common/share.png",275,286).N(function(){a.platform.share()})).i(this.D=
|
||
(new Wd(a,500,240,[Q.Ka,Q.La,Q.Mc,Q.Ge])).N(function(){b.fa()}));var c=this.na;c.clearColor=!1;var d=this.Va=c.Va;d.fe=!1;d.i(this.K=(new Ye(a)).ka(sp)).i((new Bi(a)).setScale(10,5));d=this.Ca=c.Ca;d.gd(30,c.width/c.height,1,50);mg(d,15,-.5);this.type=ak;this.u=!1;ha(this.W=[tp,am,bm,cm,dm,em,ov]);this.P=0;a.fd.on($g,function(){3<=++b.P&&up(b)});vb(this,this.login,this.l);vb(this,this.l,this.Ee);vb(this,this.Ee,this.nf);vb(this,this.nf,this.Vd);vb(this,this.Vd,this.fh);vb(this,this.fh,this.share);
|
||
vb(this,this.share,this.D);Rb(this,this.D)}function up(a){a.u=!0;var b=a.app.platform;a=a.W;for(var c=0;c<a.length;++c)switch(a[c]){case am:b.qf();break;case bm:b.rf();break;case cm:b.hh();break;case dm:b.rg();break;case em:bt(b)}}function fm(a){Ya.call(this,a);var b=this;this.title.fc="FRIEND BEATEN!";this.V.i(this.cj=(new sa(a)).setPosition(300,500).i((new Ea(a,243,214,"assets/common/up.png",.5,1)).R(-125)).i(this.kk=bd(lb(new rb(a,"assets/common/font.json","88",.5,.5)),100).R(-240)).i((new zi(a,
|
||
760,312,.5,.5)).setColor(fc)).i((new Ea(a,287,299,"assets/common/window.png",.5,.5)).setPosition(-250,-20)).i(this.ej=(new Ea(a,200,200,"assets/common/helmet.png",.5,.5)).setPosition(-250,-30)).i(this.dj=(new Ai(a,250,250,"assets/common/w.png","assets/common/window.png",.5,.5)).setPosition(-252,-30)).i(this.lk=bd(lb(new rb(a,"assets/common/font.json","99999",.5,.5)),400).Ra(100))).i(this.Lc=(new sa(a)).setPosition(300,900).i((new Ea(a,243,214,"assets/common/down.png",.5,0)).R(125)).i(this.mf=bd(lb(new rb(a,
|
||
"assets/common/font.json","88",.5,.5)),100).R(220)).i((new zi(a,760,312,.5,.5)).setColor(fc)).i((new Ea(a,287,299,"assets/common/window.png",.5,.5)).setPosition(-250,-20)).i(this.Od=(new Ea(a,200,200,"assets/common/helmet.png",.5,.5)).setPosition(-250,-30)).i(this.Zc=(new Ai(a,250,250,"assets/common/w.png","assets/common/window.png",.5,.5)).setPosition(-252,-30)).i(this.kf=bd(lb(new rb(a,"assets/common/font.json","99999",.5,.5)),400).Ra(100))).i(this.lf=(new lg(a,1600,2E3,.5,.5)).Ra(-400));fd(this.g).i(this.share=
|
||
bb(new jb(a,343,240,[Q.Of]),"assets/common/share.png",275,286).N(function(){XC(a.platform)?a.platform.request(b.xb,b.wb):a.platform.share(b.Cc,void 0,void 0,b.P)})).i(this.D=(new Wd(a,500,240,[Q.Ka,Q.La,Q.Mc,Q.Ge])).N(function(){b.fa()}));var c=this.lf;c.clearColor=!1;var d=this.Va=c.Va;d.fe=!1;d.i(this.u=new Ye(a)).i((new Bi(a)).setScale(10,5));(this.Ca=c.Ca).gd(30,c.width/c.height,1,50);mg(this.Ca,15,-.5);this.W=0;this.l=this.Lg=1;this.xb=null;this.wb=[];this.Cc=null;this.P={type:pH,value:0};this.K=
|
||
this.na=null;a.platform.on(qf,function(e){b.Lg=b.l=1;e.on(Un,function(){for(var f=vp(a.B),g=0;g<f.length;++g)if(-1===f[g].id){b.Lg=b.l=g+1;break}})});vb(this,this.share,this.D);Rb(this,this.D)}function KO(a){for(var b=vp(a.app.B),c=0;c<b.length;++c)if(-1===b[c].id){a.l=c+1;break}return a.l<a.Lg}function pv(a){tb.call(this,a);var b=this;this.i(this.top=(new sa(a)).i((new li(a,856,399,"assets/common/title.png",.5,.5)).setPosition(0,220)).i(this.options=bb(new jb(a,280,240,[Q.aj]),"assets/common/settings.png",
|
||
252,252,!1,80,70).setPosition(600,170).N(function(){a.options.show()})).i(this.event=(new jb(a,280,240,[Q.E])).setPosition(-600,170).i((new Ea(a,500,500,"assets/common/point.png",.5,.5)).setPosition(140,30).setColor(1325400064)).i(this.u=Ta(new rb(a,"assets/common/font.json","%0/%1",.5,.5),200,80,ab).setPosition(130,156)).i(this.D=(new xf(a,230,300,.5,.5)).setPosition(140,110)).N(function(){a.event&&a.event.fl&&a.event.fl()}))).i(this.l=fd(new sa(a)).i(this.sa=bb(new jb(a,343,240,[Q.Rh]),"assets/common/tasks.png",
|
||
293,282).setPosition(-540,-150).N(function(){a.sa.show()})).i(this.g=(new wp(a,[Q.La,Q.Ka,Q.Nf,Q.jg])).setPosition(430,-150).N(function(){b.play()})).i(this.sc=bb(new jb(a,514,240,[Q.Kf]),"assets/common/shop.png",313,296).setPosition(-100,-150).N(function(){if(xp(a.B))a.sc.show(Sb);else{var e=a.sc,f=e.app.Na,g=gm(f);g?e.show(qH(f,g),!0,g):e.show()}})));this.Tb=!1;this.rb=0;this.buttons=[this.sa,this.sc,this.g];rH(this);Rb(this,this.g,void 0,!1);var c=this.D;c.clearColor=!1;this.C=c.Va;var d=c.Ca;
|
||
d.gd(60,c.width/c.height,1,50);d.setPosition(8,0,0);d.Cg(0,0,0)}function rH(a){ad(a,a.options,a.g);a.event.visible?(vb(a,a.event,a.options),ad(a,a.event,a.sa)):ye(a,a.sa,a.options,!1);ye(a,a.sc,a.options,!1);ye(a,a.g,a.options,!1);vb(a,a.sa,a.sc);vb(a,a.sc,a.g)}function wp(a,b){md.call(this,a,514,240,b);this.i(this.D=new Ea(a,205,255,"assets/common/aorange.png",.5,.5)).i(this.H=new Ea(a,205,255,"assets/common/aorange.png",.5,.5)).i(this.J=new Ea(a,205,255,"assets/common/aorange.png",.5,.5));this.m.i(this.wa=
|
||
new Cf(a,205,255,"assets/common/aorange.png",.5,.5)).i(this.ua=new Cf(a,205,255,"assets/common/aorange.png",.5,.5)).i(this.na=new Cf(a,205,255,"assets/common/aorange.png",.5,.5));this.l=0}function qv(a){tb.call(this,a);var b=this;this.i(this.dh=new ch(a,"assets/common/accel.vfx")).i(this.top=(new sa(a)).i(this.J=(new sa(a)).i((new Gc(a,740,150,"assets/common/task_bg.png",221,0,110,.5)).Ia(-2).i(this.Un=Lb(Ta(lb(new nb(a,"assets/common/font.json","",.5,.5)),650,60,ab).setPosition(370,54),.7))).i((new sa(a)).setPosition(-390,
|
||
130).i(new Ea(a,786,153,"assets/common/pb_bg.png",0,.5)).i(this.ej=(new ah(a,723,84,"assets/common/pb_fr.png",0,.5)).setPosition(31,2)).i(this.dj=Ta(lb(new rb(a,"assets/common/font.json","%0/%1",.5,.5)),500,50,ab).setPosition(393,6))))).i(this.left=(new sa(a)).i((new sa(a)).setPosition(110,30).i((new dd(a,340,150)).setColor(fc)).i(this.Rn=(new dd(a,340,150)).setColor(4280332490)).i(this.fd=Lb(bd((new rb(a,"assets/common/font.json","9999",.5,.5)).setPosition(200,75),200),.8)).i((new Ea(a,238.4,297*
|
||
.8,"assets/common/star.png",.5,.5)).R(75).i(this.sn=Ta((new rb(a,"assets/common/digits.json","x%0",0,.5)).setPosition(90,120),120,110,ab)))).i((new sa(a)).setPosition(100,220).i((new dd(a,290,120)).setColor(fc)).i(this.ja=Lb(Ta(lb(new rb(a,"assets/common/font.json","",.5,.5)),150,90,ab).setPosition(160,60),.8)).i((new Ea(a,265,276,"assets/common/coin.png",.5,.5)).setScale(.7).R(60))).i((new sa(a)).setPosition(100,380).i((new dd(a,250,120)).setColor(fc)).i(this.Rc=Lb(Ta(lb(new rb(a,"assets/common/font.json",
|
||
"",.5,.5)),150,90,ab).setPosition(150,60),.8)).i((new Ea(a,244,254,"assets/common/fuel.png",.5,.5)).setScale(.7).R(60))).i(this.Ln=(new sa(a)).i((new dd(a,250,120)).setColor(fc)).i(this.Mn=(new dd(a,250,120)).setColor(4280332490)).i(this.Uc=Lb(Ta(lb(new rb(a,"assets/common/font.json","",.5,.5)),150,90,ab).setPosition(150,60),.8)).i((new Ea(a,221,316,"assets/common/nitro.png",.5,.5)).setScale(.6).R(60))).i(this.Xn=(new sa(a)).i((new dd(a,250,120)).setColor(fc)).i(this.ao=(new dd(a,250,120)).setColor(4280332490)).i(this.un=
|
||
Lb(Ta(lb(new rb(a,"assets/common/font.json","",.5,.5)),150,90,ab).setPosition(150,60),.8)).i((new Ea(a,267,263,"assets/common/x2.png",.5,.5)).setScale(.6).setPosition(10,60))).i(this.An=(new sa(a)).i((new dd(a,250,120)).setColor(fc)).i(this.Bn=(new dd(a,250,120)).setColor(4280332490)).i(this.ad=Lb(Ta(lb(new rb(a,"assets/common/font.json","",.5,.5)),150,90,ab).setPosition(150,60),.8)).i((new Ea(a,265,276,"assets/common/doubler.png",.5,.5)).setScale(.6).setPosition(10,60))).i(this.Jn=(new sa(a)).i((new dd(a,
|
||
270,120)).Ra(-20).setColor(fc)).i(this.Kn=(new dd(a,270,120)).Ra(-20).setColor(4280332490)).i(this.ed=Lb(Ta(lb(new rb(a,"assets/common/font.json","",.5,.5)),150,90,ab).setPosition(150,60),.8)).i((new Ea(a,257,259,"assets/common/magnet.png",.5,.5)).setScale(.7).setPosition(10,60))).i(this.vn=(new sa(a)).i((new dd(a,250,120)).setColor(fc)).i(this.xn=(new dd(a,250,120)).setColor(4280332490)).i(this.Qm=Lb(Ta(lb(new rb(a,"assets/common/font.json","x1",.5,.5)),150,90,ab).setPosition(150,60),.8)).i((new Ea(a,
|
||
175,131,"assets/common/hit.png",.5,.5)).Ia(-20).setPosition(20,50)))).i(this.Nn=bb((new jb(a,230,192,[Q.Mc,Q.Nf,Q.BACK,Q.Fe])).R(150),"assets/common/pause.png",191,182,!1,50,40).N(function(){a.pause.show()})).i(this.right=(new sa(a)).i(this.kf=(new sa(a)).R(260).i((new dd(a,260,130)).setPosition(10,230).setColor(fc)).i((new Ea(a,442,460,"assets/common/window.png")).setScale(.61).Ra(10)).i(this.lk=(new Ea(a,200,200,"assets/common/helmet.png")).setPosition(43,26)).i(this.kk=(new Ai(a,236,236,"assets/common/w.png",
|
||
"assets/common/window.png")).setPosition(25,14)).i(this.rn=Ta((new rb(a,"assets/common/font.json","99999",.5,.5)).setPosition(140,310),180,80,ab))).i(this.cj=new sa(a))).i(this.Od=(new sa(a)).i(this.na=$c((new Ea(a,226,265,"assets/common/mleft.png",.5,.5)).L(a.Dh&&!a.Ub),1).R(-200).setScale(1.3)).i(this.xb=$c((new Ea(a,225,273,"assets/common/mright.png",.5,.5)).L(a.Dh&&!a.Ub),1).R(-200).setScale(1.3)).i(this.K=(new sa(a)).L(!1).setPosition(430,-150).i($c((new sa(a,220,180,.5,.5)).R(20),.5).i(new Gc(a,
|
||
258,218,"assets/common/btn_s_b.png",381,50,69)).i((new Ea(a,200,209,"assets/common/adown.png",-.3,-.1)).setScale(.8))).i(this.En=(new sa(a,220,180,.5,.5)).setPosition(220,-50).i($c(new Gc(a,258,218,"assets/common/btn_s_b.png",381,50,69),.5)).i((new Ea(a,219,210,"assets/common/aright.png",-.25,-.05)).setScale(.8))).i(this.Dn=(new sa(a,220,180,.5,.5)).setPosition(-190,-50).i(new Gc(a,258,218,"assets/common/btn_s_b.png",381,50,69)).i((new Ea(a,208,202,"assets/common/aleft.png",-.25,-.05)).setScale(.8))).i($c((new sa(a,
|
||
220,180,.5,.5)).setPosition(40,-180),.5).i(new Gc(a,258,218,"assets/common/btn_s_b.png",381,50,69)).i((new Ea(a,197,207,"assets/common/aup.png",-.3,-.05)).setScale(.8)))).i(this.Ub=(new sa(a)).L(!1).setPosition(490,-240).i($c((new Ea(a,328,181,"assets/common/tvup.png",.5,.5)).setPosition(20,-136),.5)).i(this.Vn=(new Ea(a,188,304,"assets/common/tvleft.png",.5,.5)).setPosition(-150,-10)).i(this.Wn=(new Ea(a,186,301,"assets/common/tvright.png",.5,.5)).Ra(170)).i($c((new Ea(a,335,181,"assets/common/tvdown.png",
|
||
.5,.5)).R(130),.5)))).i(this.V=(new sa(a)).i(this.Ng=new yp(a)));this.l=0;var c=this.tn=[];this.on(nf,function(l,n,r){var w=c[b.l]||(c[b.l]={id:void 0,position:new kb,start:new kb});w.id=l;w.position.set(n,r);w.start.set(n,r);b.l++}).on(bi,function(l,n,r){for(var w=0;w<b.l;++w)if(c[w].id===l){c[w].position.set(n,r);break}}).on(el,function(l,n,r){for(var w=0;w<b.l;++w)if(c[w].id===l){c[w].position.set(n,r);l=c;n=--b.l;r=l[w];l[w]=l[n];l[n]=r;break}}).on(zj,function(l){for(var n=0;n<b.l;++n)if(c[n].id===
|
||
l){l=c;var r=--b.l,w=l[n];l[n]=l[r];l[r]=w;break}});var d=this.keys=[];this.on(Qe,function(l){d[l]=!0}).on(ys,function(l){d[l]=!1}).on(xt,function(){for(var l=0;l<d.length;++l)d[l]=!1});this.Ca=new hm(a);this.Va=new At(a,!1);this.B=new jp(a);this.xf=new fv(a);this.location=null;this.ef=[];this.Lc=[];this.de=[];this.Cc=[];this.He=[];var e=this.world=new Bc({gravity:new F(0,0,-9.81),broadphase:new Pj(a,null)});e.narrowphase=new Qj(e);for(var f=0;200>f;++f)e.contactEquationsPool.push(new Nh(null,null));
|
||
for(f=0;400>f;++f)e.frictionEquationsPool.push(new jj(null,null,void 0,void 0));e.addEventListener("beginContact",function(l){var n=l.bodyA;l=l.bodyB;var r=rh[n.id],w=rh[l.id];if(r&&w){var y=rv,A=zp,H=b.world.contacts;y.set(0,0,0);A.set(0,0,0);for(var I=0,O=0,S=H.length,R,ja,ka;O<S;++O)if(R=H[O],ja=R.bi,ka=R.bj,ja===n&&ka===l||ka===n&&ja===l)y.add(ja.position).add(R.ri),ja===n?A.add(R.ni):A.sub(R.ni),++I;1<I&&(y.scale(1/I),A.normalize());r.A(Dl,w,rv,zp);zp.Fc();w.A(Dl,r,rv,zp)}});e.addEventListener("endContact",
|
||
function(l){var n=l.bodyA;l=l.bodyB;n&&l&&(n=rh[n.id],l=rh[l.id],n&&l&&(n.A(Ut,l),l.A(Ut,n)))});this.gg=this.Ej=this.u=0;this.path=new xl;a.Zb.gb("assets/general/models.json");a.oa.gb("assets/general/opacity.json",{Pc:ui});a.oa.gb("assets/general/transparent.json",{Pc:ng});a.xd.gb("assets/general/animations.json");a.wc.gb("assets/general/effects.json");a.S.resize(Rd,20);a.S.resize(ji,10);a.S.resize(Ij,1);a.S.resize(vj,90);a.ba("sphere",$D,1);a.ba("box",Jt,1);a.ba("Coin01",Gl,214);a.ba("CoinDuble01",
|
||
Pt,6);a.ba("Kanistra01",Qt,6);a.ba("Nitro01",Rt,6);a.ba("Mnoj01",St,6);a.ba("Magnit01",Tt,6);a.ba("Token",Rj,6);a.ba("Sound3D",zf,90);a.ba("Inner",qi,20);a.ba("LightUp",Vb,110);a.ba("AsphaltTrail",gh,4);a.ba("BitumTrail",ti,4);a.ba("SandTrail",hh,4);a.ba("CivilCarTrail",ih,50);a.ba("bonus",Te,4);a.ba("bonus_end",Ot,4);a.ba("sparks",au,4);a.ba("break",Wt,4);a.ba("break_box",Xt,4);a.ba("break_red_white",Sj,4);a.ba("break_tree",Yt,4);a.ba("break_stone",Zt,4);a.ba("break_trash",$t,4);a.ba("earth",du,
|
||
2);a.ba("magnet",eu,30);a.ba("coin_effect",fu,30);a.ba("coin_gates_effect",yo,2);a.ba("gas_gates_effect",zo,2);a.ba("nitro_gates_effect",Ao,2);a.ba("color_drops",bu,4);a.ba("stone_drops",cu,4);a.ba("asphalt_effect",gu,1);a.ba("asphalt_3_effect",hu,1);a.ba("bitum_effect",ku,1);a.ba("bitum_3_effect",lu,1);a.ba("sand_effect",iu,1);a.ba("sand_3_effect",ju,1);a.ba("accel_effect",mu,1);a.ba("accel_3_effect",nu,1);a.ba("pink_accel_effect",ou,1);a.ba("val_accel_effect",pu,1);a.ba("nitro_effect",qu,1);a.ba("nitro_3_effect",
|
||
ru,1);a.ba("pink_nitro_effect",su,1);a.ba("val_nitro_effect",tu,1);this.Qa=[];this.zd=[];this.mf=[];a.platform.on(qf,function(){sv(b)});this.xe=this.P=this.W=this.dc=this.ua=this.Zc=this.kd=this.wb=this.rb=0;this.Yb=[];this.Sg=null;this.C=0;this.nd=[];this.D=-1;this.g=this.H=0;this.lf=null;this.Lf=this.hl=this.Rj=!1;var g=a.B;g.on(im,function(){b.B.set(ie(g),Ff(g),Gf(g))}).on(sH,function(){var l=b.location;l&&(b.clear(),l.dispose());b.location=new nE(a)});this.on(bk,function(){Dj(a.platform,"play")}).on(Ap,
|
||
function(){Dj(a.platform,"play")}).on(sh,function(){Dj(a.platform,"pause")});a.on(uj,function(){b.Lf&&Dj(a.platform,"pause")})}function tH(a){for(var b=a.ef,c=a.app.S,d=0,e,f=void 0;d<b.length;++d)e=b[d],(f=e.parent)&&f.Vc(e),e.input&&J(a.Lc,e),e.xc&&J(a.Cc,e),e.update&&J(a.de,e),e.gl&&J(a.He,e),c.release(e);b.length=0}function uH(a){var b=a.app;a.rb=0;a.wb=0;a.kd=0;a.Zc=0;a.ua=0;a.dc=0;a.W=0;a.P=0;var c=b.B;a.xe=c.Pb();for(var d=a.Yb,e=0;e<d.length;++e)d[e].visible=!1;a.Sg=null;a.C=0;a.J.visible=
|
||
!1;a.Ng.visible=!1;a.nd=vp(c,function(f,g){return f.Pb()-g.Pb()});a.D=-1;a.H=0;a.g=0;a.dh.opacity=0;a.Ub.visible=a.K.visible=!1;ck(c)&&(b.Nb.state=Ci)}function LO(a,b,c){var d=a.B,e=a.rb=Da(a.rb+2*(d.state===Hd?b:-b),0,1),f=1,g=1,l=a.app,n=l.Nb;switch(n.state){case Ci:e=a.rb=0;d.Rc=d.u;1<d.Mg&&(n.show(Di),l.sa.Me());break;case Di:e=a.rb=0;d.Rc=d.u;n.Tb||(f=g=n.rb);l.Ub?(a.Ub.visible=!0,a.K.visible=!1):l.Dh?(a.Ub.visible=!1,a.K.visible=!1):(a.Ub.visible=!1,a.K.visible=!0);if(tv(n)===th&&a.B.level.usage===
|
||
Ou)n.show(th).once(jm,function(){l.sa.Me()});break;case th:e=a.rb=0;d.Rc=d.u;f=g=n.rb;if(tv(n)===km&&a.B.level.usage!==Ou)n.show(km).once(jm,function(){var I=l.B;I.vh("TU",!1);I.remove("TT");I.remove("TT_d");I.remove("TT_s");I.remove("TT_t");n.state=MO;l.sa.Me();uH(a)});break;case km:e=a.rb=0,d.Rc=d.u}if(1>g){var r=n.time+=b,w=Math.abs(Math.sin(4*r));r=Math.abs(Math.cos(4*r));var y=a.Dn,A=a.na,H=a.Vn;A.color.r=A.color.b=H.opacity=y.opacity=1-.5*r;H.scale=y.scale=1-.05*r;r=a.En;y=a.xb;A=a.Wn;y.color.r=
|
||
y.color.b=A.opacity=r.opacity=1-.5*w;A.scale=r.scale=1-.05*w}else w=a.na,r=a.xb,w.color.r=w.color.b=r.color.r=r.color.b=1;a.left.x=-700*Eb(1-e);w=a.width;a.right.x=w+700*Eb(1-e);r=a.wb=Da(a.wb+2*(d.state!==Hd||n.Tb||n.state===Ci?-b:b),0,1);a.Nn.x=w-130+700*Eb(1-r);a.top.y=-400*Eb(1-e)*(n.Tb?qd(f):Eb(f));a.Od.y=a.height+600*Eb(1-e)*(n.Tb?qd(g):Eb(g));a.ja.text=d.ja;a.Rc.text=Math.ceil(d.Rc);e=540;f=d.Uc;a.Mn.width=20+f/d.Ci*230;g=a.kd=Da(a.kd+4*(0<d.Uc?1:-1)*b,0,1);a.Ln.setPosition(78-400*Eb(1-g),
|
||
e);e+=160*g;a.Uc.text=Math.ceil(f);f=d.j;a.ao.width=40+f/d.Ei*210;g=a.Zc=Da(a.Zc+4*(0<d.j?1:-1)*b,0,1);a.Xn.setPosition(78-400*Eb(1-g),e);e+=160*g;a.un.text=Math.ceil(f);f=d.ad;a.Bn.width=66+f/d.Ai*184;g=a.ua=Da(a.ua+4*(0<d.ad?1:-1)*b,0,1);a.An.setPosition(78-400*Eb(1-g),e);e+=160*g;a.ad.text=Math.ceil(f);g=d.ed;a.Kn.width=20+g/d.Bi*250;f=a.dc=Da(a.dc+4*(0<d.ed?1:-1)*b,0,1);a.Jn.setPosition(78-400*Eb(1-f),e);a.ed.text=Math.ceil(g);0<d.o&&(a.xn.width=250*d.o,a.Qm.text="x"+d.Z);g=a.W=Da(a.W+4*(0<d.o?
|
||
1:-1)*b,0,1);a.vn.setPosition(78-400*Eb(1-g),e+160*f);e=a.P=sb(a.P,d.fd,Math.min(4*b,1));a.fd.text=Math.floor(e);a.Rn.width=340*Math.min(e/a.xe,1);hb(a.sn,0,d.ua*(d.j?2:1)).setColor(d.j?4294901760:4294967295);e>=a.H&&0===a.g&&(a.g=1);a.rn.text=Math.max(Math.floor(a.H-e),0);0<a.g&&(e=a.g,0>=(a.g-=1.5*b)&&(a.g=0),.5<e&&.5>=a.g&&NO(a));f=a.kf;g=f.visible?Cb(Math.abs(2*a.g-1)):0;f.x=300-583*g;e=a.Yb;f=f.y+(370*g+30);for(g=0;g<e.length;++g)w=e[g],w.update(b),w.visible&&(w.y=f,f+=250*w.Ke);e.sort(function(I,
|
||
O){return(O.visible?1:0)-(I.visible?1:0)||I.y-O.y});e=aC(a.Ca.zf,d,Be);f=a.dh;f.opacity=sb(f.opacity,Da((d.speed-d.le)/d.le,0,1),2*b)*Math.min(d.tc.body.velocity.length(),1);.01>f.opacity?f.Tk():f.zl();f.setPosition((.5*e.x+.5)*a.width,(1-(.5*e.y+.5))*a.height-300).update(c);(c=l.sa.yg())&&a.Sg===c?1<(a.C+=3*b)&&(a.C=1):0>(a.C-=3*b)&&(a.C=0,(a.Sg=c)?(a.Un.fc=c.text,hb(a.dj,1,c.target),a.ej.value=uh(c),a.J.visible=!0):a.J.visible=!1);b=a.J;b.visible&&(c=a.Sg,b.y=20-300*Eb(1-a.C),hb(a.dj,0,Math.floor(c.count)),
|
||
a.ej.value=uh(c))}function NO(a){var b=a.app,c=a.nd;if($s(b.platform)){var d=a.P,e=Math.max(a.D,0);for(a.D=-1;e<c.length;++e){var f=c[e];if(-1!==f.id&&f.Pb()>d){a.D=e;break}}}if(a.kf.visible=-1!==a.D){c=c[a.D];a.H=c.Pb();var g=a.lk,l=a.kk;g.visible=!0;l.visible=!1;var n=a.lf=c.yd;n&&(l.qb=b.oa.get(n,{Ga:1,crossOrigin:""},function(){a.lf===n&&(g.visible=!1,l.visible=!0)}))}else a.H=0}function $L(a){for(var b=vH,c=a.Qa,d=0;d<b.length;++d){var e=b[d];-1===c.indexOf(e)&&c.push(e)}sv(a)}function KG(a,
|
||
b){for(var c=a.zd,d=0;d<b.length;++d){var e=b[d];-1===c.indexOf(e)&&c.push(e)}sv(a)}function wH(a,b){a=a.zd;for(var c=0;c<b.length;++c)J(a,b[c])}function sv(a){var b=a.app,c=b.B;if(c.qd){b=b.S;for(var d=a.Qa,e=0;e<d.length;++e){var f=Ze[d[e]];c.Qa(f.name)<f.count&&!Cd(f.model)&&b.register(f.model,1)}a=a.zd;for(d=0;d<a.length;++d)if(e=og[a[d]],0<dk(c,e))for(Cd(e.model)||b.register(e.model,1),e=e.Qa,f=0;f<e.length;++f){var g=e[f];c.Qa(g.name)<g.count&&!Cd(g.model)&&b.register(g.model,1)}}}function ek(a){sa.call(this,
|
||
a);this.i((new dd(a,520,200)).setColor(fc).Ra(50).Am(-1)).i(this.u=Lb(Ta(lb(new rb(a,"assets/common/font.json","",.5,.5)),190,180,ab).setPosition(-130,100),.8)).i(this.g=(new xf(a,500,500,.5,.5)).setPosition(-360,100));this.time=this.Ke=0;a=this.g;a.clearColor=!1;(this.l=a.Va).fe=!1;var b=a.Ca;b.gd(60,a.width/a.height,1,50);b.setPosition(7,0,0);b.Cg(0,0,0);b.U();this.m=this.o=null}function yp(a){sa.call(this,a,0,0,.5,.5);this.i(this.ready=(new li(a,1444,445,"assets/common/ready.png",.5,.5)).R(-300)).i(this.g=
|
||
(new li(a,1090,447,"assets/common/go.png",.5,.5)).R(-300));this.time=0}function hm(a){mi.call(this,a);this.gd(55,1,1,350);this.vi=this.startTime=0;this.Be=new E;this.Ye=new E;this.velocity=new E;this.target=new E;this.o=new E;this.m=new E;this.C=new E;this.l=new E;this.u=new E;this.O=new E;this.Z=new E;this.D=new E;this.H=new E;this.J=new E;this.P=new Tb;this.K=new Tb}function uv(a){tb.call(this,a);var b=this;this.i(this.g=(new Bp(a,[Q.Ka,Q.La,Q.Mc,Q.Ge])).N(function(){b.fa()})).i(this.window=fd(new lm(a)));
|
||
this.Tb=!1;this.rb=0;this.state=-1;this.time=0;Rb(this,this.g)}function Cp(a){a.i(a.window)}function tv(a){var b=a.state;switch(b){case Di:case th:return a=a.app.sa.list,(a=0<a.length?a[0]:null)&&1<=uh(a)?b+1:b;default:return b}}function Bp(a,b){jb.call(this,a,514,240,b);this.i(this.H=new Ea(a,252,267,"assets/common/awide.png",.5,.5)).i(this.D=new Ea(a,214,267,"assets/common/ablue.png",.5,.5));this.m.i(this.J=new Cf(a,252,267,"assets/common/awide.png",.5,.5)).i(this.wa=new Cf(a,214,267,"assets/common/ablue.png",
|
||
.5,.5));this.l=0}function lm(a){sa.call(this,a,1200,350);var b=this;this.i(this.g=(new Ea(a,0,0,"assets/common/w.png")).setColor(0).on(nf,function(){if(b.g.visible)return!0}).on(bi,function(){if(b.g.visible)return!0}).on(Qe,function(){if(b.g.visible)return!0})).i(this.Ab=(new sa(a,this.width,this.height,.5)).Ra(this.width/2).i((new Ea(a,1059,359,"assets/common/tut_bg.png")).Ra(150)).i(this.label=Ta(wf(lb(new nb(a,"assets/common/font.json","",.5,.5))).setColor(4287072135),730,240,ab).setPosition(794,
|
||
180)).i((new Ea(a,442,460,"assets/common/window.png")).setPosition(0,-30).i(this.o=(new xf(a,400,500)).setPosition(50,-100)).i((new Ea(a,372,93,"assets/common/window_front.png")).setPosition(41,337))));var c=this.o;c.clearColor=!1;var d=this.Va=c.Va;d.fe=!1;d.i(this.m=(new Ye(a)).set(Ei.MAX,null).ka(xH,null).I(-90,-4.022,35).setPosition(-3,-.3,.5).setScale(1.3));a=this.Ca=c.Ca;a.gd(30,c.width/c.height,1,50);mg(a,7,0,1.4);this.time=0;this.on($g,this.l)}function vv(a){mb.call(this,a);var b=this;this.V.i(this.H=
|
||
Sd(new sa(a),.5).setPosition(710,0).i(this.K=(new iv(a,1410,133,.5,.5)).setColor(4294967295)).i(this.C=Lb(Ta(lb(new nb(a,"assets/common/font.json","",.5,.5)),1300,80),.7).setPosition(0,50).setColor(4287072135)));for(var c=this.sa=[],d={},e=0;3>e;d={Ri:void 0},++e)d.Ri=new mm(a),d.Ri.o=!0,d.Ri.N(function(f){return function(){var g=a.B,l=f.Ri.Rg;l=l===g.yg()?"":l;g.rc("MT",l);g.A(wv)}}(d)),this.H.i(c[e]=d.Ri);this.i(this.l=(new sa(a,0,0,.5)).i(this.$=bb(new Wl(a,343,240,[Q.Xi]),"assets/common/home.png",
|
||
303,314).N(function(){a.$.show("browse","pause-mainmenu")})).i(this.g=(new Wd(a,500,240,[Q.Ka,Q.La,Q.Nf,Q.jg])).N(function(){b.fa()})).i(this.D=(new jb(a,343,240,[Q.Of,Q.$i])).N(function(){a.audio.Eg?a.audio.Qg?(Dn(a.audio),En(a.audio)):Dn(a.audio):En(a.audio)})));a.on(tj,function(){var f=a.play.B.state;!a.play.Pd||a.Nb.Pd||f!==Hd&&f!==Fi||(b.Pd?b.Tb=!0:b.show(),a.input.enable())});a.audio.on(Qn,function(){b.Vb(b.J)}).on(Rn,function(){b.Vb(b.J)});a.B.on(wv,function(){b.Vb(b.J)});for(d=0;d<c.length;++d)d===
|
||
c.length-1?(ye(this,this.$,c[d]),ye(this,this.D,c[d]),ye(this,this.g,c[d])):ad(this,c[d],c[d+1]);vb(this,this.$,this.g);vb(this,this.g,this.D);Rb(this,this.g)}function nm(a){mb.call(this,a);var b=this;this.V.i(new Df(a,1500,1E3,"assets/common/panel.png",.5,.5)).i(this.C=(new ld(a,664,467,"assets/common/gemioli.png")).Ia(-15).ka(Zb).on(Yd,function(){ue(a.platform,"https://gemioli.com")})).i(this.ua=(new sa(a,0,0,0,1)).i(this.Tg=(new jb(a,700,170,[Q.Rh])).i(Ta(new nb(a,"assets/common/font.json","TERMS OF USE",
|
||
.5,.5),630,150,ab).setPosition(350,80)).N(function(){var c=a.platform;ue(c,c.yc+"/terms.html")})).i(this.H=(new jb(a,700,170,[Q.Nf])).i(Ta(new nb(a,"assets/common/font.json","PRIVACY POLICY",.5,.5),630,150,ab).setPosition(350,80)).N(function(){var c=a.platform;ue(c,c.yc+"/privacy.html")})).i(this.g=(new jb(a,700,170,[Q.mn])).i(Ta(new nb(a,"assets/common/font.json","RESTORE PURCHASES",.5,.5),630,150,ab).setPosition(350,80)).N(function(){a.platform.Sj()})).i(this.P=(new sa(a,0,300,0,.5)).i(this.W=Ta(wf(lb(new nb(a,
|
||
"assets/common/font.json","",.5))),600,300,ab))).i(this.login=(new jb(a,700,170,[Q.Ge])).i(bd(new nb(a,"assets/common/font.json"," LOG IN",.5,.5),630).setPosition(350,80)).N(function(){a.platform.login().then(function(c){c&&window.ga&&ga("send","event","Kart Hooligans Logged In From Options",0,a.da.version)})})).i(this.logout=(new jb(a,700,170,[Q.Kh])).i(bd(new nb(a,"assets/common/font.json"," LOG OUT",.5,.5),630).setPosition(350,80)).N(function(){a.platform.logout()}))).i(this.K=fd(new sa(a)).setPosition(0,
|
||
450).i(this.J=bb(new jb(a,300,192,[Q.Mh]),"assets/common/fullscreen_on.png",254,296).N(function(){wC()})).i(this.l=(new jb(a,300,192,[Q.Of,Q.$i])).N(function(){a.audio.Eg?a.audio.Qg?(Dn(a.audio),En(a.audio)):Dn(a.audio):En(a.audio)})).i(this.language=bb(new jb(a,300,192,[Q.Oh]),"assets/common/language.png",274,227,!0).N(function(){rC(a.locale)})).i(this.D=bb(new jb(a,300,192,[Q.Ka,Q.La,Q.Mc,Q.BACK,Q.Fe,Q.aj]),"assets/common/check.png",304,265).N(function(){b.fa()})));a.on(PC,function(){b.Vb()});a.audio.on(Qn,
|
||
function(){b.Vb()}).on(Rn,function(){b.Vb()});a.platform.on(qf,function(){b.Vb()});ye(this,this.J,this.logout);ye(this,this.l,this.logout);ye(this,this.language,this.logout);ad(this,this.Tg,this.H);ad(this,this.H,this.g);ad(this,this.g,this.login);ad(this,this.login,this.logout);ad(this,this.logout,this.D);vb(this,this.J,this.l);vb(this,this.l,this.language);vb(this,this.language,this.D);Rb(this,this.D)}function Dp(a){mb.call(this,a);var b=this;this.V.i((new Df(a,1400,1E3,"assets/common/panel.png",
|
||
.5,.5)).i(Lb(Ta(lb(wf((new nb(a,"assets/common/font.json","YOU DON'T HAVE A GAME SAVED IN YOUR ACCOUNT, SO YOU CAN START A NEW GAME.\n\nWOULD YOU LIKE TO START A NEW GAME OR CONTINUE THE GAME WITH THE CURRENT PROGRESS?",.5,.5)).setPosition(700,350))),1200,500),.9)).i(this.buttons=fd(new sa(a)).setPosition(700,800).i(this.l=(new jb(a,460,240,[Q.jk])).i(Lb(Ta(lb(new nb(a,"assets/common/font.json","NEW GAME",.5,.5)),380,160,ab).setPosition(230,100),.7)).N(function(){b.result=yH;mb.prototype.fa.call(b)})).i(this.g=
|
||
(new jb(a,460,240,[Q.Ge])).i(Lb(Ta(lb(new nb(a,"assets/common/font.json","CONTINUE GAME",.5,.5)),380,160,ab).setPosition(230,100),.7)).N(function(){b.result=zH;mb.prototype.fa.call(b)})).i(this.cancel=bb(new jb(a,300,240,[Q.Mc,Q.BACK,Q.Fe]),"assets/common/close.png",268,243,!1,50,40).N(function(){b.fa()}))));this.result=AH;vb(this,this.l,this.g);vb(this,this.g,this.cancel);Rb(this,this.cancel)}function fk(a){mb.call(this,a);var b=this;this.i(this.top=(new sa(a)).i((new sa(a)).Ia(-1).i(this.kd=Sd((new ki(a,
|
||
500,183,"assets/common/pattern_s.png",225,183,new Xb(0,0,225,183),mh)).R(135),0)).i(this.dc=Sd((new ki(a,500,639,"assets/common/pattern.png",225,639,new Xb(0,0,225,639),mh)).R(-500),0)).i(this.title=Ta(Lb(new nb(a,"assets/common/font.json","FILL UP?",.5,.5),1.5).setPosition(-250,20),1E3,100))).i(this.ih=(new rp(a,450,150)).setPosition(290,-60).i(this.ja=Lb(Ta(lb(new rb(a,"assets/common/font.json"," %0",.5,.5)),400,130,ab).setPosition(225,75),.8))));this.V.i((new sa(a,1200,640,.5,.5)).i(uL(new Df(a,
|
||
1200,640,"assets/common/panel.png")).R(640)).i((new sa(a,100,0,.5,.5)).setPosition(600,120).i((new qp(a,500,186,0,.5)).setPosition(-10,40).setColor(4283878415)).i(this.wb=bd((new rb(a,"assets/common/font.json","%0",.5,.5)).setPosition(300,40),200)).i(this.Rc=new Ea(a,345,360,"assets/common/fuel.png",.5,.5)).i(this.ed=(new Ea(a,366,369,"assets/common/magnet.png",.5,.5)).Ra(-250)).i(this.ua=(new Ea(a,385,374,"assets/common/x2.png",.5,.5)).Ra(-250)).i(this.ad=(new Ea(a,377,396,"assets/common/doubler.png",
|
||
.5,.5)).Ra(-250))).i((new qp(a,800,150,0,.5)).setColor(fc).setPosition(190,430)).i(this.fill=(new Af(a,800,150,0,.5)).setColor(4294624809).setPosition(200,430)));this.i(this.P=fd(new sa(a)).i(this.W=(new jb(a,514,240,[Q.La,Q.Ka,Q.Kf,Q.Nf])).i(this.xb=Ta(new nb(a,"assets/common/font.json"," %0",.5,.5),450,170,ab).setPosition(250,100)).N(function(){var c=b.D;b.C<c?(b.l=!0,a.message.Yj("NOT ENOUGH COINS").once(pg,function(){b.time=b.g;b.l=!1})):(b.C-=c,xv(a.B,c),a.audio.play("assets/general/buy.wav"),
|
||
b.D*=2,b.J=!0,b.Bf=!0,b.fa())})).i(this.H=bb(new jb(a,514,240,[Q.Mh,Q.ah]),"assets/common/video.png",310,380).N(function(){var c=b.K;b.K=null;c&&(b.l=!0)&&c()})));this.g=this.time=this.na=0;this.J=this.Bf=!1;this.C=this.D=0;this.l=!0;this.K=null;a.play.on(bk,function(){b.J=!0;b.D=500;b.C=Hf(a.B)});this.on(Qe,function(c){Q.any(c)&&b.fa()});vb(this,this.W,this.H);Rb(this,this.W,Q.$g,!1)}function gk(a){mb.call(this,a);var b=this;this.i(this.K=(new sa(a)).i((new Df(a,1025,482,"assets/common/arc.png",
|
||
.5)).setScale(1.2).setColor(fc).R(-530)).i(this.l=(new ld(a,166,187,"assets/common/facebook.png",[Q.Mh])).setPosition(-110,-370).N(function(){var c=b.J;ub("https://www.facebook.com/sharer.php?u="+encodeURIComponent(Tg(a.platform,"",b.image,b.options))+"&hashtag="+encodeURIComponent(c?"#"+c:""),550,600);Promise.resolve()})).i(this.H=(new ld(a,170,176,"assets/common/xcom.png",[Q.Nl])).setPosition(110,-370).N(function(){var c=b.J;ub("https://x.com/intent/tweet?url="+encodeURIComponent(Tg(a.platform,
|
||
void 0,b.image,b.options))+"&text="+encodeURIComponent("")+"&hashtags="+encodeURIComponent(c||"")+"&via=Gemioli",550,600);Promise.resolve()})).i(this.C=(new ld(a,174,157,"assets/common/telegram.png",[Q.Rh])).setPosition(330,-270).N(function(){ub("https://t.me/share/url?url="+encodeURIComponent(Tg(a.platform,void 0,b.image,b.options))+"&text="+encodeURIComponent(""),550,600);Promise.resolve()})).i(this.D=(new ld(a,205,169,"assets/common/vkontakte.png",[Q.ah])).setPosition(-330,-270).N(function(){gD(a.platform,
|
||
"",b.image,b.options)})).i(this.email=(new ld(a,183,177,"assets/common/email.png",[Q.E])).setPosition(-450,-80).N(function(){var c=a.platform,d=b.text||a.locale.ma("Kart Hooligans");window.open("mailto:?subject="+d+"&body="+encodeURIComponent(Tg(c,void 0,void 0,b.options)),"_blank");Promise.resolve()})).i(this.copy=(new ld(a,175,173,"assets/common/link.png",[Q.Ge])).setPosition(450,-80).N(function(){t(Tg(a.platform,b.text,b.image,b.options))})).i(this.close=bb(new jb(a,343,240,[Q.Ka,Q.La,Q.Mc,Q.BACK,
|
||
Q.Fe]),"assets/common/close.png",268,243,!1,50,40).N(function(){b.fa()})));this.J=this.image=this.text="";this.options=void 0;this.g=null;vb(this,this.email,this.D);vb(this,this.D,this.l);vb(this,this.l,this.H);vb(this,this.H,this.C);vb(this,this.C,this.copy);ad(this,this.D,this.close);ad(this,this.H,this.close);ad(this,this.C,this.close);ad(this,this.email,this.close);ad(this,this.copy,this.close);ad(this,this.l,this.close);Rb(this,this.close)}function hk(a){mb.call(this,a);var b=this;this.i(this.D=
|
||
(new sa(a)).i((new Df(a,1025,482,"assets/common/arc.png",.5)).setScale(1.2).setColor(fc).R(-530)).i(this.l=(new ld(a,166,187,"assets/common/facebook.png",[Q.Mh])).setPosition(-150,-370).N(function(){ue(a.platform,"https://facebook.com/Gemioli")})).i(this.C=(new ld(a,170,176,"assets/common/xcom.png",[Q.Nl])).setPosition(150,-370).N(function(){ue(a.platform,"https://x.com/Gemioli")})).i(this.H=(new ld(a,174,157,"assets/common/telegram.png",[Q.Rh])).setPosition(400,-200).N(function(){ue(a.platform,"https://t.me/Gemioli")})).i(this.J=
|
||
(new ld(a,205,169,"assets/common/vkontakte.png",[Q.ah])).setPosition(-400,-200).N(function(){ue(a.platform,"https://vk.com/Gemioli")})).i(this.close=bb(new jb(a,343,240,[Q.Ka,Q.La,Q.Mc,Q.BACK,Q.Fe]),"assets/common/close.png",268,243,!1,50,40).N(function(){b.fa()})));this.g=null;vb(this,this.J,this.l);vb(this,this.l,this.C);vb(this,this.C,this.H);ad(this,this.J,this.close);ad(this,this.C,this.close);ad(this,this.H,this.close);ad(this,this.l,this.close);Rb(this,this.close)}function yv(a){sa.call(this,
|
||
a,0,0,.5,.5);var b=this;this.i(this.u=new nh(a,"change"));this.i(this.D=new lg(a,2E3,3E3,.5,.5));var c=this.D;c.clearColor=!1;var d=this.Va=c.Va;d.fe=!1;(this.Ca=c.Ca).gd(30,1,1,40);d.i((new Bi(a)).setScale(50,1E3));d.i(this.m=new Ye(a)).i(this.g=new Ye(a));this.Je=[];this.Id=[];c=this.H=[];var e=this.o=[],f=this.selected=[];this.J=[];for(var g=this.fi=[],l=0;l<zv;++l)this.i(e[l]=HD(new Mj(a,1024,1024,512,0),200,0)),c[l]=0,d.i(f[l]=(new ze(a,(new Ea(a,273,273,"assets/common/selected.png",.5,.5)).setScale(.003),
|
||
OO)).I(-90,0,90).kl(!1)),f[l].U(),d.i(g[l]=new Av(a));this.mode=Sb;this.l=!1;this.time=this.C=0;this.on($g,this.fn);var n=a.B;n.on(im,function(){b.m.set(ie(n),b.m.lb,Gf(n));b.g.set(ie(n),Ff(n),b.g.je)})}function Ep(a,b,c){var d=a.Va,e=a.Id,f=e[b];if(f)for(var g=0;g<f.length;++g)d.removeChild(f[g]);f=a.app;g=f.event;var l=f.B;a=a.Je[b]=[];for(var n=0;n<c.length;++n){var r=c[n];if(r.event)if(r.event===g){var w=r.On=g.co++;a.push(r);!l.qd||om(l,r.name)||l.Aa("ET",0)&1<<w||(r.Yd=g.Yd)}else!og[r.name]&&
|
||
l.qd&&om(l,r.name)&&a.push(r);else a.push(r)}c=e[b]=[];if(b!==Mc)for(b=0;b<a.length;++b)a[b].fi||(e=(new Ye(f)).L(!1),c.push(e),d.i(e))}function gm(a){a=a.Je;for(var b=0;b<a.length;++b)for(var c=a[b],d=0;d<c.length;++d)if(c[d].Yd)return c[d];return null}function qH(a,b){a=a.Je;for(var c=0;c<a.length;++c)if(-1!==a[c].indexOf(b))return c;return-1}function pm(a){return a.Je[a.mode][a.Se()]}function ik(a){return a.Id[a.mode][a.Se()]}function BH(a){var b=a.mode,c=a.o[b];c.scroll(Math.max(Math.min(c.m.x,
|
||
0)-c.Ve.x,-(a.Je[b].length-1)*c.Ve.x),0,!0)}function CH(a){var b=a.mode;a.o[b].scrollLeft(a.Je[b].length,!0)}function mg(a,b,c,d){d=void 0===d?0:d;b=PO.scale(b,Be).add(qm);a.setPosition(b.x,b.y,b.z+c);a.Cg(qm.x,qm.y,qm.z+c+d);a.U()}function Av(a){ib.call(this,a);this.i(this.model=new Oa(a,"assets/general/vopros.mdl",QO));this.time=0}function Bv(a){Ya.call(this,a);var b=this;this.top.i(this.ih=(new rp(a,450,150)).setPosition(290,-60).i(this.ja=Lb(Ta(lb(new rb(a,"assets/common/font.json"," %0",.5,
|
||
.5)),400,130,ab).setPosition(225,75),.8)));ee(this.ua,this.P=(new sa(a)).i((new Af(a,1400,186,.5)).R(70).setColor(fc)).i(this.nl=Ta((new nb(a,"assets/common/font.json","%0",.5,.5)).setPosition(0,196),1300,90,ab)),1);fd(this.g).i(this.right=(new ld(a,225,273,"assets/common/mright.png")).setPosition(1330,-350).N(function(){var e=a.Na;b.right.effect?e.scrollTo(gm(e),!1):BH(e)})).i(this.left=(new ld(a,226,265,"assets/common/mleft.png")).setPosition(80,-350).N(function(){CH(a.Na)})).i(this.$=bb(new Wl(a,
|
||
393,240,[Q.Mc,Q.BACK,Q.Fe,Q.Kf,Q.Xi]),"assets/common/home.png",272.7,282.6,!1,40,30).N(function(){b.fa()})).i(this.K=(new md(a,550,240,[Q.Ka,Q.La])).i(this.Cc=Ta(new nb(a,"assets/common/font.json"," %0",.5,.5),450,170,ab).setPosition(275,100)).N(function(){var e=a.B,f=pm(a.Na);f.ra&&(Hf(e)>=f.ra?(xv(e,f.ra),a.audio.play("assets/general/buy.wav"),RO(b,f)):a.message.Yj("NOT ENOUGH COINS"))})).i(this.sa=(new md(a,550,240,[Q.Ka,Q.La])).N(function(){pm(a.Na).sa.show()})).i(this.Hc=(new md(a,550,240)).i(this.Lc=
|
||
(new Xj(a)).setPosition(275,100).setScale(.5))).i(this.D=(new Wd(a,550,240,[Q.Ka,Q.La])).N(function(){b.play()})).i(this.Ba=(new md(a,550,240,[Q.Ka,Q.La])).i((new Ea(a,600,600,"assets/common/point.png",.5,.5)).setPosition(275,-20).setColor(1325400064)).i(this.Od=(new xf(a,500,600,.5,.5)).setPosition(275,-20)).i(this.Zc=Ta(new nb(a,"assets/common/digits.json","%0/%1",.5,.5),450,100,ab).setPosition(275,140)).N(function(){var e=pm(a.Na),f=a.Na;f.mode=b.mode=Mc;f.scrollTo(Ze[e.Ba].box,!1)})).i(this.select=
|
||
bb(new md(a,550,240,[Q.Ka,Q.La]),"assets/common/check.png",304,265,!1,30,20).N(function(){var e=a.B,f=a.Na,g=pm(f);switch(f.mode){case Sb:Cv(e,g.name);break;case wc:Dv(e,g.name);break;case Mb:Fp(e,g.name)}})).i(this.done=bb(new md(a,550,240,[Q.Ka,Q.La]),"assets/common/check.png",304,265,!1,30,20)).i(this.xb=bb(new md(a,550,240,[Q.Ka,Q.La]),"assets/common/close.png",268,243,!1,30,20).N(function(){switch(a.Na.mode){case Mb:Fp(a.B,"")}})).i(this.notify=bb(new md(a,550,240,[Q.Ka,Q.La]),"assets/common/bell.png",
|
||
237,258).N(function(){a.platform.Ee().then(function(e){e&&window.ga&&ga("send","event","Kart Hooligans Subscribed From Shop",0,a.da.version)})})).i(this.l=(new lv(a,430,240,[Q.$i])).N(function(){var e=a.Na;b.mode=e.mode=(e.mode+1)%zv;Ev(b);b.l.effect&&e.scrollTo(gm(e),!0,!0)}));var c=this.buttons=[this.$,this.K,this.D,this.Ba,this.sa,this.notify,this.select,this.xb,this.Hc,this.done,this.l];this.mode=Sb;for(var d=0;d<c.length-1;++d)vb(this,c[d],c[d+1]);ye(this,this.$,this.V);ye(this,this.l,this.V);
|
||
Rb(this,this.$);this.V.on(Qe,function(e){if(a.Nb.window.parent!==b.g)switch(e){case Q.Zg:if(!a.Ub||b.V.Xe)return CH(a.Na),!0;break;case Q.$g:if(!a.Ub||b.V.Xe)return BH(a.Na),!0}});c=a.S;Cd(Fv.model)||c.register(Fv.model,1);this.u=null;c=this.Od;c.clearColor=!1;(this.wb=c.Va).fe=!1;d=c.Ca;d.gd(60,c.width/c.height,1,50);d.setPosition(8,0,0);d.Cg(0,0,0);d.U();this.W=this.na=null}function RO(a,b){var c=a.app;og[b.name]?(SO(c.B,b.name),c.gf.show(b).once(qg,function(){vh(c,function(){var d=Zf(c.screen);
|
||
a.show(Mc,d!==c.gf&&d!==c.bk,b)})})):(TO(c.B,b),Ev(a),c.Ug.show(b).once(qg,function(){vh(c,function(){a.show(c.Na.mode,!1,b)})}))}function Ev(a){var b=a.app,c=b.Nb;Cp(c);a.u&&a.u!==a.K&&(a.u.keys.length=1);if(xp(b.B)){var d=null,e=null;switch(a.mode){case Sb:d=a.l;e="SO, THESE ARE KARTS! GO AHEAD";break;case wc:d=a.l;e="AND THESE ARE MY FRIENDS HOOLIGANS! KEEP GOING";break;case Mb:d=a.K,e="THAT'S WHAT YOU NEED! BUY IT NOW!",b.Na.scrollTo(wh["SHARK FIN"])}b=a.g;ee(b,a.u=d,b.children.length-1);ee(b,
|
||
c.window.setPosition(700,-650).set(e,!0,1),b.children.length-1);Rb(a,d,void 0,!1);a.Ob(d);d!==a.K&&(d.keys.push(Q.Ka),d.keys.push(Q.La))}else a.u=null,Rb(a,a.$,void 0,!1)}function je(a,b){for(var c=a.buttons,d=1;d<c.length-1;++d){var e=c[d];if(e.visible=e===b){ye(a,e,a.V);for(var f=1,g=a.m;f<c.length-1;++f)if((d!==f||e.state===Zb)&&g===c[f]){f=a.Gg;a.Ob(e,Q.Zg);a.Gg=f;break}}}}function Gp(a){mb.call(this,a);var b=this;this.V.i(new Df(a,1900,1E3,"assets/common/panel.png",.5,.5)).i(this.g=(new ld(a,
|
||
664,467,"assets/common/gemioli.png")).setPosition(-350,-250).Ia(-12).ka(Zb).on(Yd,function(){var c=a.platform;ue(c,c.yc||"/")})).i(Ta(lb(wf(new nb(a,"assets/common/font.json","TO CONTINUE PLAYING, YOU NEED TO CONFIRM THAT YOU AGREE TO OUR TERMS OF USE AND HAVE READ OUR PRIVACY POLICY",.5,.5)).setPosition(390,-160)),730,550)).i(this.Tg=(new jb(a,720,192,[Q.Rh])).setPosition(-360,100).i(Ta(new nb(a,"assets/common/font.json","TERMS OF USE",.5,.5),630,150,ab).setPosition(350,90)).N(function(){var c=a.platform;
|
||
ue(c,c.yc+"/terms.html")})).i(this.l=(new jb(a,720,192,[Q.Nf])).setPosition(-360,330).i(Ta(new nb(a,"assets/common/font.json","PRIVACY POLICY",.5,.5),630,150,ab).setPosition(350,90)).N(function(){var c=a.platform;ue(c,c.yc+"/privacy.html")})).i(this.language=bb(new jb(a,300,192,[Q.Oh]),"assets/common/language.png",274,227,!0).setPosition(200,330).N(function(){rC(a.locale)})).i(this.accept=bb(new jb(a,300,192,[Q.ue,Q.Ka,Q.La]),"assets/common/check.png",304,265).setPosition(550,330).N(function(){var c=
|
||
a.platform;c.B.vh(c.W,!0);b.fa()}));vb(this,this.l,this.language);vb(this,this.language,this.accept);ad(this,this.Tg,this.l);Rb(this,this.accept)}function DH(a){mb.call(this,a);var b=this;this.V.i((new Df(a,1400,700,"assets/common/panel.png",.5,.5)).i(bd(lb((new nb(a,"assets/common/font.json","EXIT GAME?",.5,.5)).setPosition(700,170)),1E3)).i(this.l=bb((new jb(a,550,240,[Q.Ol])).setPosition(400,500),"assets/common/check.png",304,265).N(function(){a.platform.Mk()})).i(this.g=bb((new jb(a,550,240,[Q.Ka,
|
||
Q.La,Q.Mc,Q.BACK,Q.Fe,Q.jk])).setPosition(1E3,500),"assets/common/close.png",268,243).N(function(){b.fa()})));vb(this,this.l,this.g);Rb(this,this.g)}function EH(a){mb.call(this,a);var b=this;this.V.i((new Df(a,1400,700,"assets/common/panel.png",.5,.5)).i(Ta(lb(wf(lb(new nb(a,"assets/common/font.json","DO YOU WANT TO SKIP THE QUEST?",.5,.5))).setPosition(700,170)),1E3,180)).i(this.l=bb((new jb(a,550,240,[Q.Ol])).setPosition(400,500),"assets/common/check.png",304,265).N(function(){b.result=!0;b.fa()})).i(this.g=
|
||
bb((new jb(a,550,240,[Q.Ka,Q.La,Q.Mc,Q.BACK,Q.Fe,Q.jk])).setPosition(1E3,500),"assets/common/close.png",268,243).N(function(){b.result=!1;b.fa()})));vb(this,this.l,this.g);Rb(this,this.g);this.result=!1}function jk(a){dg.call(this,a);this.i(this.process=(new Xj(a)).setScale(.6))}function Hp(a){Ya.call(this,a);var b=this;this.title.fc="NEW HIGH SCORE!";ee(ee(this.ua,(new zi(a,1E3,300,.5)).setColor(fc),1),this.label=Lb(bd((new rb(a,"assets/common/font.json","%0",.5,.5)).setPosition(0,204),800),1.2),
|
||
2);this.V.i(this.effect=(new oh(a)).R(50)).i(this.D=new lg(a,3E3,2600,.5,.5));fd(this.g).i(this.share=bb(new jb(a,343,240,[Q.Of]),"assets/common/share.png",275,286).N(function(){var e=b.K,f=e.value=a.B.Pb();a.platform.share(In(a.locale,f,"Amazing! I've got a new high score of %0!").replace("%0",f),void 0,void 0,e)})).i(this.u=(new Wd(a,500,240,[Q.Ka,Q.La,Q.Mc,Q.Ge])).N(function(){b.fa()}));var c=this.D;c.clearColor=!1;var d=this.Va=c.Va;d.fe=!1;d.i(this.l=(new Ye(a)).ka(FH)).i((new Bi(a)).setScale(10,
|
||
5));d=this.Ca=c.Ca;d.gd(30,c.width/c.height,1,50);mg(d,15,-.5);this.bl=0;this.K={type:GH,value:0};a.play.on(bk,function(){b.bl=a.B.Pb()}).on(sh,function(){var e=Math.floor(a.play.B.fd);e>b.bl&&a.B.kc("BS",Math.max(0,e))});vb(this,this.share,this.u);Rb(this,this.u)}function kk(a){Ya.call(this,a);var b=this;bd(gd(this.title,"SCORE: %0"),1200);this.V.i(this.mf=(new lg(a,2600,2600,.5,.5)).R(-200)).i(this.lf=fd((new sa(a)).setPosition(50,360)).i((new sa(a,550)).i(new yi(a,550,160)).i(this.exp=(new Af(a,
|
||
550,160)).setColor(4280332490)).i(this.Od=bd((new rb(a,"assets/common/font.json","%0/%1",.5,.5)).setPosition(320,80),350)).i((new Ea(a,298,297,"assets/common/star.png",.5,.5)).R(80).i(this.kf=Ta(new nb(a,"assets/common/digits.json","x%0",.5,.5),150,130,ab).setPosition(170,140)))).i((new sa(a,550)).i(new yi(a,550,160)).i(this.ja=bd((new rb(a,"assets/common/font.json","%0",.5,.5)).setPosition(320,80),350)).i((new Ea(a,265,276,"assets/common/coin.png",.5,.5)).R(80))));fd(this.g).i(this.l=bb(new jb(a,
|
||
400,240,[Q.Kh,Q.ah,Q.ue]),"assets/common/video.png",248,304,!1,-30,-40).i(this.Zc=Ta(new rb(a,"assets/common/digits.json","%0",.5,.5),300,100,ab).setPosition(200,150)).N(function(){var e=b.na;b.na=null;e&&e()}).on(Kj,function(e){!e&&b.m===b.l&&b.Ob(b.u)})).i(this.u=(new Wd(a,500,240,[Q.Ka,Q.La,Q.Nf,Q.jg])).N(function(){var e=b.app;vh(e,function(){e.play.pb()});b.fa()})).i(this.$=bb(new Wl(a,343,240,[Q.Xi]),"assets/common/home.png",303,314).N(function(){a.$.show("browse","score-mainmenu")}));this.buttons=
|
||
[this.$,this.l,this.u];var c=this.mf;c.clearColor=!1;var d=this.Va=c.Va;d.i(this.wb=(new Ye(a)).ka(HH)).i((new Bi(a)).setScale(10,5));d.fe=!1;(this.Ca=c.Ca).gd(30,c.width/c.height,1,50);this.Cc=this.D=this.Lc=this.P=this.W=this.K=this.xb=this.time=0;this.na=null;a.play.on(bk,function(){b.xb=a.B.Aa("E",0);b.K=0;b.W=0;b.P=0}).on(sh,function(){var e=a.play.B;e.ja>b.K&&(Ip(a.B,e.ja-b.K),b.K=e.ja);e.Mg>b.W&&(a.B.ye("PT",Math.floor(e.Mg-b.W)),b.W=e.Mg);e=Math.floor(e.exp);e>b.P&&(a.B.ye("E",e-b.P,0),b.P=
|
||
e)});vb(this,this.$,this.l);vb(this,this.l,this.u);Rb(this,this.u)}function Jp(a){Ya.call(this,a);var b=this;ee(this.ua,this.P=(new sa(a)).i((new Af(a,1400,186,.5)).R(70).setColor(fc)).i(Ta((new nb(a,"assets/common/font.json","LOADING ISSUE",.5,.5)).setPosition(0,196),1300,90,ab)),1);this.V.i(this.effect=(new oh(a)).R(50));fd(this.g).i(this.share=bb(new jb(a,343,240,[Q.Of]),"assets/common/share.png",275,286).N(function(){var c=a.locale,d=b.l,e=b.K;e.value=d.storage;a.platform.share(c.ma("I've just unlocked %0!").replace("%0",
|
||
c.ma(d.name,"_share")),void 0,void 0,e)})).i(this.D=(new Wd(a,500,240,[Q.Ka,Q.La,Q.Mc,Q.Ge])).N(function(){ik(a.Na).isLoaded()&&a.B.Md(b.l);b.fa()}));this.l=null;this.u=0;this.K={type:Gv,value:null};vb(this,this.share,this.D);Rb(this,this.D)}function UO(a){function b(e){if(!om(c,e.name))if(e.sa)e.sa.Wk(e)||(d=d||e);else if(e.Ba){var f=Ze[e.Ba];c.Qa(f.name)>=f.count&&(d=d||e)}}var c=a.app.B,d=null;rm.forEach(b);sm.forEach(b);Gi.forEach(b);return d}function VO(a){switch(a){case 1:return"_female";case 2:return"_neuter";
|
||
case 3:return"_plural";default:return""}}function Kp(a){Ya.call(this,a);var b=this;this.V.i(this.effect=(new oh(a)).R(50)).i(this.D=new lg(a,1800,1600,.5,.5));fd(this.g).i(this.share=bb(new jb(a,343,240,[Q.Of]),"assets/common/share.png",275,286).N(function(){var e=b.K,f=e.value="x"+b.level;a.platform.share(a.locale.ma("I've just unlocked %0!").replace("%0",f),void 0,void 0,e)})).i(this.l=(new Wd(a,500,240,[Q.Ka,Q.La,Q.Mc,Q.Ge])).N(function(){b.fa()}));var c=this.D;c.clearColor=!1;var d=this.Va=c.Va;
|
||
d.fe=!1;d.i(this.P=(new Oa(a,"assets/general/star.mdl",oH)).setScale(.8).i((new ze(a,this.u=Ta(lb(new rb(a,"assets/common/digits.json","x%0",.5,.5)),200,170,ab).setScale(.01),(new Fb).ya(Dc).Da(vi).td(-1,-10).ab(!1))).Ra(.313).I(-90,0,90)));d=this.Ca=c.Ca;d.gd(30,c.width/c.height,1,50);mg(d,10,-.5);this.time=0;this.level=1;this.K={type:Gv,value:null};vb(this,this.share,this.l);Rb(this,this.l)}function WO(a){a=a.app.B;return Hi(a)!==a.Aa("L",1)}function Hv(a){Ya.call(this,a);var b=this;this.top.i(this.ih=
|
||
(new rp(a,450,150)).setPosition(290,-60).i(this.ja=Lb(Ta(lb(new rb(a,"assets/common/font.json"," %0",.5,.5)),400,130,ab).setPosition(225,75),.8)));ee(this,this.V,0);fd(this.g).i(this.$=bb(new Wl(a,343,240,[Q.Mc,Q.BACK,Q.Fe,Q.Kf,Q.Xi]),"assets/common/home.png",303,314).N(function(){b.fa()})).i(this.Mf=(new md(a,500,240,[Q.jg,Q.Oh,Q.Dl,Q.Ka,Q.La])).i(this.Rf=Ta(new nb(a,"assets/common/font.json","%0",.5,.5),420,150,ab).setPosition(250,100)).i(this.eh=Ta(new nb(a,"assets/common/digits.json","%0",
|
||
.5,.5),300,100,ab).setPosition(250,150))).i(this.Yg=(new Wd(a,500,240,[Q.jg,Q.Oh,Q.Dl,Q.Ka,Q.La])).N(function(){vh(b.app,function(){b.app.play.pb()})})).i(this.mode=(new lv(a,380,240,[Q.$i])).N(function(){IH(b,Lp(b)+1)}));this.l=[];this.list=[];this.u=null;this.D=function(c,d){d&&b.Me()};a.platform.on(qf,this.Me.bind(this));a.B.on(wv,this.Nm.bind(this));vb(this,this.$,this.Mf);vb(this,this.Mf,this.mode);Rb(this,this.$)}function XO(a){a=a.list;for(var b=0;b<a.length;++b){var c=a[b];if(1<=uh(c))return c}return null}
|
||
function IH(a,b,c){b=void 0===b?Lp(a):b;c=void 0===c?!1:c;var d=a.l;0>b?b=d.length-1:b>=d.length&&(b=0);for(var e=d[b],f=0;f<d.length;++f){var g=d[f],l=g===e;g.Kc=l;c&&(g.re=l?1:0)}c=a.ih.L(!1);e.Vb();d[(b+1)%d.length].ck();c.visible?Ta(a.title.Ra(-250),1E3,100):Ta(a.title.Ra(0),1500,100);for(a=0;a<d.length;++a)d[a].update(0)}function Lp(a){a=a.l;for(var b=0;b<a.length;++b)if(a[b].Kc)return b;return 0}function YO(a){a.Yg.L(!1);gd(a.Rf.L(!0)," LOG IN");a.eh.L(!1);bb(a.Mf.off(Yd).L(!0),null).ka(Ec).N(function(){a.app.platform.login().then(function(b){b&&
|
||
window.ga&&ga("send","event","Kart Hooligans Logged In From Tasks",0,a.app.da.version)})})}function ZO(a){a.Yg.L(!1);gd(a.Rf.L(!0),"GRANT");a.eh.L(!1);bb(a.Mf.off(Yd).L(!0),null).ka(Ec).N(function(){a.app.platform.Zf().then(function(b){b&&window.ga&&ga("send","event","Kart Hooligans Friends Permitted From Tasks",0,a.app.da.version)})})}function $O(a){a.Yg.L(!1);a.Rf.L(!1);a.eh.L(!1);bb(a.Mf.off(Yd).L(!0),"assets/common/add.png",279,295).ka(Ec).N(function(){var b=a.app.platform;WC(b)?PK(b):b.share()})}
|
||
function aP(a,b){var c=a.app,d=c.B,e=b.Gm;a.Yg.L(!1);a.Rf.L(!1);hb(gd(a.eh.L(!0),"%0"),0,e);bb(a.Mf.off(Yd).L(!0),"assets/common/skip.png",311,245,!1,0,-10).ka(Ec).N(function(){if(e<=Hf(d))c.ta.show().once(pg,function(){c.ta.result&&(xv(d,e),c.audio.play("assets/general/buy.wav"),JH(c.tl,b).once(qg,function(){vh(c,function(){a.show()})}),a.fa())});else c.message.Yj("NOT ENOUGH COINS")})}function If(a){sa.call(this,a);this.index=0;this.Kc=!1;this.re=0;this.sk()}function mm(a){kg.call(this,a,1410,
|
||
322);this.i(this.H=(new sa(a)).setPosition(730,245).i(wt((new ah(a,1E3,602,"assets/common/fade.png",.5)).R(-260),.6).Ia(2).Vj(Mp))).i(this.ua=(new sa(a)).setPosition(730,245).Ia(-1).i(wt((new ah(a,1E3,602,"assets/common/fade.png",.5)).Ia(2).R(-480),.2).Vj(Mp)).i(this.Ek=Lb(Ta(lb(new rb(a,"assets/common/font.json","%0",.5,.5)),300,56),.7).R(56)).i(this.Nk=Lb(Ta(lb(new rb(a,"assets/common/font.json","%0",.5,.5)),300,56),.7).R(56)).i(this.wa=wt((new ah(a,1E3,602,"assets/common/fade.png",.5)).Ia(2).R(-480),
|
||
.2).Vj(Mp).setColor(fc))).i(this.m=(new zi(a,1410,322)).cb(Tl,Ul).setPosition(30,-30).i((new Cf(a,236,248,"assets/common/window.png",.5,.5)).setPosition(70,170))).i(this.ve=(new zi(a,1410,322)).setColor(4282162431).setPosition(30,-30)).i(this.Sg=Lb(Ta(lb(new nb(a,"assets/common/font.json","TASK",.5,.5)),1100,170,ab),.7).setPosition(830,60)).i((new sa(a)).setPosition(430,180).i(this.J=new jv(a,800,117,0,.5)).i(this.K=(new dd(a,800,117,0,.5)).setColor(4294624809)).i(this.progress=Ta(lb(new rb(a,"assets/common/font.json",
|
||
"%0/%1",.5,.5)),600,80,ab).setPosition(400,0))).i(this.C=(new zi(a,1410,322)).setPosition(30,-30).setColor(fc)).i((new sa(a)).setPosition(100,140).i(new Ea(a,236,248,"assets/common/window.png",.5,.5)).i(this.check=(new Ea(a,304,265,"assets/common/check.png",.5,.5)).R(-50).setColor(4286243867))).i((new sa(a)).setPosition(730,245).i(this.l=(new xf(a,1E3,500,.5,1)).R(320))).i(this.D=(new Ea(a,225,256,"assets/common/lock.png",.5,.5)).setPosition(100,125).Ia(10)).on(kv,this.gn);var b=this.l;b.clearColor=
|
||
!1;var c=this.Va=b.Va;c.fe=!1;c.i(this.g=new Ye(a)).i(this.Hc=(new Zl(a)).I(90,-50,15).setPosition(0,0,2.3).setScale(1.5));a=this.Ca=b.Ca;a.gd(30,b.width/b.height,1,50);mg(a,7,0,1.4);this.time=0;this.o=this.Yk=!1;this.Rg=""}function Iv(a,b){a.Rg=b.Rg;return a.Md(b.text,Math.floor(b.count),b.target,!1,b.qa)}function lk(a,b,c,d){this.M=null;this.app=a;this.Rg=b;this.priority=0;this.text=d;this.index=0;this.Pe=-1;d=this.u=b+"_d";var e=this.g=b+"_s",f=this.l=b+"_t",g=a.B,l=this.text;g.has(d)&&g.ma(d,
|
||
"")!==l&&KH(this);g.rc(d,l);g.has(e)||g.kc(e,g.Aa("PT",0));g.has(f)||g.kc(f,c);this.target=g.Aa(f,c);this.count=g.Aa(b,0);this.qa=null;this.Gm=0;a.play.on(sh,this.o=this.flush.bind(this))}function KH(a){var b=a.app,c=b.B;window.ga&&1<=uh(a)&&ga("send","event","Kart Hooligans Task",a.index+". "+a.text,b.da.version,Math.floor((c.Aa("PT",0)-c.Aa(a.g))/60));c.remove(a.Rg);c.remove(a.u);c.remove(a.g);c.remove(a.l)}function uh(a){return Math.floor(a.count)/a.target}function Jf(a,b,c,d,e){lk.call(this,a,
|
||
b,c,d);a.play.on(this.Pe=e,this.m=this.j.bind(this))}function LH(a,b,c){Jf.call(this,a,b,c,"COLLECT COINS",Ql)}function Jv(a,b,c){(void 0===c?0:c)&&a.B.remove(b+"_t");Jf.call(this,a,b,a.B.Pb(),"BEAT YOUR HIGH SCORE",hH)}function MH(a,b,c){Jf.call(this,a,b,c,"BREAK CRATES",ip)}function mk(a){Ya.call(this,a);var b=this;gd(this.title,"QUEST COMPLETED!");this.V.i(this.effect=new oh(a)).i(this.xb=Sd(new mm(a),.5).ka(Zb)).i(this.Od=fd((new sa(a)).setPosition(50,270)).i(this.W=(new sa(a,550)).i(new yi(a,
|
||
550,160)).i(this.exp=(new Af(a,550,160)).setColor(4280332490)).i(this.Lc=bd((new rb(a,"assets/common/font.json","%0/%1",.5,.5)).setPosition(320,80),350)).i((new Ea(a,298,297,"assets/common/star.png",.5,.5)).R(80).i(this.Zc=Ta(new nb(a,"assets/common/digits.json","x%0",.5,.5),150,130,ab).setPosition(170,140)))).i(this.P=(new sa(a,550)).i(new yi(a,550,160)).i(this.ja=bd((new rb(a,"assets/common/font.json","%0",.5,.5)).setPosition(320,80),350)).i((new Ea(a,265,276,"assets/common/coin.png",.5,.5)).R(80))));
|
||
fd(this.g).i(this.l=bb(new jb(a,400,240,[Q.Kh,Q.ah,Q.ue]),"assets/common/video.png",248,304,!1,-30,-40).i(this.Cc=Ta(new rb(a,"assets/common/digits.json","%0",.5,.5),300,100,ab).setPosition(200,150)).N(function(){var c=b.K;b.K=null;c&&c()}).on(Kj,function(c){!c&&b.m===b.l&&b.Ob(b.D)})).i(this.D=(new Wd(a,500,240,[Q.Ka,Q.La,Q.Nf,Q.jg])).N(function(){if(b.unlock)a.Ug.show(b.unlock).once(qg,function(){b.unlock=null;b.A(qg)});b.fa()}));this.unlock=null;this.wb=this.na=0;this.u=-1;this.K=null;vb(this,
|
||
this.l,this.D);Rb(this,this.D)}function JH(a,b){xc.Ga=1;a.l.visible=!1;var c=a.app,d=c.B,e=b.qa;if(a.P.visible=e&&0<e.ja)a.wb=Hf(d),Ip(d,e.ja),a.u=-1,hb(a.Cc,0,e.ja),Ej(c.platform,"task-double-coins",function(f){a.l.visible=!0;a.K=f},function(){a.l.visible=!1;Ip(c.B,e.ja);a.u=0;c.audio.play("assets/general/coins.wav")},function(){a.l.visible=!1});if(a.W.visible=e&&0<e.exp)a.na=d.Aa("E",0),d.ye("E",e.exp,0);a.unlock=e?d.description(e.id):null;Iv(a.xb,b).Yk=!0;gd(a.title,1<=uh(b)?"QUEST COMPLETED!":
|
||
"QUEST SKIPPED!");b.dispose(!0);a.effect.L(!1);c.audio.play("assets/general/congrats.wav");return a.show()}function Kv(a){If.call(this,a);var b=this;this.i(this.Na=Sd(HD(new ul(a,1300,0),0,200),.5).i((new sa(a)).i(this.login=(new sa(a,1200,220,.5,.5)).Ra(650).i(new yi(a,1200,186)).i(Lb(Ta(lb(wf(new nb(a,"assets/common/font.json","LOG IN TO PLAY WITH FRIENDS",.5,.5))).setPosition(600,93),1100,150,ab),.7))).i(this.Zf=(new sa(a,1200,220,.5,.5)).Ra(650).i(new yi(a,1200,186)).i(Lb(Ta(lb(wf(new nb(a,"assets/common/font.json",
|
||
"GRANT ACCESS TO YOUR FRIENDS LIST TO SEE THEIR SCORES",.5,.5))).setPosition(600,93),1100,150,ab),.6))).i(this.process=(new Xj(a)).Ra(650)).i(this.l=new sa(a)).i(this.o=new sa(a))).on(Qe,function(c){switch(c){case Q.Sh:return b.Na.sh(0,-50),!0;case Q.Lh:return b.Na.sh(0,50),!0}}));this.g=[];this.m=0;a.platform.on(qf,function(c){b.Vb();c.on(tm,function(){b.Vb()});c.on(Un,function(){b.Vb()});c.on(kl,function(){b.Vb()})})}function Lv(a,b){sa.call(this,a);this.i((new jv(a,1E3,120)).setPosition(250,100)).i((new Ea(a,
|
||
221,230,"assets/common/window.png")).setPosition(200,0)).i(this.am=(new Ea(a,160,160,"assets/common/helmet.png")).setPosition(230,30)).i((new Ea(a,120,120,"assets/common/circle.png",.5,.5)).setPosition(140,120).setColor(fc)).i(this.Lg=Ta((new rb(a,"assets/common/font.json","99",.5,.5)).setPosition(140,120),100,120,ab)).i(this.name=Ta((new rb(a,"assets/common/font.json","UNKNOWN",0,.5)).setPosition(450,50),750,90,ab)).i(this.fd=Ta((new rb(a,"assets/common/font.json","9999999",0,.5)).setPosition(450,
|
||
160),750,110,ab)).on(Kj,this.g);this.yd=b;this.uk=null}function Mv(a){If.call(this,a);var b=this;Sd(this.R(-100),.5);for(var c=this.sa=[],d=0;3>d;++d){var e=new mm(a);e.ka(Zb);this.i(c[d]=e)}this.g=null;this.m=0;this.o=function(l,n){n&&(l=Nv(b),b.m+1===l.length?(a.B.ye("CL"),a.B.kc("CI",0)):a.B.ye("CI"))};c=0;for(d=1;c<um.length;++c){e=um[c];for(var f=0;f<e.length;++f){var g=e[f];g.index=d++;if(g=g.qa)if(g=g.id)g=a.B.description(g),g.sa=this,g.level=c}}}function Nv(a){var b=void 0===b?a.app.B.Aa("CL",
|
||
0):b;return um[b]}function Np(a){Ya.call(this,a);var b=this;ee(this.ua,(new sa(a)).i((new Af(a,1400,186,.5)).R(70).setColor(fc)).i(this.xb=Ta((new nb(a,"assets/common/font.json","",.5,.5)).setPosition(0,196),1300,90,ab)),1);this.V.i(this.effect=new oh(a)).i(this.K=new lg(a,1800,1600,.5,.5));fd(this.g).i(this.l=bb(new jb(a,400,240,[Q.Kh,Q.ah,Q.ue]),"assets/common/video.png",248,304,!1,-30,-40).i(Ta(new nb(a,"assets/common/font.json","DOUBLE UP",.5,.5),300,100,ab).setPosition(200,150)).N(function(){var e=
|
||
b.na;b.na=null;e&&e()}).on(Kj,function(e){!e&&b.m===b.l&&b.Ob(b.u)})).i(this.u=(new Wd(a,500,240,[Q.Ka,Q.La,Q.Mc,Q.Ge])).N(function(){b.fa()}));this.i(this.label=Lb(bd(Sd(new nb(a,"assets/common/font.json"),.5),1E3),.8)).on(nf,function(){if(!b.D)return b.open(),!0}).on(Qe,function(e){switch(e){case Q.Ka:case Q.La:case Q.aj:if(!b.D)return b.open(),!0}});this.Ba=this.W=this.wb=null;this.P=0;this.D=!1;this.na=null;var c=this.K;c.clearColor=!1;c.Va.fe=!1;var d=c.Ca;d.gd(30,c.width/c.height,1,40);mg(d,
|
||
17,0,0);vb(this,this.l,this.u);Rb(this,this.u);a.platform.on(qf,function(){for(var e=b.app,f=e.B,g=e.S,l=0;l<rg.length;++l){var n=rg[l];if((!n.event||e.event===n.event)&&0<f.zd(n.name)&&0<dk(f,n)){Cd(n.model)||g.register(n.model,1);n=n.Qa;for(var r=0;r<n.length;++r){var w=n[r];f.Qa(w.name)<w.count&&!Cd(w.model)&&g.register(w.model,1)}}}});us(a.locale,function(){Op(b)})}function NH(a,b){a.l.visible=!1;var c=a.app,d=a.W;c.B.Qa(d.name)<d.count&&Ej(c.platform,b,function(e){a.l.visible=!0;a.na=e},function(){a.l.visible=
|
||
!1;var e=d.name;c.B.ye(ke[e]||e);hb(a.title,0,2);Op(a)},function(){a.l.visible=!1})}function Op(a){var b=a.W;if(b){var c=b.name,d=a.app,e=d.B.Qa(c);b=b.count;hb(hb(gd(a.xb.L(!0),e<b?"NEED %0 MORE TO UNLOCK %1":"ALL COLLECTED TO UNLOCK %1"),0,b-e),1,d.locale.ma(Pp[c].name,"_share"))}else a.xb.visible=!1}function nk(a,b,c,d,e){this.M=null;this.app=a;this.id=b;this.name=void 0===c?null:c;this.yd=void 0===d?null:d;this.xe=Math.floor(void 0===e?0:e)}function Ov(a){nk.call(this,a,-1);var b=this;this.qd=
|
||
null;this.nd=[this];this.g={};this.g[this.id]=this;this.Qk=!1;this.j=k();a.platform.on(qf,function(c){b.qd=c;Dv(b);Cv(b);Fp(b);b.A(sH);b.cc();b.yd=null;c.on(tm,function(d){b.yd=d});c.Hj();b.nd=[b];b.g={};b.g[b.id]=b;b.Qk=!1;c.on(Un,function(d){for(var e=0,f=d.length,g=b.nd,l=b.g,n,r;e<f;++e)n=d[e],r=n.id,l[r]||g.push(l[r]=new nk(b,r,n.name,n.yd,n.xe));b.Qk=d.length<b.j});c.on(kl,function(){b.Bg()});c.on(On,function(){c.ym(U(["The coins won't collect themselves! Let's drive!","What a chase! Come back soon!",
|
||
"Let's break something else!","The policeman almost issued me a ticket! Please help!","The engine is already warmed up! Let's have some fun, shall we?"]))})})}function vp(a,b){b=void 0===b?a.Yn:b;return a.nd.sort(b)}function Hf(a){return a.Aa("C",0)}function Ip(a,b){var c=a.Aa("CC",0),d=c+b;a.kc("CC",d);window.ga&&(d=Math.floor(Math.log2(d)),Math.floor(Math.log2(c))!==d&&ga("send","event","Kart Hooligans Coins",Math.pow(2,d),a.app.da.version,a.Aa("PT",0)/60));b=Hf(a)+b;a.kc("C",Math.max(0,b))}function xv(a,
|
||
b){b=Hf(a)-b;a.kc("C",Math.max(0,b))}function ck(a){return a.nh("TU",!0)&&!0}function xp(a){var b=void 0===b?"SHARK FIN":b;return!ck(a)&&!om(a,b)&&Hf(a)>=wh[b].ra}function ie(a){a=a.ma("H","MAX");return Ei[ok[a]||a]||Ei.MAX}function Dv(a,b){void 0!==b&&a.rc("H",ke[b]||b);a.A(bP);a.A(im)}function Ff(a){a=a.ma("K","TURBO");return pk[ok[a]||a]||pk.TURBO}function Cv(a,b){void 0!==b&&a.rc("K",ke[b]||b);a.A(cP);a.A(im)}function Gf(a){return(a=a.ma("D",""))?wh[ok[a]||a]:null}function Fp(a,b){void 0!==b&&
|
||
a.rc("D",ke[b]||b);a.A(dP);a.A(im)}function om(a,b){return a.nh(ke[b]||b,!1)}function TO(a,b){a.unlock(b);a.Md(b)}function Hi(a,b){b=void 0===b?a.Aa("E",0):b;return Math.floor(1+Math.sqrt(Math.max(b/100-1,0)))}function qk(a,b){b=void 0===b?Hi(a):b;return 1===b?0:100*Math.pow(b-1,2)+100}function SO(a,b){a.ye(ke[b]||b)}function dk(a,b){b=b.Qa;if(!b)return 0;for(var c=0,d=0;d<b.length;++d){var e=b[d];c+=Math.max(e.count-a.Qa(e.name),0)}return c}function vm(a){if(a.storage){if(ok[a.storage])throw"STORAGE FOR DESCRIPTION "+
|
||
a.name+" EXISTS AND IT IS "+ok[a.storage];ok[a.storage]=a.name;ke[a.name]=a.storage}else throw"NO STORAGE ID FOR DESCRIPTION "+a.name;}function gc(a,b,c,d,e,f){function g(){n.isLoaded()&&n.A(Qp)}e=void 0===e?null:e;f=void 0===f?null:f;var l=a.Zb.get(b,xc);Oa.call(this,a,l,d);var n=this;this.Yc=!1;this.C=b;b=this.Gd=(this.u=c)?a.Zb.gb(c,xc):null;e=this.animation=(this.l=e)?a.xd.get(e,xc):null;a=this.o=(this.O=f)?a.audio.gb(f,xc):null;l.ia(g);null==b||b.ia(g);null==e||e.ia(g);null==a||a.ia(g)}function xh(){Fb.call(this);
|
||
this.define("SKINNING");this.Da(eP);Za(this,kd|tc)}function OH(a){for(var b=Bb.ki,c=0;c<a.length;++c)-1===a[c].indexOf("assets")&&(a[c]=b+a[c]),-1===a[c].indexOf(".wav")&&(a[c]+=".wav");return a}function Ii(a){var b=Bb.ki;return(-1===a.indexOf("assets")?b+a:a)+(-1===a.indexOf(".wav")?".wav":"")}function PH(a,b,c,d,e){gc.call(this,a,b,c,d,e)}function Pv(a,b){ib.call(this,a);var c=this;this.description=b;var d=this.j=new b.model(a);this.i(d).i(this.Hc=(new Zl(a)).setScale(1.5).be(1.5));d.model.ia(function(){var e=
|
||
d.pa;d.pa=Za(eg((new Fb).Ld(d.pa.Ja.diffuseMap).ya(Dc)).define("SKINNING").Cf(1),kd).tb(e.hb[0].cullFace)});(this.g=new xe(d,d.animation,fP)).play("idle",!0);this.Zi=!1;this.m=1;this.Qa=[];this.on(wl,this.hn);a.platform.on(qf,function(){QH(c)});QH(this)}function QH(a){var b=a.app,c=b.S;b=b.B;var d=a.description.Qa;a=a.Qa;for(var e=a.length=0;e<d.length;++e){var f=d[e];b.Qa(f.name)<f.count&&!Cd(f.model)&&(c.register(f.model,1),f=c.aa(f.model),a.push(f),c.release(f))}}function Qv(a,b,c,d,e){gc.call(this,
|
||
a,b,c,d,e)}function RH(a,b,c,d,e){gc.call(this,a,b,c,d,e);this.i((new ze(a,Lb(Ta(lb(new ri(a,"assets/common/font.json","LOVE",.5,.5)).setColor(4287433984),400,160,ab),1.2).setScale(.01),gP,SH)).setPosition(.166,-.031,.06).I(-110,0,80))}function Ji(){gi.call(this);var a=this;this.da.version="231dad2";this.oa.j=!0;this.locale.g=["en","ru","tr"];this.locale.o=hP;this.platform=new Rv(this);this.B=new Ov(this);this.O=this.message=this.Pm=this.reload=this.Zh=this.o=this.Mk=this.ta=this.$=this.play=this.Nb=
|
||
this.pause=this.options=this.share=this.Vd=this.Na=this.sc=this.Tg=this.reset=this.Bf=this.Fa=this.xe=this.fd=this.Ug=this.Lm=this.l=this.ve=this.sa=this.tl=this.gf=this.bk=this.event=this.block=null;this.once(TH,function(){var b=a.oa,c={Pc:ng,priority:1};b.gb("assets/preloader/atlas.json",c);b.get("assets/preloader/atlas.png",c);As(a.X,0,91/255,151/255,1);a.screen.push(a.O=new Zj(a))})}function UH(a,b,c){b instanceof Oa&&!ii(b.pa,"SKINNING")&&(b.model.options.Jj=Math.max(Math.min(b.pa.we,c),b.model.options.Jj||
|
||
0));b=b.children;for(var d=0;d<b.length;++d)UH(a,b[d],c)}function VH(a,b,c,d){var e=a.event;if(e)if(e=Math.max(e.end.timestamp-Cj(a.platform),0),3600>e)c=e%60,e=Math.floor(e/60)+":"+(10>c?"0"+c:c),d?hb(bh(b,a.locale.ma(d)),0,e):bh(b,e);else if(86400>e){c=Math.floor(e/60/60);e-=3600*c;var f=Math.floor(e/60);e%=60;e=c+":"+(10>f?"0"+f:f)+":"+(10>e?"0"+e:e);d?hb(bh(b,a.locale.ma(d)),0,e):bh(b,e)}else d=Math.floor(e/24/60/60),hb(bh(b,In(a.locale,d,c)),0,d)}function vh(a,b){var c=null,d=null,e=null,f=null,
|
||
g=null;Zs(a.platform)?c=a.platform.ol():d=(e=XO(a.sa))?JH(a.tl,e):WO(a.l)?a.l.show():KO(a.o)?a.o.show():!(f=UO(a.Ug))||f.Ba&&-1!==a.play.B.Qa.indexOf(Ze[f.Ba])?0<a.play.B.Qa.length?a.gf.Qi(a.play.B.Qa.pop()):(g=a.gf.has())?a.gf.show(g):a.Zh.show(ak):a.Ug.show(f);if(c)c.then(function(){vh(a,b)});else if(d)d.once(qg,function(){vh(a,b)});else b&&b()}function Rv(a){Sg.call(this,a);a.storage.path="com.gemioli.karthooligans";this.O="ST";this.W="TA";this.Rk="karthooligans";this.u={apiKey:"AIzaSyDbVR0af8DZcOmMLRobVsIRmhwvs0s-qFU",
|
||
projectId:"gemioli-backend",messagingSenderId:"548354301369",appId:"1:548354301369:web:4367a2bd3afa24cf85aa68",vapidKey:"BD70zD80xTZHU4Xg426kcnBDhYKW_Nlkg63MVtXg-QVDboToQRmXQN0sp2pehMAhhbgGSL0Aksapggjc5Z0HlaA"};this.P="https://gemioli.com/karthooligans/";this.ji=0===window.location.href.indexOf("https://localhost")?"647129754162659":"1344890529545121";this.l="6780e88ba765b3d8a1ac8dfc";this.Wg=52894256;this.Jh.signed=!0}function Sv(a){for(var b="";0<a;)b+=String.fromCharCode(a%26+97),a=Math.trunc(a/
|
||
26);return b}function WH(a,b){function c(){f.removeEventListener?f.removeEventListener("load",c,!1):f.detachEvent&&f.detachEvent("onload",c);g=f.width;l=f.height;d(null)}function d(){if(0<g&&0<l){var w=zd(),y=Kb(),A=Math.min(w/g,(y-n.clientHeight)/l);f.style.position="absolute";f.style.width=A*g+"px";f.style.height=A*l+"px";f.style.left=(w-A*g)/2+"px";f.style.top=n.clientHeight+(y-n.clientHeight-A*l)/2+"px"}}a.stack?za(a.stack):za(a.toString());var e=a.toString();for(document.body.style.width="100%";document.body.firstChild;)document.body.removeChild(document.body.firstChild);
|
||
var f=document.createElement("img"),g=0,l=0;window.addEventListener?window.addEventListener("resize",d,!1):window.attachEvent&&window.attachEvent("onresize",d);f.addEventListener?f.addEventListener("load",c,!1):f.attachEvent&&f.attachEvent("onload",c);f.src="./img/failed.png";document.body.appendChild(f);var n=document.createElement("div");n.style.textAlign="center";n.innerHTML=e;document.body.appendChild(n);if("string"!==typeof a){var r=function(w){try{var y=b?b.locale.ma(w):w}catch(A){y=w}return y};
|
||
a=document.createElement("div");for(a.innerHTML=r('<br><br><div>Please refresh the page. If you see this screen again, report it to us</div><br><div id="thanks" style="display:none;">Thank you! Your report has been sent.</div><form id="report"><button type="button" id="submit">SEND REPORT</button></form>');a.childNodes.length;)n.appendChild(a.childNodes[0]);if(a=document.getElementById("submit"))a.onclick=function(){var w=WB.join("\n");try{var y=JSON.stringify(window.localStorage);w+="\n"+y}catch(A){}Qb("https://gemioli.com/backend/support.php",
|
||
"POST",{subject:"Kart Hooligans Error Report",message:w},0).then(function(){document.getElementById("report").style.display="none";document.getElementById("thanks").style.display="block"},function(){alert(r("Failed to send the report. Please try again later."))})}}}var Xc=qK(rK());tK();wK();xK();var yK="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},tn="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||
|
||
a==Object.prototype)return a;a[b]=c.value;return a},Db=function(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}(v);if("function"==typeof Object.setPrototypeOf)var XH=Object.setPrototypeOf;else{a:{var iP={a:!0};var YH={};try{YH.__proto__=iP;var ZH=YH.a;break a}catch(a){}ZH=!1}XH=ZH?function(a,b){a.__proto__=
|
||
b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var VB=XH;K("Promise",function(a){function b(g){this.j=0;this.M=void 0;this.g=[];this.u=!1;var l=this.m();try{g(l.resolve,l.reject)}catch(n){l.reject(n)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(l){l(g)})}if(a)return a;c.prototype.j=function(g){if(null==this.g){this.g=[];var l=this;this.M(function(){l.o()})}this.g.push(g)};var e=Db.setTimeout;c.prototype.M=function(g){e(g,0)};c.prototype.o=
|
||
function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var l=0;l<g.length;++l){var n=g[l];g[l]=null;try{n()}catch(r){this.m(r)}}}this.g=null};c.prototype.m=function(g){this.M(function(){throw g;})};b.prototype.m=function(){function g(r){return function(w){n||(n=!0,r.call(l,w))}}var l=this,n=!1;return{resolve:g(this.H),reject:g(this.o)}};b.prototype.H=function(g){if(g===this)this.o(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.K(g);else{a:switch(typeof g){case "object":var l=
|
||
null!=g;break a;case "function":l=!0;break a;default:l=!1}l?this.D(g):this.l(g)}};b.prototype.D=function(g){var l=void 0;try{l=g.then}catch(n){this.o(n);return}"function"==typeof l?this.P(l,g):this.l(g)};b.prototype.o=function(g){this.C(2,g)};b.prototype.l=function(g){this.C(1,g)};b.prototype.C=function(g,l){if(0!=this.j)throw Error("Cannot settle("+g+", "+l+"): Promise already settled in state"+this.j);this.j=g;this.M=l;2===this.j&&this.J();this.O()};b.prototype.J=function(){var g=this;e(function(){if(g.Z()){var l=
|
||
Db.console;"undefined"!==typeof l&&l.error(g.M)}},1)};b.prototype.Z=function(){if(this.u)return!1;var g=Db.CustomEvent,l=Db.Event,n=Db.dispatchEvent;if("undefined"===typeof n)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof l?g=new l("unhandledrejection",{cancelable:!0}):(g=Db.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.M;return n(g)};b.prototype.O=function(){if(null!=this.g){for(var g=
|
||
0;g<this.g.length;++g)f.j(this.g[g]);this.g=null}};var f=new c;b.prototype.K=function(g){var l=this.m();g.mj(l.resolve,l.reject)};b.prototype.P=function(g,l){var n=this.m();try{g.call(l,n.resolve,n.reject)}catch(r){n.reject(r)}};b.prototype.then=function(g,l){function n(A,H){return"function"==typeof A?function(I){try{r(A(I))}catch(O){w(O)}}:H}var r,w,y=new b(function(A,H){r=A;w=H});this.mj(n(g,r),n(l,w));return y};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.mj=function(g,
|
||
l){function n(){switch(r.j){case 1:g(r.M);break;case 2:l(r.M);break;default:throw Error("Unexpected state: "+r.j);}}var r=this;null==this.g?f.j(n):this.g.push(n);this.u=!0};b.resolve=d;b.reject=function(g){return new b(function(l,n){n(g)})};b.race=function(g){return new b(function(l,n){for(var r=L(g),w=r.next();!w.done;w=r.next())d(w.value).mj(l,n)})};b.all=function(g){var l=L(g),n=l.next();return n.done?d([]):new b(function(r,w){function y(I){return function(O){A[I]=O;H--;0==H&&r(A)}}var A=[],H=
|
||
0;do A.push(void 0),H++,d(n.value).mj(y(A.length-1),w),n=l.next();while(!n.done)})};return b});K("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;tn(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});K("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");
|
||
for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=Db[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&tn(d.prototype,a,{configurable:!0,writable:!0,value:function(){return aa(G(this))}})}return a});K("Array.prototype.keys",function(a){return a?a:function(){return da(this,function(b){return b})}});K("WeakMap",function(a){function b(n){this.g=(l+=Math.random()+1).toString();
|
||
if(n){n=L(n);for(var r;!(r=n.next()).done;)r=r.value,this.set(r[0],r[1])}}function c(){}function d(n){var r=typeof n;return"object"===r&&null!==n||"function"===r}function e(n){if(!ba(n,g)){var r=new c;tn(n,g,{value:r})}}function f(n){var r=Object[n];r&&(Object[n]=function(w){if(w instanceof c)return w;Object.isExtensible(w)&&e(w);return r(w)})}if(function(){if(!a||!Object.seal)return!1;try{var n=Object.seal({}),r=Object.seal({}),w=new a([[n,2],[r,3]]);if(2!=w.get(n)||3!=w.get(r))return!1;w.delete(n);
|
||
w.set(r,4);return!w.has(n)&&4==w.get(r)}catch(y){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var l=0;b.prototype.set=function(n,r){if(!d(n))throw Error("Invalid WeakMap key");e(n);if(!ba(n,g))throw Error("WeakMap key fail: "+n);n[g][this.g]=r;return this};b.prototype.get=function(n){return d(n)&&ba(n,g)?n[g][this.g]:void 0};b.prototype.has=function(n){return d(n)&&ba(n,g)&&ba(n[g],this.g)};b.prototype.delete=function(n){return d(n)&&ba(n,
|
||
g)&&ba(n[g],this.g)?delete n[g][this.g]:!1};return b});K("Map",function(a){function b(){var l={};return l.yf=l.next=l.head=l}function c(l,n){var r=l[1];return aa(function(){if(r){for(;r.head!=l[1];)r=r.yf;for(;r.next!=r.head;)return r=r.next,{done:!1,value:n(r)};r=null}return{done:!0,value:void 0}})}function d(l,n){var r=n&&typeof n;"object"==r||"function"==r?f.has(n)?r=f.get(n):(r=""+ ++g,f.set(n,r)):r="p_"+n;var w=l[0][r];if(w&&ba(l[0],r))for(l=0;l<w.length;l++){var y=w[l];if(n!==n&&y.key!==y.key||
|
||
n===y.key)return{id:r,list:w,index:l,md:y}}return{id:r,list:w,index:-1,md:void 0}}function e(l){this[0]={};this[1]=b();this.size=0;if(l){l=L(l);for(var n;!(n=l.next()).done;)n=n.value,this.set(n[0],n[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var l=Object.seal({x:4}),n=new a(L([[l,"s"]]));if("s"!=n.get(l)||1!=n.size||n.get({x:4})||n.set({x:4},"t")!=n||2!=n.size)return!1;var r=n.entries(),w=r.next();if(w.done||w.value[0]!=l||"s"!=
|
||
w.value[1])return!1;w=r.next();return w.done||4!=w.value[0].x||"t"!=w.value[1]||!r.next().done?!1:!0}catch(y){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(l,n){l=0===l?0:l;var r=d(this,l);r.list||(r.list=this[0][r.id]=[]);r.md?r.md.value=n:(r.md={next:this[1],yf:this[1].yf,head:this[1],key:l,value:n},r.list.push(r.md),this[1].yf.next=r.md,this[1].yf=r.md,this.size++);return this};e.prototype.delete=function(l){l=d(this,l);return l.md&&l.list?(l.list.splice(l.index,1),l.list.length||
|
||
delete this[0][l.id],l.md.yf.next=l.md.next,l.md.next.yf=l.md.yf,l.md.head=null,this.size--,!0):!1};e.prototype.clear=function(){this[0]={};this[1]=this[1].yf=b();this.size=0};e.prototype.has=function(l){return!!d(this,l).md};e.prototype.get=function(l){return(l=d(this,l).md)&&l.value};e.prototype.entries=function(){return c(this,function(l){return[l.key,l.value]})};e.prototype.keys=function(){return c(this,function(l){return l.key})};e.prototype.values=function(){return c(this,function(l){return l.value})};
|
||
e.prototype.forEach=function(l,n){for(var r=this.entries(),w;!(w=r.next()).done;)w=w.value,l.call(n,w[1],w[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});K("Array.prototype.fill",function(a){return a?a:function(b,c,d){var e=this.length||0;0>c&&(c=Math.max(0,e+c));if(null==d||d>e)d=e;d=Number(d);0>d&&(d=Math.max(0,e+d));for(c=Number(c||0);c<d;c++)this[c]=b;return this}});K("Int8Array.prototype.fill",wa);K("Uint8Array.prototype.fill",wa);K("Uint8ClampedArray.prototype.fill",
|
||
wa);K("Int16Array.prototype.fill",wa);K("Uint16Array.prototype.fill",wa);K("Int32Array.prototype.fill",wa);K("Uint32Array.prototype.fill",wa);K("Float32Array.prototype.fill",wa);K("Float64Array.prototype.fill",wa);K("Math.sign",function(a){return a?a:function(b){b=Number(b);return 0===b||isNaN(b)?b:0<b?1:-1}});K("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});K("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});K("Math.trunc",function(a){return a?
|
||
a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});var Ln="undefined"!==typeof window&&window.performance&&window.performance.now?window.performance:Date,OC="undefined"!==typeof window?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){return window.setTimeout(a,1E3/60)}:null,jP="undefined"!==typeof window?
|
||
window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(a){window.clearTimeout(a)}:null,gC="undefined"!==typeof window?window.AudioContext||window.webkitAudioContext||window.mozAudioContext||window.oAudioContext||window.msAudioContext:null,Rp="undefined"!==typeof document?void 0!==document.hidden?"visibilitychange":void 0!==document.webkitHidden?"webkitvisibilitychange":void 0!==document.mozHidden?
|
||
"mozvisibilitychange":void 0!==document.msHidden?"msvisibilitychange":null:null;if("undefined"!==typeof document){var Sp=document.documentElement;var $H=Sp.requestFullscreen||Sp.webkitRequestFullscreen||Sp.mozRequestFullScreen||Sp.msRequestFullscreen}else $H=null;var Kn=$H,LK="undefined"!==typeof document?document.exitFullscreen||document.webkitExitFullscreen||document.mozCancelFullScreen||document.msExitFullscreen:null,kP="undefined"!==typeof document?document.fullscreenEnabled||document.webkitFullscreenEnabled||
|
||
document.mozFullScreenEnabled||document.msFullscreenEnabled:null;if("undefined"!==typeof document){var Tp=document.documentElement;var aI=void 0!==Tp.requestFullscreen?"fullscreenchange":void 0!==Tp.webkitRequestFullscreen?"webkitfullscreenchange":void 0!==Tp.mozRequestFullScreen?"mozfullscreenchange":void 0!==Tp.msRequestFullscreen?"MSFullscreenChange":null}else aI=null;var Up=aI,mc=(Object.assign?Object.assign:function(a){var b=P.apply(1,arguments);if(void 0===a||null===a)throw Error("Assign got null object.");
|
||
for(var c=Object(a),d=0,e=b.length,f;d<e;++d)if(f=b[d])for(var g in f)Object.prototype.hasOwnProperty.call(f,g)&&(c[g]=f[g]);return c}).bind(Object);u(Ga,Error);var WB=[],fl=kP,YB=Int16Array,ZB=Int32Array,zK=Uint8Array,Th=Uint16Array,cs=Uint32Array,Pd=Float32Array,XB=Ga,un=function(){try{if(void 0!==window.localStorage){var a=window.localStorage;a.test=1;return a}return{}}catch(b){return{}}}(),QC="undefined"!==typeof atob?atob.bind(window):function(a){a=String(a);a+="==".slice(2-(a.length&3));for(var b,
|
||
c="",d,e,f=0,g=a.length;f<g;)b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(f++))<<18|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(f++))<<12|(d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(f++)))<<6|(e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(f++))),c+=64===d?String.fromCharCode(b>>16&255):64===e?String.fromCharCode(b>>16&255,b>>8&255):
|
||
String.fromCharCode(b>>16&255,b>>8&255,b&255);return c},hL="undefined"!==typeof atob?btoa.bind(window):function(a){a=String(a);for(var b,c,d,e="",f=a.length,g=f%3,l=0;l<f;)b=a.charCodeAt(l++),c=a.charCodeAt(l++),d=a.charCodeAt(l++),b=b<<16|c<<8|d,e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(b>>18&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(b>>12&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(b>>6&63)+
|
||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(b&63);return g?e.slice(0,g-3)+"===".substring(g):e},Q={Fe:8,qn:9,Ka:13,pn:16,Tm:17,Rm:18,kn:19,ho:19,Sm:20,Mc:27,La:32,Wo:33,Vo:34,po:35,uo:36,Zg:37,Sh:38,$g:39,Lh:40,ln:44,vo:45,no:46,Ko:48,Lo:49,Mo:50,No:51,Oo:52,Po:53,Qo:54,Ro:55,So:56,To:57,ue:65,Kf:66,Ge:67,Kh:68,E:69,Mh:70,jg:71,Xi:72,Dl:73,wo:74,zo:75,Oh:76,$i:77,jk:78,aj:79,Nf:80,Q:81,mn:82,Of:83,Rh:84,ap:85,ah:86,bp:87,Nl:88,Ol:89,cp:90,Ao:96,Bo:97,Co:98,Do:99,Eo:100,
|
||
Fo:101,Go:102,Ho:103,Io:104,Jo:105,Cl:107,$o:109,mo:110,oo:111,jn:144,nn:145,Yo:186,qo:187,ko:188,lo:189,Xo:190,ro:191,so:192,Uo:219,fo:220,jo:221,Zo:222,BACK:461};Q.gp=function(){var a={},b;for(b in Q)a[Q[b]]=!0;return function(c){return!!a[c]}}();Q.any=function(){var a={},b;for(b in Q)a[Q[b]]=!0;a[Q.qn]=a[Q.pn]=a[Q.Tm]=a[Q.Rm]=a[Q.kn]=a[Q.Sm]=a[Q.ln]=a[Q.jn]=a[Q.nn]=!1;return function(c){return!!a[c]}}();var AK=/^(\-|\+)?([0-9]+|Infinity)$/,BK=/^(\-|\+)?([0-9]+(\.[0-9]+)?|Infinity)$/,le=2*Math.PI,
|
||
lP=1/(2*Math.PI),Ki=.5*Math.PI,cg=Math.PI/180,rl=180/Math.PI;var p=kb.prototype;p.set=function(a,b){this.x=a;this.y=b;return this};p.Ra=function(a){this.x=a;return this};p.R=function(a){this.y=a;return this};p.hg=function(a){this.x=a[0];this.y=a[1]};p.clone=function(){return new kb(this.x,this.y)};p.copy=function(a){this.x=a.x;this.y=a.y;return this};p.Dk=function(a,b){var c=void 0===c?this:c;c.x=Math.max(a.x,Math.min(b.x,this.x));c.y=Math.max(a.y,Math.min(b.y,this.y));return c};p.add=function(a,
|
||
b){b=void 0===b?this:b;b.x=this.x+a.x;b.y=this.y+a.y;return b};p.sub=function(a,b){b=void 0===b?this:b;b.x=this.x-a.x;b.y=this.y-a.y;return b};p.mb=function(a,b){b=void 0===b?this:b;b.x=this.x*a.x;b.y=this.y*a.y;return b};p.dot=function(a){return this.x*a.x+this.y*a.y};p.dd=function(a,b,c){c=void 0===c?this:c;c.x=(a.x-this.x)*b+this.x;c.y=(a.y-this.y)*b+this.y;return c};p.scale=function(a,b){b=void 0===b?this:b;b.x=this.x*a;b.y=this.y*a;return b};p.Fc=function(a){a=void 0===a?this:a;a.x=-this.x;a.y=
|
||
-this.y;return a};p.translate=function(a,b){this.x+=a;this.y+=b;return this};p.max=function(a,b){b=void 0===b?this:b;b.x=Math.max(this.x,a.x);b.y=Math.max(this.y,a.y);return b};p.min=function(a,b){b=void 0===b?this:b;b.x=Math.min(this.x,a.x);b.y=Math.min(this.y,a.y);return b};p.normalize=function(){var a=Math.sqrt(this.x*this.x+this.y*this.y);0===a?this.x=this.y=0:(a=1/a,this.x*=a,this.y*=a);return this};p.$b=function(a,b){var c=b.x-a.x;a=b.y-a.y;b=Math.sqrt(c*c+a*a);b=0===b?0:1/b;this.x=-a*b;this.y=
|
||
c*b;return this};p.distance=function(a){var b=a.x-this.x;a=a.y-this.y;return Math.sqrt(b*b+a*a)};p.De=function(a){var b=a.x-this.x;a=a.y-this.y;return b*b+a*a};p.random=function(){this.x=Math.random();this.y=Math.random();return this};p.round=function(a){a=void 0===a?this:a;a.x=Math.round(this.x);a.y=Math.round(this.y);return a};p.floor=function(a){a=void 0===a?this:a;a.x=Math.floor(this.x);a.y=Math.floor(this.y);return a};p.ceil=function(a){a=void 0===a?this:a;a.x=Math.ceil(this.x);a.y=Math.ceil(this.y);
|
||
return a};p.Ha=function(a){return this.x===a.x&&this.y===a.y};p.toString=function(){return"["+this.x+", "+this.y+"]"};Db.Object.defineProperties(kb.prototype,{size:{configurable:!0,enumerable:!0,get:function(){return 2}},Fd:{configurable:!0,enumerable:!0,get:function(){return Math.sqrt(this.x*this.x+this.y*this.y)}},Ff:{configurable:!0,enumerable:!0,get:function(){return this.x*this.x+this.y*this.y}}});p=E.prototype;p.set=function(a,b,c){this.x=a;this.y=b;this.z=c;return this};p.Ra=function(a){this.x=
|
||
a;return this};p.R=function(a){this.y=a;return this};p.be=function(a){this.z=a;return this};p.hg=function(a){this.x=a[0];this.y=a[1];this.z=a[2]};p.clone=function(){return new E(this.x,this.y,this.z)};p.copy=function(a){this.x=a.x;this.y=a.y;this.z=a.z;return this};p.Dk=function(a,b){var c=void 0===c?this:c;c.x=Math.max(a.x,Math.min(b.x,this.x));c.y=Math.max(a.y,Math.min(b.y,this.y));c.z=Math.max(a.z,Math.min(b.z,this.z));return c};p.add=function(a,b){b=void 0===b?this:b;b.x=this.x+a.x;b.y=this.y+
|
||
a.y;b.z=this.z+a.z;return b};p.sub=function(a,b){b=void 0===b?this:b;b.x=this.x-a.x;b.y=this.y-a.y;b.z=this.z-a.z;return b};p.mb=function(a,b){b=void 0===b?this:b;b.x=this.x*a.x;b.y=this.y*a.y;b.z=this.z*a.z;return b};p.dot=function(a){return this.x*a.x+this.y*a.y+this.z*a.z};p.Fa=function(a,b){b=void 0===b?this:b;var c=this.x,d=this.y,e=this.z,f=a.x,g=a.y;a=a.z;b.x=d*a-e*g;b.y=e*f-c*a;b.z=c*g-d*f;return b};p.dd=function(a,b,c){c=void 0===c?this:c;c.x=(a.x-this.x)*b+this.x;c.y=(a.y-this.y)*b+this.y;
|
||
c.z=(a.z-this.z)*b+this.z;return c};p.scale=function(a,b){b=void 0===b?this:b;b.x=this.x*a;b.y=this.y*a;b.z=this.z*a;return b};p.Fc=function(a){a=void 0===a?this:a;a.x=-this.x;a.y=-this.y;a.z=-this.z;return a};p.translate=function(a,b,c){this.x+=a;this.y+=b;this.z+=c;return this};p.max=function(a,b){b=void 0===b?this:b;b.x=Math.max(this.x,a.x);b.y=Math.max(this.y,a.y);b.z=Math.max(this.z,a.z);return b};p.min=function(a,b){b=void 0===b?this:b;b.x=Math.min(this.x,a.x);b.y=Math.min(this.y,a.y);b.z=Math.min(this.z,
|
||
a.z);return b};p.normalize=function(){var a=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z);0===a?this.x=this.y=this.z=0:(a=1/a,this.x*=a,this.y*=a,this.z*=a);return this};p.distance=function(a){var b=a.x-this.x,c=a.y-this.y;a=a.z-this.z;return Math.sqrt(b*b+c*c+a*a)};p.De=function(a){var b=a.x-this.x,c=a.y-this.y;a=a.z-this.z;return b*b+c*c+a*a};p.random=function(){this.x=Math.random();this.y=Math.random();this.z=Math.random();return this};p.round=function(a){a=void 0===a?this:a;a.x=Math.round(this.x);
|
||
a.y=Math.round(this.y);a.z=Math.round(this.z);return a};p.floor=function(a){a=void 0===a?this:a;a.x=Math.floor(this.x);a.y=Math.floor(this.y);a.z=Math.floor(this.z);return a};p.ceil=function(a){a=void 0===a?this:a;a.x=Math.ceil(this.x);a.y=Math.ceil(this.y);a.z=Math.ceil(this.z);return a};p.Ha=function(a){return this.x===a.x&&this.y===a.y&&this.z===a.z};p.toString=function(){return"["+this.x+", "+this.y+", "+this.z+"]"};Db.Object.defineProperties(E.prototype,{size:{configurable:!0,enumerable:!0,get:function(){return 3}},
|
||
Fd:{configurable:!0,enumerable:!0,get:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}},Ff:{configurable:!0,enumerable:!0,get:function(){return this.x*this.x+this.y*this.y+this.z*this.z}}});var Zk=new E(0,0,0),ss=new E(1,1,1),Ce=new E(1,0,0),hp=new E(0,1,0),td=new E(0,0,1),Wu=new E(0,-1,0);p=dc.prototype;p.set=function(a,b,c,d){this.x=a;this.y=b;this.z=c;this.w=d;return this};p.Ra=function(a){this.x=a;return this};p.R=function(a){this.y=a;return this};p.be=function(a){this.z=
|
||
a;return this};p.hg=function(a){this.x=a[0];this.y=a[1];this.z=a[2];this.w=a[3]};p.clone=function(){return new dc(this.x,this.y,this.z,this.w)};p.copy=function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.w=a.w;return this};p.Dk=function(a,b){var c=void 0===c?this:c;c.x=Math.max(a.x,Math.min(b.x,this.x));c.y=Math.max(a.y,Math.min(b.y,this.y));c.z=Math.max(a.z,Math.min(b.z,this.z));c.w=Math.max(a.w,Math.min(b.w,this.w));return c};p.add=function(a,b){b=void 0===b?this:b;b.x=this.x+a.x;b.y=this.y+a.y;b.z=
|
||
this.z+a.z;b.w=this.w+a.w;return b};p.sub=function(a,b){b=void 0===b?this:b;b.x=this.x-a.x;b.y=this.y-a.y;b.z=this.z-a.z;b.w=this.w-a.w;return b};p.mb=function(a,b){b=void 0===b?this:b;b.x=this.x*a.x;b.y=this.y*a.y;b.z=this.z*a.z;b.w=this.w*a.w;return b};p.dot=function(a){return this.x*a.x+this.y*a.y+this.z*a.z+this.w*a.w};p.dd=function(a,b,c){c=void 0===c?this:c;c.x=(a.x-this.x)*b+this.x;c.y=(a.y-this.y)*b+this.y;c.z=(a.z-this.z)*b+this.z;c.w=(a.w-this.w)*b+this.w;return c};p.scale=function(a,b){b=
|
||
void 0===b?this:b;b.x=this.x*a;b.y=this.y*a;b.z=this.z*a;b.w=this.w*a;return b};p.Fc=function(a){a=void 0===a?this:a;a.x=-this.x;a.y=-this.y;a.z=-this.z;a.w=-this.w;return a};p.translate=function(a,b,c,d){this.x+=a;this.y+=b;this.z+=c;this.w+=d;return this};p.max=function(a,b){b=void 0===b?this:b;b.x=Math.max(this.x,a.x);b.y=Math.max(this.y,a.y);b.z=Math.max(this.z,a.z);b.w=Math.max(this.w,a.w);return b};p.min=function(a,b){b=void 0===b?this:b;b.x=Math.min(this.x,a.x);b.y=Math.min(this.y,a.y);b.z=
|
||
Math.min(this.z,a.z);b.w=Math.min(this.w,a.w);return b};p.normalize=function(){var a=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);0===a?this.x=this.y=this.z=this.w=0:(a=1/a,this.x*=a,this.y*=a,this.z*=a,this.w*=a);return this};p.distance=function(a){var b=a.x-this.x,c=a.y-this.y,d=a.z-this.z;a=a.w-this.w;return Math.sqrt(b*b+c*c+d*d+a*a)};p.De=function(a){var b=a.x-this.x,c=a.y-this.y,d=a.z-this.z;a=a.w-this.w;return b*b+c*c+d*d+a*a};p.random=function(){this.x=Math.random();
|
||
this.y=Math.random();this.z=Math.random();this.w=Math.random();return this};p.round=function(a){a=void 0===a?this:a;a.x=Math.round(this.x);a.y=Math.round(this.y);a.z=Math.round(this.z);a.w=Math.round(this.w);return a};p.floor=function(a){a=void 0===a?this:a;a.x=Math.floor(this.x);a.y=Math.floor(this.y);a.z=Math.floor(this.z);a.w=Math.floor(this.w);return a};p.ceil=function(a){a=void 0===a?this:a;a.x=Math.ceil(this.x);a.y=Math.ceil(this.y);a.z=Math.ceil(this.z);a.w=Math.ceil(this.w);return a};p.Ha=
|
||
function(a){return this.x===a.x&&this.y===a.y&&this.z===a.z&&this.w===a.w};p.toString=function(){return"["+this.x+", "+this.y+", "+this.z+", "+this.w+"]"};Db.Object.defineProperties(dc.prototype,{size:{configurable:!0,enumerable:!0,get:function(){return 4}},Fd:{configurable:!0,enumerable:!0,get:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}},Ff:{configurable:!0,enumerable:!0,get:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}}});p=
|
||
Oe.prototype;p.copy=function(a){this.a=a.a;this.b=a.b;this.c=a.c;this.d=a.d;this.ub=a.ub;this.vb=a.vb;return this};p.clone=function(){return new Oe(this.a,this.b,this.c,this.d,this.ub,this.vb)};p.set=function(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.d=d;this.ub=e;this.vb=f;return this};p.Zl=function(a,b,c){var d=NaN*cg,e=Math.sin(d),f=Math.cos(d);d=c*f;c*=e;e*=NaN;f*=NaN;return this.set(d,c,e,f,a-NaN*d-NaN*e,b-NaN*c-NaN*f)};p.mb=function(a,b){b=void 0===b?this:b;var c=this.a,d=this.b,e=this.c,
|
||
f=this.d,g=this.ub,l=this.vb,n=a.a,r=a.b,w=a.c,y=a.d,A=a.ub;a=a.vb;b.a=c*n+e*r;b.b=d*n+f*r;b.c=c*w+e*y;b.d=d*w+f*y;b.ub=c*A+e*a+g;b.vb=d*A+f*a+l;return b};p.Fc=function(a){a=void 0===a?this:a;var b=this.a*this.d-this.b*this.c;if(0===b)a.a=a.b=a.c=a.d=0,a.ub=-this.ub,a.vb=-this.vb;else{var c=this.a,d=this.b,e=this.c,f=this.d,g=this.ub,l=this.vb;b=1/b;a.a=f*b;a.b=-d*b;a.c=-e*b;a.d=c*b;a.ub=-a.a*g-a.c*l;a.vb=-a.b*g-a.d*l}return a};p.transformPoint=function(a,b){b=void 0===b?a:b;var c=a.x;a=a.y;b.x=c*
|
||
this.a+a*this.c+this.ub;b.y=c*this.b+a*this.d+this.vb;return b};p.Gf=function(a,b){b=void 0===b?a:b;var c=a.x;a=a.y;b.x=c*this.a+a*this.c;b.y=c*this.b+a*this.d;return b};p.Ha=function(a){return this.a===a.a&&this.b===a.b&&this.c===a.c&&this.d===a.d&&this.ub===a.ub&&this.vb===a.vb};p.toString=function(){return"["+this.a+", "+this.b+", "+this.c+", "+this.d+", "+this.ub+", "+this.vb+"]"};p=Tb.prototype;p.hg=function(a){this.elements.set(a)};p.copy=function(a){this.elements.set(a.elements);return this};
|
||
p.clone=function(){return(new Tb).copy(this)};p.add=function(a,b){b=void 0===b?this:b;var c=0,d=this.elements;a=a.elements;for(var e=b.elements;16>c;++c)e[c]=d[c]+a[c];return b};p.sub=function(a,b){b=void 0===b?this:b;var c=0,d=this.elements;a=a.elements;for(var e=b.elements;16>c;++c)e[c]=d[c]-a[c];return b};p.scale=function(a,b){b=void 0===b?this:b;for(var c=0,d=this.elements,e=b.elements;16>c;++c)e[c]=d[c]*a;return b};p.mb=function(a,b){b=void 0===b?this:b;$B(this,a,b.elements,0);return b};p.Fc=
|
||
function(a){a=void 0===a?this:a;var b=this.elements,c=a.elements,d=b[0],e=b[1],f=b[2],g=b[3],l=b[4],n=b[5],r=b[6],w=b[7],y=b[8],A=b[9],H=b[10],I=b[11],O=b[12],S=b[13],R=b[14];b=b[15];var ja=d*n-e*l,ka=d*r-f*l,ea=d*w-g*l,ma=e*r-f*n,pa=e*w-g*n,va=f*w-g*r,Ka=y*S-A*O,Aa=y*R-H*O,Fa=y*b-I*O,xa=A*R-H*S,Ja=A*b-I*S,La=H*b-I*R,Ha=ja*La-ka*Ja+ea*xa+ma*Fa-pa*Aa+va*Ka;0===Ha?c.set(gs.elements):(Ha=1/Ha,c[0]=(n*La-r*Ja+w*xa)*Ha,c[1]=(-e*La+f*Ja-g*xa)*Ha,c[2]=(S*va-R*pa+b*ma)*Ha,c[3]=(-A*va+H*pa-I*ma)*Ha,c[4]=(-l*
|
||
La+r*Fa-w*Aa)*Ha,c[5]=(d*La-f*Fa+g*Aa)*Ha,c[6]=(-O*va+R*ea-b*ka)*Ha,c[7]=(y*va-H*ea+I*ka)*Ha,c[8]=(l*Ja-n*Fa+w*Ka)*Ha,c[9]=(-d*Ja+e*Fa-g*Ka)*Ha,c[10]=(O*pa-S*ea+b*ja)*Ha,c[11]=(-y*pa+A*ea-I*ja)*Ha,c[12]=(-l*xa+n*Aa-r*Ka)*Ha,c[13]=(d*xa-e*Aa+f*Ka)*Ha,c[14]=(-O*ma+S*ka-R*ja)*Ha,c[15]=(y*ma-A*ka+H*ja)*Ha);return a};p.Zl=function(a,b,c){var d=this.elements,e=b.x,f=b.y,g=b.z,l=b.w,n=e+e,r=f+f,w=g+g;b=e*n;var y=e*r;e*=w;var A=f*r;f*=w;g*=w;n*=l;r*=l;l*=w;w=c.x;var H=c.y;c=c.z;d[0]=(1-(A+g))*w;d[1]=(y+l)*
|
||
w;d[2]=(e-r)*w;d[3]=0;d[4]=(y-l)*H;d[5]=(1-(b+g))*H;d[6]=(f+n)*H;d[7]=0;d[8]=(e+r)*c;d[9]=(f-n)*c;d[10]=(1-(b+A))*c;d[11]=0;d[12]=a.x;d[13]=a.y;d[14]=a.z;d[15]=1;return this};p.transformPoint=function(a,b){b=void 0===b?a:b;var c=a.x,d=a.y;a=a.z;var e=this.elements;b.x=e[0]*c+e[4]*d+e[8]*a+e[12];b.y=e[1]*c+e[5]*d+e[9]*a+e[13];b.z=e[2]*c+e[6]*d+e[10]*a+e[14];return b};p.Gf=function(a,b){b=void 0===b?a:b;var c=a.x,d=a.y;a=a.z;var e=this.elements;b.x=e[0]*c+e[4]*d+e[8]*a;b.y=e[1]*c+e[5]*d+e[9]*a;b.z=
|
||
e[2]*c+e[6]*d+e[10]*a;return b};p.Tj=function(a,b,c,d,e,f){var g=this.elements;g[0]=2/(b-a);g[1]=0;g[2]=0;g[3]=0;g[4]=0;g[5]=2/(d-c);g[6]=0;g[7]=0;g[8]=0;g[9]=0;g[10]=-2/(f-e);g[11]=0;g[12]=-(b+a)/(b-a);g[13]=-(d+c)/(d-c);g[14]=-(f+e)/(f-e);g[15]=1;return this};p.gd=function(a,b,c,d){a=c*Math.tan(.5*a*cg);b*=a;return bC(this,-b,b,-a,a,c,d)};p.Cg=function(a,b,c){var d=this.elements;a.sub(b,Fe);b=Fe.Fd;0===b?Fe.set(0,0,1):Fe.scale(1/b);c.Fa(Fe,sg);b=sg.Fd;0===b?(Fe.x+=1E-4,c.Fa(Fe,sg),sg.normalize()):
|
||
sg.scale(1/b);Fe.Fa(sg,Vp);d[0]=sg.x;d[1]=sg.y;d[2]=sg.z;d[3]=0;d[4]=Vp.x;d[5]=Vp.y;d[6]=Vp.z;d[7]=0;d[8]=Fe.x;d[9]=Fe.y;d[10]=Fe.z;d[11]=0;d[12]=a.x;d[13]=a.y;d[14]=a.z;d[15]=1;return this};p.Ra=function(a){var b=this.elements;b[0]=a.x;b[1]=a.y;b[2]=a.z;return this};p.R=function(a){var b=this.elements;b[4]=a.x;b[5]=a.y;b[6]=a.z;return this};p.be=function(a){var b=this.elements;b[8]=a.x;b[9]=a.y;b[10]=a.z;return this};p.Uj=function(a){var b=this.elements;b[0]=a.x;b[5]=a.y;b[10]=a.z};p.Dd=function(a){a=
|
||
void 0===a?new Ic:a;var b=this.elements,c=b[0],d=b[1],e=b[2],f=b[4],g=b[5],l=b[6],n=b[8],r=b[9];b=b[10];var w=1/Math.sqrt(c*c+d*d+e*e),y=1/Math.sqrt(f*f+g*g+l*l),A=1/Math.sqrt(n*n+r*r+b*b);c*=w;d*=w;e*=w;f*=y;g*=y;l*=y;n*=A;r*=A;b*=A;w=c+g+b;0<=w?(c=Math.sqrt(w+1),a.w=.5*c,c=.5/c,a.x=(l-r)*c,a.y=(n-e)*c,a.z=(d-f)*c):c>g?c>b?(c=Math.sqrt(c-(g+b)+1),a.x=.5*c,c=.5/c,a.w=(l-r)*c,a.y=(d+f)*c,a.z=(e+n)*c):(c=Math.sqrt(b-(c+g)+1),a.z=.5*c,c=.5/c,a.w=(d-f)*c,a.x=(n+e)*c,a.y=(r+l)*c):g>b?(c=Math.sqrt(g-(b+
|
||
c)+1),a.y=.5*c,c=.5/c,a.w=(n-e)*c,a.z=(l+r)*c,a.x=(f+d)*c):(c=Math.sqrt(b-(c+g)+1),a.z=.5*c,c=.5/c,a.w=(d-f)*c,a.x=(n+e)*c,a.y=(r+l)*c);return a};p.Ha=function(a){var b=0,c=this.elements;for(a=a.elements;16>b;++b)if(c[b]!==a[b])return!1;return!0};p.toString=function(){for(var a="[",b=0,c=this.elements;16>b;++b)a+=c[b],a+=15===b?"":", ";return a+"]"};Db.Object.defineProperties(Tb.prototype,{size:{configurable:!0,enumerable:!0,get:function(){return 16}}});var mP=new Pd([1,0,0,0,0,1,0,0,0,0,1,0,0,0,
|
||
0,1]),nP=new Pd([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),gs=new Tb(mP);new Tb(nP);var sg=new E,Vp=new E,Fe=new E;p=Ic.prototype;p.set=function(a,b,c,d){this.x=a;this.y=b;this.z=c;this.w=d;return this};p.hg=function(a){this.x=a[0];this.y=a[1];this.z=a[2];this.w=a[3]};p.clone=function(){return new Ic(this.x,this.y,this.z,this.w)};p.copy=function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.w=a.w;return this};p.mb=function(a,b){b=void 0===b?this:b;var c=this.x,d=this.y,e=this.z,f=this.w,g=a.x,l=a.y,n=a.z;a=a.w;
|
||
b.x=c*a+f*g+d*n-e*l;b.y=d*a+f*l+e*g-c*n;b.z=e*a+f*n+c*l-d*g;b.w=f*a-c*g-d*l-e*n;return b};p.dd=function(a,b,c){c=void 0===c?this:c;var d=this.x,e=this.y,f=this.z,g=this.w;c.x=(a.x-d)*b+d;c.y=(a.y-e)*b+e;c.z=(a.z-f)*b+f;c.w=(a.w-g)*b+g;return c};p.jl=function(a){return this.I(a.x,a.y,a.z)};p.I=function(a,b,c){a*=cg;b*=cg;c*=cg;var d=Math.cos(.5*a),e=Math.cos(.5*b),f=Math.cos(.5*c);a=Math.sin(.5*a);b=Math.sin(.5*b);c=Math.sin(.5*c);this.x=a*e*f-d*b*c;this.y=d*b*f+a*e*c;this.z=d*e*c-a*b*f;this.w=d*e*
|
||
f+a*b*c;return this};p.scale=function(a,b){b=void 0===b?this:b;b.x*=a;b.y*=a;b.z*=a;b.w*=a;return b};p.Fc=function(a){var b=a=void 0===a?this:a;b=void 0===b?this:b;b.x=-this.x;b.y=-this.y;b.z=-this.z;b.w=this.w;return a.normalize()};p.normalize=function(){var a=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);0===a?(this.x=this.y=this.z=0,this.w=1):(a=1/a,this.x*=a,this.y*=a,this.z*=a,this.w*=a);return this};p.Gf=function(a,b){b=void 0===b?a:b;var c=a.x,d=a.y,e=a.z;a=this.x;var f=
|
||
this.y,g=this.z,l=this.w,n=l*c+f*e-g*d,r=l*d+g*c-a*e,w=l*e+a*d-f*c;c=-a*c-f*d-g*e;b.x=n*l+c*-a+r*-g-w*-f;b.y=r*l+c*-f+w*-a-n*-g;b.z=w*l+c*-g+n*-f-r*-a;return b};p.pf=function(a){var b=this.x,c=this.y,d=this.z,e=this.w;a.x=1-2*(c*c+d*d);a.y=2*(b*c+e*d);a.z=2*(b*d-e*c);return a};p.ci=function(a){var b=this.x,c=this.y,d=this.z,e=this.w;a.x=2*(b*c-e*d);a.y=1-2*(b*b+d*d);a.z=2*(c*d+e*b);return a};p.pg=function(a){var b=this.x,c=this.y,d=this.z,e=this.w;a.x=2*(b*d+e*c);a.y=2*(c*d-e*b);a.z=1-2*(b*b+c*c);
|
||
return a};p.Ha=function(a){return this.x===a.x&&this.y===a.y&&this.z===a.z&&this.w===a.w};p.toString=function(){return"["+this.x+", "+this.y+", "+this.z+", "+this.w+"]"};Db.Object.defineProperties(Ic.prototype,{Fd:{configurable:!0,enumerable:!0,get:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}},Ff:{configurable:!0,enumerable:!0,get:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}}});var $k=new Ic(0,0,0,1);new Tb;u(kc,dc);kc.prototype.clone=
|
||
function(){return new kc(this.x,this.y,this.z,this.w)};Db.Object.defineProperties(kc.prototype,{r:{configurable:!0,enumerable:!0,get:function(){return this.x},set:function(a){this.x=a}},mi:{configurable:!0,enumerable:!0,get:function(){return this.y},set:function(a){this.y=a}},b:{configurable:!0,enumerable:!0,get:function(){return this.z},set:function(a){this.z=a}},a:{configurable:!0,enumerable:!0,get:function(){return this.w},set:function(a){this.w=a}}});var oP=new kc(0,0,0,1),pP=new kc(0,1,0,1),
|
||
qP=new kc(1,0,0,1),kp=new kc(1,1,1,1),av=new kc(1,.92,.016,1);u(Xb,dc);Xb.prototype.Eb=function(a,b){this.z=a;this.w=b;return this};Xb.prototype.clone=function(){return new Xb(this.x,this.y,this.z,this.w)};Xb.prototype.contains=function(a){return this.x<=a.x&&a.x<=this.x+this.z&&this.y<=a.y&&a.y<=this.y+this.w};Db.Object.defineProperties(Xb.prototype,{width:{configurable:!0,enumerable:!0,get:function(){return this.z},set:function(a){this.z=a}},height:{configurable:!0,enumerable:!0,get:function(){return this.w},
|
||
set:function(a){this.w=a}},left:{configurable:!0,enumerable:!0,get:function(){return this.x}},right:{configurable:!0,enumerable:!0,get:function(){return this.x+this.z}},top:{configurable:!0,enumerable:!0,get:function(){return this.y}},bottom:{configurable:!0,enumerable:!0,get:function(){return this.y+this.w}}});var rP=new Xb(0,0,1,1),wL=new Xb(.5,.5,0,0);p=qj.prototype;p.set=function(a,b,c,d,e,f){this.min.set(a,b,c);this.max.set(d,e,f);return this};p.clone=function(){var a=this.min,b=this.max;return new qj(a.x,
|
||
a.y,a.z,b.x,b.y,b.z)};p.copy=function(a){this.min.copy(a.min);this.max.copy(a.max);return this};p.V=function(a){var b=this.min,c=this.max;a.x=.5*(b.x+c.x);a.y=.5*(b.y+c.y);a.z=.5*(b.z+c.z);return a};p.gi=function(a){var b=this.min,c=this.max;return a.x<b.x||a.x>c.x||a.y<b.y||a.y>c.y||a.z<b.z||a.z>c.z?!1:!0};p.contains=function(a,b,c){var d=this.min,e=this.max;return a<d.x||a>e.x||b<d.y||b>e.y||c<d.z||c>e.z?!1:!0};p.bm=function(a,b,c){var d=is(this,Hb.set(a,b,c));d.x-=a;d.y-=b;d.z-=c;return d.Fd};
|
||
p.Ne=function(a){return is(this,a,Hb).sub(a).Fd};p.Vk=function(a){var b=a.$b,c=b.x,d=b.y;b=b.z;a=a.ea;var e=this.min,f=this.max;if(0<c){var g=c*e.x;c*=f.x}else g=c*f.x,c*=e.x;0<d?(g+=d*e.y,c+=d*f.y):(g+=d*f.y,c+=d*e.y);0<b?(g+=b*e.z,c+=b*f.z):(g+=b*f.z,c+=b*e.z);return g<=a&&c>=a};p.xi=function(a){var b=this.min,c=this.max,d=a.min;a=a.max;return c.x<d.x||b.x>a.x||c.y<d.y||b.y>a.y||c.z<d.z||b.z>a.z?!1:!0};p.ze=function(a){return a.gi(is(this,a.V,Hb))};p.$h=function(a,b){b=void 0===b?this:b;var c=this.min,
|
||
d=c.x,e=c.y,f=c.z,g=this.max,l=g.x,n=g.y,r=g.z;c=b.min;g=b.max;a.transformPoint(Hb.set(d,e,f),Hb);c.copy(Hb);g.copy(Hb);a.transformPoint(Hb.set(d,e,r),Hb);c.min(Hb);g.max(Hb);a.transformPoint(Hb.set(d,n,f),Hb);c.min(Hb);g.max(Hb);a.transformPoint(Hb.set(d,n,r),Hb);c.min(Hb);g.max(Hb);a.transformPoint(Hb.set(l,e,f),Hb);c.min(Hb);g.max(Hb);a.transformPoint(Hb.set(l,e,r),Hb);c.min(Hb);g.max(Hb);a.transformPoint(Hb.set(l,n,f),Hb);c.min(Hb);g.max(Hb);a.transformPoint(Hb.set(l,n,r),Hb);c.min(Hb);g.max(Hb)};
|
||
p.translate=function(a,b,c){this.min.translate(a,b,c);this.max.translate(a,b,c);return this};p.Ha=function(a){return this.min.Ha(a.min)&&this.max.Ha(a.max)};p.toString=function(){var a=this.min,b=this.max;return"(min ["+a.x+", "+a.y+", "+a.z+"], max["+b.x+", "+b.y+", "+b.z+"])"};var Hb=new E;p=rj.prototype;p.set=function(a,b,c,d){this.V.set(a,b,c);this.radius=d;return this};p.hg=function(a){this.V.set(a[0],a[1],a[2]);this.radius=a[3]};p.clone=function(){return new rj(this.V.clone(),this.radius)};
|
||
p.copy=function(a){this.V.copy(a.V);this.radius=a.radius;return this};p.gi=function(a){return a.De(this.V)<=this.radius*this.radius};p.Ne=function(a){return a.distance(this.V)-this.radius};p.Vk=function(a){return Math.abs(a.Ne(this.V))<=this.radius};p.xi=function(a){return a.ze(this)};p.ze=function(a){var b=this.radius+a.radius;return this.V.De(a.V)<=b*b};p.$h=function(a,b){b=void 0===b?this:b;var c=sP.copy(this.V);a.transformPoint(c,b.V);c.x+=this.radius;a.transformPoint(c);b.radius=b.V.distance(c)};
|
||
p.Ha=function(a){return this.V.Ha(a.V)&&this.radius===a.radius};p.toString=function(){var a=this.V;return"["+a.x+", "+a.y+", "+a.z+", "+this.radius+"]"};var sP=new E;p=js.prototype;p.set=function(a,b,c,d,e,f){var g=this.Ce;g[0].copy(a);g[1].copy(b);g[2].copy(c);g[3].copy(d);g[4].copy(e);g[5].copy(f);return this};p.clone=function(){var a=this.Ce;return new js(a[0].clone(),a[1].clone(),a[2].clone(),a[3].clone(),a[4].clone(),a[5].clone())};p.copy=function(a){var b=this.Ce;a=a.Ce;b[0].copy(a[0]);b[1].copy(a[1]);
|
||
b[2].copy(a[2]);b[3].copy(a[3]);b[4].copy(a[4]);b[5].copy(a[5]);return this};p.gi=function(a){for(var b=0,c=this.Ce;6>b;++b)if(0>c[b].Ne(a))return!1;return!0};p.xi=function(a){var b=a.min,c=b.x,d=b.y;b=b.z;var e=a.max;a=e.x;var f=e.y;e=e.z;for(var g=0,l=this.Ce,n,r;6>g;++g)if(n=l[g],r=n.$b,0>n.bm(0<r.x?a:c,0<r.y?f:d,0<r.z?e:b))return!1;return!0};p.ze=function(a){var b=0,c=this.Ce,d=-a.radius;for(a=a.V;6>b;++b)if(c[b].Ne(a)<d)return!1;return!0};p.Ha=function(a){var b=this.Ce;a=a.Ce;return b[0].Ha(a[0])&&
|
||
b[1].Ha(a[1])&&b[2].Ha(a[2])&&b[3].Ha(a[3])&&b[4].Ha(a[4])&&b[5].Ha(a[5])};p.toString=function(){var a=this.Ce,b=a[0],c=b.$b,d=a[1],e=d.$b,f=a[2],g=f.$b,l=a[3],n=l.$b,r=a[4],w=r.$b;a=a[5];var y=a.$b;return"(\n ["+c.x+", "+c.y+", "+c.z+", "+b.ea+"]\n ["+e.x+", "+e.y+", "+e.z+", "+d.ea+"]\n ["+g.x+", "+g.y+", "+g.z+", "+f.ea+"]\n ["+n.x+", "+n.y+", "+n.z+", "+l.ea+"]\n ["+w.x+", "+w.y+", "+w.z+", "+r.ea+"]\n ["+
|
||
y.x+", "+y.y+", "+y.z+", "+a.ea+"]\n )"};p=ce.prototype;p.set=function(a,b,c,d){this.$b.set(a,b,c);this.ea=d;return this};p.clone=function(){return new ce(this.$b.clone(),this.ea)};p.copy=function(a){this.$b.copy(a.$b);this.ea=a.ea;return this};p.normalize=function(){var a=this.$b,b=1/a.Fd;a.scale(b);this.ea*=b;return this};p.bm=function(a,b,c){var d=this.$b;return d.x*a+d.y*b+d.z*c+this.ea};p.Ne=function(a){return this.$b.dot(a)+this.ea};p.xi=function(a){return a.Vk(this)};p.ze=function(a){return a.Vk(this)};
|
||
p.$h=function(a,b){b=void 0===b?this:b;var c=this.$b;a=a.Fc(tP);var d=void 0===d?a:d;a=a.elements;var e=d.elements,f=a[1],g=a[2],l=a[3],n=a[4],r=a[5],w=a[6],y=a[7],A=a[8],H=a[9],I=a[10],O=a[11],S=a[12],R=a[13],ja=a[14],ka=a[15];e[0]=a[0];e[1]=n;e[2]=A;e[3]=S;e[4]=f;e[5]=r;e[6]=H;e[7]=R;e[8]=g;e[9]=w;e[10]=I;e[11]=ja;e[12]=l;e[13]=y;e[14]=O;e[15]=ka;c=Vh(d,uP.set(c.x,c.y,c.z,this.ea));b.$b.set(c.x,c.y,c.z);b.ea=c.w};p.Ha=function(a){return this.$b.Ha(a.$b)&&this.ea===a.ea};p.toString=function(){var a=
|
||
this.$b;return"["+a.x+", "+a.y+", "+a.z+", "+this.ea+"]"};var DK=new E,tP=new Tb,uP=new dc;p=yn.prototype;p.set=function(a,b){this.start=a;this.end=b;return this};p.clone=function(){return new yn(this.start.clone(),this.end.clone())};p.copy=function(a){this.start.copy(a.start);this.end.copy(a.end);return this};p.V=function(a){var b=this.start,c=this.end;a.x=.5*(b.x+c.x);a.y=.5*(b.y+c.y);a.z=.5*(b.z+c.z);return a};p.Ha=function(a){return this.start.Ha(a.start)&&this.end.Ha(a.end)};p.toString=function(){var a=
|
||
this.start,b=this.end;return"(["+a.x+", "+a.y+", "+a.z+"], ["+b.x+", "+b.y+", "+b.z+"])"};Db.Object.defineProperties(yn.prototype,{Fd:{configurable:!0,enumerable:!0,get:function(){return this.end.distance(this.start)}},Ff:{configurable:!0,enumerable:!0,get:function(){return this.end.De(this.start)}}});zn.prototype.value=function(){return 0};Db.Object.defineProperties(zn.prototype,{length:{configurable:!0,enumerable:!0,get:function(){var a=this.j;if(!a||this.M!==this.g){a=this.M=this.g;var b=this.value(0),
|
||
c=this.j=Array(a);c[0]=0;for(var d=1,e=1/a,f=0,g;d<=a;++d)g=this.value(d*e),f+=g-b,c[d]=f,b=g;a=this.j}return a[a.length-1]}}});var cC=200;An.prototype.value=function(a,b){return b};Db.Object.defineProperties(An.prototype,{length:{configurable:!0,enumerable:!0,get:function(){var a=this.j;if(!a||this.M!==this.g){a=this.M=this.g;var b=this.j=Array(a);this.value(0,yh);var c=yh.x,d=yh.y,e=yh.z;b[0]=0;for(var f=1,g=1/a,l=0;f<=a;++f){this.value(f*g,yh);var n=yh.x,r=yh.y,w=yh.z;c=n-c;d=r-d;e=w-e;l+=Math.sqrt(c*
|
||
c+d*d+e*e);b[f]=l;c=n;d=r;e=w}a=this.j}return a[a.length-1]}}});var yh=new E;u(yb,zn);p=yb.prototype;p.value=function(a){var b=this.keys,c=b.length;switch(c){case 0:return 0;case 1:return b[0].value;default:for(var d=0,e=c-1,f=b[d].time,g=b[e].time,l,n;1<e-d;)l=e+d>>1,n=b[l].time,n<=a?(d=l,f=n):(e=l,g=n);var r,w;0<d?r=b[d-1].value:r=2*b[0].value-b[1].value;d=b[d].value;l=b[e++].value;e<c?w=b[e].value:w=2*b[c-1].value-b[c-2].value;return te((a-f)/(g-f),r,d,l,w)}};p.Pa=function(a){var b=this.keys,c=
|
||
b.length;a=a.keys;if(a.length===c)for(var d=0,e,f;d<c;++d)e=b[d],f=a[d],f.time=e.time,f.value=e.value+e.fb*(2*Math.random()-1);else{for(d=0;d<c;++d)e=b[d],a[d]={time:e.time,value:e.value+e.fb*(2*Math.random()-1),fb:0};a.length=c}};p.ea=function(a){var b=this.keys;1===b.length?(b=b[0],b.time=b.fb=0,b.value=a):(b[0]={time:0,value:a,fb:0},b.length=1);return this};p.load=function(a){if(a){this.keys=[];for(var b=0,c=this.keys,d=c.length=a.length,e;b<d;++b)e=a[b],c[b]={time:Ma(e.t,b/(1===d?1:d-1)),value:Ma(e.x,
|
||
0),fb:Ma(e.dx,0)}}};p.save=function(a){for(var b=0,c=this.keys,d=c.length,e;b<d;++b)e=c[b],a.push({t:e.time,x:e.value,dx:e.fb})};u(Mg,An);Mg.prototype.value=function(a,b){var c=this.keys,d=c.length;switch(d){case 0:return b;case 1:return b.copy(c[0].value);default:for(var e=0,f=d-1,g=c[e].time,l=c[f].time,n,r;1<f-e;)n=f+e>>1,r=c[n].time,r<=a?(e=n,g=r):(f=n,l=r);a=(a-g)/(l-g);if(0<e)r=c[e-1].value,g=r.x,l=r.y,n=r.z;else{r=c[0].value;var w=c[1].value;g=2*r.x-w.x;l=2*r.y-w.y;n=2*r.z-w.z}r=c[e].value;
|
||
e=r.x;var y=r.y,A=r.z;r=c[f++].value;var H=r.x,I=r.y,O=r.z;f<d?(r=c[f].value,c=r.x,d=r.y,f=r.z):(r=c[d-1].value,w=c[d-2].value,c=2*r.x-w.x,d=2*r.y-w.y,f=2*r.z-w.z);return b.set(te(a,g,e,H,c),te(a,l,y,I,d),te(a,n,A,O,f))}};Mg.prototype.Pa=function(a){var b=this.keys,c=b.length;a=a.keys;if(a.length===c)for(var d=0,e,f,g,l;d<c;++d)e=b[d],g=e.value,l=e.fb,f=a[d],f.time=e.time,f.value.set(g.x+l.x*(2*Math.random()-1),g.y+l.y*(2*Math.random()-1),g.z+l.z*(2*Math.random()-1));else{for(d=0;d<c;++d)e=b[d],f=
|
||
e.value,g=e.fb,a[d]={time:e.time,value:new E(f.x+g.x*(2*Math.random()-1),f.y+g.y*(2*Math.random()-1),f.z+g.z*(2*Math.random()-1)),fb:new E(0,0,0)};a.length=c}};Mg.prototype.load=function(a){if(a){this.keys=[];for(var b=0,c=this.keys,d=c.length=a.length,e;b<d;++b)e=a[b],c[b]={time:Ma(e.t,b/(1===d?1:d-1)),value:new E(Ma(e.x,0),Ma(e.y,0),Ma(e.z,0)),fb:new E(Ma(e.dx,0),Ma(e.dy,0),Ma(e.dz,0))}}};Mg.prototype.save=function(a){for(var b=0,c=this.keys,d=c.length,e;b<d;++b)e=c[b],a.push({t:e.time,x:e.value.x,
|
||
y:e.value.y,z:e.value.z,dx:e.fb.x,dy:e.fb.y,dz:e.fb.z})};Cc.prototype.on=function(a,b){b.id=b.id||bI++;var c=this.M;c||(c=this.M={});var d=c[a];d?d.push(b):c[a]=[b];return this};Cc.prototype.off=function(a,b){if(b){if(b=b.id,void 0!==b){var c=this.M;if(c){var d=c[a];if(d)for(var e=0,f=d.length;e<f;++e)if(d[e].id===b){1<f?c[a]=N(d,e):c[a].length=0;break}}}}else(b=this.M)&&b[a]&&delete b[a];return this};Cc.prototype.once=function(a,b){function c(){d.off(a,b);b.apply(d,arguments)}var d=this;c.id=b.id||
|
||
(b.id=bI++);return this.on(a,c)};Cc.prototype.A=function(a){var b=this.M;if(b&&(b=b[a]))switch(arguments.length){case 1:for(var c=0,d=b.length;c<d;++c)if(b[c].call(this))return!0;break;case 2:c=0;for(d=b.length;c<d;++c)if(b[c].call(this,arguments[1]))return!0;break;case 3:c=0;for(d=b.length;c<d;++c)if(b[c].call(this,arguments[1],arguments[2]))return!0;break;case 4:c=0;for(d=b.length;c<d;++c)if(b[c].call(this,arguments[1],arguments[2],arguments[3]))return!0;break;case 5:c=0;for(d=b.length;c<d;++c)if(b[c].call(this,
|
||
arguments[1],arguments[2],arguments[3],arguments[4]))return!0;break;case 6:c=0;for(d=b.length;c<d;++c)if(b[c].call(this,arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]))return!0;break;case 7:c=0;for(d=b.length;c<d;++c)if(b[c].call(this,arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]))return!0;break;case 8:for(c=0,d=b.length;c<d;++c)if(b[c].call(this,arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7]))return!0}return!1};
|
||
var bI=0,qa=1;u(lc,Cc);lc.prototype.ia=function(a,b){var c=this,d=this.state,e,f;if(a)if(d===Ib)a(this);else if(d===rc)this.once(Ib,e=function(){f&&c.off(db,f);a(c)});if(b)if(d===db)b(this.error);else if(d===rc)this.once(db,f=function(g){e&&c.off(Ib,e);b(g)});return this};lc.prototype.ac=function(a){return this.ia(void 0,a)};lc.prototype.isLoaded=function(){return this.state===Ib};var Ib=qa++,db=qa++,rc=qa++;u(Ng,lc);u(ms,Cc);p=ms.prototype;p.has=function(a){a=this.g.getItem(Og(this,a));return void 0!==
|
||
a&&null!==a};p.remove=function(a){this.g.removeItem(Og(this,a))};p.nh=function(a,b){a=this.g.getItem(Og(this,a));return void 0===a||null===a?b:0!==parseInt(a,10)};p.vh=function(a,b){this.g.setItem(Og(this,a),b?1:0)};p.Aa=function(a,b){a=this.g.getItem(Og(this,a));return void 0===a||null===a?b:parseInt(a,10)};p.kc=function(a,b){this.g.setItem(Og(this,a),b)};p.ye=function(a,b,c){b=void 0===b?1:b;this.kc(a,this.Aa(a,void 0===c?0:c)+b)};p.ma=function(a,b){a=this.g.getItem(Og(this,a));return void 0===
|
||
a||null===a?b:a};p.rc=function(a,b){this.g.setItem(Og(this,a),b)};p=ns.prototype;p.load=function(a,b,c,d,e,f,g,l,n,r){f=void 0===f?0:f;var w=this.M;w[a]||this.g.push(w[a]=new FK(a,void 0===b?a:b,c,void 0===d?"":d,void 0===e?0:e,f||3,!f,void 0===g?3:g,void 0===l?0:l,void 0===n?function(){}:n,void 0===r?function(){}:r))};p.has=function(a){return!!this.M[a]};p.remove=function(a){var b=this.M[a];b&&(Wf(this,b,null),this.g=T(this.g,b),delete this.M[a])};p.clear=function(){for(;this.g.length;)this.remove(this.g[this.g.length-
|
||
1].url)};p.update=function(a){for(var b=0,c=this.g,d=c.length,e,f=void 0;b<d;++b)e=c[b],(f=e.he)?0<e.timeout&&(e.time+=a)>=e.timeout&&Wf(this,e,f instanceof XMLHttpRequest?"loading timeout "+e.he.status+" ("+e.he.statusText+")":"loading timeout"):e.jj=Math.max(e.jj-a,0);if(0<this.g.length){a=this.g;b=a[0].priority;d=c=0;for(e=a.length;d<e;++d)f=a[d],f.priority>b&&(b=f.priority,c=0),f.priority===b&&f.he&&++c;for(d=0;6>=c&&d<a.length;){e=a[d];if(e.priority===b&&null===e.he&&0>=e.jj){a=e;if(a.Km>=a.Ga){this.g=
|
||
T(this.g,a);delete this.M[a.url];b=a.Xa+" "+(a.error||"loading issue unknown");if(a.bo)throw b;a.ac(a.url,b)}else++a.Km,a.time=0,a.jj=a.$c,b=(-1===a.Xa.indexOf("://")&&"/"!==a.Xa[0]?"./":"")+a.Xa,"js"===a.responseType?(c=a.he=document.createElement("script"),c.addEventListener("load",this.O,!1),c.addEventListener("error",this.C,!1),c.addEventListener("abort",this.u,!1),this.j.set(c,a),c.async=1,c.type="text/javascript",c.src=b,(document.head||document.body).appendChild(c)):(c=a.he=new XMLHttpRequest,
|
||
c.open("GET",b+(this.version&&void 0===a.crossOrigin?(-1===a.Xa.indexOf("?")?"?v=":"&v=")+this.version:""),!0),c.onreadystatechange=this.D,c.crossOrigin=a.crossOrigin,"json"!==a.responseType&&(c.responseType=a.responseType),this.j.set(c,a),c.send(null));break}++d}}};Db.Object.defineProperties(ns.prototype,{count:{configurable:!0,enumerable:!0,get:function(){return this.g.length+this.Z},set:function(a){this.Z=Math.max(0,a-this.g.length)}}});p=dC.prototype;p.set=function(a,b){var c=this.oa,d=c[a];c[a]=
|
||
b;d&&(this.app.da.remove(a),d.dispose());return b};p.get=function(a,b,c,d){"function"===typeof b&&(d=c,c=b,b=void 0);var e=this.oa,f=e[a];f||(f=e[a]=new Pe,f.state=db);if(!(e=f.state===db)&&(e=b&&b.reload)){a:{e=this.g;for(l in e){var g=e[l];if(-1!==g.urls.indexOf(a)&&-1===g.wm.indexOf(a)){var l=!0;break a}}l=!1}e=!l}if(e){b=mc(f.options,b);f.state=rc;l=this.app;e=l.X;var n=this.j&&b.Pc?b.Pc:ol;g=b.Xa||a;var r="blob";switch(n){case ng:case ui:e.WEBGL_compressed_texture_pvrtc?(g+=".pvr.txt",r="arraybuffer"):
|
||
e.WEBGL_compressed_texture_s3tc?(g+=".dxt.txt",r="arraybuffer",n=cI):e.WEBGL_compressed_texture_etc1?(g+=".etc.txt",r="arraybuffer"):n=ol;break;case cI:e.WEBGL_compressed_texture_s3tc?(g+=".dxt.txt",r="arraybuffer"):n=ol}var w=f.Ea;w.loaded=!1;w.Pc=n;if(n===ng){n=a+".a.png";var y=(b.Xa||a)+".a.png";w=w.alpha=new rf;var A="blob";w.loaded=!1;w.Pc=ui;e.WEBGL_compressed_texture_pvrtc?(y+=".pvr.txt",A="arraybuffer"):e.WEBGL_compressed_texture_etc1&&(y+=".etc.txt",A="arraybuffer");l.da.load(n,y,b.crossOrigin,
|
||
A,b.priority,b.Ga,b.$c,b.timeout,this.l,this.o)}l.da.load(a,g,b.crossOrigin,r,b.priority,b.Ga,b.$c,b.timeout,this.Ac,this.ac)}return f.ia(c,d)};p.gb=function(a,b){if("function"===typeof b){var c=d,d=b;b=void 0}var e=this.g,f=e[a];f||(f=e[a]=new eC,f.state=db);if(f.state===db||b&&b.reload){b=mc(f.options,b);if(b.reload){e=0;for(var g=f.urls;e<g.length;++e)this.get(g[e]).state=rc}f.state=rc;this.app.da.load(a,b.Xa,b.crossOrigin,b.responseType||"json",void 0===b.priority?1:b.priority,b.Ga,b.$c,b.timeout,
|
||
this.m,this.M)}return f.ia(d,c)};p.remove=function(a){var b=this.app.da,c=this.oa,d=c[a],e=this.g,f=e[a];d&&(delete c[a],b.remove(a),d.dispose());if(f)for(delete e[a],b.remove(a),a=0,f=f.urls,b=f.length;a<b;++a)this.remove(f[a])};p.clear=function(){var a=this.oa,b=this.g,c=this.app.da;this.oa={};this.g={};for(var d in a)c.remove(d),a[d].dispose();for(var e in b)c.remove(e)};u(eC,Ng);Vk.prototype.has=function(a){return!!this.fonts[a]};Vk.prototype.get=function(a,b,c,d){"function"===typeof b&&(d=c,
|
||
c=b,b=void 0);var e=this.fonts[a];e||(e=this.fonts[a]=new Wk,e.state=db);if(e.state===db||b&&b.reload)b=mc(e.options,b),b.reload&&e.dispose(),e.state=rc,this.app.da.load(a,b.Xa,b.crossOrigin,b.responseType||"json",b.priority,b.Ga,b.$c,b.timeout,this.Ac,this.ac);return e.ia(c,d)};Vk.prototype.remove=function(a){var b=this.fonts;b[a]&&(delete b[a],this.app.da.remove(a))};Vk.prototype.clear=function(){var a=this.fonts,b=this.app.da;this.fonts={};for(var c in a)b.remove(c)};u(Bn,Cc);p=Bn.prototype;p.dispose=
|
||
function(){this.stop();var a=this.app;a.off(mf,this.K);a.off(Yh,this.P);a.off(tj,this.W);a.off(uj,this.wa)};p.start=function(){var a=this.app,b=a.S;this.m=a.focused?1:0;b.ba("SoundInstance",Rd);b.ba("MusicInstance",ji);b.ba("Sound3DInstance",vj);b.ba("LoopInstance",Wg);b.ba("MusicLoopInstance",Ij);Zh(this);this.context&&this.o.connect(this.context.destination)};p.stop=function(){var a=this.app.S,b=this.de,c=this.ef;this.de=[];this.ef=[];for(var d=0,e=b.length;d<e;++d)b[d].dispose();b=0;for(d=c.length;b<
|
||
d;++b)c[b].dispose();this.Fg={};a.unregister(Rd);a.unregister(ji);if(this.context)try{this.o.disconnect(0)}catch(f){}};p.isEnabled=function(){return null!==this.context};p.get=function(a,b,c,d){"function"===typeof b&&(d=c,c=b,b=void 0);var e=this.g,f=e[a];f||(f=e[a]=new Xh,f.state=db);f.state===db&&(this.context?(b=mc(f.options,b),f.state=rc,e=b.Xa||a,"wav"===ta(e)&&(this.Z?e=e.replace(".wav",".ogg"):this.l&&(e=e.replace(".wav",".m4a"))),this.app.da.load(a,e,b.crossOrigin,b.responseType||"arraybuffer",
|
||
b.priority,b.Ga,b.$c,b.timeout,this.Ac,this.ac)):f.state=Ib);return f.ia(c,d)};p.gb=function(a,b){if("function"===typeof b){var c=d,d=b;b=void 0}var e=this.j,f=e[a];f||(f=e[a]=new Ng,f.state=db);f.state===db&&(b=mc(f.options,b),f.state=rc,this.app.da.load(a,b.Xa,b.crossOrigin,b.responseType||"json",void 0===b.priority?1:b.priority,b.Ga,b.$c,b.timeout,this.J,this.H));return f.ia(d,c)};p.remove=function(a){var b=this.app.da,c=this.g,d=c[a],e=this.j,f=e[a];d&&(delete c[a],b.remove(a),d.dispose());if(f)for(delete e[a],
|
||
b.remove(a),a=0,f=f.urls,b=f.length;a<b;++a)this.remove(f[a])};p.clear=function(){var a=this.app.da,b=this.g,c=this.j;this.g={};this.j={};for(var d in b)a.remove(d),b[d].dispose();for(var e in c)a.remove(e)};p.play=function(a,b,c){b=void 0===b?!1:b;a=a?this.get(a,c):jC;return this.app.S.aa(Rd).Uh(a,b,1)};p.loop=function(a,b){return this.play(a,!0,b)};p.zc=function(a,b,c,d,e){b=void 0===b?1:b;c=void 0===c?1:c;d=void 0===d?!1:d;var f=this.Fg[a];if(!f){if(0===b)return;f=this.Fg[a]=this.app.S.aa(ji);
|
||
f.wd=a;f.mg=d;f.Uh(this.get(a,e),!0,0)}0===c&&(f.volume=b);b===f.volume?0===b?f.stop():f.Rd=b:(f.Rd=b,f.lg=1/c)};p.update=function(a){for(var b=0,c=this.de,d=c.length;b<d;++b)c[b].ng(a);a=this.ef;b=0;for(c=this.app.S;b<a.length;++b)c.release(a[b]);a.length=0};Db.Object.defineProperties(Bn.prototype,{volume:{configurable:!0,enumerable:!0,get:function(){return this.app.storage.Aa("audio",1)},set:function(a){this.app.storage.kc("audio",Da(a,0,1));Zh(this);this.A(vP)}},muted:{configurable:!0,enumerable:!0,
|
||
get:function(){return 0===this.app.storage.Aa("audio",1)}},D:{configurable:!0,enumerable:!0,get:function(){return this.app.storage.Aa("sfxAudio",1)},set:function(a){this.app.storage.kc("sfxAudio",Da(a,0,1));Zh(this);this.A(Qn)}},Qg:{configurable:!0,enumerable:!0,get:function(){return 0===this.app.storage.Aa("sfxAudio",1)}},u:{configurable:!0,enumerable:!0,get:function(){return this.app.storage.Aa("musicAudio",1)},set:function(a){this.app.storage.kc("musicAudio",Da(a,0,1));Zh(this);this.A(Rn)}},Eg:{configurable:!0,
|
||
enumerable:!0,get:function(){return 0===this.app.storage.Aa("musicAudio",1)}},Dg:{configurable:!0,enumerable:!0,get:function(){return this.C},set:function(a){this.C=Da(a,0,1);Zh(this)}}});var vP=qa++,Qn=qa++,Rn=qa++,lC=qa++,kC=qa++;p=mC.prototype;p.set=function(a,b){var c=this.Zb,d=c[a];c[a]=b;d&&(this.app.da.remove(a),d.dispose());return b};p.get=function(a,b,c,d){"function"===typeof b&&(d=c,c=b,b=void 0);var e=this.Zb,f=e[a];f||(f=e[a]=new Xk,f.state=db);f.state===db&&(b=mc(f.options,b),f.state=
|
||
rc,this.app.da.load(a,b.Xa||a+".json",b.crossOrigin,b.responseType||"json",b.priority,b.Ga,b.$c,b.timeout,this.Ac,this.ac));return f.ia(c,d)};p.gb=function(a,b){if("function"===typeof b){var c=d,d=b;b=void 0}var e=this.g,f=e[a];f||(f=e[a]=new Ng,f.state=db);f.state===db&&(b=mc(f.options,b),f.state=rc,this.app.da.load(a,b.Xa,b.crossOrigin,b.responseType||"json",void 0===b.priority?1:b.priority,b.Ga,b.$c,b.timeout,this.M,this.j));return f.ia(d,c)};p.remove=function(a){var b=this.app.da,c=this.Zb,d=
|
||
c[a],e=this.g,f=e[a];d&&(delete c[a],b.remove(a),d.dispose());if(f)for(delete e[a],b.remove(a),a=0,f=f.urls,b=f.length;a<b;++a)this.remove(f[a])};p.clear=function(){var a=this.Zb,b=this.g,c=this.app.da;this.Zb={};this.g={};for(var d in a)c.remove(d),a[d].dispose();for(var e in b)c.remove(e)};Yk.prototype.get=function(a,b,c,d){"function"===typeof b&&(d=c,c=b,b=void 0);var e=this.xd,f=e[a];f||(f=e[a]=new rs,f.state=db);f.state===db&&(b=mc(f.options,b),f.state=rc,this.app.da.load(a,b.Xa||a+".json",b.crossOrigin,
|
||
b.responseType||"json",b.priority,b.Ga,b.$c,b.timeout,this.Ac,this.ac));return f.ia(c,d)};Yk.prototype.gb=function(a,b){if("function"===typeof b){var c=d,d=b;b=void 0}var e=this.g,f=e[a];f||(f=e[a]=new Ng,f.state=db);f.state===db&&(b=mc(f.options,b),f.state=rc,this.app.da.load(a,b.Xa,b.crossOrigin,b.responseType||"json",void 0===b.priority?1:b.priority,b.Ga,b.$c,b.timeout,this.M,this.j));return f.ia(d,c)};Yk.prototype.remove=function(a){var b=this.app.da,c=this.xd,d=this.g,e=d[a];c[a]&&(delete c[a],
|
||
b.remove(a));if(e)for(delete d[a],b.remove(a),a=0,e=e.urls,b=e.length;a<b;++a)this.remove(e[a])};Yk.prototype.clear=function(){var a=this.xd,b=this.g,c=this.app.da;this.xd={};this.g={};for(var d in a)c.remove(d);for(var e in b)c.remove(e)};al.prototype.get=function(a,b,c,d){"function"===typeof b&&(d=c,c=b,b=void 0);var e=this.We,f=e[a];f||(f=e[a]=new ts,f.state=db);f.state===db&&(b=mc(f.options,b),f.state=rc,this.app.da.load(a,b.Xa||a+".json",b.crossOrigin,b.responseType||"json",b.priority,b.Ga,b.$c,
|
||
b.timeout,this.Ac,this.ac));return f.ia(c,d)};al.prototype.gb=function(a,b){if("function"===typeof b){var c=d,d=b;b=void 0}var e=this.g,f=e[a];f||(f=e[a]=new Ng,f.state=db);f.state===db&&(b=mc(f.options,b),f.state=rc,this.app.da.load(a,b.Xa,b.crossOrigin,b.responseType||"json",void 0===b.priority?1:b.priority,b.Ga,b.$c,b.timeout,this.M,this.j));return f.ia(d,c)};al.prototype.remove=function(a){var b=this.app.da,c=this.We,d=this.g,e=d[a];c[a]&&(delete c[a],b.remove(a));if(e)for(delete d[a],b.remove(a),
|
||
a=0,e=e.urls,b=e.length;a<b;++a)this.remove(e[a])};al.prototype.clear=function(){var a=this.We,b=this.g,c=this.app.da;this.We={};this.g={};for(var d in a)c.remove(d);for(var e in b)c.remove(e)};u($h,Cc);$h.prototype.dispose=function(){this.app.off(mf,this.l)};$h.prototype.start=function(){-1===this.g.indexOf(this.language)&&this.app.storage.remove("language");var a=window.navigator.language;a&&vs(this,a.substring(0,2).toLowerCase());tC(this)};$h.prototype.ma=function(a,b){b=void 0===b?null:b;var c=
|
||
void 0===c?this.language:c,d=this.o[a];b=d?d[b?c+b:c]||d[c]:a;return void 0===b?a:b};$h.prototype.Aa=function(a){switch(this.language){case "ru":a%=100;if(5<=a&&20>=a)return Tv;switch(a%10){case 1:return ws;case 2:case 3:case 4:return sC;default:return Tv}default:return 1<a?Tv:ws}};Db.Object.defineProperties($h.prototype,{language:{configurable:!0,enumerable:!0,get:function(){return this.app.storage.ma("language",this.j)},set:function(a){for(var b=0,c=this.g,d=c.length;b<d;++b)if(c[b]===a){b=this.language;
|
||
this.app.storage.rc("language",a);tC(this);this.A(Hn,b);break}}}});var Hn=qa++,ws=0,sC=1,Tv=2;cl.prototype.get=function(a,b,c,d){"function"===typeof b&&(d=c,c=b,b=void 0);var e=this.wc,f=e[a];f||(f=e[a]=new xj,f.state=db);f.state===db&&(b=mc(f.options,b),f.state=rc,this.app.da.load(a,b.Xa,b.crossOrigin,b.responseType||"json",b.priority,b.Ga,b.$c,b.timeout,this.Ac,this.ac));return f.ia(c,d)};cl.prototype.gb=function(a,b){if("function"===typeof b){var c=d,d=b;b=void 0}var e=this.g,f=e[a];f||(f=e[a]=
|
||
new Ng,f.state=db);f.state===db&&(b=mc(f.options,b),f.state=rc,this.app.da.load(a,b.Xa,b.crossOrigin,b.responseType||"json",void 0===b.priority?1:b.priority,b.Ga,b.$c,b.timeout,this.M,this.j));return f.ia(d,c)};cl.prototype.remove=function(a){var b=this.app.da,c=this.wc,d=c[a],e=this.g,f=e[a];d&&(delete c[a],b.remove(a),d.dispose());if(f)for(delete e[a],b.remove(a),a=0,f=f.urls,b=f.length;a<b;++a)this.remove(f[a])};cl.prototype.clear=function(){var a=this.wc,b=this.g,c=this.app.da;this.wc={};this.g=
|
||
{};for(var d in a)c.remove(d),a[d].dispose();for(var e in b)c.remove(e)};p=vC.prototype;p.aa=function(a){return(a=this.g[a.Pf])?a.aa():null};p.release=function(a){var b=this.g[a.constructor.Pf];b&&b.release(a);return this};p.resize=function(a,b){(a=this.g[a.Pf])&&a.resize(b);return this};p.register=function(a,b){b=void 0===b?0:b;var c=this.g;a.Pf=c.length;var d=new ai(this.app,a,b);c.push(d);a.jc&&a.jc(this.app,b);return this};p.ba=function(a,b,c){c=void 0===c?0:c;var d=this.g;b.Pf=d.length;var e=
|
||
new ai(this.app,b,c);d.push(e);this.j[a]=e;b.jc&&b.jc(this.app,c)};p.unregister=function(a){var b=a.Pf,c=this.g,d=c[b];d&&(C(c,b),c[b]&&(c[b].ak.Pf=b),a.Pf=void 0,d.dispose(),a.Tn&&a.Tn(this.app));return this};ai.prototype.aa=function(){var a=this.g,b=a.length;if(0<b){var c=a[--b];a.length=b;c.Lb();return c}a=new this.ak(this.app);a.Lb();return a};ai.prototype.release=function(a){a.pc();a.A(uu,a);this.g.push(a)};ai.prototype.resize=function(a){var b=this.g,c=b.length;if(a>c)for(var d=this.ak,e=this.app,
|
||
f;c<a;++c)f=new d(e),f.Lb(),f.pc(),b[c]=f};ai.prototype.dispose=function(){var a=this.g;this.g=[];for(var b=0,c=a.length,d;b<c;++b)d=a[b],d.dispose()};u(xs,Cc);p=xs.prototype;p.dispose=function(){this.stop();var a=this.app;a.off(mf,this.W);a.off(Yh,this.wa)};p.isEnabled=function(){return this.g&&this.app.X.enabled};p.enable=function(){this.g||(this.g=!0)};p.disable=function(){this.g&&(this.g=!1,this.cancel())};p.start=function(){var a=this.app.X.canvas;a.addEventListener("pointerdown",this.l,!1);
|
||
a.addEventListener("pointermove",this.u,!1);a.addEventListener("pointerup",this.C,!1);a.addEventListener("pointercancel",this.o,!1);a.addEventListener("pointerout",this.P,!1);a.addEventListener("wheel",this.sh,!1);document.addEventListener("keydown",this.m,!1);document.addEventListener("keyup",this.K,!1);a.setAttribute("touch-action","none");document.body.addEventListener("touchstart",this.H,this.J)};p.stop=function(){var a=this.app.X.canvas;a.removeEventListener("pointerdown",this.l,!1);a.removeEventListener("pointermove",
|
||
this.u,!1);a.removeEventListener("pointerup",this.C,!1);a.removeEventListener("pointercancel",this.o,!1);a.removeEventListener("pointerout",this.P,!1);a.removeEventListener("wheel",this.sh,!1);document.removeEventListener("keydown",this.m,!1);document.removeEventListener("keyup",this.K,!1);this.j.length=0;document.body.removeEventListener("touchstart",this.H,this.J)};p.update=function(){-1!==this.Gi&&this.app.screen.nc(bi,this.Gi,this.Z,this.D,this.O);document.body.style.cursor=0<this.Uk?"pointer":
|
||
"auto"};p.cancel=function(){for(var a=this.j,b=this.app.screen;a.length;)b.nc(zj,a.pop());b.nc(xt)};p.A=function(a){return Cc.prototype.A.apply(this,arguments)||this.app.screen.nc.apply(this.app.screen,arguments)};var xt=qa++,Qe=qa++,ys=qa++,nf=qa++,el=qa++,bi=qa++,zj=qa++,xC=qa++;p=yC.prototype;p.dispose=function(){};p.layout=function(){for(var a=0,b=this.g,c=b.length;a<c;++a)b[a].layout()};p.update=function(a){for(var b=0,c=this.g,d=c.length;b<d;++b)c[b].update(a)};p.ob=function(){var a=this.app,
|
||
b=a.X,c=this.Tl;if(b.enabled){b.frame++;this.clearColor&&di(b,!0,!0,!0,!0);this.clearDepth&&(b.Kd(!0),fi(b,!0));this.clearStencil&&IC(b);b.clear(this.clearColor,this.clearDepth,this.clearStencil);ci(b,!1);var d=a.Sd;a=a.Qd;c.X=b;c.viewport.set(0,0,d,a);c.scissor.set(0,0,d,a);c.l.Tj(0,d,a,0,-1,1);d=0;a=this.g;for(var e=a.length;d<e;++d)a[d].ob(c);c.T();b.T()}};p.push=function(a,b){b=void 0===b?0:b;if(-1===this.g.indexOf(a)){this.app.input.cancel();for(var c=0,d=this.g=this.g.slice(),e=d.length;c<=
|
||
e;++c)if(c===e)d.push(a);else if(d[c].priority>b){d.splice(c,0,a);break}a.priority=b;a.layout();a.A($g)}return this};p.remove=function(a){var b=this.g,c=b.indexOf(a);-1!==c&&(this.g=N(b,c),a.A(Jj));return this};p.clear=function(a){a=void 0===a?0:a;this.app.input.cancel();for(var b=0,c=this.g,d=c.length-1;0<=d;--d)if(c[d].priority<=a){b=d;break}this.g=c.slice(b+1);a=c.slice(0,b+1);for(b=a.length-1;0<=b;--b)a[b].A(Jj);return this};p.nc=function(){var a=Zf(this);return a?a.nc.apply(a,arguments):!1};
|
||
gl.prototype.has=function(a){return!!this.scripts[a]};gl.prototype.get=function(a,b,c,d){"function"===typeof b&&(d=c,c=b,b=void 0);var e=this.scripts,f=e[a];f||(e[a]=f=new pt(a),f.state=db);f.state===db&&(b=mc(f.options,b),f.state=rc,this.app.da.load(a,b.Xa,b.crossOrigin,b.responseType||"js",void 0===b.priority?1:b.priority,b.Ga,b.$c,b.timeout,this.Ac,this.ac));return f.ia(c,d)};gl.prototype.remove=function(a){var b=this.scripts,c=b[a];c&&(delete b[a],this.app.da.remove(a),c.dispose())};gl.prototype.clear=
|
||
function(){var a=this.scripts,b=this.app.da;this.scripts={};for(var c in a)b.remove(c),a[c].dispose()};p=AC.prototype;p.dispose=function(){this.stop();var a=this.app;a.off(mf,this.dc);a.off(Yh,this.kd)};p.start=function(){if(void 0===window.WebGLRenderingContext)throw"Your browser doesn't seem to support WebGL. Please update your browser or operation system.";var a=this.canvas,b=this.wb;try{if(this.ca=a.getContext("webgl",b)||a.getContext("experimental-webgl",b),!this.ca&&(this.ca=a.getContext("webgl")||
|
||
a.getContext("experimental-webgl"),!this.ca))throw Error("");}catch(n){throw"Your device doesn't seem to support WebGL. Please update your browser or operation system.";}b=this.ca;var c=this.Bk;if(b.getShaderPrecisionFormat){try{var d=b.getShaderPrecisionFormat(b.VERTEX_SHADER,b.HIGH_INT)}catch(n){d=null}if(d&&0<d.precision)c.m="highp";else{try{d=b.getShaderPrecisionFormat(b.VERTEX_SHADER,b.MEDIUM_INT)}catch(n){d=null}c.m=d&&0<d.precision?"mediump":"lowp"}try{d=b.getShaderPrecisionFormat(b.FRAGMENT_SHADER,
|
||
b.HIGH_INT)}catch(n){d=null}if(d&&0<d.precision)c.j="highp";else{try{d=b.getShaderPrecisionFormat(b.FRAGMENT_SHADER,b.MEDIUM_INT)}catch(n){d=null}c.j=d&&0<d.precision?"mediump":"lowp"}try{d=b.getShaderPrecisionFormat(b.VERTEX_SHADER,b.HIGH_FLOAT)}catch(n){d=null}if(d&&0<d.precision)c.M="highp";else{try{d=b.getShaderPrecisionFormat(b.VERTEX_SHADER,b.MEDIUM_FLOAT)}catch(n){d=null}c.M=d&&0<d.precision?"mediump":"lowp"}try{d=b.getShaderPrecisionFormat(b.FRAGMENT_SHADER,b.HIGH_FLOAT)}catch(n){d=null}if(d&&
|
||
0<d.precision)c.g="highp";else{try{d=b.getShaderPrecisionFormat(b.FRAGMENT_SHADER,b.MEDIUM_FLOAT)}catch(n){d=null}c.g=d&&0<d.precision?"mediump":"lowp"}}else c.m=c.M=c.j=c.g="lowp";c.Di=b.getParameter(b.MAX_VERTEX_ATTRIBS);c.C=b.getParameter(b.MAX_VARYING_VECTORS);c.O=b.getParameter(b.MAX_VERTEX_UNIFORM_VECTORS);c.u=b.getParameter(b.MAX_FRAGMENT_UNIFORM_VECTORS);c.o=b.getParameter(b.MAX_COMBINED_TEXTURE_IMAGE_UNITS);c.Ij=b.getParameter(b.MAX_TEXTURE_SIZE);c.l=b.getParameter(b.MAX_CUBE_MAP_TEXTURE_SIZE);
|
||
this.ug=W(Array(c.Di),0);this.Wh=Array(c.Di);d=0;for(var e=this.Wh,f=e.length;d<f;++d)e[d]={eb:null,size:0,offset:0,stride:0,wi:!1};this.Yh=W(Array(c.o),null);e=this.na;d=b.getSupportedExtensions()||[];f=0;for(var g=d.length,l;f<g;++f)l=d[f],e[l]=b.getExtension(l);this.ANGLE_instanced_arrays=e.ANGLE_instanced_arrays;!navigator.userAgent||0<navigator.userAgent.indexOf("MSIE ")||navigator.userAgent.match(/Trident.*rv:11\./)||(this.WEBGL_compressed_texture_s3tc=e.WEBGL_compressed_texture_s3tc||e.WEBKIT_WEBGL_compressed_texture_s3tc);
|
||
this.WEBGL_compressed_texture_etc1=e.WEBGL_compressed_texture_etc1;this.WEBGL_compressed_texture_pvrtc=e.WEBGL_compressed_texture_pvrtc||e.WEBKIT_WEBGL_compressed_texture_pvrtc;e=this.vc;e[Pg]=b.ZERO;e[wm]=b.ONE;e[wP]=b.SRC_COLOR;e[xP]=b.ONE_MINUS_SRC_COLOR;e[yP]=b.DST_COLOR;e[zP]=b.ONE_MINUS_DST_COLOR;e[Uv]=b.SRC_ALPHA;e[xm]=b.ONE_MINUS_SRC_ALPHA;e[AP]=b.DST_ALPHA;e[BP]=b.ONE_MINUS_DST_ALPHA;e[CP]=b.SRC_ALPHA_SATURATE;e[of]=b.FUNC_ADD;e[DP]=b.FUNC_SUBTRACT;e[EP]=b.FUNC_REVERSE_SUBTRACT;e[FP]=b.NEVER;
|
||
e[CC]=b.LESS;e[GP]=b.EQUAL;e[rD]=b.LEQUAL;e[HP]=b.GREATER;e[IP]=b.NOTEQUAL;e[JP]=b.GEQUAL;e[DC]=b.ALWAYS;e[EC]=b.KEEP;e[KP]=b.REPLACE;e[LP]=b.INCR;e[MP]=b.INCR_WRAP;e[NP]=b.DECR;e[OP]=b.DECR_WRAP;e[PP]=b.INVERT;e[QP]=b.CW;e[FC]=b.CCW;e[RP]=b.FRONT;e[Mn]=b.BACK;e[SP]=b.FRONT_AND_BACK;e[TP]=b.BYTE;e[UP]=b.UNSIGNED_BYTE;e[Vv]=b.SHORT;e[Wp]=b.UNSIGNED_SHORT;e[Wv]=b.INT;e[Xv]=b.UNSIGNED_INT;e[dI]=b.FLOAT;e[oD]=b.CLAMP_TO_EDGE;e[Vj]=b.REPEAT;e[VP]=b.NEAREST;e[WP]=b.NEAREST_MIPMAP_NEAREST;e[XP]=b.NEAREST_MIPMAP_LINEAR;
|
||
e[pl]=b.LINEAR;e[YP]=b.LINEAR_MIPMAP_NEAREST;e[ZP]=b.LINEAR_MIPMAP_LINEAR;e[$P]=b.POINTS;e[aQ]=b.LINE_STRIP;e[bQ]=b.LINE_LOOP;e[eI]=b.LINES;e[cQ]=b.TRIANGLE_STRIP;e[dQ]=b.TRIANGLE_FAN;e[Yn]=b.TRIANGLES;e[eQ]=b.DEPTH_COMPONENT;e[fQ]=b.ALPHA;e[gQ]=b.RGB;e[fI]=b.RGBA;e[hQ]=b.LUMINANCE;e[iQ]=b.LUMINANCE_ALPHA;this.WEBGL_compressed_texture_s3tc&&(e[Yv]=this.WEBGL_compressed_texture_s3tc.COMPRESSED_RGB_S3TC_DXT1_EXT,e[jQ]=this.WEBGL_compressed_texture_s3tc.COMPRESSED_RGBA_S3TC_DXT1_EXT,e[kQ]=this.WEBGL_compressed_texture_s3tc.COMPRESSED_RGBA_S3TC_DXT3_EXT,
|
||
e[Zv]=this.WEBGL_compressed_texture_s3tc.COMPRESSED_RGBA_S3TC_DXT5_EXT);this.WEBGL_compressed_texture_etc1&&(e[$v]=this.WEBGL_compressed_texture_etc1.COMPRESSED_RGB_ETC1_WEBGL);this.WEBGL_compressed_texture_pvrtc&&(e[aw]=this.WEBGL_compressed_texture_pvrtc.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,e[bw]=this.WEBGL_compressed_texture_pvrtc.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,e[cw]=this.WEBGL_compressed_texture_pvrtc.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,e[dw]=this.WEBGL_compressed_texture_pvrtc.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG);
|
||
a.addEventListener("webglcontextlost",this.Ic,!1);a.addEventListener("webglcontextrestored",this.rd,!1);HC(this);za("WebGL version: "+b.getParameter(b.VERSION));za("WebGL vendor: "+b.getParameter(b.VENDOR));za("WebGL extensions: "+d);za("WebGL capabilities",c.toString());Wh(this,gI);return this};p.stop=function(){if(this.ca){GC(this);var a=this.canvas;a.removeEventListener("webglcontextlost",this.Ic,!1);a.removeEventListener("webglcontextrestored",this.rd,!1);this.na={};this.WEBGL_compressed_texture_pvrtc=
|
||
this.WEBGL_compressed_texture_etc1=this.WEBGL_compressed_texture_s3tc=this.ANGLE_instanced_arrays=null;this.vc=[];this.ca=null}return this};p.T=function(){};p.Eb=function(a,b,c,d){c=void 0===c?a:c;d=void 0===d?b:d;var e=this.canvas,f=e.parentNode;e.width=a;e.height=b;e.style.width=c+"px";e.style.height=d+"px";f&&(f.style.width=c+"px",f.style.height=d+"px");this.li.set(0,0,a,b);Aj(this,0,0,a,b);zs(this,0,0,a,b);return this};p.Kd=function(a){if(this.Qc!==a){this.Qc=a;var b=this.ca;a?b.enable(b.DEPTH_TEST):
|
||
b.disable(b.DEPTH_TEST)}return this};p.il=function(a){this.depthFunc!==a&&(this.depthFunc=a,this.ca.depthFunc(this.vc[a]))};p.tb=function(a){var b=this.ca;a===Sc?this.l&&(b.disable(b.CULL_FACE),this.l=!1):(this.l||(b.enable(b.CULL_FACE),this.l=!0),this.cullFace!==a&&(b.cullFace(this.vc[a]),this.cullFace=a));return this};p.td=function(a,b){var c=this.ca;if(this.$e!==a||this.af!==b)this.$e=a,this.af=b,a||b?(c.enable(c.POLYGON_OFFSET_FILL),c.polygonOffset(a,b)):c.disable(c.POLYGON_OFFSET_FILL);return this};
|
||
p.clear=function(a,b,c){var d=0,e=this.ca;a&&(d|=e.COLOR_BUFFER_BIT);b&&(d|=e.DEPTH_BUFFER_BIT);c&&(d|=e.STENCIL_BUFFER_BIT);0!==d&&e.clear(d);return this};p.cb=function(a){var b=this.M[a.id];b||(this.M[a.id]=b=new Js(this,a),a.once(hI,this.Lc));var c=b.version!==a.version;c&&b.upload();if(this.m!==a){var d=this.ca;c||d.useProgram(b.Gh);c=this.ug;for(var e=b.ug,f=c.length,g=0;g<f;++g)c[g]!==e[g]&&(e[g]?(d.enableVertexAttribArray(g),c[g]=1):(d.disableVertexAttribArray(g),c[g]=0));this.m=a;this.Xh=
|
||
b.Ja;this.Z=b.Al;this.C=b.attributes;this.O=b.tk}return this};p.Ya=function(a,b){(a=this.Xh[a])&&a.set(b);return this};p.setAttribute=function(a,b){(a=this.C[a])&&a.set(b);return this};p.Jd=function(a){for(var b=0,c=this.O,d=c.length,e,f;b<d;++b)e=c[b],(f=a[e.name])&&e.set(f)};var Ua=0,Pg=Ua++,wm=Ua++,wP=Ua++,xP=Ua++,yP=Ua++,zP=Ua++,Uv=Ua++,xm=Ua++,AP=Ua++,BP=Ua++,CP=Ua++,of=Ua++,DP=Ua++,EP=Ua++,FP=Ua++,CC=Ua++,GP=Ua++,rD=Ua++,HP=Ua++,IP=Ua++,JP=Ua++,DC=Ua++,EC=Ua++,KP=Ua++,LP=Ua++,MP=Ua++,NP=Ua++,
|
||
OP=Ua++,PP=Ua++,QP=Ua++,FC=Ua++,Sc=Ua++,RP=Ua++,Mn=Ua++,SP=Ua++,TP=Ua++,UP=Ua++,Vv=Ua++,Wp=Ua++,Wv=Ua++,Xv=Ua++,dI=Ua++,oD=Ua++,Vj=Ua++,VP=Ua++,WP=Ua++,XP=Ua++,pl=Ua++,YP=Ua++,ZP=Ua++,$P=Ua++,aQ=Ua++,bQ=Ua++,eI=Ua++,cQ=Ua++,dQ=Ua++,Yn=Ua++,eQ=Ua++,fQ=Ua++,gQ=Ua++,fI=Ua++,hQ=Ua++,iQ=Ua++,Yv=Ua++,jQ=Ua++,kQ=Ua++,Zv=Ua++,$v=Ua++,aw=Ua++,bw=Ua++,cw=Ua++,dw=Ua++,ol=0,ui=1,cI=2,ng=3;BC.prototype.toString=function(){return"maxVertexIntPrecision: "+this.m+", maxVertexFloatPrecision: "+this.M+", maxFragmentIntPrecision: "+
|
||
this.j+", maxFragmentFloatPrecision: "+this.g+", maxVertexAttributes: "+this.Di+", maxVaryingVectors: "+this.C+", maxVertexUniformsVectors: "+this.O+", maxFragmentUniformsVectors: "+this.u+", maxTextureUnits: "+this.o+", maxTextureSize: "+this.Ij+", maxCubemapSize: "+this.l};Js.prototype.upload=function(){var a=this.X,b=a.ca,c=this.Cb,d=this.Gh;if(!d&&(this.Gh=d=b.createProgram(),!d))throw za("Can't create program\n"+c.Jf+"\n"+c.Qe+"\n"),Error("Can't create program");var e=b.createShader(b.FRAGMENT_SHADER);
|
||
if(e){if(b.attachShader(d,e),b.shaderSource(e,c.Qe),b.compileShader(e),!b.getShaderParameter(e,b.COMPILE_STATUS))throw za(b.getShaderInfoLog(e),"\n",c.Jf,"\n",c.Qe,"\n"),b.detachShader(d,e),b.deleteShader(e),Error("Can't compile fragment shader");}else throw za("Can't create fragment shader\n"+c.Jf+"\n"+c.Qe+"\n"),Error("Can't create fragment shader");var f=b.createShader(b.VERTEX_SHADER);if(f){b.attachShader(d,f);b.shaderSource(f,c.Jf);b.compileShader(f);if(!b.getShaderParameter(f,b.COMPILE_STATUS))throw za(b.getShaderInfoLog(f)+
|
||
"\n"+c.Jf+"\n"+c.Qe+"\n"),b.detachShader(d,f),b.deleteShader(f),b.detachShader(d,e),b.deleteShader(e),Error("Can't compile vertex shader");b.linkProgram(d);if(!b.getProgramParameter(d,b.LINK_STATUS))throw za(b.getProgramInfoLog(d)+"\n"+c.Jf+"\n"+c.Qe+"\n"),b.detachShader(d,f),b.deleteShader(f),b.detachShader(d,e),b.deleteShader(e),Error("Can't link program");b.deleteShader(f);b.deleteShader(e)}else throw b.detachShader(d,e),b.deleteShader(e),za("Can't create vertex shader\n"+c.Jf+"\n"+c.Qe+"\n"),
|
||
Error("Can't create vertex shader");var g=b.getProgramParameter(d,b.ACTIVE_ATTRIBUTES),l=W(this.ug,0,0,a.Bk.Di),n=this.attributes={},r=this.tk=[];for(e=0;e<g;++e){f=b.getActiveAttrib(d,e);switch(f.type){case b.FLOAT:var w=1;break;case b.FLOAT_VEC2:w=2;break;case b.FLOAT_VEC3:w=3;break;case b.FLOAT_VEC4:w=4;break;default:throw Error("Type of attribute "+f.name+" is not supported.");}var y=b.getAttribLocation(d,f.name);l[y]=1;r[e]=n[f.name]=new MC(a,f.name,y,w)}b.useProgram(d);g=b.getProgramParameter(d,
|
||
b.ACTIVE_UNIFORMS);l=this.Al=[];n=this.Ja={};r=0;var A,H=0,I=0;for(e=0;e<g;++e){f=b.getActiveUniform(d,e);y=b.getUniformLocation(d,f.name);w=f.name;var O=w.lastIndexOf("[0]");-1!==O&&O===w.length-3&&(w=w.substring(0,O));if(y){switch(f.type){case b.FLOAT:1<f.size?A=new Ls(a,w,y):A=new Ks(a,w,y);break;case b.FLOAT_VEC2:1<f.size?A=new Ns(a,w,y):A=new Ms(a,w,y);break;case b.FLOAT_VEC3:1<f.size?A=new Ps(a,w,y):A=new Os(a,w,y);break;case b.FLOAT_VEC4:1<f.size?A=new Rs(a,w,y):A=new Qs(a,w,y);break;case b.FLOAT_MAT4:"bones"===
|
||
w?A=new Us(a,w,y):1<f.size?A=new Ts(a,w,y):A=new Ss(a,w,y);break;case b.SAMPLER_2D:A=new Vs(a,w,y,r++);break;default:throw Error("Type of uniform "+w+" is not supported.");}l.push(n[w]=A);f.type!==b.SAMPLER_2D&&(-1===c.Qe.indexOf(w+(1<f.size?"[":""))?H+=(f.type===b.FLOAT_MAT4?4:1)*f.size:I+=(f.type===b.FLOAT_MAT4?4:1)*f.size)}}this.version=c.version;(127<H||31<I)&&za("Program compiled with "+H+" vertex and "+I+" fragment vector uniforms\n"+c.Jf+"\n"+c.Qe);return this};Js.prototype.dispose=function(a){this.Gh&&
|
||
(a&&this.X.ca.deleteProgram(this.Gh),this.Gh=null,this.attributes={},this.tk=[],this.ug=[],this.Ja={},this.Al=[],this.version=-1);return this};MC.prototype.set=function(a){a.size=a.size||this.size;var b=this.X,c=this.location,d=b.Wh[c],e=a.eb,f=a.size,g=a.offset,l=a.stride;a=a.wi;JC(b,e);if(d.eb!==e||d.size!==f||d.offset!==g||d.stride!==l||d.wi!==a)b.ca.vertexAttribPointer(c,f,b.Eh[e.id].dataType,!1,l,g),d.wi!==a&&b.ANGLE_instanced_arrays.vertexAttribDivisorANGLE(c,a?1:0),d.eb=e,d.size=f,d.offset=
|
||
g,d.stride=l,d.wi=a;return this};ec.prototype.set=function(){return this};u(Ks,ec);Ks.prototype.set=function(a){this.value!==a&&(this.value=a,this.X.ca.uniform1f(this.location,a));return this};u(Ls,ec);Ls.prototype.set=function(a){this.X.ca.uniform1fv(this.location,a);return this};u(Ms,ec);Ms.prototype.set=function(a){var b=this.value;b.Ha(a)||(b.copy(a),this.X.ca.uniform2f(this.location,b.x,b.y));return this};u(Ns,ec);Ns.prototype.set=function(a){this.X.ca.uniform2fv(this.location,a);return this};
|
||
u(Os,ec);Os.prototype.set=function(a){var b=this.value;b.Ha(a)||(b.copy(a),this.X.ca.uniform3f(this.location,b.x,b.y,b.z));return this};u(Ps,ec);Ps.prototype.set=function(a){this.X.ca.uniform3fv(this.location,a);return this};u(Qs,ec);Qs.prototype.set=function(a){var b=this.value;b.Ha(a)||(b.copy(a),this.X.ca.uniform4f(this.location,b.x,b.y,b.z,b.w));return this};u(Rs,ec);Rs.prototype.set=function(a){this.X.ca.uniform4fv(this.location,a);return this};u(Ss,ec);Ss.prototype.set=function(a){var b=this.value;
|
||
b.Ha(a)||(b.copy(a),this.X.ca.uniformMatrix4fv(this.location,!1,b.elements));return this};u(Ts,ec);Ts.prototype.set=function(a){0<a.length&&this.X.ca.uniformMatrix4fv(this.location,!1,a);return this};u(Us,ec);Us.prototype.set=function(a){var b=this.X;(this.value!==a||this.frame!==b.frame)&&0<a.length&&(this.value=a,this.frame=b.frame,this.X.ca.uniformMatrix4fv(this.location,!1,a));return this};u(Vs,ec);Vs.prototype.set=function(a){var b=this.X,c=a.Ea;a=c.alpha;Wh(b,c,this.unit);a&&(c=this.X.Xh[this.g])&&
|
||
Wh(b,a,c.unit);return this};Es.prototype.upload=function(a){void 0===a&&(a=this.depth);var b=this.X,c=b.Yh[0],d=b.ca,e=this.Ea,f=this.Fh;if(!f&&(this.Fh=f=d.createFramebuffer(),!f))throw Error("Can't create framebuffer.");d.bindFramebuffer(d.FRAMEBUFFER,f);Wh(b,e);d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,b.Bh[e.id].Xg,0);Wh(b,c);(this.depth=a)?(a=this.g,a||(this.g=a=d.createRenderbuffer()),d.bindRenderbuffer(d.RENDERBUFFER,a),d.renderbufferStorage(d.RENDERBUFFER,d.DEPTH_COMPONENT16,
|
||
e.Sd,e.Qd),d.framebufferRenderbuffer(d.FRAMEBUFFER,d.DEPTH_ATTACHMENT,d.RENDERBUFFER,a)):this.g&&(d.deleteRenderbuffer(this.g),this.g=null);this.version=e.version};Es.prototype.dispose=function(a){this.Fh&&(a&&(a=this.X.ca,a.deleteFramebuffer(this.Fh),this.g&&a.deleteRenderbuffer(this.g)),this.g=this.Fh=null,this.version=-1);return this};Gs.prototype.upload=function(){var a=this.X,b=a.ca,c=this.Xg,d=this.Ea,e=a.Bk;if(!c&&(this.Xg=c=b.createTexture(),!c))throw Error("Can't create base texture.");b.bindTexture(b.TEXTURE_2D,
|
||
c);a=a.vc;c=d.image;if(d.Pc!==ol&&c!==Xf){var f=new cs(c,0,32);e=f[3];var g=f[4],l=Math.max(f[7],1),n=fI;switch(f[21]){case 827611204:n=Yv;break;case 894720068:n=Zv;break;case 808540228:case 541283397:case 826496069:n=$v;break;case 825438800:n=cw;break;case 843273296:case 825504336:n=dw;break;case 825439312:n=aw;break;case 876827728:case 825504848:n=bw}b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1);f=0;for(var r=128,w=void 0;f<l;++f){switch(n){case Yv:w=Math.floor((g+3)/4)*Math.floor((e+3)/4)*
|
||
8;break;case Zv:w=Math.floor((g+3)/4)*Math.floor((e+3)/4)*16;break;case $v:w=Math.floor((g+3)/4)*Math.floor((e+3)/4)*8;break;case cw:case dw:w=Math.max(g,16)*Math.max(e,8)/4;break;case aw:case bw:w=Math.max(g,8)*Math.max(e,8)/2}b.compressedTexImage2D(b.TEXTURE_2D,f,a[n],g,e,0,new Uint8Array(c,r,w));r+=w;g=Math.max(g/2,1);e=Math.max(e/2,1)}}else if(c){g=Math.floor(Math.min(e.Ij,Math.pow(2,Math.round(Math.log(c.width)/Math.LN2))));e=Math.floor(Math.min(e.Ij,Math.pow(2,Math.round(Math.log(c.height)/
|
||
Math.LN2))));if(g!==c.width||e!==c.height)l=document.createElement("canvas"),l.width=g,l.height=e,l.getContext("2d").drawImage(c,0,0,l.width,l.height),c=l;b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1);b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,d.flipY);b.pixelStorei(b.UNPACK_ALIGNMENT,4);b.texImage2D(b.TEXTURE_2D,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,c);d.wj&&b.generateMipmap(b.TEXTURE_2D)}else g=d.width,e=d.height,b.texImage2D(b.TEXTURE_2D,0,b.RGBA,g,e,0,b.RGBA,b.UNSIGNED_BYTE,null);b.texParameteri(b.TEXTURE_2D,
|
||
b.TEXTURE_WRAP_S,a[d.Vi]);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,a[d.Ih]);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,a[d.Fi]);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,a[d.rh]);this.version=d.version;return this};Gs.prototype.dispose=function(a){this.Xg&&(a&&this.X.ca.deleteTexture(this.Xg),this.Xg=null,this.version=-1);return this};Hs.prototype.upload=function(){var a=this.X,b=a.ca,c=this.ge,d=this.eb,e=d.Hf,f=e+d.ib,g=d.data,l=d.Oe;if(!c&&(this.ge=c=b.createBuffer(),!c))throw Error("Can't create vertex buffer.");
|
||
a.og!==d&&(b.bindBuffer(b.ARRAY_BUFFER,c),a.og=d);e!==f&&this.data===g&&this.Oe===l?b.bufferSubData(b.ARRAY_BUFFER,e*(g.BYTES_PER_ELEMENT||4),g.subarray(e,f)):(b.bufferData(b.ARRAY_BUFFER,g,l?b.DYNAMIC_DRAW:b.STATIC_DRAW),this.data=g,this.dataType=g instanceof Th?a.vc[Wp]:g instanceof YB?a.vc[Vv]:g instanceof cs?a.vc[Xv]:g instanceof ZB?a.vc[Wv]:a.vc[dI],this.Oe=l);d.Hf=d.ib=0;this.version=d.version;return this};Hs.prototype.dispose=function(a){this.ge&&(a&&this.X.ca.deleteBuffer(this.ge),this.data=
|
||
this.ge=null,this.version=-1);return this};Is.prototype.upload=function(){var a=this.X,b=a.ca,c=this.ge,d=this.Kb,e=d.Hf,f=e+d.ib,g=d.data,l=d.Oe;if(!c&&(this.ge=c=b.createBuffer(),!c))throw Error("Can't create index buffer.");a.Sf!==d&&(b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,c),a.Sf=d);e!==f&&this.data===g&&this.Oe===l?b.bufferSubData(b.ELEMENT_ARRAY_BUFFER,e,g.subarray(e,f)):(b.bufferData(b.ELEMENT_ARRAY_BUFFER,g,l?b.DYNAMIC_DRAW:b.STATIC_DRAW),this.data=g,this.dataType=g instanceof Uint16Array?a.vc[Wp]:
|
||
g instanceof Int16Array?a.vc[Vv]:g instanceof Uint32Array?a.vc[Xv]:g instanceof Int32Array?a.vc[Wv]:a.vc[Wp],this.Oe=l);d.Hf=d.ib=0;this.version=d.version;return this};Is.prototype.dispose=function(a){this.ge&&(a&&this.X.ca.deleteBuffer(this.ge),this.data=this.ge=null,this.version=-1);return this};Ws.prototype.ob=function(a,b,c){b.fe&&(b.U(),c.parent||c.U());var d=c.zf.elements;this.m=d[2];this.o=d[6];this.l=d[10];this.M=d[14];this.od=c.od;this.g=0;NC(this,b);b=this.j;d=this.g;ca(b,0,d-1,this.u);
|
||
for(var e,f,g,l=-1,n,r,w=-1,y=c.bf,A=c.Ui,H=c.zf,I=c.xg(this.C),O=a.viewport,S=-1,R,ja,ka,ea=-1,ma=0,pa,va,Ka,Aa,Fa,xa=0;xa<d;)if(e=b[xa],f=e.object,e.object=null,f.Oj)l=w=S=-1,e.pa=e.Ze=e.Za=null,f.Oj(a,c),++xa;else{g=e.pa;e.pa=null;n=e.Ze;e.Ze=null;l!==n.id&&(l=n.id,r=n.Sa||Xp,r.enabled?(ei(a,!0),Bs(a,r.Kk,r.Lk),Cs(a,r.src,r.Hk,r.ql,r.Ik)):ei(a,!1),n.Qc?(a.Kd(!0),a.il(n.depthFunc)):a.Kd(!1),fi(a,n.Vf),n.nj?di(a,!0,!0,!0,!0):di(a,!1,!1,!1,!1),a.tb(n.cullFace),a.td(n.$e,n.af),r=a,R=n.lineWidth,r.lineWidth!==
|
||
R&&(r.lineWidth=R,r.ca.lineWidth(R)),r=n.Cb,w!==r.id&&(w=r.id,a.cb(r),a.Ya("projectionMatrix",y),a.Ya("viewMatrix",A),a.Ya("projectionViewMatrix",H),a.Ya("cameraPosition",I),a.Ya("viewport",O),S=-1),pf(a,g.Ja));R=e.Za;e.Za=null;ja=R.attributes;r=R.Kb;S!==R.id&&(S=R.id,a.Jd(ja),r&&Bj(a,r),ka=R.bh);if(0<ka&&0<g.we){-1===ea&&(ea=Math.min(ka,g.we));g=R.vk;ja=f.Ja;for(va in ja)switch(pa=ja[va],Ka=pa.size||1,f=g[va]||(g[va]=[]),R=ma*Ka,Ka){case 16:Ka=0;for(pa=pa.elements;16>Ka;++Ka)f[R++]=pa[Ka];break;
|
||
case 4:f[R++]=pa.x;f[R++]=pa.y;f[R++]=pa.z;f[R++]=pa.w;break;case 3:f[R++]=pa.x;f[R++]=pa.y;f[R++]=pa.z;break;case 2:f[R++]=pa.x;f[R++]=pa.y;break;case 1:f[R++]=pa}++ma;if(++xa<d&&(e=b[xa])&&e.bc===l&&e.Ec===S&&ma<ea)continue;else Aa=ma*r.data.length/ka,ea=-1,ma=0,pf(a,g)}else{r?Aa=0>r.sg?r.data.length:r.sg:Aa=(Fa=ja.position)?Fa.eb.data.length/(Fa.stride>>2||3):0;++xa;if(0===Aa)continue;pf(a,f.Ja)}r?Qg(a,n.fg,!0,r.Fk,Aa):Qg(a,n.fg,!1,0,Aa)}};Ws.prototype.u=function(a,b){return a.qc!==b.qc?a.qc-b.qc:
|
||
a.qc<iI?a.bc!==b.bc?a.bc-b.bc:a.Ec!==b.Ec?a.Ec-b.Ec:a.z-b.z:a.z!==b.z?b.z-a.z:a.bc-b.bc};u(gi,Cc);p=gi.prototype;p.start=function(){var a=this;try{if(-1===this.j){window.addEventListener("pagehide",this.g);window.addEventListener("pageshow",this.g);window.addEventListener("blur",this.g);window.addEventListener("focus",this.g);Rp&&window.addEventListener(Rp,this.g);Up&&document.addEventListener(Up,this.u);this.j=OC.call(window,this.C);this.A(mf);var b=this.rl;this.rl=[];Promise.all(b).then(function(){a.A(TH)})}}catch(c){this.error(c)}};
|
||
p.stop=function(){try{-1!==this.j&&(window.removeEventListener("pagehide",this.g),window.removeEventListener("pageshow",this.g),window.removeEventListener("blur",this.g),window.removeEventListener("focus",this.g),Rp&&window.removeEventListener(Rp,this.g),Up&&document.removeEventListener(Up,this.u),jP.call(window,this.j),this.j=-1,this.A(Yh))}catch(a){}};p.update=function(a){this.screen.update(a)};p.ob=function(){this.screen.ob()};p.error=function(a){-1!==this.j&&(this.stop(),this.A(jI,a))};Db.Object.defineProperties(gi.prototype,
|
||
{Ub:{configurable:!0,enumerable:!0,get:function(){return this.m},set:function(a){this.m=a}}});var jI=qa++,tj=qa++,uj=qa++,PC=qa++,mf=qa++,Yh=qa++,TH=qa++,Xs=qa++;u(Sg,Cc);p=Sg.prototype;p.init=function(){var a=this,b=this.app,c=b.da;++c.count;var d=null;return Promise.all([new Promise(function(e){switch(a.va){case sc:e();break;default:e(Qb(a.yc+"/backend/ping.php","POST",{},10).then(function(f){f=JSON.parse(f);a.timestamp=m("god_timestamp",f.t||a.timestamp);a.country=m("god_country",f.c||a.country)}).catch(function(f){za(f)}))}}),
|
||
(new Promise(function(e){switch(a.va){case rd:e();break;case nc:e($K(a));break;case sc:e(dL(a));break;default:e(TK(a))}})).then(function(e){return e&&e.vf().then(function(f){f=f||{};var g=0===Object.keys(f).length;if(e.Xd()&&g&&!b.storage.has(e.pd())&&e.tf())return e.logout(!0);if(g||e.ma("v")===f.v||h("god_save"))f=e.getData();e.setData(f);d=e},function(f){f&&za(f);if(e.Xd()&&!b.storage.has(e.pd())&&e.tf())return e.logout(!0);e.Ni=Promise.resolve();d=e})})]).then(function(){Nn(a,d||TC(a));if(m("god_error",
|
||
!1))throw Error("Unknown test error");switch(a.va){case rd:case sc:break;case nc:Sn(a,"reward");Sn(a,"interstitial");break;case Re:eD(a,"ca-pub-6129580795478709","8909832984","180s");break;default:eD(a,"ca-pub-3895043508998948",null),YK(a)}bt(a);return new Promise(function(e){switch(a.va){case Re:window.idAsyncInit=function(){ID.Event.subscribe("id.init",function(){za("Y8 SDK inited for app "+a.l)});ID.init({appId:a.l});e()};b.scripts.get("https:"==document.location.protocol?"https://cdn.y8.com/api/sdk.js":
|
||
"http://cdn.y8.com/api/sdk.js");break;default:e()}})}).then(function(){--c.count})};p.Wj=function(a){void 0!==a&&za(a);return Promise.resolve()};p.Ef=function(){};p.$f=function(){window.focus()};p.process=function(a,b){var c=this;b=void 0===b?Fj:b;"function"===typeof b&&(b=b()||Fj);this.Ef(b);return a().catch(function(d){return c.Wj(d).then(function(){return!1})}).then(function(d){c.$f();return d})};p.Mk=function(){switch(this.va){case sc:this.ec.dispatchEvent(this.ec.EVENTS.EXIT)}};p.ol=function(){return Promise.reject("Terms consent is not implemented")};
|
||
p.Dm=function(){return Promise.resolve(!1)};p.Xj=function(a){a();window.location.reload();return new Promise(function(){})};p.Xd=function(){return this.B.Xd()};p.login=function(){var a=this;return this.process(function(){var b=a.app.storage,c=null,d=null,e=!1,f=++a.zi;return(new Promise(function(g,l){switch(a.va){case nc:case rd:l("Login is not implemented");break;case sc:g(eL(a));break;default:g(ZK(a))}})).then(function(g){c=g;if(f!==a.zi)return Promise.reject();a.Ef(Ug);return c.vf().then(function(l){var n=
|
||
l||{};if((l=0===Object.keys(n).length)&&!b.has(c.pd()))return a.Dm(!c.tf()).then(function(r){r?(e=!0,d=n):d=a.B.getData()});e=!0;d=l||c.ma("v")===n.v?c.getData():n})}).catch(function(g){return(c&&c.tf()?c.logout(!0):Promise.resolve()).then(function(){return Promise.reject(g)})}).then(function(){c.setData(d);if(e)return a.Xj(function(){Nn(a,c);return!0},c);Nn(a,c);return!0},function(g){if(g)throw g;return!1})},Ug)};p.tf=function(){return this.B.tf()};p.logout=function(){return this.B.logout()};p.Pb=
|
||
function(){};p.Ag=function(){return this.B.Ag()};p.qf=function(){return this.B.qf()};p.Zf=function(){return this.B.Zf()};p.request=function(a,b){var c=this;Array.isArray(b)||(b=[b]);return this.process(function(){switch(c.va){case nc:return aL(a,b);default:return Promise.reject("Request is not implemented")}})};p.bg=function(){return this.B.bg()};p.rf=function(){return this.B.rf()};p.Ee=function(){return this.B.Ee()};p.yi=function(){return this.B.yi()};p.hh=function(){return this.B.hh()};p.nf=function(){return this.B.nf()};
|
||
p.zg=function(){return this.B.zg()};p.rg=function(){return this.B.rg()};p.Vd=function(){return this.B.Vd()};p.Em=function(){return Promise.reject("Follow is not implemented")};p.fh=function(){var a=this;return this.process(function(){switch(a.va){case nc:return bL();case sc:return fL(a);case hi:return VK(a);default:return Promise.reject("Add to homescreen is not implemented")}}).then(function(b){bt(a);return b})};p.Fm=function(){return Promise.reject("Share message is not implemented")};p.share=function(a,
|
||
b,c,d){var e=this;return this.process(function(){switch(e.va){case nc:return gD(e,a,b,d);case hi:return WK(e,a,b,c,d);default:return Promise.reject("Share is not implemented")}})};p.adBreak=function(a){var b=this;a=void 0===a?{}:a;var c=a.type||"browse",d={type:c};if("reward"===c){var e=this.j;e&&(this.j=null,e.adBreakDone({breakStatus:"ignored"}));d.beforeReward=function(n){a.Ul&&a.Ul(n)};d.adViewed=function(){a.Sl&&a.Sl()};d.adDismissed=function(){a.Rl&&a.Rl()}}var f=a.name;void 0!==f&&(d.name=
|
||
f);var g=1,l=this.app;d.beforeAd=function(){g=b.app.audio.Dg;l.audio.Dg=0;l.input.cancel();a.zn&&a.zn()};d.afterAd=function(){0!==g&&(l.audio.Dg=g);a.yn&&a.yn()};d.adBreakDone=function(n){n=void 0===n?{}:n;n={breakType:n.breakType||c,fp:n.breakName||f,ep:n.breakFormat||("reward"===c?"reward":"interstitial"),Xl:n.breakStatus||"other"};"reward"!==c&&"viewed"===n.Xl&&(b.Z=Cj(b));"reward"===c&&(b.j=null);window.focus();a.qk&&a.qk(n)};switch(this.va){case rd:d.adBreakDone({breakStatus:"notReady"});break;
|
||
case nc:cL(this,d);break;case sc:gL(this,d);break;case Re:this.D?window.adBreak(d):d.adBreakDone({breakStatus:"notReady"});break;default:XK(this,d)}};p.purchase=function(a){var b=this;return this.process(function(){var c=b.B;return c.purchase(a).then(function(d){c.A(lQ,d)})},Ug)};p.oh=function(){a:switch(this.va){case rd:case Re:case nc:var a=!1;break a;default:a=!1}return a&&this.B.oh()};p.Sj=function(){var a=this;return this.process(function(){return a.B.Sj()},Ug)};p.dm=function(a,b){var c=[];a&&
|
||
c.push("t="+a);b&&c.push("i="+b);return this.P+(0<c.length?"?":"")+c.join("&")};u(it,Error);u(Ys,Error);u(jt,Error);u(Tn,Error);u(kt,Error);var qf=qa++,MK="",hi="web",rd="telecoming",Re="y8",nc="vkontakte",sc="yandex",dt="facebook";u(il,Cc);p=il.prototype;p.dispose=function(){this.M=null;this.app.off(Xs,this.H)};p.has=function(a){return void 0!==this.cache[a]};p.remove=function(a){var b=this.cache;void 0!==b[a]&&(delete b[a],ml(this,a));return this};p.nh=function(a,b){a=this.cache[a];return void 0===
|
||
a?b:0!==a};p.vh=function(a,b){b=b?1:0;var c=this.cache;b!==c[a]&&(c[a]=b,ml(this,a))};p.Aa=function(a,b){a=this.cache[a];return void 0===a?b:a};p.kc=function(a,b){var c=this.cache;c[a]!==b&&(c[a]=b,ml(this,a))};p.ye=function(a,b,c){b=void 0===b?1:b;this.kc(a,this.Aa(a,void 0===c?0:c)+b)};p.ma=function(a,b){a=this.cache[a];return void 0===a?b:a};p.rc=function(a,b){var c=this.cache;c[a]!==b&&(c[a]=b,ml(this,a))};p.getData=function(){return mc({},this.cache)};p.setData=function(a){this.cache=a;ml(this);
|
||
return this};p.pd=function(){return""};p.xj=function(){return""};p.Xd=function(){return!1};p.tf=function(){return!1};p.logout=function(){return Promise.reject("Logout is not implemented")};p.vf=function(){UC(this);return Promise.resolve()};p.Yi=function(){return Promise.resolve()};p.Hj=function(){this.A(tm,void 0)};p.Bg=function(){mt(this)};p.Ag=function(){return!1};p.qf=function(){return Promise.resolve(!1)};p.Zf=function(){return Promise.reject("Grant friends permission is not implemented")};p.bg=
|
||
function(){return!1};p.rf=function(){return Promise.resolve(!1)};p.Ee=function(){return Promise.reject("Subscribe notifications is not implemented")};p.th=function(){return Promise.resolve()};p.ym=function(a){this.th("back",this.app.locale.ma(a))};p.yi=function(){return!1};p.hh=function(){return Promise.resolve(!1)};p.nf=function(){return Promise.reject("Add to favorites is not implemented")};p.zg=function(){return!1};p.rg=function(){return Promise.resolve(!1)};p.Vd=function(){return Promise.reject("Follow is not implemented")};
|
||
p.purchase=function(){return Promise.reject("Purchase is not implemented")};p.oh=function(){return!1};p.Sj=function(){return Promise.reject("Restore purchases is not implemented")};var VC=qa++,tm=qa++,Un=qa++,kl=qa++,On=qa++,mQ=qa++,lQ=qa++;u(jl,il);p=jl.prototype;p.bg=function(){return this.g=bD()};p.rf=function(){var a=this.app.platform,b=bD();this.g&&!b&&(aD(a),ct(a));return Promise.resolve(this.g=b)};p.Ee=function(){var a=this;return this.app.platform.process(function(){return new Promise(function(b,
|
||
c){window.Notification.requestPermission().then(function(d){switch(d){case "granted":b(!0);break;case "denied":c(new it);break;default:b(!1)}},function(d){c(d)})})}).then(function(b){a.rf();return b})};p.th=function(a,b,c){c=void 0===c?0:c;var d=this.app,e=d.storage,f=e.ma("firebaseMessagingToken");d=d.platform;return et()&&d.ji&&f&&e.ma("firebaseMessagingTokenOwner")===this.pd()?Qb(d.yc+"/backend/"+d.Re,"POST",{action:"notification",id:a,body:b,countdown:c,app:d.ji,token:f}).catch(function(g){za(g)}):
|
||
Promise.resolve()};p.vm=function(){return Promise.resolve()};p.zg=function(){var a=this.app.platform;switch(a.va){case Re:return!1;default:return RC(a)}};p.rg=function(){return Promise.resolve(!0)};p.Vd=function(){return this.app.platform.Em()};p.purchase=function(a){var b=this,c=this.app,d=c.platform,e={action:"purchase",app:d.Rk,pid:a,cur:null.Ll()};return(new Promise(function(f,g){var l=c.storage.ma("email_token","");l?(e.token=l,f()):setTimeout(function(){var n=prompt(c.locale.ma("Please enter your email (will be used only for purchasing)"));
|
||
Vn(n)?e.email=n:n?g(new Tn):g();f()},100)})).then(function(){return Qb(d.yc+"/backend/"+d.Re,"POST",e)}).then(function(f){f=JSON.parse(f);var g=f.token;g&&c.storage.rc("email_token",g);f=f.pid;za("PURCHASE ID: "+f);return hD(b,f)})};p.oh=function(){return!0};p.Sj=function(){var a=this,b=this.app,c=b.platform,d=b.locale;return(new Promise(function(e,f){setTimeout(function(){var g=prompt(d.ma("Please enter your email"));Vn(g)?e(g):g?f(new Tn):f()},100)})).then(function(e){return Qb(c.yc+"/backend/"+
|
||
c.Re,"POST",{action:"restore",app:c.Rk,email:e})}).then(function(e){var f=prompt(d.ma("Please check your email and enter a code you received"));return f?Qb(c.yc+"/backend/"+c.Re,"POST",{action:"purchases",token:e,code:f}):Promise.reject()}).then(function(e){e=JSON.parse(e);var f=e.token;if(void 0===f)throw new kt;f?a.app.storage.rc("email_token",f):a.app.storage.remove("email_token");if(e=e.list){f=[];for(var g=0;g<e.length;++g)f.push(new lt(e[g]));a.A(mQ,f)}})};u(Yc,jl);Yc.prototype.Yi=function(a){var b=
|
||
{action:"save"};a=(b.data=JSON.stringify(a))+this.xj();var c=this.app.platform,d=c.Pb();void 0!==d&&(b.bestscore=d,a+=d.toString());b.h=q(a);return nl(this,c.yc+"/backend/"+c.Re,b)};Yc.prototype.Xd=function(){return!0};Yc.prototype.th=function(a,b,c){var d=this.app.platform;return nl(this,d.yc+"/backend/"+d.Re,{action:"notification",id:a,body:b,countdown:void 0===c?0:c}).catch(function(e){za(e)})};Yc.prototype.vm=function(a){var b=this.app.platform;return nl(this,b.yc+"/backend/"+b.Re,{token:a,action:"subscribe"})};
|
||
u(gt,Yc);p=gt.prototype;p.pd=function(){return dt+"."+this.O};p.xj=function(){return this.O};p.tf=function(){return!0};p.logout=function(a){function b(){return(new Promise(function(d,e){FB.logout(function(f){(f=f.error)?e(f):d(!0)})})).catch(function(d){za(d);return!1}).then(function(d){c.A(VC);return d})}var c=this;return(void 0===a?0:a)?b():this.app.platform.process(b,Ug)};p.vf=function(){Yc.prototype.vf.call(this);return this.o?Wn(this,{app:this.appId,token:this.o}):Promise.reject("No access token for load")};
|
||
p.Hj=function(){var a=this;if(window.FB)FB.api("/me","GET",{fields:"picture.width(128).height(128)",locale:this.app.locale.ma("en_US")},function(b){var c=b.error;c&&za(c);a.A(tm,b.picture&&b.picture.data&&b.picture.data.url)});else return Yc.prototype.Hj.call(this)};p.Bg=function(a){var b=this;a=void 0===a?30:a;if(!window.FB)return Yc.prototype.Bg.call(this,a);void 0===this.l||this.C||(this.C=!0,FB.api(this.l||"/me/friends","GET",{locale:this.app.locale.ma("en_US"),limit:a,fields:"id,first_name,picture.width(128).height(128)"},
|
||
function(c){var d=[],e=c.error;if(e)za(e),b.l=void 0;else{e=c.data||[];for(var f=Math.min(e.length,a),g=0;g<f;++g,--a){var l=e[g],n=l.picture;d.push({id:l.id,name:l.first_name,yd:n&&n.data&&n.data.url})}(c=c.paging)&&(c=c.next);b.l=c}mt(b,d).then(function(){b.C=!1})}))};p.Ag=function(){return this.u};p.qf=function(){var a=this;return iD("user_friends").then(function(b){a.u&&b&&(a.l=null,a.A(kl));return a.u=!b},function(b){za(b);return a.u})};p.Zf=function(){var a=this;return this.app.platform.process(function(){return jD(a,
|
||
"user_friends")}).then(function(b){a.qf();return b})};p.purchase=function(a){var b=this,c=this.app,d=c.storage.ma("email_token",""),e=c.platform;return iD("email").then(function(f){if(!f&&!d)return jD(b,"email").then(function(){b.email=null})}).then(function(){return iL(b)}).then(function(){return Vn(b.email)?nl(b,e.yc+"/backend/"+e.Re,{action:"purchase",pid:a,cur:null.Ll(),accessToken:b.o}).then(function(f){f=JSON.parse(f).pid;za("PURCHASE ID: "+f);return hD(b,f)}):Yc.prototype.purchase.call(b,a)})};
|
||
p.oh=function(){return!Vn(this.email)};u(ht,Yc);p=ht.prototype;p.pd=function(){return"uid."+this.O};p.xj=function(){return this.O};p.vf=function(){Yc.prototype.vf.call(this);var a=this.app,b=a.ai;if(void 0===b.sign_keys){var c=[];for(d in b)0===d.indexOf("vk_")&&c.push(d);c.sort(function(g,l){return g.localeCompare(l)});for(var d="",e=0;e<c.length;++e){var f=c[e];d+=f+"="+encodeURIComponent(b[f])+"&"}0<d.length&&(d=d.substring(0,d.length-1));return Wn(this,{app:a.platform.Wg,sign:b.sign,query:d})}c=
|
||
"";d=b.sign_keys.split(",");for(e=0;e<d.length;++e)f=d[e],c+=f+"="+encodeURIComponent(b[f])+"&";0<d.length&&(c=c.substring(0,c.length-1));return Wn(this,{app:a.platform.Wg,sign:b.sign,query:c,token:b.access_token})};p.Hj=function(){var a=this;Xc.default.send("VKWebAppGetUserInfo",{}).then(function(b){return b.photo_200}).catch(function(b){za(b)}).then(function(b){a.A(tm,b)})};p.Bg=function(a){var b=this;a=void 0===a?30:a;this.l||this.nd&&!(0<this.nd.length)||(this.l=!0,(this.nd?Promise.resolve():
|
||
kD(this).then(function(c){return Xc.default.send("VKWebAppCallAPIMethod",{method:"friends.getAppUsers",params:{access_token:c,v:kI}})}).then(function(c){b.nd=c&&c.response||[]},function(c){b.nd=[];za(c)})).then(function(){var c=b.nd.splice(0,a),d=[];(0===c.length?Promise.resolve():kD(b).then(function(e){return Xc.default.send("VKWebAppCallAPIMethod",{method:"users.get",params:{access_token:e,v:kI,fields:"first_name,photo_200",user_ids:c.join(",")}})}).then(function(e){e=e&&e.response||[];for(var f=
|
||
0;f<e.length;++f){var g=e[f];d.push({id:g.id,name:g.first_name,yd:g.photo_200})}},function(e){za(e)})).then(function(){mt(b,d).then(function(){b.l=!1})})}))};p.Ag=function(){return this.o};p.qf=function(){var a=this;return nt("friends").then(function(b){a.o&&b&&(a.nd=null,a.A(kl));return a.o=!b},function(b){za(b);return a.o})};p.Zf=function(){var a=this;return this.app.platform.process(function(){return Xc.default.send("VKWebAppGetAuthToken",{app_id:a.app.platform.Wg,scope:"friends"}).then(function(b){return-1!==
|
||
b.scope.indexOf("friends")},function(b){if(b&&"client_error"===b.error_type)return!1;throw b;})}).then(function(b){a.qf();return b})};p.bg=function(){return this.g};p.rf=function(){var a=this;return nt("notify").then(function(b){return a.g=!b},function(b){za(b);return a.g})};p.Ee=function(){var a=this;return this.app.platform.process(function(){return Xc.default.send("VKWebAppAllowNotifications",{}).then(function(b){(b=b.result)&&a.A(On);return b},function(b){if(b&&"client_error"===b.error_type)return!1;
|
||
throw b;})}).then(function(b){a.rf();return b})};p.ym=function(){Promise.resolve()};p.yi=function(){return this.u};p.hh=function(){var a=this;return nt("menu").then(function(b){return a.u=!b},function(b){za(b);return a.u})};p.nf=function(){var a=this;return this.app.platform.process(function(){return Xc.default.send("VKWebAppAddToFavorites",{}).then(function(b){return b.result},function(b){if(b&&"client_error"===b.error_type)return!1;throw b;})}).then(function(b){a.hh();return b})};p.zg=function(){return this.C};
|
||
p.rg=function(){var a=this;return Xc.default.send("VKWebAppGetGroupInfo",{group_id:this.app.platform.Om}).then(function(b){return a.C=b.id&&0===b.is_member}).catch(function(b){za(b);return a.C})};p.Vd=function(){var a=this;return this.app.platform.process(function(){return Xc.default.send("VKWebAppJoinGroup",{group_id:a.app.platform.Om}).then(function(b){return b.result},function(b){b&&"client_error"===b.error_type||(za(b),ue(a.app.platform,"https://vk.com/gemioli"));return!1})}).then(function(b){a.rg();
|
||
return b})};var kI="5.131";u(ll,Yc);p=ll.prototype;p.pd=function(){var a=this.B;return"lite"===a.getMode()?Yc.prototype.pd.call(this):"ya."+a.getUniqueID()};p.xj=function(){return this.B.getUniqueID()};p.Xd=function(){return"lite"!==this.B.getMode()};p.bg=function(){return!1};p.th=function(){return Promise.resolve()};p.zg=function(){return!1};p.vf=function(){Yc.prototype.vf.call(this);return this.Xd()&&this.app.platform.Jh.signed?Wn(this,{app:this.app.platform.ec.environment.app.id,token:this.B.signature}):
|
||
this.B.getData()};p.Yi=function(a){return this.Xd()&&this.app.platform.Jh.signed?Yc.prototype.Yi.call(this,a):this.B.setData(a,!0)};p.purchase=function(a){var b=this.app.platform.eo;return b?b.purchase({id:a}).then(function(c){return new lt(c.productID)}):Promise.reject("Yandex Payments not enabled")};p.oh=function(){return!1};u(ve,Cc);var rk=qa;ve.prototype.Lb=function(){};ve.prototype.pc=function(){};ve.prototype.dispose=function(){};var lD=1,uu=qa++,mD=[],Xp=new Xn("disabled",!1),Dc=new Xn("normal",
|
||
!0,Uv,xm,of,wm,xm,of),ph=new Xn("additive",!0,Uv,wm,of,wm,wm,of);u(sd,Cc);sd.prototype.dispose=function(){this.A(hI,this)};sd.prototype.upload=function(){this.version=(this.version+1)%2147483647;return this};var jL=0,hI=qa++,nD=new sd("void main() {\n gl_Position = vec4(0.0, 0.0, 0.0, 1.0);\n}","void main() {\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n}");u(rf,Cc);rf.prototype.dispose=function(){var a=this.g;a&&a.dispose();this.A(Fs,this)};rf.prototype.Oi=function(a){this.Ih=a};rf.prototype.ll=
|
||
function(a){this.rh=a;return this};rf.prototype.upload=function(){this.version=(this.version+1)%2147483647;return this};Db.Object.defineProperties(rf.prototype,{width:{configurable:!0,enumerable:!0,get:function(){return this.Sd}},height:{configurable:!0,enumerable:!0,get:function(){return this.Qd}},image:{configurable:!0,enumerable:!0,get:function(){return this.o},set:function(a){a=a||Xf;this.o!==a&&(this.o=a,this.upload(),this.Sd=a.width,this.Qd=a.height)}},wj:{configurable:!0,enumerable:!0,get:function(){return this.m},
|
||
set:function(a){a=!!a;this.m!==a&&(this.m=a,this.upload(),this.g&&(this.g.wj=a))}},flipY:{configurable:!0,enumerable:!0,get:function(){return this.j},set:function(a){a=!!a;this.j!==a&&(this.j=a,this.upload(),this.g&&(this.g.flipY=a))}},Vi:{configurable:!0,enumerable:!0,get:function(){return this.C},set:function(a){this.C!==a&&(this.C=a,this.upload(),this.g&&(this.g.Vi=a))}},Ih:{configurable:!0,enumerable:!0,get:function(){return this.O},set:function(a){this.O!==a&&(this.O=a,this.upload(),this.g&&
|
||
(this.g.Ih=a))}},Fi:{configurable:!0,enumerable:!0,get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,this.upload(),this.g&&(this.g.Fi=a))}},rh:{configurable:!0,enumerable:!0,get:function(){return this.l},set:function(a){this.l!==a&&(this.l=a,this.upload(),this.g&&(this.g.rh=a))}},alpha:{configurable:!0,enumerable:!0,get:function(){return this.g},set:function(a){this.g!==a&&(this.g=a)&&(a.wj=this.wj,a.flipY=this.flipY,a.Vi=this.Vi,a.Ih=this.Ih,a.Fi=this.Fi,a.rh=this.rh)}}});var kL=
|
||
0,Fs=qa++,EK="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";if("undefined"!==typeof document){var Xf=document.createElement("canvas");Xf.width=Xf.height=2;var lI=Xf.getContext("2d");lI.fillStyle="#ffffff";lI.fillRect(0,0,2,2)}else Xf={width:2,height:2};var gI=new rf;u(Qd,Cc);Qd.prototype.dispose=function(){this.A(KC,this)};Qd.prototype.resize=function(a){var b=this.data;a=new b.constructor(a);a.set(b,0);this.data=a;this.upload();return this};Qd.prototype.upload=function(a,b){a=void 0===
|
||
a?this.ib:a;b=void 0===b?this.Hf:b;this.ib=a;this.Hf=b;this.version=(this.version+1)%2147483647;return this};Qd.prototype.clone=function(){var a=this.data,b=new a.constructor(a.length);b.set(a,0);return new Qd(b,this.Oe)};var lL=0,KC=qa++;Yb.prototype.dispose=function(){this.eb.dispose()};Yb.prototype.upload=function(a,b){this.eb.upload(a,b);return this};Db.Object.defineProperties(Yb.prototype,{count:{configurable:!0,enumerable:!0,get:function(){return this.eb.data.length/(0===this.stride?this.size:
|
||
this.stride/4)}}});u(de,Cc);de.prototype.dispose=function(){this.A(LC,this)};de.prototype.upload=function(a,b){a=void 0===a?this.ib:a;b=void 0===b?this.Hf:b;this.ib=a;this.Hf=b;this.version=(this.version+1)%2147483647;return this};var mL=0,LC=qa++;u(Dd,Cc);Dd.prototype.dispose=function(){var a=this.attributes,b;for(b in a)a[b].dispose();this.Kb&&this.Kb.dispose()};var nL=0;new Dd;var oL=0;p=we.prototype;p.Da=function(a){this.qc=a;return this};p.Ya=function(a,b){this.Ja[a]=b;return this};p.Ld=function(a){return sD(this,
|
||
"diffuseMap",a)};p.define=function(a,b){b=void 0===b?"":b;this.Uf[a]!==b&&(this.Uf[a]=b,this.cg());return this};p.wn=function(a,b){return a>b?1:a<b?-1:0};p.cg=function(){var a=this.Uf,b="",c=Object.keys(a);c.sort(this.wn);for(var d=0,e=c.length,f;d<e;++d)f=c[d],b+="#define "+f+" "+a[f].toString()+"\n";tD(b,this.hb);tD(b,this.ig)};var uD={},pL=0,CL=new we,Vg=2E3,iI=3E3;Zc.prototype.kh=function(a,b){a.x=a.y=0;a.rotation.ea(0);b&&(a.Wb.ea(1),a.Xb.ea(0))};Zc.prototype.tg=function(a,b){a.x=a.y=a.z=0;a.rotation.ea(0);
|
||
b&&(a.Wb.ea(1),a.Xb.ea(0),a.Nd.ea(0))};Zc.prototype.load=function(a){this.g=$a(a.randomDirection,this.g)};Zc.prototype.save=function(a){a.randomDirection=this.g?1:0};var Li={"default":Zc};u(tf,Zc);tf.prototype.kh=function(a,b){var c=Math.random()*le,d=Math.cos(c),e=Math.sin(c),f=this.j?this.radius:Math.random()*this.radius;a.x=d*f;a.y=e*f;a.rotation.ea(c);b&&(this.g&&(c=Math.random()*le,d=Math.cos(c),e=Math.sin(c)),a.Wb.ea(d),a.Xb.ea(e))};tf.prototype.tg=function(a,b){var c=Math.random()*le,d=Math.cos(c),
|
||
e=Math.sin(c),f=this.j?this.radius:Math.random()*this.radius;a.rotation.ea(c);a.x=d*f;a.y=e*f;a.z=0;b&&(this.g&&(c=Math.random()*le,d=Math.cos(c),e=Math.sin(c)),a.Wb.ea(d),a.Xb.ea(e),a.Nd.ea(0))};tf.prototype.load=function(a){Zc.prototype.load.call(this,a);this.radius=Ma(a.radius,this.radius);this.j=$a(a.shell,this.j)};tf.prototype.save=function(a){Zc.prototype.save.call(this,a);a.radius=this.radius;a.shell=this.j?1:0};Li.circle=tf;u(Gj,Zc);Gj.prototype.kh=function(a,b){var c=.5*this.width,d=.5*this.height,
|
||
e=(2*Math.random()-1)*c,f=(2*Math.random()-1)*d;this.j&&(c=Math.min(c/Math.abs(e),d/Math.abs(f)),e*=c,f*=c);a.x=e;a.y=f;a.rotation.ea(Math.atan2(f,e));b&&(this.g&&(b=Math.random()*le,e=Math.cos(b),f=Math.sin(b)),a.Wb.ea(e),a.Xb.ea(f))};Gj.prototype.tg=function(a,b){var c=.5*this.width,d=.5*this.height,e=.5*this.length,f=(2*Math.random()-1)*c,g=(2*Math.random()-1)*d,l=(2*Math.random()-1)*e;this.j&&(c=Math.min(c/Math.abs(f),d/Math.abs(g),e/Math.abs(l)),f*=c,g*=c,l*=c);a.x=f;a.y=g;a.z=l;a.rotation.ea(Math.atan2(g,
|
||
f));b&&(this.g&&(g=Math.random()*le,b=Math.acos(2*Math.random()-1)-Ki,l=Math.cos(b),f=Math.cos(g)*l,g=Math.sin(g)*l,l=Math.sin(b)),a.Wb.ea(f),a.Xb.ea(g),a.Nd.ea(l))};Gj.prototype.load=function(a){Zc.prototype.load.call(this,a);this.width=Ma(a.width,this.width);this.height=Ma(a.height,this.height);this.length=Ma(a.length,this.length);this.j=$a(a.shell,this.j)};Gj.prototype.save=function(a){Zc.prototype.save.call(this,a);a.width=this.width;a.height=this.height;a.length=this.length;a.shell=this.j?1:
|
||
0};Li.box=Gj;u(Hj,Zc);Hj.prototype.kh=function(a,b){var c=sb(this.start,this.end,Math.random())*cg,d=Math.cos(c),e=Math.sin(c),f=this.j?this.radius:Math.random()*this.radius;a.rotation.ea(c);a.x=d*f;a.y=e*f;b&&(this.g&&(c=Math.random()*le,d=Math.cos(c),e=Math.sin(c)),a.Wb.ea(d),a.Xb.ea(e))};Hj.prototype.tg=function(a,b){var c=sb(this.start,this.end,Math.random())*cg,d=Math.cos(c),e=Math.sin(c),f=this.j?this.radius:Math.random()*this.radius;a.rotation.ea(c);a.x=d*f;a.y=e*f;a.z=0;b&&(this.g&&(c=Math.random()*
|
||
le,d=Math.cos(c),e=Math.sin(c)),a.Wb.ea(d),a.Xb.ea(e),a.Nd.ea(0))};Hj.prototype.load=function(a){Zc.prototype.load.call(this,a);this.radius=Ma(a.radius,this.radius);this.start=Ma(a.start,this.start);this.end=Ma(a.end,this.end);this.j=$a(a.shell,this.j)};Hj.prototype.save=function(a){Zc.prototype.save.call(this,a);a.radius=this.radius;a.start=this.start;a.end=this.end;a.shell=this.j?1:0};Li.sector=Hj;u(ql,tf);ql.prototype.tg=function(a,b){var c=Math.random()*le,d=Math.acos(2*Math.random()-1)-Ki,e=
|
||
Math.cos(d),f=Math.cos(c)*e;e*=Math.sin(c);d=Math.sin(d);var g=this.j?this.radius:Math.random()*this.radius;a.rotation.ea(c);a.x=f*g;a.y=e*g;a.z=d*g;b&&(this.g&&(c=Math.random()*le,d=Math.acos(2*Math.random()-1)-Ki,e=Math.cos(d),f=Math.cos(c)*e,e*=Math.sin(c),d=Math.sin(d)),a.Wb.ea(f),a.Xb.ea(e),a.Nd.ea(d))};ql.prototype.load=function(a){tf.prototype.load.call(this,a);this.radius=Ma(a.radius,this.radius);this.j=$a(a.shell,this.j)};ql.prototype.save=function(a){tf.prototype.save.call(this,a);a.radius=
|
||
this.radius;a.shell=this.j?1:0};Li.sphere=ql;u(Pe,lc);Pe.prototype.dispose=function(){var a=this.Ea;a&&a.dispose()};Pe.prototype.Oi=function(a){var b=this.Ea;b&&(b.Ih=a)};Pe.prototype.ll=function(a){var b=this.Ea;b&&(b.rh=a);return this};var Ed=new Pe(gI);Yf.prototype.copy=function(){return new Yf(this.width,this.height,this.hd,this.jd,this.ff,this.hf,this.dk,this.jf,this.advance,this.qb,this.g)};Yf.prototype.Pg=function(a){this.width=a;return this};Yf.prototype.Jc=function(a){this.qb=a;return this};
|
||
u(Wk,lc);Wk.prototype.dispose=function(){var a=this.qb;a&&(a.dispose(),this.qb=null);var b=this.Te,c;for(c in b)(a=b[c].qb)&&a.dispose();this.Te={};this.Qj={};this.zm={};this.ii=this.gh=this.height=this.lineHeight=0};Wk.prototype.replace=function(a,b){for(var c=this.Qj,d=0;d<a.length;++d){var e=a[d];c=c[e]||(c[e]={})}c.Ch=b;return this};u(pt,lc);pt.prototype.dispose=function(){var a=document.getElementById(this.url);a&&a.parentNode.removeChild(a)};u(Xh,lc);Xh.prototype.dispose=function(){this.buffer=
|
||
null;this.A(nQ)};Db.Object.defineProperties(Xh.prototype,{duration:{configurable:!0,enumerable:!0,get:function(){return this.end-this.start}}});var jC=new Xh,nQ=qa++;qs.prototype.clone=function(a,b){var c=new qs,d=c.Le,e=c.Hb,f=this.Le,g=f.length;d.length=g;for(var l=0,n,r;l<g;++l){n=f[l];r=new Gn(n.app);r.g=b;r.j=16*l;r.oj(n);var w=r,y=n;w.Db=y.Db;w.Wc=y.Wc;w.cf=y.cf;w=r;y=n;w.ne=y.ne;w.oe=y.oe;w.pe=y.pe;w.me=y.me;r.Bj.copy(n.Bj);e[r.name=n.name]=r;d[l]=r}for(b=0;b<g;++b)e=f[b],l=f.indexOf(e.parent),
|
||
e=d[b],-1===l?a.i(e):d[l].i(e);return c};u(Xk,lc);Xk.prototype.dispose=function(){this.Za&&this.Za.dispose();this.ke&&this.ke.dispose()};var DL=new Xk;u(rs,lc);u(ts,lc);u(qt,lc);p=qt.prototype;p.dispose=function(){this.ke&&this.ke.dispose();this.A(MD)};p.L=function(a){this.visible=a;return this};p.Eb=function(a){"number"===typeof a&&(a=new yb(a));this.size=a;return this};p.Ia=function(a){"number"===typeof a&&(a=new yb(a));this.rotation=a;return this};p.setColor=function(a){"number"===typeof a?a=new yb(new E((a>>
|
||
16&255)/255,(a>>8&255)/255,(a&255)/255)):a instanceof E&&(a=new yb(a));this.color=a;return this};p.Cf=function(a){"number"===typeof a&&(a=new yb(a));this.alpha=a;return this};p.Ld=function(a){this.ke=a;return this};p.load=function(a,b,c,d){var e=this;d=mc(this.options,d);this.state=rc;var f=1;this.name=b.name||this.name;this.duration=Ma(b.duration,this.duration);this.loop=$a(b.loop,this.loop);this.world=$a(b.world,this.world);this.count=Qa(b.count,this.count);var g=b.blendMode;g&&(this.Sa=mD[g]||
|
||
Xp);this.Qc=$a(b.depthTest,this.Qc);if(this.g=b.diffuseMap)++f,a.oa.get(c+Na(b.diffuseMap),d,function(l){e.ke=l;0===--f&&e.A(e.state=Ib)},function(l){e.A(e.state=db,e.error=l)});this.rate.load(b.rate);this.Gj.load(b.lifeTime);this.Ah=Qa(b.speedMode,this.Ah);this.Mi=Qa(b.rotationMode,this.Mi);this.Zj.load(b.startSpeed);this.Wb.load(b.vx);this.Xb.load(b.vy);this.Nd.load(b.vz);this.speed.load(b.speed);this.size.load(b.size);this.rotation.load(b.rotation);this.color.load(b.color);this.alpha.load(b.alpha);
|
||
this.lh=new (Li[b.emitterType]||Zc);this.lh.load(b.emitter);this.Ad.load(b.ex);this.Bd.load(b.ey);this.Yf.load(b.ez);0===--f&&this.A(this.state=Ib)};p.save=function(a){a.name=this.name;a.duration=this.duration;a.rate=this.rate;a.loop=this.loop?1:0;a.world=this.world?1:0;a.count=this.count;a.depthTest=this.Qc?1:0;this.Sa&&(a.blendMode=this.Sa.name);a.diffuseMap=this.g;this.rate.save(a.rate=[]);this.Gj.save(a.lifeTime=[]);a.speedMode=this.Ah;a.rotationMode=this.Mi;this.Zj.save(a.startSpeed=[]);this.Wb.save(a.vx=
|
||
[]);this.Xb.save(a.vy=[]);this.Nd.save(a.vz=[]);this.speed.save(a.speed=[]);this.size.save(a.size=[]);this.rotation.save(a.rotation=[]);this.color.save(a.color=[]);this.alpha.save(a.alpha=[]);for(var b in Li)if(this.lh.constructor==Li[b]){a.emitterType=b;break}this.lh.save(a.emitter={});this.Ad.save(a.ex=[]);this.Bd.save(a.ey=[]);this.Yf.save(a.ez=[])};var MD=qa++,qL=0,rt=0;u(xj,lc);xj.prototype.dispose=function(){for(var a=0,b=this.Fb,c=b.length;a<c;++a)b[a].dispose()};xj.prototype.load=function(a,
|
||
b,c,d){var e=this;d=mc(this.options,d);this.state=rc;rL(this);b=b.systems;for(var f=1,g=0,l=b.length,n=this.Fb,r=void 0;g<l;++g)n.push(r=new qt),r.load(a,b[g],c,d),++f,r.ia(function(){0===--f&&e.A(e.state=Ib)},function(w){e.A(e.state=db,e.error=w)});0===--f&&this.A(this.state=Ib);return this};xj.prototype.save=function(a){var b=0,c=this.Fb,d=c.length;for(a=a.systems=[];b<d;++b)c[b].save(a[b]={})};u(Rd,ve);p=Rd.prototype;p.dispose=function(){this.pc();this.u=this.g=null};p.Lb=function(){this.app.audio.de.push(this)};
|
||
p.pc=function(){J(this.app.audio.de,this);this.M=null;ao(this);this.Rd=this.lg=0;this.mg=!0;this.D=!1;this.C=1;this.K=!1};p.df=function(a){this.volume=a;return this};p.Qb=function(){return-1!==this.j};p.yh=function(a){this.muted=a;return this};p.stop=function(){-1!==this.j&&(ao(this),this.app.audio.ef.push(this),this.A($n))};p.ng=function(a){var b=this.volume,c=this.Rd;if(b!==c){var d=this.lg;b>c?(b-=a*d,b<=c&&(b=c)):(b+=a*d,b>=c&&(b=c));this.volume=b}};p.Uh=function(a,b,c){b=void 0===b?!1:b;c=void 0===
|
||
c?1:c;ao(this);this.m=a.buffer;this.H=a.start;this.Z=a.end-a.start;this.D=b;this.C=this.Rd=c;this.sb=0;return vD(this)};p.ek=function(){return this.g};Db.Object.defineProperties(Rd.prototype,{volume:{configurable:!0,enumerable:!0,get:function(){return this.C},set:function(a){this.C=a=Da(a,0,1);this.muted&&(a=0);var b=this.g;b&&(b=b.gain,b.value!==a&&(b.value=a))}},muted:{configurable:!0,enumerable:!0,get:function(){return this.K},set:function(a){this.K=a;this.volume=this.C}}});var hC=null,$n=qa++,
|
||
sL=qa++;u(ji,Rd);ji.prototype.pc=function(){Rd.prototype.pc.call(this);this.wd&&(this.app.audio.Fg[this.wd]=null,this.wd="")};ji.prototype.ng=function(a){Rd.prototype.ng.call(this,a);a=this.Rd;this.volume===a&&0===a&&this.stop()};u(vj,Rd);p=vj.prototype;p.pc=function(){Rd.prototype.pc.call(this);this.maxDistance=1E4;this.setPosition(0,0,0)};p.wh=function(a){this.distanceModel=a;return this};p.ml=function(a){this.rolloffFactor=a;return this};p.zh=function(a){this.refDistance=a;return this};p.Df=function(a){this.maxDistance=
|
||
a;return this};p.setPosition=function(a,b,c){if(this.ua!==a||this.Bb!==b||this.na!==c){this.ua=a;this.Bb=b;this.na=c;var d=this.l;d&&(d.positionX?(d.positionX.value=a,d.positionY.value=b,d.positionZ.value=c):d.setPosition(a,b,c))}return this};p.Bc=function(a){return this.setPosition(a.x,a.y,a.z)};p.ek=function(){return this.l};Db.Object.defineProperties(vj.prototype,{distanceModel:{configurable:!0,enumerable:!0,get:function(){return this.J},set:function(a){if(this.J!==a){this.J=a;var b=this.l;b&&
|
||
(b.distanceModel=a)}}},rolloffFactor:{configurable:!0,enumerable:!0,get:function(){return this.wa},set:function(a){if(this.wa!==a){this.wa=a;var b=this.l;b&&(b.rolloffFactor=a)}}},refDistance:{configurable:!0,enumerable:!0,get:function(){return this.W},set:function(a){if(this.W!==a){this.W=a;var b=this.l;b&&(b.refDistance=a)}}},maxDistance:{configurable:!0,enumerable:!0,get:function(){return this.P},set:function(a){if(this.P!==a){this.P=a;var b=this.l;b&&(b.maxDistance=a)}}}});u(Wg,ve);p=Wg.prototype;
|
||
p.dispose=function(){this.pc();this.l=this.g=null};p.Lb=function(){this.app.audio.de.push(this)};p.pc=function(){J(this.app.audio.de,this);this.M=null;st(this);this.nk=this.Rd=this.lg=0;this.Vh=1;this.mg=!0;this.m=this.o=1;this.u=!1};p.df=function(a){this.volume=a;return this};p.yh=function(a){this.muted=a;return this};p.stop=function(){this.j&&(st(this),this.app.audio.ef.push(this))};p.ng=function(a){var b=this.volume,c=this.Rd;if(b!==c){var d=this.lg;b>c?(b-=a*d,b<=c&&(b=c)):(b+=a*d,b>=c&&(b=c));
|
||
this.volume=b}b=this.rate;c=this.Vh;b!==c&&(d=this.nk,b>c?(b-=a*d,b<=c&&(b=c)):(b+=a*d,b>=c&&(b=c)),this.rate=b)};p.Uh=function(a,b,c){b=void 0===b?1:b;c=void 0===c?1:c;st(this);var d=this.l;a=a.buffer;this.o=this.Vh=c;this.m=this.Rd=b;if(d&&a){d=this.j=d.createBufferSource();var e=this.g;d.buffer=a;d.loop=!0;d.playbackRate.value=c;d.connect(e);d.start?d.start():d.noteOn();this.g.gain.value=b;this.g.connect(this.mg?this.app.audio.Pi:this.app.audio.Hi)}return this};Db.Object.defineProperties(Wg.prototype,
|
||
{rate:{configurable:!0,enumerable:!0,get:function(){return this.o},set:function(a){this.o=a;var b=this.j;b&&(b=b.playbackRate,b.value!==a&&(b.value=a))}},volume:{configurable:!0,enumerable:!0,get:function(){return this.m},set:function(a){this.m=a=Da(a,0,1);this.muted&&(a=0);var b=this.g;b&&(b=b.gain,b.value!==a&&(b.value=a))}},muted:{configurable:!0,enumerable:!0,get:function(){return this.u},set:function(a){this.u=a;this.volume=this.m}}});u(Ij,Wg);Ij.prototype.pc=function(){Wg.prototype.pc.call(this);
|
||
this.wd&&(this.app.audio.Fg[this.wd]=null,this.wd="")};Ij.prototype.ng=function(a){Wg.prototype.ng.call(this,a);a=this.Rd;this.volume===a&&0===a&&this.stop()};u(xe,Cc);p=xe.prototype;p.update=function(a){for(var b=this.channels,c=b.length,d=null===this.g,e=0,f,g=void 0,l,n,r,w,y;e<c;++e)if((f=b[e])&&1!==(g=f.time))if(1<=(g+=30*a)){l=f.frame;n=f.loop;r=f.timestamp;if((y=f.T)>=(w=f.Y)){do if(this.A(op,l,e),--g,++l>y)if(n)l=w,this.A(ym,l,e);else{l=y;g=1;break}else this.A(ym,l,e);while(1<=g)}else{do if(this.A(op,
|
||
l,e),--g,--l<y)if(n)l=w,this.A(ym,l,e);else{l=y;g=1;break}else this.A(ym,l,e);while(1<=g)}f.timestamp===r&&(f.frame=l,f.time=g,++f.timestamp,d=!0)}else f.time=g;if(d){a=(e=this.object)?e.Wa:null;e=this.animation;if(a&&e){g=a.Le;l=g.length;n=e.hm;var A,H,I,O,S,R,ja,ka,ea;for(e=0;e<l;++e){w=g[e];var ma=w.name;y=n[ma];var pa=y.length,va=A=H=I=O=S=0,Ka=R=ja=ka=1;for(r=0;r<c;++r)if(f=b[r]){var Aa=f.weight,Fa=f.Ue;if((null===Fa||!Fa[ma])&&0!==Aa){Fa=f.frame;var xa=0;f=y[xa];var Ja=pa-1;for(ea=y[Ja];1<Ja-
|
||
xa;){var La=Ja+xa>>1,Ha=y[La];Ha.frame<=Fa?(xa=La,f=Ha):(Ja=La,ea=Ha)}ea.frame<=Fa&&(f=ea);Fa=f.position;xa=f.rotation;f=f.scale;va+=(Fa.x-va)*Aa;A+=(Fa.y-A)*Aa;H+=(Fa.z-H)*Aa;if(null!==xa)if(1===Aa)I=xa.x,O=xa.y,S=xa.z,Ka=xa.w;else if(Fa=xa.x,ea=xa.y,Ha=xa.z,xa=xa.w,Ja=Ka*xa+I*Fa+O*ea+S*Ha,0>Ja&&(Fa=-Fa,ea=-ea,Ha=-Ha,xa=-xa,Ja=-Ja),1>Ja)if(La=Math.sqrt(1-Ja*Ja),.001>Math.abs(La))I=.5*(Fa+I),O=.5*(ea+O),S=.5*(Ha+S),Ka=.5*(xa+Ka);else{Ja=Math.atan2(La,Ja);var Gb=1/La;La=Math.sin((1-Aa)*Ja)*Gb;Ja=Math.sin(Aa*
|
||
Ja)*Gb;I=I*La+Fa*Ja;O=O*La+ea*Ja;S=S*La+Ha*Ja;Ka=Ka*La+xa*Ja}null!==f&&(R+=(f.x-R)*Aa,ja+=(f.y-ja)*Aa,ka+=(f.z-ka)*Aa)}}w.setPosition(va,A,H);w.Ia(I,O,S,Ka);w.setScale(R,ja,ka)}}this.g=a}return d};p.Ed=function(a){return Xg(this,void 0===a?0:a).weight};p.za=function(a,b){b=Xg(this,void 0===b?0:b);b.weight!==a&&(b.weight=a,this.g=null)};p.Tc=function(a,b){b=Xg(this,void 0===b?0:b);a=Da(b.weight+a,0,1);b.weight!==a&&(b.weight=a,this.g=null)};p.play=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;
|
||
var d=this.xd[a];if(d){var e=Xg(this,c),f=d.Y;d=d.T;e.animationName=a;e.frame=e.Y=f;e.T=d;e.loop=b;e.time=0;++e.timestamp;this.g=null;this.A(ym,f,c)}else this.stop(c)};p.stop=function(a){a=Xg(this,void 0===a?0:a);a.time=1;++a.timestamp;this.g=null};p.Qb=function(a){return 1!==Xg(this,void 0===a?0:a).time};var ym=qa++,op=qa++;p=zC.prototype;p.dispose=function(){this.O.dispose();for(var a=0,b=this.ud,c=b.length;a<c;++a)b[a].dispose()};p.ya=function(a){a=a||this.Sa;this.C!==a&&(this.flush(),this.C=a)};
|
||
p.cb=function(a){this.J!==a&&(this.flush(),this.J=a)};p.Ya=function(a,b){var c=this.m;c[a]!==b&&(this.flush(),c[a]=b)};p.setColor=function(a,b){var c=this.m,d=c[a];d instanceof kb?d.Ha(b)||(this.flush(),c[a]=b):d!==b&&(this.flush(),c[a]=b)};p.Jc=function(a,b){var c=this.m,d=this.m[a];d&&d.Ea===b.Ea||(this.flush(),c[a]=b)};p.Jd=function(a){if(this.u!==a){this.flush();this.u=a;var b=this.wa,c=0,d=this.o,e;for(e in a)(b[c++]=a[e]).eb=d}};p.flush=function(){var a=this.M;if(0<a){var b=this.X;this.o.upload();
|
||
b.cb(this.J);b.Jd(this.u);Bj(b,this.O);pf(b,this.m);var c=this.C,d=c.enabled;ei(b,d);d&&(Bs(b,c.Kk,c.Lk),Cs(b,c.src,c.Hk,c.ql,c.Ik));di(b,!0,!0,!0,!0);b.Kd(this.g);fi(b,!1);b.tb(Sc);1!==b.lineWidth&&(b.lineWidth=1,b.ca.lineWidth(1));c=this.D;b.td(c.x,c.y);Qg(b,Yn,!0,0,6*a);this.M=0;CD(this,this.rd+1)}};p.T=function(){this.flush();CD(this,0)};u(sa,ve);p=sa.prototype;p.L=function(a){this.visible=a;return this};p.Ra=function(a){this.x=a;return this};p.R=function(a){this.y=a;return this};p.setPosition=
|
||
function(a,b){this.x=a;this.y=b;return this};p.Bc=function(a){this.x=a.x;this.y=a.y;return this};p.xg=function(a){return a.set(this.x,this.y)};p.oj=function(a){this.x=a.x;this.y=a.y;return this};p.Pg=function(a){this.width=a;return this};p.Eb=function(a,b){this.width=a;this.height=b;return this};p.Ia=function(a){this.rotation=a;return this};p.Am=function(a){this.Db=a;return this};p.setScale=function(a,b){this.Db=a;this.Wc=void 0===b?a:b;return this};p.Uj=function(a){this.Db=a.x;this.Wc=a.y};p.$a=
|
||
function(a,b){return oQ.set(0,0,this.width,this.height).contains(eo(this,pQ.set(a,b)))};p.setColor=function(a){this.color=a;return this};p.ya=function(a){this.Sa=a;return this};p.i=function(a){null!==a.parent&&a.parent.removeChild(a);this.children.push(a);a.parent=this;a.A($g);return this};p.removeChild=function(a){var b=this.children,c=b.indexOf(a);-1!==c&&(a.parent=null,this.children=N(b,c),a.A(Jj));return a};p.Vc=function(a){var b=this.children,c=b.indexOf(a);-1!==c&&(a.parent=null,C(b,c),a.A(Jj))};
|
||
p.ob=function(){};p.Af=function(a){for(var b=0,c=this.children,d=c.length,e,f,g=void 0;b<d;++b)e=c[b],e.visible&&0<this.opacity&&0<this.scale&&(Zg(a,e.matrix),f=e.color,null!==f&&BD(a,f),null!==(g=e.Sa)&&bo(a,g),e.ob(a),e.Af(a),null!==g&&co(a),null!==f&&tt(a),vf(a))};p.nc=function(a){for(var b=this.children,c=b.length-1,d;0<=c;--c)if(d=b[c],d.nc.apply(d,arguments))return!0;return this.A.apply(this,arguments)};Db.Object.defineProperties(sa.prototype,{visible:{configurable:!0,enumerable:!0,get:function(){return this.Mb},
|
||
set:function(a){this.Mb!==a&&(this.Mb=a,this.A(Kj,a))}},x:{configurable:!0,enumerable:!0,get:function(){return this.O},set:function(a){this.O!==a&&(this.O=a,this.j=!0)}},y:{configurable:!0,enumerable:!0,get:function(){return this.Z},set:function(a){this.Z!==a&&(this.Z=a,this.j=!0)}},Kg:{configurable:!0,enumerable:!0,get:function(){return this.rd},set:function(a){this.rd!==a&&(this.rd=a,this.j=!0)}},dg:{configurable:!0,enumerable:!0,get:function(){return this.ud},set:function(a){this.ud!==a&&(this.ud=
|
||
a,this.j=!0)}},width:{configurable:!0,enumerable:!0,get:function(){return this.Sd},set:function(a){this.Sd!==a&&(this.Sd=a,this.j=!0)}},height:{configurable:!0,enumerable:!0,get:function(){return this.Qd},set:function(a){this.Qd!==a&&(this.Qd=a,this.j=!0)}},rotation:{configurable:!0,enumerable:!0,get:function(){return this.ee},set:function(a){this.ee!==a&&(this.ee=a,this.If=this.j=!0)}},Db:{configurable:!0,enumerable:!0,get:function(){return this.Bb},set:function(a){this.Bb!==a&&(this.Bb=a,this.j=
|
||
!0)}},Wc:{configurable:!0,enumerable:!0,get:function(){return this.te},set:function(a){this.te!==a&&(this.te=a,this.j=!0)}},scale:{configurable:!0,enumerable:!0,get:function(){return this.Bb},set:function(a){this.Db=this.Wc=a}},matrix:{configurable:!0,enumerable:!0,get:function(){return this.j?DD(this):this.Ic},set:function(a){ED(this,a)}},color:{configurable:!0,enumerable:!0,get:function(){return this.Rb},set:function(a){if("number"===typeof a){var b=this.Rb;b?wn(b,a):this.Rb=xn(a)}else this.Rb=
|
||
a}},opacity:{configurable:!0,enumerable:!0,get:function(){var a=this.color;return a?a.w:1},set:function(a){var b=this.color;b?b.w=a:this.color=new kc(1,1,1,a)}},sb:{configurable:!0,enumerable:!0,get:function(){for(var a=this,b=a.parent;b;)a=b,b=b.parent;return a}}});var oQ=new Xb,pQ=new kb,vL=new Oe,Kj=qa++,$g=qa++,Jj=qa++,qQ=qa++,mI=qa++;u(tb,sa);p=tb.prototype;p.Nc=function(){this.Pd=!0;this.app.Ub?void 0!==this.wa&&(this.Qh||!this.m||!this.m.visible||this.m instanceof Se&&this.m.state===Zb)&&this.Ob(this.wa,
|
||
this.Ph):this.Ob(null)};p.yb=function(){this.Pd=!1};p.Ob=function(a,b){if(this.app.Ub){if(b){for(;a&&(!a.visible||a instanceof Se&&a.state===Zb);)a=this.o[b][a.id];if(!a)return!1}this.m&&(this.m.Xe=!1,this.m.A(mI));if(this.m=a)this.m.Xe=!0,this.m.A(qQ);this.Gg=0;return!0}this.m&&(this.m.Xe=!1,this.m.A(mI));return!1};p.layout=function(){var a=this.app,b=a.Sd;a=a.Qd;var c=Math.min(b/this.Hn,a/this.Gn);this.width=b/c;this.height=a/c;this.scale=c};p.update=function(a){this.Gg+=a};p.ob=function(a){var b=
|
||
this.color;if(this.visible&&(null===b||0<b.w)){AD(a,this.matrix);if(null!==b){var c=a.mk,d=a.color;c.length===a.Th&&c.push(new kc(1,1,1,1));c[a.Th++].copy(d);d.copy(b)}c=this.Sa;null!==c&&bo(a,c);this.Af(a);null!==c&&co(a);null!==b&&tt(a);vf(a)}};u(Ea,sa);Ea.prototype.Jc=function(a){this.qb=a;return this};Ea.prototype.cb=function(a,b){this.Cb=a;this.g=b;return this};Ea.prototype.ob=function(a){var b=this.qb||Ed,c=b.hd,d=b.jd,e=b.ff,f=b.hf;a.ya(this.Sa);a.cb(b.Ea.alpha?this.g:this.Cb);a.Jc("texture",
|
||
b);a.Jd(Yg);b=ag(a,32);var g=b.ib,l=b.data,n=a.matrix,r=n.a,w=n.b,y=n.c,A=n.d,H=n.ub;n=n.vb;var I=a.color,O=I.x,S=I.y,R=I.z;I=I.w;var ja=this.width,ka=this.height;l[g++]=H;l[g++]=n;l[g++]=c;l[g++]=d;l[g++]=O;l[g++]=S;l[g++]=R;l[g++]=I;l[g++]=ja*r+H;l[g++]=ja*w+n;l[g++]=e;l[g++]=d;l[g++]=O;l[g++]=S;l[g++]=R;l[g++]=I;l[g++]=ja*r+ka*y+H;l[g++]=ja*w+ka*A+n;l[g++]=e;l[g++]=f;l[g++]=O;l[g++]=S;l[g++]=R;l[g++]=I;l[g++]=ka*y+H;l[g++]=ka*A+n;l[g++]=c;l[g++]=f;l[g++]=O;l[g++]=S;l[g++]=R;l[g++]=I;b.ib=g;bg(a,
|
||
1)};Db.Object.defineProperties(Ea.prototype,{qb:{configurable:!0,enumerable:!0,get:function(){return this.l},set:function(a){"string"===typeof a&&(a=this.app.oa.get(a));this.l=a}}});var ut=new sd("attribute vec2 position;\n\tattribute mediump vec2 uv;\n\tattribute lowp vec4 color;\n\tuniform mat4 projectionViewWorldMatrix;\n\tvarying lowp vec4 vColor;\n\tvarying mediump vec2 vUv;\n\tvoid main() {\n\t\tvColor = color;\n\t\tvUv = uv;\n\t\tgl_Position = projectionViewWorldMatrix * vec4(position, 0.0, 1.0);\n\t}",
|
||
"precision mediump float;\n\tvarying lowp vec4 vColor;\n\tvarying mediump vec2 vUv;\n\tuniform sampler2D texture;\n\tvoid main() {\n\t\tlowp vec4 color = vColor * texture2D(texture, vUv);\n\t\tif (color.a == 0.0) discard;\n\t\tgl_FragColor = color;\n\t}"),vt=new sd("attribute vec2 position;\n\tattribute mediump vec2 uv;\n\tattribute lowp vec4 color;\n\tuniform mat4 projectionViewWorldMatrix;\n\tvarying lowp vec4 vColor;\n\tvarying mediump vec2 vUv;\n\tvoid main() {\n\t\tvColor = color;\n\t\tvUv = uv;\n\t\tgl_Position = projectionViewWorldMatrix * vec4(position, 0.0, 1.0);\n\t}",
|
||
"precision mediump float;\n\tvarying lowp vec4 vColor;\n\tvarying mediump vec2 vUv;\n\tuniform sampler2D texture;\n\tuniform sampler2D textureAlpha;\n\tvoid main() {\n\t\tlowp vec4 color = vColor;\n\t\tcolor.a *= texture2D(textureAlpha, vUv).r;\n\t\tif (color.a == 0.0) discard;\n\t\tgl_FragColor = color * texture2D(texture, vUv);\n\t}"),Yg={position:new Yb([],2,0,32,!1),uv:new Yb([],2,8,32,!1),color:new Yb([],4,16,32,!1)};u(ho,Ea);ho.prototype.ob=function(a){var b=this.qb||Ed,c=b.Wf,d=b.Xf,e=b.hd,
|
||
f=b.jd;a.ya(this.Sa);a.cb(b.Ea.alpha?this.g:this.Cb);a.Jc("texture",b);a.Jd(Yg);b=ag(a,32);var g=b.ib,l=b.data,n=a.matrix,r=n.a,w=n.b,y=n.c,A=n.d,H=n.ub;n=n.vb;var I=a.color,O=I.x,S=I.y,R=I.z;I=I.w;var ja=this.width,ka=this.height,ea=this.m||rP,ma=c*ea.right+e,pa=d*ea.bottom+f;e+=c*ea.left;f+=d*ea.top;l[g++]=H;l[g++]=n;l[g++]=e;l[g++]=f;l[g++]=O;l[g++]=S;l[g++]=R;l[g++]=I;l[g++]=ja*r+H;l[g++]=ja*w+n;l[g++]=ma;l[g++]=f;l[g++]=O;l[g++]=S;l[g++]=R;l[g++]=I;l[g++]=ja*r+ka*y+H;l[g++]=ja*w+ka*A+n;l[g++]=
|
||
ma;l[g++]=pa;l[g++]=O;l[g++]=S;l[g++]=R;l[g++]=I;l[g++]=ka*y+H;l[g++]=ka*A+n;l[g++]=e;l[g++]=pa;l[g++]=O;l[g++]=S;l[g++]=R;l[g++]=I;b.ib=g;bg(a,1)};u(ki,Ea);ki.prototype.ob=function(a){var b=this.qb||Ed,c=b.hd,d=b.jd,e=b.Wf,f=b.Xf;a.ya(this.Sa);a.cb(b.Ea.alpha?this.g:this.Cb);a.Jc("texture",b);a.Jd(Yg);b=this.width;var g=this.height,l=this.C,n=this.u,r=this.o,w=r.x,y=r.y,A=r.width,H=w+A;r=r.height;var I=y+r,O=this.type,S;switch(O){case sl:var R=S=3;break;case Yp:S=Math.ceil((b-(l-A))/A)+2;R=Math.ceil((g-
|
||
(n-r))/r)+2;break;case mh:R=this.m;S=(b-(l-A))/A;var ja=(g-(n-r))/r;S=Math.floor(S)+(S%1>R?1:0)+2;R=Math.floor(ja)+(ja%1>R?1:0)+2}ja=S*R;var ka=ag(a,32*ja),ea=ka.ib,ma=ka.data,pa=a.matrix,va=pa.a,Ka=pa.b,Aa=pa.c,Fa=pa.d,xa=pa.ub;pa=pa.vb;var Ja=a.color,La=Ja.x,Ha=Ja.y,Gb=Ja.z;Ja=Ja.w;var qc=f/n,Nb=e/l,pb=d+y*qc,oa=d+I*qc,B=c+w*Nb,X=c+H*Nb;switch(O){case sl:case Yp:var ia=g-n+I,ya=b-l+H;break;case mh:ia=(g-n+r)/(R-2),ya=(b-l+A)/(S-2)}H=0;for(I=R-1;H<R;++H){if(0===H){n=0;var eb=y,Jb=d,hc=pb}else if(H<
|
||
I)switch(n=eb,O){case sl:eb=ia;Jb=pb;hc=oa;break;case Yp:eb=Math.min(eb+r,ia);Jb=pb;hc=pb+(eb-n)*qc;break;case mh:eb=n+ia,Jb=pb,hc=oa}else n=eb,eb=g,Jb=oa,hc=d+f;for(var $b=0,nd=S-1;$b<S;++$b){if(0===$b){l=0;var Nc=w,Zd=c,vd=B}else if($b<nd)switch(l=Nc,O){case sl:Nc=ya;Zd=B;vd=X;break;case Yp:Nc=Math.min(Nc+A,ya);Zd=B;vd=B+(Nc-l)*Nb;break;case mh:Nc=l+ya,Zd=B,vd=X}else l=Nc,Nc=b,Zd=X,vd=c+e;ma[ea++]=l*va+n*Aa+xa;ma[ea++]=l*Ka+n*Fa+pa;ma[ea++]=Zd;ma[ea++]=Jb;ma[ea++]=La;ma[ea++]=Ha;ma[ea++]=Gb;ma[ea++]=
|
||
Ja;ma[ea++]=Nc*va+n*Aa+xa;ma[ea++]=Nc*Ka+n*Fa+pa;ma[ea++]=vd;ma[ea++]=Jb;ma[ea++]=La;ma[ea++]=Ha;ma[ea++]=Gb;ma[ea++]=Ja;ma[ea++]=Nc*va+eb*Aa+xa;ma[ea++]=Nc*Ka+eb*Fa+pa;ma[ea++]=vd;ma[ea++]=hc;ma[ea++]=La;ma[ea++]=Ha;ma[ea++]=Gb;ma[ea++]=Ja;ma[ea++]=l*va+eb*Aa+xa;ma[ea++]=l*Ka+eb*Fa+pa;ma[ea++]=Zd;ma[ea++]=hc;ma[ea++]=La;ma[ea++]=Ha;ma[ea++]=Gb;ma[ea++]=Ja}}ka.ib=ea;bg(a,ja)};var sl=0,Yp=1,mh=2;u(li,Ea);li.prototype.dispose=function(){this.app.locale.off(Hn,this.o)};u(ah,Ea);ah.prototype.Vj=function(a){this.type=
|
||
a;return this};ah.prototype.ob=function(a){var b=this.qb||Ed;a.ya(this.Sa);a.cb(b.Ea.alpha?this.g:this.Cb);a.Jc("texture",b);a.Jd(Yg);var c=ag(a,32),d=c.ib,e=c.data,f=a.matrix,g=f.a,l=f.b,n=f.c,r=f.d,w=f.ub;f=f.vb;var y=a.color,A=y.x,H=y.y,I=y.z;y=y.w;var O=this.value,S=this.width,R=this.height,ja=b.hd,ka=b.jd,ea=b.ff,ma=b.hf;if(this.type===Mp){var pa=1-O;f+=r*R*pa;R*=O;ka+=b.Xf*pa}else S*=O,ea=ja+b.Wf*O;e[d++]=w;e[d++]=f;e[d++]=ja;e[d++]=ka;e[d++]=A;e[d++]=H;e[d++]=I;e[d++]=y;e[d++]=S*g+w;e[d++]=
|
||
S*l+f;e[d++]=ea;e[d++]=ka;e[d++]=A;e[d++]=H;e[d++]=I;e[d++]=y;e[d++]=S*g+R*n+w;e[d++]=S*l+R*r+f;e[d++]=ea;e[d++]=ma;e[d++]=A;e[d++]=H;e[d++]=I;e[d++]=y;e[d++]=R*n+w;e[d++]=R*r+f;e[d++]=ja;e[d++]=ma;e[d++]=A;e[d++]=H;e[d++]=I;e[d++]=y;c.ib=d;bg(a,1)};var xL=0,Mp=1;u(Se,sa);p=Se.prototype;p.Il=function(){this.state=Ec};p.ka=function(a){this.state=a;return this};p.Fl=function(a,b,c){if(this.visible&&!this.app.input.Jb&&this.$a(b,c))return this.pointerId=a,this.app.input.Jb=this,this.state!==Zb&&(this.state=
|
||
Kf),!0};p.Hl=function(a,b,c){this.app.input.Jb===this&&a===this.pointerId&&(this.app.input.Jb=null,this.pointerId=-1,this.state!==Zb&&(this.state=Ec),this.visible&&this.state!==Zb&&this.$a(b,c)&&this.A(Yd,b,c))};p.Gl=function(a,b,c,d){if(this.visible&&this.state!==Zb){var e=this.app.input.Jb;e?e===this&&a===this.pointerId&&(this.state=this.$a(b,c)?Kf:Ec):0===d&&(this.state=this.$a(b,c)?Lf:Ec)}};p.El=function(a){this.app.input.Jb===this&&a===this.pointerId&&(this.app.input.Jb=null,this.pointerId=-1,
|
||
this.state!==Zb&&(this.state=Ec))};p.Um=function(a){if(this.visible&&this.state!==Zb&&!this.app.input.Jb&&(this.Xe&&(a===Q.Ka||a===Q.La)||this.keys&&-1!==this.keys.indexOf(a)&&(!this.app.Ub||a!==Q.Ka&&a!==Q.La)))return this.A(Yd,-1,-1),this.A(nI,a),!0};p.Sn=function(){this.state!==Zb&&(this.state=Ec)};Db.Object.defineProperties(Se.prototype,{state:{configurable:!0,enumerable:!0,get:function(){return this.u},set:function(a){this.u!==a&&(this.u===Lf&&--this.app.input.Uk,this.u=a,a===Lf&&++this.app.input.Uk,
|
||
this.A(kv,a))}}});var Yd=qa++,nI=qa++,kv=qa++,Ec=0,Lf=1,Kf=2,Zb=3;u(rb,sa);rb.prototype.layout=function(){if(this.g){var a=this.u,b=0,c=0,d=0,e=0,f=1;if(a&&a.isLoaded()){for(var g=this.m,l=tg,n=this.kg,r=n?n.length:0,w=l.length=0,y=0,A=void 0;w<g.length;++w){var H=g.charCodeAt(w);if(37===H&&(A=g.charCodeAt(w+1))&&48<=A&&(A-=48)<r){for(var I=n[A].toString(),O=0;O<I.length;++O)l[y++]=I.charCodeAt(O);++w}else l[y++]=H}var S=tg,R=zh;R.length=0;for(var ja=a.Qj[0]||rQ,ka=0,ea=0,ma=void 0;ka<S.length;++ka){var pa=
|
||
S[ka];if(ma=ew[pa]){for(var va=ka-1;0<=va&&fw[S[va]];)--va;var Ka=0<=va?S[va]:-1,Aa=ew[Ka];if(!Aa||-1===Aa[1]&&-1===Aa[2])Ka=-1;for(var Fa=ka+1;Fa<S.length&&fw[S[Fa]];)++Fa;var xa=Fa<S.length?S[Fa]:-1,Ja=ew[xa];if(!Ja||-1===Ja[2]&&-1===Ja[3])xa=-1;if(-1!==xa){var La=sQ[pa];if(La&&(La=La[xa])){-1!==Ka?R[ea++]=La[3]:R[ea++]=La[0];for(var Ha=ka+1;Ha<Fa;++Ha){var Gb=S[Ha];fw[Gb]&&(R[ea++]=Gb)}ka=Fa;continue}}-1!==Ka&&-1!==xa&&-1!==ma[2]?R[ea++]=ma[2]:-1!==Ka&&-1!==ma[3]?R[ea++]=ma[3]:-1!==xa&&-1!==ma[1]?
|
||
R[ea++]=ma[1]:R[ea++]=ma[0]}else if((2325<=pa&&2361>=pa||2392<=pa&&2399>=pa)&&2381===S[ka+1]&&ja[pa]&&(2325<=S[ka+2]&&2361>=S[ka+2]||2392<=S[ka+2]&&2399>=S[ka+2]||8205===S[ka+2]))if(8205===S[ka+2])R[ea++]=ja[pa].Ch,++ka;else{for(var qc=2352===pa,Nb=ka+2;Nb<S.length;){var pb=S[Nb],oa=S[Nb+2];if((2325<=pb&&2361>=pb||2392<=pb&&2399>=pb)&&2381===S[Nb+1]&&ja[pb]&&(2325<=oa&&2361>=oa||2392<=oa&&2399>=oa))Nb+=2;else break}2367===S[Nb+1]&&(R[ea++]=ja[2367]?ja[2367].Ch:2367);for(var B=ka;B<Nb;B+=2)2352!==
|
||
S[B]&&(R[ea++]=ja[S[B]].Ch);R[ea++]=S[Nb];var X=S[Nb+1];2366<=X&&985420>=X?(2367!==X&&(R[ea++]=X),ka=Nb+1):ka=Nb;qc&&(R[ea++]=ja[2352].Ch)}else if(2367===pa){var ia=R[ea-1];R[ea-1]=2367;R[ea++]=ia}else R[ea++]=pa}for(var ya=a.Qj,eb=zh,Jb=tg,hc=Jb.length=0,$b=0;hc<eb.length;++hc){for(var nd=eb[hc],Nc=null,Zd=hc+1,vd=nd,Mf=ya[vd];;)if(Mf)Mf.Ch&&(Nc=Mf.Ch,hc=Zd-1),vd=eb[Zd++],Mf=Mf[vd];else break;if(Nc)for(var sk=0;sk<Nc.length;++sk)Jb[$b++]=Nc[sk];else Jb[$b++]=nd}var zm=this.W,Mi=this.Ph,me=this.lf,
|
||
Ni=a.Te,ug=a.lineHeight,vg=a.zm[this.J]||this.J,Oi=this.C,Nf=this.P,tk=0,ne=1;zh.length=tg.length;do{var $e=d=c=b=e=0,oe=0,$d=0,oc=0,wg=0,wd=0,Id=0,uk=0,Ah=0,vk=0,wk=0,Pb=void 0,Bh=1/(f*vg),xk=Oi*Bh,Pi=Nf*Bh;if(zm)for(var Oc=0,pe=0;Oc<tg.length;++Oc,++pe){var Ge=zh[pe]=tg[Oc];if((32===Ge||10===Ge||Oc===tg.length-1)&&oc>xk&&0<wd)Oc=wd,wd=0,zh[Id]=10,pe=Id,e=uk,b=Ah,c=vk,me[$e++]=wk,oe=0,$d+=ug;else if(32===Ge&&(wd=Oc,Id=pe,uk=e,Ah=b,vk=c,wk=oc),10===Ge)me[$e++]=oc,oe=0,$d+=ug;else if(Pb=Ni[Ge]||(8204===
|
||
Ge||8205===Ge?void 0:Ni[0]))oc=oe+Pb.dk+Pb.width,b<oc&&(b=oc),0===$d&&Pb.jf<d&&(d=Pb.jf),wg=$d+Pb.jf+Pb.height,c<wg&&(c=wg),oe+=Pb.advance,32!==Ge&&++e}else for(var xg=0;xg<tg.length;++xg){var Qi=zh[xg]=tg[xg];if(10===Qi)me[$e++]=oc,oe=0,$d+=ug;else if(Pb=Ni[Qi]||(8204===Qi||8205===Qi?void 0:Ni[0]))oc=oe+Pb.dk+Pb.width,b<oc&&(b=oc),0===$d&&Pb.jf<d&&(d=Pb.jf),wg=$d+Pb.jf+Pb.height,c<wg&&(c=wg),oe+=Pb.advance,32!==Qi&&++e}me[$e++]=oc;me.length=$e;switch(Mi){case ab:d=-d;c+=d;break;case oI:d=a.gh-a.height;
|
||
c=(0===oe&&1<$e?$d-ug:$d)+a.gh+a.ii;break;default:d=0,c=(0===oe&&1<$e?$d-ug:$d)+a.height}0<Pi&&Pi<c?ne=f:tk=f;f=.5*(ne+tk)}while(.01<ne-tk);f=vg;0<Oi&&0<b&&(f=Math.min(f,Oi/b));0<Nf&&0<c&&(f=Math.min(f,Nf/c));if(bl(this.app.locale)){var af=this.o,Ri=zh,Zp=this.app.locale;af.length=Ri.length;for(var Ch=0,yg=0,xd=0;Ch<Ri.length;){for(yg=xd=Ch;Ch<Ri.length;)if(10===Ri[Ch]){xd=Ch++;af[xd]=10;break}else xd=++Ch;for(var Si=yg,qe=xd-1;Si<xd;++Si,--qe){var Ti=Ri[qe];af[Si]=tQ[Ti]||Ti}for(var od=yg;od<xd;++od){var Dh=
|
||
af[od];if(!bl(Zp,Dh)&&!pI[Dh]){for(var zg=od,yd=od;++yd<xd;){var Jd=af[yd];if(bl(Zp,Jd))break;else pI[Jd]||(zg=yd)}for(var Ui=zg,Kd=od+(zg-od+1>>1),Vi=void 0;od<Kd;++od,--Ui)Vi=af[od],af[od]=af[Ui],af[Ui]=Vi;od=zg}}}}else{var Eh=this.o,bf=zh,Wi=this.app.locale;Eh.length=bf.length;for(var ed=0;ed<bf.length;++ed){var yk=bf[ed];if(bl(Wi,yk)){for(var He=ed+1;He<bf.length;){var $p=bf[He];if(bl(Wi,$p)||32===$p||48<=$p&&57>=$p)++He;else break}for(var zk=He-1;ed<He;++ed,--zk){var gw=bf[zk];if(48<=gw&&57>=
|
||
gw){for(var Ak=zk-1;0<=Ak;){var qI=bf[Ak];if(48<=qI&&57>=qI)Ak--;else break}for(var uQ=zk;Ak<uQ;)Ak++,Eh[ed]=bf[Ak],ed++,--zk;--ed;++zk}else Eh[ed]=gw}--ed}else Eh[ed]=yk}}this.g=!1}this.He=f;this.Cc=e;this.Od=b;this.Zc=b*f;this.Lc=c*f;this.kf=d;this.g||(this.j=!0,this.A(vQ))}};rb.prototype.ob=function(a){this.layout();var b=this.Cc;if(0<b){var c=this.o,d=this.u,e=d.qb||Ed,f=e.hd,g=e.jd,l=e.Wf,n=e.Xf;a.ya(this.Sa);a.cb(e.Ea.alpha?this.l:this.Cb);a.Jc("texture",e);a.Jd(Yg);var r=ag(a,32*b),w=r.ib,
|
||
y=r.data,A=this.He,H=0,I=0,O=this.kf,S=this.Od,R=this.lf,ja=this.K,ka=d.lineHeight;d=d.Te;var ea=a.color,ma=ea.x,pa=ea.y,va=ea.z;ea=ea.w;var Ka;1!==A&&Zg(a,wQ.set(A,0,0,A,0,0));var Aa=a.matrix,Fa=Aa.a,xa=Aa.b,Ja=Aa.c,La=Aa.d,Ha=Aa.ub;Aa=Aa.vb;0<R.length&&(I=(S-R[0])*ja);for(var Gb=0,qc=0,Nb=c.length,pb,oa,B,X,ia,ya,eb,Jb,hc;Gb<Nb;++Gb){var $b=c[Gb];if(10===$b)I=(S-R[++qc])*ja,O+=ka;else if(32===$b)(pb=d[$b])&&(I+=pb.advance);else if(pb=d[$b]||(8204===$b||8205===$b?void 0:d[0])){oa=I+pb.dk;B=oa+pb.width;
|
||
X=O+pb.jf;ia=X+pb.height;if(e!==pb.qb&&pb.qb){var nd=e.Ea;e=pb.qb;f=e.hd;g=e.jd;l=e.Wf;n=e.Xf;nd!==e.Ea&&(r.ib=w,bg(a,H),b-=H,H=0,a.Jc("texture",e),r=ag(a,32*b),w=r.ib,y=r.data)}H++;32>$b?$b=nd=Ka=1:($b=ma,nd=pa,Ka=va);ya=l*pb.hd+f;eb=n*pb.jd+g;Jb=l*pb.ff+f;hc=n*pb.hf+g;y[w++]=oa*Fa+X*Ja+Ha;y[w++]=oa*xa+X*La+Aa;y[w++]=ya;y[w++]=eb;y[w++]=$b;y[w++]=nd;y[w++]=Ka;y[w++]=ea;y[w++]=B*Fa+X*Ja+Ha;y[w++]=B*xa+X*La+Aa;y[w++]=Jb;y[w++]=eb;y[w++]=$b;y[w++]=nd;y[w++]=Ka;y[w++]=ea;y[w++]=B*Fa+ia*Ja+Ha;y[w++]=
|
||
B*xa+ia*La+Aa;y[w++]=Jb;y[w++]=hc;y[w++]=$b;y[w++]=nd;y[w++]=Ka;y[w++]=ea;y[w++]=oa*Fa+ia*Ja+Ha;y[w++]=oa*xa+ia*La+Aa;y[w++]=ya;y[w++]=hc;y[w++]=$b;y[w++]=nd;y[w++]=Ka;y[w++]=ea;I+=pb.advance}}1!==A&&vf(a);r.ib=w;bg(a,H)}};Db.Object.defineProperties(rb.prototype,{x:{configurable:!0,enumerable:!0,get:function(){this.layout();return this.O},set:function(a){this.O!==a&&(this.O=a,this.j=!0)}},y:{configurable:!0,enumerable:!0,get:function(){this.layout();return this.Z},set:function(a){this.Z!==a&&(this.Z=
|
||
a,this.j=!0)}},width:{configurable:!0,enumerable:!0,get:function(){this.layout();return this.Zc}},height:{configurable:!0,enumerable:!0,get:function(){this.layout();return this.Lc}},matrix:{configurable:!0,enumerable:!0,get:function(){this.layout();return this.j?DD(this):this.Ic},set:function(a){ED(this,a)}},u:{configurable:!0,enumerable:!0,get:function(){return this.ua},set:function(a){"string"===typeof a&&(a=this.app.fonts.get(a));this.ua=a;this.g=this.j=!0}},text:{configurable:!0,enumerable:!0,
|
||
get:function(){return this.m},set:function(a){"string"!==typeof a&&(a=a.toString());this.m!==a&&(this.m=a||"",this.g=this.j=!0)}},K:{configurable:!0,enumerable:!0,get:function(){return this.wa},set:function(a){this.wa=a;this.g=this.j=!0}},C:{configurable:!0,enumerable:!0,get:function(){return this.xb},set:function(a){this.xb=a;this.g=this.j=!0}},P:{configurable:!0,enumerable:!0,get:function(){return this.wb},set:function(a){this.wb=a;this.g=this.j=!0}},Ph:{configurable:!0,enumerable:!0,get:function(){return this.dc},
|
||
set:function(a){switch(a){case ab:case oI:break;default:a=GD}this.dc=a;this.g=this.j=!0}},J:{configurable:!0,enumerable:!0,get:function(){return this.na},set:function(a){this.na=a;this.g=this.j=!0}},W:{configurable:!0,enumerable:!0,get:function(){return this.mf},set:function(a){this.mf=a;this.g=this.j=!0}}});var wQ=new Oe,tg=[],zh=[],pI={32:!0,33:!0,34:!0,35:!0,36:!0,37:!0,38:!0,39:!0,40:!0,41:!0,42:!0,43:!0,44:!0,45:!0,46:!0,47:!0,58:!0,59:!0,60:!0,61:!0,62:!0,63:!0,64:!0,91:!0,92:!0,93:!0,94:!0,
|
||
95:!0,96:!0,123:!0,124:!0,125:!0,126:!0},tQ={40:41,41:40,60:62,62:60,123:125,125:123},ew={1569:[65152,-1,-1,-1],1570:[65153,-1,-1,65154],1571:[65155,-1,-1,65156],1572:[65157,-1,-1,65158],1573:[65159,-1,-1,65160],1574:[65161,65163,65164,65162],1575:[65165,-1,-1,65166],1576:[65167,65169,65170,65168],1577:[65171,-1,-1,65172],1578:[65173,65175,65176,65174],1579:[65177,65179,65180,65178],1580:[65181,65183,65184,65182],1581:[65185,65187,65188,65186],1582:[65189,65191,65192,65190],1583:[65193,-1,-1,65194],
|
||
1584:[65195,-1,-1,65196],1585:[65197,-1,-1,65198],1586:[65199,-1,-1,65200],1587:[65201,65203,65204,65202],1588:[65205,65207,65208,65206],1589:[65209,65211,65212,65210],1590:[65213,65215,65216,65214],1591:[65217,65219,65220,65218],1592:[65221,65223,65224,65222],1593:[65225,65227,65228,65226],1594:[65229,65231,65232,65230],1600:[1600,1600,1600,1600],1601:[65233,65235,65236,65234],1602:[65237,65239,65240,65238],1603:[65241,65243,65244,65242],1604:[65245,65247,65248,65246],1605:[65249,65251,65252,65250],
|
||
1606:[65253,65255,65256,65254],1607:[65257,65259,65260,65258],1608:[65261,-1,-1,65262],1609:[65263,-1,-1,65264],1610:[65265,65267,65268,65266],1662:[64342,64344,64345,64343],1728:[64420,-1,-1,64421],1740:[64508,64510,64511,64509],1670:[64378,64380,64381,64379],1705:[64398,64400,64401,64399],1711:[64402,64404,64405,64403],1688:[64394,-1,-1,64395]},sQ={1604:{1570:[65269,-1,-1,65270],1571:[65271,-1,-1,65272],1573:[65273,-1,-1,65274],1575:[65275,-1,-1,65276]}},fw={1552:!0,1554:!0,1555:!0,1556:!0,1557:!0,
|
||
1611:!0,1612:!0,1613:!0,1614:!0,1615:!0,1616:!0,1617:!0,1618:!0,1619:!0,1620:!0,1621:!0,1622:!0,1623:!0,1624:!0,1648:!0,1750:!0,1751:!0,1752:!0,1753:!0,1754:!0,1755:!0,1756:!0,1759:!0,1760:!0,1761:!0,1762:!0,1763:!0,1764:!0,1767:!0,1768:!0,1770:!0,1771:!0,1772:!0,1773:!0,8205:!0},rQ={},vQ=qa++,GD=0,ab=1,oI=2;u(nb,rb);nb.prototype.dispose=function(){this.app.locale.off(Hn,this.D)};Db.Object.defineProperties(nb.prototype,{fc:{configurable:!0,enumerable:!0,get:function(){return this.kd},set:function(a){this.kd=
|
||
a;this.H="";this.D()}},Qh:{configurable:!0,enumerable:!0,get:function(){return this.H},set:function(a){this.H=a;this.D()}}});u(yt,sa);p=yt.prototype;p.Vm=function(){this.g=!1};p.Qb=function(){return this.$d.loop||0<this.active||1!==this.time};p.Tk=function(){this.l=!0};p.zl=function(){this.l=!1};p.update=function(a){for(var b=this.$d,c=this.o,d=this.active,e,f,g,l=0;l<d;)e=c[l],g=e.time+=a*e.ce,1<=g?(c[l]=c[--d],c[d]=e):(f=e.speed.value(g)*a,e.x+=e.Wb.value(g)*f,e.y+=e.Xb.value(g)*f,++l);1<=(this.time+=
|
||
a*this.ce)&&(b.loop?(this.time%=1,b.Ad.Pa(this.Ad),b.Bd.Pa(this.Bd)):this.time=1);l=this.time;var n=this.Ad.value(l),r=this.Bd.value(l);if(1>l){a=this.m+a;e=sj(b.rate,l);var w=1/e,y=b.lh,A=this.world,H=this.g?this.parent.matrix:this.matrix,I=b.Gj,O=b.Zj,S=b.Wb,R=b.Xb,ja=b.Ah,ka=b.Mi,ea=b.speed,ma=b.size,pa=b.rotation,va=b.color,Ka=b.alpha;b=b.count;var Aa=this.l;for(0>=e&&(w=2147483647,a=0);a>w;)if(a-=w,!Aa&&d<b&&(e=c[d],e.time=0,e.ce=1/(Math.max(0,sj(I,l))||1E-7),g=e.time+=a*e.ce,1>g)){++d;switch(ja){case 2:y.kh(e,
|
||
!1);S.Pa(e.Wb);R.Pa(e.Xb);e.speed.ea(1);break;case 1:y.kh(e,!0);ea.Pa(e.speed);break;default:y.kh(e,!0),e.speed.ea(sj(O,l))}A&&H.transformPoint(e,e);f=e.speed.value(g)*a;e.x+=n+e.Wb.value(g)*f;e.y+=r+e.Xb.value(g)*f;ma.Pa(e.size);ka===rt&&pa.Pa(e.rotation);va.Pa(e.color);Ka.Pa(e.alpha)}this.m=a}this.active=d};p.ob=function(a){var b=this.active;if(0<b){var c=this.$d.ke||Ed,d=this.world,e=this.g;a.ya(this.Sa);a.cb(c.Ea.alpha?this.u:this.Cb);a.Jc("texture",c);a.Jd(Yg);d&&(vf(a),e&&vf(a));var f=ag(a,
|
||
32*b),g=f.ib,l=f.data,n=a.matrix,r=n.a,w=n.b,y=n.c,A=n.d,H=n.ub;n=n.vb;var I=a.color,O=I.x,S=I.y,R=I.z;I=I.w;var ja=c.hd,ka=c.jd,ea=c.ff;c=c.hf;for(var ma,pa,va,Ka,Aa,Fa,xa,Ja,La,Ha,Gb,qc=0,Nb=this.o;qc<b;++qc)Ha=Nb[qc],Aa=Ha.time,Fa=Ha.x,xa=Ha.y,Ha.color.value(Aa,aq),ma=aq.x*O,pa=aq.y*S,va=aq.z*R,Ka=Ha.alpha.value(Aa)*I,Ja=.5*Ha.size.value(Aa),Aa=Ha.rotation.value(Aa),0===Aa?(Aa=r*Ja,Ha=w*Ja,Gb=y*Ja,Ja*=A):(La=Math.sin(Aa)*Ja,Ja*=Math.cos(Aa),Aa=r*Ja+y*La,Ha=w*Ja+A*La,Gb=-r*La+y*Ja,Ja=-w*La+A*Ja),
|
||
La=r*Fa+y*xa+H,Fa=w*Fa+A*xa+n,l[g++]=-Aa-Gb+La,l[g++]=-Ha-Ja+Fa,l[g++]=ja,l[g++]=ka,l[g++]=ma,l[g++]=pa,l[g++]=va,l[g++]=Ka,l[g++]=Aa-Gb+La,l[g++]=Ha-Ja+Fa,l[g++]=ea,l[g++]=ka,l[g++]=ma,l[g++]=pa,l[g++]=va,l[g++]=Ka,l[g++]=Aa+Gb+La,l[g++]=Ha+Ja+Fa,l[g++]=ea,l[g++]=c,l[g++]=ma,l[g++]=pa,l[g++]=va,l[g++]=Ka,l[g++]=-Aa+Gb+La,l[g++]=-Ha+Ja+Fa,l[g++]=ja,l[g++]=c,l[g++]=ma,l[g++]=pa,l[g++]=va,l[g++]=Ka;f.ib=g;bg(a,b);d&&(e&&Zg(a,this.parent.matrix),Zg(a,this.matrix))}};p.pb=function(){var a=this.$d;this.active=
|
||
this.time=this.m=0;this.ce=1/(a.duration||1);a.Ad.Pa(this.Ad);a.Bd.Pa(this.Bd)};var aq=new E;u(ch,sa);p=ch.prototype;p.Qb=function(){for(var a=0,b=this.Fb,c=b.length;a<c;++a)if(b[a].Qb())return!0;return!1};p.update=function(a){for(var b=0,c=this.Fb,d=c.length;b<d;++b)c[b].update(a)};p.pb=function(){for(var a=0,b=this.Fb,c=b.length;a<c;++a)b[a].pb()};p.Tk=function(){for(var a=0,b=this.Fb,c=b.length;a<c;++a)b[a].Tk()};p.zl=function(){for(var a=0,b=this.Fb,c=b.length;a<c;++a)b[a].zl()};u(Lj,tb);Lj.prototype.layout=
|
||
function(){tb.prototype.layout.call(this);this.g.Eb(this.width,this.height)};Lj.prototype.isActive=function(){return 0<this.g.opacity||this.Pd};Lj.prototype.show=function(a,b,c,d){this.g.opacity=0;this.C=a;this.u=void 0===b?null:b;this.speed=void 0===c?2:c;this.l=!0;this.app.screen.push(this,void 0===d?0:d)};Lj.prototype.update=function(a){var b=this.g,c=this.C;if(c&&1<=b.opacity&&this.l){this.C=null;var d=this.app.screen;d.clear();c();c=null;d.push(this)}if(c){if(1<(b.opacity+=this.speed*a))for(b.opacity=
|
||
1,a=this.app.screen;0<a.g.length&&a.g[0]!==this;)a.remove(a.g[0])}else 0>=(b.opacity-=this.speed*a)&&(b.opacity=0,this.app.screen.remove(this),a=this.u,this.u=null,a&&a())};u(dg,tb);dg.prototype.layout=function(){tb.prototype.layout.call(this);this.l.Eb(this.width,this.height)};dg.prototype.show=function(a){switch(a){case rI:case Fj:this.l.color=0;break;default:this.l.color=2130706432}this.g=a===Fj?.3:0;this.app.screen.push(this);return this};dg.prototype.update=function(a){this.app.input.Gi=-1;0<
|
||
this.g&&0>=(this.g-=a)&&(this.g=0,this.app.platform.$f())};var Fj=0,rI=1,Ug=3;u(xf,sa);xf.prototype.ob=function(a){a.flush();var b=a.X,c=this.Ca,d=this.Va,e=a.matrix,f=this.width,g=this.height;e=this.m.set(e.ub,e.vb,f*e.a+g*e.b,f*e.c+g*e.d);f=b.li;g=this.g;g=void 0===g?f:g;var l=f.z,n=f.w;if(0===l||0===n)l=g.set(0,0,0,0);else{var r=e.z,w=e.w;if(0===r||0===w)l=g.set(0,0,0,0);else{var y=f.x,A=f.y,H=e.x,I=e.y,O=Math.max(y,H),S=Math.max(A,I);l=g.set(O,S,Math.max(0,Math.min(y+l,H+r)-O),Math.max(0,Math.min(A+
|
||
n,I+w)-S))}}n=!l.Ha(e);r=c.bf;g=b.uh;w=l;y=a.Pl;A=a.viewport;y.length===a.pk&&y.push(new Xb);y[a.pk++].copy(A);A.Ha(w)||(a.flush(),A.copy(w),Aj(a.X,A.x,A.y,A.width,A.height));wD(a,l);n&&(w=this.o,y=w.elements,A=e.height,H=l.width,I=l.height,O=e.width/H,S=A/I,y[0]=O,y[1]=0,y[2]=0,y[3]=0,y[4]=0,y[5]=S,y[6]=0,y[7]=0,y[8]=0,y[9]=0,y[10]=1,y[11]=0,y[12]=O-1+2*(e.x-l.x)/H,y[13]=S-1+2*(l.y-e.y+I-A)/I,y[14]=0,y[15]=1,c.bf=w.mb(c.bf,w),ko(c));yD(a,c.zf);f.Ha(l)||ci(b,!0);this.clearColor&&di(b,!0,!0,!0,!0);
|
||
this.clearDepth&&(b.Kd(!0),fi(b,!0));this.clearStencil&&IC(b);b.clear(this.clearColor,this.clearDepth,this.clearStencil);this.app.Pj.ob(b,d,c);n&&(c.bf=r,ko(c));zD(a);xD(a);a.flush();c=a.viewport;d=a.Pl[--a.pk];c.Ha(d)||(a.flush(),c.copy(d),Aj(a.X,c.x,c.y,c.width,c.height));ci(b,g)};u(ul,sa);p=ul.prototype;p.nc=function(a){switch(a){case nf:case el:case bi:if(this.$a(arguments[2],arguments[3])){var b=this.x,c=this.y,d=this.qe;this.x+=d.x;this.y+=d.y;d=this.children;for(var e=d.length-1,f;0<=e;--e)if(f=
|
||
d[e],f.nc.apply(f,arguments))return this.x=b,this.y=c,!0;this.x=b;this.y=c;return this.A.apply(this,arguments)}if(this.app.input.Jb===this&&arguments[1]===this.pointerId)return sa.prototype.nc.apply(this,arguments);b=this.x;c=this.y;this.y=this.x=Infinity;d=sa.prototype.nc.apply(this,arguments);this.x=b;this.y=c;return d;default:return sa.prototype.nc.apply(this,arguments)}};p.update=function(a){if(-1===this.pointerId)this.g+=a;else{0>=a&&(a=.001);var b=this.D,c=this.u,d=this.l;d.scale(.2);d.x+=.8*
|
||
(c.x-b.x)/a;d.y+=.8*(c.y-b.y)/a;b.copy(c)}d=this.g;a=Math.exp(-d/.325);b=this.m;c=this.o;var e=this.Ck,f=this.C,g=Math.exp(-d/.125);d=f.x*g;f=f.y*g;g=-Math.max(0,e.width-this.width);e=-Math.max(0,e.height-this.height);var l=b.x-c.x*a;a=b.y-c.y*a;0<l?l=(1-1/(.55*l/d+1))*d:l<g&&(l=(1/(.55*(g-l)/d+1)-1)*d+g);0<a?a=(1-1/(.55*a/f+1))*f:a<e&&(a=(1/(.55*(e-a)/f+1)-1)*f+e);this.qe.set(l,a)};p.Af=function(a){a.flush();var b=a.matrix,c=this.width,d=this.height,e=this.K,f=a.X,g=f.uh,l=this.qe;e.set(b.ub,b.vb,
|
||
c*b.a+d*b.b,c*b.c+d*b.d);wD(a,e);ci(f,!0);Zg(a,this.P.set(1,0,0,1,l.x,l.y));sa.prototype.Af.call(this,a);vf(a);xD(a);ci(f,g)};p.scroll=function(a,b,c){(void 0===c?0:c)?(this.g=0,this.o.copy(this.m.set(a,b)).sub(this.qe)):(this.g=1E3,this.m.copy(this.qe.set(a,b)),this.o.set(0,0))};p.Wm=function(a,b,c){if(this.visible&&!this.app.input.Jb&&this.$a(b,c))return this.pointerId=a,this.app.input.Jb=this,a=this.u,eo(this,a.set(b,c)),this.H.copy(a),this.D.copy(a),this.m.copy(this.J.copy(this.qe)),this.o.set(0,
|
||
0),this.l.set(0,0),this.g=0,!0};p.fk=function(a){this.app.input.Jb===this&&a===this.pointerId&&(this.m.add(this.o.copy(this.l).scale(.2)),this.app.input.Jb=null,this.pointerId=-1,this.g=0)};p.Xm=function(a,b,c){if(a===this.pointerId){a=this.u;var d=this.J,e=this.H;eo(this,a.set(b,c));this.m.copy(this.qe.set(d.x+a.x-e.x,d.y+a.y-e.y));this.o.set(0,0);this.g=0}};p.sh=function(a,b){if(this.visible&&!this.app.input.Jb){var c=this.qe;this.m.copy(c.set(c.x-(void 0===a?0:a),c.y-(void 0===b?0:b)));this.o.set(0,
|
||
0);this.g=0}};u(Mj,ul);Mj.prototype.fk=function(a){if(this.app.input.Jb===this&&a===this.pointerId){a=this.qe;var b=this.l,c=this.Ve;this.scroll(Math.floor((a.x+.2*b.x)/(c.x||1)+.5)*c.x,Math.floor((a.y+.2*b.y)/(c.y||1)+.5)*c.y,!0);this.app.input.Jb=null;this.pointerId=-1;this.g=0}};Mj.prototype.scrollTo=function(a,b){var c=this.Ve;this.scroll(-a*c.x,-a*c.y,void 0===b?!1:b)};Mj.prototype.scrollLeft=function(a,b){this.scroll(Math.min(Math.max(this.m.x,-(a-1)*this.Ve.x)+this.Ve.x,0),0,void 0===b?!1:
|
||
b)};Mj.prototype.Se=function(){return Math.abs(Math.floor(this.qe.x/this.Ve.x+.5))};u(ib,ve);var Bk=lD;p=ib.prototype;p.L=function(a){this.visible=a;return this};p.Ra=function(a){this.x=a;return this};p.R=function(a){this.y=a;return this};p.be=function(a){this.z=a;return this};p.setPosition=function(a,b,c){this.x=a;this.y=b;this.z=c;return this};p.Bc=function(a){this.x=a.x;this.y=a.y;this.z=a.z;return this};p.xg=function(a){return a.set(this.x,this.y,this.z)};p.oj=function(a){this.x=a.x;this.y=a.y;
|
||
this.z=a.z;return this};p.Ia=function(a,b,c,d){this.ne=a;this.oe=b;this.pe=c;this.me=d;return this};p.Dd=function(a){return a.set(this.ne,this.oe,this.pe,this.me)};p.pf=function(a){return dh.set(this.ne,this.oe,this.pe,this.me).pf(a)};p.ci=function(a){return dh.set(this.ne,this.oe,this.pe,this.me).ci(a)};p.pg=function(a){return dh.set(this.ne,this.oe,this.pe,this.me).pg(a)};p.Cg=function(a,b,c,d){d=void 0===d?td:d;return yf(this,sI.Cg(jo.set(this.x,this.y,this.z),xQ.set(a,b,c),d).Dd(dh))};p.I=function(a,
|
||
b,c){a=dh.I(a,b,c);this.ne=a.x;this.oe=a.y;this.pe=a.z;this.me=a.w;return this};p.jl=function(a){return this.I(a.x,a.y,a.z)};p.Am=function(a){this.Db=a;return this};p.setScale=function(a,b,c){this.Db=a;this.Wc=void 0===b?a:b;this.cf=void 0===c?a:c;return this};p.Uj=function(a){this.Db=a.x;this.Wc=a.y;this.cf=a.z};p.setMatrix=function(a){var b=jo,c=dh,d=a.elements,e=d[0],f=d[1],g=d[2],l=d[4],n=d[5],r=d[6],w=d[8],y=d[9],A=d[10],H=a.elements;a=H[0];var I=H[1],O=H[2],S=H[3],R=H[4],ja=H[5],ka=H[6],ea=
|
||
H[7],ma=H[8],pa=H[9],va=H[10],Ka=H[11],Aa=H[12],Fa=H[13],xa=H[14];H=H[15];a=Math.sqrt(e*e+f*f+g*g)*(0<=(a*ja-I*R)*(va*H-Ka*xa)-(a*ka-O*R)*(pa*H-Ka*Fa)+(a*ea-S*R)*(pa*xa-va*Fa)+(I*ka-O*ja)*(ma*H-Ka*Aa)-(I*ea-S*ja)*(ma*xa-va*Aa)+(O*ea-S*ka)*(ma*Fa-pa*Aa)?1:-1);I=Math.sqrt(l*l+n*n+r*r);O=Math.sqrt(w*w+y*y+A*A);S=1/a;R=1/I;ja=1/O;Bt.set(a,I,O);b.set(d[12],d[13],d[14]);e*=S;f*=S;g*=S;l*=R;n*=R;r*=R;w*=ja;y*=ja;A*=ja;b=e+n+A;0<=b?(e=Math.sqrt(b+1),c.w=.5*e,e=.5/e,c.x=(r-y)*e,c.y=(w-g)*e,c.z=(f-l)*e):e>
|
||
n?e>A?(e=Math.sqrt(e-(n+A)+1),c.x=.5*e,e=.5/e,c.w=(r-y)*e,c.y=(f+l)*e,c.z=(g+w)*e):(e=Math.sqrt(A-(e+n)+1),c.z=.5*e,e=.5/e,c.w=(f-l)*e,c.x=(w+g)*e,c.y=(y+r)*e):n>A?(e=Math.sqrt(n-(A+e)+1),c.y=.5*e,e=.5/e,c.w=(w-g)*e,c.z=(r+y)*e,c.x=(l+f)*e):(e=Math.sqrt(A-(e+n)+1),c.z=.5*e,e=.5/e,c.w=(f-l)*e,c.x=(w+g)*e,c.y=(y+r)*e);this.Bc(jo);yf(this,dh);this.Uj(Bt);return this};p.U=function(){var a=this.ne,b=this.oe,c=this.pe,d=this.me,e=this.parent,f=e?sI:this.Oa,g=f.elements;if(0===a&&0===b&&0===c&&1===d)g[0]=
|
||
this.Db,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=this.Wc,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=this.cf;else{var l=a+a,n=b+b,r=c+c,w=a*l,y=a*n;a*=r;var A=b*n;b*=r;c*=r;l*=d;n*=d;d*=r;r=this.Db;var H=this.Wc,I=this.cf;1===r&&1===H&&1===I?(g[0]=1-(A+c),g[1]=y+d,g[2]=a-n,g[3]=0,g[4]=y-d,g[5]=1-(w+c),g[6]=b+l,g[7]=0,g[8]=a+n,g[9]=b-l,g[10]=1-(w+A)):(g[0]=(1-(A+c))*r,g[1]=(y+d)*r,g[2]=(a-n)*r,g[3]=0,g[4]=(y-d)*H,g[5]=(1-(w+c))*H,g[6]=(b+l)*H,g[7]=0,g[8]=(a+n)*I,g[9]=(b-l)*I,g[10]=(1-(w+A))*I)}g[11]=0;g[12]=this.x;
|
||
g[13]=this.y;g[14]=this.z;g[15]=1;e&&e.Oa.mb(f,this.Oa);e=0;f=this.children;for(g=f.length;e<g;++e)f[e].U()};p.sf=function(a){for(var b=this.children,c=0;c<b.length;++c)if(b[c].sf(a))return!0;return!1};p.i=function(a){null!==a.parent&&a.parent.removeChild(a);this.children.push(a);a.parent=this;a.A(Ae);return this};p.removeChild=function(a){var b=this.children,c=b.indexOf(a);-1!==c&&(a.parent=null,this.children=N(b,c),a.A(eh));return a};p.Vc=function(a){var b=this.children,c=b.indexOf(a);-1!==c&&(a.parent=
|
||
null,C(b,c),a.A(eh))};p.nc=function(a){for(var b=this.children,c=b.length-1,d;0<=c;--c)if(d=b[c],d.nc.apply(d,arguments))return!0;return this.A.apply(this,arguments)};Db.Object.defineProperties(ib.prototype,{visible:{configurable:!0,enumerable:!0,get:function(){return this.Rb},set:function(a){this.Rb!==a&&(this.Rb=a,this.A(wl,a))}}});var dh=new Ic,jo=new E,Bt=new E,xQ=new E,sI=new Tb,wl=qa++,Ae=qa++,eh=qa++;u(Gn,ib);Gn.prototype.U=function(){ib.prototype.U.call(this);var a=this.g;a&&$B(this.Oa,this.Bj,
|
||
a,this.j)};u(mi,ib);mi.prototype.Tj=function(a,b,c,d,e,f){this.left=a;this.right=b;this.top=c;this.bottom=d;this.j=e;this.g=f;this.type=Ct;return vl(this)};mi.prototype.gd=function(a,b,c,d){this.Pk=a;this.hj=b;this.j=c;this.g=d;this.type=LD;return vl(this)};mi.prototype.U=function(){ib.prototype.U.call(this);this.Oa.Fc(this.Ui);ko(this)};var Ct=0,LD=1,zL=2;u(Dt,we);p=Dt.prototype;p.cg=function(){we.prototype.cg.call(this);this.we=ii(this,"BATCHING")?30:0};p.Cf=function(a){this.Ja.alpha=a;return this};
|
||
p.ya=function(a){this.hb[0].Sa=a;return this};p.ab=function(a){this.hb[0].Vf=a;return this};p.Kd=function(a){this.hb[0].Qc=a;return this};p.tb=function(a){this.hb[0].cullFace=a;return this};var AL="\nattribute vec3 position;\nuniform mat4 projectionViewMatrix;\n#ifdef SKINNING\n attribute lowp vec2 skinIndex2;\n attribute vec2 skinWeight2;\n uniform mat4 bones[30];\n#else\n #ifdef BATCHING\n attribute lowp float batchIndex;\n uniform mat4 worldMatrix[30];\n #else\n uniform mat4 worldMatrix;\n #endif\n#endif\nattribute mediump vec2 uv;\nuniform mediump vec4 diffuseMapOR;\nvarying mediump vec2 vUv;\nvoid main() {\n #ifdef SKINNING\n vec4 skinVertex = vec4(position, 1.0);\n mat4 boneMatX = bones[int(skinIndex2.x)];\n mat4 boneMatY = bones[int(skinIndex2.y)];\n vec4 worldPosition = boneMatX * skinVertex * skinWeight2.x;\n worldPosition += boneMatY * skinVertex * skinWeight2.y;\n #else\n #ifdef BATCHING\n vec4 worldPosition = worldMatrix[int(batchIndex)] * vec4(position, 1.0);\n #else\n vec4 worldPosition = worldMatrix * vec4(position, 1.0);\n #endif\n #endif\n gl_Position = projectionViewMatrix * worldPosition;\n vUv = uv * diffuseMapOR.zw + diffuseMapOR.xy;\n}",
|
||
BL="\nprecision mediump float;\nvarying mediump vec2 vUv;\nuniform sampler2D diffuseMap;\nuniform lowp float alpha;\n#ifdef diffuseMapALPHA\n uniform sampler2D diffuseMapAlpha;\n#endif\n#ifdef ALPHATEST\n uniform float alphaTest;\n#endif\nvoid main() {\n lowp vec4 diffuseColor = texture2D(diffuseMap, vUv);\n #ifdef diffuseMapALPHA\n diffuseColor.a = texture2D(diffuseMapAlpha, vUv).r;\n #endif\n diffuseColor.a *= alpha;\n #ifdef ALPHATEST\n if (diffuseColor.a < alphaTest) discard;\n #endif\n gl_FragColor = diffuseColor;\n}";
|
||
u(ac,ib);ac.prototype.Ya=function(a,b){this.Ja[a]=b;return this};ac.prototype.kl=function(a){this.mh=a;return this};ac.prototype.U=function(){ib.prototype.U.call(this);this.Za.Tf.$h(this.Oa,this.Hh)};ac.prototype.sf=function(a){return a.ze(this.Hh)};u(Oa,ac);u(At,ib);u(Et,ac);p=Et.prototype;p.Ym=function(){this.g=!1};p.Qb=function(){return this.$d.loop||0<this.active||1!==this.time};p.U=function(){ac.prototype.U.call(this);this.$d.world&&(this.Oa.copy(gs),this.Hh.copy(this.Za.Tf))};p.update=function(a){for(var b=
|
||
this.$d,c=this.m,d=this.active,e,f,g,l=0;l<d;)e=c[l],g=e.time+=a*e.ce,1<=g?(c[l]=c[--d],c[d]=e):(f=e.speed.value(g)*a,e.x+=e.Wb.value(g)*f,e.y+=e.Xb.value(g)*f,e.z+=e.Nd.value(g)*f,++l);1<=(this.time+=a*this.ce)&&(b.loop?(this.time%=1,b.Ad.Pa(this.Ad),b.Bd.Pa(this.Bd),b.Yf.Pa(this.Yf)):this.time=1);l=this.time;var n=this.Ad.value(l),r=this.Bd.value(l),w=this.Yf.value(l);if(1>l){a=this.j+a;e=sj(b.rate,l);var y=1/e,A=b.lh,H=b.world,I=(g=this.g)?this.parent.Oa:this.Oa,O=b.Gj,S=b.Zj,R=b.Wb,ja=b.Xb,ka=
|
||
b.Nd,ea=b.Ah,ma=b.Mi,pa=b.speed,va=b.size,Ka=b.rotation,Aa=b.color,Fa=b.alpha;b=b.count;0>=e&&(y=2147483647,a=0);for(g||ac.prototype.U.call(this);a>y;)if(a-=y,d<b&&(e=c[d],e.time=0,e.ce=1/(Math.max(0,sj(O,l))||1E-7),g=e.time+=a*e.ce,1>g)){++d;switch(ea){case 2:A.tg(e,!1);R.Pa(e.Wb);ja.Pa(e.Xb);ka.Pa(e.Nd);e.speed.ea(1);break;case 1:A.tg(e,!0);pa.Pa(e.speed);break;default:A.tg(e,!0),e.speed.ea(sj(S,l))}H&&I.transformPoint(e,e);f=e.speed.value(g)*a;e.x+=n+e.Wb.value(g)*f;e.y+=r+e.Xb.value(g)*f;e.z+=
|
||
w+e.Nd.value(g)*f;va.Pa(e.size);ma===rt&&Ka.Pa(e.rotation);Aa.Pa(e.color);Fa.Pa(e.alpha)}this.j=a}this.active=d;if(0<d){a=this.Ti;A=y=0;b=Infinity;l=-Infinity;n=Infinity;r=-Infinity;w=Infinity;f=-Infinity;H=(this.g?this.parent.Oa:this.Oa).elements;e=H[0];g=H[1];H=H[2];H=Math.sqrt(e*e+g*g+H*H);I=0;for(O=a.data;I<d;++I)for(e=c[I],g=e.time,S=e.size.value(g)*H,R=1.42*S,R>A&&(A=R),R=e.x,R<b&&(b=R),R>l&&(l=R),ja=e.y,ja<n&&(n=ja),ja>r&&(r=ja),ka=e.z,ka<w&&(w=ka),ka>f&&(f=ka),e.color.value(g,bq),ea=bq.x,
|
||
ma=bq.y,pa=bq.z,va=e.alpha.value(g),e=e.rotation.value(g),g=0;4>g;++g)O[y++]=R,O[y++]=ja,O[y++]=ka,O[y++]=ea,O[y++]=ma,O[y++]=pa,O[y++]=va,O[y++]=S,O[y++]=e;a.upload(y);b-=A;l+=A;n-=A;r+=A;w-=A;f+=A;c=l-b;e=r-n;g=f-w;this.Za.Tf.set(.5*(l+b),.5*(r+n),.5*(f+w),.5*Math.sqrt(c*c+e*e+g*g))}this.Za.Kb.sg=6*d};p.pb=function(){var a=this.$d;this.active=this.time=this.j=0;this.ce=1/(a.duration||1);a.Ad.Pa(this.Ad);a.Bd.Pa(this.Bd);a.Yf.Pa(this.Yf)};var bq=new E;u(Nj,we);Nj.prototype.setWorld=function(a){a?
|
||
sf(this,"USE_WORLD_MATRIX"):this.define("USE_WORLD_MATRIX");return this};Nj.prototype.ya=function(a){this.hb[0].Sa=a;return this};Nj.prototype.Kd=function(a){this.hb[0].Qc=a;return this};var FL="attribute mediump vec2 uv;\nattribute vec3 position;\nattribute vec2 sr;\nattribute lowp vec4 pcolor;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\n#ifdef USE_WORLD_MATRIX\n uniform mat4 worldMatrix;\n#endif\nvarying lowp vec4 vColor;\nvarying mediump vec2 vUv;\nuniform mediump vec4 diffuseMapOR;\nvoid main() {\n vColor = pcolor;\n vUv = uv * diffuseMapOR.zw + diffuseMapOR.xy;\n vec2 scaledPosition = vec2(uv.x * 2.0 - 1.0, 1.0 - 2.0 * uv.y) * sr.x;\n float sinA = sin(sr.y);\n float cosA = cos(sr.y);\n vec4 worldPosition = vec4(cosA * scaledPosition.x - sinA * scaledPosition.y, sinA * scaledPosition.x + cosA * scaledPosition.y, 0.0, 0.0);\n #ifdef USE_WORLD_MATRIX\n worldPosition += viewMatrix * worldMatrix * vec4(position, 1.0);\n #else\n worldPosition += viewMatrix * vec4(position, 1.0);\n #endif\n gl_Position = projectionMatrix * worldPosition;\n}",
|
||
GL="precision mediump float;\nvarying lowp vec4 vColor;\nuniform lowp vec4 color;\nuniform sampler2D diffuseMap;\nvarying mediump vec2 vUv;\n#ifdef diffuseMapALPHA\n uniform sampler2D diffuseMapAlpha;\n#endif\nvoid main() {\n lowp vec4 diffuseColor = color * vColor;\n diffuseColor *= texture2D(diffuseMap, vUv);\n #ifdef diffuseMapALPHA\n diffuseColor.a *= texture2D(diffuseMapAlpha, vUv).r;\n #endif\n if (diffuseColor.a == 0.0) discard;\n gl_FragColor = diffuseColor;\n}";
|
||
u(wb,ib);p=wb.prototype;p.Zm=function(a){for(var b=0,c=this.Fb,d=c.length,e;b<d;++b)e=c[b],e.visible=a&&e.$d.visible};p.setColor=function(a){if("number"===typeof a)wn(this.Oc,a);else{this.Oc=a;for(var b=0,c=this.Fb,d=c.length,e;b<d;++b)e=c[b],e.Ja.color=a}return this};p.Da=function(a){this.j=a;for(var b=0,c=this.Fb,d=c.length;b<d;++b)c[b].pa.Da(a);return this};p.kl=function(a){this.g=a;for(var b=0,c=this.Fb,d=c.length;b<d;++b)c[b].mh=a;return this};p.Qb=function(){for(var a=0,b=this.Fb,c=b.length;a<
|
||
c;++a)if(b[a].Qb())return!0;return!1};p.update=function(a){for(var b=0,c=this.Fb,d=c.length;b<d;++b)c[b].update(a)};p.pb=function(){for(var a=0,b=this.Fb,c=b.length;a<c;++a)b[a].pb()};u(ze,ac);ze.prototype.Oj=function(a,b){a=this.app.screen.Tl;var c=this.g,d=c.color,e=this.pa,f=this.m;a.flush();yD(a,b.zf.mb(this.Oa,this.j));AD(a,f);b=0;e=e.hb;f=e.length;for(var g;b<f;++b){g=e[b];bo(a,g.Sa||Xp);var l=a,n=g.Qc;l.ua[l.Bb++]=l.g;l.g!==n&&(l.flush(),l.g=n);l=a;n=g.$e;g=g.af;var r=l.Mb;r.length===l.H&&
|
||
r.push(new kb(0,0));var w=l.D;r[l.H++].copy(w);if(w.x!==n||w.y!==g)l.flush(),w.set(n,g);c.visible&&(null===d||0<d.w)&&(Zg(a,c.matrix),null!==d&&BD(a,d),l=c.Sa,null!==l&&bo(a,l),c.ob(a),c.Af(a),null!==l&&co(a),null!==d&&tt(a),vf(a));a.flush();l=a;n=l.D;g=l.Mb[--l.H];if(n.x!==g.x||n.y!==g.y)l.flush(),n.copy(g);l=a;n=l.g;g=l.ua[--l.Bb];n!==g&&(l.flush(),l.g=g);co(a)}vf(a);zD(a)};u(Oj,ib);p=Oj.prototype;p.pc=function(){ib.prototype.pc.call(this);this.wd=null;this.m=this.j=!1;this.Z=void 0;this.l=1E4;
|
||
this.o="linear";this.Nh=this.O=this.C=1;this.u=!1};p.gk=function(){this.app.audio.de.push(this)};p.hk=function(){J(this.app.audio.de,this);this.g&&this.g.stop()};p.play=function(a,b,c){b=void 0===b?!1:b;this.g&&this.g.stop();this.wd=a;this.j=b;this.m=!1;this.Z=c;return this};p.Qb=function(){return this.j||!this.m||this.g};p.Df=function(a){this.l=a;this.g&&(this.g.maxDistance=a);return this};p.wh=function(a){this.o=a;this.g&&(this.g.distanceModel=a);return this};p.ml=function(a){this.O=a;this.g&&(this.g.rolloffFactor=
|
||
a);return this};p.zh=function(a){this.C=a;this.g&&(this.g.refDistance=a);return this};p.df=function(a){this.Nh=a;this.g&&(this.g.volume=a);return this};p.yh=function(a){this.u=a;this.g&&(this.g.muted=a);return this};p.ng=function(){if(this.parent)if(this.j){var a=ni(this,hw).distance(this.app.audio.om),b=this.l;a<=b?(a=this.g,a||(a=this.g=iC(this.app.audio,this.wd,!0,this.Z).Df(b).wh(this.o).zh(this.C).ml(this.O).df(this.Nh).yh(this.u).on($n,this.D)),a.Bc(ni(this,hw))):this.g&&this.g.stop()}else(b=
|
||
this.g)||this.m||(this.m=!0,b=this.g=iC(this.app.audio,this.wd,!1,this.Z).Df(this.l).wh(this.o).zh(this.C).ml(this.O).df(this.Nh).yh(this.u).on($n,this.D)),b&&b.Bc(ni(this,hw))};var hw=new E;u(Ft,E);Ft.prototype.search=function(a,b){b=void 0===b?tI.reset():b;for(var c=this.Zd,d=0;d<c.length;++d){var e=c[d],f=es(a,this,e);f<b.distance&&(b.distance=f,b.ue=this,b.Kf=e);e.search(a,b)}return b};ND.prototype.apply=function(a){for(var b=this.points,c=0;c<b.length;++c){var d=b[c];a.transformPoint(d.local,
|
||
d);var e=d.ph;e&&a.Gf(e,d.direction);(e=d.qh)?a.Gf(e,d.lc):d.lc.set(0,0,0)}for(c=0;c<b.length;++c)d=b[c],0===d.eg.length&&(d.qh||a.Gf(td,d.lc),d.ph||a.Gf(Ce,d.direction),OD(this,d));for(a=0;a<b.length;++a)b[a].lc.normalize()};var Gt=new E,HL=new Ic;PD.prototype.reset=function(){this.distance=Infinity;this.Kf=this.ue=null;return this};var tI=new PD;xl.prototype.add=function(a){var b=this.M;if(-1===b.indexOf(a)){b.push(a);b=this.g;var c=this.j;a=a.points;for(var d=0;d<a.length;++d){var e=a[d];0===e.eg.length&&
|
||
b.push(e);0===e.Zd.length&&c.push(e)}}return this};xl.prototype.remove=function(a){var b=this.M,c=b.indexOf(a);if(-1!==c){C(b,c);b=this.g;c=this.j;a=a.points;for(var d=0;d<a.length;++d){var e=a[d];0===e.Zd.length&&J(c,e);0===e.eg.length&&J(b,e)}}return this};xl.prototype.search=function(a,b){b=void 0===b?tI.reset():b;for(var c=this.g,d=0;d<c.length;++d)c[d].search(a,b);return b};xl.prototype.Hd=function(a,b,c){b=void 0===b||b?zl(this,a):Al(this,a);if(0===b.length)return null;if(c){for(var d=b[0],
|
||
e=es(c,a,d),f=1;f<b.length;++f){var g=b[f],l=es(c,a,g);l<e&&(e=l,d=g)}return d}return b[0]};var yl=new E,QD=new E,lo=new E;Bl.prototype.ob=function(a,b,c){b.fe&&(b.U(),c.parent||c.U());var d=c.zf.elements;this.C=d[2];this.O=d[6];this.Z=d[10];this.u=d[14];this.od=c.od;Tc[0].set(-1,-1,-1);Tc[1].set(1,-1,-1);Tc[2].set(-1,1,-1);Tc[3].set(1,1,-1);Tc[4].set(-1,-1,1);Tc[5].set(1,-1,1);Tc[6].set(-1,1,1);Tc[7].set(1,1,1);for(var e=c.zf.Fc(yc),f=0;8>f;++f)aC(e,Tc[f]);var g=uI.copy(Tc[0]).add(Tc[1]).add(Tc[2]).add(Tc[3]).scale(.25),
|
||
l=vI.copy(Tc[4]).add(Tc[5]).add(Tc[6]).add(Tc[7]).scale(.25),n=Xi.copy(l).sub(g);n.normalize();for(var r=Tc[0],w=r,y=n.dot(r),A=y,H=1;8>H;++H){var I=Tc[H],O=n.dot(I);O<y&&(y=O,r=I);O>A&&(A=O,w=I)}var S=yQ.copy(r).sub(g);Uh(g,n,S.dot(n),S);var R=zQ.copy(w).sub(l);Uh(l,n,R.dot(n),R);for(var ja=ds(n,AQ),ka=S.distance(R),ea=n.scale(this.focus,BQ).add(g).distance(S),ma=(ka*ea+ka*ea*-.6)/(ka-2*ea- -.6*ka),pa=Uh(S,n,-ma,CQ),va=0;8>va;++va){var Ka=Tc[va];iw[va].set(Ka.x-pa.x,Ka.y-pa.y).normalize()}var Aa=
|
||
iw[0],Fa=Aa;y=A=ja.dot(Aa);for(var xa=1;8>xa;++xa){var Ja=iw[xa],La=ja.dot(Ja);La>A&&(A=La,Fa=Ja);La<y&&(y=La,Aa=Ja)}var Ha=Math.tan(Math.acos(Fa.dot(n))),Gb=Math.tan(Math.acos(Aa.dot(n))),qc=Uh(Am.copy(R),ja,-Gb*(ma+ka));Uh(Bm.copy(R),ja,Ha*(ma+ka));Uh(jw.copy(S),ja,Ha*ma);var Nb=Uh(kw.copy(S),ja,-Gb*ma),pb=yc.elements,oa=Fh.elements;pb[0]=1;pb[1]=0;pb[2]=0;pb[3]=0;pb[4]=0;pb[5]=1;pb[6]=0;pb[7]=0;pb[8]=0;pb[9]=0;pb[10]=1;pb[11]=0;pb[12]=-S.x;pb[13]=-S.y;pb[14]=0;pb[15]=1;oa[0]=-ja.x;oa[1]=ja.y;oa[2]=
|
||
0;oa[3]=0;oa[4]=-ja.y;oa[5]=-ja.x;oa[6]=0;oa[7]=0;oa[8]=0;oa[9]=0;oa[10]=1;oa[11]=0;oa[12]=0;oa[13]=0;oa[14]=0;oa[15]=1;Fh.mb(yc,yc);Vh(yc,Ld.set(pa.x,pa.y,0,1));oa[0]=1;oa[1]=0;oa[2]=0;oa[3]=0;oa[4]=0;oa[5]=1;oa[6]=0;oa[7]=0;oa[8]=0;oa[9]=0;oa[10]=1;oa[11]=0;oa[12]=-Ld.x;oa[13]=-Ld.y;oa[14]=0;oa[15]=1;Fh.mb(yc,yc);Vh(yc,Ld.set(S.x,S.y,0,1));oa[0]=1;oa[1]=0;oa[2]=0;oa[3]=0;oa[4]=-Ld.x/Ld.y;oa[5]=1;oa[6]=0;oa[7]=0;oa[8]=0;oa[9]=0;oa[10]=1;oa[11]=0;oa[12]=0;oa[13]=0;oa[14]=0;oa[15]=1;Fh.mb(yc,yc);Vh(yc,
|
||
Ld.set(Nb.x,Nb.y,0,1));oa[0]=1/Ld.x;oa[1]=0;oa[2]=0;oa[3]=0;oa[4]=0;oa[5]=1/Ld.y;oa[6]=0;oa[7]=0;oa[8]=0;oa[9]=0;oa[10]=1;oa[11]=0;oa[12]=0;oa[13]=0;oa[14]=0;oa[15]=1;Fh.mb(yc,yc);oa[0]=1;oa[1]=0;oa[2]=0;oa[3]=0;oa[4]=0;oa[5]=1;oa[6]=0;oa[7]=1;oa[8]=0;oa[9]=0;oa[10]=1;oa[11]=0;oa[12]=0;oa[13]=1;oa[14]=0;oa[15]=0;Fh.mb(yc,yc);Vh(yc,Ld.set(qc.x,qc.y,0,1));Vh(yc,lw.set(Nb.x,Nb.y,0,1));oa[0]=1;oa[1]=0;oa[2]=0;oa[3]=0;oa[4]=0;oa[5]=1;oa[6]=0;oa[7]=0;oa[8]=0;oa[9]=0;oa[10]=1;oa[11]=0;oa[12]=0;oa[13]=-.5*
|
||
(Ld.y/Ld.w+lw.y/lw.w);oa[14]=0;oa[15]=1;Fh.mb(yc,yc);Vh(yc,Ld.set(qc.x,qc.y,0,1));oa[0]=1;oa[1]=0;oa[2]=0;oa[3]=0;oa[4]=0;oa[5]=Ld.w/Ld.y;oa[6]=0;oa[7]=0;oa[8]=0;oa[9]=0;oa[10]=1;oa[11]=0;oa[12]=0;oa[13]=0;oa[14]=0;oa[15]=1;Fh.mb(yc,yc);this.l.Tj(-1,1,-1,1,-100,100).mb(yc);UD.set(Xi.x,Xi.y,0,-uI.dot(Xi));VD.set(-Xi.x,-Xi.y,0,vI.dot(Xi));ds(Am.sub(kw).normalize());WD.set(Am.x,Am.y,0,-kw.dot(Am));ds(Bm.sub(jw).normalize());XD.set(-Bm.x,-Bm.y,0,jw.dot(Bm));this.g=this.m=0;TD(this,b);var B=this.j.Ea,
|
||
X=a.uh,ia=this.viewport.copy(a.viewport),ya=this.clearColor.copy(a.clearColor);Ds(a,B,!0);Aj(a,0,0,B.width,B.height);ci(a,!1);As(a,0,0,0,0);a.clear(!0,!0);if(0<this.g){var eb=this.o,Jb=this.g,hc=-1,$b=-1,nd=this.l,Nc=-1,Zd=-1,vd=0,Mf,sk,zm;ca(eb,0,Jb-1,this.J);ei(a,!1);a.Kd(!0);fi(a,!0);for(var Mi=0;Mi<Jb;){var me=eb[Mi],Ni=me.object,ug=me.pa,vg=me.Ze;if(hc!==vg.id){hc=vg.id;a.tb(vg.cullFace);var Oi=vg.Cb;$b!==Oi.id&&($b=Oi.id,a.cb(Oi),a.Ya("projectionViewMatrix",nd));pf(a,ug.Ja)}var Nf=me.Za,tk=
|
||
Nf.attributes,ne=Nf.Kb;if(Nc!==Nf.id){Nc=Nf.id;a.Jd(tk);ne&&Bj(a,ne);var $e=Nf.bh}if(0<$e&&0<ug.we){-1===Zd&&(Zd=Math.min($e,ug.we));var oe=Nf.vk,$d=Ni.Ja;for(Mf in $d){var oc=$d[Mf],wg=oc.size||1,wd=oe[Mf]||(oe[Mf]=[]),Id=vd*wg;switch(wg){case 16:var uk=0;for(sk=oc.elements;16>uk;++uk)wd[Id++]=sk[uk];break;case 4:wd[Id++]=oc.x;wd[Id++]=oc.y;wd[Id++]=oc.z;wd[Id++]=oc.w;break;case 3:wd[Id++]=oc.x;wd[Id++]=oc.y;wd[Id++]=oc.z;break;case 2:wd[Id++]=oc.x;wd[Id++]=oc.y;break;case 1:wd[Id++]=oc}}++vd;if(++Mi<
|
||
Jb&&(me=eb[Mi])&&me.bc===hc&&me.Ec===Nc&&vd<Zd)continue;else{var Ah=vd*ne.data.length/$e;Zd=-1;vd=0;pf(a,oe)}}else{ne?Ah=0>ne.sg?ne.data.length:ne.sg:Ah=(zm=tk.position)?zm.eb.data.length/(zm.stride>>2||3):0;++Mi;if(0===Ah)continue;pf(a,Ni.Ja)}ne?Qg(a,vg.fg,!0,ne.Fk,Ah):Qg(a,vg.fg,!1,0,Ah)}this.filter(a,this.j,this.D,RD);this.filter(a,this.D,this.j,SD)}Ds(a,null);Aj(a,ia.x,ia.y,ia.width,ia.height);As(a,ya.r,ya.mi,ya.b,ya.a);ci(a,X);var vk=this.M,wk=this.m;ca(vk,0,wk-1,this.H);for(var Pb,Bh,xk,Pi=
|
||
-1,Oc,pe,Ge=-1,xg,Qi=c.bf,af=c.Ui,Ri=c.zf,Zp=this.l,Ch=this.j,yg=-1,xd,Si,qe,Ti,od=-1,Dh=0,zg,yd,Jd,Ui,Kd,Vi,Eh,bf,Wi,ed,yk,He=0;He<wk;)if(Pb=vk[He],Bh=Pb.object,Pb.object=null,Bh.Oj)Pi=Ge=yg=-1,Pb.pa=Pb.Ze=Pb.Za=null,Bh.Oj(a,c),++He;else{xk=Pb.pa;Pb.pa=null;Oc=Pb.Ze;Pb.Ze=null;Pi!==Oc.id&&(Pi=Oc.id,pe=Oc.Sa||Xp,pe.enabled?(ei(a,!0),Bs(a,pe.Kk,pe.Lk),Cs(a,pe.src,pe.Hk,pe.ql,pe.Ik)):ei(a,!1),Oc.Qc?(a.Kd(!0),a.il(Oc.depthFunc)):a.Kd(!1),fi(a,Oc.Vf),Oc.nj?di(a,!0,!0,!0,!0):di(a,!1,!1,!1,!1),a.tb(Oc.cullFace),
|
||
a.td(Oc.$e,Oc.af),xg=Oc.Cb,Ge!==xg.id&&(Ge=xg.id,a.cb(xg),a.Ya("projectionMatrix",Qi),a.Ya("viewMatrix",af),a.Ya("projectionViewMatrix",Ri),a.Ya("shadowMapMatrix",Zp),a.Ya("shadowMap",Ch),yg=-1),pf(a,xk.Ja));xd=Pb.Za;Pb.Za=null;Si=xd.attributes;qe=xd.Kb;yg!==xd.id&&(yg=xd.id,a.Jd(Si),qe&&Bj(a,qe),Ti=xd.bh);if(0<Ti&&0<xk.we){-1===od&&(od=Math.min(Ti,xk.we));zg=xd.vk;Ui=Bh.Ja;for(Vi in Ui)switch(Kd=Ui[Vi],Eh=Kd.size||1,yd=zg[Vi]||(zg[Vi]=[]),Jd=Dh*Eh,Eh){case 16:Wi=0;for(bf=Kd.elements;16>Wi;++Wi)yd[Jd++]=
|
||
bf[Wi];break;case 4:yd[Jd++]=Kd.x;yd[Jd++]=Kd.y;yd[Jd++]=Kd.z;yd[Jd++]=Kd.w;break;case 3:yd[Jd++]=Kd.x;yd[Jd++]=Kd.y;yd[Jd++]=Kd.z;break;case 2:yd[Jd++]=Kd.x;yd[Jd++]=Kd.y;break;case 1:yd[Jd++]=Kd}++Dh;if(++He<wk&&(Pb=vk[He])&&Pb.bc===Pi&&Pb.Ec===yg&&Dh<od)continue;else ed=Dh*qe.data.length/Ti,od=-1,Dh=0,pf(a,zg)}else{qe?ed=0>qe.sg?qe.data.length:qe.sg:ed=(yk=Si.position)?yk.eb.data.length/(yk.stride>>2||3):0;++He;if(0===ed)continue;pf(a,Bh.Ja)}qe?Qg(a,Oc.fg,!0,qe.Fk,ed):Qg(a,Oc.fg,!1,0,ed)}};Bl.prototype.filter=
|
||
function(a,b,c,d){Ds(a,c.Ea);Aj(a,0,0,c.Ea.width,c.Ea.height);ei(a,!1);a.Kd(!1);fi(a,!1);a.tb(Mn);a.cb(d);a.Ya("source",b);a.Jd(wI.attributes);Bj(a,wI.Kb);Qg(a,Yn,!0,0,6)};Bl.prototype.H=function(a,b){return a.qc!==b.qc?a.qc-b.qc:a.qc<iI?a.bc!==b.bc?a.bc-b.bc:a.Ec!==b.Ec?a.Ec-b.Ec:a.z-b.z:a.z!==b.z?b.z-a.z:a.bc-b.bc};Bl.prototype.J=function(a,b){return a.bc!==b.bc?a.bc-b.bc:a.Ec!==b.Ec?a.Ec-b.Ec:a.z-b.z};var Cl=0,Tc=[new dc,new dc,new dc,new dc,new dc,new dc,new dc,new dc],yc=new Tb,Fh=new Tb,BQ=
|
||
new kb,Ld=new dc,lw=new dc,uI=new kb,vI=new kb,Xi=new kb,yQ=new kb,zQ=new kb,AQ=new kb,CQ=new kb,Am=new kb,Bm=new kb,jw=new kb,kw=new kb,iw=[new kb,new kb,new kb,new kb,new kb,new kb,new kb,new kb],UD=new ce,VD=new ce,WD=new ce,XD=new ce,mw=new Dd;mw.attributes.position=new Yb([-1,-1,1,-1,1,1,-1,1]);mw.Kb=new de([0,1,2,0,2,3]);var wI=mw;var RD=new sd("attribute vec2 position;\n varying mediump vec2 uv;\n void main() {\n uv = position * 0.5 + 0.5;\n gl_Position = vec4(position, 0.0, 1.0);\n }",
|
||
"precision mediump float;\n uniform sampler2D source;\n varying mediump vec2 uv;\n void main() {\n const vec2 offset = vec2(1.3333333333333333 / 512.0, 0.0);\n lowp vec4 color = vec4(0.0);\n color += texture2D(source, uv) * 0.29411764705882354;\n color += texture2D(source, uv + offset) * 0.35294117647058826;\n color += texture2D(source, uv - offset) * 0.35294117647058826;\n gl_FragColor = color;\n }"),SD=new sd("attribute vec2 position;\n varying mediump vec2 uv;\n void main() {\n uv = position * 0.5 + 0.5;\n gl_Position = vec4(position, 0.0, 1.0);\n }",
|
||
"precision mediump float;\n uniform sampler2D source;\n varying mediump vec2 uv;\n void main() {\n const vec2 offset = vec2(0.0, 1.3333333333333333 / 512.0);\n lowp vec4 color = vec4(0.0);\n color += texture2D(source, uv) * 0.29411764705882354;\n color += texture2D(source, uv + offset) * 0.35294117647058826;\n color += texture2D(source, uv - offset) * 0.35294117647058826;\n gl_FragColor = color;\n }"),DQ=Vg+6,cq=Vg+7,eP=Vg+6,EQ=Vg+5,dq=Vg+3,vi=
|
||
Vg+2,xI=Vg+1;u(na,we);p=na.prototype;p.Cf=function(a){this.Ja.alpha=a;return this};p.cg=function(){we.prototype.cg.call(this);this.we=0;if(!ii(this,"SKINNING")&&ii(this,"BATCHING")){var a=24;ii(this,"COLOR")&&(a-=4);ii(this,"ALPHA")&&--a;ii(this,"SHINE")&&--a;this.we=a}};p.ya=function(a){this.hb[0].Sa=a;return this};p.ab=function(a){this.hb[0].Vf=a;return this};p.il=function(a){this.hb[0].depthFunc=a};p.Kd=function(a){this.hb[0].Qc=a;return this};p.tb=function(a){this.hb[0].cullFace=a;var b=this.ig[Cl];
|
||
b&&(b.cullFace=a);return this};p.td=function(a,b){var c=this.hb[0];c.$e=void 0===a?0:a;c.af=void 0===b?0:b;return this};var kd=1,Jc=2,Wb=4,IL=15,Gd=16,qo=32,tc=64,JL=240,YD="\nattribute vec3 position;\nuniform mat4 projectionViewMatrix;\n\n#ifdef SKINNING\n attribute lowp vec2 skinIndex2;\n attribute vec2 skinWeight2;\n uniform mat4 bones[29];\n#else\n #ifdef BATCHING\n uniform mat4 worldMatrix[24];\n #else\n uniform mat4 worldMatrix;\n #endif\n#endif\n\n#ifdef BATCHING\n attribute lowp float batchIndex;\n\n #ifdef COLOR\n uniform lowp vec4 color[24];\n varying lowp vec4 vColor;\n #endif\n\n #ifdef ALPHA\n uniform lowp float alpha[24];\n varying lowp float vAlpha;\n #endif\n\n #ifdef SHINE\n uniform mediump float shine[24];\n varying mediump float vShine;\n #endif\n#endif\n\n#ifndef NODIFFUSEUV\n attribute mediump vec2 uv;\n uniform mediump vec4 diffuseMapOR;\n varying mediump vec2 vUv;\n#endif\n\n#ifdef SHADOWMAP\n varying mediump vec4 vShadowMap;\n uniform mat4 shadowMapMatrix;\n#endif\n\n#ifdef TRAIL\n attribute lowp float trailAlpha;\n varying lowp float vTrailAlpha;\n#endif\n\nvoid main() {\n #ifdef SKINNING\n vec4 skinVertex = vec4(position, 1.0);\n mat4 boneMatX = bones[int(skinIndex2.x)];\n mat4 boneMatY = bones[int(skinIndex2.y)];\n vec4 worldPosition = boneMatX * skinVertex * skinWeight2.x;\n worldPosition += boneMatY * skinVertex * skinWeight2.y;\n #else\n #ifdef BATCHING\n int iBatchIndex = int(batchIndex);\n vec4 worldPosition = worldMatrix[iBatchIndex] * vec4(position, 1.0);\n #ifdef COLOR\n vColor = color[iBatchIndex];\n #endif\n #ifdef ALPHA\n vAlpha = alpha[iBatchIndex];\n #endif\n #ifdef SHINE\n vShine = shine[iBatchIndex];\n #endif\n #else\n #ifdef TRAIL\n vec4 worldPosition = vec4(position, 1.0);\n #else\n vec4 worldPosition = worldMatrix * vec4(position, 1.0);\n #endif\n #endif\n #endif\n\n #ifndef NODIFFUSEUV\n vUv = uv * diffuseMapOR.zw + diffuseMapOR.xy;\n #endif\n \n #ifdef SHADOWMAP\n vShadowMap = shadowMapMatrix * worldPosition;\n #endif\n\n #ifdef TRAIL\n vTrailAlpha = trailAlpha;\n #endif\n\n gl_Position = projectionViewMatrix * worldPosition;\n}",
|
||
ZD="\nprecision mediump float;\n\n#ifdef CASTER\n uniform lowp vec4 caster;\n#else\n #ifdef SHADOWMAP\n uniform sampler2D shadowMap;\n varying mediump vec4 vShadowMap;\n uniform vec4 receiver;\n #endif\n #ifndef SHADOW\n uniform sampler2D backgroundMap;\n uniform vec4 fov;\n #ifndef INNER\n #ifndef NODIFFUSEMAP\n uniform sampler2D diffuseMap;\n #ifdef diffuseMapALPHA\n uniform sampler2D diffuseMapAlpha;\n #endif\n #endif\n #ifndef NODIFFUSEUV\n varying mediump vec2 vUv;\n #endif\n #ifdef BATCHING\n #ifdef COLOR\n varying lowp vec4 vColor;\n #endif\n #ifdef ALPHA\n varying lowp float vAlpha;\n #endif\n #ifdef SHINE\n varying lowp float vShine;\n #endif\n #else\n #ifdef COLOR\n uniform lowp vec4 color;\n #endif\n #ifdef ALPHA\n uniform lowp float alpha;\n #endif\n #ifdef SHINE\n uniform float shine;\n #endif\n #endif\n #ifdef ALPHATEST\n uniform float alphaTest;\n #endif\n #ifdef TRAIL\n varying lowp float vTrailAlpha;\n #endif\n uniform vec4 fog;\n #endif\n #endif\n#endif\n\nvoid main() {\n #ifdef CASTER\n gl_FragColor = caster;\n #else\n #ifdef SHADOW\n vec4 shadow = texture2D(shadowMap, (vShadowMap.xy / vShadowMap.w) * 0.5 + 0.5);\n float shadowFactor = dot(shadow, receiver);\n gl_FragColor = vec4(0, 0, 0, 0.4 * min(1.0, shadowFactor));\n #else\n vec4 backgroundColor = texture2D(backgroundMap, vec2(gl_FragCoord.x * fov.x + fov.y, gl_FragCoord.y * fov.z + fov.w));\n #ifdef INNER\n float innerFactor = smoothstep(220.0, 300.0, gl_FragCoord.z / gl_FragCoord.w);\n lowp vec4 innerColor = vec4(0.0, 0.0, 0.0, innerFactor); \n if (innerColor.a < 0.001) discard;\n float backFactor = smoothstep(310.0, 360.0, gl_FragCoord.z / gl_FragCoord.w);\n gl_FragColor = mix(innerColor, backgroundColor, backFactor);\n #else\n lowp vec4 diffuseColor = vec4(1.0, 1.0, 1.0, 1.0);\n #ifndef NODIFFUSEMAP\n diffuseColor = texture2D(diffuseMap, vUv);\n #ifdef diffuseMapALPHA\n diffuseColor.a = texture2D(diffuseMapAlpha, vUv).r;\n #endif\n #endif\n #ifdef COLOR\n #ifdef BATCHING\n diffuseColor *= vColor;\n #else\n diffuseColor *= color;\n #endif\n #endif\n #ifdef TRAIL\n diffuseColor.a *= vTrailAlpha;\n #endif\n #ifdef SHINE\n float shineValue = 0.0;\n #ifdef BATCHING\n shineValue = vShine;\n #else\n shineValue = shine;\n #endif\n diffuseColor.a *= 0.3 * sin(50.0 * vUv.y - shineValue);\n #endif\n #ifdef LIGHTUP\n float t = (vUv.y - 0.0103) * 1.0175 * (1.0 - smoothstep(220.0, 300.0, gl_FragCoord.z / gl_FragCoord.w));\n t *= t;\n diffuseColor *= (0.65 * t);\n #endif\n #ifdef ALPHA\n float alphaValue = 0.0;\n #ifdef BATCHING\n alphaValue = vAlpha;\n #else\n alphaValue = alpha;\n #endif\n diffuseColor.a *= alphaValue;\n #endif\n #ifdef ALPHATEST\n if (diffuseColor.a < alphaTest) discard;\n #endif\n #ifdef SHADOWMAP\n vec4 shadow = texture2D(shadowMap, (vShadowMap.xy / vShadowMap.w) * 0.5 + 0.5);\n float shadowFactor = dot(shadow, receiver);\n diffuseColor.xyz *= (1.0 - 0.4 * min(1.0, shadowFactor));\n #endif\n #ifdef NOFOG\n gl_FragColor = diffuseColor;\n #else\n float fogFactor = smoothstep(260.0, 360.0, gl_FragCoord.z / gl_FragCoord.w);\n diffuseColor.xyz = mix(diffuseColor.xyz, fog.xyz, fogFactor);\n gl_FragColor = vec4(mix(diffuseColor.xyz, backgroundColor.xyz, fogFactor), diffuseColor.a);\n #endif\n #endif\n #endif\n #endif\n}";
|
||
u(Fb,na);var Dl=qa++,Ut=qa++,Ql=qa++,hH=qa++,ip=qa++;u(It,ac);It.prototype.update=function(){var a=this.app,b=a.play.Ca;a=a.X.viewport;var c=b.Ui.elements;oo.set(Math.atan(a.width/a.height*Math.tan(b.Pk/2/180*Math.PI))/Math.PI*8/a.width,-Math.atan2(-c[6],-c[2])/Math.PI/2*8,-1/a.height,.9+c[10])};var eq=new Dd;eq.attributes.position=new Yb([-1,1,1,1,1,-1,-1,-1],2);eq.Kb=new de([0,2,1,0,3,2]);wj(eq);var KL=eq;var oo=new dc,Ht=new kc,no=new Pe,LL=new we({qc:EQ,Ja:{backgroundMap:no,fov:oo},hb:[{Vf:!1,
|
||
Vg:"attribute vec2 position;\nvarying mediump vec2 vUv;\nvoid main() {\n vUv = (position + 1.0) * 0.5;\n gl_Position = vec4(position, 1.0, 1.0);\n}",wg:"precision mediump float;\nvarying mediump vec2 vUv;\nuniform sampler2D backgroundMap;\nuniform vec4 fov;\nvoid main() {\n gl_FragColor = texture2D(backgroundMap, vec2(gl_FragCoord.x * fov.x + fov.y, gl_FragCoord.y * fov.z + fov.w));\n}"}]});u(qi,ac);qi.prototype.Lb=function(){ac.prototype.Lb.call(this);this.visible=!0};qi.prototype.xc=function(){var a=
|
||
this.app.play.B;this.aabb.gi(a)&&(a.Ab=!0)};qi.prototype.U=function(){ac.prototype.U.call(this);FQ.$h(this.Oa,this.aabb)};var FQ=new qj(0,-1,0,1,1,1),Ck=new Dd;Ck.attributes.position=new Yb([.75,-1,0,.75,-1,1,.75,1,1,.75,1,0,.5,-1,0,.5,-1,1,.5,1,1,.5,1,0,.25,-1,0,.25,-1,1,.25,1,1,.25,1,0,0,-1,0,0,-1,1,0,1,1,0,1,0],3);Ck.Kb=new de([0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15]);Fn(Ck,2);ps(Ck);wj(Ck);var ML=Ck;var NL=(new na).define("INNER").define("NODIFFUSEMAP").define("NODIFFUSEUV").ya(Dc).Da(3998).ab(!1),
|
||
yI=new Fb;yI.hb[0].fg=eI;var aE=yI.Da(DQ).tb(Sc).ab(!1);u($D,ib);u(Jt,ib);Jt.prototype.setOrientation=function(a){yf(this.g,a);return this};var fq=new Dd;fq.attributes.position=new Yb([-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1],3);fq.Kb=new de([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);wj(fq);var OL=fq;u(ro,ac);ro.prototype.setColor=function(a){this.color.copy(a);return this};var Yi=new Dd;Yi.attributes.position=new Yb([0,-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5],3);Yi.attributes.uv=
|
||
new Yb([0,0,1,0,1,1,0,1],2);Yi.Kb=new de([0,2,1,0,3,2]);Fn(Yi,2);ps(Yi);wj(Yi);var PL=Yi;var QL=new sd("attribute vec2 position;\n\tattribute mediump vec2 uv;\n\tattribute lowp vec4 color;\n\tuniform mat4 projectionViewWorldMatrix;\n\tvarying lowp vec4 vColor;\n\tvarying mediump vec2 vUv;\n\tvoid main() {\n\t\tvColor = color;\n\t\tvUv = uv;\n\t\tgl_Position = projectionViewWorldMatrix * vec4(position, 0.0, 1.0);\n\t}","precision mediump float;\n\tvarying lowp vec4 vColor;\n\tvarying mediump vec2 vUv;\n\tuniform sampler2D texture;\n\n uniform sampler2D backgroundMap;\n uniform vec4 fov;\n uniform vec4 fog;\n\n\tvoid main() {\n\t\tlowp vec4 color = vColor * texture2D(texture, vUv);\n\t\tif (color.a == 0.0) discard;\n vec4 backgroundColor = texture2D(backgroundMap, vec2(gl_FragCoord.x * fov.x + fov.y, gl_FragCoord.y * fov.z + fov.w));\n\t\tfloat fogFactor = smoothstep(260.0, 360.0, gl_FragCoord.z / gl_FragCoord.w);\n color.xyz = mix(color.xyz, fog.xyz, fogFactor);\n gl_FragColor = vec4(mix(color.xyz, backgroundColor.xyz, fogFactor), color.a);\n\t}"),
|
||
RL=new sd("attribute vec2 position;\n\tattribute mediump vec2 uv;\n\tattribute lowp vec4 color;\n\tuniform mat4 projectionViewWorldMatrix;\n\tvarying lowp vec4 vColor;\n\tvarying mediump vec2 vUv;\n\tvoid main() {\n\t\tvColor = color;\n\t\tvUv = uv;\n\t\tgl_Position = projectionViewWorldMatrix * vec4(position, 0.0, 1.0);\n\t}","precision mediump float;\n\tvarying lowp vec4 vColor;\n\tvarying mediump vec2 vUv;\n\tuniform sampler2D texture;\n\tuniform sampler2D textureAlpha;\n\n uniform sampler2D backgroundMap;\n uniform vec4 fov;\n uniform vec4 fog;\n\n\tvoid main() {\n\t\tlowp vec4 color = vColor;\n\t\tcolor.a *= texture2D(textureAlpha, vUv).r;\n\t\tif (color.a == 0.0) discard;\n color = color * texture2D(texture, vUv);\n vec4 backgroundColor = texture2D(backgroundMap, vec2(gl_FragCoord.x * fov.x + fov.y, gl_FragCoord.y * fov.z + fov.w));\n float fogFactor = smoothstep(260.0, 360.0, gl_FragCoord.z / gl_FragCoord.w);\n color.xyz = mix(color.xyz, fog.xyz, fogFactor);\n gl_FragColor = vec4(mix(color.xyz, backgroundColor.xyz, fogFactor), color.a);\n\t}");
|
||
u(ri,nb);ri.prototype.ob=function(a){a.cb((this.u.qb||Ed).Ea.alpha?this.l:this.Cb);a.Ya("backgroundMap",no);a.Ya("fov",oo);a.Ya("fog",Ht);nb.prototype.ob.call(this,a)};u(Kc,ib);p=Kc.prototype;p.$l=function(){return new xb({type:xb.STATIC,mass:0})};p.ha=function(){var a=this.body;rh[a.id]=this;this.app.play.world.addBody(a);this.H=!0};p.jb=function(){var a=this.body;delete rh[a.id];this.app.play.world.removeBody(a)};p.nb=function(a,b){if(!(a.body.collisionFilterGroup&8||!this.Sc||!a.Sc||this.id>a.id)){var c=
|
||
this.Sc;a=a.Sc;c===a&&(a=void 0);var d=this.app;c&&d.play.add(d.S.aa(zf).Bc(b).play(c).Df(120).wh("inverse").zh(10).df(.8));a&&d.play.add(d.S.aa(zf).Bc(b).play(a).Df(120).wh("inverse").zh(10).df(.8))}};p.U=function(){ib.prototype.U.call(this);this.H&&(this.H=!1,this.Mm())};p.Mm=function(){var a=this.Oa,b=this.body,c=a.elements;b.position.set(c[12],c[13],c[14]);a.Dd(b.quaternion);b.aabbNeedsUpdate=!0};p.isTrigger=function(){return this.body.isTrigger};p.gj=function(a,b){this.body.addShape(new Vf(a),
|
||
b);return this};p.Td=function(a,b,c,d){b=void 0===b?0:b;c=void 0===c?0:c;d=void 0===d?0:d;this.body.addShape(new Vf(a),Be.set(b,c,d));return this};p.rk=function(a,b,c){this.body.addShape(new Mh(a),b,c)};p.F=function(a,b,c,d,e,f,g,l,n){d=void 0===d?0:d;e=void 0===e?0:e;f=void 0===f?0:f;g=void 0===g?0:g;l=void 0===l?0:l;n=void 0===n?0:n;this.body.addShape(new Mh(new F((void 0===a?0:a)/2,(void 0===b?0:b)/2,(void 0===c?0:c)/2)),Be.set(d,e,f),gq.I(g,l,n));return this};var rh={};u(Pa,Kc);u(cd,Pa);cd.prototype.ha=
|
||
function(){Pa.prototype.ha.call(this);var a=this.body;a.updateMassProperties();a.updateBoundingRadius();a.aabbNeedsUpdate=!0};cd.prototype.jb=function(){Pa.prototype.jb.call(this);var a=this.body,b=a.shapes,c=a.shapeOffsets;a=a.shapeOrientations;for(var d=b.length,e=0;e<d;++e){var f=b[e];f.body=null;switch(f.type){case Ke.BOX:nw.push(f);break;case Ke.SPHERE:zI.push(f);break;default:console.log("NO TYPE");return}hq.push(c[e]);iq.push(a[e])}b.length=c.length=a.length=0};cd.prototype.F=function(a,b,
|
||
c,d,e,f,g,l,n){a=void 0===a?0:a;b=void 0===b?0:b;c=void 0===c?0:c;d=void 0===d?0:d;e=void 0===e?0:e;f=void 0===f?0:f;g=void 0===g?0:g;l=void 0===l?0:l;n=void 0===n?0:n;var r=this.Db,w=this.Wc,y=this.cf,A=this.body,H=nw.pop();if(H){a=r*a/2;b=w*b/2;c=y*c/2;H.halfExtents.set(a,b,c);var I=H.convexPolyhedronRepresentation.vertices;I[0].set(-a,-b,-c);I[1].set(a,-b,-c);I[2].set(a,b,-c);I[3].set(-a,b,-c);I[4].set(-a,-b,c);I[5].set(a,-b,c);I[6].set(a,b,c);I[7].set(-a,b,c);H.updateBoundingSphereRadius()}else H=
|
||
new Mh(new F(r*a/2,w*b/2,y*c/2));H.body=A;A.shapes.push(H);(H=hq.pop())?H.set(r*d,w*e,y*f):H=new F(r*d,w*e,y*f);A.shapeOffsets.push(H);d=gq.I(g,l,n);(e=iq.pop())?e.set(d.x,d.y,d.z,d.w):e=new Nd(d.x,d.y,d.z,d.w);A.shapeOrientations.push(e);return this};cd.prototype.Td=function(a,b,c,d){b=void 0===b?0:b;c=void 0===c?0:c;d=void 0===d?0:d;var e=void 0===e?0:e,f=void 0===f?0:f,g=void 0===g?0:g,l=this.Db,n=this.Wc,r=this.cf,w=this.body,y=zI.pop();y?(y.radius=l*a,y.updateBoundingSphereRadius()):y=new Vf(l*
|
||
a);y.body=w;w.shapes.push(y);(a=hq.pop())?a.set(l*b,n*c,r*d):a=new F(l*b,n*c,r*d);w.shapeOffsets.push(a);b=gq.I(e,f,g);(c=iq.pop())?c.set(b.x,b.y,b.z,b.w):c=new Nd(b.x,b.y,b.z,b.w);w.shapeOrientations.push(c);return this};var nw=[];for(jq=0;338>jq;++jq)nw[jq]=new Mh(new F(1,1,1));var jq;var zI=[];var hq=[];for(kq=0;338>kq;++kq)hq[kq]=new F;var kq;var iq=[];for(lq=0;338>lq;++lq)iq[lq]=new Nd;var lq;u(Fc,Pa);var mq=0;u(ud,Kc);p=ud.prototype;p.$l=function(){return new xb({type:xb.DYNAMIC,mass:1})};p.sd=
|
||
function(a){var b=this.body;b.mass=a;b.updateMassProperties();return this};p.applyForce=function(a,b){b=void 0===b?F.ZERO:b;this.body.applyForce(a,b);return this};p.ha=function(){Kc.prototype.ha.call(this);this.body.sleep()};p.sleep=function(){this.body.sleep()};p.wakeUp=function(){this.body.wakeUp()};p.input=function(a){0!==this.oi&&this.body.sleepState!==xb.SLEEPING&&this.body.applyForce(td.scale(this.oi*this.body.mass/a,GQ),F.ZERO)};p.xc=function(){var a=this.Ye,b=this.rd;this.Be.copy(a);this.ud.copy(b);
|
||
var c=this.body;b.copy(c.quaternion).Gf(this.K,a).add(c.position)};p.update=function(){var a=this.app.play.Ej;this.Bc(this.Be.dd(this.Ye,a,HQ));var b=this.ud,c=this.rd,d=IQ;d=void 0===d?b:d;if(0===a)d.copy(b);else if(1===a)d.copy(c);else{var e=b.x,f=b.y,g=b.z;b=b.w;var l=c.x,n=c.y,r=c.z,w=c.w;c=b*w+e*l+f*n+g*r;0>c&&(l=-l,n=-n,r=-r,w=-w,c=-c);if(1<=c)d.x=e,d.y=f,d.z=g,d.w=b;else{var y=Math.sqrt(1-c*c);if(.001>Math.abs(y))d.x=.5*(l+e),d.y=.5*(n+f),d.z=.5*(r+g),d.w=.5*(w+b);else{c=Math.atan2(y,c);var A=
|
||
1/y;y=Math.sin((1-a)*c)*A;a=Math.sin(a*c)*A;d.x=e*y+l*a;d.y=f*y+n*a;d.z=g*y+r*a;d.w=b*y+w*a}}}yf(this,d);Kc.prototype.U.call(this)};p.Mm=function(){var a=this.Oa,b=this.body,c=this.rd;a.Dd(c);this.ud.copy(c);b.quaternion.copy(c);var d=this.Ye;a=a.elements;d.set(a[12],a[13],a[14]);this.Be.copy(d);c.Gf(Be.copy(this.K).Fc()).add(d,b.position);b.aabbNeedsUpdate=!0};p.gj=function(a,b){Fl(this);Kc.prototype.gj.call(this,a,b);return to(this)};p.rk=function(a,b,c){Fl(this);Kc.prototype.rk.call(this,a,b,c);
|
||
to(this)};p.Td=function(a,b,c,d){b=void 0===b?0:b;c=void 0===c?0:c;d=void 0===d?0:d;Fl(this);Kc.prototype.Td.call(this,a,b,c,d);return to(this)};p.F=function(a,b,c,d,e,f,g,l,n){d=void 0===d?0:d;e=void 0===e?0:e;f=void 0===f?0:f;g=void 0===g?0:g;l=void 0===l?0:l;n=void 0===n?0:n;Fl(this);Kc.prototype.F.call(this,a,b,c,d,e,f,g,l,n);return to(this)};var HQ=new E,IQ=new Ic;new Tb;var GQ=new E;u(uo,ud);u(Pj,Lr);Pj.prototype.sortList=function(){for(var a=this.axisList,b=a.length,c=0;c<b;c++){var d=a[c];
|
||
d.aabbNeedsUpdate&&d.updateAABB()}switch(this.axisIndex){case 0:a=1;b=this.axisList;for(c=b.length;a<c;a++){var e=b[a],f=e.aabb.lowerBound.x;for(d=a-1;0<=d;d--){var g=b[d];if(g.aabb.lowerBound.x<=f)break;b[d+1]=g}b[d+1]=e}break;case 1:a=1;b=this.axisList;for(c=b.length;a<c;a++){e=b[a];f=e.aabb.lowerBound.y;for(d=a-1;0<=d;d--){g=b[d];if(g.aabb.lowerBound.y<=f)break;b[d+1]=g}b[d+1]=e}break;case 2:a=1;b=this.axisList;for(c=b.length;a<c;a++){e=b[a];f=e.aabb.upperBound.x;for(d=a-1;0<=d;d--){g=b[d];if(g.aabb.upperBound.x>=
|
||
f)break;b[d+1]=g}b[d+1]=e}break;case 3:for(a=1,b=this.axisList,c=b.length;a<c;a++){e=b[a];f=e.aabb.upperBound.y;for(d=a-1;0<=d;d--){g=b[d];if(g.aabb.upperBound.y>=f)break;b[d+1]=g}b[d+1]=e}}};Pj.prototype.collisionPairs=function(a,b,c){this.autoDetectAxis();this.dirty&&(this.sortList(),this.dirty=!1);switch(this.axisIndex){case 0:a=0;for(var d=this.axisList,e=d.length,f=this.app.play.B.x+this.radius;a<e;a++){var g=d[a];if(g.aabb.lowerBound.x>f)break;for(var l=g.aabb.upperBound.x,n=a+1;n<e;n++){var r=
|
||
d[n];if(l<r.aabb.lowerBound.x)break;this.needBroadphaseCollision(g,r)&&this.intersectionTest(g,r,b,c)}}break;case 1:a=0;d=this.axisList;e=d.length;for(f=this.app.play.B.y+this.radius;a<e;a++){g=d[a];if(g.aabb.lowerBound.y>f)break;l=g.aabb.upperBound.y;for(n=a+1;n<e;n++){r=d[n];if(l<r.aabb.lowerBound.y)break;this.needBroadphaseCollision(g,r)&&this.intersectionTest(g,r,b,c)}}break;case 2:a=0;d=this.axisList;e=d.length;for(f=this.app.play.B.x-this.radius;a<e;a++){g=d[a];if(g.aabb.upperBound.x<f)break;
|
||
l=g.aabb.lowerBound.x;for(n=a+1;n<e;n++){r=d[n];if(l>r.aabb.upperBound.x)break;this.needBroadphaseCollision(g,r)&&this.intersectionTest(g,r,b,c)}}break;case 3:for(a=0,d=this.axisList,e=d.length,f=this.app.play.B.y-this.radius;a<e;a++){g=d[a];if(g.aabb.upperBound.y<f)break;l=g.aabb.lowerBound.y;for(n=a+1;n<e;n++){r=d[n];if(l>r.aabb.upperBound.y)break;this.needBroadphaseCollision(g,r)&&this.intersectionTest(g,r,b,c)}}}};Pj.prototype.autoDetectAxis=function(){var a=0,b=0,c=0,d=0,e=this.axisList,f=e.length,
|
||
g=this.app.play.B,l=g.x;g=g.y;for(var n=0;n<f;n++){var r=e[n],w=r.position.x-l;a+=w;b+=w*w;r=r.position.y-g;c+=r;d+=r*r}f=1/f;e=this.axisIndex;a=this.axisIndex=b-a*a*f>d-c*c*f?0<a?0:2:0<c?1:3;e!==a&&(this.dirty=!0)};Pj.prototype.aabbQuery=function(a,b,c){c=void 0===c?[]:c;this.dirty&&(this.sortList(),this.dirty=!1);a=this.axisList;var d=a.length;switch(this.axisIndex){case 0:for(var e=0;e<d;++e){var f=a[e],g=f.aabb;if(g.lowerBound.x>b.upperBound.x)break;g.overlaps(b)&&c.push(f)}break;case 1:for(e=
|
||
0;e<d;++e){f=a[e];g=f.aabb;if(g.lowerBound.y>b.upperBound.y)break;g.overlaps(b)&&c.push(f)}break;case 2:for(e=0;e<d;++e){f=a[e];g=f.aabb;if(g.upperBound.x<b.lowerBound.x)break;g.overlaps(b)&&c.push(f)}break;case 3:for(e=0;e<d;++e){f=a[e];g=f.aabb;if(g.upperBound.y<b.lowerBound.y)break;g.overlaps(b)&&c.push(f)}}return c};Ke.Wi=512;Rq=Ke.SPHERE|Ke.Wi;Sq=Ke.BOX|Ke.Wi;u(cE,Ur);u(Qj,fb);Qj.prototype.pl=function(a,b,c,d,e,f,g,l,n,r,w){e=Ab.pointToLocalFrame(d,f,c,JQ);var y=a.radius,A=b.Jm;nq.lowerBound.set(e.x-
|
||
y,e.y-y,e.z-y-A);nq.upperBound.set(e.x+y,e.y+y,e.z+y+A);var H=b.getTrianglesInAABB(nq,AI),I=this.world.gravity;A=-(A+y);for(var O=0,S=H.length;O!==S;O++)if(b.getNormal(H[O],Ag),!(0<Ag.dot(I))){b.getTriangleVertices(H[O],Dk,oq,pq);e.vsub(Dk,Uc);var R=Uc.dot(Ag);Ag.scale(R,Uc);e.vsub(Uc,Uc);if(pd.pointInTriangle(Uc,Dk,oq,pq)&&A<=R&&R<=y){if(w)return!0;var ja=this.createContactEquation(g,l,a,b,n,r),ka=ja.ni;Uc.vsub(e,ka);0>R&&ka.negate(ka);ka.normalize();Ab.vectorToWorldFrame(f,ka,ka);R=ja.ri;ka.scale(y,
|
||
R);R.vadd(c,R);R.vsub(g.position,R);Ab.pointToWorldFrame(d,f,Uc,Uc);Uc.vsub(l.position,ja.rj);this.result.push(ja);this.createFrictionEquationsFromContact(ja,this.frictionResult)}}H.length=0};Qj.prototype.zk=function(a,b,c,d,e,f,g,l,n,r,w){e=a.getSideNormals(KQ,e);for(var y=0,A=0;2!==y;y++)for(var H=0;2!==H;H++)for(var I=0;2!==I;I++){var O=ow[A++];O.set(0,0,0);y?O.vadd(e[0],O):O.vsub(e[0],O);H?O.vadd(e[1],O):O.vsub(e[1],O);I?O.vadd(e[2],O):O.vsub(e[2],O);c.vadd(O,O);Ab.pointToLocalFrame(d,f,O,O)}c=
|
||
nq.setFromPoints(ow);c=b.getTrianglesInAABB(c,AI);e=this.world.gravity;y=-b.Jm;A=0;for(H=c.length;A!==H;A++)if(b.getNormal(c[A],Ag),!(0<Ag.dot(e)))for(b.getTriangleVertices(c[A],Dk,oq,pq),I=0;8>I;++I){O=ow[I];O.vsub(Dk,Uc);var S=Uc.dot(Ag);Ag.scale(S,Uc);O.vsub(Uc,Uc);if(pd.pointInTriangle(Uc,Dk,oq,pq)&&y<=S&&0>=S){if(w)return!0;S=this.createContactEquation(g,l,a,b,n,r);var R=S.ni;O.vsub(Uc,R);0===R.lengthSquared()?Ag.negate(R):R.normalize();Ab.pointToWorldFrame(d,f,Uc,Uc);Uc.vsub(l.position,S.rj);
|
||
Ab.pointToWorldFrame(d,f,O,O);O.vsub(g.position,S.ri);this.result.push(S);this.createFrictionEquationsFromContact(S,this.frictionResult)}}c.length=0};var JQ=new F,nq=new jc,AI=[],Dk=new F,oq=new F,pq=new F,Ag=new F,Uc=new F,KQ=[new F,new F,new F,new F,new F,new F],ow=[new F,new F,new F,new F,new F,new F,new F,new F];Object.defineProperty(Qj.prototype,Rq,{configurable:!0,enumerable:!0,get:function(){return this.pl}});Object.defineProperty(Qj.prototype,Sq,{configurable:!0,enumerable:!0,get:function(){return this.zk}});
|
||
u(Lt,pd);Object.defineProperty(Lt.prototype,Ke.Wi,{configurable:!0,enumerable:!0,get:function(){return this._intersectTrimesh}});u(Sa,Pa);Sa.prototype.ha=function(){Pa.prototype.ha.call(this);(this.j=-1===this.name.indexOf("cross"))&&this.app.play.path.add(this.g)};Sa.prototype.jb=function(){Pa.prototype.jb.call(this);this.app.play.path.remove(this.g)};Sa.prototype.Vj=function(a){this.type=a;return this};Sa.prototype.U=function(){Pa.prototype.U.call(this);this.g.apply(this.Oa)};var LQ=new E,MQ=new E,
|
||
NQ=new E,OQ=new E,PQ=new E,qw=new E,rw=new E,Mt=1;u(Gl,Kc);Gl.prototype.ha=function(){this.j.L(!0).setPosition(0,0,0).setScale(1);this.second.L(!1).setPosition(0,0,0).setScale(1);this.o=this.g.visible=!1;var a=60+20*Math.random();this.l=a*a;this.time=this.speed=0;Kc.prototype.ha.call(this)};Gl.prototype.nb=function(a){if(this.j.visible){var b=this.app;xi(a,this.second.visible?2:1);this.second.visible?(cv(a,ni(this.j,Be)),cv(a,ni(this.second,Be))):cv(a,this);this.j.visible=this.second.visible=this.g.visible=
|
||
!1;b.audio.play(sw[tw]);tw=++tw%sw.length}};Gl.prototype.update=function(a){if(this.j.visible){var b=this.app.play.B,c=b.al;if(this.o){var d=this.xg(QQ).sub(c),e=d.Fd;this.speed+=500*a;d.scale(-Math.min(this.speed*a,e)/e);this.x+=d.x;this.y+=d.y;this.z+=d.z;this.setScale(sb(this.Db,.5+.5*Math.min(e/50,1),10*a));this.H=!0;.1>c.De(this)&&this.nb(b,c,td)}else 0<b.ed&&b.state===Hd&&b.al.De(this)<this.l&&(this.o=!0,this.speed=0);c=this.m;d=this.m=Da(this.m+4*(0<b.ad&&oi(b,this)<=b.pj?a:-a),0,1);0===c&&
|
||
0<d?(this.second.visible=!0,this.g.visible=!0,this.g.pb()):1===c&&1>d?(this.g.visible=!0,this.g.pb()):0===d&&(this.second.visible=!1);b=.7*d;c=1-.3*d;d=360*(this.time+=a)+this.x+this.y;this.j.R(b).setScale(c).I(0,0,d);this.second.R(-b).setScale(c).I(0,0,d);this.g.visible&&(this.g.update(a),this.g.Qb()||(this.g.visible=!1));this.U()}};var QQ=new E;var tw=0;var sw=[];for(qq=1;13>=qq;++qq)sw.push("assets/general/coin"+qq+".wav");var qq,dE=new na;u(uc,Kc);uc.prototype.ha=function(){Kc.prototype.ha.call(this);
|
||
var a=this.g;a&&(a.visible=!0);this.effect&&this.j||eE(this);this.time=0};uc.prototype.jb=function(){Kc.prototype.jb.call(this);var a=this.app.S,b=this.effect;b&&(this.effect=null,b.visible=!0,this.Vc(b),a.release(b));if(b=this.j)this.j=null,b.visible=!0,this.Vc(b),a.release(b)};uc.prototype.nb=function(a){lh(a,300);1>a.Ae&&0>=a.Gb&&(a.app.audio.play(U(a.Ua.lj)),a.qg=2);this.g.visible=this.effect.visible=!1;this.j.L(!0).pb();a=this.app;a.audio.play("assets/general/bonus.wav");a.play.A(uw,1)};uc.prototype.update=
|
||
function(a){var b=this.g;b&&b.visible&&(this.effect.update(a),b.I(0,0,this.m?130*((this.time+=a)+this.x):180+30*Math.sin((this.time+=5*a)+this.x)).U(),b.update&&b.update(a));b=this.j;b.visible&&(b.update(a),b.Qb()||(b.visible=!1))};var uw=qa++;u(fg,na);u(Pt,uc);Pt.prototype.nb=function(a,b,c){uc.prototype.nb.call(this,a,b,c);jH(a)};var SL=new fg;u(Qt,uc);Qt.prototype.nb=function(a,b,c){uc.prototype.nb.call(this,a,b,c);dv(a,10);Xe(a.Yb,rq,10)};var TL=new fg;u(Rt,uc);Rt.prototype.nb=function(a,b,c){uc.prototype.nb.call(this,
|
||
a,b,c);ev(a)};var UL=new fg;u(St,uc);St.prototype.nb=function(a,b,c){uc.prototype.nb.call(this,a,b,c);iH(a)};var VL=(new fg).tb(Sc);u(Tt,uc);Tt.prototype.nb=function(a,b,c){uc.prototype.nb.call(this,a,b,c);kH(a)};var WL=new fg;u(Rj,uc);Rj.prototype.pc=function(){var a=this.g;a&&(Nt(this,null),this.app.S.release(a))};Rj.prototype.set=function(a){this.description=a=Ze[a]||og[a];var b=this.app.S.aa(a.model);b.setScale(a.xk||1).setPosition(0,0,a.yk||0);this.m=a.wk||!1;Nt(this,b);eE(this,a.Vl,a.Wl)};Rj.prototype.nb=
|
||
function(a,b,c){uc.prototype.nb.call(this,a,b,c);a=this.description.name;b=this.app;b.B.ye(ke[a]||a);if(c=Ze[a])a:{b.play.B.Qa.push(c);b=b.play;c=b.Yb;for(var d=0;d<c.length;++d){var e=c[d];if(!e.visible){e.Qi(a);break a}}b.cj.i(c[c.length]=(new ek(b.app)).Qi(a))}};u(Il,ud);Il.prototype.nb=function(a,b,c){if(a instanceof Fc){var d=a.l,e=this.$j,f=e[d]||0;e[d]=f+1;if(f)return}a.body.collisionFilterGroup&4&&-.1<c.dot(this.ie.pg(sq))&&(this.ie.A(Dl,a,b,c),c.Fc(),a.A(Dl,this.ie,b,c),c.Fc())};Il.prototype.g=
|
||
function(a){if(a instanceof Fc){a=a.l;var b=this.$j,c=b[a];0<c&&(b[a]=c-1)}};Il.prototype.jb=function(){ud.prototype.jb.call(this);this.$j={}};u(vc,ud);p=vc.prototype;p.ha=function(){this.ae=null;this.bd=this.g=!0;this.na.set(0,0,1);this.Wd=null;this.D=!0;this.Bc(KD(this,RQ).transformPoint(tq.set(0,0,this.radius)));ud.prototype.ha.call(this);var a=this.body;a.wakeUp();a.angularFactor.set(0,0,0);a=this.tc.oj(this);this.app.play.add(a);a.U();this.app.play.world.addConstraint(this.If);this.oi=0;Kt(this,
|
||
.01,.01);this.U()};p.jb=function(){this.app.play.world.removeConstraint(this.If);this.app.play.remove(this.tc);this.Wd=null;ud.prototype.jb.call(this)};p.sd=function(a){this.tc.sd(a);return ud.prototype.sd.call(this,a)};p.ag=function(){return this.D&&this.app.play.B.state===Hd};p.input=function(a){if(this.ag()){var b=this.body,c=this.Dd(Cm);b.quaternion.copy(c);b.aabbNeedsUpdate=!0;b=this.tc;var d=b.body.mass;if(this.bd){b.body.linearDamping=.9;var e=this.speed*(1-Math.pow(1-.9,a))/a,f=c.pf(uq);b.applyForce(f.scale(e*
|
||
d,vq));c=c.ci(Gh);e=c.dot;f=SQ.copy(b.body.velocity);e=e.call(c,f);b.applyForce(c.scale(-e*d/a,vq))}else b.body.linearDamping=.1,b.applyForce(td.scale(-1.5*d/a,vq))}ud.prototype.input.call(this,a)};p.xc=function(a){if(this.ag()){var b=this.tc.body;b.collisionResponse=!1;Dm.from=b.position;var c=this.Dd(Cm).pg(Zi);Dm.to=c.scale(-1E5,sq).add(b.position);BI.intersectWorld(b.world,Dm);cf.body||(c=(c=pi(this.app.play.path,wq.copy(b.position),this.g,this.ae))?c.lc:td,Dm.to=c.scale(-1E5,sq).add(b.position),
|
||
BI.intersectWorld(b.world,Dm));b.collisionResponse=!0;if(cf.body&&.3<td.dot(cf.hitNormalWorld)){var d=cf.body,e=this.na,f=rh[d.id],g=f instanceof Sa;if(g){var l=cf.hitPointWorld,n=cf.hitNormalWorld;Ab.pointToLocalFrame(d.position,d.quaternion,l,l);var r=cf.hitFaceIndex,w=f.ik.Za,y=w.attributes;if(f=y.normal){var A=w.Kb.data,H=3*r;r=3*A[H];w=3*A[H+1];A=3*A[H+2];var I=y.position.eb.data;y=LQ.set(I[r],I[r+1],I[r+2]);H=MQ.set(I[w],I[w+1],I[w+2]);I=NQ.set(I[A],I[A+1],I[A+2]);var O=H.sub(y,OQ),S=I.sub(y,
|
||
PQ);l.vsub(y,qw);var R=O.Fa(S,rw).Fd/2;O=O.Fa(qw,rw).Fd/2;l=qw.Fa(S,rw).Fd/2/R;S=O/R;R=1-l-S;f=f.eb.data;y.set(f[r],f[r+1],f[r+2]);H.set(f[w],f[w+1],f[w+2]);I.set(f[A],f[A+1],f[A+2]);y.scale(R);H.scale(l);I.scale(S);n.copy(y);n.vadd(H,n);n.vadd(I,n);n.normalize()}Ab.vectorToWorldFrame(d.quaternion,n,e)}else e.copy(cf.hitNormalWorld);e=this.radius/e.dot(c)+(g?.5:.2);(this.bd=cf.distance<e)?this.Wd=rh[d.id]:this.Wd=null}else this.bd=!1,this.Wd=null;this.bd&&b.position.vadd(c.scale(this.radius-cf.distance-
|
||
.01,tq),b.position);c=this.body;c.position.copy(b.position);c.velocity.copy(b.velocity)}ud.prototype.xc.call(this,a)};p.update=function(a){if(this.ag()){var b=this.app.play,c=this.Be.dd(this.Ye,b.Ej,wq);this.Bc(c);this.ae=pi(b.path,c,this.g,this.ae,this.Kj);this.Bl(a);this.U()}else ud.prototype.update.call(this,a)};p.Bl=function(a){var b=this.Dd(Cm);if(this.bd)Zi.copy(this.na);else{var c=uq.copy(this.body.velocity).normalize();c.Fa(td,Gh).normalize();Gh.Fa(c,Zi).normalize()}c=b.pg(sq);c.Fa(Zi,Gh).normalize();
|
||
c=Math.acos(Da(c.dot(Zi),-1,1));pj(TQ,Gh,Math.sign(c)*Math.min(Math.abs(c),(this.bd?10:1)*a)).mb(b,b).normalize();yf(this,b)};p.U=function(){var a=this.H;ud.prototype.U.call(this);if(a){a=this.body;var b=this.tc.body;b.position.copy(a.position);b.quaternion.copy(a.quaternion);b.aabbNeedsUpdate=!0}};var BI=new Lt,cf,Dm={skipBackfaces:!0,mode:pd.CLOSEST,from:void 0,to:void 0,collisionFilterMask:4,result:cf=new Uf},Cm=new Ic,Zi=new E,sq=new E,uq=new E,Gh=new E,wq=new E,TQ=new Ic,tq=new E,vq=new E,SQ=
|
||
new E,RQ=new Tb,UQ=new E;u(Lc,vc);p=Lc.prototype;p.ha=function(){vc.prototype.ha.call(this);this.cd=!1;this.xh(-1===this.name.indexOf("stop"));if(this.D){var a=this.app;a.play.world.addBody(this.P);var b=this.Z;b&&this.i(this.W=a.S.aa(zf).play(b,!0).setPosition(0,0,0).Df(this.dc));a=10+40*Math.random();this.te=a*a}else this.sleep(),this.tc.sleep()};p.jb=function(){var a=this.app.play;a.world.removeBody(this.P);for(var b=this.sb,c=0;c<b.length;++c)a.remove(b[c]);b.length=0;if(b=this.W)this.W=null,
|
||
a.remove(b);if(b=this.o)this.o=null,a.remove(b);vc.prototype.jb.call(this)};p.ag=function(){return void 0===this.l?vc.prototype.ag.call(this)&&300>=Math.sqrt(oi(this,this.app.play.B)):vc.prototype.ag.call(this)&&180>=Math.sqrt(oi(this,this.app.play.B))};p.xh=function(a){this.D=a;var b=this.body;a?b.collisionFilterMask&=-5:(b.angularFactor.set(1,1,1),this.oi=-5,Kt(this,.5,.999),b.collisionFilterMask|=4)};p.Ji=function(){if(-1!==this.name.indexOf("cross"))this.l=void 0,this.speed=20,this.Dd(this.Ic);
|
||
else{var a=this.xg(wq),b=this.app.play.path,c=this.ae=pi(b,a,this.g,this.ae),d=b.Hd(c,this.g,a);d||(d=b.Hd(c,this.g=!this.g,a));if(d){d=d.sub(c,uq).normalize();var e=this.Oa.Dd(Cm).pf(vq),f=this.g;this.g=0<d.dot(e);f!==this.g&&(c=this.ae=pi(b,a,this.g,this.ae));b=c.lc.Fa(d,Gh).normalize();a=a.sub(c,tq);this.l=b.dot(a)}else this.l=void 0;this.speed=this.g?20:40}};p.xc=function(a){vc.prototype.xc.call(this,a);a=this.P;var b=this.body;a.position.copy(b.position);a.quaternion.copy(b.quaternion);a.velocity.copy(b.velocity);
|
||
a.aabbNeedsUpdate=!0};p.update=function(a){if(this.ag()){if(void 0===this.l)yf(this,this.Ic);else{var b=this.xg(wq),c=this.Oa.Dd(this.Ic),d=c.pf(uq),e=d.scale(Math.max(this.speed,30),UQ).add(b),f=this.app.play.path,g=pi(f,e,this.g,this.ae),l=f.Hd(g,this.g,e);if(l){e=mo(f,g,l,e,this.g);f=g.dd(l,e,this.Hd);var n=g.lc.dd(l.lc,e,Zi).normalize();g.direction.dd(l.direction,e,d).normalize();n.Fa(d,Gh).normalize().scale(this.l).add(f,f)}g=c.pg(Zi);c.pf(d);l=c.ci(Gh);b=this.Hd.sub(b,tq).normalize();d=b.dot(d);
|
||
b=b.dot(l);d=Math.atan2(b,d);d=pj(Cm,g,Math.sign(d)*Math.min(this.J*a,Math.abs(d)));this.Dd(c);d.mb(c,c).normalize();yf(this,c)}c=this.app.play;CI<c.gg&&!this.o&&oi(c.B,this)<this.te&&(this.o||(d=this.Bb)&&this.i(this.o=this.app.S.aa(zf).play(U(d),!1).setPosition(0,0,0).df(.4).Df(1E3)),CI=c.gg+3)}(c=this.W)&&(this.ag()&&0!==this.speed?c.df(.5):c.df(Math.max(c.Nh-a,0)));vc.prototype.update.call(this,a);c=this.sb;for(d=0;d<c.length;++d)c[d].update(a)};p.U=function(){var a=this.H;vc.prototype.U.call(this);
|
||
if(a){a=this.body;var b=this.P;b.position.copy(a.position);b.quaternion.copy(a.quaternion);b.aabbNeedsUpdate=!0}};p.nb=function(a,b,c){this.D&&this.xh(!1);a.body.collisionFilterGroup&4||this.Hg(a,c);this.tc.wakeUp();vc.prototype.nb.call(this,a,b,c)};p.dl=function(){this.speed=0};p.Hg=function(a,b){if(!this.cd){this.cd=!0;var c=this.wa;if(c)for(var d=this.app.S,e=this.sb,f=this.model,g=0;g<c.length;++g){var l=c[g],n=d.aa(ih);n.set(this);n.oj(l);n.z+=.3;n.offset.y=.3;f.i(n);e.push(n)}c=this.app.play;
|
||
d=c.B;oi(d,this)<vw&&this.wf(b);(a===d||a===d.tc)&&.8<b.dot(d.Ki)&&c.A(DI,1)}};p.wf=function(){var a=this.app.play;a.B.Hg();a.A(ww,1);-1!==this.name.indexOf("cross")&&a.A(EI,1)};p.sf=function(a){return this.o&&this.o.Qb()?!0:vc.prototype.sf.call(this,a)};var YL=new E(12,0,0),XL=new F(12,1.5,2),ww=qa++,EI=qa++,DI=qa++,CI=0;u(si,Lc);p=si.prototype;p.ha=function(){Lc.prototype.ha.call(this);this.m=Vt;this.j=0;this.J=.5;this.O=!1;this.u=0;this.Mb&&this.i(this.C=this.app.S.aa(zf).setPosition(0,0,0).Df(1E3))};
|
||
p.jb=function(){Lc.prototype.jb.call(this);var a=this.app.play,b=this.C;b&&(this.C=null,a.remove(b));a.location.Aj=!1};p.update=function(a){this.D&&(0>this.m&&((this.m-=a)<-VQ?(this.m=Vt,this.O=!1,this.speed=20,this.J=.5):(this.speed=80,this.J=2,this.l=.3*this.ae.width*Math.sin(this.ee+=2*a))),0<this.j&&!Lc.prototype.sf.call(this,this.app.play.Ca.od)?this.u+=a:this.u=0);this.O&&0<=this.m&&0>(this.m-=a)&&++this.j<=xw&&(this.xh(!0),this.cd=!1,this.ee=6*Math.random());Lc.prototype.update.call(this,a)};
|
||
p.dl=function(){0===this.j&&Lc.prototype.dl.call(this)};p.Hg=function(a,b){if(0<=this.m&&(Lc.prototype.Hg.call(this,a,b),!this.O)){b=this.app;var c=b.play,d=c.B;if(this.O=a===d)a=WQ[Math.min(this.j,3)],xi(d,a),Xe(d.Yb,$i,a),b.audio.play("assets/general/coins.wav"),this.cl(),c.A(FI,a),c.A(GI,1)}};p.cl=function(){this.C&&this.C.play(this.Mb,!1)};p.xh=function(a){a?Lc.prototype.xh.call(this,a):(0===this.j||this.j>xw)&&Lc.prototype.xh.call(this,!1)};p.sf=function(a){return 0===this.j||this.j>xw||10<this.u?
|
||
Lc.prototype.sf.call(this,a):!0};var WQ=[10,20,30,50],xw=3,Vt=.05,VQ=6;(new na).ya(Dc).Da(4E3).define("ALPHA");var FI=qa++,GI=qa++;u(Jl,Kc);Jl.prototype.xc=function(){(this.visible=0!==this.g)&&this.g!==this.direction&&(this.direction=this.g,this.model.I(0,0,1===this.direction?180:0).U())};u(hd,Pa);p=hd.prototype;p.xc=function(){var a=this.app.play.B,b=XQ;b.ea=this.j;var c=this.Oa.Fc(YQ);c.transformPoint(a.Be,ks.start);c.transformPoint(a.Ye,ks.end);CK(b)&&-this.g<ls.y&&ls.y<=this.g&&(++this.level.Ml===
|
||
this.level.vj?this.Jg():this.Ig())};p.jb=function(){this.level=null;Pa.prototype.jb.call(this)};p.Ji=function(a){this.level=a};p.Ig=function(){var a=this.app.play.B;lh(a,500);1>a.Ae&&0>=a.Gb&&(a.app.audio.play(U(a.Ua.Dj)),a.Ae=2);a.app.audio.play("assets/general/gates.wav")};p.Jg=function(){var a=this.app.play.B;lh(a,2E3);1>a.Ae&&0>=a.Gb&&(a.app.audio.play(U(a.Ua.lj)),a.qg=2);a.app.audio.play("assets/general/gates.wav")};var XQ=new ce(1,0,0,.414),ks=new yn,ls=new E,YQ=new Tb;u(vo,hd);vo.prototype.Ig=
|
||
function(){hd.prototype.Ig.call(this);var a=this.app.play,b=a.B;xi(b,10);Xe(b.Yb,$i,10);Bf(b,this.app.S.aa(yo),b);a.A(No,1)};vo.prototype.Jg=function(){hd.prototype.Jg.call(this);var a=this.app.play,b=a.B;xi(b,30);Xe(b.Yb,$i,30,xq);Bf(b,this.app.S.aa(yo),b);a.A(No,1)};var No=qa++;u(wo,hd);wo.prototype.Ig=function(){hd.prototype.Ig.call(this);var a=this.app.play,b=a.B;dv(b,5);Xe(b.Yb,rq,5);Bf(b,this.app.S.aa(zo),b);a.A(Oo,1)};wo.prototype.Jg=function(){hd.prototype.Jg.call(this);var a=this.app.play,
|
||
b=a.B;dv(b,20);Xe(b.Yb,rq,20,xq);Bf(b,this.app.S.aa(zo),b);a.A(Oo,1)};var Oo=qa++;u(xo,hd);xo.prototype.Ig=function(){hd.prototype.Ig.call(this);var a=this.app.play,b=a.B;ev(b,3);Xe(b.Yb,yw,3);Bf(b,this.app.S.aa(Ao),b);a.A(Po,1)};xo.prototype.Jg=function(){hd.prototype.Jg.call(this);var a=this.app.play,b=a.B,c=b.Ci;ev(b,c);Xe(b.Yb,yw,c,xq);Bf(b,this.app.S.aa(Ao),b);a.A(Po,1)};var Po=qa++;u(Ba,uo);Ba.prototype.Lb=function(){this.Ak=null;this.cd=!1};Ba.prototype.nb=function(a,b,c){if(!this.cd){this.cd=
|
||
!0;var d=this.Ak;d?d.nb(a,b,c):(d=this.app.play.B,oi(d,this)<vw&&(d.Hg(),(d=this.event)&&this.app.play.A(d,1)))}uo.prototype.nb.call(this,a,b,c)};Ba.prototype.cc=function(a){this.event=a;return this};u(Qc,ib);Qc.prototype.Ji=function(a){var b=this.Oa,c=this.l,d=this.m,e=this.o,f=this.app.S,g=this.app.play,l=this.g;a=a.uf;for(var n=0;n<c.length;++n){var r=yj(f,c[n]);a.push(r);r.Ak=this;yf(r,e?e[n]:$k).Bc(d[n]).U();b.mb(r.Oa,r.Oa);r.setMatrix(r.Oa);g.add(r);r.U();l.push(r)}this.cd=!1};Qc.prototype.j=
|
||
function(){this.g.length=0};Qc.prototype.nb=function(a,b){if(!this.cd){this.cd=!0;for(var c=a.body.velocity,d=this.g,e=0;e<d.length;++e){var f=d[e];f instanceof Ba&&!f.cd&&(f.cd=!0,f.wakeUp(),c.scale(1+.3*Math.random(),f.body.velocity))}c=this.app;d=c.play.B;oi(d,this)<vw&&d.Hg();e=this.effect;!e||d!==a&&d.tc!==a||Bf(d,c.S.aa(e),b);(a=this.event)&&this.app.play.A(a,1);(a=this.Sc)&&c.play.add(c.S.aa(zf).Bc(b).play(a).Df(120).wh("inverse").zh(10).df(1))}};u(fh,Pa);var zw=qa++;u(zf,Oj);zf.prototype.gk=
|
||
function(){Oj.prototype.gk.call(this);this.U();this.app.play.on(sh,this.H).on(Ap,this.J)};zf.prototype.hk=function(){Oj.prototype.hk.call(this);this.app.play.off(sh,this.H).off(Ap,this.J)};u(Vb,Oa);Vb.prototype.Lb=function(){Oa.prototype.Lb.call(this);this.color.copy(kp)};var ZL=(new na).define("NOFOG").define("NODIFFUSEMAP").define("LIGHTUP").define("COLOR").ya(ph).Da(4E3).tb(Sc).ab(!1);u(Ob,wb);Ob.prototype.o=function(){this.pb()};u(Wt,Ob);u(Xt,Ob);u(Sj,Ob);u(Yt,Ob);u(Zt,Ob);u($t,Ob);u(au,Ob);u(bu,
|
||
Ob);u(cu,Ob);u(du,Ob);u(eu,Ob);u(fu,Ob);u(yo,Ob);u(zo,Ob);u(Ao,Ob);u(Te,wb);u(Ot,wb);u(gu,wb);u(hu,wb);u(iu,wb);u(ju,wb);u(ku,wb);u(lu,wb);u(mu,wb);u(nu,wb);u(ou,wb);u(pu,wb);u(qu,wb);u(ru,wb);u(su,wb);u(tu,wb);u(Rc,ib);Rc.prototype.Lb=function(){this.g.visible=!1;this.alpha=this.m=this.o=this.distance=0};Rc.prototype.C=function(){this.U()};Rc.prototype.update=function(){var a=this.alpha,b=this.g,c=b.visible;if(c||0<a){var d=ni(this,ZQ),e=this.Be;c||e.copy(d);var f=d.sub(e,$Q).Fd,g=this.distance+
|
||
f,l=b.Za,n=l.xm,r=this.Oa.transformPoint(this.offset,aR),w=r.sub(d,bR).scale(-1).add(d);l=l.Ti;var y=l.data,A=g*this.l;if(c){c=this.o;var H=12*c,I=H;y[I++]=r.x;y[I++]=r.y;y[I++]=r.z;y[I++]=0;y[I++]=A;y[I++]=a;y[I++]=w.x;y[I++]=w.y;y[I++]=w.z;y[I++]=1;y[I++]=A;y[I++]=a;++c===n&&(H=I=0);y[I++]=r.x;y[I++]=r.y;y[I++]=r.z;y[I++]=0;y[I++]=A;y[I++]=0;y[I++]=w.x;y[I++]=w.y;y[I++]=w.z;y[I++]=1;y[I++]=A;y[I++]=0;++c===n&&(H=I=0);y[I+5]=0;y[I+11]=0;l.upload(0===H?y.length:36,H)}else{for(H=c=0;c<n;++c)y[H++]=
|
||
r.x,y[H++]=r.y,y[H++]=r.z,y[H++]=0,y[H++]=A,y[H++]=a,y[H++]=w.x,y[H++]=w.y,y[H++]=w.z,y[H++]=1,y[H++]=A,y[H++]=a;l.upload(y.length,0);Rg(this.app.X,b);b.visible=!0;this.m=0}.1<=f&&(this.distance=g,e.copy(d),this.o=++this.o%n,0===a?++this.m===n&&(b.visible=!1):this.m=0)}};var ZQ=new E,$Q=new E,aR=new E,bR=new E;u(fE,Dd);u(gh,Rc);gh.prototype.Md=function(a,b,c,d){hE(this);this.offset.set(0,a?(a+.2)/2:0,0);if(a){var e=this.effect=this.app.S.aa(3>a?gu:hu);e.z=b;e.Oc.a=0;this.i(e)}this.Ql&&(c=this.la=
|
||
this.app.S.aa(c||(3>a?mu:nu)),c.z=b,c.Oc.a=0,this.i(c),a=this.Uc=this.app.S.aa(d||(3>a?qu:ru)),a.z=b,a.Oc.a=0,this.i(a));return this};gh.prototype.Lb=function(){this.j=0;Rc.prototype.Lb.call(this)};gh.prototype.pc=function(){hE(this)};gh.prototype.update=function(a){var b=this.app.play.B,c=b.Dd(cR).ci(dR),d=b.tc.body.velocity;c=c.dot(d);10<Math.abs(c)&&(this.j=1);this.j=Math.max(this.j-5*a,0);c=b.Wd&&b.Wd.type===Mt;var e=0;this.j&&(e+=.5);d=d.length();d<.8*b.le&&0<b.Rc&&d<.95*this.u&&(e+=1);this.u=
|
||
d;this.alpha=Math.min(e,c&&b.bd?1:0);Rc.prototype.update.call(this,a);if(d=this.effect){e=Math.max(b.speed/b.le,1)*a;c&&!b.Gb&&b.speed||(e*=-1);if(!b.bd||b.Gb)e*=10;c=d.Oc;(d.visible=0<(c.a=Da(c.a+e,0,1)))&&d.update(a)}if(c=this.la)d=Math.max(b.speed/b.le,1)*a,b.Qf&&!b.Gb&&b.speed||(d*=-1),b.Gb&&(d*=10),e=c.Oc,(c.visible=0<(e.a=Da(e.a+d,0,1)))&&c.update(a);if(c=this.Uc)d=Math.max(b.speed/b.le,1)*a,b.Uc&&!b.Gb&&b.speed||(d*=-1),b.Gb&&(d*=10),b=c.Oc,(c.visible=0<(b.a=Da(b.a+d,0,1)))&&c.update(a)};gh.jc=
|
||
function(a){a=a.oa.get("assets/general/asphaltTrail.png",{Pc:ng});a.Oi(Vj);gE.Ld(a)};var cR=new Ic,dR=new E,gE=po((new Fb).define("TRAIL")).tb(Sc).ya(Dc).Da(dq).ab(!1);u(ti,Rc);ti.prototype.Md=function(a,b){jE(this);this.offset.set(0,a?(a+.2)/2:0,0);a&&(a=this.effect=this.app.S.aa(3>a?ku:lu),a.z=b,this.i(a));return this};ti.prototype.pc=function(){jE(this)};ti.prototype.update=function(a){var b=this.app.play.B,c=this.g.Ja.color;c!==b.kj&&this.g.Ya("color",c=b.kj);var d=Math.max(b.speed/b.le,1)*a;
|
||
b.bd&&b.Gb||(d*=-1);if(!b.bd||b.Gb)d*=10;d=this.alpha=Da(this.alpha+d,0,1);var e=this.effect;if(e){var f=e.Oc;f.copy(c);(e.visible=0<(f.a=d*Math.min(b.velocity/10,1)))&&e.update(a)}Rc.prototype.update.call(this,a)};ti.jc=function(a){a=a.oa.get("assets/general/bitumTrail.png",{Pc:ng});a.Oi(Vj);iE.Ld(a)};var iE=po((new Fb).define("TRAIL")).tb(Sc).ya(Dc).Da(dq).ab(!1);u(hh,Rc);hh.prototype.Md=function(a,b){lE(this);this.offset.set(0,a?(a+.2)/2:0,0);a&&(a=this.effect=this.app.S.aa(3>a?iu:ju),a.z=b,a.Oc.a=
|
||
0,this.i(a));return this};hh.prototype.Lb=function(){this.j=0;Rc.prototype.Lb.call(this)};hh.prototype.pc=function(){lE(this)};hh.prototype.update=function(a){var b=this.app.play.B,c=b.Wd&&2===b.Wd.type,d=Math.max(b.speed/b.le,1)*a;if(!c||b.Gb)d*=-1;if(!b.bd||b.Gb)d*=10;d=this.j=Da(this.j+d,0,1);this.alpha=.25*d;var e=this.effect;if(e){var f=e.Oc;c&&f.copy(b.Wd.color||kp);(e.visible=0<(f.a=d*Math.min(b.velocity/b.le,1)))&&e.update(a)}Rc.prototype.update.call(this,a)};hh.jc=function(a){a=a.oa.get("assets/general/sandTrail.png",
|
||
{Pc:ng});a.Oi(Vj);kE.Ld(a)};var HI=new Xn("decay",!0,Pg,xm,of,Pg,xm,of),kE=(new Fb).define("TRAIL").tb(Sc).ya(HI).Da(dq).ab(!1);u(ih,Rc);ih.prototype.Lb=function(){Rc.prototype.Lb.call(this);this.time=.3};ih.prototype.pc=function(){Rc.prototype.pc.call(this);this.ie=null};ih.prototype.set=function(a){this.ie=a};ih.prototype.update=function(a){0>(this.time-=a)||!this.ie.Wd?this.alpha=0:this.alpha=.4*Math.random();Rc.prototype.update.call(this,a)};ih.jc=function(a){a=a.oa.get("assets/general/asphaltTrail.png",
|
||
{Pc:ng});a.Oi(Vj);mE.Ld(a)};var mE=(new Fb).define("TRAIL").tb(Sc).ya(HI).Da(dq).ab(!1);u(Bo,ib);p=Bo.prototype;p.$m=function(){var a=this.app.play;this.g=this.j=!1;this.vj=.5<Math.random()?0:-1;this.cm=Math.floor(2147483647*Math.random())%3;this.Ml=0;this.U();for(var b=this.Oa,c=this.uf,d=this.data.Id,e=0;e<d.length;++e){var f=this.jh(d[e]);f&&(f.setMatrix(b.mb(KD(f,yq),yq)),a.add(f),f.U(),c.push(f))}for(a=0;a<c.length;++a)b=c[a],b.Ji&&b.Ji(this);console.log("ADDED",this.type,this.x,this.y,this.z)};
|
||
p.an=function(){for(var a=this.app.play,b=this.uf,c=0;c<b.length;++c)a.remove(b[c]);b.length=0;a=this.Zd;for(b=0;b<a.length;++b)c=a[b],c.g=c.j=!0;a.length=0;console.log("REMOVED",this.type,this.x,this.y,this.z)};p.jh=function(a){var b=this.app,c=b.play.jh(a,this);if(c){if(c instanceof hd){if(-1===this.vj){b.S.release(c);return}++this.vj}c.Bc(a.position);yf(c,a.rotation);c.Uj(a.scale);c.name=a.name;c.on(uu,this.l);a=a.children;var d=this.uf;b=b.play;for(var e=0;e<a.length;++e){var f=this.jh(a[e]);
|
||
f&&(b.add(f,c),d.push(f))}}return c};p.U=function(){ib.prototype.U.call(this);var a=this.data.aabb;-100<a.min.z&&(a.min.z=-100);100>a.max.z&&(a.max.z=100);var b=this.Oa;this.o.copy(a).$h(b);b.Fc(this.m)};p.gl=function(){var a=this.app,b=a.play,c=b.location,d=this.o,e=b.B,f=this.data.aabb;!this.g&&f.gi(this.m.transformPoint(e,Be))&&(this.g=!0,(e.level=this).usage===ig&&c.app.play.A(Qu,1));if(!this.j&&(this.g||290>f.max.x&&b.Ca.od.xi(d))){this.j=!0;f=b.path;a=a.S;for(var g=this.uf,l=0;l<g.length;++l){var n=
|
||
g[l];if(n instanceof Sa&&n.j){n=n.g.points;for(var r=0;r<n.length;++r){var w=n[r];if(!f.Hd(w)){var y=w.direction,A=w.lc,H=A.Fa(y,eR).normalize(),I=yq.elements;I[0]=y.x;I[1]=y.y;I[2]=y.z;I[3]=0;I[4]=H.x;I[5]=H.y;I[6]=H.z;I[7]=0;I[8]=A.x;I[9]=A.y;I[10]=A.z;I[11]=0;I[12]=w.x;I[13]=w.y;I[14]=w.z;I[15]=1;a:{y=void 0;A=c.app;switch(tv(A.Nb)){case Ci:case Di:w="assets/location/T1.lvl";break a;case th:w="assets/location/T2.lvl";break a}H=(H=A.sa.yg())?H.Pe:-1;switch(this.usage){case Mu:.1>A.play.B.x?y=jh(c,
|
||
H,c.Si,c.Fj):y=c.nm;break;case Nu:y=w.usage===c.si?jh(c,H,c.vl,c.jm):jh(c,H,c.ul,c.im);break;case jg:y=jh(c,H,c.xl,c.lm);break;case hg:y=jh(c,H,c.yl,c.mm);break;case JG:y=.5<Math.random()?jh(c,H,c.Si,c.Fj):jh(c,H,c.wl,c.km);break;default:y=jh(c,H,c.Si,c.Fj)}w=U(y)}if(w=yj(a,w))w.setMatrix(yq),this.Zd.push(w),b.add(w)}}}}}if(this.g&&e.state>=Hd)for(c=this.uf,f=e.Mj,a=b.Ca.od,g=0;g<c.length;)l=c[g],l.xg(Be).sub(e),-20>Be.dot(f)&&!l.sf(a)?(b.remove(c[g]),C(c,g)):++g;if(this.g&&!b.Ca.od.xi(d)){e=this.uf;
|
||
c=b.Ca.od;for(d=0;d<e.length;)e[d].sf(c)?d++:(b.remove(e[d]),C(e,d));e=this.Zd;if(0<e.length){for(c=0;c<e.length;++c)f=e[c],f.g=f.j=!0;e.length=0}0===d&&b.remove(this)}};var yq=new Tb,eR=new E;p=nE.prototype;p.dispose=function(){var a=this.app;a.Zb.remove("assets/location/models.json");a.oa.remove("assets/location/opacity.json");a.audio.remove("assets/location/music.json");a.audio.remove("assets/location/sounds.json");for(var b=this.Id,c=a.S,d=0;d<b.length;++d)Jn(c,b[d].id);a.We.remove("assets/location/levels.json");
|
||
b=this.l;for(d=0;d<b.length;++d)Jn(c,b[d]);a.oa.remove("assets/location/fog.png");a=a.play;c=vH;b=a.Qa;for(d=0;d<c.length;++d)J(b,c[d]);wH(a,LG);a.off(Ql,this.m);a.off(zw,this.o);a.off(ip,this.j);a.off(uw,this.g);a.off(ww,this.M)};p.reset=function(){var a=this.app,b=this.u,c=yj(a.S,"assets/location/N02.lvl"),d=a.play;d.add(this.C).add(b.setPosition(-5,-5,0).I(180,0,0)).add(c.setPosition(0,0,0).Ia(0,0,0,1));c.uf.push(b);b.U();MG(this);this.Aj=!1;if(!this.m)d.on(Ql,this.m=function(e){switch(d.B.level.usage){case jg:case hg:case ig:d.A(Ru,
|
||
e)}});if(!this.o)d.on(zw,this.o=function(e){switch(d.B.level.usage){case jg:case hg:case ig:d.A(Su,e)}});if(!this.j)d.on(ip,this.j=function(e){switch(d.B.level.usage){case jg:case hg:case ig:d.A(fp,e)}});if(!this.g)d.on(uw,this.g=function(e){switch(d.B.level.usage){case jg:case hg:case ig:d.A(Tu,e)}});if(!this.M)d.on(ww,this.M=function(e){switch(d.B.level.usage){case jg:case hg:case ig:d.A(ep,e)}})};p.jh=function(a,b){switch(a.id){case "Gruz01":case "Gruz02":case "Gruz03":if(b=-1===a.name.indexOf("stop")&&
|
||
-1===a.name.indexOf("cross")){b=Math;var c=b.abs,d=a.rotation;a=gq;var e=d.x,f=d.y,g=d.z;d=d.w;var l=2*(d*f-g*e);a.x=Math.atan2(2*(d*e+f*g),1-2*(e*e+f*f))*rl;a.y=1<=Math.abs(l)?0>l?-90:90:Math.asin(l)*rl;a.z=Math.atan2(2*(d*g+e*f),1-2*(f*f+g*g))*rl;b=70>c.call(b,a.z)}if(b&&!this.Aj&&.1>Math.random()){this.Aj=!0;var n="Ink01"}break;case "Vorota01":switch(b.cm){case 1:n="Vorota02";break;case 2:n="Vorota03";break;default:n="Vorota01"}}return n&&yj(this.app.S,n)};p.xc=function(){};p.update=function(){var a=
|
||
this.app,b=a.Fa.isActive(),c=a.play,d=c.Lf||c.Ng.visible,e=c.Rj,f=c.B,g=a.$.Tb,l=a.Nb,n=l.Tb,r=(b?0:1)*(d||g||e||n||f.state<Hd?.4:1)*(1-c.Ca.vi);c=(b?0:1)*(d||g||e||n||f.state<Hd?.4:1)*c.Ca.vi;g=a.audio;g.zc(this.zc,(b?0:1)*(d||e||n&&l.state!==Ci?.2:f.state>=Hd&&!n?1:0),.25);g.zc("assets/location/amb.wav",r,.25,!0);g.zc(this.Ab,c,.25,!0);a=a.B;b=a.Pb();d=Hf(a);this.u.L(0<b||0<d);hb(this.xe,0,b);hb(this.ja,0,d);e=Hi(a);hb(this.Z,0,e);d=a.Aa("E",0);b=qk(a,e);a=qk(a,e+1);d-=b;a-=b;hb(hb(this.O,0,d),
|
||
1,a);this.exp.width=500*Da(d/a,0,1)};p.Kj=function(a){switch(a.usage){case 1:case 2:this.app.play.A(1===a.usage?II:fR,1),0!==this.si&&this.si!==a.usage&&this.app.play.A(Uu,1),MG(this)}};var vH=["BOOMBOX","CHECKERS","TRAFFIC WAND"],LG=["MYSTERY BOX"],Mu=0,Nu=1,IG=2,jg=3,hg=4,ig=5,JG=6,Ou=100,II=qa++,fR=qa++,Qu=qa++,Ru=qa++,Su=qa++,fp=qa++,Tu=qa++,ep=qa++,Uu=qa++;u(oE,Ba);var aM=new na;u(pE,Qc);var bM=["BrBach01","BrBach02"],cM=[new E(0,0,0),new E(.05,.024,3.057)],Zo=qa++;u(qE,Oa);var dM=Za(new na,
|
||
Wb);u(rE,Oa);var eM=Za(new Fb,kd);u(sE,Oa);var fM=Za(new Fb,kd);u(tE,Ba);var gM=new na,Ro=qa++;u(uE,Oa);var hM=new na;u(wE,Ba);var iM=new na,To=qa++;u(vE,Ba);var jM=new na,Mo=qa++;u(xE,Ba);var OG=new na;u(yE,Ba);u(zE,Ba);var gp=(new na).tb(Sc);u(AE,Ba);u(BE,Ba);u(CE,Ba);u(DE,Ba);var Vu=new na;u(EE,Ba);u(FE,Ba);u(GE,Ba);var kM=new na;u(HE,Oa);var lM=Za(new na,Gd|Jc|tc);u(IE,Qc);var mM=["BrTreeKus01","BrTreeKus02","BrTreeKus03","klBrTr01"],nM=[new E(.014,.049,1.448),new E(-.923,1.309,5.697),new E(.375,
|
||
-.475,5.959),Zk],Uo=qa++;u(Co,Ba);Co.prototype.ha=function(){this.j.pa=U(gR);Ba.prototype.ha.call(this)};Co.jc=function(a){JI.Ld(a.oa.get("assets/location/chemodan02.png"));KI.Ld(a.oa.get("assets/location/chemodan03.png"))};var PG,JI,KI,gR=[PG=new na,JI=Za(new na,kd|tc),KI=Za(new na,kd|tc)],Qo=qa++;u(JE,Oa);var oM=Za(new na,Gd|qo|tc);u(vu,cd);vu.prototype.ha=function(){this.F(2,2,10,0,0,5);cd.prototype.ha.call(this)};var pM=Za(new na,Wb);u(wu,Pa);wu.prototype.update=function(a){this.effect.update(a)};
|
||
var qM=Za(new na,Wb);u(Do,Pa);Do.prototype.ha=function(){Pa.prototype.ha.call(this);this.i(this.g=this.app.S.aa(Vb).setPosition(0,-3.529,13.503).I(-16.166,0,0).setScale(.83795,3.20205,1.89244))};Do.prototype.jb=function(){Pa.prototype.jb.call(this);this.app.play.remove(this.g);this.g=null};var rM=Za(new na,Wb);u(KE,Sa);u(LE,Pa);var sM=Za(new na,Wb);u(ME,Oa);var tM=Za(new na,Gd|tc|Jc);u(NE,Ba);var uM=new na,Wo=qa++;u(OE,Sa);u(PE,Sa);var vM=[new E(0,0,0),new E(20,0,-1),new E(40,0,-4),new E(60,0,-7),
|
||
new E(75,0,-9),new E(90,0,-10),new E(105,0,-9),new E(120,0,-5),new E(135,0,0),new E(150,0,6),new E(165,0,10),new E(180,0,12),new E(195,0,13),new E(210,0,12),new E(225,0,9),new E(240,0,5),new E(260,0,1),new E(280,0,0),new E(300,0,0)];u(QE,Sa);var wM=[new E(0,0,0),new E(60,0,0),new E(90,0,0),new E(120,0,0),new E(180,0,0),new E(240,0,0),new E(300,0,0),new E(360,0,0),new E(420,0,0),new E(480,0,0),new E(510,0,0),new E(540,0,0),new E(600,0,0)];u(RE,Sa);var xM=[new E(0,0,0),new E(60,0,0),new E(120,0,0),
|
||
new E(137.561,1.013,0),new E(157.222,4.603,0),new E(178.47,11.63,0),new E(194.307,19.286,0),new E(211.096,30.127,0),new E(228.038,44.751,0),new E(239.74,57.884,0),new E(251.103,74.325,0),new E(261.158,94.319,0),new E(266.943,110.931,0),new E(271.15,130.469,0),new E(272.789,152.789,0),new E(272.789,212.789,0),new E(272.789,272.789,0)];u(SE,Sa);var yM=[new E(0,0,0),new E(60,0,0),new E(120,0,0),new E(137.561,-1.013,0),new E(157.222,-4.603,0),new E(178.47,-11.63,0),new E(194.307,-19.286,0),new E(211.096,
|
||
-30.127,0),new E(228.038,-44.751,0),new E(239.74,-57.884,0),new E(251.103,-74.325,0),new E(261.158,-94.319,0),new E(266.943,-110.931,0),new E(271.15,-130.469,0),new E(272.789,-152.789,0),new E(272.789,-212.789,0),new E(272.789,-272.789,0)];u(ge,Lc);ge.prototype.ha=function(){this.model.pa=U(hR);Lc.prototype.ha.call(this)};ge.prototype.wf=function(a){Lc.prototype.wf.call(this,a);this.app.play.A(this.model.pa===Xu?LI:iR,1)};ge.jc=function(a){Za(MI.Ld(a.oa.get("assets/location/Car001_02.png")),kd)};
|
||
var Xu,MI,hR=[Xu=new na,MI=new na],zM=new F(3.5,2,2),QG=[{x:-2.06,y:1.711,z:0},{x:-2.06,y:-1.711,z:0},{x:1.997,y:1.711,z:0},{x:1.997,y:-1.711,z:0}],LI=qa++,iR=qa++,AM="assets/location/truck_loop.wav",BM=["assets/location/truck_horn1.wav","assets/location/truck_horn2.wav"];u(Eo,ge);Eo.jc=ge.jc;Eo.prototype.wf=function(a){ge.prototype.wf.call(this,a);this.app.play.A(Aw,1)};var Aw=qa++;u(Fo,ge);Fo.jc=ge.jc;Fo.prototype.wf=function(a){ge.prototype.wf.call(this,a);this.app.play.A(Aw,1)};u(Go,Jl);Go.prototype.xc=
|
||
function(a){this.g=this.app.play.location.si;Jl.prototype.xc.call(this,a)};Go.prototype.update=function(a){a=this.j=(this.j+a)%Math.PI;this.m.Ya("alpha",.5*(1-Math.abs(Math.sin(4*a))));this.o.Ya("alpha",.5*(1-Math.abs(Math.cos(4*a))))};var CM=Za(new na,Jc),RG=eg((new na).Da(4E3).ya(ph)),SG=(new Fb).ya(Dc).Da(vi).td(-1,-10).ab(!1),TG=ot(6);u(TE,Pa);var DM=Za(new na,Wb);u(UE,Pa);var EM=Za(new na,Wb);u(VE,Pa);var FM=Za(new na,Wb);u(WE,Pa);var GM=Za(new na,Wb);u(XE,Pa);var HM=Za(new na,Wb);u(YE,Oa);var IM=
|
||
Za(new na,Wb);u(ZE,Oa);var JM=Za(new na,Wb);u($E,Oa);var KM=Za(new na,Wb);u(aF,Pa);var LM=Za(new na,Wb);u(bF,Pa);var MM=Za(new na,Wb);u(cF,Pa);var NM=Za(new na,Wb);u(Ho,Pa);Ho.prototype.ha=function(){this.ik.pa=U(jR)};Ho.jc=function(a){NI.Ld(a.oa.get("assets/location/House05_02.png"))};var UG,NI,jR=[UG=Za(new na,Wb),NI=Za(new na,Wb)];u(dF,Pa);var OM=Za(new na,Wb);u(eF,Pa);var PM=Za(new na,Wb);u(Tj,si);Tj.prototype.ha=function(){si.prototype.ha.call(this);for(var a=this.ua,b=0;4>b;++b)a[b].reset()};
|
||
Tj.prototype.cl=function(){si.prototype.cl.call(this);var a=this.j;4>a&&this.ua[a].cd()};Tj.prototype.update=function(a){si.prototype.update.call(this,a);this.effect.update(a);for(var b=this.ua,c=0;4>c;++c)b[c].update(a)};Tj.jc=function(a){a.Zb.get("assets/location/Money01.mdl").options.Jj=4};var wi=-2.45,RM=new na,QM=new F(4.5,1.95,2.45),SM=(new na).Da(4E3).ab(!1);u(kh,Oa);kh.prototype.reset=function(){this.time=-1;this.L(!0).Ya("alpha",1).be(this.g).setScale(1).I(0,0,0).U()};kh.prototype.cd=function(){this.time=
|
||
0};kh.prototype.update=function(a){0<=this.time&&this.visible&&(a=this.time+=2*a,this.be(this.g+3*Cb(Math.min(a,1))+10*(Math.max(a,1)-1)).Ya("alpha",1-(Da(a,1,1.5)-1)/.5).setScale(1.5*Cb(Math.min(a,1))).I(0,0,100*a).U(),a>=2*Math.PI&&(this.visible=!1))};var TM=(new na).Da(4E3).ya(Dc).define("ALPHA");u(fF,Oa);var UM=Za(new na,Jc|Gd|tc);u(gF,Ba);var VM=new na,Yo=qa++;u(hF,Fc);var WM=Za(new na,Jc),XM=mq++;u(xu,cd);xu.prototype.ha=function(){this.F(1,2,20.875,0,25.693,10.227).F(1,2,20.875,0,-25.693,10.227).F(1,
|
||
2,20.875,4.269,25.693,10.227).F(1,2,20.875,4.269,-25.693,10.227);cd.prototype.ha.call(this)};var YM=new na;u(iF,Ba);var ZM=new na,dp=qa++;u(jF,Oa);var $M=Za(new na,Jc|Gd|tc);u(Ue,Lc);Ue.prototype.ha=function(){this.model.pa=U(kR);Lc.prototype.ha.call(this)};Ue.prototype.wf=function(a){Lc.prototype.wf.call(this,a);this.app.play.A(this.model.pa===Yu?lR:OI,1)};Ue.jc=function(a){Za(PI.Ld(a.oa.get("assets/location/Car0002_02.png")),kd)};var Yu,PI,kR=[Yu=new na,PI=new na],aN=new F(3,1.75,1.9),bN=[{x:-1.92,
|
||
y:1.518,z:0},{x:-1.92,y:-1.518,z:0},{x:1.722,y:1.518,z:0},{x:1.722,y:-1.518,z:0}],lR=qa++,OI=qa++,cN="assets/location/car_loop.wav",dN=["assets/location/car_horn1.wav","assets/location/car_horn2.wav"];u(yu,Ue);yu.jc=Ue.jc;u(zu,Ue);zu.jc=Ue.jc;u(kF,Fc);var eN=new na;u(lF,Fc);var fN=new na,VG=mq++;u(Io,Pa);Io.prototype.ha=function(){Pa.prototype.ha.call(this);this.g=!1};Io.prototype.xc=function(){if(bE(this)){var a=this.app.play.B;0<a.lb.contacts.length&&(0>=a.Gb&&a.app.audio.play(a.Ua.Jk),a.Gb=5,a.kj=
|
||
oP);this.g||(this.g=!0,this.app.play.A(Pu,1))}};var gN=Za(new na,Gd|Jc),Pu=qa++;u(mF,Pa);var hN=Za(new na,Wb).tb(Sc);u(nF,Ba);var iN=new na,Uj=qa++;u(oF,Ba);var jN=new na;u(pF,Ba);var kN=new na;u(qF,Ba);var lN=new na,$o=qa++;u(rF,Pa);var mN=Za(new na,Jc);u(sF,Pa);var nN=Za(new na,Jc|Gd|tc);u(Au,Fc);Au.prototype.nb=function(a,b,c){var d=this.app.play,e=d.B,f=e.tc;a===f&&.8<c.dot(e.Ki)&&1===(f.$j[Zu]||0)&&d.A(Vo,1);Fc.prototype.nb.call(this,a,b,c)};var WG=Za(new na,Gd|tc|Jc),XG=Za(new na,tc|Jc),Zu=
|
||
mq++,Vo=qa++;u(tF,Fc);u(uF,Sa);var oN=new na,YG=xn(4289419025);u(vF,Sa);var ZG=new na;u(wF,Sa);u(xF,Sa);u(yF,Sa);u(zF,Sa);var qN=(new E(1,1,0)).normalize(),pN=(new E(1,-1,0)).normalize();u(AF,Sa);var rN=[new E(0,0,0),new E(20,0,-2),new E(40,0,-5),new E(60,0,-7),new E(80,0,-6),new E(100,0,0),new E(120,0,10),new E(140,0,17),new E(160,0,20),new E(180,0,21),new E(200,0,20),new E(220,0,17),new E(240,0,10),new E(260,0,0),new E(280,0,-6),new E(300,0,-7),new E(320,0,-5),new E(340,0,-2),new E(360,0,0)];u(BF,
|
||
Sa);var sN=[new E(0,0,0),new E(20,0,0),new E(40,0,0),new E(60,0,0),new E(80,0,-1),new E(100,0,-4),new E(120,0,-10),new E(140,0,-17),new E(160,0,-20),new E(180,0,-21),new E(200,0,-20),new E(220,0,-17),new E(240,0,-10),new E(260,0,-2),new E(280,0,3),new E(300,0,4),new E(320,0,3),new E(340,0,1),new E(360,0,0)];u(CF,Sa);u(DF,Sa);u(EF,Sa);var tN=[new E(0,0,0),new E(60,0,0),new E(120,0,0),new E(139.943,1.307,0),new E(159.545,5.206,0),new E(178.47,11.63,0),new E(196.394,20.47,0),new E(213.012,31.573,0),
|
||
new E(228.038,44.751,0),new E(241.215,59.777,0),new E(252.319,76.394,0),new E(261.158,94.319,0),new E(267.583,113.244,0),new E(271.482,132.846,0),new E(272.789,152.789,0),new E(272.789,212.789,0),new E(272.789,272.789,0)];u(FF,Sa);var uN=[new E(0,0,0),new E(60,0,0),new E(120,0,0),new E(139.943,-1.307,0),new E(159.545,-5.206,0),new E(178.47,-11.63,0),new E(196.394,-20.47,0),new E(213.012,-31.573,0),new E(228.038,-44.751,0),new E(241.215,-59.777,0),new E(252.319,-76.394,0),new E(261.158,-94.319,0),
|
||
new E(267.583,-113.244,0),new E(271.482,-132.846,0),new E(272.789,-152.789,0),new E(272.789,-212.789,0),new E(272.789,-272.789,0)];u(GF,Sa);u(Ve,Pa);Ve.prototype.ha=function(){Pa.prototype.ha.call(this);this.g=!1};Ve.prototype.xc=function(){if(bE(this)){var a=this.app.play;a.B.fj=!0;if(!this.g){this.g=!0;var b=this.parent;b instanceof Ve?b.g||(b.g=!0,a.A(Bw,1)):a.A(Bw,1)}}};Ve.prototype.update=function(a){this.time=(this.time+a)%1};var Bw=qa++;u(Bu,Ve);Bu.prototype.update=function(a){Ve.prototype.update.call(this,
|
||
a);a=this.j;var b=Math.floor(8*this.time);if(a.visible=8>b)a.x=5.776*b,a.U()};var $G=Za(new na,qo|Gd|tc).Da(vi).ab(!1).td(-1,-10),aH=(new na).ya(ph).Da(vi).ab(!1).td(-1,-10);u(Cu,Ve);Cu.prototype.update=function(a){Ve.prototype.update.call(this,a);a=this.j;var b=Math.floor(5*this.time);if(a.visible=5>b)a.x=8.62+5.75*b,a.U()};u(Jo,Ba);Jo.prototype.ha=function(){Ba.prototype.ha.call(this);this.i(this.g=this.app.S.aa(Vb).setPosition(0,.714,2.579).I(126,0,0).setScale(1.12358,1.64462,1.1935))};Jo.prototype.jb=
|
||
function(){Ba.prototype.jb.call(this);this.app.play.remove(this.g);this.g=null};var vN=(new na).tb(Sc),ap=qa++;u(HF,Sa);u(IF,Oa);var wN=new na;u(JF,Sa);u(KF,Sa);var xN=[new E(0,0,0),new E(60,0,0),new E(90,0,0),new E(120,.002,0),new E(150,0,0),new E(180,0,0),new E(210,0,0),new E(240,0,0),new E(270,0,0),new E(300,0,0),new E(330,0,0),new E(360,0,0),new E(390,0,0),new E(420,0,0),new E(480,0,0)];u(LF,Sa);var yN=[new E(0,0,0),new E(60,0,0),new E(90,0,2),new E(120,0,5),new E(150,0,10),new E(180,0,15),new E(210,
|
||
0,17),new E(240,0,15),new E(270,0,10),new E(300,0,0),new E(330,0,-10),new E(360,0,-15),new E(390,0,-17),new E(420,0,-15),new E(450,0,-10),new E(480,0,-5),new E(510,0,-2),new E(540,0,0),new E(600,0,0)];u(MF,Sa);var zN=[new E(0,0,0),new E(30,0,0),new E(60,0,-4),new E(90,0,-10),new E(120,0,-18),new E(150,0,-20),new E(180,0,-20),new E(210,0,-18),new E(240,0,-11),new E(270,0,-4),new E(300,0,3),new E(330,0,10),new E(360,0,16),new E(390,0,19),new E(420,0,20),new E(450,0,19),new E(480,0,16),new E(510,0,10),
|
||
new E(540,0,4),new E(570,0,0),new E(600,0,0)];u(NF,Sa);u(OF,Sa);var Ub=(new na).Da(xI);u(PF,Sa);u(QF,Sa);var Ol=xn(4283912512);u(RF,Sa);u(SF,Sa);u(Du,cd);Du.prototype.ha=function(){this.F(28,10,30,0,0,13.113);cd.prototype.ha.call(this)};var AN=Za(new na,Wb);u(TF,Qc);var BN=[new E(-.631,0,8.029),new E(-.631,0,.418),new E(-.85,0,-7.402),new E(.468,0,-9.831)],CN=[(new Ic).I(90,0,0),(new Ic).I(90,0,0),(new Ic).I(90,0,0),$k],Lo=qa++;u(UF,Ba);var DN=new na;u(VF,Pa);var EN=Za(new na,kd).tb(Sc);u(WF,Qc);
|
||
var bH=["BrShl01","BrShl02","BrShl03","BrShl04"],FN=[new E(-.631,7.813,.468),new E(-.631,.223,.468),new E(-.85,-7.591,.459),new E(.468,-9.569,0)];u(XF,Qc);var GN=["StatBr01","StatBr02"],HN=[new E(-.055,.048,1.805),new E(.232,-.006,-2.49)],Xo=qa++;u(YF,Ba);var IN=new na;u(ZF,Ba);var JN=new na;u($F,Pa);var KN=Za(new na,Jc);u(aG,Ba);var LN=new na;new F(2,2.25,1.25);var bp=qa++;u(bG,Pa);var MN=new na;u(cG,Qc);var NN=["StrBr01","StrBr02","StrBr03"],ON=[new E(0,1.435,-.053),new E(0,-1.515,-1.385),new E(.003,
|
||
-1.055,1.977)],Ml=qa++;u(Eu,Ba);Eu.prototype.Lb=function(){Ba.prototype.Lb.call(this);this.setScale(1)};var PN=new na;u(Fu,Ba);Fu.prototype.Lb=function(){Ba.prototype.Lb.call(this);this.setScale(1)};var QN=new na;u(Gu,Ba);Gu.prototype.Lb=function(){Ba.prototype.Lb.call(this);this.setScale(1)};var RN=new na;u(dG,Qc);var SN=["StrClBr01","StrClBr02","StrClBr03"],TN=[new E(-.043,-.713,1.765),new E(0,1.435,-.053),new E(0,-1.515,-1.385)];u(eG,Ba);var UN=(new na).tb(Sc),VN=(new Fb).ya(Dc).Da(vi).td(-1,-10).ab(!1),
|
||
WN=ot(3);u(fG,Ba);var XN=new na;u(gG,Ba);var YN=new na;u(hG,Ba);var ZN=new na;u(iG,Ba);var $N=new na,aO=qa++;u(Kl,cd);Kl.prototype.ha=function(){this.F(1.2,1.2,11,0,0,5.5);cd.prototype.ha.call(this)};Kl.prototype.update=function(a){a=this.time=(this.time+4*a)%Math.PI;this.g.color.a=this.j.color.a=Math.abs(Math.sin(a))};Kl.jc=function(a){$u.Ld(a.oa.get("assets/general/point.png"))};var bO=Za(new na,Wb),$u=po(new na).ya(ph).ab(!1).Da(4E3);u(jG,Ba);var cO=new na,cp=qa++;u(kG,Sa);u(lG,fh);var dO=Za(new na,
|
||
Jc|Gd|tc);u(Hu,fh);Hu.prototype.update=function(a){a=this.time=(this.time+10*a)%le;this.g.Ya("shine",a);this.j.Ya("shine",a+Math.PI)};var cH=Za(new na,Gd|tc|Jc),dH=Za(new na,tc|Jc),QI=new na;QI.define("SHINE");var bv=QI.define("NODIFFUSEMAP").ya(ph).Da(vi).ab(!1).td(-1,-10);u(Iu,fh);Iu.prototype.update=function(a){a=this.time=(this.time+10*a)%le;this.g.Ya("shine",a)};u(Ju,cd);Ju.prototype.ha=function(){this.F(4.53,4.53,5.663,-.087,.254,2.831);cd.prototype.ha.call(this)};var eO=Za(new na,Wb);u(Ku,
|
||
cd);Ku.prototype.ha=function(){this.F(2,2,10,0,0,5);cd.prototype.ha.call(this)};var fO=Za(new na,Wb);u(mG,Sa);var gO=[new E(0,0,0),new E(60,0,0),new E(120,0,0),new E(139.943,1.307,0),new E(159.545,5.206,0),new E(178.47,11.63,0),new E(196.394,20.47,0),new E(213.012,31.573,0),new E(228.038,44.751,0),new E(241.215,59.777,0),new E(252.319,76.394,0),new E(261.158,94.319,0),new E(267.583,113.244,0),new E(271.482,132.846,0),new E(272.789,152.789,0),new E(272.789,212.789,0),new E(272.789,272.789,0)];u(nG,
|
||
Sa);var hO=[new E(0,0,0),new E(60,0,0),new E(120,0,0),new E(139.173,-1.208,0),new E(156.256,-4.364,0),new E(178.47,-11.63,0),new E(195.721,-20.083,0),new E(210.296,-29.537,0),new E(228.038,-44.751,0),new E(240.741,-59.162,0),new E(250.589,-73.473,0),new E(261.158,-94.319,0),new E(267.38,-112.495,0),new E(271.001,-129.485,0),new E(272.789,-152.789,0),new E(272.789,-212.789,0),new E(272.789,-272.789,0)];u(Ll,Fc);Ll.prototype.ha=function(){Fc.prototype.ha.call(this);var a=this.app.S;this.i(this.g=a.aa(Vb).setPosition(15.165,
|
||
-21.532,16.2).I(46.61,0,0).setScale(2,2,4)).i(this.j=a.aa(Vb).setPosition(45.169,-21.532,16.2).I(46.61,0,0).setScale(2,2,4)).i(this.m=a.aa(Vb).setPosition(15.165,21.532,16.2).I(46.61,0,180).setScale(2,2,4)).i(this.o=a.aa(Vb).setPosition(45.169,21.532,16.2).I(46.61,0,180).setScale(2,2,4))};Ll.prototype.jb=function(){Fc.prototype.jb.call(this);var a=this.app.play,b=this.Ab;b&&(a.remove(b),this.Ab=null);a.remove(this.g);this.g=null;a.remove(this.j);this.j=null;a.remove(this.m);this.m=null;a.remove(this.o);
|
||
this.o=null};Ll.prototype.Ji=function(a){switch(a.usage){case jg:case ig:case hg:a=this.app,a.play.add(this.Ab=a.S.aa(qi).L(!1).setScale(60,22,20),this),this.U()}};var eH=new na,fH=mq++;u(Ko,Fc);Ko.prototype.ha=function(){Fc.prototype.ha.call(this);var a=this.app,b=a.S;a.play.add(this.Ab=b.aa(qi).setScale(60,22,20),this);this.i(this.g=b.aa(Vb).setPosition(15.165,-21.532,16.2).I(46.61,0,0).setScale(2,2,4)).i(this.j=b.aa(Vb).setPosition(45.169,-21.532,16.2).I(46.61,0,0).setScale(2,2,4)).i(this.m=b.aa(Vb).setPosition(15.165,
|
||
21.532,16.2).I(46.61,0,180).setScale(2,2,4)).i(this.o=b.aa(Vb).setPosition(45.169,21.532,16.2).I(46.61,0,180).setScale(2,2,4))};Ko.prototype.jb=function(){Fc.prototype.jb.call(this);var a=this.app.play;a.remove(this.Ab);this.Ab=null;a.remove(this.g);this.g=null;a.remove(this.j);this.j=null;a.remove(this.m);this.m=null;a.remove(this.o);this.o=null};u(oG,Ba);var iO=new na;u(pG,Pa);var jO=Za(new na,Wb);u(qG,vo);var kO=new na;u(rG,wo);var lO=new na;u(sG,xo);var mO=new na;u(Lu,cd);Lu.prototype.ha=function(){this.F(32.329,
|
||
3.438,30,0,0,13.501);cd.prototype.ha.call(this)};var nO=Za(new na,Jc|tc);u(tG,Oa);var oO=Za(new na,Jc);u(uG,Qc);var pO=["YaBr01","YaBr02","YaBr03"],qO=[new E(0,.858,0),new E(0,-.647,0),new E(.743,0,-.837)];u(vG,Ba);var rO=new na;u(wG,Ba);var sO=new na;u(xG,Ba);var tO=new na;u(yG,Pa);var uO=Za(new na,Jc|tc);u(zG,Pa);var vO=Za(new na,Jc|tc);u(AG,Pa);var wO=Za(new na,Jc|Gd);u(BG,Ba);var xO=new na,Nl=qa++;u(CG,Ba);var yO=new na;u(DG,Ba);var zO=new na,So=qa++;u(EG,Ba);var AO=new na;u(FG,Ba);var BO=new na;
|
||
u(GG,Oa);var CO=new na;u(HG,Oa);var DO=new na;u(jp,vc);p=jp.prototype;p.ha=function(){this.setPosition(0,0,0);this.I(0,0,0);this.wa=0;this.Hd=this.level=null;this.Mj.copy(Ce);this.kd.copy(hp);this.Ki.copy(td);this.ja=this.fd=this.Mg=0;this.exp=this.Qa.length=0;this.ua=Hi(this.app.B);this.le=50;this.Rc=this.u=90;this.Ci=6;this.Uc=0;this.Ei=this.dc=10;this.j=0;this.Ai=this.ee=10;this.pj=this.ad=0;this.Bi=this.te=10;this.ed=0;this.m=50;this.W=3;this.J=this.o=this.Z=this.qg=this.Ae=0;this.fj=!1;this.Qf=
|
||
0;this.Ab=!1;this.Gb=0;this.kj=kp;this.ka(Pl);this.Yb.reset();vc.prototype.ha.call(this);this.body.angularDamping=.2};p.jb=function(){for(var a=this.app.play,b=this.wc,c=0;c<b.length;++c)a.remove(b[c]);b.length=0;vc.prototype.jb.call(this)};p.nb=function(a,b,c){"assets/general/hit_metal.wav"!==a.Sc&&"assets/general/hit_stone.wav"!==a.Sc||Bf(this,this.app.S.aa(this.lb.Hm||au),b);if(a.Sc){var d=this.C;d&&d.Ii();this.Gc.Ii()}vc.prototype.nb.call(this,a,b,c)};p.set=function(a,b,c){var d=this,e=this.app.S,
|
||
f=this.P;this.Mb.length=0;f.parent&&f.parent.Vc(f);var g=this.sb;this.Ua=a;a=a.model;var l=this.Ta;g&&(g.parent&&g.parent.Vc(g),e.release(g),l.object=null);Cd(a)||e.register(a);g=this.sb=e.aa(a);g.ia(function(){if(d.sb===g){uf(l,g);for(var S=g.Wa,R=S.Le,ja=d.Mb,ka=ja.length=0;ka<R.length;++ka)-1===mR.indexOf(R[ka].name)&&ja.push(R[ka].name);S.Hb.RHand03.i(f.setPosition(.262,-.307,.033).I(-72.824,13.147,-131.552).L(!1))}});var n=this.C,r=this.O;n&&(n.parent&&n.parent.Vc(n),e.release(n),uf(r,null).animation=
|
||
null);c?(a=c.model,Cd(a)||e.register(a),n=this.C=e.aa(a),n.ia(function(){if(d.C===n){uf(r,n);r.animation=n.animation||d.l.animation;var S=c.Ue;if(S){if(!c.ti)for(var R=c.ti=[],ja=n.Wa.Le,ka=0;ka<ja.length;++ka){var ea=ja[ka];-1===S.indexOf(ea.name)&&R.push(ea.name)}for(R=0;R<We;++R)R===mp?$f(r,c.ti,R):$f(r,S,R);r.play("drive",!0,mp)}else for(S=0;S<We;++S)$f(r,void 0,S)}})):n=this.C=null;this.je=c;var w=this.Gc,y=this.l;if(w){a=this.Bb;for(var A=0;A<a.length;++A){var H=a[A];H.parent.Vc(H);e.release(H)}a.length=
|
||
0;this.Vc(w);e.release(w);y.object=null}this.lb=b;a=b.model;Cd(a)||e.register(a);w=this.Gc=e.aa(a);a=b.contacts;A=this.Bb;for(H=0;H<a.length;++H){var I=a[H],O=e.aa(gh);O.setPosition(I.x,I.y,I.z||.1);O.Ql=I.la;O.Md(I.width||0,I.radius||.3,b.dh,b.um);wn(O.color,I.color);w.i(O);A.push(O);O=e.aa(ti);O.setPosition(I.x,I.y,I.z||.1);O.Md(I.width||0,I.radius||.3);w.i(O);A.push(O);O=e.aa(hh);O.setPosition(I.x,I.y,I.z||.1);O.Md(I.width||0,I.radius||.3);w.i(O);A.push(O)}w.ia(function(){if(d.Gc===w){uf(y,w);
|
||
var S=w.Wa.Hb.CarBone01;S.i(g.setPosition(0,0,0).I(0,0,0));n&&S.i(n.Bc(b.zb).jl(b.Ib))}});this.i(w.be(-this.radius))};p.ka=function(a){var b=this.app,c=b.play,d=this.state;switch(this.state=a){case Pl:gH(this);a=b.B;this.set(ie(a),Ff(a),Gf(a));this.play("home",!0);this.startTime=0;break;case Fi:this.play("start",!1,1);this.startTime=0;b.audio.play(this.Ua.Im);c.xf.ka(pp);break;case Hd:gH(this);this.play("drive",!0,zq);this.play("left",!0,Em);this.play("right",!0,Fm);this.play("back",!0,RI);this.play("magnet",
|
||
!0,Wj);$f(this.Ta,this.Mb,Wj);this.O.play("drive",!0,mp);d===Fi&&(this.tc.body.velocity.x=30);this.startTime=1;c.xf.ka(Cw);c.Rj=!1;break;case Dw:this.play("catch",!1,Gm);this.tc.sleep();c.xf.ka(Sl);break;case SI:c.end()}};p.play=function(a,b,c){c=void 0===c?0:c;this.l.play(a,b,c);this.Ta.play(a,b,c);this.O.play(a,b,c)};p.Hg=function(){this.Z++;this.o=1;this.J++;var a=[0,0,0,0,2,0,0,0,0,5,0,0,0,0,10,0,0,0,0,15,0,0,0,0,20,0,0,0,0,25,0,0,0,0,30,0,0,0,0,35,0,0,0,0,40,0,0,0,0,45,0,0,0,0,50],b=this.Z;lh(this,
|
||
5*b);a=b<=a.length?a[b-1]:0===b%5?50:0;0<a?(xi(this,a),Xe(this.Yb,$i,a,TI,this.Z),0===this.qg&&0>=this.Gb&&(this.app.audio.play(U(this.Ua.lj)),this.qg=2)):0===this.Ae&&0>=this.Gb&&.5<Math.random()&&(this.app.audio.play(U(this.Ua.Dj)),this.Ae=2);this.m>aj+1&&--this.m};p.input=function(a){this.fj?(this.fj=!1,0===this.Qf&&this.app.audio.play("assets/general/accel.wav"),this.Qf+=a,lh(this,50*a)):this.Qf=Math.max(0,this.Qf-.5*a);this.Ab&&(this.Ab=!1);this.speed=Math.min((0<this.Rc?this.le:0)*(0<this.Uc?
|
||
1.5:1)*(0<this.Gb?.3:1)*(0<this.Qf?1.75:1),100);vc.prototype.input.call(this,a)};p.xc=function(a){var b=this.tc.body,c=UI.copy(b.position),d=this.app,e=d.play.path,f=pi(e,c,!0,this.ae),g=e.Hd(f,!0,c),l=(g?g.sub(f,Aq).normalize():f.direction).Fa(f.lc,nR),n=c.sub(f,oR).dot(l),r=Math.abs(n);c=(g?sb(f.width,g.width,mo(e,f,g,c)):f.width)/2;r>c&&b.position.vadd(l.scale(-Math.sign(n)*(r-c),VI),b.position);b.velocity.vadd(td.scale(Math.min(20-td.dot(b.velocity),0),VI),b.velocity);b=this.bd;l=this.Wd;vc.prototype.xc.call(this,
|
||
a);b&&!this.bd&&l instanceof fh&&(lh(this,100),d.play.A(zw,1),0===this.Ae&&(a=Math.random(),.4<a&&0>=this.Gb&&(.6<a?d.audio.play(this.Ua.Zk):d.audio.play(U(this.Ua.Dj)),this.Ae=2)));!b&&this.bd&&(d.audio.play("assets/general/earth.wav"),Bf(this,d.S.aa(du),Be.set(this.x,this.y,this.z-this.radius)))};p.update=function(a){var b=this.state,c=this.Ta,d=this.l,e=this.O;switch(b){case Fi:var f=4*a;c.Tc(f,1);d.Tc(f,1);e.Tc(f,1);c=c.xd.start;1<=(this.startTime+=a/(c?(Math.abs(c.Y-c.T)+1)/30:0))&&this.ka(Hd);
|
||
break;case Hd:f=this.tc.body.velocity;0>=(this.Rc-=a)&&(this.Rc=0,this.bd&&2>Math.abs(f.x)&&2>Math.abs(f.y)&&this.ka(Dw));this.Uc=Math.max(this.Uc-=a,0);this.j=Math.max(this.j-=a,0);this.ad=Math.max(this.ad-=a,0);this.pj=Da(this.pj+(0<this.ad?2E4:-4E4)*a,0,2E4);var g=this.ed=Math.max(this.ed-=a,0);c.Tc(3*a*(0<g?1:-1),Wj);this.P.visible=0<c.Ed(Wj);g=Math.PI*Da(this.m-=a,0,aj)/aj;0>=g&&(this.m=10*Math.random()+40);var l=c.Ed(Wj);c.za((1-l)*Math.min(3*Math.sin(g),1+.1*Math.sin(g)),RI);0>=(this.o-=a/
|
||
this.W)&&(this.Z=this.o=0);this.o*this.W<this.W-.2&&(4<=this.J?(xi(this,30),Xe(this.Yb,$i,30,WI),this.m>aj&&(this.m=aj)):3<=this.J&&(xi(this,10),Xe(this.Yb,$i,10,XI),this.m>aj&&(this.m=aj)),this.J=0);this.Ae=Math.max(this.Ae-a,0);this.qg=Math.max(this.qg-a,0);this.Gb=Math.max(this.Gb-=a,0);this.Yb.update(a);this.Mg+=a;f=f.length();lh(this,.1*a*f);l=this.wa;f=6*a;g=this.l.Ed(Em);var n=Math.max(l,0);g=n>g?Math.min(g+f,n):Math.max(g-f,n);n=this.l.Ed(Fm);l=Math.max(-l,0);n=l>n?Math.min(n+f,l):Math.max(n-
|
||
f,l);d.za(1,zq);d.za(g,Em);d.za(n,Fm);c.za(1,zq);c.za(g,Em);c.za(n,Fm);e.za(1,zq);e.za(g,Em);e.za(n,Fm);lH(this,a);vc.prototype.update.call(this,a);break;case Dw:f=4*a,c.Tc(f,Gm),d.Tc(f,Gm),e.Tc(f,Gm),c.Qb(Gm)||this.ka(SI)}b!==Hd&&(lH(this,a),this.U());b=this.Bb;for(c=0;c<b.length;++c)b[c].update(a);e=this.app;b=e.audio;c=e.Fa.isActive();a=e.play;d=a.Lf||a.Ng.visible;e=e.Nb.Tb;f=this.velocity;a:{g=this.lb.ld;l=(c?0:1)*(d||e?.05:.1+.3*Math.min(this.startTime,1));n=c?.25:0;var r=.94+.01*f,w=0,y=!0;
|
||
l=void 0===l?1:l;n=void 0===n?1:n;r=void 0===r?1:r;w=void 0===w?1:w;y=void 0===y?!1:y;var A=b.Fg[g];if(!A){if(0===l)break a;A=b.Fg[g]=b.app.S.aa(Ij);A.wd=g;A.mg=y;A.Uh(b.get(g,void 0),0,1)}0===n&&(A.volume=l);l===A.volume?0===l?A.stop():A.Rd=l:(A.Rd=l,A.lg=1/n);0===w&&(A.rate=r);r===A.rate?A.Vh=r:(A.Vh=r,A.nk=1/w)}g=this.Wd;c=(c?0:1)*(d||e?0:1)*Math.min(f/10,1);b.zc("assets/general/asphalt.wav",c*(g&&g.type===Mt?.5:0),.25,!0);b.zc("assets/general/bitumen.wav",c*(0<this.Gb?.5:0),.25,!0);b.zc("assets/general/tramplin.wav",
|
||
c*(g&&3===g.type?.5:0),.25,!0);b.zc("assets/general/sand.wav",c*(g&&2===g.type?1:0),.25,!0);b.zc("assets/general/magnet.wav",c*(0<this.ed?1:0),.25,!0);b=this.wc;for(c=0;c<b.length;++c)d=b[c],d.Qb()||(a.remove(d),C(b,c--))};p.Bl=function(a){vc.prototype.Bl.call(this,a);var b=this.app.play.path,c=this.ae,d=this.xg(UI),e=this.Hd=b.Hd(c,!0,d);b=e?mo(b,c,e,d):0;d=e?c.direction.dd(e.direction,b,this.Mj).normalize():this.Mj.copy(c.direction);e=e?c.lc.dd(e.lc,b,this.Ki).normalize():this.Ki.copy(c.lc);var f=
|
||
d.Fa(e,this.kd).normalize(),g=this.tc.body.velocity.length(),l=this.wa;b=this.Dd(YI);var n=b.pg(pR);pj(Ew,n,1.7*Da(l,-1,1)*a).mb(b,b).normalize();if(0===l){var r=b.pf(Aq);l=r.dot(d);r=r.dot(f);l=Math.atan2(r,l);pj(Ew,n,Math.sign(l)*Math.min(g/this.le*1.7*a,Math.abs(l))).mb(b,b).normalize()}c&&(a=b.pf(Aq),c=a.dot(d),a=a.dot(f),a=Math.atan2(a,c),pj(Ew,e,a-Math.sign(a)*Math.min(Math.abs(a),30*cg)).mb(b,b).normalize());yf(this,b)};p.U=function(){vc.prototype.U.call(this);this.Oa.Fc(this.Ic)};Db.Object.defineProperties(jp.prototype,
|
||
{velocity:{configurable:!0,enumerable:!0,get:function(){return this.tc.body.velocity.length()}}});var De={drive:{Y:1,T:20},left:{Y:21,T:31},right:{Y:32,T:42},back:{Y:43,T:55},idle:{Y:56,T:106},home:{Y:160,T:213},start:{Y:214,T:283},"catch":{Y:284,T:328},magnet:{Y:329,T:348},cop_add1:{Y:329,T:382},cop_add2:{Y:383,T:420},kart:{Y:0,T:0},kart_change:{Y:1705,T:1705},karts:{Y:107,T:126},karts_hi:{Y:127,T:147},out:{Y:148,T:159},"in":{Y:159,T:148},enjoy:{Y:349,T:387},advice:{Y:388,T:428},face:{Y:3001,T:3025},
|
||
mouth_close:{Y:3001,T:3001},mouth_open:{Y:3011,T:3011},max:{Y:500,T:560},hi:{Y:561,T:586},kitty:{Y:587,T:637},dino:{Y:638,T:688},foxy:{Y:689,T:778},cloun:{Y:779,T:824},uno:{Y:825,T:854},ninja:{Y:855,T:910},punk:{Y:911,T:1019},robo:{Y:1020,T:1154},zomby:{Y:1155,T:1230},tom:{Y:1231,T:1310},mummy:{Y:1311,T:1434},ork:{Y:1435,T:1467},monk:{Y:1468,T:1588},kitaes:{Y:1589,T:1704},hero_unlock:{Y:1706,T:1798},hero_unlock_monk:{Y:1799,T:1891},kart_unlock:{Y:1892,T:1979},kart_unlock_monk:{Y:1980,T:2067},povar:{Y:2076,
|
||
T:2214},skater:{Y:2215,T:2299},vor:{Y:2300,T:2429},rapper:{Y:2430,T:2582},mechanik:{Y:2583,T:2694},pojarnik:{Y:2695,T:2869},sischik:{Y:2870,T:3E3},taxer:{Y:3026,T:3166},medic:{Y:3167,T:3269},lightor:{Y:3270,T:3350},dev:{Y:3351,T:3555},cowboy:{Y:3556,T:3635},uday:{Y:3636,T:3738},bear:{Y:3951,T:4086},lepr:{Y:4087,T:4240}},VI=new E,pR=new E,Aq=new E,nR=new E,UI=new E,Ew=new Ic,YI=new Ic,oR=new E,vw=400,EO=.03,aj=.8,We=0,zq=We++,Em=We++,Fm=We++,RI=We++,Wj=We++,Gm=We++,mp=We++,mR=["RHand01","RHand02",
|
||
"RHand03"],Hm=0,Pl=Hm++,Fi=Hm++,Hd=Hm++,Dw=Hm++,SI=Hm++;u(lp,ze);lp.prototype.update=function(a){for(var b=this.Yb,c=this.app.S,d=0;d<b.length;++d){var e=b[d];e.update(a);e.visible||(e.parent.Vc(e),c.release(e),C(b,d),--d)}};lp.prototype.reset=function(){for(var a=this.app.S,b=this.Yb,c=0;c<b.length;++c){var d=b[c];d.parent.Vc(d);a.release(d)}b.length=0};var yw=0,rq=1,$i=2,TI=3,XI=4,WI=5,xq=6;u(Rl,sa);Rl.prototype.Lb=function(){this.visible=!0;this.time=2+Bq};Rl.prototype.update=function(a){var b=
|
||
this.time;if(1>=b){var c=this.time=Math.max(b-6*a,0);0===c&&(this.visible=!1)}else b<=1+Bq?(c=1,this.time=Math.max(b-a,1)):(this.time=Math.max(b-4*a,1+Bq),c=1-(this.time-(1+Bq)));this.Ab.setScale(.3*Hc(c),.3*Cb(c)).R(-50*Cb(c))};var Bq=.5;u(np,Rl);np.prototype.set=function(a,b,c,d,e,f,g){e=void 0===e?300:e;f=void 0===f?120:f;g=void 0===g?4280332490:g;switch(a){case rq:this.m.Jc("assets/common/fuel.png").Eb(244*.8,254*.8);break;case yw:this.m.Jc("assets/common/nitro.png").Eb(154.7,221.2);break;case $i:this.m.Jc("assets/common/coin.png").Eb(185.5,
|
||
193.2)}bh(this.value,b).Ra(30+e/2);this.C.Eb(e+34,f+34);this.u.Eb(e,f).setColor(g);this.g.width=e;this.l.visible=this.o.visible=!1;if(c){a=this.title;a.L(!0);switch(c){case TI:tl(a,"assets/common/combo.png").Eb(350,134).setPosition(-90,0);this.l.visible=this.o.visible=!0;hb(this.o,0,d);break;case XI:tl(a,"assets/common/wow.png").Eb(328,158).setPosition(-20,0);break;case WI:tl(a,"assets/common/cool.png").Eb(376,165).setPosition(-20,0);break;case xq:tl(a,"assets/common/strike.png").Eb(416,158).setPosition(-20,
|
||
-20)}this.g.R(120).setScale(.8)}else this.title.visible=!1,this.g.R(0).setScale(1)};u(fv,ib);p=fv.prototype;p.bn=function(){this.i(this.ie);this.ie.Wa.Hb.PolCarBone01.i(this.Gk);this.visible=!0;this.setPosition(0,0,0);this.I(0,0,0);this.state=Pl;for(var a=this.j,b=this.vg,c=this.g,d=1;d<We;++d)a.za(0,d),b.za(0,d),c.za(0,d),a.stop(d),b.stop(d),c.stop(d);this.play("home",!0)};p.cn=function(){};p.ka=function(a){var b=this.state;switch(this.state=a){case pp:this.play("start",!1,1);break;case Cw:this.gg=
|
||
0;if(b===Sl||b===gv)this.visible=!1;break;case Sl:this.j.za(1,1),this.vg.za(1,1),this.g.za(1,1),this.visible=!0,this.play("catch",!1,1)}};p.play=function(a,b,c){c=void 0===c?0:c;this.g.play(a,b,c);this.j.play(a,b,c);this.vg.play(a,b,c)};p.update=function(a){var b=this.j,c=this.vg,d=this.g;switch(this.state){case pp:var e=4*a;b.Tc(e,1);c.Tc(e,1);d.Tc(e,1);break;case Cw:1<=(this.gg+=a)&&(this.visible=!1);break;case Sl:this.setMatrix(this.app.play.B.Gc.Oa)}d.update(a);c.update(a);b.update(a);this.U()};
|
||
var Cq=0,gv=Cq++,pp=Cq++,Cw=Cq++,Sl=Cq++,FO=["assets/general/cop_idle1.wav","assets/general/cop_idle2.wav","assets/general/cop_idle3.wav"],GO=["assets/general/cop_turn1.wav","assets/general/cop_turn2.wav","assets/general/cop_turn3.wav"];u(kg,Se);p=kg.prototype;p.N=function(a){this.on(Yd,a);return this};p.A=function(a){a===nI&&this.app.audio.play("assets/general/click.wav");return Se.prototype.A.apply(this,arguments)};p.Fl=function(a,b,c){if(this.visible&&!this.app.input.Jb&&this.$a(b,c)&&(this.pointerId=
|
||
a,this.P=b,this.W=c,this.Cd&&(this.app.input.Jb=this),this.state!==Zb&&(this.state=Kf,this.app.audio.play("assets/general/click.wav")),this.Cd))return!0};p.Hl=function(a,b,c){this.Cd&&this.app.input.Jb!==this||a!==this.pointerId||(this.Cd&&(this.app.input.Jb=null),this.pointerId=-1,this.state!==Zb&&(this.state=Ec),this.visible&&this.state!==Zb&&this.$a(b,c)&&this.A(Yd,b,c))};p.Gl=function(a,b,c,d){if(this.visible&&this.state!==Zb)if(this.Cd){var e=this.app.input.Jb;e?e===this&&a===this.pointerId&&
|
||
(this.state=this.$a(b,c)?Kf:Ec):0===d&&(this.state=this.$a(b,c)?Lf:Ec)}else a===this.pointerId?(a=b-this.P,d=c-this.W,100<a*a+d*d?(this.pointerId=-1,this.state=Ec):this.state=this.$a(b,c)?Kf:Ec):0===d&&(this.state=this.$a(b,c)?Lf:Ec)};p.El=function(a){this.Cd&&this.app.input.Jb!==this||a!==this.pointerId||(this.Cd&&(this.app.input.Jb=null),this.pointerId=-1,this.state!==Zb&&(this.state=Ec))};p.Af=function(a){var b=this.m;if(b)if(b.visible=this.Xe){var c=this.sb;go(c)?(c=4*c.Gg,b.opacity=.3*Math.min(c,
|
||
1)+.7*Math.abs(Math.sin(c))):(c.Gg=0,b.opacity=0)}else b.opacity=0;switch(this.state){case Lf:b=1-1.05;Zg(a,ZI.set(1.05,0,0,1.05,b*this.Kg*this.width,b*this.dg*this.height));Se.prototype.Af.call(this,a);vf(a);break;case Kf:b=1-.95;Zg(a,ZI.set(.95,0,0,.95,b*this.Kg*this.width,b*this.dg*this.height));Se.prototype.Af.call(this,a);vf(a);break;default:Se.prototype.Af.call(this,a)}};u(Cf,Ea);var Tl=new sd("attribute vec2 position;\n\tattribute mediump vec2 uv;\n attribute lowp vec4 color;\n uniform mat4 projectionViewWorldMatrix;\n varying lowp vec4 vColor;\n\tvarying mediump vec2 vUv;\n void main() {\n vColor = color;\n vUv = uv;\n\t\tgl_Position = projectionViewWorldMatrix * vec4(position, 0.0, 1.0);\n\t}",
|
||
"precision mediump float;\n varying lowp vec4 vColor;\n\tvarying mediump vec2 vUv;\n uniform sampler2D texture;\n void main() {\n lowp vec4 color = texture2D(texture, vUv);\n if (color.a == 0.0) discard;\n\t\tgl_FragColor = vColor * vec4(1.0, 1.0, 1.0, 10.0 * color.a);\n\t}"),Ul=new sd("attribute vec2 position;\n\tattribute mediump vec2 uv;\n\tattribute lowp vec4 color;\n\tuniform mat4 projectionViewWorldMatrix;\n\tvarying lowp vec4 vColor;\n\tvarying mediump vec2 vUv;\n\tvoid main() {\n\t\tvColor = color;\n\t\tvUv = uv;\n\t\tgl_Position = projectionViewWorldMatrix * vec4(position, 0.0, 1.0);\n\t}",
|
||
"precision mediump float;\n\tvarying lowp vec4 vColor;\n\tvarying mediump vec2 vUv;\n\tuniform sampler2D texture;\n\tuniform sampler2D textureAlpha;\n\tvoid main() {\n\t\tlowp vec4 color = vColor;\n\t\tcolor.a *= texture2D(textureAlpha, vUv).r;\n\t\tif (color.a == 0.0) discard;\n\t\tgl_FragColor = color * texture2D(texture, vUv);\n\t}");u(ld,kg);ld.prototype.Og=function(a){a=void 0===a?null:a;var b=this.effect;if(b!==a||a&&a.parent!==this)if(b&&b.parent&&b.parent.removeChild(b),this.effect=a)ee(this,
|
||
a.setPosition(this.width/2,this.height/2).setScale(2),1),a.pb()};u(mb,tb);p=mb.prototype;p.yb=function(){tb.prototype.yb.call(this);this.app.Fa.isActive()?this.off(pg):this.A(pg)};p.show=function(a){a=void 0===a?0:a;this.Tb=!0;this.rb=0;this.u.opacity=0;var b=this.app;b.audio.play("assets/general/show_panel.wav");b.screen.push(this,a);this.update(0);return this};p.fa=function(){this.Tb=!1;var a=this.app;a.input.disable();a.audio.play("assets/general/hide_panel.wav");this.A(qR)};p.layout=function(){tb.prototype.layout.call(this);
|
||
var a=this.width,b=this.height;this.u.Eb(a,b);this.V.setPosition(a/2,b/2)};p.update=function(a){tb.prototype.update.call(this,a);var b=this.Tb;a=this.rb=Da(this.rb+(b?4:-8)*a,0,1);if(b){var c=.1,d=.5;c=void 0===c?0:c;d=void 0===d?.4:d;if(0===a)c=0;else if(1===a)c=1;else{if(!c||1>c){c=1;var e=.25*d}else e=d*Math.asin(1/c)*lP;c=c*Math.pow(2,-10*a)*Math.sin((a-e)*le/d)+1}}else c=qd(a);this.V.scale=c;this.u.opacity=.5*a;b||0!==a||(b=this.app,b.input.enable(),b.screen.remove(this))};var qR=qa++,pg=qa++;
|
||
u(Df,Ea);u(Vl,tb);Vl.prototype.Nc=function(){tb.prototype.Nc.call(this);this.app.screen.clearDepth=!1};Vl.prototype.yb=function(){tb.prototype.yb.call(this);this.app.screen.clearDepth=!0};Vl.prototype.layout=function(){tb.prototype.layout.call(this);var a=this.width,b=this.height;this.g.Eb(a,b).setPosition(a/2,b/2)};var hv=new sd("attribute vec2 position;\n\tattribute mediump vec2 uv;\n uniform mat4 projectionViewWorldMatrix;\n\tvarying mediump vec2 vUv;\n void main() {\n\t\tgl_Position = projectionViewWorldMatrix * vec4(position, 0.0, 1.0);\n vUv = gl_Position.xy;\n\t}",
|
||
"precision mediump float;\n\tvarying mediump vec2 vUv;\n void main() {\n float x = vUv.x;\n float y = vUv.y;\n float v = sqrt(x * x + y * y);\n vec4 bg = vec4(5.0/255.0, 69.0/255.0, 252.0/255.0, 1.0);\n vec4 fr = vec4(136.0/255.0, 247.0/255.0, 250.0/255.0, 1.0);\n gl_FragColor = mix(fr, bg, v);\n\t}");u(Ya,tb);Ya.prototype.layout=function(){tb.prototype.layout.call(this);var a=this.width;this.kd.width=this.He.width=a+200;this.top.x=this.g.x=a/2;this.V.y=
|
||
this.height/2};Ya.prototype.show=function(a){var b=this;this.J=this.Kc=!0;this.dc=1;this.Pd||(this.re=0);var c=this.app,d=c.screen,e=c.ve;(this.C=e.Pd&&!(void 0===a?0:a))?(d.remove(e),d.push(e,-3),d.remove(this),d.push(this,-1)):(this.H=!0,c.Fa.show(function(){d.push(e,-3);d.push(b,-1)},void 0,5));return this};Ya.prototype.fa=function(){this.A(qg);var a=this.app;Zf(a.screen)===this&&(a.$.show(),a.Fa.speed=5);var b=Zf(a.screen);b!==a.Fa&&(this.Kc=!1,this.C=b!==a.sc,this.H=!this.C)};Ya.prototype.update=
|
||
function(a){tb.prototype.update.call(this,a);var b=this.app,c=this.Kc,d=this.re=Da(this.re+(c?2:-4)*a,0,1),e=c?Eb(1-d):Cb(1-d);this.top.y=100-700*e;var f=this.width,g=this.V;g.x=f/2+(this.C?c?f*Wc(1-d):-f*Wc(1-d):0);g.scale=this.H?c?Cb(d):Eb(d):1;f=this.J;a=this.dc=Da(this.dc+(f?2:-4)*a,0,1);this.g.y=this.height-170+700*e+700*(f?Eb(1-a):Cb(1-a));c||0!==d||b.screen.remove(this);b.audio.zc("assets/general/base.wav",b.Fa.isActive()?0:1,.25)};var qg=qa++;u(Gc,Ea);Gc.prototype.ob=function(a){var b=this.qb||
|
||
Ed,c=b.hd,d=b.jd,e=b.ff,f=b.hf;a.ya(this.Sa);a.cb(b.Ea.alpha?this.g:this.Cb);a.Jc("texture",b);a.Jd(Yg);b=ag(a,96);var g=b.ib,l=b.data,n=a.matrix,r=n.a,w=n.b,y=n.c,A=n.d,H=n.ub;n=n.vb;var I=a.color,O=I.x,S=I.y,R=I.z;I=I.w;var ja=this.width,ka=this.height,ea=this.o,ma=1/this.u,pa=this.m,va=0;ja-=ea;ja<2*pa&&(va=-4*(1-ja/(2*pa)),pa=ja/2);ja+=ea;ea=pa+ea;var Ka=ea*ma*(e-c)+c,Aa=e-pa*ma*(e-c),Fa=pa*ma*(e-c)+c;ma=e-ea*ma*(e-c);l[g++]=H;l[g++]=n;l[g++]=c;l[g++]=d;l[g++]=O;l[g++]=S;l[g++]=R;l[g++]=I;l[g++]=
|
||
ea*r+H;l[g++]=ea*w+n;l[g++]=Ka;l[g++]=d;l[g++]=O;l[g++]=S;l[g++]=R;l[g++]=I;l[g++]=pa*r+ka*y+H;l[g++]=pa*w+ka*A+n;l[g++]=Fa;l[g++]=f;l[g++]=O;l[g++]=S;l[g++]=R;l[g++]=I;l[g++]=ka*y+H;l[g++]=ka*A+n;l[g++]=c;l[g++]=f;l[g++]=O;l[g++]=S;l[g++]=R;l[g++]=I;l[g++]=ea*r+H;l[g++]=ea*w+n;l[g++]=Ka;l[g++]=d;l[g++]=O;l[g++]=S;l[g++]=R;l[g++]=I;l[g++]=Math.max(ja-pa,ea)*r+H;l[g++]=Math.max(ja-pa,ea)*w+n;l[g++]=Aa;l[g++]=d;l[g++]=O;l[g++]=S;l[g++]=R;l[g++]=I;l[g++]=Math.max(ja-ea,pa)*r+ka*y+H;l[g++]=Math.max(ja-
|
||
ea,pa)*w+ka*A+n;l[g++]=ma;l[g++]=f;l[g++]=O;l[g++]=S;l[g++]=R;l[g++]=I;l[g++]=pa*r+ka*y+H;l[g++]=pa*w+ka*A+n;l[g++]=Fa;l[g++]=f;l[g++]=O;l[g++]=S;l[g++]=R;l[g++]=I;l[g++]=ja*r+(ka+va)*y+H;l[g++]=ja*w+(ka+va)*A+n;l[g++]=e;l[g++]=f;l[g++]=O;l[g++]=S;l[g++]=R;l[g++]=I;l[g++]=(ja-ea)*r+(ka+va)*y+H;l[g++]=(ja-ea)*w+(ka+va)*A+n;l[g++]=ma;l[g++]=f;l[g++]=O;l[g++]=S;l[g++]=R;l[g++]=I;l[g++]=(ja-pa)*r+va*y+H;l[g++]=(ja-pa)*w+va*A+n;l[g++]=Aa;l[g++]=d;l[g++]=O;l[g++]=S;l[g++]=R;l[g++]=I;l[g++]=ja*r+va*y+H;
|
||
l[g++]=ja*w+va*A+n;l[g++]=e;l[g++]=d;l[g++]=O;l[g++]=S;l[g++]=R;l[g++]=I;b.ib=g;bg(a,3)};u(Af,Gc);u(qp,Gc);u(yi,sa);u(dd,Gc);u(iv,Gc);u(jv,sa);u(zi,Gc);u(rp,Gc);u(Xj,sa);Xj.prototype.reset=function(){this.g=0};Xj.prototype.update=function(a){a=this.g+=6*a;var b=Math.sin(a),c=Math.cos(a);this.J.rotation=-4*b;this.ve.y=165+5*b;this.l.rotation=90*a;this.left.setScale(1+.1*Math.abs(b),1+.1*Math.abs(c));this.H.rotation=90*a;this.right.setScale(1+.1*Math.abs(b),1+.1*Math.abs(c));this.o.y=19-6*Math.abs(c);
|
||
this.m.rotation=3*c;this.m.y=88-8*Math.abs(b);this.u.setScale(1+.3*Math.abs(b),1+.3*Math.abs(c)).R(218-30*Math.abs(c));this.C.setScale(1+.3*Math.abs(Math.sin(a+1)),1+.3*Math.abs(Math.cos(a+1))).R(218-30*Math.abs(Math.cos(a+1)));this.D.setScale(1+.3*Math.abs(Math.sin(a+2)),1+.3*Math.abs(Math.cos(a+2))).R(218-30*Math.abs(Math.cos(a+2)))};u(lg,xf);lg.prototype.ob=function(a){this.app.Pj.focus=this.focus;xf.prototype.ob.call(this,a)};u(Ee,kg);Ee.prototype.Og=function(a){a=void 0===a?null:a;var b=this.effect;
|
||
if(b!==a||a&&a.parent!==this)if(b&&b.parent&&b.parent.removeChild(b),this.effect=a)ee(this,a.setPosition(this.width/2,this.g?this.g.y:this.height/2).setScale(2),2),a.pb()};Ee.prototype.$a=function(a,b){return kg.prototype.$a.call(this,a,b)||this.g&&this.g.$a(a,b)};Ee.prototype.C=function(){switch(this.state){case Kf:this.color=4291611852;break;default:this.color=4294967295}if(this.g)switch(this.state){case Lf:var a=this.K;this.g.Ia(-3).R(a);this.o.Ia(-3).R(a);break;default:a=this.offset,this.g.Ia(0).R(a),
|
||
this.o.Ia(0).R(a)}};u(lv,Ee);u(jb,Ee);u(md,Ee);u(Wl,Ee);u(Wd,md);Wd.prototype.$a=function(a,b){return md.prototype.$a.call(this,a,b)||this.l.$a(a,b)||this.D.$a(a,b)};Wd.prototype.C=function(){md.prototype.C.call(this);switch(this.state){case Lf:this.l.Ia(-3).R(20);this.D.Ia(-3).R(20);this.H.Ia(-3).R(20);this.J.Ia(-3).R(20);break;default:this.l.Ia(0).R(40),this.D.Ia(0).R(40),this.H.Ia(0).R(40),this.J.Ia(0).R(40)}};u(Ai,Ea);Ai.prototype.ob=function(a){var b=this.qb||Ed,c=b.hd,d=b.jd,e=b.ff,f=b.hf,g=
|
||
this.o||Ed,l=g.hd,n=g.jd,r=g.ff,w=g.hf;a.ya(this.Sa);a.cb(g.Ea.alpha?this.g:this.Cb);a.Jc("texture",b);a.Jc("mask",g);a.Jd(rR);b=ag(a,40);g=b.ib;var y=b.data,A=a.matrix,H=A.a,I=A.b,O=A.c,S=A.d,R=A.ub;A=A.vb;var ja=a.color,ka=ja.x,ea=ja.y,ma=ja.z;ja=ja.w;var pa=this.width,va=this.height;y[g++]=R;y[g++]=A;y[g++]=c;y[g++]=d;y[g++]=l;y[g++]=n;y[g++]=ka;y[g++]=ea;y[g++]=ma;y[g++]=ja;y[g++]=pa*H+R;y[g++]=pa*I+A;y[g++]=e;y[g++]=d;y[g++]=r;y[g++]=n;y[g++]=ka;y[g++]=ea;y[g++]=ma;y[g++]=ja;y[g++]=pa*H+va*O+
|
||
R;y[g++]=pa*I+va*S+A;y[g++]=e;y[g++]=f;y[g++]=r;y[g++]=w;y[g++]=ka;y[g++]=ea;y[g++]=ma;y[g++]=ja;y[g++]=va*O+R;y[g++]=va*S+A;y[g++]=c;y[g++]=f;y[g++]=l;y[g++]=w;y[g++]=ka;y[g++]=ea;y[g++]=ma;y[g++]=ja;b.ib=g;bg(a,1)};Db.Object.defineProperties(Ai.prototype,{o:{configurable:!0,enumerable:!0,get:function(){return this.m},set:function(a){"string"===typeof a&&(a=this.app.oa.get(a));this.m=a}}});var mH=new sd("attribute vec2 position;\n\tattribute mediump vec2 uv;\n attribute mediump vec2 maskUv;\n\tattribute lowp vec4 color;\n\tuniform mat4 projectionViewWorldMatrix;\n\tvarying lowp vec4 vColor;\n\tvarying mediump vec2 vUv;\n varying mediump vec2 vMaskUv;\n\tvoid main() {\n\t\tvColor = color;\n\t\tvUv = uv;\n vMaskUv = maskUv;\n\t\tgl_Position = projectionViewWorldMatrix * vec4(position, 0.0, 1.0);\n\t}",
|
||
"precision mediump float;\n\tvarying lowp vec4 vColor;\n\tvarying mediump vec2 vUv;\n varying mediump vec2 vMaskUv;\n\tuniform sampler2D texture;\n uniform sampler2D mask;\n\tvoid main() {\n\t\tlowp vec4 color = vColor * texture2D(texture, vUv);\n lowp vec4 masked = texture2D(mask, vMaskUv);\n color.a *= masked.a;\n\t\tif (color.a == 0.0) discard;\n\t\tgl_FragColor = color;\n\t}"),nH=new sd("attribute vec2 position;\n\tattribute mediump vec2 uv;\n attribute mediump vec2 maskUv;\n\tattribute lowp vec4 color;\n\tuniform mat4 projectionViewWorldMatrix;\n\tvarying lowp vec4 vColor;\n\tvarying mediump vec2 vUv;\n varying mediump vec2 vMaskUv;\n\tvoid main() {\n\t\tvColor = color;\n\t\tvUv = uv;\n vMaskUv = maskUv;\n\t\tgl_Position = projectionViewWorldMatrix * vec4(position, 0.0, 1.0);\n\t}",
|
||
"precision mediump float;\n\tvarying lowp vec4 vColor;\n\tvarying mediump vec2 vUv;\n varying mediump vec2 vMaskUv;\n\tuniform sampler2D texture;\n\tuniform sampler2D maskAlpha;\n\tvoid main() {\n\t\tlowp vec4 color = vColor;\n\t\tcolor.a *= texture2D(maskAlpha, vMaskUv).r;\n\t\tif (color.a == 0.0) discard;\n\t\tgl_FragColor = color * texture2D(texture, vUv);\n\t}"),rR={position:new Yb([],2,0,40,!1),uv:new Yb([],2,8,40,!1),maskUv:new Yb([],2,16,40,!1),color:new Yb([],4,24,40,!1)};u(nh,sa);nh.prototype.pb=
|
||
function(a){var b=this.o;if(a)switch(a.event){case zc:b=this.u;break;case Ac:b=this.l}this.effect=b;b.pb();a=this.wc;for(var c=0;c<a.length;++c){var d=a[c];d.visible=d===b}};nh.prototype.update=function(a){var b=this.effect;b&&b.visible&&(b.update(a),b.Qb()||(b.visible=!1))};u(oh,nh);oh.prototype.pb=function(a){nh.prototype.pb.call(this,a);this.g=0};oh.prototype.update=function(a){nh.prototype.update.call(this,a);a=this.g+=a;for(var b=Math.min(a,1),c=this.m,d=0;6>d;++d)$c(c[d].Ia(-60*a+60*d).setScale(b*
|
||
(1.4+.2*Math.cos(3*a+d)),b*(2.52+.2*Math.sin(2*a+d))),b)};u(Ye,ib);p=Ye.prototype;p.dn=function(a){this.Hc.visible=a};p.isLoaded=function(){return(!this.Gc||this.Gc.isLoaded())&&(!this.j||this.j.isLoaded())&&(!this.g||this.g.isLoaded())&&!0};p.Yc=function(){var a=this.Gc;a&&(a.Yc=!0);if(a=this.j)a.Yc=!0;if(a=this.g)a.Yc=!0;return this};p.Qb=function(){return this.Gc&&this.m.Qb()||this.j&&this.Ta.Qb()||this.g&&this.o.Qb()};p.play=function(a,b,c){this.m.play(a,b,c);this.Ta.play(a,b,c);this.o.play(a,
|
||
b,c)};p.Ed=function(a){return this.j?this.Ta.Ed(a):this.Gc?this.m.Ed(a):this.g?this.o.Ed(a):0};p.za=function(a,b){this.m.za(a,b);this.Ta.za(a,b);this.o.za(a,b)};p.Tc=function(a,b){this.za(Da(this.Ed(b)+a,0,1),b)};p.set=function(a,b,c){var d=this;c=void 0===c?null:c;var e=this.app.S,f=this.Ta,g=this.j;g&&(g.parent&&g.parent.Vc(g),e.release(g),uf(f,null));this.C=null;if(a){var l=a.model;Cd(l)||e.register(l);g=this.j=e.aa(l);g.ia(function(){if(d.j===g){uf(f,g);d.C=g.Wa.Hb.Body01;var A=a.Qn;if(!A.length)for(var H=
|
||
g.Wa.Le,I=0;I<H.length;++I){var O=H[I];-1===$I.indexOf(O.name)&&A.push(O.name)}for(H=0;H<Dq;++H)switch(Xg(f,void 0===H?0:H).animationName){case "face":$f(f,$I,H);break;case "mouth_close":case "mouth_open":$f(f,A,H)}}})}else g=this.j=null;this.Ua=a;var n=this.o,r=this.g;r&&(r.parent&&r.parent.Vc(r),e.release(r),uf(n,null).animation=null);c?(l=c.model,Cd(l)||e.register(l),r=this.g=e.aa(l),r.ia(function(){if(d.g===r){uf(n,r);n.animation=r.animation||d.m.animation;var A=c.Ue;if(A){if(!c.ti)for(var H=
|
||
c.ti=[],I=r.Wa.Le,O=0;O<I.length;++O){var S=I[O];-1===A.indexOf(S.name)&&H.push(S.name)}for(H=0;H<Dq;++H)H===Fw?$f(n,c.ti,H):$f(n,A,H);n.play("drive",!0,Fw)}else for(A=0;A<Dq;++A)$f(n,void 0,A)}})):r=this.g=null;this.je=c;var w=this.m,y=this.Gc;y&&(this.Vc(y),e.release(y),uf(w,null));this.O=null;b?(l=b.model,Cd(l)||e.register(l),y=this.Gc=e.aa(l),y.ia(function(){if(d.Gc===y){uf(w,y);var A=d.O=y.Wa.Hb.CarBone01;g&&d.j===g&&A.i(g.setPosition(0,0,0).I(0,0,0));r&&d.g===r&&A.i(r.Bc(b.zb).jl(b.Ib))}})):
|
||
y=this.Gc=null;this.lb=b;y?this.i(y.setPosition(0,0,0).I(0,0,0)):g?this.i(g.setPosition(0,0,0).I(0,0,0)):r&&this.i(r.setPosition(0,0,0).I(0,0,0));return this};p.ka=function(a,b){b=void 0===b?!1:b;var c=this.app;if(b)for(var d=this.m,e=this.Ta,f=this.o,g=1;g<Dq;++g)d.za(0,g),e.za(0,g),f.za(0,g);d=this.state;switch(this.state=a){case Xl:this.play(this.Ua.$,!0,ae);this.mc=2;this.Hc.setPosition(2.348,-1.098,-1.497).I(90,34.069,-.022);break;case Ef:d!==Yj||b?(this.play("karts",!0,ae),this.play("kart_change",
|
||
!0,mv)):this.Ta.play("in",!1,Gw);b&&(this.mc=2,this.l=0);this.Hc.setScale(.8).setPosition(-.226,.008,1.6).I(11.905,-.956,-4.435);break;case Bg:(b||d!==Im)&&this.play("drive",!0,ae);this.Hc.setPosition(.366,.17,0).setScale(.6).I(0,0,-50);break;case Yj:this.play("enjoy",!0,Xd);b?(this.play("karts",!0,ae),this.Ta.play(this.Ua&&this.Ua.gm||"kart_unlock",!0,Xd),this.Ta.za(1,Xd)):this.Ta.play("out",!1,Xd);this.visible&&c.audio.play(this.Ua.qj);break;case Im:b&&this.play("drive",!0,ae);this.visible&&c.audio.play(this.Ua.fm);
|
||
break;case Yl:this.play(this.Ua&&this.Ua.unlock||"hero_unlock",!0,Xd);b&&this.za(1,Xd);this.Hc.setPosition(2.348,-1.098,-1.497).setScale(.85).I(90,34.069,-.022);this.isLoaded()&&c.audio.play(this.Ua.em);break;case aJ:this.play(this.Ua&&this.Ua.unlock||"hero_unlock",!0,ae);break;case bJ:this.play(this.Ua&&this.Ua.unlock||"hero_unlock",!0,ae);break;case sp:this.play("karts",!0,ae);break;case HH:this.play("karts",!0,ae);break;case FH:this.play("enjoy",!0,ae);break;case cJ:this.play("face",!0,ae);this.play("mouth_close",
|
||
!0,he);this.Ta.za(1,he);break;case dJ:this.play("drive",!0,ae);break;case eJ:this.play("drive",!0,ae);break;case xH:this.play("face",!0,ae),this.play("mouth_close",!0,he),this.Ta.za(1,he),this.play("mouth_open",!0,Xd)}return this};p.update=function(a){var b=this.app;switch(this.state){case Ef:0>=(this.mc-=a)&&(this.mc=0);nv(this,5*(this.Ta.Qb(he)?a:-a),he);1===this.l&&0===this.u&&0!==this.Db&&(b.audio.play(this.Ua.Zk),this.u=1.5);this.u=Math.max(this.u-=a,0);var c=this.l,d=this.l=Math.max(this.l-=
|
||
3*a,0);this.Ta.za(1.3*Math.sin(d*Math.PI),mv);0<c&&0>=d&&0!==this.Db&&b.audio.play("assets/general/to_kart.wav");b=8*(this.Ta.Qb(Gw)?a:-a);nv(this,b,Gw);this.Tc(-4*a,Xd);break;case Xl:0>=(this.mc-=a)&&(this.mc=0);this.Tc(5*(this.Ta.Qb(he)?a:-a),he);this.Tc(-4*a,Xd);break;case Yj:case Yl:this.Tc(4*a,Xd);break;case sp:0>=(this.mc-=a)&&(this.mc=0),nv(this,5*(this.Ta.Qb(he)?a:-a),he)}if(b=this.isLoaded())this.m.update(a),this.Ta.update(a),c=this.o,c.za(this.je&&this.je.Ue?1:0,Fw),c.update(a);this.Hc.update(a,
|
||
!b);(c=this.Gc)&&(c.visible=b);c&&c.update(a);(c=this.j)&&(c.visible=b);if(c=this.g)c.visible=b,c.update(a,this.state===Bg||this.state===Im);this.U();return this};var ae=0,he=1,mv=2,Xd=3,Gw=4,Fw=5,Dq=6,Xl=0,Ef=1,Bg=2,Yj=3,Yl=4,Im=5,aJ=6,bJ=7,sp=8,HH=9,FH=10,cJ=11,dJ=12,eJ=13,xH=14,$I=["BoyMounth01","pojarMouth01","TLMouth01","TRMouth01"];u(Zl,ib);Zl.prototype.update=function(a,b){var c=this.Ab;(c.visible=b)&&c.I(this.time+=180*a,0,0)};var oH=new Fb;u(Bi,ac);Bi.prototype.setScale=function(a,b){ac.prototype.setScale.call(this,
|
||
a,b,1);this.U();return this};var Eq=new Dd;Eq.attributes.position=new Yb([-1,1,0,1,1,0,1,-1,0,-1,-1,0],3);Eq.Kb=new de([0,2,1,0,3,2]);wj(Eq);var IO=Eq;var JO=Za(new Fb,Gd).Da(xI).ya(Dc).define("SHADOW").ab(!1);u(Zj,tb);Zj.prototype.yb=function(){tb.prototype.yb.call(this);this.app.screen.clearColor=!1};Zj.prototype.layout=function(){tb.prototype.layout.call(this);var a=this.width,b=this.height,c=Math.max(a/4096,b/2048);this.V.setPosition(a/2,b/2);this.J.setPosition(a/2,b);this.u.setPosition(Math.min(a/
|
||
2-270,330*c),Math.max(200,b/2-840*c)-b/2);this.na.scale=c+.1};Zj.prototype.update=function(a){var b=this,c=this.app,d=c.da,e=d.count,f=this.ready;if(0===e){var g=this.V;if(g.visible)if(this.C){if(f.visible||(f.visible=!0,this.D||(f.i(this.D=Lb(bd(lb((new nb(c,"assets/common/font.json",c.Ub?"PRESS OK TO CONTINUE":c.Dh?"TAP TO CONTINUE":"CLICK TO CONTINUE",.5,.5)).R(this.W.y)),1100),.85)),Dj(c.platform,"loaded")),d=this.K,this.D.visible=d,this.W.visible=!d),d=this.l)this.l=null,d()}else go(this)&&((e=
|
||
this.P)?(this.P=null,e()):c.init(),e=this.g=d.count,this.K||this.l||(this.l=function(){b.H()}),this.C=!0);else g.visible=this.J.visible=!0,this.g=0}e>this.g&&(this.g=e);this.C&&(d=this.dc,d.value=Math.max(d.value,0===this.g?0:1-e/this.g));f.visible&&(f.opacity=.2+.8*Math.abs(Math.sin(8*(this.ua+=a))));this.u.state===Zb&&SC(c.platform)&&(this.u.state=Ec)};Zj.prototype.H=function(){this.ready.visible&&this.app.$.start()};u(qh,mb);qh.prototype.Yj=function(a){var b=P.apply(1,arguments),c=gd(this.title,
|
||
a);c.kg=b;c.g=c.j=!0;this.g.visible=!0;return this.show()};qh.prototype.Ef=function(a){var b=P.apply(1,arguments),c=gd(this.title,a);c.kg=b;c.g=c.j=!0;this.g.visible=!1;this.show(1E3)};qh.prototype.show=function(a){a=void 0===a?0:a;var b=this.g.visible;Ta(this.title,1200,b?550:900,ab).R(b?320:500);return mb.prototype.show.call(this,a)};qh.prototype.fa=function(){this.g.visible&&mb.prototype.fa.call(this)};u($l,Ya);$l.prototype.show=function(a){a=void 0===a?ak:a;var b=this.app,c=b.platform;if(a===
|
||
ak&&this.u){this.u=!1;for(var d=this.W,e=0,f;e<d.length;){switch(f=d[e]){case tp:at(c)&&(a=f);break;case am:c.Ag()&&(a=f);break;case bm:c.bg()&&(a=f);break;case cm:c.yi()&&(a=f);break;case dm:c.zg()&&(a=f);break;case em:YC(c)&&(a=f);break;case ov:$C(c)&&(a=f)}if(a===ak)++e;else{C(d,e);break}}}if(a===ak)return null;b=b.B;this.K.set(ie(b),Ff(b),Gf(b));this.login.visible=this.l.visible=this.Ee.visible=this.nf.visible=this.Vd.visible=this.fh.visible=this.share.visible=!1;switch(this.type=a){case tp:this.title.fc=
|
||
"LOG IN TO SAVE YOUR PROGRESS TO THE CLOUD AND PLAY WITH FRIENDS!";this.login.visible=!0;break;case am:this.title.fc="IT'S MORE FUN TO PLAY WITH FRIENDS! GRANT ACCESS TO YOUR FRIENDS LIST TO SEE THEIR SCORES";this.l.visible=!0;break;case bm:this.title.fc="DO YOU WANT TO BE NOTIFIED ABOUT NEW HEROES, KARTS AND EVENTS?";this.Ee.visible=!0;break;case cm:this.title.fc="DO YOU LIKE THE GAME? ADD IT TO YOUR FAVORITES!";this.nf.visible=!0;break;case dm:this.title.fc="DO YOU LIKE THE GAME? FOLLOW US!";this.Vd.visible=
|
||
!0;break;case em:this.title.fc="DO YOU LIKE THE GAME? ADD IT TO YOUR HOME SCREEN!";this.fh.visible=!0;break;case ov:this.title.fc="DO YOU LIKE THE GAME? SHARE IT WITH FRIENDS!",this.share.visible=!0}this.u=!1;this.P=0;Fd(this.g,40);return Ya.prototype.show.call(this)};$l.prototype.fa=function(a){if(void 0===a?0:a)this.app.play.hl=!0;this.login.visible&&++this.app.platform.zi;Ya.prototype.fa.call(this)};$l.prototype.update=function(a){Ya.prototype.update.call(this,a);var b=this.K;b.update(a);a=this.app;
|
||
a.audio.zc(b.lb.ld,a.Fa.isActive()||!this.Kc?0:.1,.25,!0);if(this.Kc&&go(this))switch(this.type){case tp:!at(a.platform)&&this.fa(!0);break;case am:!a.platform.Ag()&&this.fa(!0);break;case bm:!a.platform.bg()&&this.fa(!0);break;case cm:!a.platform.yi()&&this.fa(!0);break;case dm:!a.platform.zg()&&this.fa(!0);break;case em:!YC(a.platform)&&this.fa(!0)}};var ak=0,tp=1,am=2,bm=3,cm=4,dm=5,em=6,ov=7;u(fm,Ya);fm.prototype.Vb=function(){var a=this,b=this.app,c=b.platform;c=XC(c)||Pn(c);this.share.visible=
|
||
c;Fd(this.g,40);var d=this.u;d.I(-90,.022,35).setPosition(0,0,.55);var e=this.app.B;d.set(ie(e),null,null);d.ka(c?aJ:bJ);d=this.l;c=e.Pb();var f=this.na=e.yd,g=this.dj,l=this.ej;l.visible=!0;g.visible=!1;f&&(g.qb=b.oa.get(f,{Ga:1,crossOrigin:""},function(){a.na===f&&(l.visible=!1,g.visible=!0)}));this.lk.text=c;this.kk.text=d;e=e.nd;var n=e[d],r=this.K=n.yd,w=this.Zc,y=this.Od;y.visible=!0;w.visible=!1;r&&(w.qb=b.oa.get(r,{Ga:1,crossOrigin:""},function(){a.K===r&&(y.visible=!1,w.visible=!0)}));this.kf.text=
|
||
n.Pb();this.mf.text=d+1;n=this.Lg;this.Lg=this.l;this.xb=In(b.locale,c,"I just got ahead of you with a score of %0! Come on, catch up!").replace("%0",c);for(var A=this.wb=[];d<n;++d)A.push(e[d].id);this.Cc=In(b.locale,c,"I've got a new high score of %0! Catch up!").replace("%0",c);this.P.value=c};fm.prototype.show=function(a){this.Vb(a);a=this.app;up(a.Zh);a=a.audio;a.play("assets/general/congrats.wav");a.play(this.u.Ua.qj);return Ya.prototype.show.call(this)};fm.prototype.update=function(a){Ya.prototype.update.call(this,
|
||
a);var b=this.W+=a;this.cj.y=-215-25*Math.abs(Math.sin(b));this.Lc.y=65+25*Math.abs(Math.sin(b));this.u.update(a)};u(pv,tb);p=pv.prototype;p.Nc=function(){tb.prototype.Nc.call(this);this.Tb=!0;this.rb=1;Cp(this.app.Nb);Fd(this.l,30);this.update(0)};p.show=function(a,b){var c=this,d=this.app,e=d.screen;d.play.Rj=!1;zt(d.Fa,void 0===a?null:a,void 0===b?null:b,function(){e.push(d.play);e.push(d.$)},function(){var f=c.sc;if(xp(d.B)){var g=c.l;ee(g,d.Nb.window.setPosition(700,-800).set("HERE'S THE GARAGE! LET'S GET IN",
|
||
!0,.2),g.children.length-1);Rb(c,f,void 0,!1);c.Ob(f);f.keys.push(Q.Ka);f.keys.push(Q.La);f.Og()}else f.keys.length=1,f.Og(d.sc.Sk()),vh(d)})};p.layout=function(){tb.prototype.layout.call(this);this.top.x=this.l.x=this.width/2};p.update=function(a){tb.prototype.update.call(this,a);var b=this.app,c=this.Tb,d=this.rb=Da(this.rb+4*(c?a:-a),0,1),e=this.height,f=500*Cb(1-d);this.top.y=-f;var g=this.l;g.y=e+f;g.Pg(fo(this.buttons,40));this.event.visible&&VH(b,this.u,"%0 DAYS");this.g.update(a);e=b.Nb;e.window.parent===
|
||
g?e.window.update(a):this.wa===this.sc&&Rb(this,this.g,void 0,!1);c||0!==d||(b.screen.remove(this),b.input.enable());b.audio.zc("assets/general/menu.wav",c&&!b.Fa.isActive()?1:0,.25)};p.Ob=function(a,b){return null!==a||this.app.Ub?this.app.Nb.window.parent===this.l&&a!==this.sc?!1:tb.prototype.Ob.call(this,a,b):tb.prototype.Ob.call(this,a,b)};p.start=function(){var a=this.app;Dj(a.platform,"started");ck(a.B)?zt(a.Fa,"start","start-game",function(){a.screen.push(a.play)},function(){Zs(a.platform)?
|
||
a.platform.ol().then(function(){a.play.start()}):a.play.start()}):this.show("start","start-game")};p.play=function(){var a=this.app;a.input.isEnabled()&&(a.input.disable(),this.Tb=!1,a.play.start())};p.cc=function(a){for(var b=this.C,c=this.app.S,d=0;d<b.children.length;++d){var e=b.children[d];b.removeChild(e);c.release(e)}(this.event.visible=!!a&&a.$)&&b.i(a.$);rH(this)};u(wp,md);wp.prototype.update=function(a){var b=this.state;b===Kf?this.l=0:this.l+=a;var c=this.l%5;a=this.D;var d=this.H,e=this.J,
|
||
f=Math.sin((Da(c,.25,.55)-.25)/.3*Math.PI);e.scale=.6+.2*f;e.x=130+40*f;f=Math.sin((Da(c,.35,.35+.3)-.35)/.3*Math.PI);d.scale=.8+.2*f;d.x=250+40*f;c=Math.sin((Da(c,.45,.75)-.45)/.3*Math.PI);a.scale=1+.2*c;a.x=386+40*c;a.y=b===Lf?d.y=e.y=40:d.y=e.y=50;this.wa.setScale(a.scale).setPosition(a.x,a.y);this.ua.setScale(d.scale).setPosition(d.x,d.y);this.na.setScale(e.scale).setPosition(e.x,e.y)};wp.prototype.$a=function(a,b){return md.prototype.$a.call(this,a,b)||this.D.$a(a,b)||this.H.$a(a,b)||this.J.$a(a,
|
||
b)};u(qv,tb);p=qv.prototype;p.yb=function(){tb.prototype.yb.call(this);var a=this.app;ck(a.B)&&(a.Nb.state=-1,a.sa.Me())};p.layout=function(){tb.prototype.layout.call(this);var a=this.width,b=this.height,c=this.Ca;c.hj=a/b;vl(c);this.dh.setPosition(a/2,b/2);this.V.setPosition(a/2,b/2);this.top.x=this.Od.x=a/2;this.J.x=Math.max(440-((a-760)/2-50),0);this.na.x=200-a/2;this.xb.x=a/2-200};p.ob=function(a){var b=this.app.Pj;b.focus=60;b.ob(a.X,this.Va,this.Ca);tb.prototype.ob.call(this,a)};p.Nc=function(){tb.prototype.Nc.call(this);
|
||
this.reset()};p.clear=function(){for(var a=this.Va.children,b=0;b<a.length;++b)this.remove(a[b]);tH(this)};p.reset=function(){this.clear();this.add(this.B);this.add(this.xf);this.location.reset();var a=this.mf;a.length=0;for(var b=this.app.B,c=this.Qa,d=0;d<c.length;++d){var e=c[d],f=Ze[e];b.Qa(f.name)<f.count&&a.push(e)}c=this.zd;for(d=0;d<c.length;++d){e=c[d];f=Math.min(dk(b,og[e]),2);for(var g=0;g<f;++g)a.push(e)}ha(a);this.Ca.reset();uH(this);this.hl=this.Lf=!1};p.pb=function(){var a=this,b=this.app;
|
||
this.Rj=!0;zt(b.Fa,this.hl?null:"next","restart-game",function(){b.screen.push(a);a.start()},function(){b.focused||b.pause.show()})};p.pause=function(){this.Ng.visible=!1;this.Lf||(this.Lf=!0,this.A(sh))};p.resume=function(){this.Lf=!1;this.Ng.reset()};p.start=function(){var a=this,b=this.app;if(ck(b.B))b.Nb.show(Ci).once(jm,function(){a.B.ka(Fi);a.A(bk)});else this.B.ka(Fi),this.A(bk)};p.end=function(){this.pause();this.app.Bf.show()};p.Bf=function(){this.B.ka(Hd);this.resume()};p.jh=function(a,
|
||
b){var c=this.app;switch(a.id){case "Almaz01":return a=c.S,b=this.mf,c=null,0<b.length&&.3>Math.random()&&(c=a.aa(Rj),c.set(b.pop())),c||yj(a,U(sR));default:return-1===b.usage&&c.event&&c.event.fa&&-1!==a.name.indexOf(c.event.fa)?null:this.location.jh(a,b)||yj(c.S,a.id)}};p.add=function(a,b){b=void 0===b?this.Va:b;a.input&&this.Lc.push(a);a.xc&&this.Cc.push(a);a.update&&this.de.push(a);a.gl&&this.He.push(a);b.i(a);return this};p.remove=function(a){-1===this.ef.indexOf(a)&&this.ef.push(a)};p.update=
|
||
function(a){tb.prototype.update.call(this,a);this.Ng.update(a);var b=a;if(this.Lf||this.Ng.visible)a=0;else{a:{var c=this.app.Nb;switch(c.state){case Di:case th:case km:c=1-c.rb;break a;default:c=1}}a*=c}this.gg+=a;c=this.l;for(var d=this.tn,e=this.keys,f=0,g=.5*this.width*this.scale,l=0;l<c;++l)f+=Math.sign(g-d[l].position.x);(e[Q.Zg]||e[Q.ue])&&++f;(e[Q.$g]||e[Q.Kh])&&--f;this.B.wa=Da(f,-1,1);c=this.Ca;d=1/30;e=this.Lc;f=this.Cc;this.u+=a;for(g=0;this.u>=d&&5>g;){l=0;for(var n=e.length;l<n;++l)e[l].input(d);
|
||
this.world.step(d);l=0;for(n=f.length;l<n;++l)f[l].xc(d);c.xc(d);this.u-=d;g++}this.u%=d;this.Ej=this.u/d;d=this.de;e=0;for(f=d.length;e<f;++e)d[e].update(a);c.update(a);this.location.update(a);c=this.He;d=0;for(e=c.length;d<e;++d)c[d].gl(a);tH(this);LO(this,b,a)};p.message=function(a){for(var b=P.apply(1,arguments),c=this.Yb,d=0;d<c.length;++d){var e=c[d];if(!e.visible){e.show(a,b);return}}this.cj.i(c[c.length]=(new ek(this.app)).show(a,b))};var rv=new E,zp=new E,bk=qa++,sh=qa++,Ap=qa++,sR=["Kanistra01",
|
||
"Nitro01","Mnoj01","Magnit01","CoinDuble01"];u(ek,sa);ek.prototype.show=function(a,b){a=bh(this.u.L(!0),a);a.kg=b;this.visible=a.g=a.j=!0;this.g.visible=!1;this.Ke=0;this.time=2;return this};ek.prototype.Qi=function(a){var b=this.app,c=Ze[a];a=b.B.Qa(a);var d=c.count;hb(hb(bh(this.u.L(!0),"%0/%1"),0,a),1,d);this.visible=!0;this.g.visible=!0;a=this.o;this.m!==c&&(this.m=c,b=b.S,a&&(this.l.removeChild(a),b.release(a)),Cd(c.model)||b.register(c.model,1),this.l.i(this.o=b.aa(c.model).setPosition(0,0,
|
||
0).I(0,0,0).setScale(1)).U());this.Ke=0;this.time=5;return this};ek.prototype.update=function(a){this.visible&&(0<this.time?(this.Ke=Math.min(this.Ke+4*a,1),1===this.Ke&&(this.time=Math.max(this.time-a,0))):(this.Ke=Math.max(this.Ke-4*a,0),0===this.Ke&&(this.visible=!1)),this.x=600*Eb(1-this.Ke))};u(yp,sa);yp.prototype.reset=function(){this.time=2.5;this.visible=!0;this.ready.opacity=this.g.opacity=0};yp.prototype.update=function(a){a=this.time=Math.max(this.time-2*a,0);0>=a&&this.visible&&(this.visible=
|
||
!1,this.app.play.A(Ap));var b=Da(a-2.2,0,.3)/.3;b?(1!==b&&0===this.ready.opacity&&this.app.audio.play("assets/general/ready.wav"),$c(this.ready,1-b).setScale(3*b*b*b+1,1+Eb(b))):$c(this.ready,Math.max(a-1.2,0)/.5);(b=Da(a-1.2,0,.3)/.3)?(1!==b&&0===this.g.opacity&&this.app.audio.play("assets/general/go.wav"),$c(this.g,1-b).setScale(Cb(1-b))):$c(this.g,Math.max(a,0)/.3)};u(hm,mi);hm.prototype.reset=function(){this.vi=this.startTime=0;this.Bc(Ek);this.Be.copy(Ek);this.Ye.copy(Ek);this.target.copy(Fk);
|
||
this.o.copy(Fk);this.m.copy(Fk);this.velocity.set(0,0,0);this.C.set(0,0,0);this.l.copy(Ce);this.u.copy(Zk);this.O.copy(td);this.Z.copy(Zk);JD(this.Bc(Ek),Fk).U()};hm.prototype.xc=function(a){var b=this.Ye;this.Be.copy(b);var c=this.m;this.o.copy(c);var d=this.app.play,e=d.B,f=d.path,g=e.Ye;d=e.ae;var l=this.J,n=this.D.copy(d?d.direction:Ce).scale(20).add(g);d=pi(f,n,!0,d);var r=f.Hd(d,!0,n);r?(f=mo(f,d,r,n),d.direction.dd(r.direction,f,n).normalize(),d.lc.dd(r.lc,f,l).normalize()):(n.copy(d.direction),
|
||
l.copy(d.lc));n=vn(this.l,n,this.u,a,.25).normalize();r=vn(this.O,l,this.Z,a,.25).normalize();f=n.Fa(r,this.H).normalize();l=this.P;var w=l.elements;w[0]=n.x;w[1]=n.y;w[2]=n.z;w[3]=0;w[4]=f.x;w[5]=f.y;w[6]=f.z;w[7]=0;w[8]=r.x;w[9]=r.y;w[10]=r.z;w[11]=0;w[12]=g.x;w[13]=g.y;w[14]=g.z;w[15]=1;g=l.transformPoint(tR,uR);n=l.transformPoint(vR,wR);e=this.vi=Da(this.vi+(e.Ab?.5:-1)*a,0,1);g.z=(1-.1*e)*(g.z-d.z)+d.z;vn(b,g,this.velocity,a,.07);vn(c,n,this.C,a,.04);a=l.Fc(this.K);a.transformPoint(g);a.transformPoint(b);
|
||
b.y=g.y;l.transformPoint(b);a.transformPoint(n);a.transformPoint(c);c.y=n.y;l.transformPoint(c)};hm.prototype.update=function(a){var b=this.app,c=b.play,d=c.B,e=this.target;switch(d.state){case Pl:this.Bc(Ek);e.copy(Fk);break;case Fi:case Hd:c=c.Ej,this.Be.dd(this.Ye,c,this),this.o.dd(this.m,c,e),a=this.startTime+=.39*a,a=Da(1-(Da(a,.7,1)-.7)/(1-.7),0,1),a=a*a*(3-2*a),Ek.dd(this,1-a,this),e.dd(Fk,a)}JD(this,e).U();b=b.audio;e=d.x;a=d.y;c=d.z;var f=b.context;if(f){var g=f.listener;g.positionX?(g.positionX.setTargetAtTime(e,
|
||
f.currentTime,.01),g.positionY.setTargetAtTime(a,f.currentTime,.01),g.positionZ.setTargetAtTime(c,f.currentTime,.01)):g.setPosition(e,a,c)}b.om.set(e,a,c);a=d.Dd(YI).pf(Aq);d=a.x;e=a.y;a=a.z;if(b=b.context)b=b.listener,b.forwardX?(b.forwardX.value=d,b.forwardY.value=e,b.forwardZ.value=a,b.upX.value=0,b.upY.value=0,b.upZ.value=1):b.setOrientation(d,e,a,0,0,1)};var Ek=new E(-4.204,-15.519,2.385),Fk=new E(-4.204,0,2.179),tR=new E(-7,0,5),vR=new E(0,0,2.5);u(uv,tb);p=uv.prototype;p.yb=function(){tb.prototype.yb.call(this);
|
||
this.app.Fa.isActive()?this.off(jm):this.A(jm)};p.layout=function(){tb.prototype.layout.call(this);this.window.x=this.g.x=this.width/2};p.show=function(a){a=void 0===a?this.state:a;this.Tb=!0;this.rb=0;var b=this.app;b.screen.push(this);Cp(this);switch(this.state=a){case Ci:a="HI! I AM MAX. THE POLICEMAN CAUGHT ME AGAIN... LET'S GET AWAY FROM HIM!";break;case Di:a="GREAT! I WILL HIT THE GAS, AND YOU WILL DRIVE. LET'S TRY TO COLLECT SOME COINS";break;case th:a="AWESOME! I SEE OBSTACLES AHEAD. LET'S SMASH THEM TO BITS!";
|
||
break;case km:a="AMAZING! YOU ROCK! KEEP DRIVING UNTIL THE FUEL RUNS OUT!";break;default:a=""}this.window.set(a);b.input.disable();this.update(0);return this};p.fa=function(){this.Tb=!1;var a=this.app;a.input.disable();a.audio.play("assets/general/hide_panel.wav");this.A(xR)};p.update=function(a){tb.prototype.update.call(this,a);var b=this.Tb,c=this.rb=Da(this.rb+(b?2:-4)*a,0,1),d=b?Eb(1-c):Cb(1-c);this.window.R(150-700*d).update(a);this.g.R(this.height-200+700*d).update(a);b&&1===c&&this.app.input.enable();
|
||
b||0!==c||(a=this.app,a.input.enable(),a.screen.remove(this),this.rb=0)};var xR=qa++,jm=qa++,Ci=0,Di=1,th=2,km=3,MO=4;u(Bp,jb);Bp.prototype.update=function(a){var b=this.state;b===Kf?this.l=0:this.l+=a;var c=this.l%5;a=this.D;var d=this.H,e=Math.sin((Da(c,.45,.75)-.45)/.3*Math.PI);d.scale=1+.2*e;d.x=340+40*e;c=Math.sin((Da(c,.35,.35+.3)-.35)/.3*Math.PI);a.scale=1+.2*c;a.x=160+40*c;a.y=b===Lf?d.y=40:d.y=50;this.wa.setScale(a.scale).setPosition(a.x,a.y);this.J.setScale(d.scale).setPosition(d.x,d.y)};
|
||
Bp.prototype.$a=function(a,b){return jb.prototype.$a.call(this,a,b)||this.D.$a(a,b)||this.H.$a(a,b)};u(lm,sa);lm.prototype.l=function(){this.update(0)};lm.prototype.set=function(a,b,c){c=void 0===c?0:c;this.label.fc=a;this.time=0;a=this.g;if(a.visible=void 0===b?!1:b)a.opacity=0,this.app.input.disable(),this.time=-c;return this};lm.prototype.update=function(a){var b=this.time,c=Math.max(this.time+=a,0);0<c&&(this.app.input.enable(),0>=b&&this.app.audio.play("assets/general/show_panel.wav"));b=this.label.text.charCodeAt(Math.floor(10*
|
||
c));Number.isNaN(b)&&(b=32);b=1.5*Math.abs(Math.sin(.1*(b-32)));var d=this.m,e=d.Ta,f=e.Ed(Xd);f=b>=f?Math.min(f+4*a,b):Math.max(f-4*a,b);e.za(f,Xd);d.update(a);a=this.g;a.visible?(this.Ab.scale=Cb(Math.min(4*c,1)),b=this.sb,d=eo(this,yR.set(0,0)),$c(a.setPosition(d.x-100,d.y-100).Eb(b.width+200,b.height+200),.6*Math.min(4*c,1))):this.Ab.scale=1};u(vv,mb);p=vv.prototype;p.layout=function(){mb.prototype.layout.call(this);this.l.x=this.width/2};p.yb=function(){mb.prototype.yb.call(this);var a=this.app;
|
||
a.Fa.isActive()||a.play.resume()};p.Vb=function(){var a=this.app,b=this.D,c=a.audio;b.visible=c.isEnabled();c.Eg?c.Qg?bb(b,"assets/common/sound_off.png",227,281):bb(b,"assets/common/sound_on.png",322,281):bb(b,"assets/common/music_on.png",340,282);Fd(this.l,40);b=this.sa;for(c=0;c<b.length;++c)b[c].visible=!1;c=-200;var d=a.sa,e=d.yg();d=d.list;1>=d.length&&(e=null);for(var f=0;f<d.length;++f){0!==f&&(c+=80);var g=d[f],l=b[f];Iv(l,g).L(!0);l.y=c+l.height/2;c+=l.height;l.ka(l.check.visible||null===
|
||
e?Zb:Ec);l.ve.setColor(g===e?4286243867:4282162431)}if(this.C.visible=this.K.visible=!!e)this.C.y=this.K.y=c+=130;this.H.Eb(1410,c);this.C.fc=a.Ub?"SELECT QUEST TO MAKE IT PRIMARY":a.Dh?"TAP QUEST TO MAKE IT PRIMARY":"CLICK QUEST TO MAKE IT PRIMARY"};p.show=function(a){this.app.play.pause();this.Vb(a);return mb.prototype.show.call(this)};p.update=function(a){mb.prototype.update.call(this,a);a=this.rb;this.l.y=this.height-170+700*(this.Tb?Eb(1-a):Cb(1-a))};u(nm,mb);nm.prototype.Vb=function(a){var b=
|
||
this.app,c=b.platform;a:switch(c.va){case rd:case Re:case nc:case sc:var d=!1;break a;default:d=!0}this.Tg.visible=d;if(3===a)d=!1;else a:switch(c.va){case rd:case Re:case nc:case sc:d=!1;break a;default:d=!0}this.H.visible=d;this.g.visible=3===a?!1:c.oh();this.C.state===Zb&&RC(c,"https://gemioli.com")&&(this.C.state=Ec);b=b.audio;d=this.l;d.visible=b.isEnabled();b.Eg?b.Qg?bb(d,"assets/common/sound_off.png",227,281):bb(d,"assets/common/sound_on.png",322,281):bb(d,"assets/common/music_on.png",340,
|
||
282);b=this.J;b.visible=fl&&!!Kn;pc()?bb(b,"assets/common/fullscreen_off.png",269,290):bb(b,"assets/common/fullscreen_on.png",254,296);this.login.visible=1===a?!1:at(c);this.logout.visible=c.tf();this.P.visible=(this.login.visible||this.logout.visible)&&(c.va===sc||c.va===Re);gd(this.W,this.login.visible?"LOG IN TO SAVE YOUR PROGRESS TO THE CLOUD!":"YOUR PROGRESS IS SAVED IN THE CLOUD!");a=this.ua;b=this.g.visible?30:60;c=a.children;b=void 0===b?0:b;b=void 0===b?0:b;d=0;for(var e=null,f=0;f<c.length;++f){var g=
|
||
c[f];g.visible&&(e?d+=g.height+b:(d+=g.height,e=g))}if(e)for(f=e=0;e<c.length;++e)g=c[e],g.visible&&(g.y=f+g.height*g.dg,f+=g.height+b);a.height=d;a=Sd(a,1).Pg(700).setPosition(720,210);Fd(this.K,60);this.C.setPosition(0<a.height?-350:0,-100)};nm.prototype.show=function(a){this.Vb(a);return mb.prototype.show.call(this)};nm.prototype.fa=function(){this.login.visible&&++this.app.platform.zi;mb.prototype.fa.call(this)};u(Dp,mb);Dp.prototype.show=function(a){(this.cancel.visible=!a)?(Rb(this,this.cancel),
|
||
this.Ob(this.cancel)):(Rb(this,this.g),this.Ob(this.g));this.result=AH;Fd(this.buttons,40);return mb.prototype.show.call(this)};Dp.prototype.fa=function(){this.cancel.visible&&mb.prototype.fa.call(this)};var AH=0,yH=1,zH=2;u(fk,mb);fk.prototype.yb=function(){mb.prototype.yb.call(this);var a=this.app;if(this.Bf){var b=a.play,c=b.B,d=this.na;this.ed.visible?kH(c,c.Bi=d):this.ua.visible?iH(c,c.Ei=d):this.ad.visible&&jH(c,c.Ai=d);c.Rc=d;b.Bf()}else if(b=a.xe,b.app.B.Pb()>b.bl)b.show().once(qg,function(){a.fd.show()});
|
||
else a.fd.show()};fk.prototype.layout=function(){mb.prototype.layout.call(this);var a=this.width;this.dc.width=this.kd.width=a+200;this.top.x=this.P.x=a/2};fk.prototype.show=function(){var a=this,b=this.ed,c=this.ua,d=this.ad;b.visible=c.visible=d.visible=!1;var e=Math.random();hb(this.wb,0,this.na=30);.5>e?c.visible=!0:.75>e?d.visible=!0:b.visible=!0;hb(this.xb,0,this.D);this.K=null;this.time=this.g=3;var f=this.l=!1;this.Bf=!1;this.H.visible=!1;this.J&&Ej(this.app.platform,"game-revive",function(g){a.K=
|
||
g;a.g=4;a.time=a.g;a.l=f;a.H.visible=!0},function(){a.J=!1;a.Bf=!0;a.fa()},function(){a.g=3;a.time=a.g;a.l=f;a.H.visible=!1});return mb.prototype.show.call(this)};fk.prototype.update=function(a){mb.prototype.update.call(this,a);!this.l&&0<this.time&&0>=(this.time-=a)&&(this.time=0,this.fa());this.fill.width=800*this.time/this.g;hb(this.ja,0,this.C);a=this.rb;a=this.Tb?Eb(1-a):Cb(1-a);this.top.y=100-700*a;Fd(this.P.R(this.height-170+700*a),40)};u(gk,mb);gk.prototype.layout=function(){mb.prototype.layout.call(this);
|
||
this.K.x=this.width/2};gk.prototype.show=function(a,b,c,d){this.text=a;this.image=b;this.J=c;this.options=d;this.u.visible=!1;a=Zf(this.app.screen);a instanceof Ya?(this.g=a,a.J=!1):this.g=null;return mb.prototype.show.call(this)};gk.prototype.fa=function(){var a=this.g;a&&(a.J=!0,this.g=null);mb.prototype.fa.call(this)};gk.prototype.update=function(a){mb.prototype.update.call(this,a);a=this.rb;this.K.y=this.height-170+700*(this.Tb?Eb(1-a):Cb(1-a))};u(hk,mb);hk.prototype.layout=function(){mb.prototype.layout.call(this);
|
||
this.D.x=this.width/2};hk.prototype.show=function(){this.u.visible=!1;var a=Zf(this.app.screen);a instanceof Ya?(this.g=a,a.J=!1):this.g=null;return mb.prototype.show.call(this)};hk.prototype.fa=function(){var a=this.g;a&&(a.J=!0,this.g=null);mb.prototype.fa.call(this)};hk.prototype.update=function(a){mb.prototype.update.call(this,a);a=this.rb;this.D.y=this.height-170+700*(this.Tb?Eb(1-a):Cb(1-a))};u(yv,sa);p=yv.prototype;p.Sk=function(){var a=gm(this);return a&&a.Yd};p.fn=function(){var a=this.Id;
|
||
a[Sb].forEach(function(b){return b.Yc()});a[wc].forEach(function(b){return b.Yc()});a[Mb].forEach(function(b){return b.Yc()});a[Mc].forEach(function(b){return b.Yc()});this.selected.forEach(function(b){return b.L(!1)})};p.Se=function(){return this.o[this.mode].Se()};p.scrollTo=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?!1:c;b&&this.layout();var d=this.mode,e=this.Je,f=this.o;if(a){var g;-1!==(g=e[Sb].indexOf(a))?(f[d=Sb].scrollTo(g,!b),b&&(f=this.app.B,this.m.set(ie(f),a,Gf(f)).L(!0).ka(Ef,!0),
|
||
f=this.Id[Sb][g],f.visible=!1,f.lb||(f.set(null,e[Sb][g]),f.ka(Ef),f.update(Math.random())))):-1!==(g=e[wc].indexOf(a))?f[d=wc].scrollTo(g,!b):-1!==(g=e[Mb].indexOf(a))?(f[d=Mb].scrollTo(g,!b),b&&(f=this.app.B,this.g.set(ie(f),Ff(f),a).L(!0).ka(Bg,!0),f=this.Id[Mb][g],f.visible=!1,f.je||(f.set(null,null,e[Mb][g]),f.ka(Bg)))):-1!==(g=e[Mc].indexOf(a))&&f[d=Mc].scrollTo(g,!b);this.mode=d}else{var l=this.app.B;g=Ff(l);var n=ie(l);l=Gf(l);var r=e[Sb].indexOf(g),w=e[wc].indexOf(n),y=e[Mb].indexOf(l);f[Sb].scrollTo(-1===
|
||
r?0:r,!b);f[wc].scrollTo(-1===w?0:w,!b);f[Mb].scrollTo(-1===y?0:y,!b);f[Mc].scrollTo(0,!b);if(b)switch(this.m.set(n,g,l),this.g.set(n,g,-1===y?e[Mb][0]:l),this.Id[Sb][r].visible=!1,this.Id[Mb][-1===y?0:y].visible=!1,d){case Sb:this.m.L(!0).ka(Ef,!0);break;case Mb:this.g.L(!0).ka(Bg,!0)}}if(b&&!c)for(c=this.H,e=0;e<c.length;++e)c[e]=a&&e===d?1:0;this.l=!1;b&&(this.C=0);return this};p.Cj=function(a,b){b=void 0===b?!0:b;this.scrollTo(a,b);this.l=!0;b&&(this.C=1);this.update(0);switch(this.mode){case Sb:this.m.ka(Yj,
|
||
b);break;case wc:ik(this).ka(Yl,b);break;case Mb:this.g.ka(Im,b);break;case Mc:ik(this).Cj()}};p.layout=function(){var a=this.sb,b=a.width;a=a.height;this.Eb(b,a);this.D.Eb(b,3E3).setPosition(b/2,a/2);this.u.setPosition(b/2,a/2);var c=this.Ca;c.hj=b/3E3;vl(c);c=this.o;for(var d=this.Je,e=0;e<c.length;++e){var f=c[e],g=d[e];f.Eb(b,a);f.Ck.set(0,0,g.length*f.Ve.x+(this.width-f.Ve.x),0)}};p.update=function(a){for(var b=this.time+=a,c=this.Je,d=this.Id,e=this.mode,f=this.H,g=0;g<f.length;++g)f[g]=Da(f[g]+
|
||
(e===g?5:-10)*a,0,1);g=this.l;for(var l=this.C=Da(this.C+(g?4:-4)*a,0,1),n=this.o,r=0;r<n.length;++r)n[r].L(!g&&e===r).update(a);var w=f[Mb];r=f[Mc];var y=this.Ca;mg(y,17+1*f[wc]+3*w,-.8+.4*l+1.5*w,-1.5*w);y=y.od;var A=Cg.V;w=this.app;var H=w.B,I=ie(H),O=Ff(H),S=Gf(H);H=this.m;var R=this.g,ja=this.fi,ka=this.selected,ea=this.J,ma=d[Sb],pa=c[Sb],va=n[Sb],Ka=va.Se(),Aa=f[Sb],Fa=Cb(Aa*(1-l));1E-4>Fa&&(Fa=0);this.l||(ea[Sb]=O);va=5*io(va);for(var xa=0;xa<pa.length;++xa,va+=5){var Ja=Math.pow(Math.cos(Ki*
|
||
Da(va/5,-1,1)),2),La=-15*(1-Ja);Cg.set(La,va,1,3*Fa);if(xa===pa.length-1){xa===Ka&&(H.visible=!1);ja[Sb].I(0,0,35*Ja).setPosition(La,va,0).setScale(Fa).update(a);break}pa[xa]===ea[Sb]&&ka[Sb].L(0<Fa).setScale(Fa*(.5<Ja?.7:1)).setPosition(.5<Ja?5:La,(.5<Ja?-.2:va)+1,.5<Ja?.5:-.2).U();var Ha=ma[xa];if(y.ze(Cg)){if(!Ha.lb){if(g&&(e!==Sb||xa!==Ka)){Ha.L(!1);continue}Ha.set(null,pa[xa]);Ha.ka(Ef);Ha.update(Math.random())}if(xa===Ka)if(Ha.isLoaded()){if(Ha.visible||!H.visible)Ha.visible=!1,H.set(I,Ha.lb,
|
||
S),H.visible||H.L(!0).ka(g&&e===Sb?Yj:Ef,!0),1<=Aa&&Zf(w.screen)===w.sc&&this.u.pb(Ha.lb),H.l=1}else Ha.visible=!0,H.visible=!1;else Ha.visible=!0;Ha.visible&&(0<Fa||g&&e===Sb&&xa===Ka?Ha.I(0,0,35*Ja).setPosition(La,va,0).setScale(g&&e===Sb&&xa===Ka?l:Fa).update(a):Ha.L(!1))}else Ha.visible&&Ha.L(!1).Yc();Ha.lb&&w.audio.zc(Ha.lb.ld,0,.25,!0)}g||H.state===Ef||H.ka(Ef);H.visible&&(ma=f[Sb],H.setScale(0===ma?0:Cb(ma*(1+.2*l))).update(a));ma=d[Mb];pa=c[Mb];va=n[Mb];Ka=va.Se();Aa=f[Mb];Fa=Cb(Aa*(1-l));
|
||
1E-4>Fa&&(Fa=0);this.l||(ea[Mb]=S);va=4*io(va);for(xa=0;xa<pa.length;++xa,va+=4){La=Math.pow(Math.cos(Ki*Da(va/4,-1,1)),2);Ja=-15*(1-La);Cg.set(Ja,va,1,3*Fa);if(xa===pa.length-1){xa===Ka&&(R.visible=!1);ja[Mb].I(0,0,35*La).setPosition(Ja,va,0).setScale(Fa).update(a);break}pa[xa]===ea[Mb]&&ka[Mb].L(0<Fa).setScale(Fa*(.5<La?.9:1)).setPosition(.5<La?5:Ja,(.5<La?0:va)+1,.5<La?.7:-.2).U();La=ma[xa];if(y.ze(Cg)){if(!La.je){if(g&&(e!==Mb||xa!==Ka)){La.L(!1);continue}La.set(null,null,pa[xa]);La.ka(Bg)}if(xa===
|
||
Ka)if(La.isLoaded()){if(La.visible||!R.visible)La.visible=!1,R.set(I,O,La.je),R.visible||R.L(!0).ka(g&&e===Mb?Im:Bg,!0),1<=Aa&&Zf(w.screen)===w.sc&&(this.u.pb(La.je),w.audio.play("assets/general/change.wav"))}else La.visible=!0,R.visible=!1;else La.visible=!0;if(La.visible)if(0<Fa||g&&e===Mb&&xa===Ka){Ha=La.animation;var Gb=b+xa;La.I(90,-50+(Ha?0:5*Math.sin(2*Gb)),Ha?0:15*Math.cos(4*Gb)).setPosition(Ja,va,.7+(Ha?0:.2+.2*Math.sin(2*Gb))).setScale(2*(g&&e===Mb&&xa===Ka?l:Fa)).update(a)}else La.L(!1)}else La.visible&&
|
||
La.L(!1).Yc()}g||R.state===Bg||R.ka(Bg);S||ka[Mb].L(!1);R.visible&&(O=f[Mb],O=0===O?0:Cb(O*(1+.2*l)),S=R.lb.zb,R.I(0,0,10+rl*Math.atan2(-S.z,S.x)).setScale(O).update(a));O=d[wc];S=c[wc];Aa=this.o[wc];ma=Aa.Se();pa=f[wc];Ka=Cb(pa*(1-l));1E-4>Ka&&(Ka=0);this.l||(ea[wc]=I);I=2.5*io(Aa);for(Aa=0;Aa<S.length;++Aa,I+=2.5){va=Math.pow(Math.cos(Ki*Da(I/2.5,-1,1)),2);xa=(.6+.4*va)*Ka*Ka;Cg.set(-1.782,I-.12,1,3*xa);Fa=Math.max(xa,(Aa===ma?1.05:0)*Cb(pa*l));if(Aa===S.length-1){ja[wc].setPosition(0,I-.12,.1-
|
||
.5*(1-Fa)).setScale(Fa).update(a);break}S[Aa]===ea[wc]&&ka[wc].L(0<Ka).setScale(xa).setPosition(A.x+1.5+va,A.y+.5+.5*va,A.z-1-.2*va).U();va=O[Aa];if(y.ze(Cg)){if(!va.Ua){if(g&&(e!==wc||Aa!==ma)){va.L(!1);continue}va.set(S[Aa],null)}Aa===ma&&g&&e===wc&&va.isLoaded()&&va.Hc.Ab.visible&&va.ka(Yl,!0);0<Ka||g&&e===wc?(va.L(!0).I(-90,.022,35).setPosition(-2.782,I-.12,.55-.5*(1-Fa)).setScale(Fa),g&&Aa===ma||va.state===Xl||va.ka(Xl),Aa!==ma&&1.5>va.mc&&(va.mc=Math.min(va.mc+5*a,1.5)),va.update(a)):va.visible&&
|
||
va.L(!1)}else va.visible&&va.L(!1).Yc()}d=d[Mc];c=c[Mc];A=n[Mc];n=A.Se();f=Cb(f[Mc]*(1-l));1E-4>f&&(f=0);A=4.5*io(A);for(ea=0;ea<c.length;++ea,A+=4.5)if(I=-15*(1-Math.pow(Math.cos(Ki*Da(A/4.5,-1,1)),2)),Cg.set(I,A,1,3*f),O=Math.max(f,(ea===n?1.05:0)*Cb(r*l)),S=d[ea],y.ze(Cg)){if(!S){if(g&&(e!==Mc||ea!==n))continue;this.Va.i(S=d[ea]=new c[ea].Cm(w))}0<f||g&&e===Mc?(!g&&S.Zi&&(ma=S,ma.Zi=!1,ma=ma.g,ma.stop(2),ma.za(0,1),ma.za(0,2)),ma=b+ea,pa=1-l,Ka=Math.sin(2*ma)*pa,S.L(!0).I(0,5+5*Ka,15*Math.cos(4*
|
||
ma)*pa).setPosition(I,A,.9+.2*Ka).setScale(.5*O).update(a,!0)):S.L(!1)}else S&&S.visible&&S.L(!1).Yc();ka[Mc].visible=!1;ja[Mc].setScale(f).visible=!1;this.u.update(a);a=null;H.visible&&0<H.Db&&H.lb?a=H.lb.ld:R.visible&&0<R.Db&&R.lb&&(a=R.lb.ld);a&&w.audio.zc(a,w.Fa.isActive()||!this.sb.Kc?0:.1,.25,!0);H.lb&&H.lb.ld!==a&&w.audio.zc(H.lb.ld,0,.1,!0);R.lb&&R.lb.ld!==a&&w.audio.zc(R.lb.ld,0,.1,!0)};var Sb=0,wc=1,Mb=2,Mc=3,zv=4,Cg=new rj,qm=new E(-.337,0,2.179),PO=(new E(8.994,0,2.387)).sub(qm,new E).normalize(),
|
||
OO=(new Fb).ya(Dc).Da(4E3).ab(!1);u(Av,ib);Av.prototype.update=function(a){a=this.time=(this.time+a)%Math.PI;this.model.be(.1*Math.sin(2*a)).setScale(.025).I(0,5*Math.sin(2*a),15*Math.cos(4*a));this.U()};var QO=Za(new Fb,kd);u(Bv,Ya);p=Bv.prototype;p.Nc=function(){Ya.prototype.Nc.call(this);xc.Ga=1};p.yb=function(){Ya.prototype.yb.call(this);xc.Ga=0};p.layout=function(){Ya.prototype.layout.call(this);var a=this.app.Na;a.parent===this.V&&a.layout()};p.play=function(){var a=this.app;a.Fa.show(function(){var b=
|
||
a.play;a.screen.push(b);b.start()},void 0,5)};p.show=function(a,b,c,d){b=void 0===b?!0:b;d=void 0===d?!1:d;var e=this.app,f=e.Na;xc.Ga=1;f.mode=this.mode=void 0===a?this.mode:a;this.V.i(f);f.scrollTo(c,b);Ya.prototype.show.call(this,d);e.Fa.isActive()&&this.Ob(this.$);this.C=this.H=!1;Ev(this);e.platform.rf();return this};p.update=function(a){Ya.prototype.update.call(this,a);var b=this.app.Na;b.parent===this.V&&b.update(a);var c=this.app,d=c.B,e=b.mode;switch((e+1)%zv){case Sb:bb(this.l,"assets/common/kart.png",
|
||
320,256,!1,50,40);break;case wc:bb(this.l,"assets/common/helmet.png",273,278,!1,50,40);break;case Mb:bb(this.l,"assets/common/accessories.png",271,304,!1,50,40);break;case Mc:bb(this.l,"assets/common/extra.png",287,245,!1,50,40)}hb(this.ja,0,Hf(d));this.P.visible=this.ih.visible=!1;var f=pm(b),g=ik(b);if(g){if(g.isLoaded())if(om(d,f.name)||!(f.ra||f.hp||f.sa||f.Ba||f.event)){g=null;switch(e){case Sb:g=Ff(d);break;case wc:g=ie(d);break;case Mb:g=Gf(d)}e===Mb?f===g?je(this,this.xb):je(this,this.select):
|
||
f===g?je(this,this.D):je(this,this.select)}else if(f.sa&&f.sa.Wk(f))je(this,this.sa),this.P.visible=!0,f.sa.Bm();else if(f.Ba){e=Ze[f.Ba];this.P.visible=!0;this.nl.fc=e.Dc;hb(hb(this.Zc,0,d.Qa(e.name)),1,e.count);g=this.na;if(this.W!==e){this.W=e;var l=c.S;g&&(this.wb.removeChild(g),l.release(g));Cd(e.model)||l.register(e.model,1);this.wb.i(g=this.na=l.aa(e.model).setPosition(0,0,0).I(0,0,0).setScale(1)).U()}je(this,g.isLoaded()?this.Ba:this.Hc)}else f.ra?(og[f.name]&&0>=dk(d,f)?je(this,this.done):
|
||
je(this,this.K),hb(this.Cc,0,f.ra)):f.event?(VH(c,this.nl,"COLLECT WITHIN %0 DAYS","COLLECT WITHIN %0"),this.P.visible=!0,og[f.name]&&0>=dk(d,f)?je(this,this.done):je(this,this.D)):je(this,this.D);else je(this,this.Hc);this.ih.visible=!0;Ta(this.title.Ra(-250),1E3,100)}else je(this,c.platform.bg()?this.notify:this.D),Ta(this.title.Ra(0),1500,100);this.Hc.ka(Zb);this.Lc.update(a);this.done.ka(Zb);f&&gd(this.title,f.name);this.left.visible=0<b.Se();this.right.visible=b.Se()<b.Je[b.mode].length-1;this.left.Xe=
|
||
this.right.Xe=this.V.Xe;c=c.Nb;e=this.g;c.window.parent===e&&c.window.update(a);e.Pg(fo(this.buttons,40));f&&f.Yd&&(f.Yd=null,f.event&&(a=f.On,d.kc("ET",d.Aa("ET",0)|1<<a)));(d=gm(b))&&!this.u?qH(b,d)===this.mode?this.right.Og(d.Yd):this.l.Og(d.Yd):(this.right.Og(),this.l.Og())};p.Ob=function(a,b){return null!==a||this.app.Ub?this.app.Nb.window.parent===this.g&&a!==this.u?!1:Ya.prototype.Ob.call(this,a,b):Ya.prototype.Ob.call(this,a,b)};p.Sk=function(){return this.app.Na.Sk()};u(Gp,mb);Gp.prototype.show=
|
||
function(a){this.g.state===Zb&&SC(this.app.platform)&&(this.g.state=Ec);return mb.prototype.show.call(this,void 0===a?0:a)};Gp.prototype.fa=function(){Zs(this.app.platform)||mb.prototype.fa.call(this)};u(DH,mb);u(EH,mb);u(jk,dg);jk.prototype.layout=function(){dg.prototype.layout.call(this);this.process.setPosition(this.width/2,this.height/2)};jk.prototype.show=function(a){switch(a){case Fj:case rI:case 2:this.process.visible=!1;break;case Ug:this.process.visible=!0}return dg.prototype.show.call(this,
|
||
a)};jk.prototype.fa=function(){this.app.screen.remove(this)};jk.prototype.update=function(a){this.process.update(a);dg.prototype.update.call(this,a)};u(Hp,Ya);Hp.prototype.show=function(){var a=this.app,b=a.B;this.l.set(ie(b),Ff(b),Gf(b));this.share.visible=Pn(a.platform);Fd(this.g,40);hb(this.label,0,b.Pb());b=a.audio;b.play("assets/general/congrats.wav");b.play(this.l.Ua.qj);a.sa.Me();return Ya.prototype.show.call(this)};Hp.prototype.update=function(a){Ya.prototype.update.call(this,a);$c(this.effect,
|
||
this.re).update(a);var b=this.l;b.update(a);a=this.app;a.audio.zc(b.lb.ld,a.Fa.isActive()||!this.Kc?0:.1,.25,!0)};u(kk,Ya);kk.prototype.show=function(){this.Vb();return Ya.prototype.show.call(this)};kk.prototype.Vb=function(){var a=this,b=this.app,c=b.B;this.wb.set(ie(c),Ff(c),Gf(c));c=b.play.B;this.Lc=Math.floor(c.fd);var d=this.D=c.ja;this.Cc=Math.floor(c.exp);gd(this.title,"SCORE: %0").setColor(4294967295);this.time=0;this.l.visible=!1;hb(this.Zc,0,d);0<d&&Ej(b.platform,"score-double-coins",function(e){a.l.visible=
|
||
!0;a.na=e},function(){a.l.visible=!1;a.D+=d;Ip(b.B,d);b.audio.play("assets/general/coins.wav")},function(){a.l.visible=!1});Cp(this.app.Nb);xp(b.B)?(c=this.g,ee(c,b.Nb.window.set("I THINK WE HAVE ENOUGH COINS TO BUY A COOL ACCESSORY FOR THE KART! LET'S GO TO THE GARAGE!",!0,1.5),c.children.length-1),c=this.$,Rb(this,c,void 0,!1),this.Ob(c),c.keys.push(Q.Ka),c.keys.push(Q.La)):(this.$.keys.length=1,Rb(this,this.u),this.Ob(this.u))};kk.prototype.update=function(a){Ya.prototype.update.call(this,a);var b=
|
||
this.app,c=this.wb,d=this.time;go(this)&&(this.time+=a);var e=this.time,f=this.Lc;1>e&&(15>=f?Math.floor(d*f)!==Math.floor(e*f)&&b.audio.play("assets/general/counter.wav"):Math.floor(d/.065)!==Math.floor(e/.065)&&b.audio.play("assets/general/counter.wav"));d=Math.min(e,1);hb(this.title,0,Math.floor(d*f)).setScale(1+.2*Math.sin(d*Math.PI));hb(this.ja,0,Math.floor(d*this.D));e=Math.floor(d*this.Cc)+this.xb;var g=this.app.B;f=Hi(g,e);d=qk(g,f);g=qk(g,f+1);e-=d;d=g-d;hb(hb(this.Od,0,e),1,d);this.exp.width=
|
||
550*Da(e/d,0,1);hb(this.kf,0,f);Fd(this.lf,140);f=this.g;f.Pg(fo(this.buttons,40));c.update(a);mg(this.Ca,17,-.5);d=b.Nb;d.window.parent===f?d.window.setPosition(f.width/2,-680).update(a):this.wa===this.$&&Rb(this,this.u);b.audio.zc(c.lb.ld,b.Fa.isActive()||!this.Kc?0:.1,.25,!0)};kk.prototype.Ob=function(a,b){return null!==a||this.app.Ub?this.app.Nb.window.parent===this.g&&a!==this.$?!1:Ya.prototype.Ob.call(this,a,b):Ya.prototype.Ob.call(this,a,b)};u(Jp,Ya);p=Jp.prototype;p.Nc=function(){Ya.prototype.Nc.call(this);
|
||
this.app.B.unlock(this.l);xc.Ga=1;this.u++};p.yb=function(){Ya.prototype.yb.call(this);xc.Ga=0;this.u++};p.show=function(a,b){var c=this;if(void 0===a)return null;var d=this.app;if(this.Pd)return(d.Ug===this?d.Lm:d.Ug).show(a,b);this.l=a;window.ga&&ga("send","event","Kart Hooligans Unlock",a.name,this.app.da.version,this.app.B.Aa("PT",0)/60);xc.Ga=1;b=d.Na;var e=d.sc,f=e.Pd;this.V.i(b);b.Cj(a,!f);Ya.prototype.show.call(this);up(d.Zh);f&&(this.C=this.H=e.Kc=!1);d.audio.play("assets/general/congrats.wav");
|
||
this.effect.pb(a);this.share.visible=Pn(d.platform);Fd(this.g,40);hb(gd(this.title,"%0 UNLOCKED",VO(a.Sb)),0,d.locale.ma(a.name));var g=this.P;g.visible=!1;var l=this.u;HO(ik(b),function(){l===c.u&&(g.visible=!0)});return this};p.layout=function(){Ya.prototype.layout.call(this);var a=this.app.Na;a.parent===this.V&&a.layout()};p.update=function(a){Ya.prototype.update.call(this,a);var b=this.app.Na;b.parent===this.V&&b.update(a);$c(this.effect,this.re).update(a)};u(Kp,Ya);Kp.prototype.show=function(){Ya.prototype.show.call(this);
|
||
var a=this.app;up(a.Zh);this.share.visible=Pn(a.platform);Fd(this.g,40);var b=a.B,c=this.level=Hi(b);b.kc("L",c);hb(this.u,0,c);hb(gd(this.title,"%0 UNLOCKED"),0,"x"+c);a.audio.play("assets/general/congrats.wav");window.ga&&ga("send","event","Kart Hooligans Level",c,a.da.version,b.Aa("PT",0)/60);return this};Kp.prototype.update=function(a){Ya.prototype.update.call(this,a);$c(this.effect,this.re).update(a);a=this.time=(this.time+a)%Math.PI;this.P.be(1.85+.1*Math.sin(2*a)).I(0,5*Math.sin(2*a),15*Math.cos(4*
|
||
a)).U()};u(Hv,Ya);p=Hv.prototype;p.Nc=function(){Ya.prototype.Nc.call(this);xc.Ga=1;var a=this.l,b=Lp(this);a[b].Vb();a[(b+1)%a.length].ck()};p.yb=function(){Ya.prototype.yb.call(this);xc.Ga=0};p.Nm=function(){for(var a=this.list,b=this.app.B.yg(),c=0;c<a.length;++c){var d=a[c];if(d.Rg===b){this.u=d;break}}};p.yg=function(){var a=this.u;if(a&&1>uh(a))return a;for(var b=this.list,c=0;c<b.length;++c)if(a=b[c],1>uh(a))return a;return null};p.Me=function(){for(var a=this.list,b=0;b<a.length;++b)a[b].dispose(!1);
|
||
a.length=0;b=this.app;var c=b.B;if(ck(c)&&-1!==b.Nb.state)switch(b.Nb.state){case Di:c.remove("TT");a.push(new LH(b,"TT",10));break;case th:c.remove("TT"),a.push(new MH(b,"TT",10))}else{c=this.l;for(var d=0;d<c.length;++d)c[d].Me(a);0===a.length&&0<b.B.Pb()&&a.push(new Jv(b,"leaderboard",!0))}for(b=0;b<a.length;++b)a[b].on(Hw,this.D);a.sort(function(e,f){return e.priority-f.priority});this.Nm()};p.layout=function(){Ya.prototype.layout.call(this);for(var a=this.l,b=this.width,c=this.height,d=0;d<a.length;++d)a[d].layout(b,
|
||
c)};p.show=function(a,b){a=void 0===a?Lp(this):a;b=void 0===b?!1:b;xc.Ga=1;IH(this,a,!0);this.mode.visible=1<this.l.length;Fd(this.g,40);return Ya.prototype.show.call(this,b)};p.fa=function(){this.Rf.visible&&" LOG IN"===this.Rf.fc&&++this.app.platform.zi;Ya.prototype.fa.call(this)};p.update=function(a){Ya.prototype.update.call(this,a);for(var b=this.l,c=0;c<b.length;++c)b[c].update(a);hb(this.ja,0,Hf(this.app.B))};u(If,sa);p=If.prototype;p.sk=function(){var a=this.app.sa,b=a.l;this.index=b.length;
|
||
b.push(this);a.V.i(this)};p.Me=function(){};p.layout=function(){};p.show=function(a){return this.app.sa.show(this.index,!0,a)};p.Vb=function(){var a=this.app.sa;bb(a.mode,null);a.title.fc=""};p.ck=function(){};p.update=function(a){var b=this.Kc;a=this.re=Da(this.re+(b?2:-4)*a,0,1);this.scale=b?Cb(a):Eb(a);this.visible=0<a};p.Wk=function(){return!1};p.Bm=function(){};u(mm,kg);p=mm.prototype;p.Il=function(){};p.Md=function(a,b,c,d,e){this.Sg.fc=a;a=c?b/c:0;this.check.visible=1<=a;this.K.Pg(this.J.width*
|
||
a).L(0<a);hb(hb(this.progress,0,b),1,c);this.D.visible=this.C.visible=this.wa.visible=d;d=this.H.L(!1);a=this.ua.L(!1);b=this.l.L(!1);var f=this.g.L(!1);if(e&&!this.o){var g=e.ja;c=e.exp;if(e=e.id)d.visible=b.visible=!0,this.height=500,f.visible=!0,hb(this.Ek,0,0),hb(this.Nk,0,0),(c=Ei[e])?(e=c,this.g.ka(cJ).set(e,null).I(-90,.022,35).setPosition(-2.782,0,1).setScale(1)):(c=pk[e])?(e=c,this.g.set(null,e).ka(dJ).I(-20,20,e.Zn||-55).setPosition(1,0,2.4).setScale(e.$n||.6)):(c=wh[e])&&this.g.set(null,
|
||
null,c).ka(eJ).I(90,-50,this.g.g.animation?-10:0).setPosition(0,0,2.3).setScale(1.5),b.x=0;else if(0<g||0<c)a.visible=!0,this.height=345,e=hb(this.Ek.L(0<g),0,g||0),b=hb(this.Nk.L(0<c),0,c||0),e.visible&&b.visible?(e.x=-150,b.x=150):e.visible?e.x=0:b.x=0}else this.height=250;this.time=0;this.Yk=!1;return this};p.N=function(a){this.on(Yd,a);return this};p.gn=function(){switch(this.state){case Kf:this.color=4291611852;this.app.audio.play("assets/general/click.wav");break;default:this.color=4294967295}};
|
||
p.update=function(a){var b=this.time+=a,c=this.g;c.visible&&c.update(a);var d=this.Hc;d.update(a,!(c.Hc.visible=c.isLoaded()));d.U();this.Yk&&(a=(Da(b,.5,1)-.5)/.5,$c(this.check.setScale(1+10*Hc(1-a)),a).L(!0),this.scale=1-.1*Math.sin((Da(b,1,1.3)-1)/.3*Math.PI))};u(lk,Cc);lk.prototype.dispose=function(a){a=void 0===a?!0:a;this.app.play.off(sh,this.o);a&&KH(this);this.A(Hw,this,a);this.M=null};lk.prototype.flush=function(){this.app.B.kc(this.Rg,this.count)};var Hw=qa++;u(Jf,lk);Jf.prototype.dispose=
|
||
function(a){a=void 0===a?!0:a;this.app.play.off(this.Pe,this.m);lk.prototype.dispose.call(this,a)};Jf.prototype.j=function(a){var b=this.target;this.count<b&&(this.count+=a)>=b&&(this.count=b,this.flush())};u(LH,Jf);u(Jv,Jf);Jv.prototype.j=function(){var a=this.target;if(Math.floor(this.count)<a){var b=this.app.play.B.fd;b>=a?(this.count=a,this.flush()):this.count=b}};u(MH,Jf);u(mk,Ya);mk.prototype.A=function(a){if(a!==qg||!this.unlock)return Ya.prototype.A.apply(this,arguments)};mk.prototype.Nc=
|
||
function(){Ya.prototype.Nc.call(this);xc.Ga=1};mk.prototype.yb=function(){Ya.prototype.yb.call(this);xc.Ga=0};mk.prototype.update=function(a){Ya.prototype.update.call(this,a);var b=this.xb,c=b.time;b.update(a);var d=b.time,e=this.re,f=this.Kc,g=this.effect;1>c&&1<=d&&g.L(!0).pb();g.update(a);var l=b.Ek.kg[0],n=b.Nk.kg[0],r=1.5;0<l||0<n?(r=Hc((Da(d,1.5,2)-1.5)/.5),g.y=b.y=-200*r,this.W.opacity=this.P.opacity=r,b=Da(c,1.8,2.8)-1.8,c=Da(d,1.8,2.8)-1.8,g=this.u,0>g?g=0:this.u=g=Math.min(g+a,1),hb(this.ja,
|
||
0,Math.round(this.wb+(c+g)*l)),g=Math.round(c*n)+this.na,r=this.app.B,a=Hi(r,g),l=qk(r,a),r=qk(r,a+1),g-=l,l=r-l,hb(hb(this.Lc,0,g),1,l),this.exp.width=550*Da(g/l,0,1),hb(this.Zc,0,a),15>n?Math.floor(b*n)!==Math.floor(c*n)&&this.app.audio.play("assets/general/counter.wav"):Math.floor(b/.065)!==Math.floor(c/.065)&&this.app.audio.play("assets/general/counter.wav"),r=2.5):(g.y=-80,b.y=0);Fd(this.Od,140);d=e*(Da(d,r,r+.5)-r)/.5;f=f?Eb(1-d):Cb(1-d);Fd(this.g,40).y=this.height-170+700*f};u(Kv,If);p=Kv.prototype;
|
||
p.sk=function(){var a=this.app,b=a.platform;$s(b)&&(If.prototype.sk.call(this),a.sa.on($g,function(){b.qf()}))};p.layout=function(a,b){If.prototype.layout.call(this,a,b);this.Na.height=b};p.Vb=function(){for(var a=this.app,b=a.B,c=vp(b),d=c.length,e=300,f=this.g,g=this.l,l=this.o,n=f.length,r;n<d;++n)l.i(r=(new Ai(a,190,190,null,"assets/common/window.png")).setPosition(214,e+250*n+30-16)),g.i(f[n]=(new Lv(a,r)).R(e+250*n));for(g=0;g<n;++g)f[g].visible=!1;this.m=d;for(g=n=0;g<d;++g)l=f[g],r=c[g],l.name.text=
|
||
r.yj(),l.fd.text=r.Pb(),l.Lg.text=g+1,l.uk=r.yd,l.am.opacity=1,l.yd.L(!1).Jc(null),-1===r.id&&(n=g);g=this.process.L(!1);c=this.login.L(!1);f=this.Zf.L(!1);e+=250*d;a.platform.Xd()?a.platform.Ag()?(f.visible=!0,f.y=e+=150,e+=100):b.Qk||(g.visible=!0,g.y=e+=150,e+=200):(c.visible=!0,c.y=e+=150,e+=100);b=this.Na;b.Ck.set(0,0,0,e+400);b.scroll(0,250*(2-n));e=this.app.sa;e.title.fc="HIGH SCORES";this.Kc&&(c.visible?YO(e):f.visible?ZO(e):WC(a.platform)||$C(a.platform)?$O(e):(e.Yg.L(!0),e.Rf.L(!1),e.eh.L(!1),
|
||
e.Mf.off(Yd).L(!1)))};p.ck=function(){bb(this.app.sa.mode,"assets/common/leaderboard.png",289,294)};p.update=function(a){If.prototype.update.call(this,a);var b=this.Na;b.update(a);var c=this.app.B,d=this.g,e=-b.qe.y-200;b=e+b.height+350;for(var f=0;f<this.m;++f){var g=d[f],l=g.y;g.visible=l>=e&&l<=b;g.opacity=g.yd.opacity=1-Da((l-b+850)/400,0,1)}d=this.process;f=d.y;d.visible&&f>=e&&f<=b&&(d.update(a),d.opacity=1-Da((d.y-b+700)/250,0,1),c.Bg())};u(Lv,sa);Lv.prototype.g=function(a){var b=this;if(a){var c=
|
||
this.uk;if(c){var d=this.yd;d.qb?d.visible=d.qb.isLoaded():d.qb=this.app.oa.get(c,{Ga:1,crossOrigin:""},function(){b.uk===c&&(b.am.opacity=0,d.visible=!0)})}}else this.yd.visible=!1};u(Mv,If);p=Mv.prototype;p.Me=function(a){this.g=null;this.m=0;var b=Nv(this);if(b){var c=this.m=this.app.B.Aa("CI",0);if(b=b[c])c=new (b.Sg||Jf)(this.app,"CT",b.target,b.text,b.event),c.priority=90,c.qa=b.qa,c.Gm=b.ta,c.index=b.index,b=this.g=c.on(Hw,this.o),a.push(b)}};p.Vb=function(){var a=this.app.sa;a.title.fc="CITY QUESTS";
|
||
a.ih.visible=!0;this.Kc&&this.g&&aP(a,this.g);for(var b=this.sa,c=0;c<b.length;++c)b[c].visible=!1;c=Nv(this);var d=this.m;c||(c=um[um.length-1],d=c.length,a.Yg.L(!1),a.Rf.L(!1),a.eh.L(!1),bb(a.Mf.off(Yd).L(!0),"assets/common/check.png",304,265).ka(Zb));for(a=0;a<c.length;++a){var e=b[a];if(a===d)Iv(e,this.g);else{var f=c[a],g=a>d;e.Md(f.text,g?0:f.target,f.target,g,f.qa)}e.visible=!0}for(d=c=0;d<b.length;++d)a=b[d],a.visible&&(0!==d&&(c+=40),a.y=c+a.height/2,c+=a.height);this.height=c};p.ck=function(){bb(this.app.sa.mode,
|
||
"assets/common/city.png",283,315)};p.update=function(a){If.prototype.update.call(this,a);if(this.visible)for(var b=this.sa,c=0;c<b.length;++c){var d=b[c];d.visible&&d.update(a)}};p.Wk=function(a){return a.level>=this.app.B.Aa("CL",0)};p.Bm=function(){var a=this.app.sc;bb(a.sa,"assets/common/city.png",283,315,!1,40,30);a.nl.fc="COMPLETE CITY QUESTS"};var um=[[{text:"COLLECT COINS",target:50,event:Ql,qa:{ja:100,exp:10},ta:400},{text:"HIT SUITCASES",target:5,event:Qo,qa:{id:"WRECKING BALL"},ta:600}],
|
||
[{text:"DRIVE ALONG ACCEL STRIPS",target:10,event:Bw,qa:{ja:200,exp:20},ta:800},{text:"TAKE THE HIGHWAY",target:3,event:Qu,qa:{id:"LIGHTOR"},ta:1E3}],[{text:"KNOCK COINS OUT OF CASH CARS",target:20,event:FI,qa:{ja:250,exp:30},ta:1500},{text:"BUMP INTO CARS AT CROSSROADS",target:6,event:EI,qa:{id:"T-1000"},ta:2E3}],[{text:"HIT ORANGE SAFETY BARRIERS",target:3,event:Mo,qa:{ja:300,exp:40},ta:2500},{text:"MISS HIGHWAY TURNS",target:2,event:Uu,qa:{id:"ARROW SIGN"},ta:3E3}],[{text:"GET STUCK IN BITUMEN SPOTS",
|
||
target:3,event:Pu,qa:{ja:400,exp:50},ta:3500},{text:"COLLECT COINS ON THE HIGHWAY",target:250,event:Ru,qa:{ja:500,exp:70},ta:4E3},{text:"BREAK ARM BARRIERS",target:10,event:Lo,qa:{id:"MEGAN"},ta:5E3}],[{text:"TURN LEFT AT FORKS",target:4,event:II,qa:{ja:600,exp:80},ta:5500},{text:"BUMP INTO BLUE PASSENGER CARS",target:7,event:OI,qa:{ja:700,exp:100},ta:6E3},{text:"HIT TRASH CONTAINERS",target:10,event:$o,qa:{id:"ROLLER"},ta:6500}],[{text:"DO A RAMP JUMP ON THE HIGHWAY",target:6,event:Su,qa:{ja:700,
|
||
exp:120},ta:7E3},{text:"PASS THROUGHT COINS GATES",target:15,event:No,qa:{ja:800,exp:150},ta:7500},{text:"BUMP INTO CASH CARS",target:5,event:GI,qa:{id:"WARNING"},ta:8E3}],[{text:"HIT BARRELS",target:20,event:To,qa:{ja:900,exp:170},ta:8500},{text:"DRIVE ONTO AN OVERPASS",target:10,event:Vo,qa:{ja:1E3,exp:200},ta:9E3},{text:"SWEEP AWAY TABLES AND CHAIRS",target:15,event:bp,qa:{id:"ALFREDO"},ta:9500}],[{text:"BUMP INTO RED TRUCKS",target:20,event:LI,qa:{ja:1100,exp:250},ta:1E4},{text:"BUMP INTO CARS ON THE HIGHWAY",
|
||
target:20,event:ep,qa:{ja:700,exp:300},ta:10500},{text:"BREAK STATUES",target:12,event:Xo,qa:{id:"CLEANER"},ta:11E3}],[{text:"PASS THROUGHT GAS GATES",target:20,event:Oo,qa:{ja:1300,exp:350},ta:11500},{text:"BREAK ROAD BARRICADES",target:30,event:Ml,qa:{ja:1500,exp:400},ta:12E3},{text:"HIT SPOTLIGTHS",target:40,event:ap,qa:{id:"BIG CHAIN"},ta:12500}],[{text:"BREAK CRATES ON THE HIGHWAY",target:15,event:fp,qa:{ja:1700,exp:450},ta:13E3},{text:"BREAK TREES",target:30,event:Uo,qa:{ja:2E3,exp:500},ta:13500},
|
||
{text:"HIT ATMS",target:20,event:Ro,qa:{id:"ROBIN"},ta:14E3}],[{text:"HIT SPEED LIMIT 40 MPH SIGNS",target:20,event:So,qa:{ja:2300,exp:600},ta:14500},{text:"KNOCK OVER TRAFFIC CONES",target:60,event:dp,qa:{ja:2500,exp:700},ta:15E3},{text:"SCATTER GARBAGE BAGS",target:100,event:Uj,qa:{id:"DUSTCAR"},ta:15500}],[{text:"HIT SUPERMARKET TROLLEYS",target:30,event:cp,qa:{ja:2700,exp:800},ta:16E3},{text:"HIT FLOWER BEDS",target:50,event:Yo,qa:{ja:3E3,exp:900},ta:16500},{text:"COLLECT BONUSES ON THE HIGHWAY",
|
||
target:25,event:Tu,qa:{id:"FLASHER"},ta:17E3}],[{text:"PASS THROUGHT NITRO GATES",target:30,event:Po,qa:{ja:3300,exp:1E3},ta:17500},{text:"HIT HYDRANTS",target:50,event:Wo,qa:{ja:3500,exp:1100},ta:18E3},{text:"SMASH TRASH BINS",target:50,event:Zo,qa:{id:"PASCAL"},ta:19E3}],[{text:"BUMP INTO VANS",target:60,event:Aw,qa:{ja:4E3,exp:1300},ta:2E4},{text:"LAND ON TOP OF CARS",target:5,event:DI,qa:{ja:5E3,exp:1500},ta:21E3},{text:"HIT NO ENTRY SIGN",target:50,event:Nl,qa:{id:"EXCAVATOR"},ta:22E3}]];u(Np,
|
||
Ya);p=Np.prototype;p.Nc=function(){Ya.prototype.Nc.call(this);xc.Ga=1};p.yb=function(){Ya.prototype.yb.call(this);xc.Ga=0};p.has=function(){for(var a,b=this.app,c=b.B,d=0;d<rg.length;++d)if(a=rg[d],(!a.event||b.event===a.event)&&0<c.zd(a.name)&&0<dk(c,a))return a;return null};p.show=function(a,b){if(void 0===a)return null;var c=this.app;if(this.Pd)return(c.gf===this?c.bk:c.gf).show(a,b);this.wb=a;xc.Ga=1;b=c.Na;var d=c.sc,e=d.Pd;this.V.i(b);b.Cj(a,!e);Ya.prototype.show.call(this);e&&(this.C=this.H=
|
||
d.Kc=!1);this.P=0;gd(this.title,a.name);this.u.visible=this.l.visible=!1;gd(this.label.L(!0),c.Ub?"PRESS OK TO OPEN":c.Dh?"TAP TO OPEN":"CLICK TO OPEN");this.D=!1;this.P=0;b=c.S;if(d=this.Ba)this.K.Va.Vc(d),b.release(d);a:{c=c.B;if(a=a.Qa)for(ha(a),d=0;d<a.length;++d)if(e=a[d],0<Math.max(e.count-c.Qa(e.name),0)){a=e;break a}a=U(Jm)}a=this.W=a;this.K.Va.i(this.Ba=b.aa(a.model).setScale(0).setPosition(0,0,0).I(0,0,0));return this};p.Qi=function(a,b){var c=this.app;if(this.Pd)return(c.gf===this?c.bk:
|
||
c.gf).Qi(a,b);b=c.Na;b.parent===this.V&&this.V.removeChild(b);Ya.prototype.show.call(this);this.D=!0;this.P=1.5;c=c.S;if(b=this.Ba)this.K.Va.Vc(b),c.release(b);this.W=a;this.K.Va.i(this.Ba=c.aa(a.model).setScale(0).setPosition(0,0,0).I(0,0,0));this.u.visible=!0;this.effect.pb(a);NH(this,"double-token");hb(gd(this.title,"x%0 "+a.name),0,1);Op(this);return this};p.layout=function(){Ya.prototype.layout.call(this);var a=this.app.Na;a.parent===this.V&&a.layout()};p.open=function(){this.D=!0;var a=this.app;
|
||
ik(a.Na).open();var b=this.wb,c=b.name,d=a.B;if(0<d.zd(c)){c=ke[c]||c;var e=void 0===e?1:e;d.kc(c,d.Aa(c,0)-e)}e=this.W.name;d.ye(ke[e]||e);this.u.visible=!0;this.effect.pb(b);NH(this,"double-box-token");hb(gd(this.title,"x%0 "+e),0,1);Op(this);a.audio.play("assets/general/congrats.wav")};p.update=function(a){Ya.prototype.update.call(this,a);var b=this.app.Na;b.parent===this.V&&b.update(a);b=this.P+=this.D?a:0;$c(this.label.setPosition(this.width/2,this.height-200),Math.max(1-5*b,0));$c(this.effect,
|
||
Wc(Math.min(b,1))).update(a);(a=this.Ba)&&a.setScale(Math.min(b,1)).I(0,10,180*b).setPosition(0,0,2.5+.2*Math.sin(4*b)).U();a=this.re*(Da(b,1.5,2)-1.5)/.5;a=this.Kc?Eb(1-a):Cb(1-a);Fd(this.g,40).y=this.height-170+700*a;this.top.y=100-700*a};u(nk,Cc);nk.prototype.yj=function(){return this.name};nk.prototype.Pb=function(){return this.xe};u(Ov,nk);p=Ov.prototype;p.reset=function(){return this.qd.setData({})};p.has=function(a){return this.qd.has(a)};p.remove=function(a){this.qd.remove(a);return this};
|
||
p.nh=function(a,b){return this.qd.nh(a,b)};p.vh=function(a,b){this.qd.vh(a,b)};p.Aa=function(a,b){return this.qd.Aa(a,b)};p.kc=function(a,b){this.qd.kc(a,b)};p.ye=function(a,b,c){b=void 0===b?1:b;this.kc(a,this.Aa(a,void 0===c?0:c)+b)};p.ma=function(a,b){return this.qd.ma(a,b)};p.rc=function(a,b){this.qd.rc(a,b)};p.th=function(a,b,c){return this.qd.th(a,b,void 0===c?0:c)};p.Bg=function(a){a=void 0===a?this.j:a;this.qd.Bg(a)};p.Yn=function(a,b){var c=b.Pb()-a.Pb();return 0===c?(a=a.yj(),b=b.yj(),a<
|
||
b?-1:a>b?1:0):c};p.yj=function(){return this.app.locale.ma("ME")};p.Pb=function(){return this.Aa("BS",0)};p.description=function(a){return Ei[a]||pk[a]||wh[a]};p.unlock=function(a){this.vh(ke[a.name]||a.name,!0);return this};p.Md=function(a){a=a.name;Ei[a]?Dv(this,a):pk[a]?Cv(this,a):wh[a]&&Fp(this,a);return this};p.yg=function(){return this.ma("MT","")};p.Qa=function(a){return this.Aa(ke[a]||a,0)};p.zd=function(a){return this.Aa(ke[a]||a,0)};p.cc=function(){var a=this.app,b=a.event;b&&b.storage!==
|
||
this.ma("EV","")&&this.remove("ET");b&&this.rc("EV",b.storage);b&&(b.co=0);if(a=a.Na)Ep(a,Sb,sm),Ep(a,wc,rm),Ep(a,Mb,Gi),Ep(a,Mc,zR)};var sH=qa++,bP=qa++,cP=qa++,dP=qa++,im=qa++,wv=qa++,ok={},ke={};u(gc,Oa);gc.prototype.isLoaded=function(){var a=this.model.isLoaded(),b=this.Gd;b=b?b.isLoaded():!0;var c=this.animation;c=c?c.isLoaded():!0;var d=this.o;d=d?d.isLoaded():!0;this.Yc&&(this.Yc=!1,a||this.app.Zb.get(this.C,xc),b||this.app.Zb.gb(this.u,xc),c||this.app.xd.get(this.l,xc),d||this.app.audio.gb(this.O,
|
||
xc));return a&&b&&c&&d};gc.prototype.ia=function(a,b){var c=this;if(this.isLoaded())a&&a();else if(b){var d=function(l){a&&c.off(Qp,a);b&&(b(l),b=void 0)};if(a)this.once(Qp,a);this.model.ac(d);var e;null==(e=this.Gd)||e.ac(d);var f;null==(f=this.animation)||f.ac(d);var g;null==(g=this.o)||g.ac(d)}else if(a)this.once(Qp,a);return this};var Qp=qa++,xc={Pc:ui,Ga:0};u(xh,Fb);var zc,Ac,fJ=[zc={start:{month:2,day:7},end:{month:2,day:21},storage:"e1",zd:["VALENTINE"],fa:"_ehide",init:function(a){function b(f){ib.call(this,
|
||
f);this.i(this.j=(new ib(f)).be(1).i((new Oa(f,"assets/events/val/HeartMenu.mdl",b.g)).be(-1)));this.g=3*Math.random()}function c(f){Te.call(this,f,"assets/general/val_end.vfx")}function d(f){Te.call(this,f,"assets/general/val.vfx")}a.oa.gb("assets/events/val/atlas.json",{Pc:ui});a.Zb.gb("assets/events/val/models.json");zc.ei=new Oa(a,"assets/events/val/KolchLuk01.mdl",new Fb);var e=a.play.xf;e.on(Ae,zc.el=function(){e.Gk.Wa.Hb.PoliceBone02.i(zc.ei);zc.ei.U()});zc.$=(new Hh.model(a)).setScale(1.5);
|
||
zc.fl=function(){a.sc.show(Mc,!0,Hh,!0)};zc.time=0;u(d,Te);d.Pe=rk;d.id=Bk;a.ba("val_effect",Hh.Vl=d,4);u(c,Te);c.Pe=rk;c.id=Bk;a.ba("val_end_effect",Hh.Wl=c,4);zc.Yd=new ch(a,"assets/common/val.vfx");u(b,ib);b.Pe=rk;b.id=Bk;b.prototype.update=function(f){f=this.g+=.5*f;this.j.setScale(1-.1*Cb(Math.abs(Math.sin(3*f)))).U()};b.g=Za(new na,kd|tc);a.ba("HeartMenu",b,12)},dispose:function(a){a.play.xf.off(Ae,zc.el);zc.ei.parent&&zc.ei.parent.removeChild(zc.ei);Jn(a.S,"HeartMenu")},update:function(a){var b=
|
||
zc.time+=a;zc.$.I(0,0,10*Math.sin(b));zc.Yd.parent&&zc.Yd.update(a)}},Ac={start:{month:3,day:10},end:{month:3,day:24},storage:"e2",zd:["TREASURE CHEST"],fa:"_ehide",init:function(a){function b(f){ib.call(this,f);this.i(this.j=(new ib(f)).setPosition(0,-.135,-.791).i(this.Ab=(new Oa(f,"assets/events/patrick/TrelistMenu01.mdl",b.g)).setPosition(0,.135,.791)));this.g=3*Math.random()}function c(f){Te.call(this,f,"assets/general/patrick_end.vfx")}function d(f){Te.call(this,f,"assets/general/patrick.vfx")}
|
||
a.oa.gb("assets/events/patrick/atlas.json",{Pc:ui});a.Zb.gb("assets/events/patrick/models.json");Ac.di=new Oa(a,"assets/events/patrick/BorodaPol01.mdl",(new Fb).define("SKINNING"));var e=a.play.xf;e.on(Ae,Ac.el=function(){e.ie.Wa.Hb.PolCarBone01.i(Ac.di);e.vg.object=Ac.di});Ac.$=(new Ih.model(a)).setScale(.85);Ac.fl=function(){a.sc.show(Mc,!0,Ih,!0)};Ac.time=0;u(d,Te);d.Pe=rk;d.id=Bk;a.ba("patrick_effect",Ih.Vl=d,4);u(c,Te);c.Pe=rk;c.id=Bk;a.ba("patrick_end_effect",Ih.Wl=c,4);Ac.Yd=new ch(a,"assets/common/patrick.vfx");
|
||
u(b,ib);b.Pe=rk;b.id=Bk;b.prototype.update=function(f){f=this.g+=1*f;this.j.I(2*Math.sin(4*f+1),5*Math.cos(f),3*Math.sin(3*f)).U()};b.g=Za(new na,kd|tc);a.ba("TrelistMenu01",b,12)},dispose:function(a){a.play.xf.off(Ae,Ac.el);Ac.di.parent&&(Ac.di.parent.removeChild(Ac.di),a.play.xf.vg.object=null);Jn(a.S,"TrelistMenu01")},update:function(a){var b=Ac.time+=a;Ac.$.I(0,0,10*Math.sin(b));Ac.Yd.parent&&Ac.Yd.update(a)}}];u(PH,gc);u(Pv,ib);p=Pv.prototype;p.hn=function(a){this.Hc.visible=a};p.isLoaded=function(){for(var a=
|
||
this.Qa,b=0;b<a.length;++b)if(!a[b].isLoaded())return!1;return this.j.isLoaded()};p.Yc=function(){for(var a=this.Qa,b=0;b<a.length;++b)a[b].Yc=!0;this.j.Yc=!0;return this};p.Cj=function(){this.Zi=!0;var a=this.g;a.play(this.description.ready,!0,1);a.stop(2);a.za(0,1);a.za(0,2)};p.open=function(){this.g.play(this.description.open,!1,2)};p.update=function(a){var b=this.g;this.Zi&&b.Tc(4*a,1);b.Qb(2)&&b.Tc(4*a,2);b.update(a);var c=this.isLoaded();this.Hc.update(a,!c);a=this.m=Da(this.m+(0<b.Ed(2)?-2*
|
||
a:4*a),0,1);--a;a=1-a*a*a*a;b=this.j;b.setScale(a).L(c);b.pa.Cf(a);this.U()};var fP={idle:{Y:0,T:0},ready1:{Y:1,T:18},open1:{Y:19,T:36},ready2:{Y:1,T:30},open2:{Y:31,T:45}};var rg=[Hh={name:"VALENTINE",storage:"B2",G:"Valent01",pa:(new fg).tb(Sc),yk:-1,xk:.7,wk:!1,animation:"Bone001",ready:"ready2",open:"open2",event:zc},Ih={name:"TREASURE CHEST",storage:"B3",G:"Sunduk01",pa:(new fg).tb(Sc),yk:-1,xk:.7,wk:!1,animation:"SundukB01",ready:"ready2",open:"open2",event:Ac},Of={name:"MYSTERY BOX",storage:"B1",
|
||
G:"BoxNew00",yk:-1,xk:.7,wk:!1,animation:"BoxNew05",ready:"ready2",open:"open2",ra:500}];var og={};for(Fq=0;Fq<rg.length;++Fq){var gJ=rg[Fq];og[gJ.name]=gJ}var Hh,Ih,Of,Fq;var re={};for(Gq=0;Gq<rg.length;re={sj:void 0,uc:void 0,pm:void 0},++Gq)re.uc=rg[Gq],re.sj="assets/boxes/"+re.uc.G+"/",re.pm=re.uc.pa||(re.uc.pa=new fg),re.uc.model||function(a){return function(){var b=a.sj+(a.uc.hc||a.uc.G)+".mdl",c=void 0;a.uc.Gd&&(c=a.sj+"models.json");var d=void 0;if(a.uc.animation)d=a.sj+a.uc.animation+".anm";
|
||
else if(a.uc.Ie){var e=og[a.uc.Ie];d="assets/boxes/"+e.G+"/"+e.animation+".anm"}a.uc.model=function(f){f=new (a.uc.ic||PH)(f,b,c,a.pm,d);f.constructor=this.constructor;return f}}}(re)(),re.uc.Cm||function(a){return function(){a.uc.Cm=function(b){b=new Pv(b,a.uc);b.constructor=this.constructor;return b}}}(re)(),re.uc.Qa=[],vm(re.uc);var Gq,zR=[].concat(rg);u(Qv,gc);u(RH,Qv);var gP=(new Fb).ya(Dc).Da(4001).td(-1,-10).ab(!1);var SH=ot(1);var Jm=[{name:"BOOMBOX",storage:"T1",G:"Magn01",Dc:"PICK UP BOOMBOXES IN THE CITY",
|
||
count:40},{name:"THERMOMETER",storage:"T2",G:"Gradus01",Dc:"COLLECT THERMOMETERS FROM MYSTERY BOXES",box:Of,count:6},{name:"STEERING WHEEL",storage:"T3",G:"Rul01",Dc:"COLLECT STEERING WHEELS FROM MYSTERY BOXES",box:Of,count:25},{name:"FIRE EXTINGUISHER",storage:"T4",G:"Ognetush01",Dc:"COLLECT FIRE EXTINGUISHERS FROM MYSTERY BOXES",box:Of,count:65},{name:"CHECKERS",storage:"T5",G:"Shash01",Dc:"PICK UP CHECKERS IN THE CITY",count:23},{name:"FIRST AID KIT",storage:"T6",G:"Aptechka",Dc:"COLLECT FIRST AID KITS FROM MYSTERY BOXES",
|
||
box:Of,count:5},{name:"WALKIE-TALKIE",storage:"T7",G:"Rasia01",Dc:"COLLECT WALKIE-TALKIES FROM MYSTERY BOXES",box:Of,count:18},{name:"CAR HORN",storage:"T8",G:"Klakson01",Dc:"COLLECT CAR HORNS FROM MYSTERY BOXES",box:Of,count:50},{name:"TRAFFIC WAND",storage:"T9",G:"Jezl01",Dc:"PICK UP TRAFFIC WANDS IN THE CITY",count:10},{name:"BRICK",storage:"T10",G:"Kirpich01",Dc:"COLLECT BRICKS FROM MYSTERY BOXES",box:Of,count:4},{name:"CHEESE",storage:"T11",G:"Cheese01",Dc:"COLLECT CHEESE FROM MYSTERY BOXES",
|
||
box:Of,count:11},{name:"GOLD BARS",storage:"T12",G:"Slitok01",Dc:"COLLECT GOLD BARS FROM MYSTERY BOXES",box:Of,count:40},{name:"HEART",storage:"T13",G:"HeartBall01",Dc:"COLLECT HEARTS FROM VALENTINES",box:Hh,count:5},{name:"LOVE LICENSE PLATE",storage:"T14",G:"ZnakValentine01",Dc:"COLLECT LOVE LICENSE PLATES FROM VALENTINES",box:Hh,ic:RH,count:12},{name:"BOW",storage:"T15",G:"Bant01",Dc:"COLLECT BOWS FROM VALENTINES",box:Hh,count:28},{name:"LUCKY COIN",storage:"T16",G:"GoldLepr01",Dc:"COLLECT LUCKY COINS FROM TREASURE CHESTS",
|
||
box:Ih,count:5},{name:"HORSESHOE",storage:"T17",G:"Podkova01",Dc:"COLLECT HORSESHOES FROM TREASURE CHESTS",box:Ih,count:12},{name:"LEPRECHAUN HAT",storage:"T18",G:"Hat01",Dc:"COLLECT LEPRECHAUN HATS FROM TREASURE CHESTS",box:Ih,count:28}];var Ze={};for(Hq=0;Hq<Jm.length;++Hq){var hJ=Jm[Hq];Ze[hJ.name]=hJ}var Hq;var Pp={};var Ie={};for(Iq=0;Iq<Jm.length;Ie={tj:void 0,Xc:void 0,qm:void 0},++Iq)Ie.Xc=Jm[Iq],Ie.tj="assets/tokens/"+Ie.Xc.G+"/",Ie.qm=Ie.Xc.pa||(Ie.Xc.pa=sf(new na,"BATCHING").Da(4E3)),Ie.Xc.model||
|
||
function(a){return function(){var b=a.tj+(a.Xc.hc||a.Xc.G)+".mdl",c=void 0;a.Xc.Gd&&(c=a.tj+"models.json");var d=void 0;if(a.Xc.animation)d=a.tj+a.Xc.animation+".anm";else if(a.Xc.Ie){var e=Ze[a.Xc.Ie];d="assets/tokens/"+e.G+"/"+e.animation+".anm"}a.Xc.model=function(f){f=new (a.Xc.ic||Qv)(f,b,c,a.qm,d);f.constructor=this.constructor;return f}}}(Ie)(),(iJ=Ie.Xc.box)&&iJ.Qa.push(Ie.Xc),vm(Ie.Xc);var iJ,Iq,rm=[{name:"BARRY",storage:"h29",G:"Bear01",image:"Barry",$:"bear",Ba:"BOW",event:zc},{name:"LUCKY",
|
||
storage:"h30",G:"Lepr01",image:"Lucky",$:"lepr",Ba:"LEPRECHAUN HAT",event:Ac},{name:"MAX",storage:"h1",G:"Boy",image:"Dino",hc:"Max01",$:"max"},{name:"KITTY",storage:"h2",Sb:1,G:"Gerl",image:"Dino",hc:"Gerl01",$:"kitty"},{name:"MOK",storage:"h3",G:"Monk01",image:"Mok",hc:"Monkey01",$:"monk",unlock:"hero_unlock_monk",gm:"kart_unlock_monk",ra:400},{name:"BON JO",storage:"h4",G:"Kitaes",image:"BonJo",hc:"Kitaes01",$:"kitaes",ra:700},{name:"KAT",storage:"h5",Sb:1,G:"Skater01",image:"Kat",$:"skater",ra:1E3},
|
||
{name:"GREEN",disabled:!0,storage:"h6",G:"Alien",image:"Green",hc:"EP001",$:"uno",ra:1200},{name:"DINO",storage:"h7",G:"Dino",image:"Dino",hc:"Dino01",$:"dino",ra:1500},{name:"RAMESSES",storage:"h8",G:"Mumia",image:"Ramesses",hc:"Mumia00",$:"mummy",ra:2E3},{name:"MADDY",storage:"h9",Sb:1,G:"Harli01",image:"Maddy",$:"dev",ra:3E3},{name:"TRAVIS",storage:"h10",G:"Punk",image:"Travis",$:"punk",ra:4E3},{name:"TROGU",storage:"h11",G:"Ork01",image:"Trogu",$:"ork",ra:5E3},{name:"CHARLIE",storage:"h12",G:"Clown",
|
||
image:"Charlie",hc:"Cloun",$:"cloun",ra:7E3},{name:"KATSURO",storage:"h13",G:"Ninja",image:"Katsuro",$:"ninja",ra:8E3},{name:"JOHN",storage:"h14",G:"Kovboy01",image:"John",$:"cowboy",ra:1E4},{name:"FOXY",storage:"h15",G:"Kot",image:"Foxy",hc:"Bars01",$:"foxy",ra:13E3},{name:"ROB",storage:"h16",G:"Robo",image:"Rob",$:"robo",ra:15E3},{name:"SHAUN",storage:"h17",G:"Zomby",image:"Shaun",$:"zomby",ra:17E3},{name:"TOMMY",storage:"h18",G:"Tom",image:"Tommy",hc:"Tommy",$:"tom",ra:2E4},{name:"VENDY",storage:"h19",
|
||
Sb:1,G:"Uday01",image:"Wendy",$:"uday",ra:23E3},{name:"ROY",storage:"h20",G:"Rapper01",image:"Roy",$:"rapper",Ba:"BOOMBOX"},{name:"ELLY",storage:"h21",Sb:1,G:"Medsister01",image:"Elly",$:"medic",Ba:"THERMOMETER"},{name:"DAN",storage:"h22",G:"Taxist01",image:"Dan",$:"taxer",Ba:"STEERING WHEEL"},{name:"NASH",storage:"h23",G:"Pojarnik01",image:"Nash",hc:"Pojar01",$:"pojarnik",Ba:"FIRE EXTINGUISHER"},{name:"LIGHTOR",storage:"h24",G:"PersSvet01",image:"Lightor",$:"lightor"},{name:"ROBIN",storage:"h25",
|
||
G:"Vor01",image:"Robin",$:"vor"},{name:"MEGAN",storage:"h26",Sb:1,G:"Mechanik01",image:"Megan",$:"mechanik"},{name:"ALFREDO",storage:"h27",G:"Povar",image:"Alfredo",hc:"Povar01",$:"povar"},{name:"PASCAL",storage:"h28",G:"Sischik01",image:"Pascal",$:"sischik"},{name:"MORE HEROES COMING SOON",fi:!0}];if(gc){var Ei={};var Bb={};for(Km=0;Km<rm.length-1;Bb={ki:void 0,Ma:void 0,rm:void 0},++Km)Bb.Ma=rm[Km],Bb.Ma.disabled?rm.splice(Km--,1):(Bb.ki="assets/heroes/"+Bb.Ma.G+"/",Bb.rm=Bb.Ma.pa||(Bb.Ma.pa=(new xh).tb(Sc)),
|
||
Bb.Ma.model||function(a){return function(){var b=a.ki+(a.Ma.hc||a.Ma.G)+".mdl",c=a.ki+"sounds.json";a.Ma.model=function(d){d=new gc(d,b,void 0,a.rm,null,c);d.constructor=this.constructor;return d}}}(Bb)(),Bb.Ma.Qn=[],Bb.Ma.sa=null,Bb.Ma.Ba&&(Pp[Bb.Ma.Ba]=Bb.Ma),Bb.Ma.Zk=Ii(Bb.Ma.Zk||"jump"),Bb.Ma.zj=Ii(Bb.Ma.zj||"hi"),Bb.Ma.Im=Ii(Bb.Ma.Im||"start"),Bb.Ma.Jk=Ii(Bb.Ma.Jk||"end"),Bb.Ma.lj=OH(Bb.Ma.lj||["enjoy1","enjoy2"]),Bb.Ma.Dj=OH(Bb.Ma.Dj||["joy1","joy2"]),Bb.Ma.em=Ii(Bb.Ma.em||"joy1"),Bb.Ma.fm=
|
||
Ii(Bb.Ma.fm||"joy2"),Bb.Ma.qj=Ii(Bb.Ma.qj||"enjoy1"),Ei[Bb.Ma.name]=Bb.Ma,vm(Bb.Ma))}var Km;if(gc){var bc=function(a,b,c,d,e,f){gc.call(this,a,b,c,d,e);var g=this;this.effect=null;f&&this.ia(function(){g.Wa.Hb.CarBone01.i(g.effect=(new wb(a,f)).setPosition(.337,.55,0).I(-270,0,-.022))})};u(bc,gc);bc.prototype.update=function(a){var b=this.effect;b&&b.update(a)};bc.prototype.Ii=function(){};var Iw=function(a,b,c,d,e){bc.call(this,a,b,c,d,e);var f=this;this.g=this.m=null;this.ia(function(){var g=V(b)+
|
||
"/Korovka01_1.mdl";f.Wa.Hb.CarBone01.i(f.g=(new Oa(a,g,jJ)).I(90,0,-.022).setPosition(2.306,-.287,-.259)).i(f.m=(new Oa(a,g,jJ)).I(90,0,-.022).setPosition(2.306,-.287,.259))});this.j=0};u(Iw,bc);Iw.prototype.update=function(a,b){bc.prototype.update.call(this,a,void 0===b?!1:b);this.g&&(a=this.j+=a,this.g.I(90,10+20*Math.sin(3*a),-10+10*Math.cos(2*a)),this.m.I(90,-10+20*Math.sin(2*a),-10+10*Math.cos(3*a)))};var jJ=new Fb;var kJ=function(a,b,c,d,e,f){bc.call(this,a,b,c,d,e,f);var g=this;this.ia(function(){g.Wa.Hb.CarBone01.i((new Vb(a)).setScale(.3).I(-90,
|
||
-180,90).setPosition(2.36,-.451,-.972)).i((new Vb(a)).setScale(.3).I(-90,-180,90).setPosition(2.36,-.451,.972))})};u(kJ,bc);var Jq=function(a,b,c,d,e,f){bc.call(this,a,b,c,d,e,f);var g=this;this.j=null;this.ia(function(){g.Wa.Hb.CarBone01.i(g.j=(new Oa(a,V(b)+"/Kart04_1.mdl",AR)).setPosition(-1.158,-.621,0).I(90,0,-.022))});this.g=0};u(Jq,bc);Jq.prototype.update=function(a,b){bc.prototype.update.call(this,a,void 0===b?!1:b);this.j&&(a=this.g=Math.max(this.g-a,0),this.j.Ya("alpha",Math.abs(Math.sin(2*
|
||
Math.PI*a))))};Jq.prototype.Ii=function(){0===this.g&&(this.g=2)};var AR=eg((new Fb).ya(ph).Da(cq).ab(!1).td(-1,-10));var lJ=function(a,b,c,d,e,f){bc.call(this,a,b,c,d,e,f);var g=this;this.g=null;this.ia(function(){g.Wa.Hb.CarBone01.i(g.g=(new Oa(a,V(b)+"/KartPol02_1.mdl",BR)).setPosition(.337,.55,0).I(90,0,-.022))})};u(lJ,bc);var BR=eg((new Fb).ya(Dc)).Cf(.8).ab(!1).Da(3999);var mJ=function(a,b,c,d,e,f){bc.call(this,a,b,c,d,e,f);var g=this;this.g=null;this.ia(function(){g.Wa.Hb.CarBone01.i(g.g=(new Oa(a,
|
||
V(b)+"/PojMash01_1.mdl",CR)).setPosition(.337,.55,0).I(90,0,-.022))})};u(mJ,bc);var CR=eg((new Fb).ya(Dc)).Cf(.8).ab(!1).Da(3999);var nJ=function(a,b,c,d,e,f){bc.call(this,a,b,c,d,e,f);var g=this;this.g=null;this.ia(function(){g.Wa.Hb.CarBone01.i(g.g=(new Oa(a,V(b)+"/Amb01_1.mdl",DR)).setPosition(.337,.55,0).I(90,0,-.022))})};u(nJ,bc);var DR=eg((new Fb).ya(Dc)).Cf(.8).ab(!1).Da(3999);var oJ=function(a,b,c,d,e,f){bc.call(this,a,b,c,d,e,f);var g=this;this.g=null;this.ia(function(){g.Wa.Hb.CarBone01.i(g.g=
|
||
(new Oa(a,V(b)+"/Uborka01_1.mdl",ER)).setPosition(.337,.55,0).I(90,0,-.022))})};u(oJ,bc);var ER=eg((new Fb).ya(Dc)).Cf(.8).ab(!1).Da(3999);var pJ=function(a,b,c,d,e,f){bc.call(this,a,b,c,d,e,f);var g=this;this.ia(function(){g.Wa.Hb.CarBone01.i((new Vb(a)).setScale(.3).I(0,-90,0).setPosition(1.829,-.283,0))})};u(pJ,bc);var qJ=function(a,b,c,d,e,f){bc.call(this,a,b,c,d,e,f);var g=this;this.ia(function(){g.Wa.Hb.CarBone01.i((new Vb(a)).setScale(.25).I(0,-90,0).setPosition(1.325,-.875,0)).i((new ze(a,
|
||
Lb(Ta(lb(new ri(a,"assets/common/font.json","LOVE",.5,.5)).setColor(4287433984),85,34,ab),1.2).setScale(.005),FR,SH)).setPosition(-.72,.344,0).I(0,90,6))})};u(qJ,bc);var FR=(new Fb).ya(Dc).Da(cq).td(-1,-10).ab(!1);var rJ=function(a,b,c,d,e,f){bc.call(this,a,b,c,d,e,f);var g=this;this.ia(function(){g.Wa.Hb.CarBone01.i(gg((new Vb(a)).setScale(.2,.3,.15).I(-90,-180,80).setPosition(1.5,-.74,0),4294899129))})};u(rJ,bc);var GR=0;var Kq=1;var Lq=2;var Jw=3;var Mq=4}var sm=[{name:"IN LOVE",storage:"k22",
|
||
G:"Valentine01",image:"InLove",Ba:"LOVE LICENSE PLATE",contacts:[{x:1.536,y:0,width:.206,color:4278519045},{x:-.604,y:0,width:.206,color:4278519045,la:!0},{x:.156,y:.767,width:.206,color:4278519045}],dh:pu,um:tu,ic:qJ,zb:new E(-.438,-.043,-.31),Ib:new E(-160.297,-195.705,52.895),Ud:Mq,event:zc},{name:"TRICYCLE",storage:"k23",G:"Velo001",image:"Tricycle",Ba:"HORSESHOE",contacts:[{x:1.995,y:0,width:.03,color:4280034086},{x:-.643,y:.846,width:.03,color:4280034086,la:!0},{x:-.643,y:-.846,width:.03,color:4280034086,
|
||
la:!0}],ic:rJ,zb:new E(-.599,-.229,-.301),Ib:new E(-180,-180,60.186),Ud:Jw,event:Ac},{name:"TURBO",storage:"k1",G:"Kart01",image:"Spots",contacts:[{x:1.1,y:1.113,width:.385,color:4280229922},{x:1.1,y:-1.113,width:.385,color:4280229922},{x:-.985,y:1.295,width:.462,color:4280229922,la:!0},{x:-.985,y:-1.295,width:.462,color:4280229922,la:!0}],effect:"assets/general/kart01.vfx",zb:new E(-.988,-.533,0),Ib:new E(-180,-180,60.186)},{name:"SPOTS",storage:"k2",G:"Kart06",image:"Spots",ra:500,contacts:[{x:1.095,
|
||
y:1.053,width:.236,color:4280096276},{x:1.095,y:-1.053,width:.236,color:4280096276},{x:-.985,y:1.222,width:.284,color:4280096276,la:!0},{x:-.985,y:-1.222,width:.284,color:4280096276,la:!0}],Hm:bu,effect:"assets/general/kart06.vfx",zb:new E(-1.241,-.828,-.933),Ib:new E(-167.568,-188.924,65.138)},{name:"PIZZA RICKSHAW",storage:"k3",G:"pizzacar",image:"Pizza",ra:1E3,contacts:[{x:1.537,y:0,width:.144,color:4278519045},{x:-.966,y:.789,width:.144,color:4278519045,la:!0},{x:-.966,y:-.789,width:.144,color:4278519045,
|
||
la:!0}],zb:new E(-.961,-1.047,.273),Ib:new E(-191.135,-172.722,61.035),ic:pJ,Ud:Mq},{name:"SPORTTI",storage:"k4",G:"Kart03",image:"Sportti",ra:1500,contacts:[{x:1.1,y:1.053,width:.304,color:4278584580},{x:1.1,y:-1.053,width:.304,color:4278584580},{x:-.985,y:1.182,width:.402,color:4278584580,la:!0},{x:-.985,y:-1.182,width:.402,color:4278584580,la:!0}],effect:"assets/general/kart03.vfx",zb:new E(-1.603,-.609,0),Ib:new E(-180,-180,50.877)},{name:"LUXX",storage:"k5",G:"Kart02",image:"Luxx",ra:2500,contacts:[{x:1.1,
|
||
y:1.068,width:.244,color:4279899666},{x:1.1,y:-1.068,width:.244,color:4279899666},{x:-.985,y:1.125,width:.281,color:4279899666,la:!0},{x:-.985,y:-1.125,width:.281,color:4279899666,la:!0}],dh:ou,um:su,effect:"assets/general/kart02.vfx",zb:new E(-1.217,-1.241,0),Ib:new E(-180,-180,60.186)},{name:"AMPHIBIAN",storage:"k6",Sb:1,G:"Kart05",image:"Amphibian",ra:4E3,contacts:[{x:-1,y:0,width:3,color:537924612},{x:-1.5,y:.678,z:1.2,color:0,la:!0,radius:0},{x:-1.5,y:-.678,z:1.2,color:0,la:!0,radius:0}],zb:new E(-1.395,
|
||
-1.316,.73),Ib:new E(-186.061,-173.562,61.329),Ud:Jw},{name:"VINTAGE",storage:"k7",G:"Kart08",image:"Vintage",ra:6E3,contacts:[{x:1.1,y:1.01,width:.168,color:4280098077},{x:1.1,y:-1.01,width:.168,color:4280098077},{x:-.985,y:1.022,width:.206,color:4280098077,la:!0},{x:-.985,y:-1.022,width:.206,color:4280098077,la:!0}],effect:"assets/general/kart08.vfx",zb:new E(-1.169,-.673,0),Ib:new E(-180,-180,63.246),ic:kJ},{name:"HUNTER",storage:"k8",G:"Kart04",image:"Hunter",ra:8E3,Gd:!0,contacts:[{x:1.102,y:1.096,
|
||
width:.272,color:4279176975},{x:1.102,y:-1.096,width:.272,color:4279176975},{x:-.985,y:1.211,width:.324,color:4279176975,la:!0},{x:-.985,y:-1.211,width:.324,color:4279176975,la:!0}],effect:"assets/general/kart04.vfx",zb:new E(-1.099,-.826,0),Ib:new E(-180,-180,60.186),ic:Jq},{name:"MEGALITH",storage:"k9",G:"Flint01",image:"Megalith",ra:1E4,contacts:[{x:1.1,y:1.107,width:.385,color:4283321418},{x:1.1,y:-1.107,width:.385,color:4283321418},{x:-.999,y:0,width:3.03,color:4283321418,la:!0}],Hm:cu,zb:new E(-1.423,
|
||
-.422,0),Ib:new E(-180,-180,55.8)},{name:"BUG",storage:"k10",Sb:1,G:"Korovka01",image:"Bug",ra:12E3,Gd:!0,contacts:[{x:1.098,y:1.105,width:.384,color:4281017118},{x:1.098,y:-1.105,width:.384,color:4281017118},{x:-.984,y:1.284,width:.46,color:4281017118,la:!0},{x:-.984,y:-1.284,width:.46,color:4281017118,la:!0}],zb:new E(-1.039,-.718,-.496),Ib:new E(-180,-199.19,60.186),ic:Iw},{name:"ROVER",disabled:!0,storage:"k11",G:"Kart07",image:"Rover",ra:15E3,contacts:[{x:1.1,y:.946,width:.106,color:4278914317},
|
||
{x:1.1,y:-.946,width:.106,color:4278914317},{x:-.99,y:1.117,width:.122,color:4278914317,la:!0},{x:-.99,y:-1.117,width:.122,color:4278914317,la:!0}],effect:"assets/general/kart07.vfx",zb:new E(-1.093,-.363,0),Ib:new E(-180,-180,63.246)},{name:"CUBOS",storage:"k12",G:"CuboCar01",image:"Cubos",ra:15E3,contacts:[{x:2.301,y:0,width:.3,color:4278716424},{x:-1.523,y:-.38,width:.3,color:4278716424,la:!0},{x:-1.523,y:0,width:.3,color:4278716424,la:!0},{x:-1.523,y:.38,width:.3,color:4278716424,la:!0}],effect:"assets/general/cubocar.vfx",
|
||
zb:new E(-2.005,-1.619,-.541),Ib:new E(-161.118,-186.718,71.097),Ud:Mq},{name:"TAXI",storage:"k13",Sb:2,G:"Taxi01",image:"Taxi",Ba:"CHECKERS",contacts:[{x:1.1,y:1.0475,width:.273,color:4278519045},{x:1.1,y:-1.0475,width:.273,color:4278519045},{x:-.985,y:1.2075,width:.317,color:4278519045,la:!0},{x:-.985,y:-1.2075,width:.317,color:4278519045,la:!0}],effect:"assets/general/taxi01.vfx",zb:new E(-1.472,-.631,-.76),Ib:new E(-169.76,-187.143,61.166)},{name:"AMBULANCE",storage:"k14",Sb:1,G:"Amb01",image:"Ambulance",
|
||
Ba:"FIRST AID KIT",Gd:!0,contacts:[{x:1.1,y:1.1065,width:.385,color:4280234550},{x:1.1,y:-1.1065,width:.385,color:4280234550},{x:-.985,y:1.287,width:.462,color:4280234550,la:!0},{x:-.985,y:-1.287,width:.462,color:4280234550,la:!0}],effect:"assets/general/Amb01.vfx",zb:new E(-1.305,-1.024,0),Ib:new E(-180,-180,81.163),ic:nJ},{name:"POLICE",storage:"k15",Sb:1,G:"KartPol02",image:"Police",Ba:"WALKIE-TALKIE",Gd:!0,contacts:[{x:1.103,y:1.0525,width:.253,color:4280820771},{x:1.103,y:-1.0525,width:.253,
|
||
color:4280820771},{x:-.986,y:1.1595,width:.305,color:4280820771,la:!0},{x:-.986,y:-1.1595,width:.305,color:4280820771,la:!0}],effect:"assets/general/KartPol02.vfx",zb:new E(-1.073,-.543,.949),Ib:new E(-204.554,-165.526,61.922),ic:lJ},{name:"FIREGINE",storage:"k16",Sb:1,G:"PojMash01",image:"Firegine",Ba:"CAR HORN",Gd:!0,contacts:[{x:1.102,y:1.03,width:.278,color:4279574561},{x:1.102,y:-1.03,width:.278,color:4279574561},{x:-.984,y:1.0755,width:.315,color:4279574561,la:!0},{x:-.984,y:-1.0755,width:.315,
|
||
color:4279574561,la:!0}],effect:"assets/general/PojMash01.vfx",zb:new E(-1.48,-1.624,.407),Ib:new E(-194.355,-168.228,63.175),ic:mJ,Ud:Kq},{name:"T-1000",storage:"k17",G:"Buldozer01",image:"T1000",contacts:[{x:1.457,y:.778,width:.253,color:4278848010},{x:1.457,y:-.778,width:.253,color:4278848010},{x:-.813,y:1.223,width:.37,color:4278848010,la:!0},{x:-.813,y:-1.223,width:.37,color:4278848010,la:!0}],effect:"assets/general/buldozer01.vfx",zb:new E(-1.214,-1.412,.44),Ib:new E(-197.53,-170.216,61.698),
|
||
Ud:Lq},{name:"ROLLER",storage:"k18",G:"Katok01",image:"Roller",contacts:[{x:1.86,y:0,width:3,color:2832448},{x:-.988,y:.9795,width:.583,color:4279243526,la:!0},{x:-.988,y:-.9795,width:.583,color:4279243526,la:!0}],effect:"assets/general/katok01.vfx",zb:new E(-.893,-.81,0),Ib:new E(-180,-180,60.186),Ud:Lq},{name:"CLEANER",storage:"k19",G:"Uborka01",image:"Cleaner",Gd:!0,contacts:[{x:1.1,y:1.043,width:.274,color:4281543214},{x:1.1,y:-1.043,width:.274,color:4281543214},{x:-.985,y:1.2035,width:.317,color:4281543214,
|
||
la:!0},{x:-.985,y:-1.2035,width:.317,color:4281543214,la:!0}],effect:"assets/general/Uborka01.vfx",zb:new E(-1.359,-1.73,.485),Ib:new E(-194.609,-171.344,60.186),ic:oJ,Ud:Kq},{name:"DUSTCAR",storage:"k20",G:"Musorovoz01",image:"DustCar",contacts:[{x:1.102,y:1.03,width:.278,color:4279834388},{x:1.102,y:-1.03,width:.278,color:4279834388},{x:-.985,y:1.0755,width:.315,color:4279834388,la:!0},{x:-.985,y:-1.0755,width:.315,color:4279834388,la:!0}],zb:new E(-1.903,-.618,-.769),Ib:new E(-164.647,-188.619,
|
||
61.35),Ud:Kq},{name:"EXCAVATOR",storage:"k21",G:"Exkavator01",image:"Excavator",contacts:[{x:1,y:1.056,width:.315,color:4281217582},{x:1,y:-1.056,width:.315,color:4281217582},{x:-1,y:1.056,width:.315,color:4281217582,la:!0},{x:-1,y:-1.056,width:.315,color:4281217582,la:!0}],zb:new E(-1.869,-.912,-.596),Ib:new E(-180,-180,60.186),$n:.4,Zn:-40,Ud:Lq},{name:"MORE KARTS COMING SOON",fi:!0}];if(gc){var pk={};var ic={};for(Lm=0;Lm<sm.length-1;ic={Ok:void 0,kb:void 0,sm:void 0},++Lm)if(ic.kb=sm[Lm],ic.kb.disabled)sm.splice(Lm--,
|
||
1);else{ic.Ok="assets/karts/"+ic.kb.G+"/";ic.sm=ic.kb.pa||(ic.kb.pa=new xh);ic.kb.model||function(a){return function(){var b=a.Ok+(a.kb.hc||a.kb.G)+".mdl",c=void 0;a.kb.Gd&&(c=a.Ok+"models.json");a.kb.model=function(d){d=new (a.kb.ic||bc)(d,b,c,a.sm,void 0,a.kb.effect);d.constructor=this.constructor;return d}}}(ic)();ic.kb.sa=null;ic.kb.Ba&&(Pp[ic.kb.Ba]=ic.kb);ic.kb.Ud=ic.kb.Ud||GR;switch(ic.kb.Ud){case Kq:ic.kb.ld="assets/general/truck.wav";break;case Lq:ic.kb.ld="assets/general/traktor.wav";break;
|
||
case Jw:ic.kb.ld="assets/general/moped.wav";break;case Mq:ic.kb.ld="assets/general/motorbike.wav";break;default:ic.kb.ld="assets/general/car.wav"}pk[ic.kb.name]=ic.kb;vm(ic.kb)}}var Lm;if(gc){var df=function(a,b,c,d,e){gc.call(this,a,b,c,d,e)};u(df,gc);df.prototype.update=function(){};df.prototype.Ii=function(){};var Nq=function(a,b,c,d,e){gc.call(this,a,b,c,d,e);this.g=0};u(Nq,df);Nq.prototype.Ii=function(){this.g=1};Nq.prototype.update=function(a,b){b=void 0===b?!1:b;a=this.g=Math.max(this.g-4*
|
||
a,0);this.setScale(1+.5*Math.sin(Math.PI*(1<a?0:a)));b&&0>=a&&(this.g=8+Math.random())};var Oq=function(a,b,c,d,e){gc.call(this,a,b,c,d,e);this.i(this.g=new Oa(a,b,HR));this.time=0;this.on(wl,this.j)};u(Oq,df);Oq.prototype.j=function(a){this.g.visible=a};Oq.prototype.update=function(a){a=this.time+=5*a;this.g.Ya("alpha",Math.abs(Math.sin(a)))};var HR=eg((new Fb).ya(ph).Da(cq).ab(!1).td(-1,-10));var IR=sf(new xh,"SKINNING");var Pq=function(a,b,c,d,e){gc.call(this,a,b,c,d,e);var f=this;this.time=Math.random();
|
||
this.mode=0;var g=this.g=[];this.ia(function(){var l=V(b)+"/sphere.mdl";Fn(a.Zb.get(l).Za,Math.min(sJ.we,12));for(var n=0;12>n;++n)f.i(g[n]=(new Oa(a,l,sJ)).setScale(.095));g[0].setPosition(.339,.354,.354);g[1].setPosition(.339,.354,-.354);g[2].setPosition(.358,.177,.177);g[3].setPosition(.358,.177,-.177);g[4].setPosition(.339,0,.354);g[5].setPosition(.339,0,0);g[6].setPosition(.339,0,-.354);g[7].setPosition(.358,-.177,.177);g[8].setPosition(.358,-.177,-.177);g[9].setPosition(.339,-.354,.354);g[10].setPosition(.339,
|
||
-.354,0);g[11].setPosition(.339,-.354,-.354);f.Md()})};u(Pq,df);Pq.prototype.Md=function(){var a=Kw[this.mode],b=a.color;a=a.points;var c=this.g;c.forEach(function(d){return d.visible=!1});0<c.length&&a.forEach(function(d){return c[d].L(!0).Ya("color",b)})};Pq.prototype.update=function(a){0>=(this.time-=a)&&(a=Math.floor(Math.random()*Kw.length),this.mode=a===this.mode?(a+1)%Kw.length:a,this.Md(),this.time=2+Math.random())};var Kw=[{points:[0,1,2,3,5,7,8,9,11],color:qP},{points:[0,1,3,4,5,7,9,10,
|
||
11],color:av},{points:[0,1,2,5,6,8,9,10,11],color:pP}];var sJ=po((new na).Da(cq).ab(!1));var JR=sf(new xh,"SKINNING");var tJ=function(a,b,c,d,e){gc.call(this,a,b,c,d,e);var f=this;this.ia(function(){f.Wa.Hb.TurbBone01.i((new Vb(a)).I(-90,0,20).setScale(.35,.45,.35).setPosition(.437,0,0)).i((new Vb(a)).I(-90,0,20).setScale(.35,.45,.35).setPosition(.437,0,.468)).i((new Vb(a)).I(-90,0,20).setScale(.35,.45,.35).setPosition(.437,0,-.468))})};u(tJ,df);var Lw=function(a,b,c,d,e){gc.call(this,a,b,c,d,e);
|
||
var f=this;this.effect=new wb(a,"assets/general/migalka.vfx");this.ia(function(){f.Wa.Hb.MigBone01.i(new Oa(a,V(b)+"/Migalka01_1.mdl",KR)).i(f.effect)})};u(Lw,df);Lw.prototype.update=function(a){this.effect.update(a)};var KR=eg((new Fb).ya(Dc)).Cf(.8).ab(!1).Da(3999);var LR=(new xh).tb(Sc);var Mw=function(a,b,c,d,e){gc.call(this,a,b,c,d,e);var f=this;this.g=null;this.ia(function(){f.g=f.Wa.Hb.SpeedB02});this.time=0};u(Mw,df);Mw.prototype.update=function(a,b){var c=this.g;c&&(a=this.time+=5*a,c.I(180,
|
||
(void 0===b?0:b)?10*(Math.sin(2*a)+Math.cos(3*a)):-115+230*this.app.play.B.velocity/100,89.025))};var uJ=function(a,b,c,d,e){gc.call(this,a,b,c,d,e);var f=this;this.ia(function(){f.Wa.Hb.TurbBone01.i(gg((new Vb(a)).I(0,0,0).setScale(.2,.2,.35).setPosition(.467,.055,0),4278255360)).i(gg((new Vb(a)).I(90,0,20).setScale(.2,.2,.35).setPosition(.467,.055,0),4278255360)).i(gg((new Vb(a)).I(180,0,0).setScale(.2,.2,.35).setPosition(.467,.055,0),4278255360)).i(gg((new Vb(a)).I(270,0,20).setScale(.2,.2,.35).setPosition(.467,
|
||
.055,0),4278255360)).i(gg((new Vb(a)).I(0,0,0).setScale(.2,.2,.35).setPosition(.87,.214,.026),4294936712)).i(gg((new Vb(a)).I(90,0,25).setScale(.2,.2,.35).setPosition(.87,.214,.026),4294936712)).i(gg((new Vb(a)).I(180,0,0).setScale(.2,.2,.35).setPosition(.87,.214,.026),4294936712)).i(gg((new Vb(a)).I(270,0,25).setScale(.2,.2,.35).setPosition(.87,.214,.026),4294936712))})};u(uJ,df);var MR=sf(new xh,"SKINNING")}var Fv,Gi=[{name:"BALLOONS",storage:"d21",Sb:3,G:"ValBalls",image:"Balloons",animation:"Bone025",
|
||
Ba:"HEART",event:zc},{name:"LUCKY POT",storage:"d22",G:"Gorshok01",image:"LuckyPot",animation:"Gor01",Ba:"LUCKY COIN",event:Ac},Fv={name:"SHARK FIN",storage:"d1",G:"Plavnik01",image:"Shark",Ie:"BULLDOG",ra:10},{name:"WINDING KEY",storage:"d2",G:"Key01",image:"Key",animation:"KeyB01",ra:300},{name:"BOXING GLOVES",storage:"d3",Sb:3,G:"Perchatki01",image:"Boxing",animation:"PerchB01",ra:500},{name:"LUCKY CAT",storage:"d4",G:"Kat01",image:"LuckyKat",animation:"KatB01",ra:700},{name:"LIGHT BAR",storage:"d5",
|
||
Sb:1,G:"Proj01",image:"SearchLight",Ie:"TURBINE",ra:1E3,ic:tJ},{name:"TURBINE",storage:"d6",Sb:1,G:"Turbina01",image:"Turbine",animation:"TurbBone01",Ue:["TurbBone02"],ra:2E3},{name:"ROLLER SKATES",storage:"d7",Sb:3,G:"Roliki01",image:"Roller",Ie:"BOXING GLOVES",ra:3E3},{name:"SAW",storage:"d8",Sb:1,G:"Pila01",image:"Saw",animation:"PilaBone01",ra:5E3},{name:"SPEEDOMETER",storage:"d9",G:"Speed02",image:"Speedo",hc:"Speed01",animation:"SpeedB01",ic:Mw,ra:7E3},{name:"POOPY",storage:"d10",G:"Kakaha01",
|
||
image:"Poopy",animation:"KaBone01",ra:1E4},{name:"BULLDOG",storage:"d11",G:"Dog01",image:"Bulldog",animation:"dogBone01",ra:13E3},{name:"TRAFFIC SIGNAL",storage:"d12",G:"Svet01",image:"Traffic",hc:"svet01",Ie:"TURBINE",ic:uJ,Ba:"TRAFFIC WAND"},{name:"STOP",storage:"d13",G:"Kirpich01",image:"Stop",pa:MR,ic:Nq,Ba:"BRICK"},{name:"PIZZA",storage:"d14",Sb:1,G:"Pizza",image:"Pizza",hc:"Pizza01",animation:"PizzaBone01",Ba:"CHEESE"},{name:"SAFE",storage:"d15",G:"Seyf01",image:"Safe",animation:"SeyfBone01",
|
||
Ba:"GOLD BARS"},{name:"WRECKING BALL",storage:"d16",Sb:1,G:"Shar01",image:"WreckingBall",hc:"shar01",animation:"sharB01"},{name:"ARROW SIGN",storage:"d17",G:"Tablo01",image:"Signlight",hc:"Tablo002",pa:JR,ic:Pq,Gd:!0},{name:"WARNING",storage:"d18",Sb:1,G:"AvarZn01",image:"Warning",pa:IR,ic:Oq},{name:"BIG CHAIN",storage:"d19",Sb:1,G:"Cepochka01",image:"BigChain",Ie:"WRECKING BALL"},{name:"FLASHER",storage:"d20",Sb:1,G:"Migalka01",image:"Flasher",animation:"MigBone01",Ue:["MigBone02"],ic:Lw,pa:LR,Gd:!0},
|
||
{name:"MORE ACCESSORIES COMING SOON",fi:!0}];if(gc){var wh={};for(Qq=0;Qq<Gi.length-1;++Qq){var vJ=Gi[Qq];wh[vJ.name]=vJ}var Md={};for(Mm=0;Mm<Gi.length-1;Md={uj:void 0,oc:void 0,tm:void 0},++Mm)Md.oc=Gi[Mm],Md.oc.disabled?Gi.splice(Mm--,1):(Md.uj="assets/decors/"+Md.oc.G+"/",Md.tm=Md.oc.pa||(Md.oc.pa=new xh),Md.oc.model||function(a){return function(){var b=a.uj+(a.oc.hc||a.oc.G)+".mdl",c=void 0;a.oc.Gd&&(c=a.uj+"models.json");var d=void 0;if(a.oc.animation)d=a.uj+a.oc.animation+".anm";else if(a.oc.Ie){var e=
|
||
wh[a.oc.Ie];d="assets/decors/"+e.G+"/"+e.animation+".anm"}a.oc.model=function(f){f=new (a.oc.ic||df)(f,b,c,a.tm,d);f.constructor=this.constructor;return f}}}(Md)(),Md.oc.sa=null,Md.oc.Ba&&(Pp[Md.oc.Ba]=Md.oc),vm(Md.oc))}var Qq,Mm;u(Ji,gi);Ji.prototype.init=function(){var a=this;this.oa.gb("assets/common/atlas.json",{Pc:ng});this.wc.gb("assets/common/effects.json");this.fonts.get("assets/common/font.json");this.fonts.get("assets/common/digits.json");this.oa.get("assets/common/window.png",function(g){var l=
|
||
a.X;l.cb(hv);l.cb(g.Ea.alpha?nH:mH);a.Ub&&l.cb(g.Ea.alpha?Ul:Tl)});this.oa.get("assets/common/coin.png",function(g){a.fonts.get("assets/common/font.json").Te[1]=new Yf(140,140,0,0,1,1,10,-20,130,g);a.fonts.get("assets/common/digits.json").Te[1]=new Yf(224,224,0,0,1,1,0,0,224,g)});var b=this.platform,c=null;switch(b.va){case sc:c="assets/common/helmet.png";var d=183,e=187,f=-50;break;default:c="assets/common/facebook.png",d=166,e=187,f=-50}c&&this.oa.get(c,function(g){a.fonts.get("assets/common/font.json").Te[2]=
|
||
new Yf(d,e,0,0,1,1,10,f,176,g)});this.oa.get("assets/common/xp.png",function(g){a.fonts.get("assets/common/font.json").Te[3]=new Yf(120,120,0,0,1,1,10,-10,130,g)});c=this.audio;c.gb("assets/general/sounds.json");c.gb("assets/general/music.json");c.get("assets/general/car.wav");c.get("assets/general/truck.wav");c.get("assets/general/traktor.wav");c.get("assets/general/moped.wav");c.get("assets/general/motorbike.wav");c.get("assets/general/bitumen.wav");c.get("assets/general/asphalt.wav");c.get("assets/general/tramplin.wav");
|
||
c.get("assets/general/sand.wav");this.Pj=new Bl(this);this.sa=new Hv(this);new Mv(this);new Kv(this);this.message=new qh(this);this.Pm=new qh(this);this.reload=new qh(this);this.o=new fm(this);this.Mk=new DH(this);this.ta=new EH(this);this.$=new pv(this);this.play=new qv(this);this.Nb=new uv(this);this.pause=new vv(this);this.options=new nm(this);this.share=new gk(this);this.Vd=new hk(this);this.Na=new yv(this);this.sc=new Bv(this);this.Tg=new Gp(this);this.reset=new Dp(this);this.Bf=new fk(this);
|
||
this.Fa=new Lj(this);this.xe=new Hp(this);this.fd=new kk(this);this.Ug=new Jp(this);this.Lm=new Jp(this);this.l=new Kp(this);this.ve=new Vl(this);this.tl=new mk(this);this.gf=new Np(this);this.bk=new Np(this);this.Zh=new $l(this);this.block=new jk(this);b.init().then(function(){var g=new Date,l=new Date,n=new Date,r=Cj(a.platform);g.setTime(1E3*r);l.setUTCHours(0,0,0,0);n.setUTCHours(0,0,0,0);g=g.getUTCFullYear();for(var w=null,y=L(fJ),A=y.next();!A.done;A=y.next()){A=A.value;l.setUTCFullYear(g,A.start.month-
|
||
1,A.start.day);var H=A.start.timestamp=Math.floor(l.getTime()/1E3);n.setUTCFullYear(g,A.end.month-1,A.end.day+1);var I=A.end.timestamp=Math.floor(n.getTime()/1E3);H<=r&&r<I?w=A:12<A.end.month&&(l.setUTCFullYear(g-1,A.start.month-1,A.start.day),H=A.start.timestamp=Math.floor(l.getTime()/1E3),n.setUTCFullYear(g-1,A.end.month-1,A.end.day+1),I=A.end.timestamp=Math.floor(n.getTime()/1E3),H<=r&&r<I&&(w=A))}-1!==a.storage.Aa("god_event",-1)&&(w=fJ[a.storage.Aa("god_event",-1)]);l=w;n=a.play;(r=a.event)&&
|
||
r.zd&&wH(n,r.zd);r&&r.dispose&&r.dispose(a);(a.event=l)&&l.init&&l.init(a);l&&l.zd&&KG(n,l.zd);a.$.cc(l);a.B.cc();a.A(NR)},function(g){a.error(g)})};Ji.prototype.error=function(a){a instanceof Ys&&(a=this.locale.ma("<div style='font-size:1.5em'>The game is sandboxed. Please visit <a style='color:white;' href='https://gemioli.com' target='_blank'><b>gemioli.com</b></a> to play the game.</div><br><br>If you are the webmaster of %0, please use an iframe tag without sandbox attribute").replace("%0",a.g));
|
||
return gi.prototype.error.call(this,a)};Ji.prototype.update=function(a){gi.prototype.update.call(this,a);var b=this.event;b&&b.update(a)};Ji.prototype.ba=function(a,b,c){var d=this.S;d.ba(a,b,c);a=d.aa(b);UH(this,a,c);d.release(a)};Db.Object.defineProperties(Ji.prototype,{Ub:{configurable:!0,enumerable:!0,get:function(){return this.m||this.Z}}});var NR=qa++,yR=new kb,Be=new E,uR=new E,wR=new E;new Tb;var gq=new Ic,fc=xn(2130706432),ZI=new Oe;u(Rv,Sg);p=Rv.prototype;p.Pb=function(){return this.app.B.Pb()};
|
||
p.Wj=function(a){var b=this;if(void 0===a)return Promise.resolve();za(a);var c="OOPS, SOMETHING WENT WRONG";if(a instanceof Tn)c="PLEASE ENTER A VALID EMAIL ADDRESS";else if(a instanceof kt)c="INVALID VERIFICATION CODE ENTERED";else if(a instanceof it)c="YOUR BROWSER NOTIFICATIONS ARE BLOCKED. PLEASE ENABLE THEM IN YOUR SETTINGS";else if(a instanceof jt)return new Promise(function(){b.app.reload.Ef("YOU'VE PLAYED IN ANOTHER BROWSER/DEVICE. PLEASE RELOAD THE GAME")});return new Promise(function(d){b.app.Pm.Yj(c).once(pg,
|
||
d)})};p.Ef=function(a){this.app.block.show(a);Sg.prototype.Ef.call(this,a)};p.$f=function(){this.app.block.fa();Sg.prototype.$f.call(this)};p.ol=function(){var a=this;return new Promise(function(b){a.app.Tg.show().once(pg,b)})};p.Dm=function(a){var b=this.app.reset;return new Promise(function(c,d){b.show(a).once(pg,function(){switch(b.result){case yH:c(!0);break;case zH:c(!1);break;default:d()}})})};p.Xj=function(a,b){var c=this;return new Promise(function(){c.app.Fa.show(function(){Sg.prototype.Xj.call(c,
|
||
a,b)})})};p.Fm=function(a,b,c,d){var e=this;return new Promise(function(f){e.$f();e.app.share.show(a,b,c,d).once(pg,f)})};p.share=function(a,b,c,d){return Sg.prototype.share.call(this,a,b,c||"KartHooligans",d)};p.dm=function(a,b,c){a=this.app.locale.language;c=c||{};switch(c.type){case Gv:a=a+"1"+c.value;break;case GH:a=a+"2"+Sv(c.value);break;case pH:a=a+"3"+Sv(c.value);break;default:a+="0"}c=Sv(Math.abs(q(a)));a+=2<c.length?c.substring(0,2):"a"+c;return this.P+"?v="+encodeURIComponent(a)};p.Em=
|
||
function(){var a=this;return new Promise(function(b){a.app.Vd.show().once(pg,b)})};var Gv=1,GH=2,pH=3,hP={"Kart Hooligans":{ru:"Хулиганы на тачках",tr:"Arabalı serseriler"},"All gas, no brakes! Let's crush everything in our way!":{ru:"Тормоза не для нас! Давай снесём всё на пути!",tr:"Fren nedir bilmeyiz! Yolumuza çıkan her şeyi ezip geçelim!"},"CLICK TO CONTINUE":{ru:"КЛИКНИ ДЛЯ ПРОДОЛЖЕНИЯ",tr:"DEVAM ETMEK İÇİN TIKLA"},"TAP TO CONTINUE":{ru:"НАЖМИ ДЛЯ ПРОДОЛЖЕНИЯ",tr:"DEVAM ETMEK İÇİN BAS"},"PRESS OK TO CONTINUE":{ru:"НАЖМИ OK ДЛЯ ПРОДОЛЖЕНИЯ",
|
||
tr:"DEVAM ETMEK İÇİN OK'A BAS"},"BEST:":{ru:"ТОПЧИК:",tr:"EN İYİ:"},"TERMS OF USE":{ru:"УСЛОВИЯ ИСПОЛЬЗОВАНИЯ",tr:"KULLANIM KOŞULLARI"},"PRIVACY POLICY":{ru:"ПОЛИТИКА КОНФИДЕНЦИАЛЬНОСТИ",tr:"GİZLİLİK POLİTİKASI"},"TO CONTINUE PLAYING, YOU NEED TO CONFIRM THAT YOU AGREE TO OUR TERMS OF USE AND HAVE READ OUR PRIVACY POLICY":{ru:"ЧТОБЫ ПРОДОЛЖИТЬ ИГРАТЬ, ПОДТВЕРДИ, ЧТО ТЫ СОГЛАСЕН С НАШИМИ УСЛОВИЯМИ ИСПОЛЬЗОВАНИЯ И ПРОЧИТАЛ НАШУ ПОЛИТИКУ КОНФИДЕНЦИАЛЬНОСТИ",tr:"OYNAMAYA DEVAM ETMEK İÇİN KULLANIM KOŞULLARIMIZI KABUL ETTİĞİNİZİ VE GİZLİLİK POLİTİKAMIZI OKUDUĞUNUZU ONAYLAYIN"},
|
||
"RESTORE PURCHASES":{ru:"ВОССТАНОВИТЬ ПОКУПКИ",tr:"ALIMLARI GERİ YÜKLE"}," LOG IN":{ru:" ВОЙТИ",tr:" GİRİŞ YAP"}," LOG OUT":{ru:" ВЫЙТИ",tr:" ÇIKIŞ YAP"},"HI! I AM MAX. THE POLICEMAN CAUGHT ME AGAIN... LET'S GET AWAY FROM HIM!":{ru:"ПРИВЕТ! Я МАКС, А ЭТОТ ПОЛИЦЕЙСКОЙ СНОВА ПОЙМАЛ МЕНЯ... ДАВАЙ СМОЕМСЯ ОТ НЕГО!",tr:"MERHABA! BEN MAX VE BU POLİS BENİ YİNE YAKALADI... ONDAN KAÇALIM MI?"},"GREAT! I WILL HIT THE GAS, AND YOU WILL DRIVE. LET'S TRY TO COLLECT SOME COINS":{ru:"ОТЛИЧНО! Я БУДУ ДАВИТЬ НА ГАЗ, А ТЫ РУЛИ. ДАВАЙ СОБЕРЁМ ПАРУ МОНЕТ",
|
||
tr:"HARİKA! BEN GAZA BASACAĞIM, SEN DİREKSİYONU TUT. BİRAZ PARA TOPLAYALIM MI?"},"AWESOME! I SEE OBSTACLES AHEAD. LET'S SMASH THEM TO BITS!":{ru:"СУПЕР! Я ВИЖУ ВПЕРЕДИ ПРЕПЯТСТВИЯ. ДАВАЙ РАЗОБЬЁМ ИХ В ЩЕПКИ!",tr:"SÜPER! ÖNÜMÜZDE ENGELLERİ GÖRÜYORUM. HADİ ONLARI PARAMPARÇA EDELİM!"},"AMAZING! YOU ROCK! KEEP DRIVING UNTIL THE FUEL RUNS OUT!":{ru:"НЕВЕРОЯТНО! ТЫ КРУТ! ПРОДОЛЖАЙ В ТОМ ЖЕ ДУХЕ ПОКА ЕСТЬ ТОПЛИВО В БАКЕ!",tr:"İNANILMAZ! MÜKEMMELSİN! DEPODA YAKIT VARKEN AYNEN DEVAM ET!"},"I THINK WE HAVE ENOUGH COINS TO BUY A COOL ACCESSORY FOR THE KART! LET'S GO TO THE GARAGE!":{ru:"Я ДУМАЮ, ЧТО У НАС ЕСТЬ ДОСТАТОЧНО МОНЕТ, ЧТОБЫ КУПИТЬ ЧТО-ТО КРУТОЕ ДЛЯ ТАЧКИ! ПОГНАЛИ В ГАРАЖ!",
|
||
tr:"ARABA İÇİN HARİKA BİR ŞEY SATIN ALMAYA YETECEK KADAR PARAMIZ OLDUĞUNU DÜŞÜNÜYORUM! GARAJA GİDELİM!"},"HERE'S THE GARAGE! LET'S GET IN":{ru:"ВОТ ОН ГАРАЖ! БЫСТРЕЕ ТУДА!",tr:"İŞTE GARAJ! ÇABUK ORAYA GİDELİM!"},"SO, THESE ARE KARTS! GO AHEAD":{ru:"ЗДЕСЬ РАЗНЫЕ ТАЧКИ! НАМ ДАЛЬШЕ",tr:"BURADA FARKLI ARABALAR VAR! BİZİM DEVAM ETMEMİZ LAZIM"},"AND THESE ARE MY FRIENDS HOOLIGANS! KEEP GOING":{ru:"А ЗДЕСЬ МОИ ДРУЗЬЯ ХУЛИГАНЫ! НАМ СНОВА ДАЛЬШЕ",tr:"İŞTE BURADA BENİM SERSERİ ARKADAŞLARIM VAR! BİZİM YİNE DEVAM ETMEMİZ LAZIM"},
|
||
"THAT'S WHAT YOU NEED! BUY IT NOW!":{ru:"ЭТО ТО ЧТО НАДО! ПОКУПАЙ СКОРЕЕ!",tr:"İŞTE BİZE GEREKEN BU! HEMEN SATIN AL!"},"ROAD CLOSED":{ru:"ПРОЕЗДА НЕТ",tr:"GEÇİŞ YOK"},HIGHWAY:{ru:"МАГИСТРАЛЬ",tr:"OTOBAN"},"CLICK QUEST TO MAKE IT PRIMARY":{ru:"КЛИКНИ НА ЗАДАНИЕ, ЧТОБЫ СДЕЛАТЬ ЕГО ОСНОВНЫМ",tr:"BİRİNCİL HALE GETİRMEK İÇİN GÖREVE TIKLA"},"TAP QUEST TO MAKE IT PRIMARY":{ru:"НАЖМИ НА ЗАДАНИЕ, ЧТОБЫ СДЕЛАТЬ ЕГО ОСНОВНЫМ",tr:"BİRİNCİL HALE GETİRMEK İÇİN GÖREVE BAS"},"SELECT QUEST TO MAKE IT PRIMARY":{ru:"ВЫБЕРИ И НАЖМИ НА ЗАДАНИЕ, ЧТОБЫ СДЕЛАТЬ ЕГО ОСНОВНЫМ",
|
||
tr:"BİRİNCİL HALE GETİRMEK İÇİN GÖREVİ SEÇ VE TIKLA"},"FILL UP?":{ru:"ЗАПРАВИМСЯ?",tr:"YAKIT DOLDUR?"},"SCORE: %0":{ru:"РЕЗУЛЬТАТ: %0",tr:"SKOR: %0"},"YOU DON'T HAVE A GAME SAVED IN YOUR ACCOUNT, SO YOU CAN START A NEW GAME.\n\nWOULD YOU LIKE TO START A NEW GAME OR CONTINUE THE GAME WITH THE CURRENT PROGRESS?":{ru:"В ТВОЕМ АККАУНТЕ НЕТ СОХРАНЕННОЙ ИГРЫ, ПОЭТОМУ ТЫ МОЖЕШЬ НАЧАТЬ ИГРУ ЗАНОВО.\n\nХОЧЕШЬ НАЧАТЬ НОВУЮ ИГРУ ИЛИ ПРОДОЛЖИТЬ ИГРУ С ТЕКУЩИМ ПРОГРЕССОМ?",tr:"HESABINDA KAYITLI OYUN YOK, BU NEDENLE OYUNA YENİDEN BAŞLAYABİLİRSİN.\n\nYENİ BİR OYUNA BAŞLAMAK MI MEVCUT İLERLEMENE DEVAM ETMEK Mİ İSTİYORSUN?"},
|
||
"NEW GAME":{en:"NEW\nGAME",ru:"НОВАЯ\nИГРА",tr:"YENİ\nOYUN"},"CONTINUE GAME":{en:"CONTINUE\nGAME",ru:"ПРОДОЛЖИТЬ\nИГРУ",tr:"OYUNA\nDEVAM ET"},"YOU'VE PLAYED IN ANOTHER BROWSER/DEVICE. PLEASE RELOAD THE GAME":{ru:"ТЫ СЫГРАЛ В ДРУГОМ БРАУЗЕРЕ/УСТРОЙСТВЕ. ПОЖАЛУЙСТА, ПЕРЕЗАГРУЗИ ИГРУ",tr:"BAŞKA BİR TARAYICIDA/CİHAZDA OYNADINIZ. LÜTFEN OYUNA YENİDEN BAŞLAT"},"OOPS, SOMETHING WENT WRONG":{ru:"УПС, ЧТО-ТО ПОШЛО НЕ ТАК",tr:"EYVAH, BİR ŞEYLER TERS GİTTİ"},"YOUR BROWSER NOTIFICATIONS ARE BLOCKED. PLEASE ENABLE THEM IN YOUR SETTINGS":{ru:"В ТВОЁМ БРАУЗЕРЕ УВЕДОМЛЕНИЯ ЗАБЛОКИРОВАНЫ. ПОЖАЛУЙСТА, ВКЛЮЧИ ИХ В НАСТРОЙКАХ",
|
||
tr:"TARAYICINDA BİLDİRİMLER ENGELLENDİ. LÜTFEN AYARLARINDA BUNLARI ETKİNLEŞTİR"},"NOT ENOUGH COINS":{ru:"НЕ ХВАТАЕТ МОНЕТ",tr:"PARA YETERSİZ"},"EXIT GAME?":{ru:"ВЫЙТИ ИЗ ИГРЫ?",tr:"OYUNDAN ÇIK?"},"DO YOU WANT TO SKIP THE QUEST?":{ru:"ТОЧНО ХОЧЕШЬ ПРОПУСТИТЬ ЗАДАНИЕ?",tr:"GÖREVİ ATLAMAK MI İSTİYORSUNUZ?"},"QUEST SKIPPED!":{ru:"ЗАДАНИЕ ПРОПУЩЕНО!",tr:"GÖREV KAÇIRILDI!"},"QUEST COMPLETED!":{ru:"ЗАДАНИЕ ВЫПОЛНЕНО!",tr:"GÖREV TAMAMLANDI!"},"MYSTERY BOX":{ru:"ЗАГАДОЧНАЯ КОРОБКА",tr:"GİZEMLİ KUTU"},"CLICK TO OPEN":{ru:"КЛИКНИ, ЧТОБЫ ОТКРЫТЬ",
|
||
tr:"AÇMAK İÇİN TIKLA"},"TAP TO OPEN":{ru:"НАЖМИ, ЧТОБЫ ОТКРЫТЬ",tr:"AÇMAK İÇİN BAS"},"PRESS OK TO OPEN":{ru:"НАЖМИ OK, ЧТОБЫ ОТКРЫТЬ",tr:"AÇMAK İÇİN OK'A BAS"},VALENTINE:{ru:"ВАЛЕНТИНКА",tr:"SEVGILILER GÜNÜ KARTI"},"TREASURE CHEST":{ru:"СУНДУК С СОКРОВИЩАМИ",tr:"HAZINE SANDIĞI"},"DOUBLE UP":{ru:"УДВОИТЬ",tr:"İKİYE KATLA"},"NEED %0 MORE TO UNLOCK %1":{ru:"НАДО ЕЩЁ %0, ЧТОБЫ ОТКРЫТЬ %1",tr:"%1 AÇMAK İÇİN DAHA FAZLA %0'A İHTİYACIN VAR"},"ALL COLLECTED TO UNLOCK %1":{ru:"ВСЕ СОБРАНЫ, ЧТОБЫ ОТКРЫТЬ %1",
|
||
tr:"%1 AÇMAK İÇİN HEPSİ TOPLANDI"},"COLLECT WITHIN %0":{ru:"СОБЕРИ В ТЕЧЕНИЕ %0",tr:"%0 İÇİNDE TOPLANIR"},"COLLECT WITHIN %0 DAYS":{en_single:"COLLECT WITHIN %0 DAY",ru:"СОБЕРИ В ТЕЧЕНИЕ %0 ДНЕЙ",ru_single:"СОБЕРИ В ТЕЧЕНИЕ %0 ДНЯ",tr:"%0 GÜN İÇİNDE TOPLANIR"},"%0 DAYS":{en_single:"%0 DAY",ru:"%0 ДНЕЙ",ru_single:"%0 ДЕНЬ",ru_few:"%0 ДНЯ",tr:"%0 GÜN"},"x%0 BOOMBOX":{ru:"x%0 БУМБОКС"},"PICK UP BOOMBOXES IN THE CITY":{ru:"СОБИРАЙ БУМБОКСЫ В ГОРОДЕ",tr:"ŞEHİRDEKİ BOOMBOXLARI TOPLA"},"x%0 THERMOMETER":{ru:"x%0 ГРАДУСНИК",
|
||
tr:"x%0 TERMOMETRE"},"COLLECT THERMOMETERS FROM MYSTERY BOXES":{ru:"ИЩИ ГРАДУСНИКИ В ЗАГАДОЧНЫХ КОРОБКАХ",tr:"GİZEMLİ KUTULARDA TERMOMETRELERİ ARA"},"x%0 STEERING WHEEL":{ru:"x%0 РУЛЬ",tr:"x%0 DİREKSİYON"},"COLLECT STEERING WHEELS FROM MYSTERY BOXES":{ru:"ИЩИ РУЛИ В ЗАГАДОЧНЫХ КОРОБКАХ",tr:"GİZEMLİ KUTULARDA DİREKSİYONLARI ARA"},"x%0 FIRE EXTINGUISHER":{ru:"x%0 ОГНЕТУШИТЕЛЬ",tr:"x%0 YANGIN SÖNDÜRÜCÜ"},"COLLECT FIRE EXTINGUISHERS FROM MYSTERY BOXES":{ru:"ИЩИ ОГНЕТУШИТЕЛИ В ЗАГАДОЧНЫХ КОРОБКАХ",tr:"GİZEMLİ KUTULARDA YANGIN SÖNDÜRÜCÜLERİ ARA"},
|
||
"x%0 CHECKERS":{ru:"x%0 ШАШЕЧКИ",tr:"x%0 KARELER"},"PICK UP CHECKERS IN THE CITY":{ru:"СОБИРАЙ ШАШЕЧКИ В ГОРОДЕ",tr:"ŞEHİRDEKİ KARELERİ TOPLA"},"x%0 FIRST AID KIT":{ru:"x%0 АПТЕЧКА",tr:"x%0 ECZA ÇANTASI"},"COLLECT FIRST AID KITS FROM MYSTERY BOXES":{ru:"ИЩИ АПТЕЧКИ В ЗАГАДОЧНЫХ КОРОБКАХ",tr:"GİZEMLİ KUTULARDA ECZA ÇANTALARI ARA"},"x%0 WALKIE-TALKIE":{ru:"x%0 РАЦИЯ",tr:"x%0 TELSİZ"},"COLLECT WALKIE-TALKIES FROM MYSTERY BOXES":{ru:"ИЩИ РАЦИИ В ЗАГАДОЧНЫХ КОРОБКАХ",tr:"GİZEMLİ KUTULARDA TELSİZLERİ ARA"},
|
||
"x%0 CAR HORN":{ru:"x%0 ГУДОК",tr:"x%0 KORNA"},"COLLECT CAR HORNS FROM MYSTERY BOXES":{ru:"ИЩИ ГУДКИ В ЗАГАДОЧНЫХ КОРОБКАХ",tr:"GİZEMLİ KUTULARDA KORNALARI ARA"},"x%0 TRAFFIC WAND":{ru:"x%0 ЖЕЗЛ РЕГУЛИРОВЩИКА",tr:"x%0 TRAFİK POLİSİ ÇUBUĞU"},"PICK UP TRAFFIC WANDS IN THE CITY":{ru:"СОБИРАЙ ЖЕЗЛЫ РЕГУЛИРОВЩИКА В ГОРОДЕ",tr:"ŞEHİRDEKİ TRAFİK POLİSİ ÇUBUKLARINI TOPLA"},"x%0 BRICK":{ru:"x%0 КИРПИЧ",tr:"x%0 TUĞLA"},"COLLECT BRICKS FROM MYSTERY BOXES":{ru:"ИЩИ КИРПИЧИ В ЗАГАДОЧНЫХ КОРОБКАХ",tr:"GİZEMLİ KUTULARDA TUĞLALARI ARA"},
|
||
"x%0 CHEESE":{ru:"x%0 СЫР",tr:"x%0 PEYNİR"},"COLLECT CHEESE FROM MYSTERY BOXES":{ru:"ИЩИ СЫР В ЗАГАДОЧНЫХ КОРОБКАХ",tr:"GİZEMLİ KUTULARDA PEYNİRLERİ ARA"},"x%0 GOLD BARS":{ru:"x%0 ЗОЛОТЫЕ СЛИТКИ",tr:"x%0 ALTIN KÜLÇESİ"},"COLLECT GOLD BARS FROM MYSTERY BOXES":{ru:"ИЩИ ЗОЛОТЫЕ СЛИТКИ В ЗАГАДОЧНЫХ КОРОБКАХ",tr:"GİZEMLİ KUTULARDA ALTIN KÜLÇELERİ ARA"},"x%0 LOVE LICENSE PLATE":{ru:"x%0 НОМЕР ЛЮБВИ",tr:"x%0 AŞK PLAKASI"},LOVE:{ru:"ЛЮБЛЮ",tr:"AŞK"},"COLLECT LOVE LICENSE PLATES FROM VALENTINES":{ru:"ИЩИ НОМЕРА ЛЮБВИ В ВАЛЕНТИНКАХ",
|
||
tr:"SEVGILILER'DEN AŞK PLAKALARI ARA"},"x%0 BOW":{ru:"x%0 БАНТ",tr:"x%0 KURDELELE"},"COLLECT BOWS FROM VALENTINES":{ru:"ИЩИ БАНТЫ В ВАЛЕНТИНКАХ",tr:"SEVGILILER'DEN KURDELELERIN ARA"},"x%0 HEART":{ru:"x%0 СЕРДЦЕ",tr:"x%0 KALP"},"COLLECT HEARTS FROM VALENTINES":{ru:"ИЩИ СЕРДЦА В ВАЛЕНТИНКАХ",tr:"SEVGILILER'DEN KALP ARA"},"x%0 LUCKY COIN":{ru:"x%0 МОНЕТА УДАЧИ",tr:"x%0 ŞANS PARASI"},"COLLECT LUCKY COINS FROM TREASURE CHESTS":{ru:"ИЩИ МОНЕТЫ УДАЧИ В СУНДУКАХ С СОКРОВИЩАМИ",tr:"HAZİNE SANDIKLARINDAN ŞANS PARALARI TOPLA"},
|
||
"x%0 HORSESHOE":{ru:"x%0 ПОДКОВА",tr:"x%0 AT NALI"},"COLLECT HORSESHOES FROM TREASURE CHESTS":{ru:"ИЩИ ПОДКОВЫ В СУНДУКАХ С СОКРОВИЩАМИ",tr:"HAZİNE SANDIKLARINDAN AT NALLARI TOPLA"},"x%0 LEPRECHAUN HAT":{ru:"x%0 ШЛЯПА ЛЕПРЕКОНА",tr:"x%0 LEPRIKON ŞAPKA"},"COLLECT LEPRECHAUN HATS FROM TREASURE CHESTS":{ru:"ИЩИ ШЛЯПЫ ЛЕПРЕКОНА В СУНДУКАХ С СОКРОВИЩАМИ",tr:"HAZİNE SANDIKLARINDAN LEPRIKON ŞAPKALARI TOPLA"},"CITY QUESTS":{ru:"ЗАДАНИЯ В ГОРОДЕ",tr:"ŞEHİRDEKİ GÖREVLER"},"COMPLETE CITY QUESTS":{ru:"ВЫПОЛНИ ЗАДАНИЯ В ГОРОДЕ",
|
||
tr:"ŞEHİRDEKİ GÖREVLERİ TAMAMLA"},"BREAK CRATES":{ru:"РАЗБЕЙ ЯЩИКИ",tr:"KUTULARI KIR"},"COLLECT COINS":{ru:"СОБЕРИ МОНЕТЫ",tr:"PARALARI TOPLA"},"HIT SUITCASES":{ru:"СБЕЙ ЧЕМОДАНЫ",tr:"VALİZLERİ KIR"},"DRIVE ALONG ACCEL STRIPS":{ru:"ПРОЕДЬ ПО УСКОРЯЮЩИМ ПОЛОСКАМ",tr:"HIZ ŞERİTLERDEN GİT"},"TAKE THE HIGHWAY":{ru:"ПРОЕДЬ ПО МАГИСТРАЛИ",tr:"OTOBANDAN GİT"},"KNOCK COINS OUT OF CASH CARS":{ru:"ВЫБЕЙ МОНЕТЫ ИЗ ИНКАССАТОРОВ",tr:"PARA TAŞIMA ARAÇLARINDAN PARALARI DÜŞÜR"},"BUMP INTO CARS AT CROSSROADS":{ru:"ПРОТАРАНЬ МАШИНЫ НА ПЕРЕКРЁСТКАХ",
|
||
tr:"KAVŞAKLARDA ARABALARA ÇARP"},"HIT ORANGE SAFETY BARRIERS":{ru:"СБЕЙ ОРАНЖЕВЫЕ ОГРАЖДЕНИЯ",tr:"TURUNCU KORUYUCULARA VUR"},"MISS HIGHWAY TURNS":{ru:"ПРОПУСТИ ПОВОРОТЫ НА МАГИСТРАЛЬ",tr:"OTOBANA GİDEN DÖNÜŞLERİ KAÇIR"},"COLLECT COINS ON THE HIGHWAY":{ru:"СОБЕРИ МОНЕТЫ НА МАГИСТРАЛИ",tr:"OTOBANDA PARA TOPLA"},"GET STUCK IN BITUMEN SPOTS":{ru:"ЗАСТРЯНЬ В БИТУМЕ",tr:"BİTÜMDE MAHSUR KAL"},"BREAK ARM BARRIERS":{ru:"СЛОМАЙ ШЛАГБАУМЫ",tr:"KOLLU BARİYERLERİ KIR"},"TURN LEFT AT FORKS":{ru:"ПОВЕРНИ НАЛЕВО НА РАЗВИЛКАХ",
|
||
tr:"İKİYE AYRILAN YOLDAN SOLA DÖN"},"BUMP INTO BLUE PASSENGER CARS":{ru:"ПРОТАРАНЬ ГОЛУБЫЕ ЛЕГКОВУШКИ",tr:"MAVİ ARABALARA ÇARP"},"HIT TRASH CONTAINERS":{ru:"СБЕЙ МУСОРНЫЕ КОНТЕЙНЕРЫ",tr:"ÇÖP KONTEYNERLERİNE VUR"},"DO A RAMP JUMP ON THE HIGHWAY":{ru:"ПРЫГНИ С ТРАМПЛИНА НА МАГИСТРАЛИ",tr:"OTOBANDAKİ TRAMPLENLERDEN ATLA"},"PASS THROUGHT COINS GATES":{ru:"ПРОЕДЬ СКВОЗЬ ВОРОТА С МОНЕТАМИ",tr:"PARANIN OLDUĞU KAPILARDAN GEÇ"},"BUMP INTO CASH CARS":{ru:"ПРОТАРАНЬ ИНКАССАТОРОВ",tr:"PARA TAŞIMA ARAÇLARINA ÇARP"},
|
||
"HIT BARRELS":{ru:"СБЕЙ БОЧКИ",tr:"VARİLLERİ YIK"},"DRIVE ONTO AN OVERPASS":{ru:"ЗАЕДЬ НА ЭСТАКАДУ",tr:"ÜST GEÇİTE ÇIK"},"BUMP INTO RED TRUCKS":{ru:"ПРОТАРАНЬ КРАСНЫЕ ГРУЗОВИКИ",tr:"KIRMIZI TIRLARA ÇARP"},"LAND ON TOP OF CARS":{ru:"ПРИЗЕМЛИСЬ НА МАШИНЫ СВЕРХУ",tr:"ARAÇLARIN ÜSTÜNE ÇIK"},"BUMP INTO CARS ON THE HIGHWAY":{ru:"ПРОТАРАНЬ МАШИНЫ НА МАГИСТРАЛИ",tr:"OTOBANDA ARABALARA ÇARP"},"BREAK STATUES":{ru:"РАЗБЕЙ СТАТУИ",tr:"HEYKELLERİ KIR"},"PASS THROUGHT GAS GATES":{ru:"ПРОЕДЬ СКВОЗЬ ВОРОТА С ТОПЛИВОМ",
|
||
tr:"YAKITIN OLDUĞU KAPILARDAN GEÇ"},"BREAK ROAD BARRICADES":{ru:"РАЗБЕЙ ДОРОЖНЫЕ ОГРАЖДЕНИЯ",tr:"YOL BARİYERLERİNİ KIR"},"HIT SPOTLIGTHS":{ru:"СБЕЙ ПРОЖЕКТОРЫ",tr:"PROJEKTÖRLERE ÇARP"},"BREAK CRATES ON THE HIGHWAY":{ru:"РАЗБЕЙ ЯЩИКИ НА МАГИСТРАЛИ",tr:"OTOBANDAKİ KUTULARI PARÇALA"},"BREAK TREES":{ru:"РАЗЛОМАЙ ДЕРЕВЬЯ",tr:"AĞAÇLARI KIR"},"HIT ATMS":{ru:"СБЕЙ БАНКОМАТЫ",tr:"ATM MAKİNELERİNE ÇARP"},"HIT SPEED LIMIT 40 MPH SIGNS":{ru:"СБЕЙ ЗНАКИ ОГРАНИЧЕНИЯ СКОРОСТИ 40 КМ/Ч",tr:"40 KM/S HIZ LİMİT İŞARETLERİNE VUR"},
|
||
"KNOCK OVER TRAFFIC CONES":{ru:"СБЕЙ ДОРОЖНЫЕ КОНУСЫ",tr:"TRAFİK KONİLERİNE VUR"},"SCATTER GARBAGE BAGS":{ru:"РАСКИДАЙ МЕШКИ С МУСОРОМ",tr:"ÇÖP TORBALARINI DAĞIT"},"HIT SUPERMARKET TROLLEYS":{ru:"СБЕЙ ТЕЛЕЖКИ ИЗ СУПЕРМАРКЕТА",tr:"SÜPERMARKET ARABALARINA ÇARP"},"HIT FLOWER BEDS":{ru:"СБЕЙ КЛУМБЫ С ЦВЕТАМИ",tr:"ÇİÇEKLİKLERE VUR"},"COLLECT BONUSES ON THE HIGHWAY":{ru:"СОБЕРИ БОНУСЫ НА МАГИСТРАЛИ",tr:"OTOBANDA BONUSLARI TOPLA"},"PASS THROUGHT NITRO GATES":{ru:"ПРОЕДЬ СКВОЗЬ ВОРОТА С НИТРОЙ",tr:"NİTROLU GEÇİTLERDEN GEÇ"},
|
||
"SMASH TRASH BINS":{ru:"РАЗБЕЙ МУСОРНЫЕ КОРЗИНЫ",tr:"ÇÖP KUTULARINI KIR"},"HIT HYDRANTS":{ru:"СБЕЙ ГИДРАНТЫ",tr:"YANGIN MUSLUKLARINA VUR"},"BUMP INTO VANS":{ru:"ПРОТАРАНЬ ФУРГОНЫ",tr:"FURGONLARA ÇARP"},"SWEEP AWAY TABLES AND CHAIRS":{ru:"СНЕСИ СТОЛЫ СО СТУЛЬЯМИ",tr:"MASALARI VE SANDALYELERİ YIK"},"HIT NO ENTRY SIGN":{ru:"СБЕЙ ЗАПРЕЩАЮЩИЕ ПРОЕЗД ЗНАКИ",tr:"ARAÇ GİRİŞİNİ YASAKLAYAN TRAFİK LEVHALARINI YIK"},"HIGH SCORES":{ru:"ЛУЧШИЕ РЕЗУЛЬТАТЫ",tr:"EN YÜKSEK SKORLAR"},"BEAT YOUR HIGH SCORE":{ru:"ПОБЕЙ СВОЙ РЕКОРД",
|
||
tr:"REKORUNUZU KIRIN"},ME:{ru:"Я",tr:"BEN"},"LOG IN TO PLAY WITH FRIENDS":{ru:"ВОЙДИ, ЧТОБЫ ИГРАТЬ С ДРУЗЬЯМИ",tr:"ARKADAŞLARINLA BERABER OYNAMAK İÇİN GİRİŞ YAP"},"GRANT ACCESS TO YOUR FRIENDS LIST TO SEE THEIR SCORES":{ru:"РАЗРЕШИ ДОСТУП К СПИСКУ ДРУЗЕЙ, ЧТОБЫ ВИДЕТЬ ИХ ОЧКИ",tr:"SKORLARINI GÖRMEK İÇİN ARKADAŞ LİSTENE ERİŞİME İZİN VER"},GRANT:{ru:"РАЗРЕШИТЬ",tr:"İZİN VER"},"FRIEND BEATEN!":{ru:"ДРУГ ПОЗАДИ!",tr:"ARKADAŞIN ARKADA!"},"I've got a new high score of %0! Catch up!":{ru:"У меня новый рекорд %0! Догоняйте!",
|
||
tr:"En yüksek yeni skorum %0! Yetiş!"},"I just got ahead of you with a score of %0! Come on, catch up!":{ru:"Я только что обогнал тебя с результатом %0! Давай догоняй!",tr:"Az önce %0 skorumla seni arkada bıraktım! Hadi yetiş!"},"DO YOU LIKE THE GAME? SHARE IT WITH FRIENDS!":{ru:"ТЕБЕ НРАВИТСЯ ИГРА? ПОДЕЛИСЬ ЕЙ С ДРУЗЬЯМИ!",tr:"OYUNU BEĞENDİN Mİ? ARKADAŞLARINLA PAYLAŞ!"},"DO YOU LIKE THE GAME? FOLLOW US!":{ru:"ТЕБЕ НРАВИТСЯ ИГРА? ПОДПИШИСЬ НА НАС!",tr:"OYUNU BEĞENDIN MI? BIZI TAKİP EDİN!"},FOLLOW:{ru:"ПОДПИСАТЬСЯ",
|
||
tr:"TAKIP ET"},"DO YOU LIKE THE GAME? ADD IT TO YOUR HOME SCREEN!":{ru:"ТЕБЕ НРАВИТСЯ ИГРА? ДОБАВЬ ЕЁ НА ГЛАВНЫЙ ЭКРАН!",tr:"OYUNU BEĞENDİN Mİ? ANA EKRANINA EKLE!"},"DO YOU WANT TO BE NOTIFIED ABOUT NEW HEROES, KARTS AND EVENTS?":{ru:"ХОЧЕШЬ БЫТЬ В КУРСЕ НОВЫХ ГЕРОЕВ, ТАЧЕК И СОБЫТИЙ?",tr:"YENİ KAHRAMANLAR, ARABALAR VE ETKİNLİKLERDEN HABERDAR OLMAK İSTER MİSİN?"},"DO YOU LIKE THE GAME? ADD IT TO YOUR FAVORITES!":{en:"DO YOU LIKE THE GAME?\nADD IT TO YOUR FAVORITES!",ru:"ТЕБЕ НРАВИТСЯ ИГРА? ДОБАВЬ ЕЁ В ИЗБРАННОЕ!",
|
||
tr:"OYUNU BEĞENDİN Mİ? ONU FAVORİLERE EKLE!"},"LOG IN TO SAVE YOUR PROGRESS TO THE CLOUD AND PLAY WITH FRIENDS!":{ru:"ВОЙДИ, ЧТОБЫ СОХРАНЯТЬ СВОЙ ПРОГРЕСС В ОБЛАКЕ И ИГРАТЬ С ДРУЗЬЯМИ!",tr:"İLERLEMENİ BULUTTA KAYDETMEK VE ARKADAŞLARINLA OYNAMAK İÇİN GİRİŞ YAP!"},"LOG IN TO SAVE YOUR PROGRESS TO THE CLOUD!":{ru:"ВОЙДИ, ЧТОБЫ СОХРАНЯТЬ СВОЙ ПРОГРЕСС В ОБЛАКЕ!",tr:"İLERLEMENİ BULUTTA KAYDETMEK İÇİN GİRİŞ YAP!"},"YOUR PROGRESS IS SAVED IN THE CLOUD!":{ru:"ТВОЙ ПРОГРЕСС СОХРАНЯЕТСЯ В ОБЛАКЕ!",tr:"İLERLEMEN BULUTTA SAKLANIYOR!"},
|
||
"IT'S MORE FUN TO PLAY WITH FRIENDS! GRANT ACCESS TO YOUR FRIENDS LIST TO SEE THEIR SCORES":{ru:"С ДРУЗЬЯМИ ИГРАТЬ ВЕСЕЛЕЕ! РАЗРЕШИ ДОСТУП К СПИСКУ ДРУЗЕЙ, ЧТОБЫ ВИДЕТЬ ИХ ОЧКИ",tr:"ARKADAŞLARLA OYNAMAK DAHA EĞLENCELİ! SKORLARINI GÖRMEK İÇİN ARKADAŞ LİSTENE ERİŞİME İZİN VER"},"NEW HIGH SCORE!":{ru:"НОВЫЙ РЕКОРД!",tr:"EN YÜKSEK YENİ SKOR!"},"Amazing! I've got a new high score of %0!":{ru:"Невероятно! Мой новый рекорд %0!",tr:"İnanılmaz! En yüksek yeni skorum %0!"},"MORE KARTS COMING SOON":{ru:"НОВЫЕ ТАЧКИ УЖЕ СКОРО",
|
||
tr:"YENİ ARABALAR ÇOK YAKINDA"},"MORE HEROES COMING SOON":{ru:"НОВЫЕ ГЕРОИ УЖЕ СКОРО",tr:"YENİ KAHRAMANLAR ÇOK YAKINDA"},"MORE ACCESSORIES COMING SOON":{ru:"НОВЫЕ УКРАШЕНИЯ УЖЕ СКОРО",tr:"YENİ TAKILAR ÇOK YAKINDA"},"%0 UNLOCKED":{ru:"%0 ОТКРЫТ",ru_female:"%0 ОТКРЫТА",ru_neuter:"%0 ОТКРЫТО",ru_plural:"%0 ОТКРЫТЫ",tr:"%0 AÇIK"},"I've just unlocked %0!":{ru:"Я только что открыл %0!",tr:"Az önce %0 açtım!"},"LOADING ISSUE":{ru:"ПРОБЛЕМКА С ЗАГРУЗКОЙ",tr:"YÜKLEME SORUNU"},"IN LOVE":{ru:"ВЛЮБЛЕННЫЙ",ru_share:"ВЛЮБЛЕННОГО",
|
||
tr:"AŞIK",tr_share:"AŞIK'YU"},TRICYCLE:{ru:"ТРИЦИКЛ",tr:"ÜÇ TEKERLEKLİ BİSİKLET",tr_share:"ÜÇ TEKERLEKLİ BİSİKLET'İ"},TURBO:{ru:"ТУРБО",tr:"TURBO",tr_share:"TURBO'YU"},SPOTS:{ru:"ПЯТНЫШ",ru_share:"ПЯТНЫША",tr:"LEKELİ",tr_share:"LEKELİ'Yİ"},SPORTTI:{ru:"СПОРТИ",tr:"SPORTİ",tr_share:"SPORTİ'Yİ"},LUXX:{ru:"ЛЮКС",tr:"LÜKS",tr_share:"LÜKS'Ü"},BUG:{ru:"КОРОВКА",ru_share:"КОРОВКУ",tr:"UĞUR BÖCEĞİ",tr_share:"UĞUR BÖCEĞİ'Nİ"},VINTAGE:{ru:"ВИНТАЖ",tr:"ANTİKA",tr_share:"ANTİKA'YI"},HUNTER:{ru:"ОХОТНИК",ru_share:"ОХОТНИКА",
|
||
tr:"AVCI",tr_share:"AVCI'YI"},ROVER:{ru:"РОВЕР",tr:"ROVER",tr_share:"ROVER'İ"},AMPHIBIAN:{ru:"АМФИБИЯ",ru_share:"АМФИБИЮ",tr:"AMFİBİ",tr_share:"AMFİBİ'Yİ"},MEGALITH:{ru:"МЕГАЛИТ",tr:"MEGALİT",tr_share:"MEGALİT'İ"},CUBOS:{ru:"КУБОС",tr:"KUBOS",tr_share:"KUBOS'U"},EXCAVATOR:{ru:"ЭКСКАВАТОР",tr:"EKSKAVATÖR",tr_share:"EKSKAVATÖR'Ü"},TAXI:{ru:"ТАКСИ",tr:"TAKSİ",tr_share:"TAKSİ'Yİ"},POLICE:{ru:"ПОЛИЦИЯ",ru_share:"ПОЛИЦИЮ",tr:"POLİS",tr_share:"POLİS'İ"},"T-1000":{},FIREGINE:{ru:"ПОЖАРКА",ru_share:"ПОЖАРКУ",
|
||
tr:"İTFAİYE ARACI",tr_share:"İTFAİYE ARACI'NI"},ROLLER:{ru:"КАТОК",tr:"YOL SİLİNDİRİ",tr_share:"YOL SİLİNDİRİ'Nİ"},AMBULANCE:{ru:"СКОРАЯ",ru_share:"СКОРУЮ",tr:"AMBULANS",tr_share:"AMBULANS'I"},DUSTCAR:{ru:"МУСОРОВОЗ",tr:"ÇÖP ARABASI",tr_share:"ÇÖP ARABASI'NI"},"PIZZA RICKSHAW":{ru:"ПИЦЦАВОЗ",tr:"PİZZA ARABASI",tr_share:"PİZZA ARABASI'NI"},CLEANER:{ru:"ЧИСТЮЛЯ",ru_share:"ЧИСТЮЛЮ",tr:"TEMİZLİK ARABASI",tr_share:"TEMİZLİK ARABASI'NI"},BARRY:{ru:"БАРРИ",tr:"BARRİ",tr_share:"BARRİ'Yİ"},LUCKY:{ru:"ЛАКИ",
|
||
tr:"ŞANSLİ",tr_share:"ŞANSLİ'Yİ"},MAX:{ru:"МАКС",tr:"MAX",tr_share:"MAX'I"},KITTY:{ru:"КИТТИ",tr:"KİTTİ",tr_share:"KİTTİ'Yİ"},GREEN:{ru:"ГРИН",ru_share:"ГРИНА",tr:"GREEN",tr_share:"GREEN'İ"},CHARLIE:{ru:"ЧАРЛИ",tr:"ÇARLİ",tr_share:"ÇARLİ'Yİ"},"BON JO":{ru:"БОН ЖО",tr:"BONJO",tr_share:"BONJO'YU"},RAMESSES:{ru:"РАМСЕС",ru_share:"РАМСЕСА",tr:"RAMSES",tr_share:"RAMSES'İ"},KATSURO:{ru:"КАТСУРО",tr:"KATSURO",tr_share:"KATSURO'YU"},TROGU:{ru:"ТРОГУ",tr:"TROGU",tr_share:"TROGU'YU"},DINO:{ru:"ДИНО",tr:"DİNO",
|
||
tr_share:"DİNO'YU"},FOXY:{ru:"ФОКСИ",tr:"FOKSİ",tr_share:"FOKSİ'Yİ"},MOK:{ru:"МОК",ru_share:"МОКА",tr:"MOK",tr_share:"MOK'U"},TRAVIS:{ru:"ТРЭВИС",ru_share:"ТРЭВИСА",tr:"TRAVİS",tr_share:"TRAVİS'İ"},ROB:{ru:"РОБ",ru_share:"РОБА",tr:"ROB",tr_share:"ROB'U"},TOMMY:{ru:"ТОММИ",tr:"TOMMİ",tr_share:"TOMMİ'Yİ"},SHAUN:{ru:"ШОН",ru_share:"ШОНА",tr:"ŞON",tr_share:"ŞON'U"},MADDY:{ru:"МЭДДИ",tr:"MEDDİ",tr_share:"MEDDİ'Yİ"},JOHN:{ru:"ДЖОН",ru_share:"ДЖОНА",tr:"JOHN",tr_share:"JOHN'U"},VENDY:{ru:"ВЭНДИ",tr:"VENDİ",
|
||
tr_share:"VENDİ'Yİ"},ROY:{ru:"РОЙ",ru_share:"РОЯ",tr:"ROY",tr_share:"ROY'U"},DAN:{ru:"ДЭН",ru_share:"ДЭНА",tr:"DAN",tr_share:"DAN'I"},LIGHTOR:{ru:"СВЕТИЛО",tr:"IŞIK",tr_share:"IŞIK'I"},ROBIN:{ru:"РОБИН",ru_share:"РОБИНА",tr:"ROBİN",tr_share:"ROBİN'İ"},PASCAL:{ru:"ПАСКАЛЬ",ru_share:"ПАСКАЛЯ",tr:"PASKAL",tr_share:"PASKAL'I"},KAT:{ru:"КЭТ",tr:"KET",tr_share:"KET'İ"},NASH:{ru:"НЭШ",ru_share:"НЭША",tr:"NEŞ",tr_share:"NEŞ'İ"},ELLY:{ru:"ЭЛЛИ",tr:"ELLİ",tr_share:"ELLİ'Yİ"},MEGAN:{ru:"МЕГАН",tr:"MEGAN",tr_share:"MEGAN'I"},
|
||
ALFREDO:{ru:"АЛЬФРЕДО",tr:"ALFREDO",tr_share:"ALFREDO'YU"},BALLOONS:{ru:"ШАРИКИ",tr:"BALONLAR",tr_share:"BALONLAR'Ü"},"LUCKY POT":{ru:"ГОРШОЧЕК УДАЧИ",tr:"ŞANSLI TENCERE",tr_share:"ŞANSLI TENCERE'Yİ"},"SHARK FIN":{ru:"АКУЛИЙ ПЛАВНИК",tr:"KÖPEKBALIĞI YÜZGECİ",tr_share:"KÖPEKBALIĞI YÜZGECİ'Nİ"},"WINDING KEY":{ru:"ЗАВОДНОЙ КЛЮЧ",tr:"KURMA ANAHTARI",tr_share:"KURMA ANAHTARI'NI"},"BOXING GLOVES":{ru:"ПЕРЧАТКИ",tr:"BOKS ELDİVENİ",tr_share:"BOKS ELDİVENİ'Nİ"},TURBINE:{ru:"ТУРБИНА",ru_share:"ТУРБИНУ",tr:"TÜRBİN",
|
||
tr_share:"TÜRBİN'İ"},"LIGHT BAR":{ru:"ЛЮСТРА",ru_share:"ЛЮСТРУ",tr:"IŞIK PANELİ",tr_share:"IŞIK PANELİ'Nİ"},SAW:{ru:"ПИЛА",ru_share:"ПИЛУ",tr:"TESTERE",tr_share:"TESTERE'Yİ"},SPEEDOMETER:{ru:"СПИДОМЕТР",tr:"HIZ GÖSTERGESİ",tr_share:"HIZ GÖSTERGESİ'Nİ"},POOPY:{ru:"ПОППИ",tr:"POPPİ",tr_share:"POPPİ'Yİ"},"LUCKY CAT":{ru:"КОТ УДАЧИ",ru_share:"КОТА УДАЧИ",tr:"ŞANS KEDİSİ",tr_share:"ŞANS KEDİSİ'Nİ"},BULLDOG:{ru:"БУЛЬДОГ",ru_share:"БУЛЬДОГА",tr:"BULLDOG",tr_share:"BULLDOG'U"},"WRECKING BALL":{ru:"ШАР-БАБА",
|
||
ru_share:"ШАР-БАБУ",tr:"YIKIM GÜLLESİ",tr_share:"YIKIM GÜLLESİ'Nİ"},"BIG CHAIN":{ru:"ЦЕПУХА",ru_share:"ЦЕПУХУ",tr:"ZİNCİR",tr_share:"ZİNCİR'İ"},"TRAFFIC SIGNAL":{ru:"СВЕТОФОР",tr:"TRAFİK LAMBASI",tr_share:"TRAFİK LAMBASI'NI"},SAFE:{ru:"СЕЙФ",tr:"KASA",tr_share:"KASA'YI"},"ARROW SIGN":{ru:"УКАЗАТЕЛЬ",tr:"YÖN İŞARETİ",tr_share:"YÖN İŞARETİ'Nİ"},"ROLLER SKATES":{ru:"РОЛИКИ",tr:"TEKERLEKLİ PATEN",tr_share:"TEKERLEKLİ PATEN'İ"},STOP:{ru:"СТОП",tr:"DUR İŞARETİ",tr_share:"DUR İŞARETİ'Nİ"},PIZZA:{ru:"ПИЦЦА",
|
||
ru_share:"ПИЦЦУ",tr:"PİZZA",tr_share:"PİZZA'YI"},WARNING:{ru:"АВАРИЙКА",ru_share:"АВАРИЙКУ",tr:"ÜÇGEN REFLEKTÖR",tr_share:"ÜÇGEN REFLEKTÖR'Ü"},FLASHER:{ru:"МИГАЛКА",ru_share:"МИГАЛКУ",tr:"TEPE LAMBASI",tr_share:"TEPE LAMBASI'NI"},"The coins won't collect themselves! Let's drive!":{ru:"Монеты себя не соберут! Погнали!",tr:"Paralar kendiliğinden toplanmayacak! Hadi̇ gazla!"},"What a chase! Come back soon!":{ru:"Вот это погоня! Скорее возвращайся!",tr:"Ne kovalamaca! Yakında geri gelin!"},"Let's break something else!":{ru:"Давай ещё что-нибудь разрушим!",
|
||
tr:"Hadi başka bir şeyi kıralım!"},"The policeman almost issued me a ticket! Please help!":{ru:"Полицейский почти выписал мне штраф! Помоги!",tr:"Polis neredeyse bana para cezası yazıyordu! Yardım!"},"The engine is already warmed up! Let's have some fun, shall we?":{ru:"Двигатель уже прогрет! Порезвимся?",tr:"Motor zaten ısındı! Biraz eğlenelim mi?"},"<div style='font-size:1.5em'>The game is sandboxed. Please visit <a style='color:white;' href='https://gemioli.com' target='_blank'><b>gemioli.com</b></a> to play the game.</div><br><br>If you are the webmaster of %0, please use an iframe tag without sandbox attribute":{ru:"<div style='font-size:1.5em'>Игра находится в режиме песочницы. Пожалуйста, перейдите на <a style='color:white;' href='https://gemioli.com' target='_blank'><b>gemioli.com</b></a> чтобы поиграть в игру.</div><br><br>Если вы являетесь вебмастером %0, то используйте, пожалуйста, тэг iframe без аттрибута sandbox"},
|
||
'<br><br><div>Please refresh the page. If you see this screen again, report it to us</div><br><div id="thanks" style="display:none;">Thank you! Your report has been sent.</div><form id="report"><button type="button" id="submit">SEND REPORT</button></form>':{ru:'<br><br><div>Попробуйте перезагрузить страницу. Если этот экран появился снова, пожалуйста, отправьте нам сообщение об ошибке</div><br><div id="thanks" style="display:none;">Спасибо! Сообщение об ошибке отправлено.</div><form id="report"><button type="button" id="submit">ОТПРАВИТЬ СООБЩЕНИЕ</button></form>',
|
||
tr:'<br><br><div>Lütfen sayfayı yenileyin. Bu ekranı tekrar görürseniz lütfen bize bir rapor gönderin</div><br><div id="thanks" style="display:none;">Teşekkürler! Raporunuz gönderildi.</div><form id="report"><button type="button" id="submit">RAPOR GÖNDER</button></form>'},"Failed to send the report. Please try again later.":{ru:"Не удалось отправить. Пожалуйста, попробуйте позднее.",tr:"Rapor formu başarısız oldu. Lütfen daha sonra tekrar deneyin."},Eng:{ru:"Rus"},USD:{ru:"RUB"},RUB:{ru:"РУБ"}};za("Copyright (c) Dmitriy Kapustin, https://gemioli.com");
|
||
za("To license this software please contact at contact@gemioli.com");za("Game version: 231dad2");(function(a){function b(){c||(c=!0,a())}var c=!1;if("complete"===document.readyState)window.setTimeout(a);else if(document.addEventListener){var d=function(){document.removeEventListener("DOMContentLoaded",d,!1);window.removeEventListener("load",d,!1);b()};document.addEventListener("DOMContentLoaded",d,!1);window.addEventListener("load",d,!1)}else{if(document.documentElement.doScroll){var e=function(){try{document.documentElement.doScroll("left"),
|
||
b()}catch(n){window.setTimeout(e,50)}},f=!0;try{f=!window.frameElement}catch(n){}f&&e()}var g=function(){document.detachEvent("onreadystatechange",l);window.detachEvent("onload",g);b()},l=function(){"complete"===document.readyState&&g()};document.attachEvent("onreadystatechange",l);window.attachEvent("onload",g)}})(function(){try{var a=new Ji;a.once(jI,function(b){WH(b,a)});document.body.appendChild(a.X.canvas);a.start()}catch(b){WH(b)}});(function(a,b){"object"===typeof v&&"undefined"!==typeof x?
|
||
x.exports=b():"function"===typeof define&&define.amd?define(b):a.PointerEventsPolyfill=b()})(v,function(){function a(B,X){X=X||Object.create(null);var ia=document.createEvent("Event");"function"===typeof ia.initEvent?ia.initEvent(B,X.bubbles||!1,X.cancelable||!1):ia=new Event(B,{bubbles:X.bubbles||!1,cancelable:X.cancelable||!1});B=2;for(var ya;B<f.length;B++)ya=f[B],ia[ya]=X[ya]||g[B];ia.buttons=X.buttons||0;B=void 0!==X.pressure&&ia.buttons?X.pressure:ia.buttons?.5:0;ia.x=ia.clientX;ia.y=ia.clientY;
|
||
ia.pointerId=X.pointerId||0;ia.width=X.width||1;ia.height=X.height||1;ia.pressure=B;ia.tiltX=X.tiltX||0;ia.tiltY=X.tiltY||0;ia.twist=X.twist||0;ia.tangentialPressure=X.tangentialPressure||0;ia.pointerType=X.pointerType||"";ia.hwTimestamp=X.hwTimestamp||0;ia.isPrimary=X.isPrimary||!1;ia.detail=0;return ia}function b(){this.array=[];this.size=0}function c(B,X,ia,ya){this.addCallback=B.bind(ya);this.removeCallback=X.bind(ya);this.changedCallback=ia.bind(ya);ja&&(this.observer=new ja(this.mutationWatcher.bind(this)))}
|
||
function d(B){if(!A.pointermap.has(B))throw B=Error("NotFoundError"),B.name="NotFoundError",B;}function e(B){for(var X=B.parentNode;X&&X!==B.ownerDocument;)X=X.parentNode;if(!X)throw B=Error("InvalidStateError"),B.name="InvalidStateError",B;}var f="bubbles cancelable view screenX screenY clientX clientY ctrlKey altKey shiftKey metaKey button relatedTarget pageX pageY".split(" "),g=[!1,!1,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0],l=window.Map&&window.Map.prototype.forEach?Map:b;b.prototype={set:function(B,
|
||
X){if(void 0===X)return this.delete(B);this.has(B)||this.size++;this.array[B]=X},has:function(B){return void 0!==this.array[B]},delete:function(B){this.has(B)&&(delete this.array[B],this.size--)},get:function(B){return this.array[B]},clear:function(){this.size=this.array.length=0},forEach:function(B,X){return this.array.forEach(function(ia,ya){B.call(X,ia,ya,this)},this)}};var n="bubbles cancelable view detail screenX screenY clientX clientY ctrlKey altKey shiftKey metaKey button relatedTarget buttons pointerId width height pressure tiltX tiltY pointerType hwTimestamp isPrimary type target currentTarget which pageX pageY timeStamp".split(" "),
|
||
r=[!1,!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0,0,0,0,0,0,"",0,!1,"",null,null,0,0,0,0],w={pointerover:1,pointerout:1,pointerenter:1,pointerleave:1},y="undefined"!==typeof SVGElementInstance,A={pointermap:new l,eventMap:Object.create(null),captureInfo:Object.create(null),eventSources:Object.create(null),eventSourceList:[],registerSource:function(B,X){var ia=X.events;ia&&(ia.forEach(function(ya){X[ya]&&(this.eventMap[ya]=X[ya].bind(X))},this),this.eventSources[B]=X,this.eventSourceList.push(X))},
|
||
register:function(B){for(var X=this.eventSourceList.length,ia=0,ya;ia<X&&(ya=this.eventSourceList[ia]);ia++)ya.register.call(ya,B)},unregister:function(B){for(var X=this.eventSourceList.length,ia=0,ya;ia<X&&(ya=this.eventSourceList[ia]);ia++)ya.unregister.call(ya,B)},contains:function(B,X){try{return B.contains(X)}catch(ia){return!1}},down:function(B){B.bubbles=!0;this.fireEvent("pointerdown",B)},move:function(B){B.bubbles=!0;this.fireEvent("pointermove",B)},up:function(B){B.bubbles=!0;this.fireEvent("pointerup",
|
||
B)},enter:function(B){B.bubbles=!1;this.fireEvent("pointerenter",B)},leave:function(B){B.bubbles=!1;this.fireEvent("pointerleave",B)},over:function(B){B.bubbles=!0;this.fireEvent("pointerover",B)},out:function(B){B.bubbles=!0;this.fireEvent("pointerout",B)},cancel:function(B){B.bubbles=!0;this.fireEvent("pointercancel",B)},leaveOut:function(B){this.out(B);this.propagate(B,this.leave,!1)},enterOver:function(B){this.over(B);this.propagate(B,this.enter,!0)},eventHandler:function(B){if(!B._handledByPE){var X=
|
||
B.type;(X=this.eventMap&&this.eventMap[X])&&X(B);B._handledByPE=!0}},listen:function(B,X){X.forEach(function(ia){this.addEvent(B,ia)},this)},unlisten:function(B,X){X.forEach(function(ia){this.removeEvent(B,ia)},this)},addEvent:function(B,X){B.addEventListener(X,this.boundHandler)},removeEvent:function(B,X){B.removeEventListener(X,this.boundHandler)},makeEvent:function(B,X){this.captureInfo[X.pointerId]&&(X.relatedTarget=null);B=new a(B,X);X.preventDefault&&(B.preventDefault=X.preventDefault);B._target=
|
||
B._target||X.target;return B},fireEvent:function(B,X){B=this.makeEvent(B,X);return this.dispatchEvent(B)},cloneEvent:function(B){for(var X=Object.create(null),ia,ya=0;ya<n.length;ya++)ia=n[ya],X[ia]=B[ia]||r[ya],y&&("target"===ia||"relatedTarget"===ia)&&X[ia]instanceof SVGElementInstance&&(X[ia]=X[ia].correspondingUseElement);B.preventDefault&&(X.preventDefault=function(){B.preventDefault()});return X},getTarget:function(B){var X=this.captureInfo[B.pointerId];if(!X)return B._target;if(B._target===
|
||
X||!(B.type in w))return X},propagate:function(B,X,ia){for(var ya=B.target,eb=[];null!=ya&&ya!==document&&!ya.contains(B.relatedTarget);)if(eb.push(ya),ya=ya.parentNode,!ya)return;ia&&eb.reverse();eb.forEach(function(Jb){B.target=Jb;X.call(this,B)},this)},setCapture:function(B,X,ia){this.captureInfo[B]&&this.releaseCapture(B,ia);this.captureInfo[B]=X;this.implicitRelease=this.releaseCapture.bind(this,B,ia);document.addEventListener("pointerup",this.implicitRelease);document.addEventListener("pointercancel",
|
||
this.implicitRelease);var ya=new a("gotpointercapture",{bubbles:!0});ya.pointerId=B;ya._target=X;ia||this.asyncDispatchEvent(ya)},releaseCapture:function(B,X){var ia=this.captureInfo[B];if(ia){this.captureInfo[B]=void 0;document.removeEventListener("pointerup",this.implicitRelease);document.removeEventListener("pointercancel",this.implicitRelease);var ya=new a("lostpointercapture",{bubbles:!0});ya.pointerId=B;ya._target=ia;X||this.asyncDispatchEvent(ya)}},dispatchEvent:function(B){var X=this.getTarget(B);
|
||
if(X)return X.dispatchEvent(B)},asyncDispatchEvent:function(B){requestAnimationFrame(this.dispatchEvent.bind(this,B))}};A.boundHandler=A.eventHandler.bind(A);var H={shadow:function(B){if(B)return B.shadowRoot||B.webkitShadowRoot},canTarget:function(B){return B&&!!B.elementFromPoint},targetingShadow:function(B){B=this.shadow(B);if(this.canTarget(B))return B},olderShadow:function(B){var X=B.olderShadowRoot;!X&&(B=B.querySelector("shadow"))&&(X=B.olderShadowRoot);return X},allShadows:function(B){var X=
|
||
[];for(B=this.shadow(B);B;)X.push(B),B=this.olderShadow(B);return X},searchRoot:function(B,X,ia){if(B){var ya=B.elementFromPoint(X,ia),eb;for(eb=this.targetingShadow(ya);eb;){if(B=eb.elementFromPoint(X,ia))return ya=this.targetingShadow(B),this.searchRoot(ya,X,ia)||B;eb=this.olderShadow(eb)}return ya}},owner:function(B){for(;B.parentNode;)B=B.parentNode;B.nodeType!==Node.DOCUMENT_NODE&&B.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&(B=document);return B},findTarget:function(B){var X=B.clientX,ia=B.clientY;
|
||
B=this.owner(B.target);B.elementFromPoint(X,ia)||(B=document);return this.searchRoot(B,X,ia)}},I=Array.prototype.forEach.call.bind(Array.prototype.forEach),O=Array.prototype.map.call.bind(Array.prototype.map),S=Array.prototype.slice.call.bind(Array.prototype.slice),R=Array.prototype.filter.call.bind(Array.prototype.filter),ja=window.MutationObserver||window.WebKitMutationObserver,ka={subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["touch-action"]};c.prototype={watchSubtree:function(B){this.observer&&
|
||
H.canTarget(B)&&this.observer.observe(B,ka)},enableOnSubtree:function(B){this.watchSubtree(B);B===document&&"complete"!==document.readyState?this.installOnLoad():this.installNewSubtree(B)},installNewSubtree:function(B){I(this.findElements(B),this.addElement,this)},findElements:function(B){return B.querySelectorAll?B.querySelectorAll("[touch-action]"):[]},removeElement:function(B){this.removeCallback(B)},addElement:function(B){this.addCallback(B)},elementChanged:function(B,X){this.changedCallback(B,
|
||
X)},concatLists:function(B,X){return B.concat(S(X))},installOnLoad:function(){document.addEventListener("readystatechange",function(){"complete"===document.readyState&&this.installNewSubtree(document)}.bind(this))},isElement:function(B){return B.nodeType===Node.ELEMENT_NODE},flattenMutationTree:function(B){var X=O(B,this.findElements,this);X.push(R(B,this.isElement));return X.reduce(this.concatLists,[])},mutationWatcher:function(B){B.forEach(this.mutationHandler,this)},mutationHandler:function(B){"childList"===
|
||
B.type?(this.flattenMutationTree(B.addedNodes).forEach(this.addElement,this),this.flattenMutationTree(B.removedNodes).forEach(this.removeElement,this)):"attributes"===B.type&&this.elementChanged(B.target,B.oldValue)}};var ea=A.pointermap,ma=[1,4,2,8,16],pa=!1;try{pa=1===(new MouseEvent("test",{buttons:1})).buttons}catch(B){}var va={POINTER_ID:1,POINTER_TYPE:"mouse",events:"mousedown webkitmouseforcechanged mousemove mouseup mouseover mouseout".split(" "),register:function(B){A.listen(B,this.events)},
|
||
unregister:function(B){A.unlisten(B,this.events)},lastTouches:[],isEventSimulatedFromTouch:function(B){var X=this.lastTouches,ia=B.clientX;B=B.clientY;for(var ya=0,eb=X.length,Jb;ya<eb&&(Jb=X[ya]);ya++){var hc=Math.abs(B-Jb.y);if(25>=Math.abs(ia-Jb.x)&&25>=hc)return!0}},prepareEvent:function(B){var X=A.cloneEvent(B),ia=X.preventDefault;X.preventDefault=function(){B.preventDefault();ia()};X.pointerId=this.POINTER_ID;X.isPrimary=!0;X.pointerType=this.POINTER_TYPE;"webkitForce"in B&&(X.pressure=B.webkitForce-
|
||
MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN);return X},prepareButtonsForMove:function(B,X){var ia=ea.get(this.POINTER_ID);B.buttons=0!==X.which&&ia?ia.buttons:0;X.buttons=B.buttons},mousedown:function(B){if(!this.isEventSimulatedFromTouch(B)){var X=ea.get(this.POINTER_ID),ia=this.prepareEvent(B);pa||(ia.buttons=ma[ia.button],X&&(ia.buttons|=X.buttons),B.buttons=ia.buttons);ea.set(this.POINTER_ID,B);X&&0!==X.buttons?A.move(ia):A.down(ia)}},webkitmouseforcechanged:function(B){this.mousemove(B)},mousemove:function(B){if(!this.isEventSimulatedFromTouch(B)){var X=
|
||
this.prepareEvent(B);pa||this.prepareButtonsForMove(X,B);X.button=-1;ea.set(this.POINTER_ID,B);A.move(X)}},mouseup:function(B){if(!this.isEventSimulatedFromTouch(B)){var X=ea.get(this.POINTER_ID),ia=this.prepareEvent(B);if(!pa){var ya=ma[ia.button];ia.buttons=X?X.buttons&~ya:0;B.buttons=ia.buttons}ea.set(this.POINTER_ID,B);ia.buttons&=~ma[ia.button];0===ia.buttons?A.up(ia):A.move(ia)}},mouseover:function(B){if(!this.isEventSimulatedFromTouch(B)){var X=this.prepareEvent(B);pa||this.prepareButtonsForMove(X,
|
||
B);X.button=-1;ea.set(this.POINTER_ID,B);A.enterOver(X)}},mouseout:function(B){if(!this.isEventSimulatedFromTouch(B)){var X=this.prepareEvent(B);pa||this.prepareButtonsForMove(X,B);X.button=-1;A.leaveOut(X)}},cancel:function(B){B=this.prepareEvent(B);A.cancel(B);this.deactivateMouse()},deactivateMouse:function(){ea.delete(this.POINTER_ID)}},Ka=A.captureInfo,Aa=H.findTarget.bind(H),Fa=H.allShadows.bind(H),xa=A.pointermap,Ja={events:["touchstart","touchmove","touchforcechange","touchend","touchcancel"],
|
||
register:function(B){La.enableOnSubtree(B)},unregister:function(){},elementAdded:function(B){var X=B.getAttribute("touch-action"),ia=this.touchActionToScrollType(X);"number"===typeof ia&&(B._scrollType=ia,A.listen(B,this.events),Fa(B).forEach(function(ya){ya._scrollType=ia;A.listen(ya,this.events)},this))},elementRemoved:function(B){if(0<xa.size){var X=this.events;B.addEventListener("touchend",function(){B._scrollType=void 0;A.unlisten(B,X)})}else B._scrollType=void 0,A.unlisten(B,this.events);Fa(B).forEach(function(ia){ia._scrollType=
|
||
void 0;A.unlisten(ia,this.events)},this)},elementChanged:function(B,X){var ia=B.getAttribute("touch-action"),ya=this.touchActionToScrollType(ia);X=this.touchActionToScrollType(X);"number"===typeof ya&&"number"===typeof X?(B._scrollType=ya,Fa(B).forEach(function(eb){eb._scrollType=ya},this)):"number"===typeof X?this.elementRemoved(B):"number"===typeof ya&&this.elementAdded(B)},scrollTypes:{UP:function(B){return B.includes("pan-y")||B.includes("pan-up")?1:0},DOWN:function(B){return B.includes("pan-y")||
|
||
B.includes("pan-down")?2:0},LEFT:function(B){return B.includes("pan-x")||B.includes("pan-left")?4:0},RIGHT:function(B){return B.includes("pan-x")||B.includes("pan-right")?8:0}},touchActionToScrollType:function(B){if(B){if("auto"===B)return 15;if("none"===B)return 0;B=B.split(" ");var X=this.scrollTypes;return X.UP(B)|X.DOWN(B)|X.LEFT(B)|X.RIGHT(B)}},POINTER_TYPE:"touch",firstTouch:null,isPrimaryTouch:function(B){return this.firstTouch===B.identifier},setPrimaryTouch:function(B){if(0===xa.size||1===
|
||
xa.size&&xa.has(1))this.firstTouch=B.identifier,this.firstXY={X:B.clientX,Y:B.clientY},this.scrolling=!1},removePrimaryPointer:function(B){B.isPrimary&&(this.firstXY=this.firstTouch=null)},typeToButtons:function(B){var X=0;if("touchstart"===B||"touchmove"===B||"touchforcechange"===B)X=1;return X},touchToPointer:function(B){var X=this.currentTouchEvent,ia=A.cloneEvent(B),ya=ia.pointerId=B.identifier+2;ia.target=Ka[ya]||Aa(ia);ia.bubbles=!0;ia.cancelable=!0;ia.button=0;ia.buttons=this.typeToButtons(X.type);
|
||
ia.width=2*(B.radiusX||B.webkitRadiusX||0);ia.height=2*(B.radiusY||B.webkitRadiusY||0);ia.pressure=void 0!==B.force?B.force:void 0!==B.webkitForce?B.webkitForce:void 0;ia.isPrimary=this.isPrimaryTouch(B);if(B.altitudeAngle){ya=Math.tan(B.altitudeAngle);var eb=180/Math.PI;ia.tiltX=Math.atan(Math.cos(B.azimuthAngle)/ya)*eb;ia.tiltY=Math.atan(Math.sin(B.azimuthAngle)/ya)*eb}else ia.tiltX=0,ia.tiltY=0;ia.pointerType="stylus"===B.touchType?"pen":this.POINTER_TYPE;ia.altKey=X.altKey;ia.ctrlKey=X.ctrlKey;
|
||
ia.metaKey=X.metaKey;ia.shiftKey=X.shiftKey;var Jb=this;ia.preventDefault=function(){Jb.scrolling=!1;Jb.firstXY=null;X.preventDefault()};return ia},processTouches:function(B,X){var ia=B.changedTouches;this.currentTouchEvent=B;B=0;for(var ya;B<ia.length;B++)ya=ia[B],X.call(this,this.touchToPointer(ya))},shouldScroll:function(B){if(this.firstXY){var X=B.currentTarget._scrollType;if(0===X)var ia=!1;else if(15===X)ia=!0;else{var ya=B.changedTouches[0];B=ya.clientY-this.firstXY.Y;var eb=Math.abs(B);ya=
|
||
ya.clientX-this.firstXY.X;var Jb=Math.abs(ya),hc=X&1,$b=X&2,nd=X&4;X&=8;nd&&X?ia=Jb>eb:nd?ia=Jb>eb&&0<ya:X&&(ia=Jb>eb&&0>ya);ia||(hc&&$b?ia=Jb<eb:hc?ia=Jb<eb&&0<B:$b&&(ia=Jb<eb&&0>B))}this.firstXY=null;return ia}},findTouch:function(B,X){for(var ia=0,ya=B.length,eb;ia<ya&&(eb=B[ia]);ia++)if(eb.identifier===X)return!0},vacuumTouches:function(B){var X=B.touches;if(xa.size>=X.length){var ia=[];xa.forEach(function(ya,eb){1===eb||this.findTouch(X,eb-2)||ia.push(ya.out)},this);ia.forEach(this.cancelOut,
|
||
this)}},touchstart:function(B){this.vacuumTouches(B);this.setPrimaryTouch(B.changedTouches[0]);this.dedupSynthMouse(B);this.scrolling||this.processTouches(B,this.overDown)},overDown:function(B){xa.set(B.pointerId,{target:B.target,out:B,outTarget:B.target});A.enterOver(B);A.down(B)},touchforcechange:function(B){this.touchmove(B)},touchmove:function(B){this.scrolling||(this.shouldScroll(B)?(this.scrolling=!0,this.touchcancel(B)):("touchforcechange"!==B.type&&B.preventDefault(),this.processTouches(B,
|
||
this.moveOverOut)))},moveOverOut:function(B){var X=xa.get(B.pointerId);if(X){var ia=X.out,ya=X.outTarget;A.move(B);ia&&ya!==B.target&&(ia.relatedTarget=B.target,B.relatedTarget=ya,ia.target=ya,B.target?(A.leaveOut(ia),A.enterOver(B)):(B.target=ya,B.relatedTarget=null,this.cancelOut(B)));X.out=B;X.outTarget=B.target}},touchend:function(B){this.dedupSynthMouse(B);this.processTouches(B,this.upOut)},upOut:function(B){this.scrolling||(A.up(B),A.leaveOut(B));this.cleanUpPointer(B)},touchcancel:function(B){this.processTouches(B,
|
||
this.cancelOut)},cancelOut:function(B){A.cancel(B);A.leaveOut(B);this.cleanUpPointer(B)},cleanUpPointer:function(B){xa.delete(B.pointerId);this.removePrimaryPointer(B)},dedupSynthMouse:function(B){var X=va.lastTouches;B=B.changedTouches[0];this.isPrimaryTouch(B)&&(B={x:B.clientX,y:B.clientY},X.push(B),X=function(ia,ya){ya=ia.indexOf(ya);-1<ya&&ia.splice(ya,1)}.bind(null,X,B),setTimeout(X,2500))}};var La=new c(Ja.elementAdded,Ja.elementRemoved,Ja.elementChanged,Ja);var Ha=A.pointermap,Gb=window.MSPointerEvent&&
|
||
"number"===typeof window.MSPointerEvent.MSPOINTER_TYPE_MOUSE,qc={events:"MSPointerDown MSPointerMove MSPointerUp MSPointerOut MSPointerOver MSPointerCancel MSGotPointerCapture MSLostPointerCapture".split(" "),register:function(B){A.listen(B,this.events)},unregister:function(B){A.unlisten(B,this.events)},POINTER_TYPES:["","unavailable","touch","pen","mouse"],prepareEvent:function(B){var X=B;Gb&&(X=A.cloneEvent(B),X.pointerType=this.POINTER_TYPES[B.pointerType]);return X},cleanup:function(B){Ha.delete(B)},
|
||
MSPointerDown:function(B){Ha.set(B.pointerId,B);B=this.prepareEvent(B);A.down(B)},MSPointerMove:function(B){B=this.prepareEvent(B);A.move(B)},MSPointerUp:function(B){var X=this.prepareEvent(B);A.up(X);this.cleanup(B.pointerId)},MSPointerOut:function(B){B=this.prepareEvent(B);A.leaveOut(B)},MSPointerOver:function(B){B=this.prepareEvent(B);A.enterOver(B)},MSPointerCancel:function(B){var X=this.prepareEvent(B);A.cancel(X);this.cleanup(B.pointerId)},MSLostPointerCapture:function(B){B=A.makeEvent("lostpointercapture",
|
||
B);A.dispatchEvent(B)},MSGotPointerCapture:function(B){B=A.makeEvent("gotpointercapture",B);A.dispatchEvent(B)}};if(window.navigator.msPointerEnabled){var Nb=function(B){d(B);e(this);0!==A.pointermap.get(B).buttons&&(A.setCapture(B,this,!0),this.msSetPointerCapture(B))};var pb=function(B){d(B);A.releaseCapture(B,!0);this.msReleasePointerCapture(B)}}else Nb=function(B){d(B);e(this);0!==A.pointermap.get(B).buttons&&A.setCapture(B,this)},pb=function(B){d(B);A.releaseCapture(B)};var oa=function(B){return!!A.captureInfo[B]};
|
||
window.PointerEvent||(window.PointerEvent=a,window.navigator.msPointerEnabled?(Object.defineProperty(window.navigator,"maxTouchPoints",{value:window.navigator.msMaxTouchPoints,enumerable:!0}),A.registerSource("ms",qc)):(Object.defineProperty(window.navigator,"maxTouchPoints",{value:0,enumerable:!0}),A.registerSource("mouse",va),void 0!==window.ontouchstart&&A.registerSource("touch",Ja)),A.register(document));window.Element&&!window.Element.prototype.setPointerCapture&&Object.defineProperties(window.Element.prototype,
|
||
{setPointerCapture:{value:Nb},releasePointerCapture:{value:pb},hasPointerCapture:{value:oa}});return{dispatcher:A,Installer:c,PointerEvent:a,PointerMap:l,targetFinding:H}})},UB))()})();
|