phaser3-rex-plugins
Version:
7 lines (6 loc) • 3.76 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).rexruncommandsplugin=t();}(undefined,(function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,i=void 0,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return ("string"===t?String:Number)(e)}(o,"string"))?i:String(i)),n);}var o,i;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2019 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/}function t(e){return t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},t(e)}function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function n(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function o(e){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return !1}}();return function(){var o,i=t(e);if(r){var u=t(this).constructor;o=Reflect.construct(i,arguments,u);}else o=i.apply(this,arguments);return n(this,o)}}var i=function(e,t,r){if(e&&"number"!=typeof e){if(e.hasOwnProperty(t))return e[t];if(-1!==t.indexOf(".")){for(var n=t.split("."),o=e,i=r,u=0;u<n.length;u++){if(!o.hasOwnProperty(n[u])){i=r;break}i=o[n[u]],o=o[n[u]];}return i}return r}return r},u=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,f=/^0x[0-9A-F]+$/i,c=function(e){if("string"!=typeof e)return e;if(""===e)e=null;else if(u.test(e))e=parseFloat(e);else if(f.test(e))e=parseInt(e,16);else switch(e){case"false":e=!1;break;case"true":e=!0;break;case"null":e=null;break;case"undefined":e=void 0;}return e},l=function e(t,r,n){var o,u,f=i(n,"reverse",!1);if(u=t[0],"[object Array]"===Object.prototype.toString.call(u))if(f)for(c=(l=t.length)-1;c>=0;c--)o=e(t[c],r,n);else for(var c=0,l=t.length;c<l;c++)o=e(t[c],r,n);else o=a(t,r,n);return o},a=function(e,t,r){var n,o=i(r,"argsConvert",void 0),u=i(r,"argsConvertScope",void 0),f=e[0];if(s=function(e,t,r,n){void 0===r&&(r=0),void 0===n&&(n=t.length),e.length=n-r;for(var o=0,i=e.length;o<i;o++)e[o]=t[o+r];return e}(s,e,1),o){!0===o&&(o=c,u=void 0);for(var l=0,a=s.length;l<a;l++)s[l]=u?o.call(u,s[l],e):o(s[l],e);}return "string"==typeof f?null==(n=t[f])&&(n=i(t,f,null)):n=f,n.apply(t,s)},s=[];return function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t);}(c,Phaser.Plugins.BasePlugin);var n,i,f=o(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),f.call(this,e)}return n=c,(i=[{key:"run",value:function(e,t,r){return l(e,t,r)}}])&&e(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),c}()}));