var EJS=function(o){window.EJS_MODULES=o;var n={},a=[];function i(e){if(n[e])return n[e].exports;a.push(e);var t=n[e]={i:e,l:!1,exports:{}};return o[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}return window.getUsedModules=function(){return a.sort(function(e,t){return t'+n.localization("CORS Error")+"":t.innerHTML=''+n.localization("Network Error")+""}},null,null,null,null,null,function(e){e.exports=class{gamepads;timeout;listeners;constructor(){if(!navigator.getGamepads&&!navigator.webkitGetGamepads)throw new Error("Get gamepads not found!");if(!window.setTimeout)throw new Error("setTimeout was not found!");this.gamepads=[],this.listeners={},this.timeout=null,this.loop()}terminate(){window.clearTimeout(this.timeout)}getGamepads(){return navigator.getGamepads?navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads():[]}loop(){this.updateGamepadState(),this.timeout=setTimeout(this.loop.bind(this),10)}updateGamepadState(){const o=this.getGamepads();o.forEach((i,n)=>{if(i){let t=!1;this.gamepads.forEach((a,e)=>{a.index===i.index&&(t=!0,a.axes.forEach((e,t)=>{if(i.axes[t]!==e){const e=function(){switch(t){case 0:return"LEFT_STICK_X";case 1:return"LEFT_STICK_Y";case 2:return"RIGHT_STICK_X";case 3:return"RIGHT_STICK_Y";default:return null}}();e&&this.dispatchEvent("axischanged",{axis:e,value:i.axes[t],index:i.index,gamepadIndex:i.index})}}),i.buttons.forEach((e,t)=>{let n=1===a.buttons[t],o=("object"==typeof a.buttons[t]&&(n=a.buttons[t].pressed),1===e);"object"==typeof e&&(o=e.pressed),n!==o&&(o?this.dispatchEvent("buttondown",{index:t,gamepadIndex:i.index}):this.dispatchEvent("buttonup",{index:t,gamepadIndex:i.index}))}),this.gamepads[e]=o[n])}),t||(this.gamepads.push(o[n]),this.dispatchEvent("connected",{gamepadIndex:i.index}))}});for(let n=0;n>16&255,a[i++]=t>>8&255,a[i++]=255&t;return 2===n&&(t=l[e.charCodeAt(r)]<<2|l[e.charCodeAt(r+1)]>>4,a[i++]=255&t),1===n&&(t=l[e.charCodeAt(r)]<<10|l[e.charCodeAt(r+1)]<<4|l[e.charCodeAt(r+2)]>>2,a[i++]=t>>8&255,a[i++]=255&t),a},n.fromByteArray=function(e){for(var t,n=e.length,o=n%3,a=[],i=0,s=n-o;i>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}(e,i,s>2]+r[t<<4&63]+"==")):2==o&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),a.join("")};for(var r=[],l=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,i=o.length;a>>1;case"base64":return S(e).length;default:if(a)return o?-1:x(e).length;t=(""+t).toLowerCase(),a=!0}}function n(e,t,n){var o=e[t];e[t]=e[n],e[n]=o}function r(e,t,n,o,a){if(0===e.length)return-1;if("string"==typeof n?(o=n,n=0):2147483647=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof t&&(t=u.from(t,o)),u.isBuffer(t))return 0===t.length?-1:l(e,t,n,o,a);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?(a?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,n):l(e,[t],n,o,a);throw new TypeError("val must be string, number or Buffer")}function l(e,t,n,o,a){var i=1,s=e.length,r=t.length;if(void 0!==o&&("ucs2"===(o=String(o).toLowerCase())||"ucs-2"===o||"utf16le"===o||"utf-16le"===o)){if(e.length<2||t.length<2)return-1;s/=i=2,r/=2,n/=2}function l(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(a)for(var c=-1,d=n;d>>10&1023|55296),d=56320|1023&d),o.push(d),a+=u}var f=o,p=f.length;if(p<=g)return String.fromCharCode.apply(String,f);for(var m="",h=0;hthis.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":var i=this,s=t,r=n,l=i.length;(!r||r<0||lt&&(e+=" ... "),""},u.prototype.compare=function(e,t,n,o,a){if(M(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===n&&(n=e?e.length:0),void 0===o&&(o=0),void 0===a&&(a=this.length),(t=void 0===t?0:t)<0||n>e.length||o<0||a>this.length)throw new RangeError("out of range index");if(a<=o&&n<=t)return 0;if(a<=o)return-1;if(n<=t)return 1;if(this===e)return 0;for(var i=(a>>>=0)-(o>>>=0),s=(n>>>=0)-(t>>>=0),r=Math.min(i,s),l=this.slice(o,a),c=e.slice(t,n),d=0;d>>=0,isFinite(n)?(n>>>=0,void 0===o&&(o="utf8")):(o=n,n=void 0)}var a=this.length-t;if((void 0===n||athis.length)throw new RangeError("Attempt to write outside buffer bounds");o=o||"utf8";for(var i,s,r,l,c,d=!1;;)switch(o){case"hex":var u=this,f=e,p=t,m=n,h=(p=Number(p)||0,u.length-p);(!m||(m=Number(m))>h)&&(m=h),(h=f.length)/2>8,a.push(n%256),a.push(o);return a}(e,(i=this).length-r),i,r,s);default:if(d)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),d=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var g=4096;function c(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(ne.length)throw new RangeError("Index out of range")}function y(e,t,n,o){if(n+o>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function b(e,t,n,o,a){return t=+t,n>>>=0,a||y(e,0,n,4),i.write(e,t,n,o,23,4),n+4}function _(e,t,n,o,a){return t=+t,n>>>=0,a||y(e,0,n,8),i.write(e,t,n,o,52,8),n+8}u.prototype.slice=function(e,t){var n=this.length,n=((e=~~e)<0?(e+=n)<0&&(e=0):n>>=0,t>>>=0,n||c(e,t,this.length);for(var o=this[e],a=1,i=0;++i>>=0,t>>>=0,n||c(e,t,this.length);for(var o=this[e+--t],a=1;0>>=0,t||c(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||c(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||c(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||c(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||c(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||c(e,t,this.length);for(var o=this[e],a=1,i=0;++i=(a*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||c(e,t,this.length);for(var o=t,a=1,i=this[e+--o];0=(a*=128)&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return e>>>=0,t||c(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||c(e,2,this.length);t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},u.prototype.readInt16BE=function(e,t){e>>>=0,t||c(e,2,this.length);t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||c(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||c(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return e>>>=0,t||c(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||c(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||c(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||c(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,o){e=+e,t>>>=0,n>>>=0,o||h(this,e,t,n,Math.pow(2,8*n)-1,0);var a=1,i=0;for(this[t]=255&e;++i>>=0,n>>>=0,o||h(this,e,t,n,Math.pow(2,8*n)-1,0);var a=n-1,i=1;for(this[t+a]=255&e;0<=--a&&(i*=256);)this[t+a]=e/i&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||h(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||h(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||h(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||h(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||h(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeIntLE=function(e,t,n,o){e=+e,t>>>=0,o||h(this,e,t,n,(o=Math.pow(2,8*n-1))-1,-o);var a=0,i=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,o){e=+e,t>>>=0,o||h(this,e,t,n,(o=Math.pow(2,8*n-1))-1,-o);var a=n-1,i=1,s=0;for(this[t+a]=255&e;0<=--a&&(i*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/i>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||h(this,e,t,1,127,-128),this[t]=255&(e=e<0?255+e+1:e),t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||h(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||h(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||h(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||h(this,e,t,4,2147483647,-2147483648),this[t]=(e=e<0?4294967295+e+1:e)>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeFloatLE=function(e,t,n){return b(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return b(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return _(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return _(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,o){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n=n||0,o||0===o||(o=this.length),t>=e.length&&(t=e.length),(o=0=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length);var a=(o=e.length-t>>=0,n=void 0===n?this.length:n>>>0,"number"==typeof(e=e||0))for(i=t;i>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function S(e){return T.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(w,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function C(e,t,n,o){for(var a=0;a=t.length||a>=e.length);++a)t[a+n]=e[a];return a}function M(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function I(e){return e!=e}}.call(this)}.call(this,O("buffer").Buffer)},{"base64-js":2,buffer:3,ieee754:4}],4:[function(e,t,n){n.read=function(e,t,n,o,a){var i,s,r=8*a-o-1,l=(1<>1,d=-7,u=n?a-1:0,f=n?-1:1,a=e[t+u];for(u+=f,i=a&(1<<-d)-1,a>>=-d,d+=r;0>=-d,d+=o;0>1,u=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,f=o?0:i-1,p=o?1:-1,i=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(r=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(o=Math.pow(2,-s))<1&&(s--,o*=2),2<=(t+=1<=s+d?u/o:u*Math.pow(2,1-d))*o&&(s++,o/=2),c<=s+d?(r=0,s=c):1<=s+d?(r=(t*o-1)*Math.pow(2,a),s+=d):(r=t*Math.pow(2,d-1)*Math.pow(2,a),s=0));8<=a;e[n+f]=255&r,f+=p,r/=256,a-=8);for(s=s<this.options.threshold){var r={};for(l in this.direction)this.direction.hasOwnProperty(l)&&(r[l]=this.direction[l]);var l,c={};for(l in this.direction={x:n,y:o,angle:t},e.direction=this.direction,r)r[l]===this.direction[l]&&(c[l]=!0);if(c.x&&c.y&&c.angle)return e;c.x&&c.y||this.trigger("plain",e),c.x||this.trigger("plain:"+n,e),c.y||this.trigger("plain:"+o,e),c.angle||this.trigger("dir dir:"+t,e)}return e},o.prototype=new e,(o.constructor=o).id=0,o.prototype.prepareNipples=function(){var e=this,o=e.nipples;o.on=e.on.bind(e),o.off=e.off.bind(e),o.options=e.options,o.destroy=e.destroy.bind(e),o.ids=e.ids,o.id=e.id,o.processOnMove=e.processOnMove.bind(e),o.processOnEnd=e.processOnEnd.bind(e),o.get=function(e){if(void 0===e)return o[0];for(var t=0,n=o.length;t