iwmlib/dist/iwmlib.3rdparty.min.js

1 line
1.5 MiB

var e;!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.OptimalSelect=t():e.OptimalSelect=t()}(this,function(){return function(r){var i={};function n(e){if(i[e])return i[e].exports;var t=i[e]={i:e,l:!1,exports:{}};return r[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}return n.m=r,n.c=i,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertNodeList=function(e){for(var t=e.length,r=new Array(t),i=0;i<t;i++)r[i]=e[i];return r},t.escapeValue=function(e){return e&&e.replace(/['"`\\/:\?&!#$%^()[\]{|}*+;,.<=>@~]/g,"\\$&").replace(/\n/g,"A")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCommonAncestor=function(e){var t=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).root,i=void 0===t?document:t,n=[];e.forEach(function(e,t){for(var r=[];e!==i;)e=e.parentNode,r.unshift(e);n[t]=r}),n.sort(function(e,t){return e.length-t.length});for(var r=n.shift(),o=null,a=function(){var t=r[s],e=n.some(function(e){return!e.some(function(e){return e===t})});if(e)return"break";o=t},s=0,u=r.length;s<u;s++){var c=a();if("break"===c)break}return o},t.getCommonProperties=function(e){var l={classes:[],attributes:{},tag:null};return e.forEach(function(e){var n,i,t,r,o=l.classes,a=l.attributes,s=l.tag;if(void 0!==o){var u=e.getAttribute("class");u?(u=u.trim().split(" "),o.length?(o=o.filter(function(t){return u.some(function(e){return e===t})})).length?l.classes=o:delete l.classes:l.classes=u):delete l.classes}if(void 0!==a&&(n=e.attributes,i=Object.keys(n).reduce(function(e,t){var r=n[t],i=r.name;return r&&"class"!==i&&(e[i]=r.value),e},{}),t=Object.keys(i),r=Object.keys(a),t.length?r.length?(a=r.reduce(function(e,t){var r=a[t];return r===i[t]&&(e[t]=r),e},{}),Object.keys(a).length?l.attributes=a:delete l.attributes):l.attributes=i:delete l.attributes),void 0!==s){var c=e.tagName.toLowerCase();s?c!==s&&delete l.tag:l.tag=c}}),l}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};Array.isArray(t)||(t=t.length?(0,f.convertNodeList)(t):[t]);if(!t.length||t.some(function(e){return 1!==e.nodeType}))throw new Error('Invalid input - to compare HTMLElements its necessary to provide a reference of the selected node(s)! (missing "elements")');(0,l.default)(t[0],r);var i=e.replace(/> /g,">").split(/\s+(?=(?:(?:[^"]*"){2})*[^"]*$)/);if(i.length<2)return h("",e,"",t);var n=[i.pop()];for(;1<i.length;){var o=i.pop(),a=i.join(" "),s=n.join(" "),u=a+" "+s,c=document.querySelectorAll(u);c.length!==t.length&&n.unshift(h(a,o,s,t))}n.unshift(i[0]),(i=n)[0]=h("",i[0],i.slice(1).join(" "),t),i[i.length-1]=h(i.slice(0,-1).join(" "),i[i.length-1],"",t);return i.join(" ").replace(/>/g,"> ").trim()};var i,n=r(3),l=(i=n)&&i.__esModule?i:{default:i},f=r(0);function h(r,i,n,o){if(r.length&&(r+=" "),n.length&&(n=" "+n),/\[*\]/.test(i)){var e=i.replace(/=.*$/,"]"),a=""+r+e+n;if(m(document.querySelectorAll(a),o))i=e;else for(var s=document.querySelectorAll(""+r+e),t=function(){var t=s[u];if(o.some(function(e){return t.contains(e)})){var e=t.tagName.toLowerCase();return a=""+r+e+n,m(document.querySelectorAll(a),o)&&(i=e),"break"}},u=0,c=s.length;u<c;u++){if("break"===t())break}}if(/>/.test(i)){var l=i.replace(/>/,"");a=""+r+l+n;m(document.querySelectorAll(a),o)&&(i=l)}if(/:nth-child/.test(i)){var f=i.replace(/nth-child/g,"nth-of-type");a=""+r+f+n;m(document.querySelectorAll(a),o)&&(i=f)}if(/\.\S+\.\S+/.test(i)){for(var h=i.trim().split(".").slice(1).map(function(e){return"."+e}).sort(function(e,t){return e.length-t.length});h.length;){var d=i.replace(h.shift(),"").trim();if(!(a=(""+r+d+n).trim()).length||">"===a.charAt(0)||">"===a.charAt(a.length-1))break;m(document.querySelectorAll(a),o)&&(i=d)}if((h=i&&i.match(/\./g))&&2<h.length){var p=document.querySelectorAll(""+r+i),v=function(){var t=p[u];if(o.some(function(e){return t.contains(e)})){var e=t.tagName.toLowerCase();return a=""+r+e+n,m(document.querySelectorAll(a),o)&&(i=e),"break"}};for(u=0,c=p.length;u<c;u++){if("break"===v())break}}}return i}function m(r,e){var i=r.length;return i===e.length&&e.every(function(e){for(var t=0;t<i;t++)if(r[t]===e)return!0;return!1})}e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],i=!0,n=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);i=!0);}catch(e){n=!0,o=e}finally{try{!i&&s.return&&s.return()}finally{if(n)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};function v(e,r){e.forEach(function(e){var t=!0;r(e,function(){return t=!1}),e.childTags&&t&&v(e.childTags,r)})}function m(e,t,r){for(;e.parent;){if(r(e=e.parent))return e;if(e===t)break}return null}t.default=function(e,t){return!1;var r=Object.getPrototypeOf(!0);Object.getOwnPropertyDescriptor(r,"childTags")||Object.defineProperty(r,"childTags",{enumerable:!0,get:function(){return this.children.filter(function(e){return"tag"===e.type||"script"===e.type||"style"===e.type})}});Object.getOwnPropertyDescriptor(r,"attributes")||Object.defineProperty(r,"attributes",{enumerable:!0,get:function(){var i=this.attribs,e=Object.keys(i),t=e.reduce(function(e,t,r){return e[r]={name:t,value:i[t]},e},{});return Object.defineProperty(t,"length",{enumerable:!1,configurable:!1,value:e.length}),t}});r.getAttribute||(r.getAttribute=function(e){return this.attribs[e]||null});r.getElementsByTagName||(r.getElementsByTagName=function(t){var r=[];return v(this.childTags,function(e){e.name!==t&&"*"!==t||r.push(e)}),r});r.getElementsByClassName||(r.getElementsByClassName=function(e){var r=e.trim().replace(/\s+/g," ").split(" "),i=[];return v([this],function(e){var t=e.attribs.class;t&&r.every(function(e){return-1<t.indexOf(e)})&&i.push(e)}),i});r.querySelectorAll||(r.querySelectorAll=function(e){var r=this,i=function(e){return e.split(" ").reverse().map(function(e,t){var a=0===t,r=e.split(":"),i=p(r,2),s=i[0],n=i[1],u=null,c=null;if(function(){switch(!0){case/>/.test(s):c=function(t){return function(e){return e(t.parent)&&t.parent}};break;case/^\./.test(s):var r=s.substr(1).split(".");u=function(e){var t=e.attribs.class;return t&&r.every(function(e){return-1<t.indexOf(e)})},c=function(e,t){return a?e.getElementsByClassName(r.join(" ")):"function"==typeof e?e(u):m(e,t,u)};break;case/^\[/.test(s):var e=s.replace(/\[|\]|"/g,"").split("="),t=p(e,2),i=t[0],n=t[1];u=function(e){var t=-1<Object.keys(e.attribs).indexOf(i);return t&&(!n||e.attribs[i]===n)},c=function(e,t){if(a){var r=function(){var t=[];return v([e],function(e){u(e)&&t.push(e)}),{v:t}}();if("object"===(void 0===r?"undefined":d(r)))return r.v}return"function"==typeof e?e(u):m(e,t,u)};break;case/^#/.test(s):var o=s.substr(1);u=function(e){return e.attribs.id===o},c=function(e,t){if(a){var r=function(){var r=[];return v([e],function(e,t){u(e)&&(r.push(e),t())}),{v:r}}();if("object"===(void 0===r?"undefined":d(r)))return r.v}return"function"==typeof e?e(u):m(e,t,u)};break;case/\*/.test(s):u=function(e){return!0},c=function(e,t){if(a){var r=function(){var t=[];return v([e],function(e){return t.push(e)}),{v:t}}();if("object"===(void 0===r?"undefined":d(r)))return r.v}return"function"==typeof e?e(u):m(e,t,u)};break;default:u=function(e){return e.name===s},c=function(e,t){if(a){var r=function(){var t=[];return v([e],function(e){u(e)&&t.push(e)}),{v:t}}();if("object"===(void 0===r?"undefined":d(r)))return r.v}return"function"==typeof e?e(u):m(e,t,u)}}}(),!n)return c;var o=n.match(/-(child|type)\((\d+)\)$/),l=o[1],f=parseInt(o[2],10)-1,h=function(t){if(t){var e=t.parent.childTags;"type"===l&&(e=e.filter(u));var r=e.findIndex(function(e){return e===t});if(r===f)return!0}return!1};return function(e){var t=c(e);return a?t.reduce(function(e,t){return h(t)&&e.push(t),e},[]):h(t)&&t}})}(e=e.replace(/(>)(\S)/g,"$1 $2").trim()),t=i.shift(),n=i.length;return t(this).filter(function(e){for(var t=0;t<n;){if(!(e=i[t](e,r)))return!1;t+=1}return!0})});r.contains||(r.contains=function(r){var i=!1;return v([this],function(e,t){e===r&&(i=!0,t())}),i});return!0},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.getSingleSelector=l,t.getMultiSelector=f,t.default=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return!e.length||e.name?l(e,t):f(e,t)};var a=o(r(3)),n=o(r(5)),s=o(r(2)),u=r(0),c=r(1);function o(e){return e&&e.__esModule?e:{default:e}}function l(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(3===e.nodeType&&(e=e.parentNode),1!==e.nodeType)throw new Error('Invalid input - only HTMLElements or representations of them are supported! (not "'+(void 0===e?"undefined":i(e))+'")');(0,a.default)(e,t);var r=(0,n.default)(e,t);return(0,s.default)(r,e,t)}function f(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(Array.isArray(e)||(e=(0,u.convertNodeList)(e)),e.some(function(e){return 1!==e.nodeType}))throw new Error("Invalid input - only an Array of HTMLElements or representations of them is supported!");(0,a.default)(e[0],t);var r=l((0,c.getCommonAncestor)(e,t),t),i=function(e){var t=(0,c.getCommonProperties)(e),r=t.classes,i=t.attributes,n=t.tag,o=[];n&&o.push(n);if(r){var a=r.map(function(e){return"."+e}).join("");o.push(a)}if(i){var s=Object.keys(i).reduce(function(e,t){return e.push("["+t+'="'+i[t]+'"]'),e},[]).join("");o.push(s)}o.length;return[o.join("")]}(e)[0],n=(0,s.default)(r+" "+i,e,t),o=(0,u.convertNodeList)(document.querySelectorAll(n));return e.every(function(t){return o.some(function(e){return e===t})})?n:console.warn("\n The selected elements can't be efficiently mapped.\n Its probably best to use multiple single selectors instead!\n ",e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=t.root,i=void 0===r?document:r,n=t.skip,o=void 0===n?null:n,a=t.priority,s=void 0===a?["id","class","href","src"]:a,u=t.ignore,c=void 0===u?{}:u,l=[],f=e,h=l.length,d=!1,p=o&&(Array.isArray(o)?o:[o]).map(function(t){return"function"!=typeof t?function(e){return e===t}:t}),v=function(t){return o&&p.some(function(e){return e(t)})};Object.keys(c).forEach(function(e){"class"===e&&(d=!0);var r=c[e];"function"!=typeof r&&("number"==typeof r&&(r=r.toString()),"string"==typeof r&&(r=new RegExp((0,b.escapeValue)(r).replace(/\\/g,"\\\\"))),"boolean"==typeof r&&(r=r?/(?:)/:/.^/),c[e]=function(e,t){return r.test(t)})}),d&&function(){var i=c.attribute;c.attribute=function(e,t,r){return c.class(t)||i&&i(e,t,r)}}();for(;f!==i;){if(!0!==v(f)){if(y(s,f,c,l,i))break;if(g(f,c,l,i))break;y(s,f,c,l),l.length===h&&g(f,c,l),l.length===h&&_(s,f,c,l)}f=f.parentNode,h=l.length}if(f===i){var m=w(s,f,c);l.unshift(m)}return l.join(" ")};var b=r(0),h={attribute:function(e){return-1<["style","data-reactid","data-react-checksum"].indexOf(e)}};function y(e,t,r,i){var n=4<arguments.length&&void 0!==arguments[4]?arguments[4]:t.parentNode,o=a(e,t,r);if(o&&1===n.querySelectorAll(o).length)return i.unshift(o),!0;return!1}function a(n,e,t){for(var o=e.attributes,r=Object.keys(o).sort(function(e,t){var r=n.indexOf(o[e].name),i=n.indexOf(o[t].name);return-1===i?-1===r?0:-1:r-i}),i=0,a=r.length;i<a;i++){var s=r[i],u=o[s],c=u.name,l=(0,b.escapeValue)(u.value);if(!d(t[c]||t.attribute,c,l,h[c]||h.attribute)){var f="["+c+'="'+l+'"]';if(!1===/\b\d/.test(l))if("id"===c&&(f="#"+l),"class"===c)f="."+l.trim().replace(/\s+/g,".");return f}}return null}function g(e,t,r){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:e.parentNode,n=o(e,t);if(n&&1===i.getElementsByTagName(n).length)return r.unshift(n),!0;return!1}function o(e,t){var r=e.tagName.toLowerCase();return d(t.tag,null,r)?null:r}function _(e,t,r,i){for(var n=t.parentNode,o=n.childTags||n.children,a=0,s=o.length;a<s;a++){var u=o[a];if(u===t){var c=w(e,u,r);if(!c)return console.warn("\n Element couldn't be matched through strict ignore pattern!\n ",u,r,c);var l="> "+c+":nth-child("+(a+1)+")";return i.unshift(l),!0}}return!1}function w(e,t,r){var i=a(e,t,r);return i||(i=o(t,r)),i}function d(e,t,r,i){if(!r)return!0;var n=e||i;return!!n&&n(t,r,i)}e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.common=t.optimize=t.getMultiSelector=t.getSingleSelector=t.select=void 0;var i=r(4);Object.defineProperty(t,"getSingleSelector",{enumerable:!0,get:function(){return i.getSingleSelector}}),Object.defineProperty(t,"getMultiSelector",{enumerable:!0,get:function(){return i.getMultiSelector}});var n=s(i),o=s(r(2)),a=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(r(1));function s(e){return e&&e.__esModule?e:{default:e}}t.select=n.default,t.optimize=o.default,t.common=a,t.default=n.default}])}),function(o,n,e,f){"use strict";var a,s=["","webkit","Moz","MS","ms","o"],t=n.createElement("div"),r="function",u=Math.round,h=Math.abs,d=Date.now;function c(e,t,r){return setTimeout(y(e,r),t)}function i(e,t,r){return!!Array.isArray(e)&&(l(e,r[t],r),!0)}function l(e,t,r){var i;if(e)if(e.forEach)e.forEach(t,r);else if(e.length!==f)for(i=0;i<e.length;)t.call(r,e[i],i,e),i++;else for(i in e)e.hasOwnProperty(i)&&t.call(r,e[i],i,e)}function p(i,e,t){var n="DEPRECATED METHOD: "+e+"\n"+t+" AT \n";return function(){var e=new Error("get-stack-trace"),t=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=o.console&&(o.console.warn||o.console.log);return r&&r.call(o.console,n,t),i.apply(this,arguments)}}a="function"!=typeof Object.assign?function(e){if(e===f||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1;r<arguments.length;r++){var i=arguments[r];if(i!==f&&null!==i)for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])}return t}:Object.assign;var v=p(function(e,t,r){for(var i=Object.keys(t),n=0;n<i.length;)(!r||r&&e[i[n]]===f)&&(e[i[n]]=t[i[n]]),n++;return e},"extend","Use `assign`."),m=p(function(e,t){return v(e,t,!0)},"merge","Use `assign`.");function b(e,t,r){var i,n=t.prototype;(i=e.prototype=Object.create(n)).constructor=e,i._super=n,r&&a(i,r)}function y(e,t){return function(){return e.apply(t,arguments)}}function g(e,t){return typeof e==r?e.apply(t&&t[0]||f,t):e}function _(e,t){return e===f?t:e}function w(t,e,r){l(M(e),function(e){t.addEventListener(e,r,!1)})}function x(t,e,r){l(M(e),function(e){t.removeEventListener(e,r,!1)})}function T(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function S(e,t){return-1<e.indexOf(t)}function M(e){return e.trim().split(/\s+/g)}function P(e,t,r){if(e.indexOf&&!r)return e.indexOf(t);for(var i=0;i<e.length;){if(r&&e[i][r]==t||!r&&e[i]===t)return i;i++}return-1}function E(e){return Array.prototype.slice.call(e,0)}function k(e,r,t){for(var i=[],n=[],o=0;o<e.length;){var a=r?e[o][r]:e[o];P(n,a)<0&&i.push(e[o]),n[o]=a,o++}return t&&(i=r?i.sort(function(e,t){return e[r]>t[r]}):i.sort()),i}function C(e,t){for(var r,i,n=t[0].toUpperCase()+t.slice(1),o=0;o<s.length;){if((i=(r=s[o])?r+n:t)in e)return i;o++}return f}var A=1;function O(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||o}var I="ontouchstart"in o,R=C(o,"PointerEvent")!==f,D=I&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),L="touch",j="mouse",F=25,B=1,N=4,U=8,z=1,X=2,W=4,q=8,H=16,G=X|W,V=q|H,Y=G|V,J=["x","y"],K=["clientX","clientY"];function Z(t,e){var r=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){g(t.options.enable,[t])&&r.handler(e)},this.init()}function Q(e,t,r){var i=r.pointers.length,n=r.changedPointers.length,o=t&B&&i-n==0,a=t&(N|U)&&i-n==0;r.isFirst=!!o,r.isFinal=!!a,o&&(e.session={}),r.eventType=t,function(e,t){var r=e.session,i=t.pointers,n=i.length;r.firstInput||(r.firstInput=$(t));1<n&&!r.firstMultiple?r.firstMultiple=$(t):1===n&&(r.firstMultiple=!1);var o=r.firstInput,a=r.firstMultiple,s=a?a.center:o.center,u=t.center=ee(i);t.timeStamp=d(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=ne(s,u),t.distance=ie(s,u),function(e,t){var r=t.center,i=e.offsetDelta||{},n=e.prevDelta||{},o=e.prevInput||{};t.eventType!==B&&o.eventType!==N||(n=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=e.offsetDelta={x:r.x,y:r.y});t.deltaX=n.x+(r.x-i.x),t.deltaY=n.y+(r.y-i.y)}(r,t),t.offsetDirection=re(t.deltaX,t.deltaY);var c=te(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=c.x,t.overallVelocityY=c.y,t.overallVelocity=h(c.x)>h(c.y)?c.x:c.y,t.scale=a?function(e,t){return ie(t[0],t[1],K)/ie(e[0],e[1],K)}(a.pointers,i):1,t.rotation=a?function(e,t){return ne(t[1],t[0],K)+ne(e[1],e[0],K)}(a.pointers,i):0,t.maxPointers=r.prevInput?t.pointers.length>r.prevInput.maxPointers?t.pointers.length:r.prevInput.maxPointers:t.pointers.length,function(e,t){var r,i,n,o,a=e.lastInterval||t,s=t.timeStamp-a.timeStamp;if(t.eventType!=U&&(F<s||a.velocity===f)){var u=t.deltaX-a.deltaX,c=t.deltaY-a.deltaY,l=te(s,u,c);i=l.x,n=l.y,r=h(l.x)>h(l.y)?l.x:l.y,o=re(u,c),e.lastInterval=t}else r=a.velocity,i=a.velocityX,n=a.velocityY,o=a.direction;t.velocity=r,t.velocityX=i,t.velocityY=n,t.direction=o}(r,t);var l=e.element;T(t.srcEvent.target,l)&&(l=t.srcEvent.target);t.target=l}(e,r),e.emit("hammer.input",r),e.recognize(r),e.session.prevInput=r}function $(e){for(var t=[],r=0;r<e.pointers.length;)t[r]={clientX:u(e.pointers[r].clientX),clientY:u(e.pointers[r].clientY)},r++;return{timeStamp:d(),pointers:t,center:ee(t),deltaX:e.deltaX,deltaY:e.deltaY}}function ee(e){var t=e.length;if(1===t)return{x:u(e[0].clientX),y:u(e[0].clientY)};for(var r=0,i=0,n=0;n<t;)r+=e[n].clientX,i+=e[n].clientY,n++;return{x:u(r/t),y:u(i/t)}}function te(e,t,r){return{x:t/e||0,y:r/e||0}}function re(e,t){return e===t?z:h(e)>=h(t)?e<0?X:W:t<0?q:H}function ie(e,t,r){r||(r=J);var i=t[r[0]]-e[r[0]],n=t[r[1]]-e[r[1]];return Math.sqrt(i*i+n*n)}function ne(e,t,r){r||(r=J);var i=t[r[0]]-e[r[0]],n=t[r[1]]-e[r[1]];return 180*Math.atan2(n,i)/Math.PI}Z.prototype={handler:function(){},init:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(O(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&x(this.element,this.evEl,this.domHandler),this.evTarget&&x(this.target,this.evTarget,this.domHandler),this.evWin&&x(O(this.element),this.evWin,this.domHandler)}};var oe={mousedown:B,mousemove:2,mouseup:N},ae="mousedown",se="mousemove mouseup";function ue(){this.evEl=ae,this.evWin=se,this.pressed=!1,Z.apply(this,arguments)}b(ue,Z,{handler:function(e){var t=oe[e.type];t&B&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=N),this.pressed&&(t&N&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:j,srcEvent:e}))}});var ce={pointerdown:B,pointermove:2,pointerup:N,pointercancel:U,pointerout:U},le={2:L,3:"pen",4:j,5:"kinect"},fe="pointerdown",he="pointermove pointerup pointercancel";function de(){this.evEl=fe,this.evWin=he,Z.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}o.MSPointerEvent&&!o.PointerEvent&&(fe="MSPointerDown",he="MSPointerMove MSPointerUp MSPointerCancel"),b(de,Z,{handler:function(e){var t=this.store,r=!1,i=e.type.toLowerCase().replace("ms",""),n=ce[i],o=le[e.pointerType]||e.pointerType,a=o==L,s=P(t,e.pointerId,"pointerId");n&B&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):n&(N|U)&&(r=!0),s<0||(t[s]=e,this.callback(this.manager,n,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),r&&t.splice(s,1))}});var pe={touchstart:B,touchmove:2,touchend:N,touchcancel:U};function ve(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,Z.apply(this,arguments)}b(ve,Z,{handler:function(e){var t=pe[e.type];if(t===B&&(this.started=!0),this.started){var r=function(e,t){var r=E(e.touches),i=E(e.changedTouches);t&(N|U)&&(r=k(r.concat(i),"identifier",!0));return[r,i]}.call(this,e,t);t&(N|U)&&r[0].length-r[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:r[0],changedPointers:r[1],pointerType:L,srcEvent:e})}}});var me={touchstart:B,touchmove:2,touchend:N,touchcancel:U},be="touchstart touchmove touchend touchcancel";function ye(){this.evTarget=be,this.targetIds={},Z.apply(this,arguments)}b(ye,Z,{handler:function(e){var t=me[e.type],r=function(e,t){var r=E(e.touches),i=this.targetIds;if(t&(2|B)&&1===r.length)return i[r[0].identifier]=!0,[r,r];var n,o,a=E(e.changedTouches),s=[],u=this.target;if(o=r.filter(function(e){return T(e.target,u)}),t===B)for(n=0;n<o.length;)i[o[n].identifier]=!0,n++;n=0;for(;n<a.length;)i[a[n].identifier]&&s.push(a[n]),t&(N|U)&&delete i[a[n].identifier],n++;return s.length?[k(o.concat(s),"identifier",!0),s]:void 0}.call(this,e,t);r&&this.callback(this.manager,t,{pointers:r[0],changedPointers:r[1],pointerType:L,srcEvent:e})}});var ge=2500;function _e(){Z.apply(this,arguments);var e=y(this.handler,this);this.touch=new ye(this.manager,e),this.mouse=new ue(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function we(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var r={x:t.clientX,y:t.clientY};this.lastTouches.push(r);var i=this.lastTouches;setTimeout(function(){var e=i.indexOf(r);-1<e&&i.splice(e,1)},ge)}}b(_e,Z,{handler:function(e,t,r){var i=r.pointerType==L,n=r.pointerType==j;if(!(n&&r.sourceCapabilities&&r.sourceCapabilities.firesTouchEvents)){if(i)(function(e,t){e&B?(this.primaryTouch=t.changedPointers[0].identifier,we.call(this,t)):e&(N|U)&&we.call(this,t)}).call(this,t,r);else if(n&&function(e){for(var t=e.srcEvent.clientX,r=e.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var n=this.lastTouches[i],o=Math.abs(t-n.x),a=Math.abs(r-n.y);if(o<=25&&a<=25)return!0}return!1}.call(this,r))return;this.callback(e,t,r)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var xe=C(t.style,"touchAction"),Te=xe!==f,Se="compute",Me="manipulation",Pe="none",Ee="pan-x",ke="pan-y",Ce=function(){if(!Te)return!1;var t={},r=o.CSS&&o.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){t[e]=!r||o.CSS.supports("touch-action",e)}),t}();function Ae(e,t){this.manager=e,this.set(t)}Ae.prototype={set:function(e){e==Se&&(e=this.compute()),Te&&this.manager.element.style&&Ce[e]&&(this.manager.element.style[xe]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return l(this.manager.recognizers,function(e){g(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),function(e){if(S(e,Pe))return Pe;var t=S(e,Ee),r=S(e,ke);if(t&&r)return Pe;if(t||r)return t?Ee:ke;if(S(e,Me))return Me;return"auto"}(t.join(" "))},preventDefaults:function(e){var t=e.srcEvent,r=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var i=this.actions,n=S(i,Pe)&&!Ce[Pe],o=S(i,ke)&&!Ce[ke],a=S(i,Ee)&&!Ce[Ee];if(n){var s=1===e.pointers.length,u=e.distance<2,c=e.deltaTime<250;if(s&&u&&c)return}if(!a||!o)return n||o&&r&G||a&&r&V?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var Oe=1;function Ie(e){this.options=a({},this.defaults,e||{}),this.id=A++,this.manager=null,this.options.enable=_(this.options.enable,!0),this.state=Oe,this.simultaneous={},this.requireFail=[]}function Re(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}function De(e){return e==H?"down":e==q?"up":e==X?"left":e==W?"right":""}function Le(e,t){var r=t.manager;return r?r.get(e):e}function je(){Ie.apply(this,arguments)}function Fe(){je.apply(this,arguments),this.pX=null,this.pY=null}function Be(){je.apply(this,arguments)}function Ne(){Ie.apply(this,arguments),this._timer=null,this._input=null}function Ue(){je.apply(this,arguments)}function ze(){je.apply(this,arguments)}function Xe(){Ie.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function We(e,t){return(t=t||{}).recognizers=_(t.recognizers,We.defaults.preset),new qe(e,t)}Ie.prototype={defaults:{},set:function(e){return a(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(i(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=Le(e,this)).id]||(t[e.id]=e).recognizeWith(this),this},dropRecognizeWith:function(e){return i(e,"dropRecognizeWith",this)||(e=Le(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(i(e,"requireFailure",this))return this;var t=this.requireFail;return-1===P(t,e=Le(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(i(e,"dropRequireFailure",this))return this;e=Le(e,this);var t=P(this.requireFail,e);return-1<t&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return 0<this.requireFail.length},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(t){var r=this,e=this.state;function i(e){r.manager.emit(e,t)}e<8&&i(r.options.event+Re(e)),i(r.options.event),t.additionalEvent&&i(t.additionalEvent),8<=e&&i(r.options.event+Re(e))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=32},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(32|Oe)))return!1;e++}return!0},recognize:function(e){var t=a({},e);if(!g(this.options.enable,[this,t]))return this.reset(),void(this.state=32);56&this.state&&(this.state=Oe),this.state=this.process(t),30&this.state&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},b(je,Ie,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,r=e.eventType,i=6&t,n=this.attrTest(e);return i&&(r&U||!n)?16|t:i||n?r&N?8|t:2&t?4|t:2:32}}),b(Fe,je,{defaults:{event:"pan",threshold:10,pointers:1,direction:Y},getTouchAction:function(){var e=this.options.direction,t=[];return e&G&&t.push(ke),e&V&&t.push(Ee),t},directionTest:function(e){var t=this.options,r=!0,i=e.distance,n=e.direction,o=e.deltaX,a=e.deltaY;return n&t.direction||(i=t.direction&G?(n=0===o?z:o<0?X:W,r=o!=this.pX,Math.abs(e.deltaX)):(n=0===a?z:a<0?q:H,r=a!=this.pY,Math.abs(e.deltaY))),e.direction=n,r&&i>t.threshold&&n&t.direction},attrTest:function(e){return je.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=De(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),b(Be,je,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Pe]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),b(Ne,Ie,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(e){var t=this.options,r=e.pointers.length===t.pointers,i=e.distance<t.threshold,n=e.deltaTime>t.time;if(this._input=e,!i||!r||e.eventType&(N|U)&&!n)this.reset();else if(e.eventType&B)this.reset(),this._timer=c(function(){this.state=8,this.tryEmit()},t.time,this);else if(e.eventType&N)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&e.eventType&N?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))}}),b(Ue,je,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Pe]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),b(ze,je,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:G|V,pointers:1},getTouchAction:function(){return Fe.prototype.getTouchAction.call(this)},attrTest:function(e){var t,r=this.options.direction;return r&(G|V)?t=e.overallVelocity:r&G?t=e.overallVelocityX:r&V&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&r&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&h(t)>this.options.velocity&&e.eventType&N},emit:function(e){var t=De(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),b(Xe,Ie,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Me]},process:function(e){var t=this.options,r=e.pointers.length===t.pointers,i=e.distance<t.threshold,n=e.deltaTime<t.time;if(this.reset(),e.eventType&B&&0===this.count)return this.failTimeout();if(i&&n&&r){if(e.eventType!=N)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<t.interval,a=!this.pCenter||ie(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,a&&o?this.count+=1:this.count=1,this._input=e,0==this.count%t.taps)return this.hasRequireFailures()?(this._timer=c(function(){this.state=8,this.tryEmit()},t.interval,this),2):8}return 32},failTimeout:function(){return this._timer=c(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),We.VERSION="2.0.7",We.defaults={domEvents:!1,touchAction:Se,enable:!0,inputTarget:null,inputClass:null,preset:[[Ue,{enable:!1}],[Be,{enable:!1},["rotate"]],[ze,{direction:G}],[Fe,{direction:G},["swipe"]],[Xe],[Xe,{event:"doubletap",taps:2},["tap"]],[Ne]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function qe(e,t){this.options=a({},We.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=function(e){var t=e.options.inputClass;return new(t||(R?de:D?ye:I?_e:ue))(e,Q)}(this),this.touchAction=new Ae(this,this.options.touchAction),He(this,!0),l(this.options.recognizers,function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}function He(r,i){var n,o=r.element;o.style&&(l(r.options.cssProps,function(e,t){n=C(o.style,t),i?(r.oldCssProps[n]=o.style[n],o.style[n]=e):o.style[n]=r.oldCssProps[n]||""}),i||(r.oldCssProps={}))}qe.prototype={set:function(e){return a(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){var r;this.touchAction.preventDefaults(e);var i=this.recognizers,n=t.curRecognizer;(!n||n&&8&n.state)&&(n=t.curRecognizer=null);for(var o=0;o<i.length;)r=i[o],2===t.stopped||n&&r!=n&&!r.canRecognizeWith(n)?r.reset():r.recognize(e),!n&&14&r.state&&(n=t.curRecognizer=r),o++}},get:function(e){if(e instanceof Ie)return e;for(var t=this.recognizers,r=0;r<t.length;r++)if(t[r].options.event==e)return t[r];return null},add:function(e){if(i(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),(e.manager=this).touchAction.update(),e},remove:function(e){if(i(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,r=P(t,e);-1!==r&&(t.splice(r,1),this.touchAction.update())}return this},on:function(e,t){if(e!==f&&t!==f){var r=this.handlers;return l(M(e),function(e){r[e]=r[e]||[],r[e].push(t)}),this}},off:function(e,t){if(e!==f){var r=this.handlers;return l(M(e),function(e){t?r[e]&&r[e].splice(P(r[e],t),1):delete r[e]}),this}},emit:function(e,t){this.options.domEvents&&function(e,t){var r=n.createEvent("Event");r.initEvent(e,!0,!0),(r.gesture=t).target.dispatchEvent(r)}(e,t);var r=this.handlers[e]&&this.handlers[e].slice();if(r&&r.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var i=0;i<r.length;)r[i](t),i++}},destroy:function(){this.element&&He(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},a(We,{INPUT_START:B,INPUT_MOVE:2,INPUT_END:N,INPUT_CANCEL:U,STATE_POSSIBLE:Oe,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:32,DIRECTION_NONE:z,DIRECTION_LEFT:X,DIRECTION_RIGHT:W,DIRECTION_UP:q,DIRECTION_DOWN:H,DIRECTION_HORIZONTAL:G,DIRECTION_VERTICAL:V,DIRECTION_ALL:Y,Manager:qe,Input:Z,TouchAction:Ae,TouchInput:ye,MouseInput:ue,PointerEventInput:de,TouchMouseInput:_e,SingleTouchInput:ve,Recognizer:Ie,AttrRecognizer:je,Tap:Xe,Pan:Fe,Swipe:ze,Pinch:Be,Rotate:Ue,Press:Ne,on:w,off:x,each:l,merge:m,extend:v,assign:a,inherit:b,bindFn:y,prefixed:C}),(void 0!==o?o:"undefined"!=typeof self?self:{}).Hammer=We,"function"==typeof define&&define.amd?define(function(){return We}):"undefined"!=typeof module&&module.exports?module.exports=We:o.Hammer=We}(window,document),function(e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():window.propagating=e()}(function(){var l=null;return function i(n,e){var o=e||{preventDefault:!1};if(n.Manager){var a=n,t=function(e,t){var r=Object.create(o);return t&&a.assign(r,t),i(new a(e,r),r)};return a.assign(t,a),t.Manager=function(e,t){var r=Object.create(o);return t&&a.assign(r,t),i(new a.Manager(e,r),r)},t}var s=Object.create(n),r=n.element;function u(e){return e.match(/[^ ]+/g)}function c(e){if("hammer.input"!==e.type){if(e.srcEvent._handled||(e.srcEvent._handled={}),e.srcEvent._handled[e.type])return;e.srcEvent._handled[e.type]=!0}var t=!1;e.stopPropagation=function(){t=!0};var r=e.srcEvent.stopPropagation.bind(e.srcEvent);"function"==typeof r&&(e.srcEvent.stopPropagation=function(){r(),e.stopPropagation()});for(var i=e.firstTarget=l;i&&!t;){var n=i.hammer;if(n)for(var o,a=0;a<n.length;a++)if(o=n[a]._handlers[e.type])for(var s=0;s<o.length&&!t;s++)o[s](e);i=i.parentNode}}return r.hammer||(r.hammer=[]),r.hammer.push(s),n.on("hammer.input",function(e){!0!==o.preventDefault&&o.preventDefault!==e.pointerType||e.preventDefault(),e.isFirst&&(l=e.target)}),s._handlers={},s.on=function(e,r){return u(e).forEach(function(e){var t=s._handlers[e];t||(s._handlers[e]=t=[],n.on(e,c)),t.push(r)}),s},s.off=function(e,r){return u(e).forEach(function(e){var t=s._handlers[e];t&&(0<(t=r?t.filter(function(e){return e!==r}):[]).length?s._handlers[e]=t:(n.off(e,c),delete s._handlers[e]))}),s},s.emit=function(e,t){l=t.target,n.emit(e,t)},s.destroy=function(){var e=n.element.hammer,t=e.indexOf(s);-1!==t&&e.splice(t,1),e.length||delete n.element.hammer,s._handlers={},n.destroy()},s}}),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).PIXI=e()}}(function(){return function o(a,s,u){function c(r,e){if(!s[r]){if(!a[r]){var t="function"==typeof require&&require;if(!e&&t)return t(r,!0);if(l)return l(r,!0);var i=new Error("Cannot find module '"+r+"'");throw i.code="MODULE_NOT_FOUND",i}var n=s[r]={exports:{}};a[r][0].call(n.exports,function(e){var t=a[r][1][e];return c(t||e)},n,n.exports,o,a,s,u)}return s[r].exports}for(var l="function"==typeof require&&require,e=0;e<u.length;e++)c(u[e]);return c}({1:[function(e,t,r){"use strict";function i(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(e){return(0<e)-(e<0)},r.abs=function(e){var t=e>>31;return(e^t)-t},r.min=function(e,t){return t^(e^t)&-(e<t)},r.max=function(e,t){return e^(e^t)&-(e<t)},r.isPow2=function(e){return!(e&e-1||!e)},r.log2=function(e){var t,r;return t=(65535<e)<<4,t|=r=(255<(e>>>=t))<<3,t|=r=(15<(e>>>=r))<<2,(t|=r=(3<(e>>>=r))<<1)|(e>>>=r)>>1},r.log10=function(e){return 1e9<=e?9:1e8<=e?8:1e7<=e?7:1e6<=e?6:1e5<=e?5:1e4<=e?4:1e3<=e?3:100<=e?2:10<=e?1:0},r.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},r.countTrailingZeros=i,r.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1},r.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},r.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var n=new Array(256);!function(e){for(var t=0;t<256;++t){var r=t,i=t,n=7;for(r>>>=1;r;r>>>=1)i<<=1,i|=1&r,--n;e[t]=i<<n&255}}(n),r.reverse=function(e){return n[255&e]<<24|n[e>>>8&255]<<16|n[e>>>16&255]<<8|n[e>>>24&255]},r.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},r.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},r.interleave3=function(e,t,r){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},r.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},r.nextCombination=function(e){var t=e|e-1;return 1+t|(~t&-~t)-1>>>i(e)+1}},{}],2:[function(e,t,r){"use strict";function i(e,t,r){r=r||2;var i,n,o,a,s,u,c,l=t&&t.length,f=l?t[0]*r:e.length,h=v(e,0,f,r,!0),d=[];if(!h||h.next===h.prev)return d;if(l&&(h=function(e,t,r,i){var n,o,a,s,u,c=[];for(n=0,o=t.length;n<o;n++)a=t[n]*i,s=n<o-1?t[n+1]*i:e.length,(u=v(e,a,s,i,!1))===u.next&&(u.steiner=!0),c.push(w(u));for(c.sort(y),n=0;n<c.length;n++)g(c[n],r),r=m(r,r.next);return r}(e,t,h,r)),e.length>80*r){i=o=e[0],n=a=e[1];for(var p=r;p<f;p+=r)(s=e[p])<i&&(i=s),(u=e[p+1])<n&&(n=u),o<s&&(o=s),a<u&&(a=u);c=0!==(c=Math.max(o-i,a-n))?1/c:0}return b(h,d,r,i,n,c),d}function v(e,t,r,i,n){var o,a;if(n===0<E(e,t,r,i))for(o=t;o<r;o+=i)a=u(o,e[o],e[o+1],a);else for(o=r-i;t<=o;o-=i)a=u(o,e[o],e[o+1],a);return a&&s(a,a.next)&&(P(a),a=a.next),a}function m(e,t){if(!e)return e;t||(t=e);var r,i=e;do{if(r=!1,i.steiner||!s(i,i.next)&&0!==T(i.prev,i,i.next))i=i.next;else{if(P(i),(i=t=i.prev)===i.next)break;r=!0}}while(r||i!==t);return t}function b(e,t,r,i,n,o,a){if(e){!a&&o&&function(e,t,r,i){var n=e;for(;null===n.z&&(n.z=_(n.x,n.y,t,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next,n!==e;);n.prevZ.nextZ=null,n.prevZ=null,function(e){var t,r,i,n,o,a,s,u,c=1;do{for(r=e,o=e=null,a=0;r;){for(a++,i=r,t=s=0;t<c&&(s++,i=i.nextZ);t++);for(u=c;0<s||0<u&&i;)0!==s&&(0===u||!i||r.z<=i.z)?(r=(n=r).nextZ,s--):(i=(n=i).nextZ,u--),o?o.nextZ=n:e=n,n.prevZ=o,o=n;r=i}o.nextZ=null,c*=2}while(1<a)}(n)}(e,i,n,o);for(var s,u,c=e;e.prev!==e.next;)if(s=e.prev,u=e.next,o?f(e,i,n,o):l(e))t.push(s.i/r),t.push(e.i/r),t.push(u.i/r),P(e),e=u.next,c=u.next;else if((e=u)===c){a?1===a?b(e=h(e,t,r),t,r,i,n,o,2):2===a&&d(e,t,r,i,n,o):b(m(e),t,r,i,n,o,1);break}}}function l(e){var t=e.prev,r=e,i=e.next;if(0<=T(t,r,i))return!1;for(var n=e.next.next;n!==e.prev;){if(x(t.x,t.y,r.x,r.y,i.x,i.y,n.x,n.y)&&0<=T(n.prev,n,n.next))return!1;n=n.next}return!0}function f(e,t,r,i){var n=e.prev,o=e,a=e.next;if(0<=T(n,o,a))return!1;for(var s=n.x<o.x?n.x<a.x?n.x:a.x:o.x<a.x?o.x:a.x,u=n.y<o.y?n.y<a.y?n.y:a.y:o.y<a.y?o.y:a.y,c=n.x>o.x?n.x>a.x?n.x:a.x:o.x>a.x?o.x:a.x,l=n.y>o.y?n.y>a.y?n.y:a.y:o.y>a.y?o.y:a.y,f=_(s,u,t,r,i),h=_(c,l,t,r,i),d=e.prevZ,p=e.nextZ;d&&d.z>=f&&p&&p.z<=h;){if(d!==e.prev&&d!==e.next&&x(n.x,n.y,o.x,o.y,a.x,a.y,d.x,d.y)&&0<=T(d.prev,d,d.next))return!1;if(d=d.prevZ,p!==e.prev&&p!==e.next&&x(n.x,n.y,o.x,o.y,a.x,a.y,p.x,p.y)&&0<=T(p.prev,p,p.next))return!1;p=p.nextZ}for(;d&&d.z>=f;){if(d!==e.prev&&d!==e.next&&x(n.x,n.y,o.x,o.y,a.x,a.y,d.x,d.y)&&0<=T(d.prev,d,d.next))return!1;d=d.prevZ}for(;p&&p.z<=h;){if(p!==e.prev&&p!==e.next&&x(n.x,n.y,o.x,o.y,a.x,a.y,p.x,p.y)&&0<=T(p.prev,p,p.next))return!1;p=p.nextZ}return!0}function h(e,t,r){var i=e;do{var n=i.prev,o=i.next.next;!s(n,o)&&p(n,i,i.next,o)&&S(n,o)&&S(o,n)&&(t.push(n.i/r),t.push(i.i/r),t.push(o.i/r),P(i),P(i.next),i=e=o),i=i.next}while(i!==e);return i}function d(e,t,r,i,n,o){var a,s,u=e;do{for(var c=u.next.next;c!==u.prev;){if(u.i!==c.i&&(s=c,(a=u).next.i!==s.i&&a.prev.i!==s.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&p(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(a,s)&&S(a,s)&&S(s,a)&&function(e,t){var r=e,i=!1,n=(e.x+t.x)/2,o=(e.y+t.y)/2;for(;r.y>o!=r.next.y>o&&r.next.y!==r.y&&n<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next,r!==e;);return i}(a,s))){var l=M(u,c);return u=m(u,u.next),l=m(l,l.next),b(u,t,r,i,n,o),void b(l,t,r,i,n,o)}c=c.next}u=u.next}while(u!==e)}function y(e,t){return e.x-t.x}function g(e,t){if(t=function(e,t){var r,i=t,n=e.x,o=e.y,a=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=n&&a<s){if((a=s)===n){if(o===i.y)return i;if(o===i.next.y)return i.next}r=i.x<i.next.x?i:i.next}}i=i.next}while(i!==t);if(!r)return null;if(n===a)return r.prev;var u,c=r,l=r.x,f=r.y,h=1/0;i=r.next;for(;i!==c;)n>=i.x&&i.x>=l&&n!==i.x&&x(o<f?n:a,o,l,f,o<f?a:n,o,i.x,i.y)&&((u=Math.abs(o-i.y)/(n-i.x))<h||u===h&&i.x>r.x)&&S(i,e)&&(r=i,h=u),i=i.next;return r}(e,t)){var r=M(t,e);m(r,r.next)}}function _(e,t,r,i,n){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*n)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*n)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function w(e){for(var t=e,r=e;t.x<r.x&&(r=t),(t=t.next)!==e;);return r}function x(e,t,r,i,n,o,a,s){return 0<=(n-a)*(t-s)-(e-a)*(o-s)&&0<=(e-a)*(i-s)-(r-a)*(t-s)&&0<=(r-a)*(o-s)-(n-a)*(i-s)}function T(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function s(e,t){return e.x===t.x&&e.y===t.y}function p(e,t,r,i){return!!(s(e,t)&&s(r,i)||s(e,i)&&s(r,t))||0<T(e,t,r)!=0<T(e,t,i)&&0<T(r,i,e)!=0<T(r,i,t)}function S(e,t){return T(e.prev,e,e.next)<0?0<=T(e,t,e.next)&&0<=T(e,e.prev,t):T(e,t,e.prev)<0||T(e,e.next,t)<0}function M(e,t){var r=new a(e.i,e.x,e.y),i=new a(t.i,t.x,t.y),n=e.next,o=t.prev;return(e.next=t).prev=e,(r.next=n).prev=r,(i.next=r).prev=i,(o.next=i).prev=o,i}function u(e,t,r,i){var n=new a(e,t,r);return i?(n.next=i.next,(n.prev=i).next.prev=n,i.next=n):(n.prev=n).next=n,n}function P(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function a(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function E(e,t,r,i){for(var n=0,o=t,a=r-i;o<r;o+=i)n+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return n}t.exports=i,(t.exports.default=i).deviation=function(e,t,r,i){var n=t&&t.length,o=n?t[0]*r:e.length,a=Math.abs(E(e,0,o,r));if(n)for(var s=0,u=t.length;s<u;s++){var c=t[s]*r,l=s<u-1?t[s+1]*r:e.length;a-=Math.abs(E(e,c,l,r))}var f=0;for(s=0;s<i.length;s+=3){var h=i[s]*r,d=i[s+1]*r,p=i[s+2]*r;f+=Math.abs((e[h]-e[p])*(e[1+d]-e[1+h])-(e[h]-e[d])*(e[1+p]-e[1+h]))}return 0===a&&0===f?0:Math.abs((f-a)/a)},i.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},i=0,n=0;n<e.length;n++){for(var o=0;o<e[n].length;o++)for(var a=0;a<t;a++)r.vertices.push(e[n][o][a]);0<n&&(i+=e[n-1].length,r.holes.push(i))}return r}},{}],3:[function(e,t,r){"use strict";var i=Object.prototype.hasOwnProperty,d="~";function c(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function n(){this._events=new c,this._eventsCount=0}Object.create&&(c.prototype=Object.create(null),(new c).__proto__||(d=!1)),n.prototype.eventNames=function(){var e,t,r=[];if(0===this._eventsCount)return r;for(t in e=this._events)i.call(e,t)&&r.push(d?t.slice(1):t);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},n.prototype.listeners=function(e,t){var r=d?d+e:e,i=this._events[r];if(t)return!!i;if(!i)return[];if(i.fn)return[i.fn];for(var n=0,o=i.length,a=new Array(o);n<o;n++)a[n]=i[n].fn;return a},n.prototype.emit=function(e,t,r,i,n,o){var a=d?d+e:e;if(!this._events[a])return!1;var s,u,c=this._events[a],l=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,i),!0;case 5:return c.fn.call(c.context,t,r,i,n),!0;case 6:return c.fn.call(c.context,t,r,i,n,o),!0}for(u=1,s=new Array(l-1);u<l;u++)s[u-1]=arguments[u];c.fn.apply(c.context,s)}else{var f,h=c.length;for(u=0;u<h;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),l){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,r);break;case 4:c[u].fn.call(c[u].context,t,r,i);break;default:if(!s)for(f=1,s=new Array(l-1);f<l;f++)s[f-1]=arguments[f];c[u].fn.apply(c[u].context,s)}}return!0},n.prototype.on=function(e,t,r){var i=new o(t,r||this),n=d?d+e:e;return this._events[n]?this._events[n].fn?this._events[n]=[this._events[n],i]:this._events[n].push(i):(this._events[n]=i,this._eventsCount++),this},n.prototype.once=function(e,t,r){var i=new o(t,r||this,!0),n=d?d+e:e;return this._events[n]?this._events[n].fn?this._events[n]=[this._events[n],i]:this._events[n].push(i):(this._events[n]=i,this._eventsCount++),this},n.prototype.removeListener=function(e,t,r,i){var n=d?d+e:e;if(!this._events[n])return this;if(!t)return 0==--this._eventsCount?this._events=new c:delete this._events[n],this;var o=this._events[n];if(o.fn)o.fn!==t||i&&!o.once||r&&o.context!==r||(0==--this._eventsCount?this._events=new c:delete this._events[n]);else{for(var a=0,s=[],u=o.length;a<u;a++)(o[a].fn!==t||i&&!o[a].once||r&&o[a].context!==r)&&s.push(o[a]);s.length?this._events[n]=1===s.length?s[0]:s:0==--this._eventsCount?this._events=new c:delete this._events[n]}return this},n.prototype.removeAllListeners=function(e){var t;return e?(t=d?d+e:e,this._events[t]&&(0==--this._eventsCount?this._events=new c:delete this._events[t])):(this._events=new c,this._eventsCount=0),this},n.prototype.off=n.prototype.removeListener,n.prototype.addListener=n.prototype.on,n.prototype.setMaxListeners=function(){return this},n.prefixed=d,n.EventEmitter=n,void 0!==t&&(t.exports=n)},{}],4:[function(e,r,t){!function(e){var n=/iPhone/i,o=/iPod/i,a=/iPad/i,s=/\bAndroid(?:.+)Mobile\b/i,u=/Android/i,c=/\bAndroid(?:.+)SD4930UR\b/i,l=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,f=/Windows Phone/i,h=/\bWindows(?:.+)ARM\b/i,d=/BlackBerry/i,p=/BB10/i,v=/Opera Mini/i,m=/\b(CriOS|Chrome)(?:.+)Mobile/i,b=/\Mobile(?:.+)Firefox\b/i;function y(e,t){return e.test(t)}function t(e){var t=e||("undefined"!=typeof navigator?navigator.userAgent:""),r=t.split("[FBAN");void 0!==r[1]&&(t=r[0]),void 0!==(r=t.split("Twitter"))[1]&&(t=r[0]);var i={apple:{phone:y(n,t)&&!y(f,t),ipod:y(o,t),tablet:!y(n,t)&&y(a,t)&&!y(f,t),device:(y(n,t)||y(o,t)||y(a,t))&&!y(f,t)},amazon:{phone:y(c,t),tablet:!y(c,t)&&y(l,t),device:y(c,t)||y(l,t)},android:{phone:!y(f,t)&&y(c,t)||!y(f,t)&&y(s,t),tablet:!y(f,t)&&!y(c,t)&&!y(s,t)&&(y(l,t)||y(u,t)),device:!y(f,t)&&(y(c,t)||y(l,t)||y(s,t)||y(u,t))},windows:{phone:y(f,t),tablet:y(h,t),device:y(f,t)||y(h,t)},other:{blackberry:y(d,t),blackberry10:y(p,t),opera:y(v,t),firefox:y(b,t),chrome:y(m,t),device:y(d,t)||y(p,t)||y(v,t)||y(b,t)||y(m,t)}};return i.any=i.apple.device||i.android.device||i.windows.device||i.other.device,i.phone=i.apple.phone||i.android.phone||i.windows.phone,i.tablet=i.apple.tablet||i.android.tablet||i.windows.tablet,i}void 0!==r&&r.exports&&"undefined"==typeof window?r.exports=t:void 0!==r&&r.exports&&"undefined"!=typeof window?r.exports=t():e.isMobile=t()}(this)},{}],5:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function i(e,t,r){void 0===t&&(t=!1),o(this,i),this._fn=e,this._once=t,this._thisArg=r,this._next=this._prev=this._owner=null}return n(i,[{key:"detach",value:function(){return null!==this._owner&&(this._owner.detach(this),!0)}}]),i}();function a(e,t){return e._head?(e._tail._next=t)._prev=e._tail:e._head=t,(e._tail=t)._owner=e,t}var s=function(){function e(){o(this,e),this._head=this._tail=void 0}return n(e,[{key:"handlers",value:function(){var e=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],t=this._head;if(e)return!!t;for(var r=[];t;)r.push(t),t=t._next;return r}},{key:"has",value:function(e){if(!(e instanceof i))throw new Error("MiniSignal#has(): First arg must be a MiniSignalBinding object.");return e._owner===this}},{key:"dispatch",value:function(){var e=this._head;if(!e)return!1;for(;e;)e._once&&this.detach(e),e._fn.apply(e._thisArg,arguments),e=e._next;return!0}},{key:"add",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if("function"!=typeof e)throw new Error("MiniSignal#add(): First arg must be a Function.");return a(this,new i(e,!1,t))}},{key:"once",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if("function"!=typeof e)throw new Error("MiniSignal#once(): First arg must be a Function.");return a(this,new i(e,!0,t))}},{key:"detach",value:function(e){if(!(e instanceof i))throw new Error("MiniSignal#detach(): First arg must be a MiniSignalBinding object.");return e._owner!==this||(e._prev&&(e._prev._next=e._next),e._next&&(e._next._prev=e._prev),e===this._head?(this._head=e._next,null===e._next&&(this._tail=null)):e===this._tail&&(this._tail=e._prev,this._tail._next=null),e._owner=null),this}},{key:"detachAll",value:function(){var e=this._head;if(!e)return this;for(this._head=this._tail=null;e;)e._owner=null,e=e._next;return this}}]),e}();s.MiniSignalBinding=i,r.default=s,t.exports=r.default},{}],6:[function(e,t,r){"use strict";var u=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(e){i[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,i,n=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),o=1;o<arguments.length;o++){for(var a in r=Object(arguments[o]))c.call(r,a)&&(n[a]=r[a]);if(u){i=u(r);for(var s=0;s<i.length;s++)l.call(r,i[s])&&(n[i[s]]=r[i[s]])}}return n}},{}],7:[function(e,t,r){"use strict";t.exports=function(e,t){t=t||{};for(var i={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},r=i.parser[t.strictMode?"strict":"loose"].exec(e),n={},o=14;o--;)n[i.key[o]]=r[o]||"";return n[i.q.name]={},n[i.key[12]].replace(i.q.parser,function(e,t,r){t&&(n[i.q.name][t]=r)}),n}},{}],8:[function(e,t,c){(function(n){function o(e,t){for(var r=0,i=e.length-1;0<=i;i--){var n=e[i];"."===n?e.splice(i,1):".."===n?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a=function(e){return t.exec(e).slice(1)};function s(e,t){if(e.filter)return e.filter(t);for(var r=[],i=0;i<e.length;i++)t(e[i],i,e)&&r.push(e[i]);return r}c.resolve=function(){for(var e="",t=!1,r=arguments.length-1;-1<=r&&!t;r--){var i=0<=r?arguments[r]:n.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");i&&(e=i+"/"+e,t="/"===i.charAt(0))}return(t?"/":"")+(e=o(s(e.split("/"),function(e){return!!e}),!t).join("/"))||"."},c.normalize=function(e){var t=c.isAbsolute(e),r="/"===i(e,-1);return(e=o(s(e.split("/"),function(e){return!!e}),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},c.isAbsolute=function(e){return"/"===e.charAt(0)},c.join=function(){var e=Array.prototype.slice.call(arguments,0);return c.normalize(s(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},c.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;0<=r&&""===e[r];r--);return r<t?[]:e.slice(t,r-t+1)}e=c.resolve(e).substr(1),t=c.resolve(t).substr(1);for(var i=r(e.split("/")),n=r(t.split("/")),o=Math.min(i.length,n.length),a=o,s=0;s<o;s++)if(i[s]!==n[s]){a=s;break}var u=[];for(s=a;s<i.length;s++)u.push("..");return(u=u.concat(n.slice(a))).join("/")},c.sep="/",c.delimiter=":",c.dirname=function(e){var t=a(e),r=t[0],i=t[1];return r||i?(i&&(i=i.substr(0,i.length-1)),r+i):"."},c.basename=function(e,t){var r=a(e)[2];return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},c.extname=function(e){return a(e)[3]};var i="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,e("_process"))},{_process:26}],9:[function(e,t,r){var n=new ArrayBuffer(0),o=function(e,t,r,i){this.gl=e,this.buffer=e.createBuffer(),this.type=t||e.ARRAY_BUFFER,this.drawType=i||e.STATIC_DRAW,this.data=n,r&&this.upload(r),this._updateID=0};o.prototype.upload=function(e,t,r){r||this.bind();var i=this.gl;e=e||this.data,t=t||0,this.data.byteLength>=e.byteLength?i.bufferSubData(this.type,t,e):i.bufferData(this.type,e,this.drawType),this.data=e},o.prototype.bind=function(){this.gl.bindBuffer(this.type,this.buffer)},o.createVertexBuffer=function(e,t,r){return new o(e,e.ARRAY_BUFFER,t,r)},o.createIndexBuffer=function(e,t,r){return new o(e,e.ELEMENT_ARRAY_BUFFER,t,r)},o.create=function(e,t,r,i){return new o(e,t,r,i)},o.prototype.destroy=function(){this.gl.deleteBuffer(this.buffer)},t.exports=o},{}],10:[function(e,t,r){var a=e("./GLTexture"),s=function(e,t,r){this.gl=e,this.framebuffer=e.createFramebuffer(),this.stencil=null,this.texture=null,this.width=t||100,this.height=r||100};s.prototype.enableTexture=function(e){var t=this.gl;this.texture=e||new a(t),this.texture.bind(),this.bind(),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,this.texture.texture,0)},s.prototype.enableStencil=function(){if(!this.stencil){var e=this.gl;this.stencil=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,this.stencil),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,this.stencil),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,this.width,this.height)}},s.prototype.clear=function(e,t,r,i){this.bind();var n=this.gl;n.clearColor(e,t,r,i),n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT)},s.prototype.bind=function(){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer)},s.prototype.unbind=function(){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,null)},s.prototype.resize=function(e,t){var r=this.gl;this.width=e,this.height=t,this.texture&&this.texture.uploadData(null,e,t),this.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,this.stencil),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,e,t))},s.prototype.destroy=function(){var e=this.gl;this.texture&&this.texture.destroy(),e.deleteFramebuffer(this.framebuffer),this.gl=null,this.stencil=null,this.texture=null},s.createRGBA=function(e,t,r,i){var n=a.fromData(e,null,t,r);n.enableNearestScaling(),n.enableWrapClamp();var o=new s(e,t,r);return o.enableTexture(n),o.unbind(),o},s.createFloat32=function(e,t,r,i){var n=new a.fromData(e,i,t,r);n.enableNearestScaling(),n.enableWrapClamp();var o=new s(e,t,r);return o.enableTexture(n),o.unbind(),o},t.exports=s},{"./GLTexture":12}],11:[function(e,t,r){var o=e("./shader/compileProgram"),a=e("./shader/extractAttributes"),s=e("./shader/extractUniforms"),u=e("./shader/setPrecision"),c=e("./shader/generateUniformAccessObject"),i=function(e,t,r,i,n){this.gl=e,i&&(t=u(t,i),r=u(r,i)),this.program=o(e,t,r,n),this.attributes=a(e,this.program),this.uniformData=s(e,this.program),this.uniforms=c(e,this.uniformData)};i.prototype.bind=function(){return this.gl.useProgram(this.program),this},i.prototype.destroy=function(){this.attributes=null,this.uniformData=null,this.uniforms=null,this.gl.deleteProgram(this.program)},t.exports=i},{"./shader/compileProgram":17,"./shader/extractAttributes":19,"./shader/extractUniforms":20,"./shader/generateUniformAccessObject":21,"./shader/setPrecision":25}],12:[function(e,t,r){var o=function(e,t,r,i,n){this.gl=e,this.texture=e.createTexture(),this.mipmap=!1,this.premultiplyAlpha=!1,this.width=t||-1,this.height=r||-1,this.format=i||e.RGBA,this.type=n||e.UNSIGNED_BYTE},n=!(o.prototype.upload=function(e){this.bind();var t=this.gl;t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha);var r=e.videoWidth||e.width,i=e.videoHeight||e.height;i!==this.height||r!==this.width?t.texImage2D(t.TEXTURE_2D,0,this.format,this.format,this.type,e):t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.format,this.type,e),this.width=r,this.height=i});o.prototype.uploadData=function(e,t,r){this.bind();var i=this.gl;if(e instanceof Float32Array){if(!n){if(!i.getExtension("OES_texture_float"))throw new Error("floating point textures not available");n=!0}this.type=i.FLOAT}else this.type=this.type||i.UNSIGNED_BYTE;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),t!==this.width||r!==this.height?i.texImage2D(i.TEXTURE_2D,0,this.format,t,r,0,this.format,this.type,e||null):i.texSubImage2D(i.TEXTURE_2D,0,0,0,t,r,this.format,this.type,e||null),this.width=t,this.height=r},o.prototype.bind=function(e){var t=this.gl;void 0!==e&&t.activeTexture(t.TEXTURE0+e),t.bindTexture(t.TEXTURE_2D,this.texture)},o.prototype.unbind=function(){var e=this.gl;e.bindTexture(e.TEXTURE_2D,null)},o.prototype.minFilter=function(e){var t=this.gl;this.bind(),this.mipmap?t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,e?t.LINEAR_MIPMAP_LINEAR:t.NEAREST_MIPMAP_NEAREST):t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,e?t.LINEAR:t.NEAREST)},o.prototype.magFilter=function(e){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,e?t.LINEAR:t.NEAREST)},o.prototype.enableMipmap=function(){var e=this.gl;this.bind(),this.mipmap=!0,e.generateMipmap(e.TEXTURE_2D)},o.prototype.enableLinearScaling=function(){this.minFilter(!0),this.magFilter(!0)},o.prototype.enableNearestScaling=function(){this.minFilter(!1),this.magFilter(!1)},o.prototype.enableWrapClamp=function(){var e=this.gl;this.bind(),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)},o.prototype.enableWrapRepeat=function(){var e=this.gl;this.bind(),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT)},o.prototype.enableWrapMirrorRepeat=function(){var e=this.gl;this.bind(),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.MIRRORED_REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.MIRRORED_REPEAT)},o.prototype.destroy=function(){this.gl.deleteTexture(this.texture)},o.fromSource=function(e,t,r){var i=new o(e);return i.premultiplyAlpha=r||!1,i.upload(t),i},o.fromData=function(e,t,r,i){var n=new o(e);return n.uploadData(t,r,i),n},t.exports=o},{}],13:[function(e,t,r){var n=e("./setVertexAttribArrays");function i(e,t){if(this.nativeVaoExtension=null,i.FORCE_NATIVE||(this.nativeVaoExtension=e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object")),this.nativeState=t,this.nativeVaoExtension){this.nativeVao=this.nativeVaoExtension.createVertexArrayOES();var r=e.getParameter(e.MAX_VERTEX_ATTRIBS);this.nativeState={tempAttribState:new Array(r),attribState:new Array(r)}}this.gl=e,this.attributes=[],this.indexBuffer=null,this.dirty=!1}i.prototype.constructor=i,(t.exports=i).FORCE_NATIVE=!1,i.prototype.bind=function(){if(this.nativeVao){if(this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao),this.dirty)return this.dirty=!1,this.activate(),this;this.indexBuffer&&this.indexBuffer.bind()}else this.activate();return this},i.prototype.unbind=function(){return this.nativeVao&&this.nativeVaoExtension.bindVertexArrayOES(null),this},i.prototype.activate=function(){for(var e=this.gl,t=null,r=0;r<this.attributes.length;r++){var i=this.attributes[r];t!==i.buffer&&(i.buffer.bind(),t=i.buffer),e.vertexAttribPointer(i.attribute.location,i.attribute.size,i.type||e.FLOAT,i.normalized||!1,i.stride||0,i.start||0)}return n(e,this.attributes,this.nativeState),this.indexBuffer&&this.indexBuffer.bind(),this},i.prototype.addAttribute=function(e,t,r,i,n,o){return this.attributes.push({buffer:e,attribute:t,location:t.location,type:r||this.gl.FLOAT,normalized:i||!1,stride:n||0,start:o||0}),this.dirty=!0,this},i.prototype.addIndex=function(e){return this.indexBuffer=e,this.dirty=!0,this},i.prototype.clear=function(){return this.nativeVao&&this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao),this.attributes.length=0,this.indexBuffer=null,this},i.prototype.draw=function(e,t,r){var i=this.gl;return this.indexBuffer?i.drawElements(e,t||this.indexBuffer.data.length,i.UNSIGNED_SHORT,2*(r||0)):i.drawArrays(e,r,t||this.getSize()),this},i.prototype.destroy=function(){this.gl=null,this.indexBuffer=null,this.attributes=null,this.nativeState=null,this.nativeVao&&this.nativeVaoExtension.deleteVertexArrayOES(this.nativeVao),this.nativeVaoExtension=null,this.nativeVao=null},i.prototype.getSize=function(){var e=this.attributes[0];return e.buffer.data.length/(e.stride/4||e.attribute.size)}},{"./setVertexAttribArrays":16}],14:[function(e,t,r){t.exports=function(e,t){var r=e.getContext("webgl",t)||e.getContext("experimental-webgl",t);if(!r)throw new Error("This browser does not support webGL. Try using the canvas renderer");return r}},{}],15:[function(e,t,r){var i={createContext:e("./createContext"),setVertexAttribArrays:e("./setVertexAttribArrays"),GLBuffer:e("./GLBuffer"),GLFramebuffer:e("./GLFramebuffer"),GLShader:e("./GLShader"),GLTexture:e("./GLTexture"),VertexArrayObject:e("./VertexArrayObject"),shader:e("./shader")};void 0!==t&&t.exports&&(t.exports=i),"undefined"!=typeof window&&(window.PIXI=window.PIXI||{},window.PIXI.glCore=i)},{"./GLBuffer":9,"./GLFramebuffer":10,"./GLShader":11,"./GLTexture":12,"./VertexArrayObject":13,"./createContext":14,"./setVertexAttribArrays":16,"./shader":22}],16:[function(e,t,r){t.exports=function(e,t,r){var i;if(r){var n=r.tempAttribState,o=r.attribState;for(i=0;i<n.length;i++)n[i]=!1;for(i=0;i<t.length;i++)n[t[i].attribute.location]=!0;for(i=0;i<o.length;i++)o[i]!==n[i]&&(o[i]=n[i],r.attribState[i]?e.enableVertexAttribArray(i):e.disableVertexAttribArray(i))}else for(i=0;i<t.length;i++){var a=t[i];e.enableVertexAttribArray(a.attribute.location)}}},{}],17:[function(e,t,r){var u=function(e,t,r){var i=e.createShader(t);return e.shaderSource(i,r),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS)?i:(console.log(e.getShaderInfoLog(i)),null)};t.exports=function(e,t,r,i){var n=u(e,e.VERTEX_SHADER,t),o=u(e,e.FRAGMENT_SHADER,r),a=e.createProgram();if(e.attachShader(a,n),e.attachShader(a,o),i)for(var s in i)e.bindAttribLocation(a,i[s],s);return e.linkProgram(a),e.getProgramParameter(a,e.LINK_STATUS)||(console.error("Pixi.js Error: Could not initialize shader."),console.error("gl.VALIDATE_STATUS",e.getProgramParameter(a,e.VALIDATE_STATUS)),console.error("gl.getError()",e.getError()),""!==e.getProgramInfoLog(a)&&console.warn("Pixi.js Warning: gl.getProgramInfoLog()",e.getProgramInfoLog(a)),e.deleteProgram(a),a=null),e.deleteShader(n),e.deleteShader(o),a}},{}],18:[function(e,t,r){var i=function(e){for(var t=new Array(e),r=0;r<t.length;r++)t[r]=!1;return t};t.exports=function(e,t){switch(e){case"float":return 0;case"vec2":return new Float32Array(2*t);case"vec3":return new Float32Array(3*t);case"vec4":return new Float32Array(4*t);case"int":case"sampler2D":return 0;case"ivec2":return new Int32Array(2*t);case"ivec3":return new Int32Array(3*t);case"ivec4":return new Int32Array(4*t);case"bool":return!1;case"bvec2":return i(2*t);case"bvec3":return i(3*t);case"bvec4":return i(4*t);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}}},{}],19:[function(e,t,r){var s=e("./mapType"),u=e("./mapSize"),c=function(e,t,r,i){gl.vertexAttribPointer(this.location,this.size,e||gl.FLOAT,t||!1,r||0,i||0)};t.exports=function(e,t){for(var r={},i=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),n=0;n<i;n++){var o=e.getActiveAttrib(t,n),a=s(e,o.type);r[o.name]={type:a,size:u(a),location:e.getAttribLocation(t,o.name),pointer:c}}return r}},{"./mapSize":23,"./mapType":24}],20:[function(e,t,r){var u=e("./mapType"),c=e("./defaultValue");t.exports=function(e,t){for(var r={},i=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),n=0;n<i;n++){var o=e.getActiveUniform(t,n),a=o.name.replace(/\[.*?\]/,""),s=u(e,o.type);r[a]={type:s,size:o.size,location:e.getUniformLocation(t,a),value:c(s,o.size)}}return r}},{"./defaultValue":18,"./mapType":24}],21:[function(e,t,r){var l=function(e){return function(){return this.data[e].value}},n={float:function(e,t,r){e.uniform1f(t,r)},vec2:function(e,t,r){e.uniform2f(t,r[0],r[1])},vec3:function(e,t,r){e.uniform3f(t,r[0],r[1],r[2])},vec4:function(e,t,r){e.uniform4f(t,r[0],r[1],r[2],r[3])},int:function(e,t,r){e.uniform1i(t,r)},ivec2:function(e,t,r){e.uniform2i(t,r[0],r[1])},ivec3:function(e,t,r){e.uniform3i(t,r[0],r[1],r[2])},ivec4:function(e,t,r){e.uniform4i(t,r[0],r[1],r[2],r[3])},bool:function(e,t,r){e.uniform1i(t,r)},bvec2:function(e,t,r){e.uniform2i(t,r[0],r[1])},bvec3:function(e,t,r){e.uniform3i(t,r[0],r[1],r[2])},bvec4:function(e,t,r){e.uniform4i(t,r[0],r[1],r[2],r[3])},mat2:function(e,t,r){e.uniformMatrix2fv(t,!1,r)},mat3:function(e,t,r){e.uniformMatrix3fv(t,!1,r)},mat4:function(e,t,r){e.uniformMatrix4fv(t,!1,r)},sampler2D:function(e,t,r){e.uniform1i(t,r)}},o={float:function(e,t,r){e.uniform1fv(t,r)},vec2:function(e,t,r){e.uniform2fv(t,r)},vec3:function(e,t,r){e.uniform3fv(t,r)},vec4:function(e,t,r){e.uniform4fv(t,r)},int:function(e,t,r){e.uniform1iv(t,r)},ivec2:function(e,t,r){e.uniform2iv(t,r)},ivec3:function(e,t,r){e.uniform3iv(t,r)},ivec4:function(e,t,r){e.uniform4iv(t,r)},bool:function(e,t,r){e.uniform1iv(t,r)},bvec2:function(e,t,r){e.uniform2iv(t,r)},bvec3:function(e,t,r){e.uniform3iv(t,r)},bvec4:function(e,t,r){e.uniform4iv(t,r)},sampler2D:function(e,t,r){e.uniform1iv(t,r)}};function f(r,i){return function(e){this.data[r].value=e;var t=this.data[r].location;1===i.size?n[i.type](this.gl,t,e):o[i.type](this.gl,t,e)}}function h(e,t){for(var r=t,i=0;i<e.length-1;i++){var n=r[e[i]]||{data:{}};r[e[i]]=n,r=n}return r}t.exports=function(e,t){var r={data:{}};r.gl=e;for(var i=Object.keys(t),n=0;n<i.length;n++){var o=i[n],a=o.split("."),s=a[a.length-1],u=h(a,r),c=t[o];u.data[s]=c,u.gl=e,Object.defineProperty(u,s,{get:l(s),set:f(s,c)})}return r}},{}],22:[function(e,t,r){t.exports={compileProgram:e("./compileProgram"),defaultValue:e("./defaultValue"),extractAttributes:e("./extractAttributes"),extractUniforms:e("./extractUniforms"),generateUniformAccessObject:e("./generateUniformAccessObject"),setPrecision:e("./setPrecision"),mapSize:e("./mapSize"),mapType:e("./mapType")}},{"./compileProgram":17,"./defaultValue":18,"./extractAttributes":19,"./extractUniforms":20,"./generateUniformAccessObject":21,"./mapSize":23,"./mapType":24,"./setPrecision":25}],23:[function(e,t,r){var i={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};t.exports=function(e){return i[e]}},{}],24:[function(e,t,r){var o=null,a={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D"};t.exports=function(e,t){if(!o){var r=Object.keys(a);o={};for(var i=0;i<r.length;++i){var n=r[i];o[e[n]]=a[n]}}return o[t]}},{}],25:[function(e,t,r){t.exports=function(e,t){return"precision"!==e.substring(0,9)?"precision "+t+" float;\n"+e:e}},{}],26:[function(e,t,r){var i,n,o=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(t){if(i===setTimeout)return setTimeout(t,0);if((i===a||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:a}catch(e){i=a}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var c,l=[],f=!1,h=-1;function d(){f&&c&&(f=!1,c.length?l=c.concat(l):h=-1,l.length&&p())}function p(){if(!f){var e=u(d);f=!0;for(var t=l.length;t;){for(c=l,l=[];++h<t;)c&&c[h].run();h=-1,t=l.length}c=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(e)}}function v(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new v(e,t)),1!==l.length||f||u(p)},v.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],27:[function(e,I,R){(function(O){!function(e){var t="object"==typeof R&&R&&!R.nodeType&&R,r="object"==typeof I&&I&&!I.nodeType&&I,i="object"==typeof O&&O;i.global!==i&&i.window!==i&&i.self!==i||(e=i);var n,o,b=2147483647,y=36,g=1,_=26,a=38,s=700,w=72,x=128,T="-",u=/^xn--/,c=/[^\x20-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=y-g,S=Math.floor,M=String.fromCharCode;function P(e){throw new RangeError(f[e])}function d(e,t){for(var r=e.length,i=[];r--;)i[r]=t(e[r]);return i}function p(e,t){var r=e.split("@"),i="";return 1<r.length&&(i=r[0]+"@",e=r[1]),i+d((e=e.replace(l,".")).split("."),t).join(".")}function E(e){for(var t,r,i=[],n=0,o=e.length;n<o;)55296<=(t=e.charCodeAt(n++))&&t<=56319&&n<o?56320==(64512&(r=e.charCodeAt(n++)))?i.push(((1023&t)<<10)+(1023&r)+65536):(i.push(t),n--):i.push(t);return i}function k(e){return d(e,function(e){var t="";return 65535<e&&(t+=M((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=M(e)}).join("")}function C(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function A(e,t,r){var i=0;for(e=r?S(e/s):e>>1,e+=S(e/t);h*_>>1<e;i+=y)e=S(e/h);return S(i+(h+1)*e/(e+a))}function v(e){var t,r,i,n,o,a,s,u,c,l,f,h=[],d=e.length,p=0,v=x,m=w;for((r=e.lastIndexOf(T))<0&&(r=0),i=0;i<r;++i)128<=e.charCodeAt(i)&&P("not-basic"),h.push(e.charCodeAt(i));for(n=0<r?r+1:0;n<d;){for(o=p,a=1,s=y;d<=n&&P("invalid-input"),f=e.charCodeAt(n++),(y<=(u=f-48<10?f-22:f-65<26?f-65:f-97<26?f-97:y)||u>S((b-p)/a))&&P("overflow"),p+=u*a,!(u<(c=s<=m?g:m+_<=s?_:s-m));s+=y)a>S(b/(l=y-c))&&P("overflow"),a*=l;m=A(p-o,t=h.length+1,0==o),S(p/t)>b-v&&P("overflow"),v+=S(p/t),p%=t,h.splice(p++,0,v)}return k(h)}function m(e){var t,r,i,n,o,a,s,u,c,l,f,h,d,p,v,m=[];for(h=(e=E(e)).length,t=x,o=w,a=r=0;a<h;++a)(f=e[a])<128&&m.push(M(f));for(i=n=m.length,n&&m.push(T);i<h;){for(s=b,a=0;a<h;++a)t<=(f=e[a])&&f<s&&(s=f);for(s-t>S((b-r)/(d=i+1))&&P("overflow"),r+=(s-t)*d,t=s,a=0;a<h;++a)if((f=e[a])<t&&++r>b&&P("overflow"),f==t){for(u=r,c=y;!(u<(l=c<=o?g:o+_<=c?_:c-o));c+=y)v=u-l,p=y-l,m.push(M(C(l+v%p,0))),u=S(v/p);m.push(M(C(u,0))),o=A(r,d,i==n),r=0,++i}++r,++t}return m.join("")}if(n={version:"1.4.1",ucs2:{decode:E,encode:k},decode:v,encode:m,toASCII:function(e){return p(e,function(e){return c.test(e)?"xn--"+m(e):e})},toUnicode:function(e){return p(e,function(e){return u.test(e)?v(e.slice(4).toLowerCase()):e})}},t&&r)if(I.exports==t)r.exports=n;else for(o in n)n.hasOwnProperty(o)&&(t[o]=n[o]);else e.punycode=n}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],28:[function(e,t,r){"use strict";t.exports=function(e,t,r,i){t=t||"&",r=r||"=";var n={};if("string"!=typeof e||0===e.length)return n;var o=/\+/g;e=e.split(t);var a=1e3;i&&"number"==typeof i.maxKeys&&(a=i.maxKeys);var s,u,c=e.length;0<a&&a<c&&(c=a);for(var l=0;l<c;++l){var f,h,d,p,v=e[l].replace(o,"%20"),m=v.indexOf(r);h=0<=m?(f=v.substr(0,m),v.substr(m+1)):(f=v,""),d=decodeURIComponent(f),p=decodeURIComponent(h),s=n,u=d,Object.prototype.hasOwnProperty.call(s,u)?b(n[d])?n[d].push(p):n[d]=[n[d],p]:n[d]=p}return n};var b=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],29:[function(e,t,r){"use strict";var o=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(r,i,n,e){return i=i||"&",n=n||"=",null===r&&(r=void 0),"object"==typeof r?s(u(r),function(e){var t=encodeURIComponent(o(e))+n;return a(r[e])?s(r[e],function(e){return t+encodeURIComponent(o(e))}).join(i):t+encodeURIComponent(o(r[e]))}).join(i):e?encodeURIComponent(o(e))+n+encodeURIComponent(o(r)):""};var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function s(e,t){if(e.map)return e.map(t);for(var r=[],i=0;i<e.length;i++)r.push(t(e[i],i));return r}var u=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],30:[function(e,t,r){"use strict";r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":28,"./encode":29}],31:[function(e,t,r){"use strict";t.exports=function(e,t,r){var i,n=e.length;if(!(n<=t||0===r)){var o=n-(r=n<t+r?n-t:r);for(i=t;i<o;++i)e[i]=e[i+r];e.length=o}}},{}],32:[function(e,t,r){"use strict";r.__esModule=!0,r.Loader=void 0;var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),a=o(e("mini-signals")),n=o(e("parse-uri")),s=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("./async")),f=e("./Resource");function o(e){return e&&e.__esModule?e:{default:e}}var u=/(#[\w-]+)?$/,c=r.Loader=function(){function o(){var r=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:10;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),this.baseUrl=e,this.progress=0,this.loading=!1,this.defaultQueryString="",this._beforeMiddleware=[],this._afterMiddleware=[],this._resourcesParsing=[],this._boundLoadResource=function(e,t){return r._loadResource(e,t)},this._queue=s.queue(this._boundLoadResource,t),this._queue.pause(),this.resources={},this.onProgress=new a.default,this.onError=new a.default,this.onLoad=new a.default,this.onStart=new a.default,this.onComplete=new a.default;for(var i=0;i<o._defaultBeforeMiddleware.length;++i)this.pre(o._defaultBeforeMiddleware[i]);for(var n=0;n<o._defaultAfterMiddleware.length;++n)this.use(o._defaultAfterMiddleware[n])}return o.prototype.add=function(e,t,r,i){if(Array.isArray(e)){for(var n=0;n<e.length;++n)this.add(e[n]);return this}if("object"===(void 0===e?"undefined":l(e))&&(i=t||e.callback||e.onComplete,t=(r=e).url,e=e.name||e.key||e.url),"string"!=typeof t&&(i=r,r=t,t=e),"string"!=typeof t)throw new Error("No url passed to add resource to loader.");if("function"==typeof r&&(i=r,r=null),this.loading&&(!r||!r.parentResource))throw new Error("Cannot add resources while the loader is running.");if(this.resources[e])throw new Error('Resource named "'+e+'" already exists.');if(t=this._prepareUrl(t),this.resources[e]=new f.Resource(e,t,r),"function"==typeof i&&this.resources[e].onAfterMiddleware.once(i),this.loading){for(var o=r.parentResource,a=[],s=0;s<o.children.length;++s)o.children[s].isComplete||a.push(o.children[s]);var u=o.progressChunk*(a.length+1)/(a.length+2);o.children.push(this.resources[e]),o.progressChunk=u;for(var c=0;c<a.length;++c)a[c].progressChunk=u;this.resources[e].progressChunk=u}return this._queue.push(this.resources[e]),this},o.prototype.pre=function(e){return this._beforeMiddleware.push(e),this},o.prototype.use=function(e){return this._afterMiddleware.push(e),this},o.prototype.reset=function(){for(var e in this.progress=0,this.loading=!1,this._queue.kill(),this._queue.pause(),this.resources){var t=this.resources[e];t._onLoadBinding&&t._onLoadBinding.detach(),t.isLoading&&t.abort()}return this.resources={},this},o.prototype.load=function(e){if("function"==typeof e&&this.onComplete.once(e),this.loading)return this;if(this._queue.idle())this._onStart(),this._onComplete();else{for(var t=100/this._queue._tasks.length,r=0;r<this._queue._tasks.length;++r)this._queue._tasks[r].data.progressChunk=t;this._onStart(),this._queue.resume()}return this},o.prototype._prepareUrl=function(e){var t=(0,n.default)(e,{strictMode:!0}),r=void 0;if(r=t.protocol||!t.path||0===e.indexOf("//")?e:this.baseUrl.length&&this.baseUrl.lastIndexOf("/")!==this.baseUrl.length-1&&"/"!==e.charAt(0)?this.baseUrl+"/"+e:this.baseUrl+e,this.defaultQueryString){var i=u.exec(r)[0];-1!==(r=r.substr(0,r.length-i.length)).indexOf("?")?r+="&"+this.defaultQueryString:r+="?"+this.defaultQueryString,r+=i}return r},o.prototype._loadResource=function(r,e){var i=this;r._dequeue=e,s.eachSeries(this._beforeMiddleware,function(e,t){e.call(i,r,function(){t(r.isComplete?{}:null)})},function(){r.isComplete?i._onLoad(r):(r._onLoadBinding=r.onComplete.once(i._onLoad,i),r.load())},!0)},o.prototype._onStart=function(){this.progress=0,this.loading=!0,this.onStart.dispatch(this)},o.prototype._onComplete=function(){this.progress=100,this.loading=!1,this.onComplete.dispatch(this,this.resources)},o.prototype._onLoad=function(r){var i=this;r._onLoadBinding=null,this._resourcesParsing.push(r),r._dequeue(),s.eachSeries(this._afterMiddleware,function(e,t){e.call(i,r,t)},function(){r.onAfterMiddleware.dispatch(r),i.progress=Math.min(100,i.progress+r.progressChunk),i.onProgress.dispatch(i,r),r.error?i.onError.dispatch(r.error,i,r):i.onLoad.dispatch(i,r),i._resourcesParsing.splice(i._resourcesParsing.indexOf(r),1),i._queue.idle()&&0===i._resourcesParsing.length&&i._onComplete()},!0)},i(o,[{key:"concurrency",get:function(){return this._queue.concurrency},set:function(e){this._queue.concurrency=e}}]),o}();c._defaultBeforeMiddleware=[],c._defaultAfterMiddleware=[],c.pre=function(e){return c._defaultBeforeMiddleware.push(e),c},c.use=function(e){return c._defaultAfterMiddleware.push(e),c}},{"./Resource":33,"./async":34,"mini-signals":5,"parse-uri":7}],33:[function(e,t,r){"use strict";r.__esModule=!0,r.Resource=void 0;var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),n=o(e("parse-uri")),a=o(e("mini-signals"));function o(e){return e&&e.__esModule?e:{default:e}}var s=!(!window.XDomainRequest||"withCredentials"in new XMLHttpRequest),u=null;function c(){}var l=r.Resource=function(){function o(e,t,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),"string"!=typeof e||"string"!=typeof t)throw new Error("Both name and url are required for constructing a resource.");r=r||{},this._flags=0,this._setFlag(o.STATUS_FLAGS.DATA_URL,0===t.indexOf("data:")),this.name=e,this.url=t,this.extension=this._getExtension(),this.data=null,this.crossOrigin=!0===r.crossOrigin?"anonymous":r.crossOrigin,this.timeout=r.timeout||0,this.loadType=r.loadType||this._determineLoadType(),this.xhrType=r.xhrType,this.metadata=r.metadata||{},this.error=null,this.xhr=null,this.children=[],this.type=o.TYPE.UNKNOWN,this.progressChunk=0,this._dequeue=c,this._onLoadBinding=null,this._elementTimer=0,this._boundComplete=this.complete.bind(this),this._boundOnError=this._onError.bind(this),this._boundOnProgress=this._onProgress.bind(this),this._boundOnTimeout=this._onTimeout.bind(this),this._boundXhrOnError=this._xhrOnError.bind(this),this._boundXhrOnTimeout=this._xhrOnTimeout.bind(this),this._boundXhrOnAbort=this._xhrOnAbort.bind(this),this._boundXhrOnLoad=this._xhrOnLoad.bind(this),this.onStart=new a.default,this.onProgress=new a.default,this.onComplete=new a.default,this.onAfterMiddleware=new a.default}return o.setExtensionLoadType=function(e,t){f(o._loadTypeMap,e,t)},o.setExtensionXhrType=function(e,t){f(o._xhrTypeMap,e,t)},o.prototype.complete=function(){this._clearEvents(),this._finish()},o.prototype.abort=function(e){if(!this.error){if(this.error=new Error(e),this._clearEvents(),this.xhr)this.xhr.abort();else if(this.xdr)this.xdr.abort();else if(this.data)if(this.data.src)this.data.src=o.EMPTY_GIF;else for(;this.data.firstChild;)this.data.removeChild(this.data.firstChild);this._finish()}},o.prototype.load=function(e){var t=this;if(!this.isLoading)if(this.isComplete)e&&setTimeout(function(){return e(t)},1);else switch(e&&this.onComplete.once(e),this._setFlag(o.STATUS_FLAGS.LOADING,!0),this.onStart.dispatch(this),!1!==this.crossOrigin&&"string"==typeof this.crossOrigin||(this.crossOrigin=this._determineCrossOrigin(this.url)),this.loadType){case o.LOAD_TYPE.IMAGE:this.type=o.TYPE.IMAGE,this._loadElement("image");break;case o.LOAD_TYPE.AUDIO:this.type=o.TYPE.AUDIO,this._loadSourceElement("audio");break;case o.LOAD_TYPE.VIDEO:this.type=o.TYPE.VIDEO,this._loadSourceElement("video");break;case o.LOAD_TYPE.XHR:default:s&&this.crossOrigin?this._loadXdr():this._loadXhr()}},o.prototype._hasFlag=function(e){return 0!=(this._flags&e)},o.prototype._setFlag=function(e,t){this._flags=t?this._flags|e:this._flags&~e},o.prototype._clearEvents=function(){clearTimeout(this._elementTimer),this.data&&this.data.removeEventListener&&(this.data.removeEventListener("error",this._boundOnError,!1),this.data.removeEventListener("load",this._boundComplete,!1),this.data.removeEventListener("progress",this._boundOnProgress,!1),this.data.removeEventListener("canplaythrough",this._boundComplete,!1)),this.xhr&&(this.xhr.removeEventListener?(this.xhr.removeEventListener("error",this._boundXhrOnError,!1),this.xhr.removeEventListener("timeout",this._boundXhrOnTimeout,!1),this.xhr.removeEventListener("abort",this._boundXhrOnAbort,!1),this.xhr.removeEventListener("progress",this._boundOnProgress,!1),this.xhr.removeEventListener("load",this._boundXhrOnLoad,!1)):(this.xhr.onerror=null,this.xhr.ontimeout=null,this.xhr.onprogress=null,this.xhr.onload=null))},o.prototype._finish=function(){if(this.isComplete)throw new Error("Complete called again for an already completed resource.");this._setFlag(o.STATUS_FLAGS.COMPLETE,!0),this._setFlag(o.STATUS_FLAGS.LOADING,!1),this.onComplete.dispatch(this)},o.prototype._loadElement=function(e){this.metadata.loadElement?this.data=this.metadata.loadElement:"image"===e&&void 0!==window.Image?this.data=new Image:this.data=document.createElement(e),this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),this.metadata.skipSource||(this.data.src=this.url),this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))},o.prototype._loadSourceElement=function(e){if(this.metadata.loadElement?this.data=this.metadata.loadElement:"audio"===e&&void 0!==window.Audio?this.data=new Audio:this.data=document.createElement(e),null!==this.data){if(this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),!this.metadata.skipSource)if(navigator.isCocoonJS)this.data.src=Array.isArray(this.url)?this.url[0]:this.url;else if(Array.isArray(this.url))for(var t=this.metadata.mimeType,r=0;r<this.url.length;++r)this.data.appendChild(this._createSource(e,this.url[r],Array.isArray(t)?t[r]:t));else{var i=this.metadata.mimeType;this.data.appendChild(this._createSource(e,this.url,Array.isArray(i)?i[0]:i))}this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.data.addEventListener("canplaythrough",this._boundComplete,!1),this.data.load(),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))}else this.abort("Unsupported element: "+e)},o.prototype._loadXhr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var e=this.xhr=new XMLHttpRequest;e.open("GET",this.url,!0),e.timeout=this.timeout,this.xhrType===o.XHR_RESPONSE_TYPE.JSON||this.xhrType===o.XHR_RESPONSE_TYPE.DOCUMENT?e.responseType=o.XHR_RESPONSE_TYPE.TEXT:e.responseType=this.xhrType,e.addEventListener("error",this._boundXhrOnError,!1),e.addEventListener("timeout",this._boundXhrOnTimeout,!1),e.addEventListener("abort",this._boundXhrOnAbort,!1),e.addEventListener("progress",this._boundOnProgress,!1),e.addEventListener("load",this._boundXhrOnLoad,!1),e.send()},o.prototype._loadXdr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var e=this.xhr=new XDomainRequest;e.timeout=this.timeout||5e3,e.onerror=this._boundXhrOnError,e.ontimeout=this._boundXhrOnTimeout,e.onprogress=this._boundOnProgress,e.onload=this._boundXhrOnLoad,e.open("GET",this.url,!0),setTimeout(function(){return e.send()},1)},o.prototype._createSource=function(e,t,r){r||(r=e+"/"+this._getExtension(t));var i=document.createElement("source");return i.src=t,i.type=r,i},o.prototype._onError=function(e){this.abort("Failed to load element using: "+e.target.nodeName)},o.prototype._onProgress=function(e){e&&e.lengthComputable&&this.onProgress.dispatch(this,e.loaded/e.total)},o.prototype._onTimeout=function(){this.abort("Load timed out.")},o.prototype._xhrOnError=function(){var e=this.xhr;this.abort(h(e)+" Request failed. Status: "+e.status+', text: "'+e.statusText+'"')},o.prototype._xhrOnTimeout=function(){var e=this.xhr;this.abort(h(e)+" Request timed out.")},o.prototype._xhrOnAbort=function(){var e=this.xhr;this.abort(h(e)+" Request was aborted by the user.")},o.prototype._xhrOnLoad=function(){var e=this.xhr,t="",r=void 0===e.status?200:e.status;if(""!==e.responseType&&"text"!==e.responseType&&void 0!==e.responseType||(t=e.responseText),0===r&&(0<t.length||e.responseType===o.XHR_RESPONSE_TYPE.BUFFER)?r=200:1223===r&&(r=204),2==(r/100|0)){if(this.xhrType===o.XHR_RESPONSE_TYPE.TEXT)this.data=t,this.type=o.TYPE.TEXT;else if(this.xhrType===o.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(t),this.type=o.TYPE.JSON}catch(e){return void this.abort("Error trying to parse loaded json: "+e)}else if(this.xhrType===o.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var i=new DOMParser;this.data=i.parseFromString(t,"text/xml")}else{var n=document.createElement("div");n.innerHTML=t,this.data=n}this.type=o.TYPE.XML}catch(e){return void this.abort("Error trying to parse loaded xml: "+e)}else this.data=e.response||t;this.complete()}else this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL)},o.prototype._determineCrossOrigin=function(e,t){if(0===e.indexOf("data:"))return"";if(window.origin!==window.location.origin)return"anonymous";t=t||window.location,u||(u=document.createElement("a")),u.href=e;var r=!(e=(0,n.default)(u.href,{strictMode:!0})).port&&""===t.port||e.port===t.port,i=e.protocol?e.protocol+":":"";return e.host===t.hostname&&r&&i===t.protocol?"":"anonymous"},o.prototype._determineXhrType=function(){return o._xhrTypeMap[this.extension]||o.XHR_RESPONSE_TYPE.TEXT},o.prototype._determineLoadType=function(){return o._loadTypeMap[this.extension]||o.LOAD_TYPE.XHR},o.prototype._getExtension=function(){var e=this.url,t="";if(this.isDataUrl){var r=e.indexOf("/");t=e.substring(r+1,e.indexOf(";",r))}else{var i=e.indexOf("?"),n=e.indexOf("#"),o=Math.min(-1<i?i:e.length,-1<n?n:e.length);t=(e=e.substring(0,o)).substring(e.lastIndexOf(".")+1)}return t.toLowerCase()},o.prototype._getMimeFromXhrType=function(e){switch(e){case o.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case o.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case o.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case o.XHR_RESPONSE_TYPE.JSON:return"application/json";case o.XHR_RESPONSE_TYPE.DEFAULT:case o.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},i(o,[{key:"isDataUrl",get:function(){return this._hasFlag(o.STATUS_FLAGS.DATA_URL)}},{key:"isComplete",get:function(){return this._hasFlag(o.STATUS_FLAGS.COMPLETE)}},{key:"isLoading",get:function(){return this._hasFlag(o.STATUS_FLAGS.LOADING)}}]),o}();function f(e,t,r){t&&0===t.indexOf(".")&&(t=t.substring(1)),t&&(e[t]=r)}function h(e){return e.toString().replace("object ","")}l.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},l.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},l.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},l.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},l._loadTypeMap={gif:l.LOAD_TYPE.IMAGE,png:l.LOAD_TYPE.IMAGE,bmp:l.LOAD_TYPE.IMAGE,jpg:l.LOAD_TYPE.IMAGE,jpeg:l.LOAD_TYPE.IMAGE,tif:l.LOAD_TYPE.IMAGE,tiff:l.LOAD_TYPE.IMAGE,webp:l.LOAD_TYPE.IMAGE,tga:l.LOAD_TYPE.IMAGE,svg:l.LOAD_TYPE.IMAGE,"svg+xml":l.LOAD_TYPE.IMAGE,mp3:l.LOAD_TYPE.AUDIO,ogg:l.LOAD_TYPE.AUDIO,wav:l.LOAD_TYPE.AUDIO,mp4:l.LOAD_TYPE.VIDEO,webm:l.LOAD_TYPE.VIDEO},l._xhrTypeMap={xhtml:l.XHR_RESPONSE_TYPE.DOCUMENT,html:l.XHR_RESPONSE_TYPE.DOCUMENT,htm:l.XHR_RESPONSE_TYPE.DOCUMENT,xml:l.XHR_RESPONSE_TYPE.DOCUMENT,tmx:l.XHR_RESPONSE_TYPE.DOCUMENT,svg:l.XHR_RESPONSE_TYPE.DOCUMENT,tsx:l.XHR_RESPONSE_TYPE.DOCUMENT,gif:l.XHR_RESPONSE_TYPE.BLOB,png:l.XHR_RESPONSE_TYPE.BLOB,bmp:l.XHR_RESPONSE_TYPE.BLOB,jpg:l.XHR_RESPONSE_TYPE.BLOB,jpeg:l.XHR_RESPONSE_TYPE.BLOB,tif:l.XHR_RESPONSE_TYPE.BLOB,tiff:l.XHR_RESPONSE_TYPE.BLOB,webp:l.XHR_RESPONSE_TYPE.BLOB,tga:l.XHR_RESPONSE_TYPE.BLOB,json:l.XHR_RESPONSE_TYPE.JSON,text:l.XHR_RESPONSE_TYPE.TEXT,txt:l.XHR_RESPONSE_TYPE.TEXT,ttf:l.XHR_RESPONSE_TYPE.BUFFER,otf:l.XHR_RESPONSE_TYPE.BUFFER},l.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",void 0!==t&&(t.exports.default=l)},{"mini-signals":5,"parse-uri":7}],34:[function(e,t,r){"use strict";function a(){}function s(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}}r.__esModule=!0,r.eachSeries=function(r,i,n,o){var a=0,s=r.length;!function e(t){t||a===s?n&&n(t):o?setTimeout(function(){i(r[a++],e)},1):i(r[a++],e)}()},r.queue=function(t,e){if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var r=0,n={_tasks:[],concurrency:e,saturated:a,unsaturated:a,buffer:e/4,empty:a,drain:a,error:a,started:!1,paused:!1,push:function(e,t){i(e,!1,t)},kill:function(){r=0,n.drain=a,n.started=!1,n._tasks=[]},unshift:function(e,t){i(e,!0,t)},process:function(){for(;!n.paused&&r<n.concurrency&&n._tasks.length;){var e=n._tasks.shift();0===n._tasks.length&&n.empty(),(r+=1)===n.concurrency&&n.saturated(),t(e.data,s(o(e)))}},length:function(){return n._tasks.length},running:function(){return r},idle:function(){return n._tasks.length+r===0},pause:function(){!0!==n.paused&&(n.paused=!0)},resume:function(){if(!1!==n.paused){n.paused=!1;for(var e=1;e<=n.concurrency;e++)n.process()}}};function i(e,t,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");if(n.started=!0,null==e&&n.idle())setTimeout(function(){return n.drain()},1);else{var i={data:e,callback:"function"==typeof r?r:a};t?n._tasks.unshift(i):n._tasks.push(i),setTimeout(function(){return n.process()},1)}}function o(e){return function(){r-=1,e.callback.apply(e,arguments),null!=arguments[0]&&n.error(arguments[0],e.data),r<=n.concurrency-n.buffer&&n.unsaturated(),n.idle()&&n.drain(),n.process()}}return n}},{}],35:[function(e,t,r){"use strict";r.__esModule=!0,r.encodeBinary=i;var s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function i(e){for(var t="",r=0;r<e.length;){for(var i=[0,0,0],n=[0,0,0,0],o=0;o<i.length;++o)r<e.length?i[o]=255&e.charCodeAt(r++):i[o]=0;switch(n[0]=i[0]>>2,n[1]=(3&i[0])<<4|i[1]>>4,n[2]=(15&i[1])<<2|i[2]>>6,n[3]=63&i[2],r-(e.length-1)){case 2:n[3]=64,n[2]=64;break;case 1:n[3]=64}for(var a=0;a<n.length;++a)t+=s.charAt(n[a])}return t}void 0!==t&&(t.exports.default=i)},{}],36:[function(e,t,r){"use strict";var i=e("./Loader").Loader,n=e("./Resource").Resource,o=e("./async"),a=e("./b64");i.Resource=n,i.async=o,i.encodeBinary=a,i.base64=a,t.exports=i,t.exports.Loader=i,t.exports.default=i},{"./Loader":32,"./Resource":33,"./async":34,"./b64":35}],37:[function(e,t,r){"use strict";r.__esModule=!0,r.blobMiddlewareFactory=function(){return function(e,t){if(e.data){if(e.xhr&&e.xhrType===n.Resource.XHR_RESPONSE_TYPE.BLOB)if(window.Blob&&"string"!=typeof e.data){if(0===e.data.type.indexOf("image")){var r=a.createObjectURL(e.data);return e.blob=e.data,e.data=new Image,e.data.src=r,e.type=n.Resource.TYPE.IMAGE,void(e.data.onload=function(){a.revokeObjectURL(r),e.data.onload=null,t()})}}else{var i=e.xhr.getResponseHeader("content-type");if(i&&0===i.indexOf("image"))return e.data=new Image,e.data.src="data:"+i+";base64,"+(0,o.encodeBinary)(e.xhr.responseText),e.type=n.Resource.TYPE.IMAGE,void(e.data.onload=function(){e.data.onload=null,t()})}t()}else t()}};var n=e("../../Resource"),o=e("../../b64"),a=window.URL||window.webkitURL},{"../../Resource":33,"../../b64":35}],38:[function(e,t,r){"use strict";var R=e("punycode"),D=e("./util");function E(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}r.parse=o,r.resolve=function(e,t){return o(e,!1,!0).resolve(t)},r.resolveObject=function(e,t){return e?o(e,!1,!0).resolveObject(t):t},r.format=function(e){D.isString(e)&&(e=o(e));return e instanceof E?e.format():E.prototype.format.call(e)},r.Url=E;var L=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,j=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,n=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),F=["'"].concat(n),B=["%","/","?",";","#"].concat(F),N=["/","?","#"],U=/^[+a-z0-9A-Z_-]{0,63}$/,z=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,X={javascript:!0,"javascript:":!0},W={javascript:!0,"javascript:":!0},q={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},H=e("querystring");function o(e,t,r){if(e&&D.isObject(e)&&e instanceof E)return e;var i=new E;return i.parse(e,t,r),i}E.prototype.parse=function(e,t,r){if(!D.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),n=-1!==i&&i<e.indexOf("#")?"?":"#",o=e.split(n);o[0]=o[0].replace(/\\/g,"/");var a=e=o.join(n);if(a=a.trim(),!r&&1===e.split("#").length){var s=j.exec(a);if(s)return this.path=a,this.href=a,this.pathname=s[1],s[2]?(this.search=s[2],this.query=t?H.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var u=L.exec(a);if(u){var c=(u=u[0]).toLowerCase();this.protocol=c,a=a.substr(u.length)}if(r||u||a.match(/^\/\/[^@\/]+@[^@\/]+/)){var l="//"===a.substr(0,2);!l||u&&W[u]||(a=a.substr(2),this.slashes=!0)}if(!W[u]&&(l||u&&!q[u])){for(var f,h,d=-1,p=0;p<N.length;p++){-1!==(v=a.indexOf(N[p]))&&(-1===d||v<d)&&(d=v)}-1!==(h=-1===d?a.lastIndexOf("@"):a.lastIndexOf("@",d))&&(f=a.slice(0,h),a=a.slice(h+1),this.auth=decodeURIComponent(f)),d=-1;for(p=0;p<B.length;p++){var v;-1!==(v=a.indexOf(B[p]))&&(-1===d||v<d)&&(d=v)}-1===d&&(d=a.length),this.host=a.slice(0,d),a=a.slice(d),this.parseHost(),this.hostname=this.hostname||"";var m="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!m)for(var b=this.hostname.split(/\./),y=(p=0,b.length);p<y;p++){var g=b[p];if(g&&!g.match(U)){for(var _="",w=0,x=g.length;w<x;w++)127<g.charCodeAt(w)?_+="x":_+=g[w];if(!_.match(U)){var T=b.slice(0,p),S=b.slice(p+1),M=g.match(z);M&&(T.push(M[1]),S.unshift(M[2])),S.length&&(a="/"+S.join(".")+a),this.hostname=T.join(".");break}}}255<this.hostname.length?this.hostname="":this.hostname=this.hostname.toLowerCase(),m||(this.hostname=R.toASCII(this.hostname));var P=this.port?":"+this.port:"",E=this.hostname||"";this.host=E+P,this.href+=this.host,m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!X[c])for(p=0,y=F.length;p<y;p++){var k=F[p];if(-1!==a.indexOf(k)){var C=encodeURIComponent(k);C===k&&(C=escape(k)),a=a.split(k).join(C)}}var A=a.indexOf("#");-1!==A&&(this.hash=a.substr(A),a=a.slice(0,A));var O=a.indexOf("?");if(-1!==O?(this.search=a.substr(O),this.query=a.substr(O+1),t&&(this.query=H.parse(this.query)),a=a.slice(0,O)):t&&(this.search="",this.query={}),a&&(this.pathname=a),q[c]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){P=this.pathname||"";var I=this.search||"";this.path=P+I}return this.href=this.format(),this},E.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",i=this.hash||"",n=!1,o="";this.host?n=e+this.host:this.hostname&&(n=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(n+=":"+this.port)),this.query&&D.isObject(this.query)&&Object.keys(this.query).length&&(o=H.stringify(this.query));var a=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||q[t])&&!1!==n?(n="//"+(n||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):n||(n=""),i&&"#"!==i.charAt(0)&&(i="#"+i),a&&"?"!==a.charAt(0)&&(a="?"+a),t+n+(r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(a=a.replace("#","%23"))+i},E.prototype.resolve=function(e){return this.resolveObject(o(e,!1,!0)).format()},E.prototype.resolveObject=function(e){if(D.isString(e)){var t=new E;t.parse(e,!1,!0),e=t}for(var r=new E,i=Object.keys(this),n=0;n<i.length;n++){var o=i[n];r[o]=this[o]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),s=0;s<a.length;s++){var u=a[s];"protocol"!==u&&(r[u]=e[u])}return q[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!q[e.protocol]){for(var c=Object.keys(e),l=0;l<c.length;l++){var f=c[l];r[f]=e[f]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||W[e.protocol])r.pathname=e.pathname;else{for(var h=(e.pathname||"").split("/");h.length&&!(e.host=h.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),r.pathname=h.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var d=r.pathname||"",p=r.search||"";r.path=d+p}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var v=r.pathname&&"/"===r.pathname.charAt(0),m=e.host||e.pathname&&"/"===e.pathname.charAt(0),b=m||v||r.host&&e.pathname,y=b,g=r.pathname&&r.pathname.split("/")||[],_=(h=e.pathname&&e.pathname.split("/")||[],r.protocol&&!q[r.protocol]);if(_&&(r.hostname="",r.port=null,r.host&&(""===g[0]?g[0]=r.host:g.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===h[0]?h[0]=e.host:h.unshift(e.host)),e.host=null),b=b&&(""===h[0]||""===g[0])),m)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,g=h;else if(h.length)g||(g=[]),g.pop(),g=g.concat(h),r.search=e.search,r.query=e.query;else if(!D.isNullOrUndefined(e.search)){if(_)r.hostname=r.host=g.shift(),(M=!!(r.host&&0<r.host.indexOf("@"))&&r.host.split("@"))&&(r.auth=M.shift(),r.host=r.hostname=M.shift());return r.search=e.search,r.query=e.query,D.isNull(r.pathname)&&D.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!g.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var w=g.slice(-1)[0],x=(r.host||e.host||1<g.length)&&("."===w||".."===w)||""===w,T=0,S=g.length;0<=S;S--)"."===(w=g[S])?g.splice(S,1):".."===w?(g.splice(S,1),T++):T&&(g.splice(S,1),T--);if(!b&&!y)for(;T--;T)g.unshift("..");!b||""===g[0]||g[0]&&"/"===g[0].charAt(0)||g.unshift(""),x&&"/"!==g.join("/").substr(-1)&&g.push("");var M,P=""===g[0]||g[0]&&"/"===g[0].charAt(0);_&&(r.hostname=r.host=P?"":g.length?g.shift():"",(M=!!(r.host&&0<r.host.indexOf("@"))&&r.host.split("@"))&&(r.auth=M.shift(),r.host=r.hostname=M.shift()));return(b=b||r.host&&g.length)&&!P&&g.unshift(""),g.length?r.pathname=g.join("/"):(r.pathname=null,r.path=null),D.isNull(r.pathname)&&D.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},E.prototype.parseHost=function(){var e=this.host,t=i.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{"./util":39,punycode:27,querystring:30}],39:[function(e,t,r){"use strict";t.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],40:[function(e,t,r){"use strict";r.__esModule=!0;var u=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../core")),i=o(e("ismobilejs")),n=o(e("./accessibleTarget"));function o(e){return e&&e.__esModule?e:{default:e}}u.utils.mixins.delayMixin(u.DisplayObject.prototype,n.default);var a=function(){function r(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),!i.default.tablet&&!i.default.phone||navigator.isCocoonJS||this.createTouchHook();var t=document.createElement("div");t.style.width="100px",t.style.height="100px",t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.zIndex=2,this.div=t,this.pool=[],this.renderId=0,this.debug=!1,this.renderer=e,this.children=[],this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this.isActive=!1,this.isMobileAccessabillity=!1,window.addEventListener("keydown",this._onKeyDown,!1)}return r.prototype.createTouchHook=function(){var e=this,t=document.createElement("button");t.style.width="1px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.left="-1000px",t.style.zIndex=2,t.style.backgroundColor="#FF0000",t.title="HOOK DIV",t.addEventListener("focus",function(){e.isMobileAccessabillity=!0,e.activate(),document.body.removeChild(t)}),document.body.appendChild(t)},r.prototype.activate=function(){this.isActive||(this.isActive=!0,window.document.addEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),this.renderer.view.parentNode&&this.renderer.view.parentNode.appendChild(this.div))},r.prototype.deactivate=function(){this.isActive&&!this.isMobileAccessabillity&&(this.isActive=!1,window.document.removeEventListener("mousemove",this._onMouseMove,!0),window.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),this.div.parentNode&&this.div.parentNode.removeChild(this.div))},r.prototype.updateAccessibleObjects=function(e){if(e.visible){e.accessible&&e.interactive&&(e._accessibleActive||this.addChild(e),e.renderId=this.renderId);for(var t=e.children,r=0;r<t.length;r++)this.updateAccessibleObjects(t[r])}},r.prototype.update=function(){if(this.renderer.renderingToScreen){this.updateAccessibleObjects(this.renderer._lastObjectRendered);var e=this.renderer.view.getBoundingClientRect(),t=e.width/this.renderer.width,r=e.height/this.renderer.height,i=this.div;i.style.left=e.left+"px",i.style.top=e.top+"px",i.style.width=this.renderer.width+"px",i.style.height=this.renderer.height+"px";for(var n=0;n<this.children.length;n++){var o=this.children[n];if(o.renderId!==this.renderId)o._accessibleActive=!1,u.utils.removeItems(this.children,n,1),this.div.removeChild(o._accessibleDiv),this.pool.push(o._accessibleDiv),o._accessibleDiv=null,n--,0===this.children.length&&this.deactivate();else{i=o._accessibleDiv;var a=o.hitArea,s=o.worldTransform;o.hitArea?(i.style.left=(s.tx+a.x*s.a)*t+"px",i.style.top=(s.ty+a.y*s.d)*r+"px",i.style.width=a.width*s.a*t+"px",i.style.height=a.height*s.d*r+"px"):(a=o.getBounds(),this.capHitArea(a),i.style.left=a.x*t+"px",i.style.top=a.y*r+"px",i.style.width=a.width*t+"px",i.style.height=a.height*r+"px",i.title!==o.accessibleTitle&&null!==o.accessibleTitle&&(i.title=o.accessibleTitle),i.getAttribute("aria-label")!==o.accessibleHint&&null!==o.accessibleHint&&i.setAttribute("aria-label",o.accessibleHint))}}this.renderId++}},r.prototype.capHitArea=function(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0),e.x+e.width>this.renderer.width&&(e.width=this.renderer.width-e.x),e.y+e.height>this.renderer.height&&(e.height=this.renderer.height-e.y)},r.prototype.addChild=function(e){var t=this.pool.pop();t||((t=document.createElement("button")).style.width="100px",t.style.height="100px",t.style.backgroundColor=this.debug?"rgba(255,0,0,0.5)":"transparent",t.style.position="absolute",t.style.zIndex=2,t.style.borderStyle="none",-1<navigator.userAgent.toLowerCase().indexOf("chrome")?t.setAttribute("aria-live","off"):t.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?t.setAttribute("aria-relevant","additions"):t.setAttribute("aria-relevant","text"),t.addEventListener("click",this._onClick.bind(this)),t.addEventListener("focus",this._onFocus.bind(this)),t.addEventListener("focusout",this._onFocusOut.bind(this))),e.accessibleTitle&&null!==e.accessibleTitle?t.title=e.accessibleTitle:e.accessibleHint&&null!==e.accessibleHint||(t.title="displayObject "+e.tabIndex),e.accessibleHint&&null!==e.accessibleHint&&t.setAttribute("aria-label",e.accessibleHint),e._accessibleActive=!0,(e._accessibleDiv=t).displayObject=e,this.children.push(e),this.div.appendChild(e._accessibleDiv),e._accessibleDiv.tabIndex=e.tabIndex},r.prototype._onClick=function(e){var t=this.renderer.plugins.interaction;t.dispatchEvent(e.target.displayObject,"click",t.eventData)},r.prototype._onFocus=function(e){e.target.getAttribute("aria-live","off")||e.target.setAttribute("aria-live","assertive");var t=this.renderer.plugins.interaction;t.dispatchEvent(e.target.displayObject,"mouseover",t.eventData)},r.prototype._onFocusOut=function(e){e.target.getAttribute("aria-live","off")||e.target.setAttribute("aria-live","polite");var t=this.renderer.plugins.interaction;t.dispatchEvent(e.target.displayObject,"mouseout",t.eventData)},r.prototype._onKeyDown=function(e){9===e.keyCode&&this.activate()},r.prototype._onMouseMove=function(e){0===e.movementX&&0===e.movementY||this.deactivate()},r.prototype.destroy=function(){this.div=null;for(var e=0;e<this.children.length;e++)this.children[e].div=null;window.document.removeEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},r}();r.default=a,u.WebGLRenderer.registerPlugin("accessibility",a),u.CanvasRenderer.registerPlugin("accessibility",a)},{"../core":65,"./accessibleTarget":41,ismobilejs:4}],41:[function(e,t,r){"use strict";r.__esModule=!0,r.default={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:!1}},{}],42:[function(e,t,r){"use strict";r.__esModule=!0;var i=e("./accessibleTarget");Object.defineProperty(r,"accessibleTarget",{enumerable:!0,get:function(){return o(i).default}});var n=e("./AccessibilityManager");function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"AccessibilityManager",{enumerable:!0,get:function(){return o(n).default}})},{"./AccessibilityManager":40,"./accessibleTarget":41}],43:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),a=e("./autoDetectRenderer"),s=o(e("./display/Container")),u=e("./ticker"),c=o(e("./settings")),n=e("./const");function o(e){return e&&e.__esModule?e:{default:e}}var l=function(){function o(e,t,r,i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),"number"==typeof e&&(e=Object.assign({width:e,height:t||c.default.RENDER_OPTIONS.height,forceCanvas:!!i,sharedTicker:!!n},r)),this._options=e=Object.assign({autoStart:!0,sharedTicker:!1,forceCanvas:!1,sharedLoader:!1},e),this.renderer=(0,a.autoDetectRenderer)(e),this.stage=new s.default,this._ticker=null,this.ticker=e.sharedTicker?u.shared:new u.Ticker,e.autoStart&&this.start()}return o.prototype.render=function(){this.renderer.render(this.stage)},o.prototype.stop=function(){this._ticker.stop()},o.prototype.start=function(){this._ticker.start()},o.prototype.destroy=function(e,t){if(this._ticker){var r=this._ticker;this.ticker=null,r.destroy()}this.stage.destroy(t),this.stage=null,this.renderer.destroy(e),this.renderer=null,this._options=null},i(o,[{key:"ticker",set:function(e){this._ticker&&this._ticker.remove(this.render,this),(this._ticker=e)&&e.add(this.render,this,n.UPDATE_PRIORITY.LOW)},get:function(){return this._ticker}},{key:"view",get:function(){return this.renderer.view}},{key:"screen",get:function(){return this.renderer.screen}}]),o}();r.default=l},{"./autoDetectRenderer":45,"./const":46,"./display/Container":48,"./settings":101,"./ticker":121}],44:[function(e,t,r){"use strict";r.__esModule=!0;var i,n=e("pixi-gl-core"),o=e("./settings"),s=(i=o)&&i.__esModule?i:{default:i};function u(e,t){if(e instanceof Array){if("precision"!==e[0].substring(0,9)){var r=e.slice(0);return r.unshift("precision "+t+" float;"),r}}else if("precision"!==e.trim().substring(0,9))return"precision "+t+" float;\n"+e;return e}var a=function(o){function a(e,t,r,i,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,o.call(this,e,u(t,n||s.default.PRECISION_VERTEX),u(r,n||s.default.PRECISION_FRAGMENT),void 0,i))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(a,o),a}(n.GLShader);r.default=a},{"./settings":101,"pixi-gl-core":15}],45:[function(e,t,r){"use strict";r.__esModule=!0,r.autoDetectRenderer=function(e,t,r,i){var n=e&&e.forceCanvas;void 0!==i&&(n=i);return n||!o.isWebGLSupported()?new a.default(e,t,r):new s.default(e,t,r)};var o=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("./utils")),a=i(e("./renderers/canvas/CanvasRenderer")),s=i(e("./renderers/webgl/WebGLRenderer"));function i(e){return e&&e.__esModule?e:{default:e}}},{"./renderers/canvas/CanvasRenderer":77,"./renderers/webgl/WebGLRenderer":84,"./utils":125}],46:[function(e,t,r){"use strict";r.__esModule=!0;r.VERSION="4.8.7",r.PI_2=2*Math.PI,r.RAD_TO_DEG=180/Math.PI,r.DEG_TO_RAD=Math.PI/180,r.RENDERER_TYPE={UNKNOWN:0,WEBGL:1,CANVAS:2},r.BLEND_MODES={NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,NORMAL_NPM:17,ADD_NPM:18,SCREEN_NPM:19},r.DRAW_MODES={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},r.SCALE_MODES={LINEAR:0,NEAREST:1},r.WRAP_MODES={CLAMP:0,REPEAT:1,MIRRORED_REPEAT:2},r.GC_MODES={AUTO:0,MANUAL:1},r.URL_FILE_EXTENSION=/\.(\w{3,4})(?:$|\?|#)/i,r.DATA_URI=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i,r.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,r.SHAPES={POLY:0,RECT:1,CIRC:2,ELIP:3,RREC:4},r.PRECISION={LOW:"lowp",MEDIUM:"mediump",HIGH:"highp"},r.TRANSFORM_MODE={STATIC:0,DYNAMIC:1},r.TEXT_GRADIENT={LINEAR_VERTICAL:0,LINEAR_HORIZONTAL:1},r.UPDATE_PRIORITY={INTERACTION:50,HIGH:25,NORMAL:0,LOW:-25,UTILITY:-50}},{}],47:[function(e,t,r){"use strict";r.__esModule=!0;var i=e("../math");var n=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null}return e.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},e.prototype.clear=function(){this.updateID++,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},e.prototype.getRectangle=function(e){return this.minX>this.maxX||this.minY>this.maxY?i.Rectangle.EMPTY:((e=e||new i.Rectangle(0,0,1,1)).x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)},e.prototype.addPoint=function(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)},e.prototype.addQuad=function(e){var t=this.minX,r=this.minY,i=this.maxX,n=this.maxY,o=e[0],a=e[1];t=o<t?o:t,r=a<r?a:r,i=i<o?o:i,n=n<a?a:n,t=(o=e[2])<t?o:t,r=(a=e[3])<r?a:r,i=i<o?o:i,n=n<a?a:n,t=(o=e[4])<t?o:t,r=(a=e[5])<r?a:r,i=i<o?o:i,n=n<a?a:n,t=(o=e[6])<t?o:t,r=(a=e[7])<r?a:r,i=i<o?o:i,n=n<a?a:n,this.minX=t,this.minY=r,this.maxX=i,this.maxY=n},e.prototype.addFrame=function(e,t,r,i,n){var o=e.worldTransform,a=o.a,s=o.b,u=o.c,c=o.d,l=o.tx,f=o.ty,h=this.minX,d=this.minY,p=this.maxX,v=this.maxY,m=a*t+u*r+l,b=s*t+c*r+f;h=m<h?m:h,d=b<d?b:d,p=p<m?m:p,v=v<b?b:v,h=(m=a*i+u*r+l)<h?m:h,d=(b=s*i+c*r+f)<d?b:d,p=p<m?m:p,v=v<b?b:v,h=(m=a*t+u*n+l)<h?m:h,d=(b=s*t+c*n+f)<d?b:d,p=p<m?m:p,v=v<b?b:v,h=(m=a*i+u*n+l)<h?m:h,d=(b=s*i+c*n+f)<d?b:d,p=p<m?m:p,v=v<b?b:v,this.minX=h,this.minY=d,this.maxX=p,this.maxY=v},e.prototype.addVertices=function(e,t,r,i){for(var n=e.worldTransform,o=n.a,a=n.b,s=n.c,u=n.d,c=n.tx,l=n.ty,f=this.minX,h=this.minY,d=this.maxX,p=this.maxY,v=r;v<i;v+=2){var m=t[v],b=t[v+1],y=o*m+s*b+c,g=u*b+a*m+l;f=y<f?y:f,h=g<h?g:h,d=d<y?y:d,p=p<g?g:p}this.minX=f,this.minY=h,this.maxX=d,this.maxY=p},e.prototype.addBounds=function(e){var t=this.minX,r=this.minY,i=this.maxX,n=this.maxY;this.minX=e.minX<t?e.minX:t,this.minY=e.minY<r?e.minY:r,this.maxX=e.maxX>i?e.maxX:i,this.maxY=e.maxY>n?e.maxY:n},e.prototype.addBoundsMask=function(e,t){var r=e.minX>t.minX?e.minX:t.minX,i=e.minY>t.minY?e.minY:t.minY,n=e.maxX<t.maxX?e.maxX:t.maxX,o=e.maxY<t.maxY?e.maxY:t.maxY;if(r<=n&&i<=o){var a=this.minX,s=this.minY,u=this.maxX,c=this.maxY;this.minX=r<a?r:a,this.minY=i<s?i:s,this.maxX=u<n?n:u,this.maxY=c<o?o:c}},e.prototype.addBoundsArea=function(e,t){var r=e.minX>t.x?e.minX:t.x,i=e.minY>t.y?e.minY:t.y,n=e.maxX<t.x+t.width?e.maxX:t.x+t.width,o=e.maxY<t.y+t.height?e.maxY:t.y+t.height;if(r<=n&&i<=o){var a=this.minX,s=this.minY,u=this.maxX,c=this.maxY;this.minX=r<a?r:a,this.minY=i<s?i:s,this.maxX=u<n?n:u,this.maxY=c<o?o:c}},e}();r.default=n},{"../math":70}],48:[function(e,t,r){"use strict";r.__esModule=!0;var i,o=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),a=e("../utils"),n=e("./DisplayObject");var s=function(n){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,n.call(this));return e.children=[],e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n),t.prototype.onChildrenChange=function(){},t.prototype.addChild=function(e){var t=arguments.length;if(1<t)for(var r=0;r<t;r++)this.addChild(arguments[r]);else e.parent&&e.parent.removeChild(e),e.parent=this,e.transform._parentID=-1,this.children.push(e),this._boundsID++,this.onChildrenChange(this.children.length-1),e.emit("added",this);return e},t.prototype.addChildAt=function(e,t){if(t<0||t>this.children.length)throw new Error(e+"addChildAt: The index "+t+" supplied is out of bounds "+this.children.length);return e.parent&&e.parent.removeChild(e),e.parent=this,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),e},t.prototype.swapChildren=function(e,t){if(e!==t){var r=this.getChildIndex(e),i=this.getChildIndex(t);this.children[r]=t,this.children[i]=e,this.onChildrenChange(r<i?r:i)}},t.prototype.getChildIndex=function(e){var t=this.children.indexOf(e);if(-1===t)throw new Error("The supplied DisplayObject must be a child of the caller");return t},t.prototype.setChildIndex=function(e,t){if(t<0||t>=this.children.length)throw new Error("The index "+t+" supplied is out of bounds "+this.children.length);var r=this.getChildIndex(e);(0,a.removeItems)(this.children,r,1),this.children.splice(t,0,e),this.onChildrenChange(t)},t.prototype.getChildAt=function(e){if(e<0||e>=this.children.length)throw new Error("getChildAt: Index ("+e+") does not exist.");return this.children[e]},t.prototype.removeChild=function(e){var t=arguments.length;if(1<t)for(var r=0;r<t;r++)this.removeChild(arguments[r]);else{var i=this.children.indexOf(e);if(-1===i)return null;e.parent=null,e.transform._parentID=-1,(0,a.removeItems)(this.children,i,1),this._boundsID++,this.onChildrenChange(i),e.emit("removed",this)}return e},t.prototype.removeChildAt=function(e){var t=this.getChildAt(e);return t.parent=null,t.transform._parentID=-1,(0,a.removeItems)(this.children,e,1),this._boundsID++,this.onChildrenChange(e),t.emit("removed",this),t},t.prototype.removeChildren=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=arguments[1],r=e,i="number"==typeof t?t:this.children.length,n=i-r,o=void 0;if(0<n&&n<=i){o=this.children.splice(r,n);for(var a=0;a<o.length;++a)o[a].parent=null,o[a].transform&&(o[a].transform._parentID=-1);this._boundsID++,this.onChildrenChange(e);for(var s=0;s<o.length;++s)o[s].emit("removed",this);return o}if(0==n&&0===this.children.length)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},t.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var e=0,t=this.children.length;e<t;++e){var r=this.children[e];r.visible&&r.updateTransform()}},t.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var e=0;e<this.children.length;e++){var t=this.children[e];t.visible&&t.renderable&&(t.calculateBounds(),t._mask?(t._mask.calculateBounds(),this._bounds.addBoundsMask(t._bounds,t._mask._bounds)):t.filterArea?this._bounds.addBoundsArea(t._bounds,t.filterArea):this._bounds.addBounds(t._bounds))}this._lastBoundsID=this._boundsID},t.prototype._calculateBounds=function(){},t.prototype.renderWebGL=function(e){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this._filters)this.renderAdvancedWebGL(e);else{this._renderWebGL(e);for(var t=0,r=this.children.length;t<r;++t)this.children[t].renderWebGL(e)}},t.prototype.renderAdvancedWebGL=function(e){e.flush();var t=this._filters,r=this._mask;if(t){this._enabledFilters||(this._enabledFilters=[]);for(var i=this._enabledFilters.length=0;i<t.length;i++)t[i].enabled&&this._enabledFilters.push(t[i]);this._enabledFilters.length&&e.filterManager.pushFilter(this,this._enabledFilters)}r&&e.maskManager.pushMask(this,this._mask),this._renderWebGL(e);for(var n=0,o=this.children.length;n<o;n++)this.children[n].renderWebGL(e);e.flush(),r&&e.maskManager.popMask(this,this._mask),t&&this._enabledFilters&&this._enabledFilters.length&&e.filterManager.popFilter()},t.prototype._renderWebGL=function(e){},t.prototype._renderCanvas=function(e){},t.prototype.renderCanvas=function(e){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable){this._mask&&e.maskManager.pushMask(this._mask),this._renderCanvas(e);for(var t=0,r=this.children.length;t<r;++t)this.children[t].renderCanvas(e);this._mask&&e.maskManager.popMask(e)}},t.prototype.destroy=function(e){n.prototype.destroy.call(this);var t="boolean"==typeof e?e:e&&e.children,r=this.removeChildren(0,this.children.length);if(t)for(var i=0;i<r.length;++i)r[i].destroy(e)},o(t,[{key:"width",get:function(){return this.scale.x*this.getLocalBounds().width},set:function(e){var t=this.getLocalBounds().width;this.scale.x=0!==t?e/t:1,this._width=e}},{key:"height",get:function(){return this.scale.y*this.getLocalBounds().height},set:function(e){var t=this.getLocalBounds().height;this.scale.y=0!==t?e/t:1,this._height=e}}]),t}(((i=n)&&i.__esModule?i:{default:i}).default);(r.default=s).prototype.containerUpdateTransform=s.prototype.updateTransform},{"../utils":125,"./DisplayObject":49}],49:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),i=f(e("eventemitter3")),o=e("../const"),a=f(e("../settings")),s=f(e("./TransformStatic")),u=f(e("./Transform")),c=f(e("./Bounds")),l=e("../math");function f(e){return e&&e.__esModule?e:{default:e}}var h=function(r){function i(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,r.call(this)),t=a.default.TRANSFORM_MODE===o.TRANSFORM_MODE.STATIC?s.default:u.default;return e.tempDisplayObjectParent=null,e.transform=new t,e.alpha=1,e.visible=!0,e.renderable=!0,e.parent=null,e.worldAlpha=1,e.filterArea=null,e._filters=null,e._enabledFilters=null,e._bounds=new c.default,e._boundsID=0,e._lastBoundsID=-1,e._boundsRect=null,e._localBoundsRect=null,e._mask=null,e._destroyed=!1,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),i.prototype.updateTransform=function(){this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha,this._bounds.updateID++},i.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},i.prototype.getBounds=function(e,t){return e||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._boundsID!==this._lastBoundsID&&this.calculateBounds(),t||(this._boundsRect||(this._boundsRect=new l.Rectangle),t=this._boundsRect),this._bounds.getRectangle(t)},i.prototype.getLocalBounds=function(e){var t=this.transform,r=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform,e||(this._localBoundsRect||(this._localBoundsRect=new l.Rectangle),e=this._localBoundsRect);var i=this.getBounds(!1,e);return this.parent=r,this.transform=t,i},i.prototype.toGlobal=function(e,t){return 2<arguments.length&&void 0!==arguments[2]&&arguments[2]||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(e,t)},i.prototype.toLocal=function(e,t,r,i){return t&&(e=t.toGlobal(e,r,i)),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(e,r)},i.prototype.renderWebGL=function(e){},i.prototype.renderCanvas=function(e){},i.prototype.setParent=function(e){if(!e||!e.addChild)throw new Error("setParent: Argument must be a Container");return e.addChild(this),e},i.prototype.setTransform=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1,n=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0,a=6<arguments.length&&void 0!==arguments[6]?arguments[6]:0,s=7<arguments.length&&void 0!==arguments[7]?arguments[7]:0,u=8<arguments.length&&void 0!==arguments[8]?arguments[8]:0;return this.position.x=e,this.position.y=t,this.scale.x=r||1,this.scale.y=i||1,this.rotation=n,this.skew.x=o,this.skew.y=a,this.pivot.x=s,this.pivot.y=u,this},i.prototype.destroy=function(){this.removeAllListeners(),this.parent&&this.parent.removeChild(this),this.transform=null,this.parent=null,this._bounds=null,this._currentBounds=null,this._mask=null,this.filterArea=null,this.interactive=!1,this.interactiveChildren=!1,this._destroyed=!0},n(i,[{key:"_tempDisplayObjectParent",get:function(){return null===this.tempDisplayObjectParent&&(this.tempDisplayObjectParent=new i),this.tempDisplayObjectParent}},{key:"x",get:function(){return this.position.x},set:function(e){this.transform.position.x=e}},{key:"y",get:function(){return this.position.y},set:function(e){this.transform.position.y=e}},{key:"worldTransform",get:function(){return this.transform.worldTransform}},{key:"localTransform",get:function(){return this.transform.localTransform}},{key:"position",get:function(){return this.transform.position},set:function(e){this.transform.position.copy(e)}},{key:"scale",get:function(){return this.transform.scale},set:function(e){this.transform.scale.copy(e)}},{key:"pivot",get:function(){return this.transform.pivot},set:function(e){this.transform.pivot.copy(e)}},{key:"skew",get:function(){return this.transform.skew},set:function(e){this.transform.skew.copy(e)}},{key:"rotation",get:function(){return this.transform.rotation},set:function(e){this.transform.rotation=e}},{key:"worldVisible",get:function(){var e=this;do{if(!e.visible)return!1;e=e.parent}while(e);return!0}},{key:"mask",get:function(){return this._mask},set:function(e){this._mask&&(this._mask.renderable=!0,this._mask.isMask=!1),this._mask=e,this._mask&&(this._mask.renderable=!1,this._mask.isMask=!0)}},{key:"filters",get:function(){return this._filters&&this._filters.slice()},set:function(e){this._filters=e&&e.slice()}}]),i}(i.default);(r.default=h).prototype.displayObjectUpdateTransform=h.prototype.updateTransform},{"../const":46,"../math":70,"../settings":101,"./Bounds":47,"./Transform":50,"./TransformStatic":52,eventemitter3:3}],50:[function(e,t,r){"use strict";r.__esModule=!0;var i,n=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),o=e("../math"),a=e("./TransformBase");var s=function(t){function r(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,t.call(this));return e.position=new o.Point(0,0),e.scale=new o.Point(1,1),e.skew=new o.ObservablePoint(e.updateSkew,e,0,0),e.pivot=new o.Point(0,0),e._rotation=0,e._cx=1,e._sx=0,e._cy=0,e._sy=1,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,t),r.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew._y),this._sx=Math.sin(this._rotation+this.skew._y),this._cy=-Math.sin(this._rotation-this.skew._x),this._sy=Math.cos(this._rotation-this.skew._x)},r.prototype.updateLocalTransform=function(){var e=this.localTransform;e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d)},r.prototype.updateTransform=function(e){var t=this.localTransform;t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d);var r=e.worldTransform,i=this.worldTransform;i.a=t.a*r.a+t.b*r.c,i.b=t.a*r.b+t.b*r.d,i.c=t.c*r.a+t.d*r.c,i.d=t.c*r.b+t.d*r.d,i.tx=t.tx*r.a+t.ty*r.c+r.tx,i.ty=t.tx*r.b+t.ty*r.d+r.ty,this._worldID++},r.prototype.setFromMatrix=function(e){e.decompose(this)},n(r,[{key:"rotation",get:function(){return this._rotation},set:function(e){this._rotation=e,this.updateSkew()}}]),r}(((i=a)&&i.__esModule?i:{default:i}).default);r.default=s},{"../math":70,"./TransformBase":51}],51:[function(e,t,r){"use strict";r.__esModule=!0;var i=e("../math");var n=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.worldTransform=new i.Matrix,this.localTransform=new i.Matrix,this._worldID=0,this._parentID=0}return e.prototype.updateLocalTransform=function(){},e.prototype.updateTransform=function(e){var t=e.worldTransform,r=this.worldTransform,i=this.localTransform;r.a=i.a*t.a+i.b*t.c,r.b=i.a*t.b+i.b*t.d,r.c=i.c*t.a+i.d*t.c,r.d=i.c*t.b+i.d*t.d,r.tx=i.tx*t.a+i.ty*t.c+t.tx,r.ty=i.tx*t.b+i.ty*t.d+t.ty,this._worldID++},e}();(r.default=n).prototype.updateWorldTransform=n.prototype.updateTransform,n.IDENTITY=new n},{"../math":70}],52:[function(e,t,r){"use strict";r.__esModule=!0;var i,n=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),o=e("../math"),a=e("./TransformBase");var s=function(t){function r(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,t.call(this));return e.position=new o.ObservablePoint(e.onChange,e,0,0),e.scale=new o.ObservablePoint(e.onChange,e,1,1),e.pivot=new o.ObservablePoint(e.onChange,e,0,0),e.skew=new o.ObservablePoint(e.updateSkew,e,0,0),e._rotation=0,e._cx=1,e._sx=0,e._cy=0,e._sy=1,e._localID=0,e._currentLocalID=0,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,t),r.prototype.onChange=function(){this._localID++},r.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew._y),this._sx=Math.sin(this._rotation+this.skew._y),this._cy=-Math.sin(this._rotation-this.skew._x),this._sy=Math.cos(this._rotation-this.skew._x),this._localID++},r.prototype.updateLocalTransform=function(){var e=this.localTransform;this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale._x,e.b=this._sx*this.scale._x,e.c=this._cy*this.scale._y,e.d=this._sy*this.scale._y,e.tx=this.position._x-(this.pivot._x*e.a+this.pivot._y*e.c),e.ty=this.position._y-(this.pivot._x*e.b+this.pivot._y*e.d),this._currentLocalID=this._localID,this._parentID=-1)},r.prototype.updateTransform=function(e){var t=this.localTransform;if(this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale._x,t.b=this._sx*this.scale._x,t.c=this._cy*this.scale._y,t.d=this._sy*this.scale._y,t.tx=this.position._x-(this.pivot._x*t.a+this.pivot._y*t.c),t.ty=this.position._y-(this.pivot._x*t.b+this.pivot._y*t.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==e._worldID){var r=e.worldTransform,i=this.worldTransform;i.a=t.a*r.a+t.b*r.c,i.b=t.a*r.b+t.b*r.d,i.c=t.c*r.a+t.d*r.c,i.d=t.c*r.b+t.d*r.d,i.tx=t.tx*r.a+t.ty*r.c+r.tx,i.ty=t.tx*r.b+t.ty*r.d+r.ty,this._parentID=e._worldID,this._worldID++}},r.prototype.setFromMatrix=function(e){e.decompose(this),this._localID++},n(r,[{key:"rotation",get:function(){return this._rotation},set:function(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())}}]),r}(((i=a)&&i.__esModule?i:{default:i}).default);r.default=s},{"../math":70,"./TransformBase":51}],53:[function(e,t,r){"use strict";r.__esModule=!0;var i=n(e("../display/Container")),o=n(e("../textures/RenderTexture")),a=n(e("../textures/Texture")),s=n(e("./GraphicsData")),u=n(e("../sprites/Sprite")),c=e("../math"),l=e("../utils"),S=e("../const"),f=n(e("../display/Bounds")),h=n(e("./utils/bezierCurveTo")),d=n(e("../renderers/canvas/CanvasRenderer"));function n(e){return e&&e.__esModule?e:{default:e}}var p=void 0,v=new c.Matrix,m=new c.Point,b=new Float32Array(4),y=new Float32Array(4),g=function(n){function T(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,T);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,n.call(this));return t.fillAlpha=1,t.lineWidth=0,t.nativeLines=e,t.lineColor=0,t.lineAlignment=.5,t.graphicsData=[],t.tint=16777215,t._prevTint=16777215,t.blendMode=S.BLEND_MODES.NORMAL,t.currentPath=null,t._webGL={},t.isMask=!1,t.boundsPadding=0,t._localBounds=new f.default,t.dirty=0,t.fastRectDirty=-1,t.clearDirty=0,t.boundsDirty=-1,t.cachedSpriteDirty=!1,t._spriteRect=null,t._fastRect=!1,t._prevRectTint=null,t._prevRectFillColor=null,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(T,n),T.prototype.clone=function(){var e=new T;e.renderable=this.renderable,e.fillAlpha=this.fillAlpha,e.lineWidth=this.lineWidth,e.lineColor=this.lineColor,e.lineAlignment=this.lineAlignment,e.tint=this.tint,e.blendMode=this.blendMode,e.isMask=this.isMask,e.boundsPadding=this.boundsPadding,e.dirty=0,e.cachedSpriteDirty=this.cachedSpriteDirty;for(var t=0;t<this.graphicsData.length;++t)e.graphicsData.push(this.graphicsData[t].clone());return e.currentPath=e.graphicsData[e.graphicsData.length-1],e.updateLocalBounds(),e},T.prototype._quadraticCurveLength=function(e,t,r,i,n,o){var a=e-2*r+n,s=t-2*i+o,u=2*r-2*e,c=2*i-2*t,l=4*(a*a+s*s),f=4*(a*u+s*c),h=u*u+c*c,d=2*Math.sqrt(l+f+h),p=Math.sqrt(l),v=2*l*p,m=2*Math.sqrt(h),b=f/p;return(v*d+p*f*(d-m)+(4*h*l-f*f)*Math.log((2*p+b+d)/(b+m)))/(4*v)},T.prototype._bezierCurveLength=function(e,t,r,i,n,o,a,s){for(var u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0,g=e,_=t,w=1;w<=10;++w)b=g-(v=(p=(d=(h=1-(c=w/10))*h)*h)*e+3*d*c*r+3*h*(l=c*c)*n+(f=l*c)*a),y=_-(m=p*t+3*d*c*i+3*h*l*o+f*s),g=v,_=m,u+=Math.sqrt(b*b+y*y);return u},T.prototype._segmentsCount=function(e){var t=Math.ceil(e/T.CURVES.maxLength);return t<T.CURVES.minSegments?t=T.CURVES.minSegments:t>T.CURVES.maxSegments&&(t=T.CURVES.maxSegments),t},T.prototype.lineStyle=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:.5;if(this.lineWidth=e,this.lineColor=t,this.lineAlpha=r,this.lineAlignment=i,this.currentPath)if(this.currentPath.shape.points.length){var n=new c.Polygon(this.currentPath.shape.points.slice(-2));n.closed=!1,this.drawShape(n)}else this.currentPath.lineWidth=this.lineWidth,this.currentPath.lineColor=this.lineColor,this.currentPath.lineAlpha=this.lineAlpha,this.currentPath.lineAlignment=this.lineAlignment;return this},T.prototype.moveTo=function(e,t){var r=new c.Polygon([e,t]);return r.closed=!1,this.drawShape(r),this},T.prototype.lineTo=function(e,t){var r=this.currentPath.shape.points,i=r[r.length-2],n=r[r.length-1];return i===e&&n===t||(r.push(e,t),this.dirty++),this},T.prototype.quadraticCurveTo=function(e,t,r,i){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var n=this.currentPath.shape.points,o=0,a=0;0===n.length&&this.moveTo(0,0);for(var s=n[n.length-2],u=n[n.length-1],c=T.CURVES.adaptive?this._segmentsCount(this._quadraticCurveLength(s,u,e,t,r,i)):20,l=1;l<=c;++l){var f=l/c;o=s+(e-s)*f,a=u+(t-u)*f,n.push(o+(e+(r-e)*f-o)*f,a+(t+(i-t)*f-a)*f)}return this.dirty++,this},T.prototype.bezierCurveTo=function(e,t,r,i,n,o){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var a=this.currentPath.shape.points,s=a[a.length-2],u=a[a.length-1];a.length-=2;var c=T.CURVES.adaptive?this._segmentsCount(this._bezierCurveLength(s,u,e,t,r,i,n,o)):20;return(0,h.default)(s,u,e,t,r,i,n,o,c,a),this.dirty++,this},T.prototype.arcTo=function(e,t,r,i,n){this.currentPath?0===this.currentPath.shape.points.length&&this.currentPath.shape.points.push(e,t):this.moveTo(e,t);var o=this.currentPath.shape.points,a=o[o.length-2],s=o[o.length-1]-t,u=a-e,c=i-t,l=r-e,f=Math.abs(s*l-u*c);if(f<1e-8||0===n)o[o.length-2]===e&&o[o.length-1]===t||o.push(e,t);else{var h=s*s+u*u,d=c*c+l*l,p=s*c+u*l,v=n*Math.sqrt(h)/f,m=n*Math.sqrt(d)/f,b=v*p/h,y=m*p/d,g=v*l+m*u,_=v*c+m*s,w=u*(m+b),x=s*(m+b),T=l*(v+y),S=c*(v+y),M=Math.atan2(x-_,w-g),P=Math.atan2(S-_,T-g);this.arc(g+e,_+t,n,M,P,l*s<u*c)}return this.dirty++,this},T.prototype.arc=function(e,t,r,i,n){var o=5<arguments.length&&void 0!==arguments[5]&&arguments[5];if(i===n)return this;!o&&n<=i?n+=S.PI_2:o&&i<=n&&(i+=S.PI_2);var a=n-i,s=T.CURVES.adaptive?this._segmentsCount(Math.abs(a)*r):40*Math.ceil(Math.abs(a)/S.PI_2);if(0==a)return this;var u=e+Math.cos(i)*r,c=t+Math.sin(i)*r,l=this.currentPath?this.currentPath.shape.points:null;if(l){var f=Math.abs(l[l.length-2]-u),h=Math.abs(l[l.length-1]-c);f<.001&&h<.001||l.push(u,c)}else this.moveTo(u,c),l=this.currentPath.shape.points;for(var d=a/(2*s),p=2*d,v=Math.cos(d),m=Math.sin(d),b=s-1,y=b%1/b,g=0;g<=b;++g){var _=d+i+p*(g+y*g),w=Math.cos(_),x=-Math.sin(_);l.push((v*w+m*x)*r+e,(v*-x+m*w)*r+t)}return this.dirty++,this},T.prototype.beginFill=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;return this.filling=!0,this.fillColor=e,this.fillAlpha=t,this.currentPath&&this.currentPath.shape.points.length<=2&&(this.currentPath.fill=this.filling,this.currentPath.fillColor=this.fillColor,this.currentPath.fillAlpha=this.fillAlpha),this},T.prototype.endFill=function(){return this.filling=!1,this.fillColor=null,this.fillAlpha=1,this},T.prototype.drawRect=function(e,t,r,i){return this.drawShape(new c.Rectangle(e,t,r,i)),this},T.prototype.drawRoundedRect=function(e,t,r,i,n){return this.drawShape(new c.RoundedRectangle(e,t,r,i,n)),this},T.prototype.drawCircle=function(e,t,r){return this.drawShape(new c.Circle(e,t,r)),this},T.prototype.drawEllipse=function(e,t,r,i){return this.drawShape(new c.Ellipse(e,t,r,i)),this},T.prototype.drawPolygon=function(e){var t=e,r=!0;if(t instanceof c.Polygon&&(r=t.closed,t=t.points),!Array.isArray(t)){t=new Array(arguments.length);for(var i=0;i<t.length;++i)t[i]=arguments[i]}var n=new c.Polygon(t);return n.closed=r,this.drawShape(n),this},T.prototype.drawStar=function(e,t,r,i,n){var o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;n=n||i/2;for(var a=-1*Math.PI/2+o,s=2*r,u=S.PI_2/s,c=[],l=0;l<s;l++){var f=l%2?n:i,h=l*u+a;c.push(e+f*Math.cos(h),t+f*Math.sin(h))}return this.drawPolygon(c)},T.prototype.clear=function(){return(this.lineWidth||this.filling||0<this.graphicsData.length)&&(this.lineWidth=0,this.lineAlignment=.5,this.filling=!1,this.boundsDirty=-1,this.canvasTintDirty=-1,this.dirty++,this.clearDirty++,this.graphicsData.length=0),this.currentPath=null,this._spriteRect=null,this},T.prototype.isFastRect=function(){return 1===this.graphicsData.length&&this.graphicsData[0].shape.type===S.SHAPES.RECT&&!this.graphicsData[0].lineWidth},T.prototype._renderWebGL=function(e){this.dirty!==this.fastRectDirty&&(this.fastRectDirty=this.dirty,this._fastRect=this.isFastRect()),this._fastRect?this._renderSpriteRect(e):(e.setObjectRenderer(e.plugins.graphics),e.plugins.graphics.render(this))},T.prototype._renderSpriteRect=function(e){var t=this.graphicsData[0].shape;this._spriteRect||(this._spriteRect=new u.default(new a.default(a.default.WHITE)));var r=this._spriteRect,i=this.graphicsData[0].fillColor;if(16777215===this.tint)r.tint=i;else if(this.tint!==this._prevRectTint||i!==this._prevRectFillColor){var n=b,o=y;(0,l.hex2rgb)(i,n),(0,l.hex2rgb)(this.tint,o),n[0]*=o[0],n[1]*=o[1],n[2]*=o[2],r.tint=(0,l.rgb2hex)(n),this._prevRectTint=this.tint,this._prevRectFillColor=i}r.alpha=this.graphicsData[0].fillAlpha,r.worldAlpha=this.worldAlpha*r.alpha,r.blendMode=this.blendMode,r._texture._frame.width=t.width,r._texture._frame.height=t.height,r.transform.worldTransform=this.transform.worldTransform,r.anchor.set(-t.x/t.width,-t.y/t.height),r._onAnchorUpdate(),r._renderWebGL(e)},T.prototype._renderCanvas=function(e){!0!==this.isMask&&e.plugins.graphics.render(this)},T.prototype._calculateBounds=function(){this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.updateLocalBounds(),this.cachedSpriteDirty=!0);var e=this._localBounds;this._bounds.addFrame(this.transform,e.minX,e.minY,e.maxX,e.maxY)},T.prototype.containsPoint=function(e){this.worldTransform.applyInverse(e,m);for(var t=this.graphicsData,r=0;r<t.length;++r){var i=t[r];if(i.fill&&(i.shape&&i.shape.contains(m.x,m.y))){if(i.holes)for(var n=0;n<i.holes.length;n++){if(i.holes[n].contains(m.x,m.y))return!1}return!0}}return!1},T.prototype.updateLocalBounds=function(){var e=1/0,t=-1/0,r=1/0,i=-1/0;if(this.graphicsData.length)for(var n=0,o=0,a=0,s=0,u=0,c=0;c<this.graphicsData.length;c++){var l=this.graphicsData[c],f=l.type,h=l.lineWidth*l.lineAlignment;if(n=l.shape,f===S.SHAPES.RECT||f===S.SHAPES.RREC)o=n.x-h,a=n.y-h,e=o<e?o:e,t=t<o+(s=n.width+2*h)?o+s:t,r=a<r?a:r,i=i<a+(u=n.height+2*h)?a+u:i;else if(f===S.SHAPES.CIRC)o=n.x,a=n.y,e=o-(s=n.radius+h)<e?o-s:e,t=t<o+s?o+s:t,r=a-(u=n.radius+h)<r?a-u:r,i=i<a+u?a+u:i;else if(f===S.SHAPES.ELIP)o=n.x,a=n.y,e=o-(s=n.width+h)<e?o-s:e,t=t<o+s?o+s:t,r=a-(u=n.height+h)<r?a-u:r,i=i<a+u?a+u:i;else for(var d=n.points,p=0,v=0,m=0,b=0,y=0,g=0,_=0,w=0,x=0;x+2<d.length;x+=2)o=d[x],a=d[x+1],p=d[x+2],v=d[x+3],m=Math.abs(p-o),b=Math.abs(v-a),u=2*h,(s=Math.sqrt(m*m+b*b))<1e-9||(e=(_=(p+o)/2)-(y=(u/s*b+m)/2)<e?_-y:e,t=t<_+y?_+y:t,r=(w=(v+a)/2)-(g=(u/s*m+b)/2)<r?w-g:r,i=i<w+g?w+g:i)}else i=r=t=e=0;var T=this.boundsPadding;this._localBounds.minX=e-T,this._localBounds.maxX=t+T,this._localBounds.minY=r-T,this._localBounds.maxY=i+T},T.prototype.drawShape=function(e){this.currentPath&&this.currentPath.shape.points.length<=2&&this.graphicsData.pop(),this.currentPath=null;var t=new s.default(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.filling,this.nativeLines,e,this.lineAlignment);return this.graphicsData.push(t),t.type===S.SHAPES.POLY&&(t.shape.closed=t.shape.closed,this.currentPath=t),this.dirty++,t},T.prototype.generateCanvasTexture=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1,r=this.getLocalBounds(),i=o.default.create(r.width,r.height,e,t);p||(p=new d.default),this.transform.updateLocalTransform(),this.transform.localTransform.copy(v),v.invert(),v.tx-=r.x,v.ty-=r.y,p.render(this,i,!0,v);var n=a.default.fromCanvas(i.baseTexture._canvasRenderTarget.canvas,e,"graphics");return n.baseTexture.resolution=t,n.baseTexture.update(),n},T.prototype.closePath=function(){var e=this.currentPath;return e&&e.shape&&e.shape.close(),this},T.prototype.addHole=function(){var e=this.graphicsData.pop();return this.currentPath=this.graphicsData[this.graphicsData.length-1],this.currentPath.addHole(e.shape),this.currentPath=null,this},T.prototype.destroy=function(e){n.prototype.destroy.call(this,e);for(var t=0;t<this.graphicsData.length;++t)this.graphicsData[t].destroy();for(var r in this._webGL)for(var i=0;i<this._webGL[r].data.length;++i)this._webGL[r].data[i].destroy();this._spriteRect&&this._spriteRect.destroy(),this.graphicsData=null,this.currentPath=null,this._webGL=null,this._localBounds=null},T}(i.default);(r.default=g)._SPRITE_TEXTURE=null,g.CURVES={adaptive:!1,maxLength:10,minSegments:8,maxSegments:2048}},{"../const":46,"../display/Bounds":47,"../display/Container":48,"../math":70,"../renderers/canvas/CanvasRenderer":77,"../sprites/Sprite":102,"../textures/RenderTexture":113,"../textures/Texture":115,"../utils":125,"./GraphicsData":54,"./utils/bezierCurveTo":56}],54:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function c(e,t,r,i,n,o,a,s,u){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),this.lineWidth=e,this.lineAlignment=u,this.nativeLines=a,this.lineColor=t,this.lineAlpha=r,this._lineTint=t,this.fillColor=i,this.fillAlpha=n,this._fillTint=i,this.fill=o,this.holes=[],this.shape=s,this.type=s.type}return c.prototype.clone=function(){return new c(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.fill,this.nativeLines,this.shape,this.lineAlignment)},c.prototype.addHole=function(e){this.holes.push(e)},c.prototype.destroy=function(){this.shape=null,this.holes=null},c}();r.default=i},{}],55:[function(e,t,r){"use strict";r.__esModule=!0;var i,n=e("../../renderers/canvas/CanvasRenderer"),o=(i=n)&&i.__esModule?i:{default:i},F=e("../../const");var a=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e}return t.prototype.render=function(e){var t=this.renderer,r=t.context,i=e.worldAlpha,n=e.transform.worldTransform,o=t.resolution;r.setTransform(n.a*o,n.b*o,n.c*o,n.d*o,n.tx*o,n.ty*o),e.canvasTintDirty===e.dirty&&e._prevTint===e.tint||this.updateGraphicsTint(e),t.setBlendMode(e.blendMode);for(var a=0;a<e.graphicsData.length;a++){var s=e.graphicsData[a],u=s.shape,c=s._fillTint,l=s._lineTint;if(r.lineWidth=s.lineWidth,s.type===F.SHAPES.POLY){r.beginPath();var f=u.points,h=s.holes,d=void 0,p=void 0;r.moveTo(f[0],f[1]);for(var v=2;v<f.length;v+=2)r.lineTo(f[v],f[v+1]);if(u.closed&&r.closePath(),0<h.length){for(var m=d=0;m<f.length;m+=2)d+=f[m]*f[m+3]-f[m+1]*f[m+2];for(var b=0;b<h.length;b++){f=h[b].points;for(var y=p=0;y<f.length;y+=2)p+=f[y]*f[y+3]-f[y+1]*f[y+2];if(r.moveTo(f[0],f[1]),p*d<0)for(var g=2;g<f.length;g+=2)r.lineTo(f[g],f[g+1]);else for(var _=f.length-2;2<=_;_-=2)r.lineTo(f[_],f[_+1]);h[b].closed&&r.closePath()}}s.fill&&(r.globalAlpha=s.fillAlpha*i,r.fillStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.fill()),s.lineWidth&&(r.globalAlpha=s.lineAlpha*i,r.strokeStyle="#"+("00000"+(0|l).toString(16)).substr(-6),r.stroke())}else if(s.type===F.SHAPES.RECT)(s.fillColor||0===s.fillColor)&&(r.globalAlpha=s.fillAlpha*i,r.fillStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.fillRect(u.x,u.y,u.width,u.height)),s.lineWidth&&(r.globalAlpha=s.lineAlpha*i,r.strokeStyle="#"+("00000"+(0|l).toString(16)).substr(-6),r.strokeRect(u.x,u.y,u.width,u.height));else if(s.type===F.SHAPES.CIRC)r.beginPath(),r.arc(u.x,u.y,u.radius,0,2*Math.PI),r.closePath(),s.fill&&(r.globalAlpha=s.fillAlpha*i,r.fillStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.fill()),s.lineWidth&&(r.globalAlpha=s.lineAlpha*i,r.strokeStyle="#"+("00000"+(0|l).toString(16)).substr(-6),r.stroke());else if(s.type===F.SHAPES.ELIP){var w=2*u.width,x=2*u.height,T=u.x-w/2,S=u.y-x/2;r.beginPath();var M=w/2*.5522848,P=x/2*.5522848,E=T+w,k=S+x,C=T+w/2,A=S+x/2;r.moveTo(T,A),r.bezierCurveTo(T,A-P,C-M,S,C,S),r.bezierCurveTo(C+M,S,E,A-P,E,A),r.bezierCurveTo(E,A+P,C+M,k,C,k),r.bezierCurveTo(C-M,k,T,A+P,T,A),r.closePath(),s.fill&&(r.globalAlpha=s.fillAlpha*i,r.fillStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.fill()),s.lineWidth&&(r.globalAlpha=s.lineAlpha*i,r.strokeStyle="#"+("00000"+(0|l).toString(16)).substr(-6),r.stroke())}else if(s.type===F.SHAPES.RREC){var O=u.x,I=u.y,R=u.width,D=u.height,L=u.radius,j=Math.min(R,D)/2|0;L=j<L?j:L,r.beginPath(),r.moveTo(O,I+L),r.lineTo(O,I+D-L),r.quadraticCurveTo(O,I+D,O+L,I+D),r.lineTo(O+R-L,I+D),r.quadraticCurveTo(O+R,I+D,O+R,I+D-L),r.lineTo(O+R,I+L),r.quadraticCurveTo(O+R,I,O+R-L,I),r.lineTo(O+L,I),r.quadraticCurveTo(O,I,O,I+L),r.closePath(),(s.fillColor||0===s.fillColor)&&(r.globalAlpha=s.fillAlpha*i,r.fillStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.fill()),s.lineWidth&&(r.globalAlpha=s.lineAlpha*i,r.strokeStyle="#"+("00000"+(0|l).toString(16)).substr(-6),r.stroke())}}},t.prototype.updateGraphicsTint=function(e){e._prevTint=e.tint,e.canvasTintDirty=e.dirty;for(var t=(e.tint>>16&255)/255,r=(e.tint>>8&255)/255,i=(255&e.tint)/255,n=0;n<e.graphicsData.length;++n){var o=e.graphicsData[n],a=0|o.fillColor,s=0|o.lineColor;o._fillTint=((a>>16&255)/255*t*255<<16)+((a>>8&255)/255*r*255<<8)+(255&a)/255*i*255,o._lineTint=((s>>16&255)/255*t*255<<16)+((s>>8&255)/255*r*255<<8)+(255&s)/255*i*255}},t.prototype.renderPolygon=function(e,t,r){r.moveTo(e[0],e[1]);for(var i=1;i<e.length/2;++i)r.lineTo(e[2*i],e[2*i+1]);t&&r.closePath()},t.prototype.destroy=function(){this.renderer=null},t}();r.default=a,o.default.registerPlugin("graphics",a)},{"../../const":46,"../../renderers/canvas/CanvasRenderer":77}],56:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t,r,i,n,o,a,s,u){var c=9<arguments.length&&void 0!==arguments[9]?arguments[9]:[],l=0,f=0,h=0,d=0,p=0;c.push(e,t);for(var v=1,m=0;v<=u;++v)h=(f=(l=1-(m=v/u))*l)*l,p=(d=m*m)*m,c.push(h*e+3*f*m*r+3*l*d*n+p*a,h*t+3*f*m*i+3*l*d*o+p*s);return c}},{}],57:[function(e,t,r){"use strict";r.__esModule=!0;var c=e("../../utils"),l=e("../../const"),n=s(e("../../renderers/webgl/utils/ObjectRenderer")),i=s(e("../../renderers/webgl/WebGLRenderer")),o=s(e("./WebGLGraphicsData")),a=s(e("./shaders/PrimitiveShader")),f=s(e("./utils/buildPoly")),h=s(e("./utils/buildRectangle")),d=s(e("./utils/buildRoundedRectangle")),p=s(e("./utils/buildCircle"));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(r){function i(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,r.call(this,e));return t.graphicsDataPool=[],t.primitiveShader=null,t.gl=e.gl,t.CONTEXT_UID=0,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),i.prototype.onContextChange=function(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.primitiveShader=new a.default(this.gl)},i.prototype.destroy=function(){n.default.prototype.destroy.call(this);for(var e=0;e<this.graphicsDataPool.length;++e)this.graphicsDataPool[e].destroy();this.graphicsDataPool=null},i.prototype.render=function(e){var t=this.renderer,r=t.gl,i=void 0,n=e._webGL[this.CONTEXT_UID];n&&e.dirty===n.dirty||(this.updateGraphics(e),n=e._webGL[this.CONTEXT_UID]);var o=this.primitiveShader;t.bindShader(o),t.state.setBlendMode(e.blendMode);for(var a=0,s=n.data.length;a<s;a++){var u=(i=n.data[a]).shader;t.bindShader(u),u.uniforms.translationMatrix=e.transform.worldTransform.toArray(!0),u.uniforms.tint=(0,c.hex2rgb)(e.tint),u.uniforms.alpha=e.worldAlpha,t.bindVao(i.vao),i.nativeLines?r.drawArrays(r.LINES,0,i.points.length/6):i.vao.draw(r.TRIANGLE_STRIP,i.indices.length)}},i.prototype.updateGraphics=function(e){var t=this.renderer.gl,r=e._webGL[this.CONTEXT_UID];if(r||(r=e._webGL[this.CONTEXT_UID]={lastIndex:0,data:[],gl:t,clearDirty:-1,dirty:-1}),r.dirty=e.dirty,e.clearDirty!==r.clearDirty){r.clearDirty=e.clearDirty;for(var i=0;i<r.data.length;i++)this.graphicsDataPool.push(r.data[i]);r.data.length=0,r.lastIndex=0}for(var n=void 0,o=void 0,a=r.lastIndex;a<e.graphicsData.length;a++){var s=e.graphicsData[a];n=this.getWebGLData(r,0),s.nativeLines&&s.lineWidth&&(o=this.getWebGLData(r,0,!0),r.lastIndex++),s.type===l.SHAPES.POLY&&(0,f.default)(s,n,o),s.type===l.SHAPES.RECT?(0,h.default)(s,n,o):s.type===l.SHAPES.CIRC||s.type===l.SHAPES.ELIP?(0,p.default)(s,n,o):s.type===l.SHAPES.RREC&&(0,d.default)(s,n,o),r.lastIndex++}this.renderer.bindVao(null);for(var u=0;u<r.data.length;u++)(n=r.data[u]).dirty&&n.upload()},i.prototype.getWebGLData=function(e,t,r){var i=e.data[e.data.length-1];return(!i||i.nativeLines!==r||32e4<i.points.length)&&((i=this.graphicsDataPool.pop()||new o.default(this.renderer.gl,this.primitiveShader,this.renderer.state.attribsState)).nativeLines=r,i.reset(t),e.data.push(i)),i.dirty=!0,i},i}(n.default);r.default=u,i.default.registerPlugin("graphics",u)},{"../../const":46,"../../renderers/webgl/WebGLRenderer":84,"../../renderers/webgl/utils/ObjectRenderer":94,"../../utils":125,"./WebGLGraphicsData":58,"./shaders/PrimitiveShader":59,"./utils/buildCircle":60,"./utils/buildPoly":62,"./utils/buildRectangle":63,"./utils/buildRoundedRectangle":64}],58:[function(e,t,r){"use strict";r.__esModule=!0;var i,n=e("pixi-gl-core"),o=(i=n)&&i.__esModule?i:{default:i};var a=function(){function i(e,t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.gl=e,this.color=[0,0,0],this.points=[],this.indices=[],this.buffer=o.default.GLBuffer.createVertexBuffer(e),this.indexBuffer=o.default.GLBuffer.createIndexBuffer(e),this.dirty=!0,this.nativeLines=!1,this.glPoints=null,this.glIndices=null,this.shader=t,this.vao=new o.default.VertexArrayObject(e,r).addIndex(this.indexBuffer).addAttribute(this.buffer,t.attributes.aVertexPosition,e.FLOAT,!1,24,0).addAttribute(this.buffer,t.attributes.aColor,e.FLOAT,!1,24,8)}return i.prototype.reset=function(){this.points.length=0,this.indices.length=0},i.prototype.upload=function(){this.glPoints=new Float32Array(this.points),this.buffer.upload(this.glPoints),this.glIndices=new Uint16Array(this.indices),this.indexBuffer.upload(this.glIndices),this.dirty=!1},i.prototype.destroy=function(){this.color=null,this.points=null,this.indices=null,this.vao.destroy(),this.buffer.destroy(),this.indexBuffer.destroy(),this.gl=null,this.buffer=null,this.indexBuffer=null,this.glPoints=null,this.glIndices=null},i}();r.default=a},{"pixi-gl-core":15}],59:[function(e,t,r){"use strict";r.__esModule=!0;var i,n=e("../../../Shader");var o=function(t){function r(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,t.call(this,e,["attribute vec2 aVertexPosition;","attribute vec4 aColor;","uniform mat3 translationMatrix;","uniform mat3 projectionMatrix;","uniform float alpha;","uniform vec3 tint;","varying vec4 vColor;","void main(void){"," gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);"," vColor = aColor * vec4(tint * alpha, alpha);","}"].join("\n"),["varying vec4 vColor;","void main(void){"," gl_FragColor = vColor;","}"].join("\n")))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,t),r}(((i=n)&&i.__esModule?i:{default:i}).default);r.default=o},{"../../../Shader":44}],60:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t,r){var i=e.shape,n=i.x,o=i.y,a=void 0,s=void 0;s=e.type===x.SHAPES.CIRC?(a=i.radius,i.radius):(a=i.width,i.height);if(0===a||0===s)return;var u=Math.floor(30*Math.sqrt(i.radius))||Math.floor(15*Math.sqrt(i.width+i.height)),c=2*Math.PI/u;if(e.fill){var l=(0,T.hex2rgb)(e.fillColor),f=e.fillAlpha,h=l[0]*f,d=l[1]*f,p=l[2]*f,v=t.points,m=t.indices,b=v.length/6;m.push(b);for(var y=0;y<u+1;y++)v.push(n,o,h,d,p,f),v.push(n+Math.sin(c*y)*a,o+Math.cos(c*y)*s,h,d,p,f),m.push(b++,b++);m.push(b-1)}if(e.lineWidth){var g=e.points;e.points=[];for(var _=0;_<u;_++)e.points.push(n+Math.sin(c*-_)*a,o+Math.cos(c*-_)*s);e.points.push(e.points[0],e.points[1]),(0,w.default)(e,t,r),e.points=g}};var i,n=e("./buildLine"),w=(i=n)&&i.__esModule?i:{default:i},x=e("../../../const"),T=e("../../../utils")},{"../../../const":46,"../../../utils":125,"./buildLine":61}],61:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t,r){e.nativeLines?function(e,t){var r=0,i=e.points;if(0===i.length)return;var n=t.points,o=i.length/2,a=(0,V.hex2rgb)(e.lineColor),s=e.lineAlpha,u=a[0]*s,c=a[1]*s,l=a[2]*s;for(r=1;r<o;r++){var f=i[2*(r-1)],h=i[2*(r-1)+1],d=i[2*r],p=i[2*r+1];n.push(f,h),n.push(u,c,l,s),n.push(d,p),n.push(u,c,l,s)}}(e,r):function(e,t){var r=e.points;if(0===r.length)return;var i=new G.Point(r[0],r[1]),n=new G.Point(r[r.length-2],r[r.length-1]);if(i.x===n.x&&i.y===n.y){(r=r.slice()).pop(),r.pop();var o=(n=new G.Point(r[r.length-2],r[r.length-1])).x+.5*(i.x-n.x),a=n.y+.5*(i.y-n.y);r.unshift(o,a),r.push(o,a)}var s=t.points,u=t.indices,c=r.length/2,l=r.length,f=s.length/6,h=e.lineWidth/2,d=(0,V.hex2rgb)(e.lineColor),p=e.lineAlpha,v=d[0]*p,m=d[1]*p,b=d[2]*p,y=r[0],g=r[1],_=r[2],w=r[3],x=0,T=0,S=-(g-w),M=y-_,P=0,E=0,k=0,C=0,A=Math.sqrt(S*S+M*M);S/=A,M/=A,S*=h,M*=h;var O=e.lineAlignment,I=2*(1-O),R=2*O;s.push(y-S*I,g-M*I,v,m,b,p),s.push(y+S*R,g+M*R,v,m,b,p);for(var D=1;D<c-1;++D){y=r[2*(D-1)],g=r[2*(D-1)+1],_=r[2*D],w=r[2*D+1],x=r[2*(D+1)],T=r[2*(D+1)+1],S=-(g-w),M=y-_,A=Math.sqrt(S*S+M*M),S/=A,M/=A,S*=h,M*=h,P=-(w-T),E=_-x,A=Math.sqrt(P*P+E*E),P/=A,E/=A;var L=-M+g-(-M+w),j=-S+_-(-S+y),F=(-S+y)*(-M+w)-(-S+_)*(-M+g),B=-(E*=h)+T-(-E+w),N=-(P*=h)+_-(-P+x),U=(-P+x)*(-E+w)-(-P+_)*(-E+T),z=L*N-B*j;if(Math.abs(z)<.1)z+=10.1,s.push(_-S*I,w-M*I,v,m,b,p),s.push(_+S*R,w+M*R,v,m,b,p);else{var X=(j*U-N*F)/z,W=(B*F-L*U)/z,q=(X-_)*(X-_)+(W-w)*(W-w);196*h*h<q?(k=S-P,C=M-E,A=Math.sqrt(k*k+C*C),k/=A,C/=A,k*=h,C*=h,s.push(_-k*I,w-C*I),s.push(v,m,b,p),s.push(_+k*R,w+C*R),s.push(v,m,b,p),s.push(_-k*R*I,w-C*I),s.push(v,m,b,p),l++):(s.push(_+(X-_)*I,w+(W-w)*I),s.push(v,m,b,p),s.push(_-(X-_)*R,w-(W-w)*R),s.push(v,m,b,p))}}y=r[2*(c-2)],g=r[2*(c-2)+1],_=r[2*(c-1)],w=r[2*(c-1)+1],S=-(g-w),M=y-_,A=Math.sqrt(S*S+M*M),S/=A,M/=A,S*=h,M*=h,s.push(_-S*I,w-M*I),s.push(v,m,b,p),s.push(_+S*R,w+M*R),s.push(v,m,b,p),u.push(f);for(var H=0;H<l;++H)u.push(f++);u.push(f-1)}(e,t)};var G=e("../../../math"),V=e("../../../utils")},{"../../../math":70,"../../../utils":125}],62:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t,r){e.points=e.shape.points.slice();var i=e.points;if(e.fill&&6<=i.length){for(var n=[],o=e.holes,a=0;a<o.length;a++){var s=o[a];n.push(i.length/2),i=i.concat(s.points)}var u=t.points,c=t.indices,l=i.length/2,f=(0,w.hex2rgb)(e.fillColor),h=e.fillAlpha,d=f[0]*h,p=f[1]*h,v=f[2]*h,m=(0,x.default)(i,n,2);if(!m)return;for(var b=u.length/6,y=0;y<m.length;y+=3)c.push(m[y]+b),c.push(m[y]+b),c.push(m[y+1]+b),c.push(m[y+2]+b),c.push(m[y+2]+b);for(var g=0;g<l;g++)u.push(i[2*g],i[2*g+1],d,p,v,h)}0<e.lineWidth&&(0,_.default)(e,t,r)};var _=i(e("./buildLine")),w=e("../../../utils"),x=i(e("earcut"));function i(e){return e&&e.__esModule?e:{default:e}}},{"../../../utils":125,"./buildLine":61,earcut:2}],63:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t,r){var i=e.shape,n=i.x,o=i.y,a=i.width,s=i.height;if(e.fill){var u=(0,y.hex2rgb)(e.fillColor),c=e.fillAlpha,l=u[0]*c,f=u[1]*c,h=u[2]*c,d=t.points,p=t.indices,v=d.length/6;d.push(n,o),d.push(l,f,h,c),d.push(n+a,o),d.push(l,f,h,c),d.push(n,o+s),d.push(l,f,h,c),d.push(n+a,o+s),d.push(l,f,h,c),p.push(v,v,1+v,2+v,3+v,3+v)}if(e.lineWidth){var m=e.points;e.points=[n,o,n+a,o,n+a,o+s,n,o+s,n,o],(0,b.default)(e,t,r),e.points=m}};var i,n=e("./buildLine"),b=(i=n)&&i.__esModule?i:{default:i},y=e("../../../utils")},{"../../../utils":125,"./buildLine":61}],64:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t,r){var i=e.shape,n=i.x,o=i.y,a=i.width,s=i.height,u=i.radius,c=[];if(c.push(n+u,o),E(n+a-u,o,n+a,o,n+a,o+u,c),E(n+a,o+s-u,n+a,o+s,n+a-u,o+s,c),E(n+u,o+s,n,o+s,n,o+s-u,c),E(n,o+u,n,o,n+u+1e-10,o,c),e.fill){for(var l=(0,P.hex2rgb)(e.fillColor),f=e.fillAlpha,h=l[0]*f,d=l[1]*f,p=l[2]*f,v=t.points,m=t.indices,b=v.length/6,y=(0,S.default)(c,null,2),g=0,_=y.length;g<_;g+=3)m.push(y[g]+b),m.push(y[g]+b),m.push(y[g+1]+b),m.push(y[g+2]+b),m.push(y[g+2]+b);for(var w=0,x=c.length;w<x;w++)v.push(c[w],c[++w],h,d,p,f)}if(e.lineWidth){var T=e.points;e.points=c,(0,M.default)(e,t,r),e.points=T}};var S=i(e("earcut")),M=i(e("./buildLine")),P=e("../../../utils");function i(e){return e&&e.__esModule?e:{default:e}}function v(e,t,r){return e+(t-e)*r}function E(e,t,r,i,n,o){for(var a=6<arguments.length&&void 0!==arguments[6]?arguments[6]:[],s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0;d<=20;++d)s=v(e,r,p=d/20),u=v(t,i,p),c=v(r,n,p),l=v(i,o,p),f=v(s,c,p),h=v(u,l,p),a.push(f,h);return a}},{"../../../utils":125,"./buildLine":61,earcut:2}],65:[function(e,t,r){"use strict";r.__esModule=!0,r.autoDetectRenderer=r.Application=r.Filter=r.SpriteMaskFilter=r.Quad=r.RenderTarget=r.ObjectRenderer=r.WebGLManager=r.Shader=r.CanvasRenderTarget=r.TextureUvs=r.VideoBaseTexture=r.BaseRenderTexture=r.RenderTexture=r.BaseTexture=r.TextureMatrix=r.Texture=r.Spritesheet=r.CanvasGraphicsRenderer=r.GraphicsRenderer=r.GraphicsData=r.Graphics=r.TextMetrics=r.TextStyle=r.Text=r.SpriteRenderer=r.CanvasTinter=r.CanvasSpriteRenderer=r.Sprite=r.TransformBase=r.TransformStatic=r.Transform=r.Container=r.DisplayObject=r.Bounds=r.glCore=r.WebGLRenderer=r.CanvasRenderer=r.ticker=r.utils=r.settings=void 0;var i=e("./const");Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}})});var n=e("./math");Object.keys(n).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(r,e,{enumerable:!0,get:function(){return n[e]}})});var o=e("pixi-gl-core");Object.defineProperty(r,"glCore",{enumerable:!0,get:function(){return V(o).default}});var a=e("./display/Bounds");Object.defineProperty(r,"Bounds",{enumerable:!0,get:function(){return V(a).default}});var s=e("./display/DisplayObject");Object.defineProperty(r,"DisplayObject",{enumerable:!0,get:function(){return V(s).default}});var u=e("./display/Container");Object.defineProperty(r,"Container",{enumerable:!0,get:function(){return V(u).default}});var c=e("./display/Transform");Object.defineProperty(r,"Transform",{enumerable:!0,get:function(){return V(c).default}});var l=e("./display/TransformStatic");Object.defineProperty(r,"TransformStatic",{enumerable:!0,get:function(){return V(l).default}});var f=e("./display/TransformBase");Object.defineProperty(r,"TransformBase",{enumerable:!0,get:function(){return V(f).default}});var h=e("./sprites/Sprite");Object.defineProperty(r,"Sprite",{enumerable:!0,get:function(){return V(h).default}});var d=e("./sprites/canvas/CanvasSpriteRenderer");Object.defineProperty(r,"CanvasSpriteRenderer",{enumerable:!0,get:function(){return V(d).default}});var p=e("./sprites/canvas/CanvasTinter");Object.defineProperty(r,"CanvasTinter",{enumerable:!0,get:function(){return V(p).default}});var v=e("./sprites/webgl/SpriteRenderer");Object.defineProperty(r,"SpriteRenderer",{enumerable:!0,get:function(){return V(v).default}});var m=e("./text/Text");Object.defineProperty(r,"Text",{enumerable:!0,get:function(){return V(m).default}});var b=e("./text/TextStyle");Object.defineProperty(r,"TextStyle",{enumerable:!0,get:function(){return V(b).default}});var y=e("./text/TextMetrics");Object.defineProperty(r,"TextMetrics",{enumerable:!0,get:function(){return V(y).default}});var g=e("./graphics/Graphics");Object.defineProperty(r,"Graphics",{enumerable:!0,get:function(){return V(g).default}});var _=e("./graphics/GraphicsData");Object.defineProperty(r,"GraphicsData",{enumerable:!0,get:function(){return V(_).default}});var w=e("./graphics/webgl/GraphicsRenderer");Object.defineProperty(r,"GraphicsRenderer",{enumerable:!0,get:function(){return V(w).default}});var x=e("./graphics/canvas/CanvasGraphicsRenderer");Object.defineProperty(r,"CanvasGraphicsRenderer",{enumerable:!0,get:function(){return V(x).default}});var T=e("./textures/Spritesheet");Object.defineProperty(r,"Spritesheet",{enumerable:!0,get:function(){return V(T).default}});var S=e("./textures/Texture");Object.defineProperty(r,"Texture",{enumerable:!0,get:function(){return V(S).default}});var M=e("./textures/TextureMatrix");Object.defineProperty(r,"TextureMatrix",{enumerable:!0,get:function(){return V(M).default}});var P=e("./textures/BaseTexture");Object.defineProperty(r,"BaseTexture",{enumerable:!0,get:function(){return V(P).default}});var E=e("./textures/RenderTexture");Object.defineProperty(r,"RenderTexture",{enumerable:!0,get:function(){return V(E).default}});var k=e("./textures/BaseRenderTexture");Object.defineProperty(r,"BaseRenderTexture",{enumerable:!0,get:function(){return V(k).default}});var C=e("./textures/VideoBaseTexture");Object.defineProperty(r,"VideoBaseTexture",{enumerable:!0,get:function(){return V(C).default}});var A=e("./textures/TextureUvs");Object.defineProperty(r,"TextureUvs",{enumerable:!0,get:function(){return V(A).default}});var O=e("./renderers/canvas/utils/CanvasRenderTarget");Object.defineProperty(r,"CanvasRenderTarget",{enumerable:!0,get:function(){return V(O).default}});var I=e("./Shader");Object.defineProperty(r,"Shader",{enumerable:!0,get:function(){return V(I).default}});var R=e("./renderers/webgl/managers/WebGLManager");Object.defineProperty(r,"WebGLManager",{enumerable:!0,get:function(){return V(R).default}});var D=e("./renderers/webgl/utils/ObjectRenderer");Object.defineProperty(r,"ObjectRenderer",{enumerable:!0,get:function(){return V(D).default}});var L=e("./renderers/webgl/utils/RenderTarget");Object.defineProperty(r,"RenderTarget",{enumerable:!0,get:function(){return V(L).default}});var j=e("./renderers/webgl/utils/Quad");Object.defineProperty(r,"Quad",{enumerable:!0,get:function(){return V(j).default}});var F=e("./renderers/webgl/filters/spriteMask/SpriteMaskFilter");Object.defineProperty(r,"SpriteMaskFilter",{enumerable:!0,get:function(){return V(F).default}});var B=e("./renderers/webgl/filters/Filter");Object.defineProperty(r,"Filter",{enumerable:!0,get:function(){return V(B).default}});var N=e("./Application");Object.defineProperty(r,"Application",{enumerable:!0,get:function(){return V(N).default}});var U=e("./autoDetectRenderer");Object.defineProperty(r,"autoDetectRenderer",{enumerable:!0,get:function(){return U.autoDetectRenderer}});var z=G(e("./utils")),X=G(e("./ticker")),W=V(e("./settings")),q=V(e("./renderers/canvas/CanvasRenderer")),H=V(e("./renderers/webgl/WebGLRenderer"));function G(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function V(e){return e&&e.__esModule?e:{default:e}}r.settings=W.default,r.utils=z,r.ticker=X,r.CanvasRenderer=q.default,r.WebGLRenderer=H.default},{"./Application":43,"./Shader":44,"./autoDetectRenderer":45,"./const":46,"./display/Bounds":47,"./display/Container":48,"./display/DisplayObject":49,"./display/Transform":50,"./display/TransformBase":51,"./display/TransformStatic":52,"./graphics/Graphics":53,"./graphics/GraphicsData":54,"./graphics/canvas/CanvasGraphicsRenderer":55,"./graphics/webgl/GraphicsRenderer":57,"./math":70,"./renderers/canvas/CanvasRenderer":77,"./renderers/canvas/utils/CanvasRenderTarget":79,"./renderers/webgl/WebGLRenderer":84,"./renderers/webgl/filters/Filter":86,"./renderers/webgl/filters/spriteMask/SpriteMaskFilter":89,"./renderers/webgl/managers/WebGLManager":93,"./renderers/webgl/utils/ObjectRenderer":94,"./renderers/webgl/utils/Quad":95,"./renderers/webgl/utils/RenderTarget":96,"./settings":101,"./sprites/Sprite":102,"./sprites/canvas/CanvasSpriteRenderer":103,"./sprites/canvas/CanvasTinter":104,"./sprites/webgl/SpriteRenderer":106,"./text/Text":108,"./text/TextMetrics":109,"./text/TextStyle":110,"./textures/BaseRenderTexture":111,"./textures/BaseTexture":112,"./textures/RenderTexture":113,"./textures/Spritesheet":114,"./textures/Texture":115,"./textures/TextureMatrix":116,"./textures/TextureUvs":117,"./textures/VideoBaseTexture":118,"./ticker":121,"./utils":125,"pixi-gl-core":15}],66:[function(e,t,r){"use strict";r.__esModule=!0;var i,n=e("./Matrix"),l=(i=n)&&i.__esModule?i:{default:i};var f=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],h=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],d=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],p=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],v=[],m=[];function b(e){return e<0?-1:0<e?1:0}!function(){for(var e=0;e<16;e++){var t=[];m.push(t);for(var r=0;r<16;r++)for(var i=b(f[e]*f[r]+d[e]*h[r]),n=b(h[e]*f[r]+p[e]*h[r]),o=b(f[e]*d[r]+d[e]*p[r]),a=b(h[e]*d[r]+p[e]*p[r]),s=0;s<16;s++)if(f[s]===i&&h[s]===n&&d[s]===o&&p[s]===a){t.push(s);break}}for(var u=0;u<16;u++){var c=new l.default;c.set(f[u],h[u],d[u],p[u],0,0),v.push(c)}}();var o={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MIRROR_HORIZONTAL:12,uX:function(e){return f[e]},uY:function(e){return h[e]},vX:function(e){return d[e]},vY:function(e){return p[e]},inv:function(e){return 8&e?15&e:7&-e},add:function(e,t){return m[e][t]},sub:function(e,t){return m[e][o.inv(t)]},rotate180:function(e){return 4^e},isVertical:function(e){return 2==(3&e)},byDirection:function(e,t){return 2*Math.abs(e)<=Math.abs(t)?0<=t?o.S:o.N:2*Math.abs(t)<=Math.abs(e)?0<e?o.E:o.W:0<t?0<e?o.SE:o.SW:0<e?o.NE:o.NW},matrixAppendRotationInv:function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,n=v[o.inv(t)];n.tx=r,n.ty=i,e.append(n)}};r.default=o},{"./Matrix":67}],67:[function(e,t,r){"use strict";r.__esModule=!0;var i,n=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),o=e("./Point"),s=(i=o)&&i.__esModule?i:{default:i},u=e("../const");var a=function(){function a(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1,n=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),this.a=e,this.b=t,this.c=r,this.d=i,this.tx=n,this.ty=o,this.array=null}return a.prototype.fromArray=function(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]},a.prototype.set=function(e,t,r,i,n,o){return this.a=e,this.b=t,this.c=r,this.d=i,this.tx=n,this.ty=o,this},a.prototype.toArray=function(e,t){this.array||(this.array=new Float32Array(9));var r=t||this.array;return e?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0),r[8]=1,r},a.prototype.apply=function(e,t){t=t||new s.default;var r=e.x,i=e.y;return t.x=this.a*r+this.c*i+this.tx,t.y=this.b*r+this.d*i+this.ty,t},a.prototype.applyInverse=function(e,t){t=t||new s.default;var r=1/(this.a*this.d+this.c*-this.b),i=e.x,n=e.y;return t.x=this.d*r*i+-this.c*r*n+(this.ty*this.c-this.tx*this.d)*r,t.y=this.a*r*n+-this.b*r*i+(-this.ty*this.a+this.tx*this.b)*r,t},a.prototype.translate=function(e,t){return this.tx+=e,this.ty+=t,this},a.prototype.scale=function(e,t){return this.a*=e,this.d*=t,this.c*=e,this.b*=t,this.tx*=e,this.ty*=t,this},a.prototype.rotate=function(e){var t=Math.cos(e),r=Math.sin(e),i=this.a,n=this.c,o=this.tx;return this.a=i*t-this.b*r,this.b=i*r+this.b*t,this.c=n*t-this.d*r,this.d=n*r+this.d*t,this.tx=o*t-this.ty*r,this.ty=o*r+this.ty*t,this},a.prototype.append=function(e){var t=this.a,r=this.b,i=this.c,n=this.d;return this.a=e.a*t+e.b*i,this.b=e.a*r+e.b*n,this.c=e.c*t+e.d*i,this.d=e.c*r+e.d*n,this.tx=e.tx*t+e.ty*i+this.tx,this.ty=e.tx*r+e.ty*n+this.ty,this},a.prototype.setTransform=function(e,t,r,i,n,o,a,s,u){return this.a=Math.cos(a+u)*n,this.b=Math.sin(a+u)*n,this.c=-Math.sin(a-s)*o,this.d=Math.cos(a-s)*o,this.tx=e-(r*this.a+i*this.c),this.ty=t-(r*this.b+i*this.d),this},a.prototype.prepend=function(e){var t=this.tx;if(1!==e.a||0!==e.b||0!==e.c||1!==e.d){var r=this.a,i=this.c;this.a=r*e.a+this.b*e.c,this.b=r*e.b+this.b*e.d,this.c=i*e.a+this.d*e.c,this.d=i*e.b+this.d*e.d}return this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty,this},a.prototype.decompose=function(e){var t=this.a,r=this.b,i=this.c,n=this.d,o=-Math.atan2(-i,n),a=Math.atan2(r,t),s=Math.abs(o+a);return s<1e-5||Math.abs(u.PI_2-s)<1e-5?(e.rotation=a,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=o,e.skew.y=a),e.scale.x=Math.sqrt(t*t+r*r),e.scale.y=Math.sqrt(i*i+n*n),e.position.x=this.tx,e.position.y=this.ty,e},a.prototype.invert=function(){var e=this.a,t=this.b,r=this.c,i=this.d,n=this.tx,o=e*i-t*r;return this.a=i/o,this.b=-t/o,this.c=-r/o,this.d=e/o,this.tx=(r*this.ty-i*n)/o,this.ty=-(e*this.ty-t*n)/o,this},a.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},a.prototype.clone=function(){var e=new a;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},a.prototype.copy=function(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},n(a,null,[{key:"IDENTITY",get:function(){return new a}},{key:"TEMP_MATRIX",get:function(){return new a}}]),a}();r.default=a},{"../const":46,"./Point":69}],68:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();var n=function(){function n(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),this._x=r,this._y=i,this.cb=e,this.scope=t}return n.prototype.clone=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return new n(e||this.cb,t||this.scope,this._x,this._y)},n.prototype.set=function(e,t){var r=e||0,i=t||(0!==t?r:0);this._x===r&&this._y===i||(this._x=r,this._y=i,this.cb.call(this.scope))},n.prototype.copy=function(e){this._x===e.x&&this._y===e.y||(this._x=e.x,this._y=e.y,this.cb.call(this.scope))},n.prototype.equals=function(e){return e.x===this._x&&e.y===this._y},i(n,[{key:"x",get:function(){return this._x},set:function(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))}},{key:"y",get:function(){return this._y},set:function(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))}}]),n}();r.default=n},{}],69:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function r(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),this.x=e,this.y=t}return r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.copy=function(e){this.set(e.x,e.y)},r.prototype.equals=function(e){return e.x===this.x&&e.y===this.y},r.prototype.set=function(e,t){this.x=e||0,this.y=t||(0!==t?this.x:0)},r}();r.default=i},{}],70:[function(e,t,r){"use strict";r.__esModule=!0;var i=e("./Point");Object.defineProperty(r,"Point",{enumerable:!0,get:function(){return h(i).default}});var n=e("./ObservablePoint");Object.defineProperty(r,"ObservablePoint",{enumerable:!0,get:function(){return h(n).default}});var o=e("./Matrix");Object.defineProperty(r,"Matrix",{enumerable:!0,get:function(){return h(o).default}});var a=e("./GroupD8");Object.defineProperty(r,"GroupD8",{enumerable:!0,get:function(){return h(a).default}});var s=e("./shapes/Circle");Object.defineProperty(r,"Circle",{enumerable:!0,get:function(){return h(s).default}});var u=e("./shapes/Ellipse");Object.defineProperty(r,"Ellipse",{enumerable:!0,get:function(){return h(u).default}});var c=e("./shapes/Polygon");Object.defineProperty(r,"Polygon",{enumerable:!0,get:function(){return h(c).default}});var l=e("./shapes/Rectangle");Object.defineProperty(r,"Rectangle",{enumerable:!0,get:function(){return h(l).default}});var f=e("./shapes/RoundedRectangle");function h(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"RoundedRectangle",{enumerable:!0,get:function(){return h(f).default}})},{"./GroupD8":66,"./Matrix":67,"./ObservablePoint":68,"./Point":69,"./shapes/Circle":71,"./shapes/Ellipse":72,"./shapes/Polygon":73,"./shapes/Rectangle":74,"./shapes/RoundedRectangle":75}],71:[function(e,t,r){"use strict";r.__esModule=!0;var i,n=e("./Rectangle"),o=(i=n)&&i.__esModule?i:{default:i},a=e("../../const");var s=function(){function i(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.x=e,this.y=t,this.radius=r,this.type=a.SHAPES.CIRC}return i.prototype.clone=function(){return new i(this.x,this.y,this.radius)},i.prototype.contains=function(e,t){if(this.radius<=0)return!1;var r=this.radius*this.radius,i=this.x-e,n=this.y-t;return(i*=i)+(n*=n)<=r},i.prototype.getBounds=function(){return new o.default(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)},i}();r.default=s},{"../../const":46,"./Rectangle":74}],72:[function(e,t,r){"use strict";r.__esModule=!0;var i,n=e("./Rectangle"),o=(i=n)&&i.__esModule?i:{default:i},a=e("../../const");var s=function(){function n(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),this.x=e,this.y=t,this.width=r,this.height=i,this.type=a.SHAPES.ELIP}return n.prototype.clone=function(){return new n(this.x,this.y,this.width,this.height)},n.prototype.contains=function(e,t){if(this.width<=0||this.height<=0)return!1;var r=(e-this.x)/this.width,i=(t-this.y)/this.height;return(r*=r)+(i*=i)<=1},n.prototype.getBounds=function(){return new o.default(this.x-this.width,this.y-this.height,this.width,this.height)},n}();r.default=s},{"../../const":46,"./Rectangle":74}],73:[function(e,t,r){"use strict";r.__esModule=!0;var i,n=e("../Point"),s=(i=n)&&i.__esModule?i:{default:i},u=e("../../const");var o=function(){function a(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),Array.isArray(t[0])&&(t=t[0]),t[0]instanceof s.default){for(var i=[],n=0,o=t.length;n<o;n++)i.push(t[n].x,t[n].y);t=i}this.closed=!0,this.points=t,this.type=u.SHAPES.POLY}return a.prototype.clone=function(){return new a(this.points.slice())},a.prototype.close=function(){var e=this.points;e[0]===e[e.length-2]&&e[1]===e[e.length-1]||e.push(e[0],e[1])},a.prototype.contains=function(e,t){for(var r=!1,i=this.points.length/2,n=0,o=i-1;n<i;o=n++){var a=this.points[2*n],s=this.points[2*n+1],u=this.points[2*o],c=this.points[2*o+1];t<s!=t<c&&e<(t-s)/(c-s)*(u-a)+a&&(r=!r)}return r},a}();r.default=o},{"../../const":46,"../Point":69}],74:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),o=e("../../const");var n=function(){function n(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),this.x=Number(e),this.y=Number(t),this.width=Number(r),this.height=Number(i),this.type=o.SHAPES.RECT}return n.prototype.clone=function(){return new n(this.x,this.y,this.width,this.height)},n.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this},n.prototype.contains=function(e,t){return!(this.width<=0||this.height<=0)&&(e>=this.x&&e<this.x+this.width&&t>=this.y&&t<this.y+this.height)},n.prototype.pad=function(e,t){e=e||0,t=t||(0!==t?e:0),this.x-=e,this.y-=t,this.width+=2*e,this.height+=2*t},n.prototype.fit=function(e){var t=Math.max(this.x,e.x),r=Math.min(this.x+this.width,e.x+e.width),i=Math.max(this.y,e.y),n=Math.min(this.y+this.height,e.y+e.height);this.x=t,this.width=Math.max(r-t,0),this.y=i,this.height=Math.max(n-i,0)},n.prototype.enlarge=function(e){var t=Math.min(this.x,e.x),r=Math.max(this.x+this.width,e.x+e.width),i=Math.min(this.y,e.y),n=Math.max(this.y+this.height,e.y+e.height);this.x=t,this.width=r-t,this.y=i,this.height=n-i},n.prototype.ceil=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:.001,r=Math.ceil((this.x+this.width-t)*e)/e,i=Math.ceil((this.y+this.height-t)*e)/e;this.x=Math.floor((this.x+t)*e)/e,this.y=Math.floor((this.y+t)*e)/e,this.width=r-this.x,this.height=i-this.y},i(n,[{key:"left",get:function(){return this.x}},{key:"right",get:function(){return this.x+this.width}},{key:"top",get:function(){return this.y}},{key:"bottom",get:function(){return this.y+this.height}}],[{key:"EMPTY",get:function(){return new n(0,0,0,0)}}]),n}();r.default=n},{"../../const":46}],75:[function(e,t,r){"use strict";r.__esModule=!0;var a=e("../../const");var i=function(){function o(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,n=4<arguments.length&&void 0!==arguments[4]?arguments[4]:20;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),this.x=e,this.y=t,this.width=r,this.height=i,this.radius=n,this.type=a.SHAPES.RREC}return o.prototype.clone=function(){return new o(this.x,this.y,this.width,this.height,this.radius)},o.prototype.contains=function(e,t){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height){if(t>=this.y+this.radius&&t<=this.y+this.height-this.radius||e>=this.x+this.radius&&e<=this.x+this.width-this.radius)return!0;var r=e-(this.x+this.radius),i=t-(this.y+this.radius),n=this.radius*this.radius;if(r*r+i*i<=n)return!0;if((r=e-(this.x+this.width-this.radius))*r+i*i<=n)return!0;if(r*r+(i=t-(this.y+this.height-this.radius))*i<=n)return!0;if((r=e-(this.x+this.radius))*r+i*i<=n)return!0}return!1},o}();r.default=i},{"../../const":46}],76:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),s=e("../utils"),u=e("../math"),c=e("../const"),l=o(e("../settings")),f=o(e("../display/Container")),h=o(e("../textures/RenderTexture")),n=o(e("eventemitter3"));function o(e){return e&&e.__esModule?e:{default:e}}var d=new u.Matrix,a=function(o){function a(e,t,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,o.call(this));return(0,s.sayHello)(e),"number"==typeof t&&(t=Object.assign({width:t,height:r||l.default.RENDER_OPTIONS.height},i)),t=Object.assign({},l.default.RENDER_OPTIONS,t),n.options=t,n.type=c.RENDERER_TYPE.UNKNOWN,n.screen=new u.Rectangle(0,0,t.width,t.height),n.view=t.view||document.createElement("canvas"),n.resolution=t.resolution||l.default.RESOLUTION,n.transparent=t.transparent,n.autoResize=t.autoResize||!1,n.blendModes=null,n.preserveDrawingBuffer=t.preserveDrawingBuffer,n.clearBeforeRender=t.clearBeforeRender,n.roundPixels=t.roundPixels,n._backgroundColor=0,n._backgroundColorRgba=[0,0,0,0],n._backgroundColorString="#000000",n.backgroundColor=t.backgroundColor||n._backgroundColor,n._tempDisplayObjectParent=new f.default,n._lastObjectRendered=n._tempDisplayObjectParent,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(a,o),a.prototype.resize=function(e,t){this.screen.width=e,this.screen.height=t,this.view.width=e*this.resolution,this.view.height=t*this.resolution,this.autoResize&&(this.view.style.width=e+"px",this.view.style.height=t+"px")},a.prototype.generateTexture=function(e,t,r,i){i=i||e.getLocalBounds();var n=h.default.create(0|i.width,0|i.height,t,r);return d.tx=-i.x,d.ty=-i.y,this.render(e,n,!1,d,!!e.parent),n},a.prototype.destroy=function(e){e&&this.view.parentNode&&this.view.parentNode.removeChild(this.view),this.type=c.RENDERER_TYPE.UNKNOWN,this.view=null,this.screen=null,this.resolution=0,this.transparent=!1,this.autoResize=!1,this.blendModes=null,this.options=null,this.preserveDrawingBuffer=!1,this.clearBeforeRender=!1,this.roundPixels=!1,this._backgroundColor=0,this._backgroundColorRgba=null,this._backgroundColorString=null,this._tempDisplayObjectParent=null,this._lastObjectRendered=null},i(a,[{key:"width",get:function(){return this.view.width}},{key:"height",get:function(){return this.view.height}},{key:"backgroundColor",get:function(){return this._backgroundColor},set:function(e){this._backgroundColor=e,this._backgroundColorString=(0,s.hex2string)(e),(0,s.hex2rgb)(e,this._backgroundColorRgba)}}]),a}(n.default);r.default=a},{"../const":46,"../display/Container":48,"../math":70,"../settings":101,"../textures/RenderTexture":113,"../utils":125,eventemitter3:3}],77:[function(e,t,r){"use strict";r.__esModule=!0;var i=o(e("../SystemRenderer")),a=o(e("./utils/CanvasMaskManager")),l=o(e("./utils/CanvasRenderTarget")),s=o(e("./utils/mapCanvasBlendModesToPixi")),n=e("../../utils"),f=e("../../const"),u=o(e("../../settings"));function o(e){return e&&e.__esModule?e:{default:e}}var c=function(n){function o(e,t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,n.call(this,"Canvas",e,t,r));return i.type=f.RENDERER_TYPE.CANVAS,i.rootContext=i.view.getContext("2d",{alpha:i.transparent}),i.context=i.rootContext,i.refresh=!0,i.maskManager=new a.default(i),i.smoothProperty="imageSmoothingEnabled",i.rootContext.imageSmoothingEnabled||(i.rootContext.webkitImageSmoothingEnabled?i.smoothProperty="webkitImageSmoothingEnabled":i.rootContext.mozImageSmoothingEnabled?i.smoothProperty="mozImageSmoothingEnabled":i.rootContext.oImageSmoothingEnabled?i.smoothProperty="oImageSmoothingEnabled":i.rootContext.msImageSmoothingEnabled&&(i.smoothProperty="msImageSmoothingEnabled")),i.initPlugins(),i.blendModes=(0,s.default)(),i._activeBlendMode=null,i.renderingToScreen=!1,i.resize(i.options.width,i.options.height),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,n),o.prototype.render=function(e,t,r,i,n){if(this.view){this.renderingToScreen=!t,this.emit("prerender");var o=this.resolution;t?((t=t.baseTexture||t)._canvasRenderTarget||(t._canvasRenderTarget=new l.default(t.width,t.height,t.resolution),t.source=t._canvasRenderTarget.canvas,t.valid=!0),this.context=t._canvasRenderTarget.context,this.resolution=t._canvasRenderTarget.resolution):this.context=this.rootContext;var a=this.context;if(t||(this._lastObjectRendered=e),!n){var s=e.parent,u=this._tempDisplayObjectParent.transform.worldTransform;i?(i.copy(u),this._tempDisplayObjectParent.transform._worldID=-1):u.identity(),e.parent=this._tempDisplayObjectParent,e.updateTransform(),e.parent=s}a.save(),a.setTransform(1,0,0,1,0,0),a.globalAlpha=1,this._activeBlendMode=f.BLEND_MODES.NORMAL,a.globalCompositeOperation=this.blendModes[f.BLEND_MODES.NORMAL],navigator.isCocoonJS&&this.view.screencanvas&&(a.fillStyle="black",a.clear()),(void 0!==r?r:this.clearBeforeRender)&&this.renderingToScreen&&(this.transparent?a.clearRect(0,0,this.width,this.height):(a.fillStyle=this._backgroundColorString,a.fillRect(0,0,this.width,this.height)));var c=this.context;this.context=a,e.renderCanvas(this),this.context=c,a.restore(),this.resolution=o,this.emit("postrender")}},o.prototype.clear=function(e){var t=this.context;e=e||this._backgroundColorString,!this.transparent&&e?(t.fillStyle=e,t.fillRect(0,0,this.width,this.height)):t.clearRect(0,0,this.width,this.height)},o.prototype.setBlendMode=function(e){this._activeBlendMode!==e&&(this._activeBlendMode=e,this.context.globalCompositeOperation=this.blendModes[e])},o.prototype.destroy=function(e){this.destroyPlugins(),n.prototype.destroy.call(this,e),this.context=null,this.refresh=!0,this.maskManager.destroy(),this.maskManager=null,this.smoothProperty=null},o.prototype.resize=function(e,t){n.prototype.resize.call(this,e,t),this.smoothProperty&&(this.rootContext[this.smoothProperty]=u.default.SCALE_MODE===f.SCALE_MODES.LINEAR)},o.prototype.invalidateBlendMode=function(){this._activeBlendMode=this.blendModes.indexOf(this.context.globalCompositeOperation)},o}(i.default);r.default=c,n.pluginTarget.mixin(c)},{"../../const":46,"../../settings":101,"../../utils":125,"../SystemRenderer":76,"./utils/CanvasMaskManager":78,"./utils/CanvasRenderTarget":79,"./utils/mapCanvasBlendModesToPixi":81}],78:[function(e,t,r){"use strict";r.__esModule=!0;var I=e("../../../const");var i=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e}return t.prototype.pushMask=function(e){var t=this.renderer;t.context.save();var r=e.alpha,i=e.transform.worldTransform,n=t.resolution;t.context.setTransform(i.a*n,i.b*n,i.c*n,i.d*n,i.tx*n,i.ty*n),e._texture||(this.renderGraphicsShape(e),t.context.clip()),e.worldAlpha=r},t.prototype.renderGraphicsShape=function(e){var t=this.renderer.context,r=e.graphicsData.length;if(0!==r){t.beginPath();for(var i=0;i<r;i++){var n=e.graphicsData[i],o=n.shape;if(n.type===I.SHAPES.POLY){var a=o.points,s=n.holes,u=void 0,c=void 0;t.moveTo(a[0],a[1]);for(var l=2;l<a.length;l+=2)t.lineTo(a[l],a[l+1]);if(a[0]===a[a.length-2]&&a[1]===a[a.length-1]&&t.closePath(),0<s.length){for(var f=u=0;f<a.length;f+=2)u+=a[f]*a[f+3]-a[f+1]*a[f+2];for(var h=0;h<s.length;h++){a=s[h].points;for(var d=c=0;d<a.length;d+=2)c+=a[d]*a[d+3]-a[d+1]*a[d+2];if(t.moveTo(a[0],a[1]),c*u<0)for(var p=2;p<a.length;p+=2)t.lineTo(a[p],a[p+1]);else for(var v=a.length-2;2<=v;v-=2)t.lineTo(a[v],a[v+1])}}}else if(n.type===I.SHAPES.RECT)t.rect(o.x,o.y,o.width,o.height),t.closePath();else if(n.type===I.SHAPES.CIRC)t.arc(o.x,o.y,o.radius,0,2*Math.PI),t.closePath();else if(n.type===I.SHAPES.ELIP){var m=2*o.width,b=2*o.height,y=o.x-m/2,g=o.y-b/2,_=m/2*.5522848,w=b/2*.5522848,x=y+m,T=g+b,S=y+m/2,M=g+b/2;t.moveTo(y,M),t.bezierCurveTo(y,M-w,S-_,g,S,g),t.bezierCurveTo(S+_,g,x,M-w,x,M),t.bezierCurveTo(x,M+w,S+_,T,S,T),t.bezierCurveTo(S-_,T,y,M+w,y,M),t.closePath()}else if(n.type===I.SHAPES.RREC){var P=o.x,E=o.y,k=o.width,C=o.height,A=o.radius,O=Math.min(k,C)/2|0;A=O<A?O:A,t.moveTo(P,E+A),t.lineTo(P,E+C-A),t.quadraticCurveTo(P,E+C,P+A,E+C),t.lineTo(P+k-A,E+C),t.quadraticCurveTo(P+k,E+C,P+k,E+C-A),t.lineTo(P+k,E+A),t.quadraticCurveTo(P+k,E,P+k-A,E),t.lineTo(P+A,E),t.quadraticCurveTo(P,E,P,E+A),t.closePath()}}}},t.prototype.popMask=function(e){e.context.restore(),e.invalidateBlendMode()},t.prototype.destroy=function(){},t}();r.default=i},{"../../../const":46}],79:[function(e,t,r){"use strict";r.__esModule=!0;var i,n=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),o=e("../../../settings"),a=(i=o)&&i.__esModule?i:{default:i};var s=function(){function i(e,t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=r||a.default.RESOLUTION,this.resize(e,t)}return i.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},i.prototype.resize=function(e,t){this.canvas.width=e*this.resolution,this.canvas.height=t*this.resolution},i.prototype.destroy=function(){this.context=null,this.canvas=null},n(i,[{key:"width",get:function(){return this.canvas.width},set:function(e){this.canvas.width=e}},{key:"height",get:function(){return this.canvas.height},set:function(e){this.canvas.height=e}}]),i}();r.default=s},{"../../../settings":101}],80:[function(e,t,r){"use strict";function a(e){var t=document.createElement("canvas");t.width=6,t.height=1;var r=t.getContext("2d");return r.fillStyle=e,r.fillRect(0,0,6,1),t}r.__esModule=!0,r.default=function(){if("undefined"==typeof document)return!1;var e=a("#ff00ff"),t=a("#ffff00"),r=document.createElement("canvas");r.width=6,r.height=1;var i=r.getContext("2d");i.globalCompositeOperation="multiply",i.drawImage(e,0,0),i.drawImage(t,2,0);var n=i.getImageData(2,0,1,1);if(!n)return!1;var o=n.data;return 255===o[0]&&0===o[1]&&0===o[2]}},{}],81:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];(0,a.default)()?(e[n.BLEND_MODES.NORMAL]="source-over",e[n.BLEND_MODES.ADD]="lighter",e[n.BLEND_MODES.MULTIPLY]="multiply",e[n.BLEND_MODES.SCREEN]="screen",e[n.BLEND_MODES.OVERLAY]="overlay",e[n.BLEND_MODES.DARKEN]="darken",e[n.BLEND_MODES.LIGHTEN]="lighten",e[n.BLEND_MODES.COLOR_DODGE]="color-dodge",e[n.BLEND_MODES.COLOR_BURN]="color-burn",e[n.BLEND_MODES.HARD_LIGHT]="hard-light",e[n.BLEND_MODES.SOFT_LIGHT]="soft-light",e[n.BLEND_MODES.DIFFERENCE]="difference",e[n.BLEND_MODES.EXCLUSION]="exclusion",e[n.BLEND_MODES.HUE]="hue",e[n.BLEND_MODES.SATURATION]="saturate",e[n.BLEND_MODES.COLOR]="color",e[n.BLEND_MODES.LUMINOSITY]="luminosity"):(e[n.BLEND_MODES.NORMAL]="source-over",e[n.BLEND_MODES.ADD]="lighter",e[n.BLEND_MODES.MULTIPLY]="source-over",e[n.BLEND_MODES.SCREEN]="source-over",e[n.BLEND_MODES.OVERLAY]="source-over",e[n.BLEND_MODES.DARKEN]="source-over",e[n.BLEND_MODES.LIGHTEN]="source-over",e[n.BLEND_MODES.COLOR_DODGE]="source-over",e[n.BLEND_MODES.COLOR_BURN]="source-over",e[n.BLEND_MODES.HARD_LIGHT]="source-over",e[n.BLEND_MODES.SOFT_LIGHT]="source-over",e[n.BLEND_MODES.DIFFERENCE]="source-over",e[n.BLEND_MODES.EXCLUSION]="source-over",e[n.BLEND_MODES.HUE]="source-over",e[n.BLEND_MODES.SATURATION]="source-over",e[n.BLEND_MODES.COLOR]="source-over",e[n.BLEND_MODES.LUMINOSITY]="source-over");return e[n.BLEND_MODES.NORMAL_NPM]=e[n.BLEND_MODES.NORMAL],e[n.BLEND_MODES.ADD_NPM]=e[n.BLEND_MODES.ADD],e[n.BLEND_MODES.SCREEN_NPM]=e[n.BLEND_MODES.SCREEN],e};var i,n=e("../../../const"),o=e("./canUseNewCanvasBlendModes"),a=(i=o)&&i.__esModule?i:{default:i}},{"../../../const":46,"./canUseNewCanvasBlendModes":80}],82:[function(e,t,r){"use strict";r.__esModule=!0;var i,n=e("../../const"),o=e("../../settings"),a=(i=o)&&i.__esModule?i:{default:i};var s=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=a.default.GC_MAX_IDLE,this.checkCountMax=a.default.GC_MAX_CHECK_COUNT,this.mode=a.default.GC_MODE}return t.prototype.update=function(){this.count++,this.mode!==n.GC_MODES.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run()))},t.prototype.run=function(){for(var e=this.renderer.textureManager,t=e._managedTextures,r=!1,i=0;i<t.length;i++){var n=t[i];!n._glRenderTargets&&this.count-n.touched>this.maxIdle&&(e.destroyTexture(n,!0),r=!(t[i]=null))}if(r){for(var o=0,a=0;a<t.length;a++)null!==t[a]&&(t[o++]=t[a]);t.length=o}},t.prototype.unload=function(e){var t=this.renderer.textureManager;e._texture&&e._texture._glRenderTargets&&t.destroyTexture(e._texture,!0);for(var r=e.children.length-1;0<=r;r--)this.unload(e.children[r])},t}();r.default=s},{"../../const":46,"../../settings":101}],83:[function(e,t,r){"use strict";r.__esModule=!0;var i,u=e("pixi-gl-core"),c=e("../../const"),n=e("./utils/RenderTarget"),l=(i=n)&&i.__esModule?i:{default:i},s=e("../../utils");var o=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e,this.gl=e.gl,this._managedTextures=[]}return t.prototype.bindTexture=function(){},t.prototype.getTexture=function(){},t.prototype.updateTexture=function(e,t){var r=this.gl,i=!!e._glRenderTargets;if(!e.hasLoaded)return null;var n=this.renderer.boundTextures;if(void 0===t)for(var o=t=0;o<n.length;++o)if(n[o]===e){t=o;break}n[t]=e,r.activeTexture(r.TEXTURE0+t);var a=e._glTextures[this.renderer.CONTEXT_UID];if(a)i?e._glRenderTargets[this.renderer.CONTEXT_UID].resize(e.width,e.height):a.upload(e.source);else{if(i){var s=new l.default(this.gl,e.width,e.height,e.scaleMode,e.resolution);s.resize(e.width,e.height),a=(e._glRenderTargets[this.renderer.CONTEXT_UID]=s).texture,this.renderer._activeRenderTarget.root||this.renderer._activeRenderTarget.frameBuffer.bind()}else(a=new u.GLTexture(this.gl,null,null,null,null)).bind(t),a.premultiplyAlpha=!0,a.upload(e.source);e._glTextures[this.renderer.CONTEXT_UID]=a,e.on("update",this.updateTexture,this),e.on("dispose",this.destroyTexture,this),this._managedTextures.push(e),e.isPowerOfTwo?(e.mipmap&&a.enableMipmap(),e.wrapMode===c.WRAP_MODES.CLAMP?a.enableWrapClamp():e.wrapMode===c.WRAP_MODES.REPEAT?a.enableWrapRepeat():a.enableWrapMirrorRepeat()):a.enableWrapClamp(),e.scaleMode===c.SCALE_MODES.NEAREST?a.enableNearestScaling():a.enableLinearScaling()}return a},t.prototype.destroyTexture=function(e,t){if((e=e.baseTexture||e).hasLoaded){var r=this.renderer,i=r.CONTEXT_UID,n=e._glTextures,o=e._glRenderTargets;if(n[i]&&(r.unbindTexture(e),n[i].destroy(),e.off("update",this.updateTexture,this),e.off("dispose",this.destroyTexture,this),delete n[i],!t)){var a=this._managedTextures.indexOf(e);-1!==a&&(0,s.removeItems)(this._managedTextures,a,1)}o&&o[i]&&(r._activeRenderTarget===o[i]&&r.bindRenderTarget(r.rootRenderTarget),o[i].destroy(),delete o[i])}},t.prototype.removeAll=function(){for(var e=0;e<this._managedTextures.length;++e){var t=this._managedTextures[e];t._glTextures[this.renderer.CONTEXT_UID]&&delete t._glTextures[this.renderer.CONTEXT_UID]}},t.prototype.destroy=function(){for(var e=0;e<this._managedTextures.length;++e){var t=this._managedTextures[e];this.destroyTexture(t,!0),t.off("update",this.updateTexture,this),t.off("dispose",this.destroyTexture,this)}this._managedTextures=null},t}();r.default=o},{"../../const":46,"../../utils":125,"./utils/RenderTarget":96,"pixi-gl-core":15}],84:[function(e,t,r){"use strict";r.__esModule=!0;var i=o(e("../SystemRenderer")),a=o(e("./managers/MaskManager")),s=o(e("./managers/StencilManager")),u=o(e("./managers/FilterManager")),c=o(e("./utils/RenderTarget")),l=o(e("./utils/ObjectRenderer")),f=o(e("./TextureManager")),h=o(e("../../textures/BaseTexture")),d=o(e("./TextureGarbageCollector")),p=o(e("./WebGLState")),v=o(e("./utils/mapWebGLDrawModesToPixi")),m=o(e("./utils/validateContext")),n=e("../../utils"),b=o(e("pixi-gl-core")),y=e("../../const");function o(e){return e&&e.__esModule?e:{default:e}}var g=0,_=function(n){function o(e,t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,n.call(this,"WebGL",e,t,r));return i.legacy=i.options.legacy,i.legacy&&(b.default.VertexArrayObject.FORCE_NATIVE=!0),i.type=y.RENDERER_TYPE.WEBGL,i.handleContextLost=i.handleContextLost.bind(i),i.handleContextRestored=i.handleContextRestored.bind(i),i.view.addEventListener("webglcontextlost",i.handleContextLost,!1),i.view.addEventListener("webglcontextrestored",i.handleContextRestored,!1),i._contextOptions={alpha:i.transparent,antialias:i.options.antialias,premultipliedAlpha:i.transparent&&"notMultiplied"!==i.transparent,stencil:!0,preserveDrawingBuffer:i.options.preserveDrawingBuffer,powerPreference:i.options.powerPreference},i._backgroundColorRgba[3]=i.transparent?0:1,i.maskManager=new a.default(i),i.stencilManager=new s.default(i),i.emptyRenderer=new l.default(i),i.currentRenderer=i.emptyRenderer,i.textureManager=null,i.filterManager=null,i.initPlugins(),i.options.context&&(0,m.default)(i.options.context),i.gl=i.options.context||b.default.createContext(i.view,i._contextOptions),i.CONTEXT_UID=g++,i.state=new p.default(i.gl),i.renderingToScreen=!0,i.boundTextures=null,i._activeShader=null,i._activeVao=null,i._activeRenderTarget=null,i._initContext(),i.drawModes=(0,v.default)(i.gl),i._nextTextureLocation=0,i.setBlendMode(0),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,n),o.prototype._initContext=function(){var e=this.gl;e.isContextLost()&&e.getExtension("WEBGL_lose_context")&&e.getExtension("WEBGL_lose_context").restoreContext();var t=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this._activeShader=null,this._activeVao=null,this.boundTextures=new Array(t),this.emptyTextures=new Array(t),this._unknownBoundTextures=!1,this.textureManager=new f.default(this),this.filterManager=new u.default(this),this.textureGC=new d.default(this),this.state.resetToDefault(),this.rootRenderTarget=new c.default(e,this.width,this.height,null,this.resolution,!0),this.rootRenderTarget.clearColor=this._backgroundColorRgba,this.bindRenderTarget(this.rootRenderTarget);var r=new b.default.GLTexture.fromData(e,null,1,1),i={_glTextures:{}};i._glTextures[this.CONTEXT_UID]={};for(var n=0;n<t;n++){var o=new h.default;o._glTextures[this.CONTEXT_UID]=r,this.boundTextures[n]=i,this.emptyTextures[n]=o,this.bindTexture(null,n)}this.emit("context",e),this.resize(this.screen.width,this.screen.height)},o.prototype.render=function(e,t,r,i,n){if(this.renderingToScreen=!t,this.emit("prerender"),this.gl&&!this.gl.isContextLost()){if(this._nextTextureLocation=0,t||(this._lastObjectRendered=e),!n){var o=e.parent;e.parent=this._tempDisplayObjectParent,e.updateTransform(),e.parent=o}this.bindRenderTexture(t,i),this.currentRenderer.start(),(void 0!==r?r:this.clearBeforeRender)&&this._activeRenderTarget.clear(),e.renderWebGL(this),this.currentRenderer.flush(),this.textureGC.update(),this.emit("postrender")}},o.prototype.setObjectRenderer=function(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())},o.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},o.prototype.resize=function(e,t){i.default.prototype.resize.call(this,e,t),this.rootRenderTarget.resize(e,t),this._activeRenderTarget===this.rootRenderTarget&&(this.rootRenderTarget.activate(),this._activeShader&&(this._activeShader.uniforms.projectionMatrix=this.rootRenderTarget.projectionMatrix.toArray(!0)))},o.prototype.setBlendMode=function(e){this.state.setBlendMode(e)},o.prototype.clear=function(e){this._activeRenderTarget.clear(e)},o.prototype.setTransform=function(e){this._activeRenderTarget.transform=e},o.prototype.clearRenderTexture=function(e,t){var r=e.baseTexture._glRenderTargets[this.CONTEXT_UID];return r&&r.clear(t),this},o.prototype.bindRenderTexture=function(e,t){var r=void 0;if(e){var i=e.baseTexture;i._glRenderTargets[this.CONTEXT_UID]||this.textureManager.updateTexture(i,0),this.unbindTexture(i),(r=i._glRenderTargets[this.CONTEXT_UID]).setFrame(e.frame)}else r=this.rootRenderTarget;return r.transform=t,this.bindRenderTarget(r),this},o.prototype.bindRenderTarget=function(e){return e!==this._activeRenderTarget&&((this._activeRenderTarget=e).activate(),this._activeShader&&(this._activeShader.uniforms.projectionMatrix=e.projectionMatrix.toArray(!0)),this.stencilManager.setMaskStack(e.stencilMaskStack)),this},o.prototype.bindShader=function(e,t){return this._activeShader!==e&&((this._activeShader=e).bind(),!1!==t&&(e.uniforms.projectionMatrix=this._activeRenderTarget.projectionMatrix.toArray(!0))),this},o.prototype.bindTexture=function(e,t,r){if((e=(e=e||this.emptyTextures[t]).baseTexture||e).touched=this.textureGC.count,r)t=t||0;else{for(var i=0;i<this.boundTextures.length;i++)if(this.boundTextures[i]===e)return i;void 0===t&&(this._nextTextureLocation++,this._nextTextureLocation%=this.boundTextures.length,t=this.boundTextures.length-this._nextTextureLocation-1)}var n=this.gl,o=e._glTextures[this.CONTEXT_UID];return o?(this.boundTextures[t]=e,n.activeTexture(n.TEXTURE0+t),n.bindTexture(n.TEXTURE_2D,o.texture)):this.textureManager.updateTexture(e,t),t},o.prototype.unbindTexture=function(e){var t=this.gl;if(e=e.baseTexture||e,this._unknownBoundTextures){this._unknownBoundTextures=!1;for(var r=0;r<this.boundTextures.length;r++)this.boundTextures[r]===this.emptyTextures[r]&&(t.activeTexture(t.TEXTURE0+r),t.bindTexture(t.TEXTURE_2D,this.emptyTextures[r]._glTextures[this.CONTEXT_UID].texture))}for(var i=0;i<this.boundTextures.length;i++)this.boundTextures[i]===e&&(this.boundTextures[i]=this.emptyTextures[i],t.activeTexture(t.TEXTURE0+i),t.bindTexture(t.TEXTURE_2D,this.emptyTextures[i]._glTextures[this.CONTEXT_UID].texture));return this},o.prototype.createVao=function(){return new b.default.VertexArrayObject(this.gl,this.state.attribState)},o.prototype.bindVao=function(e){return this._activeVao===e||(e?e.bind():this._activeVao&&this._activeVao.unbind(),this._activeVao=e),this},o.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer),this.bindVao(null),this._activeShader=null,this._activeRenderTarget=this.rootRenderTarget,this._unknownBoundTextures=!0;for(var e=0;e<this.boundTextures.length;e++)this.boundTextures[e]=this.emptyTextures[e];return this.rootRenderTarget.activate(),this.state.resetToDefault(),this},o.prototype.handleContextLost=function(e){e.preventDefault()},o.prototype.handleContextRestored=function(){this.textureManager.removeAll(),this.filterManager.destroy(!0),this._initContext()},o.prototype.destroy=function(e){this.destroyPlugins(),this.view.removeEventListener("webglcontextlost",this.handleContextLost),this.view.removeEventListener("webglcontextrestored",this.handleContextRestored),this.textureManager.destroy(),n.prototype.destroy.call(this,e),this.uid=0,this.maskManager.destroy(),this.stencilManager.destroy(),this.filterManager.destroy(),this.maskManager=null,this.filterManager=null,this.textureManager=null,this.currentRenderer=null,this.handleContextLost=null,this.handleContextRestored=null,this._contextOptions=null,this.gl.useProgram(null),this.gl.getExtension("WEBGL_lose_context")&&this.gl.getExtension("WEBGL_lose_context").loseContext(),this.gl=null},o}(i.default);r.default=_,n.pluginTarget.mixin(_)},{"../../const":46,"../../textures/BaseTexture":112,"../../utils":125,"../SystemRenderer":76,"./TextureGarbageCollector":82,"./TextureManager":83,"./WebGLState":85,"./managers/FilterManager":90,"./managers/MaskManager":91,"./managers/StencilManager":92,"./utils/ObjectRenderer":94,"./utils/RenderTarget":96,"./utils/mapWebGLDrawModesToPixi":99,"./utils/validateContext":100,"pixi-gl-core":15}],85:[function(e,t,r){"use strict";r.__esModule=!0;var i,n=e("./utils/mapWebGLBlendModesToPixi"),o=(i=n)&&i.__esModule?i:{default:i};var a=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.activeState=new Uint8Array(16),this.defaultState=new Uint8Array(16),this.defaultState[0]=1,this.stackIndex=0,this.stack=[],this.gl=e,this.maxAttribs=e.getParameter(e.MAX_VERTEX_ATTRIBS),this.attribState={tempAttribState:new Array(this.maxAttribs),attribState:new Array(this.maxAttribs)},this.blendModes=(0,o.default)(e),this.nativeVaoExtension=e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object")}return t.prototype.push=function(){var e=this.stack[this.stackIndex];e||(e=this.stack[this.stackIndex]=new Uint8Array(16)),++this.stackIndex;for(var t=0;t<this.activeState.length;t++)e[t]=this.activeState[t]},t.prototype.pop=function(){var e=this.stack[--this.stackIndex];this.setState(e)},t.prototype.setState=function(e){this.setBlend(e[0]),this.setDepthTest(e[1]),this.setFrontFace(e[2]),this.setCullFace(e[3]),this.setBlendMode(e[4])},t.prototype.setBlend=function(e){e=e?1:0,this.activeState[0]!==e&&(this.activeState[0]=e,this.gl[e?"enable":"disable"](this.gl.BLEND))},t.prototype.setBlendMode=function(e){if(e!==this.activeState[4]){this.activeState[4]=e;var t=this.blendModes[e];2===t.length?this.gl.blendFunc(t[0],t[1]):this.gl.blendFuncSeparate(t[0],t[1],t[2],t[3])}},t.prototype.setDepthTest=function(e){e=e?1:0,this.activeState[1]!==e&&(this.activeState[1]=e,this.gl[e?"enable":"disable"](this.gl.DEPTH_TEST))},t.prototype.setCullFace=function(e){e=e?1:0,this.activeState[3]!==e&&(this.activeState[3]=e,this.gl[e?"enable":"disable"](this.gl.CULL_FACE))},t.prototype.setFrontFace=function(e){e=e?1:0,this.activeState[2]!==e&&(this.activeState[2]=e,this.gl.frontFace(this.gl[e?"CW":"CCW"]))},t.prototype.resetAttributes=function(){for(var e=0;e<this.attribState.tempAttribState.length;e++)this.attribState.tempAttribState[e]=0;for(var t=0;t<this.attribState.attribState.length;t++)this.attribState.attribState[t]=0;for(var r=1;r<this.maxAttribs;r++)this.gl.disableVertexAttribArray(r)},t.prototype.resetToDefault=function(){this.nativeVaoExtension&&this.nativeVaoExtension.bindVertexArrayOES(null),this.resetAttributes();for(var e=0;e<this.activeState.length;++e)this.activeState[e]=32;this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.setState(this.defaultState)},t}();r.default=a},{"./utils/mapWebGLBlendModesToPixi":98}],86:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),o=n(e("./extractUniformsFromSrc")),a=e("../../../utils"),s=e("../../../const"),u=n(e("../../../settings"));function n(e){return e&&e.__esModule?e:{default:e}}var c={},l=function(){function n(e,t,r){for(var i in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),this.vertexSrc=e||n.defaultVertexSrc,this.fragmentSrc=t||n.defaultFragmentSrc,this._blendMode=s.BLEND_MODES.NORMAL,this.uniformData=r||(0,o.default)(this.vertexSrc,this.fragmentSrc,"projectionMatrix|uSampler"),this.uniforms={},this.uniformData)this.uniforms[i]=this.uniformData[i].value,this.uniformData[i].type&&(this.uniformData[i].type=this.uniformData[i].type.toLowerCase());this.glShaders={},c[this.vertexSrc+this.fragmentSrc]||(c[this.vertexSrc+this.fragmentSrc]=(0,a.uid)()),this.glShaderKey=c[this.vertexSrc+this.fragmentSrc],this.padding=4,this.resolution=u.default.FILTER_RESOLUTION,this.enabled=!0,this.autoFit=!0}return n.prototype.apply=function(e,t,r,i,n){e.applyFilter(this,t,r,i)},i(n,[{key:"blendMode",get:function(){return this._blendMode},set:function(e){this._blendMode=e}}],[{key:"defaultVertexSrc",get:function(){return["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform mat3 projectionMatrix;","uniform mat3 filterMatrix;","varying vec2 vTextureCoord;","varying vec2 vFilterCoord;","void main(void){"," gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);"," vFilterCoord = ( filterMatrix * vec3( aTextureCoord, 1.0) ).xy;"," vTextureCoord = aTextureCoord ;","}"].join("\n")}},{key:"defaultFragmentSrc",get:function(){return["varying vec2 vTextureCoord;","varying vec2 vFilterCoord;","uniform sampler2D uSampler;","uniform sampler2D filterSampler;","void main(void){"," vec4 masky = texture2D(filterSampler, vFilterCoord);"," vec4 sample = texture2D(uSampler, vTextureCoord);"," vec4 color;"," if(mod(vFilterCoord.x, 1.0) > 0.5)"," {"," color = vec4(1.0, 0.0, 0.0, 1.0);"," }"," else"," {"," color = vec4(0.0, 1.0, 0.0, 1.0);"," }"," gl_FragColor = mix(sample, masky, 0.5);"," gl_FragColor *= sample.a;","}"].join("\n")}}]),n}();r.default=l},{"../../../const":46,"../../../settings":101,"../../../utils":125,"./extractUniformsFromSrc":87}],87:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t,r){var i=o(e),n=o(t);return Object.assign(i,n)};var i,n=e("pixi-gl-core");var f=((i=n)&&i.__esModule?i:{default:i}).default.shader.defaultValue;function o(e){for(var t=new RegExp("^(projectionMatrix|uSampler|filterArea|filterClamp)$"),r={},i=void 0,n=e.replace(/\s+/g," ").split(/\s*;\s*/),o=0;o<n.length;o++){var a=n[o].trim();if(-1<a.indexOf("uniform")){var s=a.split(" "),u=s[1],c=s[2],l=1;-1<c.indexOf("[")&&(c=(i=c.split(/\[|]/))[0],l*=Number(i[1])),c.match(t)||(r[c]={value:f(u,l),name:c,type:u})}}return r}},{"pixi-gl-core":15}],88:[function(e,t,r){"use strict";r.__esModule=!0,r.calculateScreenSpaceMatrix=function(e,t,r){var i=e.identity();return i.translate(t.x/r.width,t.y/r.height),i.scale(r.width,r.height),i},r.calculateNormalizedScreenSpaceMatrix=function(e,t,r){var i=e.identity();i.translate(t.x/r.width,t.y/r.height);var n=r.width/t.width,o=r.height/t.height;return i.scale(n,o),i},r.calculateSpriteMatrix=function(e,t,r,i){var n=i._texture.orig,o=e.set(r.width,0,0,r.height,t.x,t.y),a=i.worldTransform.copy(s.Matrix.TEMP_MATRIX);return a.invert(),o.prepend(a),o.scale(1/n.width,1/n.height),o.translate(i.anchor.x,i.anchor.y),o};var s=e("../../../math")},{"../../../math":70}],89:[function(e,t,r){"use strict";r.__esModule=!0;var i=n(e("../Filter")),o=e("../../../../math"),a=(e("path"),n(e("../../../../textures/TextureMatrix")));function n(e){return e&&e.__esModule?e:{default:e}}var s=function(i){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=new o.Matrix,r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,i.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;\n}\n","varying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform sampler2D mask;\nuniform float alpha;\nuniform vec4 maskClamp;\n\nvoid main(void)\n{\n float clip = step(3.5,\n step(maskClamp.x, vMaskCoord.x) +\n step(maskClamp.y, vMaskCoord.y) +\n step(vMaskCoord.x, maskClamp.z) +\n step(vMaskCoord.y, maskClamp.w));\n\n vec4 original = texture2D(uSampler, vTextureCoord);\n vec4 masky = texture2D(mask, vMaskCoord);\n\n original *= (masky.r * masky.a * alpha * clip);\n\n gl_FragColor = original;\n}\n"));return e.renderable=!1,r.maskSprite=e,r.maskMatrix=t,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,i),n.prototype.apply=function(e,t,r,i){var n=this.maskSprite,o=this.maskSprite.texture;o.valid&&(o.transform||(o.transform=new a.default(o,0)),o.transform.update(),this.uniforms.mask=o,this.uniforms.otherMatrix=e.calculateSpriteMatrix(this.maskMatrix,n).prepend(o.transform.mapCoord),this.uniforms.alpha=n.worldAlpha,this.uniforms.maskClamp=o.transform.uClampFrame,e.applyFilter(this,t,r,i))},n}(i.default);r.default=s},{"../../../../math":70,"../../../../textures/TextureMatrix":116,"../Filter":86,path:8}],90:[function(e,t,r){"use strict";r.__esModule=!0;var i=l(e("./WebGLManager")),s=l(e("../utils/RenderTarget")),n=l(e("../utils/Quad")),o=e("../../../math"),u=l(e("../../../Shader")),a=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../filters/filterTransforms")),c=l(e("bit-twiddle"));function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p=function(){function e(){f(this,e),this.renderTarget=null,this.target=null,this.resolution=1,this.sourceFrame=new o.Rectangle,this.destinationFrame=new o.Rectangle,this.filters=[]}return e.prototype.clear=function(){this.filters=null,this.target=null,this.renderTarget=null},e}(),h="screen",d=function(r){function i(e){f(this,i);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,r.call(this,e));return t.gl=t.renderer.gl,t.quad=new n.default(t.gl,e.state.attribState),t.shaderCache={},t.pool={},t.filterData=null,t.managedFilters=[],t.renderer.on("prerender",t.onPrerender,t),t._screenWidth=e.view.width,t._screenHeight=e.view.height,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),i.prototype.pushFilter=function(e,t){var r=this.renderer,i=this.filterData;if(!i){i=this.renderer._activeRenderTarget.filterStack;var n=new p;n.sourceFrame=n.destinationFrame=this.renderer._activeRenderTarget.size,n.renderTarget=r._activeRenderTarget,this.renderer._activeRenderTarget.filterData=i={index:0,stack:[n]},this.filterData=i}var o=i.stack[++i.index],a=i.stack[0].destinationFrame;o||(o=i.stack[i.index]=new p);var s=e.filterArea&&0===e.filterArea.x&&0===e.filterArea.y&&e.filterArea.width===r.screen.width&&e.filterArea.height===r.screen.height,u=t[0].resolution,c=0|t[0].padding,l=s?r.screen:e.filterArea||e.getBounds(!0),f=o.sourceFrame,h=o.destinationFrame;f.x=(l.x*u|0)/u,f.y=(l.y*u|0)/u,f.width=(l.width*u|0)/u,f.height=(l.height*u|0)/u,s||(i.stack[0].renderTarget.transform||t[0].autoFit&&f.fit(a),f.pad(c)),h.width=f.width,h.height=f.height;var d=this.getPotRenderTarget(r.gl,f.width,f.height,u);o.target=e,o.filters=t,o.resolution=u,(o.renderTarget=d).setFrame(h,f),r.bindRenderTarget(d),d.clear()},i.prototype.popFilter=function(){var e=this.filterData,t=e.stack[e.index-1],r=e.stack[e.index];this.quad.map(r.renderTarget.size,r.sourceFrame).upload();var i=r.filters;if(1===i.length)i[0].apply(this,r.renderTarget,t.renderTarget,!1,r),this.freePotRenderTarget(r.renderTarget);else{var n=r.renderTarget,o=this.getPotRenderTarget(this.renderer.gl,r.sourceFrame.width,r.sourceFrame.height,r.resolution);o.setFrame(r.destinationFrame,r.sourceFrame),o.clear();var a=0;for(a=0;a<i.length-1;++a){i[a].apply(this,n,o,!0,r);var s=n;n=o,o=s}i[a].apply(this,n,t.renderTarget,!1,r),this.freePotRenderTarget(n),this.freePotRenderTarget(o)}r.clear(),e.index--,0===e.index&&(this.filterData=null)},i.prototype.applyFilter=function(e,t,r,i){var n=this.renderer,o=n.gl,a=e.glShaders[n.CONTEXT_UID];a||(e.glShaderKey?(a=this.shaderCache[e.glShaderKey])||(a=new u.default(this.gl,e.vertexSrc,e.fragmentSrc),e.glShaders[n.CONTEXT_UID]=this.shaderCache[e.glShaderKey]=a,this.managedFilters.push(e)):(a=e.glShaders[n.CONTEXT_UID]=new u.default(this.gl,e.vertexSrc,e.fragmentSrc),this.managedFilters.push(e)),n.bindVao(null),this.quad.initVao(a)),n.bindVao(this.quad.vao),n.bindRenderTarget(r),i&&(o.disable(o.SCISSOR_TEST),n.clear(),o.enable(o.SCISSOR_TEST)),r===n.maskManager.scissorRenderTarget&&n.maskManager.pushScissorMask(null,n.maskManager.scissorData),n.bindShader(a);var s=this.renderer.emptyTextures[0];this.renderer.boundTextures[0]=s,this.syncUniforms(a,e),n.state.setBlendMode(e.blendMode),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,t.texture.texture),this.quad.vao.draw(this.renderer.gl.TRIANGLES,6,0),o.bindTexture(o.TEXTURE_2D,s._glTextures[this.renderer.CONTEXT_UID].texture)},i.prototype.syncUniforms=function(e,t){var r=t.uniformData,i=t.uniforms,n=1,o=void 0;if(e.uniforms.filterArea){o=this.filterData.stack[this.filterData.index];var a=e.uniforms.filterArea;a[0]=o.renderTarget.size.width,a[1]=o.renderTarget.size.height,a[2]=o.sourceFrame.x,a[3]=o.sourceFrame.y,e.uniforms.filterArea=a}if(e.uniforms.filterClamp){o=o||this.filterData.stack[this.filterData.index];var s=e.uniforms.filterClamp;s[0]=0,s[1]=0,s[2]=(o.sourceFrame.width-1)/o.renderTarget.size.width,s[3]=(o.sourceFrame.height-1)/o.renderTarget.size.height,e.uniforms.filterClamp=s}for(var u in r)if(e.uniforms.data[u]){var c=r[u].type;if("sampler2d"===c&&0!==i[u]){if(i[u].baseTexture)e.uniforms[u]=this.renderer.bindTexture(i[u].baseTexture,n);else{e.uniforms[u]=n;var l=this.renderer.gl;this.renderer.boundTextures[n]=this.renderer.emptyTextures[n],l.activeTexture(l.TEXTURE0+n),i[u].texture.bind()}n++}else if("mat3"===c)void 0!==i[u].a?e.uniforms[u]=i[u].toArray(!0):e.uniforms[u]=i[u];else if("vec2"===c)if(void 0!==i[u].x){var f=e.uniforms[u]||new Float32Array(2);f[0]=i[u].x,f[1]=i[u].y,e.uniforms[u]=f}else e.uniforms[u]=i[u];else"float"===c?e.uniforms.data[u].value!==r[u]&&(e.uniforms[u]=i[u]):e.uniforms[u]=i[u]}},i.prototype.getRenderTarget=function(e,t){var r=this.filterData.stack[this.filterData.index],i=this.getPotRenderTarget(this.renderer.gl,r.sourceFrame.width,r.sourceFrame.height,t||r.resolution);return i.setFrame(r.destinationFrame,r.sourceFrame),i},i.prototype.returnRenderTarget=function(e){this.freePotRenderTarget(e)},i.prototype.calculateScreenSpaceMatrix=function(e){var t=this.filterData.stack[this.filterData.index];return a.calculateScreenSpaceMatrix(e,t.sourceFrame,t.renderTarget.size)},i.prototype.calculateNormalizedScreenSpaceMatrix=function(e){var t=this.filterData.stack[this.filterData.index];return a.calculateNormalizedScreenSpaceMatrix(e,t.sourceFrame,t.renderTarget.size,t.destinationFrame)},i.prototype.calculateSpriteMatrix=function(e,t){var r=this.filterData.stack[this.filterData.index];return a.calculateSpriteMatrix(e,r.sourceFrame,r.renderTarget.size,t)},i.prototype.destroy=function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=this.renderer,r=this.managedFilters;t.off("prerender",this.onPrerender,this);for(var i=0;i<r.length;i++)e||r[i].glShaders[t.CONTEXT_UID].destroy(),delete r[i].glShaders[t.CONTEXT_UID];this.shaderCache={},e?this.pool={}:this.emptyPool()},i.prototype.getPotRenderTarget=function(e,t,r,i){var n=h;r*=i,(t*=i)===this._screenWidth&&r===this._screenHeight||(n=(65535&(t=c.default.nextPow2(t)))<<16|65535&(r=c.default.nextPow2(r))),this.pool[n]||(this.pool[n]=[]);var o=this.pool[n].pop();if(!o){var a=this.renderer.boundTextures[0];e.activeTexture(e.TEXTURE0),o=new s.default(e,t,r,null,1),e.bindTexture(e.TEXTURE_2D,a._glTextures[this.renderer.CONTEXT_UID].texture)}return o.resolution=i,o.defaultFrame.width=o.size.width=t/i,o.defaultFrame.height=o.size.height=r/i,o.filterPoolKey=n,o},i.prototype.emptyPool=function(){for(var e in this.pool){var t=this.pool[e];if(t)for(var r=0;r<t.length;r++)t[r].destroy(!0)}this.pool={}},i.prototype.freePotRenderTarget=function(e){this.pool[e.filterPoolKey].push(e)},i.prototype.onPrerender=function(){if(this._screenWidth!==this.renderer.view.width||this._screenHeight!==this.renderer.view.height){this._screenWidth=this.renderer.view.width,this._screenHeight=this.renderer.view.height;var e=this.pool[h];if(e)for(var t=0;t<e.length;t++)e[t].destroy(!0);this.pool[h]=[]}},i}(i.default);r.default=d},{"../../../Shader":44,"../../../math":70,"../filters/filterTransforms":88,"../utils/Quad":95,"../utils/RenderTarget":96,"./WebGLManager":93,"bit-twiddle":1}],91:[function(e,t,r){"use strict";r.__esModule=!0;var i=o(e("./WebGLManager")),n=o(e("../filters/spriteMask/SpriteMaskFilter"));function o(e){return e&&e.__esModule?e:{default:e}}var a=function(r){function i(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,r.call(this,e));return t.scissor=!1,t.scissorData=null,t.scissorRenderTarget=null,t.enableScissor=!0,t.alphaMaskPool=[],t.alphaMaskIndex=0,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),i.prototype.pushMask=function(e,t){if(t.texture)this.pushSpriteMask(e,t);else if(this.enableScissor&&!this.scissor&&this.renderer._activeRenderTarget.root&&!this.renderer.stencilManager.stencilMaskStack.length&&t.isFastRect()){var r=t.worldTransform,i=Math.atan2(r.b,r.a);(i=Math.round(i*(180/Math.PI)))%90?this.pushStencilMask(t):this.pushScissorMask(e,t)}else this.pushStencilMask(t)},i.prototype.popMask=function(e,t){t.texture?this.popSpriteMask(e,t):this.enableScissor&&!this.renderer.stencilManager.stencilMaskStack.length?this.popScissorMask(e,t):this.popStencilMask(e,t)},i.prototype.pushSpriteMask=function(e,t){var r=this.alphaMaskPool[this.alphaMaskIndex];r||(r=this.alphaMaskPool[this.alphaMaskIndex]=[new n.default(t)]),r[0].resolution=this.renderer.resolution,r[0].maskSprite=t;var i=e.filterArea;e.filterArea=t.getBounds(!0),this.renderer.filterManager.pushFilter(e,r),e.filterArea=i,this.alphaMaskIndex++},i.prototype.popSpriteMask=function(){this.renderer.filterManager.popFilter(),this.alphaMaskIndex--},i.prototype.pushStencilMask=function(e){this.renderer.currentRenderer.stop(),this.renderer.stencilManager.pushStencil(e)},i.prototype.popStencilMask=function(){this.renderer.currentRenderer.stop(),this.renderer.stencilManager.popStencil()},i.prototype.pushScissorMask=function(e,t){t.renderable=!0;var r=this.renderer._activeRenderTarget,i=t.getBounds();i.fit(r.size),t.renderable=!1,this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST);var n=this.renderer.resolution;this.renderer.gl.scissor(i.x*n,(r.root?r.size.height-i.y-i.height:i.y)*n,i.width*n,i.height*n),this.scissorRenderTarget=r,this.scissorData=t,this.scissor=!0},i.prototype.popScissorMask=function(){this.scissorRenderTarget=null,this.scissorData=null,this.scissor=!1;var e=this.renderer.gl;e.disable(e.SCISSOR_TEST)},i}(i.default);r.default=a},{"../filters/spriteMask/SpriteMaskFilter":89,"./WebGLManager":93}],92:[function(e,t,r){"use strict";r.__esModule=!0;var i,n=e("./WebGLManager"),o=(i=n)&&i.__esModule?i:{default:i};var a=function(r){function i(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,r.call(this,e));return t.stencilMaskStack=null,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),i.prototype.setMaskStack=function(e){this.stencilMaskStack=e;var t=this.renderer.gl;0===e.length?t.disable(t.STENCIL_TEST):t.enable(t.STENCIL_TEST)},i.prototype.pushStencil=function(e){this.renderer.setObjectRenderer(this.renderer.plugins.graphics),this.renderer._activeRenderTarget.attachStencilBuffer();var t=this.renderer.gl,r=this.stencilMaskStack.length;0===r&&t.enable(t.STENCIL_TEST),this.stencilMaskStack.push(e),t.colorMask(!1,!1,!1,!1),t.stencilFunc(t.EQUAL,r,this._getBitwiseMask()),t.stencilOp(t.KEEP,t.KEEP,t.INCR),this.renderer.plugins.graphics.render(e),this._useCurrent()},i.prototype.popStencil=function(){this.renderer.setObjectRenderer(this.renderer.plugins.graphics);var e=this.renderer.gl,t=this.stencilMaskStack.pop();0===this.stencilMaskStack.length?(e.disable(e.STENCIL_TEST),e.clear(e.STENCIL_BUFFER_BIT),e.clearStencil(0)):(e.colorMask(!1,!1,!1,!1),e.stencilOp(e.KEEP,e.KEEP,e.DECR),this.renderer.plugins.graphics.render(t),this._useCurrent())},i.prototype._useCurrent=function(){var e=this.renderer.gl;e.colorMask(!0,!0,!0,!0),e.stencilFunc(e.EQUAL,this.stencilMaskStack.length,this._getBitwiseMask()),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)},i.prototype._getBitwiseMask=function(){return(1<<this.stencilMaskStack.length)-1},i.prototype.destroy=function(){o.default.prototype.destroy.call(this),this.stencilMaskStack.stencilStack=null},i}(o.default);r.default=a},{"./WebGLManager":93}],93:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e,this.renderer.on("context",this.onContextChange,this)}return t.prototype.onContextChange=function(){},t.prototype.destroy=function(){this.renderer.off("context",this.onContextChange,this),this.renderer=null},t}();r.default=i},{}],94:[function(e,t,r){"use strict";r.__esModule=!0;var i,n=e("../managers/WebGLManager");var o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.start=function(){},t.prototype.stop=function(){this.flush()},t.prototype.flush=function(){},t.prototype.render=function(e){},t}(((i=n)&&i.__esModule?i:{default:i}).default);r.default=o},{"../managers/WebGLManager":93}],95:[function(e,t,r){"use strict";r.__esModule=!0;var n=i(e("pixi-gl-core")),o=i(e("../../../utils/createIndicesForQuads"));function i(e){return e&&e.__esModule?e:{default:e}}var a=function(){function i(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.gl=e,this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.interleaved=new Float32Array(16);for(var r=0;r<4;r++)this.interleaved[4*r]=this.vertices[2*r],this.interleaved[4*r+1]=this.vertices[2*r+1],this.interleaved[4*r+2]=this.uvs[2*r],this.interleaved[4*r+3]=this.uvs[2*r+1];this.indices=(0,o.default)(1),this.vertexBuffer=n.default.GLBuffer.createVertexBuffer(e,this.interleaved,e.STATIC_DRAW),this.indexBuffer=n.default.GLBuffer.createIndexBuffer(e,this.indices,e.STATIC_DRAW),this.vao=new n.default.VertexArrayObject(e,t)}return i.prototype.initVao=function(e){this.vao.clear().addIndex(this.indexBuffer).addAttribute(this.vertexBuffer,e.attributes.aVertexPosition,this.gl.FLOAT,!1,16,0).addAttribute(this.vertexBuffer,e.attributes.aTextureCoord,this.gl.FLOAT,!1,16,8)},i.prototype.map=function(e,t){var r=0,i=0;return this.uvs[0]=r,this.uvs[1]=i,this.uvs[2]=r+t.width/e.width,this.uvs[3]=i,this.uvs[4]=r+t.width/e.width,this.uvs[5]=i+t.height/e.height,this.uvs[6]=r,this.uvs[7]=i+t.height/e.height,r=t.x,i=t.y,this.vertices[0]=r,this.vertices[1]=i,this.vertices[2]=r+t.width,this.vertices[3]=i,this.vertices[4]=r+t.width,this.vertices[5]=i+t.height,this.vertices[6]=r,this.vertices[7]=i+t.height,this},i.prototype.upload=function(){for(var e=0;e<4;e++)this.interleaved[4*e]=this.vertices[2*e],this.interleaved[4*e+1]=this.vertices[2*e+1],this.interleaved[4*e+2]=this.uvs[2*e],this.interleaved[4*e+3]=this.uvs[2*e+1];return this.vertexBuffer.upload(this.interleaved),this},i.prototype.destroy=function(){var e=this.gl;e.deleteBuffer(this.vertexBuffer),e.deleteBuffer(this.indexBuffer)},i}();r.default=a},{"../../../utils/createIndicesForQuads":123,"pixi-gl-core":15}],96:[function(e,t,r){"use strict";r.__esModule=!0;var i,s=e("../../../math"),u=e("../../../const"),n=e("../../../settings"),c=(i=n)&&i.__esModule?i:{default:i},l=e("pixi-gl-core");var o=function(){function a(e,t,r,i,n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),this.gl=e,this.frameBuffer=null,this.texture=null,this.clearColor=[0,0,0,0],this.size=new s.Rectangle(0,0,1,1),this.resolution=n||c.default.RESOLUTION,this.projectionMatrix=new s.Matrix,this.transform=null,this.frame=null,this.defaultFrame=new s.Rectangle,this.destinationFrame=null,this.sourceFrame=null,this.stencilBuffer=null,this.stencilMaskStack=[],this.filterData=null,this.filterPoolKey="",this.scaleMode=void 0!==i?i:c.default.SCALE_MODE,this.root=o||!1,this.root?(this.frameBuffer=new l.GLFramebuffer(e,100,100),this.frameBuffer.framebuffer=null):(this.frameBuffer=l.GLFramebuffer.createRGBA(e,100,100),this.scaleMode===u.SCALE_MODES.NEAREST?this.frameBuffer.texture.enableNearestScaling():this.frameBuffer.texture.enableLinearScaling(),this.texture=this.frameBuffer.texture),this.setFrame(),this.resize(t,r)}return a.prototype.clear=function(e){var t=e||this.clearColor;this.frameBuffer.clear(t[0],t[1],t[2],t[3])},a.prototype.attachStencilBuffer=function(){this.root||this.frameBuffer.enableStencil()},a.prototype.setFrame=function(e,t){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=t||this.sourceFrame||this.destinationFrame},a.prototype.activate=function(){var e=this.gl;this.frameBuffer.bind(),this.calculateProjection(this.destinationFrame,this.sourceFrame),this.transform&&this.projectionMatrix.append(this.transform),this.destinationFrame!==this.sourceFrame?(e.enable(e.SCISSOR_TEST),e.scissor(0|this.destinationFrame.x,0|this.destinationFrame.y,this.destinationFrame.width*this.resolution|0,this.destinationFrame.height*this.resolution|0)):e.disable(e.SCISSOR_TEST),e.viewport(0|this.destinationFrame.x,0|this.destinationFrame.y,this.destinationFrame.width*this.resolution|0,this.destinationFrame.height*this.resolution|0)},a.prototype.calculateProjection=function(e,t){var r=this.projectionMatrix;t=t||e,r.identity(),this.root?(r.a=1/e.width*2,r.d=-1/e.height*2,r.tx=-1-t.x*r.a,r.ty=1-t.y*r.d):(r.a=1/e.width*2,r.d=1/e.height*2,r.tx=-1-t.x*r.a,r.ty=-1-t.y*r.d)},a.prototype.resize=function(e,t){if(e|=0,t|=0,this.size.width!==e||this.size.height!==t){this.size.width=e,this.size.height=t,this.defaultFrame.width=e,this.defaultFrame.height=t,this.frameBuffer.resize(e*this.resolution,t*this.resolution);var r=this.frame||this.size;this.calculateProjection(r)}},a.prototype.destroy=function(){this.frameBuffer.stencil&&this.gl.deleteRenderbuffer(this.frameBuffer.stencil),this.frameBuffer.destroy(),this.frameBuffer=null,this.texture=null},a}();r.default=o},{"../../../const":46,"../../../math":70,"../../../settings":101,"pixi-gl-core":15}],97:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){var r=!t;if(0===e)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");if(r){var i=document.createElement("canvas");i.width=1,i.height=1,t=a.default.createContext(i)}var n=t.createShader(t.FRAGMENT_SHADER);for(;;){var o=s.replace(/%forloop%/gi,u(e));if(t.shaderSource(n,o),t.compileShader(n),t.getShaderParameter(n,t.COMPILE_STATUS))break;e=e/2|0}r&&t.getExtension("WEBGL_lose_context")&&t.getExtension("WEBGL_lose_context").loseContext();return e};var i,n=e("pixi-gl-core"),a=(i=n)&&i.__esModule?i:{default:i};var s=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n");function u(e){for(var t="",r=0;r<e;++r)0<r&&(t+="\nelse "),r<e-1&&(t+="if(test == "+r+".0){}");return t}},{"pixi-gl-core":15}],98:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[];return t[i.BLEND_MODES.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[i.BLEND_MODES.ADD]=[e.ONE,e.DST_ALPHA],t[i.BLEND_MODES.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],t[i.BLEND_MODES.SCREEN]=[e.ONE,e.ONE_MINUS_SRC_COLOR],t[i.BLEND_MODES.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[i.BLEND_MODES.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[i.BLEND_MODES.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[i.BLEND_MODES.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[i.BLEND_MODES.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[i.BLEND_MODES.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[i.BLEND_MODES.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[i.BLEND_MODES.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[i.BLEND_MODES.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[i.BLEND_MODES.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[i.BLEND_MODES.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[i.BLEND_MODES.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[i.BLEND_MODES.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[i.BLEND_MODES.NORMAL_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[i.BLEND_MODES.ADD_NPM]=[e.SRC_ALPHA,e.DST_ALPHA,e.ONE,e.DST_ALPHA],t[i.BLEND_MODES.SCREEN_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_COLOR],t};var i=e("../../../const")},{"../../../const":46}],99:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return t[i.DRAW_MODES.POINTS]=e.POINTS,t[i.DRAW_MODES.LINES]=e.LINES,t[i.DRAW_MODES.LINE_LOOP]=e.LINE_LOOP,t[i.DRAW_MODES.LINE_STRIP]=e.LINE_STRIP,t[i.DRAW_MODES.TRIANGLES]=e.TRIANGLES,t[i.DRAW_MODES.TRIANGLE_STRIP]=e.TRIANGLE_STRIP,t[i.DRAW_MODES.TRIANGLE_FAN]=e.TRIANGLE_FAN,t};var i=e("../../../const")},{"../../../const":46}],100:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){e.getContextAttributes().stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly")}},{}],101:[function(e,t,r){"use strict";r.__esModule=!0;var i=o(e("./utils/maxRecommendedTextures")),n=o(e("./utils/canUploadSameBuffer"));function o(e){return e&&e.__esModule?e:{default:e}}r.default={TARGET_FPMS:.06,MIPMAP_TEXTURES:!0,RESOLUTION:1,FILTER_RESOLUTION:1,SPRITE_MAX_TEXTURES:(0,i.default)(32),SPRITE_BATCH_SIZE:4096,RETINA_PREFIX:/@([0-9\.]+)x/,RENDER_OPTIONS:{view:null,antialias:!1,forceFXAA:!1,autoResize:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,roundPixels:!1,width:800,height:600,legacy:!1},TRANSFORM_MODE:0,GC_MODE:0,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:0,SCALE_MODE:0,PRECISION_VERTEX:"highp",PRECISION_FRAGMENT:"mediump",CAN_UPLOAD_SAME_BUFFER:(0,n.default)(),MESH_CANVAS_PADDING:0}},{"./utils/canUploadSameBuffer":122,"./utils/maxRecommendedTextures":127}],102:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),o=e("../math"),a=e("../utils"),s=e("../const"),u=c(e("../textures/Texture")),i=c(e("../display/Container"));function c(e){return e&&e.__esModule?e:{default:e}}var l=new o.Point,f=function(r){function i(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,r.call(this));return t._anchor=new o.ObservablePoint(t._onAnchorUpdate,t,e?e.defaultAnchor.x:0,e?e.defaultAnchor.y:0),t._texture=null,t._width=0,t._height=0,t._tint=null,t._tintRGB=null,t.tint=16777215,t.blendMode=s.BLEND_MODES.NORMAL,t.shader=null,t.cachedTint=16777215,t.texture=e||u.default.EMPTY,t.vertexData=new Float32Array(8),t.vertexTrimmedData=null,t._transformID=-1,t._textureID=-1,t._transformTrimmedID=-1,t._textureTrimmedID=-1,t.pluginName="sprite",t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),i.prototype._onTextureUpdate=function(){this._textureID=-1,this._textureTrimmedID=-1,this.cachedTint=16777215,this._width&&(this.scale.x=(0,a.sign)(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=(0,a.sign)(this.scale.y)*this._height/this._texture.orig.height)},i.prototype._onAnchorUpdate=function(){this._transformID=-1,this._transformTrimmedID=-1},i.prototype.calculateVertices=function(){if(this._transformID!==this.transform._worldID||this._textureID!==this._texture._updateID){this._transformID=this.transform._worldID,this._textureID=this._texture._updateID;var e=this._texture,t=this.transform.worldTransform,r=t.a,i=t.b,n=t.c,o=t.d,a=t.tx,s=t.ty,u=this.vertexData,c=e.trim,l=e.orig,f=this._anchor,h=0,d=0,p=0,v=0;p=c?(h=(d=c.x-f._x*l.width)+c.width,(v=c.y-f._y*l.height)+c.height):(h=(d=-f._x*l.width)+l.width,(v=-f._y*l.height)+l.height),u[0]=r*d+n*v+a,u[1]=o*v+i*d+s,u[2]=r*h+n*v+a,u[3]=o*v+i*h+s,u[4]=r*h+n*p+a,u[5]=o*p+i*h+s,u[6]=r*d+n*p+a,u[7]=o*p+i*d+s}},i.prototype.calculateTrimmedVertices=function(){if(this.vertexTrimmedData){if(this._transformTrimmedID===this.transform._worldID&&this._textureTrimmedID===this._texture._updateID)return}else this.vertexTrimmedData=new Float32Array(8);this._transformTrimmedID=this.transform._worldID,this._textureTrimmedID=this._texture._updateID;var e=this._texture,t=this.vertexTrimmedData,r=e.orig,i=this._anchor,n=this.transform.worldTransform,o=n.a,a=n.b,s=n.c,u=n.d,c=n.tx,l=n.ty,f=-i._x*r.width,h=f+r.width,d=-i._y*r.height,p=d+r.height;t[0]=o*f+s*d+c,t[1]=u*d+a*f+l,t[2]=o*h+s*d+c,t[3]=u*d+a*h+l,t[4]=o*h+s*p+c,t[5]=u*p+a*h+l,t[6]=o*f+s*p+c,t[7]=u*p+a*f+l},i.prototype._renderWebGL=function(e){this.calculateVertices(),e.setObjectRenderer(e.plugins[this.pluginName]),e.plugins[this.pluginName].render(this)},i.prototype._renderCanvas=function(e){e.plugins[this.pluginName].render(this)},i.prototype._calculateBounds=function(){var e=this._texture.trim,t=this._texture.orig;!e||e.width===t.width&&e.height===t.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))},i.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._texture.orig.width*-this._anchor._x,this._bounds.minY=this._texture.orig.height*-this._anchor._y,this._bounds.maxX=this._texture.orig.width*(1-this._anchor._x),this._bounds.maxY=this._texture.orig.height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new o.Rectangle),e=this._localBoundsRect),this._bounds.getRectangle(e)):r.prototype.getLocalBounds.call(this,e)},i.prototype.containsPoint=function(e){this.worldTransform.applyInverse(e,l);var t=this._texture.orig.width,r=this._texture.orig.height,i=-t*this.anchor.x,n=0;return l.x>=i&&l.x<i+t&&(n=-r*this.anchor.y,l.y>=n&&l.y<n+r)},i.prototype.destroy=function(e){if(r.prototype.destroy.call(this,e),this._texture.off("update",this._onTextureUpdate,this),this._anchor=null,"boolean"==typeof e?e:e&&e.texture){var t="boolean"==typeof e?e:e&&e.baseTexture;this._texture.destroy(!!t)}this._texture=null,this.shader=null},i.from=function(e){return new i(u.default.from(e))},i.fromFrame=function(e){var t=a.TextureCache[e];if(!t)throw new Error('The frameId "'+e+'" does not exist in the texture cache');return new i(t)},i.fromImage=function(e,t,r){return new i(u.default.fromImage(e,t,r))},n(i,[{key:"width",get:function(){return Math.abs(this.scale.x)*this._texture.orig.width},set:function(e){var t=(0,a.sign)(this.scale.x)||1;this.scale.x=t*e/this._texture.orig.width,this._width=e}},{key:"height",get:function(){return Math.abs(this.scale.y)*this._texture.orig.height},set:function(e){var t=(0,a.sign)(this.scale.y)||1;this.scale.y=t*e/this._texture.orig.height,this._height=e}},{key:"anchor",get:function(){return this._anchor},set:function(e){this._anchor.copy(e)}},{key:"tint",get:function(){return this._tint},set:function(e){this._tint=e,this._tintRGB=(e>>16)+(65280&e)+((255&e)<<16)}},{key:"texture",get:function(){return this._texture},set:function(e){this._texture!==e&&(this._texture=e||u.default.EMPTY,this.cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,e&&(e.baseTexture.hasLoaded?this._onTextureUpdate():e.once("update",this._onTextureUpdate,this)))}}]),i}(i.default);r.default=f},{"../const":46,"../display/Container":48,"../math":70,"../textures/Texture":115,"../utils":125}],103:[function(e,t,r){"use strict";r.__esModule=!0;var i=n(e("../../renderers/canvas/CanvasRenderer")),l=e("../../const"),f=e("../../math"),h=n(e("./CanvasTinter"));function n(e){return e&&e.__esModule?e:{default:e}}var d=new f.Matrix,o=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e}return t.prototype.render=function(e){var t=e._texture,r=this.renderer,i=t._frame.width,n=t._frame.height,o=e.transform.worldTransform,a=0,s=0;if(!(t.orig.width<=0||t.orig.height<=0)&&t.baseTexture.source&&(r.setBlendMode(e.blendMode),t.valid)){r.context.globalAlpha=e.worldAlpha;var u=t.baseTexture.scaleMode===l.SCALE_MODES.LINEAR;r.smoothProperty&&r.context[r.smoothProperty]!==u&&(r.context[r.smoothProperty]=u),s=t.trim?(a=t.trim.width/2+t.trim.x-e.anchor.x*t.orig.width,t.trim.height/2+t.trim.y-e.anchor.y*t.orig.height):(a=(.5-e.anchor.x)*t.orig.width,(.5-e.anchor.y)*t.orig.height),t.rotate&&(o.copy(d),o=d,f.GroupD8.matrixAppendRotationInv(o,t.rotate,a,s),s=a=0),a-=i/2,s-=n/2,r.roundPixels?(r.context.setTransform(o.a,o.b,o.c,o.d,o.tx*r.resolution|0,o.ty*r.resolution|0),a|=0,s|=0):r.context.setTransform(o.a,o.b,o.c,o.d,o.tx*r.resolution,o.ty*r.resolution);var c=t.baseTexture.resolution;16777215!==e.tint?(e.cachedTint===e.tint&&e.tintedTexture.tintId===e._texture._updateID||(e.cachedTint=e.tint,e.tintedTexture=h.default.getTintedTexture(e,e.tint)),r.context.drawImage(e.tintedTexture,0,0,i*c,n*c,a*r.resolution,s*r.resolution,i*r.resolution,n*r.resolution)):r.context.drawImage(t.baseTexture.source,t._frame.x*c,t._frame.y*c,i*c,n*c,a*r.resolution,s*r.resolution,i*r.resolution,n*r.resolution)}},t.prototype.destroy=function(){this.renderer=null},t}();r.default=o,i.default.registerPlugin("sprite",o)},{"../../const":46,"../../math":70,"../../renderers/canvas/CanvasRenderer":77,"./CanvasTinter":104}],104:[function(e,t,r){"use strict";r.__esModule=!0;var i,d=e("../../utils"),n=e("../../renderers/canvas/utils/canUseNewCanvasBlendModes");var s={getTintedTexture:function(e,t){var r=e._texture,i="#"+("00000"+(0|(t=s.roundColor(t))).toString(16)).substr(-6);r.tintCache=r.tintCache||{};var n=r.tintCache[i],o=void 0;if(n){if(n.tintId===r._updateID)return r.tintCache[i];o=r.tintCache[i]}else o=s.canvas||document.createElement("canvas");if(s.tintMethod(r,t,o),o.tintId=r._updateID,s.convertTintToImage){var a=new Image;a.src=o.toDataURL(),r.tintCache[i]=a}else r.tintCache[i]=o,s.canvas=null;return o},tintWithMultiply:function(e,t,r){var i=r.getContext("2d"),n=e._frame.clone(),o=e.baseTexture.resolution;n.x*=o,n.y*=o,n.width*=o,n.height*=o,r.width=Math.ceil(n.width),r.height=Math.ceil(n.height),i.save(),i.fillStyle="#"+("00000"+(0|t).toString(16)).substr(-6),i.fillRect(0,0,n.width,n.height),i.globalCompositeOperation="multiply",i.drawImage(e.baseTexture.source,n.x,n.y,n.width,n.height,0,0,n.width,n.height),i.globalCompositeOperation="destination-atop",i.drawImage(e.baseTexture.source,n.x,n.y,n.width,n.height,0,0,n.width,n.height),i.restore()},tintWithOverlay:function(e,t,r){var i=r.getContext("2d"),n=e._frame.clone(),o=e.baseTexture.resolution;n.x*=o,n.y*=o,n.width*=o,n.height*=o,r.width=Math.ceil(n.width),r.height=Math.ceil(n.height),i.save(),i.globalCompositeOperation="copy",i.fillStyle="#"+("00000"+(0|t).toString(16)).substr(-6),i.fillRect(0,0,n.width,n.height),i.globalCompositeOperation="destination-atop",i.drawImage(e.baseTexture.source,n.x,n.y,n.width,n.height,0,0,n.width,n.height),i.restore()},tintWithPerPixel:function(e,t,r){var i=r.getContext("2d"),n=e._frame.clone(),o=e.baseTexture.resolution;n.x*=o,n.y*=o,n.width*=o,n.height*=o,r.width=Math.ceil(n.width),r.height=Math.ceil(n.height),i.save(),i.globalCompositeOperation="copy",i.drawImage(e.baseTexture.source,n.x,n.y,n.width,n.height,0,0,n.width,n.height),i.restore();for(var a=(0,d.hex2rgb)(t),s=a[0],u=a[1],c=a[2],l=i.getImageData(0,0,n.width,n.height),f=l.data,h=0;h<f.length;h+=4)f[h+0]*=s,f[h+1]*=u,f[h+2]*=c;i.putImageData(l,0,0)},roundColor:function(e){var t=s.cacheStepsPerColorChannel,r=(0,d.hex2rgb)(e);return r[0]=Math.min(255,r[0]/t*t),r[1]=Math.min(255,r[1]/t*t),r[2]=Math.min(255,r[2]/t*t),(0,d.rgb2hex)(r)},cacheStepsPerColorChannel:8,convertTintToImage:!1,canUseMultiply:(0,((i=n)&&i.__esModule?i:{default:i}).default)(),tintMethod:0};s.tintMethod=s.canUseMultiply?s.tintWithMultiply:s.tintWithPerPixel,r.default=s},{"../../renderers/canvas/utils/canUseNewCanvasBlendModes":80,"../../utils":125}],105:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.vertices=new ArrayBuffer(e),this.float32View=new Float32Array(this.vertices),this.uint32View=new Uint32Array(this.vertices)}return t.prototype.destroy=function(){this.vertices=null,this.positions=null,this.uvs=null,this.colors=null},t}();r.default=i},{}],106:[function(e,t,r){"use strict";r.__esModule=!0;var i=o(e("../../renderers/webgl/utils/ObjectRenderer")),n=o(e("../../renderers/webgl/WebGLRenderer")),a=o(e("../../utils/createIndicesForQuads")),s=o(e("./generateMultiTextureShader")),u=o(e("../../renderers/webgl/utils/checkMaxIfStatmentsInShader")),c=o(e("./BatchBuffer")),F=o(e("../../settings")),B=e("../../utils"),N=o(e("pixi-gl-core")),U=o(e("bit-twiddle"));function o(e){return e&&e.__esModule?e:{default:e}}var z=0,X=0,l=function(n){function o(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,n.call(this,e));t.vertSize=5,t.vertByteSize=4*t.vertSize,t.size=F.default.SPRITE_BATCH_SIZE,t.buffers=[];for(var r=1;r<=U.default.nextPow2(t.size);r*=2)t.buffers.push(new c.default(4*r*t.vertByteSize));t.indices=(0,a.default)(t.size),t.shader=null,t.currentIndex=0,t.groups=[];for(var i=0;i<t.size;i++)t.groups[i]={textures:[],textureCount:0,ids:[],size:0,start:0,blend:0};return t.sprites=[],t.vertexBuffers=[],t.vaos=[],t.vaoMax=2,t.vertexCount=0,t.renderer.on("prerender",t.onPrerender,t),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,n),o.prototype.onContextChange=function(){var e=this.renderer.gl;this.renderer.legacy?this.MAX_TEXTURES=1:(this.MAX_TEXTURES=Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),F.default.SPRITE_MAX_TEXTURES),this.MAX_TEXTURES=(0,u.default)(this.MAX_TEXTURES,e)),this.shader=(0,s.default)(e,this.MAX_TEXTURES),this.indexBuffer=N.default.GLBuffer.createIndexBuffer(e,this.indices,e.STATIC_DRAW),this.renderer.bindVao(null);for(var t=this.shader.attributes,r=0;r<this.vaoMax;r++){var i=this.vertexBuffers[r]=N.default.GLBuffer.createVertexBuffer(e,null,e.STREAM_DRAW),n=this.renderer.createVao().addIndex(this.indexBuffer).addAttribute(i,t.aVertexPosition,e.FLOAT,!1,this.vertByteSize,0).addAttribute(i,t.aTextureCoord,e.UNSIGNED_SHORT,!0,this.vertByteSize,8).addAttribute(i,t.aColor,e.UNSIGNED_BYTE,!0,this.vertByteSize,12);t.aTextureId&&n.addAttribute(i,t.aTextureId,e.FLOAT,!1,this.vertByteSize,16),this.vaos[r]=n}this.vao=this.vaos[0],this.currentBlendMode=99999,this.boundTextures=new Array(this.MAX_TEXTURES)},o.prototype.onPrerender=function(){this.vertexCount=0},o.prototype.render=function(e){this.currentIndex>=this.size&&this.flush(),e._texture._uvs&&(this.sprites[this.currentIndex++]=e)},o.prototype.flush=function(){if(0!==this.currentIndex){var e=this.renderer.gl,t=this.MAX_TEXTURES,r=U.default.nextPow2(this.currentIndex),i=U.default.log2(r),n=this.buffers[i],o=this.sprites,a=this.groups,s=n.float32View,u=n.uint32View,c=this.boundTextures,l=this.renderer.boundTextures,f=this.renderer.textureGC.count,h=0,d=void 0,p=void 0,v=1,m=0,b=a[0],y=void 0,g=void 0,_=B.premultiplyBlendMode[o[0]._texture.baseTexture.premultipliedAlpha?1:0][o[0].blendMode];b.textureCount=0,b.start=0,b.blend=_,z++;var w=void 0;for(w=0;w<t;++w){var x=l[w];x._enabled!==z?((c[w]=x)._virtalBoundId=w,x._enabled=z):c[w]=this.renderer.emptyTextures[w]}for(z++,w=0;w<this.currentIndex;++w){var T=o[w];o[w]=null,d=T._texture.baseTexture;var S=B.premultiplyBlendMode[Number(d.premultipliedAlpha)][T.blendMode];if(_!==S&&(_=S,p=null,m=t,z++),p!==d&&(p=d)._enabled!==z){if(m===t&&(z++,b.size=w-b.start,m=0,(b=a[v++]).blend=_,b.textureCount=0,b.start=w),d.touched=f,-1===d._virtalBoundId)for(var M=0;M<t;++M){var P=(M+X)%t,E=c[P];if(E._enabled!==z){X++,E._virtalBoundId=-1,c[d._virtalBoundId=P]=d;break}}d._enabled=z,b.textureCount++,b.ids[m]=d._virtalBoundId,b.textures[m++]=d}if(y=T.vertexData,g=T._texture._uvs.uvsUint32,this.renderer.roundPixels){var k=this.renderer.resolution;s[h]=(y[0]*k|0)/k,s[h+1]=(y[1]*k|0)/k,s[h+5]=(y[2]*k|0)/k,s[h+6]=(y[3]*k|0)/k,s[h+10]=(y[4]*k|0)/k,s[h+11]=(y[5]*k|0)/k,s[h+15]=(y[6]*k|0)/k,s[h+16]=(y[7]*k|0)/k}else s[h]=y[0],s[h+1]=y[1],s[h+5]=y[2],s[h+6]=y[3],s[h+10]=y[4],s[h+11]=y[5],s[h+15]=y[6],s[h+16]=y[7];u[h+2]=g[0],u[h+7]=g[1],u[h+12]=g[2],u[h+17]=g[3];var C=Math.min(T.worldAlpha,1),A=C<1&&d.premultipliedAlpha?(0,B.premultiplyTint)(T._tintRGB,C):T._tintRGB+(255*C<<24);u[h+3]=u[h+8]=u[h+13]=u[h+18]=A,s[h+4]=s[h+9]=s[h+14]=s[h+19]=d._virtalBoundId,h+=20}if(b.size=w-b.start,F.default.CAN_UPLOAD_SAME_BUFFER)this.vertexBuffers[this.vertexCount].upload(n.vertices,0,!0);else{if(this.vaoMax<=this.vertexCount){this.vaoMax++;var O=this.shader.attributes,I=this.vertexBuffers[this.vertexCount]=N.default.GLBuffer.createVertexBuffer(e,null,e.STREAM_DRAW),R=this.renderer.createVao().addIndex(this.indexBuffer).addAttribute(I,O.aVertexPosition,e.FLOAT,!1,this.vertByteSize,0).addAttribute(I,O.aTextureCoord,e.UNSIGNED_SHORT,!0,this.vertByteSize,8).addAttribute(I,O.aColor,e.UNSIGNED_BYTE,!0,this.vertByteSize,12);O.aTextureId&&R.addAttribute(I,O.aTextureId,e.FLOAT,!1,this.vertByteSize,16),this.vaos[this.vertexCount]=R}this.renderer.bindVao(this.vaos[this.vertexCount]),this.vertexBuffers[this.vertexCount].upload(n.vertices,0,!1),this.vertexCount++}for(w=0;w<t;++w)l[w]._virtalBoundId=-1;for(w=0;w<v;++w){for(var D=a[w],L=D.textureCount,j=0;j<L;j++)p=D.textures[j],l[D.ids[j]]!==p&&this.renderer.bindTexture(p,D.ids[j],!0),p._virtalBoundId=-1;this.renderer.state.setBlendMode(D.blend),e.drawElements(e.TRIANGLES,6*D.size,e.UNSIGNED_SHORT,6*D.start*2)}this.currentIndex=0}},o.prototype.start=function(){this.renderer.bindShader(this.shader),F.default.CAN_UPLOAD_SAME_BUFFER&&(this.renderer.bindVao(this.vaos[this.vertexCount]),this.vertexBuffers[this.vertexCount].bind())},o.prototype.stop=function(){this.flush()},o.prototype.destroy=function(){for(var e=0;e<this.vaoMax;e++)this.vertexBuffers[e]&&this.vertexBuffers[e].destroy(),this.vaos[e]&&this.vaos[e].destroy();this.indexBuffer&&this.indexBuffer.destroy(),this.renderer.off("prerender",this.onPrerender,this),n.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.vertexBuffers=null,this.vaos=null,this.indexBuffer=null,this.indices=null,this.sprites=null;for(var t=0;t<this.buffers.length;++t)this.buffers[t].destroy()},o}(i.default);r.default=l,n.default.registerPlugin("sprite",l)},{"../../renderers/webgl/WebGLRenderer":84,"../../renderers/webgl/utils/ObjectRenderer":94,"../../renderers/webgl/utils/checkMaxIfStatmentsInShader":97,"../../settings":101,"../../utils":125,"../../utils/createIndicesForQuads":123,"./BatchBuffer":105,"./generateMultiTextureShader":107,"bit-twiddle":1,"pixi-gl-core":15}],107:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){var r=s;r=(r=r.replace(/%count%/gi,t)).replace(/%forloop%/gi,function(e){var t="";t+="\n",t+="\n";for(var r=0;r<e;r++)0<r&&(t+="\nelse "),r<e-1&&(t+="if(vTextureId < "+r+".5)"),t+="\n{",t+="\n\tcolor = texture2D(uSamplers["+r+"], vTextureCoord);",t+="\n}";return t+="\n",t+="\n"}(t));for(var i=new a.default(e,"precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vTextureId = aTextureId;\n vColor = aColor;\n}\n",r),n=[],o=0;o<t;o++)n[o]=o;return i.bind(),i.uniforms.uSamplers=n,i};var i,n=e("../../Shader"),a=(i=n)&&i.__esModule?i:{default:i};e("path");var s=["varying vec2 vTextureCoord;","varying vec4 vColor;","varying float vTextureId;","uniform sampler2D uSamplers[%count%];","void main(void){","vec4 color;","%forloop%","gl_FragColor = color * vColor;","}"].join("\n")},{"../../Shader":44,path:8}],108:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),n=o(e("../sprites/Sprite")),s=o(e("../textures/Texture")),u=e("../math"),c=e("../utils"),v=e("../const"),l=o(e("../settings")),f=o(e("./TextStyle")),b=o(e("./TextMetrics")),h=o(e("../utils/trimCanvas"));function o(e){return e&&e.__esModule?e:{default:e}}var d={texture:!0,children:!1,baseTexture:!0},a=function(o){function a(e,t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(r=r||document.createElement("canvas")).width=3,r.height=3;var i=s.default.fromCanvas(r,l.default.SCALE_MODE,"text");i.orig=new u.Rectangle,i.trim=new u.Rectangle;var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,o.call(this,i));return s.default.addToCache(n._texture,n._texture.baseTexture.textureCacheIds[0]),n.canvas=r,n.context=n.canvas.getContext("2d"),n.resolution=l.default.RESOLUTION,n._text=null,n._style=null,n._styleListener=null,n._font="",n.text=e,n.style=t,n.localStyleID=-1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(a,o),a.prototype.updateText=function(e){var t=this._style;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),this.dirty||!e){this._font=this._style.toFontString();var r=this.context,i=b.default.measureText(this._text,this._style,this._style.wordWrap,this.canvas),n=i.width,o=i.height,a=i.lines,s=i.lineHeight,u=i.lineWidths,c=i.maxLineWidth,l=i.fontProperties;this.canvas.width=Math.ceil((Math.max(1,n)+2*t.padding)*this.resolution),this.canvas.height=Math.ceil((Math.max(1,o)+2*t.padding)*this.resolution),r.scale(this.resolution,this.resolution),r.clearRect(0,0,this.canvas.width,this.canvas.height),r.font=this._font,r.strokeStyle=t.stroke,r.lineWidth=t.strokeThickness,r.textBaseline=t.textBaseline,r.lineJoin=t.lineJoin,r.miterLimit=t.miterLimit;var f=void 0,h=void 0;if(t.dropShadow){r.fillStyle=t.dropShadowColor,r.globalAlpha=t.dropShadowAlpha,r.shadowBlur=t.dropShadowBlur,0<t.dropShadowBlur&&(r.shadowColor=t.dropShadowColor);for(var d=Math.cos(t.dropShadowAngle)*t.dropShadowDistance,p=Math.sin(t.dropShadowAngle)*t.dropShadowDistance,v=0;v<a.length;v++)f=t.strokeThickness/2,h=t.strokeThickness/2+v*s+l.ascent,"right"===t.align?f+=c-u[v]:"center"===t.align&&(f+=(c-u[v])/2),t.fill&&(this.drawLetterSpacing(a[v],f+d+t.padding,h+p+t.padding),t.stroke&&t.strokeThickness&&(r.strokeStyle=t.dropShadowColor,this.drawLetterSpacing(a[v],f+d+t.padding,h+p+t.padding,!0),r.strokeStyle=t.stroke))}r.shadowBlur=0,r.globalAlpha=1,r.fillStyle=this._generateFillStyle(t,a);for(var m=0;m<a.length;m++)f=t.strokeThickness/2,h=t.strokeThickness/2+m*s+l.ascent,"right"===t.align?f+=c-u[m]:"center"===t.align&&(f+=(c-u[m])/2),t.stroke&&t.strokeThickness&&this.drawLetterSpacing(a[m],f+t.padding,h+t.padding,!0),t.fill&&this.drawLetterSpacing(a[m],f+t.padding,h+t.padding);this.updateTexture()}},a.prototype.drawLetterSpacing=function(e,t,r){var i=3<arguments.length&&void 0!==arguments[3]&&arguments[3],n=this._style.letterSpacing;if(0!==n)for(var o=String.prototype.split.call(e,""),a=t,s=0,u="";s<e.length;)u=o[s++],i?this.context.strokeText(u,a,r):this.context.fillText(u,a,r),a+=this.context.measureText(u).width+n;else i?this.context.strokeText(e,t,r):this.context.fillText(e,t,r)},a.prototype.updateTexture=function(){var e=this.canvas;if(this._style.trim){var t=(0,h.default)(e);t.data&&(e.width=t.width,e.height=t.height,this.context.putImageData(t.data,0,0))}var r=this._texture,i=this._style,n=i.trim?0:i.padding,o=r.baseTexture;o.hasLoaded=!0,o.resolution=this.resolution,o.realWidth=e.width,o.realHeight=e.height,o.width=e.width/this.resolution,o.height=e.height/this.resolution,r.trim.width=r._frame.width=e.width/this.resolution,r.trim.height=r._frame.height=e.height/this.resolution,r.trim.x=-n,r.trim.y=-n,r.orig.width=r._frame.width-2*n,r.orig.height=r._frame.height-2*n,this._onTextureUpdate(),o.emit("update",o),this.dirty=!1},a.prototype.renderWebGL=function(e){this.resolution!==e.resolution&&(this.resolution=e.resolution,this.dirty=!0),this.updateText(!0),o.prototype.renderWebGL.call(this,e)},a.prototype._renderCanvas=function(e){this.resolution!==e.resolution&&(this.resolution=e.resolution,this.dirty=!0),this.updateText(!0),o.prototype._renderCanvas.call(this,e)},a.prototype.getLocalBounds=function(e){return this.updateText(!0),o.prototype.getLocalBounds.call(this,e)},a.prototype._calculateBounds=function(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)},a.prototype._onStyleChange=function(){this.dirty=!0},a.prototype._generateFillStyle=function(e,t){if(!Array.isArray(e.fill))return e.fill;if(navigator.isCocoonJS)return e.fill[0];var r=void 0,i=void 0,n=void 0,o=void 0,a=this.canvas.width/this.resolution,s=this.canvas.height/this.resolution,u=e.fill.slice(),c=e.fillGradientStops.slice();if(!c.length)for(var l=u.length+1,f=1;f<l;++f)c.push(f/l);if(u.unshift(e.fill[0]),c.unshift(0),u.push(e.fill[e.fill.length-1]),c.push(1),e.fillGradientType===v.TEXT_GRADIENT.LINEAR_VERTICAL){r=this.context.createLinearGradient(a/2,0,a/2,s),i=(u.length+1)*t.length;for(var h=n=0;h<t.length;h++){n+=1;for(var d=0;d<u.length;d++)o="number"==typeof c[d]?c[d]/t.length+h/t.length:n/i,r.addColorStop(o,u[d]),n++}}else{r=this.context.createLinearGradient(0,s/2,a,s/2),i=u.length+1,n=1;for(var p=0;p<u.length;p++)o="number"==typeof c[p]?c[p]:n/i,r.addColorStop(o,u[p]),n++}return r},a.prototype.destroy=function(e){"boolean"==typeof e&&(e={children:e}),e=Object.assign({},d,e),o.prototype.destroy.call(this,e),this.context=null,this.canvas=null,this._style=null},i(a,[{key:"width",get:function(){return this.updateText(!0),Math.abs(this.scale.x)*this._texture.orig.width},set:function(e){this.updateText(!0);var t=(0,c.sign)(this.scale.x)||1;this.scale.x=t*e/this._texture.orig.width,this._width=e}},{key:"height",get:function(){return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height},set:function(e){this.updateText(!0);var t=(0,c.sign)(this.scale.y)||1;this.scale.y=t*e/this._texture.orig.height,this._height=e}},{key:"style",get:function(){return this._style},set:function(e){(e=e||{})instanceof f.default?this._style=e:this._style=new f.default(e),this.localStyleID=-1,this.dirty=!0}},{key:"text",get:function(){return this._text},set:function(e){e=String(""===e||null==e?" ":e),this._text!==e&&(this._text=e,this.dirty=!0)}}]),a}(n.default);r.default=a},{"../const":46,"../math":70,"../settings":101,"../sprites/Sprite":102,"../textures/Texture":115,"../utils":125,"../utils/trimCanvas":130,"./TextMetrics":109,"./TextStyle":110}],109:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function E(e,t,r,i,n,o,a,s,u){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,E),this.text=e,this.style=t,this.width=r,this.height=i,this.lines=n,this.lineWidths=o,this.lineHeight=a,this.maxLineWidth=s,this.fontProperties=u}return E.measureText=function(e,t,r){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:E._canvas;r=null==r?t.wordWrap:r;var n=t.toFontString(),o=E.measureFont(n),a=i.getContext("2d");a.font=n;for(var s=(r?E.wordWrap(e,t,i):e).split(/(?:\r\n|\r|\n)/),u=new Array(s.length),c=0,l=0;l<s.length;l++){var f=a.measureText(s[l]).width+(s[l].length-1)*t.letterSpacing;u[l]=f,c=Math.max(c,f)}var h=c+t.strokeThickness;t.dropShadow&&(h+=t.dropShadowDistance);var d=t.lineHeight||o.fontSize+t.strokeThickness,p=Math.max(d,o.fontSize+t.strokeThickness)+(s.length-1)*(d+t.leading);return t.dropShadow&&(p+=t.dropShadowDistance),new E(e,t,h,p,s,u,d+t.leading,c,o)},E.wordWrap=function(e,t){for(var r=(2<arguments.length&&void 0!==arguments[2]?arguments[2]:E._canvas).getContext("2d"),i=0,n="",o="",a={},s=t.letterSpacing,u=t.whiteSpace,c=E.collapseSpaces(u),l=E.collapseNewlines(u),f=!c,h=t.wordWrapWidth+s,d=E.tokenize(e),p=0;p<d.length;p++){var v=d[p];if(E.isNewline(v)){if(!l){o+=E.addLine(n),f=!c,n="",i=0;continue}v=" "}if(c){var m=E.isBreakingSpace(v),b=E.isBreakingSpace(n[n.length-1]);if(m&&b)continue}var y=E.getFromCache(v,s,a,r);if(h<y)if(""!==n&&(o+=E.addLine(n),n="",i=0),E.canBreakWords(v,t.breakWords))for(var g=v.split(""),_=0;_<g.length;_++){for(var w=g[_],x=1;g[_+x];){var T=g[_+x],S=w[w.length-1];if(E.canBreakChars(S,T,v,_,t.breakWords))break;w+=T,x++}_+=w.length-1;var M=E.getFromCache(w,s,a,r);h<M+i&&(o+=E.addLine(n),f=!1,n="",i=0),n+=w,i+=M}else{0<n.length&&(o+=E.addLine(n),n="",i=0);var P=p===d.length-1;o+=E.addLine(v,!P),f=!1,n="",i=0}else h<y+i&&(f=!1,o+=E.addLine(n),n="",i=0),(0<n.length||!E.isBreakingSpace(v)||f)&&(n+=v,i+=y)}return o+=E.addLine(n,!1)},E.addLine=function(e){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];return e=E.trimRight(e),e=t?e+"\n":e},E.getFromCache=function(e,t,r,i){var n=r[e];if(void 0===n){var o=e.length*t;n=i.measureText(e).width+o,r[e]=n}return n},E.collapseSpaces=function(e){return"normal"===e||"pre-line"===e},E.collapseNewlines=function(e){return"normal"===e},E.trimRight=function(e){if("string"!=typeof e)return"";for(var t=e.length-1;0<=t;t--){var r=e[t];if(!E.isBreakingSpace(r))break;e=e.slice(0,-1)}return e},E.isNewline=function(e){return"string"==typeof e&&0<=E._newlines.indexOf(e.charCodeAt(0))},E.isBreakingSpace=function(e){return"string"==typeof e&&0<=E._breakingSpaces.indexOf(e.charCodeAt(0))},E.tokenize=function(e){var t=[],r="";if("string"!=typeof e)return t;for(var i=0;i<e.length;i++){var n=e[i];E.isBreakingSpace(n)||E.isNewline(n)?(""!==r&&(t.push(r),r=""),t.push(n)):r+=n}return""!==r&&t.push(r),t},E.canBreakWords=function(e,t){return t},E.canBreakChars=function(e,t,r,i,n){return!0},E.measureFont=function(e){if(E._fonts[e])return E._fonts[e];var t={},r=E._canvas,i=E._context;i.font=e;var n=E.METRICS_STRING+E.BASELINE_SYMBOL,o=Math.ceil(i.measureText(n).width),a=Math.ceil(i.measureText(E.BASELINE_SYMBOL).width),s=2*a;a=a*E.BASELINE_MULTIPLIER|0,r.width=o,r.height=s,i.fillStyle="#f00",i.fillRect(0,0,o,s),i.font=e,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(n,0,a);var u=i.getImageData(0,0,o,s).data,c=u.length,l=4*o,f=0,h=0,d=!1;for(f=0;f<a;++f){for(var p=0;p<l;p+=4)if(255!==u[h+p]){d=!0;break}if(d)break;h+=l}for(t.ascent=a-f,h=c-l,d=!1,f=s;a<f;--f){for(var v=0;v<l;v+=4)if(255!==u[h+v]){d=!0;break}if(d)break;h-=l}return t.descent=f-a,t.fontSize=t.ascent+t.descent,E._fonts[e]=t},E.clearMetrics=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";e?delete E._fonts[e]:E._fonts={}},E}();r.default=i;var n=document.createElement("canvas");n.width=n.height=10,i._canvas=n,i._context=n.getContext("2d"),i._fonts={},i.METRICS_STRING="|Éq",i.BASELINE_SYMBOL="M",i.BASELINE_MULTIPLIER=1.4,i._newlines=[10,13],i._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},{}],110:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),n=e("../const"),o=e("../utils");var a={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:n.TEXT_GRADIENT.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},s=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],u=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.styleID=0,this.reset(),f(this,e,e)}return t.prototype.clone=function(){var e={};return f(e,this,a),new t(e)},t.prototype.reset=function(){f(this,a,a)},t.prototype.toFontString=function(){var e="number"==typeof this.fontSize?this.fontSize+"px":this.fontSize,t=this.fontFamily;Array.isArray(this.fontFamily)||(t=this.fontFamily.split(","));for(var r=t.length-1;0<=r;r--){var i=t[r].trim();!/([\"\'])[^\'\"]+\1/.test(i)&&s.indexOf(i)<0&&(i='"'+i+'"'),t[r]=i}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+e+" "+t.join(",")},i(t,[{key:"align",get:function(){return this._align},set:function(e){this._align!==e&&(this._align=e,this.styleID++)}},{key:"breakWords",get:function(){return this._breakWords},set:function(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)}},{key:"dropShadow",get:function(){return this._dropShadow},set:function(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)}},{key:"dropShadowAlpha",get:function(){return this._dropShadowAlpha},set:function(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)}},{key:"dropShadowAngle",get:function(){return this._dropShadowAngle},set:function(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)}},{key:"dropShadowBlur",get:function(){return this._dropShadowBlur},set:function(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)}},{key:"dropShadowColor",get:function(){return this._dropShadowColor},set:function(e){var t=l(e);this._dropShadowColor!==t&&(this._dropShadowColor=t,this.styleID++)}},{key:"dropShadowDistance",get:function(){return this._dropShadowDistance},set:function(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)}},{key:"fill",get:function(){return this._fill},set:function(e){var t=l(e);this._fill!==t&&(this._fill=t,this.styleID++)}},{key:"fillGradientType",get:function(){return this._fillGradientType},set:function(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)}},{key:"fillGradientStops",get:function(){return this._fillGradientStops},set:function(e){(function(e,t){if(!Array.isArray(e)||!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(var r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0})(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)}},{key:"fontFamily",get:function(){return this._fontFamily},set:function(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)}},{key:"fontSize",get:function(){return this._fontSize},set:function(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)}},{key:"fontStyle",get:function(){return this._fontStyle},set:function(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)}},{key:"fontVariant",get:function(){return this._fontVariant},set:function(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)}},{key:"fontWeight",get:function(){return this._fontWeight},set:function(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)}},{key:"letterSpacing",get:function(){return this._letterSpacing},set:function(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.styleID++)}},{key:"lineHeight",get:function(){return this._lineHeight},set:function(e){this._lineHeight!==e&&(this._lineHeight=e,this.styleID++)}},{key:"leading",get:function(){return this._leading},set:function(e){this._leading!==e&&(this._leading=e,this.styleID++)}},{key:"lineJoin",get:function(){return this._lineJoin},set:function(e){this._lineJoin!==e&&(this._lineJoin=e,this.styleID++)}},{key:"miterLimit",get:function(){return this._miterLimit},set:function(e){this._miterLimit!==e&&(this._miterLimit=e,this.styleID++)}},{key:"padding",get:function(){return this._padding},set:function(e){this._padding!==e&&(this._padding=e,this.styleID++)}},{key:"stroke",get:function(){return this._stroke},set:function(e){var t=l(e);this._stroke!==t&&(this._stroke=t,this.styleID++)}},{key:"strokeThickness",get:function(){return this._strokeThickness},set:function(e){this._strokeThickness!==e&&(this._strokeThickness=e,this.styleID++)}},{key:"textBaseline",get:function(){return this._textBaseline},set:function(e){this._textBaseline!==e&&(this._textBaseline=e,this.styleID++)}},{key:"trim",get:function(){return this._trim},set:function(e){this._trim!==e&&(this._trim=e,this.styleID++)}},{key:"whiteSpace",get:function(){return this._whiteSpace},set:function(e){this._whiteSpace!==e&&(this._whiteSpace=e,this.styleID++)}},{key:"wordWrap",get:function(){return this._wordWrap},set:function(e){this._wordWrap!==e&&(this._wordWrap=e,this.styleID++)}},{key:"wordWrapWidth",get:function(){return this._wordWrapWidth},set:function(e){this._wordWrapWidth!==e&&(this._wordWrapWidth=e,this.styleID++)}}]),t}();function c(e){return"number"==typeof e?(0,o.hex2string)(e):("string"==typeof e&&0===e.indexOf("0x")&&(e=e.replace("0x","#")),e)}function l(e){if(Array.isArray(e)){for(var t=0;t<e.length;++t)e[t]=c(e[t]);return e}return c(e)}function f(e,t,r){for(var i in r)Array.isArray(t[i])?e[i]=t[i].slice():e[i]=t[i]}r.default=u},{"../const":46,"../utils":125}],111:[function(e,t,r){"use strict";r.__esModule=!0;var i=n(e("./BaseTexture")),s=n(e("../settings"));function n(e){return e&&e.__esModule?e:{default:e}}var o=function(o){function a(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:100,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:100,r=arguments[2],i=arguments[3];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,o.call(this,null,r));return n.resolution=i||s.default.RESOLUTION,n.width=Math.ceil(e),n.height=Math.ceil(t),n.realWidth=n.width*n.resolution,n.realHeight=n.height*n.resolution,n.scaleMode=void 0!==r?r:s.default.SCALE_MODE,n.hasLoaded=!0,n._glRenderTargets={},n._canvasRenderTarget=null,n.valid=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(a,o),a.prototype.resize=function(e,t){e=Math.ceil(e),t=Math.ceil(t),e===this.width&&t===this.height||(this.valid=0<e&&0<t,this.width=e,this.height=t,this.realWidth=this.width*this.resolution,this.realHeight=this.height*this.resolution,this.valid&&this.emit("update",this))},a.prototype.destroy=function(){o.prototype.destroy.call(this,!0),this.renderer=null},a}(i.default);r.default=o},{"../settings":101,"./BaseTexture":112}],112:[function(e,t,r){"use strict";r.__esModule=!0;var s=e("../utils"),o=n(e("../settings")),i=n(e("eventemitter3")),u=n(e("../utils/determineCrossOrigin")),c=n(e("bit-twiddle"));function n(e){return e&&e.__esModule?e:{default:e}}var a=function(n){function a(e,t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,n.call(this));return i.uid=(0,s.uid)(),i.touched=0,i.resolution=r||o.default.RESOLUTION,i.width=100,i.height=100,i.realWidth=100,i.realHeight=100,i.scaleMode=void 0!==t?t:o.default.SCALE_MODE,i.hasLoaded=!1,i.isLoading=!1,i.source=null,i.origSource=null,i.imageType=null,i.sourceScale=1,i.premultipliedAlpha=!0,i.imageUrl=null,i.isPowerOfTwo=!1,i.mipmap=o.default.MIPMAP_TEXTURES,i.wrapMode=o.default.WRAP_MODE,i._glTextures={},i._enabled=0,i._virtalBoundId=-1,i._destroyed=!1,i.textureCacheIds=[],e&&i.loadSource(e),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(a,n),a.prototype.update=function(){"svg"!==this.imageType&&(this.realWidth=this.source.naturalWidth||this.source.videoWidth||this.source.width,this.realHeight=this.source.naturalHeight||this.source.videoHeight||this.source.height,this._updateDimensions()),this.emit("update",this)},a.prototype._updateDimensions=function(){this.width=this.realWidth/this.resolution,this.height=this.realHeight/this.resolution,this.isPowerOfTwo=c.default.isPow2(this.realWidth)&&c.default.isPow2(this.realHeight)},a.prototype.loadSource=function(e){var t=this.isLoading;this.hasLoaded=!1,this.isLoading=!1,t&&this.source&&(this.source.onload=null,this.source.onerror=null);var r=!this.source;if(((this.source=e).src&&e.complete||e.getContext)&&e.width&&e.height)this._updateImageType(),"svg"===this.imageType?this._loadSvgSource():this._sourceLoaded(),r&&this.emit("loaded",this);else if(!e.getContext){this.isLoading=!0;var i=this;if(e.onload=function(){i._updateImageType(),e.onload=null,e.onerror=null,i.isLoading&&(i.isLoading=!1,i._sourceLoaded(),"svg"!==i.imageType?i.emit("loaded",i):i._loadSvgSource())},e.onerror=function(){e.onload=null,e.onerror=null,i.isLoading&&(i.isLoading=!1,i.emit("error",i))},e.complete&&e.src){if(e.onload=null,e.onerror=null,"svg"===i.imageType)return void i._loadSvgSource();this.isLoading=!1,e.width&&e.height?(this._sourceLoaded(),t&&this.emit("loaded",this)):t&&this.emit("error",this)}}},a.prototype._updateImageType=function(){if(this.imageUrl){var e=(0,s.decomposeDataUri)(this.imageUrl),t=void 0;if(e&&"image"===e.mediaType){var r=e.subType.split("+")[0];if(!(t=(0,s.getUrlFileExtension)("."+r)))throw new Error("Invalid image type in data URI.")}else(t=(0,s.getUrlFileExtension)(this.imageUrl))||(t="png");this.imageType=t}},a.prototype._loadSvgSource=function(){if("svg"===this.imageType){var e=(0,s.decomposeDataUri)(this.imageUrl);e?this._loadSvgSourceUsingDataUri(e):this._loadSvgSourceUsingXhr()}},a.prototype._loadSvgSourceUsingDataUri=function(e){var t=void 0;if("base64"===e.encoding){if(!atob)throw new Error("Your browser doesn't support base64 conversions.");t=atob(e.data)}else t=e.data;this._loadSvgSourceUsingString(t)},a.prototype._loadSvgSourceUsingXhr=function(){var e=this,t=new XMLHttpRequest;t.onload=function(){if(t.readyState!==t.DONE||200!==t.status)throw new Error("Failed to load SVG using XHR.");e._loadSvgSourceUsingString(t.response)},t.onerror=function(){return e.emit("error",e)},t.open("GET",this.imageUrl,!0),t.send()},a.prototype._loadSvgSourceUsingString=function(e){var t=(0,s.getSvgSize)(e),r=t.width,i=t.height;if(!r||!i)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");this.realWidth=Math.round(r*this.sourceScale),this.realHeight=Math.round(i*this.sourceScale),this._updateDimensions();var n=document.createElement("canvas");n.width=this.realWidth,n.height=this.realHeight,n._pixiId="canvas_"+(0,s.uid)(),n.getContext("2d").drawImage(this.source,0,0,r,i,0,0,this.realWidth,this.realHeight),this.origSource=this.source,this.source=n,a.addToCache(this,n._pixiId),this.isLoading=!1,this._sourceLoaded(),this.emit("loaded",this)},a.prototype._sourceLoaded=function(){this.hasLoaded=!0,this.update()},a.prototype.destroy=function(){this.imageUrl&&(delete s.TextureCache[this.imageUrl],this.imageUrl=null,navigator.isCocoonJS||(this.source.src="")),this.source=null,this.dispose(),a.removeFromCache(this),this.textureCacheIds=null,this._destroyed=!0},a.prototype.dispose=function(){this.emit("dispose",this)},a.prototype.updateSourceImage=function(e){this.source.src=e,this.loadSource(this.source)},a.fromImage=function(e,t,r,i){var n=s.BaseTextureCache[e];if(!n){var o=new Image;void 0===t&&0!==e.indexOf("data:")?o.crossOrigin=(0,u.default)(e):t&&(o.crossOrigin="string"==typeof t?t:"anonymous"),(n=new a(o,r)).imageUrl=e,i&&(n.sourceScale=i),n.resolution=(0,s.getResolutionOfUrl)(e),o.src=e,a.addToCache(n,e)}return n},a.fromCanvas=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"canvas";e._pixiId||(e._pixiId=r+"_"+(0,s.uid)());var i=s.BaseTextureCache[e._pixiId];return i||(i=new a(e,t),a.addToCache(i,e._pixiId)),i},a.from=function(e,t,r){if("string"==typeof e)return a.fromImage(e,void 0,t,r);if(e instanceof HTMLImageElement){var i=e.src,n=s.BaseTextureCache[i];return n||((n=new a(e,t)).imageUrl=i,r&&(n.sourceScale=r),n.resolution=(0,s.getResolutionOfUrl)(i),a.addToCache(n,i)),n}return e instanceof HTMLCanvasElement?a.fromCanvas(e,t):e},a.addToCache=function(e,t){t&&(-1===e.textureCacheIds.indexOf(t)&&e.textureCacheIds.push(t),s.BaseTextureCache[t]&&console.warn("BaseTexture added to the cache with an id ["+t+"] that already had an entry"),s.BaseTextureCache[t]=e)},a.removeFromCache=function(e){if("string"==typeof e){var t=s.BaseTextureCache[e];if(t){var r=t.textureCacheIds.indexOf(e);return-1<r&&t.textureCacheIds.splice(r,1),delete s.BaseTextureCache[e],t}}else if(e&&e.textureCacheIds){for(var i=0;i<e.textureCacheIds.length;++i)delete s.BaseTextureCache[e.textureCacheIds[i]];return e.textureCacheIds.length=0,e}return null},a}(i.default);r.default=a},{"../settings":101,"../utils":125,"../utils/determineCrossOrigin":124,"bit-twiddle":1,eventemitter3:3}],113:[function(e,t,r){"use strict";r.__esModule=!0;var l=i(e("./BaseRenderTexture"));function i(e){return e&&e.__esModule?e:{default:e}}var n=function(u){function c(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);var r=null;if(!(e instanceof l.default)){var i=arguments[1],n=arguments[2],o=arguments[3],a=arguments[4];console.warn("Please use RenderTexture.create("+i+", "+n+") instead of the ctor directly."),r=arguments[0],t=null,e=new l.default(i,n,o,a)}var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,u.call(this,e,t));return s.legacyRenderer=r,s.valid=!0,s._updateUvs(),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(c,u),c.prototype.resize=function(e,t,r){e=Math.ceil(e),t=Math.ceil(t),this.valid=0<e&&0<t,this._frame.width=this.orig.width=e,this._frame.height=this.orig.height=t,r||this.baseTexture.resize(e,t),this._updateUvs()},c.create=function(e,t,r,i){return new c(new l.default(e,t,r,i))},c}(i(e("./Texture")).default);r.default=n},{"./BaseRenderTexture":111,"./Texture":115}],114:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),h=e("../"),n=e("../utils");var o=function(){function f(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),this.baseTexture=e,this.textures={},this.animations={},this.data=t,this.resolution=this._updateResolution(r||this.baseTexture.imageUrl),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}return i(f,null,[{key:"BATCH_SIZE",get:function(){return 1e3}}]),f.prototype._updateResolution=function(e){var t=this.data.meta.scale,r=(0,n.getResolutionOfUrl)(e,null);return null===r&&(r=void 0!==t?parseFloat(t):1),1!==r&&(this.baseTexture.resolution=r,this.baseTexture.update()),r},f.prototype.parse=function(e){this._batchIndex=0,this._callback=e,this._frameKeys.length<=f.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()},f.prototype._processFrames=function(e){for(var t=e,r=f.BATCH_SIZE,i=this.baseTexture.sourceScale;t-e<r&&t<this._frameKeys.length;){var n=this._frameKeys[t],o=this._frames[n],a=o.frame;if(a){var s=null,u=null,c=!1!==o.trimmed&&o.sourceSize?o.sourceSize:o.frame,l=new h.Rectangle(0,0,Math.floor(c.w*i)/this.resolution,Math.floor(c.h*i)/this.resolution);s=o.rotated?new h.Rectangle(Math.floor(a.x*i)/this.resolution,Math.floor(a.y*i)/this.resolution,Math.floor(a.h*i)/this.resolution,Math.floor(a.w*i)/this.resolution):new h.Rectangle(Math.floor(a.x*i)/this.resolution,Math.floor(a.y*i)/this.resolution,Math.floor(a.w*i)/this.resolution,Math.floor(a.h*i)/this.resolution),!1!==o.trimmed&&o.spriteSourceSize&&(u=new h.Rectangle(Math.floor(o.spriteSourceSize.x*i)/this.resolution,Math.floor(o.spriteSourceSize.y*i)/this.resolution,Math.floor(a.w*i)/this.resolution,Math.floor(a.h*i)/this.resolution)),this.textures[n]=new h.Texture(this.baseTexture,s,l,u,o.rotated?2:0,o.anchor),h.Texture.addToCache(this.textures[n],n)}t++}},f.prototype._processAnimations=function(){var e=this.data.animations||{};for(var t in e){this.animations[t]=[];var r=e[t],i=Array.isArray(r),n=0;for(r=i?r:r[Symbol.iterator]();;){var o;if(i){if(n>=r.length)break;o=r[n++]}else{if((n=r.next()).done)break;o=n.value}var a=o;this.animations[t].push(this.textures[a])}}},f.prototype._parseComplete=function(){var e=this._callback;this._callback=null,this._batchIndex=0,e.call(this,this.textures)},f.prototype._nextBatch=function(){var e=this;this._processFrames(this._batchIndex*f.BATCH_SIZE),this._batchIndex++,setTimeout(function(){e._batchIndex*f.BATCH_SIZE<e._frameKeys.length?e._nextBatch():(e._processAnimations(),e._parseComplete())},0)},f.prototype.destroy=function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];for(var t in this.textures)this.textures[t].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,e&&this.baseTexture.destroy(),this.baseTexture=null},f}();r.default=o},{"../":65,"../utils":125}],115:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),o=u(e("./BaseTexture")),n=u(e("./VideoBaseTexture")),a=u(e("./TextureUvs")),s=u(e("eventemitter3")),c=e("../math"),l=e("../utils"),f=u(e("../settings"));function u(e){return e&&e.__esModule?e:{default:e}}var h=function(s){function u(e,t,r,i,n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,s.call(this));if(a.noFrame=!1,t||(a.noFrame=!0,t=new c.Rectangle(0,0,1,1)),e instanceof u&&(e=e.baseTexture),a.baseTexture=e,a._frame=t,a.trim=i,a.valid=!1,a.requiresUpdate=!1,a._uvs=null,a.orig=r||t,a._rotate=Number(n||0),!0===n)a._rotate=2;else if(a._rotate%2!=0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");return e.hasLoaded?(a.noFrame&&(t=new c.Rectangle(0,0,e.width,e.height),e.on("update",a.onBaseTextureUpdated,a)),a.frame=t):e.once("loaded",a.onBaseTextureLoaded,a),a.defaultAnchor=o?new c.Point(o.x,o.y):new c.Point(0,0),a._updateID=0,a.transform=null,a.textureCacheIds=[],a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(u,s),u.prototype.update=function(){this.baseTexture.update()},u.prototype.onBaseTextureLoaded=function(e){this._updateID++,this.noFrame?this.frame=new c.Rectangle(0,0,e.width,e.height):this.frame=this._frame,this.baseTexture.on("update",this.onBaseTextureUpdated,this),this.emit("update",this)},u.prototype.onBaseTextureUpdated=function(e){this._updateID++,this._frame.width=e.width,this._frame.height=e.height,this.emit("update",this)},u.prototype.destroy=function(e){this.baseTexture&&(e&&(l.TextureCache[this.baseTexture.imageUrl]&&u.removeFromCache(this.baseTexture.imageUrl),this.baseTexture.destroy()),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture.off("loaded",this.onBaseTextureLoaded,this),this.baseTexture=null),this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,u.removeFromCache(this),this.textureCacheIds=null},u.prototype.clone=function(){return new u(this.baseTexture,this.frame,this.orig,this.trim,this.rotate,this.defaultAnchor)},u.prototype._updateUvs=function(){this._uvs||(this._uvs=new a.default),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++},u.fromImage=function(e,t,r,i){var n=l.TextureCache[e];return n||(n=new u(o.default.fromImage(e,t,r,i)),u.addToCache(n,e)),n},u.fromFrame=function(e){var t=l.TextureCache[e];if(!t)throw new Error('The frameId "'+e+'" does not exist in the texture cache');return t},u.fromCanvas=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"canvas";return new u(o.default.fromCanvas(e,t,r))},u.fromVideo=function(e,t,r,i){return"string"==typeof e?u.fromVideoUrl(e,t,r,i):new u(n.default.fromVideo(e,t,i))},u.fromVideoUrl=function(e,t,r,i){return new u(n.default.fromUrl(e,t,r,i))},u.from=function(e){if("string"!=typeof e)return e instanceof HTMLImageElement?new u(o.default.from(e)):e instanceof HTMLCanvasElement?u.fromCanvas(e,f.default.SCALE_MODE,"HTMLCanvasElement"):e instanceof HTMLVideoElement?u.fromVideo(e):e instanceof o.default?new u(e):e;var t=l.TextureCache[e];return t||(null!==e.match(/\.(mp4|webm|ogg|h264|avi|mov)$/)?u.fromVideoUrl(e):u.fromImage(e))},u.fromLoader=function(e,t,r){var i=new o.default(e,void 0,(0,l.getResolutionOfUrl)(t)),n=new u(i);return i.imageUrl=t,r||(r=t),o.default.addToCache(n.baseTexture,r),u.addToCache(n,r),r!==t&&(o.default.addToCache(n.baseTexture,t),u.addToCache(n,t)),n},u.addToCache=function(e,t){t&&(-1===e.textureCacheIds.indexOf(t)&&e.textureCacheIds.push(t),l.TextureCache[t]&&console.warn("Texture added to the cache with an id ["+t+"] that already had an entry"),l.TextureCache[t]=e)},u.removeFromCache=function(e){if("string"==typeof e){var t=l.TextureCache[e];if(t){var r=t.textureCacheIds.indexOf(e);return-1<r&&t.textureCacheIds.splice(r,1),delete l.TextureCache[e],t}}else if(e&&e.textureCacheIds){for(var i=0;i<e.textureCacheIds.length;++i)l.TextureCache[e.textureCacheIds[i]]===e&&delete l.TextureCache[e.textureCacheIds[i]];return e.textureCacheIds.length=0,e}return null},i(u,[{key:"frame",get:function(){return this._frame},set:function(e){this._frame=e,this.noFrame=!1;var t=e.x,r=e.y,i=e.width,n=e.height,o=t+i>this.baseTexture.width,a=r+n>this.baseTexture.height;if(o||a){var s=o&&a?"and":"or",u="X: "+t+" + "+i+" = "+(t+i)+" > "+this.baseTexture.width,c="Y: "+r+" + "+n+" = "+(r+n)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+u+" "+s+" "+c)}this.valid=i&&n&&this.baseTexture.hasLoaded,this.trim||this.rotate||(this.orig=e),this.valid&&this._updateUvs()}},{key:"rotate",get:function(){return this._rotate},set:function(e){this._rotate=e,this.valid&&this._updateUvs()}},{key:"width",get:function(){return this.orig.width}},{key:"height",get:function(){return this.orig.height}}]),u}(s.default);function d(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}(r.default=h).EMPTY=new h(new o.default),d(h.EMPTY),d(h.EMPTY.baseTexture),h.WHITE=function(){var e=document.createElement("canvas");e.width=10,e.height=10;var t=e.getContext("2d");return t.fillStyle="white",t.fillRect(0,0,10,10),new h(new o.default(e))}(),d(h.WHITE),d(h.WHITE.baseTexture)},{"../math":70,"../settings":101,"../utils":125,"./BaseTexture":112,"./TextureUvs":117,"./VideoBaseTexture":118,eventemitter3:3}],116:[function(e,t,r){"use strict";r.__esModule=!0;var i,n=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),o=e("../math/Matrix"),a=(i=o)&&i.__esModule?i:{default:i};var c=new a.default,s=function(){function r(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),this._texture=e,this.mapCoord=new a.default,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._lastTextureID=-1,this.clampOffset=0,this.clampMargin=void 0===t?.5:t}return r.prototype.multiplyUvs=function(e,t){void 0===t&&(t=e);for(var r=this.mapCoord,i=0;i<e.length;i+=2){var n=e[i],o=e[i+1];t[i]=n*r.a+o*r.c+r.tx,t[i+1]=n*r.b+o*r.d+r.ty}return t},r.prototype.update=function(e){var t=this._texture;if(!t||!t.valid)return!1;if(!e&&this._lastTextureID===t._updateID)return!1;this._lastTextureID=t._updateID;var r=t._uvs;this.mapCoord.set(r.x1-r.x0,r.y1-r.y0,r.x3-r.x0,r.y3-r.y0,r.x0,r.y0);var i=t.orig,n=t.trim;n&&(c.set(i.width/n.width,0,0,i.height/n.height,-n.x/n.width,-n.y/n.height),this.mapCoord.append(c));var o=t.baseTexture,a=this.uClampFrame,s=this.clampMargin/o.resolution,u=this.clampOffset;return a[0]=(t._frame.x+s+u)/o.width,a[1]=(t._frame.y+s+u)/o.height,a[2]=(t._frame.x+t._frame.width-s+u)/o.width,a[3]=(t._frame.y+t._frame.height-s+u)/o.height,this.uClampOffset[0]=u/o.realWidth,this.uClampOffset[1]=u/o.realHeight,!0},n(r,[{key:"texture",get:function(){return this._texture},set:function(e){this._texture=e,this._lastTextureID=-1}}]),r}();r.default=s},{"../math/Matrix":67}],117:[function(e,t,r){"use strict";r.__esModule=!0;var i,n=e("../math/GroupD8"),c=(i=n)&&i.__esModule?i:{default:i};var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsUint32=new Uint32Array(4)}return e.prototype.set=function(e,t,r){var i=t.width,n=t.height;if(r){var o=e.width/2/i,a=e.height/2/n,s=e.x/i+o,u=e.y/n+a;r=c.default.add(r,c.default.NW),this.x0=s+o*c.default.uX(r),this.y0=u+a*c.default.uY(r),r=c.default.add(r,2),this.x1=s+o*c.default.uX(r),this.y1=u+a*c.default.uY(r),r=c.default.add(r,2),this.x2=s+o*c.default.uX(r),this.y2=u+a*c.default.uY(r),r=c.default.add(r,2),this.x3=s+o*c.default.uX(r),this.y3=u+a*c.default.uY(r)}else this.x0=e.x/i,this.y0=e.y/n,this.x1=(e.x+e.width)/i,this.y1=e.y/n,this.x2=(e.x+e.width)/i,this.y2=(e.y+e.height)/n,this.x3=e.x/i,this.y3=(e.y+e.height)/n;this.uvsUint32[0]=(65535&Math.round(65535*this.y0))<<16|65535&Math.round(65535*this.x0),this.uvsUint32[1]=(65535&Math.round(65535*this.y1))<<16|65535&Math.round(65535*this.x1),this.uvsUint32[2]=(65535&Math.round(65535*this.y2))<<16|65535&Math.round(65535*this.x2),this.uvsUint32[3]=(65535&Math.round(65535*this.y3))<<16|65535&Math.round(65535*this.x3)},e}();r.default=o},{"../math/GroupD8":66}],118:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),o=n(e("./BaseTexture")),a=e("../utils"),u=e("../ticker"),c=e("../const"),l=n(e("../utils/determineCrossOrigin"));function n(e){return e&&e.__esModule?e:{default:e}}var s=function(n){function s(e,t){var r=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),!e)throw new Error("No video source element specified.");(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,n.call(this,e,t));return i.width=e.videoWidth,i.height=e.videoHeight,i._autoUpdate=!0,i._isAutoUpdating=!1,i.autoPlay=r,i.update=i.update.bind(i),i._onCanPlay=i._onCanPlay.bind(i),e.addEventListener("play",i._onPlayStart.bind(i)),e.addEventListener("pause",i._onPlayStop.bind(i)),i.hasLoaded=!1,i.__loaded=!1,i._isSourceReady()?i._onCanPlay():(e.addEventListener("canplay",i._onCanPlay),e.addEventListener("canplaythrough",i._onCanPlay)),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(s,n),s.prototype._isSourcePlaying=function(){var e=this.source;return 0<e.currentTime&&!1===e.paused&&!1===e.ended&&2<e.readyState},s.prototype._isSourceReady=function(){return 3===this.source.readyState||4===this.source.readyState},s.prototype._onPlayStart=function(){this.hasLoaded||this._onCanPlay(),!this._isAutoUpdating&&this.autoUpdate&&(u.shared.add(this.update,this,c.UPDATE_PRIORITY.HIGH),this._isAutoUpdating=!0)},s.prototype._onPlayStop=function(){this._isAutoUpdating&&(u.shared.remove(this.update,this),this._isAutoUpdating=!1)},s.prototype._onCanPlay=function(){this.hasLoaded=!0,this.source&&(this.source.removeEventListener("canplay",this._onCanPlay),this.source.removeEventListener("canplaythrough",this._onCanPlay),this.width=this.source.videoWidth,this.height=this.source.videoHeight,this.__loaded||(this.__loaded=!0,this.emit("loaded",this)),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.source.play())},s.prototype.destroy=function(){this._isAutoUpdating&&u.shared.remove(this.update,this),this.source&&this.source._pixiId&&(o.default.removeFromCache(this.source._pixiId),delete this.source._pixiId,this.source.pause(),this.source.src="",this.source.load()),n.prototype.destroy.call(this)},s.fromVideo=function(e,t,r){e._pixiId||(e._pixiId="video_"+(0,a.uid)());var i=a.BaseTextureCache[e._pixiId];return i||(i=new s(e,t,r),o.default.addToCache(i,e._pixiId)),i},s.fromUrl=function(e,t,r,i){var n=document.createElement("video");n.setAttribute("webkit-playsinline",""),n.setAttribute("playsinline","");var o=Array.isArray(e)?e[0].src||e[0]:e.src||e;if(void 0===r&&0!==o.indexOf("data:")?n.crossOrigin=(0,l.default)(o):r&&(n.crossOrigin="string"==typeof r?r:"anonymous"),Array.isArray(e))for(var a=0;a<e.length;++a)n.appendChild(f(e[a].src||e[a],e[a].mime));else n.appendChild(f(o,e.mime));return n.load(),s.fromVideo(n,t,i)},i(s,[{key:"autoUpdate",get:function(){return this._autoUpdate},set:function(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isAutoUpdating?(u.shared.remove(this.update,this),this._isAutoUpdating=!1):this._autoUpdate&&!this._isAutoUpdating&&(u.shared.add(this.update,this,c.UPDATE_PRIORITY.HIGH),this._isAutoUpdating=!0))}}]),s}(o.default);function f(e,t){if(!t){var r=e.split("?").shift().toLowerCase();t="video/"+r.substr(r.lastIndexOf(".")+1)}var i=document.createElement("source");return i.src=e,i.type=t,i}(r.default=s).fromUrls=s.fromUrl},{"../const":46,"../ticker":121,"../utils":125,"../utils/determineCrossOrigin":124,"./BaseTexture":112}],119:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),n=s(e("../settings")),o=e("../const"),a=s(e("./TickerListener"));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._head=new a.default(null,null,1/0),this._requestId=null,this._maxElapsedMS=100,this.autoStart=!1,this.deltaTime=1,this.elapsedMS=1/n.default.TARGET_FPMS,this.lastTime=-1,this.speed=1,this.started=!1,this._tick=function(e){t._requestId=null,t.started&&(t.update(e),t.started&&null===t._requestId&&t._head.next&&(t._requestId=requestAnimationFrame(t._tick)))}}return e.prototype._requestIfNeeded=function(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._requestId=requestAnimationFrame(this._tick))},e.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},e.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},e.prototype.add=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:o.UPDATE_PRIORITY.NORMAL;return this._addListener(new a.default(e,t,r))},e.prototype.addOnce=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:o.UPDATE_PRIORITY.NORMAL;return this._addListener(new a.default(e,t,r,!0))},e.prototype._addListener=function(e){var t=this._head.next,r=this._head;if(t){for(;t;){if(e.priority>t.priority){e.connect(r);break}t=(r=t).next}e.previous||e.connect(r)}else e.connect(r);return this._startIfPossible(),this},e.prototype.remove=function(e,t){for(var r=this._head.next;r;)r=r.match(e,t)?r.destroy():r.next;return this._head.next||this._cancelIfNeeded(),this},e.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},e.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},e.prototype.destroy=function(){this.stop();for(var e=this._head.next;e;)e=e.destroy(!0);this._head.destroy(),this._head=null},e.prototype.update=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:performance.now(),t=void 0;if(e>this.lastTime){(t=this.elapsedMS=e-this.lastTime)>this._maxElapsedMS&&(t=this._maxElapsedMS),this.deltaTime=t*n.default.TARGET_FPMS*this.speed;for(var r=this._head,i=r.next;i;)i=i.emit(this.deltaTime);r.next||this._cancelIfNeeded()}else this.deltaTime=this.elapsedMS=0;this.lastTime=e},i(e,[{key:"FPS",get:function(){return 1e3/this.elapsedMS}},{key:"minFPS",get:function(){return 1e3/this._maxElapsedMS},set:function(e){var t=Math.min(Math.max(0,e)/1e3,n.default.TARGET_FPMS);this._maxElapsedMS=1/t}}]),e}();r.default=u},{"../const":46,"../settings":101,"./TickerListener":120}],120:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function n(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,i=3<arguments.length&&void 0!==arguments[3]&&arguments[3];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),this.fn=e,this.context=t,this.priority=r,this.once=i,this.next=null,this.previous=null,this._destroyed=!1}return n.prototype.match=function(e,t){return t=t||null,this.fn===e&&this.context===t},n.prototype.emit=function(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));var t=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),t},n.prototype.connect=function(e){(this.previous=e).next&&(e.next.previous=this),this.next=e.next,e.next=this},n.prototype.destroy=function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var t=this.next;return this.next=e?null:t,this.previous=null,t},n}();r.default=i},{}],121:[function(e,t,r){"use strict";r.__esModule=!0,r.Ticker=r.shared=void 0;var i,n=e("./Ticker"),o=(i=n)&&i.__esModule?i:{default:i};var a=new o.default;a.autoStart=!0,a.destroy=function(){},r.shared=a,r.Ticker=o.default},{"./Ticker":119}],122:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(){return!(navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform))}},{}],123:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){for(var t=6*e,r=new Uint16Array(t),i=0,n=0;i<t;i+=6,n+=4)r[i+0]=n+0,r[i+1]=n+1,r[i+2]=n+2,r[i+3]=n+0,r[i+4]=n+2,r[i+5]=n+3;return r}},{}],124:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:window.location;if(0===e.indexOf("data:"))return"";t=t||window.location,a||(a=document.createElement("a"));a.href=e;var r=!(e=o.default.parse(a.href)).port&&""===t.port||e.port===t.port;return e.hostname===t.hostname&&r&&e.protocol===t.protocol?"":"anonymous"};var i,n=e("url"),o=(i=n)&&i.__esModule?i:{default:i};var a=void 0},{url:38}],125:[function(e,t,r){"use strict";r.__esModule=!0,r.premultiplyBlendMode=r.BaseTextureCache=r.TextureCache=r.earcut=r.mixins=r.pluginTarget=r.EventEmitter=r.removeItems=r.isMobile=void 0,r.uid=function(){return++p},r.hex2rgb=function(e,t){return(t=t||[])[0]=(e>>16&255)/255,t[1]=(e>>8&255)/255,t[2]=(255&e)/255,t},r.hex2string=function(e){return e=e.toString(16),"#"+(e="000000".substr(0,6-e.length)+e)},r.rgb2hex=function(e){return(255*e[0]<<16)+(255*e[1]<<8)+(255*e[2]|0)},r.getResolutionOfUrl=function(e,t){var r=n.default.RETINA_PREFIX.exec(e);if(r)return parseFloat(r[1]);return void 0!==t?t:1},r.decomposeDataUri=function(e){var t=i.DATA_URI.exec(e);if(t)return{mediaType:t[1]?t[1].toLowerCase():void 0,subType:t[2]?t[2].toLowerCase():void 0,charset:t[3]?t[3].toLowerCase():void 0,encoding:t[4]?t[4].toLowerCase():void 0,data:t[5]};return},r.getUrlFileExtension=function(e){var t=i.URL_FILE_EXTENSION.exec(e);if(t)return t[1].toLowerCase();return},r.getSvgSize=function(e){var t=i.SVG_SIZE.exec(e),r={};t&&(r[t[1]]=Math.round(parseFloat(t[3])),r[t[5]]=Math.round(parseFloat(t[7])));return r},r.skipHello=function(){v=!0},r.sayHello=function(e){if(v)return;if(-1<navigator.userAgent.toLowerCase().indexOf("chrome")){var t=["\n %c %c %c PixiJS "+i.VERSION+" - ✰ "+e+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];window.console.log.apply(console,t)}else window.console&&window.console.log("PixiJS "+i.VERSION+" - "+e+" - http://www.pixijs.com/");v=!0},r.isWebGLSupported=function(){var e={stencil:!0,failIfMajorPerformanceCaveat:!0};try{if(!window.WebGLRenderingContext)return!1;var t=document.createElement("canvas"),r=t.getContext("webgl",e)||t.getContext("experimental-webgl",e),i=!(!r||!r.getContextAttributes().stencil);if(r){var n=r.getExtension("WEBGL_lose_context");n&&n.loseContext()}return r=null,i}catch(e){return!1}},r.sign=function(e){return 0===e?0:e<0?-1:1},r.destroyTextureCache=function(){var e=void 0;for(e in m)m[e].destroy();for(e in b)b[e].destroy()},r.clearTextureCache=function(){var e=void 0;for(e in m)delete m[e];for(e in b)delete b[e]},r.correctBlendMode=function(e,t){return y[t?1:0][e]},r.premultiplyTint=function(e,t){if(1===t)return(255*t<<24)+e;if(0===t)return 0;var r=e>>16&255,i=e>>8&255,n=255&e;return(255*t<<24)+((r=r*t+.5|0)<<16)+((i=i*t+.5|0)<<8)+(n=n*t+.5|0)},r.premultiplyRgba=function(e,t,r,i){r=r||new Float32Array(4),i||void 0===i?(r[0]=e[0]*t,r[1]=e[1]*t,r[2]=e[2]*t):(r[0]=e[0],r[1]=e[1],r[2]=e[2]);return r[3]=t,r},r.premultiplyTintToRgba=function(e,t,r,i){(r=r||new Float32Array(4))[0]=(e>>16&255)/255,r[1]=(e>>8&255)/255,r[2]=(255&e)/255,(i||void 0===i)&&(r[0]*=t,r[1]*=t,r[2]*=t);return r[3]=t,r};var i=e("../const"),n=d(e("../settings")),o=d(e("eventemitter3")),a=d(e("./pluginTarget")),s=h(e("./mixin")),u=h(e("ismobilejs")),c=d(e("remove-array-items")),l=d(e("./mapPremultipliedBlendModes")),f=d(e("earcut"));function h(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function d(e){return e&&e.__esModule?e:{default:e}}var p=0,v=!1;r.isMobile=u,r.removeItems=c.default,r.EventEmitter=o.default,r.pluginTarget=a.default,r.mixins=s,r.earcut=f.default;var m=r.TextureCache=Object.create(null),b=r.BaseTextureCache=Object.create(null);var y=r.premultiplyBlendMode=(0,l.default)()},{"../const":46,"../settings":101,"./mapPremultipliedBlendModes":126,"./mixin":128,"./pluginTarget":129,earcut:2,eventemitter3:3,ismobilejs:4,"remove-array-items":31}],126:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(){for(var e=[],t=[],r=0;r<32;r++)e[r]=r,t[r]=r;e[n.BLEND_MODES.NORMAL_NPM]=n.BLEND_MODES.NORMAL,e[n.BLEND_MODES.ADD_NPM]=n.BLEND_MODES.ADD,e[n.BLEND_MODES.SCREEN_NPM]=n.BLEND_MODES.SCREEN,t[n.BLEND_MODES.NORMAL]=n.BLEND_MODES.NORMAL_NPM,t[n.BLEND_MODES.ADD]=n.BLEND_MODES.ADD_NPM,t[n.BLEND_MODES.SCREEN]=n.BLEND_MODES.SCREEN_NPM;var i=[];return i.push(t),i.push(e),i};var n=e("../const")},{"../const":46}],127:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){if(o.default.tablet||o.default.phone)return 4;return e};var i,n=e("ismobilejs"),o=(i=n)&&i.__esModule?i:{default:i}},{ismobilejs:4}],128:[function(e,t,r){"use strict";function i(e,t){if(e&&t)for(var r=Object.keys(t),i=0;i<r.length;++i){var n=r[i];Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}}r.__esModule=!0,r.mixin=i,r.delayMixin=function(e,t){n.push(e,t)},r.performMixins=function(){for(var e=0;e<n.length;e+=2)i(n[e],n[e+1]);n.length=0};var n=[]},{}],129:[function(e,t,r){"use strict";r.__esModule=!0,r.default={mixin:function(e){!function(r){r.__plugins={},r.registerPlugin=function(e,t){r.__plugins[e]=t},r.prototype.initPlugins=function(){for(var e in this.plugins=this.plugins||{},r.__plugins)this.plugins[e]=new r.__plugins[e](this)},r.prototype.destroyPlugins=function(){for(var e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null;this.plugins=null}}(e)}}},{}],130:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){var t=e.width,r=e.height,i=e.getContext("2d"),n=i.getImageData(0,0,t,r).data,o=n.length,a={top:null,left:null,right:null,bottom:null},s=null,u=void 0,c=void 0,l=void 0;for(u=0;u<o;u+=4)0!==n[u+3]&&(c=u/4%t,l=~~(u/4/t),null===a.top&&(a.top=l),null===a.left?a.left=c:c<a.left&&(a.left=c),null===a.right?a.right=c+1:a.right<c&&(a.right=c+1),null===a.bottom?a.bottom=l:a.bottom<l&&(a.bottom=l));null!==a.top&&(t=a.right-a.left,r=a.bottom-a.top+1,s=i.getImageData(a.left,a.top,t,r));return{height:r,width:t,data:s}}},{}],131:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(r){var e=r.mesh,t=r.particles,i=r.extras,n=r.filters,o=r.prepare,a=r.loaders,s=r.interaction;Object.defineProperties(r,{SpriteBatch:{get:function(){throw new ReferenceError("SpriteBatch does not exist any more, please use the new ParticleContainer instead.")}},AssetLoader:{get:function(){throw new ReferenceError("The loader system was overhauled in PixiJS v3, please see the new PIXI.loaders.Loader class.")}},Stage:{get:function(){return p("You do not need to use a PIXI Stage any more, you can simply render any container."),r.Container}},DisplayObjectContainer:{get:function(){return p("DisplayObjectContainer has been shortened to Container, please use Container from now on."),r.Container}},Strip:{get:function(){return p("The Strip class has been renamed to Mesh and moved to mesh.Mesh, please use mesh.Mesh from now on."),e.Mesh}},Rope:{get:function(){return p("The Rope class has been moved to mesh.Rope, please use mesh.Rope from now on."),e.Rope}},ParticleContainer:{get:function(){return p("The ParticleContainer class has been moved to particles.ParticleContainer, please use particles.ParticleContainer from now on."),t.ParticleContainer}},MovieClip:{get:function(){return p("The MovieClip class has been moved to extras.AnimatedSprite, please use extras.AnimatedSprite."),i.AnimatedSprite}},TilingSprite:{get:function(){return p("The TilingSprite class has been moved to extras.TilingSprite, please use extras.TilingSprite from now on."),i.TilingSprite}},BitmapText:{get:function(){return p("The BitmapText class has been moved to extras.BitmapText, please use extras.BitmapText from now on."),i.BitmapText}},blendModes:{get:function(){return p("The blendModes has been moved to BLEND_MODES, please use BLEND_MODES from now on."),r.BLEND_MODES}},scaleModes:{get:function(){return p("The scaleModes has been moved to SCALE_MODES, please use SCALE_MODES from now on."),r.SCALE_MODES}},BaseTextureCache:{get:function(){return p("The BaseTextureCache class has been moved to utils.BaseTextureCache, please use utils.BaseTextureCache from now on."),r.utils.BaseTextureCache}},TextureCache:{get:function(){return p("The TextureCache class has been moved to utils.TextureCache, please use utils.TextureCache from now on."),r.utils.TextureCache}},math:{get:function(){return p("The math namespace is deprecated, please access members already accessible on PIXI."),r}},AbstractFilter:{get:function(){return p("AstractFilter has been renamed to Filter, please use PIXI.Filter"),r.Filter}},TransformManual:{get:function(){return p("TransformManual has been renamed to TransformBase, please update your pixi-spine"),r.TransformBase}},TARGET_FPMS:{get:function(){return p("PIXI.TARGET_FPMS has been deprecated, please use PIXI.settings.TARGET_FPMS"),r.settings.TARGET_FPMS},set:function(e){p("PIXI.TARGET_FPMS has been deprecated, please use PIXI.settings.TARGET_FPMS"),r.settings.TARGET_FPMS=e}},FILTER_RESOLUTION:{get:function(){return p("PIXI.FILTER_RESOLUTION has been deprecated, please use PIXI.settings.FILTER_RESOLUTION"),r.settings.FILTER_RESOLUTION},set:function(e){p("PIXI.FILTER_RESOLUTION has been deprecated, please use PIXI.settings.FILTER_RESOLUTION"),r.settings.FILTER_RESOLUTION=e}},RESOLUTION:{get:function(){return p("PIXI.RESOLUTION has been deprecated, please use PIXI.settings.RESOLUTION"),r.settings.RESOLUTION},set:function(e){p("PIXI.RESOLUTION has been deprecated, please use PIXI.settings.RESOLUTION"),r.settings.RESOLUTION=e}},MIPMAP_TEXTURES:{get:function(){return p("PIXI.MIPMAP_TEXTURES has been deprecated, please use PIXI.settings.MIPMAP_TEXTURES"),r.settings.MIPMAP_TEXTURES},set:function(e){p("PIXI.MIPMAP_TEXTURES has been deprecated, please use PIXI.settings.MIPMAP_TEXTURES"),r.settings.MIPMAP_TEXTURES=e}},SPRITE_BATCH_SIZE:{get:function(){return p("PIXI.SPRITE_BATCH_SIZE has been deprecated, please use PIXI.settings.SPRITE_BATCH_SIZE"),r.settings.SPRITE_BATCH_SIZE},set:function(e){p("PIXI.SPRITE_BATCH_SIZE has been deprecated, please use PIXI.settings.SPRITE_BATCH_SIZE"),r.settings.SPRITE_BATCH_SIZE=e}},SPRITE_MAX_TEXTURES:{get:function(){return p("PIXI.SPRITE_MAX_TEXTURES has been deprecated, please use PIXI.settings.SPRITE_MAX_TEXTURES"),r.settings.SPRITE_MAX_TEXTURES},set:function(e){p("PIXI.SPRITE_MAX_TEXTURES has been deprecated, please use PIXI.settings.SPRITE_MAX_TEXTURES"),r.settings.SPRITE_MAX_TEXTURES=e}},RETINA_PREFIX:{get:function(){return p("PIXI.RETINA_PREFIX has been deprecated, please use PIXI.settings.RETINA_PREFIX"),r.settings.RETINA_PREFIX},set:function(e){p("PIXI.RETINA_PREFIX has been deprecated, please use PIXI.settings.RETINA_PREFIX"),r.settings.RETINA_PREFIX=e}},DEFAULT_RENDER_OPTIONS:{get:function(){return p("PIXI.DEFAULT_RENDER_OPTIONS has been deprecated, please use PIXI.settings.DEFAULT_RENDER_OPTIONS"),r.settings.RENDER_OPTIONS}}});for(var u=[{parent:"TRANSFORM_MODE",target:"TRANSFORM_MODE"},{parent:"GC_MODES",target:"GC_MODE"},{parent:"WRAP_MODES",target:"WRAP_MODE"},{parent:"SCALE_MODES",target:"SCALE_MODE"},{parent:"PRECISION",target:"PRECISION_FRAGMENT"}],c=function(e){var t=u[e];Object.defineProperty(r[t.parent],"DEFAULT",{get:function(){return p("PIXI."+t.parent+".DEFAULT has been deprecated, please use PIXI.settings."+t.target),r.settings[t.target]},set:function(e){p("PIXI."+t.parent+".DEFAULT has been deprecated, please use PIXI.settings."+t.target),r.settings[t.target]=e}})},l=0;l<u.length;l++)c(l);Object.defineProperties(r.settings,{PRECISION:{get:function(){return p("PIXI.settings.PRECISION has been deprecated, please use PIXI.settings.PRECISION_FRAGMENT"),r.settings.PRECISION_FRAGMENT},set:function(e){p("PIXI.settings.PRECISION has been deprecated, please use PIXI.settings.PRECISION_FRAGMENT"),r.settings.PRECISION_FRAGMENT=e}}}),i.AnimatedSprite&&Object.defineProperties(i,{MovieClip:{get:function(){return p("The MovieClip class has been renamed to AnimatedSprite, please use AnimatedSprite from now on."),i.AnimatedSprite}}});i&&Object.defineProperties(i,{TextureTransform:{get:function(){return p("The TextureTransform class has been renamed to TextureMatrix, please use PIXI.TextureMatrix from now on."),r.TextureMatrix}}});r.DisplayObject.prototype.generateTexture=function(e,t,r){return p("generateTexture has moved to the renderer, please use renderer.generateTexture(displayObject)"),e.generateTexture(this,t,r)},r.Graphics.prototype.generateTexture=function(e,t){return p("graphics generate texture has moved to the renderer. Or to render a graphics to a texture using canvas please use generateCanvasTexture"),this.generateCanvasTexture(e,t)},r.GroupD8.isSwapWidthHeight=function(e){return p("GroupD8.isSwapWidthHeight was renamed to GroupD8.isVertical"),r.GroupD8.isVertical(e)},r.RenderTexture.prototype.render=function(e,t,r,i){this.legacyRenderer.render(e,this,r,t,!i),p("RenderTexture.render is now deprecated, please use renderer.render(displayObject, renderTexture)")},r.RenderTexture.prototype.getImage=function(e){return p("RenderTexture.getImage is now deprecated, please use renderer.extract.image(target)"),this.legacyRenderer.extract.image(e)},r.RenderTexture.prototype.getBase64=function(e){return p("RenderTexture.getBase64 is now deprecated, please use renderer.extract.base64(target)"),this.legacyRenderer.extract.base64(e)},r.RenderTexture.prototype.getCanvas=function(e){return p("RenderTexture.getCanvas is now deprecated, please use renderer.extract.canvas(target)"),this.legacyRenderer.extract.canvas(e)},r.RenderTexture.prototype.getPixels=function(e){return p("RenderTexture.getPixels is now deprecated, please use renderer.extract.pixels(target)"),this.legacyRenderer.pixels(e)},r.Sprite.prototype.setTexture=function(e){this.texture=e,p("setTexture is now deprecated, please use the texture property, e.g : sprite.texture = texture;")},i.BitmapText&&(i.BitmapText.prototype.setText=function(e){this.text=e,p("setText is now deprecated, please use the text property, e.g : myBitmapText.text = 'my text';")});r.Text.prototype.setText=function(e){this.text=e,p("setText is now deprecated, please use the text property, e.g : myText.text = 'my text';")},r.Text.calculateFontProperties=function(e){return p("Text.calculateFontProperties is now deprecated, please use the TextMetrics.measureFont"),r.TextMetrics.measureFont(e)},Object.defineProperties(r.Text,{fontPropertiesCache:{get:function(){return p("Text.fontPropertiesCache is deprecated"),r.TextMetrics._fonts}},fontPropertiesCanvas:{get:function(){return p("Text.fontPropertiesCanvas is deprecated"),r.TextMetrics._canvas}},fontPropertiesContext:{get:function(){return p("Text.fontPropertiesContext is deprecated"),r.TextMetrics._context}}}),r.Text.prototype.setStyle=function(e){this.style=e,p("setStyle is now deprecated, please use the style property, e.g : myText.style = style;")},r.Text.prototype.determineFontProperties=function(e){return p("determineFontProperties is now deprecated, please use TextMetrics.measureFont method"),r.TextMetrics.measureFont(e)},r.Text.getFontStyle=function(e){return p("getFontStyle is now deprecated, please use TextStyle.toFontString() instead"),(e=e||{})instanceof r.TextStyle||(e=new r.TextStyle(e)),e.toFontString()},Object.defineProperties(r.TextStyle.prototype,{font:{get:function(){p("text style property 'font' is now deprecated, please use the 'fontFamily', 'fontSize', 'fontStyle', 'fontVariant' and 'fontWeight' properties from now on");var e="number"==typeof this._fontSize?this._fontSize+"px":this._fontSize;return this._fontStyle+" "+this._fontVariant+" "+this._fontWeight+" "+e+" "+this._fontFamily},set:function(e){p("text style property 'font' is now deprecated, please use the 'fontFamily','fontSize',fontStyle','fontVariant' and 'fontWeight' properties from now on"),1<e.indexOf("italic")?this._fontStyle="italic":-1<e.indexOf("oblique")?this._fontStyle="oblique":this._fontStyle="normal",-1<e.indexOf("small-caps")?this._fontVariant="small-caps":this._fontVariant="normal";var t=e.split(" "),r=-1;this._fontSize=26;for(var i=0;i<t.length;++i)if(t[i].match(/(px|pt|em|%)/)){r=i,this._fontSize=t[i];break}this._fontWeight="normal";for(var n=0;n<r;++n)if(t[n].match(/(bold|bolder|lighter|100|200|300|400|500|600|700|800|900)/)){this._fontWeight=t[n];break}if(-1<r&&r<t.length-1){this._fontFamily="";for(var o=r+1;o<t.length;++o)this._fontFamily+=t[o]+" ";this._fontFamily=this._fontFamily.slice(0,-1)}else this._fontFamily="Arial";this.styleID++}}}),r.Texture.prototype.setFrame=function(e){this.frame=e,p("setFrame is now deprecated, please use the frame property, e.g: myTexture.frame = frame;")},r.Texture.addTextureToCache=function(e,t){r.Texture.addToCache(e,t),p("Texture.addTextureToCache is deprecated, please use Texture.addToCache from now on.")},r.Texture.removeTextureFromCache=function(e){return p("Texture.removeTextureFromCache is deprecated, please use Texture.removeFromCache from now on. Be aware that Texture.removeFromCache does not automatically its BaseTexture from the BaseTextureCache. For that, use BaseTexture.removeFromCache"),r.BaseTexture.removeFromCache(e),r.Texture.removeFromCache(e)},Object.defineProperties(n,{AbstractFilter:{get:function(){return p("AstractFilter has been renamed to Filter, please use PIXI.Filter"),r.AbstractFilter}},SpriteMaskFilter:{get:function(){return p("filters.SpriteMaskFilter is an undocumented alias, please use SpriteMaskFilter from now on."),r.SpriteMaskFilter}},VoidFilter:{get:function(){return p("VoidFilter has been renamed to AlphaFilter, please use PIXI.filters.AlphaFilter"),n.AlphaFilter}}}),r.utils.uuid=function(){return p("utils.uuid() is deprecated, please use utils.uid() from now on."),r.utils.uid()},r.utils.canUseNewCanvasBlendModes=function(){return p("utils.canUseNewCanvasBlendModes() is deprecated, please use CanvasTinter.canUseMultiply from now on"),r.CanvasTinter.canUseMultiply};var f=!0;Object.defineProperty(r.utils,"_saidHello",{set:function(e){e&&(p("PIXI.utils._saidHello is deprecated, please use PIXI.utils.skipHello()"),this.skipHello()),f=e},get:function(){return f}}),o.BasePrepare&&(o.BasePrepare.prototype.register=function(e,t){return p("renderer.plugins.prepare.register is now deprecated, please use renderer.plugins.prepare.registerFindHook & renderer.plugins.prepare.registerUploadHook"),e&&this.registerFindHook(e),t&&this.registerUploadHook(t),this});o.canvas&&Object.defineProperty(o.canvas,"UPLOADS_PER_FRAME",{set:function(){p("PIXI.CanvasPrepare.UPLOADS_PER_FRAME has been removed. Please set renderer.plugins.prepare.limiter.maxItemsPerFrame on your renderer")},get:function(){return p("PIXI.CanvasPrepare.UPLOADS_PER_FRAME has been removed. Please use renderer.plugins.prepare.limiter"),NaN}});o.webgl&&Object.defineProperty(o.webgl,"UPLOADS_PER_FRAME",{set:function(){p("PIXI.WebGLPrepare.UPLOADS_PER_FRAME has been removed. Please set renderer.plugins.prepare.limiter.maxItemsPerFrame on your renderer")},get:function(){return p("PIXI.WebGLPrepare.UPLOADS_PER_FRAME has been removed. Please use renderer.plugins.prepare.limiter"),NaN}});if(a.Loader){var h=a.Resource,d=a.Loader;Object.defineProperties(h.prototype,{isJson:{get:function(){return p("The isJson property is deprecated, please use `resource.type === Resource.TYPE.JSON`."),this.type===h.TYPE.JSON}},isXml:{get:function(){return p("The isXml property is deprecated, please use `resource.type === Resource.TYPE.XML`."),this.type===h.TYPE.XML}},isImage:{get:function(){return p("The isImage property is deprecated, please use `resource.type === Resource.TYPE.IMAGE`."),this.type===h.TYPE.IMAGE}},isAudio:{get:function(){return p("The isAudio property is deprecated, please use `resource.type === Resource.TYPE.AUDIO`."),this.type===h.TYPE.AUDIO}},isVideo:{get:function(){return p("The isVideo property is deprecated, please use `resource.type === Resource.TYPE.VIDEO`."),this.type===h.TYPE.VIDEO}}}),Object.defineProperties(d.prototype,{before:{get:function(){return p("The before() method is deprecated, please use pre()."),this.pre}},after:{get:function(){return p("The after() method is deprecated, please use use()."),this.use}}})}s.interactiveTarget&&Object.defineProperty(s.interactiveTarget,"defaultCursor",{set:function(e){p("Property defaultCursor has been replaced with 'cursor'. "),this.cursor=e},get:function(){return p("Property defaultCursor has been replaced with 'cursor'. "),this.cursor}});s.InteractionManager&&(Object.defineProperty(s.InteractionManager,"defaultCursorStyle",{set:function(e){p("Property defaultCursorStyle has been replaced with 'cursorStyles.default'. "),this.cursorStyles.default=e},get:function(){return p("Property defaultCursorStyle has been replaced with 'cursorStyles.default'. "),this.cursorStyles.default}}),Object.defineProperty(s.InteractionManager,"currentCursorStyle",{set:function(e){p("Property currentCursorStyle has been removed.See the currentCursorMode property, which works differently."),this.currentCursorMode=e},get:function(){return p("Property currentCursorStyle has been removed.See the currentCursorMode property, which works differently."),this.currentCursorMode}}))};var i={};function p(e){if(!i[e]){var t=(new Error).stack;void 0===t?console.warn("Deprecation Warning: ",e):(t=t.split("\n").splice(3).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cDeprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",e),console.warn(t),console.groupEnd()):(console.warn("Deprecation Warning: ",e),console.warn(t))),i[e]=!0}}},{}],132:[function(e,t,r){"use strict";r.__esModule=!0;var l=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../../core"));var f=new l.Rectangle,i=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(this.renderer=e).extract=this}return t.prototype.image=function(e){var t=new Image;return t.src=this.base64(e),t},t.prototype.base64=function(e){return this.canvas(e).toDataURL()},t.prototype.canvas=function(e){var t=this.renderer,r=void 0,i=void 0,n=void 0,o=void 0;e&&(o=e instanceof l.RenderTexture?e:t.generateTexture(e)),o?(r=o.baseTexture._canvasRenderTarget.context,i=o.baseTexture._canvasRenderTarget.resolution,n=o.frame):(r=t.rootContext,i=t.resolution,(n=f).width=this.renderer.width,n.height=this.renderer.height);var a=n.width*i,s=n.height*i,u=new l.CanvasRenderTarget(a,s,1),c=r.getImageData(n.x*i,n.y*i,a,s);return u.context.putImageData(c,0,0),u.canvas},t.prototype.pixels=function(e){var t=this.renderer,r=void 0,i=void 0,n=void 0,o=void 0;return e&&(o=e instanceof l.RenderTexture?e:t.generateTexture(e)),o?(r=o.baseTexture._canvasRenderTarget.context,i=o.baseTexture._canvasRenderTarget.resolution,n=o.frame):(r=t.rootContext,(n=f).width=t.width,n.height=t.height),r.getImageData(0,0,n.width*i,n.height*i).data},t.prototype.destroy=function(){this.renderer.extract=null,this.renderer=null},t}();r.default=i,l.CanvasRenderer.registerPlugin("extract",i)},{"../../core":65}],133:[function(e,t,r){"use strict";r.__esModule=!0;var i=e("./webgl/WebGLExtract");Object.defineProperty(r,"webgl",{enumerable:!0,get:function(){return o(i).default}});var n=e("./canvas/CanvasExtract");function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"canvas",{enumerable:!0,get:function(){return o(n).default}})},{"./canvas/CanvasExtract":132,"./webgl/WebGLExtract":134}],134:[function(e,t,r){"use strict";r.__esModule=!0;var p=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../../core"));var v=new p.Rectangle,i=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(this.renderer=e).extract=this}return t.prototype.image=function(e){var t=new Image;return t.src=this.base64(e),t},t.prototype.base64=function(e){return this.canvas(e).toDataURL()},t.prototype.canvas=function(e){var t=this.renderer,r=void 0,i=void 0,n=void 0,o=!1,a=void 0,s=!1;e&&(e instanceof p.RenderTexture?a=e:(a=this.renderer.generateTexture(e),s=!0)),a?(i=(r=a.baseTexture._glRenderTargets[this.renderer.CONTEXT_UID]).resolution,n=a.frame,o=!1):(i=(r=this.renderer.rootRenderTarget).resolution,o=!0,(n=v).width=r.size.width,n.height=r.size.height);var u=n.width*i,c=n.height*i,l=new p.CanvasRenderTarget(u,c,1);if(r){t.bindRenderTarget(r);var f=new Uint8Array(4*u*c),h=t.gl;h.readPixels(n.x*i,n.y*i,u,c,h.RGBA,h.UNSIGNED_BYTE,f);var d=l.context.getImageData(0,0,u,c);d.data.set(f),l.context.putImageData(d,0,0),o&&(l.context.scale(1,-1),l.context.drawImage(l.canvas,0,-c))}return s&&a.destroy(!0),l.canvas},t.prototype.pixels=function(e){var t=this.renderer,r=void 0,i=void 0,n=void 0,o=void 0,a=!1;e&&(e instanceof p.RenderTexture?o=e:(o=this.renderer.generateTexture(e),a=!0)),o?(i=(r=o.baseTexture._glRenderTargets[this.renderer.CONTEXT_UID]).resolution,n=o.frame):(i=(r=this.renderer.rootRenderTarget).resolution,(n=v).width=r.size.width,n.height=r.size.height);var s=n.width*i,u=n.height*i,c=new Uint8Array(4*s*u);if(r){t.bindRenderTarget(r);var l=t.gl;l.readPixels(n.x*i,n.y*i,s,u,l.RGBA,l.UNSIGNED_BYTE,c)}return a&&o.destroy(!0),c},t.prototype.destroy=function(){this.renderer.extract=null,this.renderer=null},t}();r.default=i,p.WebGLRenderer.registerPlugin("extract",i)},{"../../core":65}],135:[function(e,t,r){"use strict";r.__esModule=!0;var o=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),a=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../core"));var i=function(i){function n(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,i.call(this,e[0]instanceof a.Texture?e[0]:e[0].texture));return r._textures=null,r._durations=null,r.textures=e,r._autoUpdate=!1!==t,r.animationSpeed=1,r.loop=!0,r.updateAnchor=!1,r.onComplete=null,r.onFrameChange=null,r.onLoop=null,r._currentTime=0,r.playing=!1,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,i),n.prototype.stop=function(){this.playing&&(this.playing=!1,this._autoUpdate&&a.ticker.shared.remove(this.update,this))},n.prototype.play=function(){this.playing||(this.playing=!0,this._autoUpdate&&a.ticker.shared.add(this.update,this,a.UPDATE_PRIORITY.HIGH))},n.prototype.gotoAndStop=function(e){this.stop();var t=this.currentFrame;this._currentTime=e,t!==this.currentFrame&&this.updateTexture()},n.prototype.gotoAndPlay=function(e){var t=this.currentFrame;this._currentTime=e,t!==this.currentFrame&&this.updateTexture(),this.play()},n.prototype.update=function(e){var t=this.animationSpeed*e,r=this.currentFrame;if(null!==this._durations){var i=this._currentTime%1*this._durations[this.currentFrame];for(i+=t/60*1e3;i<0;)this._currentTime--,i+=this._durations[this.currentFrame];var n=Math.sign(this.animationSpeed*e);for(this._currentTime=Math.floor(this._currentTime);i>=this._durations[this.currentFrame];)i-=this._durations[this.currentFrame]*n,this._currentTime+=n;this._currentTime+=i/this._durations[this.currentFrame]}else this._currentTime+=t;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):r!==this.currentFrame&&(this.loop&&this.onLoop&&(0<this.animationSpeed&&this.currentFrame<r?this.onLoop():this.animationSpeed<0&&this.currentFrame>r&&this.onLoop()),this.updateTexture())},n.prototype.updateTexture=function(){this._texture=this._textures[this.currentFrame],this._textureID=-1,this.cachedTint=16777215,this.updateAnchor&&this._anchor.copy(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame)},n.prototype.destroy=function(e){this.stop(),i.prototype.destroy.call(this,e)},n.fromFrames=function(e){for(var t=[],r=0;r<e.length;++r)t.push(a.Texture.fromFrame(e[r]));return new n(t)},n.fromImages=function(e){for(var t=[],r=0;r<e.length;++r)t.push(a.Texture.fromImage(e[r]));return new n(t)},o(n,[{key:"totalFrames",get:function(){return this._textures.length}},{key:"textures",get:function(){return this._textures},set:function(e){if(e[0]instanceof a.Texture)this._textures=e,this._durations=null;else{this._textures=[],this._durations=[];for(var t=0;t<e.length;t++)this._textures.push(e[t].texture),this._durations.push(e[t].time)}this.gotoAndStop(0),this.updateTexture()}},{key:"currentFrame",get:function(){var e=Math.floor(this._currentTime)%this._textures.length;return e<0&&(e+=this._textures.length),e}}]),n}(a.Sprite);r.default=i},{"../core":65}],136:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),O=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../core")),o=i(e("../core/math/ObservablePoint")),T=e("../core/utils"),S=i(e("../core/settings"));function i(e){return e&&e.__esModule?e:{default:e}}var a=function(i){function A(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,A);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,i.call(this));return r._textWidth=0,r._textHeight=0,r._glyphs=[],r._font={tint:void 0!==t.tint?t.tint:16777215,align:t.align||"left",name:null,size:0},r.font=t.font,r._text=e,r._maxWidth=0,r._maxLineHeight=0,r._letterSpacing=0,r._anchor=new o.default(function(){r.dirty=!0},r,0,0),r.dirty=!1,r.updateText(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(A,i),A.prototype.updateText=function(){for(var e=A.fonts[this._font.name],t=this._font.size/e.size,r=new O.Point,i=[],n=[],o=this.text.replace(/(?:\r\n|\r)/g,"\n"),a=o.length,s=this._maxWidth*e.size/this._font.size,u=null,c=0,l=0,f=0,h=-1,d=0,p=0,v=0,m=0;m<a;m++){var b=o.charCodeAt(m),y=o.charAt(m);if(/(?:\s)/.test(y)&&(h=m,d=c),"\r"!==y&&"\n"!==y){var g=e.chars[b];g&&(u&&g.kerning[u]&&(r.x+=g.kerning[u]),i.push({texture:g.texture,line:f,charCode:b,position:new O.Point(r.x+g.xOffset+this._letterSpacing/2,r.y+g.yOffset)}),r.x+=g.xAdvance+this._letterSpacing,c=r.x,v=Math.max(v,g.yOffset+g.texture.height),u=b,-1!==h&&0<s&&r.x>s&&(++p,O.utils.removeItems(i,1+h-p,1+m-h),m=h,h=-1,n.push(d),l=Math.max(l,d),f++,r.x=0,r.y+=e.lineHeight,u=null))}else n.push(c),l=Math.max(l,c),++f,++p,r.x=0,r.y+=e.lineHeight,u=null}var _=o.charAt(o.length-1);"\r"!==_&&"\n"!==_&&(/(?:\s)/.test(_)&&(c=d),n.push(c),l=Math.max(l,c));for(var w=[],x=0;x<=f;x++){var T=0;"right"===this._font.align?T=l-n[x]:"center"===this._font.align&&(T=(l-n[x])/2),w.push(T)}for(var S=i.length,M=this.tint,P=0;P<S;P++){var E=this._glyphs[P];E?E.texture=i[P].texture:(E=new O.Sprite(i[P].texture),this._glyphs.push(E)),E.position.x=(i[P].position.x+w[i[P].line])*t,E.position.y=i[P].position.y*t,E.scale.x=E.scale.y=t,E.tint=M,E.parent||this.addChild(E)}for(var k=S;k<this._glyphs.length;++k)this.removeChild(this._glyphs[k]);if(this._textWidth=l*t,this._textHeight=(r.y+e.lineHeight)*t,0!==this.anchor.x||0!==this.anchor.y)for(var C=0;C<S;C++)this._glyphs[C].x-=this._textWidth*this.anchor.x,this._glyphs[C].y-=this._textHeight*this.anchor.y;this._maxLineHeight=v*t},A.prototype.updateTransform=function(){this.validate(),this.containerUpdateTransform()},A.prototype.getLocalBounds=function(){return this.validate(),i.prototype.getLocalBounds.call(this)},A.prototype.validate=function(){this.dirty&&(this.updateText(),this.dirty=!1)},A.registerFont=function(e,t){var r={},i=e.getElementsByTagName("info")[0],n=e.getElementsByTagName("common")[0],o=e.getElementsByTagName("page"),a=(0,T.getResolutionOfUrl)(o[0].getAttribute("file"),S.default.RESOLUTION),s={};r.font=i.getAttribute("face"),r.size=parseInt(i.getAttribute("size"),10),r.lineHeight=parseInt(n.getAttribute("lineHeight"),10)/a,r.chars={},t instanceof O.Texture&&(t=[t]);for(var u=0;u<o.length;u++){var c=o[u].getAttribute("id"),l=o[u].getAttribute("file");s[c]=t instanceof Array?t[u]:t[l]}for(var f=e.getElementsByTagName("char"),h=0;h<f.length;h++){var d=f[h],p=parseInt(d.getAttribute("id"),10),v=d.getAttribute("page")||0,m=new O.Rectangle(parseInt(d.getAttribute("x"),10)/a+s[v].frame.x/a,parseInt(d.getAttribute("y"),10)/a+s[v].frame.y/a,parseInt(d.getAttribute("width"),10)/a,parseInt(d.getAttribute("height"),10)/a);r.chars[p]={xOffset:parseInt(d.getAttribute("xoffset"),10)/a,yOffset:parseInt(d.getAttribute("yoffset"),10)/a,xAdvance:parseInt(d.getAttribute("xadvance"),10)/a,kerning:{},texture:new O.Texture(s[v].baseTexture,m),page:v}}for(var b=e.getElementsByTagName("kerning"),y=0;y<b.length;y++){var g=b[y],_=parseInt(g.getAttribute("first"),10)/a,w=parseInt(g.getAttribute("second"),10)/a,x=parseInt(g.getAttribute("amount"),10)/a;r.chars[w]&&(r.chars[w].kerning[_]=x)}return A.fonts[r.font]=r},n(A,[{key:"tint",get:function(){return this._font.tint},set:function(e){this._font.tint="number"==typeof e&&0<=e?e:16777215,this.dirty=!0}},{key:"align",get:function(){return this._font.align},set:function(e){this._font.align=e||"left",this.dirty=!0}},{key:"anchor",get:function(){return this._anchor},set:function(e){"number"==typeof e?this._anchor.set(e):this._anchor.copy(e)}},{key:"font",get:function(){return this._font},set:function(e){e&&("string"==typeof e?(e=e.split(" "),this._font.name=1===e.length?e[0]:e.slice(1).join(" "),this._font.size=2<=e.length?parseInt(e[0],10):A.fonts[this._font.name].size):(this._font.name=e.name,this._font.size="number"==typeof e.size?e.size:parseInt(e.size,10)),this.dirty=!0)}},{key:"text",get:function(){return this._text},set:function(e){e=e.toString()||" ",this._text!==e&&(this._text=e,this.dirty=!0)}},{key:"maxWidth",get:function(){return this._maxWidth},set:function(e){this._maxWidth!==e&&(this._maxWidth=e,this.dirty=!0)}},{key:"maxLineHeight",get:function(){return this.validate(),this._maxLineHeight}},{key:"textWidth",get:function(){return this.validate(),this._textWidth}},{key:"letterSpacing",get:function(){return this._letterSpacing},set:function(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.dirty=!0)}},{key:"textHeight",get:function(){return this.validate(),this._textHeight}}]),A}(O.Container);(r.default=a).fonts={}},{"../core":65,"../core/math/ObservablePoint":68,"../core/settings":101,"../core/utils":125}],137:[function(e,t,r){"use strict";r.__esModule=!0;var i,a=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),w=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../core")),n=e("../core/sprites/canvas/CanvasTinter"),x=(i=n)&&i.__esModule?i:{default:i};var s=new w.Point,o=function(n){function o(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:100,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:100;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,n.call(this,e));return i.tileTransform=new w.TransformStatic,i._width=t,i._height=r,i._canvasPattern=null,i.uvTransform=e.transform||new w.TextureMatrix(e),i.pluginName="tilingSprite",i.uvRespectAnchor=!1,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,n),o.prototype._onTextureUpdate=function(){this.uvTransform&&(this.uvTransform.texture=this._texture),this.cachedTint=16777215},o.prototype._renderWebGL=function(e){var t=this._texture;t&&t.valid&&(this.tileTransform.updateLocalTransform(),this.uvTransform.update(),e.setObjectRenderer(e.plugins[this.pluginName]),e.plugins[this.pluginName].render(this))},o.prototype._renderCanvas=function(e){var t=this._texture;if(t.baseTexture.hasLoaded){var r=e.context,i=this.worldTransform,n=e.resolution,o=2===t.rotate,a=t.baseTexture,s=a.resolution,u=this.tilePosition.x/this.tileScale.x%t.orig.width*s,c=this.tilePosition.y/this.tileScale.y%t.orig.height*s;if(this._textureID!==this._texture._updateID||this.cachedTint!==this.tint){this._textureID=this._texture._updateID;var l=new w.CanvasRenderTarget(t.orig.width,t.orig.height,s);if(16777215!==this.tint)this.tintedTexture=x.default.getTintedTexture(this,this.tint),l.context.drawImage(this.tintedTexture,0,0);else{var f=t._frame.x*s,h=t._frame.y*s,d=t._frame.width*s,p=t._frame.height*s,v=(t.trim?t.trim.width:t.orig.width)*s,m=(t.trim?t.trim.height:t.orig.height)*s,b=(t.trim?t.trim.x:0)*s,y=(t.trim?t.trim.y:0)*s;o?(l.context.rotate(-Math.PI/2),l.context.translate(-m,0),l.context.drawImage(a.source,f,h,d,p,-y,b,m,v)):l.context.drawImage(a.source,f,h,d,p,b,y,v,m)}this.cachedTint=this.tint,this._canvasPattern=l.context.createPattern(l.canvas,"repeat")}r.globalAlpha=this.worldAlpha,r.setTransform(i.a*n,i.b*n,i.c*n,i.d*n,i.tx*n,i.ty*n),e.setBlendMode(this.blendMode),r.fillStyle=this._canvasPattern,r.scale(this.tileScale.x/s,this.tileScale.y/s);var g=this.anchor.x*-this._width*s,_=this.anchor.y*-this._height*s;this.uvRespectAnchor?(r.translate(u,c),r.fillRect(g-u,_-c,this._width/this.tileScale.x*s,this._height/this.tileScale.y*s)):(r.translate(u+g,c+_),r.fillRect(-u,-c,this._width/this.tileScale.x*s,this._height/this.tileScale.y*s))}},o.prototype._calculateBounds=function(){var e=this._width*-this._anchor._x,t=this._height*-this._anchor._y,r=this._width*(1-this._anchor._x),i=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,e,t,r,i)},o.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new w.Rectangle),e=this._localBoundsRect),this._bounds.getRectangle(e)):n.prototype.getLocalBounds.call(this,e)},o.prototype.containsPoint=function(e){this.worldTransform.applyInverse(e,s);var t=this._width,r=this._height,i=-t*this.anchor._x;if(s.x>=i&&s.x<i+t){var n=-r*this.anchor._y;if(s.y>=n&&s.y<n+r)return!0}return!1},o.prototype.destroy=function(e){n.prototype.destroy.call(this,e),this.tileTransform=null,this.uvTransform=null},o.from=function(e,t,r){return new o(w.Texture.from(e),t,r)},o.fromFrame=function(e,t,r){var i=w.utils.TextureCache[e];if(!i)throw new Error('The frameId "'+e+'" does not exist in the texture cache '+this);return new o(i,t,r)},o.fromImage=function(e,t,r,i,n){return new o(w.Texture.fromImage(e,i,n),t,r)},a(o,[{key:"clampMargin",get:function(){return this.uvTransform.clampMargin},set:function(e){this.uvTransform.clampMargin=e,this.uvTransform.update(!0)}},{key:"tileScale",get:function(){return this.tileTransform.scale},set:function(e){this.tileTransform.scale.copy(e)}},{key:"tilePosition",get:function(){return this.tileTransform.position},set:function(e){this.tileTransform.position.copy(e)}},{key:"width",get:function(){return this._width},set:function(e){this._width=e}},{key:"height",get:function(){return this._height},set:function(e){this._height=e}}]),o}(w.Sprite);r.default=o},{"../core":65,"../core/sprites/canvas/CanvasTinter":104}],138:[function(e,t,r){"use strict";var l=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../core")),f=i(e("../core/textures/Texture")),h=i(e("../core/textures/BaseTexture")),d=e("../core/utils");function i(e){return e&&e.__esModule?e:{default:e}}var n=l.DisplayObject,p=new l.Matrix;n.prototype._cacheAsBitmap=!1,n.prototype._cacheData=!1;var o=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.textureCacheId=null,this.originalRenderWebGL=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalHitTest=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.sprite=null};Object.defineProperties(n.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(e){if(this._cacheAsBitmap!==e){var t=void 0;(this._cacheAsBitmap=e)?(this._cacheData||(this._cacheData=new o),(t=this._cacheData).originalRenderWebGL=this.renderWebGL,t.originalRenderCanvas=this.renderCanvas,t.originalUpdateTransform=this.updateTransform,t.originalCalculateBounds=this.calculateBounds,t.originalGetLocalBounds=this.getLocalBounds,t.originalDestroy=this.destroy,t.originalContainsPoint=this.containsPoint,t.originalMask=this._mask,t.originalFilterArea=this.filterArea,this.renderWebGL=this._renderCachedWebGL,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):((t=this._cacheData).sprite&&this._destroyCachedDisplayObject(),this.renderWebGL=t.originalRenderWebGL,this.renderCanvas=t.originalRenderCanvas,this.calculateBounds=t.originalCalculateBounds,this.getLocalBounds=t.originalGetLocalBounds,this.destroy=t.originalDestroy,this.updateTransform=t.originalUpdateTransform,this.containsPoint=t.originalContainsPoint,this._mask=t.originalMask,this.filterArea=t.originalFilterArea)}}}}),n.prototype._renderCachedWebGL=function(e){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(e),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderWebGL(e))},n.prototype._initCachedDisplayObject=function(e){if(!this._cacheData||!this._cacheData.sprite){var t=this.alpha;this.alpha=1,e.currentRenderer.flush();var r=this.getLocalBounds().clone();if(this._filters&&this._filters.length){var i=this._filters[0].padding;r.pad(i)}r.ceil(l.settings.RESOLUTION);var n=e._activeRenderTarget,o=e.filterManager.filterStack,a=l.RenderTexture.create(r.width,r.height),s="cacheAsBitmap_"+(0,d.uid)();this._cacheData.textureCacheId=s,h.default.addToCache(a.baseTexture,s),f.default.addToCache(a,s);var u=p;u.tx=-r.x,u.ty=-r.y,this.transform.worldTransform.identity(),this.renderWebGL=this._cacheData.originalRenderWebGL,e.render(this,a,!0,u,!0),e.bindRenderTarget(n),e.filterManager.filterStack=o,this.renderWebGL=this._renderCachedWebGL,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var c=new l.Sprite(a);c.transform.worldTransform=this.transform.worldTransform,c.anchor.x=-r.x/r.width,c.anchor.y=-r.y/r.height,c.alpha=t,c._bounds=this._bounds,this._cacheData.sprite=c,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=e._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=c.containsPoint.bind(c)}},n.prototype._renderCachedCanvas=function(e){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(e),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(e))},n.prototype._initCachedDisplayObjectCanvas=function(e){if(!this._cacheData||!this._cacheData.sprite){var t=this.getLocalBounds(),r=this.alpha;this.alpha=1;var i=e.context;t.ceil(l.settings.RESOLUTION);var n=l.RenderTexture.create(t.width,t.height),o="cacheAsBitmap_"+(0,d.uid)();this._cacheData.textureCacheId=o,h.default.addToCache(n.baseTexture,o),f.default.addToCache(n,o);var a=p;this.transform.localTransform.copy(a),a.invert(),a.tx-=t.x,a.ty-=t.y,this.renderCanvas=this._cacheData.originalRenderCanvas,e.render(this,n,!0,a,!1),e.context=i,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var s=new l.Sprite(n);s.transform.worldTransform=this.transform.worldTransform,s.anchor.x=-t.x/t.width,s.anchor.y=-t.y/t.height,s.alpha=r,s._bounds=this._bounds,this._cacheData.sprite=s,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=e._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=s.containsPoint.bind(s)}},n.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._lastBoundsID=this._boundsID},n.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds()},n.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,h.default.removeFromCache(this._cacheData.textureCacheId),f.default.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},n.prototype._cacheAsBitmapDestroy=function(e){this.cacheAsBitmap=!1,this.destroy(e)}},{"../core":65,"../core/textures/BaseTexture":112,"../core/textures/Texture":115,"../core/utils":125}],139:[function(e,t,r){"use strict";var i=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../core"));i.DisplayObject.prototype.name=null,i.Container.prototype.getChildByName=function(e){for(var t=0;t<this.children.length;t++)if(this.children[t].name===e)return this.children[t];return null}},{"../core":65}],140:[function(e,t,r){"use strict";var i=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../core"));i.DisplayObject.prototype.getGlobalPosition=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:new i.Point,t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return this.parent?this.parent.toGlobal(this.position,e,t):(e.x=this.position.x,e.y=this.position.y),e}},{"../core":65}],141:[function(e,t,r){"use strict";r.__esModule=!0,r.BitmapText=r.TilingSpriteRenderer=r.TilingSprite=r.AnimatedSprite=void 0;var i=e("./AnimatedSprite");Object.defineProperty(r,"AnimatedSprite",{enumerable:!0,get:function(){return s(i).default}});var n=e("./TilingSprite");Object.defineProperty(r,"TilingSprite",{enumerable:!0,get:function(){return s(n).default}});var o=e("./webgl/TilingSpriteRenderer");Object.defineProperty(r,"TilingSpriteRenderer",{enumerable:!0,get:function(){return s(o).default}});var a=e("./BitmapText");function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"BitmapText",{enumerable:!0,get:function(){return s(a).default}}),e("./cacheAsBitmap"),e("./getChildByName"),e("./getGlobalPosition")},{"./AnimatedSprite":135,"./BitmapText":136,"./TilingSprite":137,"./cacheAsBitmap":138,"./getChildByName":139,"./getGlobalPosition":140,"./webgl/TilingSpriteRenderer":142}],142:[function(e,t,r){"use strict";r.__esModule=!0;var p=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../../core")),v=e("../../core/const");e("path");var m=new p.Matrix,i=function(r){function i(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,r.call(this,e));return t.shader=null,t.simpleShader=null,t.quad=null,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),i.prototype.onContextChange=function(){var e=this.renderer.gl;this.shader=new p.Shader(e,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n vec2 coord = mod(vTextureCoord - uClampOffset, vec2(1.0, 1.0)) + uClampOffset;\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n vec4 sample = texture2D(uSampler, coord);\n gl_FragColor = sample * uColor;\n}\n"),this.simpleShader=new p.Shader(e,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\n\nvoid main(void)\n{\n vec4 sample = texture2D(uSampler, vTextureCoord);\n gl_FragColor = sample * uColor;\n}\n"),this.renderer.bindVao(null),this.quad=new p.Quad(e,this.renderer.state.attribState),this.quad.initVao(this.shader)},i.prototype.render=function(e){var t=this.renderer,r=this.quad;t.bindVao(r.vao);var i=r.vertices;i[0]=i[6]=e._width*-e.anchor.x,i[1]=i[3]=e._height*-e.anchor.y,i[2]=i[4]=e._width*(1-e.anchor.x),i[5]=i[7]=e._height*(1-e.anchor.y),e.uvRespectAnchor&&((i=r.uvs)[0]=i[6]=-e.anchor.x,i[1]=i[3]=-e.anchor.y,i[2]=i[4]=1-e.anchor.x,i[5]=i[7]=1-e.anchor.y),r.upload();var n=e._texture,o=n.baseTexture,a=e.tileTransform.localTransform,s=e.uvTransform,u=o.isPowerOfTwo&&n.frame.width===o.width&&n.frame.height===o.height;u&&(o._glTextures[t.CONTEXT_UID]?u=o.wrapMode!==v.WRAP_MODES.CLAMP:o.wrapMode===v.WRAP_MODES.CLAMP&&(o.wrapMode=v.WRAP_MODES.REPEAT));var c=u?this.simpleShader:this.shader;t.bindShader(c);var l=n.width,f=n.height,h=e._width,d=e._height;m.set(a.a*l/h,a.b*l/d,a.c*f/h,a.d*f/d,a.tx/h,a.ty/d),m.invert(),u?m.prepend(s.mapCoord):(c.uniforms.uMapCoord=s.mapCoord.toArray(!0),c.uniforms.uClampFrame=s.uClampFrame,c.uniforms.uClampOffset=s.uClampOffset),c.uniforms.uTransform=m.toArray(!0),c.uniforms.uColor=p.utils.premultiplyTintToRgba(e.tint,e.worldAlpha,c.uniforms.uColor,o.premultipliedAlpha),c.uniforms.translationMatrix=e.transform.worldTransform.toArray(!0),c.uniforms.uSampler=t.bindTexture(n),t.setBlendMode(p.utils.correctBlendMode(e.blendMode,o.premultipliedAlpha)),r.vao.draw(this.renderer.gl.TRIANGLES,6,0)},i}(p.ObjectRenderer);r.default=i,p.WebGLRenderer.registerPlugin("tilingSprite",i)},{"../../core":65,"../../core/const":46,path:8}],143:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),i=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../../core"));e("path");var o=function(r){function i(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,r.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float uAlpha;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;\n}\n"));return t.alpha=e,t.glShaderKey="alpha",t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),n(i,[{key:"alpha",get:function(){return this.uniforms.uAlpha},set:function(e){this.uniforms.uAlpha=e}}]),i}(i.Filter);r.default=o},{"../../core":65,path:8}],144:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),s=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../../core")),u=n(e("./BlurXFilter")),c=n(e("./BlurYFilter"));function n(e){return e&&e.__esModule?e:{default:e}}var o=function(o){function a(e,t,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,o.call(this));return n.blurXFilter=new u.default(e,t,r,i),n.blurYFilter=new c.default(e,t,r,i),n.padding=0,n.resolution=r||s.settings.RESOLUTION,n.quality=t||4,n.blur=e||8,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(a,o),a.prototype.apply=function(e,t,r){var i=e.getRenderTarget(!0);this.blurXFilter.apply(e,t,i,!0),this.blurYFilter.apply(e,i,r,!1),e.returnRenderTarget(i)},i(a,[{key:"blur",get:function(){return this.blurXFilter.blur},set:function(e){this.blurXFilter.blur=this.blurYFilter.blur=e,this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))}},{key:"quality",get:function(){return this.blurXFilter.quality},set:function(e){this.blurXFilter.quality=this.blurYFilter.quality=e}},{key:"blurX",get:function(){return this.blurXFilter.blur},set:function(e){this.blurXFilter.blur=e,this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))}},{key:"blurY",get:function(){return this.blurYFilter.blur},set:function(e){this.blurYFilter.blur=e,this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))}},{key:"blendMode",get:function(){return this.blurYFilter._blendMode},set:function(e){this.blurYFilter._blendMode=e}}]),a}(s.Filter);r.default=o},{"../../core":65,"./BlurXFilter":145,"./BlurYFilter":146}],145:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),c=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../../core")),f=n(e("./generateBlurVertSource")),h=n(e("./generateBlurFragSource")),d=n(e("./getMaxBlurKernelSize"));function n(e){return e&&e.__esModule?e:{default:e}}var o=function(s){function u(e,t,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),i=i||5;var n=(0,f.default)(i,!0),o=(0,h.default)(i),a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,s.call(this,n,o));return a.resolution=r||c.settings.RESOLUTION,a._quality=0,a.quality=t||4,a.strength=e||8,a.firstRun=!0,a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(u,s),u.prototype.apply=function(e,t,r,i){if(this.firstRun){var n=e.renderer.gl,o=(0,d.default)(n);this.vertexSrc=(0,f.default)(o,!0),this.fragmentSrc=(0,h.default)(o),this.firstRun=!1}if(this.uniforms.strength=1/r.size.width*(r.size.width/t.size.width),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)e.applyFilter(this,t,r,i);else{for(var a=e.getRenderTarget(!0),s=t,u=a,c=0;c<this.passes-1;c++){e.applyFilter(this,s,u,!0);var l=u;u=s,s=l}e.applyFilter(this,s,r,i),e.returnRenderTarget(a)}},i(u,[{key:"blur",get:function(){return this.strength},set:function(e){this.padding=2*Math.abs(e),this.strength=e}},{key:"quality",get:function(){return this._quality},set:function(e){this._quality=e,this.passes=e}}]),u}(c.Filter);r.default=o},{"../../core":65,"./generateBlurFragSource":147,"./generateBlurVertSource":148,"./getMaxBlurKernelSize":149}],146:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),c=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../../core")),f=n(e("./generateBlurVertSource")),h=n(e("./generateBlurFragSource")),d=n(e("./getMaxBlurKernelSize"));function n(e){return e&&e.__esModule?e:{default:e}}var o=function(s){function u(e,t,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),i=i||5;var n=(0,f.default)(i,!1),o=(0,h.default)(i),a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,s.call(this,n,o));return a.resolution=r||c.settings.RESOLUTION,a._quality=0,a.quality=t||4,a.strength=e||8,a.firstRun=!0,a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(u,s),u.prototype.apply=function(e,t,r,i){if(this.firstRun){var n=e.renderer.gl,o=(0,d.default)(n);this.vertexSrc=(0,f.default)(o,!1),this.fragmentSrc=(0,h.default)(o),this.firstRun=!1}if(this.uniforms.strength=1/r.size.height*(r.size.height/t.size.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)e.applyFilter(this,t,r,i);else{for(var a=e.getRenderTarget(!0),s=t,u=a,c=0;c<this.passes-1;c++){e.applyFilter(this,s,u,!0);var l=u;u=s,s=l}e.applyFilter(this,s,r,i),e.returnRenderTarget(a)}},i(u,[{key:"blur",get:function(){return this.strength},set:function(e){this.padding=2*Math.abs(e),this.strength=e}},{key:"quality",get:function(){return this._quality},set:function(e){this._quality=e,this.passes=e}}]),u}(c.Filter);r.default=o},{"../../core":65,"./generateBlurFragSource":147,"./generateBlurVertSource":148,"./getMaxBlurKernelSize":149}],147:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){for(var t=u[e],r=t.length,i=c,n="",o=void 0,a=0;a<e;a++){var s="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;".replace("%index%",a);r<=(o=a)&&(o=e-a-1),s=s.replace("%value%",t[o]),n+=s,n+="\n"}return i=(i=i.replace("%blur%",n)).replace("%size%",e)};var u={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},c=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join("\n")},{}],148:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){var r=Math.ceil(e/2),i=u,n="",o=void 0;o=t?"vBlurTexCoords[%index%] = aTextureCoord + vec2(%sampleIndex% * strength, 0.0);":"vBlurTexCoords[%index%] = aTextureCoord + vec2(0.0, %sampleIndex% * strength);";for(var a=0;a<e;a++){var s=o.replace("%index%",a);s=s.replace("%sampleIndex%",a-(r-1)+".0"),n+=s,n+="\n"}return i=(i=i.replace("%blur%",n)).replace("%size%",e)};var u=["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform float strength;","uniform mat3 projectionMatrix;","varying vec2 vBlurTexCoords[%size%];","void main(void)","{","gl_Position = vec4((projectionMatrix * vec3((aVertexPosition), 1.0)).xy, 0.0, 1.0);","%blur%","}"].join("\n")},{}],149:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){var t=e.getParameter(e.MAX_VARYING_VECTORS),r=15;for(;t<r;)r-=2;return r}},{}],150:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),n=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../../core"));e("path");var o=function(t){function r(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\nuniform float uAlpha;\n\nvoid main(void)\n{\n vec4 c = texture2D(uSampler, vTextureCoord);\n\n if (uAlpha == 0.0) {\n gl_FragColor = c;\n return;\n }\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (c.a > 0.0) {\n c.rgb /= c.a;\n }\n\n vec4 result;\n\n result.r = (m[0] * c.r);\n result.r += (m[1] * c.g);\n result.r += (m[2] * c.b);\n result.r += (m[3] * c.a);\n result.r += m[4];\n\n result.g = (m[5] * c.r);\n result.g += (m[6] * c.g);\n result.g += (m[7] * c.b);\n result.g += (m[8] * c.a);\n result.g += m[9];\n\n result.b = (m[10] * c.r);\n result.b += (m[11] * c.g);\n result.b += (m[12] * c.b);\n result.b += (m[13] * c.a);\n result.b += m[14];\n\n result.a = (m[15] * c.r);\n result.a += (m[16] * c.g);\n result.a += (m[17] * c.b);\n result.a += (m[18] * c.a);\n result.a += m[19];\n\n vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n // Premultiply alpha again.\n rgb *= result.a;\n\n gl_FragColor = vec4(rgb, result.a);\n}\n"));return e.uniforms.m=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],e.alpha=1,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,t),r.prototype._loadMatrix=function(e){var t=e;1<arguments.length&&void 0!==arguments[1]&&arguments[1]&&(this._multiply(t,this.uniforms.m,e),t=this._colorMatrix(t)),this.uniforms.m=t},r.prototype._multiply=function(e,t,r){return e[0]=t[0]*r[0]+t[1]*r[5]+t[2]*r[10]+t[3]*r[15],e[1]=t[0]*r[1]+t[1]*r[6]+t[2]*r[11]+t[3]*r[16],e[2]=t[0]*r[2]+t[1]*r[7]+t[2]*r[12]+t[3]*r[17],e[3]=t[0]*r[3]+t[1]*r[8]+t[2]*r[13]+t[3]*r[18],e[4]=t[0]*r[4]+t[1]*r[9]+t[2]*r[14]+t[3]*r[19]+t[4],e[5]=t[5]*r[0]+t[6]*r[5]+t[7]*r[10]+t[8]*r[15],e[6]=t[5]*r[1]+t[6]*r[6]+t[7]*r[11]+t[8]*r[16],e[7]=t[5]*r[2]+t[6]*r[7]+t[7]*r[12]+t[8]*r[17],e[8]=t[5]*r[3]+t[6]*r[8]+t[7]*r[13]+t[8]*r[18],e[9]=t[5]*r[4]+t[6]*r[9]+t[7]*r[14]+t[8]*r[19]+t[9],e[10]=t[10]*r[0]+t[11]*r[5]+t[12]*r[10]+t[13]*r[15],e[11]=t[10]*r[1]+t[11]*r[6]+t[12]*r[11]+t[13]*r[16],e[12]=t[10]*r[2]+t[11]*r[7]+t[12]*r[12]+t[13]*r[17],e[13]=t[10]*r[3]+t[11]*r[8]+t[12]*r[13]+t[13]*r[18],e[14]=t[10]*r[4]+t[11]*r[9]+t[12]*r[14]+t[13]*r[19]+t[14],e[15]=t[15]*r[0]+t[16]*r[5]+t[17]*r[10]+t[18]*r[15],e[16]=t[15]*r[1]+t[16]*r[6]+t[17]*r[11]+t[18]*r[16],e[17]=t[15]*r[2]+t[16]*r[7]+t[17]*r[12]+t[18]*r[17],e[18]=t[15]*r[3]+t[16]*r[8]+t[17]*r[13]+t[18]*r[18],e[19]=t[15]*r[4]+t[16]*r[9]+t[17]*r[14]+t[18]*r[19]+t[19],e},r.prototype._colorMatrix=function(e){var t=new Float32Array(e);return t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,t},r.prototype.brightness=function(e,t){var r=[e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0];this._loadMatrix(r,t)},r.prototype.greyscale=function(e,t){var r=[e,e,e,0,0,e,e,e,0,0,e,e,e,0,0,0,0,0,1,0];this._loadMatrix(r,t)},r.prototype.blackAndWhite=function(e){this._loadMatrix([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],e)},r.prototype.hue=function(e,t){e=(e||0)/180*Math.PI;var r=Math.cos(e),i=Math.sin(e),n=(0,Math.sqrt)(1/3),o=[r+1/3*(1-r),1/3*(1-r)-n*i,1/3*(1-r)+n*i,0,0,1/3*(1-r)+n*i,r+1/3*(1-r),1/3*(1-r)-n*i,0,0,1/3*(1-r)-n*i,1/3*(1-r)+n*i,r+1/3*(1-r),0,0,0,0,0,1,0];this._loadMatrix(o,t)},r.prototype.contrast=function(e,t){var r=(e||0)+1,i=-.5*(r-1),n=[r,0,0,0,i,0,r,0,0,i,0,0,r,0,i,0,0,0,1,0];this._loadMatrix(n,t)},r.prototype.saturate=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=arguments[1],r=2*e/3+1,i=-.5*(r-1),n=[r,i,i,0,0,i,r,i,0,0,i,i,r,0,0,0,0,0,1,0];this._loadMatrix(n,t)},r.prototype.desaturate=function(){this.saturate(-1)},r.prototype.negative=function(e){this._loadMatrix([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],e)},r.prototype.sepia=function(e){this._loadMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],e)},r.prototype.technicolor=function(e){this._loadMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],e)},r.prototype.polaroid=function(e){this._loadMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],e)},r.prototype.toBGR=function(e){this._loadMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],e)},r.prototype.kodachrome=function(e){this._loadMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],e)},r.prototype.browni=function(e){this._loadMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],e)},r.prototype.vintage=function(e){this._loadMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],e)},r.prototype.colorTone=function(e,t,r,i,n){var o=((r=r||16770432)>>16&255)/255,a=(r>>8&255)/255,s=(255&r)/255,u=((i=i||3375104)>>16&255)/255,c=(i>>8&255)/255,l=(255&i)/255,f=[.3,.59,.11,0,0,o,a,s,e=e||.2,0,u,c,l,t=t||.15,0,o-u,a-c,s-l,0,0];this._loadMatrix(f,n)},r.prototype.night=function(e,t){var r=[-2*(e=e||.1),-e,0,0,0,-e,0,e,0,0,0,e,2*e,0,0,0,0,0,1,0];this._loadMatrix(r,t)},r.prototype.predator=function(e,t){var r=[11.224130630493164*e,-4.794486999511719*e,-2.8746118545532227*e,0*e,.40342438220977783*e,-3.6330697536468506*e,9.193157196044922*e,-2.951810836791992*e,0*e,-1.316135048866272*e,-3.2184197902679443*e,-4.2375030517578125*e,7.476448059082031*e,0*e,.8044459223747253*e,0,0,0,1,0];this._loadMatrix(r,t)},r.prototype.lsd=function(e){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],e)},r.prototype.reset=function(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)},i(r,[{key:"matrix",get:function(){return this.uniforms.m},set:function(e){this.uniforms.m=e}},{key:"alpha",get:function(){return this.uniforms.uAlpha},set:function(e){this.uniforms.uAlpha=e}}]),r}(n.Filter);(r.default=o).prototype.grayscale=o.prototype.greyscale},{"../../core":65,path:8}],151:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),a=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../../core"));e("path");var n=function(n){function o(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var r=new a.Matrix;e.renderable=!1;var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,n.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vFilterCoord = ( filterMatrix * vec3( aTextureCoord, 1.0) ).xy;\n vTextureCoord = aTextureCoord;\n}","varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\n\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\n\nvoid main(void)\n{\n vec4 map = texture2D(mapSampler, vFilterCoord);\n\n map -= 0.5;\n map.xy *= scale / filterArea.xy;\n\n gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), filterClamp.xy, filterClamp.zw));\n}\n"));return i.maskSprite=e,i.maskMatrix=r,i.uniforms.mapSampler=e._texture,i.uniforms.filterMatrix=r,i.uniforms.scale={x:1,y:1},null==t&&(t=20),i.scale=new a.Point(t,t),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,n),o.prototype.apply=function(e,t,r){this.uniforms.filterMatrix=e.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y,e.applyFilter(this,t,r)},i(o,[{key:"map",get:function(){return this.uniforms.mapSampler},set:function(e){this.uniforms.mapSampler=e}}]),o}(a.Filter);r.default=n},{"../../core":65,path:8}],152:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../../core"));e("path");var n=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,"\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nuniform vec4 filterArea;\n\nvarying vec2 vTextureCoord;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvoid texcoords(vec2 fragCoord, vec2 resolution,\n out vec2 v_rgbNW, out vec2 v_rgbNE,\n out vec2 v_rgbSW, out vec2 v_rgbSE,\n out vec2 v_rgbM) {\n vec2 inverseVP = 1.0 / resolution.xy;\n v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n\n vec2 fragCoord = vTextureCoord * filterArea.xy;\n\n texcoords(fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}",'varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it\'s\n unsupported by WebGL.\n \n --\n \n From:\n https://github.com/mitsuhiko/webgl-meincraft\n \n Copyright (c) 2011 by Armin Ronacher.\n \n Some rights reserved.\n \n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n \n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n \n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n \n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n \n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX 8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 resolution,\n vec2 v_rgbNW, vec2 v_rgbNE,\n vec2 v_rgbSW, vec2 v_rgbSE,\n vec2 v_rgbM) {\n vec4 color;\n mediump vec2 inverseVP = vec2(1.0 / resolution.x, 1.0 / resolution.y);\n vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n vec4 texColor = texture2D(tex, v_rgbM);\n vec3 rgbM = texColor.xyz;\n vec3 luma = vec3(0.299, 0.587, 0.114);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n \n mediump vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n \n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n \n float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * inverseVP;\n \n vec3 rgbA = 0.5 * (\n texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n vec3 rgbB = rgbA * 0.5 + 0.25 * (\n texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\n \n float lumaB = dot(rgbB, luma);\n if ((lumaB < lumaMin) || (lumaB > lumaMax))\n color = vec4(rgbA, texColor.a);\n else\n color = vec4(rgbB, texColor.a);\n return color;\n}\n\nvoid main() {\n\n vec2 fragCoord = vTextureCoord * filterArea.xy;\n\n vec4 color;\n\n color = fxaa(uSampler, fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n gl_FragColor = color;\n}\n'))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(i.Filter);r.default=n},{"../../core":65,path:8}],153:[function(e,t,r){"use strict";r.__esModule=!0;var i=e("./fxaa/FXAAFilter");Object.defineProperty(r,"FXAAFilter",{enumerable:!0,get:function(){return f(i).default}});var n=e("./noise/NoiseFilter");Object.defineProperty(r,"NoiseFilter",{enumerable:!0,get:function(){return f(n).default}});var o=e("./displacement/DisplacementFilter");Object.defineProperty(r,"DisplacementFilter",{enumerable:!0,get:function(){return f(o).default}});var a=e("./blur/BlurFilter");Object.defineProperty(r,"BlurFilter",{enumerable:!0,get:function(){return f(a).default}});var s=e("./blur/BlurXFilter");Object.defineProperty(r,"BlurXFilter",{enumerable:!0,get:function(){return f(s).default}});var u=e("./blur/BlurYFilter");Object.defineProperty(r,"BlurYFilter",{enumerable:!0,get:function(){return f(u).default}});var c=e("./colormatrix/ColorMatrixFilter");Object.defineProperty(r,"ColorMatrixFilter",{enumerable:!0,get:function(){return f(c).default}});var l=e("./alpha/AlphaFilter");function f(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"AlphaFilter",{enumerable:!0,get:function(){return f(l).default}})},{"./alpha/AlphaFilter":143,"./blur/BlurFilter":144,"./blur/BlurXFilter":145,"./blur/BlurYFilter":146,"./colormatrix/ColorMatrixFilter":150,"./displacement/DisplacementFilter":151,"./fxaa/FXAAFilter":152,"./noise/NoiseFilter":154}],154:[function(e,t,r){"use strict";r.__esModule=!0;var o=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),i=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../../core"));e("path");var n=function(i){function n(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:.5,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Math.random();!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,i.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float randomValue = rand(gl_FragCoord.xy * uSeed);\n float diff = (randomValue - 0.5) * uNoise;\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (color.a > 0.0) {\n color.rgb /= color.a;\n }\n\n color.r += diff;\n color.g += diff;\n color.b += diff;\n\n // Premultiply alpha again.\n color.rgb *= color.a;\n\n gl_FragColor = color;\n}\n"));return r.noise=e,r.seed=t,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,i),o(n,[{key:"noise",get:function(){return this.uniforms.uNoise},set:function(e){this.uniforms.uNoise=e}},{key:"seed",get:function(){return this.uniforms.uSeed},set:function(e){this.uniforms.uSeed=e}}]),n}(i.Filter);r.default=n},{"../../core":65,path:8}],155:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),n=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../core"));var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.global=new n.Point,this.target=null,this.originalEvent=null,this.identifier=null,this.isPrimary=!1,this.button=0,this.buttons=0,this.width=0,this.height=0,this.tiltX=0,this.tiltY=0,this.pointerType=null,this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0}return e.prototype.getLocalPosition=function(e,t,r){return e.worldTransform.applyInverse(r||this.global,t)},e.prototype.copyEvent=function(e){e.isPrimary&&(this.isPrimary=!0),this.button=e.button,this.buttons=Number.isInteger(e.buttons)?e.buttons:e.which,this.width=e.width,this.height=e.height,this.tiltX=e.tiltX,this.tiltY=e.tiltY,this.pointerType=e.pointerType,this.pressure=e.pressure,this.rotationAngle=e.rotationAngle,this.twist=e.twist||0,this.tangentialPressure=e.tangentialPressure||0},e.prototype.reset=function(){this.isPrimary=!1},i(e,[{key:"pointerId",get:function(){return this.identifier}}]),e}();r.default=o},{"../core":65}],156:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.stopped=!1,this.target=null,this.currentTarget=null,this.type=null,this.data=null}return e.prototype.stopPropagation=function(){this.stopped=!0},e.prototype.reset=function(){this.stopped=!1,this.currentTarget=null,this.target=null},e}();r.default=i},{}],157:[function(e,t,r){"use strict";r.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../core")),s=c(e("./InteractionData")),u=c(e("./InteractionEvent")),d=c(e("./InteractionTrackingData")),i=c(e("eventemitter3")),n=c(e("./interactiveTarget"));function c(e){return e&&e.__esModule?e:{default:e}}a.utils.mixins.delayMixin(a.DisplayObject.prototype,n.default);var l={target:null,data:{global:null}},f=function(i){function n(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,i.call(this));return t=t||{},r.renderer=e,r.autoPreventDefault=void 0===t.autoPreventDefault||t.autoPreventDefault,r.interactionFrequency=t.interactionFrequency||10,r.mouse=new s.default,r.mouse.identifier=1,r.mouse.global.set(-999999),r.activeInteractionData={},r.activeInteractionData[1]=r.mouse,r.interactionDataPool=[],r.eventData=new u.default,r.interactionDOMElement=null,r.moveWhenInside=!1,r.eventsAdded=!1,r.mouseOverRenderer=!1,r.supportsTouchEvents="ontouchstart"in window,r.supportsPointerEvents=!!window.PointerEvent,r.onPointerUp=r.onPointerUp.bind(r),r.processPointerUp=r.processPointerUp.bind(r),r.onPointerCancel=r.onPointerCancel.bind(r),r.processPointerCancel=r.processPointerCancel.bind(r),r.onPointerDown=r.onPointerDown.bind(r),r.processPointerDown=r.processPointerDown.bind(r),r.onPointerMove=r.onPointerMove.bind(r),r.processPointerMove=r.processPointerMove.bind(r),r.onPointerOut=r.onPointerOut.bind(r),r.processPointerOverOut=r.processPointerOverOut.bind(r),r.onPointerOver=r.onPointerOver.bind(r),r.cursorStyles={default:"inherit",pointer:"pointer"},r.currentCursorMode=null,r.cursor=null,r._tempPoint=new a.Point,r.resolution=1,r.setTargetElement(r.renderer.view,r.renderer.resolution),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,i),n.prototype.hitTest=function(e,t){return l.target=null,l.data.global=e,t||(t=this.renderer._lastObjectRendered),this.processInteractive(l,t,null,!0),l.target},n.prototype.setTargetElement=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;this.removeEvents(),this.interactionDOMElement=e,this.resolution=t,this.addEvents()},n.prototype.addEvents=function(){this.interactionDOMElement&&(a.ticker.shared.add(this.update,this,a.UPDATE_PRIORITY.INTERACTION),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="none",this.interactionDOMElement.style["-ms-touch-action"]="none"):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]="none"),this.supportsPointerEvents?(window.document.addEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,!0),window.addEventListener("pointercancel",this.onPointerCancel,!0),window.addEventListener("pointerup",this.onPointerUp,!0)):(window.document.addEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,!0),window.addEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,!0)),this.eventsAdded=!0)},n.prototype.removeEvents=function(){this.interactionDOMElement&&(a.ticker.shared.remove(this.update,this),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="",this.interactionDOMElement.style["-ms-touch-action"]=""):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]=""),this.supportsPointerEvents?(window.document.removeEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,!0),window.removeEventListener("pointercancel",this.onPointerCancel,!0),window.removeEventListener("pointerup",this.onPointerUp,!0)):(window.document.removeEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,!0),window.removeEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,!0)),this.interactionDOMElement=null,this.eventsAdded=!1)},n.prototype.update=function(e){if(this._deltaTime+=e,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.interactionDOMElement))if(this.didMove)this.didMove=!1;else{for(var t in this.cursor=null,this.activeInteractionData)if(this.activeInteractionData.hasOwnProperty(t)){var r=this.activeInteractionData[t];if(r.originalEvent&&"touch"!==r.pointerType){var i=this.configureInteractionEventForDOMEvent(this.eventData,r.originalEvent,r);this.processInteractive(i,this.renderer._lastObjectRendered,this.processPointerOverOut,!0)}}this.setCursorMode(this.cursor)}},n.prototype.setCursorMode=function(e){if(e=e||"default",this.currentCursorMode!==e){this.currentCursorMode=e;var t=this.cursorStyles[e];if(t)switch(void 0===t?"undefined":o(t)){case"string":this.interactionDOMElement.style.cursor=t;break;case"function":t(e);break;case"object":Object.assign(this.interactionDOMElement.style,t)}else"string"!=typeof e||Object.prototype.hasOwnProperty.call(this.cursorStyles,e)||(this.interactionDOMElement.style.cursor=e)}},n.prototype.dispatchEvent=function(e,t,r){r.stopped||(r.currentTarget=e,r.type=t,e.emit(t,r),e[t]&&e[t](r))},n.prototype.mapPositionToPoint=function(e,t,r){var i=void 0;i=this.interactionDOMElement.parentElement?this.interactionDOMElement.getBoundingClientRect():{x:0,y:0,width:0,height:0};var n=navigator.isCocoonJS?this.resolution:1/this.resolution;e.x=(t-i.left)*(this.interactionDOMElement.width/i.width)*n,e.y=(r-i.top)*(this.interactionDOMElement.height/i.height)*n},n.prototype.processInteractive=function(e,t,r,i,n){if(!t||!t.visible)return!1;var o=e.data.global,a=!1,s=n=t.interactive||n,u=!0;if(t.hitArea?(i&&(t.worldTransform.applyInverse(o,this._tempPoint),t.hitArea.contains(this._tempPoint.x,this._tempPoint.y)?a=!0:u=i=!1),s=!1):t._mask&&i&&(t._mask.containsPoint(o)||(u=i=!1)),u&&t.interactiveChildren&&t.children)for(var c=t.children,l=c.length-1;0<=l;l--){var f=c[l],h=this.processInteractive(e,f,r,i,s);if(h){if(!f.parent)continue;s=!1,h&&(e.target&&(i=!1),a=!0)}}return n&&(i&&!e.target&&!t.hitArea&&t.containsPoint&&t.containsPoint(o)&&(a=!0),t.interactive&&(a&&!e.target&&(e.target=t),r&&r(e,t,!!a))),a},n.prototype.onPointerDown=function(e){if(!this.supportsTouchEvents||"touch"!==e.pointerType){var t=this.normalizeToPointerData(e);this.autoPreventDefault&&t[0].isNormalized&&e.preventDefault();for(var r=t.length,i=0;i<r;i++){var n=t[i],o=this.getInteractionDataForPointerId(n),a=this.configureInteractionEventForDOMEvent(this.eventData,n,o);if(a.data.originalEvent=e,this.processInteractive(a,this.renderer._lastObjectRendered,this.processPointerDown,!0),this.emit("pointerdown",a),"touch"===n.pointerType)this.emit("touchstart",a);else if("mouse"===n.pointerType||"pen"===n.pointerType){var s=2===n.button;this.emit(s?"rightdown":"mousedown",this.eventData)}}}},n.prototype.processPointerDown=function(e,t,r){var i=e.data,n=e.data.identifier;if(r)if(t.trackedPointers[n]||(t.trackedPointers[n]=new d.default(n)),this.dispatchEvent(t,"pointerdown",e),"touch"===i.pointerType)this.dispatchEvent(t,"touchstart",e);else if("mouse"===i.pointerType||"pen"===i.pointerType){var o=2===i.button;o?t.trackedPointers[n].rightDown=!0:t.trackedPointers[n].leftDown=!0,this.dispatchEvent(t,o?"rightdown":"mousedown",e)}},n.prototype.onPointerComplete=function(e,t,r){for(var i=this.normalizeToPointerData(e),n=i.length,o=e.target!==this.interactionDOMElement?"outside":"",a=0;a<n;a++){var s=i[a],u=this.getInteractionDataForPointerId(s),c=this.configureInteractionEventForDOMEvent(this.eventData,s,u);if(c.data.originalEvent=e,this.processInteractive(c,this.renderer._lastObjectRendered,r,t||!o),this.emit(t?"pointercancel":"pointerup"+o,c),"mouse"===s.pointerType||"pen"===s.pointerType){var l=2===s.button;this.emit(l?"rightup"+o:"mouseup"+o,c)}else"touch"===s.pointerType&&(this.emit(t?"touchcancel":"touchend"+o,c),this.releaseInteractionDataForPointerId(s.pointerId,u))}},n.prototype.onPointerCancel=function(e){this.supportsTouchEvents&&"touch"===e.pointerType||this.onPointerComplete(e,!0,this.processPointerCancel)},n.prototype.processPointerCancel=function(e,t){var r=e.data,i=e.data.identifier;void 0!==t.trackedPointers[i]&&(delete t.trackedPointers[i],this.dispatchEvent(t,"pointercancel",e),"touch"===r.pointerType&&this.dispatchEvent(t,"touchcancel",e))},n.prototype.onPointerUp=function(e){this.supportsTouchEvents&&"touch"===e.pointerType||this.onPointerComplete(e,!1,this.processPointerUp)},n.prototype.processPointerUp=function(e,t,r){var i=e.data,n=e.data.identifier,o=t.trackedPointers[n],a="touch"===i.pointerType,s="mouse"===i.pointerType||"pen"===i.pointerType,u=!1;if(s){var c=2===i.button,l=d.default.FLAGS,f=c?l.RIGHT_DOWN:l.LEFT_DOWN,h=void 0!==o&&o.flags&f;r?(this.dispatchEvent(t,c?"rightup":"mouseup",e),h&&(this.dispatchEvent(t,c?"rightclick":"click",e),u=!0)):h&&this.dispatchEvent(t,c?"rightupoutside":"mouseupoutside",e),o&&(c?o.rightDown=!1:o.leftDown=!1)}r?(this.dispatchEvent(t,"pointerup",e),a&&this.dispatchEvent(t,"touchend",e),o&&(s&&!u||this.dispatchEvent(t,"pointertap",e),a&&(this.dispatchEvent(t,"tap",e),o.over=!1))):o&&(this.dispatchEvent(t,"pointerupoutside",e),a&&this.dispatchEvent(t,"touchendoutside",e)),o&&o.none&&delete t.trackedPointers[n]},n.prototype.onPointerMove=function(e){if(!this.supportsTouchEvents||"touch"!==e.pointerType){var t=this.normalizeToPointerData(e);"mouse"!==t[0].pointerType&&"pen"!==t[0].pointerType||(this.didMove=!0,this.cursor=null);for(var r=t.length,i=0;i<r;i++){var n=t[i],o=this.getInteractionDataForPointerId(n),a=this.configureInteractionEventForDOMEvent(this.eventData,n,o);a.data.originalEvent=e;var s="touch"!==n.pointerType||this.moveWhenInside;this.processInteractive(a,this.renderer._lastObjectRendered,this.processPointerMove,s),this.emit("pointermove",a),"touch"===n.pointerType&&this.emit("touchmove",a),"mouse"!==n.pointerType&&"pen"!==n.pointerType||this.emit("mousemove",a)}"mouse"===t[0].pointerType&&this.setCursorMode(this.cursor)}},n.prototype.processPointerMove=function(e,t,r){var i=e.data,n="touch"===i.pointerType,o="mouse"===i.pointerType||"pen"===i.pointerType;o&&this.processPointerOverOut(e,t,r),this.moveWhenInside&&!r||(this.dispatchEvent(t,"pointermove",e),n&&this.dispatchEvent(t,"touchmove",e),o&&this.dispatchEvent(t,"mousemove",e))},n.prototype.onPointerOut=function(e){if(!this.supportsTouchEvents||"touch"!==e.pointerType){var t=this.normalizeToPointerData(e)[0];"mouse"===t.pointerType&&(this.mouseOverRenderer=!1,this.setCursorMode(null));var r=this.getInteractionDataForPointerId(t),i=this.configureInteractionEventForDOMEvent(this.eventData,t,r);i.data.originalEvent=t,this.processInteractive(i,this.renderer._lastObjectRendered,this.processPointerOverOut,!1),this.emit("pointerout",i),"mouse"===t.pointerType||"pen"===t.pointerType?this.emit("mouseout",i):this.releaseInteractionDataForPointerId(r.identifier)}},n.prototype.processPointerOverOut=function(e,t,r){var i=e.data,n=e.data.identifier,o="mouse"===i.pointerType||"pen"===i.pointerType,a=t.trackedPointers[n];r&&!a&&(a=t.trackedPointers[n]=new d.default(n)),void 0!==a&&(r&&this.mouseOverRenderer?(a.over||(a.over=!0,this.dispatchEvent(t,"pointerover",e),o&&this.dispatchEvent(t,"mouseover",e)),o&&null===this.cursor&&(this.cursor=t.cursor)):a.over&&(a.over=!1,this.dispatchEvent(t,"pointerout",this.eventData),o&&this.dispatchEvent(t,"mouseout",e),a.none&&delete t.trackedPointers[n]))},n.prototype.onPointerOver=function(e){var t=this.normalizeToPointerData(e)[0],r=this.getInteractionDataForPointerId(t),i=this.configureInteractionEventForDOMEvent(this.eventData,t,r);"mouse"===(i.data.originalEvent=t).pointerType&&(this.mouseOverRenderer=!0),this.emit("pointerover",i),"mouse"!==t.pointerType&&"pen"!==t.pointerType||this.emit("mouseover",i)},n.prototype.getInteractionDataForPointerId=function(e){var t=e.pointerId,r=void 0;return 1===t||"mouse"===e.pointerType?r=this.mouse:this.activeInteractionData[t]?r=this.activeInteractionData[t]:((r=this.interactionDataPool.pop()||new s.default).identifier=t,this.activeInteractionData[t]=r),r.copyEvent(e),r},n.prototype.releaseInteractionDataForPointerId=function(e){var t=this.activeInteractionData[e];t&&(delete this.activeInteractionData[e],t.reset(),this.interactionDataPool.push(t))},n.prototype.configureInteractionEventForDOMEvent=function(e,t,r){return e.data=r,this.mapPositionToPoint(r.global,t.clientX,t.clientY),navigator.isCocoonJS&&"touch"===t.pointerType&&(r.global.x=r.global.x/this.resolution,r.global.y=r.global.y/this.resolution),"touch"===t.pointerType&&(t.globalX=r.global.x,t.globalY=r.global.y),r.originalEvent=t,e.reset(),e},n.prototype.normalizeToPointerData=function(e){var t=[];if(this.supportsTouchEvents&&e instanceof TouchEvent)for(var r=0,i=e.changedTouches.length;r<i;r++){var n=e.changedTouches[r];void 0===n.button&&(n.button=e.touches.length?1:0),void 0===n.buttons&&(n.buttons=e.touches.length?1:0),void 0===n.isPrimary&&(n.isPrimary=1===e.touches.length&&"touchstart"===e.type),void 0===n.width&&(n.width=n.radiusX||1),void 0===n.height&&(n.height=n.radiusY||1),void 0===n.tiltX&&(n.tiltX=0),void 0===n.tiltY&&(n.tiltY=0),void 0===n.pointerType&&(n.pointerType="touch"),void 0===n.pointerId&&(n.pointerId=n.identifier||0),void 0===n.pressure&&(n.pressure=n.force||.5),void 0===n.twist&&(n.twist=0),void 0===n.tangentialPressure&&(n.tangentialPressure=0),void 0===n.layerX&&(n.layerX=n.offsetX=n.clientX),void 0===n.layerY&&(n.layerY=n.offsetY=n.clientY),n.isNormalized=!0,t.push(n)}else!(e instanceof MouseEvent)||this.supportsPointerEvents&&e instanceof window.PointerEvent||(void 0===e.isPrimary&&(e.isPrimary=!0),void 0===e.width&&(e.width=1),void 0===e.height&&(e.height=1),void 0===e.tiltX&&(e.tiltX=0),void 0===e.tiltY&&(e.tiltY=0),void 0===e.pointerType&&(e.pointerType="mouse"),void 0===e.pointerId&&(e.pointerId=1),void 0===e.pressure&&(e.pressure=.5),void 0===e.twist&&(e.twist=0),void 0===e.tangentialPressure&&(e.tangentialPressure=0),e.isNormalized=!0),t.push(e);return t},n.prototype.destroy=function(){this.removeEvents(),this.removeAllListeners(),this.renderer=null,this.mouse=null,this.eventData=null,this.interactionDOMElement=null,this.onPointerDown=null,this.processPointerDown=null,this.onPointerUp=null,this.processPointerUp=null,this.onPointerCancel=null,this.processPointerCancel=null,this.onPointerMove=null,this.processPointerMove=null,this.onPointerOut=null,this.processPointerOverOut=null,this.onPointerOver=null,this._tempPoint=null},n}(i.default);r.default=f,a.WebGLRenderer.registerPlugin("interaction",f),a.CanvasRenderer.registerPlugin("interaction",f)},{"../core":65,"./InteractionData":155,"./InteractionEvent":156,"./InteractionTrackingData":158,"./interactiveTarget":160,eventemitter3:3}],158:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();var n=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this._pointerId=e,this._flags=t.FLAGS.NONE}return t.prototype._doSet=function(e,t){this._flags=t?this._flags|e:this._flags&~e},i(t,[{key:"pointerId",get:function(){return this._pointerId}},{key:"flags",get:function(){return this._flags},set:function(e){this._flags=e}},{key:"none",get:function(){return this._flags===this.constructor.FLAGS.NONE}},{key:"over",get:function(){return 0!=(this._flags&this.constructor.FLAGS.OVER)},set:function(e){this._doSet(this.constructor.FLAGS.OVER,e)}},{key:"rightDown",get:function(){return 0!=(this._flags&this.constructor.FLAGS.RIGHT_DOWN)},set:function(e){this._doSet(this.constructor.FLAGS.RIGHT_DOWN,e)}},{key:"leftDown",get:function(){return 0!=(this._flags&this.constructor.FLAGS.LEFT_DOWN)},set:function(e){this._doSet(this.constructor.FLAGS.LEFT_DOWN,e)}}]),t}();(r.default=n).FLAGS=Object.freeze({NONE:0,OVER:1,LEFT_DOWN:2,RIGHT_DOWN:4})},{}],159:[function(e,t,r){"use strict";r.__esModule=!0;var i=e("./InteractionData");Object.defineProperty(r,"InteractionData",{enumerable:!0,get:function(){return u(i).default}});var n=e("./InteractionManager");Object.defineProperty(r,"InteractionManager",{enumerable:!0,get:function(){return u(n).default}});var o=e("./interactiveTarget");Object.defineProperty(r,"interactiveTarget",{enumerable:!0,get:function(){return u(o).default}});var a=e("./InteractionTrackingData");Object.defineProperty(r,"InteractionTrackingData",{enumerable:!0,get:function(){return u(a).default}});var s=e("./InteractionEvent");function u(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"InteractionEvent",{enumerable:!0,get:function(){return u(s).default}})},{"./InteractionData":155,"./InteractionEvent":156,"./InteractionManager":157,"./InteractionTrackingData":158,"./interactiveTarget":160}],160:[function(e,t,r){"use strict";r.__esModule=!0,r.default={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return"pointer"===this.cursor},set buttonMode(e){e?this.cursor="pointer":"pointer"===this.cursor&&(this.cursor=null)},cursor:null,get trackedPointers(){return void 0===this._trackedPointers&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0}},{}],161:[function(e,t,r){"use strict";r.__esModule=!0,r.parse=v,r.default=function(){return function(t,r){if(t.data&&t.type===p.Resource.TYPE.XML)if(0!==t.data.getElementsByTagName("page").length&&0!==t.data.getElementsByTagName("info").length&&null!==t.data.getElementsByTagName("info")[0].getAttribute("face")){var e=t.isDataUrl?"":d.dirname(t.url);t.isDataUrl&&("."===e&&(e=""),this.baseUrl&&e&&"/"===this.baseUrl.charAt(this.baseUrl.length-1)&&(e+="/")),(e=e.replace(this.baseUrl,""))&&"/"!==e.charAt(e.length-1)&&(e+="/");for(var i=t.data.getElementsByTagName("page"),n={},o=function(e){n[e.metadata.pageFile]=e.texture,Object.keys(n).length===i.length&&(v(t,n),r())},a=0;a<i.length;++a){var s=i[a].getAttribute("file"),u=e+s,c=!1;for(var l in this.resources){var f=this.resources[l];if(f.url===u){f.metadata.pageFile=s,f.texture?o(f):f.onAfterMiddleware.add(o),c=!0;break}}if(!c){var h={crossOrigin:t.crossOrigin,loadType:p.Resource.LOAD_TYPE.IMAGE,metadata:Object.assign({pageFile:s},t.metadata.imageMetadata),parentResource:t};this.add(u,h,o)}}}else r();else r()}};var d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("path")),p=e("resource-loader"),i=e("../extras");function v(e,t){e.bitmapFont=i.BitmapText.registerFont(e.data,t)}},{"../extras":141,path:8,"resource-loader":36}],162:[function(e,t,r){"use strict";r.__esModule=!0,r.shared=r.Resource=r.textureParser=r.getResourcePath=r.spritesheetParser=r.parseBitmapFontData=r.bitmapFontParser=r.Loader=void 0;var i=e("./bitmapFontParser");Object.defineProperty(r,"bitmapFontParser",{enumerable:!0,get:function(){return c(i).default}}),Object.defineProperty(r,"parseBitmapFontData",{enumerable:!0,get:function(){return i.parse}});var n=e("./spritesheetParser");Object.defineProperty(r,"spritesheetParser",{enumerable:!0,get:function(){return c(n).default}}),Object.defineProperty(r,"getResourcePath",{enumerable:!0,get:function(){return n.getResourcePath}});var o=e("./textureParser");Object.defineProperty(r,"textureParser",{enumerable:!0,get:function(){return c(o).default}});var a=e("resource-loader");Object.defineProperty(r,"Resource",{enumerable:!0,get:function(){return a.Resource}});var s=c(e("../core/Application")),u=c(e("./loader"));function c(e){return e&&e.__esModule?e:{default:e}}r.Loader=u.default;var l=new u.default;l.destroy=function(){},r.shared=l;var f=s.default.prototype;f._loader=null,Object.defineProperty(f,"loader",{get:function(){if(!this._loader){var e=this._options.sharedLoader;this._loader=e?l:new u.default}return this._loader}}),f._parentDestroy=f.destroy,f.destroy=function(e,t){this._loader&&(this._loader.destroy(),this._loader=null),this._parentDestroy(e,t)}},{"../core/Application":43,"./bitmapFontParser":161,"./loader":163,"./spritesheetParser":164,"./textureParser":165,"resource-loader":36}],163:[function(e,t,r){"use strict";r.__esModule=!0;var i=c(e("resource-loader")),n=e("resource-loader/lib/middlewares/parsing/blob"),a=c(e("eventemitter3")),o=c(e("./textureParser")),s=c(e("./spritesheetParser")),u=c(e("./bitmapFontParser"));function c(e){return e&&e.__esModule?e:{default:e}}var l=function(n){function o(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,n.call(this,e,t));a.default.call(i);for(var r=0;r<o._pixiMiddleware.length;++r)i.use(o._pixiMiddleware[r]());return i.onStart.add(function(e){return i.emit("start",e)}),i.onProgress.add(function(e,t){return i.emit("progress",e,t)}),i.onError.add(function(e,t,r){return i.emit("error",e,t,r)}),i.onLoad.add(function(e,t){return i.emit("load",e,t)}),i.onComplete.add(function(e,t){return i.emit("complete",e,t)}),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,n),o.addPixiMiddleware=function(e){o._pixiMiddleware.push(e)},o.prototype.destroy=function(){this.removeAllListeners(),this.reset()},o}(i.default);for(var f in r.default=l,a.default.prototype)l.prototype[f]=a.default.prototype[f];l._pixiMiddleware=[n.blobMiddlewareFactory,o.default,s.default,u.default];var h=i.default.Resource;h.setExtensionXhrType("fnt",h.XHR_RESPONSE_TYPE.DOCUMENT)},{"./bitmapFontParser":161,"./spritesheetParser":164,"./textureParser":165,eventemitter3:3,"resource-loader":36,"resource-loader/lib/middlewares/parsing/blob":37}],164:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(){return function(r,i){var e=r.name+"_image";if(r.data&&r.type===o.Resource.TYPE.JSON&&r.data.frames&&!this.resources[e]){var t={crossOrigin:r.crossOrigin,metadata:r.metadata.imageMetadata,parentResource:r},n=u(r,this.baseUrl);this.add(e,n,t,function(e){if(e.error)i(e.error);else{var t=new s.Spritesheet(e.texture.baseTexture,r.data,r.url);t.parse(function(){r.spritesheet=t,r.textures=t.textures,i()})}})}else i()}},r.getResourcePath=u;var i,o=e("resource-loader"),n=e("url"),a=(i=n)&&i.__esModule?i:{default:i},s=e("../core");function u(e,t){return e.isDataUrl?e.data.meta.image:a.default.resolve(e.url.replace(t,""),e.data.meta.image)}},{"../core":65,"resource-loader":36,url:38}],165:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(){return function(e,t){e.data&&e.type===n.Resource.TYPE.IMAGE&&(e.texture=a.default.fromLoader(e.data,e.url,e.name)),t()}};var i,n=e("resource-loader"),o=e("../core/textures/Texture"),a=(i=o)&&i.__esModule?i:{default:i}},{"../core/textures/Texture":115,"resource-loader":36}],166:[function(e,t,r){"use strict";r.__esModule=!0;var i,n=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),s=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../core")),o=e("../core/textures/Texture"),u=(i=o)&&i.__esModule?i:{default:i};var f=new s.Point,h=new s.Polygon,a=function(a){function l(e,t,r,i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,a.call(this));return o._texture=e||u.default.EMPTY,o.uvs=r||new Float32Array([0,0,1,0,1,1,0,1]),o.vertices=t||new Float32Array([0,0,100,0,100,100,0,100]),o.indices=i||new Uint16Array([0,1,3,2]),o.dirty=0,o.indexDirty=0,o.vertexDirty=0,o.autoUpdate=!0,o.blendMode=s.BLEND_MODES.NORMAL,o.canvasPadding=s.settings.MESH_CANVAS_PADDING,o.drawMode=n||l.DRAW_MODES.TRIANGLE_MESH,o.shader=null,o.tintRgb=new Float32Array([1,1,1]),o._glDatas={},o._uvTransform=new s.TextureMatrix(o._texture),o.uploadUvTransform=!1,o.pluginName="mesh",o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(l,a),l.prototype._renderWebGL=function(e){this.refresh(),e.setObjectRenderer(e.plugins[this.pluginName]),e.plugins[this.pluginName].render(this)},l.prototype._renderCanvas=function(e){this.refresh(),e.plugins[this.pluginName].render(this)},l.prototype._onTextureUpdate=function(){this._uvTransform.texture=this._texture,this.refresh()},l.prototype.multiplyUvs=function(){this.uploadUvTransform||this._uvTransform.multiplyUvs(this.uvs)},l.prototype.refresh=function(e){this.autoUpdate&&this.vertexDirty++,this._uvTransform.update(e)&&this._refresh()},l.prototype._refresh=function(){},l.prototype._calculateBounds=function(){this._bounds.addVertices(this.transform,this.vertices,0,this.vertices.length)},l.prototype.containsPoint=function(e){if(!this.getBounds().contains(e.x,e.y))return!1;this.worldTransform.applyInverse(e,f);for(var t=this.vertices,r=h.points,i=this.indices,n=this.indices.length,o=this.drawMode===l.DRAW_MODES.TRIANGLES?3:1,a=0;a+2<n;a+=o){var s=2*i[a],u=2*i[a+1],c=2*i[a+2];if(r[0]=t[s],r[1]=t[1+s],r[2]=t[u],r[3]=t[1+u],r[4]=t[c],r[5]=t[1+c],h.contains(f.x,f.y))return!0}return!1},l.prototype.destroy=function(e){for(var t in this._glDatas){var r=this._glDatas[t];r.destroy?r.destroy():(r.vertexBuffer&&(r.vertexBuffer.destroy(),r.vertexBuffer=null),r.indexBuffer&&(r.indexBuffer.destroy(),r.indexBuffer=null),r.uvBuffer&&(r.uvBuffer.destroy(),r.uvBuffer=null),r.vao&&(r.vao.destroy(),r.vao=null))}this._glDatas=null,a.prototype.destroy.call(this,e)},n(l,[{key:"texture",get:function(){return this._texture},set:function(e){this._texture!==e&&(this._texture=e)&&(e.baseTexture.hasLoaded?this._onTextureUpdate():e.once("update",this._onTextureUpdate,this))}},{key:"tint",get:function(){return s.utils.rgb2hex(this.tintRgb)},set:function(e){this.tintRgb=s.utils.hex2rgb(e,this.tintRgb)}}]),l}(s.Container);(r.default=a).DRAW_MODES={TRIANGLE_MESH:0,TRIANGLES:1}},{"../core":65,"../core/textures/Texture":115}],167:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),n=o(e("./Plane")),w=o(e("../core/sprites/canvas/CanvasTinter"));function o(e){return e&&e.__esModule?e:{default:e}}var a=function(a){function s(e,t,r,i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,a.call(this,e,4,4));return o._origWidth=e.orig.width,o._origHeight=e.orig.height,o._width=o._origWidth,o._height=o._origHeight,o._leftWidth=void 0!==t?t:10,o._rightWidth=void 0!==i?i:10,o._topHeight=void 0!==r?r:10,o._bottomHeight=void 0!==n?n:10,o._cachedTint=16777215,o._tintedTexture=null,o._canvasUvs=null,o.refresh(!0),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(s,a),s.prototype.updateHorizontalVertices=function(){var e=this.vertices,t=this._topHeight+this._bottomHeight,r=this._height>t?1:this._height/t;e[9]=e[11]=e[13]=e[15]=this._topHeight*r,e[17]=e[19]=e[21]=e[23]=this._height-this._bottomHeight*r,e[25]=e[27]=e[29]=e[31]=this._height},s.prototype.updateVerticalVertices=function(){var e=this.vertices,t=this._leftWidth+this._rightWidth,r=this._width>t?1:this._width/t;e[2]=e[10]=e[18]=e[26]=this._leftWidth*r,e[4]=e[12]=e[20]=e[28]=this._width-this._rightWidth*r,e[6]=e[14]=e[22]=e[30]=this._width},s.prototype._renderCanvas=function(e){var t=e.context,r=this.worldTransform,i=e.resolution,n=16777215!==this.tint,o=this._texture;n&&this._cachedTint!==this.tint&&(this._cachedTint=this.tint,this._tintedTexture=w.default.getTintedTexture(this,this.tint));var a=n?this._tintedTexture:o.baseTexture.source;this._canvasUvs||(this._canvasUvs=[0,0,0,0,0,0,0,0]);var s=this.vertices,u=this._canvasUvs,c=n?0:o.frame.x,l=n?0:o.frame.y,f=c+o.frame.width,h=l+o.frame.height;u[0]=c,u[1]=c+this._leftWidth,u[2]=f-this._rightWidth,u[3]=f,u[4]=l,u[5]=l+this._topHeight,u[6]=h-this._bottomHeight,u[7]=h;for(var d=0;d<8;d++)u[d]*=o.baseTexture.resolution;t.globalAlpha=this.worldAlpha,e.setBlendMode(this.blendMode),e.roundPixels?t.setTransform(r.a*i,r.b*i,r.c*i,r.d*i,r.tx*i|0,r.ty*i|0):t.setTransform(r.a*i,r.b*i,r.c*i,r.d*i,r.tx*i,r.ty*i);for(var p=0;p<3;p++)for(var v=0;v<3;v++){var m=2*v+8*p,b=Math.max(1,u[v+1]-u[v]),y=Math.max(1,u[p+5]-u[p+4]),g=Math.max(1,s[10+m]-s[m]),_=Math.max(1,s[11+m]-s[1+m]);t.drawImage(a,u[v],u[p+4],b,y,s[m],s[1+m],g,_)}},s.prototype._refresh=function(){a.prototype._refresh.call(this);var e=this.uvs,t=this._texture;this._origWidth=t.orig.width,this._origHeight=t.orig.height;var r=1/this._origWidth,i=1/this._origHeight;e[0]=e[8]=e[16]=e[24]=0,e[1]=e[3]=e[5]=e[7]=0,e[6]=e[14]=e[22]=e[30]=1,e[25]=e[27]=e[29]=e[31]=1,e[2]=e[10]=e[18]=e[26]=r*this._leftWidth,e[4]=e[12]=e[20]=e[28]=1-r*this._rightWidth,e[9]=e[11]=e[13]=e[15]=i*this._topHeight,e[17]=e[19]=e[21]=e[23]=1-i*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.dirty++,this.multiplyUvs()},i(s,[{key:"width",get:function(){return this._width},set:function(e){this._width=e,this._refresh()}},{key:"height",get:function(){return this._height},set:function(e){this._height=e,this._refresh()}},{key:"leftWidth",get:function(){return this._leftWidth},set:function(e){this._leftWidth=e,this._refresh()}},{key:"rightWidth",get:function(){return this._rightWidth},set:function(e){this._rightWidth=e,this._refresh()}},{key:"topHeight",get:function(){return this._topHeight},set:function(e){this._topHeight=e,this._refresh()}},{key:"bottomHeight",get:function(){return this._bottomHeight},set:function(e){this._bottomHeight=e,this._refresh()}}]),s}(n.default);r.default=a},{"../core/sprites/canvas/CanvasTinter":104,"./Plane":168}],168:[function(e,t,r){"use strict";r.__esModule=!0;var i,n=e("./Mesh"),a=(i=n)&&i.__esModule?i:{default:i};var o=function(n){function o(e,t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,n.call(this,e));return i._ready=!0,i.verticesX=t||10,i.verticesY=r||10,i.drawMode=a.default.DRAW_MODES.TRIANGLES,i.refresh(),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,n),o.prototype._refresh=function(){for(var e=this._texture,t=this.verticesX*this.verticesY,r=[],i=[],n=[],o=this.verticesX-1,a=this.verticesY-1,s=e.width/o,u=e.height/a,c=0;c<t;c++){var l=c%this.verticesX,f=c/this.verticesX|0;r.push(l*s,f*u),i.push(l/o,f/a)}for(var h=o*a,d=0;d<h;d++){var p=d%o,v=d/o|0,m=v*this.verticesX+p,b=v*this.verticesX+p+1,y=(1+v)*this.verticesX+p,g=(1+v)*this.verticesX+p+1;n.push(m,b,y),n.push(b,g,y)}this.vertices=new Float32Array(r),this.uvs=new Float32Array(i),this.colors=new Float32Array([]),this.indices=new Uint16Array(n),this.dirty++,this.indexDirty++,this.multiplyUvs()},o.prototype._onTextureUpdate=function(){a.default.prototype._onTextureUpdate.call(this),this._ready&&this.refresh()},o}(a.default);r.default=o},{"./Mesh":166}],169:[function(e,t,r){"use strict";r.__esModule=!0;var i,n=e("./Mesh");var o=function(i){function n(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,i.call(this,e));return r.points=t,r.vertices=new Float32Array(4*t.length),r.uvs=new Float32Array(4*t.length),r.colors=new Float32Array(2*t.length),r.indices=new Uint16Array(2*t.length),r.autoUpdate=!0,r.refresh(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,i),n.prototype._refresh=function(){var e=this.points;if(!(e.length<1)&&this._texture._uvs){this.vertices.length/4!==e.length&&(this.vertices=new Float32Array(4*e.length),this.uvs=new Float32Array(4*e.length),this.colors=new Float32Array(2*e.length),this.indices=new Uint16Array(2*e.length));var t=this.uvs,r=this.indices,i=this.colors;t[0]=0,t[1]=0,t[2]=0,t[3]=1,i[0]=1,i[1]=1,r[0]=0,r[1]=1;for(var n=e.length,o=1;o<n;o++){var a=4*o,s=o/(n-1);t[a]=s,t[a+1]=0,t[a+2]=s,t[a+3]=1,i[a=2*o]=1,i[a+1]=1,r[a=2*o]=a,r[a+1]=a+1}this.dirty++,this.indexDirty++,this.multiplyUvs(),this.refreshVertices()}},n.prototype.refreshVertices=function(){var e=this.points;if(!(e.length<1))for(var t=e[0],r=void 0,i=0,n=0,o=this.vertices,a=e.length,s=0;s<a;s++){var u=e[s],c=4*s;n=-((r=s<e.length-1?e[s+1]:u).x-t.x),i=r.y-t.y;var l=10*(1-s/(a-1));1<l&&(l=1);var f=Math.sqrt(i*i+n*n),h=this._texture.height/2;i/=f,n/=f,i*=h,n*=h,o[c]=u.x+i,o[1+c]=u.y+n,o[2+c]=u.x-i,o[3+c]=u.y-n,t=u}},n.prototype.updateTransform=function(){this.autoUpdate&&this.refreshVertices(),this.containerUpdateTransform()},n}(((i=n)&&i.__esModule?i:{default:i}).default);r.default=o},{"./Mesh":166}],170:[function(e,t,r){"use strict";r.__esModule=!0;var i,n=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../../core")),o=e("../Mesh"),a=(i=o)&&i.__esModule?i:{default:i};var s=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e}return t.prototype.render=function(e){var t=this.renderer,r=t.context,i=e.worldTransform,n=t.resolution;t.roundPixels?r.setTransform(i.a*n,i.b*n,i.c*n,i.d*n,i.tx*n|0,i.ty*n|0):r.setTransform(i.a*n,i.b*n,i.c*n,i.d*n,i.tx*n,i.ty*n),t.context.globalAlpha=e.worldAlpha,t.setBlendMode(e.blendMode),e.drawMode===a.default.DRAW_MODES.TRIANGLE_MESH?this._renderTriangleMesh(e):this._renderTriangles(e)},t.prototype._renderTriangleMesh=function(e){for(var t=e.vertices.length/2,r=0;r<t-2;r++){var i=2*r;this._renderDrawTriangle(e,i,2+i,4+i)}},t.prototype._renderTriangles=function(e){for(var t=e.indices,r=t.length,i=0;i<r;i+=3){var n=2*t[i],o=2*t[i+1],a=2*t[i+2];this._renderDrawTriangle(e,n,o,a)}},t.prototype._renderDrawTriangle=function(e,t,r,i){var n=this.renderer.context,o=e.uvs,a=e.vertices,s=e._texture;if(s.valid){var u=s.baseTexture,c=u.source,l=u.width,f=u.height,h=void 0,d=void 0,p=void 0,v=void 0,m=void 0,b=void 0;if(e.uploadUvTransform){var y=e._uvTransform.mapCoord;h=(o[t]*y.a+o[t+1]*y.c+y.tx)*u.width,d=(o[r]*y.a+o[r+1]*y.c+y.tx)*u.width,p=(o[i]*y.a+o[i+1]*y.c+y.tx)*u.width,v=(o[t]*y.b+o[t+1]*y.d+y.ty)*u.height,m=(o[r]*y.b+o[r+1]*y.d+y.ty)*u.height,b=(o[i]*y.b+o[i+1]*y.d+y.ty)*u.height}else h=o[t]*u.width,d=o[r]*u.width,p=o[i]*u.width,v=o[t+1]*u.height,m=o[r+1]*u.height,b=o[i+1]*u.height;var g=a[t],_=a[r],w=a[i],x=a[t+1],T=a[r+1],S=a[i+1],M=e.canvasPadding/this.renderer.resolution;if(0<M){var P=M/Math.abs(e.worldTransform.a),E=M/Math.abs(e.worldTransform.d),k=(g+_+w)/3,C=(x+T+S)/3,A=g-k,O=x-C,I=Math.sqrt(A*A+O*O);g=k+A/I*(I+P),x=C+O/I*(I+E),O=T-C,_=k+(A=_-k)/(I=Math.sqrt(A*A+O*O))*(I+P),T=C+O/I*(I+E),O=S-C,w=k+(A=w-k)/(I=Math.sqrt(A*A+O*O))*(I+P),S=C+O/I*(I+E)}n.save(),n.beginPath(),n.moveTo(g,x),n.lineTo(_,T),n.lineTo(w,S),n.closePath(),n.clip();var R=h*m+v*p+d*b-m*p-v*d-h*b,D=g*m+v*w+_*b-m*w-v*_-g*b,L=h*_+g*p+d*w-_*p-g*d-h*w,j=h*m*w+v*_*p+g*d*b-g*m*p-v*d*w-h*_*b,F=x*m+v*S+T*b-m*S-v*T-x*b,B=h*T+x*p+d*S-T*p-x*d-h*S,N=h*m*S+v*T*p+x*d*b-x*m*p-v*d*S-h*T*b;n.transform(D/R,F/R,L/R,B/R,j/R,N/R),n.drawImage(c,0,0,l*u.resolution,f*u.resolution,0,0,l,f),n.restore(),this.renderer.invalidateBlendMode()}},t.prototype.renderMeshFlat=function(e){var t=this.renderer.context,r=e.vertices,i=r.length/2;t.beginPath();for(var n=1;n<i-2;++n){var o=2*n,a=r[o],s=r[1+o],u=r[2+o],c=r[3+o],l=r[4+o],f=r[5+o];t.moveTo(a,s),t.lineTo(u,c),t.lineTo(l,f)}t.fillStyle="#FF0000",t.fill(),t.closePath()},t.prototype.destroy=function(){this.renderer=null},t}();r.default=s,n.CanvasRenderer.registerPlugin("mesh",s)},{"../../core":65,"../Mesh":166}],171:[function(e,t,r){"use strict";r.__esModule=!0;var i=e("./Mesh");Object.defineProperty(r,"Mesh",{enumerable:!0,get:function(){return c(i).default}});var n=e("./webgl/MeshRenderer");Object.defineProperty(r,"MeshRenderer",{enumerable:!0,get:function(){return c(n).default}});var o=e("./canvas/CanvasMeshRenderer");Object.defineProperty(r,"CanvasMeshRenderer",{enumerable:!0,get:function(){return c(o).default}});var a=e("./Plane");Object.defineProperty(r,"Plane",{enumerable:!0,get:function(){return c(a).default}});var s=e("./NineSlicePlane");Object.defineProperty(r,"NineSlicePlane",{enumerable:!0,get:function(){return c(s).default}});var u=e("./Rope");function c(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"Rope",{enumerable:!0,get:function(){return c(u).default}})},{"./Mesh":166,"./NineSlicePlane":167,"./Plane":168,"./Rope":169,"./canvas/CanvasMeshRenderer":170,"./webgl/MeshRenderer":172}],172:[function(e,t,r){"use strict";r.__esModule=!0;var a=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../../core")),s=i(e("pixi-gl-core")),u=i(e("../Mesh"));e("path");function i(e){return e&&e.__esModule?e:{default:e}}var c=a.Matrix.IDENTITY,n=function(r){function i(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,r.call(this,e));return t.shader=null,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),i.prototype.onContextChange=function(){var e=this.renderer.gl;this.shader=new a.Shader(e,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\nuniform vec4 uColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;\n}\n")},i.prototype.render=function(e){var t=this.renderer,r=t.gl,i=e._texture;if(i.valid){var n=e._glDatas[t.CONTEXT_UID];n||(t.bindVao(null),(n={shader:this.shader,vertexBuffer:s.default.GLBuffer.createVertexBuffer(r,e.vertices,r.STREAM_DRAW),uvBuffer:s.default.GLBuffer.createVertexBuffer(r,e.uvs,r.STREAM_DRAW),indexBuffer:s.default.GLBuffer.createIndexBuffer(r,e.indices,r.STATIC_DRAW),vao:null,dirty:e.dirty,indexDirty:e.indexDirty,vertexDirty:e.vertexDirty}).vao=new s.default.VertexArrayObject(r).addIndex(n.indexBuffer).addAttribute(n.vertexBuffer,n.shader.attributes.aVertexPosition,r.FLOAT,!1,8,0).addAttribute(n.uvBuffer,n.shader.attributes.aTextureCoord,r.FLOAT,!1,8,0),e._glDatas[t.CONTEXT_UID]=n),t.bindVao(n.vao),e.dirty!==n.dirty&&(n.dirty=e.dirty,n.uvBuffer.upload(e.uvs)),e.indexDirty!==n.indexDirty&&(n.indexDirty=e.indexDirty,n.indexBuffer.upload(e.indices)),e.vertexDirty!==n.vertexDirty&&(n.vertexDirty=e.vertexDirty,n.vertexBuffer.upload(e.vertices)),t.bindShader(n.shader),n.shader.uniforms.uSampler=t.bindTexture(i),t.state.setBlendMode(a.utils.correctBlendMode(e.blendMode,i.baseTexture.premultipliedAlpha)),n.shader.uniforms.uTransform&&(e.uploadUvTransform?n.shader.uniforms.uTransform=e._uvTransform.mapCoord.toArray(!0):n.shader.uniforms.uTransform=c.toArray(!0)),n.shader.uniforms.translationMatrix=e.worldTransform.toArray(!0),n.shader.uniforms.uColor=a.utils.premultiplyRgba(e.tintRgb,e.worldAlpha,n.shader.uniforms.uColor,i.baseTexture.premultipliedAlpha);var o=e.drawMode===u.default.DRAW_MODES.TRIANGLE_MESH?r.TRIANGLE_STRIP:r.TRIANGLES;n.vao.draw(o,e.indices.length,0)}},i}(a.ObjectRenderer);r.default=n,a.WebGLRenderer.registerPlugin("mesh",n)},{"../../core":65,"../Mesh":166,path:8,"pixi-gl-core":15}],173:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),s=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../core")),n=e("../core/utils");var o=function(o){function a(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1500,t=arguments[1],r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:16384,i=3<arguments.length&&void 0!==arguments[3]&&arguments[3];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,o.call(this));return 16384<r&&(r=16384),e<r&&(r=e),n._properties=[!1,!0,!1,!1,!1],n._maxSize=e,n._batchSize=r,n._glBuffers={},n._bufferUpdateIDs=[],n._updateID=0,n.interactiveChildren=!1,n.blendMode=s.BLEND_MODES.NORMAL,n.autoResize=i,n.roundPixels=!0,n.baseTexture=null,n.setProperties(t),n._tint=0,n.tintRgb=new Float32Array(4),n.tint=16777215,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(a,o),a.prototype.setProperties=function(e){e&&(this._properties[0]="vertices"in e||"scale"in e?!!e.vertices||!!e.scale:this._properties[0],this._properties[1]="position"in e?!!e.position:this._properties[1],this._properties[2]="rotation"in e?!!e.rotation:this._properties[2],this._properties[3]="uvs"in e?!!e.uvs:this._properties[3],this._properties[4]="tint"in e||"alpha"in e?!!e.tint||!!e.alpha:this._properties[4])},a.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},a.prototype.renderWebGL=function(e){var t=this;this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.hasLoaded||this.baseTexture.once("update",function(){return t.onChildrenChange(0)})),e.setObjectRenderer(e.plugins.particle),e.plugins.particle.render(this))},a.prototype.onChildrenChange=function(e){for(var t=Math.floor(e/this._batchSize);this._bufferUpdateIDs.length<t;)this._bufferUpdateIDs.push(0);this._bufferUpdateIDs[t]=++this._updateID},a.prototype.renderCanvas=function(e){if(this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable){var t=e.context,r=this.worldTransform,i=!0,n=0,o=0,a=0,s=0;e.setBlendMode(this.blendMode),t.globalAlpha=this.worldAlpha,this.displayObjectUpdateTransform();for(var u=0;u<this.children.length;++u){var c=this.children[u];if(c.visible){var l=c._texture.frame;if(t.globalAlpha=this.worldAlpha*c.alpha,c.rotation%(2*Math.PI)==0)i&&(t.setTransform(r.a,r.b,r.c,r.d,r.tx*e.resolution,r.ty*e.resolution),i=!1),n=c.anchor.x*(-l.width*c.scale.x)+c.position.x+.5,o=c.anchor.y*(-l.height*c.scale.y)+c.position.y+.5,a=l.width*c.scale.x,s=l.height*c.scale.y;else{i||(i=!0),c.displayObjectUpdateTransform();var f=c.worldTransform;e.roundPixels?t.setTransform(f.a,f.b,f.c,f.d,f.tx*e.resolution|0,f.ty*e.resolution|0):t.setTransform(f.a,f.b,f.c,f.d,f.tx*e.resolution,f.ty*e.resolution),n=c.anchor.x*-l.width+.5,o=c.anchor.y*-l.height+.5,a=l.width,s=l.height}var h=c._texture.baseTexture.resolution;t.drawImage(c._texture.baseTexture.source,l.x*h,l.y*h,l.width*h,l.height*h,n*e.resolution,o*e.resolution,a*e.resolution,s*e.resolution)}}}},a.prototype.destroy=function(e){if(o.prototype.destroy.call(this,e),this._buffers)for(var t=0;t<this._buffers.length;++t)this._buffers[t].destroy();this._properties=null,this._buffers=null,this._bufferUpdateIDs=null},i(a,[{key:"tint",get:function(){return this._tint},set:function(e){this._tint=e,(0,n.hex2rgb)(e,this.tintRgb)}}]),a}(s.Container);r.default=o},{"../core":65,"../core/utils":125}],174:[function(e,t,r){"use strict";r.__esModule=!0;var i=e("./ParticleContainer");Object.defineProperty(r,"ParticleContainer",{enumerable:!0,get:function(){return o(i).default}});var n=e("./webgl/ParticleRenderer");function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"ParticleRenderer",{enumerable:!0,get:function(){return o(n).default}})},{"./ParticleContainer":173,"./webgl/ParticleRenderer":176}],175:[function(e,t,r){"use strict";r.__esModule=!0;var d=i(e("pixi-gl-core")),p=i(e("../../core/utils/createIndicesForQuads"));function i(e){return e&&e.__esModule?e:{default:e}}var n=function(){function a(e,t,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),this.gl=e,this.size=i,this.dynamicProperties=[],this.staticProperties=[];for(var n=0;n<t.length;++n){var o=t[n];o={attribute:o.attribute,size:o.size,uploadFunction:o.uploadFunction,unsignedByte:o.unsignedByte,offset:o.offset},r[n]?this.dynamicProperties.push(o):this.staticProperties.push(o)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()}return a.prototype.initBuffers=function(){var e=this.gl,t=0;this.indices=(0,p.default)(this.size),this.indexBuffer=d.default.GLBuffer.createIndexBuffer(e,this.indices,e.STATIC_DRAW);for(var r=this.dynamicStride=0;r<this.dynamicProperties.length;++r){var i=this.dynamicProperties[r];i.offset=t,t+=i.size,this.dynamicStride+=i.size}var n=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(n),this.dynamicDataUint32=new Uint32Array(n),this.dynamicBuffer=d.default.GLBuffer.createVertexBuffer(e,n,e.STREAM_DRAW);for(var o=0,a=this.staticStride=0;a<this.staticProperties.length;++a){var s=this.staticProperties[a];s.offset=o,o+=s.size,this.staticStride+=s.size}var u=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(u),this.staticDataUint32=new Uint32Array(u),this.staticBuffer=d.default.GLBuffer.createVertexBuffer(e,u,e.STATIC_DRAW),this.vao=new d.default.VertexArrayObject(e).addIndex(this.indexBuffer);for(var c=0;c<this.dynamicProperties.length;++c){var l=this.dynamicProperties[c];l.unsignedByte?this.vao.addAttribute(this.dynamicBuffer,l.attribute,e.UNSIGNED_BYTE,!0,4*this.dynamicStride,4*l.offset):this.vao.addAttribute(this.dynamicBuffer,l.attribute,e.FLOAT,!1,4*this.dynamicStride,4*l.offset)}for(var f=0;f<this.staticProperties.length;++f){var h=this.staticProperties[f];h.unsignedByte?this.vao.addAttribute(this.staticBuffer,h.attribute,e.UNSIGNED_BYTE,!0,4*this.staticStride,4*h.offset):this.vao.addAttribute(this.staticBuffer,h.attribute,e.FLOAT,!1,4*this.staticStride,4*h.offset)}},a.prototype.uploadDynamic=function(e,t,r){for(var i=0;i<this.dynamicProperties.length;i++){var n=this.dynamicProperties[i];n.uploadFunction(e,t,r,n.unsignedByte?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,n.offset)}this.dynamicBuffer.upload()},a.prototype.uploadStatic=function(e,t,r){for(var i=0;i<this.staticProperties.length;i++){var n=this.staticProperties[i];n.uploadFunction(e,t,r,n.unsignedByte?this.staticDataUint32:this.staticData,this.staticStride,n.offset)}this.staticBuffer.upload()},a.prototype.destroy=function(){this.dynamicProperties=null,this.dynamicBuffer.destroy(),this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer.destroy(),this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null},a}();r.default=n},{"../../core/utils/createIndicesForQuads":123,"pixi-gl-core":15}],176:[function(e,t,r){"use strict";r.__esModule=!0;var m=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../../core")),n=i(e("./ParticleShader")),s=i(e("./ParticleBuffer")),f=e("../../core/utils");function i(e){return e&&e.__esModule?e:{default:e}}var o=function(r){function i(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,r.call(this,e));return t.shader=null,t.indexBuffer=null,t.properties=null,t.tempMatrix=new m.Matrix,t.CONTEXT_UID=0,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),i.prototype.onContextChange=function(){var e=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.shader=new n.default(e),this.properties=[{attribute:this.shader.attributes.aVertexPosition,size:2,uploadFunction:this.uploadVertices,offset:0},{attribute:this.shader.attributes.aPositionCoord,size:2,uploadFunction:this.uploadPosition,offset:0},{attribute:this.shader.attributes.aRotation,size:1,uploadFunction:this.uploadRotation,offset:0},{attribute:this.shader.attributes.aTextureCoord,size:2,uploadFunction:this.uploadUvs,offset:0},{attribute:this.shader.attributes.aColor,size:1,unsignedByte:!0,uploadFunction:this.uploadTint,offset:0}]},i.prototype.start=function(){this.renderer.bindShader(this.shader)},i.prototype.render=function(e){var t=e.children,r=e._maxSize,i=e._batchSize,n=this.renderer,o=t.length;if(0!==o){r<o&&(o=r);var a=e._glBuffers[n.CONTEXT_UID];a||(a=e._glBuffers[n.CONTEXT_UID]=this.generateBuffers(e));var s=t[0]._texture.baseTexture;this.renderer.setBlendMode(m.utils.correctBlendMode(e.blendMode,s.premultipliedAlpha));var u=n.gl,c=e.worldTransform.copy(this.tempMatrix);c.prepend(n._activeRenderTarget.projectionMatrix),this.shader.uniforms.projectionMatrix=c.toArray(!0),this.shader.uniforms.uColor=m.utils.premultiplyRgba(e.tintRgb,e.worldAlpha,this.shader.uniforms.uColor,s.premultipliedAlpha),this.shader.uniforms.uSampler=n.bindTexture(s);for(var l=!1,f=0,h=0;f<o;f+=i,h+=1){var d=o-f;if(i<d&&(d=i),h>=a.length){if(!e.autoResize)break;a.push(this._generateOneMoreBuffer(e))}var p=a[h];p.uploadDynamic(t,f,d);var v=e._bufferUpdateIDs[h]||0;(l=l||p._updateID<v)&&(p._updateID=e._updateID,p.uploadStatic(t,f,d)),n.bindVao(p.vao),p.vao.draw(u.TRIANGLES,6*d)}}},i.prototype.generateBuffers=function(e){for(var t=this.renderer.gl,r=[],i=e._maxSize,n=e._batchSize,o=e._properties,a=0;a<i;a+=n)r.push(new s.default(t,this.properties,o,n));return r},i.prototype._generateOneMoreBuffer=function(e){var t=this.renderer.gl,r=e._batchSize,i=e._properties;return new s.default(t,this.properties,i,r)},i.prototype.uploadVertices=function(e,t,r,i,n,o){for(var a=0,s=0,u=0,c=0,l=0;l<r;++l){var f=e[t+l],h=f._texture,d=f.scale.x,p=f.scale.y,v=h.trim,m=h.orig;v?(a=(s=v.x-f.anchor.x*m.width)+v.width,u=(c=v.y-f.anchor.y*m.height)+v.height):(a=m.width*(1-f.anchor.x),s=m.width*-f.anchor.x,u=m.height*(1-f.anchor.y),c=m.height*-f.anchor.y),i[o]=s*d,i[o+1]=c*p,i[o+n]=a*d,i[o+n+1]=c*p,i[o+2*n]=a*d,i[o+2*n+1]=u*p,i[o+3*n]=s*d,i[o+3*n+1]=u*p,o+=4*n}},i.prototype.uploadPosition=function(e,t,r,i,n,o){for(var a=0;a<r;a++){var s=e[t+a].position;i[o]=s.x,i[o+1]=s.y,i[o+n]=s.x,i[o+n+1]=s.y,i[o+2*n]=s.x,i[o+2*n+1]=s.y,i[o+3*n]=s.x,i[o+3*n+1]=s.y,o+=4*n}},i.prototype.uploadRotation=function(e,t,r,i,n,o){for(var a=0;a<r;a++){var s=e[t+a].rotation;i[o]=s,i[o+n]=s,i[o+2*n]=s,i[o+3*n]=s,o+=4*n}},i.prototype.uploadUvs=function(e,t,r,i,n,o){for(var a=0;a<r;++a){var s=e[t+a]._texture._uvs;s?(i[o]=s.x0,i[o+1]=s.y0,i[o+n]=s.x1,i[o+n+1]=s.y1,i[o+2*n]=s.x2,i[o+2*n+1]=s.y2,i[o+3*n]=s.x3,i[o+3*n+1]=s.y3):(i[o]=0,i[o+1]=0,i[o+n]=0,i[o+n+1]=0,i[o+2*n]=0,i[o+2*n+1]=0,i[o+3*n]=0,i[o+3*n+1]=0),o+=4*n}},i.prototype.uploadTint=function(e,t,r,i,n,o){for(var a=0;a<r;++a){var s=e[t+a],u=s._texture.baseTexture.premultipliedAlpha,c=s.alpha,l=c<1&&u?(0,f.premultiplyTint)(s._tintRGB,c):s._tintRGB+(255*c<<24);i[o]=l,i[o+n]=l,i[o+2*n]=l,i[o+3*n]=l,o+=4*n}},i.prototype.destroy=function(){this.renderer.gl&&this.renderer.gl.deleteBuffer(this.indexBuffer),r.prototype.destroy.call(this),this.shader.destroy(),this.indices=null,this.tempMatrix=null},i}(m.ObjectRenderer);r.default=o,m.WebGLRenderer.registerPlugin("particle",o)},{"../../core":65,"../../core/utils":125,"./ParticleBuffer":175,"./ParticleShader":177}],177:[function(e,t,r){"use strict";r.__esModule=!0;var i,n=e("../../core/Shader");var o=function(t){function r(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,t.call(this,e,["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","attribute vec4 aColor;","attribute vec2 aPositionCoord;","attribute float aRotation;","uniform mat3 projectionMatrix;","uniform vec4 uColor;","varying vec2 vTextureCoord;","varying vec4 vColor;","void main(void){"," float x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);"," float y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);"," vec2 v = vec2(x, y);"," v = v + aPositionCoord;"," gl_Position = vec4((projectionMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);"," vTextureCoord = aTextureCoord;"," vColor = aColor * uColor;","}"].join("\n"),["varying vec2 vTextureCoord;","varying vec4 vColor;","uniform sampler2D uSampler;","void main(void){"," vec4 color = texture2D(uSampler, vTextureCoord) * vColor;"," gl_FragColor = color;","}"].join("\n")))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,t),r}(((i=n)&&i.__esModule?i:{default:i}).default);r.default=o},{"../../core/Shader":44}],178:[function(e,t,r){"use strict";Math.sign||(Math.sign=function(e){return 0===(e=Number(e))||isNaN(e)?e:0<e?1:-1})},{}],179:[function(e,t,r){"use strict";Number.isInteger||(Number.isInteger=function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e})},{}],180:[function(e,t,r){"use strict";var i,n=e("object-assign"),o=(i=n)&&i.__esModule?i:{default:i};Object.assign||(Object.assign=o.default)},{"object-assign":6}],181:[function(e,t,r){"use strict";e("./Object.assign"),e("./requestAnimationFrame"),e("./Math.sign"),e("./Number.isInteger"),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array)},{"./Math.sign":178,"./Number.isInteger":179,"./Object.assign":180,"./requestAnimationFrame":182}],182:[function(e,t,r){(function(e){"use strict";if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!e.performance||!e.performance.now){var t=Date.now();e.performance||(e.performance={}),e.performance.now=function(){return Date.now()-t}}for(var i=Date.now(),r=["ms","moz","webkit","o"],n=0;n<r.length&&!e.requestAnimationFrame;++n){var o=r[n];e.requestAnimationFrame=e[o+"RequestAnimationFrame"],e.cancelAnimationFrame=e[o+"CancelAnimationFrame"]||e[o+"CancelRequestAnimationFrame"]}e.requestAnimationFrame||(e.requestAnimationFrame=function(e){if("function"!=typeof e)throw new TypeError(e+"is not a function");var t=Date.now(),r=16+i-t;return r<0&&(r=0),i=t,setTimeout(function(){i=Date.now(),e(performance.now())},r)}),e.cancelAnimationFrame||(e.cancelAnimationFrame=function(e){return clearTimeout(e)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],183:[function(e,t,r){"use strict";r.__esModule=!0;var i,s=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../core")),n=e("./limiters/CountLimiter"),o=(i=n)&&i.__esModule?i:{default:i};var u=s.ticker.shared;s.settings.UPLOADS_PER_FRAME=4;var a=function(){function r(e){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),this.limiter=new o.default(s.settings.UPLOADS_PER_FRAME),this.renderer=e,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=function(){t.queue&&t.prepareItems()},this.registerFindHook(p),this.registerFindHook(v),this.registerFindHook(c),this.registerFindHook(l),this.registerFindHook(f),this.registerUploadHook(h),this.registerUploadHook(d)}return r.prototype.upload=function(e,t){"function"==typeof e&&(t=e,e=null),e&&this.add(e),this.queue.length?(t&&this.completes.push(t),this.ticking||(this.ticking=!0,u.addOnce(this.tick,this,s.UPDATE_PRIORITY.UTILITY))):t&&t()},r.prototype.tick=function(){setTimeout(this.delayedTick,0)},r.prototype.prepareItems=function(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){var e=this.queue[0],t=!1;if(e&&!e._destroyed)for(var r=0,i=this.uploadHooks.length;r<i;r++)if(this.uploadHooks[r](this.uploadHookHelper,e)){this.queue.shift(),t=!0;break}t||this.queue.shift()}if(this.queue.length)u.addOnce(this.tick,this,s.UPDATE_PRIORITY.UTILITY);else{this.ticking=!1;for(var n=this.completes.slice(0),o=this.completes.length=0,a=n.length;o<a;o++)n[o]()}},r.prototype.registerFindHook=function(e){return e&&this.addHooks.push(e),this},r.prototype.registerUploadHook=function(e){return e&&this.uploadHooks.push(e),this},r.prototype.add=function(e){for(var t=0,r=this.addHooks.length;t<r&&!this.addHooks[t](e,this.queue);t++);if(e instanceof s.Container)for(var i=e.children.length-1;0<=i;i--)this.add(e.children[i]);return this},r.prototype.destroy=function(){this.ticking&&u.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null},r}();function c(e,t){var r=!1;if(e&&e._textures&&e._textures.length)for(var i=0;i<e._textures.length;i++)if(e._textures[i]instanceof s.Texture){var n=e._textures[i].baseTexture;-1===t.indexOf(n)&&(t.push(n),r=!0)}return r}function l(e,t){return e instanceof s.BaseTexture&&(-1===t.indexOf(e)&&t.push(e),!0)}function f(e,t){if(e._texture&&e._texture instanceof s.Texture){var r=e._texture.baseTexture;return-1===t.indexOf(r)&&t.push(r),!0}return!1}function h(e,t){return t instanceof s.Text&&(t.updateText(!0),!0)}function d(e,t){if(t instanceof s.TextStyle){var r=t.toFontString();return s.TextMetrics.measureFont(r),!0}return!1}function p(e,t){if(e instanceof s.Text){-1===t.indexOf(e.style)&&t.push(e.style),-1===t.indexOf(e)&&t.push(e);var r=e._texture.baseTexture;return-1===t.indexOf(r)&&t.push(r),!0}return!1}function v(e,t){return e instanceof s.TextStyle&&(-1===t.indexOf(e)&&t.push(e),!0)}r.default=a},{"../core":65,"./limiters/CountLimiter":186}],184:[function(e,t,r){"use strict";r.__esModule=!0;var i,o=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../../core")),n=e("../BasePrepare"),a=(i=n)&&i.__esModule?i:{default:i};var s=function(r){function i(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,r.call(this,e));return(t.uploadHookHelper=t).canvas=document.createElement("canvas"),t.canvas.width=16,t.canvas.height=16,t.ctx=t.canvas.getContext("2d"),t.registerUploadHook(u),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),i.prototype.destroy=function(){r.prototype.destroy.call(this),this.ctx=null,this.canvas=null},i}(a.default);function u(e,t){if(t instanceof o.BaseTexture){var r=t.source,i=0===r.width?e.canvas.width:Math.min(e.canvas.width,r.width),n=0===r.height?e.canvas.height:Math.min(e.canvas.height,r.height);return e.ctx.drawImage(r,0,0,i,n,0,0,e.canvas.width,e.canvas.height),!0}return!1}r.default=s,o.CanvasRenderer.registerPlugin("prepare",s)},{"../../core":65,"../BasePrepare":183}],185:[function(e,t,r){"use strict";r.__esModule=!0;var i=e("./webgl/WebGLPrepare");Object.defineProperty(r,"webgl",{enumerable:!0,get:function(){return u(i).default}});var n=e("./canvas/CanvasPrepare");Object.defineProperty(r,"canvas",{enumerable:!0,get:function(){return u(n).default}});var o=e("./BasePrepare");Object.defineProperty(r,"BasePrepare",{enumerable:!0,get:function(){return u(o).default}});var a=e("./limiters/CountLimiter");Object.defineProperty(r,"CountLimiter",{enumerable:!0,get:function(){return u(a).default}});var s=e("./limiters/TimeLimiter");function u(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"TimeLimiter",{enumerable:!0,get:function(){return u(s).default}})},{"./BasePrepare":183,"./canvas/CanvasPrepare":184,"./limiters/CountLimiter":186,"./limiters/TimeLimiter":187,"./webgl/WebGLPrepare":188}],186:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.maxItemsPerFrame=e,this.itemsLeft=0}return t.prototype.beginFrame=function(){this.itemsLeft=this.maxItemsPerFrame},t.prototype.allowedToUpload=function(){return 0<this.itemsLeft--},t}();r.default=i},{}],187:[function(e,t,r){"use strict";r.__esModule=!0;var i=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.maxMilliseconds=e,this.frameStart=0}return t.prototype.beginFrame=function(){this.frameStart=Date.now()},t.prototype.allowedToUpload=function(){return Date.now()-this.frameStart<this.maxMilliseconds},t}();r.default=i},{}],188:[function(e,t,r){"use strict";r.__esModule=!0;var i,n=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("../../core")),o=e("../BasePrepare");var a=function(r){function i(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,r.call(this,e));return t.uploadHookHelper=t.renderer,t.registerFindHook(c),t.registerUploadHook(s),t.registerUploadHook(u),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),i}(((i=o)&&i.__esModule?i:{default:i}).default);function s(e,t){return t instanceof n.BaseTexture&&(t._glTextures[e.CONTEXT_UID]||e.textureManager.updateTexture(t),!0)}function u(e,t){return t instanceof n.Graphics&&((t.dirty||t.clearDirty||!t._webGL[e.plugins.graphics.CONTEXT_UID])&&e.plugins.graphics.updateGraphics(t),!0)}function c(e,t){return e instanceof n.Graphics&&(t.push(e),!0)}r.default=a,n.WebGLRenderer.registerPlugin("prepare",a)},{"../../core":65,"../BasePrepare":183}],189:[function(b,e,y){(function(e){"use strict";y.__esModule=!0,y.loader=y.prepare=y.particles=y.mesh=y.loaders=y.interaction=y.filters=y.extras=y.extract=y.accessibility=void 0;var t=b("./polyfill");Object.keys(t).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(y,e,{enumerable:!0,get:function(){return t[e]}})});var r=b("./core");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(y,e,{enumerable:!0,get:function(){return r[e]}})});var i,n=b("./deprecation"),o=(i=n)&&i.__esModule?i:{default:i},a=v(b("./accessibility")),s=v(b("./extract")),u=v(b("./extras")),c=v(b("./filters")),l=v(b("./interaction")),f=v(b("./loaders")),h=v(b("./mesh")),d=v(b("./particles")),p=v(b("./prepare"));function v(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}r.utils.mixins.performMixins();var m=f.shared||null;y.accessibility=a,y.extract=s,y.extras=u,y.filters=c,y.interaction=l,y.loaders=f,y.mesh=h,y.particles=d,y.prepare=p,y.loader=m,"function"==typeof o.default&&(0,o.default)(y),e.PIXI=y}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./accessibility":42,"./core":65,"./deprecation":131,"./extract":133,"./extras":141,"./filters":153,"./interaction":159,"./loaders":162,"./mesh":171,"./particles":174,"./polyfill":181,"./prepare":185}]},{},[189])(189)}),e||(e=eval("(function() { try { return Module || {} } catch(e) { return {} } })()"));var aa={},k;for(k in e)e.hasOwnProperty(k)&&(aa[k]=e[k]);var ba="object"==typeof window,ca="function"==typeof importScripts,da="object"==typeof process&&"function"==typeof require&&!ba&&!ca,ea=!ba&&!da&&!ca;if(da){e.print||(e.print=function(e){process.stdout.write(e+"\n")}),e.printErr||(e.printErr=function(e){process.stderr.write(e+"\n")});var fa=require("fs"),ga=require("path");e.read=function(e,t){e=ga.normalize(e);var r=fa.readFileSync(e);return r||e==ga.resolve(e)||(e=path.join(__dirname,"..","src",e),r=fa.readFileSync(e)),r&&!t&&(r=r.toString()),r},e.readBinary=function(t){return(t=e.read(t,!0)).buffer||(t=new Uint8Array(t)),assert(t.buffer),t},e.load=function(e){ha(read(e))},e.thisProgram||(e.thisProgram=1<process.argv.length?process.argv[1].replace(/\\/g,"/"):"unknown-program"),e.arguments=process.argv.slice(2),"undefined"!=typeof module&&(module.exports=e),process.on("uncaughtException",function(e){if(!(e instanceof ia))throw e}),e.inspect=function(){return"[Emscripten Module object]"}}else if(ea)e.print||(e.print=print),"undefined"!=typeof printErr&&(e.printErr=printErr),e.read="undefined"!=typeof read?read:function(){throw"no read() available (jsc?)"},e.readBinary=function(e){return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(assert("object"==typeof(e=read(e,"binary"))),e)},"undefined"!=typeof scriptArgs?e.arguments=scriptArgs:"undefined"!=typeof arguments&&(e.arguments=arguments),eval("if (typeof gc === 'function' && gc.toString().indexOf('[native code]') > 0) var gc = undefined");else{if(!ba&&!ca)throw"Unknown runtime environment. Where are we?";e.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},"undefined"!=typeof arguments&&(e.arguments=arguments),"undefined"!=typeof console?(e.print||(e.print=function(e){console.log(e)}),e.printErr||(e.printErr=function(e){console.log(e)})):e.print||(e.print=function(){}),ca&&(e.load=importScripts),void 0===e.setWindowTitle&&(e.setWindowTitle=function(e){document.title=e})}function ha(e){eval.call(null,e)}for(k in!e.load&&e.read&&(e.load=function(t){ha(e.read(t))}),e.print||(e.print=function(){}),e.printErr||(e.printErr=e.print),e.arguments||(e.arguments=[]),e.thisProgram||(e.thisProgram="./this.program"),e.print=e.print,e.W=e.printErr,e.preRun=[],e.postRun=[],aa)aa.hasOwnProperty(k)&&(e[k]=aa[k]);var n={rb:function(e){ka=e},fb:function(){return ka},ua:function(){return m},ba:function(e){m=e},Ka:function(e){switch(e){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:return"*"===e[e.length-1]?n.J:"i"===e[0]?(assert(0==(e=parseInt(e.substr(1)))%8),e/8):0}},eb:function(e){return Math.max(n.Ka(e),n.J)},ud:16,Qd:function(e,t){return"double"===t||"i64"===t?7&e&&(assert(4==(7&e)),e+=4):assert(0==(3&e)),e},Ed:function(e,t,r){return r||"i64"!=e&&"double"!=e?e?Math.min(t||(e?n.eb(e):0),n.J):Math.min(t,8):8},L:function(t,r,i){return i&&i.length?(i.splice||(i=Array.prototype.slice.call(i)),i.splice(0,0,r),e["dynCall_"+t].apply(null,i)):e["dynCall_"+t].call(null,r)},Z:[],Xa:function(e){for(var t=0;t<n.Z.length;t++)if(!n.Z[t])return n.Z[t]=e,2*(1+t);throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."},nb:function(e){n.Z[(e-2)/2]=null},O:function(t){n.O.ta||(n.O.ta={}),n.O.ta[t]||(n.O.ta[t]=1,e.W(t))},ma:{},Hd:function(e,t){assert(t),n.ma[t]||(n.ma[t]={});var r=n.ma[t];return r[e]||(r[e]=function(){return n.L(t,e,arguments)}),r[e]},Fd:function(){throw"You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work"},aa:function(e){var t=m;return m=(m=m+e|0)+15&-16,t},Ra:function(e){var t=la;return la=(la=la+e|0)+15&-16,t},R:function(e){var i=r;return t<=(r=(r=r+e|0)+15&-16)&&!ma()?(r=i,0):i},ja:function(e,t){return Math.ceil(e/(t||16))*(t||16)},Nd:function(e,t,r){return r?+(e>>>0)+4294967296*+(t>>>0):+(e>>>0)+4294967296*+(0|t)},Ua:8,J:4,vd:0};e.Runtime=n,n.addFunction=n.Xa,n.removeFunction=n.nb;var na=!1,oa,pa,ka,ra,sa;function assert(e,t){e||x("Assertion failed: "+t)}function qa(a){var b=e["_"+a];if(!b)try{b=eval("_"+a)}catch(e){}return assert(b,"Cannot call unknown function "+a+" (perhaps LLVM optimizations or closure removed it?)"),b}function wa(e,t,r){switch("*"===(r=r||"i8").charAt(r.length-1)&&(r="i32"),r){case"i1":case"i8":y[e>>0]=t;break;case"i16":z[e>>1]=t;break;case"i32":C[e>>2]=t;break;case"i64":pa=[t>>>0,(oa=t,1<=+xa(oa)?0<oa?(0|ya(+za(oa/4294967296),4294967295))>>>0:~~+Aa((oa-+(~~oa>>>0))/4294967296)>>>0:0)],C[e>>2]=pa[0],C[e+4>>2]=pa[1];break;case"float":Ba[e>>2]=t;break;case"double":Ca[e>>3]=t;break;default:x("invalid type for setValue: "+r)}}function Da(e,t){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return y[e>>0];case"i16":return z[e>>1];case"i32":case"i64":return C[e>>2];case"float":return Ba[e>>2];case"double":return Ca[e>>3];default:x("invalid type for setValue: "+t)}return null}function D(e,t,r,i){var o,a;a="number"==typeof e?(o=!0,e):(o=!1,e.length);var s,u,c="string"==typeof t?t:null;if(r=4==r?i:[Ea,n.aa,n.Ra,n.R][void 0===r?2:r](Math.max(a,c?1:t.length)),o){for(assert(0==(3&(i=r))),e=r+(-4&a);i<e;i+=4)C[i>>2]=0;for(e=r+a;i<e;)y[i++>>0]=0;return r}if("i8"===c)return e.subarray||e.slice?E.set(e,r):E.set(new Uint8Array(e),r),r;for(i=0;i<a;){var l=e[i];"function"==typeof l&&(l=n.Id(l)),0===(o=c||t[i])?i++:("i64"==o&&(o="i32"),wa(r+i,l,o),u!==o&&(s=n.Ka(o),u=o),i+=s)}return r}function va(t,r){if(0===r||!t)return"";for(var i,n=0,o=0;(n|=i=E[t+o>>0],0!=i||r)&&(o++,!r||o!=r););if(r||(r=o),i="",n<128){for(;0<r;)n=String.fromCharCode.apply(String,E.subarray(t,t+Math.min(r,1024))),i=i?i+n:n,t+=1024,r-=1024;return i}return e.UTF8ToString(t)}function Ja(e,t){for(var r,i,n,o,a,s="";;){if(!(r=e[t++]))return s;128&r?(i=63&e[t++],192==(224&r)?s+=String.fromCharCode((31&r)<<6|i):(n=63&e[t++],(r=224==(240&r)?(15&r)<<12|i<<6|n:(o=63&e[t++],240==(248&r)?(7&r)<<18|i<<12|n<<6|o:(a=63&e[t++],248==(252&r)?(3&r)<<24|i<<18|n<<12|o<<6|a:(1&r)<<30|i<<24|n<<18|o<<12|a<<6|63&e[t++])))<65536?s+=String.fromCharCode(r):(r-=65536,s+=String.fromCharCode(55296|r>>10,56320|1023&r)))):s+=String.fromCharCode(r)}}function Ka(e,t,r,i){if(!(0<i))return 0;var n=r;i=r+i-1;for(var o=0;o<e.length;++o){var a=e.charCodeAt(o);if(55296<=a&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),a<=127){if(i<=r)break;t[r++]=a}else{if(a<=2047){if(i<=r+1)break;t[r++]=192|a>>6}else{if(a<=65535){if(i<=r+2)break;t[r++]=224|a>>12}else{if(a<=2097151){if(i<=r+3)break;t[r++]=240|a>>18}else{if(a<=67108863){if(i<=r+4)break;t[r++]=248|a>>24}else{if(i<=r+5)break;t[r++]=252|a>>30,t[r++]=128|a>>24&63}t[r++]=128|a>>18&63}t[r++]=128|a>>12&63}t[r++]=128|a>>6&63}t[r++]=128|63&a}}return t[r]=0,r-n}function La(e){for(var t=0,r=0;r<e.length;++r){var i=e.charCodeAt(r);55296<=i&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++r)),i<=127?++t:t=i<=2047?t+2:i<=65535?t+3:i<=2097151?t+4:i<=67108863?t+5:t+6}return t}function Ma(l){var t=!!e.___cxa_demangle;if(t)try{var r=Ea(l.length);ua(l.substr(1),r);var i=Ea(4),o=e.___cxa_demangle(r,0,0,i);if(0===Da(i,"i32")&&o)return va(o)}catch(e){}finally{r&&Na(r),i&&Na(i),o&&Na(o)}var f=3,h={v:"void",b:"bool",c:"char",s:"short",i:"int",l:"long",f:"float",d:"double",w:"wchar_t",a:"signed char",h:"unsigned char",t:"unsigned short",j:"unsigned int",m:"unsigned long",x:"long long",y:"unsigned long long",z:"..."},d=[],p=!0;r=l;try{if("Object._main"==l||"_main"==l)return"main()";if("number"==typeof l&&(l=va(l)),"_"!==l[0]||"_"!==l[1]||"Z"!==l[2])return l;switch(l[3]){case"n":return"operator new()";case"d":return"operator delete()"}r=function e(t,r,i){r=r||1/0;var n,o="",a=[];if("N"===l[f]){for("K"===l[++f]&&f++,n=[];"E"!==l[f];)if("S"===l[f]){f++;var s=l.indexOf("_",f);n.push(d[l.substring(f,s)||0]||"?"),f=s+1}else if("C"===l[f])n.push(n[n.length-1]),f+=2;else{var u=(s=parseInt(l.substr(f))).toString().length;if(!s||!u){f--;break}var c=l.substr(f+u,s);n.push(c),d.push(c),f+=u+s}if(f++,n=n.join("::"),0==--r)return t?[n]:n}else("K"===l[f]||p&&"L"===l[f])&&f++,(s=parseInt(l.substr(f)))&&(u=s.toString().length,n=l.substr(f+u,s),f+=u+s);p=!1,"I"===l[f]?(f++,s=e(!0),o+=(u=e(!0,1,!0))[0]+" "+n+"<"+s.join(", ")+">"):o=n;e:for(;f<l.length&&0<r--;)if(n=l[f++],n in h)a.push(h[n]);else switch(n){case"P":a.push(e(!0,1,!0)[0]+"*");break;case"R":a.push(e(!0,1,!0)[0]+"&");break;case"L":f++,s=l.indexOf("E",f)-f,a.push(l.substr(f,s)),f+=s+2;break;case"A":if(s=parseInt(l.substr(f)),f+=s.toString().length,"_"!==l[f])throw"?";f++,a.push(e(!0,1,!0)[0]+" ["+s+"]");break;case"E":break e;default:o+="?"+n;break e}return i||1!==a.length||"void"!==a[0]||(a=[]),t?(o&&a.push(o+"?"),a):o+"("+a.join(", ")+")"}()}catch(e){r+="?"}return 0<=r.indexOf("?")&&!t&&n.O("warning: a problem occurred in builtin C++ name demangling; build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),r}function Oa(){return Pa().replace(/__Z[\w\d_]+/g,function(e){var t=Ma(e);return e===t?e:e+" ["+t+"]"})}function Pa(){var t=Error();if(!t.stack){try{throw Error(0)}catch(e){t=e}if(!t.stack)return"(no stack trace available)"}return t.stack.toString()}function Qa(e){return 0<e%4096&&(e+=4096-e%4096),e}!function(){function a(e){return{arguments:(e=e.toString().match(d).slice(1))[0],body:e[1],returnValue:e[2]}}var b={stackSave:function(){n.ua()},stackRestore:function(){n.ba()},arrayToC:function(e){var t=n.aa(e.length);return ta(e,t),t},stringToC:function(e){var t=0;return null!=e&&0!==e&&ua(e,t=n.aa(1+(e.length<<2))),t}},c={string:b.stringToC,array:b.arrayToC};sa=function(e,t,r,i,o){e=qa(e);var a=[],s=0;if(i)for(var u=0;u<i.length;u++){var l=c[r[u]];l?(0===s&&(s=n.ua()),a[u]=l(i[u])):a[u]=i[u]}if(r=e.apply(null,a),"string"===t&&(r=va(r)),0!==s){if(o&&o.async)return void EmterpreterAsync.yd.push(function(){n.ba(s)});n.ba(s)}return r};var d=/^function\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/,f={},g;for(g in b)b.hasOwnProperty(g)&&(f[g]=a(b[g]));ra=function(b,c,d){d=d||[];var g=qa(b);b=d.every(function(e){return"number"===e});var q="string"!==c;if(q&&b)return g;var v=d.map(function(e,t){return"$"+t});c="(function("+v.join(",")+") {";var B=d.length;if(!b){c+="var stack = "+f.stackSave.body+";";for(var G=0;G<B;G++){var O=v[G],ja=d[G];"number"!==ja&&(ja=f[ja+"ToC"],c+="var "+ja.arguments+" = "+O+";",c+=ja.body+";",c+=O+"="+ja.returnValue+";")}}return d=a(function(){return g}).returnValue,c+="var ret = "+d+"("+v.join(",")+");",q||(d=a(function(){return va}).returnValue,c+="ret = "+d+"(ret);"),b||(c+=f.stackRestore.body.replace("()","(stack)")+";"),eval(c+"return ret})")}}(),e.ccall=sa,e.cwrap=ra,e.setValue=wa,e.getValue=Da,e.ALLOC_NORMAL=0,e.ALLOC_STACK=1,e.ALLOC_STATIC=2,e.ALLOC_DYNAMIC=3,e.ALLOC_NONE=4,e.allocate=D,e.getMemory=function(e){return Fa?void 0!==Ga&&!Ga.p||!Ha?n.R(e):Ea(e):n.Ra(e)},e.Pointer_stringify=va,e.AsciiToString=function(e){for(var t="";;){var r=y[e++>>0];if(!r)return t;t+=String.fromCharCode(r)}},e.stringToAscii=function(e,t){return Ia(e,t,!1)},e.UTF8ArrayToString=Ja,e.UTF8ToString=function(e){return Ja(E,e)},e.stringToUTF8Array=Ka,e.stringToUTF8=function(e,t,r){return Ka(e,E,t,r)},e.lengthBytesUTF8=La,e.UTF16ToString=function(e){for(var t=0,r="";;){var i=z[e+2*t>>1];if(0==i)return r;++t,r+=String.fromCharCode(i)}},e.stringToUTF16=function(e,t,r){if(void 0===r&&(r=2147483647),r<2)return 0;var i=t;r=(r-=2)<2*e.length?r/2:e.length;for(var n=0;n<r;++n)z[t>>1]=e.charCodeAt(n),t+=2;return z[t>>1]=0,t-i},e.lengthBytesUTF16=function(e){return 2*e.length},e.UTF32ToString=function(e){for(var t=0,r="";;){var i=C[e+4*t>>2];if(0==i)return r;++t,65536<=i?(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i)):r+=String.fromCharCode(i)}},e.stringToUTF32=function(e,t,r){if(void 0===r&&(r=2147483647),r<4)return 0;var i=t;r=i+r-4;for(var n=0;n<e.length;++n){if(55296<=(o=e.charCodeAt(n))&&o<=57343)var o=65536+((1023&o)<<10)|1023&e.charCodeAt(++n);if(C[t>>2]=o,r<(t+=4)+4)break}return C[t>>2]=0,t-i},e.lengthBytesUTF32=function(e){for(var t=0,r=0;r<e.length;++r){var i=e.charCodeAt(r);55296<=i&&i<=57343&&++r,t+=4}return t},e.stackTrace=function(){return Oa()};var y,E,z,Ra,C,Sa,Ba,Ca,Ta=0,la=0,Fa=!1,Ua=0,m=0,Va=0,Wa=0,r=0,Ya,buffer;function ma(){var i=Math.pow(2,31);if(i<=r)return!1;for(;t<=r;)if(t<i/2)t=Qa(2*t);else{var n=t;if((t=Qa((3*t+i)/4))<=n)return!1}if(i<=(t=Math.max(t,16777216)))return!1;try{if(ArrayBuffer.p)buffer=ArrayBuffer.p(buffer,t);else{var o=y;buffer=new ArrayBuffer(t)}}catch(e){return!1}return!!Xa(buffer)&&(e.buffer=buffer,e.HEAP8=y=new Int8Array(buffer),e.HEAP16=z=new Int16Array(buffer),e.HEAP32=C=new Int32Array(buffer),e.HEAPU8=E=new Uint8Array(buffer),e.HEAPU16=Ra=new Uint16Array(buffer),e.HEAPU32=Sa=new Uint32Array(buffer),e.HEAPF32=Ba=new Float32Array(buffer),e.HEAPF64=Ca=new Float64Array(buffer),ArrayBuffer.p||y.set(o),!0)}try{Ya=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get),Ya(new ArrayBuffer(4))}catch(e){Ya=function(e){return e.byteLength}}for(var $a=e.TOTAL_STACK||5242880,t=e.TOTAL_MEMORY||16777216,F=65536;F<t||F<2*$a;)F=F<16777216?2*F:F+16777216;function ab(e){for(;0<e.length;){var t=e.shift();if("function"==typeof t)t();else{var r=t.ab;"number"==typeof r?void 0===t.X?n.L("v",r):n.L("vi",r,[t.X]):r(void 0===t.X?null:t.X)}}}F=Math.max(F,16777216),F!==t&&(t=F),assert("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&!!new Int32Array(1).subarray&&!!new Int32Array(1).set,"JS engine does not provide full typed array support"),buffer=new ArrayBuffer(t),y=new Int8Array(buffer),z=new Int16Array(buffer),C=new Int32Array(buffer),E=new Uint8Array(buffer),Ra=new Uint16Array(buffer),Sa=new Uint32Array(buffer),Ba=new Float32Array(buffer),Ca=new Float64Array(buffer),C[0]=255,assert(255===E[0]&&0===E[3],"Typed arrays 2 must be run on a little-endian system"),e.HEAP=void 0,e.buffer=buffer,e.HEAP8=y,e.HEAP16=z,e.HEAP32=C,e.HEAPU8=E,e.HEAPU16=Ra,e.HEAPU32=Sa,e.HEAPF32=Ba,e.HEAPF64=Ca;var bb=[],cb=[],db=[],H=[],eb=[],Ha=!1;function fb(e){bb.unshift(e)}function gb(e){eb.unshift(e)}function hb(e,t,r){return e=Ka(e,r=Array(0<r?r:La(e)+1),0,r.length),t&&(r.length=e),r}function ua(e,t,r){for(e=hb(e,r),r=0;r<e.length;)y[t+r>>0]=e[r],r+=1}function ta(e,t){for(var r=0;r<e.length;r++)y[t++>>0]=e[r]}function Ia(e,t,r){for(var i=0;i<e.length;++i)y[t++>>0]=e.charCodeAt(i);r||(y[t>>0]=0)}e.addOnPreRun=fb,e.addOnInit=function(e){cb.unshift(e)},e.addOnPreMain=function(e){db.unshift(e)},e.addOnExit=function(e){H.unshift(e)},e.addOnPostRun=gb,e.intArrayFromString=hb,e.intArrayToString=function(e){for(var t=[],r=0;r<e.length;r++){var i=e[r];255<i&&(i&=255),t.push(String.fromCharCode(i))}return t.join("")},e.writeStringToMemory=ua,e.writeArrayToMemory=ta,e.writeAsciiToMemory=Ia,Math.imul&&-5===Math.imul(4294967295,5)||(Math.imul=function(e,t){var r=65535&e,i=65535&t;return r*i+((e>>>16)*i+r*(t>>>16)<<16)|0}),Math.Jd=Math.imul,Math.clz32||(Math.clz32=function(e){e>>>=0;for(var t=0;t<32;t++)if(e&1<<31-t)return t;return 32}),Math.Ad=Math.clz32;var xa=Math.abs,Aa=Math.ceil,za=Math.floor,ya=Math.min,I=0,ib=null,jb=null;function kb(){I++,e.monitorRunDependencies&&e.monitorRunDependencies(I)}function lb(){if(I--,e.monitorRunDependencies&&e.monitorRunDependencies(I),0==I&&(null!==ib&&(clearInterval(ib),ib=null),jb)){var t=jb;jb=null,t()}}e.addRunDependency=kb,e.removeRunDependency=lb,e.preloadedImages={},e.preloadedAudios={},Ta=8,la=Ta+5888,cb.push(),D([124,0,0,0,98,7,0,0,124,0,0,0,111,7,0,0,164,0,0,0,124,7,0,0,16,0,0,0,0,0,0,0,164,0,0,0,157,7,0,0,24,0,0,0,0,0,0,0,164,0,0,0,227,7,0,0,24,0,0,0,0,0,0,0,164,0,0,0,191,7,0,0,56,0,0,0,0,0,0,0,164,0,0,0,5,8,0,0,40,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,40,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,88,0,0,0,1,0,0,0,5,0,0,0,3,0,0,0,4,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,114,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,124,1,0,0,236,1,0,0,236,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,4,0,0,0,239,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,4,0,0,0,231,16,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,115,40,37,117,41,58,32,65,115,115,101,114,116,105,111,110,32,102,97,105,108,117,114,101,58,32,34,37,115,34,10,0,109,95,115,105,122,101,32,60,61,32,109,95,99,97,112,97,99,105,116,121,0,46,47,99,114,110,95,100,101,99,111,109,112,46,104,0,109,105,110,95,110,101,119,95,99,97,112,97,99,105,116,121,32,60,32,40,48,120,55,70,70,70,48,48,48,48,85,32,47,32,101,108,101,109,101,110,116,95,115,105,122,101,41,0,110,101,119,95,99,97,112,97,99,105,116,121,32,38,38,32,40,110,101,119,95,99,97,112,97,99,105,116,121,32,62,32,109,95,99,97,112,97,99,105,116,121,41,0,110,117,109,95,99,111,100,101,115,91,99,93,0,115,111,114,116,101,100,95,112,111,115,32,60,32,116,111,116,97,108,95,117,115,101,100,95,115,121,109,115,0,112,67,111,100,101,115,105,122,101,115,91,115,121,109,95,105,110,100,101,120,93,32,61,61,32,99,111,100,101,115,105,122,101,0,116,32,60,32,40,49,85,32,60,60,32,116,97,98,108,101,95,98,105,116,115,41,0,109,95,108,111,111,107,117,112,91,116,93,32,61,61,32,99,85,73,78,84,51,50,95,77,65,88,0,99,114,110,100,95,109,97,108,108,111,99,58,32,115,105,122,101,32,116,111,111,32,98,105,103,0,99,114,110,100,95,109,97,108,108,111,99,58,32,111,117,116,32,111,102,32,109,101,109,111,114,121,0,40,40,117,105,110,116,51,50,41,112,95,110,101,119,32,38,32,40,67,82,78,68,95,77,73,78,95,65,76,76,79,67,95,65,76,73,71,78,77,69,78,84,32,45,32,49,41,41,32,61,61,32,48,0,99,114,110,100,95,114,101,97,108,108,111,99,58,32,98,97,100,32,112,116,114,0,99,114,110,100,95,102,114,101,101,58,32,98,97,100,32,112,116,114,0,102,97,108,115,101,0,40,116,111,116,97,108,95,115,121,109,115,32,62,61,32,49,41,32,38,38,32,40,116,111,116,97,108,95,115,121,109,115,32,60,61,32,112,114,101,102,105,120,95,99,111,100,105,110,103,58,58,99,77,97,120,83,117,112,112,111,114,116,101,100,83,121,109,115,41,0,17,18,19,20,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15,16,48,0,110,117,109,95,98,105,116,115,32,60,61,32,51,50,85,0,109,95,98,105,116,95,99,111,117,110,116,32,60,61,32,99,66,105,116,66,117,102,83,105,122,101,0,116,32,33,61,32,99,85,73,78,84,51,50,95,77,65,88,0,109,111,100,101,108,46,109,95,99,111,100,101,95,115,105,122,101,115,91,115,121,109,93,32,61,61,32,108,101,110,0,0,2,3,1,0,2,3,4,5,6,7,1,40,108,101,110,32,62,61,32,49,41,32,38,38,32,40,108,101,110,32,60,61,32,99,77,97,120,69,120,112,101,99,116,101,100,67,111,100,101,83,105,122,101,41,0,105,32,60,32,109,95,115,105,122,101,0,110,101,120,116,95,108,101,118,101,108,95,111,102,115,32,62,32,99,117,114,95,108,101,118,101,108,95,111,102,115,0,1,2,2,3,3,3,3,4,0,0,0,0,0,0,1,1,0,1,0,1,0,0,1,2,1,2,0,0,0,1,0,2,1,0,2,0,0,1,2,3,110,117,109,32,38,38,32,40,110,117,109,32,61,61,32,126,110,117,109,95,99,104,101,99,107,41,0,83,116,57,101,120,99,101,112,116,105,111,110,0,83,116,57,116,121,112,101,95,105,110,102,111,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,54,95,95,115,104,105,109,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,57,95,95,112,111,105,110,116,101,114,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,112,98,97,115,101,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,50,48,95,95,115,105,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,112,116,104,114,101,97,100,95,111,110,99,101,32,102,97,105,108,117,114,101,32,105,110,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,95,102,97,115,116,40,41,0,116,101,114,109,105,110,97,116,101,95,104,97,110,100,108,101,114,32,117,110,101,120,112,101,99,116,101,100,108,121,32,114,101,116,117,114,110,101,100,0,99,97,110,110,111,116,32,99,114,101,97,116,101,32,112,116,104,114,101,97,100,32,107,101,121,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,99,97,110,110,111,116,32,122,101,114,111,32,111,117,116,32,116,104,114,101,97,100,32,118,97,108,117,101,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,58,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,102,111,114,101,105,103,110,32,101,120,99,101,112,116,105,111,110,0,116,101,114,109,105,110,97,116,105,110,103,0,117,110,99,97,117,103,104,116,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,46,0],"i8",4,n.Ua);var mb=n.ja(D(12,"i8",2),8);function ob(t){return e.___errno_location&&(C[e.___errno_location()>>2]=t),t}assert(0==mb%8),e._i64Subtract=nb;var J={I:1,F:2,ed:3,bc:4,H:5,Aa:6,vb:7,zc:8,ea:9,Jb:10,va:11,qd:11,Ta:12,da:13,Vb:14,Lc:15,fa:16,wa:17,rd:18,ha:19,ya:20,P:21,q:22,uc:23,Sa:24,Q:25,nd:26,Wb:27,Hc:28,ia:29,bd:30,nc:31,Vc:32,Sb:33,Zc:34,Dc:42,Zb:43,Kb:44,ec:45,fc:46,gc:47,mc:48,od:49,xc:50,dc:51,Pb:35,Ac:37,Bb:52,Eb:53,sd:54,vc:55,Fb:56,Gb:57,Qb:35,Hb:59,Jc:60,yc:61,kd:62,Ic:63,Ec:64,Fc:65,ad:66,Bc:67,yb:68,gd:69,Lb:70,Wc:71,pc:72,Tb:73,Db:74,Qc:76,Cb:77,$c:78,hc:79,ic:80,lc:81,kc:82,jc:83,Kc:38,za:39,qc:36,ga:40,Rc:95,Uc:96,Ob:104,wc:105,zb:97,Yc:91,Oc:88,Gc:92,cd:108,Nb:111,wb:98,Mb:103,tc:101,rc:100,ld:110,Xb:112,Yb:113,ac:115,Ab:114,Rb:89,oc:90,Xc:93,dd:94,xb:99,sc:102,cc:106,Mc:107,md:109,pd:87,Ub:122,hd:116,Pc:95,Cc:123,$b:84,Sc:75,Ib:125,Nc:131,Tc:130,jd:86};function pb(e,t){H.push(function(){n.L("vi",e,[t])}),pb.level=H.length}function tb(){return!!tb.p}e._memset=qb,e._bitshift64Lshr=rb,e._bitshift64Shl=sb;var ub=[],vb={};function wb(e,t){wb.p||(wb.p={}),e in wb.p||(n.L("v",t),wb.p[e]=1)}var xb={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"};function yb(e,t){for(var r=0,i=e.length-1;0<=i;i--){var n=e[i];"."===n?e.splice(i,1):".."===n?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function zb(e){var t="/"===e.charAt(0),r="/"===e.substr(-1);return(e=yb(e.split("/").filter(function(e){return!!e}),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e}function Ab(e){var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],e||t?(t&&(t=t.substr(0,t.length-1)),e+t):"."}function Bb(e){if("/"===e)return"/";var t=e.lastIndexOf("/");return-1===t?e:e.substr(t+1)}function Cb(){return zb(Array.prototype.slice.call(arguments,0).join("/"))}function K(e,t){return zb(e+"/"+t)}function Db(){for(var e="",t=!1,r=arguments.length-1;-1<=r&&!t;r--){if("string"!=typeof(t=0<=r?arguments[r]:"/"))throw new TypeError("Arguments to path.resolve must be strings");if(!t)return"";e=t+"/"+e,t="/"===t.charAt(0)}return(t?"/":"")+(e=yb(e.split("/").filter(function(e){return!!e}),!t).join("/"))||"."}var Eb=[];function Fb(e,t){Eb[e]={input:[],output:[],N:t},Gb(e,Hb)}var Hb={open:function(e){var t=Eb[e.g.rdev];if(!t)throw new L(J.ha);e.tty=t,e.seekable=!1},close:function(e){e.tty.N.flush(e.tty)},flush:function(e){e.tty.N.flush(e.tty)},read:function(e,t,r,i){if(!e.tty||!e.tty.N.La)throw new L(J.Aa);for(var n=0,o=0;o<i;o++){var a;try{a=e.tty.N.La(e.tty)}catch(e){throw new L(J.H)}if(void 0===a&&0===n)throw new L(J.va);if(null==a)break;n++,t[r+o]=a}return n&&(e.g.timestamp=Date.now()),n},write:function(e,t,r,i){if(!e.tty||!e.tty.N.qa)throw new L(J.Aa);for(var n=0;n<i;n++)try{e.tty.N.qa(e.tty,t[r+n])}catch(e){throw new L(J.H)}return i&&(e.g.timestamp=Date.now()),n}},Ib={La:function(e){if(!e.input.length){var t=null;if(da){var r,i=new Buffer(256),n=process.stdin.fd,o=!1;try{n=fs.openSync("/dev/stdin","r"),o=!0}catch(e){}r=fs.readSync(n,i,0,256,null),o&&fs.closeSync(n),t=0<r?i.slice(0,r).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&(null!==(t=readline())&&(t+="\n"));if(!t)return null;e.input=hb(t,!0)}return e.input.shift()},qa:function(t,r){null===r||10===r?(e.print(Ja(t.output,0)),t.output=[]):0!=r&&t.output.push(r)},flush:function(t){t.output&&0<t.output.length&&(e.print(Ja(t.output,0)),t.output=[])}},Jb={qa:function(t,r){null===r||10===r?(e.printErr(Ja(t.output,0)),t.output=[]):0!=r&&t.output.push(r)},flush:function(t){t.output&&0<t.output.length&&(e.printErr(Ja(t.output,0)),t.output=[])}},M={C:null,A:function(){return M.createNode(null,"/",16895,0)},createNode:function(e,t,r,i){if(24576==(61440&r)||4096==(61440&r))throw new L(J.I);return M.C||(M.C={dir:{g:{D:M.k.D,u:M.k.u,lookup:M.k.lookup,T:M.k.T,rename:M.k.rename,unlink:M.k.unlink,rmdir:M.k.rmdir,readdir:M.k.readdir,symlink:M.k.symlink},stream:{G:M.n.G}},file:{g:{D:M.k.D,u:M.k.u},stream:{G:M.n.G,read:M.n.read,write:M.n.write,Ba:M.n.Ba,Na:M.n.Na,Pa:M.n.Pa}},link:{g:{D:M.k.D,u:M.k.u,readlink:M.k.readlink},stream:{}},Ea:{g:{D:M.k.D,u:M.k.u},stream:Kb}}),N((r=Lb(e,t,r,i)).mode)?(r.k=M.C.dir.g,r.n=M.C.dir.stream,r.e={}):32768==(61440&r.mode)?(r.k=M.C.file.g,r.n=M.C.file.stream,r.o=0,r.e=null):40960==(61440&r.mode)?(r.k=M.C.link.g,r.n=M.C.link.stream):8192==(61440&r.mode)&&(r.k=M.C.Ea.g,r.n=M.C.Ea.stream),r.timestamp=Date.now(),e&&(e.e[t]=r),r},cb:function(e){if(e.e&&e.e.subarray){for(var t=[],r=0;r<e.o;++r)t.push(e.e[r]);return t}return e.e},Gd:function(e){return e.e?e.e.subarray?e.e.subarray(0,e.o):new Uint8Array(e.e):new Uint8Array},Ga:function(e,t){if(e.e&&e.e.subarray&&t>e.e.length&&(e.e=M.cb(e),e.o=e.e.length),!e.e||e.e.subarray){var r=e.e?e.e.buffer.byteLength:0;t<=r||(t=Math.max(t,r*(r<1048576?2:1.125)|0),0!=r&&(t=Math.max(t,256)),r=e.e,e.e=new Uint8Array(t),0<e.o&&e.e.set(r.subarray(0,e.o),0))}else for(!e.e&&0<t&&(e.e=[]);e.e.length<t;)e.e.push(0)},ob:function(e,t){if(e.o!=t)if(0==t)e.e=null,e.o=0;else{if(!e.e||e.e.subarray){var r=e.e;e.e=new Uint8Array(new ArrayBuffer(t)),r&&e.e.set(r.subarray(0,Math.min(t,e.o)))}else if(e.e||(e.e=[]),e.e.length>t)e.e.length=t;else for(;e.e.length<t;)e.e.push(0);e.o=t}},k:{D:function(e){var t={};return t.dev=8192==(61440&e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,N(e.mode)?t.size=4096:32768==(61440&e.mode)?t.size=e.o:40960==(61440&e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.K=4096,t.blocks=Math.ceil(t.size/t.K),t},u:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&M.ob(e,t.size)},lookup:function(){throw Mb[J.F]},T:function(e,t,r,i){return M.createNode(e,t,r,i)},rename:function(e,t,r){if(N(e.mode)){var i;try{i=Nb(t,r)}catch(e){}if(i)for(var n in i.e)throw new L(J.za)}delete e.parent.e[e.name],e.name=r,(t.e[r]=e).parent=t},unlink:function(e,t){delete e.e[t]},rmdir:function(e,t){var r,i=Nb(e,t);for(r in i.e)throw new L(J.za);delete e.e[t]},readdir:function(e){var t,r=[".",".."];for(t in e.e)e.e.hasOwnProperty(t)&&r.push(t);return r},symlink:function(e,t,r){return(e=M.createNode(e,t,41471,0)).link=r,e},readlink:function(e){if(40960!=(61440&e.mode))throw new L(J.q);return e.link}},n:{read:function(e,t,r,i,n){var o=e.g.e;if(n>=e.g.o)return 0;if(assert(0<=(e=Math.min(e.g.o-n,i))),8<e&&o.subarray)t.set(o.subarray(n,n+e),r);else for(i=0;i<e;i++)t[r+i]=o[n+i];return e},write:function(e,t,r,i,n,o){if(!i)return 0;if((e=e.g).timestamp=Date.now(),t.subarray&&(!e.e||e.e.subarray)){if(o)return e.e=t.subarray(r,r+i),e.o=i;if(0===e.o&&0===n)return e.e=new Uint8Array(t.subarray(r,r+i)),e.o=i;if(n+i<=e.o)return e.e.set(t.subarray(r,r+i),n),i}if(M.Ga(e,n+i),e.e.subarray&&t.subarray)e.e.set(t.subarray(r,r+i),n);else for(o=0;o<i;o++)e.e[n+o]=t[r+o];return e.o=Math.max(e.o,n+i),i},G:function(e,t,r){if(1===r?t+=e.position:2===r&&32768==(61440&e.g.mode)&&(t+=e.g.o),t<0)throw new L(J.q);return t},Ba:function(e,t,r){M.Ga(e.g,t+r),e.g.o=Math.max(e.g.o,t+r)},Na:function(e,t,r,i,n,o,a){if(32768!=(61440&e.g.mode))throw new L(J.ha);if(r=e.g.e,2&a||r.buffer!==t&&r.buffer!==t.buffer){if((0<n||n+i<e.g.o)&&(r=r.subarray?r.subarray(n,n+i):Array.prototype.slice.call(r,n,n+i)),e=!0,!(i=Ea(i)))throw new L(J.Ta);t.set(r,i)}else e=!1,i=r.byteOffset;return{Rd:i,xd:e}},Pa:function(e,t,r,i,n){if(32768!=(61440&e.g.mode))throw new L(J.ha);return 2&n||M.n.write(e,t,0,i,r,!1),0}}},P={$:!1,sb:function(){P.$=!!process.platform.match(/^win/)},A:function(e){return assert(da),P.createNode(null,"/",P.Ja(e.pa.root),0)},createNode:function(e,t,r){if(!N(r)&&32768!=(61440&r)&&40960!=(61440&r))throw new L(J.q);return(e=Lb(e,t,r)).k=P.k,e.n=P.n,e},Ja:function(e){var t;try{t=fs.lstatSync(e),P.$&&(t.mode=t.mode|(146&t.mode)>>1)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}return t.mode},B:function(e){for(var t=[];e.parent!==e;)t.push(e.name),e=e.parent;return t.push(e.A.pa.root),t.reverse(),Cb.apply(null,t)},Ha:{0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},$a:function(e){if((e&=-32769)in P.Ha)return P.Ha[e];throw new L(J.q)},k:{D:function(e){var t;e=P.B(e);try{t=fs.lstatSync(e)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}return P.$&&!t.K&&(t.K=4096),P.$&&!t.blocks&&(t.blocks=(t.size+t.K-1)/t.K|0),{dev:t.dev,ino:t.ino,mode:t.mode,nlink:t.nlink,uid:t.uid,gid:t.gid,rdev:t.rdev,size:t.size,atime:t.atime,mtime:t.mtime,ctime:t.ctime,K:t.K,blocks:t.blocks}},u:function(e,t){var r=P.B(e);try{void 0!==t.mode&&(fs.chmodSync(r,t.mode),e.mode=t.mode),void 0!==t.size&&fs.truncateSync(r,t.size)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}},lookup:function(e,t){var r=K(P.B(e),t);r=P.Ja(r);return P.createNode(e,t,r)},T:function(e,t,r,i){e=P.createNode(e,t,r,i),t=P.B(e);try{N(e.mode)?fs.mkdirSync(t,e.mode):fs.writeFileSync(t,"",{mode:e.mode})}catch(e){if(!e.code)throw e;throw new L(J[e.code])}return e},rename:function(e,t,r){e=P.B(e),t=K(P.B(t),r);try{fs.renameSync(e,t)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}},unlink:function(e,t){var r=K(P.B(e),t);try{fs.unlinkSync(r)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}},rmdir:function(e,t){var r=K(P.B(e),t);try{fs.rmdirSync(r)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}},readdir:function(e){e=P.B(e);try{return fs.readdirSync(e)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}},symlink:function(e,t,r){e=K(P.B(e),t);try{fs.symlinkSync(r,e)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}},readlink:function(e){var t=P.B(e);try{return t=fs.readlinkSync(t),t=Ob.relative(Ob.resolve(e.A.pa.root),t)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}}},n:{open:function(e){var t=P.B(e.g);try{32768==(61440&e.g.mode)&&(e.V=fs.openSync(t,P.$a(e.flags)))}catch(e){if(!e.code)throw e;throw new L(J[e.code])}},close:function(e){try{32768==(61440&e.g.mode)&&e.V&&fs.closeSync(e.V)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}},read:function(e,t,r,i,n){if(0===i)return 0;var o,a=new Buffer(i);try{o=fs.readSync(e.V,a,0,i,n)}catch(e){throw new L(J[e.code])}if(0<o)for(e=0;e<o;e++)t[r+e]=a[e];return o},write:function(e,t,r,i,n){var o;t=new Buffer(t.subarray(r,r+i));try{o=fs.writeSync(e.V,t,0,i,n)}catch(e){throw new L(J[e.code])}return o},G:function(e,t,r){if(1===r)t+=e.position;else if(2===r&&32768==(61440&e.g.mode))try{t+=fs.fstatSync(e.V).size}catch(e){throw new L(J[e.code])}if(t<0)throw new L(J.q);return t}}};D(1,"i32*",2),D(1,"i32*",2),D(1,"i32*",2);var Pb=null,Qb=[null],Rb=[],Sb=1,Q=null,Tb=!0,R={},L=null,Mb={};function S(e,t){if(t=t||{},!(e=Db("/",e)))return{path:"",g:null};var r,i={Ia:!0,ra:0};for(r in i)void 0===t[r]&&(t[r]=i[r]);if(8<t.ra)throw new L(J.ga);i=yb(e.split("/").filter(function(e){return!!e}),!1);var n=Pb;r="/";for(var o=0;o<i.length;o++){var a=o===i.length-1;if(a&&t.parent)break;if(n=Nb(n,i[o]),r=K(r,i[o]),n.U&&(!a||a&&t.Ia)&&(n=n.U.root),!a||t.la)for(a=0;40960==(61440&n.mode);)if(n=Vb(r),n=S(r=Db(Ab(r),n),{ra:t.ra}).g,40<a++)throw new L(J.ga)}return{path:r,g:n}}function T(e){for(var t;;){if(e===e.parent)return e=e.A.Oa,t?"/"!==e[e.length-1]?e+"/"+t:e+t:e;t=t?e.name+"/"+t:e.name,e=e.parent}}function Wb(e,t){for(var r=0,i=0;i<t.length;i++)r=(r<<5)-r+t.charCodeAt(i)|0;return(e+r>>>0)%Q.length}function Xb(e){var t=Wb(e.parent.id,e.name);e.M=Q[t],Q[t]=e}function Nb(e,t){var r;if(r=(r=Yb(e,"x"))?r:e.k.lookup?0:J.da)throw new L(r,e);for(r=Q[Wb(e.id,t)];r;r=r.M){var i=r.name;if(r.parent.id===e.id&&i===t)return r}return e.k.lookup(e,t)}function Lb(e,t,r,i){return Zb||((Zb=function(e,t,r,i){e||(e=this),this.parent=e,this.A=e.A,this.U=null,this.id=Sb++,this.name=t,this.mode=r,this.k={},this.n={},this.rdev=i}).prototype={},Object.defineProperties(Zb.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},kb:{get:function(){return N(this.mode)}},jb:{get:function(){return 8192==(61440&this.mode)}}})),Xb(e=new Zb(e,t,r,i)),e}function N(e){return 16384==(61440&e)}var $b={r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218};function Yb(e,t){return Tb?0:(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:J.da}function ac(e,t){try{return Nb(e,t),J.wa}catch(e){}return Yb(e,"wx")}function bc(){for(var e=0;e<=4096;e++)if(!Rb[e])return e;throw new L(J.Sa)}function cc(e){dc||((dc=function(){}).prototype={},Object.defineProperties(dc.prototype,{object:{get:function(){return this.g},set:function(e){this.g=e}},Ld:{get:function(){return 1!=(2097155&this.flags)}},Md:{get:function(){return 0!=(2097155&this.flags)}},Kd:{get:function(){return 1024&this.flags}}}));var t,r=new dc;for(t in e)r[t]=e[t];return e=r,r=bc(),e.fd=r,Rb[r]=e}var Kb={open:function(e){e.n=Qb[e.g.rdev].n,e.n.open&&e.n.open(e)},G:function(){throw new L(J.ia)}},qc;function Gb(e,t){Qb[e]={n:t}}function ec(e,t){var r,i="/"===t,n=!t;if(i&&Pb)throw new L(J.fa);if(!i&&!n){if(t=(r=S(t,{Ia:!1})).path,(r=r.g).U)throw new L(J.fa);if(!N(r.mode))throw new L(J.ya)}n={type:e,pa:{},Oa:t,lb:[]};var o=e.A(n);(o.A=n).root=o,i?Pb=o:r&&(r.U=n,r.A&&r.A.lb.push(n))}function fc(e,t,r){var i=S(e,{parent:!0}).g;if(!(e=Bb(e))||"."===e||".."===e)throw new L(J.q);var n=ac(i,e);if(n)throw new L(n);if(!i.k.T)throw new L(J.I);return i.k.T(i,e,t,r)}function gc(e,t){return t=4095&(void 0!==t?t:438),fc(e,t|=32768,0)}function V(e,t){return t=1023&(void 0!==t?t:511),fc(e,t|=16384,0)}function hc(e,t,r){return void 0===r&&(r=t,t=438),fc(e,8192|t,r)}function ic(e,t){if(!Db(e))throw new L(J.F);var r=S(t,{parent:!0}).g;if(!r)throw new L(J.F);var i=Bb(t),n=ac(r,i);if(n)throw new L(n);if(!r.k.symlink)throw new L(J.I);return r.k.symlink(r,i,e)}function Vb(e){if(!(e=S(e).g))throw new L(J.F);if(!e.k.readlink)throw new L(J.q);return Db(T(e.parent),e.k.readlink(e))}function jc(e,t){var r;if(!(r="string"==typeof e?S(e,{la:!0}).g:e).k.u)throw new L(J.I);r.k.u(r,{mode:4095&t|-4096&r.mode,timestamp:Date.now()})}function kc(t,r){var i,n,o;if(""===t)throw new L(J.F);if("string"==typeof r){if(void 0===(n=$b[r]))throw Error("Unknown file open mode: "+r)}else n=r;if(i=64&(r=n)?4095&(void 0===i?438:i)|32768:0,"object"==typeof t)o=t;else{t=zb(t);try{o=S(t,{la:!(131072&r)}).g}catch(e){}}if(n=!1,64&r)if(o){if(128&r)throw new L(J.wa)}else o=fc(t,i,0),n=!0;if(!o)throw new L(J.F);if(8192==(61440&o.mode)&&(r&=-513),65536&r&&!N(o.mode))throw new L(J.ya);if(!n&&(i=o?40960==(61440&o.mode)?J.ga:N(o.mode)&&(0!=(2097155&r)||512&r)?J.P:(i=["r","w","rw"][3&r],512&r&&(i+="w"),Yb(o,i)):J.F))throw new L(i);if(512&r){var a;if(!(a="string"==typeof(i=o)?S(i,{la:!0}).g:i).k.u)throw new L(J.I);if(N(a.mode))throw new L(J.P);if(32768!=(61440&a.mode))throw new L(J.q);if(i=Yb(a,"w"))throw new L(i);a.k.u(a,{size:0,timestamp:Date.now()})}r&=-641,(o=cc({g:o,path:T(o),flags:r,seekable:!0,position:0,n:o.n,tb:[],error:!1})).n.open&&o.n.open(o),!e.logReadFiles||1&r||(lc||(lc={}),t in lc||(lc[t]=1,e.printErr("read file: "+t)));try{R.onOpenFile&&(a=0,1!=(2097155&r)&&(a|=1),0!=(2097155&r)&&(a|=2),R.onOpenFile(t,a))}catch(e){console.log("FS.trackingDelegate['onOpenFile']('"+t+"', flags) threw an exception: "+e.message)}return o}function mc(e){e.na&&(e.na=null);try{e.n.close&&e.n.close(e)}catch(e){throw e}finally{Rb[e.fd]=null}}function nc(e,t,r){if(!e.seekable||!e.n.G)throw new L(J.ia);e.position=e.n.G(e,t,r),e.tb=[]}function oc(e,t,r,i,n,o){if(i<0||n<0)throw new L(J.q);if(0==(2097155&e.flags))throw new L(J.ea);if(N(e.g.mode))throw new L(J.P);if(!e.n.write)throw new L(J.q);1024&e.flags&&nc(e,0,2);var a=!0;if(void 0===n)n=e.position,a=!1;else if(!e.seekable)throw new L(J.ia);t=e.n.write(e,t,r,i,n,o),a||(e.position+=t);try{e.path&&R.onWriteToFile&&R.onWriteToFile(e.path)}catch(e){console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: "+e.message)}return t}function pc(){L||((L=function(e,t){this.g=t,this.qb=function(e){for(var t in this.S=e,J)if(J[t]===e){this.code=t;break}},this.qb(e),this.message=xb[e]}).prototype=Error(),L.prototype.constructor=L,[J.F].forEach(function(e){Mb[e]=new L(e),Mb[e].stack="<generic error, no stack>"}))}function rc(e,t){var r=0;return e&&(r|=365),t&&(r|=146),r}function sc(e,t,r,i){return gc(e=K("string"==typeof e?e:T(e),t),rc(r,i))}function tc(e,t,r,i,n,o){if(n=gc(e=t?K("string"==typeof e?e:T(e),t):e,i=rc(i,n)),r){if("string"==typeof r){e=Array(r.length),t=0;for(var a=r.length;t<a;++t)e[t]=r.charCodeAt(t);r=e}jc(n,146|i),oc(e=kc(n,"w"),r,0,r.length,0,o),mc(e),jc(n,i)}return n}function W(e,t,s,o){e=K("string"==typeof e?e:T(e),t),t=rc(!!s,!!o),W.Ma||(W.Ma=64);var r=W.Ma++<<8|0;return Gb(r,{open:function(e){e.seekable=!1},close:function(){o&&o.buffer&&o.buffer.length&&o(10)},read:function(e,t,r,i){for(var n=0,o=0;o<i;o++){var a;try{a=s()}catch(e){throw new L(J.H)}if(void 0===a&&0===n)throw new L(J.va);if(null==a)break;n++,t[r+o]=a}return n&&(e.g.timestamp=Date.now()),n},write:function(e,t,r,i){for(var n=0;n<i;n++)try{o(t[r+n])}catch(e){throw new L(J.H)}return i&&(e.g.timestamp=Date.now()),n}}),hc(e,t,r)}function uc(t){if(t.jb||t.kb||t.link||t.e)return!0;var r=!0;if("undefined"!=typeof XMLHttpRequest)throw Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!e.read)throw Error("Cannot load without read() or XMLHttpRequest.");try{t.e=hb(e.read(t.url),!0),t.o=t.e.length}catch(e){r=!1}return r||ob(J.H),r}var vc={},Zb,dc,lc,wc=0;function X(){return C[(wc+=4)-4>>2]}function xc(){var e;if(e=X(),!(e=Rb[e]))throw new L(J.ea);return e}var yc={};function Ga(e){Ga.p||(r=Qa(r),Ga.p=!0,assert(n.R),Ga.bb=n.R,n.R=function(){x("cannot dynamically allocate, sbrk now has control")});var t=r;return 0==e||Ga.bb(e)?t:4294967295}e._i64Add=zc;var Ac=1;function Cc(e,t){if(Dc=e,Ec=t,!Fc)return 1;if(0==e)Y=function(){setTimeout(Gc,t)},Hc="timeout";else if(1==e)Y=function(){Ic(Gc)},Hc="rAF";else if(2==e){if(!window.setImmediate){var r=[];window.addEventListener("message",function(e){e.source===window&&"__emcc"===e.data&&(e.stopPropagation(),r.shift()())},!0),window.setImmediate=function(e){r.push(e),window.postMessage("__emcc","*")}}Y=function(){window.setImmediate(Gc)},Hc="immediate"}return 0}function Jc(a,t,r,s,i){e.noExitRuntime=!0,assert(!Fc,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),Fc=a,Kc=s;var u=Lc;if(Gc=function(){if(!na)if(0<Mc.length){var t=Date.now(),r=Mc.shift();if(r.ab(r.X),Nc){var i=Nc,o=0==i%1?i-1:Math.floor(i);Nc=r.Bd?o:(8*i+(o+.5))/9}console.log('main loop blocker "'+r.name+'" took '+(Date.now()-t)+" ms"),Oc(),setTimeout(Gc,0)}else u<Lc||(Pc=Pc+1|0,1==Dc&&1<Ec&&0!=Pc%Ec?Y():("timeout"===Hc&&e.ka&&(e.W("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"),Hc=""),Qc(function(){void 0!==s?n.L("vi",a,[s]):n.L("v",a)}),u<Lc||("object"==typeof SDL&&SDL.audio&&SDL.audio.mb&&SDL.audio.mb(),Y())))},i||(t&&0<t?Cc(0,1e3/t):Cc(1,1),Y()),r)throw"SimulateInfiniteLoop"}e._memcpy=Bc;var Y=null,Hc="",Lc=0,Fc=null,Kc=0,Dc=0,Ec=0,Pc=0,Mc=[];function Oc(){if(e.setStatus){var t=e.statusMessage||"Please wait...",r=Nc,i=Rc.Dd;r?r<i?e.setStatus(t+" ("+(i-r)+"/"+i+")"):e.setStatus(t):e.setStatus("")}}function Qc(t){if(!(na||e.preMainLoop&&!1===e.preMainLoop())){try{t()}catch(t){if(t instanceof ia)return;throw t&&"object"==typeof t&&t.stack&&e.W("exception thrown: "+[t,t.stack]),t}e.postMainLoop&&e.postMainLoop()}}var Rc={},Gc,Nc,Sc=!1,Tc=!1,Uc=[];function Vc(){function t(){Tc=document.pointerLockElement===r||document.mozPointerLockElement===r||document.webkitPointerLockElement===r||document.msPointerLockElement===r}if(e.preloadPlugins||(e.preloadPlugins=[]),!Wc){Wc=!0;try{Xc=!0}catch(e){Xc=!1,console.log("warning: no blob constructor, cannot create blobs with mimetypes")}Yc="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:Xc?null:console.log("warning: no BlobBuilder"),Zc="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:void 0,e.Qa||void 0!==Zc||(console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),e.Qa=!0),e.preloadPlugins.push({canHandle:function(t){return!e.Qa&&/\.(jpg|jpeg|png|bmp)$/i.test(t)},handle:function(r,i,o,t){var a=null;if(Xc)try{(a=new Blob([r],{type:$c(i)})).size!==r.length&&(a=new Blob([new Uint8Array(r).buffer],{type:$c(i)}))}catch(e){n.O("Blob constructor present but fails: "+e+"; falling back to blob builder")}a||((a=new Yc).append(new Uint8Array(r).buffer),a=a.getBlob());var s=Zc.createObjectURL(a),u=new Image;u.onload=function(){assert(u.complete,"Image "+i+" could not be decoded");var t=document.createElement("canvas");t.width=u.width,t.height=u.height,t.getContext("2d").drawImage(u,0,0),e.preloadedImages[i]=t,Zc.revokeObjectURL(s),o&&o(r)},u.onerror=function(){console.log("Image "+s+" could not be decoded"),t&&t()},u.src=s}}),e.preloadPlugins.push({canHandle:function(t){return!e.Pd&&t.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},handle:function(o,a,r,t){function s(t){u||(u=!0,e.preloadedAudios[a]=t,r&&r(o))}function i(){u||(u=!0,e.preloadedAudios[a]=new Audio,t&&t())}var u=!1;if(!Xc)return i();try{var n=new Blob([o],{type:$c(a)})}catch(e){return i()}n=Zc.createObjectURL(n);var c=new Audio;c.addEventListener("canplaythrough",function(){s(c)},!1),c.onerror=function(){if(!u){console.log("warning: browser could not fully decode audio "+a+", trying slower base64 approach");for(var e="",t=0,r=0,i=0;i<o.length;i++)for(t=t<<8|o[i],r+=8;6<=r;){var n=t>>r-6&63;r=r-6,e=e+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[n]}2==r?(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(3&t)<<4],e+="=="):4==r&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(15&t)<<2],e+="="),c.src="data:audio/x-"+a.substr(-3)+";base64,"+e,s(c)}},c.src=n,ad(function(){s(c)})}});var r=e.canvas;r&&(r.sa=r.requestPointerLock||r.mozRequestPointerLock||r.webkitRequestPointerLock||r.msRequestPointerLock||function(){},r.Fa=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},r.Fa=r.Fa.bind(document),document.addEventListener("pointerlockchange",t,!1),document.addEventListener("mozpointerlockchange",t,!1),document.addEventListener("webkitpointerlockchange",t,!1),document.addEventListener("mspointerlockchange",t,!1),e.elementPointerLock&&r.addEventListener("click",function(e){!Tc&&r.sa&&(r.sa(),e.preventDefault())},!1))}}function bd(t,r,i,n){if(r&&e.ka&&t==e.canvas)return e.ka;var o,a;if(r){if(a={antialias:!1,alpha:!1},n)for(var s in n)a[s]=n[s];(a=GL.createContext(t,a))&&(o=GL.getContext(a).td),t.style.backgroundColor="black"}else o=t.getContext("2d");return o?(i&&(r||assert("undefined"==typeof GLctx,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),e.ka=o,r&&GL.Od(a),e.Td=r,Uc.forEach(function(e){e()}),Vc()),o):null}var cd=!1,dd=void 0,ed=void 0;function fd(t,r,i){function n(){Sc=!1;var t=o.parentNode;(document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement||document.msFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement)===t?(o.Da=document.cancelFullScreen||document.mozCancelFullScreen||document.webkitCancelFullScreen||document.msExitFullscreen||document.exitFullscreen||function(){},o.Da=o.Da.bind(document),dd&&o.sa(),Sc=!0,ed&&gd()):(t.parentNode.insertBefore(o,t),t.parentNode.removeChild(t),ed&&hd()),e.onFullScreen&&e.onFullScreen(Sc),id(o)}void 0===(dd=t)&&(dd=!0),void 0===(ed=r)&&(ed=!1),void 0===(jd=i)&&(jd=null);var o=e.canvas;cd||(cd=!0,document.addEventListener("fullscreenchange",n,!1),document.addEventListener("mozfullscreenchange",n,!1),document.addEventListener("webkitfullscreenchange",n,!1),document.addEventListener("MSFullscreenChange",n,!1));var a=document.createElement("div");o.parentNode.insertBefore(a,o),a.appendChild(o),a.p=a.requestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen||(a.webkitRequestFullScreen?function(){a.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),i?a.p({Ud:i}):a.p()}var kd=0;function ld(e){var t=Date.now();if(0===kd)kd=t+1e3/60;else for(;kd<=t+2;)kd+=1e3/60;t=Math.max(kd-t,0),setTimeout(e,t)}function Ic(e){"undefined"==typeof window?ld(e):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||ld),window.requestAnimationFrame(e))}function ad(t){e.noExitRuntime=!0,setTimeout(function(){na||t()},1e4)}function $c(e){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[e.substr(e.lastIndexOf(".")+1)]}function md(e,t,r){var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=function(){200==i.status||0==i.status&&i.response?t(i.response):r()},i.onerror=r,i.send(null)}function nd(t,r,e){md(t,function(e){assert(e,'Loading data file "'+t+'" failed (no arrayBuffer).'),r(new Uint8Array(e)),lb()},function(){if(!e)throw'Loading data file "'+t+'" failed.';e()}),kb()}var od=[],Wc,Xc,Yc,Zc,jd;function pd(){var t=e.canvas;od.forEach(function(e){e(t.width,t.height)})}function gd(){if("undefined"!=typeof SDL){var e=Sa[SDL.screen+0*n.J>>2];C[SDL.screen+0*n.J>>2]=8388608|e}pd()}function hd(){if("undefined"!=typeof SDL){var e=Sa[SDL.screen+0*n.J>>2];C[SDL.screen+0*n.J>>2]=-8388609&e}pd()}function id(t,r,i){r&&i?(t.ub=r,t.hb=i):(r=t.ub,i=t.hb);var n=r,o=i;if(e.forcedAspectRatio&&0<e.forcedAspectRatio&&(n/o<e.forcedAspectRatio?n=Math.round(o*e.forcedAspectRatio):o=Math.round(n/e.forcedAspectRatio)),(document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement||document.msFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement)===t.parentNode&&"undefined"!=typeof screen){var a=Math.min(screen.width/n,screen.height/o);n=Math.round(n*a),o=Math.round(o*a)}ed?(t.width!=n&&(t.width=n),t.height!=o&&(t.height=o),void 0!==t.style&&(t.style.removeProperty("width"),t.style.removeProperty("height"))):(t.width!=r&&(t.width=r),t.height!=i&&(t.height=i),void 0!==t.style&&(n!=r||o!=i?(t.style.setProperty("width",n+"px","important"),t.style.setProperty("height",o+"px","important")):(t.style.removeProperty("width"),t.style.removeProperty("height"))))}if(pc(),Q=Array(4096),ec(M,"/"),V("/tmp"),V("/home"),V("/home/web_user"),function(){var e;if(V("/dev"),Gb(259,{read:function(){return 0},write:function(e,t,r,i){return i}}),hc("/dev/null",259),Fb(1280,Ib),Fb(1536,Jb),hc("/dev/tty",1280),hc("/dev/tty1",1536),"undefined"!=typeof crypto){var t=new Uint8Array(1);e=function(){return crypto.getRandomValues(t),t[0]}}else e=da?function(){return require("crypto").randomBytes(1)[0]}:function(){return 256*Math.random()|0};W("/dev","random",e),W("/dev","urandom",e),V("/dev/shm"),V("/dev/shm/tmp")}(),V("/proc"),V("/proc/self"),V("/proc/self/fd"),ec({A:function(){var e=Lb("/proc/self","fd",16895,73);return e.k={lookup:function(e,t){var r=Rb[+t];if(!r)throw new L(J.ea);var i={parent:null,A:{Oa:"fake"},k:{readlink:function(){return r.path}}};return i.parent=i}},e}},"/proc/self/fd"),cb.unshift(function(){if(!e.noFSInit&&!qc){assert(!qc,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),qc=!0,pc(),e.stdin=e.stdin,e.stdout=e.stdout,e.stderr=e.stderr,e.stdin?W("/dev","stdin",e.stdin):ic("/dev/tty","/dev/stdin"),e.stdout?W("/dev","stdout",null,e.stdout):ic("/dev/tty","/dev/stdout"),e.stderr?W("/dev","stderr",null,e.stderr):ic("/dev/tty1","/dev/stderr");var t=kc("/dev/stdin","r");assert(0===t.fd,"invalid handle for stdin ("+t.fd+")"),assert(1===(t=kc("/dev/stdout","w")).fd,"invalid handle for stdout ("+t.fd+")"),assert(2===(t=kc("/dev/stderr","w")).fd,"invalid handle for stderr ("+t.fd+")")}}),db.push(function(){Tb=!1}),H.push(function(){qc=!1;var t=e._fflush;for(t&&t(0),t=0;t<Rb.length;t++){var r=Rb[t];r&&mc(r)}}),e.FS_createFolder=function(e,t,r,i){return V(e=K("string"==typeof e?e:T(e),t),rc(r,i))},e.FS_createPath=function(e,t){e="string"==typeof e?e:T(e);for(var r=t.split("/").reverse();r.length;){var i=r.pop();if(i){var n=K(e,i);try{V(n)}catch(e){}e=n}}return n},e.FS_createDataFile=tc,e.FS_createPreloadedFile=function(n,o,t,a,s,u,c,l,f,h){function r(t){function r(e){h&&h(),l||tc(n,o,e,a,s,f),u&&u(),lb()}var i=!1;e.preloadPlugins.forEach(function(e){!i&&e.canHandle(d)&&(e.handle(t,d,r,function(){c&&c(),lb()}),i=!0)}),i||r(t)}Vc();var d=o?Db(K(n,o)):n;kb(),"string"==typeof t?nd(t,function(e){r(e)},c):r(t)},e.FS_createLazyFile=function(e,t,u,r,i){var n,o;function a(){this.oa=!1,this.Y=[]}if(a.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize;return this.gb(e/this.chunkSize|0)[t]}},a.prototype.pb=function(e){this.gb=e},a.prototype.Ca=function(){var e=new XMLHttpRequest;if(e.open("HEAD",u,!1),e.send(null),!(200<=e.status&&e.status<300||304===e.status))throw Error("Couldn't load "+u+". Status: "+e.status);var t,o=Number(e.getResponseHeader("Content-length")),a=1048576;(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t||(a=o);var s=this;s.pb(function(e){var t=e*a,r=(e+1)*a-1;r=Math.min(r,o-1);if(void 0===s.Y[e]){var i=s.Y;if(r<t)throw Error("invalid range ("+t+", "+r+") or no bytes requested!");if(o-1<r)throw Error("only "+o+" bytes available! programmer error!");var n=new XMLHttpRequest;if(n.open("GET",u,!1),o!==a&&n.setRequestHeader("Range","bytes="+t+"-"+r),"undefined"!=typeof Uint8Array&&(n.responseType="arraybuffer"),n.overrideMimeType&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.send(null),!(200<=n.status&&n.status<300||304===n.status))throw Error("Couldn't load "+u+". Status: "+n.status);t=void 0!==n.response?new Uint8Array(n.response||[]):hb(n.responseText||"",!0),i[e]=t}if(void 0===s.Y[e])throw Error("doXHR failed!");return s.Y[e]}),this.Wa=o,this.Va=a,this.oa=!0},"undefined"!=typeof XMLHttpRequest){if(!ca)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";n=new a,Object.defineProperty(n,"length",{get:function(){return this.oa||this.Ca(),this.Wa}}),Object.defineProperty(n,"chunkSize",{get:function(){return this.oa||this.Ca(),this.Va}}),o=void 0}else o=u,n=void 0;var s=sc(e,t,r,i);n?s.e=n:o&&(s.e=null,s.url=o),Object.defineProperty(s,"usedBytes",{get:function(){return this.e.length}});var c={};return Object.keys(s.n).forEach(function(e){var t=s.n[e];c[e]=function(){if(!uc(s))throw new L(J.H);return t.apply(null,arguments)}}),c.read=function(e,t,r,i,n){if(!uc(s))throw new L(J.H);if(n>=(e=e.g.e).length)return 0;if(assert(0<=(i=Math.min(e.length-n,i))),e.slice)for(var o=0;o<i;o++)t[r+o]=e[n+o];else for(o=0;o<i;o++)t[r+o]=e.get(n+o);return i},s.n=c,s},e.FS_createLink=function(e,t,r){return ic(r,e=K("string"==typeof e?e:T(e),t))},e.FS_createDevice=W,e.FS_unlink=function(t){var r,e=S(t,{parent:!0}).g,i=Bb(t),n=Nb(e,i);e:{try{r=Nb(e,i)}catch(e){r=e.S;break e}var o=Yb(e,"wx");r=o||(N(r.mode)?J.P:0)}if(r)throw r===J.P&&(r=J.I),new L(r);if(!e.k.unlink)throw new L(J.I);if(n.U)throw new L(J.fa);try{R.willDeletePath&&R.willDeletePath(t)}catch(e){console.log("FS.trackingDelegate['willDeletePath']('"+t+"') threw an exception: "+e.message)}if(e.k.unlink(e,i),e=Wb(n.parent.id,n.name),Q[e]===n)Q[e]=n.M;else for(e=Q[e];e;){if(e.M===n){e.M=n.M;break}e=e.M}try{R.onDeletePath&&R.onDeletePath(t)}catch(e){console.log("FS.trackingDelegate['onDeletePath']('"+t+"') threw an exception: "+e.message)}},cb.unshift(function(){}),H.push(function(){}),da){var fs=require("fs"),Ob=require("path");P.sb()}e.requestFullScreen=function(e,t,r){fd(e,t,r)},e.requestAnimationFrame=function(e){Ic(e)},e.setCanvasSize=function(t,r,i){id(e.canvas,t,r),i||pd()},e.pauseMainLoop=function(){Y=null,Lc++},e.resumeMainLoop=function(){Lc++;var e=Dc,t=Ec;Jc(Fc,0,!1,Kc,!(Fc=null)),Cc(e,t),Y()},e.getUserMedia=function(){window.p||(window.p=navigator.getUserMedia||navigator.mozGetUserMedia),window.p(void 0)},e.createContext=function(e,t,r,i){return bd(e,t,r,i)},Ua=m=n.ja(la),Fa=!0,Va=Ua+$a,Wa=r=n.ja(Va),assert(Wa<t,"TOTAL_MEMORY not big enough for stack");var qd=D([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],"i8",3);e.Ya={Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array,NaN:NaN,Infinity:1/0,byteLength:Ya},e.Za={abort:x,assert:assert,invoke_iiii:function(t,r,i,n){try{return e.dynCall_iiii(t,r,i,n)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},invoke_viiiii:function(t,r,i,n,o,a){try{e.dynCall_viiiii(t,r,i,n,o,a)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},invoke_vi:function(t,r){try{e.dynCall_vi(t,r)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},invoke_ii:function(t,r){try{return e.dynCall_ii(t,r)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},invoke_viii:function(t,r,i,n){try{e.dynCall_viii(t,r,i,n)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},invoke_v:function(t){try{e.dynCall_v(t)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},invoke_viiiiii:function(t,r,i,n,o,a,s){try{e.dynCall_viiiiii(t,r,i,n,o,a,s)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},invoke_iiiiii:function(t,r,i,n,o,a){try{return e.dynCall_iiiiii(t,r,i,n,o,a)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},invoke_viiii:function(t,r,i,n,o){try{e.dynCall_viiii(t,r,i,n,o)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},_pthread_cleanup_pop:function(){assert(pb.level==H.length,"cannot pop if something else added meanwhile!"),H.pop(),pb.level=H.length},___syscall54:function(e,t){wc=t;try{var r=xc(),i=X();switch(i){case 21505:case 21506:return r.tty?0:-J.Q;case 21519:if(!r.tty)return-J.Q;var n=X();return C[n>>2]=0;case 21520:return r.tty?-J.q:-J.Q;case 21531:if(n=X(),!r.n.ib)throw new L(J.Q);return r.n.ib(r,i,n);default:x("bad ioctl syscall "+i)}}catch(e){return void 0!==vc&&e instanceof L||x(e),-e.S}},___syscall6:function(e,t){wc=t;try{return mc(xc()),0}catch(e){return void 0!==vc&&e instanceof L||x(e),-e.S}},_emscripten_set_main_loop_timing:Cc,__ZSt18uncaught_exceptionv:tb,___setErrNo:ob,_sbrk:Ga,___cxa_begin_catch:function(e){var t;tb.p--,ub.push(e);e:{if(e&&!vb[e])for(t in vb)if(vb[t].wd===e)break e;t=e}return t&&vb[t].Sd++,e},_emscripten_memcpy_big:function(e,t,r){return E.set(E.subarray(t,t+r),e),e},_sysconf:function(e){switch(e){case 30:return 4096;case 85:return F/4096;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 79:return 0;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"==typeof navigator&&navigator.hardwareConcurrency||1}return ob(J.q),-1},_pthread_getspecific:function(e){return yc[e]||0},_pthread_self:function(){return 0},_pthread_once:wb,_pthread_key_create:function(e){return 0==e?J.q:(C[e>>2]=Ac,yc[Ac]=0,Ac++,0)},___unlock:function(){},_emscripten_set_main_loop:Jc,_pthread_setspecific:function(e,t){return e in yc?(yc[e]=t,0):J.q},___lock:function(){},_abort:function(){e.abort()},_pthread_cleanup_push:pb,_time:function(e){var t=Date.now()/1e3|0;return e&&(C[e>>2]=t),t},___syscall140:function(e,t){wc=t;try{var r=xc(),i=X(),n=X(),o=X(),a=X();return assert(0===i),nc(r,n,a),C[o>>2]=r.position,r.na&&0===n&&0===a&&(r.na=null),0}catch(e){return void 0!==vc&&e instanceof L||x(e),-e.S}},___syscall146:function(e,t){wc=t;try{var r,i=xc(),n=X();e:{for(var o=X(),a=0,s=0;s<o;s++){var u=oc(i,y,C[n+8*s>>2],C[n+(8*s+4)>>2],void 0);if(u<0){r=-1;break e}a+=u}r=a}return r}catch(e){return void 0!==vc&&e instanceof L||x(e),-e.S}},STACKTOP:m,STACK_MAX:Va,tempDoublePtr:mb,ABORT:na,cttz_i8:qd};var Z=function(e,t,r){"use asm";var i=e.Int8Array;var n=e.Int16Array;var o=e.Int32Array;var a=e.Uint8Array;var s=e.Uint16Array;var u=e.Uint32Array;var c=e.Float32Array;var l=e.Float64Array;var de=new i(r);var $=new n(r);var pe=new o(r);var ve=new a(r);var me=new s(r);var f=new u(r);var h=new c(r);var ee=new l(r);var d=e.byteLength;var be=t.STACKTOP|0;var p=t.STACK_MAX|0;var te=t.tempDoublePtr|0;var v=t.ABORT|0;var m=t.cttz_i8|0;var b=0;var y=0;var g=0;var _=0;var w=e.NaN,x=e.Infinity;var T=0,S=0,M=0,P=0,E=0.0,k=0,C=0,A=0,O=0.0;var re=0;var I=0;var R=0;var D=0;var L=0;var j=0;var F=0;var B=0;var N=0;var U=0;var z=e.Math.floor;var X=e.Math.abs;var W=e.Math.sqrt;var q=e.Math.pow;var H=e.Math.cos;var G=e.Math.sin;var V=e.Math.tan;var Y=e.Math.acos;var J=e.Math.asin;var K=e.Math.atan;var Z=e.Math.atan2;var Q=e.Math.exp;var ie=e.Math.log;var ne=e.Math.ceil;var ye=e.Math.imul;var oe=e.Math.min;var ae=e.Math.clz32;var se=t.abort;var ue=t.assert;var ce=t.invoke_iiii;var le=t.invoke_viiiii;var fe=t.invoke_vi;var he=t.invoke_ii;var ge=t.invoke_viii;var _e=t.invoke_v;var we=t.invoke_viiiiii;var xe=t.invoke_iiiiii;var Te=t.invoke_viiii;var Se=t._pthread_cleanup_pop;var Me=t.___syscall54;var Pe=t.___syscall6;var Ee=t._emscripten_set_main_loop_timing;var ke=t.__ZSt18uncaught_exceptionv;var Ce=t.___setErrNo;var Ae=t._sbrk;var Oe=t.___cxa_begin_catch;var Ie=t._emscripten_memcpy_big;var Re=t._sysconf;var De=t._pthread_getspecific;var Le=t._pthread_self;var je=t._pthread_once;var Fe=t._pthread_key_create;var Be=t.___unlock;var Ne=t._emscripten_set_main_loop;var Ue=t._pthread_setspecific;var ze=t.___lock;var Xe=t._abort;var We=t._pthread_cleanup_push;var qe=t._time;var He=t.___syscall140;var Ge=t.___syscall146;var Ve=0.0;function Ye(e){if(d(e)&16777215||d(e)<=16777215||d(e)>2147483648)return false;de=new i(e);$=new n(e);pe=new o(e);ve=new a(e);me=new s(e);f=new u(e);h=new c(e);ee=new l(e);r=e;return true}function Je(e){e=e|0;var t=0;t=be;be=be+e|0;be=be+15&-16;return t|0}function Ke(){return be|0}function Ze(e){e=e|0;be=e}function Qe(e,t){e=e|0;t=t|0;be=e;p=t}function $e(e,t){e=e|0;t=t|0;if(!b){b=e;y=t}}function et(e){e=e|0;de[te>>0]=de[e>>0];de[te+1>>0]=de[e+1>>0];de[te+2>>0]=de[e+2>>0];de[te+3>>0]=de[e+3>>0]}function tt(e){e=e|0;de[te>>0]=de[e>>0];de[te+1>>0]=de[e+1>>0];de[te+2>>0]=de[e+2>>0];de[te+3>>0]=de[e+3>>0];de[te+4>>0]=de[e+4>>0];de[te+5>>0]=de[e+5>>0];de[te+6>>0]=de[e+6>>0];de[te+7>>0]=de[e+7>>0]}function rt(e){e=e|0;re=e}function it(){return re|0}function nt(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0;v=be;be=be+608|0;h=v+88|0;f=v+72|0;u=v+64|0;s=v+48|0;a=v+24|0;o=v;l=v+96|0;d=v+92|0;c=e+4|0;p=e+8|0;if((pe[c>>2]|0)>>>0>(pe[p>>2]|0)>>>0){pe[o>>2]=1154;pe[o+4>>2]=2120;pe[o+8>>2]=1133;_r(l,1100,o)|0;gr(l,v+16|0)|0}if((2147418112/(i>>>0)|0)>>>0<=t>>>0){pe[a>>2]=1154;pe[a+4>>2]=2121;pe[a+8>>2]=1169;_r(l,1100,a)|0;gr(l,v+40|0)|0}a=pe[p>>2]|0;if(a>>>0>=t>>>0){p=1;be=v;return p|0}do{if(r){if(t){o=t+-1|0;if(!(o&t)){o=11;break}else t=o}else t=-1;t=t>>>16|t;t=t>>>8|t;t=t>>>4|t;t=t>>>2|t;t=(t>>>1|t)+1|0;o=10}else o=10}while(0);if((o|0)==10)if(!t){t=0;o=12}else o=11;if((o|0)==11)if(t>>>0<=a>>>0)o=12;if((o|0)==12){pe[s>>2]=1154;pe[s+4>>2]=2130;pe[s+8>>2]=1217;_r(l,1100,s)|0;gr(l,u)|0}r=ye(t,i)|0;do{if(!n){o=ot(pe[e>>2]|0,r,d,1)|0;if(!o){p=0;be=v;return p|0}else{pe[e>>2]=o;break}}else{a=at(r,d)|0;if(!a){p=0;be=v;return p|0}Ai[n&0](a,pe[e>>2]|0,pe[c>>2]|0);o=pe[e>>2]|0;do{if(o)if(!(o&7)){Ri[pe[104>>2]&1](o,0,0,1,pe[27]|0)|0;break}else{pe[f>>2]=1154;pe[f+4>>2]=2499;pe[f+8>>2]=1516;_r(l,1100,f)|0;gr(l,h)|0;break}}while(0);pe[e>>2]=a}}while(0);o=pe[d>>2]|0;if(o>>>0>r>>>0)t=(o>>>0)/(i>>>0)|0;pe[p>>2]=t;p=1;be=v;return p|0}function ot(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,o=0,a=0,s=0,u=0,c=0;c=be;be=be+592|0;u=c+48|0;o=c+24|0;n=c;s=c+72|0;a=c+68|0;if(e&7){pe[n>>2]=1154;pe[n+4>>2]=2499;pe[n+8>>2]=1494;_r(s,1100,n)|0;gr(s,c+16|0)|0;u=0;be=c;return u|0}if(t>>>0>2147418112){pe[o>>2]=1154;pe[o+4>>2]=2499;pe[o+8>>2]=1387;_r(s,1100,o)|0;gr(s,c+40|0)|0;u=0;be=c;return u|0}pe[a>>2]=t;i=Ri[pe[104>>2]&1](e,t,a,i,pe[27]|0)|0;if(r)pe[r>>2]=pe[a>>2];if(!(i&7)){u=i;be=c;return u|0}pe[u>>2]=1154;pe[u+4>>2]=2551;pe[u+8>>2]=1440;_r(s,1100,u)|0;gr(s,c+64|0)|0;u=i;be=c;return u|0}function at(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,u=0;u=be;be=be+592|0;a=u+48|0;s=u+24|0;r=u;o=u+72|0;n=u+68|0;i=e+3&-4;i=(i|0)!=0?i:4;if(i>>>0>2147418112){pe[r>>2]=1154;pe[r+4>>2]=2499;pe[r+8>>2]=1387;_r(o,1100,r)|0;gr(o,u+16|0)|0;s=0;be=u;return s|0}pe[n>>2]=i;r=Ri[pe[104>>2]&1](0,i,n,1,pe[27]|0)|0;e=pe[n>>2]|0;if(t)pe[t>>2]=e;if((r|0)==0|e>>>0<i>>>0){pe[s>>2]=1154;pe[s+4>>2]=2499;pe[s+8>>2]=1413;_r(o,1100,s)|0;gr(o,u+40|0)|0;s=0;be=u;return s|0}if(!(r&7)){s=r;be=u;return s|0}pe[a>>2]=1154;pe[a+4>>2]=2526;pe[a+8>>2]=1440;_r(o,1100,a)|0;gr(o,u+64|0)|0;s=r;be=u;return s|0}function st(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0,g=0,_=0,w=0,x=0,T=0,S=0,M=0,P=0,E=0,k=0,C=0,A=0,O=0,I=0,R=0,D=0,L=0,j=0,F=0,B=0;B=be;be=be+960|0;L=B+232|0;D=B+216|0;R=B+208|0;I=B+192|0;O=B+184|0;A=B+168|0;C=B+160|0;k=B+144|0;M=B+136|0;S=B+120|0;T=B+112|0;x=B+96|0;g=B+88|0;y=B+72|0;b=B+64|0;m=B+48|0;f=B+40|0;d=B+24|0;h=B+16|0;l=B;E=B+440|0;j=B+376|0;F=B+304|0;v=B+236|0;if((t|0)==0|i>>>0>11){e=0;be=B;return e|0}pe[e>>2]=t;n=F;o=n+68|0;do{pe[n>>2]=0;n=n+4|0}while((n|0)<(o|0));o=0;do{n=de[r+o>>0]|0;if(n<<24>>24){P=F+((n&255)<<2)|0;pe[P>>2]=(pe[P>>2]|0)+1}o=o+1|0}while((o|0)!=(t|0));o=0;c=1;a=0;s=-1;u=0;while(1){n=pe[F+(c<<2)>>2]|0;if(!n)pe[e+28+(c+-1<<2)>>2]=0;else{P=c+-1|0;pe[j+(P<<2)>>2]=o;o=n+o|0;w=16-c|0;pe[e+28+(P<<2)>>2]=(o+-1<<w|(1<<w)+-1)+1;pe[e+96+(P<<2)>>2]=u;pe[v+(c<<2)>>2]=u;a=a>>>0>c>>>0?a:c;s=s>>>0<c>>>0?s:c;u=n+u|0}c=c+1|0;if((c|0)==17){P=a;break}else o=o<<1}pe[e+4>>2]=u;o=e+172|0;do{if(u>>>0>(pe[o>>2]|0)>>>0){pe[o>>2]=u;if(u){n=u+-1|0;if(n&u)p=14}else{n=-1;p=14}if((p|0)==14){w=n>>>16|n;w=w>>>8|w;w=w>>>4|w;w=w>>>2|w;w=(w>>>1|w)+1|0;pe[o>>2]=w>>>0>t>>>0?t:w}a=e+176|0;n=pe[a>>2]|0;do{if(n){w=pe[n+-4>>2]|0;n=n+-8|0;if(!((w|0)!=0?(w|0)==(~pe[n>>2]|0):0)){pe[l>>2]=1154;pe[l+4>>2]=644;pe[l+8>>2]=1863;_r(E,1100,l)|0;gr(E,h)|0}if(!(n&7)){Ri[pe[104>>2]&1](n,0,0,1,pe[27]|0)|0;break}else{pe[d>>2]=1154;pe[d+4>>2]=2499;pe[d+8>>2]=1516;_r(E,1100,d)|0;gr(E,f)|0;break}}}while(0);o=pe[o>>2]|0;o=(o|0)!=0?o:1;n=at((o<<1)+8|0,0)|0;if(!n){pe[a>>2]=0;n=0;break}else{pe[n+4>>2]=o;pe[n>>2]=~o;pe[a>>2]=n+8;p=25;break}}else p=25}while(0);e:do{if((p|0)==25){w=e+24|0;de[w>>0]=s;de[e+25>>0]=P;o=e+176|0;a=0;do{_=de[r+a>>0]|0;n=_&255;if(_<<24>>24){if(!(pe[F+(n<<2)>>2]|0)){pe[m>>2]=1154;pe[m+4>>2]=2273;pe[m+8>>2]=1261;_r(E,1100,m)|0;gr(E,b)|0}_=v+(n<<2)|0;n=pe[_>>2]|0;pe[_>>2]=n+1;if(n>>>0>=u>>>0){pe[y>>2]=1154;pe[y+4>>2]=2277;pe[y+8>>2]=1274;_r(E,1100,y)|0;gr(E,g)|0}$[(pe[o>>2]|0)+(n<<1)>>1]=a}a=a+1|0}while((a|0)!=(t|0));n=de[w>>0]|0;g=(n&255)>>>0<i>>>0?i:0;_=e+8|0;pe[_>>2]=g;y=(g|0)!=0;if(y){b=1<<g;n=e+164|0;do{if(b>>>0>(pe[n>>2]|0)>>>0){pe[n>>2]=b;a=e+168|0;n=pe[a>>2]|0;do{if(n){m=pe[n+-4>>2]|0;n=n+-8|0;if(!((m|0)!=0?(m|0)==(~pe[n>>2]|0):0)){pe[x>>2]=1154;pe[x+4>>2]=644;pe[x+8>>2]=1863;_r(E,1100,x)|0;gr(E,T)|0}if(!(n&7)){Ri[pe[104>>2]&1](n,0,0,1,pe[27]|0)|0;break}else{pe[S>>2]=1154;pe[S+4>>2]=2499;pe[S+8>>2]=1516;_r(E,1100,S)|0;gr(E,M)|0;break}}}while(0);n=b<<2;o=at(n+8|0,0)|0;if(!o){pe[a>>2]=0;n=0;break e}else{M=o+8|0;pe[o+4>>2]=b;pe[o>>2]=~b;pe[a>>2]=M;o=M;break}}else{o=e+168|0;n=b<<2;a=o;o=pe[o>>2]|0}}while(0);Yr(o|0,-1,n|0)|0;p=e+176|0;m=1;do{if(pe[F+(m<<2)>>2]|0){t=g-m|0;v=1<<t;o=m+-1|0;s=pe[j+(o<<2)>>2]|0;if(o>>>0>=16){pe[k>>2]=1154;pe[k+4>>2]=1953;pe[k+8>>2]=1737;_r(E,1100,k)|0;gr(E,C)|0}n=pe[e+28+(o<<2)>>2]|0;if(!n)d=-1;else d=(n+-1|0)>>>(16-m|0);if(s>>>0<=d>>>0){f=(pe[e+96+(o<<2)>>2]|0)-s|0;h=m<<16;do{n=me[(pe[p>>2]|0)+(f+s<<1)>>1]|0;if((ve[r+n>>0]|0|0)!=(m|0)){pe[A>>2]=1154;pe[A+4>>2]=2319;pe[A+8>>2]=1303;_r(E,1100,A)|0;gr(E,O)|0}l=s<<t;o=n|h;c=0;do{u=c+l|0;if(u>>>0>=b>>>0){pe[I>>2]=1154;pe[I+4>>2]=2325;pe[I+8>>2]=1337;_r(E,1100,I)|0;gr(E,R)|0}n=pe[a>>2]|0;if((pe[n+(u<<2)>>2]|0)!=-1){pe[D>>2]=1154;pe[D+4>>2]=2327;pe[D+8>>2]=1360;_r(E,1100,D)|0;gr(E,L)|0;n=pe[a>>2]|0}pe[n+(u<<2)>>2]=o;c=c+1|0}while(c>>>0<v>>>0);s=s+1|0}while(s>>>0<=d>>>0)}}m=m+1|0}while(g>>>0>=m>>>0);n=de[w>>0]|0}o=e+96|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j>>2]|0);o=e+100|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+4>>2]|0);o=e+104|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+8>>2]|0);o=e+108|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+12>>2]|0);o=e+112|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+16>>2]|0);o=e+116|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+20>>2]|0);o=e+120|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+24>>2]|0);o=e+124|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+28>>2]|0);o=e+128|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+32>>2]|0);o=e+132|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+36>>2]|0);o=e+136|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+40>>2]|0);o=e+140|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+44>>2]|0);o=e+144|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+48>>2]|0);o=e+148|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+52>>2]|0);o=e+152|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+56>>2]|0);o=e+156|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+60>>2]|0);o=e+16|0;pe[o>>2]=0;a=e+20|0;pe[a>>2]=n&255;t:do{if(y){while(1){if(!i)break t;n=i+-1|0;if(!(pe[F+(i<<2)>>2]|0))i=n;else break}pe[o>>2]=pe[e+28+(n<<2)>>2];n=g+1|0;pe[a>>2]=n;if(n>>>0<=P>>>0){while(1){if(pe[F+(n<<2)>>2]|0)break;n=n+1|0;if(n>>>0>P>>>0)break t}pe[a>>2]=n}}}while(0);pe[e+92>>2]=-1;pe[e+160>>2]=1048575;pe[e+12>>2]=32-(pe[_>>2]|0);n=1}}while(0);e=n;be=B;return e|0}function ut(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0;if(!e){n=Ur(t)|0;if(!r){r=n;return r|0}if(!n)o=0;else o=Wr(n)|0;pe[r>>2]=o;r=n;return r|0}if(!t){zr(e);if(!r){r=0;return r|0}pe[r>>2]=0;r=0;return r|0}n=Xr(e,t)|0;o=(n|0)!=0;if(o|i^1)o=o?n:e;else{n=Xr(e,t)|0;o=(n|0)==0?e:n}if(!r){r=n;return r|0}t=Wr(o)|0;pe[r>>2]=t;r=n;return r|0}function ct(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;if(!((e|0)!=0&t>>>0>73&(r|0)!=0)){r=0;return r|0}if((pe[r>>2]|0)!=40|t>>>0<74){r=0;return r|0}if(((ve[e>>0]|0)<<8|(ve[e+1>>0]|0)|0)!=18552){r=0;return r|0}if(((ve[e+2>>0]|0)<<8|(ve[e+3>>0]|0))>>>0<74){r=0;return r|0}if(((ve[e+7>>0]|0)<<16|(ve[e+6>>0]|0)<<24|(ve[e+8>>0]|0)<<8|(ve[e+9>>0]|0))>>>0>t>>>0){r=0;return r|0}pe[r+4>>2]=(ve[e+12>>0]|0)<<8|(ve[e+13>>0]|0);pe[r+8>>2]=(ve[e+14>>0]|0)<<8|(ve[e+15>>0]|0);pe[r+12>>2]=ve[e+16>>0];pe[r+16>>2]=ve[e+17>>0];t=e+18|0;i=r+32|0;pe[i>>2]=ve[t>>0];pe[i+4>>2]=0;t=de[t>>0]|0;pe[r+20>>2]=t<<24>>24==0|t<<24>>24==9?8:16;pe[r+24>>2]=(ve[e+26>>0]|0)<<16|(ve[e+25>>0]|0)<<24|(ve[e+27>>0]|0)<<8|(ve[e+28>>0]|0);pe[r+28>>2]=(ve[e+30>>0]|0)<<16|(ve[e+29>>0]|0)<<24|(ve[e+31>>0]|0)<<8|(ve[e+32>>0]|0);r=1;return r|0}function lt(e){e=e|0;Oe(e|0)|0;zt()}function ft(e){e=e|0;var t=0,r=0,i=0,n=0,o=0;o=be;be=be+544|0;n=o;i=o+24|0;t=pe[e+20>>2]|0;if(t)ht(t);t=e+4|0;r=pe[t>>2]|0;if(!r){n=e+16|0;de[n>>0]=0;be=o;return}if(!(r&7))Ri[pe[104>>2]&1](r,0,0,1,pe[27]|0)|0;else{pe[n>>2]=1154;pe[n+4>>2]=2499;pe[n+8>>2]=1516;_r(i,1100,n)|0;gr(i,o+16|0)|0}pe[t>>2]=0;pe[e+8>>2]=0;pe[e+12>>2]=0;n=e+16|0;de[n>>0]=0;be=o;return}function ht(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0;d=be;be=be+640|0;h=d+112|0;f=d+96|0;l=d+88|0;c=d+72|0;u=d+64|0;s=d+48|0;i=d+40|0;o=d+24|0;n=d+16|0;r=d;a=d+120|0;if(!e){be=d;return}t=pe[e+168>>2]|0;do{if(t){p=pe[t+-4>>2]|0;t=t+-8|0;if(!((p|0)!=0?(p|0)==(~pe[t>>2]|0):0)){pe[r>>2]=1154;pe[r+4>>2]=644;pe[r+8>>2]=1863;_r(a,1100,r)|0;gr(a,n)|0}if(!(t&7)){Ri[pe[104>>2]&1](t,0,0,1,pe[27]|0)|0;break}else{pe[o>>2]=1154;pe[o+4>>2]=2499;pe[o+8>>2]=1516;_r(a,1100,o)|0;gr(a,i)|0;break}}}while(0);t=pe[e+176>>2]|0;do{if(t){p=pe[t+-4>>2]|0;t=t+-8|0;if(!((p|0)!=0?(p|0)==(~pe[t>>2]|0):0)){pe[s>>2]=1154;pe[s+4>>2]=644;pe[s+8>>2]=1863;_r(a,1100,s)|0;gr(a,u)|0}if(!(t&7)){Ri[pe[104>>2]&1](t,0,0,1,pe[27]|0)|0;break}else{pe[c>>2]=1154;pe[c+4>>2]=2499;pe[c+8>>2]=1516;_r(a,1100,c)|0;gr(a,l)|0;break}}}while(0);if(!(e&7)){Ri[pe[104>>2]&1](e,0,0,1,pe[27]|0)|0;be=d;return}else{pe[f>>2]=1154;pe[f+4>>2]=2499;pe[f+8>>2]=1516;_r(a,1100,f)|0;gr(a,h)|0;be=d;return}}function dt(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0;l=be;be=be+560|0;a=l+40|0;s=l+24|0;t=l;o=l+48|0;n=e+8|0;r=pe[n>>2]|0;if((r+-1|0)>>>0>=8192){pe[t>>2]=1154;pe[t+4>>2]=2997;pe[t+8>>2]=1541;_r(o,1100,t)|0;gr(o,l+16|0)|0}pe[e>>2]=r;i=e+20|0;t=pe[i>>2]|0;if(!t){t=at(180,0)|0;if(!t)t=0;else{c=t+164|0;pe[c>>2]=0;pe[c+4>>2]=0;pe[c+8>>2]=0;pe[c+12>>2]=0}pe[i>>2]=t;c=t;u=pe[e>>2]|0}else{c=t;u=r}if(!(pe[n>>2]|0)){pe[s>>2]=1154;pe[s+4>>2]=903;pe[s+8>>2]=1781;_r(o,1100,s)|0;gr(o,a)|0;o=pe[e>>2]|0}else o=u;n=pe[e+4>>2]|0;if(o>>>0>16){r=o;t=0}else{e=0;c=st(c,u,n,e)|0;be=l;return c|0}while(1){i=t+1|0;if(r>>>0>3){r=r>>>1;t=i}else{r=i;break}}e=t+2+((r|0)!=32&1<<r>>>0<o>>>0&1)|0;e=e>>>0<11?e&255:11;c=st(c,u,n,e)|0;be=l;return c|0}function pt(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0,g=0,_=0,w=0,x=0,T=0,S=0,M=0,P=0,E=0,k=0,C=0,A=0,O=0,I=0,R=0,D=0,L=0;L=be;be=be+800|0;A=L+256|0;C=L+240|0;k=L+232|0;E=L+216|0;P=L+208|0;M=L+192|0;S=L+184|0;T=L+168|0;x=L+160|0;w=L+144|0;_=L+136|0;g=L+120|0;y=L+112|0;b=L+96|0;m=L+88|0;v=L+72|0;f=L+64|0;l=L+48|0;s=L+40|0;u=L+24|0;o=L+16|0;n=L;R=L+288|0;D=L+264|0;O=vt(e,14)|0;if(!O){pe[t>>2]=0;r=t+4|0;i=pe[r>>2]|0;if(i){if(!(i&7))Ri[pe[104>>2]&1](i,0,0,1,pe[27]|0)|0;else{pe[n>>2]=1154;pe[n+4>>2]=2499;pe[n+8>>2]=1516;_r(R,1100,n)|0;gr(R,o)|0}pe[r>>2]=0;pe[t+8>>2]=0;pe[t+12>>2]=0}de[t+16>>0]=0;r=t+20|0;i=pe[r>>2]|0;if(!i){t=1;be=L;return t|0}ht(i);pe[r>>2]=0;t=1;be=L;return t|0}d=t+4|0;p=t+8|0;r=pe[p>>2]|0;if((r|0)!=(O|0)){if(r>>>0<=O>>>0){do{if((pe[t+12>>2]|0)>>>0<O>>>0){if(nt(d,O,(r+1|0)==(O|0),1,0)|0){r=pe[p>>2]|0;break}de[t+16>>0]=1;t=0;be=L;return t|0}}while(0);Yr((pe[d>>2]|0)+r|0,0,O-r|0)|0}pe[p>>2]=O}Yr(pe[d>>2]|0,0,O|0)|0;h=e+20|0;r=pe[h>>2]|0;if((r|0)<5){o=e+4|0;a=e+8|0;n=e+16|0;do{i=pe[o>>2]|0;if((i|0)==(pe[a>>2]|0))i=0;else{pe[o>>2]=i+1;i=ve[i>>0]|0}r=r+8|0;pe[h>>2]=r;if((r|0)>=33){pe[u>>2]=1154;pe[u+4>>2]=3199;pe[u+8>>2]=1650;_r(R,1100,u)|0;gr(R,s)|0;r=pe[h>>2]|0}i=i<<32-r|pe[n>>2];pe[n>>2]=i}while((r|0)<5)}else{i=e+16|0;n=i;i=pe[i>>2]|0}c=i>>>27;pe[n>>2]=i<<5;pe[h>>2]=r+-5;if((c+-1|0)>>>0>20){t=0;be=L;return t|0}pe[D+20>>2]=0;pe[D>>2]=0;pe[D+4>>2]=0;pe[D+8>>2]=0;pe[D+12>>2]=0;de[D+16>>0]=0;r=D+4|0;i=D+8|0;e:do{if(nt(r,21,0,1,0)|0){s=pe[i>>2]|0;u=pe[r>>2]|0;Yr(u+s|0,0,21-s|0)|0;pe[i>>2]=21;if(c){n=e+4|0;o=e+8|0;a=e+16|0;s=0;do{r=pe[h>>2]|0;if((r|0)<3)do{i=pe[n>>2]|0;if((i|0)==(pe[o>>2]|0))i=0;else{pe[n>>2]=i+1;i=ve[i>>0]|0}r=r+8|0;pe[h>>2]=r;if((r|0)>=33){pe[l>>2]=1154;pe[l+4>>2]=3199;pe[l+8>>2]=1650;_r(R,1100,l)|0;gr(R,f)|0;r=pe[h>>2]|0}i=i<<32-r|pe[a>>2];pe[a>>2]=i}while((r|0)<3);else i=pe[a>>2]|0;pe[a>>2]=i<<3;pe[h>>2]=r+-3;de[u+(ve[1611+s>>0]|0)>>0]=i>>>29;s=s+1|0}while((s|0)!=(c|0))}if(dt(D)|0){s=e+4|0;u=e+8|0;c=e+16|0;i=0;t:while(1){a=O-i|0;r=mt(e,D)|0;r:do{if(r>>>0<17){if((pe[p>>2]|0)>>>0<=i>>>0){pe[v>>2]=1154;pe[v+4>>2]=903;pe[v+8>>2]=1781;_r(R,1100,v)|0;gr(R,m)|0}de[(pe[d>>2]|0)+i>>0]=r;r=i+1|0}else switch(r|0){case 17:{r=pe[h>>2]|0;if((r|0)<3)do{n=pe[s>>2]|0;if((n|0)==(pe[u>>2]|0))n=0;else{pe[s>>2]=n+1;n=ve[n>>0]|0}r=r+8|0;pe[h>>2]=r;if((r|0)>=33){pe[b>>2]=1154;pe[b+4>>2]=3199;pe[b+8>>2]=1650;_r(R,1100,b)|0;gr(R,y)|0;r=pe[h>>2]|0}n=n<<32-r|pe[c>>2];pe[c>>2]=n}while((r|0)<3);else n=pe[c>>2]|0;pe[c>>2]=n<<3;pe[h>>2]=r+-3;r=(n>>>29)+3|0;if(r>>>0>a>>>0){r=0;break e}r=r+i|0;break r}case 18:{r=pe[h>>2]|0;if((r|0)<7)do{n=pe[s>>2]|0;if((n|0)==(pe[u>>2]|0))n=0;else{pe[s>>2]=n+1;n=ve[n>>0]|0}r=r+8|0;pe[h>>2]=r;if((r|0)>=33){pe[g>>2]=1154;pe[g+4>>2]=3199;pe[g+8>>2]=1650;_r(R,1100,g)|0;gr(R,_)|0;r=pe[h>>2]|0}n=n<<32-r|pe[c>>2];pe[c>>2]=n}while((r|0)<7);else n=pe[c>>2]|0;pe[c>>2]=n<<7;pe[h>>2]=r+-7;r=(n>>>25)+11|0;if(r>>>0>a>>>0){r=0;break e}r=r+i|0;break r}default:{if((r+-19|0)>>>0>=2){I=90;break t}o=pe[h>>2]|0;if((r|0)==19){if((o|0)<2){n=o;while(1){r=pe[s>>2]|0;if((r|0)==(pe[u>>2]|0))o=0;else{pe[s>>2]=r+1;o=ve[r>>0]|0}r=n+8|0;pe[h>>2]=r;if((r|0)>=33){pe[w>>2]=1154;pe[w+4>>2]=3199;pe[w+8>>2]=1650;_r(R,1100,w)|0;gr(R,x)|0;r=pe[h>>2]|0}n=o<<32-r|pe[c>>2];pe[c>>2]=n;if((r|0)<2)n=r;else break}}else{n=pe[c>>2]|0;r=o}pe[c>>2]=n<<2;pe[h>>2]=r+-2;o=(n>>>30)+3|0}else{if((o|0)<6){n=o;while(1){r=pe[s>>2]|0;if((r|0)==(pe[u>>2]|0))o=0;else{pe[s>>2]=r+1;o=ve[r>>0]|0}r=n+8|0;pe[h>>2]=r;if((r|0)>=33){pe[T>>2]=1154;pe[T+4>>2]=3199;pe[T+8>>2]=1650;_r(R,1100,T)|0;gr(R,S)|0;r=pe[h>>2]|0}n=o<<32-r|pe[c>>2];pe[c>>2]=n;if((r|0)<6)n=r;else break}}else{n=pe[c>>2]|0;r=o}pe[c>>2]=n<<6;pe[h>>2]=r+-6;o=(n>>>26)+7|0}if((i|0)==0|o>>>0>a>>>0){r=0;break e}r=i+-1|0;if((pe[p>>2]|0)>>>0<=r>>>0){pe[M>>2]=1154;pe[M+4>>2]=903;pe[M+8>>2]=1781;_r(R,1100,M)|0;gr(R,P)|0}n=de[(pe[d>>2]|0)+r>>0]|0;if(!(n<<24>>24)){r=0;break e}r=o+i|0;if(i>>>0>=r>>>0){r=i;break r}do{if((pe[p>>2]|0)>>>0<=i>>>0){pe[E>>2]=1154;pe[E+4>>2]=903;pe[E+8>>2]=1781;_r(R,1100,E)|0;gr(R,k)|0}de[(pe[d>>2]|0)+i>>0]=n;i=i+1|0}while((i|0)!=(r|0))}}}while(0);if(O>>>0>r>>>0)i=r;else break}if((I|0)==90){pe[C>>2]=1154;pe[C+4>>2]=3140;pe[C+8>>2]=1632;_r(R,1100,C)|0;gr(R,A)|0;r=0;break}if((O|0)==(r|0))r=dt(t)|0;else r=0}else r=0}else{de[D+16>>0]=1;r=0}}while(0);ft(D);t=r;be=L;return t|0}function vt(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0;l=be;be=be+544|0;s=l+16|0;a=l;o=l+24|0;if(!t){c=0;be=l;return c|0}if(t>>>0<=16){c=bt(e,t)|0;be=l;return c|0}u=bt(e,t+-16|0)|0;c=e+20|0;t=pe[c>>2]|0;if((t|0)<16){i=e+4|0;n=e+8|0;r=e+16|0;do{e=pe[i>>2]|0;if((e|0)==(pe[n>>2]|0))e=0;else{pe[i>>2]=e+1;e=ve[e>>0]|0}t=t+8|0;pe[c>>2]=t;if((t|0)>=33){pe[a>>2]=1154;pe[a+4>>2]=3199;pe[a+8>>2]=1650;_r(o,1100,a)|0;gr(o,s)|0;t=pe[c>>2]|0}e=e<<32-t|pe[r>>2];pe[r>>2]=e}while((t|0)<16)}else{e=e+16|0;r=e;e=pe[e>>2]|0}pe[r>>2]=e<<16;pe[c>>2]=t+-16;c=e>>>16|u<<16;be=l;return c|0}function mt(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0,g=0;g=be;be=be+608|0;v=g+88|0;p=g+72|0;h=g+64|0;f=g+48|0;l=g+40|0;d=g+24|0;c=g+16|0;u=g;b=g+96|0;m=pe[t+20>>2]|0;y=e+20|0;s=pe[y>>2]|0;do{if((s|0)<24){a=e+4|0;i=pe[a>>2]|0;n=pe[e+8>>2]|0;r=i>>>0<n>>>0;if((s|0)>=16){if(r){pe[a>>2]=i+1;r=ve[i>>0]|0}else r=0;pe[y>>2]=s+8;a=e+16|0;o=r<<24-s|pe[a>>2];pe[a>>2]=o;break}if(r){o=(ve[i>>0]|0)<<8;r=i+1|0}else{o=0;r=i}if(r>>>0<n>>>0){i=ve[r>>0]|0;r=r+1|0}else i=0;pe[a>>2]=r;pe[y>>2]=s+16;a=e+16|0;o=(i|o)<<16-s|pe[a>>2];pe[a>>2]=o}else{o=e+16|0;a=o;o=pe[o>>2]|0}}while(0);n=(o>>>16)+1|0;do{if(n>>>0<=(pe[m+16>>2]|0)>>>0){i=pe[(pe[m+168>>2]|0)+(o>>>(32-(pe[m+8>>2]|0)|0)<<2)>>2]|0;if((i|0)==-1){pe[u>>2]=1154;pe[u+4>>2]=3244;pe[u+8>>2]=1677;_r(b,1100,u)|0;gr(b,c)|0}r=i&65535;i=i>>>16;if((pe[t+8>>2]|0)>>>0<=r>>>0){pe[d>>2]=1154;pe[d+4>>2]=902;pe[d+8>>2]=1781;_r(b,1100,d)|0;gr(b,l)|0}if((ve[(pe[t+4>>2]|0)+r>>0]|0|0)!=(i|0)){pe[f>>2]=1154;pe[f+4>>2]=3248;pe[f+8>>2]=1694;_r(b,1100,f)|0;gr(b,h)|0}}else{i=pe[m+20>>2]|0;while(1){r=i+-1|0;if(n>>>0>(pe[m+28+(r<<2)>>2]|0)>>>0)i=i+1|0;else break}r=(o>>>(32-i|0))+(pe[m+96+(r<<2)>>2]|0)|0;if(r>>>0<(pe[t>>2]|0)>>>0){r=me[(pe[m+176>>2]|0)+(r<<1)>>1]|0;break}pe[p>>2]=1154;pe[p+4>>2]=3266;pe[p+8>>2]=1632;_r(b,1100,p)|0;gr(b,v)|0;y=0;be=g;return y|0}}while(0);pe[a>>2]=pe[a>>2]<<i;pe[y>>2]=(pe[y>>2]|0)-i;y=r;be=g;return y|0}function bt(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0;l=be;be=be+560|0;s=l+40|0;u=l+24|0;r=l;a=l+48|0;if(t>>>0>=33){pe[r>>2]=1154;pe[r+4>>2]=3190;pe[r+8>>2]=1634;_r(a,1100,r)|0;gr(a,l+16|0)|0}c=e+20|0;r=pe[c>>2]|0;if((r|0)>=(t|0)){o=e+16|0;a=o;o=pe[o>>2]|0;s=r;u=32-t|0;u=o>>>u;o=o<<t;pe[a>>2]=o;t=s-t|0;pe[c>>2]=t;be=l;return u|0}n=e+4|0;o=e+8|0;i=e+16|0;do{e=pe[n>>2]|0;if((e|0)==(pe[o>>2]|0))e=0;else{pe[n>>2]=e+1;e=ve[e>>0]|0}r=r+8|0;pe[c>>2]=r;if((r|0)>=33){pe[u>>2]=1154;pe[u+4>>2]=3199;pe[u+8>>2]=1650;_r(a,1100,u)|0;gr(a,s)|0;r=pe[c>>2]|0}e=e<<32-r|pe[i>>2];pe[i>>2]=e}while((r|0)<(t|0));u=32-t|0;u=e>>>u;s=e<<t;pe[i>>2]=s;t=r-t|0;pe[c>>2]=t;be=l;return u|0}function yt(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0;p=be;be=be+544|0;h=p+16|0;f=p;l=p+24|0;if((e|0)==0|t>>>0<62){d=0;be=p;return d|0}c=at(300,0)|0;if(!c){d=0;be=p;return d|0}pe[c>>2]=519686845;r=c+4|0;pe[r>>2]=0;i=c+8|0;pe[i>>2]=0;u=c+88|0;n=c+136|0;o=c+160|0;a=u;s=a+44|0;do{pe[a>>2]=0;a=a+4|0}while((a|0)<(s|0));de[u+44>>0]=0;v=c+184|0;a=c+208|0;s=c+232|0;m=c+252|0;pe[m>>2]=0;pe[m+4>>2]=0;pe[m+8>>2]=0;de[m+12>>0]=0;m=c+268|0;pe[m>>2]=0;pe[m+4>>2]=0;pe[m+8>>2]=0;de[m+12>>0]=0;m=c+284|0;pe[m>>2]=0;pe[m+4>>2]=0;pe[m+8>>2]=0;de[m+12>>0]=0;pe[n>>2]=0;pe[n+4>>2]=0;pe[n+8>>2]=0;pe[n+12>>2]=0;pe[n+16>>2]=0;de[n+20>>0]=0;pe[o>>2]=0;pe[o+4>>2]=0;pe[o+8>>2]=0;pe[o+12>>2]=0;pe[o+16>>2]=0;de[o+20>>0]=0;pe[v>>2]=0;pe[v+4>>2]=0;pe[v+8>>2]=0;pe[v+12>>2]=0;pe[v+16>>2]=0;de[v+20>>0]=0;pe[a>>2]=0;pe[a+4>>2]=0;pe[a+8>>2]=0;pe[a+12>>2]=0;pe[a+16>>2]=0;de[a+20>>0]=0;pe[s>>2]=0;pe[s+4>>2]=0;pe[s+8>>2]=0;pe[s+12>>2]=0;de[s+16>>0]=0;do{if(((t>>>0>=74?((ve[e>>0]|0)<<8|(ve[e+1>>0]|0)|0)==18552:0)?((ve[e+2>>0]|0)<<8|(ve[e+3>>0]|0))>>>0>=74:0)?((ve[e+7>>0]|0)<<16|(ve[e+6>>0]|0)<<24|(ve[e+8>>0]|0)<<8|(ve[e+9>>0]|0))>>>0<=t>>>0:0){pe[u>>2]=e;pe[r>>2]=e;pe[i>>2]=t;if(Et(c)|0){r=pe[u>>2]|0;if((ve[r+39>>0]|0)<<8|(ve[r+40>>0]|0)){if(!(kt(c)|0))break;if(!(Ct(c)|0))break;r=pe[u>>2]|0}if(!((ve[r+55>>0]|0)<<8|(ve[r+56>>0]|0))){m=c;be=p;return m|0}if(At(c)|0?Ot(c)|0:0){m=c;be=p;return m|0}}}else d=7}while(0);if((d|0)==7)pe[u>>2]=0;jt(c);if(!(c&7)){Ri[pe[104>>2]&1](c,0,0,1,pe[27]|0)|0;m=0;be=p;return m|0}else{pe[f>>2]=1154;pe[f+4>>2]=2499;pe[f+8>>2]=1516;_r(l,1100,f)|0;gr(l,h)|0;m=0;be=p;return m|0}return 0}function gt(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0,a=0,s=0,u=0,c=0,l=0;l=be;be=be+544|0;c=l;u=l+24|0;o=pe[e+88>>2]|0;s=(ve[o+70+(n<<2)+1>>0]|0)<<16|(ve[o+70+(n<<2)>>0]|0)<<24|(ve[o+70+(n<<2)+2>>0]|0)<<8|(ve[o+70+(n<<2)+3>>0]|0);a=n+1|0;if(a>>>0<(ve[o+16>>0]|0)>>>0)o=(ve[o+70+(a<<2)+1>>0]|0)<<16|(ve[o+70+(a<<2)>>0]|0)<<24|(ve[o+70+(a<<2)+2>>0]|0)<<8|(ve[o+70+(a<<2)+3>>0]|0);else o=pe[e+8>>2]|0;if(o>>>0>s>>>0){u=e+4|0;u=pe[u>>2]|0;u=u+s|0;c=o-s|0;c=_t(e,u,c,t,r,i,n)|0;be=l;return c|0}pe[c>>2]=1154;pe[c+4>>2]=3704;pe[c+8>>2]=1792;_r(u,1100,c)|0;gr(u,l+16|0)|0;u=e+4|0;u=pe[u>>2]|0;u=u+s|0;c=o-s|0;c=_t(e,u,c,t,r,i,n)|0;be=l;return c|0}function _t(e,t,r,i,n,o,a){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;a=a|0;var s=0,u=0,c=0,l=0;l=pe[e+88>>2]|0;u=((ve[l+12>>0]|0)<<8|(ve[l+13>>0]|0))>>>a;c=((ve[l+14>>0]|0)<<8|(ve[l+15>>0]|0))>>>a;u=u>>>0>1?(u+3|0)>>>2:1;c=c>>>0>1?(c+3|0)>>>2:1;l=l+18|0;a=de[l>>0]|0;a=ye(a<<24>>24==0|a<<24>>24==9?8:16,u)|0;if(o)if((o&3|0)==0&a>>>0<=o>>>0)a=o;else{e=0;return e|0}if((ye(a,c)|0)>>>0>n>>>0){e=0;return e|0}o=(u+1|0)>>>1;s=(c+1|0)>>>1;if(!r){e=0;return e|0}pe[e+92>>2]=t;pe[e+96>>2]=t;pe[e+104>>2]=r;pe[e+100>>2]=t+r;pe[e+108>>2]=0;pe[e+112>>2]=0;switch(ve[l>>0]|0|0){case 0:{It(e,i,n,a,u,c,o,s)|0;e=1;return e|0}case 4:case 6:case 5:case 3:case 2:{Rt(e,i,n,a,u,c,o,s)|0;e=1;return e|0}case 9:{Dt(e,i,n,a,u,c,o,s)|0;e=1;return e|0}case 8:case 7:{Lt(e,i,n,a,u,c,o,s)|0;e=1;return e|0}default:{e=0;return e|0}}return 0}function wt(e,t){e=e|0;t=t|0;var r=0,i=0;i=be;be=be+48|0;r=i;pe[r>>2]=40;ct(e,t,r)|0;be=i;return pe[r+4>>2]|0}function xt(e,t){e=e|0;t=t|0;var r=0,i=0;i=be;be=be+48|0;r=i;pe[r>>2]=40;ct(e,t,r)|0;be=i;return pe[r+8>>2]|0}function Tt(e,t){e=e|0;t=t|0;var r=0,i=0;i=be;be=be+48|0;r=i;pe[r>>2]=40;ct(e,t,r)|0;be=i;return pe[r+12>>2]|0}function St(e,t){e=e|0;t=t|0;var r=0,i=0;i=be;be=be+48|0;r=i;pe[r>>2]=40;ct(e,t,r)|0;be=i;return pe[r+32>>2]|0}function Mt(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0,a=0,s=0,u=0,c=0;u=be;be=be+576|0;a=u+56|0;o=u+40|0;n=u+64|0;c=u;pe[c>>2]=40;ct(e,t,c)|0;i=(((pe[c+4>>2]|0)>>>r)+3|0)>>>2;t=(((pe[c+8>>2]|0)>>>r)+3|0)>>>2;r=c+32|0;e=pe[r+4>>2]|0;do{switch(pe[r>>2]|0){case 0:{if(!e)e=8;else s=13;break}case 1:{if(!e)s=12;else s=13;break}case 2:{if(!e)s=12;else s=13;break}case 3:{if(!e)s=12;else s=13;break}case 4:{if(!e)s=12;else s=13;break}case 5:{if(!e)s=12;else s=13;break}case 6:{if(!e)s=12;else s=13;break}case 7:{if(!e)s=12;else s=13;break}case 8:{if(!e)s=12;else s=13;break}case 9:{if(!e)e=8;else s=13;break}default:s=13}}while(0);if((s|0)==12)e=16;else if((s|0)==13){pe[o>>2]=1154;pe[o+4>>2]=2663;pe[o+8>>2]=1535;_r(n,1100,o)|0;gr(n,a)|0;e=0}c=ye(ye(t,i)|0,e)|0;be=u;return c|0}function Pt(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0;p=be;be=be+608|0;h=p+80|0;d=p+64|0;s=p+56|0;a=p+40|0;l=p+88|0;v=p;f=p+84|0;pe[v>>2]=40;ct(e,t,v)|0;u=(((pe[v+4>>2]|0)>>>n)+3|0)>>>2;v=v+32|0;o=pe[v+4>>2]|0;do{switch(pe[v>>2]|0){case 0:{if(!o)o=8;else c=13;break}case 1:{if(!o)c=12;else c=13;break}case 2:{if(!o)c=12;else c=13;break}case 3:{if(!o)c=12;else c=13;break}case 4:{if(!o)c=12;else c=13;break}case 5:{if(!o)c=12;else c=13;break}case 6:{if(!o)c=12;else c=13;break}case 7:{if(!o)c=12;else c=13;break}case 8:{if(!o)c=12;else c=13;break}case 9:{if(!o)o=8;else c=13;break}default:c=13}}while(0);if((c|0)==12)o=16;else if((c|0)==13){pe[a>>2]=1154;pe[a+4>>2]=2663;pe[a+8>>2]=1535;_r(l,1100,a)|0;gr(l,s)|0;o=0}s=ye(o,u)|0;a=yt(e,t)|0;pe[f>>2]=r;o=(a|0)==0;if(!(n>>>0>15|(i>>>0<8|o))?(pe[a>>2]|0)==519686845:0)gt(a,f,i,s,n)|0;if(o){be=p;return}if((pe[a>>2]|0)!=519686845){be=p;return}jt(a);if(!(a&7)){Ri[pe[104>>2]&1](a,0,0,1,pe[27]|0)|0;be=p;return}else{pe[d>>2]=1154;pe[d+4>>2]=2499;pe[d+8>>2]=1516;_r(l,1100,d)|0;gr(l,h)|0;be=p;return}}function Et(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0;a=e+92|0;i=pe[e+4>>2]|0;o=e+88|0;n=pe[o>>2]|0;t=(ve[n+68>>0]|0)<<8|(ve[n+67>>0]|0)<<16|(ve[n+69>>0]|0);r=i+t|0;n=(ve[n+65>>0]|0)<<8|(ve[n+66>>0]|0);if(!n){e=0;return e|0}pe[a>>2]=r;pe[e+96>>2]=r;pe[e+104>>2]=n;pe[e+100>>2]=i+(n+t);pe[e+108>>2]=0;pe[e+112>>2]=0;if(!(pt(a,e+116|0)|0)){e=0;return e|0}t=pe[o>>2]|0;do{if(!((ve[t+39>>0]|0)<<8|(ve[t+40>>0]|0))){if(!((ve[t+55>>0]|0)<<8|(ve[t+56>>0]|0))){e=0;return e|0}}else{if(!(pt(a,e+140|0)|0)){e=0;return e|0}if(pt(a,e+188|0)|0){t=pe[o>>2]|0;break}else{e=0;return e|0}}}while(0);if((ve[t+55>>0]|0)<<8|(ve[t+56>>0]|0)){if(!(pt(a,e+164|0)|0)){e=0;return e|0}if(!(pt(a,e+212|0)|0)){e=0;return e|0}}e=1;return e|0}function kt(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0;p=be;be=be+592|0;u=p+16|0;s=p;a=p+72|0;d=p+24|0;i=e+88|0;t=pe[i>>2]|0;h=(ve[t+39>>0]|0)<<8|(ve[t+40>>0]|0);l=e+236|0;o=e+240|0;r=pe[o>>2]|0;if((r|0)!=(h|0)){if(r>>>0<=h>>>0){do{if((pe[e+244>>2]|0)>>>0<h>>>0){if(nt(l,h,(r+1|0)==(h|0),4,0)|0){t=pe[o>>2]|0;break}de[e+248>>0]=1;d=0;be=p;return d|0}else t=r}while(0);Yr((pe[l>>2]|0)+(t<<2)|0,0,h-t<<2|0)|0;t=pe[i>>2]|0}pe[o>>2]=h}c=e+92|0;r=pe[e+4>>2]|0;i=(ve[t+34>>0]|0)<<8|(ve[t+33>>0]|0)<<16|(ve[t+35>>0]|0);n=r+i|0;t=(ve[t+37>>0]|0)<<8|(ve[t+36>>0]|0)<<16|(ve[t+38>>0]|0);if(!t){d=0;be=p;return d|0}pe[c>>2]=n;pe[e+96>>2]=n;pe[e+104>>2]=t;pe[e+100>>2]=r+(t+i);pe[e+108>>2]=0;pe[e+112>>2]=0;pe[d+20>>2]=0;pe[d>>2]=0;pe[d+4>>2]=0;pe[d+8>>2]=0;pe[d+12>>2]=0;de[d+16>>0]=0;e=d+24|0;pe[d+44>>2]=0;pe[e>>2]=0;pe[e+4>>2]=0;pe[e+8>>2]=0;pe[e+12>>2]=0;de[e+16>>0]=0;if(pt(c,d)|0?(f=d+24|0,pt(c,f)|0):0){if(!(pe[o>>2]|0)){pe[s>>2]=1154;pe[s+4>>2]=903;pe[s+8>>2]=1781;_r(a,1100,s)|0;gr(a,u)|0}if(!h)t=1;else{i=0;n=0;o=0;t=0;a=0;e=0;s=0;r=pe[l>>2]|0;while(1){i=(mt(c,d)|0)+i&31;n=(mt(c,f)|0)+n&63;o=(mt(c,d)|0)+o&31;t=(mt(c,d)|0)+t|0;a=(mt(c,f)|0)+a&63;e=(mt(c,d)|0)+e&31;pe[r>>2]=n<<5|i<<11|o|t<<27|a<<21|e<<16;s=s+1|0;if((s|0)==(h|0)){t=1;break}else{t=t&31;r=r+4|0}}}}else t=0;ft(d+24|0);ft(d);d=t;be=p;return d|0}function Ct(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0,g=0,_=0,w=0,x=0,T=0,S=0,M=0,P=0,E=0;M=be;be=be+1024|0;s=M+16|0;a=M;o=M+504|0;S=M+480|0;x=M+284|0;T=M+88|0;w=M+24|0;n=pe[e+88>>2]|0;_=(ve[n+47>>0]|0)<<8|(ve[n+48>>0]|0);g=e+92|0;t=pe[e+4>>2]|0;r=(ve[n+42>>0]|0)<<8|(ve[n+41>>0]|0)<<16|(ve[n+43>>0]|0);i=t+r|0;n=(ve[n+45>>0]|0)<<8|(ve[n+44>>0]|0)<<16|(ve[n+46>>0]|0);if(!n){S=0;be=M;return S|0}pe[g>>2]=i;pe[e+96>>2]=i;pe[e+104>>2]=n;pe[e+100>>2]=t+(n+r);pe[e+108>>2]=0;pe[e+112>>2]=0;pe[S+20>>2]=0;pe[S>>2]=0;pe[S+4>>2]=0;pe[S+8>>2]=0;pe[S+12>>2]=0;de[S+16>>0]=0;if(pt(g,S)|0){r=0;i=-3;n=-3;while(1){pe[x+(r<<2)>>2]=i;pe[T+(r<<2)>>2]=n;t=(i|0)>2;r=r+1|0;if((r|0)==49)break;else{i=t?-3:i+1|0;n=(t&1)+n|0}}t=w;r=t+64|0;do{pe[t>>2]=0;t=t+4|0}while((t|0)<(r|0));y=e+252|0;r=e+256|0;t=pe[r>>2]|0;e:do{if((t|0)==(_|0))u=13;else{if(t>>>0<=_>>>0){do{if((pe[e+260>>2]|0)>>>0<_>>>0)if(nt(y,_,(t+1|0)==(_|0),4,0)|0){t=pe[r>>2]|0;break}else{de[e+264>>0]=1;t=0;break e}}while(0);Yr((pe[y>>2]|0)+(t<<2)|0,0,_-t<<2|0)|0}pe[r>>2]=_;u=13}}while(0);do{if((u|0)==13){if(!_){pe[a>>2]=1154;pe[a+4>>2]=903;pe[a+8>>2]=1781;_r(o,1100,a)|0;gr(o,s)|0;t=1;break}i=w+4|0;n=w+8|0;e=w+12|0;o=w+16|0;a=w+20|0;s=w+24|0;u=w+28|0;c=w+32|0;l=w+36|0;f=w+40|0;h=w+44|0;d=w+48|0;p=w+52|0;v=w+56|0;m=w+60|0;b=0;r=pe[y>>2]|0;while(1){t=0;do{P=mt(g,S)|0;y=t<<1;E=w+(y<<2)|0;pe[E>>2]=(pe[E>>2]|0)+(pe[x+(P<<2)>>2]|0)&3;y=w+((y|1)<<2)|0;pe[y>>2]=(pe[y>>2]|0)+(pe[T+(P<<2)>>2]|0)&3;t=t+1|0}while((t|0)!=8);pe[r>>2]=(ve[1725+(pe[i>>2]|0)>>0]|0)<<2|(ve[1725+(pe[w>>2]|0)>>0]|0)|(ve[1725+(pe[n>>2]|0)>>0]|0)<<4|(ve[1725+(pe[e>>2]|0)>>0]|0)<<6|(ve[1725+(pe[o>>2]|0)>>0]|0)<<8|(ve[1725+(pe[a>>2]|0)>>0]|0)<<10|(ve[1725+(pe[s>>2]|0)>>0]|0)<<12|(ve[1725+(pe[u>>2]|0)>>0]|0)<<14|(ve[1725+(pe[c>>2]|0)>>0]|0)<<16|(ve[1725+(pe[l>>2]|0)>>0]|0)<<18|(ve[1725+(pe[f>>2]|0)>>0]|0)<<20|(ve[1725+(pe[h>>2]|0)>>0]|0)<<22|(ve[1725+(pe[d>>2]|0)>>0]|0)<<24|(ve[1725+(pe[p>>2]|0)>>0]|0)<<26|(ve[1725+(pe[v>>2]|0)>>0]|0)<<28|(ve[1725+(pe[m>>2]|0)>>0]|0)<<30;b=b+1|0;if((b|0)==(_|0)){t=1;break}else r=r+4|0}}}while(0)}else t=0;ft(S);E=t;be=M;return E|0}function At(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0;h=be;be=be+560|0;u=h+16|0;s=h;a=h+48|0;f=h+24|0;n=pe[e+88>>2]|0;l=(ve[n+55>>0]|0)<<8|(ve[n+56>>0]|0);c=e+92|0;t=pe[e+4>>2]|0;r=(ve[n+50>>0]|0)<<8|(ve[n+49>>0]|0)<<16|(ve[n+51>>0]|0);i=t+r|0;n=(ve[n+53>>0]|0)<<8|(ve[n+52>>0]|0)<<16|(ve[n+54>>0]|0);if(!n){f=0;be=h;return f|0}pe[c>>2]=i;pe[e+96>>2]=i;pe[e+104>>2]=n;pe[e+100>>2]=t+(n+r);pe[e+108>>2]=0;pe[e+112>>2]=0;pe[f+20>>2]=0;pe[f>>2]=0;pe[f+4>>2]=0;pe[f+8>>2]=0;pe[f+12>>2]=0;de[f+16>>0]=0;e:do{if(pt(c,f)|0){o=e+268|0;r=e+272|0;t=pe[r>>2]|0;if((t|0)!=(l|0)){if(t>>>0<=l>>>0){do{if((pe[e+276>>2]|0)>>>0<l>>>0)if(nt(o,l,(t+1|0)==(l|0),2,0)|0){t=pe[r>>2]|0;break}else{de[e+280>>0]=1;t=0;break e}}while(0);Yr((pe[o>>2]|0)+(t<<1)|0,0,l-t<<1|0)|0}pe[r>>2]=l}if(!l){pe[s>>2]=1154;pe[s+4>>2]=903;pe[s+8>>2]=1781;_r(a,1100,s)|0;gr(a,u)|0;t=1;break}r=0;i=0;n=0;t=pe[o>>2]|0;while(1){u=mt(c,f)|0;r=u+r&255;i=(mt(c,f)|0)+i&255;$[t>>1]=i<<8|r;n=n+1|0;if((n|0)==(l|0)){t=1;break}else t=t+2|0}}else t=0}while(0);ft(f);f=t;be=h;return f|0}function Ot(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0,g=0,_=0,w=0,x=0,T=0,S=0,M=0,P=0,E=0;M=be;be=be+2432|0;s=M+16|0;a=M;o=M+1912|0;S=M+1888|0;x=M+988|0;T=M+88|0;w=M+24|0;n=pe[e+88>>2]|0;_=(ve[n+63>>0]|0)<<8|(ve[n+64>>0]|0);g=e+92|0;t=pe[e+4>>2]|0;r=(ve[n+58>>0]|0)<<8|(ve[n+57>>0]|0)<<16|(ve[n+59>>0]|0);i=t+r|0;n=(ve[n+61>>0]|0)<<8|(ve[n+60>>0]|0)<<16|(ve[n+62>>0]|0);if(!n){S=0;be=M;return S|0}pe[g>>2]=i;pe[e+96>>2]=i;pe[e+104>>2]=n;pe[e+100>>2]=t+(n+r);pe[e+108>>2]=0;pe[e+112>>2]=0;pe[S+20>>2]=0;pe[S>>2]=0;pe[S+4>>2]=0;pe[S+8>>2]=0;pe[S+12>>2]=0;de[S+16>>0]=0;if(pt(g,S)|0){r=0;i=-7;n=-7;while(1){pe[x+(r<<2)>>2]=i;pe[T+(r<<2)>>2]=n;t=(i|0)>6;r=r+1|0;if((r|0)==225)break;else{i=t?-7:i+1|0;n=(t&1)+n|0}}t=w;r=t+64|0;do{pe[t>>2]=0;t=t+4|0}while((t|0)<(r|0));y=e+284|0;r=_*3|0;i=e+288|0;t=pe[i>>2]|0;e:do{if((t|0)==(r|0))u=13;else{if(t>>>0<=r>>>0){do{if((pe[e+292>>2]|0)>>>0<r>>>0)if(nt(y,r,(t+1|0)==(r|0),2,0)|0){t=pe[i>>2]|0;break}else{de[e+296>>0]=1;t=0;break e}}while(0);Yr((pe[y>>2]|0)+(t<<1)|0,0,r-t<<1|0)|0}pe[i>>2]=r;u=13}}while(0);do{if((u|0)==13){if(!_){pe[a>>2]=1154;pe[a+4>>2]=903;pe[a+8>>2]=1781;_r(o,1100,a)|0;gr(o,s)|0;t=1;break}i=w+4|0;n=w+8|0;e=w+12|0;o=w+16|0;a=w+20|0;s=w+24|0;u=w+28|0;c=w+32|0;l=w+36|0;f=w+40|0;h=w+44|0;d=w+48|0;p=w+52|0;v=w+56|0;m=w+60|0;b=0;r=pe[y>>2]|0;while(1){t=0;do{P=mt(g,S)|0;y=t<<1;E=w+(y<<2)|0;pe[E>>2]=(pe[E>>2]|0)+(pe[x+(P<<2)>>2]|0)&7;y=w+((y|1)<<2)|0;pe[y>>2]=(pe[y>>2]|0)+(pe[T+(P<<2)>>2]|0)&7;t=t+1|0}while((t|0)!=8);P=ve[1729+(pe[a>>2]|0)>>0]|0;$[r>>1]=(ve[1729+(pe[i>>2]|0)>>0]|0)<<3|(ve[1729+(pe[w>>2]|0)>>0]|0)|(ve[1729+(pe[n>>2]|0)>>0]|0)<<6|(ve[1729+(pe[e>>2]|0)>>0]|0)<<9|(ve[1729+(pe[o>>2]|0)>>0]|0)<<12|P<<15;E=ve[1729+(pe[f>>2]|0)>>0]|0;$[r+2>>1]=(ve[1729+(pe[s>>2]|0)>>0]|0)<<2|P>>>1|(ve[1729+(pe[u>>2]|0)>>0]|0)<<5|(ve[1729+(pe[c>>2]|0)>>0]|0)<<8|(ve[1729+(pe[l>>2]|0)>>0]|0)<<11|E<<14;$[r+4>>1]=(ve[1729+(pe[h>>2]|0)>>0]|0)<<1|E>>>2|(ve[1729+(pe[d>>2]|0)>>0]|0)<<4|(ve[1729+(pe[p>>2]|0)>>0]|0)<<7|(ve[1729+(pe[v>>2]|0)>>0]|0)<<10|(ve[1729+(pe[m>>2]|0)>>0]|0)<<13;b=b+1|0;if((b|0)==(_|0)){t=1;break}else r=r+6|0}}}while(0)}else t=0;ft(S);E=t;be=M;return E|0}function It(e,t,r,i,n,o,a,s){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;a=a|0;s=s|0;var u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0,g=0,_=0,w=0,x=0,T=0,S=0,M=0,P=0,E=0,k=0,C=0,A=0,O=0,I=0,R=0,D=0,L=0,j=0,F=0,B=0,N=0,U=0,z=0,X=0,W=0,q=0,H=0,G=0,V=0,Y=0,J=0,K=0,Z=0,Q=0,$=0,ee=0,te=0,re=0,ie=0,ne=0,oe=0,ae=0,se=0,ue=0,ce=0,le=0,fe=0,he=0;le=be;be=be+720|0;ce=le+184|0;se=le+168|0;ae=le+160|0;oe=le+144|0;ne=le+136|0;ie=le+120|0;re=le+112|0;ee=le+96|0;$=le+88|0;Q=le+72|0;Z=le+64|0;K=le+48|0;J=le+40|0;ue=le+24|0;te=le+16|0;Y=le;G=le+208|0;V=le+192|0;N=e+240|0;U=pe[N>>2]|0;W=e+256|0;q=pe[W>>2]|0;r=de[(pe[e+88>>2]|0)+17>>0]|0;H=i>>>2;if(!(r<<24>>24)){be=le;return 1}z=(s|0)==0;X=s+-1|0;I=(o&1|0)!=0;R=i<<1;D=e+92|0;L=e+116|0;j=e+140|0;F=e+236|0;B=a+-1|0;O=(n&1|0)!=0;A=e+188|0;M=e+252|0;P=H+1|0;E=H+2|0;k=H+3|0;C=B<<4;T=r&255;r=0;o=0;n=1;S=0;do{if(!z){w=pe[t+(S<<2)>>2]|0;x=0;while(1){y=x&1;u=(y|0)==0;b=(y<<5^32)+-16|0;y=(y<<1^2)+-1|0;_=u?a:-1;c=u?0:B;e=(x|0)==(X|0);g=I&e;if((c|0)!=(_|0)){m=I&e^1;v=u?w:w+C|0;while(1){if((n|0)==1)n=mt(D,L)|0|512;p=n&7;n=n>>>3;u=ve[1823+p>>0]|0;e=0;do{h=(mt(D,j)|0)+o|0;d=h-U|0;o=d>>31;o=o&h|d&~o;if((pe[N>>2]|0)>>>0<=o>>>0){pe[Y>>2]=1154;pe[Y+4>>2]=903;pe[Y+8>>2]=1781;_r(G,1100,Y)|0;gr(G,te)|0}pe[V+(e<<2)>>2]=pe[(pe[F>>2]|0)+(o<<2)>>2];e=e+1|0}while(e>>>0<u>>>0);d=O&(c|0)==(B|0);if(g|d){h=0;do{l=ye(h,i)|0;e=v+l|0;u=(h|0)==0|m;f=h<<1;he=(mt(D,A)|0)+r|0;fe=he-q|0;r=fe>>31;r=r&he|fe&~r;do{if(d){if(!u){fe=(mt(D,A)|0)+r|0;he=fe-q|0;r=he>>31;r=r&fe|he&~r;break}pe[e>>2]=pe[V+((ve[1831+(p<<2)+f>>0]|0)<<2)>>2];if((pe[W>>2]|0)>>>0<=r>>>0){pe[oe>>2]=1154;pe[oe+4>>2]=903;pe[oe+8>>2]=1781;_r(G,1100,oe)|0;gr(G,ae)|0}pe[v+(l+4)>>2]=pe[(pe[M>>2]|0)+(r<<2)>>2];fe=(mt(D,A)|0)+r|0;he=fe-q|0;r=he>>31;r=r&fe|he&~r}else{if(!u){fe=(mt(D,A)|0)+r|0;he=fe-q|0;r=he>>31;r=r&fe|he&~r;break}pe[e>>2]=pe[V+((ve[1831+(p<<2)+f>>0]|0)<<2)>>2];if((pe[W>>2]|0)>>>0<=r>>>0){pe[ie>>2]=1154;pe[ie+4>>2]=903;pe[ie+8>>2]=1781;_r(G,1100,ie)|0;gr(G,ne)|0}pe[v+(l+4)>>2]=pe[(pe[M>>2]|0)+(r<<2)>>2];fe=(mt(D,A)|0)+r|0;he=fe-q|0;r=he>>31;r=r&fe|he&~r;pe[v+(l+8)>>2]=pe[V+((ve[(f|1)+(1831+(p<<2))>>0]|0)<<2)>>2];if((pe[W>>2]|0)>>>0<=r>>>0){pe[se>>2]=1154;pe[se+4>>2]=903;pe[se+8>>2]=1781;_r(G,1100,se)|0;gr(G,ce)|0}pe[v+(l+12)>>2]=pe[(pe[M>>2]|0)+(r<<2)>>2]}}while(0);h=h+1|0}while((h|0)!=2)}else{pe[v>>2]=pe[V+((ve[1831+(p<<2)>>0]|0)<<2)>>2];fe=(mt(D,A)|0)+r|0;he=fe-q|0;r=he>>31;r=r&fe|he&~r;if((pe[W>>2]|0)>>>0<=r>>>0){pe[ue>>2]=1154;pe[ue+4>>2]=903;pe[ue+8>>2]=1781;_r(G,1100,ue)|0;gr(G,J)|0}pe[v+4>>2]=pe[(pe[M>>2]|0)+(r<<2)>>2];pe[v+8>>2]=pe[V+((ve[1831+(p<<2)+1>>0]|0)<<2)>>2];fe=(mt(D,A)|0)+r|0;he=fe-q|0;r=he>>31;r=r&fe|he&~r;if((pe[W>>2]|0)>>>0<=r>>>0){pe[K>>2]=1154;pe[K+4>>2]=903;pe[K+8>>2]=1781;_r(G,1100,K)|0;gr(G,Z)|0}pe[v+12>>2]=pe[(pe[M>>2]|0)+(r<<2)>>2];pe[v+(H<<2)>>2]=pe[V+((ve[1831+(p<<2)+2>>0]|0)<<2)>>2];fe=(mt(D,A)|0)+r|0;he=fe-q|0;r=he>>31;r=r&fe|he&~r;if((pe[W>>2]|0)>>>0<=r>>>0){pe[Q>>2]=1154;pe[Q+4>>2]=903;pe[Q+8>>2]=1781;_r(G,1100,Q)|0;gr(G,$)|0}pe[v+(P<<2)>>2]=pe[(pe[M>>2]|0)+(r<<2)>>2];pe[v+(E<<2)>>2]=pe[V+((ve[1831+(p<<2)+3>>0]|0)<<2)>>2];fe=(mt(D,A)|0)+r|0;he=fe-q|0;r=he>>31;r=r&fe|he&~r;if((pe[W>>2]|0)>>>0<=r>>>0){pe[ee>>2]=1154;pe[ee+4>>2]=903;pe[ee+8>>2]=1781;_r(G,1100,ee)|0;gr(G,re)|0}pe[v+(k<<2)>>2]=pe[(pe[M>>2]|0)+(r<<2)>>2]}c=c+y|0;if((c|0)==(_|0))break;else v=v+b|0}}x=x+1|0;if((x|0)==(s|0))break;else w=w+R|0}}S=S+1|0}while((S|0)!=(T|0));be=le;return 1}function Rt(e,t,r,i,n,o,a,s){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;a=a|0;s=s|0;var u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0,g=0,_=0,w=0,x=0,T=0,S=0,M=0,P=0,E=0,k=0,C=0,A=0,O=0,I=0,R=0,D=0,L=0,j=0,F=0,B=0,N=0,U=0,z=0,X=0,W=0,q=0,H=0,G=0,V=0,Y=0,J=0,K=0,Z=0,Q=0,$=0,ee=0,te=0,re=0,ie=0,ne=0,oe=0,ae=0,se=0,ue=0,ce=0,le=0,fe=0,he=0;fe=be;be=be+640|0;ue=fe+88|0;se=fe+72|0;ae=fe+64|0;oe=fe+48|0;ne=fe+40|0;le=fe+24|0;ce=fe+16|0;ie=fe;te=fe+128|0;re=fe+112|0;ee=fe+96|0;N=e+240|0;U=pe[N>>2]|0;W=e+256|0;Z=pe[W>>2]|0;Q=e+272|0;$=pe[Q>>2]|0;r=pe[e+88>>2]|0;z=(ve[r+63>>0]|0)<<8|(ve[r+64>>0]|0);r=de[r+17>>0]|0;if(!(r<<24>>24)){be=fe;return 1}X=(s|0)==0;q=s+-1|0;H=i<<1;G=e+92|0;V=e+116|0;Y=a+-1|0;J=e+212|0;K=e+188|0;B=(n&1|0)==0;F=(o&1|0)==0;O=e+288|0;I=e+284|0;R=e+252|0;D=e+140|0;L=e+236|0;j=e+164|0;C=e+268|0;A=Y<<5;E=r&255;r=0;n=0;o=0;e=0;u=1;k=0;do{if(!X){M=pe[t+(k<<2)>>2]|0;P=0;while(1){T=P&1;c=(T|0)==0;x=(T<<6^64)+-32|0;T=(T<<1^2)+-1|0;S=c?a:-1;l=c?0:Y;if((l|0)!=(S|0)){w=F|(P|0)!=(q|0);_=c?M:M+A|0;while(1){if((u|0)==1)u=mt(G,V)|0|512;g=u&7;u=u>>>3;f=ve[1823+g>>0]|0;c=0;do{b=(mt(G,j)|0)+n|0;y=b-$|0;n=y>>31;n=n&b|y&~n;if((pe[Q>>2]|0)>>>0<=n>>>0){pe[ie>>2]=1154;pe[ie+4>>2]=903;pe[ie+8>>2]=1781;_r(te,1100,ie)|0;gr(te,ce)|0}pe[ee+(c<<2)>>2]=me[(pe[C>>2]|0)+(n<<1)>>1];c=c+1|0}while(c>>>0<f>>>0);c=0;do{b=(mt(G,D)|0)+e|0;y=b-U|0;e=y>>31;e=e&b|y&~e;if((pe[N>>2]|0)>>>0<=e>>>0){pe[le>>2]=1154;pe[le+4>>2]=903;pe[le+8>>2]=1781;_r(te,1100,le)|0;gr(te,ne)|0}pe[re+(c<<2)>>2]=pe[(pe[L>>2]|0)+(e<<2)>>2];c=c+1|0}while(c>>>0<f>>>0);y=B|(l|0)!=(Y|0);m=0;b=_;while(1){v=w|(m|0)==0;p=m<<1;h=0;d=b;while(1){f=(mt(G,J)|0)+r|0;c=f-z|0;r=c>>31;r=r&f|c&~r;c=(mt(G,K)|0)+o|0;f=c-Z|0;o=f>>31;o=o&c|f&~o;if((y|(h|0)==0)&v){c=ve[h+p+(1831+(g<<2))>>0]|0;f=r*3|0;if((pe[O>>2]|0)>>>0<=f>>>0){pe[oe>>2]=1154;pe[oe+4>>2]=903;pe[oe+8>>2]=1781;_r(te,1100,oe)|0;gr(te,ae)|0}he=pe[I>>2]|0;pe[d>>2]=(me[he+(f<<1)>>1]|0)<<16|pe[ee+(c<<2)>>2];pe[d+4>>2]=(me[he+(f+2<<1)>>1]|0)<<16|(me[he+(f+1<<1)>>1]|0);pe[d+8>>2]=pe[re+(c<<2)>>2];if((pe[W>>2]|0)>>>0<=o>>>0){pe[se>>2]=1154;pe[se+4>>2]=903;pe[se+8>>2]=1781;_r(te,1100,se)|0;gr(te,ue)|0}pe[d+12>>2]=pe[(pe[R>>2]|0)+(o<<2)>>2]}h=h+1|0;if((h|0)==2)break;else d=d+16|0}m=m+1|0;if((m|0)==2)break;else b=b+i|0}l=l+T|0;if((l|0)==(S|0))break;else _=_+x|0}}P=P+1|0;if((P|0)==(s|0))break;else M=M+H|0}}k=k+1|0}while((k|0)!=(E|0));be=fe;return 1}function Dt(e,t,r,i,n,o,a,s){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;a=a|0;s=s|0;var u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0,g=0,_=0,w=0,x=0,T=0,S=0,M=0,P=0,E=0,k=0,C=0,A=0,O=0,I=0,R=0,D=0,L=0,j=0,F=0,B=0,N=0,U=0,z=0,X=0,W=0,q=0,H=0,G=0,V=0,Y=0,J=0,K=0,Z=0;Z=be;be=be+608|0;Y=Z+64|0;V=Z+48|0;G=Z+40|0;K=Z+24|0;J=Z+16|0;H=Z;q=Z+88|0;W=Z+72|0;R=e+272|0;D=pe[R>>2]|0;r=pe[e+88>>2]|0;L=(ve[r+63>>0]|0)<<8|(ve[r+64>>0]|0);r=de[r+17>>0]|0;if(!(r<<24>>24)){be=Z;return 1}j=(s|0)==0;F=s+-1|0;B=i<<1;N=e+92|0;U=e+116|0;z=a+-1|0;X=e+212|0;I=(o&1|0)==0;C=e+288|0;A=e+284|0;O=e+164|0;E=e+268|0;k=z<<4;P=r&255;M=(n&1|0)!=0;r=0;o=0;e=1;S=0;do{if(!j){x=pe[t+(S<<2)>>2]|0;T=0;while(1){_=T&1;n=(_|0)==0;g=(_<<5^32)+-16|0;_=(_<<1^2)+-1|0;w=n?a:-1;u=n?0:z;if((u|0)!=(w|0)){y=I|(T|0)!=(F|0);b=n?x:x+k|0;while(1){if((e|0)==1)e=mt(N,U)|0|512;m=e&7;e=e>>>3;c=ve[1823+m>>0]|0;n=0;do{p=(mt(N,O)|0)+o|0;v=p-D|0;o=v>>31;o=o&p|v&~o;if((pe[R>>2]|0)>>>0<=o>>>0){pe[H>>2]=1154;pe[H+4>>2]=903;pe[H+8>>2]=1781;_r(q,1100,H)|0;gr(q,J)|0}pe[W+(n<<2)>>2]=me[(pe[E>>2]|0)+(o<<1)>>1];n=n+1|0}while(n>>>0<c>>>0);v=(u|0)==(z|0)&M;d=0;p=b;while(1){h=y|(d|0)==0;f=d<<1;n=(mt(N,X)|0)+r|0;l=n-L|0;c=l>>31;c=c&n|l&~c;if(h){r=ve[1831+(m<<2)+f>>0]|0;n=c*3|0;if((pe[C>>2]|0)>>>0<=n>>>0){pe[K>>2]=1154;pe[K+4>>2]=903;pe[K+8>>2]=1781;_r(q,1100,K)|0;gr(q,G)|0}l=pe[A>>2]|0;pe[p>>2]=(me[l+(n<<1)>>1]|0)<<16|pe[W+(r<<2)>>2];pe[p+4>>2]=(me[l+(n+2<<1)>>1]|0)<<16|(me[l+(n+1<<1)>>1]|0)}l=p+8|0;n=(mt(N,X)|0)+c|0;c=n-L|0;r=c>>31;r=r&n|c&~r;if(!(v|h^1)){n=ve[(f|1)+(1831+(m<<2))>>0]|0;c=r*3|0;if((pe[C>>2]|0)>>>0<=c>>>0){pe[V>>2]=1154;pe[V+4>>2]=903;pe[V+8>>2]=1781;_r(q,1100,V)|0;gr(q,Y)|0}h=pe[A>>2]|0;pe[l>>2]=(me[h+(c<<1)>>1]|0)<<16|pe[W+(n<<2)>>2];pe[p+12>>2]=(me[h+(c+2<<1)>>1]|0)<<16|(me[h+(c+1<<1)>>1]|0)}d=d+1|0;if((d|0)==2)break;else p=p+i|0}u=u+_|0;if((u|0)==(w|0))break;else b=b+g|0}}T=T+1|0;if((T|0)==(s|0))break;else x=x+B|0}}S=S+1|0}while((S|0)!=(P|0));be=Z;return 1}function Lt(e,t,r,i,n,o,a,s){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;a=a|0;s=s|0;var u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0,g=0,_=0,w=0,x=0,T=0,S=0,M=0,P=0,E=0,k=0,C=0,A=0,O=0,I=0,R=0,D=0,L=0,j=0,F=0,B=0,N=0,U=0,z=0,X=0,W=0,q=0,H=0,G=0,V=0,Y=0,J=0,K=0,Z=0,Q=0,$=0,ee=0,te=0,re=0,ie=0,ne=0,oe=0,ae=0;ae=be;be=be+640|0;ie=ae+88|0;re=ae+72|0;te=ae+64|0;ee=ae+48|0;$=ae+40|0;oe=ae+24|0;ne=ae+16|0;Q=ae;Z=ae+128|0;J=ae+112|0;K=ae+96|0;N=e+272|0;U=pe[N>>2]|0;r=pe[e+88>>2]|0;z=(ve[r+63>>0]|0)<<8|(ve[r+64>>0]|0);r=de[r+17>>0]|0;if(!(r<<24>>24)){be=ae;return 1}X=(s|0)==0;W=s+-1|0;q=i<<1;H=e+92|0;G=e+116|0;V=a+-1|0;Y=e+212|0;B=(n&1|0)==0;F=(o&1|0)==0;D=e+288|0;L=e+284|0;j=e+164|0;I=e+268|0;R=V<<5;A=r&255;r=0;n=0;o=0;e=0;u=1;O=0;do{if(!X){k=pe[t+(O<<2)>>2]|0;C=0;while(1){P=C&1;c=(P|0)==0;M=(P<<6^64)+-32|0;P=(P<<1^2)+-1|0;E=c?a:-1;l=c?0:V;if((l|0)!=(E|0)){S=F|(C|0)!=(W|0);T=c?k:k+R|0;while(1){if((u|0)==1)u=mt(H,G)|0|512;x=u&7;u=u>>>3;f=ve[1823+x>>0]|0;c=0;do{_=(mt(H,j)|0)+e|0;w=_-U|0;e=w>>31;e=e&_|w&~e;if((pe[N>>2]|0)>>>0<=e>>>0){pe[Q>>2]=1154;pe[Q+4>>2]=903;pe[Q+8>>2]=1781;_r(Z,1100,Q)|0;gr(Z,ne)|0}pe[J+(c<<2)>>2]=me[(pe[I>>2]|0)+(e<<1)>>1];c=c+1|0}while(c>>>0<f>>>0);c=0;do{_=(mt(H,j)|0)+n|0;w=_-U|0;n=w>>31;n=n&_|w&~n;if((pe[N>>2]|0)>>>0<=n>>>0){pe[oe>>2]=1154;pe[oe+4>>2]=903;pe[oe+8>>2]=1781;_r(Z,1100,oe)|0;gr(Z,$)|0}pe[K+(c<<2)>>2]=me[(pe[I>>2]|0)+(n<<1)>>1];c=c+1|0}while(c>>>0<f>>>0);w=B|(l|0)!=(V|0);g=0;_=T;while(1){y=S|(g|0)==0;b=g<<1;v=0;m=_;while(1){p=(mt(H,Y)|0)+o|0;d=p-z|0;o=d>>31;o=o&p|d&~o;d=(mt(H,Y)|0)+r|0;p=d-z|0;r=p>>31;r=r&d|p&~r;if((w|(v|0)==0)&y){d=ve[v+b+(1831+(x<<2))>>0]|0;p=o*3|0;c=pe[D>>2]|0;if(c>>>0<=p>>>0){pe[ee>>2]=1154;pe[ee+4>>2]=903;pe[ee+8>>2]=1781;_r(Z,1100,ee)|0;gr(Z,te)|0;c=pe[D>>2]|0}f=pe[L>>2]|0;h=r*3|0;if(c>>>0>h>>>0)c=f;else{pe[re>>2]=1154;pe[re+4>>2]=903;pe[re+8>>2]=1781;_r(Z,1100,re)|0;gr(Z,ie)|0;c=pe[L>>2]|0}pe[m>>2]=(me[f+(p<<1)>>1]|0)<<16|pe[J+(d<<2)>>2];pe[m+4>>2]=(me[f+(p+2<<1)>>1]|0)<<16|(me[f+(p+1<<1)>>1]|0);pe[m+8>>2]=(me[c+(h<<1)>>1]|0)<<16|pe[K+(d<<2)>>2];pe[m+12>>2]=(me[c+(h+2<<1)>>1]|0)<<16|(me[c+(h+1<<1)>>1]|0)}v=v+1|0;if((v|0)==2)break;else m=m+16|0}g=g+1|0;if((g|0)==2)break;else _=_+i|0}l=l+P|0;if((l|0)==(E|0))break;else T=T+M|0}}C=C+1|0;if((C|0)==(s|0))break;else k=k+q|0}}O=O+1|0}while((O|0)!=(A|0));be=ae;return 1}function jt(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0;h=be;be=be+608|0;f=h+88|0;l=h+72|0;u=h+64|0;s=h+48|0;o=h+40|0;a=h+24|0;n=h+16|0;i=h;c=h+96|0;pe[e>>2]=0;t=e+284|0;r=pe[t>>2]|0;if(r){if(!(r&7))Ri[pe[104>>2]&1](r,0,0,1,pe[27]|0)|0;else{pe[i>>2]=1154;pe[i+4>>2]=2499;pe[i+8>>2]=1516;_r(c,1100,i)|0;gr(c,n)|0}pe[t>>2]=0;pe[e+288>>2]=0;pe[e+292>>2]=0}de[e+296>>0]=0;t=e+268|0;r=pe[t>>2]|0;if(r){if(!(r&7))Ri[pe[104>>2]&1](r,0,0,1,pe[27]|0)|0;else{pe[a>>2]=1154;pe[a+4>>2]=2499;pe[a+8>>2]=1516;_r(c,1100,a)|0;gr(c,o)|0}pe[t>>2]=0;pe[e+272>>2]=0;pe[e+276>>2]=0}de[e+280>>0]=0;t=e+252|0;r=pe[t>>2]|0;if(r){if(!(r&7))Ri[pe[104>>2]&1](r,0,0,1,pe[27]|0)|0;else{pe[s>>2]=1154;pe[s+4>>2]=2499;pe[s+8>>2]=1516;_r(c,1100,s)|0;gr(c,u)|0}pe[t>>2]=0;pe[e+256>>2]=0;pe[e+260>>2]=0}de[e+264>>0]=0;t=e+236|0;r=pe[t>>2]|0;if(!r){f=e+248|0;de[f>>0]=0;f=e+212|0;ft(f);f=e+188|0;ft(f);f=e+164|0;ft(f);f=e+140|0;ft(f);f=e+116|0;ft(f);be=h;return}if(!(r&7))Ri[pe[104>>2]&1](r,0,0,1,pe[27]|0)|0;else{pe[l>>2]=1154;pe[l+4>>2]=2499;pe[l+8>>2]=1516;_r(c,1100,l)|0;gr(c,f)|0}pe[t>>2]=0;pe[e+240>>2]=0;pe[e+244>>2]=0;f=e+248|0;de[f>>0]=0;f=e+212|0;ft(f);f=e+188|0;ft(f);f=e+164|0;ft(f);f=e+140|0;ft(f);f=e+116|0;ft(f);be=h;return}function Ft(e,t){e=e|0;t=t|0;var r=0;r=be;be=be+16|0;pe[r>>2]=t;t=pe[63]|0;wr(t,e,r)|0;br(10,t)|0;Xe()}function Bt(){var e=0,t=0;e=be;be=be+16|0;if(!(je(200,2)|0)){t=De(pe[49]|0)|0;be=e;return t|0}else Ft(2090,e);return 0}function Nt(e){e=e|0;zr(e);return}function Ut(e){e=e|0;var t=0;t=be;be=be+16|0;Oi[e&3]();Ft(2139,t)}function zt(){var e=0,t=0;e=Bt()|0;if(((e|0)!=0?(t=pe[e>>2]|0,(t|0)!=0):0)?(e=t+48|0,(pe[e>>2]&-256|0)==1126902528?(pe[e+4>>2]|0)==1129074247:0):0)Ut(pe[t+12>>2]|0);t=pe[28]|0;pe[28]=t+0;Ut(t)}function Xt(e){e=e|0;return}function Wt(e){e=e|0;return}function qt(e){e=e|0;return}function Ht(e){e=e|0;return}function Gt(e){e=e|0;Nt(e);return}function Vt(e){e=e|0;Nt(e);return}function Yt(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0,a=0;a=be;be=be+64|0;o=a;if((e|0)!=(t|0))if((t|0)!=0?(n=Qt(t,24,40,0)|0,(n|0)!=0):0){t=o;i=t+56|0;do{pe[t>>2]=0;t=t+4|0}while((t|0)<(i|0));pe[o>>2]=n;pe[o+8>>2]=e;pe[o+12>>2]=-1;pe[o+48>>2]=1;Di[pe[(pe[n>>2]|0)+28>>2]&3](n,o,pe[r>>2]|0,1);if((pe[o+24>>2]|0)==1){pe[r>>2]=pe[o+16>>2];t=1}else t=0}else t=0;else t=1;be=a;return t|0}function Jt(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0;e=t+16|0;n=pe[e>>2]|0;do{if(n){if((n|0)!=(r|0)){i=t+36|0;pe[i>>2]=(pe[i>>2]|0)+1;pe[t+24>>2]=2;de[t+54>>0]=1;break}e=t+24|0;if((pe[e>>2]|0)==2)pe[e>>2]=i}else{pe[e>>2]=r;pe[t+24>>2]=i;pe[t+36>>2]=1}}while(0);return}function Kt(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;if((e|0)==(pe[t+8>>2]|0))Jt(0,t,r,i);return}function Zt(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;if((e|0)==(pe[t+8>>2]|0))Jt(0,t,r,i);else{e=pe[e+8>>2]|0;Di[pe[(pe[e>>2]|0)+28>>2]&3](e,t,r,i)}return}function Qt(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0;d=be;be=be+64|0;h=d;f=pe[e>>2]|0;l=e+(pe[f+-8>>2]|0)|0;f=pe[f+-4>>2]|0;pe[h>>2]=r;pe[h+4>>2]=e;pe[h+8>>2]=t;pe[h+12>>2]=i;i=h+16|0;e=h+20|0;t=h+24|0;n=h+28|0;o=h+32|0;a=h+40|0;s=(f|0)==(r|0);u=i;c=u+36|0;do{pe[u>>2]=0;u=u+4|0}while((u|0)<(c|0));$[i+36>>1]=0;de[i+38>>0]=0;e:do{if(s){pe[h+48>>2]=1;Ii[pe[(pe[r>>2]|0)+20>>2]&3](r,h,l,l,1,0);i=(pe[t>>2]|0)==1?l:0}else{Ei[pe[(pe[f>>2]|0)+24>>2]&3](f,h,l,1,0);switch(pe[h+36>>2]|0){case 0:{i=(pe[a>>2]|0)==1&(pe[n>>2]|0)==1&(pe[o>>2]|0)==1?pe[e>>2]|0:0;break e}case 1:break;default:{i=0;break e}}if((pe[t>>2]|0)!=1?!((pe[a>>2]|0)==0&(pe[n>>2]|0)==1&(pe[o>>2]|0)==1):0){i=0;break}i=pe[i>>2]|0}}while(0);be=d;return i|0}function $t(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;de[t+53>>0]=1;do{if((pe[t+4>>2]|0)==(i|0)){de[t+52>>0]=1;i=t+16|0;e=pe[i>>2]|0;if(!e){pe[i>>2]=r;pe[t+24>>2]=n;pe[t+36>>2]=1;if(!((n|0)==1?(pe[t+48>>2]|0)==1:0))break;de[t+54>>0]=1;break}if((e|0)!=(r|0)){n=t+36|0;pe[n>>2]=(pe[n>>2]|0)+1;de[t+54>>0]=1;break}e=t+24|0;i=pe[e>>2]|0;if((i|0)==2){pe[e>>2]=n;i=n}if((i|0)==1?(pe[t+48>>2]|0)==1:0)de[t+54>>0]=1}}while(0);return}function er(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0,a=0,s=0,u=0;e:do{if((e|0)==(pe[t+8>>2]|0)){if((pe[t+4>>2]|0)==(r|0)?(o=t+28|0,(pe[o>>2]|0)!=1):0)pe[o>>2]=i}else{if((e|0)!=(pe[t>>2]|0)){s=pe[e+8>>2]|0;Ei[pe[(pe[s>>2]|0)+24>>2]&3](s,t,r,i,n);break}if((pe[t+16>>2]|0)!=(r|0)?(a=t+20|0,(pe[a>>2]|0)!=(r|0)):0){pe[t+32>>2]=i;i=t+44|0;if((pe[i>>2]|0)==4)break;o=t+52|0;de[o>>0]=0;u=t+53|0;de[u>>0]=0;e=pe[e+8>>2]|0;Ii[pe[(pe[e>>2]|0)+20>>2]&3](e,t,r,r,1,n);if(de[u>>0]|0){if(!(de[o>>0]|0)){o=1;s=13}}else{o=0;s=13}do{if((s|0)==13){pe[a>>2]=r;u=t+40|0;pe[u>>2]=(pe[u>>2]|0)+1;if((pe[t+36>>2]|0)==1?(pe[t+24>>2]|0)==2:0){de[t+54>>0]=1;if(o)break}else s=16;if((s|0)==16?o:0)break;pe[i>>2]=4;break e}}while(0);pe[i>>2]=3;break}if((i|0)==1)pe[t+32>>2]=1}}while(0);return}function tr(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0,a=0;do{if((e|0)==(pe[t+8>>2]|0)){if((pe[t+4>>2]|0)==(r|0)?(a=t+28|0,(pe[a>>2]|0)!=1):0)pe[a>>2]=i}else if((e|0)==(pe[t>>2]|0)){if((pe[t+16>>2]|0)!=(r|0)?(o=t+20|0,(pe[o>>2]|0)!=(r|0)):0){pe[t+32>>2]=i;pe[o>>2]=r;n=t+40|0;pe[n>>2]=(pe[n>>2]|0)+1;if((pe[t+36>>2]|0)==1?(pe[t+24>>2]|0)==2:0)de[t+54>>0]=1;pe[t+44>>2]=4;break}if((i|0)==1)pe[t+32>>2]=1}}while(0);return}function rr(e,t,r,i,n,o){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;if((e|0)==(pe[t+8>>2]|0))$t(0,t,r,i,n);else{e=pe[e+8>>2]|0;Ii[pe[(pe[e>>2]|0)+20>>2]&3](e,t,r,i,n,o)}return}function ir(e,t,r,i,n,o){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;if((e|0)==(pe[t+8>>2]|0))$t(0,t,r,i,n);return}function nr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0;n=be;be=be+16|0;i=n;pe[i>>2]=pe[r>>2];e=Pi[pe[(pe[e>>2]|0)+16>>2]&7](e,t,i)|0;if(e)pe[r>>2]=pe[i>>2];be=n;return e&1|0}function or(e){e=e|0;if(!e)e=0;else e=(Qt(e,24,72,0)|0)!=0;return e&1|0}function ar(){var e=0,t=0,r=0,i=0,n=0,o=0,a=0,s=0;n=be;be=be+48|0;a=n+32|0;r=n+24|0;s=n+16|0;o=n;n=n+36|0;e=Bt()|0;if((e|0)!=0?(i=pe[e>>2]|0,(i|0)!=0):0){e=i+48|0;t=pe[e>>2]|0;e=pe[e+4>>2]|0;if(!((t&-256|0)==1126902528&(e|0)==1129074247)){pe[r>>2]=pe[51];Ft(2368,r)}if((t|0)==1126902529&(e|0)==1129074247)e=pe[i+44>>2]|0;else e=i+80|0;pe[n>>2]=e;i=pe[i>>2]|0;e=pe[i+4>>2]|0;if(Pi[pe[(pe[8>>2]|0)+16>>2]&7](8,i,n)|0){s=pe[n>>2]|0;n=pe[51]|0;s=Ci[pe[(pe[s>>2]|0)+8>>2]&1](s)|0;pe[o>>2]=n;pe[o+4>>2]=e;pe[o+8>>2]=s;Ft(2282,o)}else{pe[s>>2]=pe[51];pe[s+4>>2]=e;Ft(2327,s)}}Ft(2406,a)}function sr(){var e=0;e=be;be=be+16|0;if(!(Fe(196,6)|0)){be=e;return}else Ft(2179,e)}function ur(e){e=e|0;var t=0;t=be;be=be+16|0;zr(e);if(!(Ue(pe[49]|0,0)|0)){be=t;return}else Ft(2229,t)}function cr(e){e=e|0;var t=0,r=0;t=0;while(1){if((ve[2427+t>>0]|0)==(e|0)){r=2;break}t=t+1|0;if((t|0)==87){t=87;e=2515;r=5;break}}if((r|0)==2)if(!t)e=2515;else{e=2515;r=5}if((r|0)==5)while(1){r=e;while(1){e=r+1|0;if(!(de[r>>0]|0))break;else r=e}t=t+-1|0;if(!t)break;else r=5}return e|0}function lr(){var e=0;if(!(pe[52]|0))e=264;else{e=(Le()|0)+60|0;e=pe[e>>2]|0}return e|0}function fr(e){e=e|0;var t=0;if(e>>>0>4294963200){t=lr()|0;pe[t>>2]=0-e;e=-1}return e|0}function hr(e,t){e=+e;t=t|0;var r=0,i=0,n=0;ee[te>>3]=e;r=pe[te>>2]|0;i=pe[te+4>>2]|0;n=Jr(r|0,i|0,52)|0;n=n&2047;switch(n|0){case 0:{if(e!=0.0){e=+hr(e*18446744073709552.0e3,t);r=(pe[t>>2]|0)+-64|0}else r=0;pe[t>>2]=r;break}case 2047:break;default:{pe[t>>2]=n+-1022;pe[te>>2]=r;pe[te+4>>2]=i&-2146435073|1071644672;e=+ee[te>>3]}}return+e}function dr(e,t){e=+e;t=t|0;return+ +hr(e,t)}function pr(e,t,r){e=e|0;t=t|0;r=r|0;do{if(e){if(t>>>0<128){de[e>>0]=t;e=1;break}if(t>>>0<2048){de[e>>0]=t>>>6|192;de[e+1>>0]=t&63|128;e=2;break}if(t>>>0<55296|(t&-8192|0)==57344){de[e>>0]=t>>>12|224;de[e+1>>0]=t>>>6&63|128;de[e+2>>0]=t&63|128;e=3;break}if((t+-65536|0)>>>0<1048576){de[e>>0]=t>>>18|240;de[e+1>>0]=t>>>12&63|128;de[e+2>>0]=t>>>6&63|128;de[e+3>>0]=t&63|128;e=4;break}else{e=lr()|0;pe[e>>2]=84;e=-1;break}}else e=1}while(0);return e|0}function vr(e,t){e=e|0;t=t|0;if(!e)e=0;else e=pr(e,t,0)|0;return e|0}function mr(e){e=e|0;var t=0,r=0;do{if(e){if((pe[e+76>>2]|0)<=-1){t=Rr(e)|0;break}r=(Sr(e)|0)==0;t=Rr(e)|0;if(!r)Mr(e)}else{if(!(pe[65]|0))t=0;else t=mr(pe[65]|0)|0;ze(236);e=pe[58]|0;if(e)do{if((pe[e+76>>2]|0)>-1)r=Sr(e)|0;else r=0;if((pe[e+20>>2]|0)>>>0>(pe[e+28>>2]|0)>>>0)t=Rr(e)|0|t;if(r)Mr(e);e=pe[e+56>>2]|0}while((e|0)!=0);Be(236)}}while(0);return t|0}function br(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0;if((pe[t+76>>2]|0)>=0?(Sr(t)|0)!=0:0){if((de[t+75>>0]|0)!=(e|0)?(i=t+20|0,n=pe[i>>2]|0,n>>>0<(pe[t+16>>2]|0)>>>0):0){pe[i>>2]=n+1;de[n>>0]=e;r=e&255}else r=Pr(t,e)|0;Mr(t)}else a=3;do{if((a|0)==3){if((de[t+75>>0]|0)!=(e|0)?(o=t+20|0,r=pe[o>>2]|0,r>>>0<(pe[t+16>>2]|0)>>>0):0){pe[o>>2]=r+1;de[r>>0]=e;r=e&255;break}r=Pr(t,e)|0}}while(0);return r|0}function yr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0,a=0;i=r+16|0;n=pe[i>>2]|0;if(!n)if(!(Or(r)|0)){n=pe[i>>2]|0;o=4}else i=0;else o=4;e:do{if((o|0)==4){a=r+20|0;o=pe[a>>2]|0;if((n-o|0)>>>0<t>>>0){i=Pi[pe[r+36>>2]&7](r,e,t)|0;break}t:do{if((de[r+75>>0]|0)>-1){i=t;while(1){if(!i){n=o;i=0;break t}n=i+-1|0;if((de[e+n>>0]|0)==10)break;else i=n}if((Pi[pe[r+36>>2]&7](r,e,i)|0)>>>0<i>>>0)break e;t=t-i|0;e=e+i|0;n=pe[a>>2]|0}else{n=o;i=0}}while(0);Qr(n|0,e|0,t|0)|0;pe[a>>2]=(pe[a>>2]|0)+t;i=i+t|0}}while(0);return i|0}function gr(e,t){e=e|0;t=t|0;var r=0,i=0;r=be;be=be+16|0;i=r;pe[i>>2]=t;t=wr(pe[64]|0,e,i)|0;be=r;return t|0}function _r(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0;i=be;be=be+16|0;n=i;pe[n>>2]=r;r=Tr(e,t,n)|0;be=i;return r|0}function wr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0;v=be;be=be+224|0;f=v+120|0;p=v+80|0;d=v;h=v+136|0;i=p;n=i+40|0;do{pe[i>>2]=0;i=i+4|0}while((i|0)<(n|0));pe[f>>2]=pe[r>>2];if((Dr(0,t,f,d,p)|0)<0)r=-1;else{if((pe[e+76>>2]|0)>-1)c=Sr(e)|0;else c=0;r=pe[e>>2]|0;l=r&32;if((de[e+74>>0]|0)<1)pe[e>>2]=r&-33;r=e+48|0;if(!(pe[r>>2]|0)){n=e+44|0;o=pe[n>>2]|0;pe[n>>2]=h;a=e+28|0;pe[a>>2]=h;s=e+20|0;pe[s>>2]=h;pe[r>>2]=80;u=e+16|0;pe[u>>2]=h+80;i=Dr(e,t,f,d,p)|0;if(o){Pi[pe[e+36>>2]&7](e,0,0)|0;i=(pe[s>>2]|0)==0?-1:i;pe[n>>2]=o;pe[r>>2]=0;pe[u>>2]=0;pe[a>>2]=0;pe[s>>2]=0}}else i=Dr(e,t,f,d,p)|0;r=pe[e>>2]|0;pe[e>>2]=r|l;if(c)Mr(e);r=(r&32|0)==0?i:-1}be=v;return r|0}function xr(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,o=0,a=0,s=0,u=0,c=0,l=0;l=be;be=be+128|0;n=l+112|0;c=l;o=c;a=268;s=o+112|0;do{pe[o>>2]=pe[a>>2];o=o+4|0;a=a+4|0}while((o|0)<(s|0));if((t+-1|0)>>>0>2147483646)if(!t){t=1;u=4}else{t=lr()|0;pe[t>>2]=75;t=-1}else{n=e;u=4}if((u|0)==4){u=-2-n|0;u=t>>>0>u>>>0?u:t;pe[c+48>>2]=u;e=c+20|0;pe[e>>2]=n;pe[c+44>>2]=n;t=n+u|0;n=c+16|0;pe[n>>2]=t;pe[c+28>>2]=t;t=wr(c,r,i)|0;if(u){r=pe[e>>2]|0;de[r+(((r|0)==(pe[n>>2]|0))<<31>>31)>>0]=0}}be=l;return t|0}function Tr(e,t,r){e=e|0;t=t|0;r=r|0;return xr(e,2147483647,t,r)|0}function Sr(e){e=e|0;return 0}function Mr(e){e=e|0;return}function Pr(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,u=0;u=be;be=be+16|0;s=u;a=t&255;de[s>>0]=a;i=e+16|0;n=pe[i>>2]|0;if(!n)if(!(Or(e)|0)){n=pe[i>>2]|0;o=4}else r=-1;else o=4;do{if((o|0)==4){i=e+20|0;o=pe[i>>2]|0;if(o>>>0<n>>>0?(r=t&255,(r|0)!=(de[e+75>>0]|0)):0){pe[i>>2]=o+1;de[o>>0]=a;break}if((Pi[pe[e+36>>2]&7](e,s,1)|0)==1)r=ve[s>>0]|0;else r=-1}}while(0);be=u;return r|0}function Er(e){e=e|0;var t=0,r=0;t=be;be=be+16|0;r=t;pe[r>>2]=pe[e+60>>2];e=fr(Pe(6,r|0)|0)|0;be=t;return e|0}function kr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0;n=be;be=be+32|0;o=n;i=n+20|0;pe[o>>2]=pe[e+60>>2];pe[o+4>>2]=0;pe[o+8>>2]=t;pe[o+12>>2]=i;pe[o+16>>2]=r;if((fr(He(140,o|0)|0)|0)<0){pe[i>>2]=-1;e=-1}else e=pe[i>>2]|0;be=n;return e|0}function Cr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0;p=be;be=be+48|0;f=p+16|0;l=p;i=p+32|0;h=e+28|0;n=pe[h>>2]|0;pe[i>>2]=n;d=e+20|0;n=(pe[d>>2]|0)-n|0;pe[i+4>>2]=n;pe[i+8>>2]=t;pe[i+12>>2]=r;u=e+60|0;c=e+44|0;t=2;n=n+r|0;while(1){if(!(pe[52]|0)){pe[f>>2]=pe[u>>2];pe[f+4>>2]=i;pe[f+8>>2]=t;a=fr(Ge(146,f|0)|0)|0}else{We(7,e|0);pe[l>>2]=pe[u>>2];pe[l+4>>2]=i;pe[l+8>>2]=t;a=fr(Ge(146,l|0)|0)|0;Se(0)}if((n|0)==(a|0)){n=6;break}if((a|0)<0){n=8;break}n=n-a|0;o=pe[i+4>>2]|0;if(a>>>0<=o>>>0)if((t|0)==2){pe[h>>2]=(pe[h>>2]|0)+a;s=o;t=2}else s=o;else{s=pe[c>>2]|0;pe[h>>2]=s;pe[d>>2]=s;s=pe[i+12>>2]|0;a=a-o|0;i=i+8|0;t=t+-1|0}pe[i>>2]=(pe[i>>2]|0)+a;pe[i+4>>2]=s-a}if((n|0)==6){f=pe[c>>2]|0;pe[e+16>>2]=f+(pe[e+48>>2]|0);e=f;pe[h>>2]=e;pe[d>>2]=e}else if((n|0)==8){pe[e+16>>2]=0;pe[h>>2]=0;pe[d>>2]=0;pe[e>>2]=pe[e>>2]|32;if((t|0)==2)r=0;else r=r-(pe[i+4>>2]|0)|0}be=p;return r|0}function Ar(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0;n=be;be=be+80|0;i=n;pe[e+36>>2]=3;if((pe[e>>2]&64|0)==0?(pe[i>>2]=pe[e+60>>2],pe[i+4>>2]=21505,pe[i+8>>2]=n+12,(Me(54,i|0)|0)!=0):0)de[e+75>>0]=-1;i=Cr(e,t,r)|0;be=n;return i|0}function Or(e){e=e|0;var t=0,r=0;t=e+74|0;r=de[t>>0]|0;de[t>>0]=r+255|r;t=pe[e>>2]|0;if(!(t&8)){pe[e+8>>2]=0;pe[e+4>>2]=0;t=pe[e+44>>2]|0;pe[e+28>>2]=t;pe[e+20>>2]=t;pe[e+16>>2]=t+(pe[e+48>>2]|0);t=0}else{pe[e>>2]=t|32;t=-1}return t|0}function Ir(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0,a=0;o=t&255;i=(r|0)!=0;e:do{if(i&(e&3|0)!=0){n=t&255;while(1){if((de[e>>0]|0)==n<<24>>24){a=6;break e}e=e+1|0;r=r+-1|0;i=(r|0)!=0;if(!(i&(e&3|0)!=0)){a=5;break}}}else a=5}while(0);if((a|0)==5)if(i)a=6;else r=0;e:do{if((a|0)==6){n=t&255;if((de[e>>0]|0)!=n<<24>>24){i=ye(o,16843009)|0;t:do{if(r>>>0>3)while(1){o=pe[e>>2]^i;if((o&-2139062144^-2139062144)&o+-16843009)break;e=e+4|0;r=r+-4|0;if(r>>>0<=3){a=11;break t}}else a=11}while(0);if((a|0)==11)if(!r){r=0;break}while(1){if((de[e>>0]|0)==n<<24>>24)break e;e=e+1|0;r=r+-1|0;if(!r){r=0;break}}}}}while(0);return((r|0)!=0?e:0)|0}function Rr(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0;t=e+20|0;o=e+28|0;if((pe[t>>2]|0)>>>0>(pe[o>>2]|0)>>>0?(Pi[pe[e+36>>2]&7](e,0,0)|0,(pe[t>>2]|0)==0):0)t=-1;else{a=e+4|0;r=pe[a>>2]|0;i=e+8|0;n=pe[i>>2]|0;if(r>>>0<n>>>0)Pi[pe[e+40>>2]&7](e,r-n|0,1)|0;pe[e+16>>2]=0;pe[o>>2]=0;pe[t>>2]=0;pe[i>>2]=0;pe[a>>2]=0;t=0}return t|0}function Dr(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0,a=0,s=0,u=0,c=0.0,l=0,f=0,h=0,d=0,p=0.0,v=0,m=0,b=0,y=0,g=0,_=0,w=0,x=0,T=0,S=0,M=0,P=0,E=0,k=0,C=0,A=0,O=0,I=0,R=0,D=0,L=0,j=0,F=0,B=0,N=0,U=0,z=0,X=0,W=0,q=0,H=0,G=0,V=0,Y=0,J=0,K=0,Z=0,Q=0;Q=be;be=be+624|0;V=Q+24|0;J=Q+16|0;Y=Q+588|0;X=Q+576|0;G=Q;N=Q+536|0;Z=Q+8|0;K=Q+528|0;A=(e|0)!=0;O=N+40|0;B=O;N=N+39|0;U=Z+4|0;z=X+12|0;X=X+11|0;W=Y;q=z;H=q-W|0;I=-2-W|0;R=q+2|0;D=V+288|0;L=Y+9|0;j=L;F=Y+8|0;o=0;v=t;a=0;t=0;e:while(1){do{if((o|0)>-1)if((a|0)>(2147483647-o|0)){o=lr()|0;pe[o>>2]=75;o=-1;break}else{o=a+o|0;break}}while(0);a=de[v>>0]|0;if(!(a<<24>>24)){C=245;break}else s=v;t:while(1){switch(a<<24>>24){case 37:{a=s;C=9;break t}case 0:{a=s;break t}default:{}}k=s+1|0;a=de[k>>0]|0;s=k}t:do{if((C|0)==9)while(1){C=0;if((de[a+1>>0]|0)!=37)break t;s=s+1|0;a=a+2|0;if((de[a>>0]|0)==37)C=9;else break}}while(0);b=s-v|0;if(A?(pe[e>>2]&32|0)==0:0)yr(v,b,e)|0;if((s|0)!=(v|0)){v=a;a=b;continue}l=a+1|0;s=de[l>>0]|0;u=(s<<24>>24)+-48|0;if(u>>>0<10){k=(de[a+2>>0]|0)==36;l=k?a+3|0:l;s=de[l>>0]|0;d=k?u:-1;t=k?1:t}else d=-1;a=s<<24>>24;t:do{if((a&-32|0)==32){u=0;while(1){if(!(1<<a+-32&75913)){f=u;a=l;break t}u=1<<(s<<24>>24)+-32|u;l=l+1|0;s=de[l>>0]|0;a=s<<24>>24;if((a&-32|0)!=32){f=u;a=l;break}}}else{f=0;a=l}}while(0);do{if(s<<24>>24==42){u=a+1|0;s=(de[u>>0]|0)+-48|0;if(s>>>0<10?(de[a+2>>0]|0)==36:0){pe[n+(s<<2)>>2]=10;t=1;a=a+3|0;s=pe[i+((de[u>>0]|0)+-48<<3)>>2]|0}else{if(t){o=-1;break e}if(!A){m=f;a=u;t=0;k=0;break}t=(pe[r>>2]|0)+(4-1)&~(4-1);s=pe[t>>2]|0;pe[r>>2]=t+4;t=0;a=u}if((s|0)<0){m=f|8192;k=0-s|0}else{m=f;k=s}}else{u=(s<<24>>24)+-48|0;if(u>>>0<10){s=0;do{s=(s*10|0)+u|0;a=a+1|0;u=(de[a>>0]|0)+-48|0}while(u>>>0<10);if((s|0)<0){o=-1;break e}else{m=f;k=s}}else{m=f;k=0}}}while(0);t:do{if((de[a>>0]|0)==46){u=a+1|0;s=de[u>>0]|0;if(s<<24>>24!=42){l=(s<<24>>24)+-48|0;if(l>>>0<10){a=u;s=0}else{a=u;l=0;break}while(1){s=(s*10|0)+l|0;a=a+1|0;l=(de[a>>0]|0)+-48|0;if(l>>>0>=10){l=s;break t}}}u=a+2|0;s=(de[u>>0]|0)+-48|0;if(s>>>0<10?(de[a+3>>0]|0)==36:0){pe[n+(s<<2)>>2]=10;a=a+4|0;l=pe[i+((de[u>>0]|0)+-48<<3)>>2]|0;break}if(t){o=-1;break e}if(A){a=(pe[r>>2]|0)+(4-1)&~(4-1);l=pe[a>>2]|0;pe[r>>2]=a+4;a=u}else{a=u;l=0}}else l=-1}while(0);h=0;while(1){s=(de[a>>0]|0)+-65|0;if(s>>>0>57){o=-1;break e}u=a+1|0;s=de[5359+(h*58|0)+s>>0]|0;f=s&255;if((f+-1|0)>>>0<8){a=u;h=f}else{E=u;break}}if(!(s<<24>>24)){o=-1;break}u=(d|0)>-1;do{if(s<<24>>24==19)if(u){o=-1;break e}else C=52;else{if(u){pe[n+(d<<2)>>2]=f;M=i+(d<<3)|0;P=pe[M+4>>2]|0;C=G;pe[C>>2]=pe[M>>2];pe[C+4>>2]=P;C=52;break}if(!A){o=0;break e}Fr(G,f,r)}}while(0);if((C|0)==52?(C=0,!A):0){v=E;a=b;continue}d=de[a>>0]|0;d=(h|0)!=0&(d&15|0)==3?d&-33:d;u=m&-65537;P=(m&8192|0)==0?m:u;t:do{switch(d|0){case 110:switch(h|0){case 0:{pe[pe[G>>2]>>2]=o;v=E;a=b;continue e}case 1:{pe[pe[G>>2]>>2]=o;v=E;a=b;continue e}case 2:{v=pe[G>>2]|0;pe[v>>2]=o;pe[v+4>>2]=((o|0)<0)<<31>>31;v=E;a=b;continue e}case 3:{$[pe[G>>2]>>1]=o;v=E;a=b;continue e}case 4:{de[pe[G>>2]>>0]=o;v=E;a=b;continue e}case 6:{pe[pe[G>>2]>>2]=o;v=E;a=b;continue e}case 7:{v=pe[G>>2]|0;pe[v>>2]=o;pe[v+4>>2]=((o|0)<0)<<31>>31;v=E;a=b;continue e}default:{v=E;a=b;continue e}}case 112:{h=P|8;l=l>>>0>8?l:8;d=120;C=64;break}case 88:case 120:{h=P;C=64;break}case 111:{u=G;s=pe[u>>2]|0;u=pe[u+4>>2]|0;if((s|0)==0&(u|0)==0)a=O;else{a=O;do{a=a+-1|0;de[a>>0]=s&7|48;s=Jr(s|0,u|0,3)|0;u=re}while(!((s|0)==0&(u|0)==0))}if(!(P&8)){s=P;h=0;f=5839;C=77}else{h=B-a+1|0;s=P;l=(l|0)<(h|0)?h:l;h=0;f=5839;C=77}break}case 105:case 100:{s=G;a=pe[s>>2]|0;s=pe[s+4>>2]|0;if((s|0)<0){a=Vr(0,0,a|0,s|0)|0;s=re;u=G;pe[u>>2]=a;pe[u+4>>2]=s;u=1;f=5839;C=76;break t}if(!(P&2048)){f=P&1;u=f;f=(f|0)==0?5839:5841;C=76}else{u=1;f=5840;C=76}break}case 117:{s=G;a=pe[s>>2]|0;s=pe[s+4>>2]|0;u=0;f=5839;C=76;break}case 99:{de[N>>0]=pe[G>>2];v=N;s=1;h=0;d=5839;a=O;break}case 109:{a=lr()|0;a=cr(pe[a>>2]|0)|0;C=82;break}case 115:{a=pe[G>>2]|0;a=(a|0)!=0?a:5849;C=82;break}case 67:{pe[Z>>2]=pe[G>>2];pe[U>>2]=0;pe[G>>2]=Z;l=-1;C=86;break}case 83:{if(!l){Nr(e,32,k,0,P);a=0;C=98}else C=86;break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{c=+ee[G>>3];pe[J>>2]=0;ee[te>>3]=c;if((pe[te+4>>2]|0)>=0)if(!(P&2048)){M=P&1;S=M;M=(M|0)==0?5857:5862}else{S=1;M=5859}else{c=-c;S=1;M=5856}ee[te>>3]=c;T=pe[te+4>>2]&2146435072;do{if(T>>>0<2146435072|(T|0)==2146435072&0<0){p=+dr(c,J)*2.0;s=p!=0.0;if(s)pe[J>>2]=(pe[J>>2]|0)+-1;w=d|32;if((w|0)==97){v=d&32;b=(v|0)==0?M:M+9|0;m=S|2;a=12-l|0;do{if(!(l>>>0>11|(a|0)==0)){c=8.0;do{a=a+-1|0;c=c*16.0}while((a|0)!=0);if((de[b>>0]|0)==45){c=-(c+(-p-c));break}else{c=p+c-c;break}}else c=p}while(0);s=pe[J>>2]|0;a=(s|0)<0?0-s|0:s;a=Br(a,((a|0)<0)<<31>>31,z)|0;if((a|0)==(z|0)){de[X>>0]=48;a=X}de[a+-1>>0]=(s>>31&2)+43;h=a+-2|0;de[h>>0]=d+15;f=(l|0)<1;u=(P&8|0)==0;s=Y;while(1){M=~~c;a=s+1|0;de[s>>0]=ve[5823+M>>0]|v;c=(c-+(M|0))*16.0;do{if((a-W|0)==1){if(u&(f&c==0.0))break;de[a>>0]=46;a=s+2|0}}while(0);if(!(c!=0.0))break;else s=a}l=(l|0)!=0&(I+a|0)<(l|0)?R+l-h|0:H-h+a|0;u=l+m|0;Nr(e,32,k,u,P);if(!(pe[e>>2]&32))yr(b,m,e)|0;Nr(e,48,k,u,P^65536);a=a-W|0;if(!(pe[e>>2]&32))yr(Y,a,e)|0;s=q-h|0;Nr(e,48,l-(a+s)|0,0,0);if(!(pe[e>>2]&32))yr(h,s,e)|0;Nr(e,32,k,u,P^8192);a=(u|0)<(k|0)?k:u;break}a=(l|0)<0?6:l;if(s){s=(pe[J>>2]|0)+-28|0;pe[J>>2]=s;c=p*268435456.0}else{c=p;s=pe[J>>2]|0}T=(s|0)<0?V:D;x=T;s=T;do{_=~~c>>>0;pe[s>>2]=_;s=s+4|0;c=(c-+(_>>>0))*1.0e9}while(c!=0.0);u=s;s=pe[J>>2]|0;if((s|0)>0){f=T;while(1){h=(s|0)>29?29:s;l=u+-4|0;do{if(l>>>0<f>>>0)l=f;else{s=0;do{_=Kr(pe[l>>2]|0,0,h|0)|0;_=Zr(_|0,re|0,s|0,0)|0;s=re;g=ai(_|0,s|0,1e9,0)|0;pe[l>>2]=g;s=oi(_|0,s|0,1e9,0)|0;l=l+-4|0}while(l>>>0>=f>>>0);if(!s){l=f;break}l=f+-4|0;pe[l>>2]=s}}while(0);while(1){if(u>>>0<=l>>>0)break;s=u+-4|0;if(!(pe[s>>2]|0))u=s;else break}s=(pe[J>>2]|0)-h|0;pe[J>>2]=s;if((s|0)>0)f=l;else break}}else l=T;if((s|0)<0){b=((a+25|0)/9|0)+1|0;y=(w|0)==102;v=l;while(1){m=0-s|0;m=(m|0)>9?9:m;do{if(v>>>0<u>>>0){s=(1<<m)+-1|0;f=1e9>>>m;l=0;h=v;do{_=pe[h>>2]|0;pe[h>>2]=(_>>>m)+l;l=ye(_&s,f)|0;h=h+4|0}while(h>>>0<u>>>0);s=(pe[v>>2]|0)==0?v+4|0:v;if(!l){l=s;break}pe[u>>2]=l;l=s;u=u+4|0}else l=(pe[v>>2]|0)==0?v+4|0:v}while(0);s=y?T:l;u=(u-s>>2|0)>(b|0)?s+(b<<2)|0:u;s=(pe[J>>2]|0)+m|0;pe[J>>2]=s;if((s|0)>=0){v=l;break}else v=l}}else v=l;do{if(v>>>0<u>>>0){s=(x-v>>2)*9|0;f=pe[v>>2]|0;if(f>>>0<10)break;else l=10;do{l=l*10|0;s=s+1|0}while(f>>>0>=l>>>0)}else s=0}while(0);g=(w|0)==103;_=(a|0)!=0;l=a-((w|0)!=102?s:0)+((_&g)<<31>>31)|0;if((l|0)<(((u-x>>2)*9|0)+-9|0)){h=l+9216|0;y=(h|0)/9|0;l=T+(y+-1023<<2)|0;h=((h|0)%9|0)+1|0;if((h|0)<9){f=10;do{f=f*10|0;h=h+1|0}while((h|0)!=9)}else f=10;m=pe[l>>2]|0;b=(m>>>0)%(f>>>0)|0;if((b|0)==0?(T+(y+-1022<<2)|0)==(u|0):0)f=v;else C=163;do{if((C|0)==163){C=0;p=(((m>>>0)/(f>>>0)|0)&1|0)==0?9007199254740992.0:9007199254740994.0;h=(f|0)/2|0;do{if(b>>>0<h>>>0)c=.5;else{if((b|0)==(h|0)?(T+(y+-1022<<2)|0)==(u|0):0){c=1.0;break}c=1.5}}while(0);do{if(S){if((de[M>>0]|0)!=45)break;p=-p;c=-c}}while(0);h=m-b|0;pe[l>>2]=h;if(!(p+c!=p)){f=v;break}w=h+f|0;pe[l>>2]=w;if(w>>>0>999999999){s=v;while(1){f=l+-4|0;pe[l>>2]=0;if(f>>>0<s>>>0){s=s+-4|0;pe[s>>2]=0}w=(pe[f>>2]|0)+1|0;pe[f>>2]=w;if(w>>>0>999999999)l=f;else{v=s;l=f;break}}}s=(x-v>>2)*9|0;h=pe[v>>2]|0;if(h>>>0<10){f=v;break}else f=10;do{f=f*10|0;s=s+1|0}while(h>>>0>=f>>>0);f=v}}while(0);w=l+4|0;v=f;u=u>>>0>w>>>0?w:u}b=0-s|0;while(1){if(u>>>0<=v>>>0){y=0;w=u;break}l=u+-4|0;if(!(pe[l>>2]|0))u=l;else{y=1;w=u;break}}do{if(g){a=(_&1^1)+a|0;if((a|0)>(s|0)&(s|0)>-5){d=d+-1|0;a=a+-1-s|0}else{d=d+-2|0;a=a+-1|0}u=P&8;if(u)break;do{if(y){u=pe[w+-4>>2]|0;if(!u){l=9;break}if(!((u>>>0)%10|0)){f=10;l=0}else{l=0;break}do{f=f*10|0;l=l+1|0}while(((u>>>0)%(f>>>0)|0|0)==0)}else l=9}while(0);u=((w-x>>2)*9|0)+-9|0;if((d|32|0)==102){u=u-l|0;u=(u|0)<0?0:u;a=(a|0)<(u|0)?a:u;u=0;break}else{u=u+s-l|0;u=(u|0)<0?0:u;a=(a|0)<(u|0)?a:u;u=0;break}}else u=P&8}while(0);m=a|u;f=(m|0)!=0&1;h=(d|32|0)==102;if(h){s=(s|0)>0?s:0;d=0}else{l=(s|0)<0?b:s;l=Br(l,((l|0)<0)<<31>>31,z)|0;if((q-l|0)<2)do{l=l+-1|0;de[l>>0]=48}while((q-l|0)<2);de[l+-1>>0]=(s>>31&2)+43;x=l+-2|0;de[x>>0]=d;s=q-x|0;d=x}b=S+1+a+f+s|0;Nr(e,32,k,b,P);if(!(pe[e>>2]&32))yr(M,S,e)|0;Nr(e,48,k,b,P^65536);do{if(h){l=v>>>0>T>>>0?T:v;s=l;do{u=Br(pe[s>>2]|0,0,L)|0;do{if((s|0)==(l|0)){if((u|0)!=(L|0))break;de[F>>0]=48;u=F}else{if(u>>>0<=Y>>>0)break;do{u=u+-1|0;de[u>>0]=48}while(u>>>0>Y>>>0)}}while(0);if(!(pe[e>>2]&32))yr(u,j-u|0,e)|0;s=s+4|0}while(s>>>0<=T>>>0);do{if(m){if(pe[e>>2]&32)break;yr(5891,1,e)|0}}while(0);if((a|0)>0&s>>>0<w>>>0){u=s;while(1){s=Br(pe[u>>2]|0,0,L)|0;if(s>>>0>Y>>>0)do{s=s+-1|0;de[s>>0]=48}while(s>>>0>Y>>>0);if(!(pe[e>>2]&32))yr(s,(a|0)>9?9:a,e)|0;u=u+4|0;s=a+-9|0;if(!((a|0)>9&u>>>0<w>>>0)){a=s;break}else a=s}}Nr(e,48,a+9|0,9,0)}else{h=y?w:v+4|0;if((a|0)>-1){f=(u|0)==0;l=v;do{s=Br(pe[l>>2]|0,0,L)|0;if((s|0)==(L|0)){de[F>>0]=48;s=F}do{if((l|0)==(v|0)){u=s+1|0;if(!(pe[e>>2]&32))yr(s,1,e)|0;if(f&(a|0)<1){s=u;break}if(pe[e>>2]&32){s=u;break}yr(5891,1,e)|0;s=u}else{if(s>>>0<=Y>>>0)break;do{s=s+-1|0;de[s>>0]=48}while(s>>>0>Y>>>0)}}while(0);u=j-s|0;if(!(pe[e>>2]&32))yr(s,(a|0)>(u|0)?u:a,e)|0;a=a-u|0;l=l+4|0}while(l>>>0<h>>>0&(a|0)>-1)}Nr(e,48,a+18|0,18,0);if(pe[e>>2]&32)break;yr(d,q-d|0,e)|0}}while(0);Nr(e,32,k,b,P^8192);a=(b|0)<(k|0)?k:b}else{h=(d&32|0)!=0;f=c!=c|0.0!=0.0;s=f?0:S;l=s+3|0;Nr(e,32,k,l,u);a=pe[e>>2]|0;if(!(a&32)){yr(M,s,e)|0;a=pe[e>>2]|0}if(!(a&32))yr(f?h?5883:5887:h?5875:5879,3,e)|0;Nr(e,32,k,l,P^8192);a=(l|0)<(k|0)?k:l}}while(0);v=E;continue e}default:{u=P;s=l;h=0;d=5839;a=O}}}while(0);t:do{if((C|0)==64){u=G;s=pe[u>>2]|0;u=pe[u+4>>2]|0;f=d&32;if(!((s|0)==0&(u|0)==0)){a=O;do{a=a+-1|0;de[a>>0]=ve[5823+(s&15)>>0]|f;s=Jr(s|0,u|0,4)|0;u=re}while(!((s|0)==0&(u|0)==0));C=G;if((h&8|0)==0|(pe[C>>2]|0)==0&(pe[C+4>>2]|0)==0){s=h;h=0;f=5839;C=77}else{s=h;h=2;f=5839+(d>>4)|0;C=77}}else{a=O;s=h;h=0;f=5839;C=77}}else if((C|0)==76){a=Br(a,s,O)|0;s=P;h=u;C=77}else if((C|0)==82){C=0;P=Ir(a,0,l)|0;M=(P|0)==0;v=a;s=M?l:P-a|0;h=0;d=5839;a=M?a+l|0:P}else if((C|0)==86){C=0;s=0;a=0;f=pe[G>>2]|0;while(1){u=pe[f>>2]|0;if(!u)break;a=vr(K,u)|0;if((a|0)<0|a>>>0>(l-s|0)>>>0)break;s=a+s|0;if(l>>>0>s>>>0)f=f+4|0;else break}if((a|0)<0){o=-1;break e}Nr(e,32,k,s,P);if(!s){a=0;C=98}else{u=0;l=pe[G>>2]|0;while(1){a=pe[l>>2]|0;if(!a){a=s;C=98;break t}a=vr(K,a)|0;u=a+u|0;if((u|0)>(s|0)){a=s;C=98;break t}if(!(pe[e>>2]&32))yr(K,a,e)|0;if(u>>>0>=s>>>0){a=s;C=98;break}else l=l+4|0}}}}while(0);if((C|0)==98){C=0;Nr(e,32,k,a,P^8192);v=E;a=(k|0)>(a|0)?k:a;continue}if((C|0)==77){C=0;u=(l|0)>-1?s&-65537:s;s=G;s=(pe[s>>2]|0)!=0|(pe[s+4>>2]|0)!=0;if((l|0)!=0|s){s=(s&1^1)+(B-a)|0;v=a;s=(l|0)>(s|0)?l:s;d=f;a=O}else{v=O;s=0;d=f;a=O}}f=a-v|0;s=(s|0)<(f|0)?f:s;l=h+s|0;a=(k|0)<(l|0)?l:k;Nr(e,32,a,l,u);if(!(pe[e>>2]&32))yr(d,h,e)|0;Nr(e,48,a,l,u^65536);Nr(e,48,s,f,0);if(!(pe[e>>2]&32))yr(v,f,e)|0;Nr(e,32,a,l,u^8192);v=E}e:do{if((C|0)==245)if(!e)if(t){o=1;while(1){t=pe[n+(o<<2)>>2]|0;if(!t)break;Fr(i+(o<<3)|0,t,r);o=o+1|0;if((o|0)>=10){o=1;break e}}if((o|0)<10)while(1){if(pe[n+(o<<2)>>2]|0){o=-1;break e}o=o+1|0;if((o|0)>=10){o=1;break}}else o=1}else o=0}while(0);be=Q;return o|0}function Lr(e){e=e|0;if(!(pe[e+68>>2]|0))Mr(e);return}function jr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0;i=e+20|0;n=pe[i>>2]|0;e=(pe[e+16>>2]|0)-n|0;e=e>>>0>r>>>0?r:e;Qr(n|0,t|0,e|0)|0;pe[i>>2]=(pe[i>>2]|0)+e;return r|0}function Fr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0.0;e:do{if(t>>>0<=20)do{switch(t|0){case 9:{i=(pe[r>>2]|0)+(4-1)&~(4-1);t=pe[i>>2]|0;pe[r>>2]=i+4;pe[e>>2]=t;break e}case 10:{i=(pe[r>>2]|0)+(4-1)&~(4-1);t=pe[i>>2]|0;pe[r>>2]=i+4;i=e;pe[i>>2]=t;pe[i+4>>2]=((t|0)<0)<<31>>31;break e}case 11:{i=(pe[r>>2]|0)+(4-1)&~(4-1);t=pe[i>>2]|0;pe[r>>2]=i+4;i=e;pe[i>>2]=t;pe[i+4>>2]=0;break e}case 12:{i=(pe[r>>2]|0)+(8-1)&~(8-1);t=i;n=pe[t>>2]|0;t=pe[t+4>>2]|0;pe[r>>2]=i+8;i=e;pe[i>>2]=n;pe[i+4>>2]=t;break e}case 13:{n=(pe[r>>2]|0)+(4-1)&~(4-1);i=pe[n>>2]|0;pe[r>>2]=n+4;i=(i&65535)<<16>>16;n=e;pe[n>>2]=i;pe[n+4>>2]=((i|0)<0)<<31>>31;break e}case 14:{n=(pe[r>>2]|0)+(4-1)&~(4-1);i=pe[n>>2]|0;pe[r>>2]=n+4;n=e;pe[n>>2]=i&65535;pe[n+4>>2]=0;break e}case 15:{n=(pe[r>>2]|0)+(4-1)&~(4-1);i=pe[n>>2]|0;pe[r>>2]=n+4;i=(i&255)<<24>>24;n=e;pe[n>>2]=i;pe[n+4>>2]=((i|0)<0)<<31>>31;break e}case 16:{n=(pe[r>>2]|0)+(4-1)&~(4-1);i=pe[n>>2]|0;pe[r>>2]=n+4;n=e;pe[n>>2]=i&255;pe[n+4>>2]=0;break e}case 17:{n=(pe[r>>2]|0)+(8-1)&~(8-1);o=+ee[n>>3];pe[r>>2]=n+8;ee[e>>3]=o;break e}case 18:{n=(pe[r>>2]|0)+(8-1)&~(8-1);o=+ee[n>>3];pe[r>>2]=n+8;ee[e>>3]=o;break e}default:break e}}while(0)}while(0);return}function Br(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;if(t>>>0>0|(t|0)==0&e>>>0>4294967295)while(1){i=ai(e|0,t|0,10,0)|0;r=r+-1|0;de[r>>0]=i|48;i=oi(e|0,t|0,10,0)|0;if(t>>>0>9|(t|0)==9&e>>>0>4294967295){e=i;t=re}else{e=i;break}}if(e)while(1){r=r+-1|0;de[r>>0]=(e>>>0)%10|0|48;if(e>>>0<10)break;else e=(e>>>0)/10|0}return r|0}function Nr(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0,a=0,s=0;s=be;be=be+256|0;a=s;do{if((r|0)>(i|0)&(n&73728|0)==0){n=r-i|0;Yr(a|0,t|0,(n>>>0>256?256:n)|0)|0;t=pe[e>>2]|0;o=(t&32|0)==0;if(n>>>0>255){i=r-i|0;do{if(o){yr(a,256,e)|0;t=pe[e>>2]|0}n=n+-256|0;o=(t&32|0)==0}while(n>>>0>255);if(o)n=i&255;else break}else if(!o)break;yr(a,n,e)|0}}while(0);be=s;return}function Ur(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0,g=0,_=0,w=0,x=0,T=0,S=0,M=0,P=0,E=0,k=0,C=0,A=0,O=0,I=0,R=0,D=0,L=0,j=0,F=0;do{if(e>>>0<245){d=e>>>0<11?16:e+11&-8;e=d>>>3;s=pe[151]|0;r=s>>>e;if(r&3){e=(r&1^1)+e|0;i=e<<1;r=644+(i<<2)|0;i=644+(i+2<<2)|0;n=pe[i>>2]|0;o=n+8|0;a=pe[o>>2]|0;do{if((r|0)!=(a|0)){if(a>>>0<(pe[155]|0)>>>0)Xe();t=a+12|0;if((pe[t>>2]|0)==(n|0)){pe[t>>2]=r;pe[i>>2]=a;break}else Xe()}else pe[151]=s&~(1<<e)}while(0);F=e<<3;pe[n+4>>2]=F|3;F=n+(F|4)|0;pe[F>>2]=pe[F>>2]|1;F=o;return F|0}a=pe[153]|0;if(d>>>0>a>>>0){if(r){i=2<<e;i=r<<e&(i|0-i);i=(i&0-i)+-1|0;u=i>>>12&16;i=i>>>u;n=i>>>5&8;i=i>>>n;o=i>>>2&4;i=i>>>o;r=i>>>1&2;i=i>>>r;e=i>>>1&1;e=(n|u|o|r|e)+(i>>>e)|0;i=e<<1;r=644+(i<<2)|0;i=644+(i+2<<2)|0;o=pe[i>>2]|0;u=o+8|0;n=pe[u>>2]|0;do{if((r|0)!=(n|0)){if(n>>>0<(pe[155]|0)>>>0)Xe();t=n+12|0;if((pe[t>>2]|0)==(o|0)){pe[t>>2]=r;pe[i>>2]=n;c=pe[153]|0;break}else Xe()}else{pe[151]=s&~(1<<e);c=a}}while(0);F=e<<3;a=F-d|0;pe[o+4>>2]=d|3;s=o+d|0;pe[o+(d|4)>>2]=a|1;pe[o+F>>2]=a;if(c){n=pe[156]|0;r=c>>>3;t=r<<1;i=644+(t<<2)|0;e=pe[151]|0;r=1<<r;if(e&r){e=644+(t+2<<2)|0;t=pe[e>>2]|0;if(t>>>0<(pe[155]|0)>>>0)Xe();else{l=e;f=t}}else{pe[151]=e|r;l=644+(t+2<<2)|0;f=i}pe[l>>2]=n;pe[f+12>>2]=n;pe[n+8>>2]=f;pe[n+12>>2]=i}pe[153]=a;pe[156]=s;F=u;return F|0}e=pe[152]|0;if(e){r=(e&0-e)+-1|0;j=r>>>12&16;r=r>>>j;L=r>>>5&8;r=r>>>L;F=r>>>2&4;r=r>>>F;e=r>>>1&2;r=r>>>e;i=r>>>1&1;i=pe[908+((L|j|F|e|i)+(r>>>i)<<2)>>2]|0;r=(pe[i+4>>2]&-8)-d|0;e=i;while(1){t=pe[e+16>>2]|0;if(!t){t=pe[e+20>>2]|0;if(!t){u=r;break}}e=(pe[t+4>>2]&-8)-d|0;F=e>>>0<r>>>0;r=F?e:r;e=t;i=F?t:i}o=pe[155]|0;if(i>>>0<o>>>0)Xe();s=i+d|0;if(i>>>0>=s>>>0)Xe();a=pe[i+24>>2]|0;r=pe[i+12>>2]|0;do{if((r|0)==(i|0)){e=i+20|0;t=pe[e>>2]|0;if(!t){e=i+16|0;t=pe[e>>2]|0;if(!t){h=0;break}}while(1){r=t+20|0;n=pe[r>>2]|0;if(n){t=n;e=r;continue}r=t+16|0;n=pe[r>>2]|0;if(!n)break;else{t=n;e=r}}if(e>>>0<o>>>0)Xe();else{pe[e>>2]=0;h=t;break}}else{n=pe[i+8>>2]|0;if(n>>>0<o>>>0)Xe();t=n+12|0;if((pe[t>>2]|0)!=(i|0))Xe();e=r+8|0;if((pe[e>>2]|0)==(i|0)){pe[t>>2]=r;pe[e>>2]=n;h=r;break}else Xe()}}while(0);do{if(a){t=pe[i+28>>2]|0;e=908+(t<<2)|0;if((i|0)==(pe[e>>2]|0)){pe[e>>2]=h;if(!h){pe[152]=pe[152]&~(1<<t);break}}else{if(a>>>0<(pe[155]|0)>>>0)Xe();t=a+16|0;if((pe[t>>2]|0)==(i|0))pe[t>>2]=h;else pe[a+20>>2]=h;if(!h)break}e=pe[155]|0;if(h>>>0<e>>>0)Xe();pe[h+24>>2]=a;t=pe[i+16>>2]|0;do{if(t)if(t>>>0<e>>>0)Xe();else{pe[h+16>>2]=t;pe[t+24>>2]=h;break}}while(0);t=pe[i+20>>2]|0;if(t)if(t>>>0<(pe[155]|0)>>>0)Xe();else{pe[h+20>>2]=t;pe[t+24>>2]=h;break}}}while(0);if(u>>>0<16){F=u+d|0;pe[i+4>>2]=F|3;F=i+(F+4)|0;pe[F>>2]=pe[F>>2]|1}else{pe[i+4>>2]=d|3;pe[i+(d|4)>>2]=u|1;pe[i+(u+d)>>2]=u;t=pe[153]|0;if(t){o=pe[156]|0;r=t>>>3;t=r<<1;n=644+(t<<2)|0;e=pe[151]|0;r=1<<r;if(e&r){t=644+(t+2<<2)|0;e=pe[t>>2]|0;if(e>>>0<(pe[155]|0)>>>0)Xe();else{p=t;v=e}}else{pe[151]=e|r;p=644+(t+2<<2)|0;v=n}pe[p>>2]=o;pe[v+12>>2]=o;pe[o+8>>2]=v;pe[o+12>>2]=n}pe[153]=u;pe[156]=s}F=i+8|0;return F|0}else v=d}else v=d}else if(e>>>0<=4294967231){e=e+11|0;f=e&-8;l=pe[152]|0;if(l){r=0-f|0;e=e>>>8;if(e)if(f>>>0>16777215)c=31;else{v=(e+1048320|0)>>>16&8;_=e<<v;p=(_+520192|0)>>>16&4;_=_<<p;c=(_+245760|0)>>>16&2;c=14-(p|v|c)+(_<<c>>>15)|0;c=f>>>(c+7|0)&1|c<<1}else c=0;e=pe[908+(c<<2)>>2]|0;e:do{if(!e){n=0;e=0;_=86}else{a=r;n=0;s=f<<((c|0)==31?0:25-(c>>>1)|0);u=e;e=0;while(1){o=pe[u+4>>2]&-8;r=o-f|0;if(r>>>0<a>>>0)if((o|0)==(f|0)){o=u;e=u;_=90;break e}else e=u;else r=a;_=pe[u+20>>2]|0;u=pe[u+16+(s>>>31<<2)>>2]|0;n=(_|0)==0|(_|0)==(u|0)?n:_;if(!u){_=86;break}else{a=r;s=s<<1}}}}while(0);if((_|0)==86){if((n|0)==0&(e|0)==0){e=2<<c;e=l&(e|0-e);if(!e){v=f;break}e=(e&0-e)+-1|0;h=e>>>12&16;e=e>>>h;l=e>>>5&8;e=e>>>l;p=e>>>2&4;e=e>>>p;v=e>>>1&2;e=e>>>v;n=e>>>1&1;n=pe[908+((l|h|p|v|n)+(e>>>n)<<2)>>2]|0;e=0}if(!n){s=r;u=e}else{o=n;_=90}}if((_|0)==90)while(1){_=0;v=(pe[o+4>>2]&-8)-f|0;n=v>>>0<r>>>0;r=n?v:r;e=n?o:e;n=pe[o+16>>2]|0;if(n){o=n;_=90;continue}o=pe[o+20>>2]|0;if(!o){s=r;u=e;break}else _=90}if((u|0)!=0?s>>>0<((pe[153]|0)-f|0)>>>0:0){n=pe[155]|0;if(u>>>0<n>>>0)Xe();a=u+f|0;if(u>>>0>=a>>>0)Xe();o=pe[u+24>>2]|0;r=pe[u+12>>2]|0;do{if((r|0)==(u|0)){e=u+20|0;t=pe[e>>2]|0;if(!t){e=u+16|0;t=pe[e>>2]|0;if(!t){d=0;break}}while(1){r=t+20|0;i=pe[r>>2]|0;if(i){t=i;e=r;continue}r=t+16|0;i=pe[r>>2]|0;if(!i)break;else{t=i;e=r}}if(e>>>0<n>>>0)Xe();else{pe[e>>2]=0;d=t;break}}else{i=pe[u+8>>2]|0;if(i>>>0<n>>>0)Xe();t=i+12|0;if((pe[t>>2]|0)!=(u|0))Xe();e=r+8|0;if((pe[e>>2]|0)==(u|0)){pe[t>>2]=r;pe[e>>2]=i;d=r;break}else Xe()}}while(0);do{if(o){t=pe[u+28>>2]|0;e=908+(t<<2)|0;if((u|0)==(pe[e>>2]|0)){pe[e>>2]=d;if(!d){pe[152]=pe[152]&~(1<<t);break}}else{if(o>>>0<(pe[155]|0)>>>0)Xe();t=o+16|0;if((pe[t>>2]|0)==(u|0))pe[t>>2]=d;else pe[o+20>>2]=d;if(!d)break}e=pe[155]|0;if(d>>>0<e>>>0)Xe();pe[d+24>>2]=o;t=pe[u+16>>2]|0;do{if(t)if(t>>>0<e>>>0)Xe();else{pe[d+16>>2]=t;pe[t+24>>2]=d;break}}while(0);t=pe[u+20>>2]|0;if(t)if(t>>>0<(pe[155]|0)>>>0)Xe();else{pe[d+20>>2]=t;pe[t+24>>2]=d;break}}}while(0);e:do{if(s>>>0>=16){pe[u+4>>2]=f|3;pe[u+(f|4)>>2]=s|1;pe[u+(s+f)>>2]=s;t=s>>>3;if(s>>>0<256){e=t<<1;i=644+(e<<2)|0;r=pe[151]|0;t=1<<t;if(r&t){t=644+(e+2<<2)|0;e=pe[t>>2]|0;if(e>>>0<(pe[155]|0)>>>0)Xe();else{b=t;y=e}}else{pe[151]=r|t;b=644+(e+2<<2)|0;y=i}pe[b>>2]=a;pe[y+12>>2]=a;pe[u+(f+8)>>2]=y;pe[u+(f+12)>>2]=i;break}t=s>>>8;if(t)if(s>>>0>16777215)i=31;else{j=(t+1048320|0)>>>16&8;F=t<<j;L=(F+520192|0)>>>16&4;F=F<<L;i=(F+245760|0)>>>16&2;i=14-(L|j|i)+(F<<i>>>15)|0;i=s>>>(i+7|0)&1|i<<1}else i=0;t=908+(i<<2)|0;pe[u+(f+28)>>2]=i;pe[u+(f+20)>>2]=0;pe[u+(f+16)>>2]=0;e=pe[152]|0;r=1<<i;if(!(e&r)){pe[152]=e|r;pe[t>>2]=a;pe[u+(f+24)>>2]=t;pe[u+(f+12)>>2]=a;pe[u+(f+8)>>2]=a;break}t=pe[t>>2]|0;t:do{if((pe[t+4>>2]&-8|0)!=(s|0)){i=s<<((i|0)==31?0:25-(i>>>1)|0);while(1){e=t+16+(i>>>31<<2)|0;r=pe[e>>2]|0;if(!r)break;if((pe[r+4>>2]&-8|0)==(s|0)){T=r;break t}else{i=i<<1;t=r}}if(e>>>0<(pe[155]|0)>>>0)Xe();else{pe[e>>2]=a;pe[u+(f+24)>>2]=t;pe[u+(f+12)>>2]=a;pe[u+(f+8)>>2]=a;break e}}else T=t}while(0);t=T+8|0;e=pe[t>>2]|0;F=pe[155]|0;if(e>>>0>=F>>>0&T>>>0>=F>>>0){pe[e+12>>2]=a;pe[t>>2]=a;pe[u+(f+8)>>2]=e;pe[u+(f+12)>>2]=T;pe[u+(f+24)>>2]=0;break}else Xe()}else{F=s+f|0;pe[u+4>>2]=F|3;F=u+(F+4)|0;pe[F>>2]=pe[F>>2]|1}}while(0);F=u+8|0;return F|0}else v=f}else v=f}else v=-1}while(0);r=pe[153]|0;if(r>>>0>=v>>>0){t=r-v|0;e=pe[156]|0;if(t>>>0>15){pe[156]=e+v;pe[153]=t;pe[e+(v+4)>>2]=t|1;pe[e+r>>2]=t;pe[e+4>>2]=v|3}else{pe[153]=0;pe[156]=0;pe[e+4>>2]=r|3;F=e+(r+4)|0;pe[F>>2]=pe[F>>2]|1}F=e+8|0;return F|0}e=pe[154]|0;if(e>>>0>v>>>0){j=e-v|0;pe[154]=j;F=pe[157]|0;pe[157]=F+v;pe[F+(v+4)>>2]=j|1;pe[F+4>>2]=v|3;F=F+8|0;return F|0}do{if(!(pe[269]|0)){e=Re(30)|0;if(!(e+-1&e)){pe[271]=e;pe[270]=e;pe[272]=-1;pe[273]=-1;pe[274]=0;pe[262]=0;T=(qe(0)|0)&-16^1431655768;pe[269]=T;break}else Xe()}}while(0);u=v+48|0;s=pe[271]|0;c=v+47|0;a=s+c|0;s=0-s|0;l=a&s;if(l>>>0<=v>>>0){F=0;return F|0}e=pe[261]|0;if((e|0)!=0?(y=pe[259]|0,T=y+l|0,T>>>0<=y>>>0|T>>>0>e>>>0):0){F=0;return F|0}e:do{if(!(pe[262]&4)){e=pe[157]|0;t:do{if(e){n=1052;while(1){r=pe[n>>2]|0;if(r>>>0<=e>>>0?(m=n+4|0,(r+(pe[m>>2]|0)|0)>>>0>e>>>0):0){o=n;e=m;break}n=pe[n+8>>2]|0;if(!n){_=174;break t}}r=a-(pe[154]|0)&s;if(r>>>0<2147483647){n=Ae(r|0)|0;T=(n|0)==((pe[o>>2]|0)+(pe[e>>2]|0)|0);e=T?r:0;if(T){if((n|0)!=(-1|0)){w=n;p=e;_=194;break e}}else _=184}else e=0}else _=174}while(0);do{if((_|0)==174){o=Ae(0)|0;if((o|0)!=(-1|0)){e=o;r=pe[270]|0;n=r+-1|0;if(!(n&e))r=l;else r=l-e+(n+e&0-r)|0;e=pe[259]|0;n=e+r|0;if(r>>>0>v>>>0&r>>>0<2147483647){T=pe[261]|0;if((T|0)!=0?n>>>0<=e>>>0|n>>>0>T>>>0:0){e=0;break}n=Ae(r|0)|0;T=(n|0)==(o|0);e=T?r:0;if(T){w=o;p=e;_=194;break e}else _=184}else e=0}else e=0}}while(0);t:do{if((_|0)==184){o=0-r|0;do{if(u>>>0>r>>>0&(r>>>0<2147483647&(n|0)!=(-1|0))?(g=pe[271]|0,g=c-r+g&0-g,g>>>0<2147483647):0)if((Ae(g|0)|0)==(-1|0)){Ae(o|0)|0;break t}else{r=g+r|0;break}}while(0);if((n|0)!=(-1|0)){w=n;p=r;_=194;break e}}}while(0);pe[262]=pe[262]|4;_=191}else{e=0;_=191}}while(0);if((((_|0)==191?l>>>0<2147483647:0)?(w=Ae(l|0)|0,x=Ae(0)|0,w>>>0<x>>>0&((w|0)!=(-1|0)&(x|0)!=(-1|0))):0)?(S=x-w|0,M=S>>>0>(v+40|0)>>>0,M):0){p=M?S:e;_=194}if((_|0)==194){e=(pe[259]|0)+p|0;pe[259]=e;if(e>>>0>(pe[260]|0)>>>0)pe[260]=e;a=pe[157]|0;e:do{if(a){o=1052;do{e=pe[o>>2]|0;r=o+4|0;n=pe[r>>2]|0;if((w|0)==(e+n|0)){P=e;E=r;k=n;C=o;_=204;break}o=pe[o+8>>2]|0}while((o|0)!=0);if(((_|0)==204?(pe[C+12>>2]&8|0)==0:0)?a>>>0<w>>>0&a>>>0>=P>>>0:0){pe[E>>2]=k+p;F=(pe[154]|0)+p|0;j=a+8|0;j=(j&7|0)==0?0:0-j&7;L=F-j|0;pe[157]=a+j;pe[154]=L;pe[a+(j+4)>>2]=L|1;pe[a+(F+4)>>2]=40;pe[158]=pe[273];break}e=pe[155]|0;if(w>>>0<e>>>0){pe[155]=w;e=w}r=w+p|0;o=1052;while(1){if((pe[o>>2]|0)==(r|0)){n=o;r=o;_=212;break}o=pe[o+8>>2]|0;if(!o){r=1052;break}}if((_|0)==212)if(!(pe[r+12>>2]&8)){pe[n>>2]=w;h=r+4|0;pe[h>>2]=(pe[h>>2]|0)+p;h=w+8|0;h=(h&7|0)==0?0:0-h&7;c=w+(p+8)|0;c=(c&7|0)==0?0:0-c&7;t=w+(c+p)|0;f=h+v|0;d=w+f|0;l=t-(w+h)-v|0;pe[w+(h+4)>>2]=v|3;t:do{if((t|0)!=(a|0)){if((t|0)==(pe[156]|0)){F=(pe[153]|0)+l|0;pe[153]=F;pe[156]=d;pe[w+(f+4)>>2]=F|1;pe[w+(F+f)>>2]=F;break}s=p+4|0;r=pe[w+(s+c)>>2]|0;if((r&3|0)==1){u=r&-8;o=r>>>3;r:do{if(r>>>0>=256){a=pe[w+((c|24)+p)>>2]|0;i=pe[w+(p+12+c)>>2]|0;do{if((i|0)==(t|0)){n=c|16;i=w+(s+n)|0;r=pe[i>>2]|0;if(!r){i=w+(n+p)|0;r=pe[i>>2]|0;if(!r){D=0;break}}while(1){n=r+20|0;o=pe[n>>2]|0;if(o){r=o;i=n;continue}n=r+16|0;o=pe[n>>2]|0;if(!o)break;else{r=o;i=n}}if(i>>>0<e>>>0)Xe();else{pe[i>>2]=0;D=r;break}}else{n=pe[w+((c|8)+p)>>2]|0;if(n>>>0<e>>>0)Xe();e=n+12|0;if((pe[e>>2]|0)!=(t|0))Xe();r=i+8|0;if((pe[r>>2]|0)==(t|0)){pe[e>>2]=i;pe[r>>2]=n;D=i;break}else Xe()}}while(0);if(!a)break;e=pe[w+(p+28+c)>>2]|0;r=908+(e<<2)|0;do{if((t|0)!=(pe[r>>2]|0)){if(a>>>0<(pe[155]|0)>>>0)Xe();e=a+16|0;if((pe[e>>2]|0)==(t|0))pe[e>>2]=D;else pe[a+20>>2]=D;if(!D)break r}else{pe[r>>2]=D;if(D)break;pe[152]=pe[152]&~(1<<e);break r}}while(0);r=pe[155]|0;if(D>>>0<r>>>0)Xe();pe[D+24>>2]=a;t=c|16;e=pe[w+(t+p)>>2]|0;do{if(e)if(e>>>0<r>>>0)Xe();else{pe[D+16>>2]=e;pe[e+24>>2]=D;break}}while(0);t=pe[w+(s+t)>>2]|0;if(!t)break;if(t>>>0<(pe[155]|0)>>>0)Xe();else{pe[D+20>>2]=t;pe[t+24>>2]=D;break}}else{i=pe[w+((c|8)+p)>>2]|0;n=pe[w+(p+12+c)>>2]|0;r=644+(o<<1<<2)|0;do{if((i|0)!=(r|0)){if(i>>>0<e>>>0)Xe();if((pe[i+12>>2]|0)==(t|0))break;Xe()}}while(0);if((n|0)==(i|0)){pe[151]=pe[151]&~(1<<o);break}do{if((n|0)==(r|0))A=n+8|0;else{if(n>>>0<e>>>0)Xe();e=n+8|0;if((pe[e>>2]|0)==(t|0)){A=e;break}Xe()}}while(0);pe[i+12>>2]=n;pe[A>>2]=i}}while(0);t=w+((u|c)+p)|0;n=u+l|0}else n=l;t=t+4|0;pe[t>>2]=pe[t>>2]&-2;pe[w+(f+4)>>2]=n|1;pe[w+(n+f)>>2]=n;t=n>>>3;if(n>>>0<256){e=t<<1;i=644+(e<<2)|0;r=pe[151]|0;t=1<<t;do{if(!(r&t)){pe[151]=r|t;L=644+(e+2<<2)|0;j=i}else{t=644+(e+2<<2)|0;e=pe[t>>2]|0;if(e>>>0>=(pe[155]|0)>>>0){L=t;j=e;break}Xe()}}while(0);pe[L>>2]=d;pe[j+12>>2]=d;pe[w+(f+8)>>2]=j;pe[w+(f+12)>>2]=i;break}t=n>>>8;do{if(!t)i=0;else{if(n>>>0>16777215){i=31;break}L=(t+1048320|0)>>>16&8;j=t<<L;D=(j+520192|0)>>>16&4;j=j<<D;i=(j+245760|0)>>>16&2;i=14-(D|L|i)+(j<<i>>>15)|0;i=n>>>(i+7|0)&1|i<<1}}while(0);t=908+(i<<2)|0;pe[w+(f+28)>>2]=i;pe[w+(f+20)>>2]=0;pe[w+(f+16)>>2]=0;e=pe[152]|0;r=1<<i;if(!(e&r)){pe[152]=e|r;pe[t>>2]=d;pe[w+(f+24)>>2]=t;pe[w+(f+12)>>2]=d;pe[w+(f+8)>>2]=d;break}t=pe[t>>2]|0;r:do{if((pe[t+4>>2]&-8|0)!=(n|0)){i=n<<((i|0)==31?0:25-(i>>>1)|0);while(1){e=t+16+(i>>>31<<2)|0;r=pe[e>>2]|0;if(!r)break;if((pe[r+4>>2]&-8|0)==(n|0)){F=r;break r}else{i=i<<1;t=r}}if(e>>>0<(pe[155]|0)>>>0)Xe();else{pe[e>>2]=d;pe[w+(f+24)>>2]=t;pe[w+(f+12)>>2]=d;pe[w+(f+8)>>2]=d;break t}}else F=t}while(0);t=F+8|0;e=pe[t>>2]|0;j=pe[155]|0;if(e>>>0>=j>>>0&F>>>0>=j>>>0){pe[e+12>>2]=d;pe[t>>2]=d;pe[w+(f+8)>>2]=e;pe[w+(f+12)>>2]=F;pe[w+(f+24)>>2]=0;break}else Xe()}else{F=(pe[154]|0)+l|0;pe[154]=F;pe[157]=d;pe[w+(f+4)>>2]=F|1}}while(0);F=w+(h|8)|0;return F|0}else r=1052;while(1){e=pe[r>>2]|0;if(e>>>0<=a>>>0?(t=pe[r+4>>2]|0,i=e+t|0,i>>>0>a>>>0):0)break;r=pe[r+8>>2]|0}n=e+(t+-39)|0;e=e+(t+-47+((n&7|0)==0?0:0-n&7))|0;n=a+16|0;e=e>>>0<n>>>0?a:e;t=e+8|0;r=w+8|0;r=(r&7|0)==0?0:0-r&7;F=p+-40-r|0;pe[157]=w+r;pe[154]=F;pe[w+(r+4)>>2]=F|1;pe[w+(p+-36)>>2]=40;pe[158]=pe[273];r=e+4|0;pe[r>>2]=27;pe[t>>2]=pe[263];pe[t+4>>2]=pe[264];pe[t+8>>2]=pe[265];pe[t+12>>2]=pe[266];pe[263]=w;pe[264]=p;pe[266]=0;pe[265]=t;t=e+28|0;pe[t>>2]=7;if((e+32|0)>>>0<i>>>0)do{F=t;t=t+4|0;pe[t>>2]=7}while((F+8|0)>>>0<i>>>0);if((e|0)!=(a|0)){o=e-a|0;pe[r>>2]=pe[r>>2]&-2;pe[a+4>>2]=o|1;pe[e>>2]=o;t=o>>>3;if(o>>>0<256){e=t<<1;i=644+(e<<2)|0;r=pe[151]|0;t=1<<t;if(r&t){t=644+(e+2<<2)|0;e=pe[t>>2]|0;if(e>>>0<(pe[155]|0)>>>0)Xe();else{O=t;I=e}}else{pe[151]=r|t;O=644+(e+2<<2)|0;I=i}pe[O>>2]=a;pe[I+12>>2]=a;pe[a+8>>2]=I;pe[a+12>>2]=i;break}t=o>>>8;if(t)if(o>>>0>16777215)i=31;else{j=(t+1048320|0)>>>16&8;F=t<<j;L=(F+520192|0)>>>16&4;F=F<<L;i=(F+245760|0)>>>16&2;i=14-(L|j|i)+(F<<i>>>15)|0;i=o>>>(i+7|0)&1|i<<1}else i=0;r=908+(i<<2)|0;pe[a+28>>2]=i;pe[a+20>>2]=0;pe[n>>2]=0;t=pe[152]|0;e=1<<i;if(!(t&e)){pe[152]=t|e;pe[r>>2]=a;pe[a+24>>2]=r;pe[a+12>>2]=a;pe[a+8>>2]=a;break}t=pe[r>>2]|0;t:do{if((pe[t+4>>2]&-8|0)!=(o|0)){i=o<<((i|0)==31?0:25-(i>>>1)|0);while(1){e=t+16+(i>>>31<<2)|0;r=pe[e>>2]|0;if(!r)break;if((pe[r+4>>2]&-8|0)==(o|0)){R=r;break t}else{i=i<<1;t=r}}if(e>>>0<(pe[155]|0)>>>0)Xe();else{pe[e>>2]=a;pe[a+24>>2]=t;pe[a+12>>2]=a;pe[a+8>>2]=a;break e}}else R=t}while(0);t=R+8|0;e=pe[t>>2]|0;F=pe[155]|0;if(e>>>0>=F>>>0&R>>>0>=F>>>0){pe[e+12>>2]=a;pe[t>>2]=a;pe[a+8>>2]=e;pe[a+12>>2]=R;pe[a+24>>2]=0;break}else Xe()}}else{F=pe[155]|0;if((F|0)==0|w>>>0<F>>>0)pe[155]=w;pe[263]=w;pe[264]=p;pe[266]=0;pe[160]=pe[269];pe[159]=-1;t=0;do{F=t<<1;j=644+(F<<2)|0;pe[644+(F+3<<2)>>2]=j;pe[644+(F+2<<2)>>2]=j;t=t+1|0}while((t|0)!=32);F=w+8|0;F=(F&7|0)==0?0:0-F&7;j=p+-40-F|0;pe[157]=w+F;pe[154]=j;pe[w+(F+4)>>2]=j|1;pe[w+(p+-36)>>2]=40;pe[158]=pe[273]}}while(0);t=pe[154]|0;if(t>>>0>v>>>0){j=t-v|0;pe[154]=j;F=pe[157]|0;pe[157]=F+v;pe[F+(v+4)>>2]=j|1;pe[F+4>>2]=v|3;F=F+8|0;return F|0}}F=lr()|0;pe[F>>2]=12;F=0;return F|0}function zr(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0,g=0;if(!e)return;t=e+-8|0;s=pe[155]|0;if(t>>>0<s>>>0)Xe();r=pe[e+-4>>2]|0;i=r&3;if((i|0)==1)Xe();d=r&-8;v=e+(d+-8)|0;do{if(!(r&1)){t=pe[t>>2]|0;if(!i)return;u=-8-t|0;l=e+u|0;f=t+d|0;if(l>>>0<s>>>0)Xe();if((l|0)==(pe[156]|0)){t=e+(d+-4)|0;r=pe[t>>2]|0;if((r&3|0)!=3){g=l;o=f;break}pe[153]=f;pe[t>>2]=r&-2;pe[e+(u+4)>>2]=f|1;pe[v>>2]=f;return}n=t>>>3;if(t>>>0<256){i=pe[e+(u+8)>>2]|0;r=pe[e+(u+12)>>2]|0;t=644+(n<<1<<2)|0;if((i|0)!=(t|0)){if(i>>>0<s>>>0)Xe();if((pe[i+12>>2]|0)!=(l|0))Xe()}if((r|0)==(i|0)){pe[151]=pe[151]&~(1<<n);g=l;o=f;break}if((r|0)!=(t|0)){if(r>>>0<s>>>0)Xe();t=r+8|0;if((pe[t>>2]|0)==(l|0))a=t;else Xe()}else a=r+8|0;pe[i+12>>2]=r;pe[a>>2]=i;g=l;o=f;break}a=pe[e+(u+24)>>2]|0;i=pe[e+(u+12)>>2]|0;do{if((i|0)==(l|0)){r=e+(u+20)|0;t=pe[r>>2]|0;if(!t){r=e+(u+16)|0;t=pe[r>>2]|0;if(!t){c=0;break}}while(1){i=t+20|0;n=pe[i>>2]|0;if(n){t=n;r=i;continue}i=t+16|0;n=pe[i>>2]|0;if(!n)break;else{t=n;r=i}}if(r>>>0<s>>>0)Xe();else{pe[r>>2]=0;c=t;break}}else{n=pe[e+(u+8)>>2]|0;if(n>>>0<s>>>0)Xe();t=n+12|0;if((pe[t>>2]|0)!=(l|0))Xe();r=i+8|0;if((pe[r>>2]|0)==(l|0)){pe[t>>2]=i;pe[r>>2]=n;c=i;break}else Xe()}}while(0);if(a){t=pe[e+(u+28)>>2]|0;r=908+(t<<2)|0;if((l|0)==(pe[r>>2]|0)){pe[r>>2]=c;if(!c){pe[152]=pe[152]&~(1<<t);g=l;o=f;break}}else{if(a>>>0<(pe[155]|0)>>>0)Xe();t=a+16|0;if((pe[t>>2]|0)==(l|0))pe[t>>2]=c;else pe[a+20>>2]=c;if(!c){g=l;o=f;break}}r=pe[155]|0;if(c>>>0<r>>>0)Xe();pe[c+24>>2]=a;t=pe[e+(u+16)>>2]|0;do{if(t)if(t>>>0<r>>>0)Xe();else{pe[c+16>>2]=t;pe[t+24>>2]=c;break}}while(0);t=pe[e+(u+20)>>2]|0;if(t)if(t>>>0<(pe[155]|0)>>>0)Xe();else{pe[c+20>>2]=t;pe[t+24>>2]=c;g=l;o=f;break}else{g=l;o=f}}else{g=l;o=f}}else{g=t;o=d}}while(0);if(g>>>0>=v>>>0)Xe();t=e+(d+-4)|0;r=pe[t>>2]|0;if(!(r&1))Xe();if(!(r&2)){if((v|0)==(pe[157]|0)){y=(pe[154]|0)+o|0;pe[154]=y;pe[157]=g;pe[g+4>>2]=y|1;if((g|0)!=(pe[156]|0))return;pe[156]=0;pe[153]=0;return}if((v|0)==(pe[156]|0)){y=(pe[153]|0)+o|0;pe[153]=y;pe[156]=g;pe[g+4>>2]=y|1;pe[g+y>>2]=y;return}o=(r&-8)+o|0;n=r>>>3;do{if(r>>>0>=256){a=pe[e+(d+16)>>2]|0;t=pe[e+(d|4)>>2]|0;do{if((t|0)==(v|0)){r=e+(d+12)|0;t=pe[r>>2]|0;if(!t){r=e+(d+8)|0;t=pe[r>>2]|0;if(!t){p=0;break}}while(1){i=t+20|0;n=pe[i>>2]|0;if(n){t=n;r=i;continue}i=t+16|0;n=pe[i>>2]|0;if(!n)break;else{t=n;r=i}}if(r>>>0<(pe[155]|0)>>>0)Xe();else{pe[r>>2]=0;p=t;break}}else{r=pe[e+d>>2]|0;if(r>>>0<(pe[155]|0)>>>0)Xe();i=r+12|0;if((pe[i>>2]|0)!=(v|0))Xe();n=t+8|0;if((pe[n>>2]|0)==(v|0)){pe[i>>2]=t;pe[n>>2]=r;p=t;break}else Xe()}}while(0);if(a){t=pe[e+(d+20)>>2]|0;r=908+(t<<2)|0;if((v|0)==(pe[r>>2]|0)){pe[r>>2]=p;if(!p){pe[152]=pe[152]&~(1<<t);break}}else{if(a>>>0<(pe[155]|0)>>>0)Xe();t=a+16|0;if((pe[t>>2]|0)==(v|0))pe[t>>2]=p;else pe[a+20>>2]=p;if(!p)break}r=pe[155]|0;if(p>>>0<r>>>0)Xe();pe[p+24>>2]=a;t=pe[e+(d+8)>>2]|0;do{if(t)if(t>>>0<r>>>0)Xe();else{pe[p+16>>2]=t;pe[t+24>>2]=p;break}}while(0);t=pe[e+(d+12)>>2]|0;if(t)if(t>>>0<(pe[155]|0)>>>0)Xe();else{pe[p+20>>2]=t;pe[t+24>>2]=p;break}}}else{i=pe[e+d>>2]|0;r=pe[e+(d|4)>>2]|0;t=644+(n<<1<<2)|0;if((i|0)!=(t|0)){if(i>>>0<(pe[155]|0)>>>0)Xe();if((pe[i+12>>2]|0)!=(v|0))Xe()}if((r|0)==(i|0)){pe[151]=pe[151]&~(1<<n);break}if((r|0)!=(t|0)){if(r>>>0<(pe[155]|0)>>>0)Xe();t=r+8|0;if((pe[t>>2]|0)==(v|0))h=t;else Xe()}else h=r+8|0;pe[i+12>>2]=r;pe[h>>2]=i}}while(0);pe[g+4>>2]=o|1;pe[g+o>>2]=o;if((g|0)==(pe[156]|0)){pe[153]=o;return}}else{pe[t>>2]=r&-2;pe[g+4>>2]=o|1;pe[g+o>>2]=o}t=o>>>3;if(o>>>0<256){r=t<<1;n=644+(r<<2)|0;i=pe[151]|0;t=1<<t;if(i&t){t=644+(r+2<<2)|0;r=pe[t>>2]|0;if(r>>>0<(pe[155]|0)>>>0)Xe();else{m=t;b=r}}else{pe[151]=i|t;m=644+(r+2<<2)|0;b=n}pe[m>>2]=g;pe[b+12>>2]=g;pe[g+8>>2]=b;pe[g+12>>2]=n;return}t=o>>>8;if(t)if(o>>>0>16777215)n=31;else{m=(t+1048320|0)>>>16&8;b=t<<m;v=(b+520192|0)>>>16&4;b=b<<v;n=(b+245760|0)>>>16&2;n=14-(v|m|n)+(b<<n>>>15)|0;n=o>>>(n+7|0)&1|n<<1}else n=0;t=908+(n<<2)|0;pe[g+28>>2]=n;pe[g+20>>2]=0;pe[g+16>>2]=0;r=pe[152]|0;i=1<<n;e:do{if(r&i){t=pe[t>>2]|0;t:do{if((pe[t+4>>2]&-8|0)!=(o|0)){n=o<<((n|0)==31?0:25-(n>>>1)|0);while(1){r=t+16+(n>>>31<<2)|0;i=pe[r>>2]|0;if(!i)break;if((pe[i+4>>2]&-8|0)==(o|0)){y=i;break t}else{n=n<<1;t=i}}if(r>>>0<(pe[155]|0)>>>0)Xe();else{pe[r>>2]=g;pe[g+24>>2]=t;pe[g+12>>2]=g;pe[g+8>>2]=g;break e}}else y=t}while(0);t=y+8|0;r=pe[t>>2]|0;b=pe[155]|0;if(r>>>0>=b>>>0&y>>>0>=b>>>0){pe[r+12>>2]=g;pe[t>>2]=g;pe[g+8>>2]=r;pe[g+12>>2]=y;pe[g+24>>2]=0;break}else Xe()}else{pe[152]=r|i;pe[t>>2]=g;pe[g+24>>2]=t;pe[g+12>>2]=g;pe[g+8>>2]=g}}while(0);g=(pe[159]|0)+-1|0;pe[159]=g;if(!g)t=1060;else return;while(1){t=pe[t>>2]|0;if(!t)break;else t=t+8|0}pe[159]=-1;return}function Xr(e,t){e=e|0;t=t|0;var r=0,i=0;if(!e){e=Ur(t)|0;return e|0}if(t>>>0>4294967231){e=lr()|0;pe[e>>2]=12;e=0;return e|0}r=qr(e+-8|0,t>>>0<11?16:t+11&-8)|0;if(r){e=r+8|0;return e|0}r=Ur(t)|0;if(!r){e=0;return e|0}i=pe[e+-4>>2]|0;i=(i&-8)-((i&3|0)==0?8:4)|0;Qr(r|0,e|0,(i>>>0<t>>>0?i:t)|0)|0;zr(e);e=r;return e|0}function Wr(e){e=e|0;var t=0;if(!e){t=0;return t|0}e=pe[e+-4>>2]|0;t=e&3;if((t|0)==1){t=0;return t|0}t=(e&-8)-((t|0)==0?8:4)|0;return t|0}function qr(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0;d=e+4|0;p=pe[d>>2]|0;u=p&-8;l=e+u|0;s=pe[155]|0;r=p&3;if(!((r|0)!=1&e>>>0>=s>>>0&e>>>0<l>>>0))Xe();i=e+(u|4)|0;n=pe[i>>2]|0;if(!(n&1))Xe();if(!r){if(t>>>0<256){e=0;return e|0}if(u>>>0>=(t+4|0)>>>0?(u-t|0)>>>0<=pe[271]<<1>>>0:0)return e|0;e=0;return e|0}if(u>>>0>=t>>>0){r=u-t|0;if(r>>>0<=15)return e|0;pe[d>>2]=p&1|t|2;pe[e+(t+4)>>2]=r|3;pe[i>>2]=pe[i>>2]|1;Hr(e+t|0,r);return e|0}if((l|0)==(pe[157]|0)){r=(pe[154]|0)+u|0;if(r>>>0<=t>>>0){e=0;return e|0}h=r-t|0;pe[d>>2]=p&1|t|2;pe[e+(t+4)>>2]=h|1;pe[157]=e+t;pe[154]=h;return e|0}if((l|0)==(pe[156]|0)){i=(pe[153]|0)+u|0;if(i>>>0<t>>>0){e=0;return e|0}r=i-t|0;if(r>>>0>15){pe[d>>2]=p&1|t|2;pe[e+(t+4)>>2]=r|1;pe[e+i>>2]=r;i=e+(i+4)|0;pe[i>>2]=pe[i>>2]&-2;i=e+t|0}else{pe[d>>2]=p&1|i|2;i=e+(i+4)|0;pe[i>>2]=pe[i>>2]|1;i=0;r=0}pe[153]=r;pe[156]=i;return e|0}if(n&2){e=0;return e|0}f=(n&-8)+u|0;if(f>>>0<t>>>0){e=0;return e|0}h=f-t|0;o=n>>>3;do{if(n>>>0>=256){a=pe[e+(u+24)>>2]|0;o=pe[e+(u+12)>>2]|0;do{if((o|0)==(l|0)){i=e+(u+20)|0;r=pe[i>>2]|0;if(!r){i=e+(u+16)|0;r=pe[i>>2]|0;if(!r){c=0;break}}while(1){n=r+20|0;o=pe[n>>2]|0;if(o){r=o;i=n;continue}n=r+16|0;o=pe[n>>2]|0;if(!o)break;else{r=o;i=n}}if(i>>>0<s>>>0)Xe();else{pe[i>>2]=0;c=r;break}}else{n=pe[e+(u+8)>>2]|0;if(n>>>0<s>>>0)Xe();r=n+12|0;if((pe[r>>2]|0)!=(l|0))Xe();i=o+8|0;if((pe[i>>2]|0)==(l|0)){pe[r>>2]=o;pe[i>>2]=n;c=o;break}else Xe()}}while(0);if(a){r=pe[e+(u+28)>>2]|0;i=908+(r<<2)|0;if((l|0)==(pe[i>>2]|0)){pe[i>>2]=c;if(!c){pe[152]=pe[152]&~(1<<r);break}}else{if(a>>>0<(pe[155]|0)>>>0)Xe();r=a+16|0;if((pe[r>>2]|0)==(l|0))pe[r>>2]=c;else pe[a+20>>2]=c;if(!c)break}i=pe[155]|0;if(c>>>0<i>>>0)Xe();pe[c+24>>2]=a;r=pe[e+(u+16)>>2]|0;do{if(r)if(r>>>0<i>>>0)Xe();else{pe[c+16>>2]=r;pe[r+24>>2]=c;break}}while(0);r=pe[e+(u+20)>>2]|0;if(r)if(r>>>0<(pe[155]|0)>>>0)Xe();else{pe[c+20>>2]=r;pe[r+24>>2]=c;break}}}else{n=pe[e+(u+8)>>2]|0;i=pe[e+(u+12)>>2]|0;r=644+(o<<1<<2)|0;if((n|0)!=(r|0)){if(n>>>0<s>>>0)Xe();if((pe[n+12>>2]|0)!=(l|0))Xe()}if((i|0)==(n|0)){pe[151]=pe[151]&~(1<<o);break}if((i|0)!=(r|0)){if(i>>>0<s>>>0)Xe();r=i+8|0;if((pe[r>>2]|0)==(l|0))a=r;else Xe()}else a=i+8|0;pe[n+12>>2]=i;pe[a>>2]=n}}while(0);if(h>>>0<16){pe[d>>2]=f|p&1|2;t=e+(f|4)|0;pe[t>>2]=pe[t>>2]|1;return e|0}else{pe[d>>2]=p&1|t|2;pe[e+(t+4)>>2]=h|3;p=e+(f|4)|0;pe[p>>2]=pe[p>>2]|1;Hr(e+t|0,h);return e|0}return 0}function Hr(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0;v=e+t|0;r=pe[e+4>>2]|0;do{if(!(r&1)){c=pe[e>>2]|0;if(!(r&3))return;h=e+(0-c)|0;f=c+t|0;u=pe[155]|0;if(h>>>0<u>>>0)Xe();if((h|0)==(pe[156]|0)){i=e+(t+4)|0;r=pe[i>>2]|0;if((r&3|0)!=3){y=h;a=f;break}pe[153]=f;pe[i>>2]=r&-2;pe[e+(4-c)>>2]=f|1;pe[v>>2]=f;return}o=c>>>3;if(c>>>0<256){n=pe[e+(8-c)>>2]|0;i=pe[e+(12-c)>>2]|0;r=644+(o<<1<<2)|0;if((n|0)!=(r|0)){if(n>>>0<u>>>0)Xe();if((pe[n+12>>2]|0)!=(h|0))Xe()}if((i|0)==(n|0)){pe[151]=pe[151]&~(1<<o);y=h;a=f;break}if((i|0)!=(r|0)){if(i>>>0<u>>>0)Xe();r=i+8|0;if((pe[r>>2]|0)==(h|0))s=r;else Xe()}else s=i+8|0;pe[n+12>>2]=i;pe[s>>2]=n;y=h;a=f;break}s=pe[e+(24-c)>>2]|0;n=pe[e+(12-c)>>2]|0;do{if((n|0)==(h|0)){n=16-c|0;i=e+(n+4)|0;r=pe[i>>2]|0;if(!r){i=e+n|0;r=pe[i>>2]|0;if(!r){l=0;break}}while(1){n=r+20|0;o=pe[n>>2]|0;if(o){r=o;i=n;continue}n=r+16|0;o=pe[n>>2]|0;if(!o)break;else{r=o;i=n}}if(i>>>0<u>>>0)Xe();else{pe[i>>2]=0;l=r;break}}else{o=pe[e+(8-c)>>2]|0;if(o>>>0<u>>>0)Xe();r=o+12|0;if((pe[r>>2]|0)!=(h|0))Xe();i=n+8|0;if((pe[i>>2]|0)==(h|0)){pe[r>>2]=n;pe[i>>2]=o;l=n;break}else Xe()}}while(0);if(s){r=pe[e+(28-c)>>2]|0;i=908+(r<<2)|0;if((h|0)==(pe[i>>2]|0)){pe[i>>2]=l;if(!l){pe[152]=pe[152]&~(1<<r);y=h;a=f;break}}else{if(s>>>0<(pe[155]|0)>>>0)Xe();r=s+16|0;if((pe[r>>2]|0)==(h|0))pe[r>>2]=l;else pe[s+20>>2]=l;if(!l){y=h;a=f;break}}n=pe[155]|0;if(l>>>0<n>>>0)Xe();pe[l+24>>2]=s;r=16-c|0;i=pe[e+r>>2]|0;do{if(i)if(i>>>0<n>>>0)Xe();else{pe[l+16>>2]=i;pe[i+24>>2]=l;break}}while(0);r=pe[e+(r+4)>>2]|0;if(r)if(r>>>0<(pe[155]|0)>>>0)Xe();else{pe[l+20>>2]=r;pe[r+24>>2]=l;y=h;a=f;break}else{y=h;a=f}}else{y=h;a=f}}else{y=e;a=t}}while(0);u=pe[155]|0;if(v>>>0<u>>>0)Xe();r=e+(t+4)|0;i=pe[r>>2]|0;if(!(i&2)){if((v|0)==(pe[157]|0)){b=(pe[154]|0)+a|0;pe[154]=b;pe[157]=y;pe[y+4>>2]=b|1;if((y|0)!=(pe[156]|0))return;pe[156]=0;pe[153]=0;return}if((v|0)==(pe[156]|0)){b=(pe[153]|0)+a|0;pe[153]=b;pe[156]=y;pe[y+4>>2]=b|1;pe[y+b>>2]=b;return}a=(i&-8)+a|0;o=i>>>3;do{if(i>>>0>=256){s=pe[e+(t+24)>>2]|0;n=pe[e+(t+12)>>2]|0;do{if((n|0)==(v|0)){i=e+(t+20)|0;r=pe[i>>2]|0;if(!r){i=e+(t+16)|0;r=pe[i>>2]|0;if(!r){p=0;break}}while(1){n=r+20|0;o=pe[n>>2]|0;if(o){r=o;i=n;continue}n=r+16|0;o=pe[n>>2]|0;if(!o)break;else{r=o;i=n}}if(i>>>0<u>>>0)Xe();else{pe[i>>2]=0;p=r;break}}else{o=pe[e+(t+8)>>2]|0;if(o>>>0<u>>>0)Xe();r=o+12|0;if((pe[r>>2]|0)!=(v|0))Xe();i=n+8|0;if((pe[i>>2]|0)==(v|0)){pe[r>>2]=n;pe[i>>2]=o;p=n;break}else Xe()}}while(0);if(s){r=pe[e+(t+28)>>2]|0;i=908+(r<<2)|0;if((v|0)==(pe[i>>2]|0)){pe[i>>2]=p;if(!p){pe[152]=pe[152]&~(1<<r);break}}else{if(s>>>0<(pe[155]|0)>>>0)Xe();r=s+16|0;if((pe[r>>2]|0)==(v|0))pe[r>>2]=p;else pe[s+20>>2]=p;if(!p)break}i=pe[155]|0;if(p>>>0<i>>>0)Xe();pe[p+24>>2]=s;r=pe[e+(t+16)>>2]|0;do{if(r)if(r>>>0<i>>>0)Xe();else{pe[p+16>>2]=r;pe[r+24>>2]=p;break}}while(0);r=pe[e+(t+20)>>2]|0;if(r)if(r>>>0<(pe[155]|0)>>>0)Xe();else{pe[p+20>>2]=r;pe[r+24>>2]=p;break}}}else{n=pe[e+(t+8)>>2]|0;i=pe[e+(t+12)>>2]|0;r=644+(o<<1<<2)|0;if((n|0)!=(r|0)){if(n>>>0<u>>>0)Xe();if((pe[n+12>>2]|0)!=(v|0))Xe()}if((i|0)==(n|0)){pe[151]=pe[151]&~(1<<o);break}if((i|0)!=(r|0)){if(i>>>0<u>>>0)Xe();r=i+8|0;if((pe[r>>2]|0)==(v|0))d=r;else Xe()}else d=i+8|0;pe[n+12>>2]=i;pe[d>>2]=n}}while(0);pe[y+4>>2]=a|1;pe[y+a>>2]=a;if((y|0)==(pe[156]|0)){pe[153]=a;return}}else{pe[r>>2]=i&-2;pe[y+4>>2]=a|1;pe[y+a>>2]=a}r=a>>>3;if(a>>>0<256){i=r<<1;o=644+(i<<2)|0;n=pe[151]|0;r=1<<r;if(n&r){r=644+(i+2<<2)|0;i=pe[r>>2]|0;if(i>>>0<(pe[155]|0)>>>0)Xe();else{m=r;b=i}}else{pe[151]=n|r;m=644+(i+2<<2)|0;b=o}pe[m>>2]=y;pe[b+12>>2]=y;pe[y+8>>2]=b;pe[y+12>>2]=o;return}r=a>>>8;if(r)if(a>>>0>16777215)o=31;else{m=(r+1048320|0)>>>16&8;b=r<<m;v=(b+520192|0)>>>16&4;b=b<<v;o=(b+245760|0)>>>16&2;o=14-(v|m|o)+(b<<o>>>15)|0;o=a>>>(o+7|0)&1|o<<1}else o=0;r=908+(o<<2)|0;pe[y+28>>2]=o;pe[y+20>>2]=0;pe[y+16>>2]=0;i=pe[152]|0;n=1<<o;if(!(i&n)){pe[152]=i|n;pe[r>>2]=y;pe[y+24>>2]=r;pe[y+12>>2]=y;pe[y+8>>2]=y;return}r=pe[r>>2]|0;e:do{if((pe[r+4>>2]&-8|0)!=(a|0)){o=a<<((o|0)==31?0:25-(o>>>1)|0);while(1){i=r+16+(o>>>31<<2)|0;n=pe[i>>2]|0;if(!n)break;if((pe[n+4>>2]&-8|0)==(a|0)){r=n;break e}else{o=o<<1;r=n}}if(i>>>0<(pe[155]|0)>>>0)Xe();pe[i>>2]=y;pe[y+24>>2]=r;pe[y+12>>2]=y;pe[y+8>>2]=y;return}}while(0);i=r+8|0;n=pe[i>>2]|0;b=pe[155]|0;if(!(n>>>0>=b>>>0&r>>>0>=b>>>0))Xe();pe[n+12>>2]=y;pe[i>>2]=y;pe[y+8>>2]=n;pe[y+12>>2]=r;pe[y+24>>2]=0;return}function Gr(){}function Vr(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;i=t-i-(r>>>0>e>>>0|0)>>>0;return(re=i,e-r>>>0|0)|0}function Yr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0,a=0;i=e+r|0;if((r|0)>=20){t=t&255;o=e&3;a=t|t<<8|t<<16|t<<24;n=i&~3;if(o){o=e+4-o|0;while((e|0)<(o|0)){de[e>>0]=t;e=e+1|0}}while((e|0)<(n|0)){pe[e>>2]=a;e=e+4|0}}while((e|0)<(i|0)){de[e>>0]=t;e=e+1|0}return e-r|0}function Jr(e,t,r){e=e|0;t=t|0;r=r|0;if((r|0)<32){re=t>>>r;return e>>>r|(t&(1<<r)-1)<<32-r}re=0;return t>>>r-32|0}function Kr(e,t,r){e=e|0;t=t|0;r=r|0;if((r|0)<32){re=t<<r|(e&(1<<r)-1<<32-r)>>>32-r;return e<<r}re=e<<r-32;return 0}function Zr(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;r=e+r>>>0;return(re=t+i+(r>>>0<e>>>0|0)>>>0,r|0)|0}function Qr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;if((r|0)>=4096)return Ie(e|0,t|0,r|0)|0;i=e|0;if((e&3)==(t&3)){while(e&3){if(!r)return i|0;de[e>>0]=de[t>>0]|0;e=e+1|0;t=t+1|0;r=r-1|0}while((r|0)>=4){pe[e>>2]=pe[t>>2];e=e+4|0;t=t+4|0;r=r-4|0}}while((r|0)>0){de[e>>0]=de[t>>0]|0;e=e+1|0;t=t+1|0;r=r-1|0}return i|0}function $r(e,t,r){e=e|0;t=t|0;r=r|0;if((r|0)<32){re=t>>r;return e>>>r|(t&(1<<r)-1)<<32-r}re=(t|0)<0?-1:0;return t>>r-32|0}function ei(e){e=e|0;var t=0;t=de[m+(e&255)>>0]|0;if((t|0)<8)return t|0;t=de[m+(e>>8&255)>>0]|0;if((t|0)<8)return t+8|0;t=de[m+(e>>16&255)>>0]|0;if((t|0)<8)return t+16|0;return(de[m+(e>>>24)>>0]|0)+24|0}function ti(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0;o=e&65535;n=t&65535;r=ye(n,o)|0;i=e>>>16;e=(r>>>16)+(ye(n,i)|0)|0;n=t>>>16;t=ye(n,o)|0;return(re=(e>>>16)+(ye(n,i)|0)+(((e&65535)+t|0)>>>16)|0,e+t<<16|r&65535|0)|0}function ri(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,o=0,a=0,s=0,u=0,c=0;c=t>>31|((t|0)<0?-1:0)<<1;u=((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1;o=i>>31|((i|0)<0?-1:0)<<1;n=((i|0)<0?-1:0)>>31|((i|0)<0?-1:0)<<1;s=Vr(c^e,u^t,c,u)|0;a=re;e=o^c;t=n^u;return Vr((si(s,a,Vr(o^r,n^i,o,n)|0,re,0)|0)^e,re^t,e,t)|0}function ii(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,o=0,a=0,s=0,u=0,c=0;n=be;be=be+16|0;s=n|0;a=t>>31|((t|0)<0?-1:0)<<1;o=((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1;c=i>>31|((i|0)<0?-1:0)<<1;u=((i|0)<0?-1:0)>>31|((i|0)<0?-1:0)<<1;e=Vr(a^e,o^t,a,o)|0;t=re;si(e,t,Vr(c^r,u^i,c,u)|0,re,s)|0;i=Vr(pe[s>>2]^a,pe[s+4>>2]^o,a,o)|0;r=re;be=n;return(re=r,i)|0}function ni(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,o=0;n=e;o=r;r=ti(n,o)|0;e=re;return(re=(ye(t,o)|0)+(ye(i,n)|0)+e|e&0,r|0|0)|0}function oi(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;return si(e,t,r,i,0)|0}function ai(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,o=0;o=be;be=be+16|0;n=o|0;si(e,t,r,i,n)|0;be=o;return(re=pe[n+4>>2]|0,pe[n>>2]|0)|0}function si(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0;l=e;u=t;c=u;a=r;h=i;s=h;if(!c){o=(n|0)!=0;if(!s){if(o){pe[n>>2]=(l>>>0)%(a>>>0);pe[n+4>>2]=0}h=0;n=(l>>>0)/(a>>>0)>>>0;return(re=h,n)|0}else{if(!o){h=0;n=0;return(re=h,n)|0}pe[n>>2]=e|0;pe[n+4>>2]=t&0;h=0;n=0;return(re=h,n)|0}}o=(s|0)==0;do{if(a){if(!o){o=(ae(s|0)|0)-(ae(c|0)|0)|0;if(o>>>0<=31){f=o+1|0;s=31-o|0;t=o-31>>31;a=f;e=l>>>(f>>>0)&t|c<<s;t=c>>>(f>>>0)&t;o=0;s=l<<s;break}if(!n){h=0;n=0;return(re=h,n)|0}pe[n>>2]=e|0;pe[n+4>>2]=u|t&0;h=0;n=0;return(re=h,n)|0}o=a-1|0;if(o&a){s=(ae(a|0)|0)+33-(ae(c|0)|0)|0;p=64-s|0;f=32-s|0;u=f>>31;d=s-32|0;t=d>>31;a=s;e=f-1>>31&c>>>(d>>>0)|(c<<f|l>>>(s>>>0))&t;t=t&c>>>(s>>>0);o=l<<p&u;s=(c<<p|l>>>(d>>>0))&u|l<<f&s-33>>31;break}if(n){pe[n>>2]=o&l;pe[n+4>>2]=0}if((a|0)==1){d=u|t&0;p=e|0|0;return(re=d,p)|0}else{p=ei(a|0)|0;d=c>>>(p>>>0)|0;p=c<<32-p|l>>>(p>>>0)|0;return(re=d,p)|0}}else{if(o){if(n){pe[n>>2]=(c>>>0)%(a>>>0);pe[n+4>>2]=0}d=0;p=(c>>>0)/(a>>>0)>>>0;return(re=d,p)|0}if(!l){if(n){pe[n>>2]=0;pe[n+4>>2]=(c>>>0)%(s>>>0)}d=0;p=(c>>>0)/(s>>>0)>>>0;return(re=d,p)|0}o=s-1|0;if(!(o&s)){if(n){pe[n>>2]=e|0;pe[n+4>>2]=o&c|t&0}d=0;p=c>>>((ei(s|0)|0)>>>0);return(re=d,p)|0}o=(ae(s|0)|0)-(ae(c|0)|0)|0;if(o>>>0<=30){t=o+1|0;s=31-o|0;a=t;e=c<<s|l>>>(t>>>0);t=c>>>(t>>>0);o=0;s=l<<s;break}if(!n){d=0;p=0;return(re=d,p)|0}pe[n>>2]=e|0;pe[n+4>>2]=u|t&0;d=0;p=0;return(re=d,p)|0}}while(0);if(!a){c=s;u=0;s=0}else{f=r|0|0;l=h|i&0;c=Zr(f|0,l|0,-1,-1)|0;r=re;u=s;s=0;do{i=u;u=o>>>31|u<<1;o=s|o<<1;i=e<<1|i>>>31|0;h=e>>>31|t<<1|0;Vr(c,r,i,h)|0;p=re;d=p>>31|((p|0)<0?-1:0)<<1;s=d&1;e=Vr(i,h,d&f,(((p|0)<0?-1:0)>>31|((p|0)<0?-1:0)<<1)&l)|0;t=re;a=a-1|0}while((a|0)!=0);c=u;u=0}a=0;if(n){pe[n>>2]=e;pe[n+4>>2]=t}d=(o|0)>>>31|(c|a)<<1|(a<<1|o>>>31)&0|u;p=(o<<1|0>>>31)&-2|s;return(re=d,p)|0}function ui(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;return Pi[e&7](t|0,r|0,i|0)|0}function ci(e,t,r,i,n,o){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;Ei[e&3](t|0,r|0,i|0,n|0,o|0)}function li(e,t){e=e|0;t=t|0;ki[e&7](t|0)}function fi(e,t){e=e|0;t=t|0;return Ci[e&1](t|0)|0}function hi(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;Ai[e&0](t|0,r|0,i|0)}function di(e){e=e|0;Oi[e&3]()}function pi(e,t,r,i,n,o,a){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;a=a|0;Ii[e&3](t|0,r|0,i|0,n|0,o|0,a|0)}function vi(e,t,r,i,n,o){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;return Ri[e&1](t|0,r|0,i|0,n|0,o|0)|0}function mi(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;Di[e&3](t|0,r|0,i|0,n|0)}function bi(e,t,r){e=e|0;t=t|0;r=r|0;se(0);return 0}function yi(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;se(1)}function gi(e){e=e|0;se(2)}function _i(e){e=e|0;se(3);return 0}function wi(e,t,r){e=e|0;t=t|0;r=r|0;se(4)}function xi(){se(5)}function Ti(e,t,r,i,n,o){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;se(6)}function Si(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;se(7);return 0}function Mi(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;se(8)}var Pi=[bi,Yt,jr,Cr,kr,Ar,bi,bi];var Ei=[yi,tr,er,yi];var ki=[gi,Wt,Gt,qt,Ht,Vt,ur,Lr];var Ci=[_i,Er];var Ai=[wi];var Oi=[xi,ar,sr,xi];var Ii=[Ti,ir,rr,Ti];var Ri=[Si,ut];var Di=[Mi,Kt,Zt,Mi];return{___cxa_can_catch:nr,_crn_get_levels:Tt,_crn_get_uncompressed_size:Mt,_crn_decompress:Pt,_i64Add:Zr,_crn_get_width:wt,___cxa_is_pointer_type:or,_i64Subtract:Vr,_memset:Yr,_malloc:Ur,_free:zr,_memcpy:Qr,_bitshift64Lshr:Jr,_fflush:mr,_bitshift64Shl:Kr,_crn_get_height:xt,___errno_location:lr,_crn_get_dxt_format:St,runPostSets:Gr,_emscripten_replace_memory:Ye,stackAlloc:Je,stackSave:Ke,stackRestore:Ze,establishStackSpace:Qe,setThrew:$e,setTempRet0:rt,getTempRet0:it,dynCall_iiii:ui,dynCall_viiiii:ci,dynCall_vi:li,dynCall_ii:fi,dynCall_viii:hi,dynCall_v:di,dynCall_viiiiii:pi,dynCall_iiiiii:vi,dynCall_viiii:mi}}(e.Ya,e.Za,buffer);e.___cxa_can_catch=Z.___cxa_can_catch,e._crn_get_levels=Z._crn_get_levels,e.runPostSets=Z.runPostSets,e._crn_get_uncompressed_size=Z._crn_get_uncompressed_size,e._crn_decompress=Z._crn_decompress;var zc=e._i64Add=Z._i64Add;e._crn_get_height=Z._crn_get_height,e.___cxa_is_pointer_type=Z.___cxa_is_pointer_type;var nb=e._i64Subtract=Z._i64Subtract,qb=e._memset=Z._memset,Ea=e._malloc=Z._malloc,Bc=e._memcpy=Z._memcpy,Xa=e._emscripten_replace_memory=Z._emscripten_replace_memory;e._crn_get_dxt_format=Z._crn_get_dxt_format;var rb=e._bitshift64Lshr=Z._bitshift64Lshr,Na=e._free=Z._free;e._fflush=Z._fflush,e._crn_get_width=Z._crn_get_width,e.___errno_location=Z.___errno_location;var sb=e._bitshift64Shl=Z._bitshift64Shl;function ia(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}e.dynCall_iiii=Z.dynCall_iiii,e.dynCall_viiiii=Z.dynCall_viiiii,e.dynCall_vi=Z.dynCall_vi,e.dynCall_ii=Z.dynCall_ii,e.dynCall_viii=Z.dynCall_viii,e.dynCall_v=Z.dynCall_v,e.dynCall_viiiiii=Z.dynCall_viiiiii,e.dynCall_iiiiii=Z.dynCall_iiiiii,e.dynCall_viiii=Z.dynCall_viiii,n.aa=Z.stackAlloc,n.ua=Z.stackSave,n.ba=Z.stackRestore,n.Cd=Z.establishStackSpace,n.rb=Z.setTempRet0,n.fb=Z.getTempRet0,ia.prototype=Error(),ia.prototype.constructor=ia;var rd=null,jb=function t(){e.calledRun||td(),e.calledRun||(jb=t)};function td(t){function r(){if(!e.calledRun&&(e.calledRun=!0,!na)){if(Ha||(Ha=!0,ab(cb)),ab(db),e.onRuntimeInitialized&&e.onRuntimeInitialized(),e._main&&vd&&e.callMain(t),e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;)gb(e.postRun.shift());ab(eb)}}if(t=t||e.arguments,null===rd&&(rd=Date.now()),!(0<I)){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)fb(e.preRun.shift());ab(bb),0<I||e.calledRun||(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1),r()},1)):r())}}function ud(t,r){if(!r||!e.noExitRuntime)throw!e.noExitRuntime&&(na=!0,m=void 0,ab(H),e.onExit)&&e.onExit(t),da?(process.stdout.once("drain",function(){process.exit(t)}),console.log(" "),setTimeout(function(){process.exit(t)},500)):ea&&"function"==typeof quit&&quit(t),new ia(t)}e.callMain=e.zd=function(t){function r(){for(var e=0;e<3;e++)n.push(0)}assert(0==I,"cannot call main when async dependencies remain! (listen on __ATMAIN__)"),assert(0==bb.length,"cannot call main when preRun functions remain to be called"),t=t||[],Ha||(Ha=!0,ab(cb));var i=t.length+1,n=[D(hb(e.thisProgram),"i8",0)];r();for(var o=0;o<i-1;o+=1)n.push(D(hb(t[o]),"i8",0)),r();n.push(0),n=D(n,"i32",0);try{ud(e._main(i,n,0),!0)}catch(t){if(!(t instanceof ia)){if("SimulateInfiniteLoop"!=t)throw t&&"object"==typeof t&&t.stack&&e.W("exception thrown: "+[t,t.stack]),t;e.noExitRuntime=!0}}},e.run=e.run=td,e.exit=e.exit=ud;var wd=[];function x(t){t=void 0!==t?(e.print(t),e.W(t),JSON.stringify(t)):"",na=!0;var r="abort("+t+") at "+Oa()+"\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";throw wd&&wd.forEach(function(e){r=e(r,t)}),r}if(e.abort=e.abort=x,e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);0<e.preInit.length;)e.preInit.pop()();var vd=!0;e.noInitialRun&&(vd=!1),td(),window.Module=e,function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pixiCompressedTextures=e()}}(function(){var define,module,exports;return function o(a,s,u){function c(r,e){if(!s[r]){if(!a[r]){var t="function"==typeof require&&require;if(!e&&t)return t(r,!0);if(l)return l(r,!0);var i=new Error("Cannot find module '"+r+"'");throw i.code="MODULE_NOT_FOUND",i}var n=s[r]={exports:{}};a[r][0].call(n.exports,function(e){var t=a[r][1][e];return c(t||e)},n,n.exports,o,a,s,u)}return s[r].exports}for(var l="function"==typeof require&&require,e=0;e<u.length;e++)c(u[e]);return c}({1:[function(require,module,exports){(function(process,Buffer,__dirname){var e;e||(e=eval("(function() { try { return Module || {} } catch(e) { return {} } })()"));var aa={},k;for(k in e)e.hasOwnProperty(k)&&(aa[k]=e[k]);var ba="object"==typeof window,ca="function"==typeof importScripts,da="object"==typeof process&&"function"==typeof require&&!ba&&!ca,ea=!ba&&!da&&!ca;if(da){e.print||(e.print=function(e){process.stdout.write(e+"\n")}),e.printErr||(e.printErr=function(e){process.stderr.write(e+"\n")});var fa=require("fs"),ga=require("path");e.read=function(e,t){e=ga.normalize(e);var r=fa.readFileSync(e);return r||e==ga.resolve(e)||(e=path.join(__dirname,"..","src",e),r=fa.readFileSync(e)),r&&!t&&(r=r.toString()),r},e.readBinary=function(t){return(t=e.read(t,!0)).buffer||(t=new Uint8Array(t)),assert(t.buffer),t},e.load=function(e){ha(read(e))},e.thisProgram||(e.thisProgram=1<process.argv.length?process.argv[1].replace(/\\/g,"/"):"unknown-program"),e.arguments=process.argv.slice(2),void 0!==module&&(module.exports=e),process.on("uncaughtException",function(e){if(!(e instanceof ia))throw e}),e.inspect=function(){return"[Emscripten Module object]"}}else if(ea)e.print||(e.print=print),"undefined"!=typeof printErr&&(e.printErr=printErr),e.read="undefined"!=typeof read?read:function(){throw"no read() available (jsc?)"},e.readBinary=function(e){return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(assert("object"==typeof(e=read(e,"binary"))),e)},"undefined"!=typeof scriptArgs?e.arguments=scriptArgs:void 0!==arguments&&(e.arguments=arguments),eval("if (typeof gc === 'function' && gc.toString().indexOf('[native code]') > 0) var gc = undefined");else{if(!ba&&!ca)throw"Unknown runtime environment. Where are we?";e.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},void 0!==arguments&&(e.arguments=arguments),"undefined"!=typeof console?(e.print||(e.print=function(e){console.log(e)}),e.printErr||(e.printErr=function(e){console.log(e)})):e.print||(e.print=function(){}),ca&&(e.load=importScripts),void 0===e.setWindowTitle&&(e.setWindowTitle=function(e){document.title=e})}function ha(e){eval.call(null,e)}for(k in!e.load&&e.read&&(e.load=function(t){ha(e.read(t))}),e.print||(e.print=function(){}),e.printErr||(e.printErr=e.print),e.arguments||(e.arguments=[]),e.thisProgram||(e.thisProgram="./this.program"),e.print=e.print,e.W=e.printErr,e.preRun=[],e.postRun=[],aa)aa.hasOwnProperty(k)&&(e[k]=aa[k]);var n={rb:function(e){ka=e},fb:function(){return ka},ua:function(){return m},ba:function(e){m=e},Ka:function(e){switch(e){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:return"*"===e[e.length-1]?n.J:"i"===e[0]?(assert(0==(e=parseInt(e.substr(1)))%8),e/8):0}},eb:function(e){return Math.max(n.Ka(e),n.J)},ud:16,Qd:function(e,t){return"double"===t||"i64"===t?7&e&&(assert(4==(7&e)),e+=4):assert(0==(3&e)),e},Ed:function(e,t,r){return r||"i64"!=e&&"double"!=e?e?Math.min(t||(e?n.eb(e):0),n.J):Math.min(t,8):8},L:function(t,r,i){return i&&i.length?(i.splice||(i=Array.prototype.slice.call(i)),i.splice(0,0,r),e["dynCall_"+t].apply(null,i)):e["dynCall_"+t].call(null,r)},Z:[],Xa:function(e){for(var t=0;t<n.Z.length;t++)if(!n.Z[t])return n.Z[t]=e,2*(1+t);throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."},nb:function(e){n.Z[(e-2)/2]=null},O:function(t){n.O.ta||(n.O.ta={}),n.O.ta[t]||(n.O.ta[t]=1,e.W(t))},ma:{},Hd:function(e,t){assert(t),n.ma[t]||(n.ma[t]={});var r=n.ma[t];return r[e]||(r[e]=function(){return n.L(t,e,arguments)}),r[e]},Fd:function(){throw"You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work"},aa:function(e){var t=m;return m=(m=m+e|0)+15&-16,t},Ra:function(e){var t=la;return la=(la=la+e|0)+15&-16,t},R:function(e){var i=r;return t<=(r=(r=r+e|0)+15&-16)&&!ma()?(r=i,0):i},ja:function(e,t){return Math.ceil(e/(t||16))*(t||16)},Nd:function(e,t,r){return r?+(e>>>0)+4294967296*+(t>>>0):+(e>>>0)+4294967296*+(0|t)},Ua:8,J:4,vd:0};e.Runtime=n,n.addFunction=n.Xa,n.removeFunction=n.nb;var na=!1,oa,pa,ka,ra,sa;function assert(e,t){e||x("Assertion failed: "+t)}function qa(a){var b=e["_"+a];if(!b)try{b=eval("_"+a)}catch(e){}return assert(b,"Cannot call unknown function "+a+" (perhaps LLVM optimizations or closure removed it?)"),b}function wa(e,t,r){switch("*"===(r=r||"i8").charAt(r.length-1)&&(r="i32"),r){case"i1":case"i8":y[e>>0]=t;break;case"i16":z[e>>1]=t;break;case"i32":C[e>>2]=t;break;case"i64":pa=[t>>>0,(oa=t,1<=+xa(oa)?0<oa?(0|ya(+za(oa/4294967296),4294967295))>>>0:~~+Aa((oa-+(~~oa>>>0))/4294967296)>>>0:0)],C[e>>2]=pa[0],C[e+4>>2]=pa[1];break;case"float":Ba[e>>2]=t;break;case"double":Ca[e>>3]=t;break;default:x("invalid type for setValue: "+r)}}function Da(e,t){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return y[e>>0];case"i16":return z[e>>1];case"i32":case"i64":return C[e>>2];case"float":return Ba[e>>2];case"double":return Ca[e>>3];default:x("invalid type for setValue: "+t)}return null}function D(e,t,r,i){var o,a;a="number"==typeof e?(o=!0,e):(o=!1,e.length);var s,u,c="string"==typeof t?t:null;if(r=4==r?i:[Ea,n.aa,n.Ra,n.R][void 0===r?2:r](Math.max(a,c?1:t.length)),o){for(assert(0==(3&(i=r))),e=r+(-4&a);i<e;i+=4)C[i>>2]=0;for(e=r+a;i<e;)y[i++>>0]=0;return r}if("i8"===c)return e.subarray||e.slice?E.set(e,r):E.set(new Uint8Array(e),r),r;for(i=0;i<a;){var l=e[i];"function"==typeof l&&(l=n.Id(l)),0===(o=c||t[i])?i++:("i64"==o&&(o="i32"),wa(r+i,l,o),u!==o&&(s=n.Ka(o),u=o),i+=s)}return r}function va(t,r){if(0===r||!t)return"";for(var i,n=0,o=0;(n|=i=E[t+o>>0],0!=i||r)&&(o++,!r||o!=r););if(r||(r=o),i="",n<128){for(;0<r;)n=String.fromCharCode.apply(String,E.subarray(t,t+Math.min(r,1024))),i=i?i+n:n,t+=1024,r-=1024;return i}return e.UTF8ToString(t)}function Ja(e,t){for(var r,i,n,o,a,s="";;){if(!(r=e[t++]))return s;128&r?(i=63&e[t++],192==(224&r)?s+=String.fromCharCode((31&r)<<6|i):(n=63&e[t++],(r=224==(240&r)?(15&r)<<12|i<<6|n:(o=63&e[t++],240==(248&r)?(7&r)<<18|i<<12|n<<6|o:(a=63&e[t++],248==(252&r)?(3&r)<<24|i<<18|n<<12|o<<6|a:(1&r)<<30|i<<24|n<<18|o<<12|a<<6|63&e[t++])))<65536?s+=String.fromCharCode(r):(r-=65536,s+=String.fromCharCode(55296|r>>10,56320|1023&r)))):s+=String.fromCharCode(r)}}function Ka(e,t,r,i){if(!(0<i))return 0;var n=r;i=r+i-1;for(var o=0;o<e.length;++o){var a=e.charCodeAt(o);if(55296<=a&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),a<=127){if(i<=r)break;t[r++]=a}else{if(a<=2047){if(i<=r+1)break;t[r++]=192|a>>6}else{if(a<=65535){if(i<=r+2)break;t[r++]=224|a>>12}else{if(a<=2097151){if(i<=r+3)break;t[r++]=240|a>>18}else{if(a<=67108863){if(i<=r+4)break;t[r++]=248|a>>24}else{if(i<=r+5)break;t[r++]=252|a>>30,t[r++]=128|a>>24&63}t[r++]=128|a>>18&63}t[r++]=128|a>>12&63}t[r++]=128|a>>6&63}t[r++]=128|63&a}}return t[r]=0,r-n}function La(e){for(var t=0,r=0;r<e.length;++r){var i=e.charCodeAt(r);55296<=i&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++r)),i<=127?++t:t=i<=2047?t+2:i<=65535?t+3:i<=2097151?t+4:i<=67108863?t+5:t+6}return t}function Ma(l){var t=!!e.___cxa_demangle;if(t)try{var r=Ea(l.length);ua(l.substr(1),r);var i=Ea(4),o=e.___cxa_demangle(r,0,0,i);if(0===Da(i,"i32")&&o)return va(o)}catch(e){}finally{r&&Na(r),i&&Na(i),o&&Na(o)}var f=3,h={v:"void",b:"bool",c:"char",s:"short",i:"int",l:"long",f:"float",d:"double",w:"wchar_t",a:"signed char",h:"unsigned char",t:"unsigned short",j:"unsigned int",m:"unsigned long",x:"long long",y:"unsigned long long",z:"..."},d=[],p=!0;r=l;try{if("Object._main"==l||"_main"==l)return"main()";if("number"==typeof l&&(l=va(l)),"_"!==l[0]||"_"!==l[1]||"Z"!==l[2])return l;switch(l[3]){case"n":return"operator new()";case"d":return"operator delete()"}r=function e(t,r,i){r=r||1/0;var n,o="",a=[];if("N"===l[f]){for("K"===l[++f]&&f++,n=[];"E"!==l[f];)if("S"===l[f]){f++;var s=l.indexOf("_",f);n.push(d[l.substring(f,s)||0]||"?"),f=s+1}else if("C"===l[f])n.push(n[n.length-1]),f+=2;else{var u=(s=parseInt(l.substr(f))).toString().length;if(!s||!u){f--;break}var c=l.substr(f+u,s);n.push(c),d.push(c),f+=u+s}if(f++,n=n.join("::"),0==--r)return t?[n]:n}else("K"===l[f]||p&&"L"===l[f])&&f++,(s=parseInt(l.substr(f)))&&(u=s.toString().length,n=l.substr(f+u,s),f+=u+s);p=!1,"I"===l[f]?(f++,s=e(!0),o+=(u=e(!0,1,!0))[0]+" "+n+"<"+s.join(", ")+">"):o=n;e:for(;f<l.length&&0<r--;)if(n=l[f++],n in h)a.push(h[n]);else switch(n){case"P":a.push(e(!0,1,!0)[0]+"*");break;case"R":a.push(e(!0,1,!0)[0]+"&");break;case"L":f++,s=l.indexOf("E",f)-f,a.push(l.substr(f,s)),f+=s+2;break;case"A":if(s=parseInt(l.substr(f)),f+=s.toString().length,"_"!==l[f])throw"?";f++,a.push(e(!0,1,!0)[0]+" ["+s+"]");break;case"E":break e;default:o+="?"+n;break e}return i||1!==a.length||"void"!==a[0]||(a=[]),t?(o&&a.push(o+"?"),a):o+"("+a.join(", ")+")"}()}catch(e){r+="?"}return 0<=r.indexOf("?")&&!t&&n.O("warning: a problem occurred in builtin C++ name demangling; build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),r}function Oa(){return Pa().replace(/__Z[\w\d_]+/g,function(e){var t=Ma(e);return e===t?e:e+" ["+t+"]"})}function Pa(){var t=Error();if(!t.stack){try{throw Error(0)}catch(e){t=e}if(!t.stack)return"(no stack trace available)"}return t.stack.toString()}function Qa(e){return 0<e%4096&&(e+=4096-e%4096),e}!function(){function a(e){return{arguments:(e=e.toString().match(d).slice(1))[0],body:e[1],returnValue:e[2]}}var b={stackSave:function(){n.ua()},stackRestore:function(){n.ba()},arrayToC:function(e){var t=n.aa(e.length);return ta(e,t),t},stringToC:function(e){var t=0;return null!=e&&0!==e&&ua(e,t=n.aa(1+(e.length<<2))),t}},c={string:b.stringToC,array:b.arrayToC};sa=function(e,t,r,i,o){e=qa(e);var a=[],s=0;if(i)for(var u=0;u<i.length;u++){var l=c[r[u]];l?(0===s&&(s=n.ua()),a[u]=l(i[u])):a[u]=i[u]}if(r=e.apply(null,a),"string"===t&&(r=va(r)),0!==s){if(o&&o.async)return void EmterpreterAsync.yd.push(function(){n.ba(s)});n.ba(s)}return r};var d=/^function\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/,f={},g;for(g in b)b.hasOwnProperty(g)&&(f[g]=a(b[g]));ra=function(b,c,d){d=d||[];var g=qa(b);b=d.every(function(e){return"number"===e});var q="string"!==c;if(q&&b)return g;var v=d.map(function(e,t){return"$"+t});c="(function("+v.join(",")+") {";var B=d.length;if(!b){c+="var stack = "+f.stackSave.body+";";for(var G=0;G<B;G++){var O=v[G],ja=d[G];"number"!==ja&&(ja=f[ja+"ToC"],c+="var "+ja.arguments+" = "+O+";",c+=ja.body+";",c+=O+"="+ja.returnValue+";")}}return d=a(function(){return g}).returnValue,c+="var ret = "+d+"("+v.join(",")+");",q||(d=a(function(){return va}).returnValue,c+="ret = "+d+"(ret);"),b||(c+=f.stackRestore.body.replace("()","(stack)")+";"),eval(c+"return ret})")}}(),e.ccall=sa,e.cwrap=ra,e.setValue=wa,e.getValue=Da,e.ALLOC_NORMAL=0,e.ALLOC_STACK=1,e.ALLOC_STATIC=2,e.ALLOC_DYNAMIC=3,e.ALLOC_NONE=4,e.allocate=D,e.getMemory=function(e){return Fa?void 0!==Ga&&!Ga.p||!Ha?n.R(e):Ea(e):n.Ra(e)},e.Pointer_stringify=va,e.AsciiToString=function(e){for(var t="";;){var r=y[e++>>0];if(!r)return t;t+=String.fromCharCode(r)}},e.stringToAscii=function(e,t){return Ia(e,t,!1)},e.UTF8ArrayToString=Ja,e.UTF8ToString=function(e){return Ja(E,e)},e.stringToUTF8Array=Ka,e.stringToUTF8=function(e,t,r){return Ka(e,E,t,r)},e.lengthBytesUTF8=La,e.UTF16ToString=function(e){for(var t=0,r="";;){var i=z[e+2*t>>1];if(0==i)return r;++t,r+=String.fromCharCode(i)}},e.stringToUTF16=function(e,t,r){if(void 0===r&&(r=2147483647),r<2)return 0;var i=t;r=(r-=2)<2*e.length?r/2:e.length;for(var n=0;n<r;++n)z[t>>1]=e.charCodeAt(n),t+=2;return z[t>>1]=0,t-i},e.lengthBytesUTF16=function(e){return 2*e.length},e.UTF32ToString=function(e){for(var t=0,r="";;){var i=C[e+4*t>>2];if(0==i)return r;++t,65536<=i?(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i)):r+=String.fromCharCode(i)}},e.stringToUTF32=function(e,t,r){if(void 0===r&&(r=2147483647),r<4)return 0;var i=t;r=i+r-4;for(var n=0;n<e.length;++n){if(55296<=(o=e.charCodeAt(n))&&o<=57343)var o=65536+((1023&o)<<10)|1023&e.charCodeAt(++n);if(C[t>>2]=o,r<(t+=4)+4)break}return C[t>>2]=0,t-i},e.lengthBytesUTF32=function(e){for(var t=0,r=0;r<e.length;++r){var i=e.charCodeAt(r);55296<=i&&i<=57343&&++r,t+=4}return t},e.stackTrace=function(){return Oa()};var y,E,z,Ra,C,Sa,Ba,Ca,Ta=0,la=0,Fa=!1,Ua=0,m=0,Va=0,Wa=0,r=0,Ya,buffer;function ma(){var i=Math.pow(2,31);if(i<=r)return!1;for(;t<=r;)if(t<i/2)t=Qa(2*t);else{var n=t;if((t=Qa((3*t+i)/4))<=n)return!1}if(i<=(t=Math.max(t,16777216)))return!1;try{if(ArrayBuffer.p)buffer=ArrayBuffer.p(buffer,t);else{var o=y;buffer=new ArrayBuffer(t)}}catch(e){return!1}return!!Xa(buffer)&&(e.buffer=buffer,e.HEAP8=y=new Int8Array(buffer),e.HEAP16=z=new Int16Array(buffer),e.HEAP32=C=new Int32Array(buffer),e.HEAPU8=E=new Uint8Array(buffer),e.HEAPU16=Ra=new Uint16Array(buffer),e.HEAPU32=Sa=new Uint32Array(buffer),e.HEAPF32=Ba=new Float32Array(buffer),e.HEAPF64=Ca=new Float64Array(buffer),ArrayBuffer.p||y.set(o),!0)}try{Ya=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get),Ya(new ArrayBuffer(4))}catch(e){Ya=function(e){return e.byteLength}}for(var $a=e.TOTAL_STACK||5242880,t=e.TOTAL_MEMORY||16777216,F=65536;F<t||F<2*$a;)F=F<16777216?2*F:F+16777216;function ab(e){for(;0<e.length;){var t=e.shift();if("function"==typeof t)t();else{var r=t.ab;"number"==typeof r?void 0===t.X?n.L("v",r):n.L("vi",r,[t.X]):r(void 0===t.X?null:t.X)}}}F=Math.max(F,16777216),F!==t&&(t=F),assert("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&!!new Int32Array(1).subarray&&!!new Int32Array(1).set,"JS engine does not provide full typed array support"),buffer=new ArrayBuffer(t),y=new Int8Array(buffer),z=new Int16Array(buffer),C=new Int32Array(buffer),E=new Uint8Array(buffer),Ra=new Uint16Array(buffer),Sa=new Uint32Array(buffer),Ba=new Float32Array(buffer),Ca=new Float64Array(buffer),C[0]=255,assert(255===E[0]&&0===E[3],"Typed arrays 2 must be run on a little-endian system"),e.HEAP=void 0,e.buffer=buffer,e.HEAP8=y,e.HEAP16=z,e.HEAP32=C,e.HEAPU8=E,e.HEAPU16=Ra,e.HEAPU32=Sa,e.HEAPF32=Ba,e.HEAPF64=Ca;var bb=[],cb=[],db=[],H=[],eb=[],Ha=!1;function fb(e){bb.unshift(e)}function gb(e){eb.unshift(e)}function hb(e,t,r){return e=Ka(e,r=Array(0<r?r:La(e)+1),0,r.length),t&&(r.length=e),r}function ua(e,t,r){for(e=hb(e,r),r=0;r<e.length;)y[t+r>>0]=e[r],r+=1}function ta(e,t){for(var r=0;r<e.length;r++)y[t++>>0]=e[r]}function Ia(e,t,r){for(var i=0;i<e.length;++i)y[t++>>0]=e.charCodeAt(i);r||(y[t>>0]=0)}e.addOnPreRun=fb,e.addOnInit=function(e){cb.unshift(e)},e.addOnPreMain=function(e){db.unshift(e)},e.addOnExit=function(e){H.unshift(e)},e.addOnPostRun=gb,e.intArrayFromString=hb,e.intArrayToString=function(e){for(var t=[],r=0;r<e.length;r++){var i=e[r];255<i&&(i&=255),t.push(String.fromCharCode(i))}return t.join("")},e.writeStringToMemory=ua,e.writeArrayToMemory=ta,e.writeAsciiToMemory=Ia,Math.imul&&-5===Math.imul(4294967295,5)||(Math.imul=function(e,t){var r=65535&e,i=65535&t;return r*i+((e>>>16)*i+r*(t>>>16)<<16)|0}),Math.Jd=Math.imul,Math.clz32||(Math.clz32=function(e){e>>>=0;for(var t=0;t<32;t++)if(e&1<<31-t)return t;return 32}),Math.Ad=Math.clz32;var xa=Math.abs,Aa=Math.ceil,za=Math.floor,ya=Math.min,I=0,ib=null,jb=null;function kb(){I++,e.monitorRunDependencies&&e.monitorRunDependencies(I)}function lb(){if(I--,e.monitorRunDependencies&&e.monitorRunDependencies(I),0==I&&(null!==ib&&(clearInterval(ib),ib=null),jb)){var t=jb;jb=null,t()}}e.addRunDependency=kb,e.removeRunDependency=lb,e.preloadedImages={},e.preloadedAudios={},Ta=8,la=Ta+5888,cb.push(),D([124,0,0,0,98,7,0,0,124,0,0,0,111,7,0,0,164,0,0,0,124,7,0,0,16,0,0,0,0,0,0,0,164,0,0,0,157,7,0,0,24,0,0,0,0,0,0,0,164,0,0,0,227,7,0,0,24,0,0,0,0,0,0,0,164,0,0,0,191,7,0,0,56,0,0,0,0,0,0,0,164,0,0,0,5,8,0,0,40,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,40,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,88,0,0,0,1,0,0,0,5,0,0,0,3,0,0,0,4,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,114,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,124,1,0,0,236,1,0,0,236,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,4,0,0,0,239,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,4,0,0,0,231,16,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,115,40,37,117,41,58,32,65,115,115,101,114,116,105,111,110,32,102,97,105,108,117,114,101,58,32,34,37,115,34,10,0,109,95,115,105,122,101,32,60,61,32,109,95,99,97,112,97,99,105,116,121,0,46,47,99,114,110,95,100,101,99,111,109,112,46,104,0,109,105,110,95,110,101,119,95,99,97,112,97,99,105,116,121,32,60,32,40,48,120,55,70,70,70,48,48,48,48,85,32,47,32,101,108,101,109,101,110,116,95,115,105,122,101,41,0,110,101,119,95,99,97,112,97,99,105,116,121,32,38,38,32,40,110,101,119,95,99,97,112,97,99,105,116,121,32,62,32,109,95,99,97,112,97,99,105,116,121,41,0,110,117,109,95,99,111,100,101,115,91,99,93,0,115,111,114,116,101,100,95,112,111,115,32,60,32,116,111,116,97,108,95,117,115,101,100,95,115,121,109,115,0,112,67,111,100,101,115,105,122,101,115,91,115,121,109,95,105,110,100,101,120,93,32,61,61,32,99,111,100,101,115,105,122,101,0,116,32,60,32,40,49,85,32,60,60,32,116,97,98,108,101,95,98,105,116,115,41,0,109,95,108,111,111,107,117,112,91,116,93,32,61,61,32,99,85,73,78,84,51,50,95,77,65,88,0,99,114,110,100,95,109,97,108,108,111,99,58,32,115,105,122,101,32,116,111,111,32,98,105,103,0,99,114,110,100,95,109,97,108,108,111,99,58,32,111,117,116,32,111,102,32,109,101,109,111,114,121,0,40,40,117,105,110,116,51,50,41,112,95,110,101,119,32,38,32,40,67,82,78,68,95,77,73,78,95,65,76,76,79,67,95,65,76,73,71,78,77,69,78,84,32,45,32,49,41,41,32,61,61,32,48,0,99,114,110,100,95,114,101,97,108,108,111,99,58,32,98,97,100,32,112,116,114,0,99,114,110,100,95,102,114,101,101,58,32,98,97,100,32,112,116,114,0,102,97,108,115,101,0,40,116,111,116,97,108,95,115,121,109,115,32,62,61,32,49,41,32,38,38,32,40,116,111,116,97,108,95,115,121,109,115,32,60,61,32,112,114,101,102,105,120,95,99,111,100,105,110,103,58,58,99,77,97,120,83,117,112,112,111,114,116,101,100,83,121,109,115,41,0,17,18,19,20,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15,16,48,0,110,117,109,95,98,105,116,115,32,60,61,32,51,50,85,0,109,95,98,105,116,95,99,111,117,110,116,32,60,61,32,99,66,105,116,66,117,102,83,105,122,101,0,116,32,33,61,32,99,85,73,78,84,51,50,95,77,65,88,0,109,111,100,101,108,46,109,95,99,111,100,101,95,115,105,122,101,115,91,115,121,109,93,32,61,61,32,108,101,110,0,0,2,3,1,0,2,3,4,5,6,7,1,40,108,101,110,32,62,61,32,49,41,32,38,38,32,40,108,101,110,32,60,61,32,99,77,97,120,69,120,112,101,99,116,101,100,67,111,100,101,83,105,122,101,41,0,105,32,60,32,109,95,115,105,122,101,0,110,101,120,116,95,108,101,118,101,108,95,111,102,115,32,62,32,99,117,114,95,108,101,118,101,108,95,111,102,115,0,1,2,2,3,3,3,3,4,0,0,0,0,0,0,1,1,0,1,0,1,0,0,1,2,1,2,0,0,0,1,0,2,1,0,2,0,0,1,2,3,110,117,109,32,38,38,32,40,110,117,109,32,61,61,32,126,110,117,109,95,99,104,101,99,107,41,0,83,116,57,101,120,99,101,112,116,105,111,110,0,83,116,57,116,121,112,101,95,105,110,102,111,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,54,95,95,115,104,105,109,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,57,95,95,112,111,105,110,116,101,114,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,112,98,97,115,101,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,50,48,95,95,115,105,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,112,116,104,114,101,97,100,95,111,110,99,101,32,102,97,105,108,117,114,101,32,105,110,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,95,102,97,115,116,40,41,0,116,101,114,109,105,110,97,116,101,95,104,97,110,100,108,101,114,32,117,110,101,120,112,101,99,116,101,100,108,121,32,114,101,116,117,114,110,101,100,0,99,97,110,110,111,116,32,99,114,101,97,116,101,32,112,116,104,114,101,97,100,32,107,101,121,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,99,97,110,110,111,116,32,122,101,114,111,32,111,117,116,32,116,104,114,101,97,100,32,118,97,108,117,101,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,58,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,102,111,114,101,105,103,110,32,101,120,99,101,112,116,105,111,110,0,116,101,114,109,105,110,97,116,105,110,103,0,117,110,99,97,117,103,104,116,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,46,0],"i8",4,n.Ua);var mb=n.ja(D(12,"i8",2),8);function ob(t){return e.___errno_location&&(C[e.___errno_location()>>2]=t),t}assert(0==mb%8),e._i64Subtract=nb;var J={I:1,F:2,ed:3,bc:4,H:5,Aa:6,vb:7,zc:8,ea:9,Jb:10,va:11,qd:11,Ta:12,da:13,Vb:14,Lc:15,fa:16,wa:17,rd:18,ha:19,ya:20,P:21,q:22,uc:23,Sa:24,Q:25,nd:26,Wb:27,Hc:28,ia:29,bd:30,nc:31,Vc:32,Sb:33,Zc:34,Dc:42,Zb:43,Kb:44,ec:45,fc:46,gc:47,mc:48,od:49,xc:50,dc:51,Pb:35,Ac:37,Bb:52,Eb:53,sd:54,vc:55,Fb:56,Gb:57,Qb:35,Hb:59,Jc:60,yc:61,kd:62,Ic:63,Ec:64,Fc:65,ad:66,Bc:67,yb:68,gd:69,Lb:70,Wc:71,pc:72,Tb:73,Db:74,Qc:76,Cb:77,$c:78,hc:79,ic:80,lc:81,kc:82,jc:83,Kc:38,za:39,qc:36,ga:40,Rc:95,Uc:96,Ob:104,wc:105,zb:97,Yc:91,Oc:88,Gc:92,cd:108,Nb:111,wb:98,Mb:103,tc:101,rc:100,ld:110,Xb:112,Yb:113,ac:115,Ab:114,Rb:89,oc:90,Xc:93,dd:94,xb:99,sc:102,cc:106,Mc:107,md:109,pd:87,Ub:122,hd:116,Pc:95,Cc:123,$b:84,Sc:75,Ib:125,Nc:131,Tc:130,jd:86};function pb(e,t){H.push(function(){n.L("vi",e,[t])}),pb.level=H.length}function tb(){return!!tb.p}e._memset=qb,e._bitshift64Lshr=rb,e._bitshift64Shl=sb;var ub=[],vb={};function wb(e,t){wb.p||(wb.p={}),e in wb.p||(n.L("v",t),wb.p[e]=1)}var xb={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"};function yb(e,t){for(var r=0,i=e.length-1;0<=i;i--){var n=e[i];"."===n?e.splice(i,1):".."===n?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function zb(e){var t="/"===e.charAt(0),r="/"===e.substr(-1);return(e=yb(e.split("/").filter(function(e){return!!e}),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e}function Ab(e){var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],e||t?(t&&(t=t.substr(0,t.length-1)),e+t):"."}function Bb(e){if("/"===e)return"/";var t=e.lastIndexOf("/");return-1===t?e:e.substr(t+1)}function Cb(){return zb(Array.prototype.slice.call(arguments,0).join("/"))}function K(e,t){return zb(e+"/"+t)}function Db(){for(var e="",t=!1,r=arguments.length-1;-1<=r&&!t;r--){if("string"!=typeof(t=0<=r?arguments[r]:"/"))throw new TypeError("Arguments to path.resolve must be strings");if(!t)return"";e=t+"/"+e,t="/"===t.charAt(0)}return(t?"/":"")+(e=yb(e.split("/").filter(function(e){return!!e}),!t).join("/"))||"."}var Eb=[];function Fb(e,t){Eb[e]={input:[],output:[],N:t},Gb(e,Hb)}var Hb={open:function(e){var t=Eb[e.g.rdev];if(!t)throw new L(J.ha);e.tty=t,e.seekable=!1},close:function(e){e.tty.N.flush(e.tty)},flush:function(e){e.tty.N.flush(e.tty)},read:function(e,t,r,i){if(!e.tty||!e.tty.N.La)throw new L(J.Aa);for(var n=0,o=0;o<i;o++){var a;try{a=e.tty.N.La(e.tty)}catch(e){throw new L(J.H)}if(void 0===a&&0===n)throw new L(J.va);if(null==a)break;n++,t[r+o]=a}return n&&(e.g.timestamp=Date.now()),n},write:function(e,t,r,i){if(!e.tty||!e.tty.N.qa)throw new L(J.Aa);for(var n=0;n<i;n++)try{e.tty.N.qa(e.tty,t[r+n])}catch(e){throw new L(J.H)}return i&&(e.g.timestamp=Date.now()),n}},Ib={La:function(e){if(!e.input.length){var t=null;if(da){var r,i=new Buffer(256),n=process.stdin.fd,o=!1;try{n=fs.openSync("/dev/stdin","r"),o=!0}catch(e){}r=fs.readSync(n,i,0,256,null),o&&fs.closeSync(n),t=0<r?i.slice(0,r).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&(null!==(t=readline())&&(t+="\n"));if(!t)return null;e.input=hb(t,!0)}return e.input.shift()},qa:function(t,r){null===r||10===r?(e.print(Ja(t.output,0)),t.output=[]):0!=r&&t.output.push(r)},flush:function(t){t.output&&0<t.output.length&&(e.print(Ja(t.output,0)),t.output=[])}},Jb={qa:function(t,r){null===r||10===r?(e.printErr(Ja(t.output,0)),t.output=[]):0!=r&&t.output.push(r)},flush:function(t){t.output&&0<t.output.length&&(e.printErr(Ja(t.output,0)),t.output=[])}},M={C:null,A:function(){return M.createNode(null,"/",16895,0)},createNode:function(e,t,r,i){if(24576==(61440&r)||4096==(61440&r))throw new L(J.I);return M.C||(M.C={dir:{g:{D:M.k.D,u:M.k.u,lookup:M.k.lookup,T:M.k.T,rename:M.k.rename,unlink:M.k.unlink,rmdir:M.k.rmdir,readdir:M.k.readdir,symlink:M.k.symlink},stream:{G:M.n.G}},file:{g:{D:M.k.D,u:M.k.u},stream:{G:M.n.G,read:M.n.read,write:M.n.write,Ba:M.n.Ba,Na:M.n.Na,Pa:M.n.Pa}},link:{g:{D:M.k.D,u:M.k.u,readlink:M.k.readlink},stream:{}},Ea:{g:{D:M.k.D,u:M.k.u},stream:Kb}}),N((r=Lb(e,t,r,i)).mode)?(r.k=M.C.dir.g,r.n=M.C.dir.stream,r.e={}):32768==(61440&r.mode)?(r.k=M.C.file.g,r.n=M.C.file.stream,r.o=0,r.e=null):40960==(61440&r.mode)?(r.k=M.C.link.g,r.n=M.C.link.stream):8192==(61440&r.mode)&&(r.k=M.C.Ea.g,r.n=M.C.Ea.stream),r.timestamp=Date.now(),e&&(e.e[t]=r),r},cb:function(e){if(e.e&&e.e.subarray){for(var t=[],r=0;r<e.o;++r)t.push(e.e[r]);return t}return e.e},Gd:function(e){return e.e?e.e.subarray?e.e.subarray(0,e.o):new Uint8Array(e.e):new Uint8Array},Ga:function(e,t){if(e.e&&e.e.subarray&&t>e.e.length&&(e.e=M.cb(e),e.o=e.e.length),!e.e||e.e.subarray){var r=e.e?e.e.buffer.byteLength:0;t<=r||(t=Math.max(t,r*(r<1048576?2:1.125)|0),0!=r&&(t=Math.max(t,256)),r=e.e,e.e=new Uint8Array(t),0<e.o&&e.e.set(r.subarray(0,e.o),0))}else for(!e.e&&0<t&&(e.e=[]);e.e.length<t;)e.e.push(0)},ob:function(e,t){if(e.o!=t)if(0==t)e.e=null,e.o=0;else{if(!e.e||e.e.subarray){var r=e.e;e.e=new Uint8Array(new ArrayBuffer(t)),r&&e.e.set(r.subarray(0,Math.min(t,e.o)))}else if(e.e||(e.e=[]),e.e.length>t)e.e.length=t;else for(;e.e.length<t;)e.e.push(0);e.o=t}},k:{D:function(e){var t={};return t.dev=8192==(61440&e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,N(e.mode)?t.size=4096:32768==(61440&e.mode)?t.size=e.o:40960==(61440&e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.K=4096,t.blocks=Math.ceil(t.size/t.K),t},u:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&M.ob(e,t.size)},lookup:function(){throw Mb[J.F]},T:function(e,t,r,i){return M.createNode(e,t,r,i)},rename:function(e,t,r){if(N(e.mode)){var i;try{i=Nb(t,r)}catch(e){}if(i)for(var n in i.e)throw new L(J.za)}delete e.parent.e[e.name],e.name=r,(t.e[r]=e).parent=t},unlink:function(e,t){delete e.e[t]},rmdir:function(e,t){var r,i=Nb(e,t);for(r in i.e)throw new L(J.za);delete e.e[t]},readdir:function(e){var t,r=[".",".."];for(t in e.e)e.e.hasOwnProperty(t)&&r.push(t);return r},symlink:function(e,t,r){return(e=M.createNode(e,t,41471,0)).link=r,e},readlink:function(e){if(40960!=(61440&e.mode))throw new L(J.q);return e.link}},n:{read:function(e,t,r,i,n){var o=e.g.e;if(n>=e.g.o)return 0;if(assert(0<=(e=Math.min(e.g.o-n,i))),8<e&&o.subarray)t.set(o.subarray(n,n+e),r);else for(i=0;i<e;i++)t[r+i]=o[n+i];return e},write:function(e,t,r,i,n,o){if(!i)return 0;if((e=e.g).timestamp=Date.now(),t.subarray&&(!e.e||e.e.subarray)){if(o)return e.e=t.subarray(r,r+i),e.o=i;if(0===e.o&&0===n)return e.e=new Uint8Array(t.subarray(r,r+i)),e.o=i;if(n+i<=e.o)return e.e.set(t.subarray(r,r+i),n),i}if(M.Ga(e,n+i),e.e.subarray&&t.subarray)e.e.set(t.subarray(r,r+i),n);else for(o=0;o<i;o++)e.e[n+o]=t[r+o];return e.o=Math.max(e.o,n+i),i},G:function(e,t,r){if(1===r?t+=e.position:2===r&&32768==(61440&e.g.mode)&&(t+=e.g.o),t<0)throw new L(J.q);return t},Ba:function(e,t,r){M.Ga(e.g,t+r),e.g.o=Math.max(e.g.o,t+r)},Na:function(e,t,r,i,n,o,a){if(32768!=(61440&e.g.mode))throw new L(J.ha);if(r=e.g.e,2&a||r.buffer!==t&&r.buffer!==t.buffer){if((0<n||n+i<e.g.o)&&(r=r.subarray?r.subarray(n,n+i):Array.prototype.slice.call(r,n,n+i)),e=!0,!(i=Ea(i)))throw new L(J.Ta);t.set(r,i)}else e=!1,i=r.byteOffset;return{Rd:i,xd:e}},Pa:function(e,t,r,i,n){if(32768!=(61440&e.g.mode))throw new L(J.ha);return 2&n||M.n.write(e,t,0,i,r,!1),0}}},P={$:!1,sb:function(){P.$=!!process.platform.match(/^win/)},A:function(e){return assert(da),P.createNode(null,"/",P.Ja(e.pa.root),0)},createNode:function(e,t,r){if(!N(r)&&32768!=(61440&r)&&40960!=(61440&r))throw new L(J.q);return(e=Lb(e,t,r)).k=P.k,e.n=P.n,e},Ja:function(e){var t;try{t=fs.lstatSync(e),P.$&&(t.mode=t.mode|(146&t.mode)>>1)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}return t.mode},B:function(e){for(var t=[];e.parent!==e;)t.push(e.name),e=e.parent;return t.push(e.A.pa.root),t.reverse(),Cb.apply(null,t)},Ha:{0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},$a:function(e){if((e&=-32769)in P.Ha)return P.Ha[e];throw new L(J.q)},k:{D:function(e){var t;e=P.B(e);try{t=fs.lstatSync(e)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}return P.$&&!t.K&&(t.K=4096),P.$&&!t.blocks&&(t.blocks=(t.size+t.K-1)/t.K|0),{dev:t.dev,ino:t.ino,mode:t.mode,nlink:t.nlink,uid:t.uid,gid:t.gid,rdev:t.rdev,size:t.size,atime:t.atime,mtime:t.mtime,ctime:t.ctime,K:t.K,blocks:t.blocks}},u:function(e,t){var r=P.B(e);try{void 0!==t.mode&&(fs.chmodSync(r,t.mode),e.mode=t.mode),void 0!==t.size&&fs.truncateSync(r,t.size)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}},lookup:function(e,t){var r=K(P.B(e),t);r=P.Ja(r);return P.createNode(e,t,r)},T:function(e,t,r,i){e=P.createNode(e,t,r,i),t=P.B(e);try{N(e.mode)?fs.mkdirSync(t,e.mode):fs.writeFileSync(t,"",{mode:e.mode})}catch(e){if(!e.code)throw e;throw new L(J[e.code])}return e},rename:function(e,t,r){e=P.B(e),t=K(P.B(t),r);try{fs.renameSync(e,t)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}},unlink:function(e,t){var r=K(P.B(e),t);try{fs.unlinkSync(r)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}},rmdir:function(e,t){var r=K(P.B(e),t);try{fs.rmdirSync(r)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}},readdir:function(e){e=P.B(e);try{return fs.readdirSync(e)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}},symlink:function(e,t,r){e=K(P.B(e),t);try{fs.symlinkSync(r,e)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}},readlink:function(e){var t=P.B(e);try{return t=fs.readlinkSync(t),t=Ob.relative(Ob.resolve(e.A.pa.root),t)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}}},n:{open:function(e){var t=P.B(e.g);try{32768==(61440&e.g.mode)&&(e.V=fs.openSync(t,P.$a(e.flags)))}catch(e){if(!e.code)throw e;throw new L(J[e.code])}},close:function(e){try{32768==(61440&e.g.mode)&&e.V&&fs.closeSync(e.V)}catch(e){if(!e.code)throw e;throw new L(J[e.code])}},read:function(e,t,r,i,n){if(0===i)return 0;var o,a=new Buffer(i);try{o=fs.readSync(e.V,a,0,i,n)}catch(e){throw new L(J[e.code])}if(0<o)for(e=0;e<o;e++)t[r+e]=a[e];return o},write:function(e,t,r,i,n){var o;t=new Buffer(t.subarray(r,r+i));try{o=fs.writeSync(e.V,t,0,i,n)}catch(e){throw new L(J[e.code])}return o},G:function(e,t,r){if(1===r)t+=e.position;else if(2===r&&32768==(61440&e.g.mode))try{t+=fs.fstatSync(e.V).size}catch(e){throw new L(J[e.code])}if(t<0)throw new L(J.q);return t}}};D(1,"i32*",2),D(1,"i32*",2),D(1,"i32*",2);var Pb=null,Qb=[null],Rb=[],Sb=1,Q=null,Tb=!0,R={},L=null,Mb={};function S(e,t){if(t=t||{},!(e=Db("/",e)))return{path:"",g:null};var r,i={Ia:!0,ra:0};for(r in i)void 0===t[r]&&(t[r]=i[r]);if(8<t.ra)throw new L(J.ga);i=yb(e.split("/").filter(function(e){return!!e}),!1);var n=Pb;r="/";for(var o=0;o<i.length;o++){var a=o===i.length-1;if(a&&t.parent)break;if(n=Nb(n,i[o]),r=K(r,i[o]),n.U&&(!a||a&&t.Ia)&&(n=n.U.root),!a||t.la)for(a=0;40960==(61440&n.mode);)if(n=Vb(r),n=S(r=Db(Ab(r),n),{ra:t.ra}).g,40<a++)throw new L(J.ga)}return{path:r,g:n}}function T(e){for(var t;;){if(e===e.parent)return e=e.A.Oa,t?"/"!==e[e.length-1]?e+"/"+t:e+t:e;t=t?e.name+"/"+t:e.name,e=e.parent}}function Wb(e,t){for(var r=0,i=0;i<t.length;i++)r=(r<<5)-r+t.charCodeAt(i)|0;return(e+r>>>0)%Q.length}function Xb(e){var t=Wb(e.parent.id,e.name);e.M=Q[t],Q[t]=e}function Nb(e,t){var r;if(r=(r=Yb(e,"x"))?r:e.k.lookup?0:J.da)throw new L(r,e);for(r=Q[Wb(e.id,t)];r;r=r.M){var i=r.name;if(r.parent.id===e.id&&i===t)return r}return e.k.lookup(e,t)}function Lb(e,t,r,i){return Zb||((Zb=function(e,t,r,i){e||(e=this),this.parent=e,this.A=e.A,this.U=null,this.id=Sb++,this.name=t,this.mode=r,this.k={},this.n={},this.rdev=i}).prototype={},Object.defineProperties(Zb.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},kb:{get:function(){return N(this.mode)}},jb:{get:function(){return 8192==(61440&this.mode)}}})),Xb(e=new Zb(e,t,r,i)),e}function N(e){return 16384==(61440&e)}var $b={r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218};function Yb(e,t){return Tb?0:(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:J.da}function ac(e,t){try{return Nb(e,t),J.wa}catch(e){}return Yb(e,"wx")}function bc(){for(var e=0;e<=4096;e++)if(!Rb[e])return e;throw new L(J.Sa)}function cc(e){dc||((dc=function(){}).prototype={},Object.defineProperties(dc.prototype,{object:{get:function(){return this.g},set:function(e){this.g=e}},Ld:{get:function(){return 1!=(2097155&this.flags)}},Md:{get:function(){return 0!=(2097155&this.flags)}},Kd:{get:function(){return 1024&this.flags}}}));var t,r=new dc;for(t in e)r[t]=e[t];return e=r,r=bc(),e.fd=r,Rb[r]=e}var Kb={open:function(e){e.n=Qb[e.g.rdev].n,e.n.open&&e.n.open(e)},G:function(){throw new L(J.ia)}},qc;function Gb(e,t){Qb[e]={n:t}}function ec(e,t){var r,i="/"===t,n=!t;if(i&&Pb)throw new L(J.fa);if(!i&&!n){if(t=(r=S(t,{Ia:!1})).path,(r=r.g).U)throw new L(J.fa);if(!N(r.mode))throw new L(J.ya)}n={type:e,pa:{},Oa:t,lb:[]};var o=e.A(n);(o.A=n).root=o,i?Pb=o:r&&(r.U=n,r.A&&r.A.lb.push(n))}function fc(e,t,r){var i=S(e,{parent:!0}).g;if(!(e=Bb(e))||"."===e||".."===e)throw new L(J.q);var n=ac(i,e);if(n)throw new L(n);if(!i.k.T)throw new L(J.I);return i.k.T(i,e,t,r)}function gc(e,t){return t=4095&(void 0!==t?t:438),fc(e,t|=32768,0)}function V(e,t){return t=1023&(void 0!==t?t:511),fc(e,t|=16384,0)}function hc(e,t,r){return void 0===r&&(r=t,t=438),fc(e,8192|t,r)}function ic(e,t){if(!Db(e))throw new L(J.F);var r=S(t,{parent:!0}).g;if(!r)throw new L(J.F);var i=Bb(t),n=ac(r,i);if(n)throw new L(n);if(!r.k.symlink)throw new L(J.I);return r.k.symlink(r,i,e)}function Vb(e){if(!(e=S(e).g))throw new L(J.F);if(!e.k.readlink)throw new L(J.q);return Db(T(e.parent),e.k.readlink(e))}function jc(e,t){var r;if(!(r="string"==typeof e?S(e,{la:!0}).g:e).k.u)throw new L(J.I);r.k.u(r,{mode:4095&t|-4096&r.mode,timestamp:Date.now()})}function kc(t,r){var i,n,o;if(""===t)throw new L(J.F);if("string"==typeof r){if(void 0===(n=$b[r]))throw Error("Unknown file open mode: "+r)}else n=r;if(i=64&(r=n)?4095&(void 0===i?438:i)|32768:0,"object"==typeof t)o=t;else{t=zb(t);try{o=S(t,{la:!(131072&r)}).g}catch(e){}}if(n=!1,64&r)if(o){if(128&r)throw new L(J.wa)}else o=fc(t,i,0),n=!0;if(!o)throw new L(J.F);if(8192==(61440&o.mode)&&(r&=-513),65536&r&&!N(o.mode))throw new L(J.ya);if(!n&&(i=o?40960==(61440&o.mode)?J.ga:N(o.mode)&&(0!=(2097155&r)||512&r)?J.P:(i=["r","w","rw"][3&r],512&r&&(i+="w"),Yb(o,i)):J.F))throw new L(i);if(512&r){var a;if(!(a="string"==typeof(i=o)?S(i,{la:!0}).g:i).k.u)throw new L(J.I);if(N(a.mode))throw new L(J.P);if(32768!=(61440&a.mode))throw new L(J.q);if(i=Yb(a,"w"))throw new L(i);a.k.u(a,{size:0,timestamp:Date.now()})}r&=-641,(o=cc({g:o,path:T(o),flags:r,seekable:!0,position:0,n:o.n,tb:[],error:!1})).n.open&&o.n.open(o),!e.logReadFiles||1&r||(lc||(lc={}),t in lc||(lc[t]=1,e.printErr("read file: "+t)));try{R.onOpenFile&&(a=0,1!=(2097155&r)&&(a|=1),0!=(2097155&r)&&(a|=2),R.onOpenFile(t,a))}catch(e){console.log("FS.trackingDelegate['onOpenFile']('"+t+"', flags) threw an exception: "+e.message)}return o}function mc(e){e.na&&(e.na=null);try{e.n.close&&e.n.close(e)}catch(e){throw e}finally{Rb[e.fd]=null}}function nc(e,t,r){if(!e.seekable||!e.n.G)throw new L(J.ia);e.position=e.n.G(e,t,r),e.tb=[]}function oc(e,t,r,i,n,o){if(i<0||n<0)throw new L(J.q);if(0==(2097155&e.flags))throw new L(J.ea);if(N(e.g.mode))throw new L(J.P);if(!e.n.write)throw new L(J.q);1024&e.flags&&nc(e,0,2);var a=!0;if(void 0===n)n=e.position,a=!1;else if(!e.seekable)throw new L(J.ia);t=e.n.write(e,t,r,i,n,o),a||(e.position+=t);try{e.path&&R.onWriteToFile&&R.onWriteToFile(e.path)}catch(e){console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: "+e.message)}return t}function pc(){L||((L=function(e,t){this.g=t,this.qb=function(e){for(var t in this.S=e,J)if(J[t]===e){this.code=t;break}},this.qb(e),this.message=xb[e]}).prototype=Error(),L.prototype.constructor=L,[J.F].forEach(function(e){Mb[e]=new L(e),Mb[e].stack="<generic error, no stack>"}))}function rc(e,t){var r=0;return e&&(r|=365),t&&(r|=146),r}function sc(e,t,r,i){return gc(e=K("string"==typeof e?e:T(e),t),rc(r,i))}function tc(e,t,r,i,n,o){if(n=gc(e=t?K("string"==typeof e?e:T(e),t):e,i=rc(i,n)),r){if("string"==typeof r){e=Array(r.length),t=0;for(var a=r.length;t<a;++t)e[t]=r.charCodeAt(t);r=e}jc(n,146|i),oc(e=kc(n,"w"),r,0,r.length,0,o),mc(e),jc(n,i)}return n}function W(e,t,s,o){e=K("string"==typeof e?e:T(e),t),t=rc(!!s,!!o),W.Ma||(W.Ma=64);var r=W.Ma++<<8|0;return Gb(r,{open:function(e){e.seekable=!1},close:function(){o&&o.buffer&&o.buffer.length&&o(10)},read:function(e,t,r,i){for(var n=0,o=0;o<i;o++){var a;try{a=s()}catch(e){throw new L(J.H)}if(void 0===a&&0===n)throw new L(J.va);if(null==a)break;n++,t[r+o]=a}return n&&(e.g.timestamp=Date.now()),n},write:function(e,t,r,i){for(var n=0;n<i;n++)try{o(t[r+n])}catch(e){throw new L(J.H)}return i&&(e.g.timestamp=Date.now()),n}}),hc(e,t,r)}function uc(t){if(t.jb||t.kb||t.link||t.e)return!0;var r=!0;if("undefined"!=typeof XMLHttpRequest)throw Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!e.read)throw Error("Cannot load without read() or XMLHttpRequest.");try{t.e=hb(e.read(t.url),!0),t.o=t.e.length}catch(e){r=!1}return r||ob(J.H),r}var vc={},Zb,dc,lc,wc=0;function X(){return C[(wc+=4)-4>>2]}function xc(){var e;if(e=X(),!(e=Rb[e]))throw new L(J.ea);return e}var yc={};function Ga(e){Ga.p||(r=Qa(r),Ga.p=!0,assert(n.R),Ga.bb=n.R,n.R=function(){x("cannot dynamically allocate, sbrk now has control")});var t=r;return 0==e||Ga.bb(e)?t:4294967295}e._i64Add=zc;var Ac=1;function Cc(e,t){if(Dc=e,Ec=t,!Fc)return 1;if(0==e)Y=function(){setTimeout(Gc,t)},Hc="timeout";else if(1==e)Y=function(){Ic(Gc)},Hc="rAF";else if(2==e){if(!window.setImmediate){var r=[];window.addEventListener("message",function(e){e.source===window&&"__emcc"===e.data&&(e.stopPropagation(),r.shift()())},!0),window.setImmediate=function(e){r.push(e),window.postMessage("__emcc","*")}}Y=function(){window.setImmediate(Gc)},Hc="immediate"}return 0}function Jc(a,t,r,s,i){e.noExitRuntime=!0,assert(!Fc,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),Fc=a,Kc=s;var u=Lc;if(Gc=function(){if(!na)if(0<Mc.length){var t=Date.now(),r=Mc.shift();if(r.ab(r.X),Nc){var i=Nc,o=0==i%1?i-1:Math.floor(i);Nc=r.Bd?o:(8*i+(o+.5))/9}console.log('main loop blocker "'+r.name+'" took '+(Date.now()-t)+" ms"),Oc(),setTimeout(Gc,0)}else u<Lc||(Pc=Pc+1|0,1==Dc&&1<Ec&&0!=Pc%Ec?Y():("timeout"===Hc&&e.ka&&(e.W("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"),Hc=""),Qc(function(){void 0!==s?n.L("vi",a,[s]):n.L("v",a)}),u<Lc||("object"==typeof SDL&&SDL.audio&&SDL.audio.mb&&SDL.audio.mb(),Y())))},i||(t&&0<t?Cc(0,1e3/t):Cc(1,1),Y()),r)throw"SimulateInfiniteLoop"}e._memcpy=Bc;var Y=null,Hc="",Lc=0,Fc=null,Kc=0,Dc=0,Ec=0,Pc=0,Mc=[];function Oc(){if(e.setStatus){var t=e.statusMessage||"Please wait...",r=Nc,i=Rc.Dd;r?r<i?e.setStatus(t+" ("+(i-r)+"/"+i+")"):e.setStatus(t):e.setStatus("")}}function Qc(t){if(!(na||e.preMainLoop&&!1===e.preMainLoop())){try{t()}catch(t){if(t instanceof ia)return;throw t&&"object"==typeof t&&t.stack&&e.W("exception thrown: "+[t,t.stack]),t}e.postMainLoop&&e.postMainLoop()}}var Rc={},Gc,Nc,Sc=!1,Tc=!1,Uc=[];function Vc(){function t(){Tc=document.pointerLockElement===r||document.mozPointerLockElement===r||document.webkitPointerLockElement===r||document.msPointerLockElement===r}if(e.preloadPlugins||(e.preloadPlugins=[]),!Wc){Wc=!0;try{Xc=!0}catch(e){Xc=!1,console.log("warning: no blob constructor, cannot create blobs with mimetypes")}Yc="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:Xc?null:console.log("warning: no BlobBuilder"),Zc="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:void 0,e.Qa||void 0!==Zc||(console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),e.Qa=!0),e.preloadPlugins.push({canHandle:function(t){return!e.Qa&&/\.(jpg|jpeg|png|bmp)$/i.test(t)},handle:function(r,i,o,t){var a=null;if(Xc)try{(a=new Blob([r],{type:$c(i)})).size!==r.length&&(a=new Blob([new Uint8Array(r).buffer],{type:$c(i)}))}catch(e){n.O("Blob constructor present but fails: "+e+"; falling back to blob builder")}a||((a=new Yc).append(new Uint8Array(r).buffer),a=a.getBlob());var s=Zc.createObjectURL(a),u=new Image;u.onload=function(){assert(u.complete,"Image "+i+" could not be decoded");var t=document.createElement("canvas");t.width=u.width,t.height=u.height,t.getContext("2d").drawImage(u,0,0),e.preloadedImages[i]=t,Zc.revokeObjectURL(s),o&&o(r)},u.onerror=function(){console.log("Image "+s+" could not be decoded"),t&&t()},u.src=s}}),e.preloadPlugins.push({canHandle:function(t){return!e.Pd&&t.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},handle:function(o,a,r,t){function s(t){u||(u=!0,e.preloadedAudios[a]=t,r&&r(o))}function i(){u||(u=!0,e.preloadedAudios[a]=new Audio,t&&t())}var u=!1;if(!Xc)return i();try{var n=new Blob([o],{type:$c(a)})}catch(e){return i()}n=Zc.createObjectURL(n);var c=new Audio;c.addEventListener("canplaythrough",function(){s(c)},!1),c.onerror=function(){if(!u){console.log("warning: browser could not fully decode audio "+a+", trying slower base64 approach");for(var e="",t=0,r=0,i=0;i<o.length;i++)for(t=t<<8|o[i],r+=8;6<=r;){var n=t>>r-6&63;r=r-6,e=e+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[n]}2==r?(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(3&t)<<4],e+="=="):4==r&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(15&t)<<2],e+="="),c.src="data:audio/x-"+a.substr(-3)+";base64,"+e,s(c)}},c.src=n,ad(function(){s(c)})}});var r=e.canvas;r&&(r.sa=r.requestPointerLock||r.mozRequestPointerLock||r.webkitRequestPointerLock||r.msRequestPointerLock||function(){},r.Fa=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},r.Fa=r.Fa.bind(document),document.addEventListener("pointerlockchange",t,!1),document.addEventListener("mozpointerlockchange",t,!1),document.addEventListener("webkitpointerlockchange",t,!1),document.addEventListener("mspointerlockchange",t,!1),e.elementPointerLock&&r.addEventListener("click",function(e){!Tc&&r.sa&&(r.sa(),e.preventDefault())},!1))}}function bd(t,r,i,n){if(r&&e.ka&&t==e.canvas)return e.ka;var o,a;if(r){if(a={antialias:!1,alpha:!1},n)for(var s in n)a[s]=n[s];(a=GL.createContext(t,a))&&(o=GL.getContext(a).td),t.style.backgroundColor="black"}else o=t.getContext("2d");return o?(i&&(r||assert("undefined"==typeof GLctx,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),e.ka=o,r&&GL.Od(a),e.Td=r,Uc.forEach(function(e){e()}),Vc()),o):null}var cd=!1,dd=void 0,ed=void 0;function fd(t,r,i){function n(){Sc=!1;var t=o.parentNode;(document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement||document.msFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement)===t?(o.Da=document.cancelFullScreen||document.mozCancelFullScreen||document.webkitCancelFullScreen||document.msExitFullscreen||document.exitFullscreen||function(){},o.Da=o.Da.bind(document),dd&&o.sa(),Sc=!0,ed&&gd()):(t.parentNode.insertBefore(o,t),t.parentNode.removeChild(t),ed&&hd()),e.onFullScreen&&e.onFullScreen(Sc),id(o)}void 0===(dd=t)&&(dd=!0),void 0===(ed=r)&&(ed=!1),void 0===(jd=i)&&(jd=null);var o=e.canvas;cd||(cd=!0,document.addEventListener("fullscreenchange",n,!1),document.addEventListener("mozfullscreenchange",n,!1),document.addEventListener("webkitfullscreenchange",n,!1),document.addEventListener("MSFullscreenChange",n,!1));var a=document.createElement("div");o.parentNode.insertBefore(a,o),a.appendChild(o),a.p=a.requestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen||(a.webkitRequestFullScreen?function(){a.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),i?a.p({Ud:i}):a.p()}var kd=0;function ld(e){var t=Date.now();if(0===kd)kd=t+1e3/60;else for(;kd<=t+2;)kd+=1e3/60;t=Math.max(kd-t,0),setTimeout(e,t)}function Ic(e){"undefined"==typeof window?ld(e):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||ld),window.requestAnimationFrame(e))}function ad(t){e.noExitRuntime=!0,setTimeout(function(){na||t()},1e4)}function $c(e){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[e.substr(e.lastIndexOf(".")+1)]}function md(e,t,r){var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=function(){200==i.status||0==i.status&&i.response?t(i.response):r()},i.onerror=r,i.send(null)}function nd(t,r,e){md(t,function(e){assert(e,'Loading data file "'+t+'" failed (no arrayBuffer).'),r(new Uint8Array(e)),lb()},function(){if(!e)throw'Loading data file "'+t+'" failed.';e()}),kb()}var od=[],Wc,Xc,Yc,Zc,jd;function pd(){var t=e.canvas;od.forEach(function(e){e(t.width,t.height)})}function gd(){if("undefined"!=typeof SDL){var e=Sa[SDL.screen+0*n.J>>2];C[SDL.screen+0*n.J>>2]=8388608|e}pd()}function hd(){if("undefined"!=typeof SDL){var e=Sa[SDL.screen+0*n.J>>2];C[SDL.screen+0*n.J>>2]=-8388609&e}pd()}function id(t,r,i){r&&i?(t.ub=r,t.hb=i):(r=t.ub,i=t.hb);var n=r,o=i;if(e.forcedAspectRatio&&0<e.forcedAspectRatio&&(n/o<e.forcedAspectRatio?n=Math.round(o*e.forcedAspectRatio):o=Math.round(n/e.forcedAspectRatio)),(document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement||document.msFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement)===t.parentNode&&"undefined"!=typeof screen){var a=Math.min(screen.width/n,screen.height/o);n=Math.round(n*a),o=Math.round(o*a)}ed?(t.width!=n&&(t.width=n),t.height!=o&&(t.height=o),void 0!==t.style&&(t.style.removeProperty("width"),t.style.removeProperty("height"))):(t.width!=r&&(t.width=r),t.height!=i&&(t.height=i),void 0!==t.style&&(n!=r||o!=i?(t.style.setProperty("width",n+"px","important"),t.style.setProperty("height",o+"px","important")):(t.style.removeProperty("width"),t.style.removeProperty("height"))))}if(pc(),Q=Array(4096),ec(M,"/"),V("/tmp"),V("/home"),V("/home/web_user"),function(){var e;if(V("/dev"),Gb(259,{read:function(){return 0},write:function(e,t,r,i){return i}}),hc("/dev/null",259),Fb(1280,Ib),Fb(1536,Jb),hc("/dev/tty",1280),hc("/dev/tty1",1536),"undefined"!=typeof crypto){var t=new Uint8Array(1);e=function(){return crypto.getRandomValues(t),t[0]}}else e=da?function(){return require("crypto").randomBytes(1)[0]}:function(){return 256*Math.random()|0};W("/dev","random",e),W("/dev","urandom",e),V("/dev/shm"),V("/dev/shm/tmp")}(),V("/proc"),V("/proc/self"),V("/proc/self/fd"),ec({A:function(){var e=Lb("/proc/self","fd",16895,73);return e.k={lookup:function(e,t){var r=Rb[+t];if(!r)throw new L(J.ea);var i={parent:null,A:{Oa:"fake"},k:{readlink:function(){return r.path}}};return i.parent=i}},e}},"/proc/self/fd"),cb.unshift(function(){if(!e.noFSInit&&!qc){assert(!qc,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),qc=!0,pc(),e.stdin=e.stdin,e.stdout=e.stdout,e.stderr=e.stderr,e.stdin?W("/dev","stdin",e.stdin):ic("/dev/tty","/dev/stdin"),e.stdout?W("/dev","stdout",null,e.stdout):ic("/dev/tty","/dev/stdout"),e.stderr?W("/dev","stderr",null,e.stderr):ic("/dev/tty1","/dev/stderr");var t=kc("/dev/stdin","r");assert(0===t.fd,"invalid handle for stdin ("+t.fd+")"),assert(1===(t=kc("/dev/stdout","w")).fd,"invalid handle for stdout ("+t.fd+")"),assert(2===(t=kc("/dev/stderr","w")).fd,"invalid handle for stderr ("+t.fd+")")}}),db.push(function(){Tb=!1}),H.push(function(){qc=!1;var t=e._fflush;for(t&&t(0),t=0;t<Rb.length;t++){var r=Rb[t];r&&mc(r)}}),e.FS_createFolder=function(e,t,r,i){return V(e=K("string"==typeof e?e:T(e),t),rc(r,i))},e.FS_createPath=function(e,t){e="string"==typeof e?e:T(e);for(var r=t.split("/").reverse();r.length;){var i=r.pop();if(i){var n=K(e,i);try{V(n)}catch(e){}e=n}}return n},e.FS_createDataFile=tc,e.FS_createPreloadedFile=function(n,o,t,a,s,u,c,l,f,h){function r(t){function r(e){h&&h(),l||tc(n,o,e,a,s,f),u&&u(),lb()}var i=!1;e.preloadPlugins.forEach(function(e){!i&&e.canHandle(d)&&(e.handle(t,d,r,function(){c&&c(),lb()}),i=!0)}),i||r(t)}Vc();var d=o?Db(K(n,o)):n;kb(),"string"==typeof t?nd(t,function(e){r(e)},c):r(t)},e.FS_createLazyFile=function(e,t,u,r,i){var n,o;function a(){this.oa=!1,this.Y=[]}if(a.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize;return this.gb(e/this.chunkSize|0)[t]}},a.prototype.pb=function(e){this.gb=e},a.prototype.Ca=function(){var e=new XMLHttpRequest;if(e.open("HEAD",u,!1),e.send(null),!(200<=e.status&&e.status<300||304===e.status))throw Error("Couldn't load "+u+". Status: "+e.status);var t,o=Number(e.getResponseHeader("Content-length")),a=1048576;(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t||(a=o);var s=this;s.pb(function(e){var t=e*a,r=(e+1)*a-1;r=Math.min(r,o-1);if(void 0===s.Y[e]){var i=s.Y;if(r<t)throw Error("invalid range ("+t+", "+r+") or no bytes requested!");if(o-1<r)throw Error("only "+o+" bytes available! programmer error!");var n=new XMLHttpRequest;if(n.open("GET",u,!1),o!==a&&n.setRequestHeader("Range","bytes="+t+"-"+r),"undefined"!=typeof Uint8Array&&(n.responseType="arraybuffer"),n.overrideMimeType&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.send(null),!(200<=n.status&&n.status<300||304===n.status))throw Error("Couldn't load "+u+". Status: "+n.status);t=void 0!==n.response?new Uint8Array(n.response||[]):hb(n.responseText||"",!0),i[e]=t}if(void 0===s.Y[e])throw Error("doXHR failed!");return s.Y[e]}),this.Wa=o,this.Va=a,this.oa=!0},"undefined"!=typeof XMLHttpRequest){if(!ca)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";n=new a,Object.defineProperty(n,"length",{get:function(){return this.oa||this.Ca(),this.Wa}}),Object.defineProperty(n,"chunkSize",{get:function(){return this.oa||this.Ca(),this.Va}}),o=void 0}else o=u,n=void 0;var s=sc(e,t,r,i);n?s.e=n:o&&(s.e=null,s.url=o),Object.defineProperty(s,"usedBytes",{get:function(){return this.e.length}});var c={};return Object.keys(s.n).forEach(function(e){var t=s.n[e];c[e]=function(){if(!uc(s))throw new L(J.H);return t.apply(null,arguments)}}),c.read=function(e,t,r,i,n){if(!uc(s))throw new L(J.H);if(n>=(e=e.g.e).length)return 0;if(assert(0<=(i=Math.min(e.length-n,i))),e.slice)for(var o=0;o<i;o++)t[r+o]=e[n+o];else for(o=0;o<i;o++)t[r+o]=e.get(n+o);return i},s.n=c,s},e.FS_createLink=function(e,t,r){return ic(r,e=K("string"==typeof e?e:T(e),t))},e.FS_createDevice=W,e.FS_unlink=function(t){var r,e=S(t,{parent:!0}).g,i=Bb(t),n=Nb(e,i);e:{try{r=Nb(e,i)}catch(e){r=e.S;break e}var o=Yb(e,"wx");r=o||(N(r.mode)?J.P:0)}if(r)throw r===J.P&&(r=J.I),new L(r);if(!e.k.unlink)throw new L(J.I);if(n.U)throw new L(J.fa);try{R.willDeletePath&&R.willDeletePath(t)}catch(e){console.log("FS.trackingDelegate['willDeletePath']('"+t+"') threw an exception: "+e.message)}if(e.k.unlink(e,i),e=Wb(n.parent.id,n.name),Q[e]===n)Q[e]=n.M;else for(e=Q[e];e;){if(e.M===n){e.M=n.M;break}e=e.M}try{R.onDeletePath&&R.onDeletePath(t)}catch(e){console.log("FS.trackingDelegate['onDeletePath']('"+t+"') threw an exception: "+e.message)}},cb.unshift(function(){}),H.push(function(){}),da){var fs=require("fs"),Ob=require("path");P.sb()}e.requestFullScreen=function(e,t,r){fd(e,t,r)},e.requestAnimationFrame=function(e){Ic(e)},e.setCanvasSize=function(t,r,i){id(e.canvas,t,r),i||pd()},e.pauseMainLoop=function(){Y=null,Lc++},e.resumeMainLoop=function(){Lc++;var e=Dc,t=Ec;Jc(Fc,0,!1,Kc,!(Fc=null)),Cc(e,t),Y()},e.getUserMedia=function(){window.p||(window.p=navigator.getUserMedia||navigator.mozGetUserMedia),window.p(void 0)},e.createContext=function(e,t,r,i){return bd(e,t,r,i)},Ua=m=n.ja(la),Fa=!0,Va=Ua+$a,Wa=r=n.ja(Va),assert(Wa<t,"TOTAL_MEMORY not big enough for stack");var qd=D([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],"i8",3);e.Ya={Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array,NaN:NaN,Infinity:1/0,byteLength:Ya},e.Za={abort:x,assert:assert,invoke_iiii:function(t,r,i,n){try{return e.dynCall_iiii(t,r,i,n)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},invoke_viiiii:function(t,r,i,n,o,a){try{e.dynCall_viiiii(t,r,i,n,o,a)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},invoke_vi:function(t,r){try{e.dynCall_vi(t,r)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},invoke_ii:function(t,r){try{return e.dynCall_ii(t,r)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},invoke_viii:function(t,r,i,n){try{e.dynCall_viii(t,r,i,n)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},invoke_v:function(t){try{e.dynCall_v(t)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},invoke_viiiiii:function(t,r,i,n,o,a,s){try{e.dynCall_viiiiii(t,r,i,n,o,a,s)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},invoke_iiiiii:function(t,r,i,n,o,a){try{return e.dynCall_iiiiii(t,r,i,n,o,a)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},invoke_viiii:function(t,r,i,n,o){try{e.dynCall_viiii(t,r,i,n,o)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Z.setThrew(1,0)}},_pthread_cleanup_pop:function(){assert(pb.level==H.length,"cannot pop if something else added meanwhile!"),H.pop(),pb.level=H.length},___syscall54:function(e,t){wc=t;try{var r=xc(),i=X();switch(i){case 21505:case 21506:return r.tty?0:-J.Q;case 21519:if(!r.tty)return-J.Q;var n=X();return C[n>>2]=0;case 21520:return r.tty?-J.q:-J.Q;case 21531:if(n=X(),!r.n.ib)throw new L(J.Q);return r.n.ib(r,i,n);default:x("bad ioctl syscall "+i)}}catch(e){return void 0!==vc&&e instanceof L||x(e),-e.S}},___syscall6:function(e,t){wc=t;try{return mc(xc()),0}catch(e){return void 0!==vc&&e instanceof L||x(e),-e.S}},_emscripten_set_main_loop_timing:Cc,__ZSt18uncaught_exceptionv:tb,___setErrNo:ob,_sbrk:Ga,___cxa_begin_catch:function(e){var t;tb.p--,ub.push(e);e:{if(e&&!vb[e])for(t in vb)if(vb[t].wd===e)break e;t=e}return t&&vb[t].Sd++,e},_emscripten_memcpy_big:function(e,t,r){return E.set(E.subarray(t,t+r),e),e},_sysconf:function(e){switch(e){case 30:return 4096;case 85:return F/4096;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 79:return 0;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"==typeof navigator&&navigator.hardwareConcurrency||1}return ob(J.q),-1},_pthread_getspecific:function(e){return yc[e]||0},_pthread_self:function(){return 0},_pthread_once:wb,_pthread_key_create:function(e){return 0==e?J.q:(C[e>>2]=Ac,yc[Ac]=0,Ac++,0)},___unlock:function(){},_emscripten_set_main_loop:Jc,_pthread_setspecific:function(e,t){return e in yc?(yc[e]=t,0):J.q},___lock:function(){},_abort:function(){e.abort()},_pthread_cleanup_push:pb,_time:function(e){var t=Date.now()/1e3|0;return e&&(C[e>>2]=t),t},___syscall140:function(e,t){wc=t;try{var r=xc(),i=X(),n=X(),o=X(),a=X();return assert(0===i),nc(r,n,a),C[o>>2]=r.position,r.na&&0===n&&0===a&&(r.na=null),0}catch(e){return void 0!==vc&&e instanceof L||x(e),-e.S}},___syscall146:function(e,t){wc=t;try{var r,i=xc(),n=X();e:{for(var o=X(),a=0,s=0;s<o;s++){var u=oc(i,y,C[n+8*s>>2],C[n+(8*s+4)>>2],void 0);if(u<0){r=-1;break e}a+=u}r=a}return r}catch(e){return void 0!==vc&&e instanceof L||x(e),-e.S}},STACKTOP:m,STACK_MAX:Va,tempDoublePtr:mb,ABORT:na,cttz_i8:qd};var Z=function(e,t,r){"use asm";var i=e.Int8Array;var n=e.Int16Array;var o=e.Int32Array;var a=e.Uint8Array;var s=e.Uint16Array;var u=e.Uint32Array;var c=e.Float32Array;var l=e.Float64Array;var de=new i(r);var $=new n(r);var pe=new o(r);var ve=new a(r);var me=new s(r);var f=new u(r);var h=new c(r);var ee=new l(r);var d=e.byteLength;var be=t.STACKTOP|0;var p=t.STACK_MAX|0;var te=t.tempDoublePtr|0;var v=t.ABORT|0;var m=t.cttz_i8|0;var b=0;var y=0;var g=0;var _=0;var w=e.NaN,x=e.Infinity;var T=0,S=0,M=0,P=0,E=0.0,k=0,C=0,A=0,O=0.0;var re=0;var I=0;var R=0;var D=0;var L=0;var j=0;var F=0;var B=0;var N=0;var U=0;var z=e.Math.floor;var X=e.Math.abs;var W=e.Math.sqrt;var q=e.Math.pow;var H=e.Math.cos;var G=e.Math.sin;var V=e.Math.tan;var Y=e.Math.acos;var J=e.Math.asin;var K=e.Math.atan;var Z=e.Math.atan2;var Q=e.Math.exp;var ie=e.Math.log;var ne=e.Math.ceil;var ye=e.Math.imul;var oe=e.Math.min;var ae=e.Math.clz32;var se=t.abort;var ue=t.assert;var ce=t.invoke_iiii;var le=t.invoke_viiiii;var fe=t.invoke_vi;var he=t.invoke_ii;var ge=t.invoke_viii;var _e=t.invoke_v;var we=t.invoke_viiiiii;var xe=t.invoke_iiiiii;var Te=t.invoke_viiii;var Se=t._pthread_cleanup_pop;var Me=t.___syscall54;var Pe=t.___syscall6;var Ee=t._emscripten_set_main_loop_timing;var ke=t.__ZSt18uncaught_exceptionv;var Ce=t.___setErrNo;var Ae=t._sbrk;var Oe=t.___cxa_begin_catch;var Ie=t._emscripten_memcpy_big;var Re=t._sysconf;var De=t._pthread_getspecific;var Le=t._pthread_self;var je=t._pthread_once;var Fe=t._pthread_key_create;var Be=t.___unlock;var Ne=t._emscripten_set_main_loop;var Ue=t._pthread_setspecific;var ze=t.___lock;var Xe=t._abort;var We=t._pthread_cleanup_push;var qe=t._time;var He=t.___syscall140;var Ge=t.___syscall146;var Ve=0.0;function Ye(e){if(d(e)&16777215||d(e)<=16777215||d(e)>2147483648)return false;de=new i(e);$=new n(e);pe=new o(e);ve=new a(e);me=new s(e);f=new u(e);h=new c(e);ee=new l(e);r=e;return true}function Je(e){e=e|0;var t=0;t=be;be=be+e|0;be=be+15&-16;return t|0}function Ke(){return be|0}function Ze(e){e=e|0;be=e}function Qe(e,t){e=e|0;t=t|0;be=e;p=t}function $e(e,t){e=e|0;t=t|0;if(!b){b=e;y=t}}function et(e){e=e|0;de[te>>0]=de[e>>0];de[te+1>>0]=de[e+1>>0];de[te+2>>0]=de[e+2>>0];de[te+3>>0]=de[e+3>>0]}function tt(e){e=e|0;de[te>>0]=de[e>>0];de[te+1>>0]=de[e+1>>0];de[te+2>>0]=de[e+2>>0];de[te+3>>0]=de[e+3>>0];de[te+4>>0]=de[e+4>>0];de[te+5>>0]=de[e+5>>0];de[te+6>>0]=de[e+6>>0];de[te+7>>0]=de[e+7>>0]}function rt(e){e=e|0;re=e}function it(){return re|0}function nt(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0;v=be;be=be+608|0;h=v+88|0;f=v+72|0;u=v+64|0;s=v+48|0;a=v+24|0;o=v;l=v+96|0;d=v+92|0;c=e+4|0;p=e+8|0;if((pe[c>>2]|0)>>>0>(pe[p>>2]|0)>>>0){pe[o>>2]=1154;pe[o+4>>2]=2120;pe[o+8>>2]=1133;_r(l,1100,o)|0;gr(l,v+16|0)|0}if((2147418112/(i>>>0)|0)>>>0<=t>>>0){pe[a>>2]=1154;pe[a+4>>2]=2121;pe[a+8>>2]=1169;_r(l,1100,a)|0;gr(l,v+40|0)|0}a=pe[p>>2]|0;if(a>>>0>=t>>>0){p=1;be=v;return p|0}do{if(r){if(t){o=t+-1|0;if(!(o&t)){o=11;break}else t=o}else t=-1;t=t>>>16|t;t=t>>>8|t;t=t>>>4|t;t=t>>>2|t;t=(t>>>1|t)+1|0;o=10}else o=10}while(0);if((o|0)==10)if(!t){t=0;o=12}else o=11;if((o|0)==11)if(t>>>0<=a>>>0)o=12;if((o|0)==12){pe[s>>2]=1154;pe[s+4>>2]=2130;pe[s+8>>2]=1217;_r(l,1100,s)|0;gr(l,u)|0}r=ye(t,i)|0;do{if(!n){o=ot(pe[e>>2]|0,r,d,1)|0;if(!o){p=0;be=v;return p|0}else{pe[e>>2]=o;break}}else{a=at(r,d)|0;if(!a){p=0;be=v;return p|0}Ai[n&0](a,pe[e>>2]|0,pe[c>>2]|0);o=pe[e>>2]|0;do{if(o)if(!(o&7)){Ri[pe[104>>2]&1](o,0,0,1,pe[27]|0)|0;break}else{pe[f>>2]=1154;pe[f+4>>2]=2499;pe[f+8>>2]=1516;_r(l,1100,f)|0;gr(l,h)|0;break}}while(0);pe[e>>2]=a}}while(0);o=pe[d>>2]|0;if(o>>>0>r>>>0)t=(o>>>0)/(i>>>0)|0;pe[p>>2]=t;p=1;be=v;return p|0}function ot(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,o=0,a=0,s=0,u=0,c=0;c=be;be=be+592|0;u=c+48|0;o=c+24|0;n=c;s=c+72|0;a=c+68|0;if(e&7){pe[n>>2]=1154;pe[n+4>>2]=2499;pe[n+8>>2]=1494;_r(s,1100,n)|0;gr(s,c+16|0)|0;u=0;be=c;return u|0}if(t>>>0>2147418112){pe[o>>2]=1154;pe[o+4>>2]=2499;pe[o+8>>2]=1387;_r(s,1100,o)|0;gr(s,c+40|0)|0;u=0;be=c;return u|0}pe[a>>2]=t;i=Ri[pe[104>>2]&1](e,t,a,i,pe[27]|0)|0;if(r)pe[r>>2]=pe[a>>2];if(!(i&7)){u=i;be=c;return u|0}pe[u>>2]=1154;pe[u+4>>2]=2551;pe[u+8>>2]=1440;_r(s,1100,u)|0;gr(s,c+64|0)|0;u=i;be=c;return u|0}function at(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,u=0;u=be;be=be+592|0;a=u+48|0;s=u+24|0;r=u;o=u+72|0;n=u+68|0;i=e+3&-4;i=(i|0)!=0?i:4;if(i>>>0>2147418112){pe[r>>2]=1154;pe[r+4>>2]=2499;pe[r+8>>2]=1387;_r(o,1100,r)|0;gr(o,u+16|0)|0;s=0;be=u;return s|0}pe[n>>2]=i;r=Ri[pe[104>>2]&1](0,i,n,1,pe[27]|0)|0;e=pe[n>>2]|0;if(t)pe[t>>2]=e;if((r|0)==0|e>>>0<i>>>0){pe[s>>2]=1154;pe[s+4>>2]=2499;pe[s+8>>2]=1413;_r(o,1100,s)|0;gr(o,u+40|0)|0;s=0;be=u;return s|0}if(!(r&7)){s=r;be=u;return s|0}pe[a>>2]=1154;pe[a+4>>2]=2526;pe[a+8>>2]=1440;_r(o,1100,a)|0;gr(o,u+64|0)|0;s=r;be=u;return s|0}function st(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0,g=0,_=0,w=0,x=0,T=0,S=0,M=0,P=0,E=0,k=0,C=0,A=0,O=0,I=0,R=0,D=0,L=0,j=0,F=0,B=0;B=be;be=be+960|0;L=B+232|0;D=B+216|0;R=B+208|0;I=B+192|0;O=B+184|0;A=B+168|0;C=B+160|0;k=B+144|0;M=B+136|0;S=B+120|0;T=B+112|0;x=B+96|0;g=B+88|0;y=B+72|0;b=B+64|0;m=B+48|0;f=B+40|0;d=B+24|0;h=B+16|0;l=B;E=B+440|0;j=B+376|0;F=B+304|0;v=B+236|0;if((t|0)==0|i>>>0>11){e=0;be=B;return e|0}pe[e>>2]=t;n=F;o=n+68|0;do{pe[n>>2]=0;n=n+4|0}while((n|0)<(o|0));o=0;do{n=de[r+o>>0]|0;if(n<<24>>24){P=F+((n&255)<<2)|0;pe[P>>2]=(pe[P>>2]|0)+1}o=o+1|0}while((o|0)!=(t|0));o=0;c=1;a=0;s=-1;u=0;while(1){n=pe[F+(c<<2)>>2]|0;if(!n)pe[e+28+(c+-1<<2)>>2]=0;else{P=c+-1|0;pe[j+(P<<2)>>2]=o;o=n+o|0;w=16-c|0;pe[e+28+(P<<2)>>2]=(o+-1<<w|(1<<w)+-1)+1;pe[e+96+(P<<2)>>2]=u;pe[v+(c<<2)>>2]=u;a=a>>>0>c>>>0?a:c;s=s>>>0<c>>>0?s:c;u=n+u|0}c=c+1|0;if((c|0)==17){P=a;break}else o=o<<1}pe[e+4>>2]=u;o=e+172|0;do{if(u>>>0>(pe[o>>2]|0)>>>0){pe[o>>2]=u;if(u){n=u+-1|0;if(n&u)p=14}else{n=-1;p=14}if((p|0)==14){w=n>>>16|n;w=w>>>8|w;w=w>>>4|w;w=w>>>2|w;w=(w>>>1|w)+1|0;pe[o>>2]=w>>>0>t>>>0?t:w}a=e+176|0;n=pe[a>>2]|0;do{if(n){w=pe[n+-4>>2]|0;n=n+-8|0;if(!((w|0)!=0?(w|0)==(~pe[n>>2]|0):0)){pe[l>>2]=1154;pe[l+4>>2]=644;pe[l+8>>2]=1863;_r(E,1100,l)|0;gr(E,h)|0}if(!(n&7)){Ri[pe[104>>2]&1](n,0,0,1,pe[27]|0)|0;break}else{pe[d>>2]=1154;pe[d+4>>2]=2499;pe[d+8>>2]=1516;_r(E,1100,d)|0;gr(E,f)|0;break}}}while(0);o=pe[o>>2]|0;o=(o|0)!=0?o:1;n=at((o<<1)+8|0,0)|0;if(!n){pe[a>>2]=0;n=0;break}else{pe[n+4>>2]=o;pe[n>>2]=~o;pe[a>>2]=n+8;p=25;break}}else p=25}while(0);e:do{if((p|0)==25){w=e+24|0;de[w>>0]=s;de[e+25>>0]=P;o=e+176|0;a=0;do{_=de[r+a>>0]|0;n=_&255;if(_<<24>>24){if(!(pe[F+(n<<2)>>2]|0)){pe[m>>2]=1154;pe[m+4>>2]=2273;pe[m+8>>2]=1261;_r(E,1100,m)|0;gr(E,b)|0}_=v+(n<<2)|0;n=pe[_>>2]|0;pe[_>>2]=n+1;if(n>>>0>=u>>>0){pe[y>>2]=1154;pe[y+4>>2]=2277;pe[y+8>>2]=1274;_r(E,1100,y)|0;gr(E,g)|0}$[(pe[o>>2]|0)+(n<<1)>>1]=a}a=a+1|0}while((a|0)!=(t|0));n=de[w>>0]|0;g=(n&255)>>>0<i>>>0?i:0;_=e+8|0;pe[_>>2]=g;y=(g|0)!=0;if(y){b=1<<g;n=e+164|0;do{if(b>>>0>(pe[n>>2]|0)>>>0){pe[n>>2]=b;a=e+168|0;n=pe[a>>2]|0;do{if(n){m=pe[n+-4>>2]|0;n=n+-8|0;if(!((m|0)!=0?(m|0)==(~pe[n>>2]|0):0)){pe[x>>2]=1154;pe[x+4>>2]=644;pe[x+8>>2]=1863;_r(E,1100,x)|0;gr(E,T)|0}if(!(n&7)){Ri[pe[104>>2]&1](n,0,0,1,pe[27]|0)|0;break}else{pe[S>>2]=1154;pe[S+4>>2]=2499;pe[S+8>>2]=1516;_r(E,1100,S)|0;gr(E,M)|0;break}}}while(0);n=b<<2;o=at(n+8|0,0)|0;if(!o){pe[a>>2]=0;n=0;break e}else{M=o+8|0;pe[o+4>>2]=b;pe[o>>2]=~b;pe[a>>2]=M;o=M;break}}else{o=e+168|0;n=b<<2;a=o;o=pe[o>>2]|0}}while(0);Yr(o|0,-1,n|0)|0;p=e+176|0;m=1;do{if(pe[F+(m<<2)>>2]|0){t=g-m|0;v=1<<t;o=m+-1|0;s=pe[j+(o<<2)>>2]|0;if(o>>>0>=16){pe[k>>2]=1154;pe[k+4>>2]=1953;pe[k+8>>2]=1737;_r(E,1100,k)|0;gr(E,C)|0}n=pe[e+28+(o<<2)>>2]|0;if(!n)d=-1;else d=(n+-1|0)>>>(16-m|0);if(s>>>0<=d>>>0){f=(pe[e+96+(o<<2)>>2]|0)-s|0;h=m<<16;do{n=me[(pe[p>>2]|0)+(f+s<<1)>>1]|0;if((ve[r+n>>0]|0|0)!=(m|0)){pe[A>>2]=1154;pe[A+4>>2]=2319;pe[A+8>>2]=1303;_r(E,1100,A)|0;gr(E,O)|0}l=s<<t;o=n|h;c=0;do{u=c+l|0;if(u>>>0>=b>>>0){pe[I>>2]=1154;pe[I+4>>2]=2325;pe[I+8>>2]=1337;_r(E,1100,I)|0;gr(E,R)|0}n=pe[a>>2]|0;if((pe[n+(u<<2)>>2]|0)!=-1){pe[D>>2]=1154;pe[D+4>>2]=2327;pe[D+8>>2]=1360;_r(E,1100,D)|0;gr(E,L)|0;n=pe[a>>2]|0}pe[n+(u<<2)>>2]=o;c=c+1|0}while(c>>>0<v>>>0);s=s+1|0}while(s>>>0<=d>>>0)}}m=m+1|0}while(g>>>0>=m>>>0);n=de[w>>0]|0}o=e+96|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j>>2]|0);o=e+100|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+4>>2]|0);o=e+104|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+8>>2]|0);o=e+108|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+12>>2]|0);o=e+112|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+16>>2]|0);o=e+116|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+20>>2]|0);o=e+120|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+24>>2]|0);o=e+124|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+28>>2]|0);o=e+128|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+32>>2]|0);o=e+132|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+36>>2]|0);o=e+136|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+40>>2]|0);o=e+140|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+44>>2]|0);o=e+144|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+48>>2]|0);o=e+148|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+52>>2]|0);o=e+152|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+56>>2]|0);o=e+156|0;pe[o>>2]=(pe[o>>2]|0)-(pe[j+60>>2]|0);o=e+16|0;pe[o>>2]=0;a=e+20|0;pe[a>>2]=n&255;t:do{if(y){while(1){if(!i)break t;n=i+-1|0;if(!(pe[F+(i<<2)>>2]|0))i=n;else break}pe[o>>2]=pe[e+28+(n<<2)>>2];n=g+1|0;pe[a>>2]=n;if(n>>>0<=P>>>0){while(1){if(pe[F+(n<<2)>>2]|0)break;n=n+1|0;if(n>>>0>P>>>0)break t}pe[a>>2]=n}}}while(0);pe[e+92>>2]=-1;pe[e+160>>2]=1048575;pe[e+12>>2]=32-(pe[_>>2]|0);n=1}}while(0);e=n;be=B;return e|0}function ut(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0;if(!e){n=Ur(t)|0;if(!r){r=n;return r|0}if(!n)o=0;else o=Wr(n)|0;pe[r>>2]=o;r=n;return r|0}if(!t){zr(e);if(!r){r=0;return r|0}pe[r>>2]=0;r=0;return r|0}n=Xr(e,t)|0;o=(n|0)!=0;if(o|i^1)o=o?n:e;else{n=Xr(e,t)|0;o=(n|0)==0?e:n}if(!r){r=n;return r|0}t=Wr(o)|0;pe[r>>2]=t;r=n;return r|0}function ct(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;if(!((e|0)!=0&t>>>0>73&(r|0)!=0)){r=0;return r|0}if((pe[r>>2]|0)!=40|t>>>0<74){r=0;return r|0}if(((ve[e>>0]|0)<<8|(ve[e+1>>0]|0)|0)!=18552){r=0;return r|0}if(((ve[e+2>>0]|0)<<8|(ve[e+3>>0]|0))>>>0<74){r=0;return r|0}if(((ve[e+7>>0]|0)<<16|(ve[e+6>>0]|0)<<24|(ve[e+8>>0]|0)<<8|(ve[e+9>>0]|0))>>>0>t>>>0){r=0;return r|0}pe[r+4>>2]=(ve[e+12>>0]|0)<<8|(ve[e+13>>0]|0);pe[r+8>>2]=(ve[e+14>>0]|0)<<8|(ve[e+15>>0]|0);pe[r+12>>2]=ve[e+16>>0];pe[r+16>>2]=ve[e+17>>0];t=e+18|0;i=r+32|0;pe[i>>2]=ve[t>>0];pe[i+4>>2]=0;t=de[t>>0]|0;pe[r+20>>2]=t<<24>>24==0|t<<24>>24==9?8:16;pe[r+24>>2]=(ve[e+26>>0]|0)<<16|(ve[e+25>>0]|0)<<24|(ve[e+27>>0]|0)<<8|(ve[e+28>>0]|0);pe[r+28>>2]=(ve[e+30>>0]|0)<<16|(ve[e+29>>0]|0)<<24|(ve[e+31>>0]|0)<<8|(ve[e+32>>0]|0);r=1;return r|0}function lt(e){e=e|0;Oe(e|0)|0;zt()}function ft(e){e=e|0;var t=0,r=0,i=0,n=0,o=0;o=be;be=be+544|0;n=o;i=o+24|0;t=pe[e+20>>2]|0;if(t)ht(t);t=e+4|0;r=pe[t>>2]|0;if(!r){n=e+16|0;de[n>>0]=0;be=o;return}if(!(r&7))Ri[pe[104>>2]&1](r,0,0,1,pe[27]|0)|0;else{pe[n>>2]=1154;pe[n+4>>2]=2499;pe[n+8>>2]=1516;_r(i,1100,n)|0;gr(i,o+16|0)|0}pe[t>>2]=0;pe[e+8>>2]=0;pe[e+12>>2]=0;n=e+16|0;de[n>>0]=0;be=o;return}function ht(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0;d=be;be=be+640|0;h=d+112|0;f=d+96|0;l=d+88|0;c=d+72|0;u=d+64|0;s=d+48|0;i=d+40|0;o=d+24|0;n=d+16|0;r=d;a=d+120|0;if(!e){be=d;return}t=pe[e+168>>2]|0;do{if(t){p=pe[t+-4>>2]|0;t=t+-8|0;if(!((p|0)!=0?(p|0)==(~pe[t>>2]|0):0)){pe[r>>2]=1154;pe[r+4>>2]=644;pe[r+8>>2]=1863;_r(a,1100,r)|0;gr(a,n)|0}if(!(t&7)){Ri[pe[104>>2]&1](t,0,0,1,pe[27]|0)|0;break}else{pe[o>>2]=1154;pe[o+4>>2]=2499;pe[o+8>>2]=1516;_r(a,1100,o)|0;gr(a,i)|0;break}}}while(0);t=pe[e+176>>2]|0;do{if(t){p=pe[t+-4>>2]|0;t=t+-8|0;if(!((p|0)!=0?(p|0)==(~pe[t>>2]|0):0)){pe[s>>2]=1154;pe[s+4>>2]=644;pe[s+8>>2]=1863;_r(a,1100,s)|0;gr(a,u)|0}if(!(t&7)){Ri[pe[104>>2]&1](t,0,0,1,pe[27]|0)|0;break}else{pe[c>>2]=1154;pe[c+4>>2]=2499;pe[c+8>>2]=1516;_r(a,1100,c)|0;gr(a,l)|0;break}}}while(0);if(!(e&7)){Ri[pe[104>>2]&1](e,0,0,1,pe[27]|0)|0;be=d;return}else{pe[f>>2]=1154;pe[f+4>>2]=2499;pe[f+8>>2]=1516;_r(a,1100,f)|0;gr(a,h)|0;be=d;return}}function dt(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0;l=be;be=be+560|0;a=l+40|0;s=l+24|0;t=l;o=l+48|0;n=e+8|0;r=pe[n>>2]|0;if((r+-1|0)>>>0>=8192){pe[t>>2]=1154;pe[t+4>>2]=2997;pe[t+8>>2]=1541;_r(o,1100,t)|0;gr(o,l+16|0)|0}pe[e>>2]=r;i=e+20|0;t=pe[i>>2]|0;if(!t){t=at(180,0)|0;if(!t)t=0;else{c=t+164|0;pe[c>>2]=0;pe[c+4>>2]=0;pe[c+8>>2]=0;pe[c+12>>2]=0}pe[i>>2]=t;c=t;u=pe[e>>2]|0}else{c=t;u=r}if(!(pe[n>>2]|0)){pe[s>>2]=1154;pe[s+4>>2]=903;pe[s+8>>2]=1781;_r(o,1100,s)|0;gr(o,a)|0;o=pe[e>>2]|0}else o=u;n=pe[e+4>>2]|0;if(o>>>0>16){r=o;t=0}else{e=0;c=st(c,u,n,e)|0;be=l;return c|0}while(1){i=t+1|0;if(r>>>0>3){r=r>>>1;t=i}else{r=i;break}}e=t+2+((r|0)!=32&1<<r>>>0<o>>>0&1)|0;e=e>>>0<11?e&255:11;c=st(c,u,n,e)|0;be=l;return c|0}function pt(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0,g=0,_=0,w=0,x=0,T=0,S=0,M=0,P=0,E=0,k=0,C=0,A=0,O=0,I=0,R=0,D=0,L=0;L=be;be=be+800|0;A=L+256|0;C=L+240|0;k=L+232|0;E=L+216|0;P=L+208|0;M=L+192|0;S=L+184|0;T=L+168|0;x=L+160|0;w=L+144|0;_=L+136|0;g=L+120|0;y=L+112|0;b=L+96|0;m=L+88|0;v=L+72|0;f=L+64|0;l=L+48|0;s=L+40|0;u=L+24|0;o=L+16|0;n=L;R=L+288|0;D=L+264|0;O=vt(e,14)|0;if(!O){pe[t>>2]=0;r=t+4|0;i=pe[r>>2]|0;if(i){if(!(i&7))Ri[pe[104>>2]&1](i,0,0,1,pe[27]|0)|0;else{pe[n>>2]=1154;pe[n+4>>2]=2499;pe[n+8>>2]=1516;_r(R,1100,n)|0;gr(R,o)|0}pe[r>>2]=0;pe[t+8>>2]=0;pe[t+12>>2]=0}de[t+16>>0]=0;r=t+20|0;i=pe[r>>2]|0;if(!i){t=1;be=L;return t|0}ht(i);pe[r>>2]=0;t=1;be=L;return t|0}d=t+4|0;p=t+8|0;r=pe[p>>2]|0;if((r|0)!=(O|0)){if(r>>>0<=O>>>0){do{if((pe[t+12>>2]|0)>>>0<O>>>0){if(nt(d,O,(r+1|0)==(O|0),1,0)|0){r=pe[p>>2]|0;break}de[t+16>>0]=1;t=0;be=L;return t|0}}while(0);Yr((pe[d>>2]|0)+r|0,0,O-r|0)|0}pe[p>>2]=O}Yr(pe[d>>2]|0,0,O|0)|0;h=e+20|0;r=pe[h>>2]|0;if((r|0)<5){o=e+4|0;a=e+8|0;n=e+16|0;do{i=pe[o>>2]|0;if((i|0)==(pe[a>>2]|0))i=0;else{pe[o>>2]=i+1;i=ve[i>>0]|0}r=r+8|0;pe[h>>2]=r;if((r|0)>=33){pe[u>>2]=1154;pe[u+4>>2]=3199;pe[u+8>>2]=1650;_r(R,1100,u)|0;gr(R,s)|0;r=pe[h>>2]|0}i=i<<32-r|pe[n>>2];pe[n>>2]=i}while((r|0)<5)}else{i=e+16|0;n=i;i=pe[i>>2]|0}c=i>>>27;pe[n>>2]=i<<5;pe[h>>2]=r+-5;if((c+-1|0)>>>0>20){t=0;be=L;return t|0}pe[D+20>>2]=0;pe[D>>2]=0;pe[D+4>>2]=0;pe[D+8>>2]=0;pe[D+12>>2]=0;de[D+16>>0]=0;r=D+4|0;i=D+8|0;e:do{if(nt(r,21,0,1,0)|0){s=pe[i>>2]|0;u=pe[r>>2]|0;Yr(u+s|0,0,21-s|0)|0;pe[i>>2]=21;if(c){n=e+4|0;o=e+8|0;a=e+16|0;s=0;do{r=pe[h>>2]|0;if((r|0)<3)do{i=pe[n>>2]|0;if((i|0)==(pe[o>>2]|0))i=0;else{pe[n>>2]=i+1;i=ve[i>>0]|0}r=r+8|0;pe[h>>2]=r;if((r|0)>=33){pe[l>>2]=1154;pe[l+4>>2]=3199;pe[l+8>>2]=1650;_r(R,1100,l)|0;gr(R,f)|0;r=pe[h>>2]|0}i=i<<32-r|pe[a>>2];pe[a>>2]=i}while((r|0)<3);else i=pe[a>>2]|0;pe[a>>2]=i<<3;pe[h>>2]=r+-3;de[u+(ve[1611+s>>0]|0)>>0]=i>>>29;s=s+1|0}while((s|0)!=(c|0))}if(dt(D)|0){s=e+4|0;u=e+8|0;c=e+16|0;i=0;t:while(1){a=O-i|0;r=mt(e,D)|0;r:do{if(r>>>0<17){if((pe[p>>2]|0)>>>0<=i>>>0){pe[v>>2]=1154;pe[v+4>>2]=903;pe[v+8>>2]=1781;_r(R,1100,v)|0;gr(R,m)|0}de[(pe[d>>2]|0)+i>>0]=r;r=i+1|0}else switch(r|0){case 17:{r=pe[h>>2]|0;if((r|0)<3)do{n=pe[s>>2]|0;if((n|0)==(pe[u>>2]|0))n=0;else{pe[s>>2]=n+1;n=ve[n>>0]|0}r=r+8|0;pe[h>>2]=r;if((r|0)>=33){pe[b>>2]=1154;pe[b+4>>2]=3199;pe[b+8>>2]=1650;_r(R,1100,b)|0;gr(R,y)|0;r=pe[h>>2]|0}n=n<<32-r|pe[c>>2];pe[c>>2]=n}while((r|0)<3);else n=pe[c>>2]|0;pe[c>>2]=n<<3;pe[h>>2]=r+-3;r=(n>>>29)+3|0;if(r>>>0>a>>>0){r=0;break e}r=r+i|0;break r}case 18:{r=pe[h>>2]|0;if((r|0)<7)do{n=pe[s>>2]|0;if((n|0)==(pe[u>>2]|0))n=0;else{pe[s>>2]=n+1;n=ve[n>>0]|0}r=r+8|0;pe[h>>2]=r;if((r|0)>=33){pe[g>>2]=1154;pe[g+4>>2]=3199;pe[g+8>>2]=1650;_r(R,1100,g)|0;gr(R,_)|0;r=pe[h>>2]|0}n=n<<32-r|pe[c>>2];pe[c>>2]=n}while((r|0)<7);else n=pe[c>>2]|0;pe[c>>2]=n<<7;pe[h>>2]=r+-7;r=(n>>>25)+11|0;if(r>>>0>a>>>0){r=0;break e}r=r+i|0;break r}default:{if((r+-19|0)>>>0>=2){I=90;break t}o=pe[h>>2]|0;if((r|0)==19){if((o|0)<2){n=o;while(1){r=pe[s>>2]|0;if((r|0)==(pe[u>>2]|0))o=0;else{pe[s>>2]=r+1;o=ve[r>>0]|0}r=n+8|0;pe[h>>2]=r;if((r|0)>=33){pe[w>>2]=1154;pe[w+4>>2]=3199;pe[w+8>>2]=1650;_r(R,1100,w)|0;gr(R,x)|0;r=pe[h>>2]|0}n=o<<32-r|pe[c>>2];pe[c>>2]=n;if((r|0)<2)n=r;else break}}else{n=pe[c>>2]|0;r=o}pe[c>>2]=n<<2;pe[h>>2]=r+-2;o=(n>>>30)+3|0}else{if((o|0)<6){n=o;while(1){r=pe[s>>2]|0;if((r|0)==(pe[u>>2]|0))o=0;else{pe[s>>2]=r+1;o=ve[r>>0]|0}r=n+8|0;pe[h>>2]=r;if((r|0)>=33){pe[T>>2]=1154;pe[T+4>>2]=3199;pe[T+8>>2]=1650;_r(R,1100,T)|0;gr(R,S)|0;r=pe[h>>2]|0}n=o<<32-r|pe[c>>2];pe[c>>2]=n;if((r|0)<6)n=r;else break}}else{n=pe[c>>2]|0;r=o}pe[c>>2]=n<<6;pe[h>>2]=r+-6;o=(n>>>26)+7|0}if((i|0)==0|o>>>0>a>>>0){r=0;break e}r=i+-1|0;if((pe[p>>2]|0)>>>0<=r>>>0){pe[M>>2]=1154;pe[M+4>>2]=903;pe[M+8>>2]=1781;_r(R,1100,M)|0;gr(R,P)|0}n=de[(pe[d>>2]|0)+r>>0]|0;if(!(n<<24>>24)){r=0;break e}r=o+i|0;if(i>>>0>=r>>>0){r=i;break r}do{if((pe[p>>2]|0)>>>0<=i>>>0){pe[E>>2]=1154;pe[E+4>>2]=903;pe[E+8>>2]=1781;_r(R,1100,E)|0;gr(R,k)|0}de[(pe[d>>2]|0)+i>>0]=n;i=i+1|0}while((i|0)!=(r|0))}}}while(0);if(O>>>0>r>>>0)i=r;else break}if((I|0)==90){pe[C>>2]=1154;pe[C+4>>2]=3140;pe[C+8>>2]=1632;_r(R,1100,C)|0;gr(R,A)|0;r=0;break}if((O|0)==(r|0))r=dt(t)|0;else r=0}else r=0}else{de[D+16>>0]=1;r=0}}while(0);ft(D);t=r;be=L;return t|0}function vt(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0;l=be;be=be+544|0;s=l+16|0;a=l;o=l+24|0;if(!t){c=0;be=l;return c|0}if(t>>>0<=16){c=bt(e,t)|0;be=l;return c|0}u=bt(e,t+-16|0)|0;c=e+20|0;t=pe[c>>2]|0;if((t|0)<16){i=e+4|0;n=e+8|0;r=e+16|0;do{e=pe[i>>2]|0;if((e|0)==(pe[n>>2]|0))e=0;else{pe[i>>2]=e+1;e=ve[e>>0]|0}t=t+8|0;pe[c>>2]=t;if((t|0)>=33){pe[a>>2]=1154;pe[a+4>>2]=3199;pe[a+8>>2]=1650;_r(o,1100,a)|0;gr(o,s)|0;t=pe[c>>2]|0}e=e<<32-t|pe[r>>2];pe[r>>2]=e}while((t|0)<16)}else{e=e+16|0;r=e;e=pe[e>>2]|0}pe[r>>2]=e<<16;pe[c>>2]=t+-16;c=e>>>16|u<<16;be=l;return c|0}function mt(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0,g=0;g=be;be=be+608|0;v=g+88|0;p=g+72|0;h=g+64|0;f=g+48|0;l=g+40|0;d=g+24|0;c=g+16|0;u=g;b=g+96|0;m=pe[t+20>>2]|0;y=e+20|0;s=pe[y>>2]|0;do{if((s|0)<24){a=e+4|0;i=pe[a>>2]|0;n=pe[e+8>>2]|0;r=i>>>0<n>>>0;if((s|0)>=16){if(r){pe[a>>2]=i+1;r=ve[i>>0]|0}else r=0;pe[y>>2]=s+8;a=e+16|0;o=r<<24-s|pe[a>>2];pe[a>>2]=o;break}if(r){o=(ve[i>>0]|0)<<8;r=i+1|0}else{o=0;r=i}if(r>>>0<n>>>0){i=ve[r>>0]|0;r=r+1|0}else i=0;pe[a>>2]=r;pe[y>>2]=s+16;a=e+16|0;o=(i|o)<<16-s|pe[a>>2];pe[a>>2]=o}else{o=e+16|0;a=o;o=pe[o>>2]|0}}while(0);n=(o>>>16)+1|0;do{if(n>>>0<=(pe[m+16>>2]|0)>>>0){i=pe[(pe[m+168>>2]|0)+(o>>>(32-(pe[m+8>>2]|0)|0)<<2)>>2]|0;if((i|0)==-1){pe[u>>2]=1154;pe[u+4>>2]=3244;pe[u+8>>2]=1677;_r(b,1100,u)|0;gr(b,c)|0}r=i&65535;i=i>>>16;if((pe[t+8>>2]|0)>>>0<=r>>>0){pe[d>>2]=1154;pe[d+4>>2]=902;pe[d+8>>2]=1781;_r(b,1100,d)|0;gr(b,l)|0}if((ve[(pe[t+4>>2]|0)+r>>0]|0|0)!=(i|0)){pe[f>>2]=1154;pe[f+4>>2]=3248;pe[f+8>>2]=1694;_r(b,1100,f)|0;gr(b,h)|0}}else{i=pe[m+20>>2]|0;while(1){r=i+-1|0;if(n>>>0>(pe[m+28+(r<<2)>>2]|0)>>>0)i=i+1|0;else break}r=(o>>>(32-i|0))+(pe[m+96+(r<<2)>>2]|0)|0;if(r>>>0<(pe[t>>2]|0)>>>0){r=me[(pe[m+176>>2]|0)+(r<<1)>>1]|0;break}pe[p>>2]=1154;pe[p+4>>2]=3266;pe[p+8>>2]=1632;_r(b,1100,p)|0;gr(b,v)|0;y=0;be=g;return y|0}}while(0);pe[a>>2]=pe[a>>2]<<i;pe[y>>2]=(pe[y>>2]|0)-i;y=r;be=g;return y|0}function bt(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0;l=be;be=be+560|0;s=l+40|0;u=l+24|0;r=l;a=l+48|0;if(t>>>0>=33){pe[r>>2]=1154;pe[r+4>>2]=3190;pe[r+8>>2]=1634;_r(a,1100,r)|0;gr(a,l+16|0)|0}c=e+20|0;r=pe[c>>2]|0;if((r|0)>=(t|0)){o=e+16|0;a=o;o=pe[o>>2]|0;s=r;u=32-t|0;u=o>>>u;o=o<<t;pe[a>>2]=o;t=s-t|0;pe[c>>2]=t;be=l;return u|0}n=e+4|0;o=e+8|0;i=e+16|0;do{e=pe[n>>2]|0;if((e|0)==(pe[o>>2]|0))e=0;else{pe[n>>2]=e+1;e=ve[e>>0]|0}r=r+8|0;pe[c>>2]=r;if((r|0)>=33){pe[u>>2]=1154;pe[u+4>>2]=3199;pe[u+8>>2]=1650;_r(a,1100,u)|0;gr(a,s)|0;r=pe[c>>2]|0}e=e<<32-r|pe[i>>2];pe[i>>2]=e}while((r|0)<(t|0));u=32-t|0;u=e>>>u;s=e<<t;pe[i>>2]=s;t=r-t|0;pe[c>>2]=t;be=l;return u|0}function yt(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0;p=be;be=be+544|0;h=p+16|0;f=p;l=p+24|0;if((e|0)==0|t>>>0<62){d=0;be=p;return d|0}c=at(300,0)|0;if(!c){d=0;be=p;return d|0}pe[c>>2]=519686845;r=c+4|0;pe[r>>2]=0;i=c+8|0;pe[i>>2]=0;u=c+88|0;n=c+136|0;o=c+160|0;a=u;s=a+44|0;do{pe[a>>2]=0;a=a+4|0}while((a|0)<(s|0));de[u+44>>0]=0;v=c+184|0;a=c+208|0;s=c+232|0;m=c+252|0;pe[m>>2]=0;pe[m+4>>2]=0;pe[m+8>>2]=0;de[m+12>>0]=0;m=c+268|0;pe[m>>2]=0;pe[m+4>>2]=0;pe[m+8>>2]=0;de[m+12>>0]=0;m=c+284|0;pe[m>>2]=0;pe[m+4>>2]=0;pe[m+8>>2]=0;de[m+12>>0]=0;pe[n>>2]=0;pe[n+4>>2]=0;pe[n+8>>2]=0;pe[n+12>>2]=0;pe[n+16>>2]=0;de[n+20>>0]=0;pe[o>>2]=0;pe[o+4>>2]=0;pe[o+8>>2]=0;pe[o+12>>2]=0;pe[o+16>>2]=0;de[o+20>>0]=0;pe[v>>2]=0;pe[v+4>>2]=0;pe[v+8>>2]=0;pe[v+12>>2]=0;pe[v+16>>2]=0;de[v+20>>0]=0;pe[a>>2]=0;pe[a+4>>2]=0;pe[a+8>>2]=0;pe[a+12>>2]=0;pe[a+16>>2]=0;de[a+20>>0]=0;pe[s>>2]=0;pe[s+4>>2]=0;pe[s+8>>2]=0;pe[s+12>>2]=0;de[s+16>>0]=0;do{if(((t>>>0>=74?((ve[e>>0]|0)<<8|(ve[e+1>>0]|0)|0)==18552:0)?((ve[e+2>>0]|0)<<8|(ve[e+3>>0]|0))>>>0>=74:0)?((ve[e+7>>0]|0)<<16|(ve[e+6>>0]|0)<<24|(ve[e+8>>0]|0)<<8|(ve[e+9>>0]|0))>>>0<=t>>>0:0){pe[u>>2]=e;pe[r>>2]=e;pe[i>>2]=t;if(Et(c)|0){r=pe[u>>2]|0;if((ve[r+39>>0]|0)<<8|(ve[r+40>>0]|0)){if(!(kt(c)|0))break;if(!(Ct(c)|0))break;r=pe[u>>2]|0}if(!((ve[r+55>>0]|0)<<8|(ve[r+56>>0]|0))){m=c;be=p;return m|0}if(At(c)|0?Ot(c)|0:0){m=c;be=p;return m|0}}}else d=7}while(0);if((d|0)==7)pe[u>>2]=0;jt(c);if(!(c&7)){Ri[pe[104>>2]&1](c,0,0,1,pe[27]|0)|0;m=0;be=p;return m|0}else{pe[f>>2]=1154;pe[f+4>>2]=2499;pe[f+8>>2]=1516;_r(l,1100,f)|0;gr(l,h)|0;m=0;be=p;return m|0}return 0}function gt(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0,a=0,s=0,u=0,c=0,l=0;l=be;be=be+544|0;c=l;u=l+24|0;o=pe[e+88>>2]|0;s=(ve[o+70+(n<<2)+1>>0]|0)<<16|(ve[o+70+(n<<2)>>0]|0)<<24|(ve[o+70+(n<<2)+2>>0]|0)<<8|(ve[o+70+(n<<2)+3>>0]|0);a=n+1|0;if(a>>>0<(ve[o+16>>0]|0)>>>0)o=(ve[o+70+(a<<2)+1>>0]|0)<<16|(ve[o+70+(a<<2)>>0]|0)<<24|(ve[o+70+(a<<2)+2>>0]|0)<<8|(ve[o+70+(a<<2)+3>>0]|0);else o=pe[e+8>>2]|0;if(o>>>0>s>>>0){u=e+4|0;u=pe[u>>2]|0;u=u+s|0;c=o-s|0;c=_t(e,u,c,t,r,i,n)|0;be=l;return c|0}pe[c>>2]=1154;pe[c+4>>2]=3704;pe[c+8>>2]=1792;_r(u,1100,c)|0;gr(u,l+16|0)|0;u=e+4|0;u=pe[u>>2]|0;u=u+s|0;c=o-s|0;c=_t(e,u,c,t,r,i,n)|0;be=l;return c|0}function _t(e,t,r,i,n,o,a){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;a=a|0;var s=0,u=0,c=0,l=0;l=pe[e+88>>2]|0;u=((ve[l+12>>0]|0)<<8|(ve[l+13>>0]|0))>>>a;c=((ve[l+14>>0]|0)<<8|(ve[l+15>>0]|0))>>>a;u=u>>>0>1?(u+3|0)>>>2:1;c=c>>>0>1?(c+3|0)>>>2:1;l=l+18|0;a=de[l>>0]|0;a=ye(a<<24>>24==0|a<<24>>24==9?8:16,u)|0;if(o)if((o&3|0)==0&a>>>0<=o>>>0)a=o;else{e=0;return e|0}if((ye(a,c)|0)>>>0>n>>>0){e=0;return e|0}o=(u+1|0)>>>1;s=(c+1|0)>>>1;if(!r){e=0;return e|0}pe[e+92>>2]=t;pe[e+96>>2]=t;pe[e+104>>2]=r;pe[e+100>>2]=t+r;pe[e+108>>2]=0;pe[e+112>>2]=0;switch(ve[l>>0]|0|0){case 0:{It(e,i,n,a,u,c,o,s)|0;e=1;return e|0}case 4:case 6:case 5:case 3:case 2:{Rt(e,i,n,a,u,c,o,s)|0;e=1;return e|0}case 9:{Dt(e,i,n,a,u,c,o,s)|0;e=1;return e|0}case 8:case 7:{Lt(e,i,n,a,u,c,o,s)|0;e=1;return e|0}default:{e=0;return e|0}}return 0}function wt(e,t){e=e|0;t=t|0;var r=0,i=0;i=be;be=be+48|0;r=i;pe[r>>2]=40;ct(e,t,r)|0;be=i;return pe[r+4>>2]|0}function xt(e,t){e=e|0;t=t|0;var r=0,i=0;i=be;be=be+48|0;r=i;pe[r>>2]=40;ct(e,t,r)|0;be=i;return pe[r+8>>2]|0}function Tt(e,t){e=e|0;t=t|0;var r=0,i=0;i=be;be=be+48|0;r=i;pe[r>>2]=40;ct(e,t,r)|0;be=i;return pe[r+12>>2]|0}function St(e,t){e=e|0;t=t|0;var r=0,i=0;i=be;be=be+48|0;r=i;pe[r>>2]=40;ct(e,t,r)|0;be=i;return pe[r+32>>2]|0}function Mt(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0,a=0,s=0,u=0,c=0;u=be;be=be+576|0;a=u+56|0;o=u+40|0;n=u+64|0;c=u;pe[c>>2]=40;ct(e,t,c)|0;i=(((pe[c+4>>2]|0)>>>r)+3|0)>>>2;t=(((pe[c+8>>2]|0)>>>r)+3|0)>>>2;r=c+32|0;e=pe[r+4>>2]|0;do{switch(pe[r>>2]|0){case 0:{if(!e)e=8;else s=13;break}case 1:{if(!e)s=12;else s=13;break}case 2:{if(!e)s=12;else s=13;break}case 3:{if(!e)s=12;else s=13;break}case 4:{if(!e)s=12;else s=13;break}case 5:{if(!e)s=12;else s=13;break}case 6:{if(!e)s=12;else s=13;break}case 7:{if(!e)s=12;else s=13;break}case 8:{if(!e)s=12;else s=13;break}case 9:{if(!e)e=8;else s=13;break}default:s=13}}while(0);if((s|0)==12)e=16;else if((s|0)==13){pe[o>>2]=1154;pe[o+4>>2]=2663;pe[o+8>>2]=1535;_r(n,1100,o)|0;gr(n,a)|0;e=0}c=ye(ye(t,i)|0,e)|0;be=u;return c|0}function Pt(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0;p=be;be=be+608|0;h=p+80|0;d=p+64|0;s=p+56|0;a=p+40|0;l=p+88|0;v=p;f=p+84|0;pe[v>>2]=40;ct(e,t,v)|0;u=(((pe[v+4>>2]|0)>>>n)+3|0)>>>2;v=v+32|0;o=pe[v+4>>2]|0;do{switch(pe[v>>2]|0){case 0:{if(!o)o=8;else c=13;break}case 1:{if(!o)c=12;else c=13;break}case 2:{if(!o)c=12;else c=13;break}case 3:{if(!o)c=12;else c=13;break}case 4:{if(!o)c=12;else c=13;break}case 5:{if(!o)c=12;else c=13;break}case 6:{if(!o)c=12;else c=13;break}case 7:{if(!o)c=12;else c=13;break}case 8:{if(!o)c=12;else c=13;break}case 9:{if(!o)o=8;else c=13;break}default:c=13}}while(0);if((c|0)==12)o=16;else if((c|0)==13){pe[a>>2]=1154;pe[a+4>>2]=2663;pe[a+8>>2]=1535;_r(l,1100,a)|0;gr(l,s)|0;o=0}s=ye(o,u)|0;a=yt(e,t)|0;pe[f>>2]=r;o=(a|0)==0;if(!(n>>>0>15|(i>>>0<8|o))?(pe[a>>2]|0)==519686845:0)gt(a,f,i,s,n)|0;if(o){be=p;return}if((pe[a>>2]|0)!=519686845){be=p;return}jt(a);if(!(a&7)){Ri[pe[104>>2]&1](a,0,0,1,pe[27]|0)|0;be=p;return}else{pe[d>>2]=1154;pe[d+4>>2]=2499;pe[d+8>>2]=1516;_r(l,1100,d)|0;gr(l,h)|0;be=p;return}}function Et(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0;a=e+92|0;i=pe[e+4>>2]|0;o=e+88|0;n=pe[o>>2]|0;t=(ve[n+68>>0]|0)<<8|(ve[n+67>>0]|0)<<16|(ve[n+69>>0]|0);r=i+t|0;n=(ve[n+65>>0]|0)<<8|(ve[n+66>>0]|0);if(!n){e=0;return e|0}pe[a>>2]=r;pe[e+96>>2]=r;pe[e+104>>2]=n;pe[e+100>>2]=i+(n+t);pe[e+108>>2]=0;pe[e+112>>2]=0;if(!(pt(a,e+116|0)|0)){e=0;return e|0}t=pe[o>>2]|0;do{if(!((ve[t+39>>0]|0)<<8|(ve[t+40>>0]|0))){if(!((ve[t+55>>0]|0)<<8|(ve[t+56>>0]|0))){e=0;return e|0}}else{if(!(pt(a,e+140|0)|0)){e=0;return e|0}if(pt(a,e+188|0)|0){t=pe[o>>2]|0;break}else{e=0;return e|0}}}while(0);if((ve[t+55>>0]|0)<<8|(ve[t+56>>0]|0)){if(!(pt(a,e+164|0)|0)){e=0;return e|0}if(!(pt(a,e+212|0)|0)){e=0;return e|0}}e=1;return e|0}function kt(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0;p=be;be=be+592|0;u=p+16|0;s=p;a=p+72|0;d=p+24|0;i=e+88|0;t=pe[i>>2]|0;h=(ve[t+39>>0]|0)<<8|(ve[t+40>>0]|0);l=e+236|0;o=e+240|0;r=pe[o>>2]|0;if((r|0)!=(h|0)){if(r>>>0<=h>>>0){do{if((pe[e+244>>2]|0)>>>0<h>>>0){if(nt(l,h,(r+1|0)==(h|0),4,0)|0){t=pe[o>>2]|0;break}de[e+248>>0]=1;d=0;be=p;return d|0}else t=r}while(0);Yr((pe[l>>2]|0)+(t<<2)|0,0,h-t<<2|0)|0;t=pe[i>>2]|0}pe[o>>2]=h}c=e+92|0;r=pe[e+4>>2]|0;i=(ve[t+34>>0]|0)<<8|(ve[t+33>>0]|0)<<16|(ve[t+35>>0]|0);n=r+i|0;t=(ve[t+37>>0]|0)<<8|(ve[t+36>>0]|0)<<16|(ve[t+38>>0]|0);if(!t){d=0;be=p;return d|0}pe[c>>2]=n;pe[e+96>>2]=n;pe[e+104>>2]=t;pe[e+100>>2]=r+(t+i);pe[e+108>>2]=0;pe[e+112>>2]=0;pe[d+20>>2]=0;pe[d>>2]=0;pe[d+4>>2]=0;pe[d+8>>2]=0;pe[d+12>>2]=0;de[d+16>>0]=0;e=d+24|0;pe[d+44>>2]=0;pe[e>>2]=0;pe[e+4>>2]=0;pe[e+8>>2]=0;pe[e+12>>2]=0;de[e+16>>0]=0;if(pt(c,d)|0?(f=d+24|0,pt(c,f)|0):0){if(!(pe[o>>2]|0)){pe[s>>2]=1154;pe[s+4>>2]=903;pe[s+8>>2]=1781;_r(a,1100,s)|0;gr(a,u)|0}if(!h)t=1;else{i=0;n=0;o=0;t=0;a=0;e=0;s=0;r=pe[l>>2]|0;while(1){i=(mt(c,d)|0)+i&31;n=(mt(c,f)|0)+n&63;o=(mt(c,d)|0)+o&31;t=(mt(c,d)|0)+t|0;a=(mt(c,f)|0)+a&63;e=(mt(c,d)|0)+e&31;pe[r>>2]=n<<5|i<<11|o|t<<27|a<<21|e<<16;s=s+1|0;if((s|0)==(h|0)){t=1;break}else{t=t&31;r=r+4|0}}}}else t=0;ft(d+24|0);ft(d);d=t;be=p;return d|0}function Ct(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0,g=0,_=0,w=0,x=0,T=0,S=0,M=0,P=0,E=0;M=be;be=be+1024|0;s=M+16|0;a=M;o=M+504|0;S=M+480|0;x=M+284|0;T=M+88|0;w=M+24|0;n=pe[e+88>>2]|0;_=(ve[n+47>>0]|0)<<8|(ve[n+48>>0]|0);g=e+92|0;t=pe[e+4>>2]|0;r=(ve[n+42>>0]|0)<<8|(ve[n+41>>0]|0)<<16|(ve[n+43>>0]|0);i=t+r|0;n=(ve[n+45>>0]|0)<<8|(ve[n+44>>0]|0)<<16|(ve[n+46>>0]|0);if(!n){S=0;be=M;return S|0}pe[g>>2]=i;pe[e+96>>2]=i;pe[e+104>>2]=n;pe[e+100>>2]=t+(n+r);pe[e+108>>2]=0;pe[e+112>>2]=0;pe[S+20>>2]=0;pe[S>>2]=0;pe[S+4>>2]=0;pe[S+8>>2]=0;pe[S+12>>2]=0;de[S+16>>0]=0;if(pt(g,S)|0){r=0;i=-3;n=-3;while(1){pe[x+(r<<2)>>2]=i;pe[T+(r<<2)>>2]=n;t=(i|0)>2;r=r+1|0;if((r|0)==49)break;else{i=t?-3:i+1|0;n=(t&1)+n|0}}t=w;r=t+64|0;do{pe[t>>2]=0;t=t+4|0}while((t|0)<(r|0));y=e+252|0;r=e+256|0;t=pe[r>>2]|0;e:do{if((t|0)==(_|0))u=13;else{if(t>>>0<=_>>>0){do{if((pe[e+260>>2]|0)>>>0<_>>>0)if(nt(y,_,(t+1|0)==(_|0),4,0)|0){t=pe[r>>2]|0;break}else{de[e+264>>0]=1;t=0;break e}}while(0);Yr((pe[y>>2]|0)+(t<<2)|0,0,_-t<<2|0)|0}pe[r>>2]=_;u=13}}while(0);do{if((u|0)==13){if(!_){pe[a>>2]=1154;pe[a+4>>2]=903;pe[a+8>>2]=1781;_r(o,1100,a)|0;gr(o,s)|0;t=1;break}i=w+4|0;n=w+8|0;e=w+12|0;o=w+16|0;a=w+20|0;s=w+24|0;u=w+28|0;c=w+32|0;l=w+36|0;f=w+40|0;h=w+44|0;d=w+48|0;p=w+52|0;v=w+56|0;m=w+60|0;b=0;r=pe[y>>2]|0;while(1){t=0;do{P=mt(g,S)|0;y=t<<1;E=w+(y<<2)|0;pe[E>>2]=(pe[E>>2]|0)+(pe[x+(P<<2)>>2]|0)&3;y=w+((y|1)<<2)|0;pe[y>>2]=(pe[y>>2]|0)+(pe[T+(P<<2)>>2]|0)&3;t=t+1|0}while((t|0)!=8);pe[r>>2]=(ve[1725+(pe[i>>2]|0)>>0]|0)<<2|(ve[1725+(pe[w>>2]|0)>>0]|0)|(ve[1725+(pe[n>>2]|0)>>0]|0)<<4|(ve[1725+(pe[e>>2]|0)>>0]|0)<<6|(ve[1725+(pe[o>>2]|0)>>0]|0)<<8|(ve[1725+(pe[a>>2]|0)>>0]|0)<<10|(ve[1725+(pe[s>>2]|0)>>0]|0)<<12|(ve[1725+(pe[u>>2]|0)>>0]|0)<<14|(ve[1725+(pe[c>>2]|0)>>0]|0)<<16|(ve[1725+(pe[l>>2]|0)>>0]|0)<<18|(ve[1725+(pe[f>>2]|0)>>0]|0)<<20|(ve[1725+(pe[h>>2]|0)>>0]|0)<<22|(ve[1725+(pe[d>>2]|0)>>0]|0)<<24|(ve[1725+(pe[p>>2]|0)>>0]|0)<<26|(ve[1725+(pe[v>>2]|0)>>0]|0)<<28|(ve[1725+(pe[m>>2]|0)>>0]|0)<<30;b=b+1|0;if((b|0)==(_|0)){t=1;break}else r=r+4|0}}}while(0)}else t=0;ft(S);E=t;be=M;return E|0}function At(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0;h=be;be=be+560|0;u=h+16|0;s=h;a=h+48|0;f=h+24|0;n=pe[e+88>>2]|0;l=(ve[n+55>>0]|0)<<8|(ve[n+56>>0]|0);c=e+92|0;t=pe[e+4>>2]|0;r=(ve[n+50>>0]|0)<<8|(ve[n+49>>0]|0)<<16|(ve[n+51>>0]|0);i=t+r|0;n=(ve[n+53>>0]|0)<<8|(ve[n+52>>0]|0)<<16|(ve[n+54>>0]|0);if(!n){f=0;be=h;return f|0}pe[c>>2]=i;pe[e+96>>2]=i;pe[e+104>>2]=n;pe[e+100>>2]=t+(n+r);pe[e+108>>2]=0;pe[e+112>>2]=0;pe[f+20>>2]=0;pe[f>>2]=0;pe[f+4>>2]=0;pe[f+8>>2]=0;pe[f+12>>2]=0;de[f+16>>0]=0;e:do{if(pt(c,f)|0){o=e+268|0;r=e+272|0;t=pe[r>>2]|0;if((t|0)!=(l|0)){if(t>>>0<=l>>>0){do{if((pe[e+276>>2]|0)>>>0<l>>>0)if(nt(o,l,(t+1|0)==(l|0),2,0)|0){t=pe[r>>2]|0;break}else{de[e+280>>0]=1;t=0;break e}}while(0);Yr((pe[o>>2]|0)+(t<<1)|0,0,l-t<<1|0)|0}pe[r>>2]=l}if(!l){pe[s>>2]=1154;pe[s+4>>2]=903;pe[s+8>>2]=1781;_r(a,1100,s)|0;gr(a,u)|0;t=1;break}r=0;i=0;n=0;t=pe[o>>2]|0;while(1){u=mt(c,f)|0;r=u+r&255;i=(mt(c,f)|0)+i&255;$[t>>1]=i<<8|r;n=n+1|0;if((n|0)==(l|0)){t=1;break}else t=t+2|0}}else t=0}while(0);ft(f);f=t;be=h;return f|0}function Ot(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0,g=0,_=0,w=0,x=0,T=0,S=0,M=0,P=0,E=0;M=be;be=be+2432|0;s=M+16|0;a=M;o=M+1912|0;S=M+1888|0;x=M+988|0;T=M+88|0;w=M+24|0;n=pe[e+88>>2]|0;_=(ve[n+63>>0]|0)<<8|(ve[n+64>>0]|0);g=e+92|0;t=pe[e+4>>2]|0;r=(ve[n+58>>0]|0)<<8|(ve[n+57>>0]|0)<<16|(ve[n+59>>0]|0);i=t+r|0;n=(ve[n+61>>0]|0)<<8|(ve[n+60>>0]|0)<<16|(ve[n+62>>0]|0);if(!n){S=0;be=M;return S|0}pe[g>>2]=i;pe[e+96>>2]=i;pe[e+104>>2]=n;pe[e+100>>2]=t+(n+r);pe[e+108>>2]=0;pe[e+112>>2]=0;pe[S+20>>2]=0;pe[S>>2]=0;pe[S+4>>2]=0;pe[S+8>>2]=0;pe[S+12>>2]=0;de[S+16>>0]=0;if(pt(g,S)|0){r=0;i=-7;n=-7;while(1){pe[x+(r<<2)>>2]=i;pe[T+(r<<2)>>2]=n;t=(i|0)>6;r=r+1|0;if((r|0)==225)break;else{i=t?-7:i+1|0;n=(t&1)+n|0}}t=w;r=t+64|0;do{pe[t>>2]=0;t=t+4|0}while((t|0)<(r|0));y=e+284|0;r=_*3|0;i=e+288|0;t=pe[i>>2]|0;e:do{if((t|0)==(r|0))u=13;else{if(t>>>0<=r>>>0){do{if((pe[e+292>>2]|0)>>>0<r>>>0)if(nt(y,r,(t+1|0)==(r|0),2,0)|0){t=pe[i>>2]|0;break}else{de[e+296>>0]=1;t=0;break e}}while(0);Yr((pe[y>>2]|0)+(t<<1)|0,0,r-t<<1|0)|0}pe[i>>2]=r;u=13}}while(0);do{if((u|0)==13){if(!_){pe[a>>2]=1154;pe[a+4>>2]=903;pe[a+8>>2]=1781;_r(o,1100,a)|0;gr(o,s)|0;t=1;break}i=w+4|0;n=w+8|0;e=w+12|0;o=w+16|0;a=w+20|0;s=w+24|0;u=w+28|0;c=w+32|0;l=w+36|0;f=w+40|0;h=w+44|0;d=w+48|0;p=w+52|0;v=w+56|0;m=w+60|0;b=0;r=pe[y>>2]|0;while(1){t=0;do{P=mt(g,S)|0;y=t<<1;E=w+(y<<2)|0;pe[E>>2]=(pe[E>>2]|0)+(pe[x+(P<<2)>>2]|0)&7;y=w+((y|1)<<2)|0;pe[y>>2]=(pe[y>>2]|0)+(pe[T+(P<<2)>>2]|0)&7;t=t+1|0}while((t|0)!=8);P=ve[1729+(pe[a>>2]|0)>>0]|0;$[r>>1]=(ve[1729+(pe[i>>2]|0)>>0]|0)<<3|(ve[1729+(pe[w>>2]|0)>>0]|0)|(ve[1729+(pe[n>>2]|0)>>0]|0)<<6|(ve[1729+(pe[e>>2]|0)>>0]|0)<<9|(ve[1729+(pe[o>>2]|0)>>0]|0)<<12|P<<15;E=ve[1729+(pe[f>>2]|0)>>0]|0;$[r+2>>1]=(ve[1729+(pe[s>>2]|0)>>0]|0)<<2|P>>>1|(ve[1729+(pe[u>>2]|0)>>0]|0)<<5|(ve[1729+(pe[c>>2]|0)>>0]|0)<<8|(ve[1729+(pe[l>>2]|0)>>0]|0)<<11|E<<14;$[r+4>>1]=(ve[1729+(pe[h>>2]|0)>>0]|0)<<1|E>>>2|(ve[1729+(pe[d>>2]|0)>>0]|0)<<4|(ve[1729+(pe[p>>2]|0)>>0]|0)<<7|(ve[1729+(pe[v>>2]|0)>>0]|0)<<10|(ve[1729+(pe[m>>2]|0)>>0]|0)<<13;b=b+1|0;if((b|0)==(_|0)){t=1;break}else r=r+6|0}}}while(0)}else t=0;ft(S);E=t;be=M;return E|0}function It(e,t,r,i,n,o,a,s){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;a=a|0;s=s|0;var u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0,g=0,_=0,w=0,x=0,T=0,S=0,M=0,P=0,E=0,k=0,C=0,A=0,O=0,I=0,R=0,D=0,L=0,j=0,F=0,B=0,N=0,U=0,z=0,X=0,W=0,q=0,H=0,G=0,V=0,Y=0,J=0,K=0,Z=0,Q=0,$=0,ee=0,te=0,re=0,ie=0,ne=0,oe=0,ae=0,se=0,ue=0,ce=0,le=0,fe=0,he=0;le=be;be=be+720|0;ce=le+184|0;se=le+168|0;ae=le+160|0;oe=le+144|0;ne=le+136|0;ie=le+120|0;re=le+112|0;ee=le+96|0;$=le+88|0;Q=le+72|0;Z=le+64|0;K=le+48|0;J=le+40|0;ue=le+24|0;te=le+16|0;Y=le;G=le+208|0;V=le+192|0;N=e+240|0;U=pe[N>>2]|0;W=e+256|0;q=pe[W>>2]|0;r=de[(pe[e+88>>2]|0)+17>>0]|0;H=i>>>2;if(!(r<<24>>24)){be=le;return 1}z=(s|0)==0;X=s+-1|0;I=(o&1|0)!=0;R=i<<1;D=e+92|0;L=e+116|0;j=e+140|0;F=e+236|0;B=a+-1|0;O=(n&1|0)!=0;A=e+188|0;M=e+252|0;P=H+1|0;E=H+2|0;k=H+3|0;C=B<<4;T=r&255;r=0;o=0;n=1;S=0;do{if(!z){w=pe[t+(S<<2)>>2]|0;x=0;while(1){y=x&1;u=(y|0)==0;b=(y<<5^32)+-16|0;y=(y<<1^2)+-1|0;_=u?a:-1;c=u?0:B;e=(x|0)==(X|0);g=I&e;if((c|0)!=(_|0)){m=I&e^1;v=u?w:w+C|0;while(1){if((n|0)==1)n=mt(D,L)|0|512;p=n&7;n=n>>>3;u=ve[1823+p>>0]|0;e=0;do{h=(mt(D,j)|0)+o|0;d=h-U|0;o=d>>31;o=o&h|d&~o;if((pe[N>>2]|0)>>>0<=o>>>0){pe[Y>>2]=1154;pe[Y+4>>2]=903;pe[Y+8>>2]=1781;_r(G,1100,Y)|0;gr(G,te)|0}pe[V+(e<<2)>>2]=pe[(pe[F>>2]|0)+(o<<2)>>2];e=e+1|0}while(e>>>0<u>>>0);d=O&(c|0)==(B|0);if(g|d){h=0;do{l=ye(h,i)|0;e=v+l|0;u=(h|0)==0|m;f=h<<1;he=(mt(D,A)|0)+r|0;fe=he-q|0;r=fe>>31;r=r&he|fe&~r;do{if(d){if(!u){fe=(mt(D,A)|0)+r|0;he=fe-q|0;r=he>>31;r=r&fe|he&~r;break}pe[e>>2]=pe[V+((ve[1831+(p<<2)+f>>0]|0)<<2)>>2];if((pe[W>>2]|0)>>>0<=r>>>0){pe[oe>>2]=1154;pe[oe+4>>2]=903;pe[oe+8>>2]=1781;_r(G,1100,oe)|0;gr(G,ae)|0}pe[v+(l+4)>>2]=pe[(pe[M>>2]|0)+(r<<2)>>2];fe=(mt(D,A)|0)+r|0;he=fe-q|0;r=he>>31;r=r&fe|he&~r}else{if(!u){fe=(mt(D,A)|0)+r|0;he=fe-q|0;r=he>>31;r=r&fe|he&~r;break}pe[e>>2]=pe[V+((ve[1831+(p<<2)+f>>0]|0)<<2)>>2];if((pe[W>>2]|0)>>>0<=r>>>0){pe[ie>>2]=1154;pe[ie+4>>2]=903;pe[ie+8>>2]=1781;_r(G,1100,ie)|0;gr(G,ne)|0}pe[v+(l+4)>>2]=pe[(pe[M>>2]|0)+(r<<2)>>2];fe=(mt(D,A)|0)+r|0;he=fe-q|0;r=he>>31;r=r&fe|he&~r;pe[v+(l+8)>>2]=pe[V+((ve[(f|1)+(1831+(p<<2))>>0]|0)<<2)>>2];if((pe[W>>2]|0)>>>0<=r>>>0){pe[se>>2]=1154;pe[se+4>>2]=903;pe[se+8>>2]=1781;_r(G,1100,se)|0;gr(G,ce)|0}pe[v+(l+12)>>2]=pe[(pe[M>>2]|0)+(r<<2)>>2]}}while(0);h=h+1|0}while((h|0)!=2)}else{pe[v>>2]=pe[V+((ve[1831+(p<<2)>>0]|0)<<2)>>2];fe=(mt(D,A)|0)+r|0;he=fe-q|0;r=he>>31;r=r&fe|he&~r;if((pe[W>>2]|0)>>>0<=r>>>0){pe[ue>>2]=1154;pe[ue+4>>2]=903;pe[ue+8>>2]=1781;_r(G,1100,ue)|0;gr(G,J)|0}pe[v+4>>2]=pe[(pe[M>>2]|0)+(r<<2)>>2];pe[v+8>>2]=pe[V+((ve[1831+(p<<2)+1>>0]|0)<<2)>>2];fe=(mt(D,A)|0)+r|0;he=fe-q|0;r=he>>31;r=r&fe|he&~r;if((pe[W>>2]|0)>>>0<=r>>>0){pe[K>>2]=1154;pe[K+4>>2]=903;pe[K+8>>2]=1781;_r(G,1100,K)|0;gr(G,Z)|0}pe[v+12>>2]=pe[(pe[M>>2]|0)+(r<<2)>>2];pe[v+(H<<2)>>2]=pe[V+((ve[1831+(p<<2)+2>>0]|0)<<2)>>2];fe=(mt(D,A)|0)+r|0;he=fe-q|0;r=he>>31;r=r&fe|he&~r;if((pe[W>>2]|0)>>>0<=r>>>0){pe[Q>>2]=1154;pe[Q+4>>2]=903;pe[Q+8>>2]=1781;_r(G,1100,Q)|0;gr(G,$)|0}pe[v+(P<<2)>>2]=pe[(pe[M>>2]|0)+(r<<2)>>2];pe[v+(E<<2)>>2]=pe[V+((ve[1831+(p<<2)+3>>0]|0)<<2)>>2];fe=(mt(D,A)|0)+r|0;he=fe-q|0;r=he>>31;r=r&fe|he&~r;if((pe[W>>2]|0)>>>0<=r>>>0){pe[ee>>2]=1154;pe[ee+4>>2]=903;pe[ee+8>>2]=1781;_r(G,1100,ee)|0;gr(G,re)|0}pe[v+(k<<2)>>2]=pe[(pe[M>>2]|0)+(r<<2)>>2]}c=c+y|0;if((c|0)==(_|0))break;else v=v+b|0}}x=x+1|0;if((x|0)==(s|0))break;else w=w+R|0}}S=S+1|0}while((S|0)!=(T|0));be=le;return 1}function Rt(e,t,r,i,n,o,a,s){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;a=a|0;s=s|0;var u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0,g=0,_=0,w=0,x=0,T=0,S=0,M=0,P=0,E=0,k=0,C=0,A=0,O=0,I=0,R=0,D=0,L=0,j=0,F=0,B=0,N=0,U=0,z=0,X=0,W=0,q=0,H=0,G=0,V=0,Y=0,J=0,K=0,Z=0,Q=0,$=0,ee=0,te=0,re=0,ie=0,ne=0,oe=0,ae=0,se=0,ue=0,ce=0,le=0,fe=0,he=0;fe=be;be=be+640|0;ue=fe+88|0;se=fe+72|0;ae=fe+64|0;oe=fe+48|0;ne=fe+40|0;le=fe+24|0;ce=fe+16|0;ie=fe;te=fe+128|0;re=fe+112|0;ee=fe+96|0;N=e+240|0;U=pe[N>>2]|0;W=e+256|0;Z=pe[W>>2]|0;Q=e+272|0;$=pe[Q>>2]|0;r=pe[e+88>>2]|0;z=(ve[r+63>>0]|0)<<8|(ve[r+64>>0]|0);r=de[r+17>>0]|0;if(!(r<<24>>24)){be=fe;return 1}X=(s|0)==0;q=s+-1|0;H=i<<1;G=e+92|0;V=e+116|0;Y=a+-1|0;J=e+212|0;K=e+188|0;B=(n&1|0)==0;F=(o&1|0)==0;O=e+288|0;I=e+284|0;R=e+252|0;D=e+140|0;L=e+236|0;j=e+164|0;C=e+268|0;A=Y<<5;E=r&255;r=0;n=0;o=0;e=0;u=1;k=0;do{if(!X){M=pe[t+(k<<2)>>2]|0;P=0;while(1){T=P&1;c=(T|0)==0;x=(T<<6^64)+-32|0;T=(T<<1^2)+-1|0;S=c?a:-1;l=c?0:Y;if((l|0)!=(S|0)){w=F|(P|0)!=(q|0);_=c?M:M+A|0;while(1){if((u|0)==1)u=mt(G,V)|0|512;g=u&7;u=u>>>3;f=ve[1823+g>>0]|0;c=0;do{b=(mt(G,j)|0)+n|0;y=b-$|0;n=y>>31;n=n&b|y&~n;if((pe[Q>>2]|0)>>>0<=n>>>0){pe[ie>>2]=1154;pe[ie+4>>2]=903;pe[ie+8>>2]=1781;_r(te,1100,ie)|0;gr(te,ce)|0}pe[ee+(c<<2)>>2]=me[(pe[C>>2]|0)+(n<<1)>>1];c=c+1|0}while(c>>>0<f>>>0);c=0;do{b=(mt(G,D)|0)+e|0;y=b-U|0;e=y>>31;e=e&b|y&~e;if((pe[N>>2]|0)>>>0<=e>>>0){pe[le>>2]=1154;pe[le+4>>2]=903;pe[le+8>>2]=1781;_r(te,1100,le)|0;gr(te,ne)|0}pe[re+(c<<2)>>2]=pe[(pe[L>>2]|0)+(e<<2)>>2];c=c+1|0}while(c>>>0<f>>>0);y=B|(l|0)!=(Y|0);m=0;b=_;while(1){v=w|(m|0)==0;p=m<<1;h=0;d=b;while(1){f=(mt(G,J)|0)+r|0;c=f-z|0;r=c>>31;r=r&f|c&~r;c=(mt(G,K)|0)+o|0;f=c-Z|0;o=f>>31;o=o&c|f&~o;if((y|(h|0)==0)&v){c=ve[h+p+(1831+(g<<2))>>0]|0;f=r*3|0;if((pe[O>>2]|0)>>>0<=f>>>0){pe[oe>>2]=1154;pe[oe+4>>2]=903;pe[oe+8>>2]=1781;_r(te,1100,oe)|0;gr(te,ae)|0}he=pe[I>>2]|0;pe[d>>2]=(me[he+(f<<1)>>1]|0)<<16|pe[ee+(c<<2)>>2];pe[d+4>>2]=(me[he+(f+2<<1)>>1]|0)<<16|(me[he+(f+1<<1)>>1]|0);pe[d+8>>2]=pe[re+(c<<2)>>2];if((pe[W>>2]|0)>>>0<=o>>>0){pe[se>>2]=1154;pe[se+4>>2]=903;pe[se+8>>2]=1781;_r(te,1100,se)|0;gr(te,ue)|0}pe[d+12>>2]=pe[(pe[R>>2]|0)+(o<<2)>>2]}h=h+1|0;if((h|0)==2)break;else d=d+16|0}m=m+1|0;if((m|0)==2)break;else b=b+i|0}l=l+T|0;if((l|0)==(S|0))break;else _=_+x|0}}P=P+1|0;if((P|0)==(s|0))break;else M=M+H|0}}k=k+1|0}while((k|0)!=(E|0));be=fe;return 1}function Dt(e,t,r,i,n,o,a,s){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;a=a|0;s=s|0;var u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0,g=0,_=0,w=0,x=0,T=0,S=0,M=0,P=0,E=0,k=0,C=0,A=0,O=0,I=0,R=0,D=0,L=0,j=0,F=0,B=0,N=0,U=0,z=0,X=0,W=0,q=0,H=0,G=0,V=0,Y=0,J=0,K=0,Z=0;Z=be;be=be+608|0;Y=Z+64|0;V=Z+48|0;G=Z+40|0;K=Z+24|0;J=Z+16|0;H=Z;q=Z+88|0;W=Z+72|0;R=e+272|0;D=pe[R>>2]|0;r=pe[e+88>>2]|0;L=(ve[r+63>>0]|0)<<8|(ve[r+64>>0]|0);r=de[r+17>>0]|0;if(!(r<<24>>24)){be=Z;return 1}j=(s|0)==0;F=s+-1|0;B=i<<1;N=e+92|0;U=e+116|0;z=a+-1|0;X=e+212|0;I=(o&1|0)==0;C=e+288|0;A=e+284|0;O=e+164|0;E=e+268|0;k=z<<4;P=r&255;M=(n&1|0)!=0;r=0;o=0;e=1;S=0;do{if(!j){x=pe[t+(S<<2)>>2]|0;T=0;while(1){_=T&1;n=(_|0)==0;g=(_<<5^32)+-16|0;_=(_<<1^2)+-1|0;w=n?a:-1;u=n?0:z;if((u|0)!=(w|0)){y=I|(T|0)!=(F|0);b=n?x:x+k|0;while(1){if((e|0)==1)e=mt(N,U)|0|512;m=e&7;e=e>>>3;c=ve[1823+m>>0]|0;n=0;do{p=(mt(N,O)|0)+o|0;v=p-D|0;o=v>>31;o=o&p|v&~o;if((pe[R>>2]|0)>>>0<=o>>>0){pe[H>>2]=1154;pe[H+4>>2]=903;pe[H+8>>2]=1781;_r(q,1100,H)|0;gr(q,J)|0}pe[W+(n<<2)>>2]=me[(pe[E>>2]|0)+(o<<1)>>1];n=n+1|0}while(n>>>0<c>>>0);v=(u|0)==(z|0)&M;d=0;p=b;while(1){h=y|(d|0)==0;f=d<<1;n=(mt(N,X)|0)+r|0;l=n-L|0;c=l>>31;c=c&n|l&~c;if(h){r=ve[1831+(m<<2)+f>>0]|0;n=c*3|0;if((pe[C>>2]|0)>>>0<=n>>>0){pe[K>>2]=1154;pe[K+4>>2]=903;pe[K+8>>2]=1781;_r(q,1100,K)|0;gr(q,G)|0}l=pe[A>>2]|0;pe[p>>2]=(me[l+(n<<1)>>1]|0)<<16|pe[W+(r<<2)>>2];pe[p+4>>2]=(me[l+(n+2<<1)>>1]|0)<<16|(me[l+(n+1<<1)>>1]|0)}l=p+8|0;n=(mt(N,X)|0)+c|0;c=n-L|0;r=c>>31;r=r&n|c&~r;if(!(v|h^1)){n=ve[(f|1)+(1831+(m<<2))>>0]|0;c=r*3|0;if((pe[C>>2]|0)>>>0<=c>>>0){pe[V>>2]=1154;pe[V+4>>2]=903;pe[V+8>>2]=1781;_r(q,1100,V)|0;gr(q,Y)|0}h=pe[A>>2]|0;pe[l>>2]=(me[h+(c<<1)>>1]|0)<<16|pe[W+(n<<2)>>2];pe[p+12>>2]=(me[h+(c+2<<1)>>1]|0)<<16|(me[h+(c+1<<1)>>1]|0)}d=d+1|0;if((d|0)==2)break;else p=p+i|0}u=u+_|0;if((u|0)==(w|0))break;else b=b+g|0}}T=T+1|0;if((T|0)==(s|0))break;else x=x+B|0}}S=S+1|0}while((S|0)!=(P|0));be=Z;return 1}function Lt(e,t,r,i,n,o,a,s){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;a=a|0;s=s|0;var u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0,g=0,_=0,w=0,x=0,T=0,S=0,M=0,P=0,E=0,k=0,C=0,A=0,O=0,I=0,R=0,D=0,L=0,j=0,F=0,B=0,N=0,U=0,z=0,X=0,W=0,q=0,H=0,G=0,V=0,Y=0,J=0,K=0,Z=0,Q=0,$=0,ee=0,te=0,re=0,ie=0,ne=0,oe=0,ae=0;ae=be;be=be+640|0;ie=ae+88|0;re=ae+72|0;te=ae+64|0;ee=ae+48|0;$=ae+40|0;oe=ae+24|0;ne=ae+16|0;Q=ae;Z=ae+128|0;J=ae+112|0;K=ae+96|0;N=e+272|0;U=pe[N>>2]|0;r=pe[e+88>>2]|0;z=(ve[r+63>>0]|0)<<8|(ve[r+64>>0]|0);r=de[r+17>>0]|0;if(!(r<<24>>24)){be=ae;return 1}X=(s|0)==0;W=s+-1|0;q=i<<1;H=e+92|0;G=e+116|0;V=a+-1|0;Y=e+212|0;B=(n&1|0)==0;F=(o&1|0)==0;D=e+288|0;L=e+284|0;j=e+164|0;I=e+268|0;R=V<<5;A=r&255;r=0;n=0;o=0;e=0;u=1;O=0;do{if(!X){k=pe[t+(O<<2)>>2]|0;C=0;while(1){P=C&1;c=(P|0)==0;M=(P<<6^64)+-32|0;P=(P<<1^2)+-1|0;E=c?a:-1;l=c?0:V;if((l|0)!=(E|0)){S=F|(C|0)!=(W|0);T=c?k:k+R|0;while(1){if((u|0)==1)u=mt(H,G)|0|512;x=u&7;u=u>>>3;f=ve[1823+x>>0]|0;c=0;do{_=(mt(H,j)|0)+e|0;w=_-U|0;e=w>>31;e=e&_|w&~e;if((pe[N>>2]|0)>>>0<=e>>>0){pe[Q>>2]=1154;pe[Q+4>>2]=903;pe[Q+8>>2]=1781;_r(Z,1100,Q)|0;gr(Z,ne)|0}pe[J+(c<<2)>>2]=me[(pe[I>>2]|0)+(e<<1)>>1];c=c+1|0}while(c>>>0<f>>>0);c=0;do{_=(mt(H,j)|0)+n|0;w=_-U|0;n=w>>31;n=n&_|w&~n;if((pe[N>>2]|0)>>>0<=n>>>0){pe[oe>>2]=1154;pe[oe+4>>2]=903;pe[oe+8>>2]=1781;_r(Z,1100,oe)|0;gr(Z,$)|0}pe[K+(c<<2)>>2]=me[(pe[I>>2]|0)+(n<<1)>>1];c=c+1|0}while(c>>>0<f>>>0);w=B|(l|0)!=(V|0);g=0;_=T;while(1){y=S|(g|0)==0;b=g<<1;v=0;m=_;while(1){p=(mt(H,Y)|0)+o|0;d=p-z|0;o=d>>31;o=o&p|d&~o;d=(mt(H,Y)|0)+r|0;p=d-z|0;r=p>>31;r=r&d|p&~r;if((w|(v|0)==0)&y){d=ve[v+b+(1831+(x<<2))>>0]|0;p=o*3|0;c=pe[D>>2]|0;if(c>>>0<=p>>>0){pe[ee>>2]=1154;pe[ee+4>>2]=903;pe[ee+8>>2]=1781;_r(Z,1100,ee)|0;gr(Z,te)|0;c=pe[D>>2]|0}f=pe[L>>2]|0;h=r*3|0;if(c>>>0>h>>>0)c=f;else{pe[re>>2]=1154;pe[re+4>>2]=903;pe[re+8>>2]=1781;_r(Z,1100,re)|0;gr(Z,ie)|0;c=pe[L>>2]|0}pe[m>>2]=(me[f+(p<<1)>>1]|0)<<16|pe[J+(d<<2)>>2];pe[m+4>>2]=(me[f+(p+2<<1)>>1]|0)<<16|(me[f+(p+1<<1)>>1]|0);pe[m+8>>2]=(me[c+(h<<1)>>1]|0)<<16|pe[K+(d<<2)>>2];pe[m+12>>2]=(me[c+(h+2<<1)>>1]|0)<<16|(me[c+(h+1<<1)>>1]|0)}v=v+1|0;if((v|0)==2)break;else m=m+16|0}g=g+1|0;if((g|0)==2)break;else _=_+i|0}l=l+P|0;if((l|0)==(E|0))break;else T=T+M|0}}C=C+1|0;if((C|0)==(s|0))break;else k=k+q|0}}O=O+1|0}while((O|0)!=(A|0));be=ae;return 1}function jt(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0;h=be;be=be+608|0;f=h+88|0;l=h+72|0;u=h+64|0;s=h+48|0;o=h+40|0;a=h+24|0;n=h+16|0;i=h;c=h+96|0;pe[e>>2]=0;t=e+284|0;r=pe[t>>2]|0;if(r){if(!(r&7))Ri[pe[104>>2]&1](r,0,0,1,pe[27]|0)|0;else{pe[i>>2]=1154;pe[i+4>>2]=2499;pe[i+8>>2]=1516;_r(c,1100,i)|0;gr(c,n)|0}pe[t>>2]=0;pe[e+288>>2]=0;pe[e+292>>2]=0}de[e+296>>0]=0;t=e+268|0;r=pe[t>>2]|0;if(r){if(!(r&7))Ri[pe[104>>2]&1](r,0,0,1,pe[27]|0)|0;else{pe[a>>2]=1154;pe[a+4>>2]=2499;pe[a+8>>2]=1516;_r(c,1100,a)|0;gr(c,o)|0}pe[t>>2]=0;pe[e+272>>2]=0;pe[e+276>>2]=0}de[e+280>>0]=0;t=e+252|0;r=pe[t>>2]|0;if(r){if(!(r&7))Ri[pe[104>>2]&1](r,0,0,1,pe[27]|0)|0;else{pe[s>>2]=1154;pe[s+4>>2]=2499;pe[s+8>>2]=1516;_r(c,1100,s)|0;gr(c,u)|0}pe[t>>2]=0;pe[e+256>>2]=0;pe[e+260>>2]=0}de[e+264>>0]=0;t=e+236|0;r=pe[t>>2]|0;if(!r){f=e+248|0;de[f>>0]=0;f=e+212|0;ft(f);f=e+188|0;ft(f);f=e+164|0;ft(f);f=e+140|0;ft(f);f=e+116|0;ft(f);be=h;return}if(!(r&7))Ri[pe[104>>2]&1](r,0,0,1,pe[27]|0)|0;else{pe[l>>2]=1154;pe[l+4>>2]=2499;pe[l+8>>2]=1516;_r(c,1100,l)|0;gr(c,f)|0}pe[t>>2]=0;pe[e+240>>2]=0;pe[e+244>>2]=0;f=e+248|0;de[f>>0]=0;f=e+212|0;ft(f);f=e+188|0;ft(f);f=e+164|0;ft(f);f=e+140|0;ft(f);f=e+116|0;ft(f);be=h;return}function Ft(e,t){e=e|0;t=t|0;var r=0;r=be;be=be+16|0;pe[r>>2]=t;t=pe[63]|0;wr(t,e,r)|0;br(10,t)|0;Xe()}function Bt(){var e=0,t=0;e=be;be=be+16|0;if(!(je(200,2)|0)){t=De(pe[49]|0)|0;be=e;return t|0}else Ft(2090,e);return 0}function Nt(e){e=e|0;zr(e);return}function Ut(e){e=e|0;var t=0;t=be;be=be+16|0;Oi[e&3]();Ft(2139,t)}function zt(){var e=0,t=0;e=Bt()|0;if(((e|0)!=0?(t=pe[e>>2]|0,(t|0)!=0):0)?(e=t+48|0,(pe[e>>2]&-256|0)==1126902528?(pe[e+4>>2]|0)==1129074247:0):0)Ut(pe[t+12>>2]|0);t=pe[28]|0;pe[28]=t+0;Ut(t)}function Xt(e){e=e|0;return}function Wt(e){e=e|0;return}function qt(e){e=e|0;return}function Ht(e){e=e|0;return}function Gt(e){e=e|0;Nt(e);return}function Vt(e){e=e|0;Nt(e);return}function Yt(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0,a=0;a=be;be=be+64|0;o=a;if((e|0)!=(t|0))if((t|0)!=0?(n=Qt(t,24,40,0)|0,(n|0)!=0):0){t=o;i=t+56|0;do{pe[t>>2]=0;t=t+4|0}while((t|0)<(i|0));pe[o>>2]=n;pe[o+8>>2]=e;pe[o+12>>2]=-1;pe[o+48>>2]=1;Di[pe[(pe[n>>2]|0)+28>>2]&3](n,o,pe[r>>2]|0,1);if((pe[o+24>>2]|0)==1){pe[r>>2]=pe[o+16>>2];t=1}else t=0}else t=0;else t=1;be=a;return t|0}function Jt(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0;e=t+16|0;n=pe[e>>2]|0;do{if(n){if((n|0)!=(r|0)){i=t+36|0;pe[i>>2]=(pe[i>>2]|0)+1;pe[t+24>>2]=2;de[t+54>>0]=1;break}e=t+24|0;if((pe[e>>2]|0)==2)pe[e>>2]=i}else{pe[e>>2]=r;pe[t+24>>2]=i;pe[t+36>>2]=1}}while(0);return}function Kt(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;if((e|0)==(pe[t+8>>2]|0))Jt(0,t,r,i);return}function Zt(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;if((e|0)==(pe[t+8>>2]|0))Jt(0,t,r,i);else{e=pe[e+8>>2]|0;Di[pe[(pe[e>>2]|0)+28>>2]&3](e,t,r,i)}return}function Qt(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0;d=be;be=be+64|0;h=d;f=pe[e>>2]|0;l=e+(pe[f+-8>>2]|0)|0;f=pe[f+-4>>2]|0;pe[h>>2]=r;pe[h+4>>2]=e;pe[h+8>>2]=t;pe[h+12>>2]=i;i=h+16|0;e=h+20|0;t=h+24|0;n=h+28|0;o=h+32|0;a=h+40|0;s=(f|0)==(r|0);u=i;c=u+36|0;do{pe[u>>2]=0;u=u+4|0}while((u|0)<(c|0));$[i+36>>1]=0;de[i+38>>0]=0;e:do{if(s){pe[h+48>>2]=1;Ii[pe[(pe[r>>2]|0)+20>>2]&3](r,h,l,l,1,0);i=(pe[t>>2]|0)==1?l:0}else{Ei[pe[(pe[f>>2]|0)+24>>2]&3](f,h,l,1,0);switch(pe[h+36>>2]|0){case 0:{i=(pe[a>>2]|0)==1&(pe[n>>2]|0)==1&(pe[o>>2]|0)==1?pe[e>>2]|0:0;break e}case 1:break;default:{i=0;break e}}if((pe[t>>2]|0)!=1?!((pe[a>>2]|0)==0&(pe[n>>2]|0)==1&(pe[o>>2]|0)==1):0){i=0;break}i=pe[i>>2]|0}}while(0);be=d;return i|0}function $t(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;de[t+53>>0]=1;do{if((pe[t+4>>2]|0)==(i|0)){de[t+52>>0]=1;i=t+16|0;e=pe[i>>2]|0;if(!e){pe[i>>2]=r;pe[t+24>>2]=n;pe[t+36>>2]=1;if(!((n|0)==1?(pe[t+48>>2]|0)==1:0))break;de[t+54>>0]=1;break}if((e|0)!=(r|0)){n=t+36|0;pe[n>>2]=(pe[n>>2]|0)+1;de[t+54>>0]=1;break}e=t+24|0;i=pe[e>>2]|0;if((i|0)==2){pe[e>>2]=n;i=n}if((i|0)==1?(pe[t+48>>2]|0)==1:0)de[t+54>>0]=1}}while(0);return}function er(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0,a=0,s=0,u=0;e:do{if((e|0)==(pe[t+8>>2]|0)){if((pe[t+4>>2]|0)==(r|0)?(o=t+28|0,(pe[o>>2]|0)!=1):0)pe[o>>2]=i}else{if((e|0)!=(pe[t>>2]|0)){s=pe[e+8>>2]|0;Ei[pe[(pe[s>>2]|0)+24>>2]&3](s,t,r,i,n);break}if((pe[t+16>>2]|0)!=(r|0)?(a=t+20|0,(pe[a>>2]|0)!=(r|0)):0){pe[t+32>>2]=i;i=t+44|0;if((pe[i>>2]|0)==4)break;o=t+52|0;de[o>>0]=0;u=t+53|0;de[u>>0]=0;e=pe[e+8>>2]|0;Ii[pe[(pe[e>>2]|0)+20>>2]&3](e,t,r,r,1,n);if(de[u>>0]|0){if(!(de[o>>0]|0)){o=1;s=13}}else{o=0;s=13}do{if((s|0)==13){pe[a>>2]=r;u=t+40|0;pe[u>>2]=(pe[u>>2]|0)+1;if((pe[t+36>>2]|0)==1?(pe[t+24>>2]|0)==2:0){de[t+54>>0]=1;if(o)break}else s=16;if((s|0)==16?o:0)break;pe[i>>2]=4;break e}}while(0);pe[i>>2]=3;break}if((i|0)==1)pe[t+32>>2]=1}}while(0);return}function tr(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0,a=0;do{if((e|0)==(pe[t+8>>2]|0)){if((pe[t+4>>2]|0)==(r|0)?(a=t+28|0,(pe[a>>2]|0)!=1):0)pe[a>>2]=i}else if((e|0)==(pe[t>>2]|0)){if((pe[t+16>>2]|0)!=(r|0)?(o=t+20|0,(pe[o>>2]|0)!=(r|0)):0){pe[t+32>>2]=i;pe[o>>2]=r;n=t+40|0;pe[n>>2]=(pe[n>>2]|0)+1;if((pe[t+36>>2]|0)==1?(pe[t+24>>2]|0)==2:0)de[t+54>>0]=1;pe[t+44>>2]=4;break}if((i|0)==1)pe[t+32>>2]=1}}while(0);return}function rr(e,t,r,i,n,o){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;if((e|0)==(pe[t+8>>2]|0))$t(0,t,r,i,n);else{e=pe[e+8>>2]|0;Ii[pe[(pe[e>>2]|0)+20>>2]&3](e,t,r,i,n,o)}return}function ir(e,t,r,i,n,o){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;if((e|0)==(pe[t+8>>2]|0))$t(0,t,r,i,n);return}function nr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0;n=be;be=be+16|0;i=n;pe[i>>2]=pe[r>>2];e=Pi[pe[(pe[e>>2]|0)+16>>2]&7](e,t,i)|0;if(e)pe[r>>2]=pe[i>>2];be=n;return e&1|0}function or(e){e=e|0;if(!e)e=0;else e=(Qt(e,24,72,0)|0)!=0;return e&1|0}function ar(){var e=0,t=0,r=0,i=0,n=0,o=0,a=0,s=0;n=be;be=be+48|0;a=n+32|0;r=n+24|0;s=n+16|0;o=n;n=n+36|0;e=Bt()|0;if((e|0)!=0?(i=pe[e>>2]|0,(i|0)!=0):0){e=i+48|0;t=pe[e>>2]|0;e=pe[e+4>>2]|0;if(!((t&-256|0)==1126902528&(e|0)==1129074247)){pe[r>>2]=pe[51];Ft(2368,r)}if((t|0)==1126902529&(e|0)==1129074247)e=pe[i+44>>2]|0;else e=i+80|0;pe[n>>2]=e;i=pe[i>>2]|0;e=pe[i+4>>2]|0;if(Pi[pe[(pe[8>>2]|0)+16>>2]&7](8,i,n)|0){s=pe[n>>2]|0;n=pe[51]|0;s=Ci[pe[(pe[s>>2]|0)+8>>2]&1](s)|0;pe[o>>2]=n;pe[o+4>>2]=e;pe[o+8>>2]=s;Ft(2282,o)}else{pe[s>>2]=pe[51];pe[s+4>>2]=e;Ft(2327,s)}}Ft(2406,a)}function sr(){var e=0;e=be;be=be+16|0;if(!(Fe(196,6)|0)){be=e;return}else Ft(2179,e)}function ur(e){e=e|0;var t=0;t=be;be=be+16|0;zr(e);if(!(Ue(pe[49]|0,0)|0)){be=t;return}else Ft(2229,t)}function cr(e){e=e|0;var t=0,r=0;t=0;while(1){if((ve[2427+t>>0]|0)==(e|0)){r=2;break}t=t+1|0;if((t|0)==87){t=87;e=2515;r=5;break}}if((r|0)==2)if(!t)e=2515;else{e=2515;r=5}if((r|0)==5)while(1){r=e;while(1){e=r+1|0;if(!(de[r>>0]|0))break;else r=e}t=t+-1|0;if(!t)break;else r=5}return e|0}function lr(){var e=0;if(!(pe[52]|0))e=264;else{e=(Le()|0)+60|0;e=pe[e>>2]|0}return e|0}function fr(e){e=e|0;var t=0;if(e>>>0>4294963200){t=lr()|0;pe[t>>2]=0-e;e=-1}return e|0}function hr(e,t){e=+e;t=t|0;var r=0,i=0,n=0;ee[te>>3]=e;r=pe[te>>2]|0;i=pe[te+4>>2]|0;n=Jr(r|0,i|0,52)|0;n=n&2047;switch(n|0){case 0:{if(e!=0.0){e=+hr(e*18446744073709552.0e3,t);r=(pe[t>>2]|0)+-64|0}else r=0;pe[t>>2]=r;break}case 2047:break;default:{pe[t>>2]=n+-1022;pe[te>>2]=r;pe[te+4>>2]=i&-2146435073|1071644672;e=+ee[te>>3]}}return+e}function dr(e,t){e=+e;t=t|0;return+ +hr(e,t)}function pr(e,t,r){e=e|0;t=t|0;r=r|0;do{if(e){if(t>>>0<128){de[e>>0]=t;e=1;break}if(t>>>0<2048){de[e>>0]=t>>>6|192;de[e+1>>0]=t&63|128;e=2;break}if(t>>>0<55296|(t&-8192|0)==57344){de[e>>0]=t>>>12|224;de[e+1>>0]=t>>>6&63|128;de[e+2>>0]=t&63|128;e=3;break}if((t+-65536|0)>>>0<1048576){de[e>>0]=t>>>18|240;de[e+1>>0]=t>>>12&63|128;de[e+2>>0]=t>>>6&63|128;de[e+3>>0]=t&63|128;e=4;break}else{e=lr()|0;pe[e>>2]=84;e=-1;break}}else e=1}while(0);return e|0}function vr(e,t){e=e|0;t=t|0;if(!e)e=0;else e=pr(e,t,0)|0;return e|0}function mr(e){e=e|0;var t=0,r=0;do{if(e){if((pe[e+76>>2]|0)<=-1){t=Rr(e)|0;break}r=(Sr(e)|0)==0;t=Rr(e)|0;if(!r)Mr(e)}else{if(!(pe[65]|0))t=0;else t=mr(pe[65]|0)|0;ze(236);e=pe[58]|0;if(e)do{if((pe[e+76>>2]|0)>-1)r=Sr(e)|0;else r=0;if((pe[e+20>>2]|0)>>>0>(pe[e+28>>2]|0)>>>0)t=Rr(e)|0|t;if(r)Mr(e);e=pe[e+56>>2]|0}while((e|0)!=0);Be(236)}}while(0);return t|0}function br(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0;if((pe[t+76>>2]|0)>=0?(Sr(t)|0)!=0:0){if((de[t+75>>0]|0)!=(e|0)?(i=t+20|0,n=pe[i>>2]|0,n>>>0<(pe[t+16>>2]|0)>>>0):0){pe[i>>2]=n+1;de[n>>0]=e;r=e&255}else r=Pr(t,e)|0;Mr(t)}else a=3;do{if((a|0)==3){if((de[t+75>>0]|0)!=(e|0)?(o=t+20|0,r=pe[o>>2]|0,r>>>0<(pe[t+16>>2]|0)>>>0):0){pe[o>>2]=r+1;de[r>>0]=e;r=e&255;break}r=Pr(t,e)|0}}while(0);return r|0}function yr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0,a=0;i=r+16|0;n=pe[i>>2]|0;if(!n)if(!(Or(r)|0)){n=pe[i>>2]|0;o=4}else i=0;else o=4;e:do{if((o|0)==4){a=r+20|0;o=pe[a>>2]|0;if((n-o|0)>>>0<t>>>0){i=Pi[pe[r+36>>2]&7](r,e,t)|0;break}t:do{if((de[r+75>>0]|0)>-1){i=t;while(1){if(!i){n=o;i=0;break t}n=i+-1|0;if((de[e+n>>0]|0)==10)break;else i=n}if((Pi[pe[r+36>>2]&7](r,e,i)|0)>>>0<i>>>0)break e;t=t-i|0;e=e+i|0;n=pe[a>>2]|0}else{n=o;i=0}}while(0);Qr(n|0,e|0,t|0)|0;pe[a>>2]=(pe[a>>2]|0)+t;i=i+t|0}}while(0);return i|0}function gr(e,t){e=e|0;t=t|0;var r=0,i=0;r=be;be=be+16|0;i=r;pe[i>>2]=t;t=wr(pe[64]|0,e,i)|0;be=r;return t|0}function _r(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0;i=be;be=be+16|0;n=i;pe[n>>2]=r;r=Tr(e,t,n)|0;be=i;return r|0}function wr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0;v=be;be=be+224|0;f=v+120|0;p=v+80|0;d=v;h=v+136|0;i=p;n=i+40|0;do{pe[i>>2]=0;i=i+4|0}while((i|0)<(n|0));pe[f>>2]=pe[r>>2];if((Dr(0,t,f,d,p)|0)<0)r=-1;else{if((pe[e+76>>2]|0)>-1)c=Sr(e)|0;else c=0;r=pe[e>>2]|0;l=r&32;if((de[e+74>>0]|0)<1)pe[e>>2]=r&-33;r=e+48|0;if(!(pe[r>>2]|0)){n=e+44|0;o=pe[n>>2]|0;pe[n>>2]=h;a=e+28|0;pe[a>>2]=h;s=e+20|0;pe[s>>2]=h;pe[r>>2]=80;u=e+16|0;pe[u>>2]=h+80;i=Dr(e,t,f,d,p)|0;if(o){Pi[pe[e+36>>2]&7](e,0,0)|0;i=(pe[s>>2]|0)==0?-1:i;pe[n>>2]=o;pe[r>>2]=0;pe[u>>2]=0;pe[a>>2]=0;pe[s>>2]=0}}else i=Dr(e,t,f,d,p)|0;r=pe[e>>2]|0;pe[e>>2]=r|l;if(c)Mr(e);r=(r&32|0)==0?i:-1}be=v;return r|0}function xr(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,o=0,a=0,s=0,u=0,c=0,l=0;l=be;be=be+128|0;n=l+112|0;c=l;o=c;a=268;s=o+112|0;do{pe[o>>2]=pe[a>>2];o=o+4|0;a=a+4|0}while((o|0)<(s|0));if((t+-1|0)>>>0>2147483646)if(!t){t=1;u=4}else{t=lr()|0;pe[t>>2]=75;t=-1}else{n=e;u=4}if((u|0)==4){u=-2-n|0;u=t>>>0>u>>>0?u:t;pe[c+48>>2]=u;e=c+20|0;pe[e>>2]=n;pe[c+44>>2]=n;t=n+u|0;n=c+16|0;pe[n>>2]=t;pe[c+28>>2]=t;t=wr(c,r,i)|0;if(u){r=pe[e>>2]|0;de[r+(((r|0)==(pe[n>>2]|0))<<31>>31)>>0]=0}}be=l;return t|0}function Tr(e,t,r){e=e|0;t=t|0;r=r|0;return xr(e,2147483647,t,r)|0}function Sr(e){e=e|0;return 0}function Mr(e){e=e|0;return}function Pr(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,u=0;u=be;be=be+16|0;s=u;a=t&255;de[s>>0]=a;i=e+16|0;n=pe[i>>2]|0;if(!n)if(!(Or(e)|0)){n=pe[i>>2]|0;o=4}else r=-1;else o=4;do{if((o|0)==4){i=e+20|0;o=pe[i>>2]|0;if(o>>>0<n>>>0?(r=t&255,(r|0)!=(de[e+75>>0]|0)):0){pe[i>>2]=o+1;de[o>>0]=a;break}if((Pi[pe[e+36>>2]&7](e,s,1)|0)==1)r=ve[s>>0]|0;else r=-1}}while(0);be=u;return r|0}function Er(e){e=e|0;var t=0,r=0;t=be;be=be+16|0;r=t;pe[r>>2]=pe[e+60>>2];e=fr(Pe(6,r|0)|0)|0;be=t;return e|0}function kr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0;n=be;be=be+32|0;o=n;i=n+20|0;pe[o>>2]=pe[e+60>>2];pe[o+4>>2]=0;pe[o+8>>2]=t;pe[o+12>>2]=i;pe[o+16>>2]=r;if((fr(He(140,o|0)|0)|0)<0){pe[i>>2]=-1;e=-1}else e=pe[i>>2]|0;be=n;return e|0}function Cr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0;p=be;be=be+48|0;f=p+16|0;l=p;i=p+32|0;h=e+28|0;n=pe[h>>2]|0;pe[i>>2]=n;d=e+20|0;n=(pe[d>>2]|0)-n|0;pe[i+4>>2]=n;pe[i+8>>2]=t;pe[i+12>>2]=r;u=e+60|0;c=e+44|0;t=2;n=n+r|0;while(1){if(!(pe[52]|0)){pe[f>>2]=pe[u>>2];pe[f+4>>2]=i;pe[f+8>>2]=t;a=fr(Ge(146,f|0)|0)|0}else{We(7,e|0);pe[l>>2]=pe[u>>2];pe[l+4>>2]=i;pe[l+8>>2]=t;a=fr(Ge(146,l|0)|0)|0;Se(0)}if((n|0)==(a|0)){n=6;break}if((a|0)<0){n=8;break}n=n-a|0;o=pe[i+4>>2]|0;if(a>>>0<=o>>>0)if((t|0)==2){pe[h>>2]=(pe[h>>2]|0)+a;s=o;t=2}else s=o;else{s=pe[c>>2]|0;pe[h>>2]=s;pe[d>>2]=s;s=pe[i+12>>2]|0;a=a-o|0;i=i+8|0;t=t+-1|0}pe[i>>2]=(pe[i>>2]|0)+a;pe[i+4>>2]=s-a}if((n|0)==6){f=pe[c>>2]|0;pe[e+16>>2]=f+(pe[e+48>>2]|0);e=f;pe[h>>2]=e;pe[d>>2]=e}else if((n|0)==8){pe[e+16>>2]=0;pe[h>>2]=0;pe[d>>2]=0;pe[e>>2]=pe[e>>2]|32;if((t|0)==2)r=0;else r=r-(pe[i+4>>2]|0)|0}be=p;return r|0}function Ar(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0;n=be;be=be+80|0;i=n;pe[e+36>>2]=3;if((pe[e>>2]&64|0)==0?(pe[i>>2]=pe[e+60>>2],pe[i+4>>2]=21505,pe[i+8>>2]=n+12,(Me(54,i|0)|0)!=0):0)de[e+75>>0]=-1;i=Cr(e,t,r)|0;be=n;return i|0}function Or(e){e=e|0;var t=0,r=0;t=e+74|0;r=de[t>>0]|0;de[t>>0]=r+255|r;t=pe[e>>2]|0;if(!(t&8)){pe[e+8>>2]=0;pe[e+4>>2]=0;t=pe[e+44>>2]|0;pe[e+28>>2]=t;pe[e+20>>2]=t;pe[e+16>>2]=t+(pe[e+48>>2]|0);t=0}else{pe[e>>2]=t|32;t=-1}return t|0}function Ir(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0,a=0;o=t&255;i=(r|0)!=0;e:do{if(i&(e&3|0)!=0){n=t&255;while(1){if((de[e>>0]|0)==n<<24>>24){a=6;break e}e=e+1|0;r=r+-1|0;i=(r|0)!=0;if(!(i&(e&3|0)!=0)){a=5;break}}}else a=5}while(0);if((a|0)==5)if(i)a=6;else r=0;e:do{if((a|0)==6){n=t&255;if((de[e>>0]|0)!=n<<24>>24){i=ye(o,16843009)|0;t:do{if(r>>>0>3)while(1){o=pe[e>>2]^i;if((o&-2139062144^-2139062144)&o+-16843009)break;e=e+4|0;r=r+-4|0;if(r>>>0<=3){a=11;break t}}else a=11}while(0);if((a|0)==11)if(!r){r=0;break}while(1){if((de[e>>0]|0)==n<<24>>24)break e;e=e+1|0;r=r+-1|0;if(!r){r=0;break}}}}}while(0);return((r|0)!=0?e:0)|0}function Rr(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0;t=e+20|0;o=e+28|0;if((pe[t>>2]|0)>>>0>(pe[o>>2]|0)>>>0?(Pi[pe[e+36>>2]&7](e,0,0)|0,(pe[t>>2]|0)==0):0)t=-1;else{a=e+4|0;r=pe[a>>2]|0;i=e+8|0;n=pe[i>>2]|0;if(r>>>0<n>>>0)Pi[pe[e+40>>2]&7](e,r-n|0,1)|0;pe[e+16>>2]=0;pe[o>>2]=0;pe[t>>2]=0;pe[i>>2]=0;pe[a>>2]=0;t=0}return t|0}function Dr(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0,a=0,s=0,u=0,c=0.0,l=0,f=0,h=0,d=0,p=0.0,v=0,m=0,b=0,y=0,g=0,_=0,w=0,x=0,T=0,S=0,M=0,P=0,E=0,k=0,C=0,A=0,O=0,I=0,R=0,D=0,L=0,j=0,F=0,B=0,N=0,U=0,z=0,X=0,W=0,q=0,H=0,G=0,V=0,Y=0,J=0,K=0,Z=0,Q=0;Q=be;be=be+624|0;V=Q+24|0;J=Q+16|0;Y=Q+588|0;X=Q+576|0;G=Q;N=Q+536|0;Z=Q+8|0;K=Q+528|0;A=(e|0)!=0;O=N+40|0;B=O;N=N+39|0;U=Z+4|0;z=X+12|0;X=X+11|0;W=Y;q=z;H=q-W|0;I=-2-W|0;R=q+2|0;D=V+288|0;L=Y+9|0;j=L;F=Y+8|0;o=0;v=t;a=0;t=0;e:while(1){do{if((o|0)>-1)if((a|0)>(2147483647-o|0)){o=lr()|0;pe[o>>2]=75;o=-1;break}else{o=a+o|0;break}}while(0);a=de[v>>0]|0;if(!(a<<24>>24)){C=245;break}else s=v;t:while(1){switch(a<<24>>24){case 37:{a=s;C=9;break t}case 0:{a=s;break t}default:{}}k=s+1|0;a=de[k>>0]|0;s=k}t:do{if((C|0)==9)while(1){C=0;if((de[a+1>>0]|0)!=37)break t;s=s+1|0;a=a+2|0;if((de[a>>0]|0)==37)C=9;else break}}while(0);b=s-v|0;if(A?(pe[e>>2]&32|0)==0:0)yr(v,b,e)|0;if((s|0)!=(v|0)){v=a;a=b;continue}l=a+1|0;s=de[l>>0]|0;u=(s<<24>>24)+-48|0;if(u>>>0<10){k=(de[a+2>>0]|0)==36;l=k?a+3|0:l;s=de[l>>0]|0;d=k?u:-1;t=k?1:t}else d=-1;a=s<<24>>24;t:do{if((a&-32|0)==32){u=0;while(1){if(!(1<<a+-32&75913)){f=u;a=l;break t}u=1<<(s<<24>>24)+-32|u;l=l+1|0;s=de[l>>0]|0;a=s<<24>>24;if((a&-32|0)!=32){f=u;a=l;break}}}else{f=0;a=l}}while(0);do{if(s<<24>>24==42){u=a+1|0;s=(de[u>>0]|0)+-48|0;if(s>>>0<10?(de[a+2>>0]|0)==36:0){pe[n+(s<<2)>>2]=10;t=1;a=a+3|0;s=pe[i+((de[u>>0]|0)+-48<<3)>>2]|0}else{if(t){o=-1;break e}if(!A){m=f;a=u;t=0;k=0;break}t=(pe[r>>2]|0)+(4-1)&~(4-1);s=pe[t>>2]|0;pe[r>>2]=t+4;t=0;a=u}if((s|0)<0){m=f|8192;k=0-s|0}else{m=f;k=s}}else{u=(s<<24>>24)+-48|0;if(u>>>0<10){s=0;do{s=(s*10|0)+u|0;a=a+1|0;u=(de[a>>0]|0)+-48|0}while(u>>>0<10);if((s|0)<0){o=-1;break e}else{m=f;k=s}}else{m=f;k=0}}}while(0);t:do{if((de[a>>0]|0)==46){u=a+1|0;s=de[u>>0]|0;if(s<<24>>24!=42){l=(s<<24>>24)+-48|0;if(l>>>0<10){a=u;s=0}else{a=u;l=0;break}while(1){s=(s*10|0)+l|0;a=a+1|0;l=(de[a>>0]|0)+-48|0;if(l>>>0>=10){l=s;break t}}}u=a+2|0;s=(de[u>>0]|0)+-48|0;if(s>>>0<10?(de[a+3>>0]|0)==36:0){pe[n+(s<<2)>>2]=10;a=a+4|0;l=pe[i+((de[u>>0]|0)+-48<<3)>>2]|0;break}if(t){o=-1;break e}if(A){a=(pe[r>>2]|0)+(4-1)&~(4-1);l=pe[a>>2]|0;pe[r>>2]=a+4;a=u}else{a=u;l=0}}else l=-1}while(0);h=0;while(1){s=(de[a>>0]|0)+-65|0;if(s>>>0>57){o=-1;break e}u=a+1|0;s=de[5359+(h*58|0)+s>>0]|0;f=s&255;if((f+-1|0)>>>0<8){a=u;h=f}else{E=u;break}}if(!(s<<24>>24)){o=-1;break}u=(d|0)>-1;do{if(s<<24>>24==19)if(u){o=-1;break e}else C=52;else{if(u){pe[n+(d<<2)>>2]=f;M=i+(d<<3)|0;P=pe[M+4>>2]|0;C=G;pe[C>>2]=pe[M>>2];pe[C+4>>2]=P;C=52;break}if(!A){o=0;break e}Fr(G,f,r)}}while(0);if((C|0)==52?(C=0,!A):0){v=E;a=b;continue}d=de[a>>0]|0;d=(h|0)!=0&(d&15|0)==3?d&-33:d;u=m&-65537;P=(m&8192|0)==0?m:u;t:do{switch(d|0){case 110:switch(h|0){case 0:{pe[pe[G>>2]>>2]=o;v=E;a=b;continue e}case 1:{pe[pe[G>>2]>>2]=o;v=E;a=b;continue e}case 2:{v=pe[G>>2]|0;pe[v>>2]=o;pe[v+4>>2]=((o|0)<0)<<31>>31;v=E;a=b;continue e}case 3:{$[pe[G>>2]>>1]=o;v=E;a=b;continue e}case 4:{de[pe[G>>2]>>0]=o;v=E;a=b;continue e}case 6:{pe[pe[G>>2]>>2]=o;v=E;a=b;continue e}case 7:{v=pe[G>>2]|0;pe[v>>2]=o;pe[v+4>>2]=((o|0)<0)<<31>>31;v=E;a=b;continue e}default:{v=E;a=b;continue e}}case 112:{h=P|8;l=l>>>0>8?l:8;d=120;C=64;break}case 88:case 120:{h=P;C=64;break}case 111:{u=G;s=pe[u>>2]|0;u=pe[u+4>>2]|0;if((s|0)==0&(u|0)==0)a=O;else{a=O;do{a=a+-1|0;de[a>>0]=s&7|48;s=Jr(s|0,u|0,3)|0;u=re}while(!((s|0)==0&(u|0)==0))}if(!(P&8)){s=P;h=0;f=5839;C=77}else{h=B-a+1|0;s=P;l=(l|0)<(h|0)?h:l;h=0;f=5839;C=77}break}case 105:case 100:{s=G;a=pe[s>>2]|0;s=pe[s+4>>2]|0;if((s|0)<0){a=Vr(0,0,a|0,s|0)|0;s=re;u=G;pe[u>>2]=a;pe[u+4>>2]=s;u=1;f=5839;C=76;break t}if(!(P&2048)){f=P&1;u=f;f=(f|0)==0?5839:5841;C=76}else{u=1;f=5840;C=76}break}case 117:{s=G;a=pe[s>>2]|0;s=pe[s+4>>2]|0;u=0;f=5839;C=76;break}case 99:{de[N>>0]=pe[G>>2];v=N;s=1;h=0;d=5839;a=O;break}case 109:{a=lr()|0;a=cr(pe[a>>2]|0)|0;C=82;break}case 115:{a=pe[G>>2]|0;a=(a|0)!=0?a:5849;C=82;break}case 67:{pe[Z>>2]=pe[G>>2];pe[U>>2]=0;pe[G>>2]=Z;l=-1;C=86;break}case 83:{if(!l){Nr(e,32,k,0,P);a=0;C=98}else C=86;break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{c=+ee[G>>3];pe[J>>2]=0;ee[te>>3]=c;if((pe[te+4>>2]|0)>=0)if(!(P&2048)){M=P&1;S=M;M=(M|0)==0?5857:5862}else{S=1;M=5859}else{c=-c;S=1;M=5856}ee[te>>3]=c;T=pe[te+4>>2]&2146435072;do{if(T>>>0<2146435072|(T|0)==2146435072&0<0){p=+dr(c,J)*2.0;s=p!=0.0;if(s)pe[J>>2]=(pe[J>>2]|0)+-1;w=d|32;if((w|0)==97){v=d&32;b=(v|0)==0?M:M+9|0;m=S|2;a=12-l|0;do{if(!(l>>>0>11|(a|0)==0)){c=8.0;do{a=a+-1|0;c=c*16.0}while((a|0)!=0);if((de[b>>0]|0)==45){c=-(c+(-p-c));break}else{c=p+c-c;break}}else c=p}while(0);s=pe[J>>2]|0;a=(s|0)<0?0-s|0:s;a=Br(a,((a|0)<0)<<31>>31,z)|0;if((a|0)==(z|0)){de[X>>0]=48;a=X}de[a+-1>>0]=(s>>31&2)+43;h=a+-2|0;de[h>>0]=d+15;f=(l|0)<1;u=(P&8|0)==0;s=Y;while(1){M=~~c;a=s+1|0;de[s>>0]=ve[5823+M>>0]|v;c=(c-+(M|0))*16.0;do{if((a-W|0)==1){if(u&(f&c==0.0))break;de[a>>0]=46;a=s+2|0}}while(0);if(!(c!=0.0))break;else s=a}l=(l|0)!=0&(I+a|0)<(l|0)?R+l-h|0:H-h+a|0;u=l+m|0;Nr(e,32,k,u,P);if(!(pe[e>>2]&32))yr(b,m,e)|0;Nr(e,48,k,u,P^65536);a=a-W|0;if(!(pe[e>>2]&32))yr(Y,a,e)|0;s=q-h|0;Nr(e,48,l-(a+s)|0,0,0);if(!(pe[e>>2]&32))yr(h,s,e)|0;Nr(e,32,k,u,P^8192);a=(u|0)<(k|0)?k:u;break}a=(l|0)<0?6:l;if(s){s=(pe[J>>2]|0)+-28|0;pe[J>>2]=s;c=p*268435456.0}else{c=p;s=pe[J>>2]|0}T=(s|0)<0?V:D;x=T;s=T;do{_=~~c>>>0;pe[s>>2]=_;s=s+4|0;c=(c-+(_>>>0))*1.0e9}while(c!=0.0);u=s;s=pe[J>>2]|0;if((s|0)>0){f=T;while(1){h=(s|0)>29?29:s;l=u+-4|0;do{if(l>>>0<f>>>0)l=f;else{s=0;do{_=Kr(pe[l>>2]|0,0,h|0)|0;_=Zr(_|0,re|0,s|0,0)|0;s=re;g=ai(_|0,s|0,1e9,0)|0;pe[l>>2]=g;s=oi(_|0,s|0,1e9,0)|0;l=l+-4|0}while(l>>>0>=f>>>0);if(!s){l=f;break}l=f+-4|0;pe[l>>2]=s}}while(0);while(1){if(u>>>0<=l>>>0)break;s=u+-4|0;if(!(pe[s>>2]|0))u=s;else break}s=(pe[J>>2]|0)-h|0;pe[J>>2]=s;if((s|0)>0)f=l;else break}}else l=T;if((s|0)<0){b=((a+25|0)/9|0)+1|0;y=(w|0)==102;v=l;while(1){m=0-s|0;m=(m|0)>9?9:m;do{if(v>>>0<u>>>0){s=(1<<m)+-1|0;f=1e9>>>m;l=0;h=v;do{_=pe[h>>2]|0;pe[h>>2]=(_>>>m)+l;l=ye(_&s,f)|0;h=h+4|0}while(h>>>0<u>>>0);s=(pe[v>>2]|0)==0?v+4|0:v;if(!l){l=s;break}pe[u>>2]=l;l=s;u=u+4|0}else l=(pe[v>>2]|0)==0?v+4|0:v}while(0);s=y?T:l;u=(u-s>>2|0)>(b|0)?s+(b<<2)|0:u;s=(pe[J>>2]|0)+m|0;pe[J>>2]=s;if((s|0)>=0){v=l;break}else v=l}}else v=l;do{if(v>>>0<u>>>0){s=(x-v>>2)*9|0;f=pe[v>>2]|0;if(f>>>0<10)break;else l=10;do{l=l*10|0;s=s+1|0}while(f>>>0>=l>>>0)}else s=0}while(0);g=(w|0)==103;_=(a|0)!=0;l=a-((w|0)!=102?s:0)+((_&g)<<31>>31)|0;if((l|0)<(((u-x>>2)*9|0)+-9|0)){h=l+9216|0;y=(h|0)/9|0;l=T+(y+-1023<<2)|0;h=((h|0)%9|0)+1|0;if((h|0)<9){f=10;do{f=f*10|0;h=h+1|0}while((h|0)!=9)}else f=10;m=pe[l>>2]|0;b=(m>>>0)%(f>>>0)|0;if((b|0)==0?(T+(y+-1022<<2)|0)==(u|0):0)f=v;else C=163;do{if((C|0)==163){C=0;p=(((m>>>0)/(f>>>0)|0)&1|0)==0?9007199254740992.0:9007199254740994.0;h=(f|0)/2|0;do{if(b>>>0<h>>>0)c=.5;else{if((b|0)==(h|0)?(T+(y+-1022<<2)|0)==(u|0):0){c=1.0;break}c=1.5}}while(0);do{if(S){if((de[M>>0]|0)!=45)break;p=-p;c=-c}}while(0);h=m-b|0;pe[l>>2]=h;if(!(p+c!=p)){f=v;break}w=h+f|0;pe[l>>2]=w;if(w>>>0>999999999){s=v;while(1){f=l+-4|0;pe[l>>2]=0;if(f>>>0<s>>>0){s=s+-4|0;pe[s>>2]=0}w=(pe[f>>2]|0)+1|0;pe[f>>2]=w;if(w>>>0>999999999)l=f;else{v=s;l=f;break}}}s=(x-v>>2)*9|0;h=pe[v>>2]|0;if(h>>>0<10){f=v;break}else f=10;do{f=f*10|0;s=s+1|0}while(h>>>0>=f>>>0);f=v}}while(0);w=l+4|0;v=f;u=u>>>0>w>>>0?w:u}b=0-s|0;while(1){if(u>>>0<=v>>>0){y=0;w=u;break}l=u+-4|0;if(!(pe[l>>2]|0))u=l;else{y=1;w=u;break}}do{if(g){a=(_&1^1)+a|0;if((a|0)>(s|0)&(s|0)>-5){d=d+-1|0;a=a+-1-s|0}else{d=d+-2|0;a=a+-1|0}u=P&8;if(u)break;do{if(y){u=pe[w+-4>>2]|0;if(!u){l=9;break}if(!((u>>>0)%10|0)){f=10;l=0}else{l=0;break}do{f=f*10|0;l=l+1|0}while(((u>>>0)%(f>>>0)|0|0)==0)}else l=9}while(0);u=((w-x>>2)*9|0)+-9|0;if((d|32|0)==102){u=u-l|0;u=(u|0)<0?0:u;a=(a|0)<(u|0)?a:u;u=0;break}else{u=u+s-l|0;u=(u|0)<0?0:u;a=(a|0)<(u|0)?a:u;u=0;break}}else u=P&8}while(0);m=a|u;f=(m|0)!=0&1;h=(d|32|0)==102;if(h){s=(s|0)>0?s:0;d=0}else{l=(s|0)<0?b:s;l=Br(l,((l|0)<0)<<31>>31,z)|0;if((q-l|0)<2)do{l=l+-1|0;de[l>>0]=48}while((q-l|0)<2);de[l+-1>>0]=(s>>31&2)+43;x=l+-2|0;de[x>>0]=d;s=q-x|0;d=x}b=S+1+a+f+s|0;Nr(e,32,k,b,P);if(!(pe[e>>2]&32))yr(M,S,e)|0;Nr(e,48,k,b,P^65536);do{if(h){l=v>>>0>T>>>0?T:v;s=l;do{u=Br(pe[s>>2]|0,0,L)|0;do{if((s|0)==(l|0)){if((u|0)!=(L|0))break;de[F>>0]=48;u=F}else{if(u>>>0<=Y>>>0)break;do{u=u+-1|0;de[u>>0]=48}while(u>>>0>Y>>>0)}}while(0);if(!(pe[e>>2]&32))yr(u,j-u|0,e)|0;s=s+4|0}while(s>>>0<=T>>>0);do{if(m){if(pe[e>>2]&32)break;yr(5891,1,e)|0}}while(0);if((a|0)>0&s>>>0<w>>>0){u=s;while(1){s=Br(pe[u>>2]|0,0,L)|0;if(s>>>0>Y>>>0)do{s=s+-1|0;de[s>>0]=48}while(s>>>0>Y>>>0);if(!(pe[e>>2]&32))yr(s,(a|0)>9?9:a,e)|0;u=u+4|0;s=a+-9|0;if(!((a|0)>9&u>>>0<w>>>0)){a=s;break}else a=s}}Nr(e,48,a+9|0,9,0)}else{h=y?w:v+4|0;if((a|0)>-1){f=(u|0)==0;l=v;do{s=Br(pe[l>>2]|0,0,L)|0;if((s|0)==(L|0)){de[F>>0]=48;s=F}do{if((l|0)==(v|0)){u=s+1|0;if(!(pe[e>>2]&32))yr(s,1,e)|0;if(f&(a|0)<1){s=u;break}if(pe[e>>2]&32){s=u;break}yr(5891,1,e)|0;s=u}else{if(s>>>0<=Y>>>0)break;do{s=s+-1|0;de[s>>0]=48}while(s>>>0>Y>>>0)}}while(0);u=j-s|0;if(!(pe[e>>2]&32))yr(s,(a|0)>(u|0)?u:a,e)|0;a=a-u|0;l=l+4|0}while(l>>>0<h>>>0&(a|0)>-1)}Nr(e,48,a+18|0,18,0);if(pe[e>>2]&32)break;yr(d,q-d|0,e)|0}}while(0);Nr(e,32,k,b,P^8192);a=(b|0)<(k|0)?k:b}else{h=(d&32|0)!=0;f=c!=c|0.0!=0.0;s=f?0:S;l=s+3|0;Nr(e,32,k,l,u);a=pe[e>>2]|0;if(!(a&32)){yr(M,s,e)|0;a=pe[e>>2]|0}if(!(a&32))yr(f?h?5883:5887:h?5875:5879,3,e)|0;Nr(e,32,k,l,P^8192);a=(l|0)<(k|0)?k:l}}while(0);v=E;continue e}default:{u=P;s=l;h=0;d=5839;a=O}}}while(0);t:do{if((C|0)==64){u=G;s=pe[u>>2]|0;u=pe[u+4>>2]|0;f=d&32;if(!((s|0)==0&(u|0)==0)){a=O;do{a=a+-1|0;de[a>>0]=ve[5823+(s&15)>>0]|f;s=Jr(s|0,u|0,4)|0;u=re}while(!((s|0)==0&(u|0)==0));C=G;if((h&8|0)==0|(pe[C>>2]|0)==0&(pe[C+4>>2]|0)==0){s=h;h=0;f=5839;C=77}else{s=h;h=2;f=5839+(d>>4)|0;C=77}}else{a=O;s=h;h=0;f=5839;C=77}}else if((C|0)==76){a=Br(a,s,O)|0;s=P;h=u;C=77}else if((C|0)==82){C=0;P=Ir(a,0,l)|0;M=(P|0)==0;v=a;s=M?l:P-a|0;h=0;d=5839;a=M?a+l|0:P}else if((C|0)==86){C=0;s=0;a=0;f=pe[G>>2]|0;while(1){u=pe[f>>2]|0;if(!u)break;a=vr(K,u)|0;if((a|0)<0|a>>>0>(l-s|0)>>>0)break;s=a+s|0;if(l>>>0>s>>>0)f=f+4|0;else break}if((a|0)<0){o=-1;break e}Nr(e,32,k,s,P);if(!s){a=0;C=98}else{u=0;l=pe[G>>2]|0;while(1){a=pe[l>>2]|0;if(!a){a=s;C=98;break t}a=vr(K,a)|0;u=a+u|0;if((u|0)>(s|0)){a=s;C=98;break t}if(!(pe[e>>2]&32))yr(K,a,e)|0;if(u>>>0>=s>>>0){a=s;C=98;break}else l=l+4|0}}}}while(0);if((C|0)==98){C=0;Nr(e,32,k,a,P^8192);v=E;a=(k|0)>(a|0)?k:a;continue}if((C|0)==77){C=0;u=(l|0)>-1?s&-65537:s;s=G;s=(pe[s>>2]|0)!=0|(pe[s+4>>2]|0)!=0;if((l|0)!=0|s){s=(s&1^1)+(B-a)|0;v=a;s=(l|0)>(s|0)?l:s;d=f;a=O}else{v=O;s=0;d=f;a=O}}f=a-v|0;s=(s|0)<(f|0)?f:s;l=h+s|0;a=(k|0)<(l|0)?l:k;Nr(e,32,a,l,u);if(!(pe[e>>2]&32))yr(d,h,e)|0;Nr(e,48,a,l,u^65536);Nr(e,48,s,f,0);if(!(pe[e>>2]&32))yr(v,f,e)|0;Nr(e,32,a,l,u^8192);v=E}e:do{if((C|0)==245)if(!e)if(t){o=1;while(1){t=pe[n+(o<<2)>>2]|0;if(!t)break;Fr(i+(o<<3)|0,t,r);o=o+1|0;if((o|0)>=10){o=1;break e}}if((o|0)<10)while(1){if(pe[n+(o<<2)>>2]|0){o=-1;break e}o=o+1|0;if((o|0)>=10){o=1;break}}else o=1}else o=0}while(0);be=Q;return o|0}function Lr(e){e=e|0;if(!(pe[e+68>>2]|0))Mr(e);return}function jr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0;i=e+20|0;n=pe[i>>2]|0;e=(pe[e+16>>2]|0)-n|0;e=e>>>0>r>>>0?r:e;Qr(n|0,t|0,e|0)|0;pe[i>>2]=(pe[i>>2]|0)+e;return r|0}function Fr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0.0;e:do{if(t>>>0<=20)do{switch(t|0){case 9:{i=(pe[r>>2]|0)+(4-1)&~(4-1);t=pe[i>>2]|0;pe[r>>2]=i+4;pe[e>>2]=t;break e}case 10:{i=(pe[r>>2]|0)+(4-1)&~(4-1);t=pe[i>>2]|0;pe[r>>2]=i+4;i=e;pe[i>>2]=t;pe[i+4>>2]=((t|0)<0)<<31>>31;break e}case 11:{i=(pe[r>>2]|0)+(4-1)&~(4-1);t=pe[i>>2]|0;pe[r>>2]=i+4;i=e;pe[i>>2]=t;pe[i+4>>2]=0;break e}case 12:{i=(pe[r>>2]|0)+(8-1)&~(8-1);t=i;n=pe[t>>2]|0;t=pe[t+4>>2]|0;pe[r>>2]=i+8;i=e;pe[i>>2]=n;pe[i+4>>2]=t;break e}case 13:{n=(pe[r>>2]|0)+(4-1)&~(4-1);i=pe[n>>2]|0;pe[r>>2]=n+4;i=(i&65535)<<16>>16;n=e;pe[n>>2]=i;pe[n+4>>2]=((i|0)<0)<<31>>31;break e}case 14:{n=(pe[r>>2]|0)+(4-1)&~(4-1);i=pe[n>>2]|0;pe[r>>2]=n+4;n=e;pe[n>>2]=i&65535;pe[n+4>>2]=0;break e}case 15:{n=(pe[r>>2]|0)+(4-1)&~(4-1);i=pe[n>>2]|0;pe[r>>2]=n+4;i=(i&255)<<24>>24;n=e;pe[n>>2]=i;pe[n+4>>2]=((i|0)<0)<<31>>31;break e}case 16:{n=(pe[r>>2]|0)+(4-1)&~(4-1);i=pe[n>>2]|0;pe[r>>2]=n+4;n=e;pe[n>>2]=i&255;pe[n+4>>2]=0;break e}case 17:{n=(pe[r>>2]|0)+(8-1)&~(8-1);o=+ee[n>>3];pe[r>>2]=n+8;ee[e>>3]=o;break e}case 18:{n=(pe[r>>2]|0)+(8-1)&~(8-1);o=+ee[n>>3];pe[r>>2]=n+8;ee[e>>3]=o;break e}default:break e}}while(0)}while(0);return}function Br(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;if(t>>>0>0|(t|0)==0&e>>>0>4294967295)while(1){i=ai(e|0,t|0,10,0)|0;r=r+-1|0;de[r>>0]=i|48;i=oi(e|0,t|0,10,0)|0;if(t>>>0>9|(t|0)==9&e>>>0>4294967295){e=i;t=re}else{e=i;break}}if(e)while(1){r=r+-1|0;de[r>>0]=(e>>>0)%10|0|48;if(e>>>0<10)break;else e=(e>>>0)/10|0}return r|0}function Nr(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0,a=0,s=0;s=be;be=be+256|0;a=s;do{if((r|0)>(i|0)&(n&73728|0)==0){n=r-i|0;Yr(a|0,t|0,(n>>>0>256?256:n)|0)|0;t=pe[e>>2]|0;o=(t&32|0)==0;if(n>>>0>255){i=r-i|0;do{if(o){yr(a,256,e)|0;t=pe[e>>2]|0}n=n+-256|0;o=(t&32|0)==0}while(n>>>0>255);if(o)n=i&255;else break}else if(!o)break;yr(a,n,e)|0}}while(0);be=s;return}function Ur(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0,g=0,_=0,w=0,x=0,T=0,S=0,M=0,P=0,E=0,k=0,C=0,A=0,O=0,I=0,R=0,D=0,L=0,j=0,F=0;do{if(e>>>0<245){d=e>>>0<11?16:e+11&-8;e=d>>>3;s=pe[151]|0;r=s>>>e;if(r&3){e=(r&1^1)+e|0;i=e<<1;r=644+(i<<2)|0;i=644+(i+2<<2)|0;n=pe[i>>2]|0;o=n+8|0;a=pe[o>>2]|0;do{if((r|0)!=(a|0)){if(a>>>0<(pe[155]|0)>>>0)Xe();t=a+12|0;if((pe[t>>2]|0)==(n|0)){pe[t>>2]=r;pe[i>>2]=a;break}else Xe()}else pe[151]=s&~(1<<e)}while(0);F=e<<3;pe[n+4>>2]=F|3;F=n+(F|4)|0;pe[F>>2]=pe[F>>2]|1;F=o;return F|0}a=pe[153]|0;if(d>>>0>a>>>0){if(r){i=2<<e;i=r<<e&(i|0-i);i=(i&0-i)+-1|0;u=i>>>12&16;i=i>>>u;n=i>>>5&8;i=i>>>n;o=i>>>2&4;i=i>>>o;r=i>>>1&2;i=i>>>r;e=i>>>1&1;e=(n|u|o|r|e)+(i>>>e)|0;i=e<<1;r=644+(i<<2)|0;i=644+(i+2<<2)|0;o=pe[i>>2]|0;u=o+8|0;n=pe[u>>2]|0;do{if((r|0)!=(n|0)){if(n>>>0<(pe[155]|0)>>>0)Xe();t=n+12|0;if((pe[t>>2]|0)==(o|0)){pe[t>>2]=r;pe[i>>2]=n;c=pe[153]|0;break}else Xe()}else{pe[151]=s&~(1<<e);c=a}}while(0);F=e<<3;a=F-d|0;pe[o+4>>2]=d|3;s=o+d|0;pe[o+(d|4)>>2]=a|1;pe[o+F>>2]=a;if(c){n=pe[156]|0;r=c>>>3;t=r<<1;i=644+(t<<2)|0;e=pe[151]|0;r=1<<r;if(e&r){e=644+(t+2<<2)|0;t=pe[e>>2]|0;if(t>>>0<(pe[155]|0)>>>0)Xe();else{l=e;f=t}}else{pe[151]=e|r;l=644+(t+2<<2)|0;f=i}pe[l>>2]=n;pe[f+12>>2]=n;pe[n+8>>2]=f;pe[n+12>>2]=i}pe[153]=a;pe[156]=s;F=u;return F|0}e=pe[152]|0;if(e){r=(e&0-e)+-1|0;j=r>>>12&16;r=r>>>j;L=r>>>5&8;r=r>>>L;F=r>>>2&4;r=r>>>F;e=r>>>1&2;r=r>>>e;i=r>>>1&1;i=pe[908+((L|j|F|e|i)+(r>>>i)<<2)>>2]|0;r=(pe[i+4>>2]&-8)-d|0;e=i;while(1){t=pe[e+16>>2]|0;if(!t){t=pe[e+20>>2]|0;if(!t){u=r;break}}e=(pe[t+4>>2]&-8)-d|0;F=e>>>0<r>>>0;r=F?e:r;e=t;i=F?t:i}o=pe[155]|0;if(i>>>0<o>>>0)Xe();s=i+d|0;if(i>>>0>=s>>>0)Xe();a=pe[i+24>>2]|0;r=pe[i+12>>2]|0;do{if((r|0)==(i|0)){e=i+20|0;t=pe[e>>2]|0;if(!t){e=i+16|0;t=pe[e>>2]|0;if(!t){h=0;break}}while(1){r=t+20|0;n=pe[r>>2]|0;if(n){t=n;e=r;continue}r=t+16|0;n=pe[r>>2]|0;if(!n)break;else{t=n;e=r}}if(e>>>0<o>>>0)Xe();else{pe[e>>2]=0;h=t;break}}else{n=pe[i+8>>2]|0;if(n>>>0<o>>>0)Xe();t=n+12|0;if((pe[t>>2]|0)!=(i|0))Xe();e=r+8|0;if((pe[e>>2]|0)==(i|0)){pe[t>>2]=r;pe[e>>2]=n;h=r;break}else Xe()}}while(0);do{if(a){t=pe[i+28>>2]|0;e=908+(t<<2)|0;if((i|0)==(pe[e>>2]|0)){pe[e>>2]=h;if(!h){pe[152]=pe[152]&~(1<<t);break}}else{if(a>>>0<(pe[155]|0)>>>0)Xe();t=a+16|0;if((pe[t>>2]|0)==(i|0))pe[t>>2]=h;else pe[a+20>>2]=h;if(!h)break}e=pe[155]|0;if(h>>>0<e>>>0)Xe();pe[h+24>>2]=a;t=pe[i+16>>2]|0;do{if(t)if(t>>>0<e>>>0)Xe();else{pe[h+16>>2]=t;pe[t+24>>2]=h;break}}while(0);t=pe[i+20>>2]|0;if(t)if(t>>>0<(pe[155]|0)>>>0)Xe();else{pe[h+20>>2]=t;pe[t+24>>2]=h;break}}}while(0);if(u>>>0<16){F=u+d|0;pe[i+4>>2]=F|3;F=i+(F+4)|0;pe[F>>2]=pe[F>>2]|1}else{pe[i+4>>2]=d|3;pe[i+(d|4)>>2]=u|1;pe[i+(u+d)>>2]=u;t=pe[153]|0;if(t){o=pe[156]|0;r=t>>>3;t=r<<1;n=644+(t<<2)|0;e=pe[151]|0;r=1<<r;if(e&r){t=644+(t+2<<2)|0;e=pe[t>>2]|0;if(e>>>0<(pe[155]|0)>>>0)Xe();else{p=t;v=e}}else{pe[151]=e|r;p=644+(t+2<<2)|0;v=n}pe[p>>2]=o;pe[v+12>>2]=o;pe[o+8>>2]=v;pe[o+12>>2]=n}pe[153]=u;pe[156]=s}F=i+8|0;return F|0}else v=d}else v=d}else if(e>>>0<=4294967231){e=e+11|0;f=e&-8;l=pe[152]|0;if(l){r=0-f|0;e=e>>>8;if(e)if(f>>>0>16777215)c=31;else{v=(e+1048320|0)>>>16&8;_=e<<v;p=(_+520192|0)>>>16&4;_=_<<p;c=(_+245760|0)>>>16&2;c=14-(p|v|c)+(_<<c>>>15)|0;c=f>>>(c+7|0)&1|c<<1}else c=0;e=pe[908+(c<<2)>>2]|0;e:do{if(!e){n=0;e=0;_=86}else{a=r;n=0;s=f<<((c|0)==31?0:25-(c>>>1)|0);u=e;e=0;while(1){o=pe[u+4>>2]&-8;r=o-f|0;if(r>>>0<a>>>0)if((o|0)==(f|0)){o=u;e=u;_=90;break e}else e=u;else r=a;_=pe[u+20>>2]|0;u=pe[u+16+(s>>>31<<2)>>2]|0;n=(_|0)==0|(_|0)==(u|0)?n:_;if(!u){_=86;break}else{a=r;s=s<<1}}}}while(0);if((_|0)==86){if((n|0)==0&(e|0)==0){e=2<<c;e=l&(e|0-e);if(!e){v=f;break}e=(e&0-e)+-1|0;h=e>>>12&16;e=e>>>h;l=e>>>5&8;e=e>>>l;p=e>>>2&4;e=e>>>p;v=e>>>1&2;e=e>>>v;n=e>>>1&1;n=pe[908+((l|h|p|v|n)+(e>>>n)<<2)>>2]|0;e=0}if(!n){s=r;u=e}else{o=n;_=90}}if((_|0)==90)while(1){_=0;v=(pe[o+4>>2]&-8)-f|0;n=v>>>0<r>>>0;r=n?v:r;e=n?o:e;n=pe[o+16>>2]|0;if(n){o=n;_=90;continue}o=pe[o+20>>2]|0;if(!o){s=r;u=e;break}else _=90}if((u|0)!=0?s>>>0<((pe[153]|0)-f|0)>>>0:0){n=pe[155]|0;if(u>>>0<n>>>0)Xe();a=u+f|0;if(u>>>0>=a>>>0)Xe();o=pe[u+24>>2]|0;r=pe[u+12>>2]|0;do{if((r|0)==(u|0)){e=u+20|0;t=pe[e>>2]|0;if(!t){e=u+16|0;t=pe[e>>2]|0;if(!t){d=0;break}}while(1){r=t+20|0;i=pe[r>>2]|0;if(i){t=i;e=r;continue}r=t+16|0;i=pe[r>>2]|0;if(!i)break;else{t=i;e=r}}if(e>>>0<n>>>0)Xe();else{pe[e>>2]=0;d=t;break}}else{i=pe[u+8>>2]|0;if(i>>>0<n>>>0)Xe();t=i+12|0;if((pe[t>>2]|0)!=(u|0))Xe();e=r+8|0;if((pe[e>>2]|0)==(u|0)){pe[t>>2]=r;pe[e>>2]=i;d=r;break}else Xe()}}while(0);do{if(o){t=pe[u+28>>2]|0;e=908+(t<<2)|0;if((u|0)==(pe[e>>2]|0)){pe[e>>2]=d;if(!d){pe[152]=pe[152]&~(1<<t);break}}else{if(o>>>0<(pe[155]|0)>>>0)Xe();t=o+16|0;if((pe[t>>2]|0)==(u|0))pe[t>>2]=d;else pe[o+20>>2]=d;if(!d)break}e=pe[155]|0;if(d>>>0<e>>>0)Xe();pe[d+24>>2]=o;t=pe[u+16>>2]|0;do{if(t)if(t>>>0<e>>>0)Xe();else{pe[d+16>>2]=t;pe[t+24>>2]=d;break}}while(0);t=pe[u+20>>2]|0;if(t)if(t>>>0<(pe[155]|0)>>>0)Xe();else{pe[d+20>>2]=t;pe[t+24>>2]=d;break}}}while(0);e:do{if(s>>>0>=16){pe[u+4>>2]=f|3;pe[u+(f|4)>>2]=s|1;pe[u+(s+f)>>2]=s;t=s>>>3;if(s>>>0<256){e=t<<1;i=644+(e<<2)|0;r=pe[151]|0;t=1<<t;if(r&t){t=644+(e+2<<2)|0;e=pe[t>>2]|0;if(e>>>0<(pe[155]|0)>>>0)Xe();else{b=t;y=e}}else{pe[151]=r|t;b=644+(e+2<<2)|0;y=i}pe[b>>2]=a;pe[y+12>>2]=a;pe[u+(f+8)>>2]=y;pe[u+(f+12)>>2]=i;break}t=s>>>8;if(t)if(s>>>0>16777215)i=31;else{j=(t+1048320|0)>>>16&8;F=t<<j;L=(F+520192|0)>>>16&4;F=F<<L;i=(F+245760|0)>>>16&2;i=14-(L|j|i)+(F<<i>>>15)|0;i=s>>>(i+7|0)&1|i<<1}else i=0;t=908+(i<<2)|0;pe[u+(f+28)>>2]=i;pe[u+(f+20)>>2]=0;pe[u+(f+16)>>2]=0;e=pe[152]|0;r=1<<i;if(!(e&r)){pe[152]=e|r;pe[t>>2]=a;pe[u+(f+24)>>2]=t;pe[u+(f+12)>>2]=a;pe[u+(f+8)>>2]=a;break}t=pe[t>>2]|0;t:do{if((pe[t+4>>2]&-8|0)!=(s|0)){i=s<<((i|0)==31?0:25-(i>>>1)|0);while(1){e=t+16+(i>>>31<<2)|0;r=pe[e>>2]|0;if(!r)break;if((pe[r+4>>2]&-8|0)==(s|0)){T=r;break t}else{i=i<<1;t=r}}if(e>>>0<(pe[155]|0)>>>0)Xe();else{pe[e>>2]=a;pe[u+(f+24)>>2]=t;pe[u+(f+12)>>2]=a;pe[u+(f+8)>>2]=a;break e}}else T=t}while(0);t=T+8|0;e=pe[t>>2]|0;F=pe[155]|0;if(e>>>0>=F>>>0&T>>>0>=F>>>0){pe[e+12>>2]=a;pe[t>>2]=a;pe[u+(f+8)>>2]=e;pe[u+(f+12)>>2]=T;pe[u+(f+24)>>2]=0;break}else Xe()}else{F=s+f|0;pe[u+4>>2]=F|3;F=u+(F+4)|0;pe[F>>2]=pe[F>>2]|1}}while(0);F=u+8|0;return F|0}else v=f}else v=f}else v=-1}while(0);r=pe[153]|0;if(r>>>0>=v>>>0){t=r-v|0;e=pe[156]|0;if(t>>>0>15){pe[156]=e+v;pe[153]=t;pe[e+(v+4)>>2]=t|1;pe[e+r>>2]=t;pe[e+4>>2]=v|3}else{pe[153]=0;pe[156]=0;pe[e+4>>2]=r|3;F=e+(r+4)|0;pe[F>>2]=pe[F>>2]|1}F=e+8|0;return F|0}e=pe[154]|0;if(e>>>0>v>>>0){j=e-v|0;pe[154]=j;F=pe[157]|0;pe[157]=F+v;pe[F+(v+4)>>2]=j|1;pe[F+4>>2]=v|3;F=F+8|0;return F|0}do{if(!(pe[269]|0)){e=Re(30)|0;if(!(e+-1&e)){pe[271]=e;pe[270]=e;pe[272]=-1;pe[273]=-1;pe[274]=0;pe[262]=0;T=(qe(0)|0)&-16^1431655768;pe[269]=T;break}else Xe()}}while(0);u=v+48|0;s=pe[271]|0;c=v+47|0;a=s+c|0;s=0-s|0;l=a&s;if(l>>>0<=v>>>0){F=0;return F|0}e=pe[261]|0;if((e|0)!=0?(y=pe[259]|0,T=y+l|0,T>>>0<=y>>>0|T>>>0>e>>>0):0){F=0;return F|0}e:do{if(!(pe[262]&4)){e=pe[157]|0;t:do{if(e){n=1052;while(1){r=pe[n>>2]|0;if(r>>>0<=e>>>0?(m=n+4|0,(r+(pe[m>>2]|0)|0)>>>0>e>>>0):0){o=n;e=m;break}n=pe[n+8>>2]|0;if(!n){_=174;break t}}r=a-(pe[154]|0)&s;if(r>>>0<2147483647){n=Ae(r|0)|0;T=(n|0)==((pe[o>>2]|0)+(pe[e>>2]|0)|0);e=T?r:0;if(T){if((n|0)!=(-1|0)){w=n;p=e;_=194;break e}}else _=184}else e=0}else _=174}while(0);do{if((_|0)==174){o=Ae(0)|0;if((o|0)!=(-1|0)){e=o;r=pe[270]|0;n=r+-1|0;if(!(n&e))r=l;else r=l-e+(n+e&0-r)|0;e=pe[259]|0;n=e+r|0;if(r>>>0>v>>>0&r>>>0<2147483647){T=pe[261]|0;if((T|0)!=0?n>>>0<=e>>>0|n>>>0>T>>>0:0){e=0;break}n=Ae(r|0)|0;T=(n|0)==(o|0);e=T?r:0;if(T){w=o;p=e;_=194;break e}else _=184}else e=0}else e=0}}while(0);t:do{if((_|0)==184){o=0-r|0;do{if(u>>>0>r>>>0&(r>>>0<2147483647&(n|0)!=(-1|0))?(g=pe[271]|0,g=c-r+g&0-g,g>>>0<2147483647):0)if((Ae(g|0)|0)==(-1|0)){Ae(o|0)|0;break t}else{r=g+r|0;break}}while(0);if((n|0)!=(-1|0)){w=n;p=r;_=194;break e}}}while(0);pe[262]=pe[262]|4;_=191}else{e=0;_=191}}while(0);if((((_|0)==191?l>>>0<2147483647:0)?(w=Ae(l|0)|0,x=Ae(0)|0,w>>>0<x>>>0&((w|0)!=(-1|0)&(x|0)!=(-1|0))):0)?(S=x-w|0,M=S>>>0>(v+40|0)>>>0,M):0){p=M?S:e;_=194}if((_|0)==194){e=(pe[259]|0)+p|0;pe[259]=e;if(e>>>0>(pe[260]|0)>>>0)pe[260]=e;a=pe[157]|0;e:do{if(a){o=1052;do{e=pe[o>>2]|0;r=o+4|0;n=pe[r>>2]|0;if((w|0)==(e+n|0)){P=e;E=r;k=n;C=o;_=204;break}o=pe[o+8>>2]|0}while((o|0)!=0);if(((_|0)==204?(pe[C+12>>2]&8|0)==0:0)?a>>>0<w>>>0&a>>>0>=P>>>0:0){pe[E>>2]=k+p;F=(pe[154]|0)+p|0;j=a+8|0;j=(j&7|0)==0?0:0-j&7;L=F-j|0;pe[157]=a+j;pe[154]=L;pe[a+(j+4)>>2]=L|1;pe[a+(F+4)>>2]=40;pe[158]=pe[273];break}e=pe[155]|0;if(w>>>0<e>>>0){pe[155]=w;e=w}r=w+p|0;o=1052;while(1){if((pe[o>>2]|0)==(r|0)){n=o;r=o;_=212;break}o=pe[o+8>>2]|0;if(!o){r=1052;break}}if((_|0)==212)if(!(pe[r+12>>2]&8)){pe[n>>2]=w;h=r+4|0;pe[h>>2]=(pe[h>>2]|0)+p;h=w+8|0;h=(h&7|0)==0?0:0-h&7;c=w+(p+8)|0;c=(c&7|0)==0?0:0-c&7;t=w+(c+p)|0;f=h+v|0;d=w+f|0;l=t-(w+h)-v|0;pe[w+(h+4)>>2]=v|3;t:do{if((t|0)!=(a|0)){if((t|0)==(pe[156]|0)){F=(pe[153]|0)+l|0;pe[153]=F;pe[156]=d;pe[w+(f+4)>>2]=F|1;pe[w+(F+f)>>2]=F;break}s=p+4|0;r=pe[w+(s+c)>>2]|0;if((r&3|0)==1){u=r&-8;o=r>>>3;r:do{if(r>>>0>=256){a=pe[w+((c|24)+p)>>2]|0;i=pe[w+(p+12+c)>>2]|0;do{if((i|0)==(t|0)){n=c|16;i=w+(s+n)|0;r=pe[i>>2]|0;if(!r){i=w+(n+p)|0;r=pe[i>>2]|0;if(!r){D=0;break}}while(1){n=r+20|0;o=pe[n>>2]|0;if(o){r=o;i=n;continue}n=r+16|0;o=pe[n>>2]|0;if(!o)break;else{r=o;i=n}}if(i>>>0<e>>>0)Xe();else{pe[i>>2]=0;D=r;break}}else{n=pe[w+((c|8)+p)>>2]|0;if(n>>>0<e>>>0)Xe();e=n+12|0;if((pe[e>>2]|0)!=(t|0))Xe();r=i+8|0;if((pe[r>>2]|0)==(t|0)){pe[e>>2]=i;pe[r>>2]=n;D=i;break}else Xe()}}while(0);if(!a)break;e=pe[w+(p+28+c)>>2]|0;r=908+(e<<2)|0;do{if((t|0)!=(pe[r>>2]|0)){if(a>>>0<(pe[155]|0)>>>0)Xe();e=a+16|0;if((pe[e>>2]|0)==(t|0))pe[e>>2]=D;else pe[a+20>>2]=D;if(!D)break r}else{pe[r>>2]=D;if(D)break;pe[152]=pe[152]&~(1<<e);break r}}while(0);r=pe[155]|0;if(D>>>0<r>>>0)Xe();pe[D+24>>2]=a;t=c|16;e=pe[w+(t+p)>>2]|0;do{if(e)if(e>>>0<r>>>0)Xe();else{pe[D+16>>2]=e;pe[e+24>>2]=D;break}}while(0);t=pe[w+(s+t)>>2]|0;if(!t)break;if(t>>>0<(pe[155]|0)>>>0)Xe();else{pe[D+20>>2]=t;pe[t+24>>2]=D;break}}else{i=pe[w+((c|8)+p)>>2]|0;n=pe[w+(p+12+c)>>2]|0;r=644+(o<<1<<2)|0;do{if((i|0)!=(r|0)){if(i>>>0<e>>>0)Xe();if((pe[i+12>>2]|0)==(t|0))break;Xe()}}while(0);if((n|0)==(i|0)){pe[151]=pe[151]&~(1<<o);break}do{if((n|0)==(r|0))A=n+8|0;else{if(n>>>0<e>>>0)Xe();e=n+8|0;if((pe[e>>2]|0)==(t|0)){A=e;break}Xe()}}while(0);pe[i+12>>2]=n;pe[A>>2]=i}}while(0);t=w+((u|c)+p)|0;n=u+l|0}else n=l;t=t+4|0;pe[t>>2]=pe[t>>2]&-2;pe[w+(f+4)>>2]=n|1;pe[w+(n+f)>>2]=n;t=n>>>3;if(n>>>0<256){e=t<<1;i=644+(e<<2)|0;r=pe[151]|0;t=1<<t;do{if(!(r&t)){pe[151]=r|t;L=644+(e+2<<2)|0;j=i}else{t=644+(e+2<<2)|0;e=pe[t>>2]|0;if(e>>>0>=(pe[155]|0)>>>0){L=t;j=e;break}Xe()}}while(0);pe[L>>2]=d;pe[j+12>>2]=d;pe[w+(f+8)>>2]=j;pe[w+(f+12)>>2]=i;break}t=n>>>8;do{if(!t)i=0;else{if(n>>>0>16777215){i=31;break}L=(t+1048320|0)>>>16&8;j=t<<L;D=(j+520192|0)>>>16&4;j=j<<D;i=(j+245760|0)>>>16&2;i=14-(D|L|i)+(j<<i>>>15)|0;i=n>>>(i+7|0)&1|i<<1}}while(0);t=908+(i<<2)|0;pe[w+(f+28)>>2]=i;pe[w+(f+20)>>2]=0;pe[w+(f+16)>>2]=0;e=pe[152]|0;r=1<<i;if(!(e&r)){pe[152]=e|r;pe[t>>2]=d;pe[w+(f+24)>>2]=t;pe[w+(f+12)>>2]=d;pe[w+(f+8)>>2]=d;break}t=pe[t>>2]|0;r:do{if((pe[t+4>>2]&-8|0)!=(n|0)){i=n<<((i|0)==31?0:25-(i>>>1)|0);while(1){e=t+16+(i>>>31<<2)|0;r=pe[e>>2]|0;if(!r)break;if((pe[r+4>>2]&-8|0)==(n|0)){F=r;break r}else{i=i<<1;t=r}}if(e>>>0<(pe[155]|0)>>>0)Xe();else{pe[e>>2]=d;pe[w+(f+24)>>2]=t;pe[w+(f+12)>>2]=d;pe[w+(f+8)>>2]=d;break t}}else F=t}while(0);t=F+8|0;e=pe[t>>2]|0;j=pe[155]|0;if(e>>>0>=j>>>0&F>>>0>=j>>>0){pe[e+12>>2]=d;pe[t>>2]=d;pe[w+(f+8)>>2]=e;pe[w+(f+12)>>2]=F;pe[w+(f+24)>>2]=0;break}else Xe()}else{F=(pe[154]|0)+l|0;pe[154]=F;pe[157]=d;pe[w+(f+4)>>2]=F|1}}while(0);F=w+(h|8)|0;return F|0}else r=1052;while(1){e=pe[r>>2]|0;if(e>>>0<=a>>>0?(t=pe[r+4>>2]|0,i=e+t|0,i>>>0>a>>>0):0)break;r=pe[r+8>>2]|0}n=e+(t+-39)|0;e=e+(t+-47+((n&7|0)==0?0:0-n&7))|0;n=a+16|0;e=e>>>0<n>>>0?a:e;t=e+8|0;r=w+8|0;r=(r&7|0)==0?0:0-r&7;F=p+-40-r|0;pe[157]=w+r;pe[154]=F;pe[w+(r+4)>>2]=F|1;pe[w+(p+-36)>>2]=40;pe[158]=pe[273];r=e+4|0;pe[r>>2]=27;pe[t>>2]=pe[263];pe[t+4>>2]=pe[264];pe[t+8>>2]=pe[265];pe[t+12>>2]=pe[266];pe[263]=w;pe[264]=p;pe[266]=0;pe[265]=t;t=e+28|0;pe[t>>2]=7;if((e+32|0)>>>0<i>>>0)do{F=t;t=t+4|0;pe[t>>2]=7}while((F+8|0)>>>0<i>>>0);if((e|0)!=(a|0)){o=e-a|0;pe[r>>2]=pe[r>>2]&-2;pe[a+4>>2]=o|1;pe[e>>2]=o;t=o>>>3;if(o>>>0<256){e=t<<1;i=644+(e<<2)|0;r=pe[151]|0;t=1<<t;if(r&t){t=644+(e+2<<2)|0;e=pe[t>>2]|0;if(e>>>0<(pe[155]|0)>>>0)Xe();else{O=t;I=e}}else{pe[151]=r|t;O=644+(e+2<<2)|0;I=i}pe[O>>2]=a;pe[I+12>>2]=a;pe[a+8>>2]=I;pe[a+12>>2]=i;break}t=o>>>8;if(t)if(o>>>0>16777215)i=31;else{j=(t+1048320|0)>>>16&8;F=t<<j;L=(F+520192|0)>>>16&4;F=F<<L;i=(F+245760|0)>>>16&2;i=14-(L|j|i)+(F<<i>>>15)|0;i=o>>>(i+7|0)&1|i<<1}else i=0;r=908+(i<<2)|0;pe[a+28>>2]=i;pe[a+20>>2]=0;pe[n>>2]=0;t=pe[152]|0;e=1<<i;if(!(t&e)){pe[152]=t|e;pe[r>>2]=a;pe[a+24>>2]=r;pe[a+12>>2]=a;pe[a+8>>2]=a;break}t=pe[r>>2]|0;t:do{if((pe[t+4>>2]&-8|0)!=(o|0)){i=o<<((i|0)==31?0:25-(i>>>1)|0);while(1){e=t+16+(i>>>31<<2)|0;r=pe[e>>2]|0;if(!r)break;if((pe[r+4>>2]&-8|0)==(o|0)){R=r;break t}else{i=i<<1;t=r}}if(e>>>0<(pe[155]|0)>>>0)Xe();else{pe[e>>2]=a;pe[a+24>>2]=t;pe[a+12>>2]=a;pe[a+8>>2]=a;break e}}else R=t}while(0);t=R+8|0;e=pe[t>>2]|0;F=pe[155]|0;if(e>>>0>=F>>>0&R>>>0>=F>>>0){pe[e+12>>2]=a;pe[t>>2]=a;pe[a+8>>2]=e;pe[a+12>>2]=R;pe[a+24>>2]=0;break}else Xe()}}else{F=pe[155]|0;if((F|0)==0|w>>>0<F>>>0)pe[155]=w;pe[263]=w;pe[264]=p;pe[266]=0;pe[160]=pe[269];pe[159]=-1;t=0;do{F=t<<1;j=644+(F<<2)|0;pe[644+(F+3<<2)>>2]=j;pe[644+(F+2<<2)>>2]=j;t=t+1|0}while((t|0)!=32);F=w+8|0;F=(F&7|0)==0?0:0-F&7;j=p+-40-F|0;pe[157]=w+F;pe[154]=j;pe[w+(F+4)>>2]=j|1;pe[w+(p+-36)>>2]=40;pe[158]=pe[273]}}while(0);t=pe[154]|0;if(t>>>0>v>>>0){j=t-v|0;pe[154]=j;F=pe[157]|0;pe[157]=F+v;pe[F+(v+4)>>2]=j|1;pe[F+4>>2]=v|3;F=F+8|0;return F|0}}F=lr()|0;pe[F>>2]=12;F=0;return F|0}function zr(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0,g=0;if(!e)return;t=e+-8|0;s=pe[155]|0;if(t>>>0<s>>>0)Xe();r=pe[e+-4>>2]|0;i=r&3;if((i|0)==1)Xe();d=r&-8;v=e+(d+-8)|0;do{if(!(r&1)){t=pe[t>>2]|0;if(!i)return;u=-8-t|0;l=e+u|0;f=t+d|0;if(l>>>0<s>>>0)Xe();if((l|0)==(pe[156]|0)){t=e+(d+-4)|0;r=pe[t>>2]|0;if((r&3|0)!=3){g=l;o=f;break}pe[153]=f;pe[t>>2]=r&-2;pe[e+(u+4)>>2]=f|1;pe[v>>2]=f;return}n=t>>>3;if(t>>>0<256){i=pe[e+(u+8)>>2]|0;r=pe[e+(u+12)>>2]|0;t=644+(n<<1<<2)|0;if((i|0)!=(t|0)){if(i>>>0<s>>>0)Xe();if((pe[i+12>>2]|0)!=(l|0))Xe()}if((r|0)==(i|0)){pe[151]=pe[151]&~(1<<n);g=l;o=f;break}if((r|0)!=(t|0)){if(r>>>0<s>>>0)Xe();t=r+8|0;if((pe[t>>2]|0)==(l|0))a=t;else Xe()}else a=r+8|0;pe[i+12>>2]=r;pe[a>>2]=i;g=l;o=f;break}a=pe[e+(u+24)>>2]|0;i=pe[e+(u+12)>>2]|0;do{if((i|0)==(l|0)){r=e+(u+20)|0;t=pe[r>>2]|0;if(!t){r=e+(u+16)|0;t=pe[r>>2]|0;if(!t){c=0;break}}while(1){i=t+20|0;n=pe[i>>2]|0;if(n){t=n;r=i;continue}i=t+16|0;n=pe[i>>2]|0;if(!n)break;else{t=n;r=i}}if(r>>>0<s>>>0)Xe();else{pe[r>>2]=0;c=t;break}}else{n=pe[e+(u+8)>>2]|0;if(n>>>0<s>>>0)Xe();t=n+12|0;if((pe[t>>2]|0)!=(l|0))Xe();r=i+8|0;if((pe[r>>2]|0)==(l|0)){pe[t>>2]=i;pe[r>>2]=n;c=i;break}else Xe()}}while(0);if(a){t=pe[e+(u+28)>>2]|0;r=908+(t<<2)|0;if((l|0)==(pe[r>>2]|0)){pe[r>>2]=c;if(!c){pe[152]=pe[152]&~(1<<t);g=l;o=f;break}}else{if(a>>>0<(pe[155]|0)>>>0)Xe();t=a+16|0;if((pe[t>>2]|0)==(l|0))pe[t>>2]=c;else pe[a+20>>2]=c;if(!c){g=l;o=f;break}}r=pe[155]|0;if(c>>>0<r>>>0)Xe();pe[c+24>>2]=a;t=pe[e+(u+16)>>2]|0;do{if(t)if(t>>>0<r>>>0)Xe();else{pe[c+16>>2]=t;pe[t+24>>2]=c;break}}while(0);t=pe[e+(u+20)>>2]|0;if(t)if(t>>>0<(pe[155]|0)>>>0)Xe();else{pe[c+20>>2]=t;pe[t+24>>2]=c;g=l;o=f;break}else{g=l;o=f}}else{g=l;o=f}}else{g=t;o=d}}while(0);if(g>>>0>=v>>>0)Xe();t=e+(d+-4)|0;r=pe[t>>2]|0;if(!(r&1))Xe();if(!(r&2)){if((v|0)==(pe[157]|0)){y=(pe[154]|0)+o|0;pe[154]=y;pe[157]=g;pe[g+4>>2]=y|1;if((g|0)!=(pe[156]|0))return;pe[156]=0;pe[153]=0;return}if((v|0)==(pe[156]|0)){y=(pe[153]|0)+o|0;pe[153]=y;pe[156]=g;pe[g+4>>2]=y|1;pe[g+y>>2]=y;return}o=(r&-8)+o|0;n=r>>>3;do{if(r>>>0>=256){a=pe[e+(d+16)>>2]|0;t=pe[e+(d|4)>>2]|0;do{if((t|0)==(v|0)){r=e+(d+12)|0;t=pe[r>>2]|0;if(!t){r=e+(d+8)|0;t=pe[r>>2]|0;if(!t){p=0;break}}while(1){i=t+20|0;n=pe[i>>2]|0;if(n){t=n;r=i;continue}i=t+16|0;n=pe[i>>2]|0;if(!n)break;else{t=n;r=i}}if(r>>>0<(pe[155]|0)>>>0)Xe();else{pe[r>>2]=0;p=t;break}}else{r=pe[e+d>>2]|0;if(r>>>0<(pe[155]|0)>>>0)Xe();i=r+12|0;if((pe[i>>2]|0)!=(v|0))Xe();n=t+8|0;if((pe[n>>2]|0)==(v|0)){pe[i>>2]=t;pe[n>>2]=r;p=t;break}else Xe()}}while(0);if(a){t=pe[e+(d+20)>>2]|0;r=908+(t<<2)|0;if((v|0)==(pe[r>>2]|0)){pe[r>>2]=p;if(!p){pe[152]=pe[152]&~(1<<t);break}}else{if(a>>>0<(pe[155]|0)>>>0)Xe();t=a+16|0;if((pe[t>>2]|0)==(v|0))pe[t>>2]=p;else pe[a+20>>2]=p;if(!p)break}r=pe[155]|0;if(p>>>0<r>>>0)Xe();pe[p+24>>2]=a;t=pe[e+(d+8)>>2]|0;do{if(t)if(t>>>0<r>>>0)Xe();else{pe[p+16>>2]=t;pe[t+24>>2]=p;break}}while(0);t=pe[e+(d+12)>>2]|0;if(t)if(t>>>0<(pe[155]|0)>>>0)Xe();else{pe[p+20>>2]=t;pe[t+24>>2]=p;break}}}else{i=pe[e+d>>2]|0;r=pe[e+(d|4)>>2]|0;t=644+(n<<1<<2)|0;if((i|0)!=(t|0)){if(i>>>0<(pe[155]|0)>>>0)Xe();if((pe[i+12>>2]|0)!=(v|0))Xe()}if((r|0)==(i|0)){pe[151]=pe[151]&~(1<<n);break}if((r|0)!=(t|0)){if(r>>>0<(pe[155]|0)>>>0)Xe();t=r+8|0;if((pe[t>>2]|0)==(v|0))h=t;else Xe()}else h=r+8|0;pe[i+12>>2]=r;pe[h>>2]=i}}while(0);pe[g+4>>2]=o|1;pe[g+o>>2]=o;if((g|0)==(pe[156]|0)){pe[153]=o;return}}else{pe[t>>2]=r&-2;pe[g+4>>2]=o|1;pe[g+o>>2]=o}t=o>>>3;if(o>>>0<256){r=t<<1;n=644+(r<<2)|0;i=pe[151]|0;t=1<<t;if(i&t){t=644+(r+2<<2)|0;r=pe[t>>2]|0;if(r>>>0<(pe[155]|0)>>>0)Xe();else{m=t;b=r}}else{pe[151]=i|t;m=644+(r+2<<2)|0;b=n}pe[m>>2]=g;pe[b+12>>2]=g;pe[g+8>>2]=b;pe[g+12>>2]=n;return}t=o>>>8;if(t)if(o>>>0>16777215)n=31;else{m=(t+1048320|0)>>>16&8;b=t<<m;v=(b+520192|0)>>>16&4;b=b<<v;n=(b+245760|0)>>>16&2;n=14-(v|m|n)+(b<<n>>>15)|0;n=o>>>(n+7|0)&1|n<<1}else n=0;t=908+(n<<2)|0;pe[g+28>>2]=n;pe[g+20>>2]=0;pe[g+16>>2]=0;r=pe[152]|0;i=1<<n;e:do{if(r&i){t=pe[t>>2]|0;t:do{if((pe[t+4>>2]&-8|0)!=(o|0)){n=o<<((n|0)==31?0:25-(n>>>1)|0);while(1){r=t+16+(n>>>31<<2)|0;i=pe[r>>2]|0;if(!i)break;if((pe[i+4>>2]&-8|0)==(o|0)){y=i;break t}else{n=n<<1;t=i}}if(r>>>0<(pe[155]|0)>>>0)Xe();else{pe[r>>2]=g;pe[g+24>>2]=t;pe[g+12>>2]=g;pe[g+8>>2]=g;break e}}else y=t}while(0);t=y+8|0;r=pe[t>>2]|0;b=pe[155]|0;if(r>>>0>=b>>>0&y>>>0>=b>>>0){pe[r+12>>2]=g;pe[t>>2]=g;pe[g+8>>2]=r;pe[g+12>>2]=y;pe[g+24>>2]=0;break}else Xe()}else{pe[152]=r|i;pe[t>>2]=g;pe[g+24>>2]=t;pe[g+12>>2]=g;pe[g+8>>2]=g}}while(0);g=(pe[159]|0)+-1|0;pe[159]=g;if(!g)t=1060;else return;while(1){t=pe[t>>2]|0;if(!t)break;else t=t+8|0}pe[159]=-1;return}function Xr(e,t){e=e|0;t=t|0;var r=0,i=0;if(!e){e=Ur(t)|0;return e|0}if(t>>>0>4294967231){e=lr()|0;pe[e>>2]=12;e=0;return e|0}r=qr(e+-8|0,t>>>0<11?16:t+11&-8)|0;if(r){e=r+8|0;return e|0}r=Ur(t)|0;if(!r){e=0;return e|0}i=pe[e+-4>>2]|0;i=(i&-8)-((i&3|0)==0?8:4)|0;Qr(r|0,e|0,(i>>>0<t>>>0?i:t)|0)|0;zr(e);e=r;return e|0}function Wr(e){e=e|0;var t=0;if(!e){t=0;return t|0}e=pe[e+-4>>2]|0;t=e&3;if((t|0)==1){t=0;return t|0}t=(e&-8)-((t|0)==0?8:4)|0;return t|0}function qr(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0;d=e+4|0;p=pe[d>>2]|0;u=p&-8;l=e+u|0;s=pe[155]|0;r=p&3;if(!((r|0)!=1&e>>>0>=s>>>0&e>>>0<l>>>0))Xe();i=e+(u|4)|0;n=pe[i>>2]|0;if(!(n&1))Xe();if(!r){if(t>>>0<256){e=0;return e|0}if(u>>>0>=(t+4|0)>>>0?(u-t|0)>>>0<=pe[271]<<1>>>0:0)return e|0;e=0;return e|0}if(u>>>0>=t>>>0){r=u-t|0;if(r>>>0<=15)return e|0;pe[d>>2]=p&1|t|2;pe[e+(t+4)>>2]=r|3;pe[i>>2]=pe[i>>2]|1;Hr(e+t|0,r);return e|0}if((l|0)==(pe[157]|0)){r=(pe[154]|0)+u|0;if(r>>>0<=t>>>0){e=0;return e|0}h=r-t|0;pe[d>>2]=p&1|t|2;pe[e+(t+4)>>2]=h|1;pe[157]=e+t;pe[154]=h;return e|0}if((l|0)==(pe[156]|0)){i=(pe[153]|0)+u|0;if(i>>>0<t>>>0){e=0;return e|0}r=i-t|0;if(r>>>0>15){pe[d>>2]=p&1|t|2;pe[e+(t+4)>>2]=r|1;pe[e+i>>2]=r;i=e+(i+4)|0;pe[i>>2]=pe[i>>2]&-2;i=e+t|0}else{pe[d>>2]=p&1|i|2;i=e+(i+4)|0;pe[i>>2]=pe[i>>2]|1;i=0;r=0}pe[153]=r;pe[156]=i;return e|0}if(n&2){e=0;return e|0}f=(n&-8)+u|0;if(f>>>0<t>>>0){e=0;return e|0}h=f-t|0;o=n>>>3;do{if(n>>>0>=256){a=pe[e+(u+24)>>2]|0;o=pe[e+(u+12)>>2]|0;do{if((o|0)==(l|0)){i=e+(u+20)|0;r=pe[i>>2]|0;if(!r){i=e+(u+16)|0;r=pe[i>>2]|0;if(!r){c=0;break}}while(1){n=r+20|0;o=pe[n>>2]|0;if(o){r=o;i=n;continue}n=r+16|0;o=pe[n>>2]|0;if(!o)break;else{r=o;i=n}}if(i>>>0<s>>>0)Xe();else{pe[i>>2]=0;c=r;break}}else{n=pe[e+(u+8)>>2]|0;if(n>>>0<s>>>0)Xe();r=n+12|0;if((pe[r>>2]|0)!=(l|0))Xe();i=o+8|0;if((pe[i>>2]|0)==(l|0)){pe[r>>2]=o;pe[i>>2]=n;c=o;break}else Xe()}}while(0);if(a){r=pe[e+(u+28)>>2]|0;i=908+(r<<2)|0;if((l|0)==(pe[i>>2]|0)){pe[i>>2]=c;if(!c){pe[152]=pe[152]&~(1<<r);break}}else{if(a>>>0<(pe[155]|0)>>>0)Xe();r=a+16|0;if((pe[r>>2]|0)==(l|0))pe[r>>2]=c;else pe[a+20>>2]=c;if(!c)break}i=pe[155]|0;if(c>>>0<i>>>0)Xe();pe[c+24>>2]=a;r=pe[e+(u+16)>>2]|0;do{if(r)if(r>>>0<i>>>0)Xe();else{pe[c+16>>2]=r;pe[r+24>>2]=c;break}}while(0);r=pe[e+(u+20)>>2]|0;if(r)if(r>>>0<(pe[155]|0)>>>0)Xe();else{pe[c+20>>2]=r;pe[r+24>>2]=c;break}}}else{n=pe[e+(u+8)>>2]|0;i=pe[e+(u+12)>>2]|0;r=644+(o<<1<<2)|0;if((n|0)!=(r|0)){if(n>>>0<s>>>0)Xe();if((pe[n+12>>2]|0)!=(l|0))Xe()}if((i|0)==(n|0)){pe[151]=pe[151]&~(1<<o);break}if((i|0)!=(r|0)){if(i>>>0<s>>>0)Xe();r=i+8|0;if((pe[r>>2]|0)==(l|0))a=r;else Xe()}else a=i+8|0;pe[n+12>>2]=i;pe[a>>2]=n}}while(0);if(h>>>0<16){pe[d>>2]=f|p&1|2;t=e+(f|4)|0;pe[t>>2]=pe[t>>2]|1;return e|0}else{pe[d>>2]=p&1|t|2;pe[e+(t+4)>>2]=h|3;p=e+(f|4)|0;pe[p>>2]=pe[p>>2]|1;Hr(e+t|0,h);return e|0}return 0}function Hr(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,m=0,b=0,y=0;v=e+t|0;r=pe[e+4>>2]|0;do{if(!(r&1)){c=pe[e>>2]|0;if(!(r&3))return;h=e+(0-c)|0;f=c+t|0;u=pe[155]|0;if(h>>>0<u>>>0)Xe();if((h|0)==(pe[156]|0)){i=e+(t+4)|0;r=pe[i>>2]|0;if((r&3|0)!=3){y=h;a=f;break}pe[153]=f;pe[i>>2]=r&-2;pe[e+(4-c)>>2]=f|1;pe[v>>2]=f;return}o=c>>>3;if(c>>>0<256){n=pe[e+(8-c)>>2]|0;i=pe[e+(12-c)>>2]|0;r=644+(o<<1<<2)|0;if((n|0)!=(r|0)){if(n>>>0<u>>>0)Xe();if((pe[n+12>>2]|0)!=(h|0))Xe()}if((i|0)==(n|0)){pe[151]=pe[151]&~(1<<o);y=h;a=f;break}if((i|0)!=(r|0)){if(i>>>0<u>>>0)Xe();r=i+8|0;if((pe[r>>2]|0)==(h|0))s=r;else Xe()}else s=i+8|0;pe[n+12>>2]=i;pe[s>>2]=n;y=h;a=f;break}s=pe[e+(24-c)>>2]|0;n=pe[e+(12-c)>>2]|0;do{if((n|0)==(h|0)){n=16-c|0;i=e+(n+4)|0;r=pe[i>>2]|0;if(!r){i=e+n|0;r=pe[i>>2]|0;if(!r){l=0;break}}while(1){n=r+20|0;o=pe[n>>2]|0;if(o){r=o;i=n;continue}n=r+16|0;o=pe[n>>2]|0;if(!o)break;else{r=o;i=n}}if(i>>>0<u>>>0)Xe();else{pe[i>>2]=0;l=r;break}}else{o=pe[e+(8-c)>>2]|0;if(o>>>0<u>>>0)Xe();r=o+12|0;if((pe[r>>2]|0)!=(h|0))Xe();i=n+8|0;if((pe[i>>2]|0)==(h|0)){pe[r>>2]=n;pe[i>>2]=o;l=n;break}else Xe()}}while(0);if(s){r=pe[e+(28-c)>>2]|0;i=908+(r<<2)|0;if((h|0)==(pe[i>>2]|0)){pe[i>>2]=l;if(!l){pe[152]=pe[152]&~(1<<r);y=h;a=f;break}}else{if(s>>>0<(pe[155]|0)>>>0)Xe();r=s+16|0;if((pe[r>>2]|0)==(h|0))pe[r>>2]=l;else pe[s+20>>2]=l;if(!l){y=h;a=f;break}}n=pe[155]|0;if(l>>>0<n>>>0)Xe();pe[l+24>>2]=s;r=16-c|0;i=pe[e+r>>2]|0;do{if(i)if(i>>>0<n>>>0)Xe();else{pe[l+16>>2]=i;pe[i+24>>2]=l;break}}while(0);r=pe[e+(r+4)>>2]|0;if(r)if(r>>>0<(pe[155]|0)>>>0)Xe();else{pe[l+20>>2]=r;pe[r+24>>2]=l;y=h;a=f;break}else{y=h;a=f}}else{y=h;a=f}}else{y=e;a=t}}while(0);u=pe[155]|0;if(v>>>0<u>>>0)Xe();r=e+(t+4)|0;i=pe[r>>2]|0;if(!(i&2)){if((v|0)==(pe[157]|0)){b=(pe[154]|0)+a|0;pe[154]=b;pe[157]=y;pe[y+4>>2]=b|1;if((y|0)!=(pe[156]|0))return;pe[156]=0;pe[153]=0;return}if((v|0)==(pe[156]|0)){b=(pe[153]|0)+a|0;pe[153]=b;pe[156]=y;pe[y+4>>2]=b|1;pe[y+b>>2]=b;return}a=(i&-8)+a|0;o=i>>>3;do{if(i>>>0>=256){s=pe[e+(t+24)>>2]|0;n=pe[e+(t+12)>>2]|0;do{if((n|0)==(v|0)){i=e+(t+20)|0;r=pe[i>>2]|0;if(!r){i=e+(t+16)|0;r=pe[i>>2]|0;if(!r){p=0;break}}while(1){n=r+20|0;o=pe[n>>2]|0;if(o){r=o;i=n;continue}n=r+16|0;o=pe[n>>2]|0;if(!o)break;else{r=o;i=n}}if(i>>>0<u>>>0)Xe();else{pe[i>>2]=0;p=r;break}}else{o=pe[e+(t+8)>>2]|0;if(o>>>0<u>>>0)Xe();r=o+12|0;if((pe[r>>2]|0)!=(v|0))Xe();i=n+8|0;if((pe[i>>2]|0)==(v|0)){pe[r>>2]=n;pe[i>>2]=o;p=n;break}else Xe()}}while(0);if(s){r=pe[e+(t+28)>>2]|0;i=908+(r<<2)|0;if((v|0)==(pe[i>>2]|0)){pe[i>>2]=p;if(!p){pe[152]=pe[152]&~(1<<r);break}}else{if(s>>>0<(pe[155]|0)>>>0)Xe();r=s+16|0;if((pe[r>>2]|0)==(v|0))pe[r>>2]=p;else pe[s+20>>2]=p;if(!p)break}i=pe[155]|0;if(p>>>0<i>>>0)Xe();pe[p+24>>2]=s;r=pe[e+(t+16)>>2]|0;do{if(r)if(r>>>0<i>>>0)Xe();else{pe[p+16>>2]=r;pe[r+24>>2]=p;break}}while(0);r=pe[e+(t+20)>>2]|0;if(r)if(r>>>0<(pe[155]|0)>>>0)Xe();else{pe[p+20>>2]=r;pe[r+24>>2]=p;break}}}else{n=pe[e+(t+8)>>2]|0;i=pe[e+(t+12)>>2]|0;r=644+(o<<1<<2)|0;if((n|0)!=(r|0)){if(n>>>0<u>>>0)Xe();if((pe[n+12>>2]|0)!=(v|0))Xe()}if((i|0)==(n|0)){pe[151]=pe[151]&~(1<<o);break}if((i|0)!=(r|0)){if(i>>>0<u>>>0)Xe();r=i+8|0;if((pe[r>>2]|0)==(v|0))d=r;else Xe()}else d=i+8|0;pe[n+12>>2]=i;pe[d>>2]=n}}while(0);pe[y+4>>2]=a|1;pe[y+a>>2]=a;if((y|0)==(pe[156]|0)){pe[153]=a;return}}else{pe[r>>2]=i&-2;pe[y+4>>2]=a|1;pe[y+a>>2]=a}r=a>>>3;if(a>>>0<256){i=r<<1;o=644+(i<<2)|0;n=pe[151]|0;r=1<<r;if(n&r){r=644+(i+2<<2)|0;i=pe[r>>2]|0;if(i>>>0<(pe[155]|0)>>>0)Xe();else{m=r;b=i}}else{pe[151]=n|r;m=644+(i+2<<2)|0;b=o}pe[m>>2]=y;pe[b+12>>2]=y;pe[y+8>>2]=b;pe[y+12>>2]=o;return}r=a>>>8;if(r)if(a>>>0>16777215)o=31;else{m=(r+1048320|0)>>>16&8;b=r<<m;v=(b+520192|0)>>>16&4;b=b<<v;o=(b+245760|0)>>>16&2;o=14-(v|m|o)+(b<<o>>>15)|0;o=a>>>(o+7|0)&1|o<<1}else o=0;r=908+(o<<2)|0;pe[y+28>>2]=o;pe[y+20>>2]=0;pe[y+16>>2]=0;i=pe[152]|0;n=1<<o;if(!(i&n)){pe[152]=i|n;pe[r>>2]=y;pe[y+24>>2]=r;pe[y+12>>2]=y;pe[y+8>>2]=y;return}r=pe[r>>2]|0;e:do{if((pe[r+4>>2]&-8|0)!=(a|0)){o=a<<((o|0)==31?0:25-(o>>>1)|0);while(1){i=r+16+(o>>>31<<2)|0;n=pe[i>>2]|0;if(!n)break;if((pe[n+4>>2]&-8|0)==(a|0)){r=n;break e}else{o=o<<1;r=n}}if(i>>>0<(pe[155]|0)>>>0)Xe();pe[i>>2]=y;pe[y+24>>2]=r;pe[y+12>>2]=y;pe[y+8>>2]=y;return}}while(0);i=r+8|0;n=pe[i>>2]|0;b=pe[155]|0;if(!(n>>>0>=b>>>0&r>>>0>=b>>>0))Xe();pe[n+12>>2]=y;pe[i>>2]=y;pe[y+8>>2]=n;pe[y+12>>2]=r;pe[y+24>>2]=0;return}function Gr(){}function Vr(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;i=t-i-(r>>>0>e>>>0|0)>>>0;return(re=i,e-r>>>0|0)|0}function Yr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0,a=0;i=e+r|0;if((r|0)>=20){t=t&255;o=e&3;a=t|t<<8|t<<16|t<<24;n=i&~3;if(o){o=e+4-o|0;while((e|0)<(o|0)){de[e>>0]=t;e=e+1|0}}while((e|0)<(n|0)){pe[e>>2]=a;e=e+4|0}}while((e|0)<(i|0)){de[e>>0]=t;e=e+1|0}return e-r|0}function Jr(e,t,r){e=e|0;t=t|0;r=r|0;if((r|0)<32){re=t>>>r;return e>>>r|(t&(1<<r)-1)<<32-r}re=0;return t>>>r-32|0}function Kr(e,t,r){e=e|0;t=t|0;r=r|0;if((r|0)<32){re=t<<r|(e&(1<<r)-1<<32-r)>>>32-r;return e<<r}re=e<<r-32;return 0}function Zr(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;r=e+r>>>0;return(re=t+i+(r>>>0<e>>>0|0)>>>0,r|0)|0}function Qr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;if((r|0)>=4096)return Ie(e|0,t|0,r|0)|0;i=e|0;if((e&3)==(t&3)){while(e&3){if(!r)return i|0;de[e>>0]=de[t>>0]|0;e=e+1|0;t=t+1|0;r=r-1|0}while((r|0)>=4){pe[e>>2]=pe[t>>2];e=e+4|0;t=t+4|0;r=r-4|0}}while((r|0)>0){de[e>>0]=de[t>>0]|0;e=e+1|0;t=t+1|0;r=r-1|0}return i|0}function $r(e,t,r){e=e|0;t=t|0;r=r|0;if((r|0)<32){re=t>>r;return e>>>r|(t&(1<<r)-1)<<32-r}re=(t|0)<0?-1:0;return t>>r-32|0}function ei(e){e=e|0;var t=0;t=de[m+(e&255)>>0]|0;if((t|0)<8)return t|0;t=de[m+(e>>8&255)>>0]|0;if((t|0)<8)return t+8|0;t=de[m+(e>>16&255)>>0]|0;if((t|0)<8)return t+16|0;return(de[m+(e>>>24)>>0]|0)+24|0}function ti(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0;o=e&65535;n=t&65535;r=ye(n,o)|0;i=e>>>16;e=(r>>>16)+(ye(n,i)|0)|0;n=t>>>16;t=ye(n,o)|0;return(re=(e>>>16)+(ye(n,i)|0)+(((e&65535)+t|0)>>>16)|0,e+t<<16|r&65535|0)|0}function ri(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,o=0,a=0,s=0,u=0,c=0;c=t>>31|((t|0)<0?-1:0)<<1;u=((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1;o=i>>31|((i|0)<0?-1:0)<<1;n=((i|0)<0?-1:0)>>31|((i|0)<0?-1:0)<<1;s=Vr(c^e,u^t,c,u)|0;a=re;e=o^c;t=n^u;return Vr((si(s,a,Vr(o^r,n^i,o,n)|0,re,0)|0)^e,re^t,e,t)|0}function ii(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,o=0,a=0,s=0,u=0,c=0;n=be;be=be+16|0;s=n|0;a=t>>31|((t|0)<0?-1:0)<<1;o=((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1;c=i>>31|((i|0)<0?-1:0)<<1;u=((i|0)<0?-1:0)>>31|((i|0)<0?-1:0)<<1;e=Vr(a^e,o^t,a,o)|0;t=re;si(e,t,Vr(c^r,u^i,c,u)|0,re,s)|0;i=Vr(pe[s>>2]^a,pe[s+4>>2]^o,a,o)|0;r=re;be=n;return(re=r,i)|0}function ni(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,o=0;n=e;o=r;r=ti(n,o)|0;e=re;return(re=(ye(t,o)|0)+(ye(i,n)|0)+e|e&0,r|0|0)|0}function oi(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;return si(e,t,r,i,0)|0}function ai(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,o=0;o=be;be=be+16|0;n=o|0;si(e,t,r,i,n)|0;be=o;return(re=pe[n+4>>2]|0,pe[n>>2]|0)|0}function si(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0;l=e;u=t;c=u;a=r;h=i;s=h;if(!c){o=(n|0)!=0;if(!s){if(o){pe[n>>2]=(l>>>0)%(a>>>0);pe[n+4>>2]=0}h=0;n=(l>>>0)/(a>>>0)>>>0;return(re=h,n)|0}else{if(!o){h=0;n=0;return(re=h,n)|0}pe[n>>2]=e|0;pe[n+4>>2]=t&0;h=0;n=0;return(re=h,n)|0}}o=(s|0)==0;do{if(a){if(!o){o=(ae(s|0)|0)-(ae(c|0)|0)|0;if(o>>>0<=31){f=o+1|0;s=31-o|0;t=o-31>>31;a=f;e=l>>>(f>>>0)&t|c<<s;t=c>>>(f>>>0)&t;o=0;s=l<<s;break}if(!n){h=0;n=0;return(re=h,n)|0}pe[n>>2]=e|0;pe[n+4>>2]=u|t&0;h=0;n=0;return(re=h,n)|0}o=a-1|0;if(o&a){s=(ae(a|0)|0)+33-(ae(c|0)|0)|0;p=64-s|0;f=32-s|0;u=f>>31;d=s-32|0;t=d>>31;a=s;e=f-1>>31&c>>>(d>>>0)|(c<<f|l>>>(s>>>0))&t;t=t&c>>>(s>>>0);o=l<<p&u;s=(c<<p|l>>>(d>>>0))&u|l<<f&s-33>>31;break}if(n){pe[n>>2]=o&l;pe[n+4>>2]=0}if((a|0)==1){d=u|t&0;p=e|0|0;return(re=d,p)|0}else{p=ei(a|0)|0;d=c>>>(p>>>0)|0;p=c<<32-p|l>>>(p>>>0)|0;return(re=d,p)|0}}else{if(o){if(n){pe[n>>2]=(c>>>0)%(a>>>0);pe[n+4>>2]=0}d=0;p=(c>>>0)/(a>>>0)>>>0;return(re=d,p)|0}if(!l){if(n){pe[n>>2]=0;pe[n+4>>2]=(c>>>0)%(s>>>0)}d=0;p=(c>>>0)/(s>>>0)>>>0;return(re=d,p)|0}o=s-1|0;if(!(o&s)){if(n){pe[n>>2]=e|0;pe[n+4>>2]=o&c|t&0}d=0;p=c>>>((ei(s|0)|0)>>>0);return(re=d,p)|0}o=(ae(s|0)|0)-(ae(c|0)|0)|0;if(o>>>0<=30){t=o+1|0;s=31-o|0;a=t;e=c<<s|l>>>(t>>>0);t=c>>>(t>>>0);o=0;s=l<<s;break}if(!n){d=0;p=0;return(re=d,p)|0}pe[n>>2]=e|0;pe[n+4>>2]=u|t&0;d=0;p=0;return(re=d,p)|0}}while(0);if(!a){c=s;u=0;s=0}else{f=r|0|0;l=h|i&0;c=Zr(f|0,l|0,-1,-1)|0;r=re;u=s;s=0;do{i=u;u=o>>>31|u<<1;o=s|o<<1;i=e<<1|i>>>31|0;h=e>>>31|t<<1|0;Vr(c,r,i,h)|0;p=re;d=p>>31|((p|0)<0?-1:0)<<1;s=d&1;e=Vr(i,h,d&f,(((p|0)<0?-1:0)>>31|((p|0)<0?-1:0)<<1)&l)|0;t=re;a=a-1|0}while((a|0)!=0);c=u;u=0}a=0;if(n){pe[n>>2]=e;pe[n+4>>2]=t}d=(o|0)>>>31|(c|a)<<1|(a<<1|o>>>31)&0|u;p=(o<<1|0>>>31)&-2|s;return(re=d,p)|0}function ui(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;return Pi[e&7](t|0,r|0,i|0)|0}function ci(e,t,r,i,n,o){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;Ei[e&3](t|0,r|0,i|0,n|0,o|0)}function li(e,t){e=e|0;t=t|0;ki[e&7](t|0)}function fi(e,t){e=e|0;t=t|0;return Ci[e&1](t|0)|0}function hi(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;Ai[e&0](t|0,r|0,i|0)}function di(e){e=e|0;Oi[e&3]()}function pi(e,t,r,i,n,o,a){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;a=a|0;Ii[e&3](t|0,r|0,i|0,n|0,o|0,a|0)}function vi(e,t,r,i,n,o){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;return Ri[e&1](t|0,r|0,i|0,n|0,o|0)|0}function mi(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;Di[e&3](t|0,r|0,i|0,n|0)}function bi(e,t,r){e=e|0;t=t|0;r=r|0;se(0);return 0}function yi(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;se(1)}function gi(e){e=e|0;se(2)}function _i(e){e=e|0;se(3);return 0}function wi(e,t,r){e=e|0;t=t|0;r=r|0;se(4)}function xi(){se(5)}function Ti(e,t,r,i,n,o){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;se(6)}function Si(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;se(7);return 0}function Mi(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;se(8)}var Pi=[bi,Yt,jr,Cr,kr,Ar,bi,bi];var Ei=[yi,tr,er,yi];var ki=[gi,Wt,Gt,qt,Ht,Vt,ur,Lr];var Ci=[_i,Er];var Ai=[wi];var Oi=[xi,ar,sr,xi];var Ii=[Ti,ir,rr,Ti];var Ri=[Si,ut];var Di=[Mi,Kt,Zt,Mi];return{___cxa_can_catch:nr,_crn_get_levels:Tt,_crn_get_uncompressed_size:Mt,_crn_decompress:Pt,_i64Add:Zr,_crn_get_width:wt,___cxa_is_pointer_type:or,_i64Subtract:Vr,_memset:Yr,_malloc:Ur,_free:zr,_memcpy:Qr,_bitshift64Lshr:Jr,_fflush:mr,_bitshift64Shl:Kr,_crn_get_height:xt,___errno_location:lr,_crn_get_dxt_format:St,runPostSets:Gr,_emscripten_replace_memory:Ye,stackAlloc:Je,stackSave:Ke,stackRestore:Ze,establishStackSpace:Qe,setThrew:$e,setTempRet0:rt,getTempRet0:it,dynCall_iiii:ui,dynCall_viiiii:ci,dynCall_vi:li,dynCall_ii:fi,dynCall_viii:hi,dynCall_v:di,dynCall_viiiiii:pi,dynCall_iiiiii:vi,dynCall_viiii:mi}}(e.Ya,e.Za,buffer);e.___cxa_can_catch=Z.___cxa_can_catch,e._crn_get_levels=Z._crn_get_levels,e.runPostSets=Z.runPostSets,e._crn_get_uncompressed_size=Z._crn_get_uncompressed_size,e._crn_decompress=Z._crn_decompress;var zc=e._i64Add=Z._i64Add;e._crn_get_height=Z._crn_get_height,e.___cxa_is_pointer_type=Z.___cxa_is_pointer_type;var nb=e._i64Subtract=Z._i64Subtract,qb=e._memset=Z._memset,Ea=e._malloc=Z._malloc,Bc=e._memcpy=Z._memcpy,Xa=e._emscripten_replace_memory=Z._emscripten_replace_memory;e._crn_get_dxt_format=Z._crn_get_dxt_format;var rb=e._bitshift64Lshr=Z._bitshift64Lshr,Na=e._free=Z._free;e._fflush=Z._fflush,e._crn_get_width=Z._crn_get_width,e.___errno_location=Z.___errno_location;var sb=e._bitshift64Shl=Z._bitshift64Shl;function ia(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}e.dynCall_iiii=Z.dynCall_iiii,e.dynCall_viiiii=Z.dynCall_viiiii,e.dynCall_vi=Z.dynCall_vi,e.dynCall_ii=Z.dynCall_ii,e.dynCall_viii=Z.dynCall_viii,e.dynCall_v=Z.dynCall_v,e.dynCall_viiiiii=Z.dynCall_viiiiii,e.dynCall_iiiiii=Z.dynCall_iiiiii,e.dynCall_viiii=Z.dynCall_viiii,n.aa=Z.stackAlloc,n.ua=Z.stackSave,n.ba=Z.stackRestore,n.Cd=Z.establishStackSpace,n.rb=Z.setTempRet0,n.fb=Z.getTempRet0,ia.prototype=Error(),ia.prototype.constructor=ia;var rd=null,jb=function t(){e.calledRun||td(),e.calledRun||(jb=t)};function td(t){function r(){if(!e.calledRun&&(e.calledRun=!0,!na)){if(Ha||(Ha=!0,ab(cb)),ab(db),e.onRuntimeInitialized&&e.onRuntimeInitialized(),e._main&&vd&&e.callMain(t),e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;)gb(e.postRun.shift());ab(eb)}}if(t=t||e.arguments,null===rd&&(rd=Date.now()),!(0<I)){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)fb(e.preRun.shift());ab(bb),0<I||e.calledRun||(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1),r()},1)):r())}}function ud(t,r){if(!r||!e.noExitRuntime)throw!e.noExitRuntime&&(na=!0,m=void 0,ab(H),e.onExit)&&e.onExit(t),da?(process.stdout.once("drain",function(){process.exit(t)}),console.log(" "),setTimeout(function(){process.exit(t)},500)):ea&&"function"==typeof quit&&quit(t),new ia(t)}e.callMain=e.zd=function(t){function r(){for(var e=0;e<3;e++)n.push(0)}assert(0==I,"cannot call main when async dependencies remain! (listen on __ATMAIN__)"),assert(0==bb.length,"cannot call main when preRun functions remain to be called"),t=t||[],Ha||(Ha=!0,ab(cb));var i=t.length+1,n=[D(hb(e.thisProgram),"i8",0)];r();for(var o=0;o<i-1;o+=1)n.push(D(hb(t[o]),"i8",0)),r();n.push(0),n=D(n,"i32",0);try{ud(e._main(i,n,0),!0)}catch(t){if(!(t instanceof ia)){if("SimulateInfiniteLoop"!=t)throw t&&"object"==typeof t&&t.stack&&e.W("exception thrown: "+[t,t.stack]),t;e.noExitRuntime=!0}}},e.run=e.run=td,e.exit=e.exit=ud;var wd=[];function x(t){t=void 0!==t?(e.print(t),e.W(t),JSON.stringify(t)):"",na=!0;var r="abort("+t+") at "+Oa()+"\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";throw wd&&wd.forEach(function(e){r=e(r,t)}),r}if(e.abort=e.abort=x,e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);0<e.preInit.length;)e.preInit.pop()();var vd=!0;e.noInitialRun&&(vd=!1),td(),window.Module=e}).call(this,require("_process"),require("buffer").Buffer,"/lib")},{_process:123,buffer:49,crypto:58,fs:47,path:116}],2:[function(e,t,r){var i=r;i.bignum=e("bn.js"),i.define=e("./asn1/api").define,i.base=e("./asn1/base"),i.constants=e("./asn1/constants"),i.decoders=e("./asn1/decoders"),i.encoders=e("./asn1/encoders")},{"./asn1/api":3,"./asn1/base":5,"./asn1/constants":9,"./asn1/decoders":11,"./asn1/encoders":14,"bn.js":17}],3:[function(e,t,r){var i=e("../asn1"),n=e("inherits");function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}r.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(t){var r;try{r=e("vm").runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){r=function(e){this._initNamed(e)}}return n(r,t),r.prototype._initNamed=function(e){t.call(this,e)},new r(this)},o.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i.decoders[e])),this.decoders[e]},o.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},o.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(i.encoders[e])),this.encoders[e]},o.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},{"../asn1":2,inherits:103,vm:155}],4:[function(e,t,r){var i=e("inherits"),n=e("../base").Reporter,o=e("buffer").Buffer;function a(e,t){n.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function s(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof s||(e=new s(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}i(a,n),(r.DecoderBuffer=a).prototype.save=function(){return{offset:this.offset,reporter:n.prototype.save.call(this)}},a.prototype.restore=function(e){var t=new a(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,n.prototype.restore.call(this,e.reporter),t},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},a.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new a(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},a.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},(r.EncoderBuffer=s).prototype.join=function(t,r){return t||(t=new o(this.length)),r||(r=0),0===this.length||(Array.isArray(this.value)?this.value.forEach(function(e){e.join(t,r),r+=e.length}):("number"==typeof this.value?t[r]=this.value:"string"==typeof this.value?t.write(this.value,r):o.isBuffer(this.value)&&this.value.copy(t,r),r+=this.length)),t}},{"../base":5,buffer:49,inherits:103}],5:[function(e,t,r){var i=r;i.Reporter=e("./reporter").Reporter,i.DecoderBuffer=e("./buffer").DecoderBuffer,i.EncoderBuffer=e("./buffer").EncoderBuffer,i.Node=e("./node")},{"./buffer":4,"./node":6,"./reporter":7}],6:[function(e,t,r){var l=e("../base").Reporter,i=e("../base").EncoderBuffer,d=e("../base").DecoderBuffer,n=e("minimalistic-assert"),o=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],a=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(o);function s(e,t){var r={};(this._baseState=r).enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}t.exports=s;var u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];s.prototype.clone=function(){var t=this._baseState,r={};u.forEach(function(e){r[e]=t[e]});var e=new this.constructor(r.parent);return e._baseState=r,e},s.prototype._wrap=function(){var r=this._baseState;a.forEach(function(t){this[t]=function(){var e=new this.constructor(this);return r.children.push(e),e[t].apply(e,arguments)}},this)},s.prototype._init=function(e){var t=this._baseState;n(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),n.equal(t.children.length,1,"Root node can have only one child")},s.prototype._useArgs=function(e){var t=this._baseState,r=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==r.length&&(n(null===t.children),(t.children=r).forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(n(null===t.args),t.args=e,t.reverseArgs=e.map(function(r){if("object"!=typeof r||r.constructor!==Object)return r;var i={};return Object.keys(r).forEach(function(e){e==(0|e)&&(e|=0);var t=r[e];i[t]=e}),i}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(t){s.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}}),o.forEach(function(r){s.prototype[r]=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return n(null===e.tag),e.tag=r,this._useArgs(t),this}}),s.prototype.use=function(e){n(e);var t=this._baseState;return n(null===t.use),t.use=e,this},s.prototype.optional=function(){return this._baseState.optional=!0,this},s.prototype.def=function(e){var t=this._baseState;return n(null===t.default),t.default=e,t.optional=!0,this},s.prototype.explicit=function(e){var t=this._baseState;return n(null===t.explicit&&null===t.implicit),t.explicit=e,this},s.prototype.implicit=function(e){var t=this._baseState;return n(null===t.explicit&&null===t.implicit),t.implicit=e,this},s.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},s.prototype.key=function(e){var t=this._baseState;return n(null===t.key),t.key=e,this},s.prototype.any=function(){return this._baseState.any=!0,this},s.prototype.choice=function(t){var e=this._baseState;return n(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map(function(e){return t[e]})),this},s.prototype.contains=function(e){var t=this._baseState;return n(null===t.use),t.contains=e,this},s.prototype._decode=function(t,r){var e=this._baseState;if(null===e.parent)return t.wrapResult(e.children[0]._decode(t,r));var i,n=e.default,o=!0,a=null;if(null!==e.key&&(a=t.enterKey(e.key)),e.optional){var s=null;if(null!==e.explicit?s=e.explicit:null!==e.implicit?s=e.implicit:null!==e.tag&&(s=e.tag),null!==s||e.any){if(o=this._peekTag(t,s,e.any),t.isError(o))return o}else{var u=t.save();try{null===e.choice?this._decodeGeneric(e.tag,t,r):this._decodeChoice(t,r),o=!0}catch(e){o=!1}t.restore(u)}}if(e.obj&&o&&(i=t.enterObject()),o){if(null!==e.explicit){var c=this._decodeTag(t,e.explicit);if(t.isError(c))return c;t=c}var l=t.offset;if(null===e.use&&null===e.choice){if(e.any)u=t.save();var f=this._decodeTag(t,null!==e.implicit?e.implicit:e.tag,e.any);if(t.isError(f))return f;e.any?n=t.raw(u):t=f}if(r&&r.track&&null!==e.tag&&r.track(t.path(),l,t.length,"tagged"),r&&r.track&&null!==e.tag&&r.track(t.path(),t.offset,t.length,"content"),n=e.any?n:null===e.choice?this._decodeGeneric(e.tag,t,r):this._decodeChoice(t,r),t.isError(n))return n;if(e.any||null!==e.choice||null===e.children||e.children.forEach(function(e){e._decode(t,r)}),e.contains&&("octstr"===e.tag||"bitstr"===e.tag)){var h=new d(n);n=this._getUse(e.contains,t._reporterState.obj)._decode(h,r)}}return e.obj&&o&&(n=t.leaveObject(i)),null===e.key||null===n&&!0!==o?null!==a&&t.exitKey(a):t.leaveKey(a,e.key,n),n},s.prototype._decodeGeneric=function(e,t,r){var i=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,i.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&i.args?this._decodeObjid(t,i.args[0],i.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,i.args&&i.args[0],r):null!==i.use?this._getUse(i.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},s.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),n(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},s.prototype._decodeChoice=function(n,o){var a=this._baseState,s=null,u=!1;return Object.keys(a.choice).some(function(e){var t=n.save(),r=a.choice[e];try{var i=r._decode(n,o);if(n.isError(i))return!1;s={type:e,value:i},u=!0}catch(e){return n.restore(t),!1}return!0},this),u?s:n.error("Choice not matched")},s.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},s.prototype._encode=function(e,t,r){var i=this._baseState;if(null===i.default||i.default!==e){var n=this._encodeValue(e,t,r);if(void 0!==n&&!this._skipDefault(n,t,r))return n}},s.prototype._encodeValue=function(i,n,e){var t=this._baseState;if(null===t.parent)return t.children[0]._encode(i,n||new l);var r=null;if(this.reporter=n,t.optional&&void 0===i){if(null===t.default)return;i=t.default}var o=null,a=!1;if(t.any)r=this._createEncoderBuffer(i);else if(t.choice)r=this._encodeChoice(i,n);else if(t.contains)o=this._getUse(t.contains,e)._encode(i,n),a=!0;else if(t.children)o=t.children.map(function(e){if("null_"===e._baseState.tag)return e._encode(null,n,i);if(null===e._baseState.key)return n.error("Child should have a key");var t=n.enterKey(e._baseState.key);if("object"!=typeof i)return n.error("Child expected, but input is not object");var r=e._encode(i[e._baseState.key],n,i);return n.leaveKey(t),r},this).filter(function(e){return e}),o=this._createEncoderBuffer(o);else if("seqof"===t.tag||"setof"===t.tag){if(!t.args||1!==t.args.length)return n.error("Too many args for : "+t.tag);if(!Array.isArray(i))return n.error("seqof/setof, but data is not Array");var s=this.clone();s._baseState.implicit=null,o=this._createEncoderBuffer(i.map(function(e){var t=this._baseState;return this._getUse(t.args[0],i)._encode(e,n)},s))}else null!==t.use?r=this._getUse(t.use,e)._encode(i,n):(o=this._encodePrimitive(t.tag,i),a=!0);if(!t.any&&null===t.choice){var u=null!==t.implicit?t.implicit:t.tag,c=null===t.implicit?"universal":"context";null===u?null===t.use&&n.error("Tag could be omitted only for .use()"):null===t.use&&(r=this._encodeComposite(u,a,c,o))}return null!==t.explicit&&(r=this._encodeComposite(t.explicit,!1,"context",r)),r},s.prototype._encodeChoice=function(e,t){var r=this._baseState,i=r.choice[e.type];return i||n(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),i._encode(e.value,t)},s.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},s.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},s.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},{"../base":5,"minimalistic-assert":109}],7:[function(e,t,r){var i=e("inherits");function n(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}(r.Reporter=n).prototype.isError=function(e){return e instanceof o},n.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},n.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},n.prototype.enterKey=function(e){return this._reporterState.path.push(e)},n.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},n.prototype.leaveKey=function(e,t,r){var i=this._reporterState;this.exitKey(e),null!==i.obj&&(i.obj[t]=r)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},n.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},n.prototype.error=function(e){var t,r=this._reporterState,i=e instanceof o;if(t=i?e:new o(r.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack),!r.options.partial)throw t;return i||r.errors.push(t),t},n.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},i(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},{inherits:103}],8:[function(e,t,r){var i=e("../constants");r.tagClass={0:"universal",1:"application",2:"context",3:"private"},r.tagClassByName=i._reverse(r.tagClass),r.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},r.tagByName=i._reverse(r.tag)},{"../constants":9}],9:[function(e,t,r){var i=r;i._reverse=function(r){var i={};return Object.keys(r).forEach(function(e){(0|e)==e&&(e|=0);var t=r[e];i[t]=e}),i},i.der=e("./der")},{"./der":8}],10:[function(e,t,r){var i=e("inherits"),n=e("../../asn1"),o=n.base,a=n.bignum,s=n.constants.der;function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){o.Node.call(this,"der",e)}function l(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var i=s.tagClass[r>>6],n=0==(32&r);if(31==(31&r)){var o=r;for(r=0;128==(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:i,primitive:n,tag:r,tagStr:s.tag[r]}}function f(e,t,r){var i=e.readUInt8(r);if(e.isError(i))return i;if(!t&&128===i)return null;if(0==(128&i))return i;var n=127&i;if(4<n)return e.error("length octect is too long");for(var o=i=0;o<n;o++){i<<=8;var a=e.readUInt8(r);if(e.isError(a))return a;i|=a}return i}(t.exports=u).prototype.decode=function(e,t){return e instanceof o.DecoderBuffer||(e=new o.DecoderBuffer(e,t)),this.tree._decode(e,t)},i(c,o.Node),c.prototype._peekTag=function(e,t,r){if(e.isEmpty())return!1;var i=e.save(),n=l(e,'Failed to peek tag: "'+t+'"');return e.isError(n)?n:(e.restore(i),n.tag===t||n.tagStr===t||n.tagStr+"of"===t||r)},c.prototype._decodeTag=function(e,t,r){var i=l(e,'Failed to decode tag of "'+t+'"');if(e.isError(i))return i;var n=f(e,i.primitive,'Failed to get length of "'+t+'"');if(e.isError(n))return n;if(!r&&i.tag!==t&&i.tagStr!==t&&i.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(i.primitive||null!==n)return e.skip(n,'Failed to match body of: "'+t+'"');var o=e.save(),a=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(a)?a:(n=e.offset-o.offset,e.restore(o),e.skip(n,'Failed to match body of: "'+t+'"'))},c.prototype._skipUntilEnd=function(e,t){for(;;){var r=l(e,t);if(e.isError(r))return r;var i,n=f(e,r.primitive,t);if(e.isError(n))return n;if(i=r.primitive||null!==n?e.skip(n):this._skipUntilEnd(e,t),e.isError(i))return i;if("end"===r.tagStr)break}},c.prototype._decodeList=function(e,t,r,i){for(var n=[];!e.isEmpty();){var o=this._peekTag(e,"end");if(e.isError(o))return o;var a=r.decode(e,"der",i);if(e.isError(a)&&o)break;n.push(a)}return n},c.prototype._decodeStr=function(e,t){if("bitstr"===t){var r=e.readUInt8();return e.isError(r)?r:{unused:r,data:e.raw()}}if("bmpstr"===t){var i=e.raw();if(i.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");for(var n="",o=0;o<i.length/2;o++)n+=String.fromCharCode(i.readUInt16BE(2*o));return n}if("numstr"===t){var a=e.raw().toString("ascii");return this._isNumstr(a)?a:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"!==t)return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported");var s=e.raw().toString("ascii");return this._isPrintstr(s)?s:e.error("Decoding of string type: printstr unsupported characters")},c.prototype._decodeObjid=function(e,t,r){for(var i,n=[],o=0;!e.isEmpty();){var a=e.readUInt8();o<<=7,o|=127&a,0==(128&a)&&(n.push(o),o=0)}128&a&&n.push(o);var s=n[0]/40|0,u=n[0]%40;if(i=r?n:[s,u].concat(n.slice(1)),t){var c=t[i.join(" ")];void 0===c&&(c=t[i.join(".")]),void 0!==c&&(i=c)}return i},c.prototype._decodeTime=function(e,t){var r=e.raw().toString();if("gentime"===t)var i=0|r.slice(0,4),n=0|r.slice(4,6),o=0|r.slice(6,8),a=0|r.slice(8,10),s=0|r.slice(10,12),u=0|r.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");i=0|r.slice(0,2),n=0|r.slice(2,4),o=0|r.slice(4,6),a=0|r.slice(6,8),s=0|r.slice(8,10),u=0|r.slice(10,12);i=i<70?2e3+i:1900+i}return Date.UTC(i,n-1,o,a,s,u,0)},c.prototype._decodeNull=function(e){return null},c.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},c.prototype._decodeInt=function(e,t){var r=e.raw(),i=new a(r);return t&&(i=t[i.toString(10)]||i),i},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},{"../../asn1":2,inherits:103}],11:[function(e,t,r){var i=r;i.der=e("./der"),i.pem=e("./pem")},{"./der":10,"./pem":12}],12:[function(e,t,r){var i=e("inherits"),f=e("buffer").Buffer,h=e("./der");function n(e){h.call(this,e),this.enc="pem"}i(n,h),(t.exports=n).prototype.decode=function(e,t){for(var r=e.toString().split(/[\r\n]+/g),i=t.label.toUpperCase(),n=/^-----(BEGIN|END) ([^-]+)-----$/,o=-1,a=-1,s=0;s<r.length;s++){var u=r[s].match(n);if(null!==u&&u[2]===i){if(-1!==o){if("END"!==u[1])break;a=s;break}if("BEGIN"!==u[1])break;o=s}}if(-1===o||-1===a)throw new Error("PEM section not found for: "+i);var c=r.slice(o+1,a).join("");c.replace(/[^a-z0-9\+\/=]+/gi,"");var l=new f(c,"base64");return h.prototype.decode.call(this,l,t)}},{"./der":10,buffer:49,inherits:103}],13:[function(e,t,r){var i=e("inherits"),c=e("buffer").Buffer,n=e("../../asn1"),o=n.base,l=n.constants.der;function a(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new s,this.tree._init(e.body)}function s(e){o.Node.call(this,"der",e)}function u(e){return e<10?"0"+e:e}(t.exports=a).prototype.encode=function(e,t){return this.tree._encode(e,t).join()},i(s,o.Node),s.prototype._encodeComposite=function(e,t,r,i){var n,o=function(e,t,r,i){var n;"seqof"===e?e="seq":"setof"===e&&(e="set");if(l.tagByName.hasOwnProperty(e))n=l.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return i.error("Unknown tag: "+e);n=e}if(31<=n)return i.error("Multi-octet tag encoding unsupported");t||(n|=32);return n|=l.tagClassByName[r||"universal"]<<6}(e,t,r,this.reporter);if(i.length<128)return(n=new c(2))[0]=o,n[1]=i.length,this._createEncoderBuffer([n,i]);for(var a=1,s=i.length;256<=s;s>>=8)a++;(n=new c(2+a))[0]=o,n[1]=128|a;s=1+a;for(var u=i.length;0<u;s--,u>>=8)n[s]=255&u;return this._createEncoderBuffer([n,i])},s.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"!==t)return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)?this._createEncoderBuffer(e):"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported");for(var r=new c(2*e.length),i=0;i<e.length;i++)r.writeUInt16BE(e.charCodeAt(i),2*i);return this._createEncoderBuffer(r)},s.prototype._encodeObjid=function(e,t,r){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s\.]+/g);for(var i=0;i<e.length;i++)e[i]|=0}else if(Array.isArray(e)){e=e.slice();for(i=0;i<e.length;i++)e[i]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!r){if(40<=e[1])return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var n=0;for(i=0;i<e.length;i++){var o=e[i];for(n++;128<=o;o>>=7)n++}var a=new c(n),s=a.length-1;for(i=e.length-1;0<=i;i--){o=e[i];for(a[s--]=127&o;0<(o>>=7);)a[s--]=128|127&o}return this._createEncoderBuffer(a)},s.prototype._encodeTime=function(e,t){var r,i=new Date(e);return"gentime"===t?r=[u(i.getFullYear()),u(i.getUTCMonth()+1),u(i.getUTCDate()),u(i.getUTCHours()),u(i.getUTCMinutes()),u(i.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[u(i.getFullYear()%100),u(i.getUTCMonth()+1),u(i.getUTCDate()),u(i.getUTCHours()),u(i.getUTCMinutes()),u(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},s.prototype._encodeNull=function(){return this._createEncoderBuffer("")},s.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!c.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new c(r)}if(c.isBuffer(e)){var i=e.length;0===e.length&&i++;var n=new c(i);return e.copy(n),0===e.length&&(n[0]=0),this._createEncoderBuffer(n)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);i=1;for(var o=e;256<=o;o>>=8)i++;for(o=(n=new Array(i)).length-1;0<=o;o--)n[o]=255&e,e>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(new c(n))},s.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},s.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},s.prototype._skipDefault=function(e,t,r){var i,n=this._baseState;if(null===n.default)return!1;var o=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,r).join()),o.length!==n.defaultBuffer.length)return!1;for(i=0;i<o.length;i++)if(o[i]!==n.defaultBuffer[i])return!1;return!0}},{"../../asn1":2,buffer:49,inherits:103}],14:[function(e,t,r){var i=r;i.der=e("./der"),i.pem=e("./pem")},{"./der":13,"./pem":15}],15:[function(e,t,r){var i=e("inherits"),o=e("./der");function n(e){o.call(this,e),this.enc="pem"}i(n,o),(t.exports=n).prototype.encode=function(e,t){for(var r=o.prototype.encode.call(this,e).toString("base64"),i=["-----BEGIN "+t.label+"-----"],n=0;n<r.length;n+=64)i.push(r.slice(n,n+64));return i.push("-----END "+t.label+"-----"),i.join("\n")}},{"./der":13,inherits:103}],16:[function(e,t,r){"use strict";r.byteLength=function(e){return 3*e.length/4-f(e)},r.toByteArray=function(e){var t,r,i,n,o,a=e.length;n=f(e),o=new l(3*a/4-n),r=0<n?a-4:a;var s=0;for(t=0;t<r;t+=4)i=c[e.charCodeAt(t)]<<18|c[e.charCodeAt(t+1)]<<12|c[e.charCodeAt(t+2)]<<6|c[e.charCodeAt(t+3)],o[s++]=i>>16&255,o[s++]=i>>8&255,o[s++]=255&i;2===n?(i=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,o[s++]=255&i):1===n&&(i=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,o[s++]=i>>8&255,o[s++]=255&i);return o},r.fromByteArray=function(e){for(var t,r=e.length,i=r%3,n="",o=[],a=0,s=r-i;a<s;a+=16383)o.push(h(e,a,s<a+16383?s:a+16383));1==i?(t=e[r-1],n+=u[t>>2],n+=u[t<<4&63],n+="=="):2==i&&(t=(e[r-2]<<8)+e[r-1],n+=u[t>>10],n+=u[t>>4&63],n+=u[t<<2&63],n+="=");return o.push(n),o.join("")};for(var u=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,o=i.length;n<o;++n)u[n]=i[n],c[i.charCodeAt(n)]=n;function f(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function h(e,t,r){for(var i,n,o=[],a=t;a<r;a+=3)i=(e[a]<<16)+(e[a+1]<<8)+e[a+2],o.push(u[(n=i)>>18&63]+u[n>>12&63]+u[n>>6&63]+u[63&n]);return o.join("")}c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},{}],17:[function(T,e,t){!function(e,t){"use strict";function m(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function b(e,t,r){if(b.isBN(e))return e;this.negative=0,this.words=null,this.length=0,(this.red=null)!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var i;"object"==typeof e?e.exports=b:t.BN=b,(b.BN=b).wordSize=26;try{i=T("buffer").Buffer}catch(e){}function a(e,t,r){for(var i=0,n=Math.min(e.length,r),o=t;o<n;o++){var a=e.charCodeAt(o)-48;i<<=4,i|=49<=a&&a<=54?a-49+10:17<=a&&a<=22?a-17+10:15&a}return i}function f(e,t,r,i){for(var n=0,o=Math.min(e.length,r),a=t;a<o;a++){var s=e.charCodeAt(a)-48;n*=i,n+=49<=s?s-49+10:17<=s?s-17+10:s}return n}b.isBN=function(e){return e instanceof b||null!==e&&"object"==typeof e&&e.constructor.wordSize===b.wordSize&&Array.isArray(e.words)},b.max=function(e,t){return 0<e.cmp(t)?e:t},b.min=function(e,t){return e.cmp(t)<0?e:t},b.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),m(t===(0|t)&&2<=t&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},b.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(m(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},b.prototype._initArray=function(e,t,r){if(m("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o,a=0;if("be"===r)for(i=e.length-1,n=0;0<=i;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[n]|=o<<a&67108863,this.words[n+1]=o>>>26-a&67108863,26<=(a+=24)&&(a-=26,n++);else if("le"===r)for(n=i=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[n]|=o<<a&67108863,this.words[n+1]=o>>>26-a&67108863,26<=(a+=24)&&(a-=26,n++);return this.strip()},b.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,n,o=0;for(r=e.length-6,i=0;t<=r;r-=6)n=a(e,r,r+6),this.words[i]|=n<<o&67108863,this.words[i+1]|=n>>>26-o&4194303,26<=(o+=24)&&(o-=26,i++);r+6!==t&&(n=a(e,t,r+6),this.words[i]|=n<<o&67108863,this.words[i+1]|=n>>>26-o&4194303),this.strip()},b.prototype._parseBase=function(e,t,r){this.words=[0];for(var i=0,n=this.length=1;n<=67108863;n*=t)i++;i--,n=n/t|0;for(var o=e.length-r,a=o%i,s=Math.min(o,o-a)+r,u=0,c=r;c<s;c+=i)u=f(e,c,c+i,t),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!=a){var l=1;for(u=f(e,c,e.length,t),c=0;c<a;c++)l*=t;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}},b.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},b.prototype.clone=function(){var e=new b(null);return this.copy(e),e},b.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},b.prototype.strip=function(){for(;1<this.length&&0===this.words[this.length-1];)this.length--;return this._normSign()},b.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},b.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function n(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;i=(r.length=i)-1|0;var n=0|e.words[0],o=0|t.words[0],a=n*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c<i;c++){for(var l=u>>>26,f=67108863&u,h=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=h;d++){var p=c-d|0;l+=(a=(n=0|e.words[p])*(o=0|t.words[d])+f)/67108864|0,f=67108863&a}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}b.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,n=0,o=0;o<this.length;o++){var a=this.words[o],s=(16777215&(a<<i|n)).toString(16);r=0!==(n=a>>>24-i&16777215)||o!==this.length-1?h[6-s.length]+s+r:s+r,26<=(i+=2)&&(i-=26,o--)}for(0!==n&&(r=n.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&2<=e&&e<=36){var u=d[e],c=p[e];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var f=l.modn(c).toString(e);r=(l=l.idivn(c)).isZero()?f+r:h[u-f.length]+f+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}m(!1,"Base should be between 2 and 36")},b.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:2<this.length&&m(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},b.prototype.toJSON=function(){return this.toString(16)},b.prototype.toBuffer=function(e,t){return m(void 0!==i),this.toArrayLike(i,e,t)},b.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},b.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),n=r||Math.max(1,i);m(i<=n,"byte array longer than desired length"),m(0<n,"Requested array length <= 0"),this.strip();var o,a,s="le"===t,u=new e(n),c=this.clone();if(s){for(a=0;!c.isZero();a++)o=c.andln(255),c.iushrn(8),u[a]=o;for(;a<n;a++)u[a]=0}else{for(a=0;a<n-i;a++)u[a]=0;for(a=0;!c.isZero();a++)o=c.andln(255),c.iushrn(8),u[n-a-1]=o}return u},b.prototype._countBits=Math.clz32?function(e){return 32-Math.clz32(e)}:function(e){var t=e,r=0;return 4096<=t&&(r+=13,t>>>=13),64<=t&&(r+=7,t>>>=7),8<=t&&(r+=4,t>>>=4),2<=t&&(r+=2,t>>>=2),r+t},b.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},b.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},b.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},b.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},b.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},b.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},b.prototype.isNeg=function(){return 0!==this.negative},b.prototype.neg=function(){return this.clone().ineg()},b.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},b.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},b.prototype.ior=function(e){return m(0==(this.negative|e.negative)),this.iuor(e)},b.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},b.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},b.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},b.prototype.iand=function(e){return m(0==(this.negative|e.negative)),this.iuand(e)},b.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},b.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},b.prototype.iuxor=function(e){var t,r;r=this.length>e.length?(t=this,e):(t=e,this);for(var i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this.strip()},b.prototype.ixor=function(e){return m(0==(this.negative|e.negative)),this.iuxor(e)},b.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},b.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},b.prototype.inotn=function(e){m("number"==typeof e&&0<=e);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),0<r&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return 0<r&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},b.prototype.notn=function(e){return this.clone().inotn(e)},b.prototype.setn=function(e,t){m("number"==typeof e&&0<=e);var r=e/26|0,i=e%26;return this._expand(1+r),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},b.prototype.iadd=function(e){var t,r,i;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();i=this.length>e.length?(r=this,e):(r=e,this);for(var n=0,o=0;o<i.length;o++)t=(0|r.words[o])+(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<r.length;o++)t=(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},b.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},b.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;i=0<n?(r=this,e):(r=e,this);for(var o=0,a=0;a<i.length;a++)o=(t=(0|r.words[a])-(0|i.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<r.length;a++)o=(t=(0|r.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this.strip()},b.prototype.sub=function(e){return this.clone().isub(e)};var o=function(e,t,r){var i,n,o,a=e.words,s=t.words,u=r.words,c=0,l=0|a[0],f=8191&l,h=l>>>13,d=0|a[1],p=8191&d,v=d>>>13,m=0|a[2],b=8191&m,y=m>>>13,g=0|a[3],_=8191&g,w=g>>>13,x=0|a[4],T=8191&x,S=x>>>13,M=0|a[5],P=8191&M,E=M>>>13,k=0|a[6],C=8191&k,A=k>>>13,O=0|a[7],I=8191&O,R=O>>>13,D=0|a[8],L=8191&D,j=D>>>13,F=0|a[9],B=8191&F,N=F>>>13,U=0|s[0],z=8191&U,X=U>>>13,W=0|s[1],q=8191&W,H=W>>>13,G=0|s[2],V=8191&G,Y=G>>>13,J=0|s[3],K=8191&J,Z=J>>>13,Q=0|s[4],$=8191&Q,ee=Q>>>13,te=0|s[5],re=8191&te,ie=te>>>13,ne=0|s[6],oe=8191&ne,ae=ne>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,le=0|s[8],fe=8191&le,he=le>>>13,de=0|s[9],pe=8191&de,ve=de>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(c+(i=Math.imul(f,z))|0)+((8191&(n=(n=Math.imul(f,X))+Math.imul(h,z)|0))<<13)|0;c=((o=Math.imul(h,X))+(n>>>13)|0)+(me>>>26)|0,me&=67108863,i=Math.imul(p,z),n=(n=Math.imul(p,X))+Math.imul(v,z)|0,o=Math.imul(v,X);var be=(c+(i=i+Math.imul(f,q)|0)|0)+((8191&(n=(n=n+Math.imul(f,H)|0)+Math.imul(h,q)|0))<<13)|0;c=((o=o+Math.imul(h,H)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(b,z),n=(n=Math.imul(b,X))+Math.imul(y,z)|0,o=Math.imul(y,X),i=i+Math.imul(p,q)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(v,q)|0,o=o+Math.imul(v,H)|0;var ye=(c+(i=i+Math.imul(f,V)|0)|0)+((8191&(n=(n=n+Math.imul(f,Y)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,Y)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(_,z),n=(n=Math.imul(_,X))+Math.imul(w,z)|0,o=Math.imul(w,X),i=i+Math.imul(b,q)|0,n=(n=n+Math.imul(b,H)|0)+Math.imul(y,q)|0,o=o+Math.imul(y,H)|0,i=i+Math.imul(p,V)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,Y)|0;var ge=(c+(i=i+Math.imul(f,K)|0)|0)+((8191&(n=(n=n+Math.imul(f,Z)|0)+Math.imul(h,K)|0))<<13)|0;c=((o=o+Math.imul(h,Z)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(T,z),n=(n=Math.imul(T,X))+Math.imul(S,z)|0,o=Math.imul(S,X),i=i+Math.imul(_,q)|0,n=(n=n+Math.imul(_,H)|0)+Math.imul(w,q)|0,o=o+Math.imul(w,H)|0,i=i+Math.imul(b,V)|0,n=(n=n+Math.imul(b,Y)|0)+Math.imul(y,V)|0,o=o+Math.imul(y,Y)|0,i=i+Math.imul(p,K)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,Z)|0;var _e=(c+(i=i+Math.imul(f,$)|0)|0)+((8191&(n=(n=n+Math.imul(f,ee)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,ee)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(P,z),n=(n=Math.imul(P,X))+Math.imul(E,z)|0,o=Math.imul(E,X),i=i+Math.imul(T,q)|0,n=(n=n+Math.imul(T,H)|0)+Math.imul(S,q)|0,o=o+Math.imul(S,H)|0,i=i+Math.imul(_,V)|0,n=(n=n+Math.imul(_,Y)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,Y)|0,i=i+Math.imul(b,K)|0,n=(n=n+Math.imul(b,Z)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,Z)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,ee)|0;var we=(c+(i=i+Math.imul(f,re)|0)|0)+((8191&(n=(n=n+Math.imul(f,ie)|0)+Math.imul(h,re)|0))<<13)|0;c=((o=o+Math.imul(h,ie)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(C,z),n=(n=Math.imul(C,X))+Math.imul(A,z)|0,o=Math.imul(A,X),i=i+Math.imul(P,q)|0,n=(n=n+Math.imul(P,H)|0)+Math.imul(E,q)|0,o=o+Math.imul(E,H)|0,i=i+Math.imul(T,V)|0,n=(n=n+Math.imul(T,Y)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,Y)|0,i=i+Math.imul(_,K)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(w,K)|0,o=o+Math.imul(w,Z)|0,i=i+Math.imul(b,$)|0,n=(n=n+Math.imul(b,ee)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,ee)|0,i=i+Math.imul(p,re)|0,n=(n=n+Math.imul(p,ie)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ie)|0;var xe=(c+(i=i+Math.imul(f,oe)|0)|0)+((8191&(n=(n=n+Math.imul(f,ae)|0)+Math.imul(h,oe)|0))<<13)|0;c=((o=o+Math.imul(h,ae)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(I,z),n=(n=Math.imul(I,X))+Math.imul(R,z)|0,o=Math.imul(R,X),i=i+Math.imul(C,q)|0,n=(n=n+Math.imul(C,H)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,H)|0,i=i+Math.imul(P,V)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Y)|0,i=i+Math.imul(T,K)|0,n=(n=n+Math.imul(T,Z)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,Z)|0,i=i+Math.imul(_,$)|0,n=(n=n+Math.imul(_,ee)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,ee)|0,i=i+Math.imul(b,re)|0,n=(n=n+Math.imul(b,ie)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ie)|0,i=i+Math.imul(p,oe)|0,n=(n=n+Math.imul(p,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0;var Te=(c+(i=i+Math.imul(f,ue)|0)|0)+((8191&(n=(n=n+Math.imul(f,ce)|0)+Math.imul(h,ue)|0))<<13)|0;c=((o=o+Math.imul(h,ce)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(L,z),n=(n=Math.imul(L,X))+Math.imul(j,z)|0,o=Math.imul(j,X),i=i+Math.imul(I,q)|0,n=(n=n+Math.imul(I,H)|0)+Math.imul(R,q)|0,o=o+Math.imul(R,H)|0,i=i+Math.imul(C,V)|0,n=(n=n+Math.imul(C,Y)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,Y)|0,i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,Z)|0,i=i+Math.imul(T,$)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,ee)|0,i=i+Math.imul(_,re)|0,n=(n=n+Math.imul(_,ie)|0)+Math.imul(w,re)|0,o=o+Math.imul(w,ie)|0,i=i+Math.imul(b,oe)|0,n=(n=n+Math.imul(b,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0,i=i+Math.imul(p,ue)|0,n=(n=n+Math.imul(p,ce)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,ce)|0;var Se=(c+(i=i+Math.imul(f,fe)|0)|0)+((8191&(n=(n=n+Math.imul(f,he)|0)+Math.imul(h,fe)|0))<<13)|0;c=((o=o+Math.imul(h,he)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(B,z),n=(n=Math.imul(B,X))+Math.imul(N,z)|0,o=Math.imul(N,X),i=i+Math.imul(L,q)|0,n=(n=n+Math.imul(L,H)|0)+Math.imul(j,q)|0,o=o+Math.imul(j,H)|0,i=i+Math.imul(I,V)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Y)|0,i=i+Math.imul(C,K)|0,n=(n=n+Math.imul(C,Z)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,Z)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,ee)|0,i=i+Math.imul(T,re)|0,n=(n=n+Math.imul(T,ie)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ie)|0,i=i+Math.imul(_,oe)|0,n=(n=n+Math.imul(_,ae)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,ae)|0,i=i+Math.imul(b,ue)|0,n=(n=n+Math.imul(b,ce)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,ce)|0,i=i+Math.imul(p,fe)|0,n=(n=n+Math.imul(p,he)|0)+Math.imul(v,fe)|0,o=o+Math.imul(v,he)|0;var Me=(c+(i=i+Math.imul(f,pe)|0)|0)+((8191&(n=(n=n+Math.imul(f,ve)|0)+Math.imul(h,pe)|0))<<13)|0;c=((o=o+Math.imul(h,ve)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(B,q),n=(n=Math.imul(B,H))+Math.imul(N,q)|0,o=Math.imul(N,H),i=i+Math.imul(L,V)|0,n=(n=n+Math.imul(L,Y)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,Y)|0,i=i+Math.imul(I,K)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,Z)|0,i=i+Math.imul(C,$)|0,n=(n=n+Math.imul(C,ee)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,ee)|0,i=i+Math.imul(P,re)|0,n=(n=n+Math.imul(P,ie)|0)+Math.imul(E,re)|0,o=o+Math.imul(E,ie)|0,i=i+Math.imul(T,oe)|0,n=(n=n+Math.imul(T,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,i=i+Math.imul(_,ue)|0,n=(n=n+Math.imul(_,ce)|0)+Math.imul(w,ue)|0,o=o+Math.imul(w,ce)|0,i=i+Math.imul(b,fe)|0,n=(n=n+Math.imul(b,he)|0)+Math.imul(y,fe)|0,o=o+Math.imul(y,he)|0;var Pe=(c+(i=i+Math.imul(p,pe)|0)|0)+((8191&(n=(n=n+Math.imul(p,ve)|0)+Math.imul(v,pe)|0))<<13)|0;c=((o=o+Math.imul(v,ve)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,i=Math.imul(B,V),n=(n=Math.imul(B,Y))+Math.imul(N,V)|0,o=Math.imul(N,Y),i=i+Math.imul(L,K)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(j,K)|0,o=o+Math.imul(j,Z)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,ee)|0,i=i+Math.imul(C,re)|0,n=(n=n+Math.imul(C,ie)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ie)|0,i=i+Math.imul(P,oe)|0,n=(n=n+Math.imul(P,ae)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,ae)|0,i=i+Math.imul(T,ue)|0,n=(n=n+Math.imul(T,ce)|0)+Math.imul(S,ue)|0,o=o+Math.imul(S,ce)|0,i=i+Math.imul(_,fe)|0,n=(n=n+Math.imul(_,he)|0)+Math.imul(w,fe)|0,o=o+Math.imul(w,he)|0;var Ee=(c+(i=i+Math.imul(b,pe)|0)|0)+((8191&(n=(n=n+Math.imul(b,ve)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,ve)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(B,K),n=(n=Math.imul(B,Z))+Math.imul(N,K)|0,o=Math.imul(N,Z),i=i+Math.imul(L,$)|0,n=(n=n+Math.imul(L,ee)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,ee)|0,i=i+Math.imul(I,re)|0,n=(n=n+Math.imul(I,ie)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ie)|0,i=i+Math.imul(C,oe)|0,n=(n=n+Math.imul(C,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,i=i+Math.imul(P,ue)|0,n=(n=n+Math.imul(P,ce)|0)+Math.imul(E,ue)|0,o=o+Math.imul(E,ce)|0,i=i+Math.imul(T,fe)|0,n=(n=n+Math.imul(T,he)|0)+Math.imul(S,fe)|0,o=o+Math.imul(S,he)|0;var ke=(c+(i=i+Math.imul(_,pe)|0)|0)+((8191&(n=(n=n+Math.imul(_,ve)|0)+Math.imul(w,pe)|0))<<13)|0;c=((o=o+Math.imul(w,ve)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(B,$),n=(n=Math.imul(B,ee))+Math.imul(N,$)|0,o=Math.imul(N,ee),i=i+Math.imul(L,re)|0,n=(n=n+Math.imul(L,ie)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ie)|0,i=i+Math.imul(I,oe)|0,n=(n=n+Math.imul(I,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,i=i+Math.imul(C,ue)|0,n=(n=n+Math.imul(C,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,i=i+Math.imul(P,fe)|0,n=(n=n+Math.imul(P,he)|0)+Math.imul(E,fe)|0,o=o+Math.imul(E,he)|0;var Ce=(c+(i=i+Math.imul(T,pe)|0)|0)+((8191&(n=(n=n+Math.imul(T,ve)|0)+Math.imul(S,pe)|0))<<13)|0;c=((o=o+Math.imul(S,ve)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(B,re),n=(n=Math.imul(B,ie))+Math.imul(N,re)|0,o=Math.imul(N,ie),i=i+Math.imul(L,oe)|0,n=(n=n+Math.imul(L,ae)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,ae)|0,i=i+Math.imul(I,ue)|0,n=(n=n+Math.imul(I,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,i=i+Math.imul(C,fe)|0,n=(n=n+Math.imul(C,he)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,he)|0;var Ae=(c+(i=i+Math.imul(P,pe)|0)|0)+((8191&(n=(n=n+Math.imul(P,ve)|0)+Math.imul(E,pe)|0))<<13)|0;c=((o=o+Math.imul(E,ve)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul(B,oe),n=(n=Math.imul(B,ae))+Math.imul(N,oe)|0,o=Math.imul(N,ae),i=i+Math.imul(L,ue)|0,n=(n=n+Math.imul(L,ce)|0)+Math.imul(j,ue)|0,o=o+Math.imul(j,ce)|0,i=i+Math.imul(I,fe)|0,n=(n=n+Math.imul(I,he)|0)+Math.imul(R,fe)|0,o=o+Math.imul(R,he)|0;var Oe=(c+(i=i+Math.imul(C,pe)|0)|0)+((8191&(n=(n=n+Math.imul(C,ve)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,ve)|0)+(n>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,i=Math.imul(B,ue),n=(n=Math.imul(B,ce))+Math.imul(N,ue)|0,o=Math.imul(N,ce),i=i+Math.imul(L,fe)|0,n=(n=n+Math.imul(L,he)|0)+Math.imul(j,fe)|0,o=o+Math.imul(j,he)|0;var Ie=(c+(i=i+Math.imul(I,pe)|0)|0)+((8191&(n=(n=n+Math.imul(I,ve)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,ve)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(B,fe),n=(n=Math.imul(B,he))+Math.imul(N,fe)|0,o=Math.imul(N,he);var Re=(c+(i=i+Math.imul(L,pe)|0)|0)+((8191&(n=(n=n+Math.imul(L,ve)|0)+Math.imul(j,pe)|0))<<13)|0;c=((o=o+Math.imul(j,ve)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863;var De=(c+(i=Math.imul(B,pe))|0)+((8191&(n=(n=Math.imul(B,ve))+Math.imul(N,pe)|0))<<13)|0;return c=((o=Math.imul(N,ve))+(n>>>13)|0)+(De>>>26)|0,De&=67108863,u[0]=me,u[1]=be,u[2]=ye,u[3]=ge,u[4]=_e,u[5]=we,u[6]=xe,u[7]=Te,u[8]=Se,u[9]=Me,u[10]=Pe,u[11]=Ee,u[12]=ke,u[13]=Ce,u[14]=Ae,u[15]=Oe,u[16]=Ie,u[17]=Re,u[18]=De,0!==c&&(u[19]=c,r.length++),r};function s(e,t,r){return(new u).mulp(e,t,r)}function u(e,t){this.x=e,this.y=t}Math.imul||(o=n),b.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?o(this,e,t):r<63?n(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,o=0;o<r.length-1;o++){var a=n;n=0;for(var s=67108863&i,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var l=o-c,f=(0|e.words[l])*(0|t.words[c]),h=67108863&f;s=67108863&(h=h+s|0),n+=(a=(a=a+(f/67108864|0)|0)+(h>>>26)|0)>>>26,a&=67108863}r.words[o]=s,i=a,a=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,e,t):s(this,e,t)},u.prototype.makeRBT=function(e){for(var t=new Array(e),r=b.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,r,e);return t},u.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var i=0,n=0;n<t;n++)i|=(1&e)<<t-n-1,e>>=1;return i},u.prototype.permute=function(e,t,r,i,n,o){for(var a=0;a<o;a++)i[a]=t[e[a]],n[a]=r[e[a]]},u.prototype.transform=function(e,t,r,i,n,o){this.permute(o,e,t,r,i,n);for(var a=1;a<n;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),l=0;l<n;l+=s)for(var f=u,h=c,d=0;d<a;d++){var p=r[l+d],v=i[l+d],m=r[l+d+a],b=i[l+d+a],y=f*m-h*b;b=f*b+h*m,m=y,r[l+d]=p+m,i[l+d]=v+b,r[l+d+a]=p-m,i[l+d+a]=v-b,d!==s&&(y=u*f-c*h,h=u*h+c*f,f=y)}},u.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},u.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1],e[r-i-1]=n,n=t[i],t[i]=-t[r-i-1],t[r-i-1]=-n}},u.prototype.normalize13b=function(e,t){for(var r=0,i=0;i<t/2;i++){var n=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+r;e[i]=67108863&n,r=n<67108864?0:n/67108864|0}return e},u.prototype.convert13b=function(e,t,r,i){for(var n=0,o=0;o<t;o++)n+=0|e[o],r[2*o]=8191&n,n>>>=13,r[2*o+1]=8191&n,n>>>=13;for(o=2*t;o<i;++o)r[o]=0;m(0===n),m(0==(-8192&n))},u.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},u.prototype.mulp=function(e,t,r){var i=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(i),o=this.stub(i),a=new Array(i),s=new Array(i),u=new Array(i),c=new Array(i),l=new Array(i),f=new Array(i),h=r.words;h.length=i,this.convert13b(e.words,e.length,a,i),this.convert13b(t.words,t.length,c,i),this.transform(a,o,s,u,i,n),this.transform(c,o,l,f,i,n);for(var d=0;d<i;d++){var p=s[d]*l[d]-u[d]*f[d];u[d]=s[d]*f[d]+u[d]*l[d],s[d]=p}return this.conjugate(s,u,i),this.transform(s,u,h,o,i,n),this.conjugate(h,o,i),this.normalize13b(h,i),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},b.prototype.mul=function(e){var t=new b(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},b.prototype.mulf=function(e){var t=new b(null);return t.words=new Array(this.length+e.length),s(this,e,t)},b.prototype.imul=function(e){return this.clone().mulTo(e,this)},b.prototype.imuln=function(e){m("number"==typeof e),m(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,n=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=n>>>26,this.words[r]=67108863&n}return 0!==t&&(this.words[r]=t,this.length++),this},b.prototype.muln=function(e){return this.clone().imuln(e)},b.prototype.sqr=function(){return this.mul(this)},b.prototype.isqr=function(){return this.imul(this.clone())},b.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var i=r/26|0,n=r%26;t[r]=(e.words[i]&1<<n)>>>n}return t}(e);if(0===t.length)return new b(1);for(var r=this,i=0;i<t.length&&0===t[i];i++,r=r.sqr());if(++i<t.length)for(var n=r.sqr();i<t.length;i++,n=n.sqr())0!==t[i]&&(r=r.mul(n));return r},b.prototype.iushln=function(e){m("number"==typeof e&&0<=e);var t,r=e%26,i=(e-r)/26,n=67108863>>>26-r<<26-r;if(0!=r){var o=0;for(t=0;t<this.length;t++){var a=this.words[t]&n,s=(0|this.words[t])-a<<r;this.words[t]=s|o,o=a>>>26-r}o&&(this.words[t]=o,this.length++)}if(0!=i){for(t=this.length-1;0<=t;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},b.prototype.ishln=function(e){return m(0===this.negative),this.iushln(e)},b.prototype.iushrn=function(e,t,r){var i;m("number"==typeof e&&0<=e),i=t?(t-t%26)/26:0;var n=e%26,o=Math.min((e-n)/26,this.length),a=67108863^67108863>>>n<<n,s=r;if(i-=o,i=Math.max(0,i),s){for(var u=0;u<o;u++)s.words[u]=this.words[u];s.length=o}if(0===o);else if(this.length>o)for(this.length-=o,u=0;u<this.length;u++)this.words[u]=this.words[u+o];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;0<=u&&(0!==c||i<=u);u--){var l=0|this.words[u];this.words[u]=c<<26-n|l>>>n,c=l&a}return s&&0!==c&&(s.words[s.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},b.prototype.ishrn=function(e,t,r){return m(0===this.negative),this.iushrn(e,t,r)},b.prototype.shln=function(e){return this.clone().ishln(e)},b.prototype.ushln=function(e){return this.clone().iushln(e)},b.prototype.shrn=function(e){return this.clone().ishrn(e)},b.prototype.ushrn=function(e){return this.clone().iushrn(e)},b.prototype.testn=function(e){m("number"==typeof e&&0<=e);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r)&&!!(this.words[r]&i)},b.prototype.imaskn=function(e){m("number"==typeof e&&0<=e);var t=e%26,r=(e-t)/26;if(m(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!=t&&r++,this.length=Math.min(r,this.length),0!=t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},b.prototype.maskn=function(e){return this.clone().imaskn(e)},b.prototype.iaddn=function(e){return m("number"==typeof e),m(e<67108864),e<0?this.isubn(-e):0!==this.negative?(1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0):(this.negative=0,this.isubn(e),this.negative=1),this):this._iaddn(e)},b.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&67108864<=this.words[t];t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},b.prototype.isubn=function(e){if(m("number"==typeof e),m(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},b.prototype.addn=function(e){return this.clone().iaddn(e)},b.prototype.subn=function(e){return this.clone().isubn(e)},b.prototype.iabs=function(){return this.negative=0,this},b.prototype.abs=function(){return this.clone().iabs()},b.prototype._ishlnsubmul=function(e,t,r){var i,n,o=e.length+r;this._expand(o);var a=0;for(i=0;i<e.length;i++){n=(0|this.words[i+r])+a;var s=(0|e.words[i])*t;a=((n-=67108863&s)>>26)-(s/67108864|0),this.words[i+r]=67108863&n}for(;i<this.length-r;i++)a=(n=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&n;if(0===a)return this.strip();for(m(-1===a),i=a=0;i<this.length;i++)a=(n=-(0|this.words[i])+a)>>26,this.words[i]=67108863&n;return this.negative=1,this.strip()},b.prototype._wordDiv=function(e,t){var r=(this.length,e.length),i=this.clone(),n=e,o=0|n.words[n.length-1];0!=(r=26-this._countBits(o))&&(n=n.ushln(r),i.iushln(r),o=0|n.words[n.length-1]);var a,s=i.length-n.length;if("mod"!==t){(a=new b(null)).length=1+s,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var c=i.clone()._ishlnsubmul(n,1,s);0===c.negative&&(i=c,a&&(a.words[s]=1));for(var l=s-1;0<=l;l--){var f=67108864*(0|i.words[n.length+l])+(0|i.words[n.length+l-1]);for(f=Math.min(f/o|0,67108863),i._ishlnsubmul(n,f,l);0!==i.negative;)f--,i.negative=0,i._ishlnsubmul(n,1,l),i.isZero()||(i.negative^=1);a&&(a.words[l]=f)}return a&&a.strip(),i.strip(),"div"!==t&&0!=r&&i.iushrn(r),{div:a||null,mod:i}},b.prototype.divmod=function(e,t,r){return m(!e.isZero()),this.isZero()?{div:new b(0),mod:new b(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(i=o.div.neg()),"div"!==t&&(n=o.mod.neg(),r&&0!==n.negative&&n.iadd(e)),{div:i,mod:n}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(i=o.div.neg()),{div:i,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(n=o.mod.neg(),r&&0!==n.negative&&n.isub(e)),{div:o.div,mod:n}):e.length>this.length||this.cmp(e)<0?{div:new b(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new b(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new b(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,n,o},b.prototype.div=function(e){return this.divmod(e,"div",!1).div},b.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},b.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},b.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),n=e.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},b.prototype.modn=function(e){m(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;0<=i;i--)r=(t*r+(0|this.words[i]))%e;return r},b.prototype.idivn=function(e){m(e<=67108863);for(var t=0,r=this.length-1;0<=r;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},b.prototype.divn=function(e){return this.clone().idivn(e)},b.prototype.egcd=function(e){m(0===e.negative),m(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new b(1),n=new b(0),o=new b(0),a=new b(1),s=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++s;for(var u=r.clone(),c=t.clone();!t.isZero();){for(var l=0,f=1;0==(t.words[0]&f)&&l<26;++l,f<<=1);if(0<l)for(t.iushrn(l);0<l--;)(i.isOdd()||n.isOdd())&&(i.iadd(u),n.isub(c)),i.iushrn(1),n.iushrn(1);for(var h=0,d=1;0==(r.words[0]&d)&&h<26;++h,d<<=1);if(0<h)for(r.iushrn(h);0<h--;)(o.isOdd()||a.isOdd())&&(o.iadd(u),a.isub(c)),o.iushrn(1),a.iushrn(1);0<=t.cmp(r)?(t.isub(r),i.isub(o),n.isub(a)):(r.isub(t),o.isub(i),a.isub(n))}return{a:o,b:a,gcd:r.iushln(s)}},b.prototype._invmp=function(e){m(0===e.negative),m(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,n=new b(1),o=new b(0),a=r.clone();0<t.cmpn(1)&&0<r.cmpn(1);){for(var s=0,u=1;0==(t.words[0]&u)&&s<26;++s,u<<=1);if(0<s)for(t.iushrn(s);0<s--;)n.isOdd()&&n.iadd(a),n.iushrn(1);for(var c=0,l=1;0==(r.words[0]&l)&&c<26;++c,l<<=1);if(0<c)for(r.iushrn(c);0<c--;)o.isOdd()&&o.iadd(a),o.iushrn(1);0<=t.cmp(r)?(t.isub(r),n.isub(o)):(r.isub(t),o.isub(n))}return(i=0===t.cmpn(1)?n:o).cmpn(0)<0&&i.iadd(e),i},b.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0;for(var i=r.negative=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var o=t;t=r,r=o}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},b.prototype.invm=function(e){return this.egcd(e).a.umod(e)},b.prototype.isEven=function(){return 0==(1&this.words[0])},b.prototype.isOdd=function(){return 1==(1&this.words[0])},b.prototype.andln=function(e){return this.words[0]&e},b.prototype.bincn=function(e){m("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(1+r),this.words[r]|=i,this;for(var n=i,o=r;0!==n&&o<this.length;o++){var a=0|this.words[o];n=(a+=n)>>>26,a&=67108863,this.words[o]=a}return 0!==n&&(this.words[o]=n,this.length++),this},b.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},b.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),1<this.length)t=1;else{r&&(e=-e),m(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},b.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},b.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;0<=r;r--){var i=0|this.words[r],n=0|e.words[r];if(i!=n){i<n?t=-1:n<i&&(t=1);break}}return t},b.prototype.gtn=function(e){return 1===this.cmpn(e)},b.prototype.gt=function(e){return 1===this.cmp(e)},b.prototype.gten=function(e){return 0<=this.cmpn(e)},b.prototype.gte=function(e){return 0<=this.cmp(e)},b.prototype.ltn=function(e){return-1===this.cmpn(e)},b.prototype.lt=function(e){return-1===this.cmp(e)},b.prototype.lten=function(e){return this.cmpn(e)<=0},b.prototype.lte=function(e){return this.cmp(e)<=0},b.prototype.eqn=function(e){return 0===this.cmpn(e)},b.prototype.eq=function(e){return 0===this.cmp(e)},b.red=function(e){return new w(e)},b.prototype.toRed=function(e){return m(!this.red,"Already a number in reduction context"),m(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},b.prototype.fromRed=function(){return m(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},b.prototype._forceRed=function(e){return this.red=e,this},b.prototype.forceRed=function(e){return m(!this.red,"Already a number in reduction context"),this._forceRed(e)},b.prototype.redAdd=function(e){return m(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},b.prototype.redIAdd=function(e){return m(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},b.prototype.redSub=function(e){return m(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},b.prototype.redISub=function(e){return m(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},b.prototype.redShl=function(e){return m(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},b.prototype.redMul=function(e){return m(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},b.prototype.redIMul=function(e){return m(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},b.prototype.redSqr=function(){return m(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},b.prototype.redISqr=function(){return m(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},b.prototype.redSqrt=function(){return m(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},b.prototype.redInvm=function(){return m(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},b.prototype.redNeg=function(){return m(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},b.prototype.redPow=function(e){return m(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var c={k256:null,p224:null,p192:null,p25519:null};function l(e,t){this.name=e,this.p=new b(t,16),this.n=this.p.bitLength(),this.k=new b(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){l.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){l.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function g(){l.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){l.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function w(e){if("string"==typeof e){var t=b._prime(e);this.m=t.p,this.prime=t}else m(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){w.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new b(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}l.prototype._tmp=function(){var e=new b(null);return e.words=new Array(Math.ceil(this.n/13)),e},l.prototype.ireduce=function(e){for(var t,r=e;this.split(r,this.tmp),(t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength())>this.n;);var i=t<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):0<i?r.isub(this.p):r.strip(),r},l.prototype.split=function(e,t){e.iushrn(this.n,0,t)},l.prototype.imulK=function(e){return e.imul(this.k)},r(v,l),v.prototype.split=function(e,t){for(var r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var n=e.words[9];for(t.words[t.length++]=4194303&n,i=10;i<e.length;i++){var o=0|e.words[i];e.words[i-10]=(4194303&o)<<4|n>>>22,n=o}n>>>=22,0===(e.words[i-10]=n)&&10<e.length?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var i=0|e.words[r];t+=977*i,e.words[r]=67108863&t,t=64*i+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(y,l),r(g,l),r(_,l),_.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var i=19*(0|e.words[r])+t,n=67108863&i;i>>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},b._prime=function(e){if(c[e])return c[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new y;else if("p192"===e)t=new g;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return c[e]=t},w.prototype._verify1=function(e){m(0===e.negative,"red works only with positives"),m(e.red,"red works only with red numbers")},w.prototype._verify2=function(e,t){m(0==(e.negative|t.negative),"red works only with positives"),m(e.red&&e.red===t.red,"red works only with red numbers")},w.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},w.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},w.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return 0<=r.cmp(this.m)&&r.isub(this.m),r._forceRed(this)},w.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return 0<=r.cmp(this.m)&&r.isub(this.m),r},w.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},w.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},w.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},w.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},w.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},w.prototype.isqr=function(e){return this.imul(e,e.clone())},w.prototype.sqr=function(e){return this.mul(e,e)},w.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(m(t%2==1),3===t){var r=this.m.add(new b(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),n=0;!i.isZero()&&0===i.andln(1);)n++,i.iushrn(1);m(!i.isZero());var o=new b(1).toRed(this),a=o.redNeg(),s=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new b(2*u*u).toRed(this);0!==this.pow(u,s).cmp(a);)u.redIAdd(a);for(var c=this.pow(u,i),l=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),h=n;0!==f.cmp(o);){for(var d=f,p=0;0!==d.cmp(o);p++)d=d.redSqr();m(p<h);var v=this.pow(c,new b(1).iushln(h-p-1));l=l.redMul(v),c=v.redSqr(),f=f.redMul(c),h=p}return l},w.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},w.prototype.pow=function(e,t){if(t.isZero())return new b(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new b(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var n=r[0],o=0,a=0,s=t.bitLength()%26;for(0===s&&(s=26),i=t.length-1;0<=i;i--){for(var u=t.words[i],c=s-1;0<=c;c--){var l=u>>c&1;n!==r[0]&&(n=this.sqr(n)),0!=l||0!==o?(o<<=1,o|=l,(4===++a||0===i&&0===c)&&(n=this.mul(n,r[o]),o=a=0)):a=0}s=26}return n},w.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},w.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},b.mont=function(e){return new x(e)},r(x,w),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return 0<=n.cmp(this.m)?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new b(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return 0<=n.cmp(this.m)?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)},{buffer:19}],18:[function(e,t,r){var i;function n(e){this.rand=e}if(t.exports=function(e){return i||(i=new n(null)),i.generate(e)},(t.exports.Rand=n).prototype.generate=function(e){return this._rand(e)},n.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?n.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?n.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(n.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=e("crypto");if("function"!=typeof o.randomBytes)throw new Error("Not supported");n.prototype._rand=function(e){return o.randomBytes(e)}}catch(e){}},{crypto:19}],19:[function(e,t,r){},{}],20:[function(e,t,r){var n=e("safe-buffer").Buffer;function o(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i<t;i++)r[i]=e.readUInt32BE(4*i);return r}function i(e){for(;0<e.length;e++)e[0]=0}function a(e,t,r,i,n){for(var o,a,s,u,c=r[0],l=r[1],f=r[2],h=r[3],d=e[0]^t[0],p=e[1]^t[1],v=e[2]^t[2],m=e[3]^t[3],b=4,y=1;y<n;y++)o=c[d>>>24]^l[p>>>16&255]^f[v>>>8&255]^h[255&m]^t[b++],a=c[p>>>24]^l[v>>>16&255]^f[m>>>8&255]^h[255&d]^t[b++],s=c[v>>>24]^l[m>>>16&255]^f[d>>>8&255]^h[255&p]^t[b++],u=c[m>>>24]^l[d>>>16&255]^f[p>>>8&255]^h[255&v]^t[b++],d=o,p=a,v=s,m=u;return o=(i[d>>>24]<<24|i[p>>>16&255]<<16|i[v>>>8&255]<<8|i[255&m])^t[b++],a=(i[p>>>24]<<24|i[v>>>16&255]<<16|i[m>>>8&255]<<8|i[255&d])^t[b++],s=(i[v>>>24]<<24|i[m>>>16&255]<<16|i[d>>>8&255]<<8|i[255&p])^t[b++],u=(i[m>>>24]<<24|i[d>>>16&255]<<16|i[p>>>8&255]<<8|i[255&v])^t[b++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var f=[0,1,2,4,8,16,32,64,128,27,54],h=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],i=[],n=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99;var l=e[i[r[a]=c]=a],f=e[l],h=e[f],d=257*e[c]^16843008*c;n[0][a]=d<<24|d>>>8,n[1][a]=d<<16|d>>>16,n[2][a]=d<<8|d>>>24,n[3][a]=d,d=16843009*h^65537*f^257*l^16843008*a,o[0][c]=d<<24|d>>>8,o[1][c]=d<<16|d>>>16,o[2][c]=d<<8|d>>>24,o[3][c]=d,0===a?a=s=1:(a=l^e[e[e[h^l]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:o}}();function s(e){this._key=o(e),this._reset()}s.blockSize=16,s.keySize=32,s.prototype.blockSize=s.blockSize,s.prototype.keySize=s.keySize,s.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,i=4*(r+1),n=[],o=0;o<t;o++)n[o]=e[o];for(o=t;o<i;o++){var a=n[o-1];o%t==0?(a=a<<8|a>>>24,a=h.SBOX[a>>>24]<<24|h.SBOX[a>>>16&255]<<16|h.SBOX[a>>>8&255]<<8|h.SBOX[255&a],a^=f[o/t|0]<<24):6<t&&o%t==4&&(a=h.SBOX[a>>>24]<<24|h.SBOX[a>>>16&255]<<16|h.SBOX[a>>>8&255]<<8|h.SBOX[255&a]),n[o]=n[o-t]^a}for(var s=[],u=0;u<i;u++){var c=i-u,l=n[c-(u%4?0:4)];s[u]=u<4||c<=4?l:h.INV_SUB_MIX[0][h.SBOX[l>>>24]]^h.INV_SUB_MIX[1][h.SBOX[l>>>16&255]]^h.INV_SUB_MIX[2][h.SBOX[l>>>8&255]]^h.INV_SUB_MIX[3][h.SBOX[255&l]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=s},s.prototype.encryptBlockRaw=function(e){return a(e=o(e),this._keySchedule,h.SUB_MIX,h.SBOX,this._nRounds)},s.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},s.prototype.decryptBlock=function(e){var t=(e=o(e))[1];e[1]=e[3],e[3]=t;var r=a(e,this._invKeySchedule,h.INV_SUB_MIX,h.INV_SBOX,this._nRounds),i=n.allocUnsafe(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[3],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[1],12),i},s.prototype.scrub=function(){i(this._keySchedule),i(this._invKeySchedule),i(this._key)},t.exports.AES=s},{"safe-buffer":143}],21:[function(e,t,r){var a=e("./aes"),c=e("safe-buffer").Buffer,s=e("cipher-base"),i=e("inherits"),l=e("./ghash"),n=e("buffer-xor"),f=e("./incr32");function o(e,t,r,i){s.call(this);var n=c.alloc(4,0);this._cipher=new a.AES(t);var o=this._cipher.encryptBlock(n);this._ghash=new l(o),r=function(e,t,r){if(12===t.length)return e._finID=c.concat([t,c.from([0,0,0,1])]),c.concat([t,c.from([0,0,0,2])]);var i=new l(r),n=t.length,o=n%16;i.update(t),o&&(o=16-o,i.update(c.alloc(o,0))),i.update(c.alloc(8,0));var a=8*n,s=c.alloc(8);s.writeUIntBE(a,0,8),i.update(s),e._finID=i.state;var u=c.from(e._finID);return f(u),u}(this,r,o),this._prev=c.from(r),this._cache=c.allocUnsafe(0),this._secCache=c.allocUnsafe(0),this._decrypt=i,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}i(o,s),o.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=c.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},o.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=n(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var i=Math.min(e.length,t.length),n=0;n<i;++n)r+=e[n]^t[n];return r}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},o.prototype.getAuthTag=function(){if(this._decrypt||!c.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},o.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},o.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},t.exports=o},{"./aes":20,"./ghash":25,"./incr32":26,"buffer-xor":48,"cipher-base":50,inherits:103,"safe-buffer":143}],22:[function(e,t,r){var i=e("./encrypter"),n=e("./decrypter"),o=e("./modes/list.json");r.createCipher=r.Cipher=i.createCipher,r.createCipheriv=r.Cipheriv=i.createCipheriv,r.createDecipher=r.Decipher=n.createDecipher,r.createDecipheriv=r.Decipheriv=n.createDecipheriv,r.listCiphers=r.getCiphers=function(){return Object.keys(o)}},{"./decrypter":23,"./encrypter":24,"./modes/list.json":34}],23:[function(e,t,r){var n=e("./authCipher"),o=e("safe-buffer").Buffer,a=e("./modes"),s=e("./streamCipher"),i=e("cipher-base"),u=e("./aes"),c=e("evp_bytestokey");function l(e,t,r){i.call(this),this._cache=new f,this._last=void 0,this._cipher=new u.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}function f(){this.cache=o.allocUnsafe(0)}function h(e,t,r){var i=a[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=o.from(r)),"GCM"!==i.mode&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=o.from(t)),t.length!==i.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===i.type?new s(i.module,t,r,!0):"auth"===i.type?new n(i.module,t,r,!0):new l(i.module,t,r)}e("inherits")(l,i),l.prototype._update=function(e){var t,r;this._cache.add(e);for(var i=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),i.push(r);return o.concat(i)},l.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15],r=-1;for(;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");if(16===t)return;return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},f.prototype.add=function(e){this.cache=o.concat([this.cache,e])},f.prototype.get=function(e){var t;if(e){if(16<this.cache.length)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(16<=this.cache.length)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},f.prototype.flush=function(){if(this.cache.length)return this.cache},r.createDecipher=function(e,t){var r=a[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=c(t,!1,r.key,r.iv);return h(e,i.key,i.iv)},r.createDecipheriv=h},{"./aes":20,"./authCipher":21,"./modes":33,"./streamCipher":36,"cipher-base":50,evp_bytestokey:86,inherits:103,"safe-buffer":143}],24:[function(e,t,r){var n=e("./modes"),o=e("./authCipher"),a=e("safe-buffer").Buffer,s=e("./streamCipher"),i=e("cipher-base"),u=e("./aes"),c=e("evp_bytestokey");function l(e,t,r){i.call(this),this._cache=new h,this._cipher=new u.AES(t),this._prev=a.from(r),this._mode=e,this._autopadding=!0}e("inherits")(l,i),l.prototype._update=function(e){var t,r;this._cache.add(e);for(var i=[];t=this._cache.get();)r=this._mode.encrypt(this,t),i.push(r);return a.concat(i)};var f=a.alloc(16,16);function h(){this.cache=a.allocUnsafe(0)}function d(e,t,r){var i=n[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=a.from(t)),t.length!==i.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=a.from(r)),"GCM"!==i.mode&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===i.type?new s(i.module,t,r):"auth"===i.type?new o(i.module,t,r):new l(i.module,t,r)}l.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(f))throw this._cipher.scrub(),new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=a.concat([this.cache,e])},h.prototype.get=function(){if(15<this.cache.length){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},h.prototype.flush=function(){for(var e=16-this.cache.length,t=a.allocUnsafe(e),r=-1;++r<e;)t.writeUInt8(e,r);return a.concat([this.cache,t])},r.createCipheriv=d,r.createCipher=function(e,t){var r=n[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=c(t,!1,r.key,r.iv);return d(e,i.key,i.iv)}},{"./aes":20,"./authCipher":21,"./modes":33,"./streamCipher":36,"cipher-base":50,evp_bytestokey:86,inherits:103,"safe-buffer":143}],25:[function(e,t,r){var i=e("safe-buffer").Buffer,n=i.alloc(16,0);function o(e){var t=i.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function a(e){this.h=e,this.state=i.alloc(16,0),this.cache=i.allocUnsafe(0)}a.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},a.prototype._multiply=function(){for(var e,t,r=function(e){return[e.readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)]}(this.h),i=[0,0,0,0],n=-1;++n<128;){for(0!=(this.state[~~(n/8)]&1<<7-n%8)&&(i[0]^=r[0],i[1]^=r[1],i[2]^=r[2],i[3]^=r[3]),t=0!=(1&r[3]),e=3;0<e;e--)r[e]=r[e]>>>1|(1&r[e-1])<<31;r[0]=r[0]>>>1,t&&(r[0]=r[0]^225<<24)}this.state=o(i)},a.prototype.update=function(e){var t;for(this.cache=i.concat([this.cache,e]);16<=this.cache.length;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},a.prototype.final=function(e,t){return this.cache.length&&this.ghash(i.concat([this.cache,n],16)),this.ghash(o([0,e,0,t])),this.state},t.exports=a},{"safe-buffer":143}],26:[function(e,t,r){t.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},{}],27:[function(e,t,r){var n=e("buffer-xor");r.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},r.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return n(i,r)}},{"buffer-xor":48}],28:[function(e,t,r){var o=e("safe-buffer").Buffer,a=e("buffer-xor");function s(e,t,r){var i=t.length,n=a(t,e._cache);return e._cache=e._cache.slice(i),e._prev=o.concat([e._prev,r?t:n]),n}r.encrypt=function(e,t,r){for(var i,n=o.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=o.allocUnsafe(0)),!(e._cache.length<=t.length)){n=o.concat([n,s(e,t,r)]);break}i=e._cache.length,n=o.concat([n,s(e,t.slice(0,i),r)]),t=t.slice(i)}return n}},{"buffer-xor":48,"safe-buffer":143}],29:[function(e,t,r){var a=e("safe-buffer").Buffer;function s(e,t,r){for(var i,n,o=-1,a=0;++o<8;)i=t&1<<7-o?128:0,a+=(128&(n=e._cipher.encryptBlock(e._prev)[0]^i))>>o%8,e._prev=u(e._prev,r?i:n);return a}function u(e,t){var r=e.length,i=-1,n=a.allocUnsafe(e.length);for(e=a.concat([e,a.from([t])]);++i<r;)n[i]=e[i]<<1|e[i+1]>>7;return n}r.encrypt=function(e,t,r){for(var i=t.length,n=a.allocUnsafe(i),o=-1;++o<i;)n[o]=s(e,t[o],r);return n}},{"safe-buffer":143}],30:[function(e,t,r){var l=e("safe-buffer").Buffer;r.encrypt=function(e,t,r){for(var i,n,o,a,s=t.length,u=l.allocUnsafe(s),c=-1;++c<s;)u[c]=(i=e,n=t[c],o=r,void 0,a=i._cipher.encryptBlock(i._prev)[0]^n,i._prev=l.concat([i._prev.slice(1),l.from([o?n:a])]),a);return u}},{"safe-buffer":143}],31:[function(e,t,r){var l=e("buffer-xor"),f=e("safe-buffer").Buffer,h=e("../incr32");r.encrypt=function(e,t){var r,i,n=Math.ceil(t.length/16),o=e._cache.length;e._cache=f.concat([e._cache,f.allocUnsafe(16*n)]);for(var a=0;a<n;a++){var s=(void 0,i=(r=e)._cipher.encryptBlockRaw(r._prev),h(r._prev),i),u=o+16*a;e._cache.writeUInt32BE(s[0],u+0),e._cache.writeUInt32BE(s[1],u+4),e._cache.writeUInt32BE(s[2],u+8),e._cache.writeUInt32BE(s[3],u+12)}var c=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),l(t,c)}},{"../incr32":26,"buffer-xor":48,"safe-buffer":143}],32:[function(e,t,r){r.encrypt=function(e,t){return e._cipher.encryptBlock(t)},r.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},{}],33:[function(e,t,r){var i={ECB:e("./ecb"),CBC:e("./cbc"),CFB:e("./cfb"),CFB8:e("./cfb8"),CFB1:e("./cfb1"),OFB:e("./ofb"),CTR:e("./ctr"),GCM:e("./ctr")},n=e("./list.json");for(var o in n)n[o].module=i[n[o].mode];t.exports=n},{"./cbc":27,"./cfb":28,"./cfb1":29,"./cfb8":30,"./ctr":31,"./ecb":32,"./list.json":34,"./ofb":35}],34:[function(e,t,r){t.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}},{}],35:[function(e,t,r){(function(n){var o=e("buffer-xor");r.encrypt=function(e,t){for(;e._cache.length<t.length;)e._cache=n.concat([e._cache,(r=e,r._prev=r._cipher.encryptBlock(r._prev),r._prev)]);var r,i=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),o(t,i)}}).call(this,e("buffer").Buffer)},{buffer:49,"buffer-xor":48}],36:[function(e,t,r){var n=e("./aes"),o=e("safe-buffer").Buffer,a=e("cipher-base");function i(e,t,r,i){a.call(this),this._cipher=new n.AES(t),this._prev=o.from(r),this._cache=o.allocUnsafe(0),this._secCache=o.allocUnsafe(0),this._decrypt=i,this._mode=e}e("inherits")(i,a),i.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},i.prototype._final=function(){this._cipher.scrub()},t.exports=i},{"./aes":20,"cipher-base":50,inherits:103,"safe-buffer":143}],37:[function(e,t,r){var o=e("evp_bytestokey"),i=e("browserify-aes/browser"),n=e("browserify-des"),a=e("browserify-des/modes"),s=e("browserify-aes/modes");function u(e,t,r){if(e=e.toLowerCase(),s[e])return i.createCipheriv(e,t,r);if(a[e])return new n({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function c(e,t,r){if(e=e.toLowerCase(),s[e])return i.createDecipheriv(e,t,r);if(a[e])return new n({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}r.createCipher=r.Cipher=function(e,t){var r,i;if(e=e.toLowerCase(),s[e])r=s[e].key,i=s[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,i=a[e].iv}var n=o(t,!1,r,i);return u(e,n.key,n.iv)},r.createCipheriv=r.Cipheriv=u,r.createDecipher=r.Decipher=function(e,t){var r,i;if(e=e.toLowerCase(),s[e])r=s[e].key,i=s[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,i=a[e].iv}var n=o(t,!1,r,i);return c(e,n.key,n.iv)},r.createDecipheriv=r.Decipheriv=c,r.listCiphers=r.getCiphers=function(){return Object.keys(a).concat(i.getCiphers())}},{"browserify-aes/browser":22,"browserify-aes/modes":33,"browserify-des":38,"browserify-des/modes":39,evp_bytestokey:86}],38:[function(i,n,e){(function(a){var s=i("cipher-base"),e=i("des.js"),t=i("inherits"),u={"des-ede3-cbc":e.CBC.instantiate(e.EDE),"des-ede3":e.EDE,"des-ede-cbc":e.CBC.instantiate(e.EDE),"des-ede":e.EDE,"des-cbc":e.CBC.instantiate(e.DES),"des-ecb":e.DES};function r(e){s.call(this);var t,r=e.mode.toLowerCase(),i=u[r];t=e.decrypt?"decrypt":"encrypt";var n=e.key;"des-ede"!==r&&"des-ede-cbc"!==r||(n=a.concat([n,n.slice(0,8)]));var o=e.iv;this._des=i.create({key:n,iv:o,type:t})}u.des=u["des-cbc"],u.des3=u["des-ede3-cbc"],t(n.exports=r,s),r.prototype._update=function(e){return new a(this._des.update(e))},r.prototype._final=function(){return new a(this._des.final())}}).call(this,i("buffer").Buffer)},{buffer:49,"cipher-base":50,"des.js":59,inherits:103}],39:[function(e,t,r){r["des-ecb"]={key:8,iv:0},r["des-cbc"]=r.des={key:8,iv:8},r["des-ede3-cbc"]=r.des3={key:24,iv:8},r["des-ede3"]={key:24,iv:0},r["des-ede-cbc"]={key:16,iv:8},r["des-ede"]={key:16,iv:0}},{}],40:[function(t,r,e){(function(d){var p=t("bn.js"),i=t("randombytes");function e(e,t){var r=function(e){var t=v(e);return{blinder:t.toRed(p.mont(e.modulus)).redPow(new p(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),i=t.modulus.byteLength(),n=(p.mont(t.modulus),new p(e).mul(r.blinder).umod(t.modulus)),o=n.toRed(p.mont(t.prime1)),a=n.toRed(p.mont(t.prime2)),s=t.coefficient,u=t.prime1,c=t.prime2,l=o.redPow(t.exponent1),f=a.redPow(t.exponent2);l=l.fromRed(),f=f.fromRed();var h=l.isub(f).imul(s).umod(u);return h.imul(c),f.iadd(h),new d(f.imul(r.unblinder).umod(t.modulus).toArray(!1,i))}function v(e){for(var t=e.modulus.byteLength(),r=new p(i(t));0<=r.cmp(e.modulus)||!r.umod(e.prime1)||!r.umod(e.prime2);)r=new p(i(t));return r}(r.exports=e).getr=v}).call(this,t("buffer").Buffer)},{"bn.js":17,buffer:49,randombytes:130}],41:[function(e,t,r){t.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":42}],42:[function(e,t,r){t.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],43:[function(e,t,r){t.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],44:[function(f,h,e){(function(n){var r=f("create-hash"),i=f("stream"),e=f("inherits"),o=f("./sign"),a=f("./verify"),s=f("./algorithms.json");function t(e){i.Writable.call(this);var t=s[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=r(t.hash),this._tag=t.id,this._signType=t.sign}function u(e){i.Writable.call(this);var t=s[e];if(!t)throw new Error("Unknown message digest");this._hash=r(t.hash),this._tag=t.id,this._signType=t.sign}function c(e){return new t(e)}function l(e){return new u(e)}Object.keys(s).forEach(function(e){s[e].id=new n(s[e].id,"hex"),s[e.toLowerCase()]=s[e]}),e(t,i.Writable),t.prototype._write=function(e,t,r){this._hash.update(e),r()},t.prototype.update=function(e,t){return"string"==typeof e&&(e=new n(e,t)),this._hash.update(e),this},t.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),i=o(r,e,this._hashType,this._signType,this._tag);return t?i.toString(t):i},e(u,i.Writable),u.prototype._write=function(e,t,r){this._hash.update(e),r()},u.prototype.update=function(e,t){return"string"==typeof e&&(e=new n(e,t)),this._hash.update(e),this},u.prototype.verify=function(e,t,r){"string"==typeof t&&(t=new n(t,r)),this.end();var i=this._hash.digest();return a(t,i,e,this._signType,this._tag)},h.exports={Sign:c,Verify:l,createSign:c,createVerify:l}}).call(this,f("buffer").Buffer)},{"./algorithms.json":42,"./sign":45,"./verify":46,buffer:49,"create-hash":53,inherits:103,stream:152}],45:[function(e,t,r){(function(v){var c=e("create-hmac"),l=e("browserify-rsa"),f=e("elliptic").ec,m=e("bn.js"),h=e("parse-asn1"),d=e("./curves.json");function b(e,t,r,i){if((e=new v(e.toArray())).length<t.byteLength()){var n=new v(t.byteLength()-e.length);n.fill(0),e=v.concat([n,e])}var o=r.length,a=function(e,t){e=(e=y(e,t)).mod(t);var r=new v(e.toArray());if(r.length<t.byteLength()){var i=new v(t.byteLength()-r.length);i.fill(0),r=v.concat([i,r])}return r}(r,t),s=new v(o);s.fill(1);var u=new v(o);return u.fill(0),u=c(i,u).update(s).update(new v([0])).update(e).update(a).digest(),s=c(i,u).update(s).digest(),{k:u=c(i,u).update(s).update(new v([1])).update(e).update(a).digest(),v:s=c(i,u).update(s).digest()}}function y(e,t){var r=new m(e),i=(e.length<<3)-t.bitLength();return 0<i&&r.ishrn(i),r}function g(e,t,r){var i,n;do{for(i=new v(0);8*i.length<e.bitLength();)t.v=c(r,t.k).update(t.v).digest(),i=v.concat([i,t.v]);n=y(i,e),t.k=c(r,t.k).update(t.v).update(new v([0])).digest(),t.v=c(r,t.k).update(t.v).digest()}while(-1!==n.cmp(e));return n}t.exports=function(e,t,r,i,n){var o=h(t);if(o.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");return function(e,t){var r=d[t.curve.join(".")];if(!r)throw new Error("unknown curve "+t.curve.join("."));var i=new f(r).keyFromPrivate(t.privateKey).sign(e);return new v(i.toDER())}(e,o)}if("dsa"===o.type){if("dsa"!==i)throw new Error("wrong private key type");return function(e,t,r){for(var i,n,o,a,s=t.params.priv_key,u=t.params.p,c=t.params.q,l=t.params.g,f=new m(0),h=y(e,c).mod(c),d=!1,p=b(s,c,e,r);!1===d;)i=g(c,p,r),n=i,o=u,a=c,f=l.toRed(m.mont(o)).redPow(n).fromRed().mod(a),0===(d=i.invm(c).imul(h.add(s.mul(f))).mod(c)).cmpn(0)&&(d=!1,f=new m(0));return function(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e)),128&t[0]&&(t=[0].concat(t));var r=[48,e.length+t.length+4,2,e.length];return r=r.concat(e,[2,t.length],t),new v(r)}(f,d)}(e,o,r)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");e=v.concat([n,e]);for(var a=o.modulus.byteLength(),s=[0,1];e.length+s.length+1<a;)s.push(255);s.push(0);for(var u=-1;++u<e.length;)s.push(e[u]);return l(s,o)},t.exports.getKey=b,t.exports.makeKey=g}).call(this,e("buffer").Buffer)},{"./curves.json":43,"bn.js":17,"browserify-rsa":40,buffer:49,"create-hmac":56,elliptic:69,"parse-asn1":115}],46:[function(e,t,r){(function(h){var d=e("bn.js"),p=e("elliptic").ec,v=e("parse-asn1"),m=e("./curves.json");function b(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}t.exports=function(e,t,r,i,n){var o=v(r);if("ec"===o.type){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong public key type");return function(e,t,r){var i=m[r.data.algorithm.curve.join(".")];if(!i)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var n=new p(i),o=r.data.subjectPrivateKey.data;return n.verify(t,e,o)}(e,t,o)}if("dsa"===o.type){if("dsa"!==i)throw new Error("wrong public key type");return function(e,t,r){var i=r.data.p,n=r.data.q,o=r.data.g,a=r.data.pub_key,s=v.signature.decode(e,"der"),u=s.s,c=s.r;b(u,n),b(c,n);var l=d.mont(i),f=u.invm(n);return 0===o.toRed(l).redPow(new d(t).mul(f).mod(n)).fromRed().mul(a.toRed(l).redPow(c.mul(f).mod(n)).fromRed()).mod(i).mod(n).cmp(c)}(e,t,o)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong public key type");t=h.concat([n,t]);for(var a=o.modulus.byteLength(),s=[1],u=0;t.length+s.length+2<a;)s.push(255),u++;s.push(0);for(var c=-1;++c<t.length;)s.push(t[c]);s=new h(s);var l=d.mont(o.modulus);e=(e=new d(e).toRed(l)).redPow(new d(o.publicExponent)),e=new h(e.fromRed().toArray());var f=u<8?1:0;for(a=Math.min(e.length,s.length),e.length!==s.length&&(f=1),c=-1;++c<a;)f|=e[c]^s[c];return 0===f}}).call(this,e("buffer").Buffer)},{"./curves.json":43,"bn.js":17,buffer:49,elliptic:69,"parse-asn1":115}],47:[function(e,t,r){arguments[4][19][0].apply(r,arguments)},{dup:19}],48:[function(e,t,r){(function(o){t.exports=function(e,t){for(var r=Math.min(e.length,t.length),i=new o(r),n=0;n<r;++n)i[n]=e[n]^t[n];return i}}).call(this,e("buffer").Buffer)},{buffer:49}],49:[function(F,e,B){(function(e){"use strict";var i=F("base64-js"),o=F("ieee754"),a=F("isarray");function r(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(r()<t)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=f.prototype:(null===e&&(e=new f(t)),e.length=t),e}function f(e,t,r){if(!(f.TYPED_ARRAY_SUPPORT||this instanceof f))return new f(e,t,r);if("number"!=typeof e)return n(this,e,t,r);if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return c(this,e)}function n(e,t,r,i){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,i){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(i||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,r):new Uint8Array(t,r,i);f.TYPED_ARRAY_SUPPORT?(e=t).__proto__=f.prototype:e=l(e,t);return e}(e,t,r,i):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!f.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var i=0|d(t,r),n=(e=s(e,i)).write(t,r);n!==i&&(e=e.slice(0,n));return e}(e,t,r):function(e,t){if(f.isBuffer(t)){var r=0|h(t.length);return 0===(e=s(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||function(e){return e!=e}(t.length)?s(e,0):l(e,t);if("Buffer"===t.type&&a(t.data))return l(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function c(e,t){if(u(t),e=s(e,t<0?0:0|h(t)),!f.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function l(e,t){var r=t.length<0?0:0|h(t.length);e=s(e,r);for(var i=0;i<r;i+=1)e[i]=255&t[i];return e}function h(e){if(e>=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function d(e,t){if(f.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return L(e).length;default:if(i)return D(e).length;t=(""+t).toLowerCase(),i=!0}}function p(e,t,r){var i=e[t];e[t]=e[r],e[r]=i}function v(e,t,r,i,n){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):2147483647<r?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=f.from(t,i)),f.isBuffer(t))return 0===t.length?-1:m(e,t,r,i,n);if("number"==typeof t)return t&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,i,n);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,i,n){var o,a=1,s=e.length,u=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;s/=a=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(n){var l=-1;for(o=r;o<s;o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(s<r+u&&(r=s-u),o=r;0<=o;o--){for(var f=!0,h=0;h<u;h++)if(c(e,o+h)!==c(t,h)){f=!1;break}if(f)return o}return-1}function b(e,t,r,i){r=Number(r)||0;var n=e.length-r;i?n<(i=Number(i))&&(i=n):i=n;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");o/2<i&&(i=o/2);for(var a=0;a<i;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[r+a]=s}return a}function y(e,t,r,i){return j(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,i)}function g(e,t,r){return 0===t&&r===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,r))}function _(e,t,r){r=Math.min(e.length,r);for(var i=[],n=t;n<r;){var o,a,s,u,c=e[n],l=null,f=239<c?4:223<c?3:191<c?2:1;if(n+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[n+1]))&&127<(u=(31&c)<<6|63&o)&&(l=u);break;case 3:o=e[n+1],a=e[n+2],128==(192&o)&&128==(192&a)&&2047<(u=(15&c)<<12|(63&o)<<6|63&a)&&(u<55296||57343<u)&&(l=u);break;case 4:o=e[n+1],a=e[n+2],s=e[n+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&65535<(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)&&u<1114112&&(l=u)}null===l?(l=65533,f=1):65535<l&&(l-=65536,i.push(l>>>10&1023|55296),l=56320|1023&l),i.push(l),n+=f}return function(e){var t=e.length;if(t<=w)return String.fromCharCode.apply(String,e);var r="",i=0;for(;i<t;)r+=String.fromCharCode.apply(String,e.slice(i,i+=w));return r}(i)}B.Buffer=f,B.SlowBuffer=function(e){+e!=e&&(e=0);return f.alloc(+e)},B.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),B.kMaxLength=r(),f.poolSize=8192,f._augment=function(e){return e.__proto__=f.prototype,e},f.from=function(e,t,r){return n(null,e,t,r)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(e,t,r){return function(e,t,r,i){return u(t),t<=0?s(e,t):void 0!==r?"string"==typeof i?s(e,t).fill(r,i):s(e,t).fill(r):s(e,t)}(null,e,t,r)},f.allocUnsafe=function(e){return c(null,e)},f.allocUnsafeSlow=function(e){return c(null,e)},f.isBuffer=function(e){return!(null==e||!e._isBuffer)},f.compare=function(e,t){if(!f.isBuffer(e)||!f.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,i=t.length,n=0,o=Math.min(r,i);n<o;++n)if(e[n]!==t[n]){r=e[n],i=t[n];break}return r<i?-1:i<r?1:0},f.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return f.alloc(0);var r;if(void 0===t)for(r=t=0;r<e.length;++r)t+=e[r].length;var i=f.allocUnsafe(t),n=0;for(r=0;r<e.length;++r){var o=e[r];if(!f.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,n),n+=o.length}return i},f.byteLength=d,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)p(this,t,t+1);return this},f.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)p(this,t,t+3),p(this,t+1,t+2);return this},f.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)p(this,t,t+7),p(this,t+1,t+6),p(this,t+2,t+5),p(this,t+3,t+4);return this},f.prototype.toString=function(){var e=0|this.length;return 0==e?"":0===arguments.length?_(this,0,e):function(e,t,r){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return S(this,t,r);case"utf8":case"utf-8":return _(this,t,r);case"ascii":return x(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return g(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}.apply(this,arguments)},f.prototype.equals=function(e){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===f.compare(this,e)},f.prototype.inspect=function(){var e="",t=B.INSPECT_MAX_BYTES;return 0<this.length&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},f.prototype.compare=function(e,t,r,i,n){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw new RangeError("out of range index");if(n<=i&&r<=t)return 0;if(n<=i)return-1;if(r<=t)return 1;if(this===e)return 0;for(var o=(n>>>=0)-(i>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),u=this.slice(i,n),c=e.slice(t,r),l=0;l<s;++l)if(u[l]!==c[l]){o=u[l],a=c[l];break}return o<a?-1:a<o?1:0},f.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},f.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},f.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)},f.prototype.write=function(e,t,r,i){if(void 0===t)i="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)i=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-t;if((void 0===r||n<r)&&(r=n),0<e.length&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o,a,s,u,c,l,f,h,d,p=!1;;)switch(i){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return h=t,d=r,j(D(e,(f=this).length-h),f,h,d);case"ascii":return y(this,e,t,r);case"latin1":case"binary":return y(this,e,t,r);case"base64":return u=this,c=t,l=r,j(L(e),u,c,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a=t,s=r,j(function(e,t){for(var r,i,n,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),i=r>>8,n=r%256,o.push(n),o.push(i);return o}(e,(o=this).length-a),o,a,s);default:if(p)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),p=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var w=4096;function x(e,t,r){var i="";r=Math.min(e.length,r);for(var n=t;n<r;++n)i+=String.fromCharCode(127&e[n]);return i}function T(e,t,r){var i="";r=Math.min(e.length,r);for(var n=t;n<r;++n)i+=String.fromCharCode(e[n]);return i}function S(e,t,r){var i=e.length;(!t||t<0)&&(t=0),(!r||r<0||i<r)&&(r=i);for(var n="",o=t;o<r;++o)n+=R(e[o]);return n}function M(e,t,r){for(var i=e.slice(t,r),n="",o=0;o<i.length;o+=2)n+=String.fromCharCode(i[o]+256*i[o+1]);return n}function P(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(r<e+t)throw new RangeError("Trying to access beyond buffer length")}function E(e,t,r,i,n,o){if(!f.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(n<t||t<o)throw new RangeError('"value" argument is out of bounds');if(r+i>e.length)throw new RangeError("Index out of range")}function k(e,t,r,i){t<0&&(t=65535+t+1);for(var n=0,o=Math.min(e.length-r,2);n<o;++n)e[r+n]=(t&255<<8*(i?n:1-n))>>>8*(i?n:1-n)}function C(e,t,r,i){t<0&&(t=4294967295+t+1);for(var n=0,o=Math.min(e.length-r,4);n<o;++n)e[r+n]=t>>>8*(i?n:3-n)&255}function A(e,t,r,i,n,o){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function O(e,t,r,i,n){return n||A(e,0,r,4),o.write(e,t,r,i,23,4),r+4}function I(e,t,r,i,n){return n||A(e,0,r,8),o.write(e,t,r,i,52,8),r+8}f.prototype.slice=function(e,t){var r,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):i<e&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):i<t&&(t=i),t<e&&(t=e),f.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=f.prototype;else{var n=t-e;r=new f(n,void 0);for(var o=0;o<n;++o)r[o]=this[o+e]}return r},f.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||P(e,t,this.length);for(var i=this[e],n=1,o=0;++o<t&&(n*=256);)i+=this[e+o]*n;return i},f.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||P(e,t,this.length);for(var i=this[e+--t],n=1;0<t&&(n*=256);)i+=this[e+--t]*n;return i},f.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},f.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},f.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},f.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},f.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},f.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||P(e,t,this.length);for(var i=this[e],n=1,o=0;++o<t&&(n*=256);)i+=this[e+o]*n;return(n*=128)<=i&&(i-=Math.pow(2,8*t)),i},f.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||P(e,t,this.length);for(var i=t,n=1,o=this[e+--i];0<i&&(n*=256);)o+=this[e+--i]*n;return(n*=128)<=o&&(o-=Math.pow(2,8*t)),o},f.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},f.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},f.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},f.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!0,23,4)},f.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!1,23,4)},f.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!0,52,8)},f.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!1,52,8)},f.prototype.writeUIntLE=function(e,t,r,i){(e=+e,t|=0,r|=0,i)||E(this,e,t,r,Math.pow(2,8*r)-1,0);var n=1,o=0;for(this[t]=255&e;++o<r&&(n*=256);)this[t+o]=e/n&255;return t+r},f.prototype.writeUIntBE=function(e,t,r,i){(e=+e,t|=0,r|=0,i)||E(this,e,t,r,Math.pow(2,8*r)-1,0);var n=r-1,o=1;for(this[t+n]=255&e;0<=--n&&(o*=256);)this[t+n]=e/o&255;return t+r},f.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||E(this,e,t,1,255,0),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},f.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||E(this,e,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):k(this,e,t,!0),t+2},f.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||E(this,e,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):k(this,e,t,!1),t+2},f.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||E(this,e,t,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):C(this,e,t,!0),t+4},f.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||E(this,e,t,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):C(this,e,t,!1),t+4},f.prototype.writeIntLE=function(e,t,r,i){if(e=+e,t|=0,!i){var n=Math.pow(2,8*r-1);E(this,e,t,r,n-1,-n)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},f.prototype.writeIntBE=function(e,t,r,i){if(e=+e,t|=0,!i){var n=Math.pow(2,8*r-1);E(this,e,t,r,n-1,-n)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;0<=--o&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},f.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||E(this,e,t,1,127,-128),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},f.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||E(this,e,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):k(this,e,t,!0),t+2},f.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||E(this,e,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):k(this,e,t,!1),t+2},f.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||E(this,e,t,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):C(this,e,t,!0),t+4},f.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||E(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):C(this,e,t,!1),t+4},f.prototype.writeFloatLE=function(e,t,r){return O(this,e,t,!0,r)},f.prototype.writeFloatBE=function(e,t,r){return O(this,e,t,!1,r)},f.prototype.writeDoubleLE=function(e,t,r){return I(this,e,t,!0,r)},f.prototype.writeDoubleBE=function(e,t,r){return I(this,e,t,!1,r)},f.prototype.copy=function(e,t,r,i){if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),0<i&&i<r&&(i=r),i===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-r&&(i=e.length-t+r);var n,o=i-r;if(this===e&&r<t&&t<i)for(n=o-1;0<=n;--n)e[n+t]=this[n+r];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(n=0;n<o;++n)e[n+t]=this[n+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},f.prototype.fill=function(e,t,r,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),1===e.length){var n=e.charCodeAt(0);n<256&&(e=n)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!f.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var a=f.isBuffer(e)?e:D(new f(e,i).toString()),s=a.length;for(o=0;o<r-t;++o)this[o+t]=a[o%s]}return this};var t=/[^+\/0-9A-Za-z-_]/g;function R(e){return e<16?"0"+e.toString(16):e.toString(16)}function D(e,t){var r;t=t||1/0;for(var i=e.length,n=null,o=[],a=0;a<i;++a){if(55295<(r=e.charCodeAt(a))&&r<57344){if(!n){if(56319<r){-1<(t-=3)&&o.push(239,191,189);continue}if(a+1===i){-1<(t-=3)&&o.push(239,191,189);continue}n=r;continue}if(r<56320){-1<(t-=3)&&o.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&-1<(t-=3)&&o.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function L(e){return i.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(t,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function j(e,t,r,i){for(var n=0;n<i&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":16,ieee754:101,isarray:105}],50:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("stream").Transform,o=e("string_decoder").StringDecoder;function a(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}e("inherits")(a,i),a.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,r){var i;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){i=e}finally{r(i)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var i=this._decoder.write(e);return r&&(i+=this._decoder.end()),i},t.exports=a},{inherits:103,"safe-buffer":143,stream:152,string_decoder:153}],51:[function(e,t,r){(function(e){function t(e){return Object.prototype.toString.call(e)}r.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},r.isBoolean=function(e){return"boolean"==typeof e},r.isNull=function(e){return null===e},r.isNullOrUndefined=function(e){return null==e},r.isNumber=function(e){return"number"==typeof e},r.isString=function(e){return"string"==typeof e},r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=function(e){return void 0===e},r.isRegExp=function(e){return"[object RegExp]"===t(e)},r.isObject=function(e){return"object"==typeof e&&null!==e},r.isDate=function(e){return"[object Date]"===t(e)},r.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},r.isFunction=function(e){return"function"==typeof e},r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":104}],52:[function(e,s,t){(function(o){var t=e("elliptic"),i=e("bn.js");s.exports=function(e){return new n(e)};var r={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function n(e){this.curveType=r[e],this.curveType||(this.curveType={name:e}),this.curve=new t.ec(this.curveType.name),this.keys=void 0}function a(e,t,r){Array.isArray(e)||(e=e.toArray());var i=new o(e);if(r&&i.length<r){var n=new o(r-i.length);n.fill(0),i=o.concat([n,i])}return t?i.toString(t):i}r.p224=r.secp224r1,r.p256=r.secp256r1=r.prime256v1,r.p192=r.secp192r1=r.prime192v1,r.p384=r.secp384r1,r.p521=r.secp521r1,n.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},n.prototype.computeSecret=function(e,t,r){return t=t||"utf8",o.isBuffer(e)||(e=new o(e,t)),a(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},n.prototype.getPublicKey=function(e,t){var r=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(r[r.length-1]%2?r[0]=7:r[0]=6),a(r,e)},n.prototype.getPrivateKey=function(e){return a(this.keys.getPrivate(),e)},n.prototype.setPublicKey=function(e,t){return t=t||"utf8",o.isBuffer(e)||(e=new o(e,t)),this.keys._importPublic(e),this},n.prototype.setPrivateKey=function(e,t){t=t||"utf8",o.isBuffer(e)||(e=new o(e,t));var r=new i(e);return r=r.toString(16),this.keys._importPrivate(r),this}}).call(this,e("buffer").Buffer)},{"bn.js":17,buffer:49,elliptic:69}],53:[function(u,c,e){(function(r){"use strict";var e=u("inherits"),t=u("./md5"),i=u("ripemd160"),n=u("sha.js"),o=u("cipher-base");function a(e){o.call(this,"digest"),this._hash=e,this.buffers=[]}function s(e){o.call(this,"digest"),this._hash=e}e(a,o),a.prototype._update=function(e){this.buffers.push(e)},a.prototype._final=function(){var e=r.concat(this.buffers),t=this._hash(e);return this.buffers=null,t},e(s,o),s.prototype._update=function(e){this._hash.update(e)},s.prototype._final=function(){return this._hash.digest()},c.exports=function(e){return"md5"===(e=e.toLowerCase())?new a(t):new s("rmd160"===e||"ripemd160"===e?new i:n(e))}}).call(this,u("buffer").Buffer)},{"./md5":55,buffer:49,"cipher-base":50,inherits:103,ripemd160:142,"sha.js":145}],54:[function(e,t,r){(function(o){"use strict";var a=new o(4);a.fill(0);t.exports=function(e,t){var r=t(function(e){if(e.length%4!=0){var t=e.length+(4-e.length%4);e=o.concat([e,a],t)}for(var r=new Array(e.length>>>2),i=0,n=0;i<e.length;i+=4,n++)r[n]=e.readInt32LE(i);return r}(e),8*e.length);e=new o(16);for(var i=0;i<r.length;i++)e.writeInt32LE(r[i],i<<2,!0);return e}}).call(this,e("buffer").Buffer)},{buffer:49}],55:[function(e,t,r){"use strict";var i=e("./make-hash");function n(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;for(var r=1732584193,i=-271733879,n=-1732584194,o=271733878,a=0;a<e.length;a+=16){var s=r,u=i,c=n,l=o;i=p(i=p(i=p(i=p(i=d(i=d(i=d(i=d(i=h(i=h(i=h(i=h(i=f(i=f(i=f(i=f(i,n=f(n,o=f(o,r=f(r,i,n,o,e[a+0],7,-680876936),i,n,e[a+1],12,-389564586),r,i,e[a+2],17,606105819),o,r,e[a+3],22,-1044525330),n=f(n,o=f(o,r=f(r,i,n,o,e[a+4],7,-176418897),i,n,e[a+5],12,1200080426),r,i,e[a+6],17,-1473231341),o,r,e[a+7],22,-45705983),n=f(n,o=f(o,r=f(r,i,n,o,e[a+8],7,1770035416),i,n,e[a+9],12,-1958414417),r,i,e[a+10],17,-42063),o,r,e[a+11],22,-1990404162),n=f(n,o=f(o,r=f(r,i,n,o,e[a+12],7,1804603682),i,n,e[a+13],12,-40341101),r,i,e[a+14],17,-1502002290),o,r,e[a+15],22,1236535329),n=h(n,o=h(o,r=h(r,i,n,o,e[a+1],5,-165796510),i,n,e[a+6],9,-1069501632),r,i,e[a+11],14,643717713),o,r,e[a+0],20,-373897302),n=h(n,o=h(o,r=h(r,i,n,o,e[a+5],5,-701558691),i,n,e[a+10],9,38016083),r,i,e[a+15],14,-660478335),o,r,e[a+4],20,-405537848),n=h(n,o=h(o,r=h(r,i,n,o,e[a+9],5,568446438),i,n,e[a+14],9,-1019803690),r,i,e[a+3],14,-187363961),o,r,e[a+8],20,1163531501),n=h(n,o=h(o,r=h(r,i,n,o,e[a+13],5,-1444681467),i,n,e[a+2],9,-51403784),r,i,e[a+7],14,1735328473),o,r,e[a+12],20,-1926607734),n=d(n,o=d(o,r=d(r,i,n,o,e[a+5],4,-378558),i,n,e[a+8],11,-2022574463),r,i,e[a+11],16,1839030562),o,r,e[a+14],23,-35309556),n=d(n,o=d(o,r=d(r,i,n,o,e[a+1],4,-1530992060),i,n,e[a+4],11,1272893353),r,i,e[a+7],16,-155497632),o,r,e[a+10],23,-1094730640),n=d(n,o=d(o,r=d(r,i,n,o,e[a+13],4,681279174),i,n,e[a+0],11,-358537222),r,i,e[a+3],16,-722521979),o,r,e[a+6],23,76029189),n=d(n,o=d(o,r=d(r,i,n,o,e[a+9],4,-640364487),i,n,e[a+12],11,-421815835),r,i,e[a+15],16,530742520),o,r,e[a+2],23,-995338651),n=p(n,o=p(o,r=p(r,i,n,o,e[a+0],6,-198630844),i,n,e[a+7],10,1126891415),r,i,e[a+14],15,-1416354905),o,r,e[a+5],21,-57434055),n=p(n,o=p(o,r=p(r,i,n,o,e[a+12],6,1700485571),i,n,e[a+3],10,-1894986606),r,i,e[a+10],15,-1051523),o,r,e[a+1],21,-2054922799),n=p(n,o=p(o,r=p(r,i,n,o,e[a+8],6,1873313359),i,n,e[a+15],10,-30611744),r,i,e[a+6],15,-1560198380),o,r,e[a+13],21,1309151649),n=p(n,o=p(o,r=p(r,i,n,o,e[a+4],6,-145523070),i,n,e[a+11],10,-1120210379),r,i,e[a+2],15,718787259),o,r,e[a+9],21,-343485551),r=v(r,s),i=v(i,u),n=v(n,c),o=v(o,l)}return[r,i,n,o]}function s(e,t,r,i,n,o){return v(function(e,t){return e<<t|e>>>32-t}(v(v(t,e),v(i,o)),n),r)}function f(e,t,r,i,n,o,a){return s(t&r|~t&i,e,t,n,o,a)}function h(e,t,r,i,n,o,a){return s(t&i|r&~i,e,t,n,o,a)}function d(e,t,r,i,n,o,a){return s(t^r^i,e,t,n,o,a)}function p(e,t,r,i,n,o,a){return s(r^(t|~i),e,t,n,o,a)}function v(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}t.exports=function(e){return i(e,n)}},{"./make-hash":54}],56:[function(e,t,r){"use strict";var i=e("inherits"),n=e("./legacy"),a=e("cipher-base"),s=e("safe-buffer").Buffer,o=e("create-hash/md5"),u=e("ripemd160"),c=e("sha.js"),l=s.alloc(128);function f(e,t){a.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var r="sha512"===e||"sha384"===e?128:64;(this._alg=e,(this._key=t).length>r)?t=("rmd160"===e?new u:c(e)).update(t).digest():t.length<r&&(t=s.concat([t,l],r));for(var i=this._ipad=s.allocUnsafe(r),n=this._opad=s.allocUnsafe(r),o=0;o<r;o++)i[o]=54^t[o],n[o]=92^t[o];this._hash="rmd160"===e?new u:c(e),this._hash.update(i)}i(f,a),f.prototype._update=function(e){this._hash.update(e)},f.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new u:c(this._alg)).update(this._opad).update(e).digest()},t.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new f("rmd160",t):"md5"===e?new n(o,t):new f(e,t)}},{"./legacy":57,"cipher-base":50,"create-hash/md5":55,inherits:103,ripemd160:142,"safe-buffer":143,"sha.js":145}],57:[function(e,t,r){"use strict";var i=e("inherits"),o=e("safe-buffer").Buffer,a=e("cipher-base"),s=o.alloc(128);function n(e,t){a.call(this,"digest"),"string"==typeof t&&(t=o.from(t)),this._alg=e,64<(this._key=t).length?t=e(t):t.length<64&&(t=o.concat([t,s],64));for(var r=this._ipad=o.allocUnsafe(64),i=this._opad=o.allocUnsafe(64),n=0;n<64;n++)r[n]=54^t[n],i[n]=92^t[n];this._hash=[r]}i(n,a),n.prototype._update=function(e){this._hash.push(e)},n.prototype._final=function(){var e=this._alg(o.concat(this._hash));return this._alg(o.concat([this._opad,e]))},t.exports=n},{"cipher-base":50,inherits:103,"safe-buffer":143}],58:[function(e,t,r){"use strict";r.randomBytes=r.rng=r.pseudoRandomBytes=r.prng=e("randombytes"),r.createHash=r.Hash=e("create-hash"),r.createHmac=r.Hmac=e("create-hmac");var i=e("browserify-sign/algos"),n=Object.keys(i),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n);r.getHashes=function(){return o};var a=e("pbkdf2");r.pbkdf2=a.pbkdf2,r.pbkdf2Sync=a.pbkdf2Sync;var s=e("browserify-cipher");r.Cipher=s.Cipher,r.createCipher=s.createCipher,r.Cipheriv=s.Cipheriv,r.createCipheriv=s.createCipheriv,r.Decipher=s.Decipher,r.createDecipher=s.createDecipher,r.Decipheriv=s.Decipheriv,r.createDecipheriv=s.createDecipheriv,r.getCiphers=s.getCiphers,r.listCiphers=s.listCiphers;var u=e("diffie-hellman");r.DiffieHellmanGroup=u.DiffieHellmanGroup,r.createDiffieHellmanGroup=u.createDiffieHellmanGroup,r.getDiffieHellman=u.getDiffieHellman,r.createDiffieHellman=u.createDiffieHellman,r.DiffieHellman=u.DiffieHellman;var c=e("browserify-sign");r.createSign=c.createSign,r.Sign=c.Sign,r.createVerify=c.createVerify,r.Verify=c.Verify,r.createECDH=e("create-ecdh");var l=e("public-encrypt");r.publicEncrypt=l.publicEncrypt,r.privateEncrypt=l.privateEncrypt,r.publicDecrypt=l.publicDecrypt,r.privateDecrypt=l.privateDecrypt;var f=e("randomfill");r.randomFill=f.randomFill,r.randomFillSync=f.randomFillSync,r.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},r.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},{"browserify-cipher":37,"browserify-sign":44,"browserify-sign/algos":41,"create-ecdh":52,"create-hash":53,"create-hmac":56,"diffie-hellman":65,pbkdf2:117,"public-encrypt":124,randombytes:130,randomfill:131}],59:[function(e,t,r){"use strict";r.utils=e("./des/utils"),r.Cipher=e("./des/cipher"),r.DES=e("./des/des"),r.CBC=e("./des/cbc"),r.EDE=e("./des/ede")},{"./des/cbc":60,"./des/cipher":61,"./des/des":62,"./des/ede":63,"./des/utils":64}],60:[function(e,t,r){"use strict";var i=e("minimalistic-assert"),o=e("inherits"),a={};function n(e){i.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}r.instantiate=function(t){function r(e){t.call(this,e),this._cbcInit()}o(r,t);for(var e=Object.keys(a),i=0;i<e.length;i++){var n=e[i];r.prototype[n]=a[n]}return r.create=function(e){return new r(e)},r},a._cbcInit=function(){var e=new n(this.options.iv);this._cbcState=e},a._update=function(e,t,r,i){var n=this._cbcState,o=this.constructor.super_.prototype,a=n.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)a[s]^=e[t+s];o._update.call(this,a,0,r,i);for(s=0;s<this.blockSize;s++)a[s]=r[i+s]}else{o._update.call(this,e,t,r,i);for(s=0;s<this.blockSize;s++)r[i+s]^=a[s];for(s=0;s<this.blockSize;s++)a[s]=e[t+s]}}},{inherits:103,"minimalistic-assert":109}],61:[function(e,t,r){"use strict";var i=e("minimalistic-assert");function n(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}(t.exports=n).prototype._init=function(){},n.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},n.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),i=0;i<r;i++)this.buffer[this.bufferOff+i]=e[t+i];return this.bufferOff+=r,r},n.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},n.prototype._updateEncrypt=function(e){var t=0,r=0,i=(this.bufferOff+e.length)/this.blockSize|0,n=new Array(i*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(n,r)));for(var o=e.length-(e.length-t)%this.blockSize;t<o;t+=this.blockSize)this._update(e,t,n,r),r+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return n},n.prototype._updateDecrypt=function(e){for(var t=0,r=0,i=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,n=new Array(i*this.blockSize);0<i;i--)t+=this._buffer(e,t),r+=this._flushBuffer(n,r);return t+=this._buffer(e,t),n},n.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},n.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},n.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},n.prototype._unpad=function(e){return e},n.prototype._finalDecrypt=function(){i.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},{"minimalistic-assert":109}],62:[function(e,t,r){"use strict";var a=e("minimalistic-assert"),i=e("inherits"),n=e("../des"),h=n.utils,o=n.Cipher;function s(){this.tmp=new Array(2),this.keys=null}function u(e){o.call(this,e);var t=new s;this._desState=t,this.deriveKeys(t,e.key)}i(u,o),(t.exports=u).create=function(e){return new u(e)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(e,t){e.keys=new Array(32),a.equal(t.length,this.blockSize,"Invalid key length");var r=h.readUInt32BE(t,0),i=h.readUInt32BE(t,4);h.pc1(r,i,e.tmp,0),r=e.tmp[0],i=e.tmp[1];for(var n=0;n<e.keys.length;n+=2){var o=c[n>>>1];r=h.r28shl(r,o),i=h.r28shl(i,o),h.pc2(r,i,e.keys,n)}},u.prototype._update=function(e,t,r,i){var n=this._desState,o=h.readUInt32BE(e,t),a=h.readUInt32BE(e,t+4);h.ip(o,a,n.tmp,0),o=n.tmp[0],a=n.tmp[1],"encrypt"===this.type?this._encrypt(n,o,a,n.tmp,0):this._decrypt(n,o,a,n.tmp,0),o=n.tmp[0],a=n.tmp[1],h.writeUInt32BE(r,o,i),h.writeUInt32BE(r,a,i+4)},u.prototype._pad=function(e,t){for(var r=e.length-t,i=t;i<e.length;i++)e[i]=r;return!0},u.prototype._unpad=function(e){for(var t=e[e.length-1],r=e.length-t;r<e.length;r++)a.equal(e[r],t);return e.slice(0,e.length-t)},u.prototype._encrypt=function(e,t,r,i,n){for(var o=t,a=r,s=0;s<e.keys.length;s+=2){var u=e.keys[s],c=e.keys[s+1];h.expand(a,e.tmp,0),u^=e.tmp[0],c^=e.tmp[1];var l=h.substitute(u,c),f=a;a=(o^h.permute(l))>>>0,o=f}h.rip(a,o,i,n)},u.prototype._decrypt=function(e,t,r,i,n){for(var o=r,a=t,s=e.keys.length-2;0<=s;s-=2){var u=e.keys[s],c=e.keys[s+1];h.expand(o,e.tmp,0),u^=e.tmp[0],c^=e.tmp[1];var l=h.substitute(u,c),f=o;o=(a^h.permute(l))>>>0,a=f}h.rip(o,a,i,n)}},{"../des":59,inherits:103,"minimalistic-assert":109}],63:[function(e,t,r){"use strict";var o=e("minimalistic-assert"),i=e("inherits"),n=e("../des"),a=n.Cipher,s=n.DES;function u(e,t){o.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),n=t.slice(16,24);this.ciphers="encrypt"===e?[s.create({type:"encrypt",key:r}),s.create({type:"decrypt",key:i}),s.create({type:"encrypt",key:n})]:[s.create({type:"decrypt",key:n}),s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:r})]}function c(e){a.call(this,e);var t=new u(this.type,this.options.key);this._edeState=t}i(c,a),(t.exports=c).create=function(e){return new c(e)},c.prototype._update=function(e,t,r,i){var n=this._edeState;n.ciphers[0]._update(e,t,r,i),n.ciphers[1]._update(r,i,r,i),n.ciphers[2]._update(r,i,r,i)},c.prototype._pad=s.prototype._pad,c.prototype._unpad=s.prototype._unpad},{"../des":59,inherits:103,"minimalistic-assert":109}],64:[function(e,t,r){"use strict";r.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},r.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},r.ip=function(e,t,r,i){for(var n=0,o=0,a=6;0<=a;a-=2){for(var s=0;s<=24;s+=8)n<<=1,n|=t>>>s+a&1;for(s=0;s<=24;s+=8)n<<=1,n|=e>>>s+a&1}for(a=6;0<=a;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}r[i+0]=n>>>0,r[i+1]=o>>>0},r.rip=function(e,t,r,i){for(var n=0,o=0,a=0;a<4;a++)for(var s=24;0<=s;s-=8)n<<=1,n|=t>>>s+a&1,n<<=1,n|=e>>>s+a&1;for(a=4;a<8;a++)for(s=24;0<=s;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;r[i+0]=n>>>0,r[i+1]=o>>>0},r.pc1=function(e,t,r,i){for(var n=0,o=0,a=7;5<=a;a--){for(var s=0;s<=24;s+=8)n<<=1,n|=t>>s+a&1;for(s=0;s<=24;s+=8)n<<=1,n|=e>>s+a&1}for(s=0;s<=24;s+=8)n<<=1,n|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;r[i+0]=n>>>0,r[i+1]=o>>>0},r.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var u=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];r.pc2=function(e,t,r,i){for(var n=0,o=0,a=u.length>>>1,s=0;s<a;s++)n<<=1,n|=e>>>u[s]&1;for(s=a;s<u.length;s++)o<<=1,o|=t>>>u[s]&1;r[i+0]=n>>>0,r[i+1]=o>>>0},r.expand=function(e,t,r){var i=0,n=0;i=(1&e)<<5|e>>>27;for(var o=23;15<=o;o-=4)i<<=6,i|=e>>>o&63;for(o=11;3<=o;o-=4)n|=e>>>o&63,n<<=6;n|=(31&e)<<1|e>>>31,t[r+0]=i>>>0,t[r+1]=n>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];r.substitute=function(e,t){for(var r=0,i=0;i<4;i++){r<<=4,r|=n[64*i+(e>>>18-6*i&63)]}for(i=0;i<4;i++){r<<=4,r|=n[256+64*i+(t>>>18-6*i&63)]}return r>>>0};var i=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];r.permute=function(e){for(var t=0,r=0;r<i.length;r++)t<<=1,t|=e>>>i[r]&1;return t>>>0},r.padSplit=function(e,t,r){for(var i=e.toString(2);i.length<t;)i="0"+i;for(var n=[],o=0;o<t;o+=r)n.push(i.slice(o,o+r));return n.join(" ")}},{}],65:[function(e,t,r){(function(o){var a=e("./lib/generatePrime"),i=e("./lib/primes.json"),s=e("./lib/dh");var u={binary:!0,hex:!0,base64:!0};r.DiffieHellmanGroup=r.createDiffieHellmanGroup=r.getDiffieHellman=function(e){var t=new o(i[e].prime,"hex"),r=new o(i[e].gen,"hex");return new s(t,r)},r.createDiffieHellman=r.DiffieHellman=function e(t,r,i,n){return o.isBuffer(r)||void 0===u[r]?e(t,"binary",r,i):(r=r||"binary",n=n||"binary",i=i||new o([2]),o.isBuffer(i)||(i=new o(i,n)),"number"==typeof t?new s(a(t,i),i,!0):(o.isBuffer(t)||(t=new o(t,r)),new s(t,i,!0)))}}).call(this,e("buffer").Buffer)},{"./lib/dh":66,"./lib/generatePrime":67,"./lib/primes.json":68,buffer:49}],66:[function(v,m,e){(function(o){var a=v("bn.js"),s=new(v("miller-rabin")),u=new a(24),c=new a(11),l=new a(10),f=new a(3),h=new a(7),d=v("./generatePrime"),e=v("randombytes");function i(e,t){return t=t||"utf8",o.isBuffer(e)||(e=new o(e,t)),this._pub=new a(e),this}function n(e,t){return t=t||"utf8",o.isBuffer(e)||(e=new o(e,t)),this._priv=new a(e),this}m.exports=t;var p={};function t(e,t,r){this.setGenerator(t),this.__prime=new a(e),this._prime=a.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=i,this.setPrivateKey=n):this._primeCode=8}function r(e,t){var r=new o(e.toArray());return t?r.toString(t):r}Object.defineProperty(t.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var r=t.toString("hex"),i=[r,e.toString(16)].join("_");if(i in p)return p[i];var n,o=0;if(e.isEven()||!d.simpleSieve||!d.fermatTest(e)||!s.test(e))return o+=1,o+="02"===r||"05"===r?8:4,p[i]=o;switch(s.test(e.shrn(1))||(o+=2),r){case"02":e.mod(u).cmp(c)&&(o+=8);break;case"05":(n=e.mod(l)).cmp(f)&&n.cmp(h)&&(o+=8);break;default:o+=4}return p[i]=o}(this.__prime,this.__gen)),this._primeCode}}),t.prototype.generateKeys=function(){return this._priv||(this._priv=new a(e(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},t.prototype.computeSecret=function(e){var t=(e=(e=new a(e)).toRed(this._prime)).redPow(this._priv).fromRed(),r=new o(t.toArray()),i=this.getPrime();if(r.length<i.length){var n=new o(i.length-r.length);n.fill(0),r=o.concat([n,r])}return r},t.prototype.getPublicKey=function(e){return r(this._pub,e)},t.prototype.getPrivateKey=function(e){return r(this._priv,e)},t.prototype.getPrime=function(e){return r(this.__prime,e)},t.prototype.getGenerator=function(e){return r(this._gen,e)},t.prototype.setGenerator=function(e,t){return t=t||"utf8",o.isBuffer(e)||(e=new o(e,t)),this.__gen=e,this._gen=new a(e),this}}).call(this,v("buffer").Buffer)},{"./generatePrime":67,"bn.js":17,buffer:49,"miller-rabin":108,randombytes:130}],67:[function(e,t,r){var n=e("randombytes");(t.exports=i).simpleSieve=m,i.fermatTest=b;var o=e("bn.js"),a=new o(24),s=new(e("miller-rabin")),u=new o(1),c=new o(2),l=new o(5),f=(new o(16),new o(8),new o(10)),h=new o(3),d=(new o(7),new o(11)),p=new o(4),v=(new o(12),null);function m(e){for(var t=function(){if(null!==v)return v;var e=[];e[0]=2;for(var t=1,r=3;r<1048576;r+=2){for(var i=Math.ceil(Math.sqrt(r)),n=0;n<t&&e[n]<=i&&r%e[n]!=0;n++);t!==n&&e[n]<=i||(e[t++]=r)}return v=e}(),r=0;r<t.length;r++)if(0===e.modn(t[r]))return 0===e.cmpn(t[r]);return!0}function b(e){var t=o.mont(e);return 0===c.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function i(e,t){if(e<16)return new o(2===t||5===t?[140,123]:[140,39]);var r,i;for(t=new o(t);;){for(r=new o(n(Math.ceil(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd(u),r.testn(1)||r.iadd(c),t.cmp(c)){if(!t.cmp(l))for(;r.mod(f).cmp(h);)r.iadd(p)}else for(;r.mod(a).cmp(d);)r.iadd(p);if(m(i=r.shrn(1))&&m(r)&&b(i)&&b(r)&&s.test(i)&&s.test(r))return r}}},{"bn.js":17,"miller-rabin":108,randombytes:130}],68:[function(e,t,r){t.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],69:[function(e,t,r){"use strict";var i=r;i.version=e("../package.json").version,i.utils=e("./elliptic/utils"),i.rand=e("brorand"),i.curve=e("./elliptic/curve"),i.curves=e("./elliptic/curves"),i.ec=e("./elliptic/ec"),i.eddsa=e("./elliptic/eddsa")},{"../package.json":84,"./elliptic/curve":72,"./elliptic/curves":75,"./elliptic/ec":76,"./elliptic/eddsa":79,"./elliptic/utils":83,brorand:18}],70:[function(e,t,r){"use strict";var i=e("bn.js"),n=e("../../elliptic").utils,M=n.getNAF,P=n.getJSF,f=n.assert;function o(e,t){this.type=e,this.p=new i(t.p,16),this.red=t.prime?i.red(t.prime):i.mont(this.p),this.zero=new i(0).toRed(this.red),this.one=new i(1).toRed(this.red),this.two=new i(2).toRed(this.red),this.n=t.n&&new i(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||0<r.cmpn(100)?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function a(e,t){this.curve=e,this.type=t,this.precomputed=null}(t.exports=o).prototype.point=function(){throw new Error("Not implemented")},o.prototype.validate=function(){throw new Error("Not implemented")},o.prototype._fixedNafMul=function(e,t){f(e.precomputed);var r=e._getDoubles(),i=M(t,1),n=(1<<r.step+1)-(r.step%2==0?2:1);n/=3;for(var o=[],a=0;a<i.length;a+=r.step){var s=0;for(t=a+r.step-1;a<=t;t--)s=(s<<1)+i[t];o.push(s)}for(var u=this.jpoint(null,null,null),c=this.jpoint(null,null,null),l=n;0<l;l--){for(a=0;a<o.length;a++){(s=o[a])===l?c=c.mixedAdd(r.points[a]):s===-l&&(c=c.mixedAdd(r.points[a].neg()))}u=u.add(c)}return u.toP()},o.prototype._wnafMul=function(e,t){var r=4,i=e._getNAFPoints(r);r=i.wnd;for(var n=i.points,o=M(t,r),a=this.jpoint(null,null,null),s=o.length-1;0<=s;s--){for(t=0;0<=s&&0===o[s];s--)t++;if(0<=s&&t++,a=a.dblp(t),s<0)break;var u=o[s];f(0!==u),a="affine"===e.type?0<u?a.mixedAdd(n[u-1>>1]):a.mixedAdd(n[-u-1>>1].neg()):0<u?a.add(n[u-1>>1]):a.add(n[-u-1>>1].neg())}return"affine"===e.type?a.toP():a},o.prototype._wnafMulAdd=function(e,t,r,i,n){for(var o=this._wnafT1,a=this._wnafT2,s=this._wnafT3,u=0,c=0;c<i;c++){var l=(T=t[c])._getNAFPoints(e);o[c]=l.wnd,a[c]=l.points}for(c=i-1;1<=c;c-=2){var f=c-1,h=c;if(1===o[f]&&1===o[h]){var d=[t[f],null,null,t[h]];0===t[f].y.cmp(t[h].y)?(d[1]=t[f].add(t[h]),d[2]=t[f].toJ().mixedAdd(t[h].neg())):0===t[f].y.cmp(t[h].y.redNeg())?(d[1]=t[f].toJ().mixedAdd(t[h]),d[2]=t[f].add(t[h].neg())):(d[1]=t[f].toJ().mixedAdd(t[h]),d[2]=t[f].toJ().mixedAdd(t[h].neg()));var p=[-3,-1,-5,-7,0,7,5,1,3],v=P(r[f],r[h]);u=Math.max(v[0].length,u),s[f]=new Array(u),s[h]=new Array(u);for(var m=0;m<u;m++){var b=0|v[0][m],y=0|v[1][m];s[f][m]=p[3*(1+b)+(1+y)],s[h][m]=0,a[f]=d}}else s[f]=M(r[f],o[f]),s[h]=M(r[h],o[h]),u=Math.max(s[f].length,u),u=Math.max(s[h].length,u)}var g=this.jpoint(null,null,null),_=this._wnafT4;for(c=u;0<=c;c--){for(var w=0;0<=c;){var x=!0;for(m=0;m<i;m++)_[m]=0|s[m][c],0!==_[m]&&(x=!1);if(!x)break;w++,c--}if(0<=c&&w++,g=g.dblp(w),c<0)break;for(m=0;m<i;m++){var T,S=_[m];0!==S&&(0<S?T=a[m][S-1>>1]:S<0&&(T=a[m][-S-1>>1].neg()),g="affine"===T.type?g.mixedAdd(T):g.add(T))}}for(c=0;c<i;c++)a[c]=null;return n?g:g.toP()},(o.BasePoint=a).prototype.eq=function(){throw new Error("Not implemented")},a.prototype.validate=function(){return this.curve.validate(this)},o.prototype.decodePoint=function(e,t){e=n.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?f(e[e.length-1]%2==0):7===e[0]&&f(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},a.prototype.encodeCompressed=function(e){return this.encode(e,!0)},a.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},a.prototype.encode=function(e,t){return n.encode(this._encode(t),e)},a.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},a.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},a.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,n=0;n<t;n+=e){for(var o=0;o<e;o++)i=i.dbl();r.push(i)}return{step:e,points:r}},a.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,i=1==r?null:this.dbl(),n=1;n<r;n++)t[n]=t[n-1].add(i);return{wnd:e,points:t}},a.prototype._getBeta=function(){return null},a.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},{"../../elliptic":69,"bn.js":17}],71:[function(e,t,r){"use strict";var i=e("../curve"),n=e("../../elliptic"),u=e("bn.js"),o=e("inherits"),a=i.base,s=n.utils.assert;function c(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new u(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new u(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new u(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function l(e,t,r,i,n){a.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===i?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new u(t,16),this.y=new u(r,16),this.z=i?new u(i,16):this.curve.one,this.t=n&&new u(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(c,a),(t.exports=c).prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},c.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},c.prototype.jpoint=function(e,t,r,i){return this.point(e,t,r,i)},c.prototype.pointFromX=function(e,t){(e=new u(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),i=this.c2.redSub(this.a.redMul(r)),n=this.one.redSub(this.c2.redMul(this.d).redMul(r)),o=i.redMul(n.redInvm()),a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var s=a.fromRed().isOdd();return(t&&!s||!t&&s)&&(a=a.redNeg()),this.point(e,a)},c.prototype.pointFromY=function(e,t){(e=new u(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),i=r.redSub(this.one),n=r.redMul(this.d).redAdd(this.one),o=i.redMul(n.redInvm());if(0===o.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return a.isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},c.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),i=t.redMul(this.a).redAdd(r),n=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===i.cmp(n)},o(l,a.BasePoint),c.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},c.prototype.point=function(e,t,r,i){return new l(this,e,t,r,i)},l.fromJSON=function(e,t){return new l(e,t[0],t[1],t[2])},l.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},l.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},l.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var i=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=i.redAdd(t),a=o.redSub(r),s=i.redSub(t),u=n.redMul(a),c=o.redMul(s),l=n.redMul(s),f=a.redMul(o);return this.curve.point(u,c,f,l)},l.prototype._projDbl=function(){var e,t,r,i=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var a=(c=this.curve._mulA(n)).redAdd(o);if(this.zOne)e=i.redSub(n).redSub(o).redMul(a.redSub(this.curve.two)),t=a.redMul(c.redSub(o)),r=a.redSqr().redSub(a).redSub(a);else{var s=this.z.redSqr(),u=a.redSub(s).redISub(s);e=i.redSub(n).redISub(o).redMul(u),t=a.redMul(c.redSub(o)),r=a.redMul(u)}}else{var c=n.redAdd(o);s=this.curve._mulC(this.c.redMul(this.z)).redSqr(),u=c.redSub(s).redSub(s);e=this.curve._mulC(i.redISub(c)).redMul(u),t=this.curve._mulC(c).redMul(n.redISub(o)),r=c.redMul(u)}return this.curve.point(e,t,r)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},l.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),i=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=n.redSub(i),s=n.redAdd(i),u=r.redAdd(t),c=o.redMul(a),l=s.redMul(u),f=o.redMul(u),h=a.redMul(s);return this.curve.point(c,l,h,f)},l.prototype._projAdd=function(e){var t,r,i=this.z.redMul(e.z),n=i.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),u=n.redSub(s),c=n.redAdd(s),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),f=i.redMul(u).redMul(l);return r=this.curve.twisted?(t=i.redMul(c).redMul(a.redSub(this.curve._mulA(o))),u.redMul(c)):(t=i.redMul(c).redMul(a.redSub(o)),this.curve._mulC(u).redMul(c)),this.curve.point(f,t,r)},l.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},l.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},l.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},l.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},l.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},l.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()},l.prototype.getY=function(){return this.normalize(),this.y.fromRed()},l.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},l.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),0<=r.cmp(this.curve.p))return!1;if(t.redIAdd(i),0===this.x.cmp(t))return!0}return!1},l.prototype.toP=l.prototype.normalize,l.prototype.mixedAdd=l.prototype.add},{"../../elliptic":69,"../curve":72,"bn.js":17,inherits:103}],72:[function(e,t,r){"use strict";var i=r;i.base=e("./base"),i.short=e("./short"),i.mont=e("./mont"),i.edwards=e("./edwards")},{"./base":70,"./edwards":71,"./mont":73,"./short":74}],73:[function(e,t,r){"use strict";var i=e("../curve"),n=e("bn.js"),o=e("inherits"),a=i.base,s=e("../../elliptic").utils;function u(e){a.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(e,t,r){a.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}o(u,a),(t.exports=u).prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),i=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===i.redSqrt().redSqr().cmp(i)},o(c,a.BasePoint),u.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},u.prototype.point=function(e,t){return new c(this,e,t)},u.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(e,t){return new c(e,t[0],t[1]||e.one)},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),i=e.redMul(t),n=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(i,n)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),i=this.x.redSub(this.z),n=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=n.redMul(i),s=t.z.redMul(o.redAdd(a).redSqr()),u=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,u)},c.prototype.mul=function(e){for(var t=e.clone(),r=this,i=this.curve.point(null,null),n=[];0!==t.cmpn(0);t.iushrn(1))n.push(t.andln(1));for(var o=n.length-1;0<=o;o--)0===n[o]?(r=r.diffAdd(i,this),i=i.dbl()):(i=r.diffAdd(i,this),r=r.dbl());return i},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../../elliptic":69,"../curve":72,"bn.js":17,inherits:103}],74:[function(e,t,r){"use strict";var i=e("../curve"),n=e("../../elliptic"),w=e("bn.js"),o=e("inherits"),a=i.base,s=n.utils.assert;function u(e){a.call(this,"short",e),this.a=new w(e.a,16).toRed(this.red),this.b=new w(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,r,i){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new w(t,16),this.y=new w(r,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function l(e,t,r,i){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===i?(this.x=this.curve.one,this.y=this.curve.one,this.z=new w(0)):(this.x=new w(t,16),this.y=new w(r,16),this.z=new w(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,a),(t.exports=u).prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new w(e.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);t=(t=i[0].cmp(i[1])<0?i[0]:i[1]).toRed(this.red)}if(e.lambda)r=new w(e.lambda,16);else{var n=this._getEndoRoots(this.n);0===this.g.mul(n[0]).x.cmp(this.g.x.redMul(t))?r=n[0]:(r=n[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map(function(e){return{a:new w(e.a,16),b:new w(e.b,16)}}):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:w.mont(e),r=new w(2).toRed(t).redInvm(),i=r.redNeg(),n=new w(3).toRed(t).redNeg().redSqrt().redMul(r);return[i.redAdd(n).fromRed(),i.redSub(n).fromRed()]},u.prototype._getEndoBasis=function(e){for(var t,r,i,n,o,a,s,u,c,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=e,h=this.n.clone(),d=new w(1),p=new w(0),v=new w(0),m=new w(1),b=0;0!==f.cmpn(0);){var y=h.div(f);u=h.sub(y.mul(f)),c=v.sub(y.mul(d));var g=m.sub(y.mul(p));if(!i&&u.cmp(l)<0)t=s.neg(),r=d,i=u.neg(),n=c;else if(i&&2==++b)break;h=f,f=s=u,v=d,d=c,m=p,p=g}o=u.neg(),a=c;var _=i.sqr().add(n.sqr());return 0<=o.sqr().add(a.sqr()).cmp(_)&&(o=t,a=r),i.negative&&(i=i.neg(),n=n.neg()),o.negative&&(o=o.neg(),a=a.neg()),[{a:i,b:n},{a:o,b:a}]},u.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],i=t[1],n=i.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=n.mul(r.a),s=o.mul(i.a),u=n.mul(r.b),c=o.mul(i.b);return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},u.prototype.pointFromX=function(e,t){(e=new w(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var n=i.fromRed().isOdd();return(t&&!n||!t&&n)&&(i=i.redNeg()),this.point(e,i)},u.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,i=this.a.redMul(t),n=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return 0===r.redSqr().redISub(n).cmpn(0)},u.prototype._endoWnafMulAdd=function(e,t,r){for(var i=this._endoWnafT1,n=this._endoWnafT2,o=0;o<e.length;o++){var a=this._endoSplit(t[o]),s=e[o],u=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),u=u.neg(!0)),i[2*o]=s,i[2*o+1]=u,n[2*o]=a.k1,n[2*o+1]=a.k2}for(var c=this._wnafMulAdd(1,i,n,2*o,r),l=0;l<2*o;l++)i[l]=null,n[l]=null;return c},o(c,a.BasePoint),u.prototype.point=function(e,t,r){return new c(this,e,t,r)},u.prototype.pointFromJSON=function(e,t){return c.fromJSON(this,e,t)},c.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,i=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};(e.beta=t).precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(i)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(i)}}}return t}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var i=t.point(e[0],e[1],r);if(!e[2])return i;function n(e){return t.point(e[0],e[1],r)}var o=e[2];return i.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[i].concat(o.doubles.points.map(n))},naf:o.naf&&{wnd:o.naf.wnd,points:[i].concat(o.naf.points.map(n))}},i},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),i=e.redInvm(),n=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(i),o=n.redSqr().redISub(this.x.redAdd(this.x)),a=n.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new w(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var i=[this,t],n=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n):this.curve._wnafMulAdd(1,i,n,2)},c.prototype.jmulAdd=function(e,t,r){var i=[this,t],n=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n,!0):this.curve._wnafMulAdd(1,i,n,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,i=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(l,a.BasePoint),u.prototype.jpoint=function(e,t,r){return new l(this,e,t,r)},l.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(r,i)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(t),n=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=i.redSub(n),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),l=c.redMul(s),f=i.redMul(c),h=u.redSqr().redIAdd(l).redISub(f).redISub(f),d=u.redMul(f.redISub(h)).redISub(o.redMul(l)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(h,d,p)},l.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,i=e.x.redMul(t),n=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(i),s=n.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),l=r.redMul(u),f=s.redSqr().redIAdd(c).redISub(l).redISub(l),h=s.redMul(l.redISub(f)).redISub(n.redMul(c)),d=this.z.redMul(a);return this.curve.jpoint(f,h,d)},l.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}var i=this.curve.a,n=this.curve.tinv,o=this.x,a=this.y,s=this.z,u=s.redSqr().redSqr(),c=a.redAdd(a);for(r=0;r<e;r++){var l=o.redSqr(),f=c.redSqr(),h=f.redSqr(),d=l.redAdd(l).redIAdd(l).redIAdd(i.redMul(u)),p=o.redMul(f),v=d.redSqr().redISub(p.redAdd(p)),m=p.redISub(v),b=d.redMul(m);b=b.redIAdd(b).redISub(h);var y=c.redMul(s);r+1<e&&(u=u.redMul(h)),o=v,s=y,c=b}return this.curve.jpoint(o,c.redMul(n),s)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},l.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),a=this.x.redAdd(n).redSqr().redISub(i).redISub(o);a=a.redIAdd(a);var s=i.redAdd(i).redIAdd(i),u=s.redSqr().redISub(a).redISub(a),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=u,t=s.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var l=this.x.redSqr(),f=this.y.redSqr(),h=f.redSqr(),d=this.x.redAdd(f).redSqr().redISub(l).redISub(h);d=d.redIAdd(d);var p=l.redAdd(l).redIAdd(l),v=p.redSqr(),m=h.redIAdd(h);m=(m=m.redIAdd(m)).redIAdd(m),e=v.redISub(d).redISub(d),t=p.redMul(d.redISub(e)).redISub(m),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},l.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),a=this.x.redAdd(n).redSqr().redISub(i).redISub(o);a=a.redIAdd(a);var s=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),u=s.redSqr().redISub(a).redISub(a);e=u;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=s.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var l=this.z.redSqr(),f=this.y.redSqr(),h=this.x.redMul(f),d=this.x.redSub(l).redMul(this.x.redAdd(l));d=d.redAdd(d).redIAdd(d);var p=h.redIAdd(h),v=(p=p.redIAdd(p)).redAdd(p);e=d.redSqr().redISub(v),r=this.y.redAdd(this.z).redSqr().redISub(f).redISub(l);var m=f.redSqr();m=(m=(m=m.redIAdd(m)).redIAdd(m)).redIAdd(m),t=d.redMul(p.redISub(e)).redISub(m)}return this.curve.jpoint(e,t,r)},l.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,i=this.z,n=i.redSqr().redSqr(),o=t.redSqr(),a=r.redSqr(),s=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(n)),u=t.redAdd(t),c=(u=u.redIAdd(u)).redMul(a),l=s.redSqr().redISub(c.redAdd(c)),f=c.redISub(l),h=a.redSqr();h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var d=s.redMul(f).redISub(h),p=r.redAdd(r).redMul(i);return this.curve.jpoint(l,d,p)},l.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),i=t.redSqr(),n=e.redAdd(e).redIAdd(e),o=n.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(i),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),u=i.redIAdd(i);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=n.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(u),l=t.redMul(c);l=(l=l.redIAdd(l)).redIAdd(l);var f=this.x.redMul(s).redISub(l);f=(f=f.redIAdd(f)).redIAdd(f);var h=this.y.redMul(c.redMul(u.redISub(c)).redISub(a.redMul(s)));h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var d=this.z.redAdd(a).redSqr().redISub(r).redISub(s);return this.curve.jpoint(f,h,d)},l.prototype.mul=function(e,t){return e=new w(e,t),this.curve._wnafMul(this,e)},l.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var i=t.redMul(this.z),n=r.redMul(e.z);return 0===this.y.redMul(n).redISub(e.y.redMul(i)).cmpn(0)},l.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var i=e.clone(),n=this.curve.redN.redMul(t);;){if(i.iadd(this.curve.n),0<=i.cmp(this.curve.p))return!1;if(r.redIAdd(n),0===this.x.cmp(r))return!0}return!1},l.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":69,"../curve":72,"bn.js":17,inherits:103}],75:[function(e,t,r){"use strict";var i,n=r,o=e("hash.js"),a=e("../elliptic"),s=a.utils.assert;function u(e){"short"===e.type?this.curve=new a.curve.short(e):"edwards"===e.type?this.curve=new a.curve.edwards(e):this.curve=new a.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(t,r){Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get:function(){var e=new u(r);return Object.defineProperty(n,t,{configurable:!0,enumerable:!0,value:e}),e}})}n.PresetCurve=u,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{i=e("./precomputed/secp256k1")}catch(e){i=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",i]})},{"../elliptic":69,"./precomputed/secp256k1":82,"hash.js":88}],76:[function(e,t,r){"use strict";var m=e("bn.js"),b=e("hmac-drbg"),o=e("../../elliptic"),d=o.utils.assert,i=e("./key"),y=e("./signature");function n(e){if(!(this instanceof n))return new n(e);"string"==typeof e&&(d(o.curves.hasOwnProperty(e),"Unknown curve "+e),e=o.curves[e]),e instanceof o.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}(t.exports=n).prototype.keyPair=function(e){return new i(this,e)},n.prototype.keyFromPrivate=function(e,t){return i.fromPrivate(this,e,t)},n.prototype.keyFromPublic=function(e,t){return i.fromPublic(this,e,t)},n.prototype.genKeyPair=function(e){e||(e={});for(var t=new b({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o.rand(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),i=this.n.sub(new m(2));;){var n=new m(t.generate(r));if(!(0<n.cmp(i)))return n.iaddn(1),this.keyFromPrivate(n)}},n.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return 0<r&&(e=e.ushrn(r)),!t&&0<=e.cmp(this.n)?e.sub(this.n):e},n.prototype.sign=function(e,t,r,i){"object"==typeof r&&(i=r,r=null),i||(i={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new m(e,16));for(var n=this.n.byteLength(),o=t.getPrivate().toArray("be",n),a=e.toArray("be",n),s=new b({hash:this.hash,entropy:o,nonce:a,pers:i.pers,persEnc:i.persEnc||"utf8"}),u=this.n.sub(new m(1)),c=0;;c++){var l=i.k?i.k(c):new m(s.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||0<=l.cmp(u))){var f=this.g.mul(l);if(!f.isInfinity()){var h=f.getX(),d=h.umod(this.n);if(0!==d.cmpn(0)){var p=l.invm(this.n).mul(d.mul(t.getPrivate()).iadd(e));if(0!==(p=p.umod(this.n)).cmpn(0)){var v=(f.getY().isOdd()?1:0)|(0!==h.cmp(d)?2:0);return i.canonical&&0<p.cmp(this.nh)&&(p=this.n.sub(p),v^=1),new y({r:d,s:p,recoveryParam:v})}}}}}},n.prototype.verify=function(e,t,r,i){e=this._truncateToN(new m(e,16)),r=this.keyFromPublic(r,i);var n=(t=new y(t,"hex")).r,o=t.s;if(n.cmpn(1)<0||0<=n.cmp(this.n))return!1;if(o.cmpn(1)<0||0<=o.cmp(this.n))return!1;var a,s=o.invm(this.n),u=s.mul(e).umod(this.n),c=s.mul(n).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(u,r.getPublic(),c)).isInfinity()&&a.eqXToP(n):!(a=this.g.mulAdd(u,r.getPublic(),c)).isInfinity()&&0===a.getX().umod(this.n).cmp(n)},n.prototype.recoverPubKey=function(e,t,r,i){d((3&r)===r,"The recovery param is more than two bits"),t=new y(t,i);var n=this.n,o=new m(e),a=t.r,s=t.s,u=1&r,c=r>>1;if(0<=a.cmp(this.curve.p.umod(this.curve.n))&&c)throw new Error("Unable to find sencond key candinate");a=c?this.curve.pointFromX(a.add(this.curve.n),u):this.curve.pointFromX(a,u);var l=t.r.invm(n),f=n.sub(o).mul(l).umod(n),h=s.mul(l).umod(n);return this.g.mulAdd(f,a,h)},n.prototype.getKeyRecoveryParam=function(e,t,r,i){if(null!==(t=new y(t,i)).recoveryParam)return t.recoveryParam;for(var n=0;n<4;n++){var o;try{o=this.recoverPubKey(e,t,n)}catch(e){continue}if(o.eq(r))return n}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":69,"./key":77,"./signature":78,"bn.js":17,"hmac-drbg":100}],77:[function(e,t,r){"use strict";var i=e("bn.js"),n=e("../../elliptic").utils.assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}(t.exports=o).fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new i(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?n(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||n(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},{"../../elliptic":69,"bn.js":17}],78:[function(e,t,r){"use strict";var s=e("bn.js"),u=e("../../elliptic").utils,i=u.assert;function n(e,t){if(e instanceof n)return e;this._importDER(e,t)||(i(e.r&&e.s,"Signature without r or s"),this.r=new s(e.r,16),this.s=new s(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function c(){this.place=0}function l(e,t){var r=e[t.place++];if(!(128&r))return r;for(var i=15&r,n=0,o=0,a=t.place;o<i;o++,a++)n<<=8,n|=e[a];return t.place=a,n}function a(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function f(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}(t.exports=n).prototype._importDER=function(e,t){e=u.toArray(e,t);var r=new c;if(48!==e[r.place++])return!1;if(l(e,r)+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var i=l(e,r),n=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var o=l(e,r);if(e.length!==o+r.place)return!1;var a=e.slice(r.place,o+r.place);return 0===n[0]&&128&n[1]&&(n=n.slice(1)),0===a[0]&&128&a[1]&&(a=a.slice(1)),this.r=new s(n),this.s=new s(a),!(this.recoveryParam=null)},n.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=a(t),r=a(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];f(i,t.length),(i=i.concat(t)).push(2),f(i,r.length);var n=i.concat(r),o=[48];return f(o,n.length),o=o.concat(n),u.encode(o,e)}},{"../../elliptic":69,"bn.js":17}],79:[function(e,t,r){"use strict";var i=e("hash.js"),n=e("../../elliptic"),o=n.utils,a=o.assert,u=o.parseBytes,s=e("./key"),c=e("./signature");function l(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof l))return new l(e);e=n.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=i.sha512}(t.exports=l).prototype.sign=function(e,t){e=u(e);var r=this.keyFromSecret(t),i=this.hashInt(r.messagePrefix(),e),n=this.g.mul(i),o=this.encodePoint(n),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),s=i.add(a).umod(this.curve.n);return this.makeSignature({R:n,S:s,Rencoded:o})},l.prototype.verify=function(e,t,r){e=u(e),t=this.makeSignature(t);var i=this.keyFromPublic(r),n=this.hashInt(t.Rencoded(),i.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(i.pub().mul(n)).eq(o)},l.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},l.prototype.keyFromPublic=function(e){return s.fromPublic(this,e)},l.prototype.keyFromSecret=function(e){return s.fromSecret(this,e)},l.prototype.makeSignature=function(e){return e instanceof c?e:new c(this,e)},l.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},l.prototype.decodePoint=function(e){var t=(e=o.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),i=0!=(128&e[t]),n=o.intFromLE(r);return this.curve.pointFromY(n,i)},l.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},l.prototype.decodeInt=function(e){return o.intFromLE(e)},l.prototype.isPoint=function(e){return e instanceof this.pointClass}},{"../../elliptic":69,"./key":80,"./signature":81,"hash.js":88}],80:[function(e,t,r){"use strict";var i=e("../../elliptic").utils,n=i.assert,o=i.parseBytes,a=i.cachedProperty;function s(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},a(s,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),a(s,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),a(s,"privBytes",function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,i=t.slice(0,e.encodingLength);return i[0]&=248,i[r]&=127,i[r]|=64,i}),a(s,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),a(s,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),a(s,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),s.prototype.sign=function(e){return n(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return n(this._secret,"KeyPair is public only"),i.encode(this.secret(),e)},s.prototype.getPublic=function(e){return i.encode(this.pubBytes(),e)},t.exports=s},{"../../elliptic":69}],81:[function(e,t,r){"use strict";var i=e("bn.js"),n=e("../../elliptic").utils,o=n.assert,a=n.cachedProperty,s=n.parseBytes;function u(e,t){this.eddsa=e,"object"!=typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof i&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}a(u,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),a(u,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),a(u,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),a(u,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return n.encode(this.toBytes(),"hex").toUpperCase()},t.exports=u},{"../../elliptic":69,"bn.js":17}],82:[function(e,t,r){t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},{}],83:[function(e,t,r){"use strict";var i=r,n=e("bn.js"),o=e("minimalistic-assert"),a=e("minimalistic-crypto-utils");i.assert=o,i.toArray=a.toArray,i.zero2=a.zero2,i.toHex=a.toHex,i.encode=a.encode,i.getNAF=function(e,t){for(var r=[],i=1<<t+1,n=e.clone();0<=n.cmpn(1);){var o;if(n.isOdd()){var a=n.andln(i-1);o=(i>>1)-1<a?(i>>1)-a:a,n.isubn(o)}else o=0;r.push(o);for(var s=0!==n.cmpn(0)&&0===n.andln(i-1)?t+1:1,u=1;u<s;u++)r.push(0);n.iushrn(s)}return r},i.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var i=0,n=0;0<e.cmpn(-i)||0<t.cmpn(-n);){var o,a,s,u=e.andln(3)+i&3,c=t.andln(3)+n&3;3===u&&(u=-1),3===c&&(c=-1),o=0==(1&u)?0:3!=(s=e.andln(7)+i&7)&&5!==s||2!==c?u:-u,r[0].push(o),a=0==(1&c)?0:3!=(s=t.andln(7)+n&7)&&5!==s||2!==u?c:-c,r[1].push(a),2*i===o+1&&(i=1-i),2*n===a+1&&(n=1-n),e.iushrn(1),t.iushrn(1)}return r},i.cachedProperty=function(e,t,r){var i="_"+t;e.prototype[t]=function(){return void 0!==this[i]?this[i]:this[i]=r.call(this)}},i.parseBytes=function(e){return"string"==typeof e?i.toArray(e,"hex"):e},i.intFromLE=function(e){return new n(e,"hex","le")}},{"bn.js":17,"minimalistic-assert":109,"minimalistic-crypto-utils":110}],84:[function(e,t,r){t.exports={_from:"elliptic@^6.0.0",_id:"elliptic@6.4.0",_inBundle:!1,_integrity:"sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=",_location:"/elliptic",_phantomChildren:{},_requested:{type:"range",registry:!0,raw:"elliptic@^6.0.0",name:"elliptic",escapedName:"elliptic",rawSpec:"^6.0.0",saveSpec:null,fetchSpec:"^6.0.0"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",_shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",_spec:"elliptic@^6.0.0",_where:"d:\\pixi-games\\pixi-compressed-textures\\node_modules\\browserify-sign",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},bundleDependencies:!1,dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},deprecated:!1,description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},files:["lib"],homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",name:"elliptic",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.4.0"}},{}],85:[function(e,t,r){function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function u(e){return"function"==typeof e}function c(e){return"object"==typeof e&&null!==e}function l(e){return void 0===e}((t.exports=i).EventEmitter=i).prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(e){if(!function(e){return"number"==typeof e}(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},i.prototype.emit=function(e){var t,r,i,n,o,a;if(this._events||(this._events={}),"error"===e&&(!this._events.error||c(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var s=new Error('Uncaught, unspecified "error" event. ('+t+")");throw s.context=t,s}if(l(r=this._events[e]))return!1;if(u(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:n=Array.prototype.slice.call(arguments,1),r.apply(this,n)}else if(c(r))for(n=Array.prototype.slice.call(arguments,1),i=(a=r.slice()).length,o=0;o<i;o++)a[o].apply(this,n);return!0},i.prototype.on=i.prototype.addListener=function(e,t){var r;if(!u(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,u(t.listener)?t.listener:t),this._events[e]?c(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,c(this._events[e])&&!this._events[e].warned&&(r=l(this._maxListeners)?i.defaultMaxListeners:this._maxListeners)&&0<r&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},i.prototype.once=function(e,t){if(!u(t))throw TypeError("listener must be a function");var r=!1;function i(){this.removeListener(e,i),r||(r=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},i.prototype.removeListener=function(e,t){var r,i,n,o;if(!u(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=(r=this._events[e]).length,i=-1,r===t||u(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(c(r)){for(o=n;0<o--;)if(r[o]===t||r[o].listener&&r[o].listener===t){i=o;break}if(i<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},i.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(u(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},i.prototype.listeners=function(e){return this._events&&this._events[e]?u(this._events[e])?[this._events[e]]:this._events[e].slice():[]},i.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(u(t))return 1;if(t)return t.length}return 0},i.listenerCount=function(e,t){return e.listenerCount(t)}},{}],86:[function(e,t,r){var d=e("safe-buffer").Buffer,p=e("md5.js");t.exports=function(e,t,r,i){if(d.isBuffer(e)||(e=d.from(e,"binary")),t&&(d.isBuffer(t)||(t=d.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var n=r/8,o=d.alloc(n),a=d.alloc(i||0),s=d.alloc(0);0<n||0<i;){var u=new p;u.update(s),u.update(e),t&&u.update(t),s=u.digest();var c=0;if(0<n){var l=o.length-n;c=Math.min(n,s.length),s.copy(o,l,0,c),n-=c}if(c<s.length&&0<i){var f=a.length-i,h=Math.min(i,s.length-c);s.copy(a,f,c,c+h),i-=h}}return s.fill(0),{key:o,iv:a}}},{"md5.js":106,"safe-buffer":143}],87:[function(r,i,e){(function(s){"use strict";var t=r("stream").Transform;function e(e){t.call(this),this._block=new s(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r("inherits")(e,t),e.prototype._transform=function(e,t,r){var i=null;try{"buffer"!==t&&(e=new s(e,t)),this.update(e)}catch(e){i=e}r(i)},e.prototype._flush=function(e){var t=null;try{this.push(this._digest())}catch(e){t=e}e(t)},e.prototype.update=function(e,t){if(!s.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");s.isBuffer(e)||(e=new s(e,t||"binary"));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var n=this._blockOffset;n<this._blockSize;)r[n++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)r[this._blockOffset++]=e[i++];for(var o=0,a=8*e.length;0<a;++o)this._length[o]+=a,0<(a=this._length[o]/4294967296|0)&&(this._length[o]-=4294967296*a);return this},e.prototype._update=function(e){throw new Error("_update is not implemented")},e.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();return void 0!==e&&(t=t.toString(e)),t},e.prototype._digest=function(){throw new Error("_digest is not implemented")},i.exports=e}).call(this,r("buffer").Buffer)},{buffer:49,inherits:103,stream:152}],88:[function(e,t,r){var i=r;i.utils=e("./hash/utils"),i.common=e("./hash/common"),i.sha=e("./hash/sha"),i.ripemd=e("./hash/ripemd"),i.hmac=e("./hash/hmac"),i.sha1=i.sha.sha1,i.sha256=i.sha.sha256,i.sha224=i.sha.sha224,i.sha384=i.sha.sha384,i.sha512=i.sha.sha512,i.ripemd160=i.ripemd.ripemd160},{"./hash/common":89,"./hash/hmac":90,"./hash/ripemd":91,"./hash/sha":92,"./hash/utils":99}],89:[function(e,t,r){"use strict";var n=e("./utils"),i=e("minimalistic-assert");function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}(r.BlockHash=o).prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,i=new Array(r+this.padLength);i[0]=128;for(var n=1;n<r;n++)i[n]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)i[n++]=0;i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=e>>>24&255,i[n++]=e>>>16&255,i[n++]=e>>>8&255,i[n++]=255&e}else for(i[n++]=255&e,i[n++]=e>>>8&255,i[n++]=e>>>16&255,i[n++]=e>>>24&255,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,o=8;o<this.padLength;o++)i[n++]=0;return i}},{"./utils":99,"minimalistic-assert":109}],90:[function(e,t,r){"use strict";var i=e("./utils"),n=e("minimalistic-assert");function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(i.toArray(t,r))}(t.exports=o).prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),n(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},{"./utils":99,"minimalistic-assert":109}],91:[function(e,t,r){"use strict";var i=e("./utils"),n=e("./common"),p=i.rotl32,v=i.sum32,m=i.sum32_3,b=i.sum32_4,o=n.BlockHash;function a(){if(!(this instanceof a))return new a;o.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function y(e,t,r,i){return e<=15?t^r^i:e<=31?t&r|~t&i:e<=47?(t|~r)^i:e<=63?t&i|r&~i:t^(r|~i)}function g(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function _(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}i.inherits(a,o),(r.ripemd160=a).blockSize=512,a.outSize=160,a.hmacStrength=192,a.padLength=64,a.prototype._update=function(e,t){for(var r=this.h[0],i=this.h[1],n=this.h[2],o=this.h[3],a=this.h[4],s=r,u=i,c=n,l=o,f=a,h=0;h<80;h++){var d=v(p(b(r,y(h,i,n,o),e[w[h]+t],g(h)),T[h]),a);r=a,a=o,o=p(n,10),n=i,i=d,d=v(p(b(s,y(79-h,u,c,l),e[x[h]+t],_(h)),S[h]),f),s=f,f=l,l=p(c,10),c=u,u=d}d=m(this.h[1],n,l),this.h[1]=m(this.h[2],o,f),this.h[2]=m(this.h[3],a,s),this.h[3]=m(this.h[4],r,u),this.h[4]=m(this.h[0],i,c),this.h[0]=d},a.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h,"little"):i.split32(this.h,"little")};var w=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],x=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],T=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],S=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},{"./common":89,"./utils":99}],92:[function(e,t,r){"use strict";r.sha1=e("./sha/1"),r.sha224=e("./sha/224"),r.sha256=e("./sha/256"),r.sha384=e("./sha/384"),r.sha512=e("./sha/512")},{"./sha/1":93,"./sha/224":94,"./sha/256":95,"./sha/384":96,"./sha/512":97}],93:[function(e,t,r){"use strict";var i=e("../utils"),n=e("../common"),o=e("./common"),f=i.rotl32,h=i.sum32,d=i.sum32_5,p=o.ft_1,a=n.BlockHash,v=[1518500249,1859775393,2400959708,3395469782];function s(){if(!(this instanceof s))return new s;a.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}i.inherits(s,a),(t.exports=s).blockSize=512,s.outSize=160,s.hmacStrength=80,s.padLength=64,s.prototype._update=function(e,t){for(var r=this.W,i=0;i<16;i++)r[i]=e[t+i];for(;i<r.length;i++)r[i]=f(r[i-3]^r[i-8]^r[i-14]^r[i-16],1);var n=this.h[0],o=this.h[1],a=this.h[2],s=this.h[3],u=this.h[4];for(i=0;i<r.length;i++){var c=~~(i/20),l=d(f(n,5),p(c,o,a,s),u,r[i],v[c]);u=s,s=a,a=f(o,30),o=n,n=l}this.h[0]=h(this.h[0],n),this.h[1]=h(this.h[1],o),this.h[2]=h(this.h[2],a),this.h[3]=h(this.h[3],s),this.h[4]=h(this.h[4],u)},s.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},{"../common":89,"../utils":99,"./common":98}],94:[function(e,t,r){"use strict";var i=e("../utils"),n=e("./256");function o(){if(!(this instanceof o))return new o;n.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}i.inherits(o,n),(t.exports=o).blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h.slice(0,7),"big"):i.split32(this.h.slice(0,7),"big")}},{"../utils":99,"./256":95}],95:[function(e,t,r){"use strict";var i=e("../utils"),n=e("../common"),o=e("./common"),p=e("minimalistic-assert"),v=i.sum32,m=i.sum32_4,b=i.sum32_5,y=o.ch32,g=o.maj32,_=o.s0_256,w=o.s1_256,x=o.g0_256,T=o.g1_256,a=n.BlockHash,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function u(){if(!(this instanceof u))return new u;a.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=s,this.W=new Array(64)}i.inherits(u,a),(t.exports=u).blockSize=512,u.outSize=256,u.hmacStrength=192,u.padLength=64,u.prototype._update=function(e,t){for(var r=this.W,i=0;i<16;i++)r[i]=e[t+i];for(;i<r.length;i++)r[i]=m(T(r[i-2]),r[i-7],x(r[i-15]),r[i-16]);var n=this.h[0],o=this.h[1],a=this.h[2],s=this.h[3],u=this.h[4],c=this.h[5],l=this.h[6],f=this.h[7];for(p(this.k.length===r.length),i=0;i<r.length;i++){var h=b(f,w(u),y(u,c,l),this.k[i],r[i]),d=v(_(n),g(n,o,a));f=l,l=c,c=u,u=v(s,h),s=a,a=o,o=n,n=v(h,d)}this.h[0]=v(this.h[0],n),this.h[1]=v(this.h[1],o),this.h[2]=v(this.h[2],a),this.h[3]=v(this.h[3],s),this.h[4]=v(this.h[4],u),this.h[5]=v(this.h[5],c),this.h[6]=v(this.h[6],l),this.h[7]=v(this.h[7],f)},u.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},{"../common":89,"../utils":99,"./common":98,"minimalistic-assert":109}],96:[function(e,t,r){"use strict";var i=e("../utils"),n=e("./512");function o(){if(!(this instanceof o))return new o;n.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}i.inherits(o,n),(t.exports=o).blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h.slice(0,12),"big"):i.split32(this.h.slice(0,12),"big")}},{"../utils":99,"./512":97}],97:[function(e,t,r){"use strict";var i=e("../utils"),n=e("../common"),D=e("minimalistic-assert"),o=i.rotr64_hi,a=i.rotr64_lo,s=i.shr64_hi,u=i.shr64_lo,L=i.sum64,j=i.sum64_hi,F=i.sum64_lo,h=i.sum64_4_hi,d=i.sum64_4_lo,B=i.sum64_5_hi,N=i.sum64_5_lo,c=n.BlockHash,l=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function f(){if(!(this instanceof f))return new f;c.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=l,this.W=new Array(160)}function U(e,t,r,i,n){var o=e&r^~e&n;return o<0&&(o+=4294967296),o}function z(e,t,r,i,n,o){var a=t&i^~t&o;return a<0&&(a+=4294967296),a}function X(e,t,r,i,n){var o=e&r^e&n^r&n;return o<0&&(o+=4294967296),o}function W(e,t,r,i,n,o){var a=t&i^t&o^i&o;return a<0&&(a+=4294967296),a}function q(e,t){var r=o(e,t,28)^o(t,e,2)^o(t,e,7);return r<0&&(r+=4294967296),r}function H(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function G(e,t){var r=o(e,t,14)^o(e,t,18)^o(t,e,9);return r<0&&(r+=4294967296),r}function V(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function p(e,t){var r=o(e,t,1)^o(e,t,8)^s(e,t,7);return r<0&&(r+=4294967296),r}function v(e,t){var r=a(e,t,1)^a(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function m(e,t){var r=o(e,t,19)^o(t,e,29)^s(e,t,6);return r<0&&(r+=4294967296),r}function b(e,t){var r=a(e,t,19)^a(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}i.inherits(f,c),(t.exports=f).blockSize=1024,f.outSize=512,f.hmacStrength=192,f.padLength=128,f.prototype._prepareBlock=function(e,t){for(var r=this.W,i=0;i<32;i++)r[i]=e[t+i];for(;i<r.length;i+=2){var n=m(r[i-4],r[i-3]),o=b(r[i-4],r[i-3]),a=r[i-14],s=r[i-13],u=p(r[i-30],r[i-29]),c=v(r[i-30],r[i-29]),l=r[i-32],f=r[i-31];r[i]=h(n,o,a,s,u,c,l,f),r[i+1]=d(n,o,a,s,u,c,l,f)}},f.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,i=this.h[0],n=this.h[1],o=this.h[2],a=this.h[3],s=this.h[4],u=this.h[5],c=this.h[6],l=this.h[7],f=this.h[8],h=this.h[9],d=this.h[10],p=this.h[11],v=this.h[12],m=this.h[13],b=this.h[14],y=this.h[15];D(this.k.length===r.length);for(var g=0;g<r.length;g+=2){var _=b,w=y,x=G(f,h),T=V(f,h),S=U(f,h,d,p,v),M=z(f,h,d,p,v,m),P=this.k[g],E=this.k[g+1],k=r[g],C=r[g+1],A=B(_,w,x,T,S,M,P,E,k,C),O=N(_,w,x,T,S,M,P,E,k,C);_=q(i,n),w=H(i,n),x=X(i,n,o,a,s),T=W(i,n,o,a,s,u);var I=j(_,w,x,T),R=F(_,w,x,T);b=v,y=m,v=d,m=p,d=f,p=h,f=j(c,l,A,O),h=F(l,l,A,O),c=s,l=u,s=o,u=a,o=i,a=n,i=j(A,O,I,R),n=F(A,O,I,R)}L(this.h,0,i,n),L(this.h,2,o,a),L(this.h,4,s,u),L(this.h,6,c,l),L(this.h,8,f,h),L(this.h,10,d,p),L(this.h,12,v,m),L(this.h,14,b,y)},f.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},{"../common":89,"../utils":99,"minimalistic-assert":109}],98:[function(e,t,r){"use strict";var i=e("../utils").rotr32;function n(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function a(e,t,r){return e^t^r}r.ft_1=function(e,t,r,i){return 0===e?n(t,r,i):1===e||3===e?a(t,r,i):2===e?o(t,r,i):void 0},r.ch32=n,r.maj32=o,r.p32=a,r.s0_256=function(e){return i(e,2)^i(e,13)^i(e,22)},r.s1_256=function(e){return i(e,6)^i(e,11)^i(e,25)},r.g0_256=function(e){return i(e,7)^i(e,18)^e>>>3},r.g1_256=function(e){return i(e,17)^i(e,19)^e>>>10}},{"../utils":99}],99:[function(e,t,r){"use strict";var c=e("minimalistic-assert"),i=e("inherits");function o(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function n(e){return 1===e.length?"0"+e:e}function a(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}r.inherits=i,r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var i=0;i<e.length;i++){var n=e.charCodeAt(i),o=n>>8,a=255&n;o?r.push(o,a):r.push(a)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r},r.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t},r.htonl=o,r.toHex32=function(e,t){for(var r="",i=0;i<e.length;i++){var n=e[i];"little"===t&&(n=o(n)),r+=a(n.toString(16))}return r},r.zero2=n,r.zero8=a,r.join32=function(e,t,r,i){var n=r-t;c(n%4==0);for(var o=new Array(n/4),a=0,s=t;a<o.length;a++,s+=4){var u;u="big"===i?e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3]:e[s+3]<<24|e[s+2]<<16|e[s+1]<<8|e[s],o[a]=u>>>0}return o},r.split32=function(e,t){for(var r=new Array(4*e.length),i=0,n=0;i<e.length;i++,n+=4){var o=e[i];"big"===t?(r[n]=o>>>24,r[n+1]=o>>>16&255,r[n+2]=o>>>8&255,r[n+3]=255&o):(r[n+3]=o>>>24,r[n+2]=o>>>16&255,r[n+1]=o>>>8&255,r[n]=255&o)}return r},r.rotr32=function(e,t){return e>>>t|e<<32-t},r.rotl32=function(e,t){return e<<t|e>>>32-t},r.sum32=function(e,t){return e+t>>>0},r.sum32_3=function(e,t,r){return e+t+r>>>0},r.sum32_4=function(e,t,r,i){return e+t+r+i>>>0},r.sum32_5=function(e,t,r,i,n){return e+t+r+i+n>>>0},r.sum64=function(e,t,r,i){var n=e[t],o=i+e[t+1]>>>0,a=(o<i?1:0)+r+n;e[t]=a>>>0,e[t+1]=o},r.sum64_hi=function(e,t,r,i){return(t+i>>>0<t?1:0)+e+r>>>0},r.sum64_lo=function(e,t,r,i){return t+i>>>0},r.sum64_4_hi=function(e,t,r,i,n,o,a,s){var u=0,c=t;return u+=(c=c+i>>>0)<t?1:0,u+=(c=c+o>>>0)<o?1:0,e+r+n+a+(u+=(c=c+s>>>0)<s?1:0)>>>0},r.sum64_4_lo=function(e,t,r,i,n,o,a,s){return t+i+o+s>>>0},r.sum64_5_hi=function(e,t,r,i,n,o,a,s,u,c){var l=0,f=t;return l+=(f=f+i>>>0)<t?1:0,l+=(f=f+o>>>0)<o?1:0,l+=(f=f+s>>>0)<s?1:0,e+r+n+a+u+(l+=(f=f+c>>>0)<c?1:0)>>>0},r.sum64_5_lo=function(e,t,r,i,n,o,a,s,u,c){return t+i+o+s+c>>>0},r.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},r.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},r.shr64_hi=function(e,t,r){return e>>>r},r.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},{inherits:103,"minimalistic-assert":109}],100:[function(e,t,r){"use strict";var i=e("hash.js"),a=e("minimalistic-crypto-utils"),n=e("minimalistic-assert");function o(e){if(!(this instanceof o))return new o(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=a.toArray(e.entropy,e.entropyEnc||"hex"),r=a.toArray(e.nonce,e.nonceEnc||"hex"),i=a.toArray(e.pers,e.persEnc||"hex");n(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,i)}(t.exports=o).prototype._init=function(e,t,r){var i=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(i),this._reseed=1,this.reseedInterval=281474976710656},o.prototype._hmac=function(){return new i.hmac(this.hash,this.K)},o.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},o.prototype.reseed=function(e,t,r,i){"string"!=typeof t&&(i=r,r=t,t=null),e=a.toArray(e,t),r=a.toArray(r,i),n(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},o.prototype.generate=function(e,t,r,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(i=r,r=t,t=null),r&&(r=a.toArray(r,i||"hex"),this._update(r));for(var n=[];n.length<e;)this.V=this._hmac().update(this.V).digest(),n=n.concat(this.V);var o=n.slice(0,e);return this._update(r),this._reseed++,a.encode(o,t)}},{"hash.js":88,"minimalistic-assert":109,"minimalistic-crypto-utils":110}],101:[function(e,t,r){r.read=function(e,t,r,i,n){var o,a,s=8*n-i-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?n-1:0,h=r?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=s;0<l;o=256*o+e[t+f],f+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=i;0<l;a=256*a+e[t+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,i),o-=c}return(d?-1:1)*a*Math.pow(2,o-i)},r.write=function(e,t,r,i,n,o){var a,s,u,c=8*o-n-1,l=(1<<c)-1,f=l>>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:o-1,p=i?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),2<=(t+=1<=a+f?h/u:h*Math.pow(2,1-f))*u&&(a++,u/=2),l<=a+f?(s=0,a=l):1<=a+f?(s=(t*u-1)*Math.pow(2,n),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,n),a=0));8<=n;e[r+d]=255&s,d+=p,s/=256,n-=8);for(a=a<<n|s,c+=n;0<c;e[r+d]=255&a,d+=p,a/=256,c-=8);e[r+d-p]|=128*v}},{}],102:[function(e,t,r){var i=[].indexOf;t.exports=function(e,t){if(i)return e.indexOf(t);for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1}},{}],103:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],104:[function(e,t,r){function i(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}t.exports=function(e){return null!=e&&(i(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&i(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],105:[function(e,t,r){var i={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==i.call(e)}},{}],106:[function(n,o,e){(function(t){"use strict";var e=n("inherits"),r=n("hash-base"),a=new Array(16);function i(){r.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function s(e,t){return e<<t|e>>>32-t}function u(e,t,r,i,n,o,a){return s(e+(t&r|~t&i)+n+o|0,a)+t|0}function c(e,t,r,i,n,o,a){return s(e+(t&i|r&~i)+n+o|0,a)+t|0}function l(e,t,r,i,n,o,a){return s(e+(t^r^i)+n+o|0,a)+t|0}function f(e,t,r,i,n,o,a){return s(e+(r^(t|~i))+n+o|0,a)+t|0}e(i,r),i.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,i=this._b,n=this._c,o=this._d;i=f(i=f(i=f(i=f(i=l(i=l(i=l(i=l(i=c(i=c(i=c(i=c(i=u(i=u(i=u(i=u(i,n=u(n,o=u(o,r=u(r,i,n,o,e[0],3614090360,7),i,n,e[1],3905402710,12),r,i,e[2],606105819,17),o,r,e[3],3250441966,22),n=u(n,o=u(o,r=u(r,i,n,o,e[4],4118548399,7),i,n,e[5],1200080426,12),r,i,e[6],2821735955,17),o,r,e[7],4249261313,22),n=u(n,o=u(o,r=u(r,i,n,o,e[8],1770035416,7),i,n,e[9],2336552879,12),r,i,e[10],4294925233,17),o,r,e[11],2304563134,22),n=u(n,o=u(o,r=u(r,i,n,o,e[12],1804603682,7),i,n,e[13],4254626195,12),r,i,e[14],2792965006,17),o,r,e[15],1236535329,22),n=c(n,o=c(o,r=c(r,i,n,o,e[1],4129170786,5),i,n,e[6],3225465664,9),r,i,e[11],643717713,14),o,r,e[0],3921069994,20),n=c(n,o=c(o,r=c(r,i,n,o,e[5],3593408605,5),i,n,e[10],38016083,9),r,i,e[15],3634488961,14),o,r,e[4],3889429448,20),n=c(n,o=c(o,r=c(r,i,n,o,e[9],568446438,5),i,n,e[14],3275163606,9),r,i,e[3],4107603335,14),o,r,e[8],1163531501,20),n=c(n,o=c(o,r=c(r,i,n,o,e[13],2850285829,5),i,n,e[2],4243563512,9),r,i,e[7],1735328473,14),o,r,e[12],2368359562,20),n=l(n,o=l(o,r=l(r,i,n,o,e[5],4294588738,4),i,n,e[8],2272392833,11),r,i,e[11],1839030562,16),o,r,e[14],4259657740,23),n=l(n,o=l(o,r=l(r,i,n,o,e[1],2763975236,4),i,n,e[4],1272893353,11),r,i,e[7],4139469664,16),o,r,e[10],3200236656,23),n=l(n,o=l(o,r=l(r,i,n,o,e[13],681279174,4),i,n,e[0],3936430074,11),r,i,e[3],3572445317,16),o,r,e[6],76029189,23),n=l(n,o=l(o,r=l(r,i,n,o,e[9],3654602809,4),i,n,e[12],3873151461,11),r,i,e[15],530742520,16),o,r,e[2],3299628645,23),n=f(n,o=f(o,r=f(r,i,n,o,e[0],4096336452,6),i,n,e[7],1126891415,10),r,i,e[14],2878612391,15),o,r,e[5],4237533241,21),n=f(n,o=f(o,r=f(r,i,n,o,e[12],1700485571,6),i,n,e[3],2399980690,10),r,i,e[10],4293915773,15),o,r,e[1],2240044497,21),n=f(n,o=f(o,r=f(r,i,n,o,e[8],1873313359,6),i,n,e[15],4264355552,10),r,i,e[6],2734768916,15),o,r,e[13],1309151649,21),n=f(n,o=f(o,r=f(r,i,n,o,e[4],4149444226,6),i,n,e[11],3174756917,10),r,i,e[2],718787259,15),o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+n|0,this._d=this._d+o|0},i.prototype._digest=function(){this._block[this._blockOffset++]=128,56<this._blockOffset&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=new t(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},o.exports=i}).call(this,n("buffer").Buffer)},{buffer:49,"hash-base":107,inherits:103}],107:[function(e,t,r){"use strict";var s=e("safe-buffer").Buffer,i=e("stream").Transform;function n(e){i.call(this),this._block=s.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}e("inherits")(n,i),n.prototype._transform=function(e,t,r){var i=null;try{this.update(e,t)}catch(e){i=e}r(i)},n.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},n.prototype.update=function(e,t){if(function(e,t){if(!s.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");s.isBuffer(e)||(e=s.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var n=this._blockOffset;n<this._blockSize;)r[n++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)r[this._blockOffset++]=e[i++];for(var o=0,a=8*e.length;0<a;++o)this._length[o]+=a,0<(a=this._length[o]/4294967296|0)&&(this._length[o]-=4294967296*a);return this},n.prototype._update=function(){throw new Error("_update is not implemented")},n.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0);for(var r=this._blockOffset=0;r<4;++r)this._length[r]=0;return t},n.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=n},{inherits:103,"safe-buffer":143,stream:152}],108:[function(e,t,r){var d=e("bn.js"),i=e("brorand");function n(e){this.rand=e||new i.Rand}(t.exports=n).create=function(e){return new n(e)},n.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new d(this.rand.generate(r))}while(0<=i.cmp(e));return i},n.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},n.prototype.test=function(e,t,r){var i=e.bitLength(),n=d.mont(e),o=new d(1).toRed(n);t||(t=Math.max(1,i/48|0));for(var a=e.subn(1),s=0;!a.testn(s);s++);for(var u=e.shrn(s),c=a.toRed(n);0<t;t--){var l=this._randrange(new d(2),a);r&&r(l);var f=l.toRed(n).redPow(u);if(0!==f.cmp(o)&&0!==f.cmp(c)){for(var h=1;h<s;h++){if(0===(f=f.redSqr()).cmp(o))return!1;if(0===f.cmp(c))break}if(h===s)return!1}}return!0},n.prototype.getDivisor=function(e,t){var r=e.bitLength(),i=d.mont(e),n=new d(1).toRed(i);t||(t=Math.max(1,r/48|0));for(var o=e.subn(1),a=0;!o.testn(a);a++);for(var s=e.shrn(a),u=o.toRed(i);0<t;t--){var c=this._randrange(new d(2),o),l=e.gcd(c);if(0!==l.cmpn(1))return l;var f=c.toRed(i).redPow(s);if(0!==f.cmp(n)&&0!==f.cmp(u)){for(var h=1;h<a;h++){if(0===(f=f.redSqr()).cmp(n))return f.fromRed().subn(1).gcd(e);if(0===f.cmp(u))break}if(h===a)return(f=f.redSqr()).fromRed().subn(1).gcd(e)}}return!1}},{"bn.js":17,brorand:18}],109:[function(e,t,r){function i(e,t){if(!e)throw new Error(t||"Assertion failed")}(t.exports=i).equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},{}],110:[function(e,t,r){"use strict";var i=r;function n(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}i.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var i=0;i<e.length;i++)r[i]=0|e[i];return r}if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16));else for(i=0;i<e.length;i++){var n=e.charCodeAt(i),o=n>>8,a=255&n;o?r.push(o,a):r.push(a)}return r},i.zero2=n,i.toHex=o,i.encode=function(e,t){return"hex"===t?o(e):e}},{}],111:[function(e,t,r){t.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],112:[function(e,t,r){"use strict";var i=e("asn1.js");r.certificate=e("./certificate");var n=i.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});r.RSAPrivateKey=n;var o=i.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});r.RSAPublicKey=o;var a=i.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())});r.PublicKey=a;var s=i.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),u=i.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())});r.PrivateKey=u;var c=i.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});r.EncryptedPrivateKey=c;var l=i.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});r.DSAPrivateKey=l,r.DSAparam=i.define("DSAparam",function(){this.int()});var f=i.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(h),this.key("publicKey").optional().explicit(1).bitstr())});r.ECPrivateKey=f;var h=i.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});r.signature=i.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"./certificate":113,"asn1.js":2}],113:[function(e,t,r){"use strict";var i=e("asn1.js"),n=i.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),o=i.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),a=i.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional())}),s=i.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())}),u=i.define("RelativeDistinguishedName",function(){this.setof(o)}),c=i.define("RDNSequence",function(){this.seqof(u)}),l=i.define("Name",function(){this.choice({rdnSequence:this.use(c)})}),f=i.define("Validity",function(){this.seq().obj(this.key("notBefore").use(n),this.key("notAfter").use(n))}),h=i.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),d=i.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(l),this.key("validity").use(f),this.key("subject").use(l),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(h).optional())}),p=i.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())});t.exports=p},{"asn1.js":2}],114:[function(e,t,r){(function(h){var d=/Proc-Type: 4,ENCRYPTED\n\r?DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\n\r?\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?/m,p=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n/m,v=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?-----END \1-----$/m,m=e("evp_bytestokey"),b=e("browserify-aes");t.exports=function(e,t){var r,i=e.toString(),n=i.match(d);if(n){var o="aes"+n[1],a=new h(n[2],"hex"),s=new h(n[3].replace(/\r?\n/g,""),"base64"),u=m(t,a.slice(0,8),parseInt(n[1],10)).key,c=[],l=b.createDecipheriv(o,u,a);c.push(l.update(s)),c.push(l.final()),r=h.concat(c)}else{var f=i.match(v);r=new h(f[2].replace(/\r?\n/g,""),"base64")}return{tag:i.match(p)[1],data:r}}}).call(this,e("buffer").Buffer)},{"browserify-aes":22,buffer:49,evp_bytestokey:86}],115:[function(t,r,e){(function(f){var s=t("./asn1"),h=t("./aesid.json"),u=t("./fixProc"),d=t("browserify-aes"),p=t("pbkdf2");function e(e){var t;"object"!=typeof e||f.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=new f(e));var r,i,n=u(e,t),o=n.tag,a=n.data;switch(o){case"CERTIFICATE":i=s.certificate.decode(a,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(i||(i=s.PublicKey.decode(a,"der")),r=i.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return s.RSAPublicKey.decode(i.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return i.subjectPrivateKey=i.subjectPublicKey,{type:"ec",data:i};case"1.2.840.10040.4.1":return i.algorithm.params.pub_key=s.DSAparam.decode(i.subjectPublicKey.data,"der"),{type:"dsa",data:i.algorithm.params};default:throw new Error("unknown key id "+r)}throw new Error("unknown key type "+o);case"ENCRYPTED PRIVATE KEY":a=function(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),n=h[e.algorithm.decrypt.cipher.algo.join(".")],o=e.algorithm.decrypt.cipher.iv,a=e.subjectPrivateKey,s=parseInt(n.split("-")[1],10)/8,u=p.pbkdf2Sync(t,r,i,s),c=d.createDecipheriv(n,u,o),l=[];return l.push(c.update(a)),l.push(c.final()),f.concat(l)}(a=s.EncryptedPrivateKey.decode(a,"der"),t);case"PRIVATE KEY":switch(r=(i=s.PrivateKey.decode(a,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return s.RSAPrivateKey.decode(i.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:i.algorithm.curve,privateKey:s.ECPrivateKey.decode(i.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return i.algorithm.params.priv_key=s.DSAparam.decode(i.subjectPrivateKey,"der"),{type:"dsa",params:i.algorithm.params};default:throw new Error("unknown key id "+r)}throw new Error("unknown key type "+o);case"RSA PUBLIC KEY":return s.RSAPublicKey.decode(a,"der");case"RSA PRIVATE KEY":return s.RSAPrivateKey.decode(a,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:s.DSAPrivateKey.decode(a,"der")};case"EC PRIVATE KEY":return{curve:(a=s.ECPrivateKey.decode(a,"der")).parameters.value,privateKey:a.privateKey};default:throw new Error("unknown key type "+o)}}(r.exports=e).signature=s.signature}).call(this,t("buffer").Buffer)},{"./aesid.json":111,"./asn1":112,"./fixProc":114,"browserify-aes":22,buffer:49,pbkdf2:117}],116:[function(e,t,c){(function(n){function o(e,t){for(var r=0,i=e.length-1;0<=i;i--){var n=e[i];"."===n?e.splice(i,1):".."===n?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a=function(e){return t.exec(e).slice(1)};function s(e,t){if(e.filter)return e.filter(t);for(var r=[],i=0;i<e.length;i++)t(e[i],i,e)&&r.push(e[i]);return r}c.resolve=function(){for(var e="",t=!1,r=arguments.length-1;-1<=r&&!t;r--){var i=0<=r?arguments[r]:n.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");i&&(e=i+"/"+e,t="/"===i.charAt(0))}return(t?"/":"")+(e=o(s(e.split("/"),function(e){return!!e}),!t).join("/"))||"."},c.normalize=function(e){var t=c.isAbsolute(e),r="/"===i(e,-1);return(e=o(s(e.split("/"),function(e){return!!e}),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},c.isAbsolute=function(e){return"/"===e.charAt(0)},c.join=function(){var e=Array.prototype.slice.call(arguments,0);return c.normalize(s(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},c.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;0<=r&&""===e[r];r--);return r<t?[]:e.slice(t,r-t+1)}e=c.resolve(e).substr(1),t=c.resolve(t).substr(1);for(var i=r(e.split("/")),n=r(t.split("/")),o=Math.min(i.length,n.length),a=o,s=0;s<o;s++)if(i[s]!==n[s]){a=s;break}var u=[];for(s=a;s<i.length;s++)u.push("..");return(u=u.concat(n.slice(a))).join("/")},c.sep="/",c.delimiter=":",c.dirname=function(e){var t=a(e),r=t[0],i=t[1];return r||i?(i&&(i=i.substr(0,i.length-1)),r+i):"."},c.basename=function(e,t){var r=a(e)[2];return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},c.extname=function(e){return a(e)[3]};var i="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,e("_process"))},{_process:123}],117:[function(e,t,r){r.pbkdf2=e("./lib/async"),r.pbkdf2Sync=e("./lib/sync")},{"./lib/async":118,"./lib/sync":121}],118:[function(t,r,e){(function(u,c){var l,e=t("./precondition"),f=t("./default-encoding"),h=t("./sync"),d=t("safe-buffer").Buffer,p=c.crypto&&c.crypto.subtle,v={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},m=[];function b(e,t,r,i,n){return p.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then(function(e){return p.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:n}},e,i<<3)}).then(function(e){return d.from(e)})}r.exports=function(t,r,i,n,o,a){if(d.isBuffer(t)||(t=d.from(t,f)),d.isBuffer(r)||(r=d.from(r,f)),e(i,n),"function"==typeof o&&(a=o,o=void 0),"function"!=typeof a)throw new Error("No callback provided to pbkdf2");var s=v[(o=o||"sha1").toLowerCase()];if(!s||"function"!=typeof c.Promise)return u.nextTick(function(){var e;try{e=h(t,r,i,n,o)}catch(e){return a(e)}a(null,e)});!function(e,t){e.then(function(e){u.nextTick(function(){t(null,e)})},function(e){u.nextTick(function(){t(e)})})}(function(e){if(c.process&&!c.process.browser)return Promise.resolve(!1);if(!p||!p.importKey||!p.deriveBits)return Promise.resolve(!1);if(void 0!==m[e])return m[e];var t=b(l=l||d.alloc(8),l,10,128,e).then(function(){return!0}).catch(function(){return!1});return m[e]=t}(s).then(function(e){return e?b(t,r,i,n,s):h(t,r,i,n,o)}),a)}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./default-encoding":119,"./precondition":120,"./sync":121,_process:123,"safe-buffer":143}],119:[function(e,r,t){(function(e){var t;e.browser?t="utf-8":t=6<=parseInt(e.version.split(".")[0].slice(1),10)?"utf-8":"binary";r.exports=t}).call(this,e("_process"))},{_process:123}],120:[function(e,t,r){var i=Math.pow(2,30)-1;t.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||i<t||t!=t)throw new TypeError("Bad key length")}},{}],121:[function(e,t,r){var c=e("create-hash/md5"),l=e("ripemd160"),f=e("sha.js"),m=e("./precondition"),b=e("./default-encoding"),y=e("safe-buffer").Buffer,h=y.alloc(128),g={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function _(e,t,r){var i=function(t){return"rmd160"===t||"ripemd160"===t?l:"md5"===t?c:function(e){return f(t).update(e).digest()}}(e),n="sha512"===e||"sha384"===e?128:64;t.length>n?t=i(t):t.length<n&&(t=y.concat([t,h],n));for(var o=y.allocUnsafe(n+g[e]),a=y.allocUnsafe(n+g[e]),s=0;s<n;s++)o[s]=54^t[s],a[s]=92^t[s];var u=y.allocUnsafe(n+r+4);o.copy(u,0,0,n),this.ipad1=u,this.ipad2=o,this.opad=a,this.alg=e,this.blocksize=n,this.hash=i,this.size=g[e]}_.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=function(e,t,r,i,n){y.isBuffer(e)||(e=y.from(e,b)),y.isBuffer(t)||(t=y.from(t,b)),m(r,i);var o=new _(n=n||"sha1",e,t.length),a=y.allocUnsafe(i),s=y.allocUnsafe(t.length+4);t.copy(s,0,0,t.length);for(var u=0,c=g[n],l=Math.ceil(i/c),f=1;f<=l;f++){s.writeUInt32BE(f,t.length);for(var h=o.run(s,o.ipad1),d=h,p=1;p<r;p++){d=o.run(d,o.ipad2);for(var v=0;v<c;v++)h[v]^=d[v]}h.copy(a,u),u+=c}return a}},{"./default-encoding":119,"./precondition":120,"create-hash/md5":55,ripemd160:142,"safe-buffer":143,"sha.js":145}],122:[function(e,t,r){(function(s){"use strict";!s.version||0===s.version.indexOf("v0.")||0===s.version.indexOf("v1.")&&0!==s.version.indexOf("v1.8.")?t.exports=function(e,t,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var n,o,a=arguments.length;switch(a){case 0:case 1:return s.nextTick(e);case 2:return s.nextTick(function(){e.call(null,t)});case 3:return s.nextTick(function(){e.call(null,t,r)});case 4:return s.nextTick(function(){e.call(null,t,r,i)});default:for(n=new Array(a-1),o=0;o<n.length;)n[o++]=arguments[o];return s.nextTick(function(){e.apply(null,n)})}}:t.exports=s.nextTick}).call(this,e("_process"))},{_process:123}],123:[function(e,t,r){var i,n,o=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(t){if(i===setTimeout)return setTimeout(t,0);if((i===a||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:a}catch(e){i=a}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var c,l=[],f=!1,h=-1;function d(){f&&c&&(f=!1,c.length?l=c.concat(l):h=-1,l.length&&p())}function p(){if(!f){var e=u(d);f=!0;for(var t=l.length;t;){for(c=l,l=[];++h<t;)c&&c[h].run();h=-1,t=l.length}c=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(e)}}function v(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new v(e,t)),1!==l.length||f||u(p)},v.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],124:[function(e,t,r){r.publicEncrypt=e("./publicEncrypt"),r.privateDecrypt=e("./privateDecrypt"),r.privateEncrypt=function(e,t){return r.publicEncrypt(e,t,!0)},r.publicDecrypt=function(e,t){return r.privateDecrypt(e,t,!0)}},{"./privateDecrypt":126,"./publicEncrypt":127}],125:[function(e,t,r){(function(o){var a=e("create-hash");function s(e){var t=new o(4);return t.writeUInt32BE(e,0),t}t.exports=function(e,t){for(var r,i=new o(""),n=0;i.length<t;)r=s(n++),i=o.concat([i,a("sha1").update(e).update(r).digest()]);return i.slice(0,t)}}).call(this,e("buffer").Buffer)},{buffer:49,"create-hash":53}],126:[function(e,t,r){(function(l){var u=e("parse-asn1"),f=e("./mgf"),h=e("./xor"),c=e("bn.js"),d=e("browserify-rsa"),p=e("create-hash"),v=e("./withPublic");t.exports=function(e,t,r){var i;i=e.padding?e.padding:r?1:4;var n,o=u(e),a=o.modulus.byteLength();if(t.length>a||0<=new c(t).cmp(o.modulus))throw new Error("decryption error");n=r?v(new c(t),o):d(t,o);var s=new l(a-n.length);if(s.fill(0),n=l.concat([s,n],a),4===i)return function(e,t){e.modulus;var r=e.modulus.byteLength(),i=(t.length,p("sha1").update(new l("")).digest()),n=i.length;if(0!==t[0])throw new Error("decryption error");var o=t.slice(1,n+1),a=t.slice(n+1),s=h(o,f(a,n)),u=h(a,f(s,r-n-1));if(function(e,t){e=new l(e),t=new l(t);var r=0,i=e.length;e.length!==t.length&&(r++,i=Math.min(e.length,t.length));var n=-1;for(;++n<i;)r+=e[n]^t[n];return r}(i,u.slice(0,n)))throw new Error("decryption error");var c=n;for(;0===u[c];)c++;if(1===u[c++])return u.slice(c);throw new Error("decryption error")}(o,n);if(1===i)return function(e,t,r){var i=t.slice(0,2),n=2,o=0;for(;0!==t[n++];)if(n>=t.length){o++;break}var a=t.slice(2,n-1);t.slice(n-1,n);("0002"!==i.toString("hex")&&!r||"0001"!==i.toString("hex")&&r)&&o++;a.length<8&&o++;if(o)throw new Error("decryption error");return t.slice(n)}(0,n,r);if(3===i)return n;throw new Error("unknown padding")}}).call(this,e("buffer").Buffer)},{"./mgf":125,"./withPublic":128,"./xor":129,"bn.js":17,"browserify-rsa":40,buffer:49,"create-hash":53,"parse-asn1":115}],127:[function(e,t,r){(function(h){var a=e("parse-asn1"),d=e("randombytes"),p=e("create-hash"),v=e("./mgf"),m=e("./xor"),b=e("bn.js"),s=e("./withPublic"),u=e("browserify-rsa");t.exports=function(e,t,r){var i;i=e.padding?e.padding:r?1:4;var n,o=a(e);if(4===i)n=function(e,t){var r=e.modulus.byteLength(),i=t.length,n=p("sha1").update(new h("")).digest(),o=n.length,a=2*o;if(r-a-2<i)throw new Error("message too long");var s=new h(r-i-a-2);s.fill(0);var u=r-o-1,c=d(o),l=m(h.concat([n,s,new h([1]),t],u),v(c,u)),f=m(c,v(l,o));return new b(h.concat([new h([0]),f,l],r))}(o,t);else if(1===i)n=function(e,t,r){var i,n=t.length,o=e.modulus.byteLength();if(o-11<n)throw new Error("message too long");r?(i=new h(o-n-3)).fill(255):i=function(e,t){var r,i=new h(e),n=0,o=d(2*e),a=0;for(;n<e;)a===o.length&&(o=d(2*e),a=0),(r=o[a++])&&(i[n++]=r);return i}(o-n-3);return new b(h.concat([new h([0,r?1:2]),i,new h([0]),t],o))}(o,t,r);else{if(3!==i)throw new Error("unknown padding");if(0<=(n=new b(t)).cmp(o.modulus))throw new Error("data too long for modulus")}return r?u(n,o):s(n,o)}}).call(this,e("buffer").Buffer)},{"./mgf":125,"./withPublic":128,"./xor":129,"bn.js":17,"browserify-rsa":40,buffer:49,"create-hash":53,"parse-asn1":115,randombytes:130}],128:[function(e,t,r){(function(r){var i=e("bn.js");t.exports=function(e,t){return new r(e.toRed(i.mont(t.modulus)).redPow(new i(t.publicExponent)).fromRed().toArray())}}).call(this,e("buffer").Buffer)},{"bn.js":17,buffer:49}],129:[function(e,t,r){t.exports=function(e,t){for(var r=e.length,i=-1;++i<r;)e[i]^=t[i];return e}},{}],130:[function(e,t,r){(function(n,o){"use strict";var a=e("safe-buffer").Buffer,s=o.crypto||o.msCrypto;s&&s.getRandomValues?t.exports=function(e,t){if(65536<e)throw new Error("requested too many random bytes");var r=new o.Uint8Array(e);0<e&&s.getRandomValues(r);var i=a.from(r.buffer);return"function"!=typeof t?i:n.nextTick(function(){t(null,i)})}:t.exports=function(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:123,"safe-buffer":143}],131:[function(r,e,d){(function(a,n){"use strict";function e(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var t=r("safe-buffer"),s=r("randombytes"),o=t.Buffer,i=t.kMaxLength,u=n.crypto||n.msCrypto,c=Math.pow(2,32)-1;function l(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(c<e||e<0)throw new TypeError("offset must be a uint32");if(i<e||t<e)throw new RangeError("offset out of range")}function f(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(c<e||e<0)throw new TypeError("size must be a uint32");if(r<e+t||i<e)throw new RangeError("buffer too small")}function h(r,i,e,n){if(a.browser){var t=r.buffer,o=new Uint8Array(t,i,e);return u.getRandomValues(o),n?void a.nextTick(function(){n(null,r)}):r}if(!n)return s(e).copy(r,i),r;s(e,function(e,t){if(e)return n(e);t.copy(r,i),n(null,r)})}u&&u.getRandomValues||!a.browser?(d.randomFill=function(e,t,r,i){if(!(o.isBuffer(e)||e instanceof n.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)i=t,t=0,r=e.length;else if("function"==typeof r)i=r,r=e.length-t;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return l(t,e.length),f(r,t,e.length),h(e,t,r,i)},d.randomFillSync=function(e,t,r){void 0===t&&(t=0);if(!(o.isBuffer(e)||e instanceof n.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');l(t,e.length),void 0===r&&(r=e.length-t);return f(r,t,e.length),h(e,t,r)}):(d.randomFill=e,d.randomFillSync=e)}).call(this,r("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:123,randombytes:130,"safe-buffer":143}],132:[function(e,t,r){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":133}],133:[function(e,t,r){"use strict";var i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=f;var n=e("process-nextick-args"),o=e("core-util-is");o.inherits=e("inherits");var a=e("./_stream_readable"),s=e("./_stream_writable");o.inherits(f,a);for(var u=i(s.prototype),c=0;c<u.length;c++){var l=u[c];f.prototype[l]||(f.prototype[l]=s.prototype[l])}function f(e){if(!(this instanceof f))return new f(e);a.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||n(d,this)}function d(e){e.end()}},{"./_stream_readable":135,"./_stream_writable":137,"core-util-is":51,inherits:103,"process-nextick-args":122}],134:[function(e,t,r){"use strict";t.exports=o;var i=e("./_stream_transform"),n=e("core-util-is");function o(e){if(!(this instanceof o))return new o(e);i.call(this,e)}n.inherits=e("inherits"),n.inherits(o,i),o.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":136,"core-util-is":51,inherits:103}],135:[function(M,P,e){(function(v){"use strict";P.exports=i;var m=M("process-nextick-args"),b=M("isarray"),h=M("buffer").Buffer;i.ReadableState=r;M("events");var n,y=function(e,t){return e.listeners(t).length};!function(){try{n=M("stream")}catch(e){}finally{n||(n=M("events").EventEmitter)}}();h=M("buffer").Buffer;var e=M("core-util-is");e.inherits=M("inherits");var o,a,t=M("util"),g=void 0;function r(e,t){a=a||M("./_stream_duplex"),e=e||{},this.objectMode=!!e.objectMode,t instanceof a&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(o||(o=M("string_decoder/").StringDecoder),this.decoder=new o(e.encoding),this.encoding=e.encoding)}function i(e){if(a=a||M("./_stream_duplex"),!(this instanceof i))return new i(e);this._readableState=new r(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),n.call(this)}function s(e,t,r,i,n){var o=function(e,t){var r=null;h.isBuffer(t)||"string"==typeof t||null==t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));return r}(t,r);if(o)e.emit("error",o);else if(null===r)t.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,l(e)}(e,t);else if(t.objectMode||r&&0<r.length)if(t.ended&&!n){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&n){a=new Error("stream.unshift() after end event");e.emit("error",a)}else{var s;!t.decoder||n||i||(r=t.decoder.write(r),s=!t.objectMode&&0===r.length),n||(t.reading=!1),s||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&l(e))),function(e,t){t.readingMore||(t.readingMore=!0,m(d,e,t))}(e,t)}else n||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}g=t&&t.debuglog?t.debuglog("stream"):function(){},e.inherits(i,n),i.prototype.push=function(e,t){var r=this._readableState;return r.objectMode||"string"!=typeof e||(t=t||r.defaultEncoding)!==r.encoding&&(e=new h(e,t),t=""),s(this,r,e,t,!1)},i.prototype.unshift=function(e){return s(this,this._readableState,e,"",!0)},i.prototype.isPaused=function(){return!1===this._readableState.flowing},i.prototype.setEncoding=function(e){return o||(o=M("string_decoder/").StringDecoder),this._readableState.decoder=new o(e),this._readableState.encoding=e,this};var u=8388608;function c(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:null===e||isNaN(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:e<=0?0:(e>t.highWaterMark&&(t.highWaterMark=function(e){return u<=e?e=u:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function l(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?m(f,e):f(e))}function f(e){g("emit readable"),e.emit("readable"),w(e)}function d(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(g("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function p(e){g("readable nexttick read 0"),e.read(0)}function _(e,t){t.reading||(g("resume read 0"),e.read(0)),t.resumeScheduled=!1,e.emit("resume"),w(e),t.flowing&&!t.reading&&e.read(0)}function w(e){var t=e._readableState;if(g("flow",t.flowing),t.flowing)do{var r=e.read()}while(null!==r&&t.flowing)}function x(e,t){var r,i=t.buffer,n=t.length,o=!!t.decoder,a=!!t.objectMode;if(0===i.length)return null;if(0===n)r=null;else if(a)r=i.shift();else if(!e||n<=e)r=o?i.join(""):1===i.length?i[0]:h.concat(i,n),i.length=0;else{if(e<i[0].length)r=(l=i[0]).slice(0,e),i[0]=l.slice(e);else if(e===i[0].length)r=i.shift();else{r=o?"":new h(e);for(var s=0,u=0,c=i.length;u<c&&s<e;u++){var l=i[0],f=Math.min(e-s,l.length);o?r+=l.slice(0,f):l.copy(r,s,0,f),f<l.length?i[0]=l.slice(f):i.shift(),s+=f}}}return r}function T(e){var t=e._readableState;if(0<t.length)throw new Error("endReadable called on non-empty stream");t.endEmitted||(t.ended=!0,m(S,t,e))}function S(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}i.prototype.read=function(e){g("read",e);var t=this._readableState,r=e;if(("number"!=typeof e||0<e)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return g("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?T(this):l(this),null;if(0===(e=c(e,t))&&t.ended)return 0===t.length&&T(this),null;var i,n=t.needReadable;return g("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&g("length less than watermark",n=!0),(t.ended||t.reading)&&g("reading or ended",n=!1),n&&(g("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),n&&!t.reading&&(e=c(r,t)),null===(i=0<e?x(e,t):null)&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),r!==e&&t.ended&&0===t.length&&T(this),null!==i&&this.emit("data",i),i},i.prototype._read=function(e){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,g("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||!1!==e.end)&&t!==v.stdout&&t!==v.stderr?a:c;function o(e){g("onunpipe"),e===r&&c()}function a(){g("onend"),t.end()}i.endEmitted?m(n):r.once("end",n),t.on("unpipe",o);var s=function(t){return function(){var e=t._readableState;g("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&y(t,"data")&&(e.flowing=!0,w(t))}}(r);t.on("drain",s);var u=!1;function c(){g("cleanup"),t.removeListener("close",h),t.removeListener("finish",d),t.removeListener("drain",s),t.removeListener("error",f),t.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",c),r.removeListener("data",l),u=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||s()}function l(e){g("ondata"),!1===t.write(e)&&(1!==i.pipesCount||i.pipes[0]!==t||1!==r.listenerCount("data")||u||(g("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++),r.pause())}function f(e){g("onerror",e),p(),t.removeListener("error",f),0===y(t,"error")&&t.emit("error",e)}function h(){t.removeListener("finish",d),p()}function d(){g("onfinish"),t.removeListener("close",h),p()}function p(){g("unpipe"),r.unpipe(t)}return r.on("data",l),t._events&&t._events.error?b(t._events.error)?t._events.error.unshift(f):t._events.error=[f,t._events.error]:t.on("error",f),t.once("close",h),t.once("finish",d),t.emit("pipe",r),i.flowing||(g("pipe resume"),r.resume()),t},i.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var n=0;n<i;n++)r[n].emit("unpipe",this);return this}var o=function(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this)),this},i.prototype.addListener=i.prototype.on=function(e,t){var r=n.prototype.on.call(this,e,t);if("data"===e&&!1!==this._readableState.flowing&&this.resume(),"readable"===e&&!this._readableState.endEmitted){var i=this._readableState;i.readableListening||(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading?i.length&&l(this):m(p,this))}return r},i.prototype.resume=function(){var e=this._readableState;return e.flowing||(g("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,m(_,e,t))}(this,e)),this},i.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var r=this._readableState,i=!1,n=this;for(var e in t.on("end",function(){if(g("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&n.push(e)}n.push(null)}),t.on("data",function(e){(g("wrapped data"),r.decoder&&(e=r.decoder.write(e)),r.objectMode&&null==e)||(r.objectMode||e&&e.length)&&(n.push(e)||(i=!0,t.pause()))}),t)void 0===this[e]&&"function"==typeof t[e]&&(this[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e));return function(e,t){for(var r=0,i=e.length;r<i;r++)t(e[r],r)}(["error","close","destroy","pause","resume"],function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){g("wrapped _read",e),i&&(i=!1,t.resume())},n},i._fromList=x}).call(this,M("_process"))},{"./_stream_duplex":133,_process:123,buffer:49,"core-util-is":51,events:85,inherits:103,isarray:105,"process-nextick-args":122,"string_decoder/":153,util:19}],136:[function(e,t,r){"use strict";t.exports=a;var i=e("./_stream_duplex"),n=e("core-util-is");function o(r){this.afterTransform=function(e,t){return function(e,t,r){var i=e._transformState;i.transforming=!1;var n=i.writecb;if(!n)return e.emit("error",new Error("no writecb in Transform class"));i.writechunk=null,(i.writecb=null)!=r&&e.push(r);n(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}(r,e,t)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function a(e){if(!(this instanceof a))return new a(e);i.call(this,e),this._transformState=new o(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(e){s(t,e)}):s(t)})}function s(e,t){if(t)return e.emit("error",t);var r=e._writableState,i=e._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(i.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}n.inherits=e("inherits"),n.inherits(a,i),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,i.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,r){throw new Error("not implemented")},a.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0}},{"./_stream_duplex":133,"core-util-is":51,inherits:103}],137:[function(g,_,e){(function(e){"use strict";_.exports=f;var a=g("process-nextick-args"),s=!e.browser&&-1<["v0.10","v0.9."].indexOf(e.version.slice(0,5))?setImmediate:a,u=g("buffer").Buffer;f.WritableState=n;var t=g("core-util-is");t.inherits=g("inherits");var r,i={deprecate:g("util-deprecate")};!function(){try{r=g("stream")}catch(e){}finally{r||(r=g("events").EventEmitter)}}();var o;u=g("buffer").Buffer;function c(){}function l(e,t,r){this.chunk=e,this.encoding=t,this.callback=r,this.next=null}function n(e,t){o=o||g("./_stream_duplex"),e=e||{},this.objectMode=!!e.objectMode,t instanceof o&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1;var n=(this.finished=!1)===e.decodeStrings;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,n){--t.pendingcb,r?a(n,i):n(i);e._writableState.errorEmitted=!0,e.emit("error",i)}(e,r,i,t,n);else{var o=v(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||p(e,r),i?s(d,e,r,o,n):d(e,r,o,n)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new y(this),this.corkedRequestsFree.next=new y(this)}function f(e){if(o=o||g("./_stream_duplex"),!(this instanceof f||this instanceof o))return new f(e);this._writableState=new n(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),r.call(this)}function h(e,t,r,i,n,o,a){t.writelen=i,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function d(e,t,r,i){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),b(e,t)}function p(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),o=t.corkedRequestsFree;o.entry=r;for(var a=0;r;)r=(n[a]=r).next,a+=1;h(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,t.corkedRequestsFree=o.next,o.next=null}else{for(;r;){var s=r.chunk,u=r.encoding,c=r.callback;if(h(e,t,!1,t.objectMode?1:s.length,s,u,c),r=r.next,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=r,t.bufferProcessing=!1}function v(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function m(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function b(e,t){var r=v(t);return r&&(0===t.pendingcb?(m(e,t),t.finished=!0,e.emit("finish")):m(e,t)),r}function y(i){var n=this;this.next=null,this.entry=null,this.finish=function(e){var t=n.entry;for(n.entry=null;t;){var r=t.callback;i.pendingcb--,r(e),t=t.next}i.corkedRequestsFree?i.corkedRequestsFree.next=n:i.corkedRequestsFree=n}}t.inherits(f,r),n.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(n.prototype,"buffer",{get:i.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}(),f.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},f.prototype.write=function(e,t,r){var i=this._writableState,n=!1;return"function"==typeof t&&(r=t,t=null),u.isBuffer(e)?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=c),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),a(t,r)}(this,r):function(e,t,r,i){var n=!0;if(!u.isBuffer(r)&&"string"!=typeof r&&null!=r&&!t.objectMode){var o=new TypeError("Invalid non-string/buffer chunk");e.emit("error",o),a(i,o),n=!1}return n}(this,i,e,r)&&(i.pendingcb++,n=function(e,t,r,i,n){r=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=new u(t,r)),t}(t,r,i),u.isBuffer(r)&&(i="buffer");var o=t.objectMode?1:r.length;t.length+=o;var a=t.length<t.highWaterMark;a||(t.needDrain=!0);if(t.writing||t.corked){var s=t.lastBufferedRequest;t.lastBufferedRequest=new l(r,i,n),s?s.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else h(e,t,!1,o,r,i,n);return a}(this,i,e,t,r)),n},f.prototype.cork=function(){this._writableState.corked++},f.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||p(this,e))},f.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(-1<["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())))throw new TypeError("Unknown encoding: "+e);this._writableState.defaultEncoding=e},f.prototype._write=function(e,t,r){r(new Error("not implemented"))},f.prototype._writev=null,f.prototype.end=function(e,t,r){var i=this._writableState;"function"==typeof e?(r=e,t=e=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(e,t,r){t.ending=!0,b(e,t),r&&(t.finished?a(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r)}}).call(this,g("_process"))},{"./_stream_duplex":133,_process:123,buffer:49,"core-util-is":51,events:85,inherits:103,"process-nextick-args":122,"util-deprecate":154}],138:[function(e,t,r){t.exports=e("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":134}],139:[function(e,t,r){var i=function(){try{return e("stream")}catch(e){}}();(r=t.exports=e("./lib/_stream_readable.js")).Stream=i||r,(r.Readable=r).Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":133,"./lib/_stream_passthrough.js":134,"./lib/_stream_readable.js":135,"./lib/_stream_transform.js":136,"./lib/_stream_writable.js":137}],140:[function(e,t,r){t.exports=e("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":136}],141:[function(e,t,r){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":137}],142:[function(n,o,e){(function(t){"use strict";var e=n("inherits"),r=n("hash-base");function i(){r.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function d(e,t){return e<<t|e>>>32-t}function p(e,t,r,i,n,o,a,s){return d(e+(t^r^i)+o+a|0,s)+n|0}function v(e,t,r,i,n,o,a,s){return d(e+(t&r|~t&i)+o+a|0,s)+n|0}function m(e,t,r,i,n,o,a,s){return d(e+((t|~r)^i)+o+a|0,s)+n|0}function b(e,t,r,i,n,o,a,s){return d(e+(t&i|r&~i)+o+a|0,s)+n|0}function y(e,t,r,i,n,o,a,s){return d(e+(t^(r|~i))+o+a|0,s)+n|0}e(i,r),i.prototype._update=function(){for(var e=new Array(16),t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,i=this._b,n=this._c,o=this._d,a=this._e;a=p(a,r=p(r,i,n,o,a,e[0],0,11),i,n=d(n,10),o,e[1],0,14),i=p(i=d(i,10),n=p(n,o=p(o,a,r,i,n,e[2],0,15),a,r=d(r,10),i,e[3],0,12),o,a=d(a,10),r,e[4],0,5),o=p(o=d(o,10),a=p(a,r=p(r,i,n,o,a,e[5],0,8),i,n=d(n,10),o,e[6],0,7),r,i=d(i,10),n,e[7],0,9),r=p(r=d(r,10),i=p(i,n=p(n,o,a,r,i,e[8],0,11),o,a=d(a,10),r,e[9],0,13),n,o=d(o,10),a,e[10],0,14),n=p(n=d(n,10),o=p(o,a=p(a,r,i,n,o,e[11],0,15),r,i=d(i,10),n,e[12],0,6),a,r=d(r,10),i,e[13],0,7),a=v(a=d(a,10),r=p(r,i=p(i,n,o,a,r,e[14],0,9),n,o=d(o,10),a,e[15],0,8),i,n=d(n,10),o,e[7],1518500249,7),i=v(i=d(i,10),n=v(n,o=v(o,a,r,i,n,e[4],1518500249,6),a,r=d(r,10),i,e[13],1518500249,8),o,a=d(a,10),r,e[1],1518500249,13),o=v(o=d(o,10),a=v(a,r=v(r,i,n,o,a,e[10],1518500249,11),i,n=d(n,10),o,e[6],1518500249,9),r,i=d(i,10),n,e[15],1518500249,7),r=v(r=d(r,10),i=v(i,n=v(n,o,a,r,i,e[3],1518500249,15),o,a=d(a,10),r,e[12],1518500249,7),n,o=d(o,10),a,e[0],1518500249,12),n=v(n=d(n,10),o=v(o,a=v(a,r,i,n,o,e[9],1518500249,15),r,i=d(i,10),n,e[5],1518500249,9),a,r=d(r,10),i,e[2],1518500249,11),a=v(a=d(a,10),r=v(r,i=v(i,n,o,a,r,e[14],1518500249,7),n,o=d(o,10),a,e[11],1518500249,13),i,n=d(n,10),o,e[8],1518500249,12),i=m(i=d(i,10),n=m(n,o=m(o,a,r,i,n,e[3],1859775393,11),a,r=d(r,10),i,e[10],1859775393,13),o,a=d(a,10),r,e[14],1859775393,6),o=m(o=d(o,10),a=m(a,r=m(r,i,n,o,a,e[4],1859775393,7),i,n=d(n,10),o,e[9],1859775393,14),r,i=d(i,10),n,e[15],1859775393,9),r=m(r=d(r,10),i=m(i,n=m(n,o,a,r,i,e[8],1859775393,13),o,a=d(a,10),r,e[1],1859775393,15),n,o=d(o,10),a,e[2],1859775393,14),n=m(n=d(n,10),o=m(o,a=m(a,r,i,n,o,e[7],1859775393,8),r,i=d(i,10),n,e[0],1859775393,13),a,r=d(r,10),i,e[6],1859775393,6),a=m(a=d(a,10),r=m(r,i=m(i,n,o,a,r,e[13],1859775393,5),n,o=d(o,10),a,e[11],1859775393,12),i,n=d(n,10),o,e[5],1859775393,7),i=b(i=d(i,10),n=b(n,o=m(o,a,r,i,n,e[12],1859775393,5),a,r=d(r,10),i,e[1],2400959708,11),o,a=d(a,10),r,e[9],2400959708,12),o=b(o=d(o,10),a=b(a,r=b(r,i,n,o,a,e[11],2400959708,14),i,n=d(n,10),o,e[10],2400959708,15),r,i=d(i,10),n,e[0],2400959708,14),r=b(r=d(r,10),i=b(i,n=b(n,o,a,r,i,e[8],2400959708,15),o,a=d(a,10),r,e[12],2400959708,9),n,o=d(o,10),a,e[4],2400959708,8),n=b(n=d(n,10),o=b(o,a=b(a,r,i,n,o,e[13],2400959708,9),r,i=d(i,10),n,e[3],2400959708,14),a,r=d(r,10),i,e[7],2400959708,5),a=b(a=d(a,10),r=b(r,i=b(i,n,o,a,r,e[15],2400959708,6),n,o=d(o,10),a,e[14],2400959708,8),i,n=d(n,10),o,e[5],2400959708,6),i=y(i=d(i,10),n=b(n,o=b(o,a,r,i,n,e[6],2400959708,5),a,r=d(r,10),i,e[2],2400959708,12),o,a=d(a,10),r,e[4],2840853838,9),o=y(o=d(o,10),a=y(a,r=y(r,i,n,o,a,e[0],2840853838,15),i,n=d(n,10),o,e[5],2840853838,5),r,i=d(i,10),n,e[9],2840853838,11),r=y(r=d(r,10),i=y(i,n=y(n,o,a,r,i,e[7],2840853838,6),o,a=d(a,10),r,e[12],2840853838,8),n,o=d(o,10),a,e[2],2840853838,13),n=y(n=d(n,10),o=y(o,a=y(a,r,i,n,o,e[10],2840853838,12),r,i=d(i,10),n,e[14],2840853838,5),a,r=d(r,10),i,e[1],2840853838,12),a=y(a=d(a,10),r=y(r,i=y(i,n,o,a,r,e[3],2840853838,13),n,o=d(o,10),a,e[8],2840853838,14),i,n=d(n,10),o,e[11],2840853838,11),i=y(i=d(i,10),n=y(n,o=y(o,a,r,i,n,e[6],2840853838,8),a,r=d(r,10),i,e[15],2840853838,5),o,a=d(a,10),r,e[13],2840853838,6),o=d(o,10);var s=this._a,u=this._b,c=this._c,l=this._d,f=this._e;f=y(f,s=y(s,u,c,l,f,e[5],1352829926,8),u,c=d(c,10),l,e[14],1352829926,9),u=y(u=d(u,10),c=y(c,l=y(l,f,s,u,c,e[7],1352829926,9),f,s=d(s,10),u,e[0],1352829926,11),l,f=d(f,10),s,e[9],1352829926,13),l=y(l=d(l,10),f=y(f,s=y(s,u,c,l,f,e[2],1352829926,15),u,c=d(c,10),l,e[11],1352829926,15),s,u=d(u,10),c,e[4],1352829926,5),s=y(s=d(s,10),u=y(u,c=y(c,l,f,s,u,e[13],1352829926,7),l,f=d(f,10),s,e[6],1352829926,7),c,l=d(l,10),f,e[15],1352829926,8),c=y(c=d(c,10),l=y(l,f=y(f,s,u,c,l,e[8],1352829926,11),s,u=d(u,10),c,e[1],1352829926,14),f,s=d(s,10),u,e[10],1352829926,14),f=b(f=d(f,10),s=y(s,u=y(u,c,l,f,s,e[3],1352829926,12),c,l=d(l,10),f,e[12],1352829926,6),u,c=d(c,10),l,e[6],1548603684,9),u=b(u=d(u,10),c=b(c,l=b(l,f,s,u,c,e[11],1548603684,13),f,s=d(s,10),u,e[3],1548603684,15),l,f=d(f,10),s,e[7],1548603684,7),l=b(l=d(l,10),f=b(f,s=b(s,u,c,l,f,e[0],1548603684,12),u,c=d(c,10),l,e[13],1548603684,8),s,u=d(u,10),c,e[5],1548603684,9),s=b(s=d(s,10),u=b(u,c=b(c,l,f,s,u,e[10],1548603684,11),l,f=d(f,10),s,e[14],1548603684,7),c,l=d(l,10),f,e[15],1548603684,7),c=b(c=d(c,10),l=b(l,f=b(f,s,u,c,l,e[8],1548603684,12),s,u=d(u,10),c,e[12],1548603684,7),f,s=d(s,10),u,e[4],1548603684,6),f=b(f=d(f,10),s=b(s,u=b(u,c,l,f,s,e[9],1548603684,15),c,l=d(l,10),f,e[1],1548603684,13),u,c=d(c,10),l,e[2],1548603684,11),u=m(u=d(u,10),c=m(c,l=m(l,f,s,u,c,e[15],1836072691,9),f,s=d(s,10),u,e[5],1836072691,7),l,f=d(f,10),s,e[1],1836072691,15),l=m(l=d(l,10),f=m(f,s=m(s,u,c,l,f,e[3],1836072691,11),u,c=d(c,10),l,e[7],1836072691,8),s,u=d(u,10),c,e[14],1836072691,6),s=m(s=d(s,10),u=m(u,c=m(c,l,f,s,u,e[6],1836072691,6),l,f=d(f,10),s,e[9],1836072691,14),c,l=d(l,10),f,e[11],1836072691,12),c=m(c=d(c,10),l=m(l,f=m(f,s,u,c,l,e[8],1836072691,13),s,u=d(u,10),c,e[12],1836072691,5),f,s=d(s,10),u,e[2],1836072691,14),f=m(f=d(f,10),s=m(s,u=m(u,c,l,f,s,e[10],1836072691,13),c,l=d(l,10),f,e[0],1836072691,13),u,c=d(c,10),l,e[4],1836072691,7),u=v(u=d(u,10),c=v(c,l=m(l,f,s,u,c,e[13],1836072691,5),f,s=d(s,10),u,e[8],2053994217,15),l,f=d(f,10),s,e[6],2053994217,5),l=v(l=d(l,10),f=v(f,s=v(s,u,c,l,f,e[4],2053994217,8),u,c=d(c,10),l,e[1],2053994217,11),s,u=d(u,10),c,e[3],2053994217,14),s=v(s=d(s,10),u=v(u,c=v(c,l,f,s,u,e[11],2053994217,14),l,f=d(f,10),s,e[15],2053994217,6),c,l=d(l,10),f,e[0],2053994217,14),c=v(c=d(c,10),l=v(l,f=v(f,s,u,c,l,e[5],2053994217,6),s,u=d(u,10),c,e[12],2053994217,9),f,s=d(s,10),u,e[2],2053994217,12),f=v(f=d(f,10),s=v(s,u=v(u,c,l,f,s,e[13],2053994217,9),c,l=d(l,10),f,e[9],2053994217,12),u,c=d(c,10),l,e[7],2053994217,5),u=p(u=d(u,10),c=v(c,l=v(l,f,s,u,c,e[10],2053994217,15),f,s=d(s,10),u,e[14],2053994217,8),l,f=d(f,10),s,e[12],0,8),l=p(l=d(l,10),f=p(f,s=p(s,u,c,l,f,e[15],0,5),u,c=d(c,10),l,e[10],0,12),s,u=d(u,10),c,e[4],0,9),s=p(s=d(s,10),u=p(u,c=p(c,l,f,s,u,e[1],0,12),l,f=d(f,10),s,e[5],0,5),c,l=d(l,10),f,e[8],0,14),c=p(c=d(c,10),l=p(l,f=p(f,s,u,c,l,e[7],0,6),s,u=d(u,10),c,e[6],0,8),f,s=d(s,10),u,e[2],0,13),f=p(f=d(f,10),s=p(s,u=p(u,c,l,f,s,e[13],0,6),c,l=d(l,10),f,e[14],0,5),u,c=d(c,10),l,e[0],0,15),u=p(u=d(u,10),c=p(c,l=p(l,f,s,u,c,e[3],0,13),f,s=d(s,10),u,e[9],0,11),l,f=d(f,10),s,e[11],0,11),l=d(l,10);var h=this._b+n+l|0;this._b=this._c+o+f|0,this._c=this._d+a+s|0,this._d=this._e+r+u|0,this._e=this._a+i+c|0,this._a=h},i.prototype._digest=function(){this._block[this._blockOffset++]=128,56<this._blockOffset&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=new t(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},o.exports=i}).call(this,n("buffer").Buffer)},{buffer:49,"hash-base":87,inherits:103}],143:[function(e,t,r){var i=e("buffer"),n=i.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=i:(o(i,r),r.Buffer=a),o(n,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=n(e);return void 0!==t?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},{buffer:49}],144:[function(e,t,r){var l=e("safe-buffer").Buffer;function i(e,t){this._block=l.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=l.from(e,t));for(var r=this._block,i=this._blockSize,n=e.length,o=this._len,a=0;a<n;){for(var s=o%i,u=Math.min(n-a,i-s),c=0;c<u;c++)r[s+c]=e[a+c];a+=u,(o+=u)%i==0&&this._update(r)}return this._len+=n,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,1+t),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=4294967295&r,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},{"safe-buffer":143}],145:[function(e,t,r){(r=t.exports=function(e){e=e.toLowerCase();var t=r[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t}).sha=e("./sha"),r.sha1=e("./sha1"),r.sha224=e("./sha224"),r.sha256=e("./sha256"),r.sha384=e("./sha384"),r.sha512=e("./sha512")},{"./sha":146,"./sha1":147,"./sha224":148,"./sha256":149,"./sha384":150,"./sha512":151}],146:[function(e,t,r){var i=e("inherits"),n=e("./hash"),o=e("safe-buffer").Buffer,b=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function s(){this.init(),this._w=a,n.call(this,64,56)}i(s,n),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},s.prototype._update=function(e){for(var t,r,i,n,o,a,s=this._w,u=0|this._a,c=0|this._b,l=0|this._c,f=0|this._d,h=0|this._e,d=0;d<16;++d)s[d]=e.readInt32BE(4*d);for(;d<80;++d)s[d]=s[d-3]^s[d-8]^s[d-14]^s[d-16];for(var p=0;p<80;++p){var v=~~(p/20),m=0|((a=u)<<5|a>>>27)+(i=c,n=l,o=f,0===(r=v)?i&n|~i&o:2===r?i&n|i&o|n&o:i^n^o)+h+s[p]+b[v];h=f,f=l,l=(t=c)<<30|t>>>2,c=u,u=m}this._a=u+this._a|0,this._b=c+this._b|0,this._c=l+this._c|0,this._d=f+this._d|0,this._e=h+this._e|0},s.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=s},{"./hash":144,inherits:103,"safe-buffer":143}],147:[function(e,t,r){var i=e("inherits"),n=e("./hash"),o=e("safe-buffer").Buffer,y=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function s(){this.init(),this._w=a,n.call(this,64,56)}i(s,n),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},s.prototype._update=function(e){for(var t,r,i,n,o,a,s,u=this._w,c=0|this._a,l=0|this._b,f=0|this._c,h=0|this._d,d=0|this._e,p=0;p<16;++p)u[p]=e.readInt32BE(4*p);for(;p<80;++p)u[p]=(t=u[p-3]^u[p-8]^u[p-14]^u[p-16])<<1|t>>>31;for(var v=0;v<80;++v){var m=~~(v/20),b=0|((s=c)<<5|s>>>27)+(n=l,o=f,a=h,0===(i=m)?n&o|~n&a:2===i?n&o|n&a|o&a:n^o^a)+d+u[v]+y[m];d=h,h=f,f=(r=l)<<30|r>>>2,l=c,c=b}this._a=c+this._a|0,this._b=l+this._b|0,this._c=f+this._c|0,this._d=h+this._d|0,this._e=d+this._e|0},s.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=s},{"./hash":144,inherits:103,"safe-buffer":143}],148:[function(e,t,r){var i=e("inherits"),n=e("./sha256"),o=e("./hash"),a=e("safe-buffer").Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}i(u,n),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=u},{"./hash":144,"./sha256":149,inherits:103,"safe-buffer":143}],149:[function(e,t,r){var i=e("inherits"),n=e("./hash"),o=e("safe-buffer").Buffer,w=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function s(){this.init(),this._w=a,n.call(this,64,56)}i(s,n),s.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},s.prototype._update=function(e){for(var t,r,i,n,o,a,s,u=this._w,c=0|this._a,l=0|this._b,f=0|this._c,h=0|this._d,d=0|this._e,p=0|this._f,v=0|this._g,m=0|this._h,b=0;b<16;++b)u[b]=e.readInt32BE(4*b);for(;b<64;++b)u[b]=0|(((r=u[b-2])>>>17|r<<15)^(r>>>19|r<<13)^r>>>10)+u[b-7]+(((t=u[b-15])>>>7|t<<25)^(t>>>18|t<<14)^t>>>3)+u[b-16];for(var y=0;y<64;++y){var g=m+(((s=d)>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+((a=v)^d&(p^a))+w[y]+u[y]|0,_=0|(((o=c)>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+((i=c)&(n=l)|f&(i|n));m=v,v=p,p=d,d=h+g|0,h=f,f=l,l=c,c=g+_|0}this._a=c+this._a|0,this._b=l+this._b|0,this._c=f+this._c|0,this._d=h+this._d|0,this._e=d+this._e|0,this._f=p+this._f|0,this._g=v+this._g|0,this._h=m+this._h|0},s.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=s},{"./hash":144,inherits:103,"safe-buffer":143}],150:[function(e,t,r){var i=e("inherits"),n=e("./sha512"),o=e("./hash"),a=e("safe-buffer").Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}i(u,n),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var i=a.allocUnsafe(48);function e(e,t,r){i.writeInt32BE(e,r),i.writeInt32BE(t,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),i},t.exports=u},{"./hash":144,"./sha512":151,inherits:103,"safe-buffer":143}],151:[function(e,t,r){var i=e("inherits"),n=e("./hash"),o=e("safe-buffer").Buffer,ee=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function s(){this.init(),this._w=a,n.call(this,128,112)}function te(e,t,r){return r^e&(t^r)}function re(e,t,r){return e&t|r&(e|t)}function ie(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function ne(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function oe(e,t){return e>>>0<t>>>0?1:0}i(s,n),s.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},s.prototype._update=function(e){for(var t,r,i,n,o,a,s,u,c=this._w,l=0|this._ah,f=0|this._bh,h=0|this._ch,d=0|this._dh,p=0|this._eh,v=0|this._fh,m=0|this._gh,b=0|this._hh,y=0|this._al,g=0|this._bl,_=0|this._cl,w=0|this._dl,x=0|this._el,T=0|this._fl,S=0|this._gl,M=0|this._hl,P=0;P<32;P+=2)c[P]=e.readInt32BE(4*P),c[P+1]=e.readInt32BE(4*P+4);for(;P<160;P+=2){var E=c[P-30],k=c[P-30+1],C=((s=E)>>>1|(u=k)<<31)^(s>>>8|u<<24)^s>>>7,A=((o=k)>>>1|(a=E)<<31)^(o>>>8|a<<24)^(o>>>7|a<<25);E=c[P-4],k=c[P-4+1];var O=((i=E)>>>19|(n=k)<<13)^(n>>>29|i<<3)^i>>>6,I=((t=k)>>>19|(r=E)<<13)^(r>>>29|t<<3)^(t>>>6|r<<26),R=c[P-14],D=c[P-14+1],L=c[P-32],j=c[P-32+1],F=A+D|0,B=C+R+oe(F,A)|0;B=(B=B+O+oe(F=F+I|0,I)|0)+L+oe(F=F+j|0,j)|0,c[P]=B,c[P+1]=F}for(var N=0;N<160;N+=2){B=c[N],F=c[N+1];var U=re(l,f,h),z=re(y,g,_),X=ie(l,y),W=ie(y,l),q=ne(p,x),H=ne(x,p),G=ee[N],V=ee[N+1],Y=te(p,v,m),J=te(x,T,S),K=M+H|0,Z=b+q+oe(K,M)|0;Z=(Z=(Z=Z+Y+oe(K=K+J|0,J)|0)+G+oe(K=K+V|0,V)|0)+B+oe(K=K+F|0,F)|0;var Q=W+z|0,$=X+U+oe(Q,W)|0;b=m,M=S,m=v,S=T,v=p,T=x,p=d+Z+oe(x=w+K|0,w)|0,d=h,w=_,h=f,_=g,f=l,g=y,l=Z+$+oe(y=K+Q|0,K)|0}this._al=this._al+y|0,this._bl=this._bl+g|0,this._cl=this._cl+_|0,this._dl=this._dl+w|0,this._el=this._el+x|0,this._fl=this._fl+T|0,this._gl=this._gl+S|0,this._hl=this._hl+M|0,this._ah=this._ah+l+oe(this._al,y)|0,this._bh=this._bh+f+oe(this._bl,g)|0,this._ch=this._ch+h+oe(this._cl,_)|0,this._dh=this._dh+d+oe(this._dl,w)|0,this._eh=this._eh+p+oe(this._el,x)|0,this._fh=this._fh+v+oe(this._fl,T)|0,this._gh=this._gh+m+oe(this._gl,S)|0,this._hh=this._hh+b+oe(this._hl,M)|0},s.prototype._hash=function(){var i=o.allocUnsafe(64);function e(e,t,r){i.writeInt32BE(e,r),i.writeInt32BE(t,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),i},t.exports=s},{"./hash":144,inherits:103,"safe-buffer":143}],152:[function(e,t,r){t.exports=i;var l=e("events").EventEmitter;function i(){l.call(this)}e("inherits")(i,l),i.Readable=e("readable-stream/readable.js"),i.Writable=e("readable-stream/writable.js"),i.Duplex=e("readable-stream/duplex.js"),i.Transform=e("readable-stream/transform.js"),i.PassThrough=e("readable-stream/passthrough.js"),(i.Stream=i).prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function n(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",n),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",s));var o=!1;function a(){o||(o=!0,t.end())}function s(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function u(e){if(c(),0===l.listenerCount(this,"error"))throw e}function c(){r.removeListener("data",i),t.removeListener("drain",n),r.removeListener("end",a),r.removeListener("close",s),r.removeListener("error",u),t.removeListener("error",u),r.removeListener("end",c),r.removeListener("close",c),t.removeListener("close",c)}return r.on("error",u),t.on("error",u),r.on("end",c),r.on("close",c),t.on("close",c),t.emit("pipe",r),t}},{events:85,inherits:103,"readable-stream/duplex.js":132,"readable-stream/passthrough.js":138,"readable-stream/readable.js":139,"readable-stream/transform.js":140,"readable-stream/writable.js":141}],153:[function(e,t,r){var i=e("buffer").Buffer,n=i.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};var o=r.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!n(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=s;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=u;break;default:return void(this.write=a)}this.charBuffer=new i(6),this.charReceived=0,this.charLength=0};function a(e){return e.toString(this.encoding)}function s(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function u(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}o.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";if(e=e.slice(r,e.length),!(55296<=(n=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))&&n<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var i=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived);var n;i=(t+=e.toString(this.encoding,0,i)).length-1;if(55296<=(n=t.charCodeAt(i))&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,i)}return t},o.prototype.detectIncompleteChar=function(e){for(var t=3<=e.length?3:e.length;0<t;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},o.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,i=this.charBuffer,n=this.encoding;t+=i.slice(0,r).toString(n)}return t}},{buffer:49}],154:[function(e,t,r){(function(r){function i(e){try{if(!r.localStorage)return!1}catch(e){return!1}var t=r.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}t.exports=function(e,t){if(i("noDeprecation"))return e;var r=!1;return function(){if(!r){if(i("throwDeprecation"))throw new Error(t);i("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],155:[function(require,module,exports){var indexOf=require("indexof"),Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in e)t.push(r);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r<e.length;r++)t(e[r],r,e)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(e,t,r){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch(e){return function(e,t,r){e[t]=r}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e);this.code=e};Script.prototype.runInContext=function(t){if(!(t instanceof Context))throw new TypeError("needs a 'context' argument.");var e=document.createElement("iframe");e.style||(e.style={}),e.style.display="none",document.body.appendChild(e);var r=e.contentWindow,i=r.eval,n=r.execScript;!i&&n&&(n.call(r,"null"),i=r.eval),forEach(Object_keys(t),function(e){r[e]=t[e]}),forEach(globals,function(e){t[e]&&(r[e]=t[e])});var o=Object_keys(r),a=i.call(r,this.code);return forEach(Object_keys(r),function(e){(e in t||-1===indexOf(o,e))&&(t[e]=r[e])}),forEach(globals,function(e){e in t||defineProp(t,e,r[e])}),document.body.removeChild(e),a},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(t){var r=Script.createContext(t),e=this.runInContext(r);return forEach(Object_keys(r),function(e){t[e]=r[e]}),e},forEach(Object_keys(Script.prototype),function(r){exports[r]=Script[r]=function(e){var t=Script(e);return t[r].apply(t,[].slice.call(arguments,1))}}),exports.createScript=function(e){return exports.Script(e)},exports.createContext=Script.createContext=function(t){var r=new Context;return"object"==typeof t&&forEach(Object_keys(t),function(e){r[e]=t[e]}),r}},{indexof:102}],156:[function(e,t,r){function f(e,t,r,i,n,o,a){f.prototype.init.apply(this,arguments)}function i(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}function h(e,t,r){switch(e){case d:case c:case ue:return(t+3>>2)*(r+3>>2)*8;case p:case v:case l:case m:return(t+3>>2)*(r+3>>2)*16;case ne:case ae:return Math.floor((Math.max(t,8)*Math.max(r,8)*4+7)/8);case oe:case se:return Math.floor((Math.max(t,16)*Math.max(r,8)*2+7)/8);case b:case n:return Math.floor((t+3)/4)*Math.floor((r+3)/4)*16;case y:case o:return Math.floor((t+4)/5)*Math.floor((r+3)/4)*16;case g:case a:return Math.floor((t+4)/5)*Math.floor((r+4)/5)*16;case _:case s:return Math.floor((t+5)/6)*Math.floor((r+4)/5)*16;case w:case u:return Math.floor((t+5)/6)*Math.floor((r+5)/6)*16;case x:case O:return Math.floor((t+7)/8)*Math.floor((r+4)/5)*16;case T:case I:return Math.floor((t+7)/8)*Math.floor((r+5)/6)*16;case S:case R:return Math.floor((t+7)/8)*Math.floor((r+7)/8)*16;case M:case D:return Math.floor((t+9)/10)*Math.floor((r+4)/5)*16;case P:case L:return Math.floor((t+9)/10)*Math.floor((r+5)/6)*16;case E:case j:return Math.floor((t+9)/10)*Math.floor((r+7)/8)*16;case k:case F:return Math.floor((t+9)/10)*Math.floor((r+9)/10)*16;case C:case B:return Math.floor((t+11)/12)*Math.floor((r+9)/10)*16;case A:case N:return Math.floor((t+11)/12)*Math.floor((r+11)/12)*16;default:return 0}}(t.exports=f).prototype.init=function(e,t,r,i,n,o,a,s){this.src=e,this.width=i,this.height=n,this.data=t,this.type=r,this.levels=o,this.internalFormat=a,this.isCompressedImage=!0,this.crunch=s,this.preserveSource=!0;var u=this.complete;return this.complete=!!t,!u&&this.complete&&this.onload&&this.onload({target:this}),this},f.prototype.dispose=function(){this.data=null},f.prototype.generateWebGLTexture=function(e){if(null===this.data)throw"Trying to create a second (or more) webgl texture from the same CompressedImage : "+this.src;for(var t=this.width,r=this.height,i=this.levels,n=0,o=0;o<this.levels;++o){var a=h(this.internalFormat,t,r),s=new Uint8Array(this.data.buffer,this.data.byteOffset+n,a);e.compressedTexImage2D(e.TEXTURE_2D,o,this.internalFormat,t,r,0,s),(t>>=1)<1&&(t=1),(r>>=1)<1&&(r=1),n+=a}1<i?(e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_NEAREST)):(e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR)),this.crunch&&(Module._free(this.crunch[0]),Module._free(this.crunch[1])),this.preserveSource||(this.data=null)},f.loadFromArrayBuffer=function(e,t){return new f(t).loadFromArrayBuffer(e)},f.prototype.loadFromArrayBuffer=function(e,t){var r=new Uint8Array(e,0,3);if(r[0]=="DDS".charCodeAt(0)&&r[1]=="DDS".charCodeAt(1)&&r[2]=="DDS".charCodeAt(2))return this._loadDDS(e);if(r[0]=="PVR".charCodeAt(0)&&r[1]=="PVR".charCodeAt(1)&&r[2]=="PVR".charCodeAt(2))return this._loadPVR(e);if(19==r[0]&&171==r[1]&&161==r[2])return this._loadASTC(e);if(t)return this._loadCRN(e);throw"Compressed texture format is not recognized: "+this.src},f.prototype.arrayBufferCopy=function(e,t,r,i){dst32Offset=r/4;for(var n=i%4,o=new Uint32Array(e.buffer,0,(i-n)/4),a=new Uint32Array(t.buffer),s=0;s<o.length;s++)a[dst32Offset+s]=o[s];for(var u=i-n;u<i;u++)t[r+u]=e[u]},f.prototype._loadCRN=function(e){DXT_FORMAT_MAP=[d,p,v];var t=e.byteLength,r=new Uint8Array(e),i=Module._malloc(t);f.prototype.arrayBufferCopy(r,Module.HEAPU8,i,t);var n=Module._crn_get_width(i,t),o=Module._crn_get_height(i,t),a=Module._crn_get_levels(i,t),s=Module._crn_get_dxt_format(i,t),u=Module._crn_get_uncompressed_size(i,t,0),c=Module._malloc(u);Module._crn_decompress(i,t,c,u,0);var l=new Uint8Array(Module.HEAPU8.buffer,c,u);return this.init(this.src,l,"CRN",n,o,a,DXT_FORMAT_MAP[s],[i,c])},f.prototype._loadDDS=function(e){var t=new Int32Array(e,0,W);if(t[q]!=U)throw"Invalid magic number in DDS header";if(!t[K]&X)throw"Unsupported format, must contain a FourCC code";var r,i=t[Z];switch(i){case Q:r=d;break;case $:r=p;break;case ee:r=v;break;case te:r=c;break;case re:r=l;break;case ie:r=m;break;default:throw"Unsupported FourCC code: "+function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)}var n=1;t[G]&z&&(n=Math.max(1,t[J]));var o=t[Y],a=t[V],s=t[H]+4,u=new Uint8Array(e,s);return this.init(this.src,u,"DDS",o,a,n,r)},f.prototype._loadASTC=function(e){var t=new Int8Array(e,0,Me);if(new Uint32Array(e.slice(0,4))!=Pe)throw"Invalid magic number in ASTC header";for(var r=[b,y,g,_,w,x,T,S,M,P,E,k,C,A],i=e.byteLength-Me,n=new Uint8Array([t[7],t[8],t[9],0]),o=new Uint8Array([t[10],t[11],t[12],0]),a=new Uint32Array(n.buffer)[0],s=new Uint32Array(o.buffer)[0],u=0,c=0;c<r.length;c++)if(i===h(r[c],a,s)){u=r[c];break}if(0===u)throw"Unable to autodetect ASTC format; file size not right";var l=new Uint8Array(e,Me,i);return this.init(this.src,l,"ASTC",a,s,1,u)},f.prototype._loadPVR=function(e){var t=new Int32Array(e,0,be);if(t[ge]!=ye)throw"Invalid magic number in PVR header";var r,i=t[_e];switch(i){case ce:r=oe;break;case le:r=se;break;case fe:r=ne;break;case he:r=ae;break;case de:r=ue;break;case pe:r=d;break;case ve:r=p;break;case me:r=v;break;default:throw"Unsupported PVR format: "+i}var n=t[xe],o=t[we],a=t[Te],s=t[Se]+52,u=new Uint8Array(e,s);return this.init(this.src,u,"PVR",n,o,a,r)};var d=33776,p=33778,v=33779,c=35986,l=35987,m=34798,b=37808,y=37809,g=37810,_=37811,w=37812,x=37813,T=37814,S=37815,M=37816,P=37817,E=37818,k=37819,C=37820,A=37821,n=37840,o=37841,a=37842,s=37843,u=37844,O=37845,I=37846,R=37847,D=37848,L=37849,j=37850,F=37851,B=37852,N=37853,U=542327876,z=131072,X=4,W=31,q=0,H=1,G=2,V=3,Y=4,J=7,K=20,Z=21,Q=i("DXT1"),$=i("DXT3"),ee=i("DXT5"),te=i("ATC "),re=i("ATCA"),ie=i("ATCI"),ne=35840,oe=35841,ae=35842,se=35843,ue=36196,ce=0,le=1,fe=2,he=3,de=6,pe=7,ve=9,me=5,be=13,ye=55727696,ge=0,_e=2,we=6,xe=7,Te=11,Se=12,Me=16,Pe=1554098963},{}],157:[function(e,t,r){var i=PIXI,n=(e("./CompressedImage"),i.WebGLManager);function o(e){n.call(this,e),this.extensions={}}((o.prototype=Object.create(n.prototype)).constructor=o).prototype.onContextChange=function(){var e=this.renderer.gl;function t(e,t){var r=["","WEBKIT_","MOZ_"],i=null;for(var n in r)if(i=e.getExtension(r[n]+t))break;return i}this.extensions={dxt:t(e,"WEBGL_compressed_texture_s3tc"),pvrtc:t(e,"WEBGL_compressed_texture_pvrtc"),astc:t(e,"WEBGL_compressed_texture_astc"),atc:t(e,"WEBGL_compressed_texture_atc"),etc1:t(e,"WEBGL_compressed_texture_etc1")},this.extensions.crn=this.extensions.dxt},t.exports=o,i.WebGLRenderer.registerPlugin("compressedTextureManager",o),o.prototype.getSupportedExtensions=function(){return this.extensions}},{"./CompressedImage":156}],158:[function(e,t,r){var i=e("./CompressedImage"),n={uploadNotCompressed:PIXI.glCore.GLTexture.prototype.upload,isCompressed:!1,upload:function(e){if(!(e instanceof i))return this.uploadNotCompressed(e);this.bind();var t=this.gl;t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),this.isCompressed=!0,e.generateWebGLTexture(t)},enableMipmap:function(){if(!this.isCompressed){var e=this.gl;this.bind(),this.mipmap=!0,e.generateMipmap(e.TEXTURE_2D)}}};t.exports=n},{"./CompressedImage":156}],159:[function(e,t,r){t.exports=function(u){u=u||[];var c=e("./imageParser")();return function(e,t){var r=e.metadata.choice;if(!r)return t();var i=e.url,n=0;if(!e._defaultUrlChoice){if(!(0<=(n=(e._defaultUrlChoice=i).lastIndexOf("."))))return t();e._baseUrl=i.substring(0,n)}for(var o=r.length-1;0<=o;o--){i=e._baseUrl+r[o];for(var a=0;a<u.length;a++)if(r[o]===u[a]){e.url=i;var s=r[o];return-1<s.indexOf("@")&&(s=s.replace(/@[0-9.]*x/,"")),0<=(n=s.indexOf("."))&&(s=s.substring(n+1)),e.extension=s,e.loadType=e._determineLoadType(),c(e,t)}}return c(e,t)}}},{"./imageParser":161}],160:[function(e,t,r){var n=PIXI,o=n.utils;e("./CompressedImage");t.exports=function(e){return function(e,t){if(e.texture&&e._defaultUrlChoice&&e._defaultUrl!=e.url){var r=e.texture,i=r.baseTexture;delete o.BaseTextureCache[i.imageUrl],delete o.TextureCache[i.imageUrl],i.imageUrl=e._defaultUrlChoice,n.utils.BaseTextureCache[i.imageUrl]=i,n.utils.TextureCache[i.imageUrl]=r}t()}}},{"./CompressedImage":156}],161:[function(e,t,r){var i=PIXI,n=(i.utils,e("./CompressedImage")),o=i.loaders.Resource;o.setExtensionXhrType("dds",o.XHR_RESPONSE_TYPE.BUFFER),o.setExtensionXhrType("crn",o.XHR_RESPONSE_TYPE.BUFFER),o.setExtensionXhrType("pvr",o.XHR_RESPONSE_TYPE.BUFFER),o.setExtensionXhrType("etc1",o.XHR_RESPONSE_TYPE.BUFFER),o.setExtensionXhrType("astc",o.XHR_RESPONSE_TYPE.BUFFER),t.exports=function(){return function(e,t){if(-1!=e.url.indexOf(".crn")||-1!=e.url.indexOf(".dds")||-1!=e.url.indexOf(".pvr")||-1!=e.url.indexOf(".etc1")||-1!=e.url.indexOf(".astc")){var r=e.compressedImage||new n(e.url);if(e.data)throw"compressedImageParser middleware must be specified in loader.before() and must have zero resource.data";e.isCompressedImage=!0,e.data=r,e.onComplete.add(function(){e.type=o.TYPE.IMAGE,r.loadFromArrayBuffer(e.data,e.url.includes(".crn")),e.data=r})}t()}}},{"./CompressedImage":156}],162:[function(r,i,e){(function(e){var t={CompressedImage:r("./CompressedImage"),CompressedTextureManager:r("./CompressedTextureManager"),imageParser:r("./imageParser"),extensionChooser:r("./extensionChooser"),extensionFixer:r("./extensionFixer"),GLTextureMixin:r("./GLTextureMixin"),detectExtensions:function(e,t){var r=[];if(e instanceof PIXI.WebGLRenderer){var i=e.plugins.compressedTextureManager.getSupportedExtensions();i.dxt&&r.push(".dds"),i.pvrtc&&r.push(".pvr"),i.atc&&r.push(".atc"),i.astc&&r.push(".astc"),i.etc1&&r.push(".etc1")}else PIXI.CanvasRenderer;for(var n="@"+(t=t||e.resolution)+"x",o=r.slice(0);0<o.length;)r.push(n+o.pop());return r.push(n+".png"),r.push(n+".jpg"),r.push(n+".json"),r.push(n+".atlas"),r}};try{t.crn=r("./../lib/crn_decomp")}catch(e){console.warn("Unable to load crn decompression in pixi-compressed-textures")}Object.assign(PIXI.glCore.GLTexture.prototype,t.GLTextureMixin),PIXI.loaders.Loader.addPixiMiddleware(t.extensionFixer),PIXI.loader.use(t.extensionFixer()),i.exports=e.PIXI.compressedTextures=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./../lib/crn_decomp":1,"./CompressedImage":156,"./CompressedTextureManager":157,"./GLTextureMixin":158,"./extensionChooser":159,"./extensionFixer":160,"./imageParser":161}]},{},[162])(162)});var __filters=function(e,h){"use strict";var r="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",t=function(t){function e(e){t.call(this,r,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float gamma;\nuniform float contrast;\nuniform float saturation;\nuniform float brightness;\nuniform float red;\nuniform float green;\nuniform float blue;\nuniform float alpha;\n\nvoid main(void)\n{\n vec4 c = texture2D(uSampler, vTextureCoord);\n\n if (c.a > 0.0) {\n c.rgb /= c.a;\n\n vec3 rgb = pow(c.rgb, vec3(1. / gamma));\n rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, saturation), contrast);\n rgb.r *= red;\n rgb.g *= green;\n rgb.b *= blue;\n c.rgb = rgb * brightness;\n\n c.rgb *= c.a;\n }\n\n gl_FragColor = c * alpha;\n}\n"),Object.assign(this,{gamma:1,saturation:1,contrast:1,brightness:1,red:1,green:1,blue:1,alpha:1},e)}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.apply=function(e,t,r,i){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,e.applyFilter(this,t,r,i)},e}(h.Filter),d=function(i){function e(e,t,r){void 0===e&&(e=4),void 0===t&&(t=3),void 0===r&&(r=!1),i.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",r?"\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec2 uOffset;\nuniform vec4 filterClamp;\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n\n // Sample top left pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Sample top right pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Sample bottom right pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Sample bottom left pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Average\n color *= 0.25;\n\n gl_FragColor = color;\n}\n":"\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec2 uOffset;\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n\n // Sample top left pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y));\n\n // Sample top right pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y));\n\n // Sample bottom right pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y));\n\n // Sample bottom left pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y));\n\n // Average\n color *= 0.25;\n\n gl_FragColor = color;\n}"),this.uniforms.uOffset=new Float32Array(2),this._pixelSize=new h.Point,this.pixelSize=1,this._clamp=r,this._kernels=null,Array.isArray(e)?this.kernels=e:(this._blur=e,this.quality=t)}i&&(e.__proto__=i);var t={kernels:{configurable:!0},clamp:{configurable:!0},pixelSize:{configurable:!0},quality:{configurable:!0},blur:{configurable:!0}};return((e.prototype=Object.create(i&&i.prototype)).constructor=e).prototype.apply=function(e,t,r,i){var n,o=this.pixelSize.x/t.size.width,a=this.pixelSize.y/t.size.height;if(1===this._quality||0===this._blur)n=this._kernels[0]+.5,this.uniforms.uOffset[0]=n*o,this.uniforms.uOffset[1]=n*a,e.applyFilter(this,t,r,i);else{for(var s,u=e.getRenderTarget(!0),c=t,l=u,f=this._quality-1,h=0;h<f;h++)n=this._kernels[h]+.5,this.uniforms.uOffset[0]=n*o,this.uniforms.uOffset[1]=n*a,e.applyFilter(this,c,l,!0),s=c,c=l,l=s;n=this._kernels[f]+.5,this.uniforms.uOffset[0]=n*o,this.uniforms.uOffset[1]=n*a,e.applyFilter(this,c,r,i),e.returnRenderTarget(u)}},e.prototype._generateKernels=function(){var e=this._blur,t=this._quality,r=[e];if(0<e)for(var i=e,n=e/t,o=1;o<t;o++)i-=n,r.push(i);this._kernels=r},t.kernels.get=function(){return this._kernels},t.kernels.set=function(e){Array.isArray(e)&&0<e.length?(this._kernels=e,this._quality=e.length,this._blur=Math.max.apply(Math,e)):(this._kernels=[0],this._quality=1)},t.clamp.get=function(){return this._clamp},t.pixelSize.set=function(e){"number"==typeof e?(this._pixelSize.x=e,this._pixelSize.y=e):Array.isArray(e)?(this._pixelSize.x=e[0],this._pixelSize.y=e[1]):e instanceof h.Point?(this._pixelSize.x=e.x,this._pixelSize.y=e.y):(this._pixelSize.x=1,this._pixelSize.y=1)},t.pixelSize.get=function(){return this._pixelSize},t.quality.get=function(){return this._quality},t.quality.set=function(e){this._quality=Math.max(1,Math.round(e)),this._generateKernels()},t.blur.get=function(){return this._blur},t.blur.set=function(e){this._blur=e,this._generateKernels()},Object.defineProperties(e.prototype,t),e}(h.Filter),s=r,u=function(t){function e(e){void 0===e&&(e=.5),t.call(this,s,"\nuniform sampler2D uSampler;\nvarying vec2 vTextureCoord;\n\nuniform float threshold;\n\nvoid main() {\n vec4 color = texture2D(uSampler, vTextureCoord);\n\n // A simple & fast algorithm for getting brightness.\n // It's inaccuracy , but good enought for this feature.\n float _max = max(max(color.r, color.g), color.b);\n float _min = min(min(color.r, color.g), color.b);\n float brightness = (_max + _min) * 0.5;\n\n if(brightness > threshold) {\n gl_FragColor = color;\n } else {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n}\n"),this.threshold=e}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={threshold:{configurable:!0}};return r.threshold.get=function(){return this.uniforms.threshold},r.threshold.set=function(e){this.uniforms.threshold=e},Object.defineProperties(e.prototype,r),e}(h.Filter),i=function(a){function e(e){a.call(this,s,"uniform sampler2D uSampler;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D bloomTexture;\nuniform float bloomScale;\nuniform float brightness;\n\nvoid main() {\n vec4 color = texture2D(uSampler, vTextureCoord);\n color.rgb *= brightness;\n vec4 bloomColor = vec4(texture2D(bloomTexture, vTextureCoord).rgb, 0.0);\n bloomColor.rgb *= bloomScale;\n gl_FragColor = color + bloomColor;\n}\n"),"number"==typeof e&&(e={threshold:e}),e=Object.assign({threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:h.settings.RESOLUTION},e),this.bloomScale=e.bloomScale,this.brightness=e.brightness;var t=e.kernels,r=e.blur,i=e.quality,n=e.pixelSize,o=e.resolution;this._extractFilter=new u(e.threshold),this._extractFilter.resolution=o,this._blurFilter=t?new d(t):new d(r,i),this.pixelSize=n,this.resolution=o}a&&(e.__proto__=a);var t={resolution:{configurable:!0},threshold:{configurable:!0},kernels:{configurable:!0},blur:{configurable:!0},quality:{configurable:!0},pixelSize:{configurable:!0}};return((e.prototype=Object.create(a&&a.prototype)).constructor=e).prototype.apply=function(e,t,r,i,n){var o=e.getRenderTarget(!0);this._extractFilter.apply(e,t,o,!0,n);var a=e.getRenderTarget(!0);this._blurFilter.apply(e,o,a,!0,n),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=a,e.applyFilter(this,t,r,i),e.returnRenderTarget(a),e.returnRenderTarget(o)},t.resolution.get=function(){return this._resolution},t.resolution.set=function(e){this._resolution=e,this._extractFilter&&(this._extractFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)},t.threshold.get=function(){return this._extractFilter.threshold},t.threshold.set=function(e){this._extractFilter.threshold=e},t.kernels.get=function(){return this._blurFilter.kernels},t.kernels.set=function(e){this._blurFilter.kernels=e},t.blur.get=function(){return this._blurFilter.blur},t.blur.set=function(e){this._blurFilter.blur=e},t.quality.get=function(){return this._blurFilter.quality},t.quality.set=function(e){this._blurFilter.quality=e},t.pixelSize.get=function(){return this._blurFilter.pixelSize},t.pixelSize.set=function(e){this._blurFilter.pixelSize=e},Object.defineProperties(e.prototype,t),e}(h.Filter),n=function(t){function e(e){void 0===e&&(e=8),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\n\nuniform vec4 filterArea;\nuniform float pixelSize;\nuniform sampler2D uSampler;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvec2 pixelate(vec2 coord, vec2 size)\n{\n return floor( coord / size ) * size;\n}\n\nvec2 getMod(vec2 coord, vec2 size)\n{\n return mod( coord , size) / size;\n}\n\nfloat character(float n, vec2 p)\n{\n p = floor(p*vec2(4.0, -4.0) + 2.5);\n\n if (clamp(p.x, 0.0, 4.0) == p.x)\n {\n if (clamp(p.y, 0.0, 4.0) == p.y)\n {\n if (int(mod(n/exp2(p.x + 5.0*p.y), 2.0)) == 1) return 1.0;\n }\n }\n return 0.0;\n}\n\nvoid main()\n{\n vec2 coord = mapCoord(vTextureCoord);\n\n // get the rounded color..\n vec2 pixCoord = pixelate(coord, vec2(pixelSize));\n pixCoord = unmapCoord(pixCoord);\n\n vec4 color = texture2D(uSampler, pixCoord);\n\n // determine the character to use\n float gray = (color.r + color.g + color.b) / 3.0;\n\n float n = 65536.0; // .\n if (gray > 0.2) n = 65600.0; // :\n if (gray > 0.3) n = 332772.0; // *\n if (gray > 0.4) n = 15255086.0; // o\n if (gray > 0.5) n = 23385164.0; // &\n if (gray > 0.6) n = 15252014.0; // 8\n if (gray > 0.7) n = 13199452.0; // @\n if (gray > 0.8) n = 11512810.0; // #\n\n // get the mod..\n vec2 modd = getMod(coord, vec2(pixelSize));\n\n gl_FragColor = color * character( n, vec2(-1.0) + modd * 2.0);\n\n}\n"),this.size=e}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={size:{configurable:!0}};return r.size.get=function(){return this.uniforms.pixelSize},r.size.set=function(e){this.uniforms.pixelSize=e},Object.defineProperties(e.prototype,r),e}(h.Filter),o=function(t){function e(e){void 0===e&&(e={}),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","precision mediump float;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\nuniform float transformX;\nuniform float transformY;\nuniform vec3 lightColor;\nuniform float lightAlpha;\nuniform vec3 shadowColor;\nuniform float shadowAlpha;\n\nvoid main(void) {\n vec2 transform = vec2(1.0 / filterArea) * vec2(transformX, transformY);\n vec4 color = texture2D(uSampler, vTextureCoord);\n float light = texture2D(uSampler, vTextureCoord - transform).a;\n float shadow = texture2D(uSampler, vTextureCoord + transform).a;\n\n color.rgb = mix(color.rgb, lightColor, clamp((color.a - light) * lightAlpha, 0.0, 1.0));\n color.rgb = mix(color.rgb, shadowColor, clamp((color.a - shadow) * shadowAlpha, 0.0, 1.0));\n gl_FragColor = vec4(color.rgb * color.a, color.a);\n}\n"),this.uniforms.lightColor=new Float32Array(3),this.uniforms.shadowColor=new Float32Array(3),e=Object.assign({rotation:45,thickness:2,lightColor:16777215,lightAlpha:.7,shadowColor:0,shadowAlpha:.7},e),this.rotation=e.rotation,this.thickness=e.thickness,this.lightColor=e.lightColor,this.lightAlpha=e.lightAlpha,this.shadowColor=e.shadowColor,this.shadowAlpha=e.shadowAlpha}t&&(e.__proto__=t);var r={rotation:{configurable:!0},thickness:{configurable:!0},lightColor:{configurable:!0},lightAlpha:{configurable:!0},shadowColor:{configurable:!0},shadowAlpha:{configurable:!0}};return((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype._updateTransform=function(){this.uniforms.transformX=this._thickness*Math.cos(this._angle),this.uniforms.transformY=this._thickness*Math.sin(this._angle)},r.rotation.get=function(){return this._angle/h.DEG_TO_RAD},r.rotation.set=function(e){this._angle=e*h.DEG_TO_RAD,this._updateTransform()},r.thickness.get=function(){return this._thickness},r.thickness.set=function(e){this._thickness=e,this._updateTransform()},r.lightColor.get=function(){return h.utils.rgb2hex(this.uniforms.lightColor)},r.lightColor.set=function(e){h.utils.hex2rgb(e,this.uniforms.lightColor)},r.lightAlpha.get=function(){return this.uniforms.lightAlpha},r.lightAlpha.set=function(e){this.uniforms.lightAlpha=e},r.shadowColor.get=function(){return h.utils.rgb2hex(this.uniforms.shadowColor)},r.shadowColor.set=function(e){h.utils.hex2rgb(e,this.uniforms.shadowColor)},r.shadowAlpha.get=function(){return this.uniforms.shadowAlpha},r.shadowAlpha.set=function(e){this.uniforms.shadowAlpha=e},Object.defineProperties(e.prototype,r),e}(h.Filter),a=h.filters,c=a.BlurXFilter,l=a.BlurYFilter,f=a.AlphaFilter,p=function(a){function e(e,t,r,i){var n,o;void 0===e&&(e=2),void 0===t&&(t=4),void 0===r&&(r=h.settings.RESOLUTION),void 0===i&&(i=5),a.call(this),"number"==typeof e?o=n=e:e instanceof h.Point?(n=e.x,o=e.y):Array.isArray(e)&&(n=e[0],o=e[1]),this.blurXFilter=new c(n,t,r,i),this.blurYFilter=new l(o,t,r,i),this.blurYFilter.blendMode=h.BLEND_MODES.SCREEN,this.defaultFilter=new f}a&&(e.__proto__=a);var t={blur:{configurable:!0},blurX:{configurable:!0},blurY:{configurable:!0}};return((e.prototype=Object.create(a&&a.prototype)).constructor=e).prototype.apply=function(e,t,r){var i=e.getRenderTarget(!0);this.defaultFilter.apply(e,t,r),this.blurXFilter.apply(e,t,i),this.blurYFilter.apply(e,i,r),e.returnRenderTarget(i)},t.blur.get=function(){return this.blurXFilter.blur},t.blur.set=function(e){this.blurXFilter.blur=this.blurYFilter.blur=e},t.blurX.get=function(){return this.blurXFilter.blur},t.blurX.set=function(e){this.blurXFilter.blur=e},t.blurY.get=function(){return this.blurYFilter.blur},t.blurY.set=function(e){this.blurYFilter.blur=e},Object.defineProperties(e.prototype,t),e}(h.Filter),v=function(i){function e(e,t,r){i.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","uniform float radius;\nuniform float strength;\nuniform vec2 center;\nuniform sampler2D uSampler;\nvarying vec2 vTextureCoord;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\n\nvoid main()\n{\n vec2 coord = vTextureCoord * filterArea.xy;\n coord -= center * dimensions.xy;\n float distance = length(coord);\n if (distance < radius) {\n float percent = distance / radius;\n if (strength > 0.0) {\n coord *= mix(1.0, smoothstep(0.0, radius / distance, percent), strength * 0.75);\n } else {\n coord *= mix(1.0, pow(percent, 1.0 + strength * 0.75) * radius / distance, 1.0 - percent);\n }\n }\n coord += center * dimensions.xy;\n coord /= filterArea.xy;\n vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw);\n vec4 color = texture2D(uSampler, clampedCoord);\n if (coord != clampedCoord) {\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\n }\n\n gl_FragColor = color;\n}\n"),this.uniforms.dimensions=new Float32Array(2),this.center=e||[.5,.5],this.radius="number"==typeof t?t:100,this.strength="number"==typeof r?r:1}i&&(e.__proto__=i);var t={radius:{configurable:!0},strength:{configurable:!0},center:{configurable:!0}};return((e.prototype=Object.create(i&&i.prototype)).constructor=e).prototype.apply=function(e,t,r,i){this.uniforms.dimensions[0]=t.sourceFrame.width,this.uniforms.dimensions[1]=t.sourceFrame.height,e.applyFilter(this,t,r,i)},t.radius.get=function(){return this.uniforms.radius},t.radius.set=function(e){this.uniforms.radius=e},t.strength.get=function(){return this.uniforms.strength},t.strength.set=function(e){this.uniforms.strength=e},t.center.get=function(){return this.uniforms.center},t.center.set=function(e){this.uniforms.center=e},Object.defineProperties(e.prototype,t),e}(h.Filter),m=function(i){function e(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=1),i.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform sampler2D colorMap;\nuniform float _mix;\nuniform float _size;\nuniform float _sliceSize;\nuniform float _slicePixelSize;\nuniform float _sliceInnerSize;\nvoid main() {\n vec4 color = texture2D(uSampler, vTextureCoord.xy);\n\n vec4 adjusted;\n if (color.a > 0.0) {\n color.rgb /= color.a;\n float innerWidth = _size - 1.0;\n float zSlice0 = min(floor(color.b * innerWidth), innerWidth);\n float zSlice1 = min(zSlice0 + 1.0, innerWidth);\n float xOffset = _slicePixelSize * 0.5 + color.r * _sliceInnerSize;\n float s0 = xOffset + (zSlice0 * _sliceSize);\n float s1 = xOffset + (zSlice1 * _sliceSize);\n float yOffset = _sliceSize * 0.5 + color.g * (1.0 - _sliceSize);\n vec4 slice0Color = texture2D(colorMap, vec2(s0,yOffset));\n vec4 slice1Color = texture2D(colorMap, vec2(s1,yOffset));\n float zOffset = fract(color.b * innerWidth);\n adjusted = mix(slice0Color, slice1Color, zOffset);\n\n color.rgb *= color.a;\n }\n gl_FragColor = vec4(mix(color, adjusted, _mix).rgb, color.a);\n\n}"),this._size=0,this._sliceSize=0,this._slicePixelSize=0,this._sliceInnerSize=0,this._scaleMode=null,this._nearest=!1,this.nearest=t,this.mix=r,this.colorMap=e}i&&(e.__proto__=i);var t={colorSize:{configurable:!0},colorMap:{configurable:!0},nearest:{configurable:!0}};return((e.prototype=Object.create(i&&i.prototype)).constructor=e).prototype.apply=function(e,t,r,i){this.uniforms._mix=this.mix,e.applyFilter(this,t,r,i)},t.colorSize.get=function(){return this._size},t.colorMap.get=function(){return this._colorMap},t.colorMap.set=function(e){e instanceof h.Texture||(e=h.Texture.from(e)),e&&e.baseTexture&&(e.baseTexture.scaleMode=this._scaleMode,e.baseTexture.mipmap=!1,this._size=e.height,this._sliceSize=1/this._size,this._slicePixelSize=this._sliceSize/this._size,this._sliceInnerSize=this._slicePixelSize*(this._size-1),this.uniforms._size=this._size,this.uniforms._sliceSize=this._sliceSize,this.uniforms._slicePixelSize=this._slicePixelSize,this.uniforms._sliceInnerSize=this._sliceInnerSize,this.uniforms.colorMap=e),this._colorMap=e},t.nearest.get=function(){return this._nearest},t.nearest.set=function(e){this._nearest=e,this._scaleMode=e?h.SCALE_MODES.NEAREST:h.SCALE_MODES.LINEAR;var t=this._colorMap;t&&t.baseTexture&&(t.baseTexture._glTextures={},t.baseTexture.scaleMode=this._scaleMode,t.baseTexture.mipmap=!1,t._updateID++,t.baseTexture.emit("update",t.baseTexture))},e.prototype.updateColorMap=function(){var e=this._colorMap;e&&e.baseTexture&&(e._updateID++,e.baseTexture.emit("update",e.baseTexture),this.colorMap=e)},e.prototype.destroy=function(e){this._colorMap&&this._colorMap.destroy(e),i.prototype.destroy.call(this)},Object.defineProperties(e.prototype,t),e}(h.Filter),b=function(i){function e(e,t,r){void 0===e&&(e=16711680),void 0===t&&(t=0),void 0===r&&(r=.4),i.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec3 originalColor;\nuniform vec3 newColor;\nuniform float epsilon;\nvoid main(void) {\n vec4 currentColor = texture2D(uSampler, vTextureCoord);\n vec3 colorDiff = originalColor - (currentColor.rgb / max(currentColor.a, 0.0000000001));\n float colorDistance = length(colorDiff);\n float doReplace = step(colorDistance, epsilon);\n gl_FragColor = vec4(mix(currentColor.rgb, (newColor + colorDiff) * currentColor.a, doReplace), currentColor.a);\n}\n"),this.uniforms.originalColor=new Float32Array(3),this.uniforms.newColor=new Float32Array(3),this.originalColor=e,this.newColor=t,this.epsilon=r}i&&(e.__proto__=i),(e.prototype=Object.create(i&&i.prototype)).constructor=e;var t={originalColor:{configurable:!0},newColor:{configurable:!0},epsilon:{configurable:!0}};return t.originalColor.set=function(e){var t=this.uniforms.originalColor;"number"==typeof e?(h.utils.hex2rgb(e,t),this._originalColor=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],this._originalColor=h.utils.rgb2hex(t))},t.originalColor.get=function(){return this._originalColor},t.newColor.set=function(e){var t=this.uniforms.newColor;"number"==typeof e?(h.utils.hex2rgb(e,t),this._newColor=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],this._newColor=h.utils.rgb2hex(t))},t.newColor.get=function(){return this._newColor},t.epsilon.set=function(e){this.uniforms.epsilon=e},t.epsilon.get=function(){return this.uniforms.epsilon},Object.defineProperties(e.prototype,t),e}(h.Filter),y=function(i){function e(e,t,r){void 0===t&&(t=200),void 0===r&&(r=200),i.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","precision mediump float;\n\nvarying mediump vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec2 texelSize;\nuniform float matrix[9];\n\nvoid main(void)\n{\n vec4 c11 = texture2D(uSampler, vTextureCoord - texelSize); // top left\n vec4 c12 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - texelSize.y)); // top center\n vec4 c13 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y - texelSize.y)); // top right\n\n vec4 c21 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y)); // mid left\n vec4 c22 = texture2D(uSampler, vTextureCoord); // mid center\n vec4 c23 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y)); // mid right\n\n vec4 c31 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y + texelSize.y)); // bottom left\n vec4 c32 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + texelSize.y)); // bottom center\n vec4 c33 = texture2D(uSampler, vTextureCoord + texelSize); // bottom right\n\n gl_FragColor =\n c11 * matrix[0] + c12 * matrix[1] + c13 * matrix[2] +\n c21 * matrix[3] + c22 * matrix[4] + c23 * matrix[5] +\n c31 * matrix[6] + c32 * matrix[7] + c33 * matrix[8];\n\n gl_FragColor.a = c22.a;\n}\n"),this.uniforms.texelSize=new Float32Array(2),this.uniforms.matrix=new Float32Array(9),void 0!==e&&(this.matrix=e),this.width=t,this.height=r}i&&(e.__proto__=i),(e.prototype=Object.create(i&&i.prototype)).constructor=e;var t={matrix:{configurable:!0},width:{configurable:!0},height:{configurable:!0}};return t.matrix.get=function(){return this.uniforms.matrix},t.matrix.set=function(e){var r=this;e.forEach(function(e,t){return r.uniforms.matrix[t]=e})},t.width.get=function(){return 1/this.uniforms.texelSize[0]},t.width.set=function(e){this.uniforms.texelSize[0]=1/e},t.height.get=function(){return 1/this.uniforms.texelSize[1]},t.height.set=function(e){this.uniforms.texelSize[1]=1/e},Object.defineProperties(e.prototype,t),e}(h.Filter),g=function(e){function t(){e.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n float lum = length(texture2D(uSampler, vTextureCoord.xy).rgb);\n\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n\n if (lum < 1.00)\n {\n if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.75)\n {\n if (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.50)\n {\n if (mod(gl_FragCoord.x + gl_FragCoord.y - 5.0, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.3)\n {\n if (mod(gl_FragCoord.x - gl_FragCoord.y - 5.0, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n}\n")}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t}(h.Filter),_=function(t){function e(e){t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\nuniform vec2 dimensions;\n\nconst float SQRT_2 = 1.414213;\n\nconst float light = 1.0;\n\nuniform float curvature;\nuniform float lineWidth;\nuniform float lineContrast;\nuniform bool verticalLine;\nuniform float noise;\nuniform float noiseSize;\n\nuniform float vignetting;\nuniform float vignettingAlpha;\nuniform float vignettingBlur;\n\nuniform float seed;\nuniform float time;\n\nfloat rand(vec2 co) {\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main(void)\n{\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\n vec2 coord = pixelCoord / dimensions;\n\n vec2 dir = vec2(coord - vec2(0.5, 0.5));\n\n float _c = curvature > 0. ? curvature : 1.;\n float k = curvature > 0. ?(length(dir * dir) * 0.25 * _c * _c + 0.935 * _c) : 1.;\n vec2 uv = dir * k;\n\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n vec3 rgb = gl_FragColor.rgb;\n\n\n if (noise > 0.0 && noiseSize > 0.0)\n {\n pixelCoord.x = floor(pixelCoord.x / noiseSize);\n pixelCoord.y = floor(pixelCoord.y / noiseSize);\n float _noise = rand(pixelCoord * noiseSize * seed) - 0.5;\n rgb += _noise * noise;\n }\n\n if (lineWidth > 0.0) {\n float v = (verticalLine ? uv.x * dimensions.x : uv.y * dimensions.y) * min(1.0, 2.0 / lineWidth ) / _c;\n float j = 1. + cos(v * 1.2 - time) * 0.5 * lineContrast;\n rgb *= j;\n float segment = verticalLine ? mod((dir.x + .5) * dimensions.x, 4.) : mod((dir.y + .5) * dimensions.y, 4.);\n rgb *= 0.99 + ceil(segment) * 0.015;\n }\n\n if (vignetting > 0.0)\n {\n float outter = SQRT_2 - vignetting * SQRT_2;\n float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0);\n rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha);\n }\n\n gl_FragColor.rgb = rgb;\n}\n"),this.uniforms.dimensions=new Float32Array(2),this.time=0,this.seed=0,Object.assign(this,{curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0},e)}t&&(e.__proto__=t);var r={curvature:{configurable:!0},lineWidth:{configurable:!0},lineContrast:{configurable:!0},verticalLine:{configurable:!0},noise:{configurable:!0},noiseSize:{configurable:!0},vignetting:{configurable:!0},vignettingAlpha:{configurable:!0},vignettingBlur:{configurable:!0}};return((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.apply=function(e,t,r,i){this.uniforms.dimensions[0]=t.sourceFrame.width,this.uniforms.dimensions[1]=t.sourceFrame.height,this.uniforms.seed=this.seed,this.uniforms.time=this.time,e.applyFilter(this,t,r,i)},r.curvature.set=function(e){this.uniforms.curvature=e},r.curvature.get=function(){return this.uniforms.curvature},r.lineWidth.set=function(e){this.uniforms.lineWidth=e},r.lineWidth.get=function(){return this.uniforms.lineWidth},r.lineContrast.set=function(e){this.uniforms.lineContrast=e},r.lineContrast.get=function(){return this.uniforms.lineContrast},r.verticalLine.set=function(e){this.uniforms.verticalLine=e},r.verticalLine.get=function(){return this.uniforms.verticalLine},r.noise.set=function(e){this.uniforms.noise=e},r.noise.get=function(){return this.uniforms.noise},r.noiseSize.set=function(e){this.uniforms.noiseSize=e},r.noiseSize.get=function(){return this.uniforms.noiseSize},r.vignetting.set=function(e){this.uniforms.vignetting=e},r.vignetting.get=function(){return this.uniforms.vignetting},r.vignettingAlpha.set=function(e){this.uniforms.vignettingAlpha=e},r.vignettingAlpha.get=function(){return this.uniforms.vignettingAlpha},r.vignettingBlur.set=function(e){this.uniforms.vignettingBlur=e},r.vignettingBlur.get=function(){return this.uniforms.vignettingBlur},Object.defineProperties(e.prototype,r),e}(h.Filter),w=function(r){function e(e,t){void 0===e&&(e=1),void 0===t&&(t=5),r.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","precision mediump float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform vec4 filterArea;\nuniform sampler2D uSampler;\n\nuniform float angle;\nuniform float scale;\n\nfloat pattern()\n{\n float s = sin(angle), c = cos(angle);\n vec2 tex = vTextureCoord * filterArea.xy;\n vec2 point = vec2(\n c * tex.x - s * tex.y,\n s * tex.x + c * tex.y\n ) * scale;\n return (sin(point.x) * sin(point.y)) * 4.0;\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float average = (color.r + color.g + color.b) / 3.0;\n gl_FragColor = vec4(vec3(average * 10.0 - 5.0 + pattern()), color.a);\n}\n"),this.scale=e,this.angle=t}r&&(e.__proto__=r),(e.prototype=Object.create(r&&r.prototype)).constructor=e;var t={scale:{configurable:!0},angle:{configurable:!0}};return t.scale.get=function(){return this.uniforms.scale},t.scale.set=function(e){this.uniforms.scale=e},t.angle.get=function(){return this.uniforms.angle},t.angle.set=function(e){this.uniforms.angle=e},Object.defineProperties(e.prototype,t),e}(h.Filter),x=function(f){function e(e){e&&e.constructor!==Object&&(console.warn("DropShadowFilter now uses options instead of (rotation, distance, blur, color, alpha)"),e={rotation:e},void 0!==arguments[1]&&(e.distance=arguments[1]),void 0!==arguments[2]&&(e.blur=arguments[2]),void 0!==arguments[3]&&(e.color=arguments[3]),void 0!==arguments[4]&&(e.alpha=arguments[4])),e=Object.assign({rotation:45,distance:5,color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:h.settings.RESOLUTION},e),f.call(this);var t=e.kernels,r=e.blur,i=e.quality,n=e.pixelSize,o=e.resolution;this._tintFilter=new h.Filter("attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float alpha;\nuniform vec3 color;\nvoid main(void){\n vec4 sample = texture2D(uSampler, vTextureCoord);\n\n // Un-premultiply alpha before applying the color\n if (sample.a > 0.0) {\n sample.rgb /= sample.a;\n }\n\n // Premultiply alpha again\n sample.rgb = color.rgb * sample.a;\n\n // alpha user alpha\n sample *= alpha;\n\n gl_FragColor = sample;\n}"),this._tintFilter.uniforms.color=new Float32Array(4),this._tintFilter.resolution=o,this._blurFilter=t?new d(t):new d(r,i),this.pixelSize=n,this.resolution=o,this.targetTransform=new h.Matrix;var a=e.shadowOnly,s=e.rotation,u=e.distance,c=e.alpha,l=e.color;this.shadowOnly=a,this.rotation=s,this.distance=u,this.alpha=c,this.color=l,this._updatePadding()}f&&(e.__proto__=f);var t={resolution:{configurable:!0},distance:{configurable:!0},rotation:{configurable:!0},alpha:{configurable:!0},color:{configurable:!0},kernels:{configurable:!0},blur:{configurable:!0},quality:{configurable:!0},pixelSize:{configurable:!0}};return((e.prototype=Object.create(f&&f.prototype)).constructor=e).prototype.apply=function(e,t,r,i){var n=e.getRenderTarget();n.transform=this.targetTransform,this._tintFilter.apply(e,t,n,!0),n.transform=null,this._blurFilter.apply(e,n,r,i),!0!==this.shadowOnly&&e.applyFilter(this,t,r,!1),e.returnRenderTarget(n)},e.prototype._updatePadding=function(){this.padding=this.distance+2*this.blur},e.prototype._updateTargetTransform=function(){this.targetTransform.tx=this.distance*Math.cos(this.angle),this.targetTransform.ty=this.distance*Math.sin(this.angle)},t.resolution.get=function(){return this._resolution},t.resolution.set=function(e){this._resolution=e,this._tintFilter&&(this._tintFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)},t.distance.get=function(){return this._distance},t.distance.set=function(e){this._distance=e,this._updatePadding(),this._updateTargetTransform()},t.rotation.get=function(){return this.angle/h.DEG_TO_RAD},t.rotation.set=function(e){this.angle=e*h.DEG_TO_RAD,this._updateTargetTransform()},t.alpha.get=function(){return this._tintFilter.uniforms.alpha},t.alpha.set=function(e){this._tintFilter.uniforms.alpha=e},t.color.get=function(){return h.utils.rgb2hex(this._tintFilter.uniforms.color)},t.color.set=function(e){h.utils.hex2rgb(e,this._tintFilter.uniforms.color)},t.kernels.get=function(){return this._blurFilter.kernels},t.kernels.set=function(e){this._blurFilter.kernels=e},t.blur.get=function(){return this._blurFilter.blur},t.blur.set=function(e){this._blurFilter.blur=e,this._updatePadding()},t.quality.get=function(){return this._blurFilter.quality},t.quality.set=function(e){this._blurFilter.quality=e},t.pixelSize.get=function(){return this._blurFilter.pixelSize},t.pixelSize.set=function(e){this._blurFilter.pixelSize=e},Object.defineProperties(e.prototype,t),e}(h.Filter),T=function(t){function e(e){void 0===e&&(e=5),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float strength;\nuniform vec4 filterArea;\n\n\nvoid main(void)\n{\n\tvec2 onePixel = vec2(1.0 / filterArea);\n\n\tvec4 color;\n\n\tcolor.rgb = vec3(0.5);\n\n\tcolor -= texture2D(uSampler, vTextureCoord - onePixel) * strength;\n\tcolor += texture2D(uSampler, vTextureCoord + onePixel) * strength;\n\n\tcolor.rgb = vec3((color.r + color.g + color.b) / 3.0);\n\n\tfloat alpha = texture2D(uSampler, vTextureCoord).a;\n\n\tgl_FragColor = vec4(color.rgb * alpha, alpha);\n}\n"),this.strength=e}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={strength:{configurable:!0}};return r.strength.get=function(){return this.uniforms.strength},r.strength.set=function(e){this.uniforms.strength=e},Object.defineProperties(e.prototype,r),e}(h.Filter),S=function(t){function e(e){void 0===e&&(e={}),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","// precision highp float;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\nuniform float aspect;\n\nuniform sampler2D displacementMap;\nuniform float offset;\nuniform float sinDir;\nuniform float cosDir;\nuniform int fillMode;\n\nuniform float seed;\nuniform vec2 red;\nuniform vec2 green;\nuniform vec2 blue;\n\nconst int TRANSPARENT = 0;\nconst int ORIGINAL = 1;\nconst int LOOP = 2;\nconst int CLAMP = 3;\nconst int MIRROR = 4;\n\nvoid main(void)\n{\n vec2 coord = (vTextureCoord * filterArea.xy) / dimensions;\n\n if (coord.x > 1.0 || coord.y > 1.0) {\n return;\n }\n\n float cx = coord.x - 0.5;\n float cy = (coord.y - 0.5) * aspect;\n float ny = (-sinDir * cx + cosDir * cy) / aspect + 0.5;\n\n // displacementMap: repeat\n // ny = ny > 1.0 ? ny - 1.0 : (ny < 0.0 ? 1.0 + ny : ny);\n\n // displacementMap: mirror\n ny = ny > 1.0 ? 2.0 - ny : (ny < 0.0 ? -ny : ny);\n\n vec4 dc = texture2D(displacementMap, vec2(0.5, ny));\n\n float displacement = (dc.r - dc.g) * (offset / filterArea.x);\n\n coord = vTextureCoord + vec2(cosDir * displacement, sinDir * displacement * aspect);\n\n if (fillMode == CLAMP) {\n coord = clamp(coord, filterClamp.xy, filterClamp.zw);\n } else {\n if( coord.x > filterClamp.z ) {\n if (fillMode == ORIGINAL) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n } else if (fillMode == LOOP) {\n coord.x -= filterClamp.z;\n } else if (fillMode == MIRROR) {\n coord.x = filterClamp.z * 2.0 - coord.x;\n } else {\n gl_FragColor = vec4(0., 0., 0., 0.);\n return;\n }\n } else if( coord.x < filterClamp.x ) {\n if (fillMode == ORIGINAL) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n } else if (fillMode == LOOP) {\n coord.x += filterClamp.z;\n } else if (fillMode == MIRROR) {\n coord.x *= -filterClamp.z;\n } else {\n gl_FragColor = vec4(0., 0., 0., 0.);\n return;\n }\n }\n\n if( coord.y > filterClamp.w ) {\n if (fillMode == ORIGINAL) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n } else if (fillMode == LOOP) {\n coord.y -= filterClamp.w;\n } else if (fillMode == MIRROR) {\n coord.y = filterClamp.w * 2.0 - coord.y;\n } else {\n gl_FragColor = vec4(0., 0., 0., 0.);\n return;\n }\n } else if( coord.y < filterClamp.y ) {\n if (fillMode == ORIGINAL) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n } else if (fillMode == LOOP) {\n coord.y += filterClamp.w;\n } else if (fillMode == MIRROR) {\n coord.y *= -filterClamp.w;\n } else {\n gl_FragColor = vec4(0., 0., 0., 0.);\n return;\n }\n }\n }\n\n gl_FragColor.r = texture2D(uSampler, coord + red * (1.0 - seed * 0.4) / filterArea.xy).r;\n gl_FragColor.g = texture2D(uSampler, coord + green * (1.0 - seed * 0.3) / filterArea.xy).g;\n gl_FragColor.b = texture2D(uSampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b;\n gl_FragColor.a = texture2D(uSampler, coord).a;\n}\n"),this.uniforms.dimensions=new Float32Array(2),e=Object.assign({slices:5,offset:100,direction:0,fillMode:0,average:!1,seed:0,red:[0,0],green:[0,0],blue:[0,0],minSize:8,sampleSize:512},e),this.direction=e.direction,this.red=e.red,this.green=e.green,this.blue=e.blue,this.offset=e.offset,this.fillMode=e.fillMode,this.average=e.average,this.seed=e.seed,this.minSize=e.minSize,this.sampleSize=e.sampleSize,this._canvas=document.createElement("canvas"),this._canvas.width=4,this._canvas.height=this.sampleSize,this.texture=h.Texture.fromCanvas(this._canvas,h.SCALE_MODES.NEAREST),this._slices=0,this.slices=e.slices}t&&(e.__proto__=t);var r={sizes:{configurable:!0},offsets:{configurable:!0},slices:{configurable:!0},direction:{configurable:!0},red:{configurable:!0},green:{configurable:!0},blue:{configurable:!0}};return((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.apply=function(e,t,r,i){var n=t.sourceFrame.width,o=t.sourceFrame.height;this.uniforms.dimensions[0]=n,this.uniforms.dimensions[1]=o,this.uniforms.aspect=o/n,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,e.applyFilter(this,t,r,i)},e.prototype._randomizeSizes=function(){var e=this._sizes,t=this._slices-1,r=this.sampleSize,i=Math.min(this.minSize/r,.9/this._slices);if(this.average){for(var n=this._slices,o=1,a=0;a<t;a++){var s=o/(n-a),u=Math.max(s*(1-.6*Math.random()),i);o-=e[a]=u}e[t]=o}else{for(var c=1,l=Math.sqrt(1/this._slices),f=0;f<t;f++){var h=Math.max(l*c*Math.random(),i);c-=e[f]=h}e[t]=c}this.shuffle()},e.prototype.shuffle=function(){for(var e=this._sizes,t=this._slices-1;0<t;t--){var r=Math.random()*t>>0,i=e[t];e[t]=e[r],e[r]=i}},e.prototype._randomizeOffsets=function(){for(var e=0;e<this._slices;e++)this._offsets[e]=Math.random()*(Math.random()<.5?-1:1)},e.prototype.refresh=function(){this._randomizeSizes(),this._randomizeOffsets(),this.redraw()},e.prototype.redraw=function(){var e,t=this.sampleSize,r=this.texture,i=this._canvas.getContext("2d");i.clearRect(0,0,8,t);for(var n=0,o=0;o<this._slices;o++){e=Math.floor(256*this._offsets[o]);var a=this._sizes[o]*t,s=0<e?e:0,u=e<0?-e:0;i.fillStyle="rgba("+s+", "+u+", 0, 1)",i.fillRect(0,n>>0,t,1+a>>0),n+=a}r.baseTexture.update(),this.uniforms.displacementMap=r},r.sizes.set=function(e){for(var t=Math.min(this._slices,e.length),r=0;r<t;r++)this._sizes[r]=e[r]},r.sizes.get=function(){return this._sizes},r.offsets.set=function(e){for(var t=Math.min(this._slices,e.length),r=0;r<t;r++)this._offsets[r]=e[r]},r.offsets.get=function(){return this._offsets},r.slices.get=function(){return this._slices},r.slices.set=function(e){this._slices!==e&&(this._slices=e,this.uniforms.slices=e,this._sizes=this.uniforms.slicesWidth=new Float32Array(e),this._offsets=this.uniforms.slicesOffset=new Float32Array(e),this.refresh())},r.direction.get=function(){return this._direction},r.direction.set=function(e){if(this._direction!==e){var t=(this._direction=e)*h.DEG_TO_RAD;this.uniforms.sinDir=Math.sin(t),this.uniforms.cosDir=Math.cos(t)}},r.red.get=function(){return this.uniforms.red},r.red.set=function(e){this.uniforms.red=e},r.green.get=function(){return this.uniforms.green},r.green.set=function(e){this.uniforms.green=e},r.blue.get=function(){return this.uniforms.blue},r.blue.set=function(e){this.uniforms.blue=e},e.prototype.destroy=function(){this.texture.destroy(!0),this.texture=null,this._canvas=null,this.red=null,this.green=null,this.blue=null,this._sizes=null,this._offsets=null},Object.defineProperties(e.prototype,r),e}(h.Filter);S.TRANSPARENT=0,S.ORIGINAL=1,S.LOOP=2,S.CLAMP=3,S.MIRROR=4;var M=function(o){function e(e,t,r,i,n){void 0===e&&(e=10),void 0===t&&(t=4),void 0===r&&(r=0),void 0===i&&(i=16777215),void 0===n&&(n=.1),o.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler;\n\nuniform float distance;\nuniform float outerStrength;\nuniform float innerStrength;\nuniform vec4 glowColor;\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nconst float PI = 3.14159265358979323846264;\n\nvoid main(void) {\n vec2 px = vec2(1.0 / filterArea.x, 1.0 / filterArea.y);\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\n vec4 curColor;\n float totalAlpha = 0.0;\n float maxTotalAlpha = 0.0;\n float cosAngle;\n float sinAngle;\n vec2 displaced;\n for (float angle = 0.0; angle <= PI * 2.0; angle += %QUALITY_DIST%) {\n cosAngle = cos(angle);\n sinAngle = sin(angle);\n for (float curDistance = 1.0; curDistance <= %DIST%; curDistance++) {\n displaced.x = vTextureCoord.x + cosAngle * curDistance * px.x;\n displaced.y = vTextureCoord.y + sinAngle * curDistance * px.y;\n curColor = texture2D(uSampler, clamp(displaced, filterClamp.xy, filterClamp.zw));\n totalAlpha += (distance - curDistance) * curColor.a;\n maxTotalAlpha += (distance - curDistance);\n }\n }\n maxTotalAlpha = max(maxTotalAlpha, 0.0001);\n\n ownColor.a = max(ownColor.a, 0.0001);\n ownColor.rgb = ownColor.rgb / ownColor.a;\n float outerGlowAlpha = (totalAlpha / maxTotalAlpha) * outerStrength * (1. - ownColor.a);\n float innerGlowAlpha = ((maxTotalAlpha - totalAlpha) / maxTotalAlpha) * innerStrength * ownColor.a;\n float resultAlpha = (ownColor.a + outerGlowAlpha);\n gl_FragColor = vec4(mix(mix(ownColor.rgb, glowColor.rgb, innerGlowAlpha / ownColor.a), glowColor.rgb, outerGlowAlpha / resultAlpha) * resultAlpha, resultAlpha);\n}\n".replace(/%QUALITY_DIST%/gi,""+(1/n/e).toFixed(7)).replace(/%DIST%/gi,""+e.toFixed(7))),this.uniforms.glowColor=new Float32Array([0,0,0,1]),this.distance=e,this.color=i,this.outerStrength=t,this.innerStrength=r}o&&(e.__proto__=o),(e.prototype=Object.create(o&&o.prototype)).constructor=e;var t={color:{configurable:!0},distance:{configurable:!0},outerStrength:{configurable:!0},innerStrength:{configurable:!0}};return t.color.get=function(){return h.utils.rgb2hex(this.uniforms.glowColor)},t.color.set=function(e){h.utils.hex2rgb(e,this.uniforms.glowColor)},t.distance.get=function(){return this.uniforms.distance},t.distance.set=function(e){this.uniforms.distance=e},t.outerStrength.get=function(){return this.uniforms.outerStrength},t.outerStrength.set=function(e){this.uniforms.outerStrength=e},t.innerStrength.get=function(){return this.uniforms.innerStrength},t.innerStrength.set=function(e){this.uniforms.innerStrength=e},Object.defineProperties(e.prototype,t),e}(h.Filter),P=function(t){function e(e){t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec2 dimensions;\n\nuniform vec2 light;\nuniform bool parallel;\nuniform float aspect;\n\nuniform float gain;\nuniform float lacunarity;\nuniform float time;\n\n${perlin}\n\nvoid main(void) {\n vec2 coord = vTextureCoord * filterArea.xy / dimensions.xy;\n\n float d;\n\n if (parallel) {\n float _cos = light.x;\n float _sin = light.y;\n d = (_cos * coord.x) + (_sin * coord.y * aspect);\n } else {\n float dx = coord.x - light.x / dimensions.x;\n float dy = (coord.y - light.y / dimensions.y) * aspect;\n float dis = sqrt(dx * dx + dy * dy) + 0.00001;\n d = dy / dis;\n }\n\n vec3 dir = vec3(d, d, 0.0);\n\n float noise = turb(dir + vec3(time, 0.0, 62.1 + time) * 0.05, vec3(480.0, 320.0, 480.0), lacunarity, gain);\n noise = mix(noise, 0.0, 0.3);\n //fade vertically.\n vec4 mist = vec4(noise, noise, noise, 1.0) * (1.0 - coord.y);\n mist.a = 1.0;\n\n gl_FragColor = texture2D(uSampler, vTextureCoord) + mist;\n}\n".replace("${perlin}","vec3 mod289(vec3 x)\n{\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x)\n{\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 permute(vec4 x)\n{\n return mod289(((x * 34.0) + 1.0) * x);\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec3 fade(vec3 t)\n{\n return t * t * t * (t * (t * 6.0 - 15.0) + 10.0);\n}\n// Classic Perlin noise, periodic variant\nfloat pnoise(vec3 P, vec3 rep)\n{\n vec3 Pi0 = mod(floor(P), rep); // Integer part, modulo period\n vec3 Pi1 = mod(Pi0 + vec3(1.0), rep); // Integer part + 1, mod period\n Pi0 = mod289(Pi0);\n Pi1 = mod289(Pi1);\n vec3 Pf0 = fract(P); // Fractional part for interpolation\n vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n vec4 iy = vec4(Pi0.yy, Pi1.yy);\n vec4 iz0 = Pi0.zzzz;\n vec4 iz1 = Pi1.zzzz;\n vec4 ixy = permute(permute(ix) + iy);\n vec4 ixy0 = permute(ixy + iz0);\n vec4 ixy1 = permute(ixy + iz1);\n vec4 gx0 = ixy0 * (1.0 / 7.0);\n vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n gx0 = fract(gx0);\n vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n vec4 sz0 = step(gz0, vec4(0.0));\n gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n vec4 gx1 = ixy1 * (1.0 / 7.0);\n vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n gx1 = fract(gx1);\n vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n vec4 sz1 = step(gz1, vec4(0.0));\n gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n vec3 g000 = vec3(gx0.x, gy0.x, gz0.x);\n vec3 g100 = vec3(gx0.y, gy0.y, gz0.y);\n vec3 g010 = vec3(gx0.z, gy0.z, gz0.z);\n vec3 g110 = vec3(gx0.w, gy0.w, gz0.w);\n vec3 g001 = vec3(gx1.x, gy1.x, gz1.x);\n vec3 g101 = vec3(gx1.y, gy1.y, gz1.y);\n vec3 g011 = vec3(gx1.z, gy1.z, gz1.z);\n vec3 g111 = vec3(gx1.w, gy1.w, gz1.w);\n vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n g000 *= norm0.x;\n g010 *= norm0.y;\n g100 *= norm0.z;\n g110 *= norm0.w;\n vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n g001 *= norm1.x;\n g011 *= norm1.y;\n g101 *= norm1.z;\n g111 *= norm1.w;\n float n000 = dot(g000, Pf0);\n float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n float n111 = dot(g111, Pf1);\n vec3 fade_xyz = fade(Pf0);\n vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n return 2.2 * n_xyz;\n}\nfloat turb(vec3 P, vec3 rep, float lacunarity, float gain)\n{\n float sum = 0.0;\n float sc = 1.0;\n float totalgain = 1.0;\n for (float i = 0.0; i < 6.0; i++)\n {\n sum += totalgain * pnoise(P * sc, rep);\n sc *= lacunarity;\n totalgain *= gain;\n }\n return abs(sum);\n}\n")),this.uniforms.dimensions=new Float32Array(2),"number"==typeof e&&(console.warn("GodrayFilter now uses options instead of (angle, gain, lacunarity, time)"),e={angle:e},void 0!==arguments[1]&&(e.gain=arguments[1]),void 0!==arguments[2]&&(e.lacunarity=arguments[2]),void 0!==arguments[3]&&(e.time=arguments[3])),e=Object.assign({angle:30,gain:.5,lacunarity:2.5,time:0,parallel:!0,center:[0,0]},e),this._angleLight=new h.Point,this.angle=e.angle,this.gain=e.gain,this.lacunarity=e.lacunarity,this.parallel=e.parallel,this.center=e.center,this.time=e.time}t&&(e.__proto__=t);var r={angle:{configurable:!0},gain:{configurable:!0},lacunarity:{configurable:!0}};return((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.apply=function(e,t,r,i){var n=t.sourceFrame,o=n.width,a=n.height;this.uniforms.light=this.parallel?this._angleLight:this.center,this.uniforms.parallel=this.parallel,this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=a,this.uniforms.aspect=a/o,this.uniforms.time=this.time,e.applyFilter(this,t,r,i)},r.angle.get=function(){return this._angle},r.angle.set=function(e){var t=(this._angle=e)*h.DEG_TO_RAD;this._angleLight.x=Math.cos(t),this._angleLight.y=Math.sin(t)},r.gain.get=function(){return this.uniforms.gain},r.gain.set=function(e){this.uniforms.gain=e},r.lacunarity.get=function(){return this.uniforms.lacunarity},r.lacunarity.set=function(e){this.uniforms.lacunarity=e},Object.defineProperties(e.prototype,r),e}(h.Filter),E=function(i){function e(e,t,r){void 0===e&&(e=[0,0]),void 0===t&&(t=5),void 0===r&&(r=0),i.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\nuniform vec2 uVelocity;\nuniform int uKernelSize;\nuniform float uOffset;\n\nconst int MAX_KERNEL_SIZE = 2048;\n\n// Notice:\n// the perfect way:\n// int kernelSize = min(uKernelSize, MAX_KERNELSIZE);\n// BUT in real use-case , uKernelSize < MAX_KERNELSIZE almost always.\n// So use uKernelSize directly.\n\nvoid main(void)\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n\n if (uKernelSize == 0)\n {\n gl_FragColor = color;\n return;\n }\n\n vec2 velocity = uVelocity / filterArea.xy;\n float offset = -uOffset / length(uVelocity) - 0.5;\n int k = uKernelSize - 1;\n\n for(int i = 0; i < MAX_KERNEL_SIZE - 1; i++) {\n if (i == k) {\n break;\n }\n vec2 bias = velocity * (float(i) / float(k) + offset);\n color += texture2D(uSampler, vTextureCoord + bias);\n }\n gl_FragColor = color / float(uKernelSize);\n}\n"),this.uniforms.uVelocity=new Float32Array(2),this._velocity=new h.ObservablePoint(this.velocityChanged,this),this.velocity=e,this.kernelSize=t,this.offset=r}i&&(e.__proto__=i);var t={velocity:{configurable:!0},offset:{configurable:!0}};return((e.prototype=Object.create(i&&i.prototype)).constructor=e).prototype.apply=function(e,t,r,i){var n=this.velocity,o=n.x,a=n.y;this.uniforms.uKernelSize=0!==o||0!==a?this.kernelSize:0,e.applyFilter(this,t,r,i)},t.velocity.set=function(e){Array.isArray(e)?this._velocity.set(e[0],e[1]):(e instanceof h.Point||e instanceof h.ObservablePoint)&&this._velocity.copy(e)},t.velocity.get=function(){return this._velocity},e.prototype.velocityChanged=function(){this.uniforms.uVelocity[0]=this._velocity.x,this.uniforms.uVelocity[1]=this._velocity.y},t.offset.set=function(e){this.uniforms.uOffset=e},t.offset.get=function(){return this.uniforms.uOffset},Object.defineProperties(e.prototype,t),e}(h.Filter),k=function(i){function e(e,t,r){void 0===t&&(t=.05),void 0===r&&(r=null),r=r||e.length,i.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float epsilon;\n\nconst int MAX_COLORS = %maxColors%;\n\nuniform vec3 originalColors[MAX_COLORS];\nuniform vec3 targetColors[MAX_COLORS];\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n\n float alpha = gl_FragColor.a;\n if (alpha < 0.0001)\n {\n return;\n }\n\n vec3 color = gl_FragColor.rgb / alpha;\n\n for(int i = 0; i < MAX_COLORS; i++)\n {\n vec3 origColor = originalColors[i];\n if (origColor.r < 0.0)\n {\n break;\n }\n vec3 colorDiff = origColor - color;\n if (length(colorDiff) < epsilon)\n {\n vec3 targetColor = targetColors[i];\n gl_FragColor = vec4((targetColor + colorDiff) * alpha, alpha);\n return;\n }\n }\n}\n".replace(/%maxColors%/g,r)),this.epsilon=t,this._maxColors=r,this._replacements=null,this.uniforms.originalColors=new Float32Array(3*r),this.uniforms.targetColors=new Float32Array(3*r),this.replacements=e}i&&(e.__proto__=i),(e.prototype=Object.create(i&&i.prototype)).constructor=e;var t={replacements:{configurable:!0},maxColors:{configurable:!0},epsilon:{configurable:!0}};return t.replacements.set=function(e){var t=this.uniforms.originalColors,r=this.uniforms.targetColors,i=e.length;if(i>this._maxColors)throw"Length of replacements ("+i+") exceeds the maximum colors length ("+this._maxColors+")";t[3*i]=-1;for(var n=0;n<i;n++){var o=e[n],a=o[0];"number"==typeof a?a=h.utils.hex2rgb(a):o[0]=h.utils.rgb2hex(a),t[3*n]=a[0],t[3*n+1]=a[1],t[3*n+2]=a[2];var s=o[1];"number"==typeof s?s=h.utils.hex2rgb(s):o[1]=h.utils.rgb2hex(s),r[3*n]=s[0],r[3*n+1]=s[1],r[3*n+2]=s[2]}this._replacements=e},t.replacements.get=function(){return this._replacements},e.prototype.refresh=function(){this.replacements=this._replacements},t.maxColors.get=function(){return this._maxColors},t.epsilon.set=function(e){this.uniforms.epsilon=e},t.epsilon.get=function(){return this.uniforms.epsilon},Object.defineProperties(e.prototype,t),e}(h.Filter),C=function(r){function e(e,t){void 0===t&&(t=0),r.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec2 dimensions;\n\nuniform float sepia;\nuniform float noise;\nuniform float noiseSize;\nuniform float scratch;\nuniform float scratchDensity;\nuniform float scratchWidth;\nuniform float vignetting;\nuniform float vignettingAlpha;\nuniform float vignettingBlur;\nuniform float seed;\n\nconst float SQRT_2 = 1.414213;\nconst vec3 SEPIA_RGB = vec3(112.0 / 255.0, 66.0 / 255.0, 20.0 / 255.0);\n\nfloat rand(vec2 co) {\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvec3 Overlay(vec3 src, vec3 dst)\n{\n // if (dst <= 0.5) then: 2 * src * dst\n // if (dst > 0.5) then: 1 - 2 * (1 - dst) * (1 - src)\n return vec3((dst.x <= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - dst.x) * (1.0 - src.x)),\n (dst.y <= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - dst.y) * (1.0 - src.y)),\n (dst.z <= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - dst.z) * (1.0 - src.z)));\n}\n\n\nvoid main()\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n vec3 color = gl_FragColor.rgb;\n\n if (sepia > 0.0)\n {\n float gray = (color.x + color.y + color.z) / 3.0;\n vec3 grayscale = vec3(gray);\n\n color = Overlay(SEPIA_RGB, grayscale);\n\n color = grayscale + sepia * (color - grayscale);\n }\n\n vec2 coord = vTextureCoord * filterArea.xy / dimensions.xy;\n\n if (vignetting > 0.0)\n {\n float outter = SQRT_2 - vignetting * SQRT_2;\n vec2 dir = vec2(vec2(0.5, 0.5) - coord);\n dir.y *= dimensions.y / dimensions.x;\n float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0);\n color.rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha);\n }\n\n if (scratchDensity > seed && scratch != 0.0)\n {\n float phase = seed * 256.0;\n float s = mod(floor(phase), 2.0);\n float dist = 1.0 / scratchDensity;\n float d = distance(coord, vec2(seed * dist, abs(s - seed * dist)));\n if (d < seed * 0.6 + 0.4)\n {\n highp float period = scratchDensity * 10.0;\n\n float xx = coord.x * period + phase;\n float aa = abs(mod(xx, 0.5) * 4.0);\n float bb = mod(floor(xx / 0.5), 2.0);\n float yy = (1.0 - bb) * aa + bb * (2.0 - aa);\n\n float kk = 2.0 * period;\n float dw = scratchWidth / dimensions.x * (0.75 + seed);\n float dh = dw * kk;\n\n float tine = (yy - (2.0 - dh));\n\n if (tine > 0.0) {\n float _sign = sign(scratch);\n\n tine = s * tine / period + scratch + 0.1;\n tine = clamp(tine + 1.0, 0.5 + _sign * 0.5, 1.5 + _sign * 0.5);\n\n color.rgb *= tine;\n }\n }\n }\n\n if (noise > 0.0 && noiseSize > 0.0)\n {\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\n pixelCoord.x = floor(pixelCoord.x / noiseSize);\n pixelCoord.y = floor(pixelCoord.y / noiseSize);\n // vec2 d = pixelCoord * noiseSize * vec2(1024.0 + seed * 512.0, 1024.0 - seed * 512.0);\n // float _noise = snoise(d) * 0.5;\n float _noise = rand(pixelCoord * noiseSize * seed) - 0.5;\n color += _noise * noise;\n }\n\n gl_FragColor.rgb = color;\n}\n"),this.uniforms.dimensions=new Float32Array(2),"number"==typeof e?(this.seed=e,e=null):this.seed=t,Object.assign(this,{sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3},e)}r&&(e.__proto__=r);var t={sepia:{configurable:!0},noise:{configurable:!0},noiseSize:{configurable:!0},scratch:{configurable:!0},scratchDensity:{configurable:!0},scratchWidth:{configurable:!0},vignetting:{configurable:!0},vignettingAlpha:{configurable:!0},vignettingBlur:{configurable:!0}};return((e.prototype=Object.create(r&&r.prototype)).constructor=e).prototype.apply=function(e,t,r,i){this.uniforms.dimensions[0]=t.sourceFrame.width,this.uniforms.dimensions[1]=t.sourceFrame.height,this.uniforms.seed=this.seed,e.applyFilter(this,t,r,i)},t.sepia.set=function(e){this.uniforms.sepia=e},t.sepia.get=function(){return this.uniforms.sepia},t.noise.set=function(e){this.uniforms.noise=e},t.noise.get=function(){return this.uniforms.noise},t.noiseSize.set=function(e){this.uniforms.noiseSize=e},t.noiseSize.get=function(){return this.uniforms.noiseSize},t.scratch.set=function(e){this.uniforms.scratch=e},t.scratch.get=function(){return this.uniforms.scratch},t.scratchDensity.set=function(e){this.uniforms.scratchDensity=e},t.scratchDensity.get=function(){return this.uniforms.scratchDensity},t.scratchWidth.set=function(e){this.uniforms.scratchWidth=e},t.scratchWidth.get=function(){return this.uniforms.scratchWidth},t.vignetting.set=function(e){this.uniforms.vignetting=e},t.vignetting.get=function(){return this.uniforms.vignetting},t.vignettingAlpha.set=function(e){this.uniforms.vignettingAlpha=e},t.vignettingAlpha.get=function(){return this.uniforms.vignettingAlpha},t.vignettingBlur.set=function(e){this.uniforms.vignettingBlur=e},t.vignettingBlur.get=function(){return this.uniforms.vignettingBlur},Object.defineProperties(e.prototype,t),e}(h.Filter),A=function(o){function a(e,t,r){void 0===e&&(e=1),void 0===t&&(t=0),void 0===r&&(r=.1);var i=Math.max(r*a.MAX_SAMPLES,a.MIN_SAMPLES),n=(2*Math.PI/i).toFixed(7);o.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec2 thickness;\nuniform vec4 outlineColor;\nuniform vec4 filterClamp;\n\nconst float DOUBLE_PI = 3.14159265358979323846264 * 2.;\n\nvoid main(void) {\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\n vec4 curColor;\n float maxAlpha = 0.;\n vec2 displaced;\n for (float angle = 0.; angle <= DOUBLE_PI; angle += ${angleStep}) {\n displaced.x = vTextureCoord.x + thickness.x * cos(angle);\n displaced.y = vTextureCoord.y + thickness.y * sin(angle);\n curColor = texture2D(uSampler, clamp(displaced, filterClamp.xy, filterClamp.zw));\n maxAlpha = max(maxAlpha, curColor.a);\n }\n float resultAlpha = max(maxAlpha, ownColor.a);\n gl_FragColor = vec4((ownColor.rgb + outlineColor.rgb * (1. - ownColor.a)) * resultAlpha, resultAlpha);\n}\n".replace(/\$\{angleStep\}/,n)),this.uniforms.thickness=new Float32Array([0,0]),this.thickness=e,this.uniforms.outlineColor=new Float32Array([0,0,0,1]),this.color=t,this.quality=r}o&&(a.__proto__=o);var e={color:{configurable:!0}};return((a.prototype=Object.create(o&&o.prototype)).constructor=a).prototype.apply=function(e,t,r,i){this.uniforms.thickness[0]=this.thickness/t.size.width,this.uniforms.thickness[1]=this.thickness/t.size.height,e.applyFilter(this,t,r,i)},e.color.get=function(){return h.utils.rgb2hex(this.uniforms.outlineColor)},e.color.set=function(e){h.utils.hex2rgb(e,this.uniforms.outlineColor)},Object.defineProperties(a.prototype,e),a}(h.Filter);A.MIN_SAMPLES=1,A.MAX_SAMPLES=100;var O=function(t){function e(e){void 0===e&&(e=10),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform vec2 size;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvec2 pixelate(vec2 coord, vec2 size)\n{\n\treturn floor( coord / size ) * size;\n}\n\nvoid main(void)\n{\n vec2 coord = mapCoord(vTextureCoord);\n\n coord = pixelate(coord, size);\n\n coord = unmapCoord(coord);\n\n gl_FragColor = texture2D(uSampler, coord);\n}\n"),this.size=e}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={size:{configurable:!0}};return r.size.get=function(){return this.uniforms.size},r.size.set=function(e){"number"==typeof e&&(e=[e,e]),this.uniforms.size=e},Object.defineProperties(e.prototype,r),e}(h.Filter),I=function(n){function e(e,t,r,i){void 0===e&&(e=0),void 0===t&&(t=[0,0]),void 0===r&&(r=5),void 0===i&&(i=-1),n.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\nuniform float uRadian;\nuniform vec2 uCenter;\nuniform float uRadius;\nuniform int uKernelSize;\n\nconst int MAX_KERNEL_SIZE = 2048;\n\nvoid main(void)\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n\n if (uKernelSize == 0)\n {\n gl_FragColor = color;\n return;\n }\n\n float aspect = filterArea.y / filterArea.x;\n vec2 center = uCenter.xy / filterArea.xy;\n float gradient = uRadius / filterArea.x * 0.3;\n float radius = uRadius / filterArea.x - gradient * 0.5;\n int k = uKernelSize - 1;\n\n vec2 coord = vTextureCoord;\n vec2 dir = vec2(center - coord);\n float dist = length(vec2(dir.x, dir.y * aspect));\n\n float radianStep = uRadian;\n if (radius >= 0.0 && dist > radius) {\n float delta = dist - radius;\n float gap = gradient;\n float scale = 1.0 - abs(delta / gap);\n if (scale <= 0.0) {\n gl_FragColor = color;\n return;\n }\n radianStep *= scale;\n }\n radianStep /= float(k);\n\n float s = sin(radianStep);\n float c = cos(radianStep);\n mat2 rotationMatrix = mat2(vec2(c, -s), vec2(s, c));\n\n for(int i = 0; i < MAX_KERNEL_SIZE - 1; i++) {\n if (i == k) {\n break;\n }\n\n coord -= center;\n coord.y *= aspect;\n coord = rotationMatrix * coord;\n coord.y /= aspect;\n coord += center;\n\n vec4 sample = texture2D(uSampler, coord);\n\n // switch to pre-multiplied alpha to correctly blur transparent images\n // sample.rgb *= sample.a;\n\n color += sample;\n }\n\n gl_FragColor = color / float(uKernelSize);\n}\n"),this._angle=0,this.angle=e,this.center=t,this.kernelSize=r,this.radius=i}n&&(e.__proto__=n);var t={angle:{configurable:!0},center:{configurable:!0},radius:{configurable:!0}};return((e.prototype=Object.create(n&&n.prototype)).constructor=e).prototype.apply=function(e,t,r,i){this.uniforms.uKernelSize=0!==this._angle?this.kernelSize:0,e.applyFilter(this,t,r,i)},t.angle.set=function(e){this._angle=e,this.uniforms.uRadian=e*Math.PI/180},t.angle.get=function(){return this._angle},t.center.get=function(){return this.uniforms.uCenter},t.center.set=function(e){this.uniforms.uCenter=e},t.radius.get=function(){return this.uniforms.uRadius},t.radius.set=function(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e},Object.defineProperties(e.prototype,t),e}(h.Filter),R=function(t){function e(e){t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\n\nuniform bool mirror;\nuniform float boundary;\nuniform vec2 amplitude;\nuniform vec2 waveLength;\nuniform vec2 alpha;\nuniform float time;\n\nfloat rand(vec2 co) {\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main(void)\n{\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\n vec2 coord = pixelCoord / dimensions;\n\n if (coord.y < boundary) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n\n float k = (coord.y - boundary) / (1. - boundary + 0.0001);\n float areaY = boundary * dimensions.y / filterArea.y;\n float v = areaY + areaY - vTextureCoord.y;\n float y = mirror ? v : vTextureCoord.y;\n\n float _amplitude = ((amplitude.y - amplitude.x) * k + amplitude.x ) / filterArea.x;\n float _waveLength = ((waveLength.y - waveLength.x) * k + waveLength.x) / filterArea.y;\n float _alpha = (alpha.y - alpha.x) * k + alpha.x;\n\n float x = vTextureCoord.x + cos(v * 6.28 / _waveLength - time) * _amplitude;\n x = clamp(x, filterClamp.x, filterClamp.z);\n\n vec4 color = texture2D(uSampler, vec2(x, y));\n\n gl_FragColor = color * _alpha;\n}\n"),this.uniforms.amplitude=new Float32Array(2),this.uniforms.waveLength=new Float32Array(2),this.uniforms.alpha=new Float32Array(2),this.uniforms.dimensions=new Float32Array(2),Object.assign(this,{mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0},e)}t&&(e.__proto__=t);var r={mirror:{configurable:!0},boundary:{configurable:!0},amplitude:{configurable:!0},waveLength:{configurable:!0},alpha:{configurable:!0}};return((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.apply=function(e,t,r,i){this.uniforms.dimensions[0]=t.sourceFrame.width,this.uniforms.dimensions[1]=t.sourceFrame.height,this.uniforms.time=this.time,e.applyFilter(this,t,r,i)},r.mirror.set=function(e){this.uniforms.mirror=e},r.mirror.get=function(){return this.uniforms.mirror},r.boundary.set=function(e){this.uniforms.boundary=e},r.boundary.get=function(){return this.uniforms.boundary},r.amplitude.set=function(e){this.uniforms.amplitude[0]=e[0],this.uniforms.amplitude[1]=e[1]},r.amplitude.get=function(){return this.uniforms.amplitude},r.waveLength.set=function(e){this.uniforms.waveLength[0]=e[0],this.uniforms.waveLength[1]=e[1]},r.waveLength.get=function(){return this.uniforms.waveLength},r.alpha.set=function(e){this.uniforms.alpha[0]=e[0],this.uniforms.alpha[1]=e[1]},r.alpha.get=function(){return this.uniforms.alpha},Object.defineProperties(e.prototype,r),e}(h.Filter),D=function(i){function e(e,t,r){void 0===e&&(e=[-10,0]),void 0===t&&(t=[0,10]),void 0===r&&(r=[0,0]),i.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec2 red;\nuniform vec2 green;\nuniform vec2 blue;\n\nvoid main(void)\n{\n gl_FragColor.r = texture2D(uSampler, vTextureCoord + red/filterArea.xy).r;\n gl_FragColor.g = texture2D(uSampler, vTextureCoord + green/filterArea.xy).g;\n gl_FragColor.b = texture2D(uSampler, vTextureCoord + blue/filterArea.xy).b;\n gl_FragColor.a = texture2D(uSampler, vTextureCoord).a;\n}\n"),this.red=e,this.green=t,this.blue=r}i&&(e.__proto__=i),(e.prototype=Object.create(i&&i.prototype)).constructor=e;var t={red:{configurable:!0},green:{configurable:!0},blue:{configurable:!0}};return t.red.get=function(){return this.uniforms.red},t.red.set=function(e){this.uniforms.red=e},t.green.get=function(){return this.uniforms.green},t.green.set=function(e){this.uniforms.green=e},t.blue.get=function(){return this.uniforms.blue},t.blue.set=function(e){this.uniforms.blue=e},Object.defineProperties(e.prototype,t),e}(h.Filter),L=function(i){function e(e,t,r){void 0===e&&(e=[0,0]),void 0===t&&(t={}),void 0===r&&(r=0),i.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\n\nuniform vec2 center;\n\nuniform float amplitude;\nuniform float wavelength;\n// uniform float power;\nuniform float brightness;\nuniform float speed;\nuniform float radius;\n\nuniform float time;\n\nconst float PI = 3.14159;\n\nvoid main()\n{\n float halfWavelength = wavelength * 0.5 / filterArea.x;\n float maxRadius = radius / filterArea.x;\n float currentRadius = time * speed / filterArea.x;\n\n float fade = 1.0;\n\n if (maxRadius > 0.0) {\n if (currentRadius > maxRadius) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n fade = 1.0 - pow(currentRadius / maxRadius, 2.0);\n }\n\n vec2 dir = vec2(vTextureCoord - center / filterArea.xy);\n dir.y *= filterArea.y / filterArea.x;\n float dist = length(dir);\n\n if (dist <= 0.0 || dist < currentRadius - halfWavelength || dist > currentRadius + halfWavelength) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n\n vec2 diffUV = normalize(dir);\n\n float diff = (dist - currentRadius) / halfWavelength;\n\n float p = 1.0 - pow(abs(diff), 2.0);\n\n // float powDiff = diff * pow(p, 2.0) * ( amplitude * fade );\n float powDiff = 1.25 * sin(diff * PI) * p * ( amplitude * fade );\n\n vec2 offset = diffUV * powDiff / filterArea.xy;\n\n // Do clamp :\n vec2 coord = vTextureCoord + offset;\n vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw);\n vec4 color = texture2D(uSampler, clampedCoord);\n if (coord != clampedCoord) {\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\n }\n\n // No clamp :\n // gl_FragColor = texture2D(uSampler, vTextureCoord + offset);\n\n color.rgb *= 1.0 + (brightness - 1.0) * p * fade;\n\n gl_FragColor = color;\n}\n"),this.center=e,Array.isArray(t)&&(console.warn("Deprecated Warning: ShockwaveFilter params Array has been changed to options Object."),t={}),t=Object.assign({amplitude:30,wavelength:160,brightness:1,speed:500,radius:-1},t),this.amplitude=t.amplitude,this.wavelength=t.wavelength,this.brightness=t.brightness,this.speed=t.speed,this.radius=t.radius,this.time=r}i&&(e.__proto__=i);var t={center:{configurable:!0},amplitude:{configurable:!0},wavelength:{configurable:!0},brightness:{configurable:!0},speed:{configurable:!0},radius:{configurable:!0}};return((e.prototype=Object.create(i&&i.prototype)).constructor=e).prototype.apply=function(e,t,r,i){this.uniforms.time=this.time,e.applyFilter(this,t,r,i)},t.center.get=function(){return this.uniforms.center},t.center.set=function(e){this.uniforms.center=e},t.amplitude.get=function(){return this.uniforms.amplitude},t.amplitude.set=function(e){this.uniforms.amplitude=e},t.wavelength.get=function(){return this.uniforms.wavelength},t.wavelength.set=function(e){this.uniforms.wavelength=e},t.brightness.get=function(){return this.uniforms.brightness},t.brightness.set=function(e){this.uniforms.brightness=e},t.speed.get=function(){return this.uniforms.speed},t.speed.set=function(e){this.uniforms.speed=e},t.radius.get=function(){return this.uniforms.radius},t.radius.set=function(e){this.uniforms.radius=e},Object.defineProperties(e.prototype,t),e}(h.Filter),j=function(i){function e(e,t,r){void 0===t&&(t=0),void 0===r&&(r=1),i.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform sampler2D uLightmap;\nuniform vec4 filterArea;\nuniform vec2 dimensions;\nuniform vec4 ambientColor;\nvoid main() {\n vec4 diffuseColor = texture2D(uSampler, vTextureCoord);\n vec2 lightCoord = (vTextureCoord * filterArea.xy) / dimensions;\n vec4 light = texture2D(uLightmap, lightCoord);\n vec3 ambient = ambientColor.rgb * ambientColor.a;\n vec3 intensity = ambient + light.rgb;\n vec3 finalColor = diffuseColor.rgb * intensity;\n gl_FragColor = vec4(finalColor, diffuseColor.a);\n}\n"),this.uniforms.dimensions=new Float32Array(2),this.uniforms.ambientColor=new Float32Array([0,0,0,r]),this.texture=e,this.color=t}i&&(e.__proto__=i);var t={texture:{configurable:!0},color:{configurable:!0},alpha:{configurable:!0}};return((e.prototype=Object.create(i&&i.prototype)).constructor=e).prototype.apply=function(e,t,r,i){this.uniforms.dimensions[0]=t.sourceFrame.width,this.uniforms.dimensions[1]=t.sourceFrame.height,e.applyFilter(this,t,r,i)},t.texture.get=function(){return this.uniforms.uLightmap},t.texture.set=function(e){this.uniforms.uLightmap=e},t.color.set=function(e){var t=this.uniforms.ambientColor;"number"==typeof e?(h.utils.hex2rgb(e,t),this._color=e):(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],this._color=h.utils.rgb2hex(t))},t.color.get=function(){return this._color},t.alpha.get=function(){return this.uniforms.ambientColor[3]},t.alpha.set=function(e){this.uniforms.ambientColor[3]=e},Object.defineProperties(e.prototype,t),e}(h.Filter),F=function(n){function e(e,t,r,i){void 0===e&&(e=100),void 0===t&&(t=600),void 0===r&&(r=null),void 0===i&&(i=null),n.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float blur;\nuniform float gradientBlur;\nuniform vec2 start;\nuniform vec2 end;\nuniform vec2 delta;\nuniform vec2 texSize;\n\nfloat random(vec3 scale, float seed)\n{\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n}\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vTextureCoord * texSize - start, normal)) / gradientBlur) * blur;\n\n for (float t = -30.0; t <= 30.0; t++)\n {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 sample = texture2D(uSampler, vTextureCoord + delta / texSize * percent * radius);\n sample.rgb *= sample.a;\n color += sample * weight;\n total += weight;\n }\n\n color /= total;\n color.rgb /= color.a + 0.00001;\n\n gl_FragColor = color;\n}\n"),this.uniforms.blur=e,this.uniforms.gradientBlur=t,this.uniforms.start=r||new h.Point(0,window.innerHeight/2),this.uniforms.end=i||new h.Point(600,window.innerHeight/2),this.uniforms.delta=new h.Point(30,30),this.uniforms.texSize=new h.Point(window.innerWidth,window.innerHeight),this.updateDelta()}n&&(e.__proto__=n);var t={blur:{configurable:!0},gradientBlur:{configurable:!0},start:{configurable:!0},end:{configurable:!0}};return((e.prototype=Object.create(n&&n.prototype)).constructor=e).prototype.updateDelta=function(){this.uniforms.delta.x=0,this.uniforms.delta.y=0},t.blur.get=function(){return this.uniforms.blur},t.blur.set=function(e){this.uniforms.blur=e},t.gradientBlur.get=function(){return this.uniforms.gradientBlur},t.gradientBlur.set=function(e){this.uniforms.gradientBlur=e},t.start.get=function(){return this.uniforms.start},t.start.set=function(e){this.uniforms.start=e,this.updateDelta()},t.end.get=function(){return this.uniforms.end},t.end.set=function(e){this.uniforms.end=e,this.updateDelta()},Object.defineProperties(e.prototype,t),e}(h.Filter),B=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.updateDelta=function(){var e=this.uniforms.end.x-this.uniforms.start.x,t=this.uniforms.end.y-this.uniforms.start.y,r=Math.sqrt(e*e+t*t);this.uniforms.delta.x=e/r,this.uniforms.delta.y=t/r},t}(F),N=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.updateDelta=function(){var e=this.uniforms.end.x-this.uniforms.start.x,t=this.uniforms.end.y-this.uniforms.start.y,r=Math.sqrt(e*e+t*t);this.uniforms.delta.x=-t/r,this.uniforms.delta.y=e/r},t}(F),U=function(n){function e(e,t,r,i){void 0===e&&(e=100),void 0===t&&(t=600),void 0===r&&(r=null),void 0===i&&(i=null),n.call(this),this.tiltShiftXFilter=new B(e,t,r,i),this.tiltShiftYFilter=new N(e,t,r,i)}n&&(e.__proto__=n);var t={blur:{configurable:!0},gradientBlur:{configurable:!0},start:{configurable:!0},end:{configurable:!0}};return((e.prototype=Object.create(n&&n.prototype)).constructor=e).prototype.apply=function(e,t,r){var i=e.getRenderTarget(!0);this.tiltShiftXFilter.apply(e,t,i),this.tiltShiftYFilter.apply(e,i,r),e.returnRenderTarget(i)},t.blur.get=function(){return this.tiltShiftXFilter.blur},t.blur.set=function(e){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=e},t.gradientBlur.get=function(){return this.tiltShiftXFilter.gradientBlur},t.gradientBlur.set=function(e){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=e},t.start.get=function(){return this.tiltShiftXFilter.start},t.start.set=function(e){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=e},t.end.get=function(){return this.tiltShiftXFilter.end},t.end.set=function(e){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=e},Object.defineProperties(e.prototype,t),e}(h.Filter),z=function(i){function e(e,t,r){void 0===e&&(e=200),void 0===t&&(t=4),void 0===r&&(r=20),i.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float radius;\nuniform float angle;\nuniform vec2 offset;\nuniform vec4 filterArea;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvec2 twist(vec2 coord)\n{\n coord -= offset;\n\n float dist = length(coord);\n\n if (dist < radius)\n {\n float ratioDist = (radius - dist) / radius;\n float angleMod = ratioDist * ratioDist * angle;\n float s = sin(angleMod);\n float c = cos(angleMod);\n coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c);\n }\n\n coord += offset;\n\n return coord;\n}\n\nvoid main(void)\n{\n\n vec2 coord = mapCoord(vTextureCoord);\n\n coord = twist(coord);\n\n coord = unmapCoord(coord);\n\n gl_FragColor = texture2D(uSampler, coord );\n\n}\n"),this.radius=e,this.angle=t,this.padding=r}i&&(e.__proto__=i),(e.prototype=Object.create(i&&i.prototype)).constructor=e;var t={offset:{configurable:!0},radius:{configurable:!0},angle:{configurable:!0}};return t.offset.get=function(){return this.uniforms.offset},t.offset.set=function(e){this.uniforms.offset=e},t.radius.get=function(){return this.uniforms.radius},t.radius.set=function(e){this.uniforms.radius=e},t.angle.get=function(){return this.uniforms.angle},t.angle.set=function(e){this.uniforms.angle=e},Object.defineProperties(e.prototype,t),e}(h.Filter),X=function(n){function e(e,t,r,i){void 0===e&&(e=.1),void 0===t&&(t=[0,0]),void 0===r&&(r=0),void 0===i&&(i=-1),n.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\nuniform vec2 uCenter;\nuniform float uStrength;\nuniform float uInnerRadius;\nuniform float uRadius;\n\nconst float MAX_KERNEL_SIZE = 32.0;\n\n// author: http://byteblacksmith.com/improvements-to-the-canonical-one-liner-glsl-rand-for-opengl-es-2-0/\nhighp float rand(vec2 co, float seed) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot(co + seed, vec2(a, b)), sn = mod(dt, 3.14159);\n return fract(sin(sn) * c + seed);\n}\n\nvoid main() {\n\n float minGradient = uInnerRadius * 0.3;\n float innerRadius = (uInnerRadius + minGradient * 0.5) / filterArea.x;\n\n float gradient = uRadius * 0.3;\n float radius = (uRadius - gradient * 0.5) / filterArea.x;\n\n float countLimit = MAX_KERNEL_SIZE;\n\n vec2 dir = vec2(uCenter.xy / filterArea.xy - vTextureCoord);\n float dist = length(vec2(dir.x, dir.y * filterArea.y / filterArea.x));\n\n float strength = uStrength;\n\n float delta = 0.0;\n float gap;\n if (dist < innerRadius) {\n delta = innerRadius - dist;\n gap = minGradient;\n } else if (radius >= 0.0 && dist > radius) { // radius < 0 means it's infinity\n delta = dist - radius;\n gap = gradient;\n }\n\n if (delta > 0.0) {\n float normalCount = gap / filterArea.x;\n delta = (normalCount - delta) / normalCount;\n countLimit *= delta;\n strength *= delta;\n if (countLimit < 1.0)\n {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n }\n\n // randomize the lookup values to hide the fixed number of samples\n float offset = rand(vTextureCoord, 0.0);\n\n float total = 0.0;\n vec4 color = vec4(0.0);\n\n dir *= strength;\n\n for (float t = 0.0; t < MAX_KERNEL_SIZE; t++) {\n float percent = (t + offset) / MAX_KERNEL_SIZE;\n float weight = 4.0 * (percent - percent * percent);\n vec2 p = vTextureCoord + dir * percent;\n vec4 sample = texture2D(uSampler, p);\n\n // switch to pre-multiplied alpha to correctly blur transparent images\n // sample.rgb *= sample.a;\n\n color += sample * weight;\n total += weight;\n\n if (t > countLimit){\n break;\n }\n }\n\n color /= total;\n // switch back from pre-multiplied alpha\n // color.rgb /= color.a + 0.00001;\n\n gl_FragColor = color;\n}\n"),this.center=t,this.strength=e,this.innerRadius=r,this.radius=i}n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e;var t={center:{configurable:!0},strength:{configurable:!0},innerRadius:{configurable:!0},radius:{configurable:!0}};return t.center.get=function(){return this.uniforms.uCenter},t.center.set=function(e){this.uniforms.uCenter=e},t.strength.get=function(){return this.uniforms.uStrength},t.strength.set=function(e){this.uniforms.uStrength=e},t.innerRadius.get=function(){return this.uniforms.uInnerRadius},t.innerRadius.set=function(e){this.uniforms.uInnerRadius=e},t.radius.get=function(){return this.uniforms.uRadius},t.radius.set=function(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e},Object.defineProperties(e.prototype,t),e}(h.Filter);return e.AdjustmentFilter=t,e.AdvancedBloomFilter=i,e.AsciiFilter=n,e.BevelFilter=o,e.BloomFilter=p,e.BulgePinchFilter=v,e.ColorMapFilter=m,e.ColorReplaceFilter=b,e.ConvolutionFilter=y,e.CrossHatchFilter=g,e.CRTFilter=_,e.DotFilter=w,e.DropShadowFilter=x,e.EmbossFilter=T,e.GlitchFilter=S,e.GlowFilter=M,e.GodrayFilter=P,e.KawaseBlurFilter=d,e.MotionBlurFilter=E,e.MultiColorReplaceFilter=k,e.OldFilmFilter=C,e.OutlineFilter=A,e.PixelateFilter=O,e.RadialBlurFilter=I,e.ReflectionFilter=R,e.RGBSplitFilter=D,e.ShockwaveFilter=L,e.SimpleLightmapFilter=j,e.TiltShiftFilter=U,e.TiltShiftAxisFilter=F,e.TiltShiftXFilter=B,e.TiltShiftYFilter=N,e.TwistFilter=z,e.ZoomBlurFilter=X,e}({},PIXI),pixi_projection,pixi_projection;Object.assign(PIXI.filters,this?this.__filters:__filters),this.PIXI=this.PIXI||{},function(d,m){"use strict";var h,p=function(){function h(e,t,r){this.value=e,this.time=t,this.next=null,this.isStepped=!1,this.ease=r?"function"==typeof r?r:d.ParticleUtils.generateEase(r):null}return h.createList=function(e){if("list"in e){var t=e.list,r=void 0,i=void 0,n=t[0],o=n.value,a=n.time;if(i=r=new h("string"==typeof o?d.ParticleUtils.hexToRGB(o):o,a,e.ease),2<t.length||2===t.length&&t[1].value!==o)for(var s=1;s<t.length;++s){var u=t[s],c=u.value,l=u.time;r.next=new h("string"==typeof c?d.ParticleUtils.hexToRGB(c):c,l),r=r.next}return i.isStepped=!!e.isStepped,i}var f=new h("string"==typeof e.start?d.ParticleUtils.hexToRGB(e.start):e.start,0);return e.end!==e.start&&(f.next=new h("string"==typeof e.end?d.ParticleUtils.hexToRGB(e.end):e.end,1)),f},h}();(h=d.ParticleUtils||(d.ParticleUtils={})).verbose=!1,h.DEG_TO_RADS=Math.PI/180,h.rotatePoint=function(e,t){if(e){e*=h.DEG_TO_RADS;var r=Math.sin(e),i=Math.cos(e),n=t.x*i-t.y*r,o=t.x*r+t.y*i;t.x=n,t.y=o}},h.combineRGBComponents=function(e,t,r){return e<<16|t<<8|r},h.normalize=function(e){var t=1/h.length(e);e.x*=t,e.y*=t},h.scaleBy=function(e,t){e.x*=t,e.y*=t},h.length=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},h.hexToRGB=function(e,t){var r;return t||(t={}),"#"==e.charAt(0)?e=e.substr(1):0===e.indexOf("0x")&&(e=e.substr(2)),8==e.length&&(r=e.substr(0,2),e=e.substr(2)),t.r=parseInt(e.substr(0,2),16),t.g=parseInt(e.substr(2,2),16),t.b=parseInt(e.substr(4,2),16),r&&(t.a=parseInt(r,16)),t},h.generateEase=function(n){var o=n.length,a=1/o;return function(e){var t,r,i=o*e|0;return t=(e-i*a)*o,(r=n[i]||n[o-1]).s+t*(2*(1-t)*(r.cp-r.s)+t*(r.e-r.s))}},h.getBlendMode=function(e){if(!e)return m.BLEND_MODES.NORMAL;for(e=e.toUpperCase();0<=e.indexOf(" ");)e=e.replace(" ","_");return m.BLEND_MODES[e]||m.BLEND_MODES.NORMAL},h.createSteppedGradient=function(e,t){void 0===t&&(t=10),("number"!=typeof t||t<=0)&&(t=10);var r=new p(h.hexToRGB(e[0].value),e[0].time);r.isStepped=!0;for(var i=r,n=e[0],o=1,a=e[o],s=1;s<t;++s){for(var u=s/t;u>a.time;)n=a,a=e[++o];u=(u-n.time)/(a.time-n.time);var c=h.hexToRGB(n.value),l=h.hexToRGB(a.value),f={r:(l.r-c.r)*u+c.r,g:(l.g-c.g)*u+c.g,b:(l.b-c.b)*u+c.b};i.next=new p(f,s/t),i=i.next}return r};var i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function t(e,t){function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var n=function(){function e(e){void 0===e&&(e=!1),this.current=null,this.next=null,this.isColor=!!e,this.interpolate=null,this.ease=null}return e.prototype.reset=function(e){this.current=e,this.next=e.next,this.next&&1<=this.next.time?this.interpolate=this.isColor?o:r:e.isStepped?this.interpolate=this.isColor?c:u:this.interpolate=this.isColor?s:a,this.ease=this.current.ease},e}();function r(e){return this.ease&&(e=this.ease(e)),(this.next.value-this.current.value)*e+this.current.value}function o(e){this.ease&&(e=this.ease(e));var t=this.current.value,r=this.next.value,i=(r.r-t.r)*e+t.r,n=(r.g-t.g)*e+t.g,o=(r.b-t.b)*e+t.b;return d.ParticleUtils.combineRGBComponents(i,n,o)}function a(e){for(this.ease&&(e=this.ease(e));e>this.next.time;)this.current=this.next,this.next=this.next.next;return e=(e-this.current.time)/(this.next.time-this.current.time),(this.next.value-this.current.value)*e+this.current.value}function s(e){for(this.ease&&(e=this.ease(e));e>this.next.time;)this.current=this.next,this.next=this.next.next;e=(e-this.current.time)/(this.next.time-this.current.time);var t=this.current.value,r=this.next.value,i=(r.r-t.r)*e+t.r,n=(r.g-t.g)*e+t.g,o=(r.b-t.b)*e+t.b;return d.ParticleUtils.combineRGBComponents(i,n,o)}function u(e){for(this.ease&&(e=this.ease(e));this.next&&e>this.next.time;)this.current=this.next,this.next=this.next.next;return this.current.value}function c(e){for(this.ease&&(e=this.ease(e));this.next&&e>this.next.time;)this.current=this.next,this.next=this.next.next;var t=this.current.value;return d.ParticleUtils.combineRGBComponents(t.r,t.g,t.b)}var l,f=function(r){function i(e){var t=r.call(this)||this;return t.emitter=e,t.anchor.x=t.anchor.y=.5,t.velocity=new m.Point,t.rotationSpeed=0,t.rotationAcceleration=0,t.maxLife=0,t.age=0,t.ease=null,t.extraData=null,t.alphaList=new n,t.speedList=new n,t.speedMultiplier=1,t.acceleration=new m.Point,t.maxSpeed=NaN,t.scaleList=new n,t.scaleMultiplier=1,t.colorList=new n(!0),t._doAlpha=!1,t._doScale=!1,t._doSpeed=!1,t._doAcceleration=!1,t._doColor=!1,t._doNormalMovement=!1,t._oneOverLife=0,t.next=null,t.prev=null,t.init=t.init,t.Particle_init=i.prototype.init,t.update=t.update,t.Particle_update=i.prototype.update,t.Sprite_destroy=r.prototype.destroy,t.Particle_destroy=i.prototype.destroy,t.applyArt=t.applyArt,t.kill=t.kill,t}return t(i,r),i.prototype.init=function(){this.age=0,this.velocity.x=this.speedList.current.value*this.speedMultiplier,this.velocity.y=0,d.ParticleUtils.rotatePoint(this.rotation,this.velocity),this.noRotation?this.rotation=0:this.rotation*=d.ParticleUtils.DEG_TO_RADS,this.rotationSpeed*=d.ParticleUtils.DEG_TO_RADS,this.rotationAcceleration*=d.ParticleUtils.DEG_TO_RADS,this.alpha=this.alphaList.current.value,this.scale.x=this.scale.y=this.scaleList.current.value,this._doAlpha=!!this.alphaList.current.next,this._doSpeed=!!this.speedList.current.next,this._doScale=!!this.scaleList.current.next,this._doColor=!!this.colorList.current.next,this._doAcceleration=0!==this.acceleration.x||0!==this.acceleration.y,this._doNormalMovement=this._doSpeed||0!==this.speedList.current.value||this._doAcceleration,this._oneOverLife=1/this.maxLife;var e=this.colorList.current.value;this.tint=d.ParticleUtils.combineRGBComponents(e.r,e.g,e.b),this.visible=!0},i.prototype.applyArt=function(e){this.texture=e||m.Texture.EMPTY},i.prototype.update=function(e){if(this.age+=e,this.age>=this.maxLife||this.age<0)return this.kill(),-1;var t=this.age*this._oneOverLife;if(this.ease&&(t=4==this.ease.length?this.ease(t,0,1,1):this.ease(t)),this._doAlpha&&(this.alpha=this.alphaList.interpolate(t)),this._doScale){var r=this.scaleList.interpolate(t)*this.scaleMultiplier;this.scale.x=this.scale.y=r}if(this._doNormalMovement){var i=void 0,n=void 0;if(this._doSpeed){var o=this.speedList.interpolate(t)*this.speedMultiplier;d.ParticleUtils.normalize(this.velocity),d.ParticleUtils.scaleBy(this.velocity,o),i=this.velocity.x*e,n=this.velocity.y*e}else if(this._doAcceleration){var a=this.velocity.x,s=this.velocity.y;if(this.velocity.x+=this.acceleration.x*e,this.velocity.y+=this.acceleration.y*e,this.maxSpeed){var u=d.ParticleUtils.length(this.velocity);u>this.maxSpeed&&d.ParticleUtils.scaleBy(this.velocity,this.maxSpeed/u)}i=(a+this.velocity.x)/2*e,n=(s+this.velocity.y)/2*e}else i=this.velocity.x*e,n=this.velocity.y*e;this.position.x+=i,this.position.y+=n}if(this._doColor&&(this.tint=this.colorList.interpolate(t)),0!==this.rotationAcceleration){var c=this.rotationSpeed+this.rotationAcceleration*e;this.rotation+=(this.rotationSpeed+c)/2*e,this.rotationSpeed=c}else 0!==this.rotationSpeed?this.rotation+=this.rotationSpeed*e:this.acceleration&&!this.noRotation&&(this.rotation=Math.atan2(this.velocity.y,this.velocity.x));return t},i.prototype.kill=function(){this.emitter.recycle(this)},i.prototype.destroy=function(){this.parent&&this.parent.removeChild(this),this.Sprite_destroy(),this.emitter=this.velocity=this.colorList=this.scaleList=this.alphaList=this.speedList=this.ease=this.next=this.prev=null},i.parseArt=function(e){var t;for(t=e.length;0<=t;--t)"string"==typeof e[t]&&(e[t]=m.Texture.fromImage(e[t]));if(d.ParticleUtils.verbose)for(t=e.length-1;0<t;--t)if(e[t].baseTexture!=e[t-1].baseTexture){window.console&&console.warn("PixiParticles: using particle textures from different images may hinder performance in WebGL");break}return e},i.parseData=function(e){return e},i}(m.Sprite),v=function(){function e(e){this.segments=[],this.countingLengths=[],this.totalLength=0,this.init(e)}return e.prototype.init=function(e){if(e&&e.length)if(Array.isArray(e[0]))for(var t=0;t<e.length;++t)for(var r=e[t],i=r[0],n=1;n<r.length;++n){var o=r[n];this.segments.push({p1:i,p2:o,l:0}),i=o}else for(i=e[0],t=1;t<e.length;++t){o=e[t];this.segments.push({p1:i,p2:o,l:0}),i=o}else this.segments.push({p1:{x:0,y:0},p2:{x:0,y:0},l:0});for(t=0;t<this.segments.length;++t){var a=this.segments[t],s=a.p1,u=a.p2,c=Math.sqrt((u.x-s.x)*(u.x-s.x)+(u.y-s.y)*(u.y-s.y));this.segments[t].l=c,this.totalLength+=c,this.countingLengths.push(this.totalLength)}},e.prototype.getRandomPoint=function(e){var t,r,i=Math.random()*this.totalLength;if(1===this.segments.length)t=this.segments[0],r=i;else for(var n=0;n<this.countingLengths.length;++n)if(i<this.countingLengths[n]){t=this.segments[n],r=0===n?i:i-this.countingLengths[n-1];break}r/=t.l||1;var o=t.p1,a=t.p2;e.x=o.x+r*(a.x-o.x),e.y=o.y+r*(a.y-o.y)},e}(),e=m;l=parseInt(/^(\d+)\./.exec(m.VERSION)[1])<5?e.ticker.shared:e.Ticker.shared;var b=new m.Point,y=function(){function e(e,t,r){this._particleConstructor=f,this.particleImages=null,this.startAlpha=null,this.startSpeed=null,this.minimumSpeedMultiplier=1,this.acceleration=null,this.maxSpeed=NaN,this.startScale=null,this.minimumScaleMultiplier=1,this.startColor=null,this.minLifetime=0,this.maxLifetime=0,this.minStartRotation=0,this.maxStartRotation=0,this.noRotation=!1,this.minRotationSpeed=0,this.maxRotationSpeed=0,this.particleBlendMode=0,this.customEase=null,this.extraData=null,this._frequency=1,this.spawnChance=1,this.maxParticles=1e3,this.emitterLifetime=-1,this.spawnPos=null,this.spawnType=null,this._spawnFunc=null,this.spawnRect=null,this.spawnCircle=null,this.spawnPolygonalChain=null,this.particlesPerWave=1,this.particleSpacing=0,this.angleStart=0,this.rotation=0,this.ownerPos=null,this._prevEmitterPos=null,this._prevPosIsValid=!1,this._posChanged=!1,this._parent=null,this.addAtBack=!1,this.particleCount=0,this._emit=!1,this._spawnTimer=0,this._emitterLife=-1,this._activeParticlesFirst=null,this._activeParticlesLast=null,this._poolFirst=null,this._origConfig=null,this._origArt=null,this._autoUpdate=!1,this._destroyWhenComplete=!1,this._completeCallback=null,this.parent=e,t&&r&&this.init(t,r),this.recycle=this.recycle,this.update=this.update,this.rotate=this.rotate,this.updateSpawnPos=this.updateSpawnPos,this.updateOwnerPos=this.updateOwnerPos}return Object.defineProperty(e.prototype,"frequency",{get:function(){return this._frequency},set:function(e){this._frequency="number"==typeof e&&0<e?e:1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"particleConstructor",{get:function(){return this._particleConstructor},set:function(e){if(e!=this._particleConstructor){this._particleConstructor=e,this.cleanup();for(var t=this._poolFirst;t;t=t.next)t.destroy();this._poolFirst=null,this._origConfig&&this._origArt&&this.init(this._origArt,this._origConfig)}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},set:function(e){this.cleanup(),this._parent=e},enumerable:!0,configurable:!0}),e.prototype.init=function(e,t){if(e&&t){this.cleanup(),this._origConfig=t,this._origArt=e,e=Array.isArray(e)?e.slice():[e];var r=this._particleConstructor;this.particleImages=r.parseArt?r.parseArt(e):e,t.alpha?this.startAlpha=p.createList(t.alpha):this.startAlpha=new p(1,0),t.speed?(this.startSpeed=p.createList(t.speed),this.minimumSpeedMultiplier=("minimumSpeedMultiplier"in t?t.minimumSpeedMultiplier:t.speed.minimumSpeedMultiplier)||1):(this.minimumSpeedMultiplier=1,this.startSpeed=new p(0,0));var i,n=t.acceleration;switch(n&&(n.x||n.y)?(this.startSpeed.next=null,this.acceleration=new m.Point(n.x,n.y),this.maxSpeed=t.maxSpeed||NaN):this.acceleration=new m.Point,t.scale?(this.startScale=p.createList(t.scale),this.minimumScaleMultiplier=("minimumScaleMultiplier"in t?t.minimumScaleMultiplier:t.scale.minimumScaleMultiplier)||1):(this.startScale=new p(1,0),this.minimumScaleMultiplier=1),t.color?this.startColor=p.createList(t.color):this.startColor=new p({r:255,g:255,b:255},0),t.startRotation?(this.minStartRotation=t.startRotation.min,this.maxStartRotation=t.startRotation.max):this.minStartRotation=this.maxStartRotation=0,t.noRotation&&(this.minStartRotation||this.maxStartRotation)?this.noRotation=!!t.noRotation:this.noRotation=!1,t.rotationSpeed?(this.minRotationSpeed=t.rotationSpeed.min,this.maxRotationSpeed=t.rotationSpeed.max):this.minRotationSpeed=this.maxRotationSpeed=0,this.rotationAcceleration=t.rotationAcceleration||0,this.minLifetime=t.lifetime.min,this.maxLifetime=t.lifetime.max,this.particleBlendMode=d.ParticleUtils.getBlendMode(t.blendMode),t.ease?this.customEase="function"==typeof t.ease?t.ease:d.ParticleUtils.generateEase(t.ease):this.customEase=null,r.parseData?this.extraData=r.parseData(t.extraData):this.extraData=t.extraData||null,this.spawnRect=this.spawnCircle=null,this.particlesPerWave=1,t.particlesPerWave&&1<t.particlesPerWave&&(this.particlesPerWave=t.particlesPerWave),this.particleSpacing=0,this.angleStart=0,t.spawnType){case"rect":this.spawnType="rect",this._spawnFunc=this._spawnRect;var o=t.spawnRect;this.spawnRect=new m.Rectangle(o.x,o.y,o.w,o.h);break;case"circle":this.spawnType="circle",this._spawnFunc=this._spawnCircle,i=t.spawnCircle,this.spawnCircle=new m.Circle(i.x,i.y,i.r);break;case"ring":this.spawnType="ring",this._spawnFunc=this._spawnRing,i=t.spawnCircle,this.spawnCircle=new m.Circle(i.x,i.y,i.r),this.spawnCircle.minRadius=i.minR;break;case"burst":this.spawnType="burst",this._spawnFunc=this._spawnBurst,this.particleSpacing=t.particleSpacing,this.angleStart=t.angleStart?t.angleStart:0;break;case"point":this.spawnType="point",this._spawnFunc=this._spawnPoint;break;case"polygonalChain":this.spawnType="polygonalChain",this._spawnFunc=this._spawnPolygonalChain,this.spawnPolygonalChain=new v(t.spawnPolygon);break;default:this.spawnType="point",this._spawnFunc=this._spawnPoint}this.frequency=t.frequency,this.spawnChance="number"==typeof t.spawnChance&&0<t.spawnChance?t.spawnChance:1,this.emitterLifetime=t.emitterLifetime||-1,this.maxParticles=0<t.maxParticles?t.maxParticles:1e3,this.addAtBack=!!t.addAtBack,this.rotation=0,this.ownerPos=new m.Point,this.spawnPos=new m.Point(t.pos.x,t.pos.y),this._prevEmitterPos=this.spawnPos.clone(),this._prevPosIsValid=!1,this._spawnTimer=0,this.emit=void 0===t.emit||!!t.emit,this.autoUpdate=!!t.autoUpdate}},e.prototype.recycle=function(e){e.next&&(e.next.prev=e.prev),e.prev&&(e.prev.next=e.next),e==this._activeParticlesLast&&(this._activeParticlesLast=e.prev),e==this._activeParticlesFirst&&(this._activeParticlesFirst=e.next),e.prev=null,e.next=this._poolFirst,(this._poolFirst=e).parent&&e.parent.removeChild(e),--this.particleCount},e.prototype.rotate=function(e){if(this.rotation!=e){var t=e-this.rotation;this.rotation=e,d.ParticleUtils.rotatePoint(t,this.spawnPos),this._posChanged=!0}},e.prototype.updateSpawnPos=function(e,t){this._posChanged=!0,this.spawnPos.x=e,this.spawnPos.y=t},e.prototype.updateOwnerPos=function(e,t){this._posChanged=!0,this.ownerPos.x=e,this.ownerPos.y=t},e.prototype.resetPositionTracking=function(){this._prevPosIsValid=!1},Object.defineProperty(e.prototype,"emit",{get:function(){return this._emit},set:function(e){this._emit=!!e,this._emitterLife=this.emitterLifetime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(e){this._autoUpdate&&!e?l.remove(this.update,this):!this._autoUpdate&&e&&l.add(this.update,this),this._autoUpdate=!!e},enumerable:!0,configurable:!0}),e.prototype.playOnceAndDestroy=function(e){this.autoUpdate=!0,this.emit=!0,this._destroyWhenComplete=!0,this._completeCallback=e},e.prototype.playOnce=function(e){this.emit=!0,this._completeCallback=e},e.prototype.update=function(e){if(this._autoUpdate&&(e=e/m.settings.TARGET_FPMS/1e3),this._parent){var t,r,i,n,o;for(r=this._activeParticlesFirst;r;r=i)i=r.next,r.update(e);this._prevPosIsValid&&(n=this._prevEmitterPos.x,o=this._prevEmitterPos.y);var a=this.ownerPos.x+this.spawnPos.x,s=this.ownerPos.y+this.spawnPos.y;if(this._emit)for(this._spawnTimer-=e<0?0:e;this._spawnTimer<=0;){if(0<this._emitterLife&&(this._emitterLife-=this._frequency,this._emitterLife<=0)){this._spawnTimer=0,this._emitterLife=0,this.emit=!1;break}if(this.particleCount>=this.maxParticles)this._spawnTimer+=this._frequency;else{var u=void 0;if(u=this.minLifetime==this.maxLifetime?this.minLifetime:Math.random()*(this.maxLifetime-this.minLifetime)+this.minLifetime,-this._spawnTimer<u){var c=void 0,l=void 0;if(this._prevPosIsValid&&this._posChanged){var f=1+this._spawnTimer/e;c=(a-n)*f+n,l=(s-o)*f+o}else c=a,l=s;t=0;for(var h=Math.min(this.particlesPerWave,this.maxParticles-this.particleCount);t<h;++t)if(!(this.spawnChance<1&&Math.random()>=this.spawnChance)){var d=void 0;if(this._poolFirst?(d=this._poolFirst,this._poolFirst=this._poolFirst.next,d.next=null):d=new this.particleConstructor(this),1<this.particleImages.length?d.applyArt(this.particleImages[Math.floor(Math.random()*this.particleImages.length)]):d.applyArt(this.particleImages[0]),d.alphaList.reset(this.startAlpha),1!=this.minimumSpeedMultiplier&&(d.speedMultiplier=Math.random()*(1-this.minimumSpeedMultiplier)+this.minimumSpeedMultiplier),d.speedList.reset(this.startSpeed),d.acceleration.x=this.acceleration.x,d.acceleration.y=this.acceleration.y,d.maxSpeed=this.maxSpeed,1!=this.minimumScaleMultiplier&&(d.scaleMultiplier=Math.random()*(1-this.minimumScaleMultiplier)+this.minimumScaleMultiplier),d.scaleList.reset(this.startScale),d.colorList.reset(this.startColor),this.minRotationSpeed==this.maxRotationSpeed?d.rotationSpeed=this.minRotationSpeed:d.rotationSpeed=Math.random()*(this.maxRotationSpeed-this.minRotationSpeed)+this.minRotationSpeed,d.rotationAcceleration=this.rotationAcceleration,d.noRotation=this.noRotation,d.maxLife=u,d.blendMode=this.particleBlendMode,d.ease=this.customEase,d.extraData=this.extraData,this._spawnFunc(d,c,l,t),d.init(),d.update(-this._spawnTimer),d.parent){var p=this._parent.children;if(p[0]==d)p.shift();else if(p[p.length-1]==d)p.pop();else{var v=p.indexOf(d);p.splice(v,1)}this.addAtBack?p.unshift(d):p.push(d)}else this.addAtBack?this._parent.addChildAt(d,0):this._parent.addChild(d);this._activeParticlesLast?((this._activeParticlesLast.next=d).prev=this._activeParticlesLast,this._activeParticlesLast=d):this._activeParticlesLast=this._activeParticlesFirst=d,++this.particleCount}}this._spawnTimer+=this._frequency}}this._posChanged&&(this._prevEmitterPos.x=a,this._prevEmitterPos.y=s,this._prevPosIsValid=!0,this._posChanged=!1),this._emit||this._activeParticlesFirst||(this._completeCallback&&this._completeCallback(),this._destroyWhenComplete&&this.destroy())}},e.prototype._spawnPoint=function(e,t,r){this.minStartRotation==this.maxStartRotation?e.rotation=this.minStartRotation+this.rotation:e.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,e.position.x=t,e.position.y=r},e.prototype._spawnRect=function(e,t,r){this.minStartRotation==this.maxStartRotation?e.rotation=this.minStartRotation+this.rotation:e.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,b.x=Math.random()*this.spawnRect.width+this.spawnRect.x,b.y=Math.random()*this.spawnRect.height+this.spawnRect.y,0!==this.rotation&&d.ParticleUtils.rotatePoint(this.rotation,b),e.position.x=t+b.x,e.position.y=r+b.y},e.prototype._spawnCircle=function(e,t,r){this.minStartRotation==this.maxStartRotation?e.rotation=this.minStartRotation+this.rotation:e.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,b.x=Math.random()*this.spawnCircle.radius,b.y=0,d.ParticleUtils.rotatePoint(360*Math.random(),b),b.x+=this.spawnCircle.x,b.y+=this.spawnCircle.y,0!==this.rotation&&d.ParticleUtils.rotatePoint(this.rotation,b),e.position.x=t+b.x,e.position.y=r+b.y},e.prototype._spawnRing=function(e,t,r){var i=this.spawnCircle;this.minStartRotation==this.maxStartRotation?e.rotation=this.minStartRotation+this.rotation:e.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,i.minRadius!==i.radius?b.x=Math.random()*(i.radius-i.minRadius)+i.minRadius:b.x=i.radius,b.y=0;var n=360*Math.random();e.rotation+=n,d.ParticleUtils.rotatePoint(n,b),b.x+=this.spawnCircle.x,b.y+=this.spawnCircle.y,0!==this.rotation&&d.ParticleUtils.rotatePoint(this.rotation,b),e.position.x=t+b.x,e.position.y=r+b.y},e.prototype._spawnPolygonalChain=function(e,t,r){this.minStartRotation==this.maxStartRotation?e.rotation=this.minStartRotation+this.rotation:e.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,this.spawnPolygonalChain.getRandomPoint(b),0!==this.rotation&&d.ParticleUtils.rotatePoint(this.rotation,b),e.position.x=t+b.x,e.position.y=r+b.y},e.prototype._spawnBurst=function(e,t,r,i){0===this.particleSpacing?e.rotation=360*Math.random():e.rotation=this.angleStart+this.particleSpacing*i+this.rotation,e.position.x=t,e.position.y=r},e.prototype.cleanup=function(){var e,t;for(e=this._activeParticlesFirst;e;e=t)t=e.next,this.recycle(e),e.parent&&e.parent.removeChild(e);this._activeParticlesFirst=this._activeParticlesLast=null,this.particleCount=0},e.prototype.destroy=function(){var e;this.autoUpdate=!1,this.cleanup();for(var t=this._poolFirst;t;t=e)e=t.next,t.destroy();this._poolFirst=this._parent=this.particleImages=this.spawnPos=this.ownerPos=this.startColor=this.startScale=this.startAlpha=this.startSpeed=this.customEase=this._completeCallback=null},e}(),g=new m.Point,_=["pow","sqrt","abs","floor","round","ceil","E","PI","sin","cos","tan","asin","acos","atan","atan2","log"],w=new RegExp(["[01234567890\\.\\*\\-\\+\\/\\(\\)x ,]"].concat(_).join("|"),"g"),x=function(r){function e(e){var t=r.call(this,e)||this;return t.path=null,t.initialRotation=0,t.initialPosition=new m.Point,t.movement=0,t}return t(e,r),e.prototype.init=function(){this.initialRotation=this.rotation,this.Particle_init(),this.path=this.extraData.path,this._doNormalMovement=!this.path,this.movement=0,this.initialPosition.x=this.position.x,this.initialPosition.y=this.position.y},e.prototype.update=function(e){var t=this.Particle_update(e);if(0<=t&&this.path){var r=this.speedList.interpolate(t)*this.speedMultiplier;this.movement+=r*e,g.x=this.movement,g.y=this.path(this.movement),d.ParticleUtils.rotatePoint(this.initialRotation,g),this.position.x=this.initialPosition.x+g.x,this.position.y=this.initialPosition.y+g.y}return t},e.prototype.destroy=function(){this.Particle_destroy(),this.path=this.initialPosition=null},e.parseArt=function(e){return f.parseArt(e)},e.parseData=function(e){var t={};if(e&&e.path)try{t.path=function(e){for(var t=e.match(w),r=t.length-1;0<=r;--r)0<=_.indexOf(t[r])&&(t[r]="Math."+t[r]);return e=t.join(""),new Function("x","return "+e+";")}(e.path)}catch(e){d.ParticleUtils.verbose&&console.error("PathParticle: error in parsing path expression"),t.path=null}else d.ParticleUtils.verbose&&console.error("PathParticle requires a path string in extraData!"),t.path=null;return t},e}(f),T=function(r){function e(e){var t=r.call(this,e)||this;return t.textures=null,t.duration=0,t.framerate=0,t.elapsed=0,t.loop=!1,t}return t(e,r),e.prototype.init=function(){this.Particle_init(),this.elapsed=0,this.framerate<0&&(this.duration=this.maxLife,this.framerate=this.textures.length/this.duration)},e.prototype.applyArt=function(e){this.textures=e.textures,this.framerate=e.framerate,this.duration=e.duration,this.loop=e.loop},e.prototype.update=function(e){var t=this.Particle_update(e);if(0<=t){this.elapsed+=e,this.elapsed>this.duration&&(this.loop?this.elapsed=this.elapsed%this.duration:this.elapsed=this.duration-1e-6);var r=this.elapsed*this.framerate+1e-7|0;this.texture=this.textures[r]||m.Texture.EMPTY}return t},e.prototype.destroy=function(){this.Particle_destroy(),this.textures=null},e.parseArt=function(e){for(var t,r,i,n,o,a=[],s=0;s<e.length;++s){t=e[s],a[s]=r={},r.textures=o=[],i=t.textures;for(var u=0;u<i.length;++u)if("string"==typeof(n=i[u]))o.push(m.Texture.fromImage(n));else if(n instanceof m.Texture)o.push(n);else{var c=n.count||1;for(n="string"==typeof n.texture?m.Texture.fromImage(n.texture):n.texture;0<c;--c)o.push(n)}"matchLife"==t.framerate?(r.framerate=-1,r.duration=0,r.loop=!1):(r.loop=!!t.loop,r.framerate=0<t.framerate?t.framerate:60,r.duration=o.length/r.framerate)}return a},e}(f);d.Particle=f,d.Emitter=y,d.PathParticle=x,d.AnimatedParticle=T,d.PolygonalChain=v,d.PropertyList=n,d.PropertyNode=p}(this.PIXI.particles=this.PIXI.particles||{},PIXI),function(e){var t;(t=e.utils||(e.utils={})).createIndicesForQuads=function(e){for(var t=6*e,r=new Uint16Array(t),i=0,n=0;i<t;i+=6,n+=4)r[i+0]=n+0,r[i+1]=n+1,r[i+2]=n+2,r[i+3]=n+0,r[i+4]=n+2,r[i+5]=n+3;return r},t.isPow2=function(e){return!(e&e-1||!e)},t.nextPow2=function(e){return e+=+(0===e),--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,1+(e|=e>>>16)},t.log2=function(e){var t,r;return t=+(65535<e)<<4,t|=r=+(255<(e>>>=t))<<3,t|=r=+(15<(e>>>=r))<<2,(t|=r=+(3<(e>>>=r))<<1)|(e>>>=r)>>1},t.getIntersectionFactor=function(e,t,r,i,n){var o=t.x-e.x,a=r.x-i.x,s=r.x-e.x,u=t.y-e.y,c=r.y-i.y,l=r.y-e.y,f=o*c-u*a;if(Math.abs(f)<1e-7)return n.x=o,n.y=u,0;var h=(s*c-l*a)/f,d=(o*l-u*s)/f;return d<1e-6||-1e-6<d-1?-1:(n.x=e.x+h*(t.x-e.x),n.y=e.y+h*(t.y-e.y),1)},t.getPositionFromQuad=function(e,t,r){r=r||new PIXI.Point;var i=1-t.x,n=1-i,o=1-t.y,a=1-o;return r.x=(e[0].x*i+e[1].x*n)*o+(e[3].x*i+e[2].x*n)*a,r.y=(e[0].y*i+e[1].y*n)*o+(e[3].y*i+e[2].y*n)*a,r}}(pixi_projection||(pixi_projection={})),PIXI.projection=pixi_projection,function(e){var t,r=function(){function e(e,t){void 0===t&&(t=!0),this._enabled=!1,this.legacy=e,t&&(this.enabled=!0),this.legacy.proj=this}return Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled=e},enumerable:!0,configurable:!0}),e.prototype.clear=function(){},e}();e.AbstractProjection=r,(t=e.TRANSFORM_STEP||(e.TRANSFORM_STEP={}))[t.NONE=0]="NONE",t[t.BEFORE_PROJ=4]="BEFORE_PROJ",t[t.PROJ=5]="PROJ",t[t.ALL=9]="ALL"}(pixi_projection||(pixi_projection={}));var __extends=this&&this.__extends||function(){var i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(e,t){function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}(),pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection,pixi_projection;!function(r){function i(e){var t=this.proj,r=this,i=e._worldID,n=r.localTransform,o=t.scaleAfterAffine&&2<=t.affine;r._localID!==r._currentLocalID&&(o?(n.a=r._cx,n.b=r._sx,n.c=r._cy,n.d=r._sy,n.tx=r.position._x,n.ty=r.position._y):(n.a=r._cx*r.scale._x,n.b=r._sx*r.scale._x,n.c=r._cy*r.scale._y,n.d=r._sy*r.scale._y,n.tx=r.position._x-(r.pivot._x*n.a+r.pivot._y*n.c),n.ty=r.position._y-(r.pivot._x*n.b+r.pivot._y*n.d)),r._currentLocalID=r._localID,t._currentProjID=-1);var a=t._projID;if(t._currentProjID!==a&&(t._currentProjID=a,t.updateLocalTransform(n),r._parentID=-1),r._parentID!==i){var s=e.proj;s&&!s._affine?t.world.setToMult(s.world,t.local):t.world.setToMultLegacy(e.worldTransform,t.local);var u=r.worldTransform;t.world.copy(u,t._affine,t.affinePreserveOrientation),o&&(u.a*=r.scale._x,u.b*=r.scale._x,u.c*=r.scale._y,u.d*=r.scale._y,u.tx-=r.pivot._x*u.a+r.pivot._y*u.c,u.ty-=r.pivot._x*u.b+r.pivot._y*u.d),r._parentID=i,r._worldID++}}var e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._projID=0,e._currentProjID=-1,e._affine=r.AFFINE.NONE,e.affinePreserveOrientation=!1,e.scaleAfterAffine=!0,e}return __extends(e,t),e.prototype.updateLocalTransform=function(e){},Object.defineProperty(e.prototype,"affine",{get:function(){return this._affine},set:function(e){this._affine!=e&&(this._affine=e,this._currentProjID=-1,this.legacy._currentLocalID=-1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{set:function(e){e!==this._enabled&&(this._enabled=e,this.legacy.updateTransform=e?i:PIXI.TransformStatic.prototype.updateTransform,this.legacy._parentID=-1)},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this._currentProjID=-1,this._projID=0},e}(r.AbstractProjection);r.LinearProjection=e}(pixi_projection||(pixi_projection={})),function(e){var t,r;t=e.webgl||(e.webgl={}),r=function(){function e(e){this.vertices=new ArrayBuffer(e),this.float32View=new Float32Array(this.vertices),this.uint32View=new Uint32Array(this.vertices)}return e.prototype.destroy=function(){this.vertices=null},e}(),t.BatchBuffer=r}(pixi_projection||(pixi_projection={})),function(e){(e.webgl||(e.webgl={})).generateMultiTextureShader=function(e,t,r,i){t=(t=t.replace(/%count%/gi,i+"")).replace(/%forloop%/gi,function(e){var t="";t+="\n",t+="\n";for(var r=0;r<e;r++)0<r&&(t+="\nelse "),r<e-1&&(t+="if(textureId == "+r+".0)"),t+="\n{",t+="\n\tcolor = texture2D(uSamplers["+r+"], textureCoord);",t+="\n}";return t+="\n",t+="\n"}(i));for(var n=new PIXI.Shader(r,e,t),o=new Int32Array(i),a=0;a<i;a++)o[a]=a;return n.bind(),n.uniforms.uSamplers=o,n}}(pixi_projection||(pixi_projection={})),function(R){!function(n){var e=PIXI.ObjectRenderer,k=PIXI.settings,C=PIXI.glCore.GLBuffer,A=PIXI.utils.premultiplyTint,O=PIXI.utils.premultiplyBlendMode,I=1<<21,o=function(){this.textures=[],this.textureCount=0,this.ids=[],this.size=0,this.start=0,this.blend=PIXI.BLEND_MODES.NORMAL,this.uniforms=null};n.BatchGroup=o;var t=function(i){function e(e){var t=i.call(this,e)||this;t.shaderVert="",t.shaderFrag="",t.MAX_TEXTURES_LOCAL=32,t.vertSize=5,t.vertByteSize=4*t.vertSize,t.size=k.SPRITE_BATCH_SIZE,t.currentIndex=0,t.sprites=[],t.vertexBuffers=[],t.vaos=[],t.vaoMax=2,t.vertexCount=0,t.MAX_TEXTURES=1,t.indices=R.utils.createIndicesForQuads(t.size),t.groups=[];for(var r=0;r<t.size;r++)t.groups[r]=new o;return t.vaoMax=2,t.vertexCount=0,t.renderer.on("prerender",t.onPrerender,t),t}return __extends(e,i),e.prototype.getUniforms=function(e){return null},e.prototype.syncUniforms=function(e){if(e){var t=this.shader;for(var r in e)t.uniforms[r]=e[r]}},e.prototype.onContextChange=function(){var e=this.renderer.gl;this.MAX_TEXTURES=Math.min(this.MAX_TEXTURES_LOCAL,this.renderer.plugins.sprite.MAX_TEXTURES),this.shader=n.generateMultiTextureShader(this.shaderVert,this.shaderFrag,e,this.MAX_TEXTURES),this.indexBuffer=C.createIndexBuffer(e,this.indices,e.STATIC_DRAW),this.renderer.bindVao(null);this.shader.attributes;for(var t=0;t<this.vaoMax;t++){var r=this.vertexBuffers[t]=C.createVertexBuffer(e,null,e.STREAM_DRAW);this.vaos[t]=this.createVao(r)}if(!this.buffers){this.buffers=[];for(t=1;t<=R.utils.nextPow2(this.size);t*=2)this.buffers.push(new n.BatchBuffer(4*t*this.vertByteSize))}this.vao=this.vaos[0]},e.prototype.onPrerender=function(){this.vertexCount=0},e.prototype.render=function(e){this.currentIndex>=this.size&&this.flush(),e._texture._uvs&&e._texture.baseTexture&&(this.sprites[this.currentIndex++]=e)},e.prototype.flush=function(){if(0!==this.currentIndex){var e,t,r,i=this.renderer.gl,n=this.MAX_TEXTURES,o=R.utils.nextPow2(this.currentIndex),a=R.utils.log2(o),s=this.buffers[a],u=this.sprites,c=this.groups,l=s.float32View,f=s.uint32View,h=0,d=null,p=1,v=0,m=c[0],b=O[u[0]._texture.baseTexture.premultipliedAlpha?1:0][u[0].blendMode];for(m.textureCount=0,m.start=0,m.blend=b,I++,r=0;r<this.currentIndex;++r){var y=u[r];u[r]=null,e=y._texture.baseTexture;var g=O[Number(e.premultipliedAlpha)][y.blendMode];b!==g&&(b=g,t=null,v=n,I++);var _=this.getUniforms(y);d!==_&&(d=_,t=null,v=n,I++),t!==e&&(t=e)._enabled!==I&&(v===n&&(I++,v=0,m.size=r-m.start,(m=c[p++]).textureCount=0,m.blend=b,m.start=r,m.uniforms=d),e._enabled=I,e._virtalBoundId=v,m.textures[m.textureCount++]=e,v++);var w=Math.min(y.worldAlpha,1),x=w<1&&e.premultipliedAlpha?A(y._tintRGB,w):y._tintRGB+(255*w<<24);this.fillVertices(l,f,h,y,x,e._virtalBoundId),h+=4*this.vertSize}if(m.size=r-m.start,k.CAN_UPLOAD_SAME_BUFFER)this.vertexBuffers[this.vertexCount].upload(s.vertices,0,!0);else{if(this.vaoMax<=this.vertexCount){this.vaoMax++;this.shader.attributes;var T=this.vertexBuffers[this.vertexCount]=C.createVertexBuffer(i,null,i.STREAM_DRAW);this.vaos[this.vertexCount]=this.createVao(T)}this.renderer.bindVao(this.vaos[this.vertexCount]),this.vertexBuffers[this.vertexCount].upload(s.vertices,0,!1),this.vertexCount++}for(d=null,r=0;r<p;r++){var S=c[r],M=S.textureCount;S.uniforms!==d&&this.syncUniforms(S.uniforms);for(var P=0;P<M;P++){this.renderer.bindTexture(S.textures[P],P,!0),S.textures[P]._virtalBoundId=-1;var E=this.shader.uniforms.samplerSize;E&&(E[0]=S.textures[P].realWidth,E[1]=S.textures[P].realHeight,this.shader.uniforms.samplerSize=E)}this.renderer.state.setBlendMode(S.blend),i.drawElements(i.TRIANGLES,6*S.size,i.UNSIGNED_SHORT,6*S.start*2)}this.currentIndex=0}},e.prototype.start=function(){this.renderer.bindShader(this.shader),k.CAN_UPLOAD_SAME_BUFFER&&(this.renderer.bindVao(this.vaos[this.vertexCount]),this.vertexBuffers[this.vertexCount].bind())},e.prototype.stop=function(){this.flush()},e.prototype.destroy=function(){for(var e=0;e<this.vaoMax;e++)this.vertexBuffers[e]&&this.vertexBuffers[e].destroy(),this.vaos[e]&&this.vaos[e].destroy();this.indexBuffer&&this.indexBuffer.destroy(),this.renderer.off("prerender",this.onPrerender,this),i.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.vertexBuffers=null,this.vaos=null,this.indexBuffer=null,this.indices=null,this.sprites=null;for(e=0;e<this.buffers.length;++e)this.buffers[e].destroy()},e}(e);n.MultiTextureSpriteRenderer=t}(R.webgl||(R.webgl={}))}(pixi_projection||(pixi_projection={})),function(e){var f=[new PIXI.Point,new PIXI.Point,new PIXI.Point,new PIXI.Point],h=[0,0,0,0],t=function(){function e(){this.surfaceID="default",this._updateID=0,this.vertexSrc="",this.fragmentSrc=""}return e.prototype.fillUniforms=function(e){},e.prototype.clear=function(){},e.prototype.boundsQuad=function(e,t,r){for(var i=t[0],n=t[1],o=t[0],a=t[1],s=2;s<8;s+=2)i>t[s]&&(i=t[s]),o<t[s]&&(o=t[s]),n>t[s+1]&&(n=t[s+1]),a<t[s+1]&&(a=t[s+1]);if(f[0].set(i,n),this.apply(f[0],f[0]),f[1].set(o,n),this.apply(f[1],f[1]),f[2].set(o,a),this.apply(f[2],f[2]),f[3].set(i,a),this.apply(f[3],f[3]),r)r.apply(f[0],f[0]),r.apply(f[1],f[1]),r.apply(f[2],f[2]),r.apply(f[3],f[3]),t[0]=f[0].x,t[1]=f[0].y,t[2]=f[1].x,t[3]=f[1].y,t[4]=f[2].x,t[5]=f[2].y,t[6]=f[3].x,t[7]=f[3].y;else{for(s=1;s<=3;s++)if(f[s].y<f[0].y||f[s].y==f[0].y&&f[s].x<f[0].x){var u=f[0];f[0]=f[s],f[s]=u}for(s=1;s<=3;s++)h[s]=Math.atan2(f[s].y-f[0].y,f[s].x-f[0].x);for(s=1;s<=3;s++)for(var c=s+1;c<=3;c++)if(h[s]>h[c]){u=f[s];f[s]=f[c],f[c]=u;var l=h[s];h[s]=h[c],h[c]=l}if(t[0]=f[0].x,t[1]=f[0].y,t[2]=f[1].x,t[3]=f[1].y,t[4]=f[2].x,t[5]=f[2].y,t[6]=f[3].x,t[7]=f[3].y,(f[3].x-f[2].x)*(f[1].y-f[2].y)-(f[1].x-f[2].x)*(f[3].y-f[2].y)<0)return t[4]=f[3].x,void(t[5]=f[3].y)}},e}();e.Surface=t}(pixi_projection||(pixi_projection={})),function(e){var S=new PIXI.Matrix,n=new PIXI.Rectangle,M=new PIXI.Point,t=function(t){function e(){var e=t.call(this)||this;return e.distortion=new PIXI.Point,e}return __extends(e,t),e.prototype.clear=function(){this.distortion.set(0,0)},e.prototype.apply=function(e,t){t=t||new PIXI.Point;var r=this.distortion,i=e.x*e.y;return t.x=e.x+r.x*i,t.y=e.y+r.y*i,t},e.prototype.applyInverse=function(e,t){t=t||new PIXI.Point;var r=e.x,i=e.y,n=this.distortion.x,o=this.distortion.y;if(0==n)t.x=r,t.y=i/(1+o*r);else if(0==o)t.y=i,t.x=r/(1+n*i);else{var a=.5*(i*n-r*o+1)/o,s=a*a+r/o;if(s<=1e-5)return void t.set(NaN,NaN);t.x=0<o?-a+Math.sqrt(s):-a-Math.sqrt(s),t.y=(r/t.x-1)/n}return t},e.prototype.mapSprite=function(e,t,r){var i=e.texture;return n.x=-e.anchor.x*i.orig.width,n.y=-e.anchor.y*i.orig.height,n.width=i.orig.width,n.height=i.orig.height,this.mapQuad(n,t,r||e.transform)},e.prototype.mapQuad=function(e,t,r){var i=-e.x/e.width,n=-e.y/e.height,o=(1-e.x)/e.width,a=(1-e.y)/e.height,s=t[0].x*(1-i)+t[1].x*i,u=t[0].y*(1-i)+t[1].y*i,c=t[0].x*(1-o)+t[1].x*o,l=t[0].y*(1-o)+t[1].y*o,f=t[3].x*(1-i)+t[2].x*i,h=t[3].y*(1-i)+t[2].y*i,d=t[3].x*(1-o)+t[2].x*o,p=t[3].y*(1-o)+t[2].y*o,v=s*(1-n)+f*n,m=u*(1-n)+h*n,b=c*(1-n)+d*n,y=l*(1-n)+p*n,g=s*(1-a)+f*a,_=u*(1-a)+h*a,w=c*(1-a)+d*a,x=l*(1-a)+p*a,T=S;return T.tx=v,T.ty=m,T.a=b-v,T.b=y-m,T.c=g-v,T.d=_-m,M.set(w,x),T.applyInverse(M,M),this.distortion.set(M.x-1,M.y-1),r.setFromMatrix(T),this},e.prototype.fillUniforms=function(e){e.distortion=e.distortion||new Float32Array([0,0,0,0]);var t=Math.abs(this.distortion.x),r=Math.abs(this.distortion.y);e.distortion[0]=1e4*t<=r?0:this.distortion.x,e.distortion[1]=1e4*r<=t?0:this.distortion.y,e.distortion[2]=1/e.distortion[0],e.distortion[3]=1/e.distortion[1]},e}(e.Surface);e.BilinearSurface=t}(pixi_projection||(pixi_projection={})),function(r){var e=function(t){function e(){var e=t.call(this)||this;return e.proj=new r.ProjectionSurface(e.transform),e}return __extends(e,t),Object.defineProperty(e.prototype,"worldTransform",{get:function(){return this.proj},enumerable:!0,configurable:!0}),e}(PIXI.Container);r.Container2s=e}(pixi_projection||(pixi_projection={})),function(r){var i=PIXI.TransformStatic.prototype.updateTransform;function t(e){var t=this.proj,r=e.proj;return r?r._surface?(t._activeProjection=r,this.updateLocalTransform(),this.localTransform.copy(this.worldTransform),void(this._parentID<0&&++this._worldID)):(i.call(this,e),void(t._activeProjection=r._activeProjection)):(i.call(this,e),void(t._activeProjection=null))}var e=function(i){function e(e,t){var r=i.call(this,e,t)||this;return r._surface=null,r._activeProjection=null,r._currentSurfaceID=-1,r._currentLegacyID=-1,r._lastUniforms=null,r}return __extends(e,i),Object.defineProperty(e.prototype,"enabled",{set:function(e){e!==this._enabled&&(this._enabled=e,this.legacy.updateTransform=e?t:PIXI.TransformStatic.prototype.updateTransform,this.legacy._parentID=-1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"surface",{get:function(){return this._surface},set:function(e){this._surface!=e&&(this._surface=e||null,this.legacy._parentID=-1)},enumerable:!0,configurable:!0}),e.prototype.applyPartial=function(e,t){return null!==this._activeProjection?(t=this.legacy.worldTransform.apply(e,t),this._activeProjection.surface.apply(t,t)):null!==this._surface?this.surface.apply(e,t):this.legacy.worldTransform.apply(e,t)},e.prototype.apply=function(e,t){return null!==this._activeProjection?(t=this.legacy.worldTransform.apply(e,t),this._activeProjection.surface.apply(t,t),this._activeProjection.legacy.worldTransform.apply(t,t)):null!==this._surface?(t=this.surface.apply(e,t),this.legacy.worldTransform.apply(t,t)):this.legacy.worldTransform.apply(e,t)},e.prototype.applyInverse=function(e,t){return null!==this._activeProjection?(t=this._activeProjection.legacy.worldTransform.applyInverse(e,t),this._activeProjection._surface.applyInverse(t,t),this.legacy.worldTransform.applyInverse(t,t)):null!==this._surface?(t=this.legacy.worldTransform.applyInverse(e,t),this._surface.applyInverse(t,t)):this.legacy.worldTransform.applyInverse(e,t)},e.prototype.mapBilinearSprite=function(e,t){this._surface instanceof r.BilinearSurface||(this.surface=new r.BilinearSurface),this.surface.mapSprite(e,t,this.legacy)},e.prototype.clear=function(){this.surface&&this.surface.clear()},Object.defineProperty(e.prototype,"uniforms",{get:function(){return this._currentLegacyID===this.legacy._worldID&&this._currentSurfaceID===this.surface._updateID||(this._lastUniforms=this._lastUniforms||{},this._lastUniforms.worldTransform=this.legacy.worldTransform.toArray(!0),this._surface.fillUniforms(this._lastUniforms)),this._lastUniforms},enumerable:!0,configurable:!0}),e}(r.AbstractProjection);r.ProjectionSurface=e}(pixi_projection||(pixi_projection={})),function(e){var t=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.size=100,e.MAX_TEXTURES_LOCAL=1,e.shaderVert="precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec3 aTrans1;\nattribute vec3 aTrans2;\nattribute vec4 aFrame;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\nuniform mat3 worldTransform;\n\nvarying vec2 vTextureCoord;\nvarying vec3 vTrans1;\nvarying vec3 vTrans2;\nvarying vec4 vFrame;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n gl_Position.xyw = projectionMatrix * worldTransform * vec3(aVertexPosition, 1.0);\n gl_Position.z = 0.0;\n \n vTextureCoord = aVertexPosition;\n vTrans1 = aTrans1;\n vTrans2 = aTrans2;\n vTextureId = aTextureId;\n vColor = aColor;\n vFrame = aFrame;\n}\n",e.shaderFrag="precision highp float;\nvarying vec2 vTextureCoord;\nvarying vec3 vTrans1;\nvarying vec3 vTrans2;\nvarying vec4 vFrame;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nuniform sampler2D uSamplers[%count%];\nuniform vec2 samplerSize[%count%]; \nuniform vec4 distortion;\n\nvoid main(void){\nvec2 surface;\nvec2 surface2;\n\nfloat vx = vTextureCoord.x;\nfloat vy = vTextureCoord.y;\nfloat dx = distortion.x;\nfloat dy = distortion.y;\nfloat revx = distortion.z;\nfloat revy = distortion.w;\n\nif (distortion.x == 0.0) {\n surface.x = vx;\n surface.y = vy / (1.0 + dy * vx);\n surface2 = surface;\n} else\nif (distortion.y == 0.0) {\n surface.y = vy;\n surface.x = vx/ (1.0 + dx * vy);\n surface2 = surface;\n} else {\n float c = vy * dx - vx * dy;\n float b = (c + 1.0) * 0.5;\n float b2 = (-c + 1.0) * 0.5;\n float d = b * b + vx * dy;\n if (d < -0.00001) {\n discard;\n }\n d = sqrt(max(d, 0.0));\n surface.x = (- b + d) * revy;\n surface2.x = (- b - d) * revy;\n surface.y = (- b2 + d) * revx;\n surface2.y = (- b2 - d) * revx;\n}\n\nvec2 uv;\nuv.x = vTrans1.x * surface.x + vTrans1.y * surface.y + vTrans1.z;\nuv.y = vTrans2.x * surface.x + vTrans2.y * surface.y + vTrans2.z;\n\nvec2 pixels = uv * samplerSize[0];\n\nif (pixels.x < vFrame.x || pixels.x > vFrame.z ||\n pixels.y < vFrame.y || pixels.y > vFrame.w) {\n uv.x = vTrans1.x * surface2.x + vTrans1.y * surface2.y + vTrans1.z;\n uv.y = vTrans2.x * surface2.x + vTrans2.y * surface2.y + vTrans2.z;\n pixels = uv * samplerSize[0];\n \n if (pixels.x < vFrame.x || pixels.x > vFrame.z ||\n pixels.y < vFrame.y || pixels.y > vFrame.w) {\n discard;\n }\n}\n\nvec4 edge;\nedge.xy = clamp(pixels - vFrame.xy + 0.5, vec2(0.0, 0.0), vec2(1.0, 1.0));\nedge.zw = clamp(vFrame.zw - pixels + 0.5, vec2(0.0, 0.0), vec2(1.0, 1.0));\n\nfloat alpha = 1.0; //edge.x * edge.y * edge.z * edge.w;\nvec4 rColor = vColor * alpha;\n\nfloat textureId = floor(vTextureId+0.5);\nvec4 color;\nvec2 textureCoord = uv;\n%forloop%\ngl_FragColor = color * rColor;\n}",e.defUniforms={worldTransform:new Float32Array([1,0,0,0,1,0,0,0,1]),distortion:new Float32Array([0,0])},e}return __extends(e,t),e.prototype.getUniforms=function(e){var t=e.proj;this.shader;return null!==t.surface?t.uniforms:null!==t._activeProjection?t._activeProjection.uniforms:this.defUniforms},e.prototype.createVao=function(e){var t=this.shader.attributes;this.vertSize=14,this.vertByteSize=4*this.vertSize;var r=this.renderer.gl,i=this.renderer.createVao().addIndex(this.indexBuffer).addAttribute(e,t.aVertexPosition,r.FLOAT,!1,this.vertByteSize,0).addAttribute(e,t.aTrans1,r.FLOAT,!1,this.vertByteSize,8).addAttribute(e,t.aTrans2,r.FLOAT,!1,this.vertByteSize,20).addAttribute(e,t.aFrame,r.FLOAT,!1,this.vertByteSize,32).addAttribute(e,t.aColor,r.UNSIGNED_BYTE,!0,this.vertByteSize,48);return t.aTextureId&&i.addAttribute(e,t.aTextureId,r.FLOAT,!1,this.vertByteSize,52),i},e.prototype.fillVertices=function(e,t,r,i,n,o){for(var a=i.vertexData,s=i._texture,u=(s.orig.width,s.orig.height,i._anchor._x,i._anchor._y,s._frame),c=i.aTrans,l=0;l<4;l++)e[r]=a[2*l],e[r+1]=a[2*l+1],e[r+2]=c.a,e[r+3]=c.c,e[r+4]=c.tx,e[r+5]=c.b,e[r+6]=c.d,e[r+7]=c.ty,e[r+8]=u.x,e[r+9]=u.y,e[r+10]=u.x+u.width,e[r+11]=u.y+u.height,t[r+12]=n,e[r+13]=o,r+=14},e}((pixi_projection||(pixi_projection={})).webgl.MultiTextureSpriteRenderer);PIXI.WebGLRenderer.registerPlugin("sprite_bilinear",t)}(),function(e){var t=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.size=100,e.MAX_TEXTURES_LOCAL=1,e.shaderVert="precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec3 aTrans1;\nattribute vec3 aTrans2;\nattribute vec4 aFrame;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\nuniform mat3 worldTransform;\n\nvarying vec2 vTextureCoord;\nvarying vec3 vTrans1;\nvarying vec3 vTrans2;\nvarying vec4 vFrame;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n gl_Position.xyw = projectionMatrix * worldTransform * vec3(aVertexPosition, 1.0);\n gl_Position.z = 0.0;\n \n vTextureCoord = aVertexPosition;\n vTrans1 = aTrans1;\n vTrans2 = aTrans2;\n vTextureId = aTextureId;\n vColor = aColor;\n vFrame = aFrame;\n}\n",e.shaderFrag="precision highp float;\nvarying vec2 vTextureCoord;\nvarying vec3 vTrans1;\nvarying vec3 vTrans2;\nvarying vec4 vFrame;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nuniform sampler2D uSamplers[%count%];\nuniform vec2 samplerSize[%count%]; \nuniform vec4 params;\n\nvoid main(void){\nvec2 surface;\n\nfloat vx = vTextureCoord.x;\nfloat vy = vTextureCoord.y;\nfloat aleph = params.x;\nfloat bet = params.y;\nfloat A = params.z;\nfloat B = params.w;\n\nif (aleph == 0.0) {\n\tsurface.y = vy / (1.0 + vx * bet);\n\tsurface.x = vx;\n}\nelse if (bet == 0.0) {\n\tsurface.x = vx / (1.0 + vy * aleph);\n\tsurface.y = vy;\n} else {\n\tsurface.x = vx * (bet + 1.0) / (bet + 1.0 + vy * aleph);\n\tsurface.y = vy * (aleph + 1.0) / (aleph + 1.0 + vx * bet);\n}\n\nvec2 uv;\nuv.x = vTrans1.x * surface.x + vTrans1.y * surface.y + vTrans1.z;\nuv.y = vTrans2.x * surface.x + vTrans2.y * surface.y + vTrans2.z;\n\nvec2 pixels = uv * samplerSize[0];\n\nvec4 edge;\nedge.xy = clamp(pixels - vFrame.xy + 0.5, vec2(0.0, 0.0), vec2(1.0, 1.0));\nedge.zw = clamp(vFrame.zw - pixels + 0.5, vec2(0.0, 0.0), vec2(1.0, 1.0));\n\nfloat alpha = edge.x * edge.y * edge.z * edge.w;\nvec4 rColor = vColor * alpha;\n\nfloat textureId = floor(vTextureId+0.5);\nvec4 color;\nvec2 textureCoord = uv;\n%forloop%\ngl_FragColor = color * rColor;\n}",e.defUniforms={worldTransform:new Float32Array([1,0,0,0,1,0,0,0,1]),distortion:new Float32Array([0,0])},e}return __extends(e,t),e.prototype.getUniforms=function(e){var t=e.proj;this.shader;return null!==t.surface?t.uniforms:null!==t._activeProjection?t._activeProjection.uniforms:this.defUniforms},e.prototype.createVao=function(e){var t=this.shader.attributes;this.vertSize=14,this.vertByteSize=4*this.vertSize;var r=this.renderer.gl,i=this.renderer.createVao().addIndex(this.indexBuffer).addAttribute(e,t.aVertexPosition,r.FLOAT,!1,this.vertByteSize,0).addAttribute(e,t.aTrans1,r.FLOAT,!1,this.vertByteSize,8).addAttribute(e,t.aTrans2,r.FLOAT,!1,this.vertByteSize,20).addAttribute(e,t.aFrame,r.FLOAT,!1,this.vertByteSize,32).addAttribute(e,t.aColor,r.UNSIGNED_BYTE,!0,this.vertByteSize,48);return t.aTextureId&&i.addAttribute(e,t.aTextureId,r.FLOAT,!1,this.vertByteSize,52),i},e.prototype.fillVertices=function(e,t,r,i,n,o){for(var a=i.vertexData,s=i._texture,u=(s.orig.width,s.orig.height,i._anchor._x,i._anchor._y,s._frame),c=i.aTrans,l=0;l<4;l++)e[r]=a[2*l],e[r+1]=a[2*l+1],e[r+2]=c.a,e[r+3]=c.c,e[r+4]=c.tx,e[r+5]=c.b,e[r+6]=c.d,e[r+7]=c.ty,e[r+8]=u.x,e[r+9]=u.y,e[r+10]=u.x+u.width,e[r+11]=u.y+u.height,t[r+12]=n,e[r+13]=o,r+=14},e}((pixi_projection||(pixi_projection={})).webgl.MultiTextureSpriteRenderer);PIXI.WebGLRenderer.registerPlugin("sprite_strange",t)}(),function(e){var S=new PIXI.Matrix,n=new PIXI.Rectangle,M=new PIXI.Point,t=function(t){function e(){var e=t.call(this)||this;return e.params=[0,0,NaN,NaN],e}return __extends(e,t),e.prototype.clear=function(){var e=this.params;e[0]=0,e[1]=0,e[2]=NaN,e[3]=NaN},e.prototype.setAxisX=function(e,t,r){var i=e.x,n=e.y,o=Math.sqrt(i*i+n*n),a=r.rotation;0!==a&&(r.skew._x-=a,r.skew._y+=a,r.rotation=0),r.skew.y=Math.atan2(n,i);var s=this.params;s[2]=0!==t?-o*t:NaN,this._calc01()},e.prototype.setAxisY=function(e,t,r){var i=e.x,n=e.y,o=Math.sqrt(i*i+n*n),a=r.rotation;0!==a&&(r.skew._x-=a,r.skew._y+=a,r.rotation=0),r.skew.x=-Math.atan2(n,i)+Math.PI/2;var s=this.params;s[3]=0!==t?-o*t:NaN,this._calc01()},e.prototype._calc01=function(){var e=this.params;if(isNaN(e[2]))e[1]=0,isNaN(e[3])?e[0]=0:e[0]=1/e[3];else if(isNaN(e[3]))e[0]=0,e[1]=1/e[2];else{var t=1-e[2]*e[3];e[0]=(1-e[2])/t,e[1]=(1-e[3])/t}},e.prototype.apply=function(e,t){t=t||new PIXI.Point;var r=this.params[0],i=this.params[1],n=this.params[2],o=this.params[3],a=e.x,s=e.y;if(0===r)t.y=s*(1+a*i),t.x=a;else if(0===i)t.x=a*(1+s*r),t.y=s;else{var u=n*o-s*a;t.x=n*a*(o+s)/u,t.y=o*s*(n+a)/u}return t},e.prototype.applyInverse=function(e,t){t=t||new PIXI.Point;var r=this.params[0],i=this.params[1],n=(this.params[2],this.params[3],e.x),o=e.y;return 0===r?(t.y=o/(1+n*i),t.x=n):0===i?(t.x=n*(1+o*r),t.y=o):(t.x=n*(i+1)/(i+1+o*r),t.y=o*(r+1)/(r+1+n*i)),t},e.prototype.mapSprite=function(e,t,r){var i=e.texture;return n.x=-e.anchor.x*i.orig.width,n.y=-e.anchor.y*i.orig.height,n.width=i.orig.width,n.height=i.orig.height,this.mapQuad(n,t,r||e.transform)},e.prototype.mapQuad=function(e,t,r){var i=-e.x/e.width,n=-e.y/e.height,o=(1-e.x)/e.width,a=(1-e.y)/e.height,s=t[0].x*(1-i)+t[1].x*i,u=t[0].y*(1-i)+t[1].y*i,c=t[0].x*(1-o)+t[1].x*o,l=t[0].y*(1-o)+t[1].y*o,f=t[3].x*(1-i)+t[2].x*i,h=t[3].y*(1-i)+t[2].y*i,d=t[3].x*(1-o)+t[2].x*o,p=t[3].y*(1-o)+t[2].y*o,v=s*(1-n)+f*n,m=u*(1-n)+h*n,b=c*(1-n)+d*n,y=l*(1-n)+p*n,g=s*(1-a)+f*a,_=u*(1-a)+h*a,w=c*(1-a)+d*a,x=l*(1-a)+p*a,T=S;return T.tx=v,T.ty=m,T.a=b-v,T.b=y-m,T.c=g-v,T.d=_-m,M.set(w,x),T.applyInverse(M,M),r.setFromMatrix(T),this},e.prototype.fillUniforms=function(e){var t=this.params,r=e.params||new Float32Array([0,0,0,0]);(e.params=r)[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3]},e}(e.Surface);e.StrangeSurface=t}(pixi_projection||(pixi_projection={})),function(e){PIXI.Sprite.prototype.convertTo2s=function(){this.proj||(this.pluginName="sprite_bilinear",this.aTrans=new PIXI.Matrix,this.calculateVertices=e.Sprite2s.prototype.calculateVertices,this.calculateTrimmedVertices=e.Sprite2s.prototype.calculateTrimmedVertices,this._calculateBounds=e.Sprite2s.prototype._calculateBounds,PIXI.Container.prototype.convertTo2s.call(this))},PIXI.Container.prototype.convertTo2s=function(){this.proj||(this.proj=new e.Projection2d(this.transform),Object.defineProperty(this,"worldTransform",{get:function(){return this.proj},enumerable:!0,configurable:!0}))},PIXI.Container.prototype.convertSubtreeTo2s=function(){this.convertTo2s();for(var e=0;e<this.children.length;e++)this.children[e].convertSubtreeTo2s()}}(pixi_projection||(pixi_projection={})),function(i){var e=function(r){function e(e){var t=r.call(this,e)||this;return t.aTrans=new PIXI.Matrix,t.proj=new i.ProjectionSurface(t.transform),t.pluginName="sprite_bilinear",t}return __extends(e,r),e.prototype._calculateBounds=function(){this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData)},e.prototype.calculateVertices=function(){var e=this.transform._worldID,t=this._texture._updateID;if(this._transformID!==e||this._textureID!==t){this._transformID=e,this._textureID=t;var r=this._texture,i=this.vertexData,n=r.trim,o=r.orig,a=this._anchor,s=0,u=0,c=0,l=0;if(c=n?(s=(u=n.x-a._x*o.width)+n.width,(l=n.y-a._y*o.height)+n.height):(s=(u=-a._x*o.width)+o.width,(l=-a._y*o.height)+o.height),this.proj._surface)i[0]=u,i[1]=l,i[2]=s,i[3]=l,i[4]=s,i[5]=c,i[6]=u,i[7]=c,this.proj._surface.boundsQuad(i,i);else{var f=this.transform.worldTransform,h=f.a,d=f.b,p=f.c,v=f.d,m=f.tx,b=f.ty;i[0]=h*u+p*l+m,i[1]=v*l+d*u+b,i[2]=h*s+p*l+m,i[3]=v*l+d*s+b,i[4]=h*s+p*c+m,i[5]=v*c+d*s+b,i[6]=h*u+p*c+m,i[7]=v*c+d*u+b,this.proj._activeProjection&&this.proj._activeProjection.surface.boundsQuad(i,i)}r.transform||(r.transform=new PIXI.TextureMatrix(r)),r.transform.update();var y=this.aTrans;y.set(o.width,0,0,o.height,u,l),null===this.proj._surface&&y.prepend(this.transform.worldTransform),y.invert(),y.prepend(r.transform.mapCoord)}},e.prototype.calculateTrimmedVertices=function(){var e=this.transform._worldID,t=this._texture._updateID;if(this.vertexTrimmedData){if(this._transformTrimmedID===e&&this._textureTrimmedID===t)return}else this.vertexTrimmedData=new Float32Array(8);this._transformTrimmedID=e,this._textureTrimmedID=t;var r=this._texture,i=this.vertexTrimmedData,n=r.orig,o=this._anchor,a=-o._x*n.width,s=a+n.width,u=-o._y*n.height,c=u+n.height;if(this.proj._surface)i[0]=a,i[1]=u,i[2]=s,i[3]=u,i[4]=s,i[5]=c,i[6]=a,i[7]=c,this.proj._surface.boundsQuad(i,i,this.transform.worldTransform);else{var l=this.transform.worldTransform,f=l.a,h=l.b,d=l.c,p=l.d,v=l.tx,m=l.ty;i[0]=f*a+d*u+v,i[1]=p*u+h*a+m,i[2]=f*s+d*u+v,i[3]=p*u+h*s+m,i[4]=f*s+d*c+v,i[5]=p*c+h*s+m,i[6]=f*a+d*c+v,i[7]=p*c+h*a+m,this.proj._activeProjection&&this.proj._activeProjection.surface.boundsQuad(i,i,this.proj._activeProjection.legacy.worldTransform)}},Object.defineProperty(e.prototype,"worldTransform",{get:function(){return this.proj},enumerable:!0,configurable:!0}),e}(PIXI.Sprite);i.Sprite2s=e}(pixi_projection||(pixi_projection={})),function(o){var e=function(n){function e(e,t,r){var i=n.call(this,e,t,r)||this;return i.aTrans=new PIXI.Matrix,i.proj=new o.ProjectionSurface(i.transform),i.pluginName="sprite_bilinear",i}return __extends(e,n),Object.defineProperty(e.prototype,"worldTransform",{get:function(){return this.proj},enumerable:!0,configurable:!0}),e}(PIXI.Text);(o.Text2s=e).prototype.calculateVertices=o.Sprite2s.prototype.calculateVertices,e.prototype.calculateTrimmedVertices=o.Sprite2s.prototype.calculateTrimmedVertices,e.prototype._calculateBounds=o.Sprite2s.prototype._calculateBounds}(pixi_projection||(pixi_projection={})),function(o){o.container2dWorldTransform=function(){return this.proj.affine?this.transform.worldTransform:this.proj.world};var e=function(t){function e(){var e=t.call(this)||this;return e.proj=new o.Projection2d(e.transform),e}return __extends(e,t),e.prototype.toLocal=function(e,t,r,i,n){return void 0===n&&(n=o.TRANSFORM_STEP.ALL),t&&(e=t.toGlobal(e,r,i)),i||this._recursivePostUpdateTransform(),n>=o.TRANSFORM_STEP.PROJ?(i||this.displayObjectUpdateTransform(),this.proj.affine?this.transform.worldTransform.applyInverse(e,r):this.proj.world.applyInverse(e,r)):(this.parent?r=this.parent.worldTransform.applyInverse(e,r):r.copy(e),n===o.TRANSFORM_STEP.NONE?r:this.transform.localTransform.applyInverse(r,r))},Object.defineProperty(e.prototype,"worldTransform",{get:function(){return this.proj.affine?this.transform.worldTransform:this.proj.world},enumerable:!0,configurable:!0}),e}(PIXI.Container);o.Container2d=e,o.container2dToLocal=e.prototype.toLocal}(pixi_projection||(pixi_projection={})),function(e){var u,t,b=PIXI.Point,r=[1,0,0,0,1,0,0,0,1];(t=u=e.AFFINE||(e.AFFINE={}))[t.NONE=0]="NONE",t[t.FREE=1]="FREE",t[t.AXIS_X=2]="AXIS_X",t[t.AXIS_Y=3]="AXIS_Y",t[t.POINT=4]="POINT",t[t.AXIS_XR=5]="AXIS_XR";var i=function(){function e(e){this.floatArray=null,this.mat3=new Float64Array(e||r)}return Object.defineProperty(e.prototype,"a",{get:function(){return this.mat3[0]/this.mat3[8]},set:function(e){this.mat3[0]=e*this.mat3[8]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"b",{get:function(){return this.mat3[1]/this.mat3[8]},set:function(e){this.mat3[1]=e*this.mat3[8]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"c",{get:function(){return this.mat3[3]/this.mat3[8]},set:function(e){this.mat3[3]=e*this.mat3[8]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"d",{get:function(){return this.mat3[4]/this.mat3[8]},set:function(e){this.mat3[4]=e*this.mat3[8]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tx",{get:function(){return this.mat3[6]/this.mat3[8]},set:function(e){this.mat3[6]=e*this.mat3[8]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ty",{get:function(){return this.mat3[7]/this.mat3[8]},set:function(e){this.mat3[7]=e*this.mat3[8]},enumerable:!0,configurable:!0}),e.prototype.set=function(e,t,r,i,n,o){var a=this.mat3;return a[0]=e,a[1]=t,a[2]=0,a[3]=r,a[4]=i,a[5]=0,a[6]=n,a[7]=o,a[8]=1,this},e.prototype.toArray=function(e,t){this.floatArray||(this.floatArray=new Float32Array(9));var r=t||this.floatArray,i=this.mat3;return e?(r[0]=i[0],r[1]=i[1],r[2]=i[2],r[3]=i[3],r[4]=i[4],r[5]=i[5],r[6]=i[6],r[7]=i[7]):(r[0]=i[0],r[1]=i[3],r[2]=i[6],r[3]=i[1],r[4]=i[4],r[5]=i[7],r[6]=i[2],r[7]=i[5]),r[8]=i[8],r},e.prototype.apply=function(e,t){t=t||new PIXI.Point;var r=this.mat3,i=e.x,n=e.y,o=1/(r[2]*i+r[5]*n+r[8]);return t.x=o*(r[0]*i+r[3]*n+r[6]),t.y=o*(r[1]*i+r[4]*n+r[7]),t},e.prototype.translate=function(e,t){var r=this.mat3;return r[0]+=e*r[2],r[1]+=t*r[2],r[3]+=e*r[5],r[4]+=t*r[5],r[6]+=e*r[8],r[7]+=t*r[8],this},e.prototype.scale=function(e,t){var r=this.mat3;return r[0]*=e,r[1]*=t,r[3]*=e,r[4]*=t,r[6]*=e,r[7]*=t,this},e.prototype.scaleAndTranslate=function(e,t,r,i){var n=this.mat3;n[0]=e*n[0]+r*n[2],n[1]=t*n[1]+i*n[2],n[3]=e*n[3]+r*n[5],n[4]=t*n[4]+i*n[5],n[6]=e*n[6]+r*n[8],n[7]=t*n[7]+i*n[8]},e.prototype.applyInverse=function(e,t){t=t||new b;var r=this.mat3,i=e.x,n=e.y,o=r[0],a=r[3],s=r[6],u=r[1],c=r[4],l=r[7],f=r[2],h=r[5],d=r[8],p=(d*c-l*h)*i+(-d*a+s*h)*n+(l*a-s*c),v=(-d*u+l*f)*i+(d*o-s*f)*n+(-l*o+s*u),m=(h*u-c*f)*i+(-h*o+a*f)*n+(c*o-a*u);return t.x=p/m,t.y=v/m,t},e.prototype.invert=function(){var e=this.mat3,t=e[0],r=e[1],i=e[2],n=e[3],o=e[4],a=e[5],s=e[6],u=e[7],c=e[8],l=c*o-a*u,f=-c*n+a*s,h=u*n-o*s,d=t*l+r*f+i*h;return d&&(d=1/d,e[0]=l*d,e[1]=(-c*r+i*u)*d,e[2]=(a*r-i*o)*d,e[3]=f*d,e[4]=(c*t-i*s)*d,e[5]=(-a*t+i*n)*d,e[6]=h*d,e[7]=(-u*t+r*s)*d,e[8]=(o*t-r*n)*d),this},e.prototype.identity=function(){var e=this.mat3;return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,this},e.prototype.clone=function(){return new e(this.mat3)},e.prototype.copyTo=function(e){var t=this.mat3,r=e.mat3;return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r[6]=t[6],r[7]=t[7],r[8]=t[8],e},e.prototype.copyTo2dOr3d=function(e){return this.copyTo(e)},e.prototype.copy=function(e,t,r){var i=this.mat3,n=1/i[8],o=i[6]*n,a=i[7]*n;if(e.a=(i[0]-i[2]*o)*n,e.b=(i[1]-i[2]*a)*n,e.c=(i[3]-i[5]*o)*n,e.d=(i[4]-i[5]*a)*n,e.tx=o,e.ty=a,2<=t){var s=e.a*e.d-e.b*e.c;r||(s=Math.abs(s)),t===u.POINT?(s=0<s?1:-1,e.a=s,e.b=0,e.c=0,e.d=s):t===u.AXIS_X?(s/=Math.sqrt(e.b*e.b+e.d*e.d),e.c=0,e.d=s):t===u.AXIS_Y?(s/=Math.sqrt(e.a*e.a+e.c*e.c),e.a=s,e.c=0):t===u.AXIS_XR&&(e.a=e.d*s,e.c=-e.b*s)}},e.prototype.copyFrom=function(e){var t=this.mat3;return t[0]=e.a,t[1]=e.b,t[2]=0,t[3]=e.c,t[4]=e.d,t[5]=0,t[6]=e.tx,t[7]=e.ty,t[8]=1,this},e.prototype.setToMultLegacy=function(e,t){var r=this.mat3,i=t.mat3,n=e.a,o=e.b,a=e.c,s=e.d,u=e.tx,c=e.ty,l=i[0],f=i[1],h=i[2],d=i[3],p=i[4],v=i[5],m=i[6],b=i[7],y=i[8];return r[0]=l*n+f*a+h*u,r[1]=l*o+f*s+h*c,r[2]=h,r[3]=d*n+p*a+v*u,r[4]=d*o+p*s+v*c,r[5]=v,r[6]=m*n+b*a+y*u,r[7]=m*o+b*s+y*c,r[8]=y,this},e.prototype.setToMultLegacy2=function(e,t){var r=this.mat3,i=e.mat3,n=i[0],o=i[1],a=i[2],s=i[3],u=i[4],c=i[5],l=i[6],f=i[7],h=i[8],d=t.a,p=t.b,v=t.c,m=t.d,b=t.tx,y=t.ty;return r[0]=d*n+p*s,r[1]=d*o+p*u,r[2]=d*a+p*c,r[3]=v*n+m*s,r[4]=v*o+m*u,r[5]=v*a+m*c,r[6]=b*n+y*s+l,r[7]=b*o+y*u+f,r[8]=b*a+y*c+h,this},e.prototype.setToMult=function(e,t){var r=this.mat3,i=e.mat3,n=t.mat3,o=i[0],a=i[1],s=i[2],u=i[3],c=i[4],l=i[5],f=i[6],h=i[7],d=i[8],p=n[0],v=n[1],m=n[2],b=n[3],y=n[4],g=n[5],_=n[6],w=n[7],x=n[8];return r[0]=p*o+v*u+m*f,r[1]=p*a+v*c+m*h,r[2]=p*s+v*l+m*d,r[3]=b*o+y*u+g*f,r[4]=b*a+y*c+g*h,r[5]=b*s+y*l+g*d,r[6]=_*o+w*u+x*f,r[7]=_*a+w*c+x*h,r[8]=_*s+w*l+x*d,this},e.prototype.prepend=function(e){return e.mat3?this.setToMult(e,this):this.setToMultLegacy(e,this)},e.IDENTITY=new e,e.TEMP_MATRIX=new e,e}();e.Matrix2d=i}(pixi_projection||(pixi_projection={})),function(d){var p=new PIXI.Point,v=[new PIXI.Point,new PIXI.Point,new PIXI.Point,new PIXI.Point],n=new PIXI.Rectangle,m=new d.Matrix2d,e=function(i){function e(e,t){var r=i.call(this,e,t)||this;return r.matrix=new d.Matrix2d,r.pivot=new PIXI.ObservablePoint(r.onChange,r,0,0),r.reverseLocalOrder=!1,r.local=new d.Matrix2d,r.world=new d.Matrix2d,r}return __extends(e,i),e.prototype.onChange=function(){var e=this.pivot,t=this.matrix.mat3;t[6]=-(e._x*t[0]+e._y*t[3]),t[7]=-(e._x*t[1]+e._y*t[4]),this._projID++},e.prototype.setAxisX=function(e,t){void 0===t&&(t=1);var r=e.x,i=e.y,n=Math.sqrt(r*r+i*i),o=this.matrix.mat3;o[0]=r/n,o[1]=i/n,o[2]=t/n,this.onChange()},e.prototype.setAxisY=function(e,t){void 0===t&&(t=1);var r=e.x,i=e.y,n=Math.sqrt(r*r+i*i),o=this.matrix.mat3;o[3]=r/n,o[4]=i/n,o[5]=t/n,this.onChange()},e.prototype.mapSprite=function(e,t){var r=e.texture;return n.x=-e.anchor.x*r.orig.width,n.y=-e.anchor.y*r.orig.height,n.width=r.orig.width,n.height=r.orig.height,this.mapQuad(n,t)},e.prototype.mapQuad=function(e,t){v[0].set(e.x,e.y),v[1].set(e.x+e.width,e.y),v[2].set(e.x+e.width,e.y+e.height),v[3].set(e.x,e.y+e.height);var r=1,i=2,n=3;if(0!==d.utils.getIntersectionFactor(t[0],t[2],t[1],t[3],p)){r=1,i=3,n=2;var o=Math.sqrt((t[0].x-p.x)*(t[0].x-p.x)+(t[0].y-p.y)*(t[0].y-p.y)),a=Math.sqrt((t[r].x-p.x)*(t[r].x-p.x)+(t[r].y-p.y)*(t[r].y-p.y)),s=Math.sqrt((t[i].x-p.x)*(t[i].x-p.x)+(t[i].y-p.y)*(t[i].y-p.y)),u=Math.sqrt((t[n].x-p.x)*(t[n].x-p.x)+(t[n].y-p.y)*(t[n].y-p.y)),c=(o+u)/u,l=(a+s)/s,f=(a+s)/a,h=this.matrix.mat3;h[0]=v[0].x*c,h[1]=v[0].y*c,h[2]=c,h[3]=v[r].x*l,h[4]=v[r].y*l,h[5]=l,h[6]=v[i].x*f,h[7]=v[i].y*f,h[8]=f,this.matrix.invert(),(h=m.mat3)[0]=t[0].x,h[1]=t[0].y,h[2]=1,h[3]=t[r].x,h[4]=t[r].y,h[5]=1,h[6]=t[i].x,h[7]=t[i].y,h[8]=1,this.matrix.setToMult(m,this.matrix),this._projID++}},e.prototype.updateLocalTransform=function(e){0!==this._projID?this.reverseLocalOrder?this.local.setToMultLegacy2(this.matrix,e):this.local.setToMultLegacy(e,this.matrix):this.local.copyFrom(e)},e.prototype.clear=function(){i.prototype.clear.call(this),this.matrix.identity(),this.pivot.set(0,0)},e}(d.LinearProjection);d.Projection2d=e}(pixi_projection||(pixi_projection={})),function(s){var e=function(a){function e(e,t,r,i,n){var o=a.call(this,e,t,r,i,n)||this;return o.proj=new s.Projection2d(o.transform),o.pluginName="mesh2d",o}return __extends(e,a),e.prototype.toLocal=function(e,t,r,i,n){return void 0===n&&(n=s.TRANSFORM_STEP.ALL),s.container2dToLocal.call(this,e,t,r,i,n)},Object.defineProperty(e.prototype,"worldTransform",{get:function(){return this.proj.affine?this.transform.worldTransform:this.proj.world},enumerable:!0,configurable:!0}),e}(PIXI.mesh.Mesh);s.Mesh2d=e}(pixi_projection||(pixi_projection={})),function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.onContextChange=function(){var e=this.renderer.gl;this.shader=new PIXI.Shader(e,"precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position.xyw = projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0);\n gl_Position.z = 0.0;\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","\nvarying vec2 vTextureCoord;\nuniform vec4 uColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;\n}")},t}(PIXI.mesh.MeshRenderer);e.Mesh2dRenderer=t,PIXI.WebGLRenderer.registerPlugin("mesh2d",t)}(pixi_projection||(pixi_projection={})),function(e){function t(){this.proj||(this.proj=new e.Projection2d(this.transform),this.toLocal=e.Container2d.prototype.toLocal,Object.defineProperty(this,"worldTransform",{get:e.container2dWorldTransform,enumerable:!0,configurable:!0}))}PIXI.Container.prototype.convertTo2d=t,PIXI.Sprite.prototype.convertTo2d=function(){this.proj||(this.calculateVertices=e.Sprite2d.prototype.calculateVertices,this.calculateTrimmedVertices=e.Sprite2d.prototype.calculateTrimmedVertices,this._calculateBounds=e.Sprite2d.prototype._calculateBounds,this.pluginName="sprite2d",this.vertexData=new Float32Array(12),t.call(this))},PIXI.mesh.Mesh.prototype.convertTo2d=function(){this.proj||(this.pluginName="mesh2d",t.call(this))},PIXI.Container.prototype.convertSubtreeTo2d=function(){this.convertTo2d();for(var e=0;e<this.children.length;e++)this.children[e].convertSubtreeTo2d()}}(pixi_projection||(pixi_projection={})),function(o){var e=function(h){function e(e){var t=h.call(this,e)||this;return t.proj=new o.Projection2d(t.transform),t.pluginName="sprite2d",t.vertexData=new Float32Array(12),t}return __extends(e,h),e.prototype._calculateBounds=function(){this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData)},e.prototype.calculateVertices=function(){if(this.proj._affine)return 8!=this.vertexData.length&&(this.vertexData=new Float32Array(8)),void h.prototype.calculateVertices.call(this);12!=this.vertexData.length&&(this.vertexData=new Float32Array(12));var e=this.transform._worldID,t=this._texture._updateID;if(this._transformID!==e||this._textureID!==t){this._transformID=e,this._textureID=t;var r=this._texture,i=this.proj.world.mat3,n=this.vertexData,o=r.trim,a=r.orig,s=this._anchor,u=0,c=0,l=0,f=0;l=o?(u=(c=o.x-s._x*a.width)+o.width,(f=o.y-s._y*a.height)+o.height):(u=(c=-s._x*a.width)+a.width,(f=-s._y*a.height)+a.height),n[0]=i[0]*c+i[3]*f+i[6],n[1]=i[1]*c+i[4]*f+i[7],n[2]=i[2]*c+i[5]*f+i[8],n[3]=i[0]*u+i[3]*f+i[6],n[4]=i[1]*u+i[4]*f+i[7],n[5]=i[2]*u+i[5]*f+i[8],n[6]=i[0]*u+i[3]*l+i[6],n[7]=i[1]*u+i[4]*l+i[7],n[8]=i[2]*u+i[5]*l+i[8],n[9]=i[0]*c+i[3]*l+i[6],n[10]=i[1]*c+i[4]*l+i[7],n[11]=i[2]*c+i[5]*l+i[8]}},e.prototype.calculateTrimmedVertices=function(){if(this.proj._affine)h.prototype.calculateTrimmedVertices.call(this);else{var e=this.transform._worldID,t=this._texture._updateID;if(this.vertexTrimmedData){if(this._transformTrimmedID===e&&this._textureTrimmedID===t)return}else this.vertexTrimmedData=new Float32Array(8);this._transformTrimmedID=e,this._textureTrimmedID=t;var r=this._texture,i=this.vertexTrimmedData,n=r.orig,o=this._anchor,a=this.proj.world.mat3,s=-o._x*n.width,u=s+n.width,c=-o._y*n.height,l=c+n.height,f=1/(a[2]*s+a[5]*c+a[8]);i[0]=f*(a[0]*s+a[3]*c+a[6]),i[1]=f*(a[1]*s+a[4]*c+a[7]),f=1/(a[2]*u+a[5]*c+a[8]),i[2]=f*(a[0]*u+a[3]*c+a[6]),i[3]=f*(a[1]*u+a[4]*c+a[7]),f=1/(a[2]*u+a[5]*l+a[8]),i[4]=f*(a[0]*u+a[3]*l+a[6]),i[5]=f*(a[1]*u+a[4]*l+a[7]),f=1/(a[2]*s+a[5]*l+a[8]),i[6]=f*(a[0]*s+a[3]*l+a[6]),i[7]=f*(a[1]*s+a[4]*l+a[7])}},e.prototype.toLocal=function(e,t,r,i,n){return void 0===n&&(n=o.TRANSFORM_STEP.ALL),o.container2dToLocal.call(this,e,t,r,i,n)},Object.defineProperty(e.prototype,"worldTransform",{get:function(){return this.proj.affine?this.transform.worldTransform:this.proj.world},enumerable:!0,configurable:!0}),e}(PIXI.Sprite);o.Sprite2d=e}(pixi_projection||(pixi_projection={})),function(e){var t=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.shaderVert="precision highp float;\nattribute vec3 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n gl_Position.xyw = projectionMatrix * aVertexPosition;\n gl_Position.z = 0.0;\n \n vTextureCoord = aTextureCoord;\n vTextureId = aTextureId;\n vColor = aColor;\n}\n",e.shaderFrag="\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\nuniform sampler2D uSamplers[%count%];\n\nvoid main(void){\nvec4 color;\nvec2 textureCoord = vTextureCoord;\nfloat textureId = floor(vTextureId+0.5);\n%forloop%\ngl_FragColor = color * vColor;\n}",e}return __extends(e,t),e.prototype.createVao=function(e){var t=this.shader.attributes;this.vertSize=6,this.vertByteSize=4*this.vertSize;var r=this.renderer.gl,i=this.renderer.createVao().addIndex(this.indexBuffer).addAttribute(e,t.aVertexPosition,r.FLOAT,!1,this.vertByteSize,0).addAttribute(e,t.aTextureCoord,r.UNSIGNED_SHORT,!0,this.vertByteSize,12).addAttribute(e,t.aColor,r.UNSIGNED_BYTE,!0,this.vertByteSize,16);return t.aTextureId&&i.addAttribute(e,t.aTextureId,r.FLOAT,!1,this.vertByteSize,20),i},e.prototype.fillVertices=function(e,t,r,i,n,o){var a=i.vertexData,s=i._texture._uvs.uvsUint32;if(8===a.length)if(this.renderer.roundPixels){var u=this.renderer.resolution;e[r]=(a[0]*u|0)/u,e[r+1]=(a[1]*u|0)/u,e[r+2]=1,e[r+6]=(a[2]*u|0)/u,e[r+7]=(a[3]*u|0)/u,e[r+8]=1,e[r+12]=(a[4]*u|0)/u,e[r+13]=(a[5]*u|0)/u,e[r+14]=1,e[r+18]=(a[6]*u|0)/u,e[r+19]=(a[7]*u|0)/u,e[r+20]=1}else e[r]=a[0],e[r+1]=a[1],e[r+2]=1,e[r+6]=a[2],e[r+7]=a[3],e[r+8]=1,e[r+12]=a[4],e[r+13]=a[5],e[r+14]=1,e[r+18]=a[6],e[r+19]=a[7],e[r+20]=1;else e[r]=a[0],e[r+1]=a[1],e[r+2]=a[2],e[r+6]=a[3],e[r+7]=a[4],e[r+8]=a[5],e[r+12]=a[6],e[r+13]=a[7],e[r+14]=a[8],e[r+18]=a[9],e[r+19]=a[10],e[r+20]=a[11];t[r+3]=s[0],t[r+9]=s[1],t[r+15]=s[2],t[r+21]=s[3],t[r+4]=t[r+10]=t[r+16]=t[r+22]=n,e[r+5]=e[r+11]=e[r+17]=e[r+23]=o},e}((pixi_projection||(pixi_projection={})).webgl.MultiTextureSpriteRenderer);PIXI.WebGLRenderer.registerPlugin("sprite2d",t)}(),function(o){var e=function(n){function e(e,t,r){var i=n.call(this,e,t,r)||this;return i.proj=new o.Projection2d(i.transform),i.pluginName="sprite2d",i.vertexData=new Float32Array(12),i}return __extends(e,n),Object.defineProperty(e.prototype,"worldTransform",{get:function(){return this.proj.affine?this.transform.worldTransform:this.proj.world},enumerable:!0,configurable:!0}),e}(PIXI.Text);(o.Text2d=e).prototype.calculateVertices=o.Sprite2d.prototype.calculateVertices,e.prototype.calculateTrimmedVertices=o.Sprite2d.prototype.calculateTrimmedVertices,e.prototype._calculateBounds=o.Sprite2d.prototype._calculateBounds}(pixi_projection||(pixi_projection={})),function(o){var r=new PIXI.TransformStatic,e=function(n){function e(e,t,r){var i=n.call(this,e,t,r)||this;return i.tileProj=new o.Projection2d(i.tileTransform),i.tileProj.reverseLocalOrder=!0,i.proj=new o.Projection2d(i.transform),i.pluginName="tilingSprite2d",i.uvRespectAnchor=!0,i}return __extends(e,n),Object.defineProperty(e.prototype,"worldTransform",{get:function(){return this.proj.affine?this.transform.worldTransform:this.proj.world},enumerable:!0,configurable:!0}),e.prototype.toLocal=function(e,t,r,i,n){return void 0===n&&(n=o.TRANSFORM_STEP.ALL),o.container2dToLocal.call(this,e,t,r,i,n)},e.prototype._renderWebGL=function(e){var t=this._texture;t&&t.valid&&(this.tileTransform.updateTransform(r),this.uvTransform.update(),e.setObjectRenderer(e.plugins[this.pluginName]),e.plugins[this.pluginName].render(this))},e}(PIXI.extras.TilingSprite);o.TilingSprite2d=e}(pixi_projection||(pixi_projection={})),function(e){var r="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec3 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position.xyw = projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0);\n\n vTextureCoord = uTransform * vec3(aTextureCoord, 1.0);\n}\n",l=new e.Matrix2d,f=PIXI.WRAP_MODES,h=PIXI.utils,t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.onContextChange=function(){var e=this.renderer.gl;this.shader=new PIXI.Shader(e,r,"\nvarying vec3 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n vec2 coord = mod(vTextureCoord.xy / vTextureCoord.z - uClampOffset, vec2(1.0, 1.0)) + uClampOffset;\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n vec4 sample = texture2D(uSampler, coord);\n gl_FragColor = sample * uColor;\n}\n"),this.simpleShader=new PIXI.Shader(e,r,"\n\tvarying vec3 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\n\nvoid main(void)\n{\n vec4 sample = texture2D(uSampler, vTextureCoord.xy / vTextureCoord.z);\n gl_FragColor = sample * uColor;\n}\n"),this.renderer.bindVao(null),this.quad=new PIXI.Quad(e,this.renderer.state.attribState),this.quad.initVao(this.shader)},t.prototype.render=function(e){var t=this.renderer,r=this.quad;t.bindVao(r.vao);var i=r.vertices;i[0]=i[6]=e._width*-e.anchor.x,i[1]=i[3]=e._height*-e.anchor.y,i[2]=i[4]=e._width*(1-e.anchor.x),i[5]=i[7]=e._height*(1-e.anchor.y),e.uvRespectAnchor&&((i=r.uvs)[0]=i[6]=-e.anchor.x,i[1]=i[3]=-e.anchor.y,i[2]=i[4]=1-e.anchor.x,i[5]=i[7]=1-e.anchor.y),r.upload();var n=e._texture,o=n.baseTexture,a=e.tileProj.world,s=e.uvTransform,u=o.isPowerOfTwo&&n.frame.width===o.width&&n.frame.height===o.height;u&&(o._glTextures[t.CONTEXT_UID]?u=o.wrapMode!==f.CLAMP:o.wrapMode===f.CLAMP&&(o.wrapMode=f.REPEAT));var c=u?this.simpleShader:this.shader;t.bindShader(c),l.identity(),l.scale(n.width,n.height),l.prepend(a),l.scale(1/e._width,1/e._height),l.invert(),u?l.prepend(s.mapCoord):(c.uniforms.uMapCoord=s.mapCoord.toArray(!0),c.uniforms.uClampFrame=s.uClampFrame,c.uniforms.uClampOffset=s.uClampOffset),c.uniforms.uTransform=l.toArray(!0),c.uniforms.uColor=h.premultiplyTintToRgba(e.tint,e.worldAlpha,c.uniforms.uColor,o.premultipliedAlpha),c.uniforms.translationMatrix=e.proj.world.toArray(!0),c.uniforms.uSampler=t.bindTexture(n),t.setBlendMode(h.correctBlendMode(e.blendMode,o.premultipliedAlpha)),r.vao.draw(this.renderer.gl.TRIANGLES,6,0)},t}(PIXI.extras.TilingSpriteRenderer);e.TilingSprite2dRenderer=t,PIXI.WebGLRenderer.registerPlugin("tilingSprite2d",t)}(pixi_projection||(pixi_projection={})),function(i){var e=function(){function e(e){var t=this;this.onContextChange=function(e){t.gl=e,t.renderer.maskManager.pushSpriteMask=r},(this.renderer=e).on("context",this.onContextChange)}return e.prototype.destroy=function(){this.renderer.off("context",this.onContextChange)},e}();function r(e,t){var r=this.alphaMaskPool[this.alphaMaskIndex];r||(r=this.alphaMaskPool[this.alphaMaskIndex]=[new i.SpriteMaskFilter2d(t)]),r[0].resolution=this.renderer.resolution,r[0].maskSprite=t,e.filterArea=t.getBounds(!0),this.renderer.filterManager.pushFilter(e,r),this.alphaMaskIndex++}i.ProjectionsManager=e,PIXI.WebGLRenderer.registerPlugin("projections",e)}(pixi_projection||(pixi_projection={})),function(i){var u=new i.Matrix2d,e=function(r){function s(e){var t=r.call(this,"\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec3 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n\tgl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n\tvTextureCoord = aTextureCoord;\n\tvMaskCoord = otherMatrix * vec3( aTextureCoord, 1.0);\n}\n","\nvarying vec3 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform sampler2D mask;\nuniform float alpha;\nuniform vec4 maskClamp;\n\nvoid main(void)\n{\n vec2 uv = vMaskCoord.xy / vMaskCoord.z;\n \n float clip = step(3.5,\n step(maskClamp.x, uv.x) +\n step(maskClamp.y, uv.y) +\n step(uv.x, maskClamp.z) +\n step(uv.y, maskClamp.w));\n\n vec4 original = texture2D(uSampler, vTextureCoord);\n vec4 masky = texture2D(mask, uv);\n \n original *= (masky.r * masky.a * alpha * clip);\n\n gl_FragColor = original;\n}\n")||this;return t.maskMatrix=new i.Matrix2d,e.renderable=!1,t.maskSprite=e,t}return __extends(s,r),s.prototype.apply=function(e,t,r,i,n){var o=this.maskSprite,a=this.maskSprite.texture;a.valid&&(a.transform||(a.transform=new PIXI.TextureMatrix(a,0)),a.transform.update(),this.uniforms.mask=o.texture,this.uniforms.otherMatrix=s.calculateSpriteMatrix(n,this.maskMatrix,o).prepend(a.transform.mapCoord),this.uniforms.alpha=o.worldAlpha,this.uniforms.maskClamp=a.transform.uClampFrame,e.applyFilter(this,t,r))},s.calculateSpriteMatrix=function(e,t,r){var i=r.proj,n=e.sourceFrame,o=e.renderTarget.size,a=i&&!i._affine?i.world.copyTo2dOr3d(u):u.copyFrom(r.transform.worldTransform),s=r.texture.orig;return t.set(o.width,0,0,o.height,n.x,n.y),a.invert(),t.setToMult(a,t),t.scaleAndTranslate(1/s.width,1/s.height,r.anchor.x,r.anchor.y),t},s}(PIXI.Filter);i.SpriteMaskFilter2d=e}(pixi_projection||(pixi_projection={})),function(o){o.container3dWorldTransform=function(){return this.proj.affine?this.transform.worldTransform:this.proj.world};var e=function(t){function e(){var e=t.call(this)||this;return e.proj=new o.Projection3d(e.transform),e}return __extends(e,t),e.prototype.isFrontFace=function(e){void 0===e&&(e=!1),e&&(this._recursivePostUpdateTransform(),this.displayObjectUpdateTransform());var t=this.proj.world.mat4,r=t[0]*t[15]-t[3]*t[12],i=t[1]*t[15]-t[3]*t[13],n=t[4]*t[15]-t[7]*t[12];return 0<r*(t[5]*t[15]-t[7]*t[13])-n*i},e.prototype.getDepth=function(e){void 0===e&&(e=!1),e&&(this._recursivePostUpdateTransform(),this.displayObjectUpdateTransform());var t=this.proj.world.mat4;return t[14]/t[15]},e.prototype.toLocal=function(e,t,r,i,n){return void 0===n&&(n=o.TRANSFORM_STEP.ALL),t&&(e=t.toGlobal(e,r,i)),i||this._recursivePostUpdateTransform(),n===o.TRANSFORM_STEP.ALL?(i||this.displayObjectUpdateTransform(),this.proj.affine?this.transform.worldTransform.applyInverse(e,r):this.proj.world.applyInverse(e,r)):(this.parent?r=this.parent.worldTransform.applyInverse(e,r):r.copy(e),n===o.TRANSFORM_STEP.NONE||(r=this.transform.localTransform.applyInverse(r,r),n===o.TRANSFORM_STEP.PROJ&&this.proj.cameraMode&&(r=this.proj.cameraMatrix.applyInverse(r,r))),r)},Object.defineProperty(e.prototype,"worldTransform",{get:function(){return this.proj.affine?this.transform.worldTransform:this.proj.world},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"position3d",{get:function(){return this.proj.position},set:function(e){this.proj.position.copy(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scale3d",{get:function(){return this.proj.scale},set:function(e){this.proj.scale.copy(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"euler",{get:function(){return this.proj.euler},set:function(e){this.proj.euler.copy(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pivot3d",{get:function(){return this.proj.pivot},set:function(e){this.proj.pivot.copy(e)},enumerable:!0,configurable:!0}),e}(PIXI.Container);o.Container3d=e,o.container3dToLocal=e.prototype.toLocal,o.container3dGetDepth=e.prototype.getDepth,o.container3dIsFrontFace=e.prototype.isFrontFace}(pixi_projection||(pixi_projection={})),function(e){var t=function(t){function e(){var e=t.call(this)||this;return e._far=0,e._near=0,e._focus=0,e._orthographic=!1,e.proj.cameraMode=!0,e.setPlanes(400,10,1e4,!1),e}return __extends(e,t),Object.defineProperty(e.prototype,"far",{get:function(){return this._far},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"near",{get:function(){return this._near},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"focus",{get:function(){return this._focus},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ortographic",{get:function(){return this._orthographic},enumerable:!0,configurable:!0}),e.prototype.setPlanes=function(e,t,r,i){void 0===t&&(t=10),void 0===r&&(r=1e4),void 0===i&&(i=!1),this._focus=e,this._near=t,this._far=r,this._orthographic=i;var n=this.proj,o=n.cameraMatrix.mat4;n._projID++,o[10]=1/(r-t),o[14]=(e-t)/(r-t),this._orthographic?o[11]=0:o[11]=1/e},e}(e.Container3d);e.Camera3d=t}(pixi_projection||(pixi_projection={})),function(e){var t=function(){function e(e,t,r){this._quatUpdateId=-1,this._quatDirtyId=0,this._sign=1,this._x=e||0,this._y=t||0,this._z=r||0,this.quaternion=new Float64Array(4),this.quaternion[3]=1,this.update()}return Object.defineProperty(e.prototype,"x",{get:function(){return this._x},set:function(e){this._x!==e&&(this._x=e,this._quatDirtyId++)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},set:function(e){this._y!==e&&(this._y=e,this._quatDirtyId++)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"z",{get:function(){return this._z},set:function(e){this._z!==e&&(this._z=e,this._quatDirtyId++)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pitch",{get:function(){return this._x},set:function(e){this._x!==e&&(this._x=e,this._quatDirtyId++)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"yaw",{get:function(){return this._y},set:function(e){this._y!==e&&(this._y=e,this._quatDirtyId++)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"roll",{get:function(){return this._z},set:function(e){this._z!==e&&(this._z=e,this._quatDirtyId++)},enumerable:!0,configurable:!0}),e.prototype.set=function(e,t,r){var i=e||0,n=t||0,o=r||0;this._x===i&&this._y===n&&this._z===o||(this._x=i,this._y=n,this._z=o,this._quatDirtyId++)},e.prototype.copy=function(e){var t=e.x,r=e.y,i=e.z;this._x===t&&this._y===r&&this._z===i||(this._x=t,this._y=r,this._z=i,this._quatDirtyId++)},e.prototype.clone=function(){return new e(this._x,this._y,this._z)},e.prototype.update=function(){if(this._quatUpdateId===this._quatDirtyId)return!1;this._quatUpdateId=this._quatDirtyId;var e=Math.cos(this._x/2),t=Math.cos(this._y/2),r=Math.cos(this._z/2),i=this._sign,n=i*Math.sin(this._x/2),o=i*Math.sin(this._y/2),a=i*Math.sin(this._z/2),s=this.quaternion;return s[0]=n*t*r+e*o*a,s[1]=e*o*r-n*t*a,s[2]=e*t*a+n*o*r,s[3]=e*t*r-n*o*a,!0},e}();e.Euler=t}(pixi_projection||(pixi_projection={})),function(b){var t=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e=function(){function m(e){this.floatArray=null,this._dirtyId=0,this._updateId=-1,this._mat4inv=null,this.cacheInverse=!1,this.mat4=new Float64Array(e||t)}return Object.defineProperty(m.prototype,"a",{get:function(){return this.mat4[0]/this.mat4[15]},set:function(e){this.mat4[0]=e*this.mat4[15]},enumerable:!0,configurable:!0}),Object.defineProperty(m.prototype,"b",{get:function(){return this.mat4[1]/this.mat4[15]},set:function(e){this.mat4[1]=e*this.mat4[15]},enumerable:!0,configurable:!0}),Object.defineProperty(m.prototype,"c",{get:function(){return this.mat4[4]/this.mat4[15]},set:function(e){this.mat4[4]=e*this.mat4[15]},enumerable:!0,configurable:!0}),Object.defineProperty(m.prototype,"d",{get:function(){return this.mat4[5]/this.mat4[15]},set:function(e){this.mat4[5]=e*this.mat4[15]},enumerable:!0,configurable:!0}),Object.defineProperty(m.prototype,"tx",{get:function(){return this.mat4[12]/this.mat4[15]},set:function(e){this.mat4[12]=e*this.mat4[15]},enumerable:!0,configurable:!0}),Object.defineProperty(m.prototype,"ty",{get:function(){return this.mat4[13]/this.mat4[15]},set:function(e){this.mat4[13]=e*this.mat4[15]},enumerable:!0,configurable:!0}),m.prototype.set=function(e,t,r,i,n,o){var a=this.mat4;return a[0]=e,a[1]=t,a[2]=0,a[3]=0,a[4]=r,a[5]=i,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=1,a[11]=0,a[12]=n,a[13]=o,a[14]=0,a[15]=1,this},m.prototype.toArray=function(e,t){this.floatArray||(this.floatArray=new Float32Array(9));var r=t||this.floatArray,i=this.mat4;return e?(r[0]=i[0],r[1]=i[1],r[2]=i[3],r[3]=i[4],r[4]=i[5],r[5]=i[7],r[6]=i[12],r[7]=i[13]):(r[0]=i[0],r[1]=i[4],r[2]=i[12],r[3]=i[2],r[4]=i[6],r[5]=i[13],r[6]=i[3],r[7]=i[7]),r[8]=i[15],r},m.prototype.setToTranslation=function(e,t,r){var i=this.mat4;i[0]=1,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=1,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=1,i[11]=0,i[12]=e,i[13]=t,i[14]=r,i[15]=1},m.prototype.setToRotationTranslationScale=function(e,t,r,i,n,o,a){var s=this.mat4,u=e[0],c=e[1],l=e[2],f=e[3],h=u+u,d=c+c,p=l+l,v=u*h,m=u*d,b=u*p,y=c*d,g=c*p,_=l*p,w=f*h,x=f*d,T=f*p;return s[0]=(1-(y+_))*n,s[1]=(m+T)*n,s[2]=(b-x)*n,s[3]=0,s[4]=(m-T)*o,s[5]=(1-(v+_))*o,s[6]=(g+w)*o,s[7]=0,s[8]=(b+x)*a,s[9]=(g-w)*a,s[10]=(1-(v+y))*a,s[11]=0,s[12]=t,s[13]=r,s[14]=i,s[15]=1,s},m.prototype.apply=function(e,t){t=t||new b.Point3d;var r=this.mat4,i=e.x,n=e.y,o=e.z,a=1/(r[3]*i+r[7]*n+r[11]*o+r[15]);return t.x=a*(r[0]*i+r[4]*n+r[8]*o+r[12]),t.y=a*(r[1]*i+r[5]*n+r[9]*o+r[13]),t.z=a*(r[2]*i+r[6]*n+r[10]*o+r[14]),t},m.prototype.translate=function(e,t,r){var i=this.mat4;return i[12]=i[0]*e+i[4]*t+i[8]*r+i[12],i[13]=i[1]*e+i[5]*t+i[9]*r+i[13],i[14]=i[2]*e+i[6]*t+i[10]*r+i[14],i[15]=i[3]*e+i[7]*t+i[11]*r+i[15],this},m.prototype.scale=function(e,t,r){var i=this.mat4;return i[0]*=e,i[1]*=e,i[2]*=e,i[3]*=e,i[4]*=t,i[5]*=t,i[6]*=t,i[7]*=t,void 0!==r&&(i[8]*=r,i[9]*=r,i[10]*=r,i[11]*=r),this},m.prototype.scaleAndTranslate=function(e,t,r,i,n,o){var a=this.mat4;a[0]=e*a[0]+i*a[3],a[1]=t*a[1]+n*a[3],a[2]=r*a[2]+o*a[3],a[4]=e*a[4]+i*a[7],a[5]=t*a[5]+n*a[7],a[6]=r*a[6]+o*a[7],a[8]=e*a[8]+i*a[11],a[9]=t*a[9]+n*a[11],a[10]=r*a[10]+o*a[11],a[12]=e*a[12]+i*a[15],a[13]=t*a[13]+n*a[15],a[14]=r*a[14]+o*a[15]},m.prototype.applyInverse=function(e,t){t=t||new b.Point3d,this._mat4inv||(this._mat4inv=new Float64Array(16));var r=this._mat4inv,i=this.mat4,n=e.x,o=e.y,a=e.z;this.cacheInverse&&this._updateId===this._dirtyId||(this._updateId=this._dirtyId,m.glMatrixMat4Invert(r,i));var s=1/(r[3]*n+r[7]*o+r[11]*a+r[15]),u=s*(r[0]*n+r[4]*o+r[8]*a+r[12]),c=s*(r[1]*n+r[5]*o+r[9]*a+r[13]),l=s*(r[2]*n+r[6]*o+r[10]*a+r[14]);a+=1;var f=1/(r[3]*n+r[7]*o+r[11]*a+r[15]),h=f*(r[0]*n+r[4]*o+r[8]*a+r[12]),d=f*(r[1]*n+r[5]*o+r[9]*a+r[13]),p=f*(r[2]*n+r[6]*o+r[10]*a+r[14]);Math.abs(l-p)<1e-10&&t.set(NaN,NaN,0);var v=(0-l)/(p-l);return t.set((h-u)*v+u,(d-c)*v+c,0),t},m.prototype.invert=function(){return m.glMatrixMat4Invert(this.mat4,this.mat4),this},m.prototype.invertCopyTo=function(e){this._mat4inv||(this._mat4inv=new Float64Array(16));var t=this._mat4inv,r=this.mat4;this.cacheInverse&&this._updateId===this._dirtyId||(this._updateId=this._dirtyId,m.glMatrixMat4Invert(t,r)),e.mat4.set(t)},m.prototype.identity=function(){var e=this.mat4;return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},m.prototype.clone=function(){return new m(this.mat4)},m.prototype.copyTo=function(e){var t=this.mat4,r=e.mat4;return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r[6]=t[6],r[7]=t[7],r[8]=t[8],e},m.prototype.copyTo2d=function(e){var t=this.mat4,r=e.mat3;return r[0]=t[0],r[1]=t[1],r[2]=t[3],r[3]=t[4],r[4]=t[5],r[5]=t[7],r[6]=t[12],r[7]=t[13],r[8]=t[15],e},m.prototype.copyTo2dOr3d=function(e){return e instanceof b.Matrix2d?this.copyTo2d(e):this.copyTo(e)},m.prototype.copy=function(e,t,r){var i=this.mat4,n=1/i[15],o=i[12]*n,a=i[13]*n;if(e.a=(i[0]-i[3]*o)*n,e.b=(i[1]-i[3]*a)*n,e.c=(i[4]-i[7]*o)*n,e.d=(i[5]-i[7]*a)*n,e.tx=o,e.ty=a,2<=t){var s=e.a*e.d-e.b*e.c;r||(s=Math.abs(s)),t===b.AFFINE.POINT?(s=0<s?1:-1,e.a=s,e.b=0,e.c=0,e.d=s):t===b.AFFINE.AXIS_X?(s/=Math.sqrt(e.b*e.b+e.d*e.d),e.c=0,e.d=s):t===b.AFFINE.AXIS_Y&&(s/=Math.sqrt(e.a*e.a+e.c*e.c),e.a=s,e.c=0)}},m.prototype.copyFrom=function(e){var t=this.mat4;return t[0]=e.a,t[1]=e.b,t[2]=0,t[3]=0,t[4]=e.c,t[5]=e.d,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e.tx,t[13]=e.ty,t[14]=0,t[15]=1,this._dirtyId++,this},m.prototype.setToMultLegacy=function(e,t){var r=this.mat4,i=t.mat4,n=e.a,o=e.b,a=e.c,s=e.d,u=e.tx,c=e.ty,l=i[0],f=i[1],h=i[2],d=i[3];return r[0]=l*n+f*a+d*u,r[1]=l*o+f*s+d*c,r[2]=h,r[3]=d,l=i[4],f=i[5],h=i[6],d=i[7],r[4]=l*n+f*a+d*u,r[5]=l*o+f*s+d*c,r[6]=h,r[7]=d,l=i[8],f=i[9],h=i[10],d=i[11],r[8]=l*n+f*a+d*u,r[9]=l*o+f*s+d*c,r[10]=h,r[11]=d,l=i[12],f=i[13],h=i[14],d=i[15],r[12]=l*n+f*a+d*u,r[13]=l*o+f*s+d*c,r[14]=h,r[15]=d,this._dirtyId++,this},m.prototype.setToMultLegacy2=function(e,t){var r=this.mat4,i=e.mat4,n=i[0],o=i[1],a=i[2],s=i[3],u=i[4],c=i[5],l=i[6],f=i[7],h=t.a,d=t.b,p=t.c,v=t.d,m=t.tx,b=t.ty;return r[0]=h*n+d*u,r[1]=h*o+d*c,r[2]=h*a+d*l,r[3]=h*s+d*f,r[4]=p*n+v*u,r[5]=p*o+v*c,r[6]=p*a+v*l,r[7]=p*s+v*f,r[8]=i[8],r[9]=i[9],r[10]=i[10],r[11]=i[11],r[12]=m*n+b*u+i[12],r[13]=m*o+b*c+i[13],r[14]=m*a+b*l+i[14],r[15]=m*s+b*f+i[15],this._dirtyId++,this},m.prototype.setToMult=function(e,t){return m.glMatrixMat4Multiply(this.mat4,e.mat4,t.mat4),this._dirtyId++,this},m.prototype.prepend=function(e){e.mat4?this.setToMult(e,this):this.setToMultLegacy(e,this)},m.glMatrixMat4Invert=function(e,t){var r=t[0],i=t[1],n=t[2],o=t[3],a=t[4],s=t[5],u=t[6],c=t[7],l=t[8],f=t[9],h=t[10],d=t[11],p=t[12],v=t[13],m=t[14],b=t[15],y=r*s-i*a,g=r*u-n*a,_=r*c-o*a,w=i*u-n*s,x=i*c-o*s,T=n*c-o*u,S=l*v-f*p,M=l*m-h*p,P=l*b-d*p,E=f*m-h*v,k=f*b-d*v,C=h*b-d*m,A=y*C-g*k+_*E+w*P-x*M+T*S;return A?(A=1/A,e[0]=(s*C-u*k+c*E)*A,e[1]=(n*k-i*C-o*E)*A,e[2]=(v*T-m*x+b*w)*A,e[3]=(h*x-f*T-d*w)*A,e[4]=(u*P-a*C-c*M)*A,e[5]=(r*C-n*P+o*M)*A,e[6]=(m*_-p*T-b*g)*A,e[7]=(l*T-h*_+d*g)*A,e[8]=(a*k-s*P+c*S)*A,e[9]=(i*P-r*k-o*S)*A,e[10]=(p*x-v*_+b*y)*A,e[11]=(f*_-l*x-d*y)*A,e[12]=(s*M-a*E-u*S)*A,e[13]=(r*E-i*M+n*S)*A,e[14]=(v*g-p*w-m*y)*A,e[15]=(l*w-f*g+h*y)*A,e):null},m.glMatrixMat4Multiply=function(e,t,r){var i=t[0],n=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],f=t[8],h=t[9],d=t[10],p=t[11],v=t[12],m=t[13],b=t[14],y=t[15],g=r[0],_=r[1],w=r[2],x=r[3];return e[0]=g*i+_*s+w*f+x*v,e[1]=g*n+_*u+w*h+x*m,e[2]=g*o+_*c+w*d+x*b,e[3]=g*a+_*l+w*p+x*y,g=r[4],_=r[5],w=r[6],x=r[7],e[4]=g*i+_*s+w*f+x*v,e[5]=g*n+_*u+w*h+x*m,e[6]=g*o+_*c+w*d+x*b,e[7]=g*a+_*l+w*p+x*y,g=r[8],_=r[9],w=r[10],x=r[11],e[8]=g*i+_*s+w*f+x*v,e[9]=g*n+_*u+w*h+x*m,e[10]=g*o+_*c+w*d+x*b,e[11]=g*a+_*l+w*p+x*y,g=r[12],_=r[13],w=r[14],x=r[15],e[12]=g*i+_*s+w*f+x*v,e[13]=g*n+_*u+w*h+x*m,e[14]=g*o+_*c+w*d+x*b,e[15]=g*a+_*l+w*p+x*y,e},m.IDENTITY=new m,m.TEMP_MATRIX=new m,m}();b.Matrix3d=e}(pixi_projection||(pixi_projection={})),function(t){var e=function(){function e(e,t,r,i,n){this.cb=e,this.scope=t,this._quatUpdateId=-1,this._quatDirtyId=0,this._sign=1,this._x=r||0,this._y=i||0,this._z=n||0,this.quaternion=new Float64Array(4),this.quaternion[3]=1,this.update()}return Object.defineProperty(e.prototype,"x",{get:function(){return this._x},set:function(e){this._x!==e&&(this._x=e,this._quatDirtyId++,this.cb.call(this.scope))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},set:function(e){this._y!==e&&(this._y=e,this._quatDirtyId++,this.cb.call(this.scope))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"z",{get:function(){return this._z},set:function(e){this._z!==e&&(this._z=e,this._quatDirtyId++,this.cb.call(this.scope))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pitch",{get:function(){return this._x},set:function(e){this._x!==e&&(this._x=e,this._quatDirtyId++,this.cb.call(this.scope))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"yaw",{get:function(){return this._y},set:function(e){this._y!==e&&(this._y=e,this._quatDirtyId++,this.cb.call(this.scope))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"roll",{get:function(){return this._z},set:function(e){this._z!==e&&(this._z=e,this._quatDirtyId++,this.cb.call(this.scope))},enumerable:!0,configurable:!0}),e.prototype.set=function(e,t,r){var i=e||0,n=t||0,o=r||0;this._x===i&&this._y===n&&this._z===o||(this._x=i,this._y=n,this._z=o,this._quatDirtyId++,this.cb.call(this.scope))},e.prototype.copy=function(e){var t=e.x,r=e.y,i=e.z;this._x===t&&this._y===r&&this._z===i||(this._x=t,this._y=r,this._z=i,this._quatDirtyId++,this.cb.call(this.scope))},e.prototype.clone=function(){return new t.Euler(this._x,this._y,this._z)},e.prototype.update=function(){if(this._quatUpdateId===this._quatDirtyId)return!1;this._quatUpdateId=this._quatDirtyId;var e=Math.cos(this._x/2),t=Math.cos(this._y/2),r=Math.cos(this._z/2),i=this._sign,n=i*Math.sin(this._x/2),o=i*Math.sin(this._y/2),a=i*Math.sin(this._z/2),s=this.quaternion;return s[0]=n*t*r+e*o*a,s[1]=e*o*r-n*t*a,s[2]=e*t*a+n*o*r,s[3]=e*t*r-n*o*a,!0},e}();t.ObservableEuler=e}(pixi_projection||(pixi_projection={})),function(e){PIXI.Point.prototype.z=0,PIXI.Point.prototype.set=function(e,t,r){this.x=e||0,this.y=void 0===t?this.x:t||0,this.z=void 0===t?this.x:r||0},PIXI.Point.prototype.copy=function(e){this.set(e.x,e.y,e.z)},PIXI.ObservablePoint.prototype._z=0,PIXI.ObservablePoint.prototype.set=function(e,t,r){var i=e||0,n=void 0===t?i:t||0,o=void 0===t?i:r||0;this._x===i&&this._y===n&&this._z===o||(this._x=i,this._y=n,this._z=o,this.cb.call(this.scope))},Object.defineProperty(PIXI.ObservablePoint.prototype,"z",{get:function(){return this._z},set:function(e){this._z!==e&&(this._z=e,this.cb.call(this.scope))},enumerable:!0,configurable:!0}),PIXI.ObservablePoint.prototype.copy=function(e){this._x===e.x&&this._y===e.y&&this._z===e.z||(this._x=e.x,this._y=e.y,this._z=e.z,this.cb.call(this.scope))};var t=function(n){function e(e,t,r){var i=n.call(this,e,t)||this;return i.z=r,i}return __extends(e,n),e}(PIXI.Point);e.Point3d=t,PIXI.Point3d=t}(pixi_projection||(pixi_projection={})),function(n){var a=new n.Matrix3d,e=function(i){function e(e,t){var r=i.call(this,e,t)||this;return r.cameraMatrix=null,r._cameraMode=!1,r.position=new PIXI.ObservablePoint(r.onChange,r,0,0),r.scale=new PIXI.ObservablePoint(r.onChange,r,1,1),r.euler=new n.ObservableEuler(r.onChange,r,0,0,0),r.pivot=new PIXI.ObservablePoint(r.onChange,r,0,0),r.local=new n.Matrix3d,r.world=new n.Matrix3d,r.local.cacheInverse=!0,r.world.cacheInverse=!0,r.position._z=0,r.scale._z=1,r.pivot._z=0,r}return __extends(e,i),Object.defineProperty(e.prototype,"cameraMode",{get:function(){return this._cameraMode},set:function(e){this._cameraMode!==e&&(this._cameraMode=e,this.euler._sign=this._cameraMode?-1:1,this.euler._quatDirtyId++,e&&(this.cameraMatrix=new n.Matrix3d))},enumerable:!0,configurable:!0}),e.prototype.onChange=function(){this._projID++},e.prototype.clear=function(){this.cameraMatrix&&this.cameraMatrix.identity(),this.position.set(0,0,0),this.scale.set(1,1,1),this.euler.set(0,0,0),this.pivot.set(0,0,0),i.prototype.clear.call(this)},e.prototype.updateLocalTransform=function(e){if(0!==this._projID){var t=this.local,r=this.euler,i=this.position,n=this.scale,o=this.pivot;if(r.update(),!this.cameraMode)return t.setToRotationTranslationScale(r.quaternion,i._x,i._y,i._z,n._x,n._y,n._z),t.translate(-o._x,-o._y,-o._z),void t.setToMultLegacy(e,t);t.setToMultLegacy(e,this.cameraMatrix),t.translate(o._x,o._y,o._z),t.scale(1/n._x,1/n._y,1/n._z),a.setToRotationTranslationScale(r.quaternion,0,0,0,1,1,1),t.setToMult(t,a),t.translate(-i._x,-i._y,-i._z),this.local._dirtyId++}else this.local.copyFrom(e)},e}(n.LinearProjection);n.Projection3d=e}(pixi_projection||(pixi_projection={})),function(s){var e=function(a){function e(e,t,r,i,n){var o=a.call(this,e,t,r,i,n)||this;return o.proj=new s.Projection3d(o.transform),o.pluginName="mesh2d",o}return __extends(e,a),Object.defineProperty(e.prototype,"worldTransform",{get:function(){return this.proj.affine?this.transform.worldTransform:this.proj.world},enumerable:!0,configurable:!0}),e.prototype.toLocal=function(e,t,r,i,n){return void 0===n&&(n=s.TRANSFORM_STEP.ALL),s.container3dToLocal.call(this,e,t,r,i,n)},e.prototype.isFrontFace=function(e){return s.container3dIsFrontFace.call(this,e)},e.prototype.getDepth=function(e){return s.container3dGetDepth.call(this,e)},Object.defineProperty(e.prototype,"position3d",{get:function(){return this.proj.position},set:function(e){this.proj.position.copy(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scale3d",{get:function(){return this.proj.scale},set:function(e){this.proj.scale.copy(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"euler",{get:function(){return this.proj.euler},set:function(e){this.proj.euler.copy(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pivot3d",{get:function(){return this.proj.pivot},set:function(e){this.proj.pivot.copy(e)},enumerable:!0,configurable:!0}),e}(PIXI.mesh.Mesh);s.Mesh3d=e}(pixi_projection||(pixi_projection={})),function(e){var t={worldTransform:{get:e.container3dWorldTransform,enumerable:!0,configurable:!0},position3d:{get:function(){return this.proj.position},set:function(e){this.proj.position.copy(e)}},scale3d:{get:function(){return this.proj.scale},set:function(e){this.proj.scale.copy(e)}},pivot3d:{get:function(){return this.proj.pivot},set:function(e){this.proj.pivot.copy(e)}},euler:{get:function(){return this.proj.euler},set:function(e){this.proj.euler.copy(e)}}};function r(){this.proj||(this.proj=new e.Projection3d(this.transform),this.toLocal=e.Container3d.prototype.toLocal,this.isFrontFace=e.Container3d.prototype.isFrontFace,this.getDepth=e.Container3d.prototype.getDepth,Object.defineProperties(this,t))}PIXI.Container.prototype.convertTo3d=r,PIXI.Sprite.prototype.convertTo3d=function(){this.proj||(this.calculateVertices=e.Sprite3d.prototype.calculateVertices,this.calculateTrimmedVertices=e.Sprite3d.prototype.calculateTrimmedVertices,this._calculateBounds=e.Sprite3d.prototype._calculateBounds,this.containsPoint=e.Sprite3d.prototype.containsPoint,this.pluginName="sprite2d",this.vertexData=new Float32Array(12),r.call(this))},PIXI.mesh.Mesh.prototype.convertTo3d=function(){this.proj||(this.pluginName="mesh2d",r.call(this))},PIXI.Container.prototype.convertSubtreeTo3d=function(){this.convertTo3d();for(var e=0;e<this.children.length;e++)this.children[e].convertSubtreeTo3d()}}(pixi_projection||(pixi_projection={})),function(o){var e=function(p){function e(e){var t=p.call(this,e)||this;return t.culledByFrustrum=!1,t.trimmedCulledByFrustrum=!1,t.proj=new o.Projection3d(t.transform),t.pluginName="sprite2d",t.vertexData=new Float32Array(12),t}return __extends(e,p),e.prototype._calculateBounds=function(){this.calculateVertices(),this.culledByFrustrum||(this.calculateTrimmedVertices(),this.trimmedCulledByFrustrum||this._bounds.addQuad(this.vertexTrimmedData))},e.prototype.calculateVertices=function(){if(this.proj._affine)return 8!=this.vertexData.length&&(this.vertexData=new Float32Array(8)),void p.prototype.calculateVertices.call(this);12!=this.vertexData.length&&(this.vertexData=new Float32Array(12));var e=this.transform._worldID,t=this._texture._updateID;if(this._transformID!==e||this._textureID!==t){this._transformID=e,this._textureID=t;var r=this._texture,i=this.proj.world.mat4,n=this.vertexData,o=r.trim,a=r.orig,s=this._anchor,u=0,c=0,l=0,f=0;l=o?(u=(c=o.x-s._x*a.width)+o.width,(f=o.y-s._y*a.height)+o.height):(u=(c=-s._x*a.width)+a.width,(f=-s._y*a.height)+a.height);var h,d=!1;n[0]=i[0]*c+i[4]*f+i[12],n[1]=i[1]*c+i[5]*f+i[13],h=i[2]*c+i[6]*f+i[14],n[2]=i[3]*c+i[7]*f+i[15],d=d||h<0,n[3]=i[0]*u+i[4]*f+i[12],n[4]=i[1]*u+i[5]*f+i[13],h=i[2]*u+i[6]*f+i[14],n[5]=i[3]*u+i[7]*f+i[15],d=d||h<0,n[6]=i[0]*u+i[4]*l+i[12],n[7]=i[1]*u+i[5]*l+i[13],h=i[2]*u+i[6]*l+i[14],n[8]=i[3]*u+i[7]*l+i[15],d=d||h<0,n[9]=i[0]*c+i[4]*l+i[12],n[10]=i[1]*c+i[5]*l+i[13],h=i[2]*c+i[6]*l+i[14],n[11]=i[3]*c+i[7]*l+i[15],d=d||h<0,this.culledByFrustrum=d}},e.prototype.calculateTrimmedVertices=function(){if(this.proj._affine)p.prototype.calculateTrimmedVertices.call(this);else{var e=this.transform._worldID,t=this._texture._updateID;if(this.vertexTrimmedData){if(this._transformTrimmedID===e&&this._textureTrimmedID===t)return}else this.vertexTrimmedData=new Float32Array(8);this._transformTrimmedID=e,this._textureTrimmedID=t;var r=this._texture,i=this.vertexTrimmedData,n=r.orig,o=this._anchor,a=this.proj.world.mat4,s=-o._x*n.width,u=s+n.width,c=-o._y*n.height,l=c+n.height,f=!1,h=1/(a[3]*s+a[7]*c+a[15]);i[0]=h*(a[0]*s+a[4]*c+a[12]),i[1]=h*(a[1]*s+a[5]*c+a[13]);var d=a[2]*s+a[6]*c+a[14];f=f||d<0,h=1/(a[3]*u+a[7]*c+a[15]),i[2]=h*(a[0]*u+a[4]*c+a[12]),i[3]=h*(a[1]*u+a[5]*c+a[13]),d=a[2]*u+a[6]*c+a[14],f=f||d<0,h=1/(a[3]*u+a[7]*l+a[15]),i[4]=h*(a[0]*u+a[4]*l+a[12]),i[5]=h*(a[1]*u+a[5]*l+a[13]),d=a[2]*u+a[6]*l+a[14],f=f||d<0,h=1/(a[3]*s+a[7]*l+a[15]),i[6]=h*(a[0]*s+a[4]*l+a[12]),i[7]=h*(a[1]*s+a[5]*l+a[13]),d=a[2]*s+a[6]*l+a[14],f=f||d<0,this.trimmedCulledByFrustrum=f}},e.prototype._renderWebGL=function(e){this.calculateVertices(),this.culledByFrustrum||(e.setObjectRenderer(e.plugins[this.pluginName]),e.plugins[this.pluginName].render(this))},e.prototype.containsPoint=function(e){return!this.culledByFrustrum&&p.prototype.containsPoint.call(this,e)},Object.defineProperty(e.prototype,"worldTransform",{get:function(){return this.proj.affine?this.transform.worldTransform:this.proj.world},enumerable:!0,configurable:!0}),e.prototype.toLocal=function(e,t,r,i,n){return void 0===n&&(n=o.TRANSFORM_STEP.ALL),o.container3dToLocal.call(this,e,t,r,i,n)},e.prototype.isFrontFace=function(e){return o.container3dIsFrontFace.call(this,e)},e.prototype.getDepth=function(e){return o.container3dGetDepth.call(this,e)},Object.defineProperty(e.prototype,"position3d",{get:function(){return this.proj.position},set:function(e){this.proj.position.copy(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scale3d",{get:function(){return this.proj.scale},set:function(e){this.proj.scale.copy(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"euler",{get:function(){return this.proj.euler},set:function(e){this.proj.euler.copy(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pivot3d",{get:function(){return this.proj.pivot},set:function(e){this.proj.pivot.copy(e)},enumerable:!0,configurable:!0}),e}(PIXI.Sprite);o.Sprite3d=e}(pixi_projection||(pixi_projection={})),function(o){var e=function(n){function e(e,t,r){var i=n.call(this,e,t,r)||this;return i.proj=new o.Projection3d(i.transform),i.pluginName="sprite2d",i.vertexData=new Float32Array(12),i}return __extends(e,n),Object.defineProperty(e.prototype,"worldTransform",{get:function(){return this.proj.affine?this.transform.worldTransform:this.proj.world},enumerable:!0,configurable:!0}),e.prototype.toLocal=function(e,t,r,i,n){return void 0===n&&(n=o.TRANSFORM_STEP.ALL),o.container3dToLocal.call(this,e,t,r,i,n)},e.prototype.isFrontFace=function(e){return o.container3dIsFrontFace.call(this,e)},e.prototype.getDepth=function(e){return o.container3dGetDepth.call(this,e)},Object.defineProperty(e.prototype,"position3d",{get:function(){return this.proj.position},set:function(e){this.proj.position.copy(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scale3d",{get:function(){return this.proj.scale},set:function(e){this.proj.scale.copy(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"euler",{get:function(){return this.proj.euler},set:function(e){this.proj.euler.copy(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pivot3d",{get:function(){return this.proj.pivot},set:function(e){this.proj.pivot.copy(e)},enumerable:!0,configurable:!0}),e}(PIXI.Text);(o.Text3d=e).prototype.calculateVertices=o.Sprite3d.prototype.calculateVertices,e.prototype.calculateTrimmedVertices=o.Sprite3d.prototype.calculateTrimmedVertices,e.prototype._calculateBounds=o.Sprite3d.prototype._calculateBounds,e.prototype.containsPoint=o.Sprite3d.prototype.containsPoint,e.prototype._renderWebGL=o.Sprite3d.prototype._renderWebGL}(pixi_projection||(pixi_projection={}));var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";var S,w,x,T,b,r,y,M,g,_,d,p,m,e,t,u,c,i;_gsScope._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(i,l,g){var v=function(e){var t,r=[],i=e.length;for(t=0;t!==i;r.push(e[t++]));return r},m=function(e,t,r){var i,n,o=e.cycle;for(i in o)n=o[i],e[i]="function"==typeof n?n(r,t[r],t):n[r%n.length];delete e.cycle},b=function(e){if("function"==typeof e)return e;var p="object"==typeof e?e:{each:e},v=p.ease,m=p.from||0,b=p.base||0,y={},g=isNaN(m),_=p.axis,w={center:.5,end:1}[m]||0;return function(e,t,r){var i,n,o,a,s,u,c,l,f,h=(r||p).length,d=y[h];if(!d){if(!(f="auto"===p.grid?0:(p.grid||[1/0])[0])){for(c=-1/0;c<(c=r[f++].getBoundingClientRect().left)&&f<h;);f--}for(d=y[h]=[],i=g?Math.min(f,h)*w-.5:m%f,n=g?h*w/f-.5:m/f|0,l=1/(c=0),u=0;u<h;u++)o=u%f-i,a=n-(u/f|0),d[u]=s=_?Math.abs("y"===_?a:o):Math.sqrt(o*o+a*a),c<s&&(c=s),s<l&&(l=s);d.max=c-l,d.min=l,d.v=h=p.amount||p.each*(h<f?h-1:_?"y"===_?h/f:f:Math.max(f,h/f))||0,d.b=h<0?b-h:b}return h=(d[e]-d.min)/d.max,d.b+(v?v.getRatio(h):h)*d.v}},y=function(e,t,r){g.call(this,e,t,r),this._cycle=0,this._yoyo=!0===this.vars.yoyo||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._repeat&&this._uncache(!0),this.render=y.prototype.render},_=1e-8,w=g._internals,x=w.isSelector,T=w.isArray,e=y.prototype=g.to({},.1,{}),S=[];y.version="2.1.3",e.constructor=y,e.kill()._gc=!1,y.killTweensOf=y.killDelayedCallsTo=g.killTweensOf,y.getTweensOf=g.getTweensOf,y.lagSmoothing=g.lagSmoothing,y.ticker=g.ticker,y.render=g.render,y.distribute=b,e.invalidate=function(){return this._yoyo=!0===this.vars.yoyo||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._yoyoEase=null,this._uncache(!0),g.prototype.invalidate.call(this)},e.updateTo=function(e,t){var r,i=this,n=i.ratio,o=i.vars.immediateRender||e.immediateRender;for(r in t&&i._startTime<i._timeline._time&&(i._startTime=i._timeline._time,i._uncache(!1),i._gc?i._enabled(!0,!1):i._timeline.insert(i,i._startTime-i._delay)),e)i.vars[r]=e[r];if(i._initted||o)if(t)i._initted=!1,o&&i.render(0,!0,!0);else if(i._gc&&i._enabled(!0,!1),i._notifyPluginsOfEnabled&&i._firstPT&&g._onPluginEvent("_onDisable",i),.998<i._time/i._duration){var a=i._totalTime;i.render(0,!0,!1),i._initted=!1,i.render(a,!0,!1)}else if(i._initted=!1,i._init(),0<i._time||o)for(var s,u=1/(1-n),c=i._firstPT;c;)s=c.s+c.c,c.c*=u,c.s=s-c.c,c=c._next;return i},e.render=function(e,t,r){this._initted||0===this._duration&&this.vars.repeat&&this.invalidate();var i,n,o,a,s,u,c,l,f,h=this,d=h._dirty?h.totalDuration():h._totalDuration,p=h._time,v=h._totalTime,m=h._cycle,b=h._duration,y=h._rawPrevTime;if(d-_<=e&&0<=e?(h._totalTime=d,h._cycle=h._repeat,h._yoyo&&0!=(1&h._cycle)?(h._time=0,h.ratio=h._ease._calcEnd?h._ease.getRatio(0):0):(h._time=b,h.ratio=h._ease._calcEnd?h._ease.getRatio(1):1),h._reversed||(i=!0,n="onComplete",r=r||h._timeline.autoRemoveChildren),0===b&&(h._initted||!h.vars.lazy||r)&&(h._startTime===h._timeline._duration&&(e=0),(y<0||e<=0&&-_<=e||y===_&&"isPause"!==h.data)&&y!==e&&(r=!0,_<y&&(n="onReverseComplete")),h._rawPrevTime=l=!t||e||y===e?e:_)):e<_?(h._totalTime=h._time=h._cycle=0,h.ratio=h._ease._calcEnd?h._ease.getRatio(0):0,(0!==v||0===b&&0<y)&&(n="onReverseComplete",i=h._reversed),-_<e?e=0:e<0&&(h._active=!1,0===b&&(h._initted||!h.vars.lazy||r)&&(0<=y&&(r=!0),h._rawPrevTime=l=!t||e||y===e?e:_)),h._initted||(r=!0)):(h._totalTime=h._time=e,0!==h._repeat&&(a=b+h._repeatDelay,h._cycle=h._totalTime/a>>0,0!==h._cycle&&h._cycle===h._totalTime/a&&v<=e&&h._cycle--,h._time=h._totalTime-h._cycle*a,h._yoyo&&0!=(1&h._cycle)&&(h._time=b-h._time,(f=h._yoyoEase||h.vars.yoyoEase)&&(h._yoyoEase||(!0!==f||h._initted?h._yoyoEase=f=!0===f?h._ease:f instanceof Ease?f:Ease.map[f]:(f=h.vars.ease,h._yoyoEase=f=f?f instanceof Ease?f:"function"==typeof f?new Ease(f,h.vars.easeParams):Ease.map[f]||g.defaultEase:g.defaultEase)),h.ratio=f?1-f.getRatio((b-h._time)/b):0)),h._time>b?h._time=b:h._time<0&&(h._time=0)),h._easeType&&!f?(s=h._time/b,(1===(u=h._easeType)||3===u&&.5<=s)&&(s=1-s),3===u&&(s*=2),1===(c=h._easePower)?s*=s:2===c?s*=s*s:3===c?s*=s*s*s:4===c&&(s*=s*s*s*s),h.ratio=1===u?1-s:2===u?s:h._time/b<.5?s/2:1-s/2):f||(h.ratio=h._ease.getRatio(h._time/b))),p!==h._time||r||m!==h._cycle){if(!h._initted){if(h._init(),!h._initted||h._gc)return;if(!r&&h._firstPT&&(!1!==h.vars.lazy&&h._duration||h.vars.lazy&&!h._duration))return h._time=p,h._totalTime=v,h._rawPrevTime=y,h._cycle=m,w.lazyTweens.push(h),void(h._lazy=[e,t]);!h._time||i||f?i&&this._ease._calcEnd&&!f&&(h.ratio=h._ease.getRatio(0===h._time?0:1)):h.ratio=h._ease.getRatio(h._time/b)}for(!1!==h._lazy&&(h._lazy=!1),h._active||!h._paused&&h._time!==p&&0<=e&&(h._active=!0),0===v&&(2===h._initted&&0<e&&h._init(),h._startAt&&(0<=e?h._startAt.render(e,!0,r):n||(n="_dummyGS")),h.vars.onStart&&(0===h._totalTime&&0!==b||t||h._callback("onStart"))),o=h._firstPT;o;)o.f?o.t[o.p](o.c*h.ratio+o.s):o.t[o.p]=o.c*h.ratio+o.s,o=o._next;h._onUpdate&&(e<0&&h._startAt&&h._startTime&&h._startAt.render(e,!0,r),t||(h._totalTime!==v||n)&&h._callback("onUpdate")),h._cycle!==m&&(t||h._gc||h.vars.onRepeat&&h._callback("onRepeat")),n&&(h._gc&&!r||(e<0&&h._startAt&&!h._onUpdate&&h._startTime&&h._startAt.render(e,!0,r),i&&(h._timeline.autoRemoveChildren&&h._enabled(!1,!1),h._active=!1),!t&&h.vars[n]&&h._callback(n),0===b&&h._rawPrevTime===_&&l!==_&&(h._rawPrevTime=0)))}else v!==h._totalTime&&h._onUpdate&&(t||h._callback("onUpdate"))},y.to=function(e,t,r){return new y(e,t,r)},y.from=function(e,t,r){return r.runBackwards=!0,r.immediateRender=0!=r.immediateRender,new y(e,t,r)},y.fromTo=function(e,t,r,i){return i.startAt=r,i.immediateRender=0!=i.immediateRender&&0!=r.immediateRender,new y(e,t,i)},y.staggerTo=y.allTo=function(e,t,r,i,n,o,a){var s,u,c,l,f=[],h=b(r.stagger||i),d=r.cycle,p=(r.startAt||S).cycle;for(T(e)||("string"==typeof e&&(e=g.selector(e)||e),x(e)&&(e=v(e))),s=(e=e||[]).length-1,c=0;c<=s;c++){for(l in u={},r)u[l]=r[l];if(d&&(m(u,e,c),null!=u.duration&&(t=u.duration,delete u.duration)),p){for(l in p=u.startAt={},r.startAt)p[l]=r.startAt[l];m(u.startAt,e,c)}u.delay=h(c,e[c],e)+(u.delay||0),c===s&&n&&(u.onComplete=function(){r.onComplete&&r.onComplete.apply(r.onCompleteScope||this,arguments),n.apply(a||r.callbackScope||this,o||S)}),f[c]=new y(e[c],t,u)}return f},y.staggerFrom=y.allFrom=function(e,t,r,i,n,o,a){return r.runBackwards=!0,r.immediateRender=0!=r.immediateRender,y.staggerTo(e,t,r,i,n,o,a)},y.staggerFromTo=y.allFromTo=function(e,t,r,i,n,o,a,s){return i.startAt=r,i.immediateRender=0!=i.immediateRender&&0!=r.immediateRender,y.staggerTo(e,t,i,n,o,a,s)},y.delayedCall=function(e,t,r,i,n){return new y(t,0,{delay:e,onComplete:t,onCompleteParams:r,callbackScope:i,onReverseComplete:t,onReverseCompleteParams:r,immediateRender:!1,useFrames:n,overwrite:0})},y.set=function(e,t){return new y(e,0,t)},y.isTweening=function(e){return 0<g.getTweensOf(e,!0).length};var o=function(e,t){for(var r=[],i=0,n=e._first;n;)n instanceof g?r[i++]=n:(t&&(r[i++]=n),i=(r=r.concat(o(n,t))).length),n=n._next;return r},f=y.getAllTweens=function(e){return o(i._rootTimeline,e).concat(o(i._rootFramesTimeline,e))};y.killAll=function(e,t,r,i){null==t&&(t=!0),null==r&&(r=!0);var n,o,a,s=f(0!=i),u=s.length,c=t&&r&&i;for(a=0;a<u;a++)o=s[a],(c||o instanceof l||(n=o.target===o.vars.onComplete)&&r||t&&!n)&&(e?o.totalTime(o._reversed?0:o.totalDuration()):o._enabled(!1,!1))},y.killChildTweensOf=function(e,t){if(null!=e){var r,i,n,o,a,s=w.tweenLookup;if("string"==typeof e&&(e=g.selector(e)||e),x(e)&&(e=v(e)),T(e))for(o=e.length;-1<--o;)y.killChildTweensOf(e[o],t);else{for(n in r=[],s)for(i=s[n].target.parentNode;i;)i===e&&(r=r.concat(s[n].tweens)),i=i.parentNode;for(a=r.length,o=0;o<a;o++)t&&r[o].totalTime(r[o].totalDuration()),r[o]._enabled(!1,!1)}}};var n=function(e,t,r,i){t=!1!==t,r=!1!==r;for(var n,o,a=f(i=!1!==i),s=t&&r&&i,u=a.length;-1<--u;)o=a[u],(s||o instanceof l||(n=o.target===o.vars.onComplete)&&r||t&&!n)&&o.paused(e)};return y.pauseAll=function(e,t,r){n(!0,e,t,r)},y.resumeAll=function(e,t,r){n(!1,e,t,r)},y.globalTimeScale=function(e){var t=i._rootTimeline,r=g.ticker.time;return arguments.length?(e=e||_,t._startTime=r-(r-t._startTime)*t._timeScale/e,t=i._rootFramesTimeline,r=g.ticker.frame,t._startTime=r-(r-t._startTime)*t._timeScale/e,t._timeScale=i._rootTimeline._timeScale=e,e):t._timeScale},e.progress=function(e,t){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!=(1&this._cycle)?1-e:e)+this._cycle*(this._duration+this._repeatDelay),t):this.duration()?this._time/this._duration:this.ratio},e.totalProgress=function(e,t){return arguments.length?this.totalTime(this.totalDuration()*e,t):this._totalTime/this.totalDuration()},e.time=function(e,t){if(!arguments.length)return this._time;this._dirty&&this.totalDuration();var r=this._duration,i=this._cycle,n=i*(r+this._repeatDelay);return r<e&&(e=r),this.totalTime(this._yoyo&&1&i?r-e+n:this._repeat?e+n:e,t)},e.duration=function(e){return arguments.length?i.prototype.duration.call(this,e):this._duration},e.totalDuration=function(e){return arguments.length?-1===this._repeat?this:this.duration((e-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat,this._dirty=!1),this._totalDuration)},e.repeat=function(e){return arguments.length?(this._repeat=e,this._uncache(!0)):this._repeat},e.repeatDelay=function(e){return arguments.length?(this._repeatDelay=e,this._uncache(!0)):this._repeatDelay},e.yoyo=function(e){return arguments.length?(this._yoyo=e,this):this._yoyo},y},!0),_gsScope._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(f,h,p){var v=function(e){h.call(this,e);var t,r,i=this.vars;for(r in this._labels={},this.autoRemoveChildren=!!i.autoRemoveChildren,this.smoothChildTiming=!!i.smoothChildTiming,this._sortChildren=!0,this._onUpdate=i.onUpdate,i)t=i[r],d(t)&&-1!==t.join("").indexOf("{self}")&&(i[r]=this._swapSelfInParams(t));d(i.tweens)&&this.add(i.tweens,0,i.align,i.stagger)},e=p._internals,t=v._internals={},m=e.isSelector,d=e.isArray,b=e.lazyTweens,y=e.lazyRender,a=_gsScope._gsDefine.globals,g=function(e){var t,r={};for(t in e)r[t]=e[t];return r},_=function(e,t,r){var i,n,o=e.cycle;for(i in o)n=o[i],e[i]="function"==typeof n?n(r,t[r],t):n[r%n.length];delete e.cycle},o=t.pauseCallback=function(){},c=function(e,t,r,i){var n="immediateRender";return n in t||(t[n]=!(r&&!1===r[n]||i)),t},w=function(e){if("function"==typeof e)return e;var p="object"==typeof e?e:{each:e},v=p.ease,m=p.from||0,b=p.base||0,y={},g=isNaN(m),_=p.axis,w={center:.5,end:1}[m]||0;return function(e,t,r){var i,n,o,a,s,u,c,l,f,h=(r||p).length,d=y[h];if(!d){if(!(f="auto"===p.grid?0:(p.grid||[1/0])[0])){for(c=-1/0;c<(c=r[f++].getBoundingClientRect().left)&&f<h;);f--}for(d=y[h]=[],i=g?Math.min(f,h)*w-.5:m%f,n=g?h*w/f-.5:m/f|0,l=1/(c=0),u=0;u<h;u++)o=u%f-i,a=n-(u/f|0),d[u]=s=_?Math.abs("y"===_?a:o):Math.sqrt(o*o+a*a),c<s&&(c=s),s<l&&(l=s);d.max=c-l,d.min=l,d.v=h=p.amount||p.each*(h<f?h-1:_?"y"===_?h/f:f:Math.max(f,h/f))||0,d.b=h<0?b-h:b}return h=(d[e]-d.min)/d.max,d.b+(v?v.getRatio(h):h)*d.v}},r=v.prototype=new h;return v.version="2.1.3",v.distribute=w,r.constructor=v,r.kill()._gc=r._forcingPlayhead=r._hasPause=!1,r.to=function(e,t,r,i){var n=r.repeat&&a.TweenMax||p;return t?this.add(new n(e,t,r),i):this.set(e,r,i)},r.from=function(e,t,r,i){return this.add((r.repeat&&a.TweenMax||p).from(e,t,c(0,r)),i)},r.fromTo=function(e,t,r,i,n){var o=i.repeat&&a.TweenMax||p;return i=c(0,i,r),t?this.add(o.fromTo(e,t,r,i),n):this.set(e,i,n)},r.staggerTo=function(e,t,r,i,n,o,a,s){var u,c,l=new v({onComplete:o,onCompleteParams:a,callbackScope:s,smoothChildTiming:this.smoothChildTiming}),f=w(r.stagger||i),h=r.startAt,d=r.cycle;for("string"==typeof e&&(e=p.selector(e)||e),m(e=e||[])&&(e=function(e){var t,r=[],i=e.length;for(t=0;t!==i;r.push(e[t++]));return r}(e)),c=0;c<e.length;c++)u=g(r),h&&(u.startAt=g(h),h.cycle&&_(u.startAt,e,c)),d&&(_(u,e,c),null!=u.duration&&(t=u.duration,delete u.duration)),l.to(e[c],t,u,f(c,e[c],e));return this.add(l,n)},r.staggerFrom=function(e,t,r,i,n,o,a,s){return r.runBackwards=!0,this.staggerTo(e,t,c(0,r),i,n,o,a,s)},r.staggerFromTo=function(e,t,r,i,n,o,a,s,u){return i.startAt=r,this.staggerTo(e,t,c(0,i,r),n,o,a,s,u)},r.call=function(e,t,r,i){return this.add(p.delayedCall(0,e,t,r),i)},r.set=function(e,t,r){return this.add(new p(e,0,c(0,t,null,!0)),r)},v.exportRoot=function(e,t){null==(e=e||{}).smoothChildTiming&&(e.smoothChildTiming=!0);var r,i,n,o,a=new v(e),s=a._timeline;for(null==t&&(t=!0),s._remove(a,!0),a._startTime=0,a._rawPrevTime=a._time=a._totalTime=s._time,n=s._first;n;)o=n._next,t&&n instanceof p&&n.target===n.vars.onComplete||((i=n._startTime-n._delay)<0&&(r=1),a.add(n,i)),n=o;return s.add(a,0),r&&a.totalDuration(),a},r.add=function(e,t,r,i){var n,o,a,s,u,c,l=this;if("number"!=typeof t&&(t=l._parseTimeOrLabel(t,0,!0,e)),!(e instanceof f)){if(e instanceof Array||e&&e.push&&d(e)){for(r=r||"normal",i=i||0,n=t,o=e.length,a=0;a<o;a++)d(s=e[a])&&(s=new v({tweens:s})),l.add(s,n),"string"!=typeof s&&"function"!=typeof s&&("sequence"===r?n=s._startTime+s.totalDuration()/s._timeScale:"start"===r&&(s._startTime-=s.delay())),n+=i;return l._uncache(!0)}if("string"==typeof e)return l.addLabel(e,t);if("function"!=typeof e)throw"Cannot add "+e+" into the timeline; it is not a tween, timeline, function, or string.";e=p.delayedCall(0,e)}if(h.prototype.add.call(l,e,t),(e._time||!e._duration&&e._initted)&&(n=(l.rawTime()-e._startTime)*e._timeScale,(!e._duration||1e-5<Math.abs(Math.max(0,Math.min(e.totalDuration(),n)))-e._totalTime)&&e.render(n,!1,!1)),(l._gc||l._time===l._duration)&&!l._paused&&l._duration<l.duration())for(c=(u=l).rawTime()>e._startTime;u._timeline;)c&&u._timeline.smoothChildTiming?u.totalTime(u._totalTime,!0):u._gc&&u._enabled(!0,!1),u=u._timeline;return l},r.remove=function(e){if(e instanceof f){this._remove(e,!1);var t=e._timeline=e.vars.useFrames?f._rootFramesTimeline:f._rootTimeline;return e._startTime=(e._paused?e._pauseTime:t._time)-(e._reversed?e.totalDuration()-e._totalTime:e._totalTime)/e._timeScale,this}if(e instanceof Array||e&&e.push&&d(e)){for(var r=e.length;-1<--r;)this.remove(e[r]);return this}return"string"==typeof e?this.removeLabel(e):this.kill(null,e)},r._remove=function(e,t){return h.prototype._remove.call(this,e,t),this._last?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},r.append=function(e,t){return this.add(e,this._parseTimeOrLabel(null,t,!0,e))},r.insert=r.insertMultiple=function(e,t,r,i){return this.add(e,t||0,r,i)},r.appendMultiple=function(e,t,r,i){return this.add(e,this._parseTimeOrLabel(null,t,!0,e),r,i)},r.addLabel=function(e,t){return this._labels[e]=this._parseTimeOrLabel(t),this},r.addPause=function(e,t,r,i){var n=p.delayedCall(0,o,r,i||this);return n.vars.onComplete=n.vars.onReverseComplete=t,n.data="isPause",this._hasPause=!0,this.add(n,e)},r.removeLabel=function(e){return delete this._labels[e],this},r.getLabelTime=function(e){return null!=this._labels[e]?this._labels[e]:-1},r._parseTimeOrLabel=function(e,t,r,i){var n,o;if(i instanceof f&&i.timeline===this)this.remove(i);else if(i&&(i instanceof Array||i.push&&d(i)))for(o=i.length;-1<--o;)i[o]instanceof f&&i[o].timeline===this&&this.remove(i[o]);if(n="number"!=typeof e||t?99999999999<this.duration()?this.recent().endTime(!1):this._duration:0,"string"==typeof t)return this._parseTimeOrLabel(t,r&&"number"==typeof e&&null==this._labels[t]?e-n:0,r);if(t=t||0,"string"!=typeof e||!isNaN(e)&&null==this._labels[e])null==e&&(e=n);else{if(-1===(o=e.indexOf("=")))return null==this._labels[e]?r?this._labels[e]=n+t:t:this._labels[e]+t;t=parseInt(e.charAt(o-1)+"1",10)*Number(e.substr(o+1)),e=1<o?this._parseTimeOrLabel(e.substr(0,o-1),0,r):n}return Number(e)+t},r.seek=function(e,t){return this.totalTime("number"==typeof e?e:this._parseTimeOrLabel(e),!1!==t)},r.stop=function(){return this.paused(!0)},r.gotoAndPlay=function(e,t){return this.play(e,t)},r.gotoAndStop=function(e,t){return this.pause(e,t)},r.render=function(e,t,r){this._gc&&this._enabled(!0,!1);var i,n,o,a,s,u,c,l,f=this,h=f._time,d=f._dirty?f.totalDuration():f._totalDuration,p=f._startTime,v=f._timeScale,m=f._paused;if(h!==f._time&&(e+=f._time-h),f._hasPause&&!f._forcingPlayhead&&!t){if(h<e)for(i=f._first;i&&i._startTime<=e&&!u;)i._duration||"isPause"!==i.data||i.ratio||0===i._startTime&&0===f._rawPrevTime||(u=i),i=i._next;else for(i=f._last;i&&i._startTime>=e&&!u;)i._duration||"isPause"===i.data&&0<i._rawPrevTime&&(u=i),i=i._prev;u&&(f._time=f._totalTime=e=u._startTime,l=f._startTime+(f._reversed?f._duration-e:e)/f._timeScale)}if(d-1e-8<=e&&0<=e)f._totalTime=f._time=d,f._reversed||f._hasPausedChild()||(n=!0,a="onComplete",s=!!f._timeline.autoRemoveChildren,0===f._duration&&(e<=0&&-1e-8<=e||f._rawPrevTime<0||1e-8===f._rawPrevTime)&&f._rawPrevTime!==e&&f._first&&(s=!0,1e-8<f._rawPrevTime&&(a="onReverseComplete"))),f._rawPrevTime=f._duration||!t||e||f._rawPrevTime===e?e:1e-8,e=d+1e-4;else if(e<1e-8)if(f._totalTime=f._time=0,-1e-8<e&&(e=0),(0!==h||0===f._duration&&1e-8!==f._rawPrevTime&&(0<f._rawPrevTime||e<0&&0<=f._rawPrevTime))&&(a="onReverseComplete",n=f._reversed),e<0)f._active=!1,f._timeline.autoRemoveChildren&&f._reversed?(s=n=!0,a="onReverseComplete"):0<=f._rawPrevTime&&f._first&&(s=!0),f._rawPrevTime=e;else{if(f._rawPrevTime=f._duration||!t||e||f._rawPrevTime===e?e:1e-8,0===e&&n)for(i=f._first;i&&0===i._startTime;)i._duration||(n=!1),i=i._next;e=0,f._initted||(s=!0)}else f._totalTime=f._time=f._rawPrevTime=e;if(f._time!==h&&f._first||r||s||u){if(f._initted||(f._initted=!0),f._active||!f._paused&&f._time!==h&&0<e&&(f._active=!0),0===h&&f.vars.onStart&&(0===f._time&&f._duration||t||f._callback("onStart")),h<=(c=f._time))for(i=f._first;i&&(o=i._next,c===f._time&&(!f._paused||m));)(i._active||i._startTime<=c&&!i._paused&&!i._gc)&&(u===i&&(f.pause(),f._pauseTime=l),i._reversed?i.render((i._dirty?i.totalDuration():i._totalDuration)-(e-i._startTime)*i._timeScale,t,r):i.render((e-i._startTime)*i._timeScale,t,r)),i=o;else for(i=f._last;i&&(o=i._prev,c===f._time&&(!f._paused||m));){if(i._active||i._startTime<=h&&!i._paused&&!i._gc){if(u===i){for(u=i._prev;u&&u.endTime()>f._time;)u.render(u._reversed?u.totalDuration()-(e-u._startTime)*u._timeScale:(e-u._startTime)*u._timeScale,t,r),u=u._prev;u=null,f.pause(),f._pauseTime=l}i._reversed?i.render((i._dirty?i.totalDuration():i._totalDuration)-(e-i._startTime)*i._timeScale,t,r):i.render((e-i._startTime)*i._timeScale,t,r)}i=o}f._onUpdate&&(t||(b.length&&y(),f._callback("onUpdate"))),a&&(f._gc||p!==f._startTime&&v===f._timeScale||(0===f._time||d>=f.totalDuration())&&(n&&(b.length&&y(),f._timeline.autoRemoveChildren&&f._enabled(!1,!1),f._active=!1),!t&&f.vars[a]&&f._callback(a)))}},r._hasPausedChild=function(){for(var e=this._first;e;){if(e._paused||e instanceof v&&e._hasPausedChild())return!0;e=e._next}return!1},r.getChildren=function(e,t,r,i){i=i||-9999999999;for(var n=[],o=this._first,a=0;o;)o._startTime<i||(o instanceof p?!1!==t&&(n[a++]=o):(!1!==r&&(n[a++]=o),!1!==e&&(a=(n=n.concat(o.getChildren(!0,t,r))).length))),o=o._next;return n},r.getTweensOf=function(e,t){var r,i,n=this._gc,o=[],a=0;for(n&&this._enabled(!0,!0),i=(r=p.getTweensOf(e)).length;-1<--i;)(r[i].timeline===this||t&&this._contains(r[i]))&&(o[a++]=r[i]);return n&&this._enabled(!1,!0),o},r.recent=function(){return this._recent},r._contains=function(e){for(var t=e.timeline;t;){if(t===this)return!0;t=t.timeline}return!1},r.shiftChildren=function(e,t,r){r=r||0;for(var i,n=this._first,o=this._labels;n;)n._startTime>=r&&(n._startTime+=e),n=n._next;if(t)for(i in o)o[i]>=r&&(o[i]+=e);return this._uncache(!0)},r._kill=function(e,t){if(!e&&!t)return this._enabled(!1,!1);for(var r=t?this.getTweensOf(t):this.getChildren(!0,!0,!1),i=r.length,n=!1;-1<--i;)r[i]._kill(e,t)&&(n=!0);return n},r.clear=function(e){var t=this.getChildren(!1,!0,!0),r=t.length;for(this._time=this._totalTime=0;-1<--r;)t[r]._enabled(!1,!1);return!1!==e&&(this._labels={}),this._uncache(!0)},r.invalidate=function(){for(var e=this._first;e;)e.invalidate(),e=e._next;return f.prototype.invalidate.call(this)},r._enabled=function(e,t){if(e===this._gc)for(var r=this._first;r;)r._enabled(e,!0),r=r._next;return h.prototype._enabled.call(this,e,t)},r.totalTime=function(e,t,r){this._forcingPlayhead=!0;var i=f.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,i},r.duration=function(e){return arguments.length?(0!==this.duration()&&0!==e&&this.timeScale(this._duration/e),this):(this._dirty&&this.totalDuration(),this._duration)},r.totalDuration=function(e){if(arguments.length)return e&&this.totalDuration()?this.timeScale(this._totalDuration/e):this;if(this._dirty){for(var t,r,i=0,n=this,o=n._last,a=999999999999;o;)t=o._prev,o._dirty&&o.totalDuration(),o._startTime>a&&n._sortChildren&&!o._paused&&!n._calculatingDuration?(n._calculatingDuration=1,n.add(o,o._startTime-o._delay),n._calculatingDuration=0):a=o._startTime,o._startTime<0&&!o._paused&&(i-=o._startTime,n._timeline.smoothChildTiming&&(n._startTime+=o._startTime/n._timeScale,n._time-=o._startTime,n._totalTime-=o._startTime,n._rawPrevTime-=o._startTime),n.shiftChildren(-o._startTime,!1,-9999999999),a=0),i<(r=o._startTime+o._totalDuration/o._timeScale)&&(i=r),o=t;n._duration=n._totalDuration=i,n._dirty=!1}return this._totalDuration},r.paused=function(e){if(!1===e&&this._paused)for(var t=this._first;t;)t._startTime===this._time&&"isPause"===t.data&&(t._rawPrevTime=0),t=t._next;return f.prototype.paused.apply(this,arguments)},r.usesFrames=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===f._rootFramesTimeline},r.rawTime=function(e){return e&&(this._paused||this._repeat&&0<this.time()&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(e)-this._startTime)*this._timeScale},v},!0),_gsScope._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(t,s,e){var r=function(e){t.call(this,e),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=!!this.vars.yoyo,this._dirty=!0},k=1e-8,i=s._internals,C=i.lazyTweens,A=i.lazyRender,u=_gsScope._gsDefine.globals,c=new e(null,null,1,0),n=r.prototype=new t;return n.constructor=r,n.kill()._gc=!1,r.version="2.1.3",n.invalidate=function(){return this._yoyo=!!this.vars.yoyo,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),t.prototype.invalidate.call(this)},n.addCallback=function(e,t,r,i){return this.add(s.delayedCall(0,e,r,i),t)},n.removeCallback=function(e,t){if(e)if(null==t)this._kill(null,e);else for(var r=this.getTweensOf(e,!1),i=r.length,n=this._parseTimeOrLabel(t);-1<--i;)r[i]._startTime===n&&r[i]._enabled(!1,!1);return this},n.removePause=function(e){return this.removeCallback(t._internals.pauseCallback,e)},n.tweenTo=function(e,t){t=t||{};var r,i,n,o={ease:c,useFrames:this.usesFrames(),immediateRender:!1,lazy:!1},a=t.repeat&&u.TweenMax||s;for(i in t)o[i]=t[i];return o.time=this._parseTimeOrLabel(e),r=Math.abs(Number(o.time)-this._time)/this._timeScale||.001,n=new a(this,r,o),o.onStart=function(){n.target.paused(!0),n.vars.time===n.target.time()||r!==n.duration()||n.isFromTo||n.duration(Math.abs(n.vars.time-n.target.time())/n.target._timeScale).render(n.time(),!0,!0),t.onStart&&t.onStart.apply(t.onStartScope||t.callbackScope||n,t.onStartParams||[])},n},n.tweenFromTo=function(e,t,r){r=r||{},e=this._parseTimeOrLabel(e),r.startAt={onComplete:this.seek,onCompleteParams:[e],callbackScope:this},r.immediateRender=!1!==r.immediateRender;var i=this.tweenTo(t,r);return i.isFromTo=1,i.duration(Math.abs(i.vars.time-e)/this._timeScale||.001)},n.render=function(e,t,r){this._gc&&this._enabled(!0,!1);var i,n,o,a,s,u,c,l,f,h=this,d=h._time,p=h._dirty?h.totalDuration():h._totalDuration,v=h._duration,m=h._totalTime,b=h._startTime,y=h._timeScale,g=h._rawPrevTime,_=h._paused,w=h._cycle;if(d!==h._time&&(e+=h._time-d),p-k<=e&&0<=e)h._locked||(h._totalTime=p,h._cycle=h._repeat),h._reversed||h._hasPausedChild()||(n=!0,a="onComplete",s=!!h._timeline.autoRemoveChildren,0===h._duration&&(e<=0&&-k<=e||g<0||g===k)&&g!==e&&h._first&&(s=!0,k<g&&(a="onReverseComplete"))),h._rawPrevTime=h._duration||!t||e||h._rawPrevTime===e?e:k,h._yoyo&&1&h._cycle?h._time=e=0:e=(h._time=v)+1e-4;else if(e<k)if(h._locked||(h._totalTime=h._cycle=0),h._time=0,-k<e&&(e=0),(0!==d||0===v&&g!==k&&(0<g||e<0&&0<=g)&&!h._locked)&&(a="onReverseComplete",n=h._reversed),e<0)h._active=!1,h._timeline.autoRemoveChildren&&h._reversed?(s=n=!0,a="onReverseComplete"):0<=g&&h._first&&(s=!0),h._rawPrevTime=e;else{if(h._rawPrevTime=v||!t||e||h._rawPrevTime===e?e:k,0===e&&n)for(i=h._first;i&&0===i._startTime;)i._duration||(n=!1),i=i._next;e=0,h._initted||(s=!0)}else 0===v&&g<0&&(s=!0),h._time=h._rawPrevTime=e,h._locked||(h._totalTime=e,0!==h._repeat&&(u=v+h._repeatDelay,h._cycle=h._totalTime/u>>0,h._cycle&&h._cycle===h._totalTime/u&&m<=e&&h._cycle--,h._time=h._totalTime-h._cycle*u,h._yoyo&&1&h._cycle&&(h._time=v-h._time),h._time>v?e=(h._time=v)+1e-4:h._time<0?h._time=e=0:e=h._time));if(h._hasPause&&!h._forcingPlayhead&&!t){if(d<(e=h._time)||h._repeat&&w!==h._cycle)for(i=h._first;i&&i._startTime<=e&&!c;)i._duration||"isPause"!==i.data||i.ratio||0===i._startTime&&0===h._rawPrevTime||(c=i),i=i._next;else for(i=h._last;i&&i._startTime>=e&&!c;)i._duration||"isPause"===i.data&&0<i._rawPrevTime&&(c=i),i=i._prev;c&&(f=h._startTime+(h._reversed?h._duration-c._startTime:c._startTime)/h._timeScale,c._startTime<v&&(h._time=h._rawPrevTime=e=c._startTime,h._totalTime=e+h._cycle*(h._totalDuration+h._repeatDelay)))}if(h._cycle!==w&&!h._locked){var x=h._yoyo&&0!=(1&w),T=x===(h._yoyo&&0!=(1&h._cycle)),S=h._totalTime,M=h._cycle,P=h._rawPrevTime,E=h._time;if(h._totalTime=w*v,h._cycle<w?x=!x:h._totalTime+=v,h._time=d,h._rawPrevTime=0===v?g-1e-4:g,h._cycle=w,h._locked=!0,d=x?0:v,h.render(d,t,0===v),t||h._gc||h.vars.onRepeat&&(h._cycle=M,h._locked=!1,h._callback("onRepeat")),d!==h._time)return;if(T&&(h._cycle=w,h._locked=!0,d=x?v+1e-4:-1e-4,h.render(d,!0,!1)),h._locked=!1,h._paused&&!_)return;h._time=E,h._totalTime=S,h._cycle=M,h._rawPrevTime=P}if(h._time!==d&&h._first||r||s||c){if(h._initted||(h._initted=!0),h._active||!h._paused&&h._totalTime!==m&&0<e&&(h._active=!0),0===m&&h.vars.onStart&&(0===h._totalTime&&h._totalDuration||t||h._callback("onStart")),d<=(l=h._time))for(i=h._first;i&&(o=i._next,l===h._time&&(!h._paused||_));)(i._active||i._startTime<=h._time&&!i._paused&&!i._gc)&&(c===i&&(h.pause(),h._pauseTime=f),i._reversed?i.render((i._dirty?i.totalDuration():i._totalDuration)-(e-i._startTime)*i._timeScale,t,r):i.render((e-i._startTime)*i._timeScale,t,r)),i=o;else for(i=h._last;i&&(o=i._prev,l===h._time&&(!h._paused||_));){if(i._active||i._startTime<=d&&!i._paused&&!i._gc){if(c===i){for(c=i._prev;c&&c.endTime()>h._time;)c.render(c._reversed?c.totalDuration()-(e-c._startTime)*c._timeScale:(e-c._startTime)*c._timeScale,t,r),c=c._prev;c=null,h.pause(),h._pauseTime=f}i._reversed?i.render((i._dirty?i.totalDuration():i._totalDuration)-(e-i._startTime)*i._timeScale,t,r):i.render((e-i._startTime)*i._timeScale,t,r)}i=o}h._onUpdate&&(t||(C.length&&A(),h._callback("onUpdate"))),a&&(h._locked||h._gc||b!==h._startTime&&y===h._timeScale||(0===h._time||p>=h.totalDuration())&&(n&&(C.length&&A(),h._timeline.autoRemoveChildren&&h._enabled(!1,!1),h._active=!1),!t&&h.vars[a]&&h._callback(a)))}else m!==h._totalTime&&h._onUpdate&&(t||h._callback("onUpdate"))},n.getActive=function(e,t,r){var i,n,o=[],a=this.getChildren(e||null==e,t||null==e,!!r),s=0,u=a.length;for(i=0;i<u;i++)(n=a[i]).isActive()&&(o[s++]=n);return o},n.getLabelAfter=function(e){e||0!==e&&(e=this._time);var t,r=this.getLabelsArray(),i=r.length;for(t=0;t<i;t++)if(r[t].time>e)return r[t].name;return null},n.getLabelBefore=function(e){null==e&&(e=this._time);for(var t=this.getLabelsArray(),r=t.length;-1<--r;)if(t[r].time<e)return t[r].name;return null},n.getLabelsArray=function(){var e,t=[],r=0;for(e in this._labels)t[r++]={time:this._labels[e],name:e};return t.sort(function(e,t){return e.time-t.time}),t},n.invalidate=function(){return this._locked=!1,t.prototype.invalidate.call(this)},n.progress=function(e,t){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!=(1&this._cycle)?1-e:e)+this._cycle*(this._duration+this._repeatDelay),t):this._time/this.duration()||0},n.totalProgress=function(e,t){return arguments.length?this.totalTime(this.totalDuration()*e,t):this._totalTime/this.totalDuration()||0},n.totalDuration=function(e){return arguments.length?-1!==this._repeat&&e?this.timeScale(this.totalDuration()/e):this:(this._dirty&&(t.prototype.totalDuration.call(this),this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},n.time=function(e,t){if(!arguments.length)return this._time;this._dirty&&this.totalDuration();var r=this._duration,i=this._cycle,n=i*(r+this._repeatDelay);return r<e&&(e=r),this.totalTime(this._yoyo&&1&i?r-e+n:this._repeat?e+n:e,t)},n.repeat=function(e){return arguments.length?(this._repeat=e,this._uncache(!0)):this._repeat},n.repeatDelay=function(e){return arguments.length?(this._repeatDelay=e,this._uncache(!0)):this._repeatDelay},n.yoyo=function(e){return arguments.length?(this._yoyo=e,this):this._yoyo},n.currentLabel=function(e){return arguments.length?this.seek(e,!0):this.getLabelBefore(this._time+k)},r},!0),S=180/Math.PI,w=[],x=[],T=[],b={},r=_gsScope._gsDefine.globals,y=function(e,t,r,i){r===i&&(r=i-(i-t)/1e6),e===t&&(t=e+(r-e)/1e6),this.a=e,this.b=t,this.c=r,this.d=i,this.da=i-e,this.ca=r-e,this.ba=t-e},M=function(e,t,r,i){var n={a:e},o={},a={},s={c:i},u=(e+t)/2,c=(t+r)/2,l=(r+i)/2,f=(u+c)/2,h=(c+l)/2,d=(h-f)/8;return n.b=u+(e-u)/4,o.b=f+d,n.c=o.a=(n.b+o.b)/2,o.c=a.a=(f+h)/2,a.b=h-d,s.b=l+(i-l)/4,a.c=s.a=(a.b+s.b)/2,[n,o,a,s]},g=function(e,t,r,i,n){var o,a,s,u,c,l,f,h,d,p,v,m,b,y=e.length-1,g=0,_=e[0].a;for(o=0;o<y;o++)a=(c=e[g]).a,s=c.d,u=e[g+1].d,h=n?(v=w[o],b=((m=x[o])+v)*t*.25/(i?.5:T[o]||.5),s-((l=s-(s-a)*(i?.5*t:0!==v?b/v:0))+(((f=s+(u-s)*(i?.5*t:0!==m?b/m:0))-l)*(3*v/(v+m)+.5)/4||0))):s-((l=s-(s-a)*t*.5)+(f=s+(u-s)*t*.5))/2,l+=h,f+=h,c.c=d=l,c.b=0!==o?_:_=c.a+.6*(c.c-c.a),c.da=s-a,c.ca=d-a,c.ba=_-a,r?(p=M(a,_,d,s),e.splice(g,1,p[0],p[1],p[2],p[3]),g+=4):g++,_=f;(c=e[g]).b=_,c.c=_+.4*(c.d-_),c.da=c.d-c.a,c.ca=c.c-c.a,c.ba=_-c.a,r&&(p=M(c.a,_,c.c,c.d),e.splice(g,1,p[0],p[1],p[2],p[3]))},_=function(e,t,r,i){var n,o,a,s,u,c,l=[];if(i)for(o=(e=[i].concat(e)).length;-1<--o;)"string"==typeof(c=e[o][t])&&"="===c.charAt(1)&&(e[o][t]=i[t]+Number(c.charAt(0)+c.substr(2)));if((n=e.length-2)<0)return l[0]=new y(e[0][t],0,0,e[0][t]),l;for(o=0;o<n;o++)a=e[o][t],s=e[o+1][t],l[o]=new y(a,0,0,s),r&&(u=e[o+2][t],w[o]=(w[o]||0)+(s-a)*(s-a),x[o]=(x[o]||0)+(u-s)*(u-s));return l[o]=new y(e[o][t],0,0,e[o+1][t]),l},d=function(e,t,r,i,n,o){var a,s,u,c,l,f,h,d,p={},v=[],m=o||e[0];for(s in n="string"==typeof n?","+n+",":",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",null==t&&(t=1),e[0])v.push(s);if(1<e.length){for(d=e[e.length-1],h=!0,a=v.length;-1<--a;)if(s=v[a],.05<Math.abs(m[s]-d[s])){h=!1;break}h&&(e=e.concat(),o&&e.unshift(o),e.push(e[1]),o=e[e.length-3])}for(w.length=x.length=T.length=0,a=v.length;-1<--a;)s=v[a],b[s]=-1!==n.indexOf(","+s+","),p[s]=_(e,s,b[s],o);for(a=w.length;-1<--a;)w[a]=Math.sqrt(w[a]),x[a]=Math.sqrt(x[a]);if(!i){for(a=v.length;-1<--a;)if(b[s])for(f=(u=p[v[a]]).length-1,c=0;c<f;c++)l=u[c+1].da/x[c]+u[c].da/w[c]||0,T[c]=(T[c]||0)+l*l;for(a=T.length;-1<--a;)T[a]=Math.sqrt(T[a])}for(a=v.length,c=r?4:1;-1<--a;)u=p[s=v[a]],g(u,t,r,i,b[s]),h&&(u.splice(0,c),u.splice(u.length-c,c));return p},p=function(e,t,r){for(var i,n,o,a,s,u,c,l,f,h,d,p=1/r,v=e.length;-1<--v;)for(o=(h=e[v]).a,a=h.d-o,s=h.c-o,u=h.b-o,i=n=0,l=1;l<=r;l++)i=n-(n=((c=p*l)*c*a+3*(f=1-c)*(c*s+f*u))*c),t[d=v*r+l-1]=(t[d]||0)+i*i},m=_gsScope._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.9",API:2,global:!0,init:function(e,t,r){this._target=e,t instanceof Array&&(t={values:t}),this._func={},this._mod={},this._props=[],this._timeRes=null==t.timeResolution?6:parseInt(t.timeResolution,10);var i,n,o,a,s,u=t.values||[],c={},l=u[0],f=t.autoRotate||r.vars.orientToBezier;for(i in this._autoRotate=f?f instanceof Array?f:[["x","y","rotation",!0===f?0:Number(f)||0]]:null,l)this._props.push(i);for(o=this._props.length;-1<--o;)i=this._props[o],this._overwriteProps.push(i),n=this._func[i]="function"==typeof e[i],c[i]=n?e[i.indexOf("set")||"function"!=typeof e["get"+i.substr(3)]?i:"get"+i.substr(3)]():parseFloat(e[i]),s||c[i]!==u[0][i]&&(s=c);if(this._beziers="cubic"!==t.type&&"quadratic"!==t.type&&"soft"!==t.type?d(u,isNaN(t.curviness)?1:t.curviness,!1,"thruBasic"===t.type,t.correlate,s):function(e,t,r){var i,n,o,a,s,u,c,l,f,h,d,p={},v="cubic"===(t=t||"soft")?3:2,m="soft"===t,b=[];if(m&&r&&(e=[r].concat(e)),null==e||e.length<1+v)throw"invalid Bezier data";for(f in e[0])b.push(f);for(u=b.length;-1<--u;){for(p[f=b[u]]=s=[],h=0,l=e.length,c=0;c<l;c++)i=null==r?e[c][f]:"string"==typeof(d=e[c][f])&&"="===d.charAt(1)?r[f]+Number(d.charAt(0)+d.substr(2)):Number(d),m&&1<c&&c<l-1&&(s[h++]=(i+s[h-2])/2),s[h++]=i;for(l=h-v+1,c=h=0;c<l;c+=v)i=s[c],n=s[c+1],o=s[c+2],a=2==v?0:s[c+3],s[h++]=d=3==v?new y(i,n,o,a):new y(i,(2*n+i)/3,(2*n+o)/3,o);s.length=h}return p}(u,t.type,c),this._segCount=this._beziers[i].length,this._timeRes){var h=function(e,t){var r,i,n,o,a=[],s=[],u=0,c=0,l=(t=t>>0||6)-1,f=[],h=[];for(r in e)p(e[r],a,t);for(n=a.length,i=0;i<n;i++)u+=Math.sqrt(a[i]),h[o=i%t]=u,o===l&&(c+=u,f[o=i/t>>0]=h,s[o]=c,u=0,h=[]);return{length:c,lengths:s,segments:f}}(this._beziers,this._timeRes);this._length=h.length,this._lengths=h.lengths,this._segments=h.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length}if(f=this._autoRotate)for(this._initialRotations=[],f[0]instanceof Array||(this._autoRotate=f=[f]),o=f.length;-1<--o;){for(a=0;a<3;a++)i=f[o][a],this._func[i]="function"==typeof e[i]&&e[i.indexOf("set")||"function"!=typeof e["get"+i.substr(3)]?i:"get"+i.substr(3)];i=f[o][2],this._initialRotations[o]=(this._func[i]?this._func[i].call(this._target):this._target[i])||0,this._overwriteProps.push(i)}return this._startRatio=r.vars.runBackwards?1:0,!0},set:function(e){var t,r,i,n,o,a,s,u,c,l,f,h=this._segCount,d=this._func,p=this._target,v=e!==this._startRatio;if(this._timeRes){if(c=this._lengths,l=this._curSeg,f=e*this._length,i=this._li,f>this._l2&&i<h-1){for(u=h-1;i<u&&(this._l2=c[++i])<=f;);this._l1=c[i-1],this._li=i,this._curSeg=l=this._segments[i],this._s2=l[this._s1=this._si=0]}else if(f<this._l1&&0<i){for(;0<i&&(this._l1=c[--i])>=f;);0===i&&f<this._l1?this._l1=0:i++,this._l2=c[i],this._li=i,this._curSeg=l=this._segments[i],this._s1=l[(this._si=l.length-1)-1]||0,this._s2=l[this._si]}if(t=i,f-=this._l1,i=this._si,f>this._s2&&i<l.length-1){for(u=l.length-1;i<u&&(this._s2=l[++i])<=f;);this._s1=l[i-1],this._si=i}else if(f<this._s1&&0<i){for(;0<i&&(this._s1=l[--i])>=f;);0===i&&f<this._s1?this._s1=0:i++,this._s2=l[i],this._si=i}a=1===e?1:(i+(f-this._s1)/(this._s2-this._s1))*this._prec||0}else a=(e-(t=e<0?0:1<=e?h-1:h*e>>0)*(1/h))*h;for(r=1-a,i=this._props.length;-1<--i;)n=this._props[i],s=(a*a*(o=this._beziers[n][t]).da+3*r*(a*o.ca+r*o.ba))*a+o.a,this._mod[n]&&(s=this._mod[n](s,p)),d[n]?p[n](s):p[n]=s;if(this._autoRotate){var m,b,y,g,_,w,x,T=this._autoRotate;for(i=T.length;-1<--i;)n=T[i][2],w=T[i][3]||0,x=!0===T[i][4]?1:S,o=this._beziers[T[i][0]],m=this._beziers[T[i][1]],o&&m&&(o=o[t],m=m[t],b=o.a+(o.b-o.a)*a,b+=((g=o.b+(o.c-o.b)*a)-b)*a,g+=(o.c+(o.d-o.c)*a-g)*a,y=m.a+(m.b-m.a)*a,y+=((_=m.b+(m.c-m.b)*a)-y)*a,_+=(m.c+(m.d-m.c)*a-_)*a,s=v?Math.atan2(_-y,g-b)*x+w:this._initialRotations[i],this._mod[n]&&(s=this._mod[n](s,p)),d[n]?p[n](s):p[n]=s)}}}),e=m.prototype,m.bezierThrough=d,m.cubicToQuadratic=M,m._autoCSS=!0,m.quadraticToCubic=function(e,t,r){return new y(e,(2*t+e)/3,(2*t+r)/3,r)},m._cssRegister=function(){var e=r.CSSPlugin;if(e){var t=e._internals,d=t._parseToProxy,p=t._setPluginRatio,v=t.CSSPropTween;t._registerComplexSpecialProp("bezier",{parser:function(e,t,r,i,n,o){t instanceof Array&&(t={values:t}),o=new m;var a,s,u,c=t.values,l=c.length-1,f=[],h={};if(l<0)return n;for(a=0;a<=l;a++)u=d(e,c[a],i,n,o,l!==a),f[a]=u.end;for(s in t)h[s]=t[s];return h.values=f,(n=new v(e,"bezier",0,0,u.pt,2)).data=u,n.plugin=o,n.setRatio=p,0===h.autoRotate&&(h.autoRotate=!0),!h.autoRotate||h.autoRotate instanceof Array||(a=!0===h.autoRotate?0:Number(h.autoRotate),h.autoRotate=null!=u.end.left?[["left","top","rotation",a,!1]]:null!=u.end.x&&[["x","y","rotation",a,!1]]),h.autoRotate&&(i._transform||i._enableTransforms(!1),u.autoRotate=i._target._gsTransform,u.proxy.rotation=u.autoRotate.rotation||0,i._overwriteProps.push("rotation")),o._onInitTween(u.proxy,h,i._tween),n}})}},e._mod=function(e){for(var t,r=this._overwriteProps,i=r.length;-1<--i;)(t=e[r[i]])&&"function"==typeof t&&(this._mod[r[i]]=t)},e._kill=function(e){var t,r,i=this._props;for(t in this._beziers)if(t in e)for(delete this._beziers[t],delete this._func[t],r=i.length;-1<--r;)i[r]===t&&i.splice(r,1);if(i=this._autoRotate)for(r=i.length;-1<--r;)e[i[r][2]]&&i.splice(r,1);return this._super._kill.call(this,e)},_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(o,U){var p,S,M,v,z=function(){o.call(this,"css"),this._overwriteProps.length=0,this.setRatio=z.prototype.setRatio},c=_gsScope._gsDefine.globals,m={},e=z.prototype=new o("css");(e.constructor=z).version="2.1.3",z.API=2,z.defaultTransformPerspective=0,z.defaultSkewType="compensated",z.defaultSmoothOrigin=!0,e="px",z.suffixMap={top:e,right:e,bottom:e,left:e,width:e,height:e,fontSize:e,padding:e,margin:e,perspective:e,lineHeight:""};var E,b,y,F,g,P,k,C,t,r,A=/(?:\-|\.|\b)(\d|\.|e\-)+/g,O=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,_=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,n=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b),?/gi,l=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,I=/(?:\d|\-|\+|=|#|\.)*/g,R=/opacity *= *([^)]*)/i,w=/opacity:([^;]*)/i,a=/alpha\(opacity *=.+?\)/i,x=/^(rgb|hsl)/,s=/([A-Z])/g,u=/-([a-z])/gi,T=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,f=function(e,t){return t.toUpperCase()},d=/(?:Left|Right|Width)/i,h=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,D=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,L=/,(?=[^\)]*(?:\(|$))/gi,j=/[\s,\(]/i,B=Math.PI/180,X=180/Math.PI,N={},i={style:{}},W=_gsScope.document||{createElement:function(){return i}},q=function(e,t){var r=W.createElementNS?W.createElementNS(t||"http://www.w3.org/1999/xhtml",e):W.createElement(e);return r.style?r:W.createElement(e)},H=q("div"),G=q("img"),V=z._internals={_specialProps:m},Y=(_gsScope.navigator||{}).userAgent||"",J=(t=Y.indexOf("Android"),r=q("a"),y=-1!==Y.indexOf("Safari")&&-1===Y.indexOf("Chrome")&&(-1===t||3<parseFloat(Y.substr(t+8,2))),g=y&&parseFloat(Y.substr(Y.indexOf("Version/")+8,2))<6,F=-1!==Y.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(Y)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(Y))&&(P=parseFloat(RegExp.$1)),!!r&&(r.style.cssText="top:1px;opacity:.55;",/^0.55/.test(r.style.opacity))),K=function(e){return R.test("string"==typeof e?e:(e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?parseFloat(RegExp.$1)/100:1},Z=function(e){_gsScope.console&&console.log(e)},Q="",$="",ee=function(e,t){var r,i,n=(t=t||H).style;if(void 0!==n[e])return e;for(e=e.charAt(0).toUpperCase()+e.substr(1),r=["O","Moz","ms","Ms","Webkit"],i=5;-1<--i&&void 0===n[r[i]+e];);return 0<=i?(Q="-"+($=3===i?"ms":r[i]).toLowerCase()+"-",$+e):null},te="undefined"!=typeof window?window:W.defaultView||{getComputedStyle:function(){}},re=function(e){return te.getComputedStyle(e)},ie=z.getStyle=function(e,t,r,i,n){var o;return J||"opacity"!==t?(!i&&e.style[t]?o=e.style[t]:(r=r||re(e))?o=r[t]||r.getPropertyValue(t)||r.getPropertyValue(t.replace(s,"-$1").toLowerCase()):e.currentStyle&&(o=e.currentStyle[t]),null==n||o&&"none"!==o&&"auto"!==o&&"auto auto"!==o?o:n):K(e)},ne=V.convertToPixels=function(e,t,r,i,n){if("px"===i||!i&&"lineHeight"!==t)return r;if("auto"===i||!r)return 0;var o,a,s,u=d.test(t),c=e,l=H.style,f=r<0,h=1===r;if(f&&(r=-r),h&&(r*=100),"lineHeight"!==t||i)if("%"===i&&-1!==t.indexOf("border"))o=r/100*(u?e.clientWidth:e.clientHeight);else{if(l.cssText="border:0 solid red;position:"+ie(e,"position")+";line-height:0;","%"!==i&&c.appendChild&&"v"!==i.charAt(0)&&"rem"!==i)l[u?"borderLeftWidth":"borderTopWidth"]=r+i;else{if(c=e.parentNode||W.body,-1!==ie(c,"display").indexOf("flex")&&(l.position="absolute"),a=c._gsCache,s=U.ticker.frame,a&&u&&a.time===s)return a.width*r/100;l[u?"width":"height"]=r+i}c.appendChild(H),o=parseFloat(H[u?"offsetWidth":"offsetHeight"]),c.removeChild(H),u&&"%"===i&&!1!==z.cacheWidths&&((a=c._gsCache=c._gsCache||{}).time=s,a.width=o/r*100),0!==o||n||(o=ne(e,t,r,i,!0))}else a=re(e).lineHeight,e.style.lineHeight=r,o=parseFloat(re(e).lineHeight),e.style.lineHeight=a;return h&&(o/=100),f?-o:o},oe=V.calculateOffset=function(e,t,r){if("absolute"!==ie(e,"position",r))return 0;var i="left"===t?"Left":"Top",n=ie(e,"margin"+i,r);return e["offset"+i]-(ne(e,t,parseFloat(n),n.replace(I,""))||0)},ae=function(e,t){var r,i,n,o={};if(t=t||re(e))if(r=t.length)for(;-1<--r;)-1!==(n=t[r]).indexOf("-transform")&&Fe!==n||(o[n.replace(u,f)]=t.getPropertyValue(n));else for(r in t)-1!==r.indexOf("Transform")&&je!==r||(o[r]=t[r]);else if(t=e.currentStyle||e.style)for(r in t)"string"==typeof r&&void 0===o[r]&&(o[r.replace(u,f)]=t[r]);return J||(o.opacity=K(e)),i=Ke(e,t,!1),o.rotation=i.rotation,o.skewX=i.skewX,o.scaleX=i.scaleX,o.scaleY=i.scaleY,o.x=i.x,o.y=i.y,Ne&&(o.z=i.z,o.rotationX=i.rotationX,o.rotationY=i.rotationY,o.scaleZ=i.scaleZ),o.filters&&delete o.filters,o},se=function(e,t,r,i,n){var o,a,s,u={},c=e.style;for(a in r)"cssText"!==a&&"length"!==a&&isNaN(a)&&(t[a]!==(o=r[a])||n&&n[a])&&-1===a.indexOf("Origin")&&("number"!=typeof o&&"string"!=typeof o||(u[a]="auto"!==o||"left"!==a&&"top"!==a?""!==o&&"auto"!==o&&"none"!==o||"string"!=typeof t[a]||""===t[a].replace(l,"")?o:0:oe(e,a),void 0!==c[a]&&(s=new xe(c,a,c[a],s))));if(i)for(a in i)"className"!==a&&(u[a]=i[a]);return{difs:u,firstMPT:s}},ue={width:["Left","Right"],height:["Top","Bottom"]},ce=["marginLeft","marginRight","marginTop","marginBottom"],le=function(e,t,r){if("svg"===(e.nodeName+"").toLowerCase())return(r||re(e))[t]||0;if(e.getCTM&&Ve(e))return e.getBBox()[t]||0;var i=parseFloat("width"===t?e.offsetWidth:e.offsetHeight),n=ue[t],o=n.length;for(r=r||re(e);-1<--o;)i-=parseFloat(ie(e,"padding"+n[o],r,!0))||0,i-=parseFloat(ie(e,"border"+n[o]+"Width",r,!0))||0;return i},fe=function(e,t){if("contain"===e||"auto"===e||"auto auto"===e)return e+" ";null!=e&&""!==e||(e="0 0");var r,i=e.split(" "),n=-1!==e.indexOf("left")?"0%":-1!==e.indexOf("right")?"100%":i[0],o=-1!==e.indexOf("top")?"0%":-1!==e.indexOf("bottom")?"100%":i[1];if(3<i.length&&!t){for(i=e.split(", ").join(",").split(","),e=[],r=0;r<i.length;r++)e.push(fe(i[r]));return e.join(",")}return null==o?o="center"===n?"50%":"0":"center"===o&&(o="50%"),("center"===n||isNaN(parseFloat(n))&&-1===(n+"").indexOf("="))&&(n="50%"),e=n+" "+o+(2<i.length?" "+i[2]:""),t&&(t.oxp=-1!==n.indexOf("%"),t.oyp=-1!==o.indexOf("%"),t.oxr="="===n.charAt(1),t.oyr="="===o.charAt(1),t.ox=parseFloat(n.replace(l,"")),t.oy=parseFloat(o.replace(l,"")),t.v=e),t||e},he=function(e,t){return"function"==typeof e&&(e=e(C,k)),"string"==typeof e&&"="===e.charAt(1)?parseInt(e.charAt(0)+"1",10)*parseFloat(e.substr(2)):parseFloat(e)-parseFloat(t)||0},de=function(e,t){"function"==typeof e&&(e=e(C,k));var r="string"==typeof e&&"="===e.charAt(1);return"string"==typeof e&&"v"===e.charAt(e.length-2)&&(e=(r?e.substr(0,2):0)+window["inner"+("vh"===e.substr(-2)?"Height":"Width")]*(parseFloat(r?e.substr(2):e)/100)),null==e?t:r?parseInt(e.charAt(0)+"1",10)*parseFloat(e.substr(2))+t:parseFloat(e)||0},pe=function(e,t,r,i){var n,o,a,s;return"function"==typeof e&&(e=e(C,k)),(a=null==e?t:"number"==typeof e?e:(360,n=e.split("_"),o=((s="="===e.charAt(1))?parseInt(e.charAt(0)+"1",10)*parseFloat(n[0].substr(2)):parseFloat(n[0]))*(-1===e.indexOf("rad")?1:X)-(s?0:t),n.length&&(i&&(i[r]=t+o),-1!==e.indexOf("short")&&(o%=360)!==o%180&&(o=o<0?o+360:o-360),-1!==e.indexOf("_cw")&&o<0?o=(o+3599999999640)%360-360*(o/360|0):-1!==e.indexOf("ccw")&&0<o&&(o=(o-3599999999640)%360-360*(o/360|0))),t+o))<1e-6&&-1e-6<a&&(a=0),a},ve={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},me=function(e,t,r){return 255*(6*(e=e<0?e+1:1<e?e-1:e)<1?t+(r-t)*e*6:e<.5?r:3*e<2?t+(r-t)*(2/3-e)*6:t)+.5|0},be=z.parseColor=function(e,t){var r,i,n,o,a,s,u,c,l,f,h;if(e)if("number"==typeof e)r=[e>>16,e>>8&255,255&e];else{if(","===e.charAt(e.length-1)&&(e=e.substr(0,e.length-1)),ve[e])r=ve[e];else if("#"===e.charAt(0))4===e.length&&(e="#"+(i=e.charAt(1))+i+(n=e.charAt(2))+n+(o=e.charAt(3))+o),r=[(e=parseInt(e.substr(1),16))>>16,e>>8&255,255&e];else if("hsl"===e.substr(0,3))if(r=h=e.match(A),t){if(-1!==e.indexOf("="))return e.match(O)}else a=Number(r[0])%360/360,s=Number(r[1])/100,i=2*(u=Number(r[2])/100)-(n=u<=.5?u*(s+1):u+s-u*s),3<r.length&&(r[3]=Number(r[3])),r[0]=me(a+1/3,i,n),r[1]=me(a,i,n),r[2]=me(a-1/3,i,n);else r=e.match(A)||ve.transparent;r[0]=Number(r[0]),r[1]=Number(r[1]),r[2]=Number(r[2]),3<r.length&&(r[3]=Number(r[3]))}else r=ve.black;return t&&!h&&(i=r[0]/255,n=r[1]/255,o=r[2]/255,u=((c=Math.max(i,n,o))+(l=Math.min(i,n,o)))/2,c===l?a=s=0:(f=c-l,s=.5<u?f/(2-c-l):f/(c+l),a=c===i?(n-o)/f+(n<o?6:0):c===n?(o-i)/f+2:(i-n)/f+4,a*=60),r[0]=a+.5|0,r[1]=100*s+.5|0,r[2]=100*u+.5|0),r},ye=function(e,t){var r,i,n,o=e.match(ge)||[],a=0,s="";if(!o.length)return e;for(r=0;r<o.length;r++)i=o[r],a+=(n=e.substr(a,e.indexOf(i,a)-a)).length+i.length,3===(i=be(i,t)).length&&i.push(1),s+=n+(t?"hsla("+i[0]+","+i[1]+"%,"+i[2]+"%,"+i[3]:"rgba("+i.join(","))+")";return s+e.substr(a)},ge="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(e in ve)ge+="|"+e+"\\b";ge=new RegExp(ge+")","gi"),z.colorStringFilter=function(e){var t,r=e[0]+" "+e[1];ge.test(r)&&(t=-1!==r.indexOf("hsl(")||-1!==r.indexOf("hsla("),e[0]=ye(e[0],t),e[1]=ye(e[1],t)),ge.lastIndex=0},U.defaultStringFilter||(U.defaultStringFilter=z.colorStringFilter);var _e=function(e,t,o,a){if(null==e)return function(e){return e};var s,u=t?(e.match(ge)||[""])[0]:"",c=e.split(u).join("").match(_)||[],l=e.substr(0,e.indexOf(c[0])),f=")"===e.charAt(e.length-1)?")":"",h=-1!==e.indexOf(" ")?" ":",",d=c.length,p=0<d?c[0].replace(A,""):"";return d?s=t?function(e){var t,r,i,n;if("number"==typeof e)e+=p;else if(a&&L.test(e)){for(n=e.replace(L,"|").split("|"),i=0;i<n.length;i++)n[i]=s(n[i]);return n.join(",")}if(t=(e.match(ge)||[u])[0],i=(r=e.split(t).join("").match(_)||[]).length,d>i--)for(;++i<d;)r[i]=o?r[(i-1)/2|0]:c[i];return l+r.join(h)+h+t+f+(-1!==e.indexOf("inset")?" inset":"")}:function(e){var t,r,i;if("number"==typeof e)e+=p;else if(a&&L.test(e)){for(r=e.replace(L,"|").split("|"),i=0;i<r.length;i++)r[i]=s(r[i]);return r.join(",")}if(i=(t=e.match(","==h?_:n)||[]).length,d>i--)for(;++i<d;)t[i]=o?t[(i-1)/2|0]:c[i];return(l&&"none"!==e&&e.substr(0,e.indexOf(t[0]))||l)+t.join(h)+f}:function(e){return e}},we=function(c){return c=c.split(","),function(e,t,r,i,n,o,a){var s,u=(t+"").split(" ");for(a={},s=0;s<4;s++)a[c[s]]=u[s]=u[s]||u[(s-1)/2>>0];return i.parse(e,a,n,o)}},xe=(V._setPluginRatio=function(e){this.plugin.setRatio(e);for(var t,r,i,n,o,a=this.data,s=a.proxy,u=a.firstMPT;u;)t=s[u.v],u.r?t=u.r(t):t<1e-6&&-1e-6<t&&(t=0),u.t[u.p]=t,u=u._next;if(a.autoRotate&&(a.autoRotate.rotation=a.mod?a.mod.call(this._tween,s.rotation,this.t,this._tween):s.rotation),1===e||0===e)for(u=a.firstMPT,o=1===e?"e":"b";u;){if((r=u.t).type){if(1===r.type){for(n=r.xs0+r.s+r.xs1,i=1;i<r.l;i++)n+=r["xn"+i]+r["xs"+(i+1)];r[o]=n}}else r[o]=r.s+r.xs0;u=u._next}},function(e,t,r,i,n){this.t=e,this.p=t,this.v=r,this.r=n,i&&((i._prev=this)._next=i)}),Te=(V._parseToProxy=function(e,t,r,i,n,o){var a,s,u,c,l,f=i,h={},d={},p=r._transform,v=N;for(r._transform=null,N=t,i=l=r.parse(e,t,i,n),N=v,o&&(r._transform=p,f&&(f._prev=null,f._prev&&(f._prev._next=null)));i&&i!==f;){if(i.type<=1&&(d[s=i.p]=i.s+i.c,h[s]=i.s,o||(c=new xe(i,"s",s,c,i.r),i.c=0),1===i.type))for(a=i.l;0<--a;)u="xn"+a,d[s=i.p+"_"+u]=i.data[u],h[s]=i[u],o||(c=new xe(i,u,s,c,i.rxp[u]));i=i._next}return{proxy:h,end:d,firstMPT:c,pt:l}},V.CSSPropTween=function(e,t,r,i,n,o,a,s,u,c,l){this.t=e,this.p=t,this.s=r,this.c=i,this.n=a||t,e instanceof Te||v.push(this.n),this.r=s?"function"==typeof s?s:Math.round:s,this.type=o||0,u&&(this.pr=u,p=!0),this.b=void 0===c?r:c,this.e=void 0===l?r+i:l,n&&((this._next=n)._prev=this)}),Se=function(e,t,r,i,n,o){var a=new Te(e,t,r,i-r,n,-1,o);return a.b=r,a.e=a.xs0=i,a},Me=z.parseComplex=function(e,t,r,i,n,o,a,s,u,c){r=r||o||"","function"==typeof i&&(i=i(C,k)),a=new Te(e,t,0,0,a,c?2:1,null,!1,s,r,i),i+="",n&&ge.test(i+r)&&(i=[r,i],z.colorStringFilter(i),r=i[0],i=i[1]);var l,f,h,d,p,v,m,b,y,g,_,w,x,T=r.split(", ").join(",").split(" "),S=i.split(", ").join(",").split(" "),M=T.length,P=!1!==E;for(-1===i.indexOf(",")&&-1===r.indexOf(",")||(S=-1!==(i+r).indexOf("rgb")||-1!==(i+r).indexOf("hsl")?(T=T.join(" ").replace(L,", ").split(" "),S.join(" ").replace(L,", ").split(" ")):(T=T.join(" ").split(",").join(", ").split(" "),S.join(" ").split(",").join(", ").split(" ")),M=T.length),M!==S.length&&(M=(T=(o||"").split(" ")).length),a.plugin=u,a.setRatio=c,l=ge.lastIndex=0;l<M;l++)if(d=T[l],p=S[l]+"",(b=parseFloat(d))||0===b)a.appendXtra("",b,he(p,b),p.replace(O,""),P&&-1!==p.indexOf("px")&&Math.round,!0);else if(n&&ge.test(d))w=")"+((w=p.indexOf(")")+1)?p.substr(w):""),x=-1!==p.indexOf("hsl")&&J,g=p,d=be(d,x),p=be(p,x),(y=6<d.length+p.length)&&!J&&0===p[3]?(a["xs"+a.l]+=a.l?" transparent":"transparent",a.e=a.e.split(S[l]).join("transparent")):(J||(y=!1),x?a.appendXtra(g.substr(0,g.indexOf("hsl"))+(y?"hsla(":"hsl("),d[0],he(p[0],d[0]),",",!1,!0).appendXtra("",d[1],he(p[1],d[1]),"%,",!1).appendXtra("",d[2],he(p[2],d[2]),y?"%,":"%"+w,!1):a.appendXtra(g.substr(0,g.indexOf("rgb"))+(y?"rgba(":"rgb("),d[0],p[0]-d[0],",",Math.round,!0).appendXtra("",d[1],p[1]-d[1],",",Math.round).appendXtra("",d[2],p[2]-d[2],y?",":w,Math.round),y&&(d=d.length<4?1:d[3],a.appendXtra("",d,(p.length<4?1:p[3])-d,w,!1))),ge.lastIndex=0;else if(v=d.match(A)){if(!(m=p.match(O))||m.length!==v.length)return a;for(f=h=0;f<v.length;f++)_=v[f],g=d.indexOf(_,h),a.appendXtra(d.substr(h,g-h),Number(_),he(m[f],_),"",P&&"px"===d.substr(g+_.length,2)&&Math.round,0===f),h=g+_.length;a["xs"+a.l]+=d.substr(h)}else a["xs"+a.l]+=a.l||a["xs"+a.l]?" "+p:p;if(-1!==i.indexOf("=")&&a.data){for(w=a.xs0+a.data.s,l=1;l<a.l;l++)w+=a["xs"+l]+a.data["xn"+l];a.e=w+a["xs"+l]}return a.l||(a.type=-1,a.xs0=a.e),a.xfirst||a},Pe=9;for((e=Te.prototype).l=e.pr=0;0<--Pe;)e["xn"+Pe]=0,e["xs"+Pe]="";e.xs0="",e._next=e._prev=e.xfirst=e.data=e.plugin=e.setRatio=e.rxp=null,e.appendXtra=function(e,t,r,i,n,o){var a=this,s=a.l;return a["xs"+s]+=o&&(s||a["xs"+s])?" "+e:e||"",r||0===s||a.plugin?(a.l++,a.type=a.setRatio?2:1,a["xs"+a.l]=i||"",0<s?(a.data["xn"+s]=t+r,a.rxp["xn"+s]=n,a["xn"+s]=t,a.plugin||(a.xfirst=new Te(a,"xn"+s,t,r,a.xfirst||a,0,a.n,n,a.pr),a.xfirst.xs0=0)):(a.data={s:t+r},a.rxp={},a.s=t,a.c=r,a.r=n),a):(a["xs"+s]+=t+(i||""),a)};var Ee=function(e,t){t=t||{},this.p=t.prefix&&ee(e)||e,m[e]=m[this.p]=this,this.format=t.formatter||_e(t.defaultValue,t.color,t.collapsible,t.multi),t.parser&&(this.parse=t.parser),this.clrs=t.color,this.multi=t.multi,this.keyword=t.keyword,this.dflt=t.defaultValue,this.allowFunc=t.allowFunc,this.pr=t.priority||0},ke=V._registerComplexSpecialProp=function(e,t,r){"object"!=typeof t&&(t={parser:r});var i,n=e.split(","),o=t.defaultValue;for(r=r||[o],i=0;i<n.length;i++)t.prefix=0===i&&t.prefix,t.defaultValue=r[i]||o,new Ee(n[i],t)},Ce=V._registerPluginProp=function(e){if(!m[e]){var u=e.charAt(0).toUpperCase()+e.substr(1)+"Plugin";ke(e,{parser:function(e,t,r,i,n,o,a){var s=c.com.greensock.plugins[u];return s?(s._cssRegister(),m[r].parse(e,t,r,i,n,o,a)):(Z("Error: "+u+" js file not loaded."),n)}})}};(e=Ee.prototype).parseComplex=function(e,t,r,i,n,o){var a,s,u,c,l,f,h=this.keyword;if(this.multi&&(L.test(r)||L.test(t)?(s=t.replace(L,"|").split("|"),u=r.replace(L,"|").split("|")):h&&(s=[t],u=[r])),u){for(c=u.length>s.length?u.length:s.length,a=0;a<c;a++)t=s[a]=s[a]||this.dflt,r=u[a]=u[a]||this.dflt,h&&(l=t.indexOf(h))!==(f=r.indexOf(h))&&(-1===f?s[a]=s[a].split(h).join(""):-1===l&&(s[a]+=" "+h));t=s.join(", "),r=u.join(", ")}return Me(e,this.p,t,r,this.clrs,this.dflt,i,this.pr,n,o)},e.parse=function(e,t,r,i,n,o,a){return this.parseComplex(e.style,this.format(ie(e,this.p,M,!1,this.dflt)),this.format(t),n,o)},z.registerSpecialProp=function(e,u,c){ke(e,{parser:function(e,t,r,i,n,o,a){var s=new Te(e,r,0,0,n,2,r,!1,c);return s.plugin=o,s.setRatio=u(e,t,i._tween,r),s},priority:c})},z.useSVGTransformAttr=!0;var Ae,Oe,Ie,Re,De,Le="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),je=ee("transform"),Fe=Q+"transform",Be=ee("transformOrigin"),Ne=null!==ee("perspective"),Ue=V.Transform=function(){this.perspective=parseFloat(z.defaultTransformPerspective)||0,this.force3D=!(!1===z.defaultForce3D||!Ne)&&(z.defaultForce3D||"auto")},ze=_gsScope.SVGElement,Xe=function(e,t,r){var i,n=W.createElementNS("http://www.w3.org/2000/svg",e),o=/([a-z])([A-Z])/g;for(i in r)n.setAttributeNS(null,i.replace(o,"$1-$2").toLowerCase(),r[i]);return t.appendChild(n),n},We=W.documentElement||{},qe=(De=P||/Android/i.test(Y)&&!_gsScope.chrome,W.createElementNS&&We.appendChild&&!De&&(Oe=Xe("svg",We),Re=(Ie=Xe("rect",Oe,{width:100,height:50,x:100})).getBoundingClientRect().width,Ie.style[Be]="50% 50%",Ie.style[je]="scaleX(0.5)",De=Re===Ie.getBoundingClientRect().width&&!(F&&Ne),We.removeChild(Oe)),De),He=function(e,t,r,i,n,o){var a,s,u,c,l,f,h,d,p,v,m,b,y,g,_=e._gsTransform,w=Je(e,!0);_&&(y=_.xOrigin,g=_.yOrigin),(!i||(a=i.split(" ")).length<2)&&(0===(h=e.getBBox()).x&&0===h.y&&h.width+h.height===0&&(h={x:parseFloat(e.hasAttribute("x")?e.getAttribute("x"):e.hasAttribute("cx")?e.getAttribute("cx"):0)||0,y:parseFloat(e.hasAttribute("y")?e.getAttribute("y"):e.hasAttribute("cy")?e.getAttribute("cy"):0)||0,width:0,height:0}),a=[(-1!==(t=fe(t).split(" "))[0].indexOf("%")?parseFloat(t[0])/100*h.width:parseFloat(t[0]))+h.x,(-1!==t[1].indexOf("%")?parseFloat(t[1])/100*h.height:parseFloat(t[1]))+h.y]),r.xOrigin=c=parseFloat(a[0]),r.yOrigin=l=parseFloat(a[1]),i&&w!==Ye&&(f=w[0],h=w[1],d=w[2],p=w[3],v=w[4],m=w[5],(b=f*p-h*d)&&(s=c*(p/b)+l*(-d/b)+(d*m-p*v)/b,u=c*(-h/b)+l*(f/b)-(f*m-h*v)/b,c=r.xOrigin=a[0]=s,l=r.yOrigin=a[1]=u)),_&&(o&&(r.xOffset=_.xOffset,r.yOffset=_.yOffset,_=r),n||!1!==n&&!1!==z.defaultSmoothOrigin?(s=c-y,u=l-g,_.xOffset+=s*w[0]+u*w[2]-s,_.yOffset+=s*w[1]+u*w[3]-u):_.xOffset=_.yOffset=0),o||e.setAttribute("data-svg-origin",a.join(" "))},Ge=function(e){var t,r=q("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=this.parentNode,n=this.nextSibling,o=this.style.cssText;if(We.appendChild(r),r.appendChild(this),this.style.display="block",e)try{t=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=Ge}catch(e){}else this._originalGetBBox&&(t=this._originalGetBBox());return n?i.insertBefore(this,n):i.appendChild(this),We.removeChild(r),this.style.cssText=o,t},Ve=function(e){return!(!ze||!e.getCTM||e.parentNode&&!e.ownerSVGElement||!function(t){try{return t.getBBox()}catch(e){return Ge.call(t,!0)}}(e))},Ye=[1,0,0,1,0,0],Je=function(e,t){var r,i,n,o,a,s,u,c=e._gsTransform||new Ue,l=e.style;if(je?i=ie(e,Fe,null,!0):e.currentStyle&&(i=(i=e.currentStyle.filter.match(h))&&4===i.length?[i[0].substr(4),Number(i[2].substr(4)),Number(i[1].substr(4)),i[3].substr(4),c.x||0,c.y||0].join(","):""),r=!i||"none"===i||"matrix(1, 0, 0, 1, 0, 0)"===i,je&&r&&!e.offsetParent&&e!==We&&(o=l.display,l.display="block",(u=e.parentNode)&&e.offsetParent||(a=1,s=e.nextSibling,We.appendChild(e)),r=!(i=ie(e,Fe,null,!0))||"none"===i||"matrix(1, 0, 0, 1, 0, 0)"===i,o?l.display=o:et(l,"display"),a&&(s?u.insertBefore(e,s):u?u.appendChild(e):We.removeChild(e))),(c.svg||e.getCTM&&Ve(e))&&(r&&-1!==(l[je]+"").indexOf("matrix")&&(i=l[je],r=0),n=e.getAttribute("transform"),r&&n&&(i="matrix("+(n=e.transform.baseVal.consolidate().matrix).a+","+n.b+","+n.c+","+n.d+","+n.e+","+n.f+")",r=0)),r)return Ye;for(n=(i||"").match(A)||[],Pe=n.length;-1<--Pe;)o=Number(n[Pe]),n[Pe]=(a=o-(o|=0))?(1e5*a+(a<0?-.5:.5)|0)/1e5+o:o;return t&&6<n.length?[n[0],n[1],n[4],n[5],n[12],n[13]]:n},Ke=V.getTransform=function(e,t,r,i){if(e._gsTransform&&r&&!i)return e._gsTransform;var n,o,a,s,u,c,l=r&&e._gsTransform||new Ue,f=l.scaleX<0,h=Ne&&(parseFloat(ie(e,Be,t,!1,"0 0 0").split(" ")[2])||l.zOrigin)||0,d=parseFloat(z.defaultTransformPerspective)||0;if(l.svg=!(!e.getCTM||!Ve(e)),l.svg&&(He(e,ie(e,Be,t,!1,"50% 50%")+"",l,e.getAttribute("data-svg-origin")),Ae=z.useSVGTransformAttr||qe),(n=Je(e))!==Ye){if(16===n.length){var p,v,m,b,y,g=n[0],_=n[1],w=n[2],x=n[3],T=n[4],S=n[5],M=n[6],P=n[7],E=n[8],k=n[9],C=n[10],A=n[12],O=n[13],I=n[14],R=n[11],D=Math.atan2(M,C);l.zOrigin&&(A=E*(I=-l.zOrigin)-n[12],O=k*I-n[13],I=C*I+l.zOrigin-n[14]),l.rotationX=D*X,D&&(p=T*(b=Math.cos(-D))+E*(y=Math.sin(-D)),v=S*b+k*y,m=M*b+C*y,E=T*-y+E*b,k=S*-y+k*b,C=M*-y+C*b,R=P*-y+R*b,T=p,S=v,M=m),D=Math.atan2(-w,C),l.rotationY=D*X,D&&(v=_*(b=Math.cos(-D))-k*(y=Math.sin(-D)),m=w*b-C*y,k=_*y+k*b,C=w*y+C*b,R=x*y+R*b,g=p=g*b-E*y,_=v,w=m),D=Math.atan2(_,g),l.rotation=D*X,D&&(p=g*(b=Math.cos(D))+_*(y=Math.sin(D)),v=T*b+S*y,m=E*b+k*y,_=_*b-g*y,S=S*b-T*y,k=k*b-E*y,g=p,T=v,E=m),l.rotationX&&359.9<Math.abs(l.rotationX)+Math.abs(l.rotation)&&(l.rotationX=l.rotation=0,l.rotationY=180-l.rotationY),D=Math.atan2(T,S),l.scaleX=(1e5*Math.sqrt(g*g+_*_+w*w)+.5|0)/1e5,l.scaleY=(1e5*Math.sqrt(S*S+M*M)+.5|0)/1e5,l.scaleZ=(1e5*Math.sqrt(E*E+k*k+C*C)+.5|0)/1e5,g/=l.scaleX,T/=l.scaleY,_/=l.scaleX,S/=l.scaleY,2e-5<Math.abs(D)?(l.skewX=D*X,T=0,"simple"!==l.skewType&&(l.scaleY*=1/Math.cos(D))):l.skewX=0,l.perspective=R?1/(R<0?-R:R):0,l.x=A,l.y=O,l.z=I,l.svg&&(l.x-=l.xOrigin-(l.xOrigin*g-l.yOrigin*T),l.y-=l.yOrigin-(l.yOrigin*_-l.xOrigin*S))}else if(!Ne||i||!n.length||l.x!==n[4]||l.y!==n[5]||!l.rotationX&&!l.rotationY){var L=6<=n.length,j=L?n[0]:1,F=n[1]||0,B=n[2]||0,N=L?n[3]:1;l.x=n[4]||0,l.y=n[5]||0,a=Math.sqrt(j*j+F*F),s=Math.sqrt(N*N+B*B),u=j||F?Math.atan2(F,j)*X:l.rotation||0,c=B||N?Math.atan2(B,N)*X+u:l.skewX||0,l.scaleX=a,l.scaleY=s,l.rotation=u,l.skewX=c,Ne&&(l.rotationX=l.rotationY=l.z=0,l.perspective=d,l.scaleZ=1),l.svg&&(l.x-=l.xOrigin-(l.xOrigin*j+l.yOrigin*B),l.y-=l.yOrigin-(l.xOrigin*F+l.yOrigin*N))}for(o in 90<Math.abs(l.skewX)&&Math.abs(l.skewX)<270&&(f?(l.scaleX*=-1,l.skewX+=l.rotation<=0?180:-180,l.rotation+=l.rotation<=0?180:-180):(l.scaleY*=-1,l.skewX+=l.skewX<=0?180:-180)),l.zOrigin=h,l)l[o]<2e-5&&-2e-5<l[o]&&(l[o]=0)}return r&&(e._gsTransform=l).svg&&(Ae&&e.style[je]?U.delayedCall(.001,function(){et(e.style,je)}):!Ae&&e.getAttribute("transform")&&U.delayedCall(.001,function(){e.removeAttribute("transform")})),l},Ze=function(e){var t,r,i=this.data,n=-i.rotation*B,o=n+i.skewX*B,a=(Math.cos(n)*i.scaleX*1e5|0)/1e5,s=(Math.sin(n)*i.scaleX*1e5|0)/1e5,u=(Math.sin(o)*-i.scaleY*1e5|0)/1e5,c=(Math.cos(o)*i.scaleY*1e5|0)/1e5,l=this.t.style,f=this.t.currentStyle;if(f){r=s,s=-u,u=-r,t=f.filter,l.filter="";var h,d,p=this.t.offsetWidth,v=this.t.offsetHeight,m="absolute"!==f.position,b="progid:DXImageTransform.Microsoft.Matrix(M11="+a+", M12="+s+", M21="+u+", M22="+c,y=i.x+p*i.xPercent/100,g=i.y+v*i.yPercent/100;if(null!=i.ox&&(y+=(h=(i.oxp?p*i.ox*.01:i.ox)-p/2)-(h*a+(d=(i.oyp?v*i.oy*.01:i.oy)-v/2)*s),g+=d-(h*u+d*c)),b+=m?", Dx="+((h=p/2)-(h*a+(d=v/2)*s)+y)+", Dy="+(d-(h*u+d*c)+g)+")":", sizingMethod='auto expand')",-1!==t.indexOf("DXImageTransform.Microsoft.Matrix(")?l.filter=t.replace(D,b):l.filter=b+" "+t,0!==e&&1!==e||1==a&&0===s&&0===u&&1==c&&(m&&-1===b.indexOf("Dx=0, Dy=0")||R.test(t)&&100!==parseFloat(RegExp.$1)||-1===t.indexOf(t.indexOf("Alpha"))&&l.removeAttribute("filter")),!m){var _,w,x,T=P<8?1:-1;for(h=i.ieOffsetX||0,d=i.ieOffsetY||0,i.ieOffsetX=Math.round((p-((a<0?-a:a)*p+(s<0?-s:s)*v))/2+y),i.ieOffsetY=Math.round((v-((c<0?-c:c)*v+(u<0?-u:u)*p))/2+g),Pe=0;Pe<4;Pe++)x=(r=-1!==(_=f[w=ce[Pe]]).indexOf("px")?parseFloat(_):ne(this.t,w,parseFloat(_),_.replace(I,""))||0)!==i[w]?Pe<2?-i.ieOffsetX:-i.ieOffsetY:Pe<2?h-i.ieOffsetX:d-i.ieOffsetY,l[w]=(i[w]=Math.round(r-x*(0===Pe||2===Pe?1:T)))+"px"}}},Qe=V.set3DTransformRatio=V.setTransformRatio=function(e){var t,r,i,n,o,a,s,u,c,l,f,h,d,p,v,m,b,y,g,_,w=this.data,x=this.t.style,T=w.rotation,S=w.rotationX,M=w.rotationY,P=w.scaleX,E=w.scaleY,k=w.scaleZ,C=w.x,A=w.y,O=w.z,I=w.svg,R=w.perspective,D=w.force3D,L=w.skewY,j=w.skewX;if(L&&(j+=L,T+=L),!((1!==e&&0!==e||"auto"!==D||this.tween._totalTime!==this.tween._totalDuration&&this.tween._totalTime)&&D||O||R||M||S||1!==k)||Ae&&I||!Ne)T||j||I?(T*=B,_=j*B,1e5,r=Math.cos(T)*P,o=Math.sin(T)*P,i=Math.sin(T-_)*-E,a=Math.cos(T-_)*E,_&&"simple"===w.skewType&&(t=Math.tan(_-L*B),i*=t=Math.sqrt(1+t*t),a*=t,L&&(t=Math.tan(L*B),r*=t=Math.sqrt(1+t*t),o*=t)),I&&(C+=w.xOrigin-(w.xOrigin*r+w.yOrigin*i)+w.xOffset,A+=w.yOrigin-(w.xOrigin*o+w.yOrigin*a)+w.yOffset,Ae&&(w.xPercent||w.yPercent)&&(v=this.t.getBBox(),C+=.01*w.xPercent*v.width,A+=.01*w.yPercent*v.height),C<(v=1e-6)&&-v<C&&(C=0),A<v&&-v<A&&(A=0)),g=(1e5*r|0)/1e5+","+(1e5*o|0)/1e5+","+(1e5*i|0)/1e5+","+(1e5*a|0)/1e5+","+C+","+A+")",I&&Ae?this.t.setAttribute("transform","matrix("+g):x[je]=(w.xPercent||w.yPercent?"translate("+w.xPercent+"%,"+w.yPercent+"%) matrix(":"matrix(")+g):x[je]=(w.xPercent||w.yPercent?"translate("+w.xPercent+"%,"+w.yPercent+"%) matrix(":"matrix(")+P+",0,0,"+E+","+C+","+A+")";else{if(F&&(P<(v=1e-4)&&-v<P&&(P=k=2e-5),E<v&&-v<E&&(E=k=2e-5),!R||w.z||w.rotationX||w.rotationY||(R=0)),T||j)T*=B,m=r=Math.cos(T),b=o=Math.sin(T),j&&(T-=j*B,m=Math.cos(T),b=Math.sin(T),"simple"===w.skewType&&(t=Math.tan((j-L)*B),m*=t=Math.sqrt(1+t*t),b*=t,w.skewY&&(t=Math.tan(L*B),r*=t=Math.sqrt(1+t*t),o*=t))),i=-b,a=m;else{if(!(M||S||1!==k||R||I))return void(x[je]=(w.xPercent||w.yPercent?"translate("+w.xPercent+"%,"+w.yPercent+"%) translate3d(":"translate3d(")+C+"px,"+A+"px,"+O+"px)"+(1!==P||1!==E?" scale("+P+","+E+")":""));r=a=1,i=o=0}l=1,n=s=u=c=f=h=0,d=R?-1/R:0,p=w.zOrigin,v=1e-6,",","0",(T=M*B)&&(m=Math.cos(T),f=d*(u=-(b=Math.sin(T))),n=r*b,s=o*b,d*=l=m,r*=m,o*=m),(T=S*B)&&(t=i*(m=Math.cos(T))+n*(b=Math.sin(T)),y=a*m+s*b,c=l*b,h=d*b,n=i*-b+n*m,s=a*-b+s*m,l*=m,d*=m,i=t,a=y),1!==k&&(n*=k,s*=k,l*=k,d*=k),1!==E&&(i*=E,a*=E,c*=E,h*=E),1!==P&&(r*=P,o*=P,u*=P,f*=P),(p||I)&&(p&&(C+=n*-p,A+=s*-p,O+=l*-p+p),I&&(C+=w.xOrigin-(w.xOrigin*r+w.yOrigin*i)+w.xOffset,A+=w.yOrigin-(w.xOrigin*o+w.yOrigin*a)+w.yOffset),C<v&&-v<C&&(C="0"),A<v&&-v<A&&(A="0"),O<v&&-v<O&&(O=0)),g=w.xPercent||w.yPercent?"translate("+w.xPercent+"%,"+w.yPercent+"%) matrix3d(":"matrix3d(",g+=(r<v&&-v<r?"0":r)+","+(o<v&&-v<o?"0":o)+","+(u<v&&-v<u?"0":u),g+=","+(f<v&&-v<f?"0":f)+","+(i<v&&-v<i?"0":i)+","+(a<v&&-v<a?"0":a),S||M||1!==k?(g+=","+(c<v&&-v<c?"0":c)+","+(h<v&&-v<h?"0":h)+","+(n<v&&-v<n?"0":n),g+=","+(s<v&&-v<s?"0":s)+","+(l<v&&-v<l?"0":l)+","+(d<v&&-v<d?"0":d)+","):g+=",0,0,0,0,1,0,",g+=C+","+A+","+O+","+(R?1+-O/R:1)+")",x[je]=g}};(e=Ue.prototype).x=e.y=e.z=e.skewX=e.skewY=e.rotation=e.rotationX=e.rotationY=e.zOrigin=e.xPercent=e.yPercent=e.xOffset=e.yOffset=0,e.scaleX=e.scaleY=e.scaleZ=1,ke("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(e,t,r,i,n,o,a){if(i._lastParsedTransform===a)return n;var s=(i._lastParsedTransform=a).scale&&"function"==typeof a.scale?a.scale:0;s&&(a.scale=s(C,e));var u,c,l,f,h,d,p,v,m,b=e._gsTransform,y=e.style,g=Le.length,_=a,w={},x="transformOrigin",T=Ke(e,M,!0,_.parseTransform),S=_.transform&&("function"==typeof _.transform?_.transform(C,k):_.transform);if(T.skewType=_.skewType||T.skewType||z.defaultSkewType,i._transform=T,"rotationZ"in _&&(_.rotation=_.rotationZ),S&&"string"==typeof S&&je)(c=H.style)[je]=S,c.display="block",c.position="absolute",-1!==S.indexOf("%")&&(c.width=ie(e,"width"),c.height=ie(e,"height")),W.body.appendChild(H),u=Ke(H,null,!1),"simple"===T.skewType&&(u.scaleY*=Math.cos(u.skewX*B)),T.svg&&(d=T.xOrigin,p=T.yOrigin,u.x-=T.xOffset,u.y-=T.yOffset,(_.transformOrigin||_.svgOrigin)&&(S={},He(e,fe(_.transformOrigin),S,_.svgOrigin,_.smoothOrigin,!0),d=S.xOrigin,p=S.yOrigin,u.x-=S.xOffset-T.xOffset,u.y-=S.yOffset-T.yOffset),(d||p)&&(v=Je(H,!0),u.x-=d-(d*v[0]+p*v[2]),u.y-=p-(d*v[1]+p*v[3]))),W.body.removeChild(H),u.perspective||(u.perspective=T.perspective),null!=_.xPercent&&(u.xPercent=de(_.xPercent,T.xPercent)),null!=_.yPercent&&(u.yPercent=de(_.yPercent,T.yPercent));else if("object"==typeof _){if(u={scaleX:de(null!=_.scaleX?_.scaleX:_.scale,T.scaleX),scaleY:de(null!=_.scaleY?_.scaleY:_.scale,T.scaleY),scaleZ:de(_.scaleZ,T.scaleZ),x:de(_.x,T.x),y:de(_.y,T.y),z:de(_.z,T.z),xPercent:de(_.xPercent,T.xPercent),yPercent:de(_.yPercent,T.yPercent),perspective:de(_.transformPerspective,T.perspective)},null!=(h=_.directionalRotation))if("object"==typeof h)for(c in h)_[c]=h[c];else _.rotation=h;"string"==typeof _.x&&-1!==_.x.indexOf("%")&&(u.x=0,u.xPercent=de(_.x,T.xPercent)),"string"==typeof _.y&&-1!==_.y.indexOf("%")&&(u.y=0,u.yPercent=de(_.y,T.yPercent)),u.rotation=pe("rotation"in _?_.rotation:"shortRotation"in _?_.shortRotation+"_short":T.rotation,T.rotation,"rotation",w),Ne&&(u.rotationX=pe("rotationX"in _?_.rotationX:"shortRotationX"in _?_.shortRotationX+"_short":T.rotationX||0,T.rotationX,"rotationX",w),u.rotationY=pe("rotationY"in _?_.rotationY:"shortRotationY"in _?_.shortRotationY+"_short":T.rotationY||0,T.rotationY,"rotationY",w)),u.skewX=pe(_.skewX,T.skewX),u.skewY=pe(_.skewY,T.skewY)}for(Ne&&null!=_.force3D&&(T.force3D=_.force3D,f=!0),(l=T.force3D||T.z||T.rotationX||T.rotationY||u.z||u.rotationX||u.rotationY||u.perspective)||null==_.scale||(u.scaleZ=1);-1<--g;)(1e-6<(S=u[m=Le[g]]-T[m])||S<-1e-6||null!=_[m]||null!=N[m])&&(f=!0,n=new Te(T,m,T[m],S,n),m in w&&(n.e=w[m]),n.xs0=0,n.plugin=o,i._overwriteProps.push(n.n));return S="function"==typeof _.transformOrigin?_.transformOrigin(C,k):_.transformOrigin,T.svg&&(S||_.svgOrigin)&&(d=T.xOffset,p=T.yOffset,He(e,fe(S),u,_.svgOrigin,_.smoothOrigin),n=Se(T,"xOrigin",(b?T:u).xOrigin,u.xOrigin,n,x),n=Se(T,"yOrigin",(b?T:u).yOrigin,u.yOrigin,n,x),d===T.xOffset&&p===T.yOffset||(n=Se(T,"xOffset",b?d:T.xOffset,T.xOffset,n,x),n=Se(T,"yOffset",b?p:T.yOffset,T.yOffset,n,x)),S="0px 0px"),(S||Ne&&l&&T.zOrigin)&&(je?(f=!0,m=Be,S||(S=(S=(ie(e,m,M,!1,"50% 50%")+"").split(" "))[0]+" "+S[1]+" "+T.zOrigin+"px"),S+="",(n=new Te(y,m,0,0,n,-1,x)).b=y[m],n.plugin=o,Ne?(c=T.zOrigin,S=S.split(" "),T.zOrigin=(2<S.length?parseFloat(S[2]):c)||0,n.xs0=n.e=S[0]+" "+(S[1]||"50%")+" 0px",(n=new Te(T,"zOrigin",0,0,n,-1,n.n)).b=c,n.xs0=n.e=T.zOrigin):n.xs0=n.e=S):fe(S+"",T)),f&&(i._transformType=T.svg&&Ae||!l&&3!==this._transformType?2:3),s&&(a.scale=s),n},allowFunc:!0,prefix:!0}),ke("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),ke("clipPath",{defaultValue:"inset(0%)",prefix:!0,multi:!0,formatter:_e("inset(0% 0% 0% 0%)",!1,!0)}),ke("borderRadius",{defaultValue:"0px",parser:function(e,t,r,i,n,o){t=this.format(t);var a,s,u,c,l,f,h,d,p,v,m,b,y,g,_,w,x=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],T=e.style;for(p=parseFloat(e.offsetWidth),v=parseFloat(e.offsetHeight),a=t.split(" "),s=0;s<x.length;s++)this.p.indexOf("border")&&(x[s]=ee(x[s])),-1!==(l=c=ie(e,x[s],M,!1,"0px")).indexOf(" ")&&(l=(c=l.split(" "))[0],c=c[1]),f=u=a[s],h=parseFloat(l),b=l.substr((h+"").length),""===(m=(y="="===f.charAt(1))?(d=parseInt(f.charAt(0)+"1",10),f=f.substr(2),d*=parseFloat(f),f.substr((d+"").length-(d<0?1:0))||""):(d=parseFloat(f),f.substr((d+"").length)))&&(m=S[r]||b),m!==b&&(g=ne(e,"borderLeft",h,b),_=ne(e,"borderTop",h,b),c="%"===m?(l=g/p*100+"%",_/v*100+"%"):"em"===m?(l=g/(w=ne(e,"borderLeft",1,"em"))+"em",_/w+"em"):(l=g+"px",_+"px"),y&&(f=parseFloat(l)+d+m,u=parseFloat(c)+d+m)),n=Me(T,x[s],l+" "+c,f+" "+u,!1,"0px",n);return n},prefix:!0,formatter:_e("0px 0px 0px 0px",!1,!0)}),ke("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(e,t,r,i,n,o){return Me(e.style,r,this.format(ie(e,r,M,!1,"0px 0px")),this.format(t),!1,"0px",n)},prefix:!0,formatter:_e("0px 0px",!1,!0)}),ke("backgroundPosition",{defaultValue:"0 0",parser:function(e,t,r,i,n,o){var a,s,u,c,l,f,h="background-position",d=M||re(e),p=this.format((d?P?d.getPropertyValue(h+"-x")+" "+d.getPropertyValue(h+"-y"):d.getPropertyValue(h):e.currentStyle.backgroundPositionX+" "+e.currentStyle.backgroundPositionY)||"0 0"),v=this.format(t);if(-1!==p.indexOf("%")!=(-1!==v.indexOf("%"))&&v.split(",").length<2&&(f=ie(e,"backgroundImage").replace(T,""))&&"none"!==f){for(a=p.split(" "),s=v.split(" "),G.setAttribute("src",f),u=2;-1<--u;)(c=-1!==(p=a[u]).indexOf("%"))!=(-1!==s[u].indexOf("%"))&&(l=0===u?e.offsetWidth-G.width:e.offsetHeight-G.height,a[u]=c?parseFloat(p)/100*l+"px":parseFloat(p)/l*100+"%");p=a.join(" ")}return this.parseComplex(e.style,p,v,n,o)},formatter:fe}),ke("backgroundSize",{defaultValue:"0 0",formatter:function(e){return"co"===(e+="").substr(0,2)?e:fe(-1===e.indexOf(" ")?e+" "+e:e)}}),ke("perspective",{defaultValue:"0px",prefix:!0}),ke("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),ke("transformStyle",{prefix:!0}),ke("backfaceVisibility",{prefix:!0}),ke("userSelect",{prefix:!0}),ke("margin",{parser:we("marginTop,marginRight,marginBottom,marginLeft")}),ke("padding",{parser:we("paddingTop,paddingRight,paddingBottom,paddingLeft")}),ke("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(e,t,r,i,n,o){var a,s,u;return t=P<9?(s=e.currentStyle,u=P<8?" ":",",a="rect("+s.clipTop+u+s.clipRight+u+s.clipBottom+u+s.clipLeft+")",this.format(t).split(",").join(u)):(a=this.format(ie(e,this.p,M,!1,this.dflt)),this.format(t)),this.parseComplex(e.style,a,t,n,o)}}),ke("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),ke("autoRound,strictUnits",{parser:function(e,t,r,i,n){return n}}),ke("border",{defaultValue:"0px solid #000",parser:function(e,t,r,i,n,o){var a=ie(e,"borderTopWidth",M,!1,"0px"),s=this.format(t).split(" "),u=s[0].replace(I,"");return"px"!==u&&(a=parseFloat(a)/ne(e,"borderTopWidth",1,u)+u),this.parseComplex(e.style,this.format(a+" "+ie(e,"borderTopStyle",M,!1,"solid")+" "+ie(e,"borderTopColor",M,!1,"#000")),s.join(" "),n,o)},color:!0,formatter:function(e){var t=e.split(" ");return t[0]+" "+(t[1]||"solid")+" "+(e.match(ge)||["#000"])[0]}}),ke("borderWidth",{parser:we("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),ke("float,cssFloat,styleFloat",{parser:function(e,t,r,i,n,o){var a=e.style,s="cssFloat"in a?"cssFloat":"styleFloat";return new Te(a,s,0,0,n,-1,r,!1,0,a[s],t)}});var $e=function(e){var t,r=this.t,i=r.filter||ie(this.data,"filter")||"",n=this.s+this.c*e|0;100==n&&(t=-1===i.indexOf("atrix(")&&-1===i.indexOf("radient(")&&-1===i.indexOf("oader(")?(r.removeAttribute("filter"),!ie(this.data,"filter")):(r.filter=i.replace(a,""),!0)),t||(this.xn1&&(r.filter=i=i||"alpha(opacity="+n+")"),-1===i.indexOf("pacity")?0==n&&this.xn1||(r.filter=i+" alpha(opacity="+n+")"):r.filter=i.replace(R,"opacity="+n))};ke("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(e,t,r,i,n,o){var a=parseFloat(ie(e,"opacity",M,!1,"1")),s=e.style,u="autoAlpha"===r;return"string"==typeof t&&"="===t.charAt(1)&&(t=("-"===t.charAt(0)?-1:1)*parseFloat(t.substr(2))+a),u&&1===a&&"hidden"===ie(e,"visibility",M)&&0!==t&&(a=0),J?n=new Te(s,"opacity",a,t-a,n):((n=new Te(s,"opacity",100*a,100*(t-a),n)).xn1=u?1:0,s.zoom=1,n.type=2,n.b="alpha(opacity="+n.s+")",n.e="alpha(opacity="+(n.s+n.c)+")",n.data=e,n.plugin=o,n.setRatio=$e),u&&((n=new Te(s,"visibility",0,0,n,-1,null,!1,0,0!==a?"inherit":"hidden",0===t?"hidden":"inherit")).xs0="inherit",i._overwriteProps.push(n.n),i._overwriteProps.push(r)),n}});var et=function(e,t){t&&(e.removeProperty?("ms"!==t.substr(0,2)&&"webkit"!==t.substr(0,6)||(t="-"+t),e.removeProperty(t.replace(s,"-$1").toLowerCase())):e.removeAttribute(t))},tt=function(e){if(this.t._gsClassPT=this,1===e||0===e){this.t.setAttribute("class",0===e?this.b:this.e);for(var t=this.data,r=this.t.style;t;)t.v?r[t.p]=t.v:et(r,t.p),t=t._next;1===e&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};ke("className",{parser:function(e,t,r,i,n,o,a){var s,u,c,l,f,h=e.getAttribute("class")||"",d=e.style.cssText;if((n=i._classNamePT=new Te(e,r,0,0,n,2)).setRatio=tt,n.pr=-11,p=!0,n.b=h,u=ae(e,M),c=e._gsClassPT){for(l={},f=c.data;f;)l[f.p]=1,f=f._next;c.setRatio(1)}return(e._gsClassPT=n).e="="!==t.charAt(1)?t:h.replace(new RegExp("(?:\\s|^)"+t.substr(2)+"(?![\\w-])"),"")+("+"===t.charAt(0)?" "+t.substr(2):""),e.setAttribute("class",n.e),s=se(e,u,ae(e),a,l),e.setAttribute("class",h),n.data=s.firstMPT,e.style.cssText!==d&&(e.style.cssText=d),n=n.xfirst=i.parse(e,s.difs,n,o)}});var rt=function(e){if((1===e||0===e)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var t,r,i,n,o,a=this.t.style,s=m.transform.parse;if("all"===this.e)n=!(a.cssText="");else for(i=(t=this.e.split(" ").join("").split(",")).length;-1<--i;)r=t[i],m[r]&&(m[r].parse===s?n=!0:r="transformOrigin"===r?Be:m[r].p),et(a,r);n&&(et(a,je),(o=this.t._gsTransform)&&(o.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(ke("clearProps",{parser:function(e,t,r,i,n){return(n=new Te(e,r,0,0,n,2)).setRatio=rt,n.e=t,n.pr=-10,n.data=i._tween,p=!0,n}}),e="bezier,throwProps,physicsProps,physics2D".split(","),Pe=e.length;Pe--;)Ce(e[Pe]);(e=z.prototype)._firstPT=e._lastParsedTransform=e._transform=null,e._onInitTween=function(e,t,r,i){if(!e.nodeType)return!1;this._target=k=e,this._tween=r,this._vars=t,C=i,E=t.autoRound,p=!1,S=t.suffixMap||z.suffixMap,M=re(e),v=this._overwriteProps;var n,o,a,s,u,c,l,f,h,d=e.style;if(b&&""===d.zIndex&&("auto"!==(n=ie(e,"zIndex",M))&&""!==n||this._addLazySet(d,"zIndex",0)),"string"==typeof t&&(s=d.cssText,n=ae(e,M),d.cssText=s+";"+t,n=se(e,n,ae(e)).difs,!J&&w.test(t)&&(n.opacity=parseFloat(RegExp.$1)),t=n,d.cssText=s),t.className?this._firstPT=o=m.className.parse(e,t.className,"className",this,null,null,t):this._firstPT=o=this.parse(e,t,null),this._transformType){for(h=3===this._transformType,je?y&&(b=!0,""===d.zIndex&&("auto"!==(l=ie(e,"zIndex",M))&&""!==l||this._addLazySet(d,"zIndex",0)),g&&this._addLazySet(d,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(h?"visible":"hidden"))):d.zoom=1,a=o;a&&a._next;)a=a._next;f=new Te(e,"transform",0,0,null,2),this._linkCSSP(f,null,a),f.setRatio=je?Qe:Ze,f.data=this._transform||Ke(e,M,!0),f.tween=r,f.pr=-1,v.pop()}if(p){for(;o;){for(c=o._next,a=s;a&&a.pr>o.pr;)a=a._next;(o._prev=a?a._prev:u)?o._prev._next=o:s=o,(o._next=a)?a._prev=o:u=o,o=c}this._firstPT=s}return!0},e.parse=function(e,t,r,i){var n,o,a,s,u,c,l,f,h,d,p=e.style;for(n in t){if(c=t[n],o=m[n],"function"!=typeof c||o&&o.allowFunc||(c=c(C,k)),o)r=o.parse(e,c,n,this,r,i,t);else{if("--"===n.substr(0,2)){this._tween._propLookup[n]=this._addTween.call(this._tween,e.style,"setProperty",re(e).getPropertyValue(n)+"",c+"",n,!1,n);continue}u=ie(e,n,M)+"",h="string"==typeof c,"color"===n||"fill"===n||"stroke"===n||-1!==n.indexOf("Color")||h&&x.test(c)?(h||(c=(3<(c=be(c)).length?"rgba(":"rgb(")+c.join(",")+")"),r=Me(p,n,u,c,!0,"transparent",r,0,i)):h&&j.test(c)?r=Me(p,n,u,c,!0,null,r,0,i):(l=(a=parseFloat(u))||0===a?u.substr((a+"").length):"",""!==u&&"auto"!==u||(l="width"===n||"height"===n?(a=le(e,n,M),"px"):"left"===n||"top"===n?(a=oe(e,n,M),"px"):(a="opacity"!==n?0:1,"")),""===(f=(d=h&&"="===c.charAt(1))?(s=parseInt(c.charAt(0)+"1",10),c=c.substr(2),s*=parseFloat(c),c.replace(I,"")):(s=parseFloat(c),h?c.replace(I,""):""))&&(f=n in S?S[n]:l),c=s||0===s?(d?s+a:s)+f:t[n],l!==f&&(""===f&&"lineHeight"!==n||(s||0===s)&&a&&(a=ne(e,n,a,l),"%"===f?(a/=ne(e,n,100,"%")/100,!0!==t.strictUnits&&(u=a+"%")):"em"===f||"rem"===f||"vw"===f||"vh"===f?a/=ne(e,n,1,f):"px"!==f&&(s=ne(e,n,s,f),f="px"),d&&(s||0===s)&&(c=s+a+f))),d&&(s+=a),!a&&0!==a||!s&&0!==s?void 0!==p[n]&&(c||c+""!="NaN"&&null!=c)?(r=new Te(p,n,s||a||0,0,r,-1,n,!1,0,u,c)).xs0="none"!==c||"display"!==n&&-1===n.indexOf("Style")?c:u:Z("invalid "+n+" tween value: "+t[n]):(r=new Te(p,n,a,s-a,r,0,n,!1!==E&&("px"===f||"zIndex"===n),0,u,c)).xs0=f)}i&&r&&!r.plugin&&(r.plugin=i)}return r},e.setRatio=function(e){var t,r,i,n=this._firstPT;if(1!==e||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(e||this._tween._time!==this._tween._duration&&0!==this._tween._time||-1e-6===this._tween._rawPrevTime)for(;n;){if(t=n.c*e+n.s,n.r?t=n.r(t):t<1e-6&&-1e-6<t&&(t=0),n.type)if(1===n.type)if(2===(i=n.l))n.t[n.p]=n.xs0+t+n.xs1+n.xn1+n.xs2;else if(3===i)n.t[n.p]=n.xs0+t+n.xs1+n.xn1+n.xs2+n.xn2+n.xs3;else if(4===i)n.t[n.p]=n.xs0+t+n.xs1+n.xn1+n.xs2+n.xn2+n.xs3+n.xn3+n.xs4;else if(5===i)n.t[n.p]=n.xs0+t+n.xs1+n.xn1+n.xs2+n.xn2+n.xs3+n.xn3+n.xs4+n.xn4+n.xs5;else{for(r=n.xs0+t+n.xs1,i=1;i<n.l;i++)r+=n["xn"+i]+n["xs"+(i+1)];n.t[n.p]=r}else-1===n.type?n.t[n.p]=n.xs0:n.setRatio&&n.setRatio(e);else n.t[n.p]=t+n.xs0;n=n._next}else for(;n;)2!==n.type?n.t[n.p]=n.b:n.setRatio(e),n=n._next;else for(;n;){if(2!==n.type)if(n.r&&-1!==n.type)if(t=n.r(n.s+n.c),n.type){if(1===n.type){for(i=n.l,r=n.xs0+t+n.xs1,i=1;i<n.l;i++)r+=n["xn"+i]+n["xs"+(i+1)];n.t[n.p]=r}}else n.t[n.p]=t+n.xs0;else n.t[n.p]=n.e;else n.setRatio(e);n=n._next}},e._enableTransforms=function(e){this._transform=this._transform||Ke(this._target,M,!0),this._transformType=this._transform.svg&&Ae||!e&&3!==this._transformType?2:3};var it=function(e){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};e._addLazySet=function(e,t,r){var i=this._firstPT=new Te(e,t,0,0,this._firstPT,2);i.e=r,i.setRatio=it,i.data=this},e._linkCSSP=function(e,t,r,i){return e&&(t&&(t._prev=e),e._next&&(e._next._prev=e._prev),e._prev?e._prev._next=e._next:this._firstPT===e&&(this._firstPT=e._next,i=!0),r?r._next=e:i||null!==this._firstPT||(this._firstPT=e),e._next=t,e._prev=r),e},e._mod=function(e){for(var t=this._firstPT;t;)"function"==typeof e[t.p]&&(t.r=e[t.p]),t=t._next},e._kill=function(e){var t,r,i,n=e;if(e.autoAlpha||e.alpha){for(r in n={},e)n[r]=e[r];n.opacity=1,n.autoAlpha&&(n.visibility=1)}for(e.className&&(t=this._classNamePT)&&((i=t.xfirst)&&i._prev?this._linkCSSP(i._prev,t._next,i._prev._prev):i===this._firstPT&&(this._firstPT=t._next),t._next&&this._linkCSSP(t._next,t._next._next,i._prev),this._classNamePT=null),t=this._firstPT;t;)t.plugin&&t.plugin!==r&&t.plugin._kill&&(t.plugin._kill(e),r=t.plugin),t=t._next;return o.prototype._kill.call(this,n)};var nt=function(e,t,r){var i,n,o,a;if(e.slice)for(n=e.length;-1<--n;)nt(e[n],t,r);else for(n=(i=e.childNodes).length;-1<--n;)a=(o=i[n]).type,o.style&&(t.push(ae(o)),r&&r.push(o)),1!==a&&9!==a&&11!==a||!o.childNodes.length||nt(o,t,r)};return z.cascadeTo=function(e,t,r){var i,n,o,a,s=U.to(e,t,r),u=[s],c=[],l=[],f=[],h=U._internals.reservedProps;for(e=s._targets||s.target,nt(e,c,f),s.render(t,!0,!0),nt(e,l),s.render(0,!0,!0),s._enabled(!0),i=f.length;-1<--i;)if((n=se(f[i],c[i],l[i])).firstMPT){for(o in n=n.difs,r)h[o]&&(n[o]=r[o]);for(o in a={},n)a[o]=c[i][o];u.push(U.fromTo(f[i],t,a,n))}return u},o.activate([z]),z},!0),t=_gsScope._gsDefine.plugin({propName:"roundProps",version:"1.7.0",priority:-1,API:2,init:function(e,t,r){return this._tween=r,!0}}),u=function(t){var r=t<1?Math.pow(10,(t+"").length-2):1;return function(e){return(Math.round(e/t)*t*r|0)/r}},c=function(e,t){for(;e;)e.f||e.blob||(e.m=t||Math.round),e=e._next},(i=t.prototype)._onInitAllProps=function(){var e,t,r,i,n=this._tween,o=n.vars.roundProps,a={},s=n._propLookup.roundProps;if("object"!=typeof o||o.push)for("string"==typeof o&&(o=o.split(",")),r=o.length;-1<--r;)a[o[r]]=Math.round;else for(i in o)a[i]=u(o[i]);for(i in a)for(e=n._firstPT;e;)t=e._next,e.pg?e.t._mod(a):e.n===i&&(2===e.f&&e.t?c(e.t._firstPT,a[i]):(this._add(e.t,i,e.s,e.c,a[i]),t&&(t._prev=e._prev),e._prev?e._prev._next=t:n._firstPT===e&&(n._firstPT=t),e._next=e._prev=null,n._propLookup[i]=s)),e=t;return!1},i._add=function(e,t,r,i,n){this._addTween(e,t,r,r+i,t,n||Math.round),this._overwriteProps.push(t)},_gsScope._gsDefine.plugin({propName:"attr",API:2,version:"0.6.1",init:function(e,t,r,i){var n,o;if("function"!=typeof e.setAttribute)return!1;for(n in t)"function"==typeof(o=t[n])&&(o=o(i,e)),this._addTween(e,"setAttribute",e.getAttribute(n)+"",o+"",n,!1,n),this._overwriteProps.push(n);return!0}}),_gsScope._gsDefine.plugin({propName:"directionalRotation",version:"0.3.1",API:2,init:function(e,t,r,i){"object"!=typeof t&&(t={rotation:t}),this.finals={};var n,o,a,s,u,c,l=!0===t.useRadians?2*Math.PI:360;for(n in t)"useRadians"!==n&&("function"==typeof(s=t[n])&&(s=s(i,e)),o=(c=(s+"").split("_"))[0],a=parseFloat("function"!=typeof e[n]?e[n]:e[n.indexOf("set")||"function"!=typeof e["get"+n.substr(3)]?n:"get"+n.substr(3)]()),u=(s=this.finals[n]="string"==typeof o&&"="===o.charAt(1)?a+parseInt(o.charAt(0)+"1",10)*Number(o.substr(2)):Number(o)||0)-a,c.length&&(-1!==(o=c.join("_")).indexOf("short")&&(u%=l)!==u%(l/2)&&(u=u<0?u+l:u-l),-1!==o.indexOf("_cw")&&u<0?u=(u+9999999999*l)%l-(u/l|0)*l:-1!==o.indexOf("ccw")&&0<u&&(u=(u-9999999999*l)%l-(u/l|0)*l)),(1e-6<u||u<-1e-6)&&(this._addTween(e,n,a,a+u,n),this._overwriteProps.push(n)));return!0},set:function(e){var t;if(1!==e)this._super.setRatio.call(this,e);else for(t=this._firstPT;t;)t.f?t.t[t.p](this.finals[t.p]):t.t[t.p]=this.finals[t.p],t=t._next}})._autoCSS=!0,_gsScope._gsDefine("easing.Back",["easing.Ease"],function(m){var r,i,t,e,n=_gsScope.GreenSockGlobals||_gsScope,o=n.com.greensock,a=2*Math.PI,s=Math.PI/2,u=o._class,c=function(e,t){var r=u("easing."+e,function(){},!0),i=r.prototype=new m;return i.constructor=r,i.getRatio=t,r},l=m.register||function(){},f=function(e,t,r,i,n){var o=u("easing."+e,{easeOut:new t,easeIn:new r,easeInOut:new i},!0);return l(o,e),o},b=function(e,t,r){this.t=e,this.v=t,r&&(((this.next=r).prev=this).c=r.v-t,this.gap=r.t-e)},h=function(e,t){var r=u("easing."+e,function(e){this._p1=e||0===e?e:1.70158,this._p2=1.525*this._p1},!0),i=r.prototype=new m;return i.constructor=r,i.getRatio=t,i.config=function(e){return new r(e)},r},d=f("Back",h("BackOut",function(e){return(e-=1)*e*((this._p1+1)*e+this._p1)+1}),h("BackIn",function(e){return e*e*((this._p1+1)*e-this._p1)}),h("BackInOut",function(e){return(e*=2)<1?.5*e*e*((this._p2+1)*e-this._p2):.5*((e-=2)*e*((this._p2+1)*e+this._p2)+2)})),p=u("easing.SlowMo",function(e,t,r){t=t||0===t?t:.7,null==e?e=.7:1<e&&(e=1),this._p=1!==e?t:0,this._p1=(1-e)/2,this._p2=e,this._p3=this._p1+this._p2,this._calcEnd=!0===r},!0),v=p.prototype=new m;return v.constructor=p,v.getRatio=function(e){var t=e+(.5-e)*this._p;return e<this._p1?this._calcEnd?1-(e=1-e/this._p1)*e:t-(e=1-e/this._p1)*e*e*e*t:e>this._p3?this._calcEnd?1===e?0:1-(e=(e-this._p3)/this._p1)*e:t+(e-t)*(e=(e-this._p3)/this._p1)*e*e*e:this._calcEnd?1:t},p.ease=new p(.7,.7),v.config=p.config=function(e,t,r){return new p(e,t,r)},(v=(r=u("easing.SteppedEase",function(e,t){e=e||1,this._p1=1/e,this._p2=e+(t?0:1),this._p3=t?1:0},!0)).prototype=new m).constructor=r,v.getRatio=function(e){return e<0?e=0:1<=e&&(e=.999999999),((this._p2*e|0)+this._p3)*this._p1},v.config=r.config=function(e,t){return new r(e,t)},(v=(i=u("easing.ExpoScaleEase",function(e,t,r){this._p1=Math.log(t/e),this._p2=t-e,this._p3=e,this._ease=r},!0)).prototype=new m).constructor=i,v.getRatio=function(e){return this._ease&&(e=this._ease.getRatio(e)),(this._p3*Math.exp(this._p1*e)-this._p3)/this._p2},v.config=i.config=function(e,t,r){return new i(e,t,r)},(v=(t=u("easing.RoughEase",function(e){for(var t,r,i,n,o,a,s=(e=e||{}).taper||"none",u=[],c=0,l=0|(e.points||20),f=l,h=!1!==e.randomize,d=!0===e.clamp,p=e.template instanceof m?e.template:null,v="number"==typeof e.strength?.4*e.strength:.4;-1<--f;)t=h?Math.random():1/l*f,r=p?p.getRatio(t):t,i="none"===s?v:"out"===s?(n=1-t)*n*v:"in"===s?t*t*v:t<.5?(n=2*t)*n*.5*v:(n=2*(1-t))*n*.5*v,h?r+=Math.random()*i-.5*i:f%2?r+=.5*i:r-=.5*i,d&&(1<r?r=1:r<0&&(r=0)),u[c++]={x:t,y:r};for(u.sort(function(e,t){return e.x-t.x}),a=new b(1,1,null),f=l;-1<--f;)o=u[f],a=new b(o.x,o.y,a);this._prev=new b(0,0,0!==a.t?a:a.next)},!0)).prototype=new m).constructor=t,v.getRatio=function(e){var t=this._prev;if(e>t.t){for(;t.next&&e>=t.t;)t=t.next;t=t.prev}else for(;t.prev&&e<=t.t;)t=t.prev;return(this._prev=t).v+(e-t.t)/t.gap*t.c},v.config=function(e){return new t(e)},t.ease=new t,f("Bounce",c("BounceOut",function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}),c("BounceIn",function(e){return(e=1-e)<1/2.75?1-7.5625*e*e:e<2/2.75?1-(7.5625*(e-=1.5/2.75)*e+.75):e<2.5/2.75?1-(7.5625*(e-=2.25/2.75)*e+.9375):1-(7.5625*(e-=2.625/2.75)*e+.984375)}),c("BounceInOut",function(e){var t=e<.5;return(e=t?1-2*e:2*e-1)<1/2.75?e*=7.5625*e:e=e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,t?.5*(1-e):.5*e+.5})),f("Circ",c("CircOut",function(e){return Math.sqrt(1-(e-=1)*e)}),c("CircIn",function(e){return-(Math.sqrt(1-e*e)-1)}),c("CircInOut",function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)})),f("Elastic",(e=function(e,t,r){var i=u("easing."+e,function(e,t){this._p1=1<=e?e:1,this._p2=(t||r)/(e<1?e:1),this._p3=this._p2/a*(Math.asin(1/this._p1)||0),this._p2=a/this._p2},!0),n=i.prototype=new m;return n.constructor=i,n.getRatio=t,n.config=function(e,t){return new i(e,t)},i})("ElasticOut",function(e){return this._p1*Math.pow(2,-10*e)*Math.sin((e-this._p3)*this._p2)+1},.3),e("ElasticIn",function(e){return-this._p1*Math.pow(2,10*(e-=1))*Math.sin((e-this._p3)*this._p2)},.3),e("ElasticInOut",function(e){return(e*=2)<1?this._p1*Math.pow(2,10*(e-=1))*Math.sin((e-this._p3)*this._p2)*-.5:this._p1*Math.pow(2,-10*(e-=1))*Math.sin((e-this._p3)*this._p2)*.5+1},.45)),f("Expo",c("ExpoOut",function(e){return 1-Math.pow(2,-10*e)}),c("ExpoIn",function(e){return Math.pow(2,10*(e-1))-.001}),c("ExpoInOut",function(e){return(e*=2)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*(e-1)))})),f("Sine",c("SineOut",function(e){return Math.sin(e*s)}),c("SineIn",function(e){return 1-Math.cos(e*s)}),c("SineInOut",function(e){return-.5*(Math.cos(Math.PI*e)-1)})),u("easing.EaseLookup",{find:function(e){return m.map[e]}},!0),l(n.SlowMo,"SlowMo","ease,"),l(t,"RoughEase","ease,"),l(r,"SteppedEase","ease,"),d},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(h,d){"use strict";var p={},i=h.document,v=h.GreenSockGlobals=h.GreenSockGlobals||h,e=v[d];if(e)return"undefined"!=typeof module&&module.exports&&(module.exports=e);var t,r,n,m,b,o,a,y=function(e){var t,r=e.split("."),i=v;for(t=0;t<r.length;t++)i[r[t]]=i=i[r[t]]||{};return i},f=y("com.greensock"),g=1e-8,u=function(e){var t,r=[],i=e.length;for(t=0;t!==i;r.push(e[t++]));return r},_=function(){},w=(o=Object.prototype.toString,a=o.call([]),function(e){return null!=e&&(e instanceof Array||"object"==typeof e&&!!e.push&&o.call(e)===a)}),x={},T=function(s,u,c,l){this.sc=x[s]?x[s].sc:[],(x[s]=this).gsClass=null,this.func=c;var f=[];this.check=function(e){for(var t,r,i,n,o=u.length,a=o;-1<--o;)(t=x[u[o]]||new T(u[o],[])).gsClass?(f[o]=t.gsClass,a--):e&&t.sc.push(this);if(0===a&&c){if(i=(r=("com.greensock."+s).split(".")).pop(),n=y(r.join("."))[i]=this.gsClass=c.apply(c,f),l)if(v[i]=p[i]=n,"undefined"!=typeof module&&module.exports)if(s===d)for(o in module.exports=p[d]=n,p)n[o]=p[o];else p[d]&&(p[d][i]=n);else"function"==typeof define&&define.amd&&define((h.GreenSockAMDPath?h.GreenSockAMDPath+"/":"")+s.split(".").pop(),[],function(){return n});for(o=0;o<this.sc.length;o++)this.sc[o].check()}},this.check(!0)},s=h._gsDefine=function(e,t,r,i){return new T(e,t,r,i)},S=f._class=function(e,t,r){return t=t||function(){},s(e,[],function(){return t},r),t};s.globals=v;var c=[0,0,1,1],M=S("easing.Ease",function(e,t,r,i){this._func=e,this._type=r||0,this._power=i||0,this._params=t?c.concat(t):c},!0),P=M.map={},l=M.register=function(e,t,r,i){for(var n,o,a,s,u=t.split(","),c=u.length,l=(r||"easeIn,easeOut,easeInOut").split(",");-1<--c;)for(o=u[c],n=i?S("easing."+o,null,!0):f.easing[o]||{},a=l.length;-1<--a;)s=l[a],P[o+"."+s]=P[s+o]=n[s]=e.getRatio?e:e[s]||new e};for((n=M.prototype)._calcEnd=!1,n.getRatio=function(e){if(this._func)return this._params[0]=e,this._func.apply(null,this._params);var t=this._type,r=this._power,i=1===t?1-e:2===t?e:e<.5?2*e:2*(1-e);return 1===r?i*=i:2===r?i*=i*i:3===r?i*=i*i*i:4===r&&(i*=i*i*i*i),1===t?1-i:2===t?i:e<.5?i/2:1-i/2},r=(t=["Linear","Quad","Cubic","Quart","Quint,Strong"]).length;-1<--r;)n=t[r]+",Power"+r,l(new M(null,null,1,r),n,"easeOut",!0),l(new M(null,null,2,r),n,"easeIn"+(0===r?",easeNone":"")),l(new M(null,null,3,r),n,"easeInOut");P.linear=f.easing.Linear.easeIn,P.swing=f.easing.Quad.easeInOut;var E=S("events.EventDispatcher",function(e){this._listeners={},this._eventTarget=e||this});(n=E.prototype).addEventListener=function(e,t,r,i,n){n=n||0;var o,a,s=this._listeners[e],u=0;for(this!==m||b||m.wake(),null==s&&(this._listeners[e]=s=[]),a=s.length;-1<--a;)(o=s[a]).c===t&&o.s===r?s.splice(a,1):0===u&&o.pr<n&&(u=a+1);s.splice(u,0,{c:t,s:r,up:i,pr:n})},n.removeEventListener=function(e,t){var r,i=this._listeners[e];if(i)for(r=i.length;-1<--r;)if(i[r].c===t)return void i.splice(r,1)},n.dispatchEvent=function(e){var t,r,i,n=this._listeners[e];if(n)for(1<(t=n.length)&&(n=n.slice(0)),r=this._eventTarget;-1<--t;)(i=n[t])&&(i.up?i.c.call(i.s||r,{type:e,target:r}):i.c.call(i.s||r))};var k=h.requestAnimationFrame,C=h.cancelAnimationFrame,A=Date.now||function(){return(new Date).getTime()},O=A();for(r=(t=["ms","moz","webkit","o"]).length;-1<--r&&!k;)k=h[t[r]+"RequestAnimationFrame"],C=h[t[r]+"CancelAnimationFrame"]||h[t[r]+"CancelRequestAnimationFrame"];S("Ticker",function(e,t){var n,o,a,s,u,c=this,l=A(),r=!(!1===t||!k)&&"auto",f=500,h=33,d=function(e){var t,r,i=A()-O;f<i&&(l+=i-h),O+=i,c.time=(O-l)/1e3,t=c.time-u,(!n||0<t||!0===e)&&(c.frame++,u+=t+(s<=t?.004:s-t),r=!0),!0!==e&&(a=o(d)),r&&c.dispatchEvent("tick")};E.call(c),c.time=c.frame=0,c.tick=function(){d(!0)},c.lagSmoothing=function(e,t){if(!arguments.length)return f<1e8;f=e||1e8,h=Math.min(t,f,0)},c.sleep=function(){null!=a&&(r&&C?C(a):clearTimeout(a),o=_,a=null,c===m&&(b=!1))},c.wake=function(e){null!==a?c.sleep():e?l+=-O+(O=A()):10<c.frame&&(O=A()-f+5),o=0===n?_:r&&k?k:function(e){return setTimeout(e,1e3*(u-c.time)+1|0)},c===m&&(b=!0),d(2)},c.fps=function(e){if(!arguments.length)return n;s=1/((n=e)||60),u=this.time+s,c.wake()},c.useRAF=function(e){if(!arguments.length)return r;c.sleep(),r=e,c.fps(n)},c.fps(e),setTimeout(function(){"auto"===r&&c.frame<5&&"hidden"!==(i||{}).visibilityState&&c.useRAF(!1)},1500)}),(n=f.Ticker.prototype=new f.events.EventDispatcher).constructor=f.Ticker;var I=S("core.Animation",function(e,t){if(this.vars=t=t||{},this._duration=this._totalDuration=e||0,this._delay=Number(t.delay)||0,this._timeScale=1,this._active=!!t.immediateRender,this.data=t.data,this._reversed=!!t.reversed,Q){b||m.wake();var r=this.vars.useFrames?Z:Q;r.add(this,r._time),this.vars.paused&&this.paused(!0)}});m=I.ticker=new f.Ticker,(n=I.prototype)._dirty=n._gc=n._initted=n._paused=!1,n._totalTime=n._time=0,n._rawPrevTime=-1,n._next=n._last=n._onUpdate=n._timeline=n.timeline=null,n._paused=!1;var R=function(){b&&2e3<A()-O&&("hidden"!==(i||{}).visibilityState||!m.lagSmoothing())&&m.wake();var e=setTimeout(R,2e3);e.unref&&e.unref()};R(),n.play=function(e,t){return null!=e&&this.seek(e,t),this.reversed(!1).paused(!1)},n.pause=function(e,t){return null!=e&&this.seek(e,t),this.paused(!0)},n.resume=function(e,t){return null!=e&&this.seek(e,t),this.paused(!1)},n.seek=function(e,t){return this.totalTime(Number(e),!1!==t)},n.restart=function(e,t){return this.reversed(!1).paused(!1).totalTime(e?-this._delay:0,!1!==t,!0)},n.reverse=function(e,t){return null!=e&&this.seek(e||this.totalDuration(),t),this.reversed(!0).paused(!1)},n.render=function(e,t,r){},n.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,!this._gc&&this.timeline||this._enabled(!0),this},n.isActive=function(){var e,t=this._timeline,r=this._startTime;return!t||!this._gc&&!this._paused&&t.isActive()&&(e=t.rawTime(!0))>=r&&e<r+this.totalDuration()/this._timeScale-g},n._enabled=function(e,t){return b||m.wake(),this._gc=!e,this._active=this.isActive(),!0!==t&&(e&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!e&&this.timeline&&this._timeline._remove(this,!0)),!1},n._kill=function(e,t){return this._enabled(!1,!1)},n.kill=function(e,t){return this._kill(e,t),this},n._uncache=function(e){for(var t=e?this:this.timeline;t;)t._dirty=!0,t=t.timeline;return this},n._swapSelfInParams=function(e){for(var t=e.length,r=e.concat();-1<--t;)"{self}"===e[t]&&(r[t]=this);return r},n._callback=function(e){var t=this.vars,r=t[e],i=t[e+"Params"],n=t[e+"Scope"]||t.callbackScope||this;switch(i?i.length:0){case 0:r.call(n);break;case 1:r.call(n,i[0]);break;case 2:r.call(n,i[0],i[1]);break;default:r.apply(n,i)}},n.eventCallback=function(e,t,r,i){if("on"===(e||"").substr(0,2)){var n=this.vars;if(1===arguments.length)return n[e];null==t?delete n[e]:(n[e]=t,n[e+"Params"]=w(r)&&-1!==r.join("").indexOf("{self}")?this._swapSelfInParams(r):r,n[e+"Scope"]=i),"onUpdate"===e&&(this._onUpdate=t)}return this},n.delay=function(e){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+e-this._delay),this._delay=e,this):this._delay},n.duration=function(e){return arguments.length?(this._duration=this._totalDuration=e,this._uncache(!0),this._timeline.smoothChildTiming&&0<this._time&&this._time<this._duration&&0!==e&&this.totalTime(this._totalTime*(e/this._duration),!0),this):(this._dirty=!1,this._duration)},n.totalDuration=function(e){return this._dirty=!1,arguments.length?this.duration(e):this._totalDuration},n.time=function(e,t){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(e>this._duration?this._duration:e,t)):this._time},n.totalTime=function(e,t,r){if(b||m.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(e<0&&!r&&(e+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var i=this._totalDuration,n=this._timeline;if(i<e&&!r&&(e=i),this._startTime=(this._paused?this._pauseTime:n._time)-(this._reversed?i-e:e)/this._timeScale,n._dirty||this._uncache(!1),n._timeline)for(;n._timeline;)n._timeline._time!==(n._startTime+n._totalTime)/n._timeScale&&n.totalTime(n._totalTime,!0),n=n._timeline}this._gc&&this._enabled(!0,!1),this._totalTime===e&&0!==this._duration||(F.length&&ee(),this.render(e,t,!1),F.length&&ee())}return this},n.progress=n.totalProgress=function(e,t){var r=this.duration();return arguments.length?this.totalTime(r*e,t):r?this._time/r:this.ratio},n.startTime=function(e){return arguments.length?(e!==this._startTime&&(this._startTime=e,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,e-this._delay)),this):this._startTime},n.endTime=function(e){return this._startTime+(0!=e?this.totalDuration():this.duration())/this._timeScale},n.timeScale=function(e){if(!arguments.length)return this._timeScale;var t,r;for(e=e||g,this._timeline&&this._timeline.smoothChildTiming&&(r=(t=this._pauseTime)||0===t?t:this._timeline.totalTime(),this._startTime=r-(r-this._startTime)*this._timeScale/e),this._timeScale=e,r=this.timeline;r&&r.timeline;)r._dirty=!0,r.totalDuration(),r=r.timeline;return this},n.reversed=function(e){return arguments.length?(e!=this._reversed&&(this._reversed=e,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},n.paused=function(e){if(!arguments.length)return this._paused;var t,r,i=this._timeline;return e!=this._paused&&i&&(b||e||m.wake(),r=(t=i.rawTime())-this._pauseTime,!e&&i.smoothChildTiming&&(this._startTime+=r,this._uncache(!1)),this._pauseTime=e?t:null,this._paused=e,this._active=this.isActive(),!e&&0!=r&&this._initted&&this.duration()&&(t=i.smoothChildTiming?this._totalTime:(t-this._startTime)/this._timeScale,this.render(t,t===this._totalTime,!0))),this._gc&&!e&&this._enabled(!0,!1),this};var D=S("core.SimpleTimeline",function(e){I.call(this,0,e),this.autoRemoveChildren=this.smoothChildTiming=!0});(n=D.prototype=new I).constructor=D,n.kill()._gc=!1,n._first=n._last=n._recent=null,n._sortChildren=!1,n.add=n.insert=function(e,t,r,i){var n,o;if(e._startTime=Number(t||0)+e._delay,e._paused&&this!==e._timeline&&(e._pauseTime=this.rawTime()-(e._timeline.rawTime()-e._pauseTime)),e.timeline&&e.timeline._remove(e,!0),e.timeline=e._timeline=this,e._gc&&e._enabled(!0,!0),n=this._last,this._sortChildren)for(o=e._startTime;n&&n._startTime>o;)n=n._prev;return n?(e._next=n._next,n._next=e):(e._next=this._first,this._first=e),e._next?e._next._prev=e:this._last=e,e._prev=n,this._recent=e,this._timeline&&this._uncache(!0),this},n._remove=function(e,t){return e.timeline===this&&(t||e._enabled(!1,!0),e._prev?e._prev._next=e._next:this._first===e&&(this._first=e._next),e._next?e._next._prev=e._prev:this._last===e&&(this._last=e._prev),e._next=e._prev=e.timeline=null,e===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},n.render=function(e,t,r){var i,n=this._first;for(this._totalTime=this._time=this._rawPrevTime=e;n;)i=n._next,(n._active||e>=n._startTime&&!n._paused&&!n._gc)&&(n._reversed?n.render((n._dirty?n.totalDuration():n._totalDuration)-(e-n._startTime)*n._timeScale,t,r):n.render((e-n._startTime)*n._timeScale,t,r)),n=i},n.rawTime=function(){return b||m.wake(),this._totalTime};var L=S("TweenLite",function(e,t,r){if(I.call(this,t,r),this.render=L.prototype.render,null==e)throw"Cannot tween a null target.";this.target=e="string"!=typeof e?e:L.selector(e)||e;var i,n,o,a=e.jquery||e.length&&e!==h&&e[0]&&(e[0]===h||e[0].nodeType&&e[0].style&&!e.nodeType),s=this.vars.overwrite;if(this._overwrite=s=null==s?K[L.defaultOverwrite]:"number"==typeof s?s>>0:K[s],(a||e instanceof Array||e.push&&w(e))&&"number"!=typeof e[0])for(this._targets=o=u(e),this._propLookup=[],this._siblings=[],i=0;i<o.length;i++)(n=o[i])?"string"!=typeof n?n.length&&n!==h&&n[0]&&(n[0]===h||n[0].nodeType&&n[0].style&&!n.nodeType)?(o.splice(i--,1),this._targets=o=o.concat(u(n))):(this._siblings[i]=te(n,this,!1),1===s&&1<this._siblings[i].length&&ie(n,this,null,1,this._siblings[i])):"string"==typeof(n=o[i--]=L.selector(n))&&o.splice(i+1,1):o.splice(i--,1);else this._propLookup={},this._siblings=te(e,this,!1),1===s&&1<this._siblings.length&&ie(e,this,null,1,this._siblings);(this.vars.immediateRender||0===t&&0===this._delay&&!1!==this.vars.immediateRender)&&(this._time=-g,this.render(Math.min(0,-this._delay)))},!0),j=function(e){return e&&e.length&&e!==h&&e[0]&&(e[0]===h||e[0].nodeType&&e[0].style&&!e.nodeType)};(n=L.prototype=new I).constructor=L,n.kill()._gc=!1,n.ratio=0,n._firstPT=n._targets=n._overwrittenProps=n._startAt=null,n._notifyPluginsOfEnabled=n._lazy=!1,L.version="2.1.3",L.defaultEase=n._ease=new M(null,null,1,1),L.defaultOverwrite="auto",L.ticker=m,L.autoSleep=120,L.lagSmoothing=function(e,t){m.lagSmoothing(e,t)},L.selector=h.$||h.jQuery||function(e){var t=h.$||h.jQuery;return t?(L.selector=t)(e):(i||(i=h.document),i?i.querySelectorAll?i.querySelectorAll(e):i.getElementById("#"===e.charAt(0)?e.substr(1):e):e)};var F=[],B={},N=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,U=/[\+-]=-?[\.\d]/,z=function(e){for(var t,r=this._firstPT;r;)t=r.blob?1===e&&null!=this.end?this.end:e?this.join(""):this.start:r.c*e+r.s,r.m?t=r.m.call(this._tween,t,this._target||r.t,this._tween):t<1e-6&&-1e-6<t&&!r.blob&&(t=0),r.f?r.fp?r.t[r.p](r.fp,t):r.t[r.p](t):r.t[r.p]=t,r=r._next},X=function(e){return(1e3*e|0)/1e3+""},W=function(e,t,r,i){var n,o,a,s,u,c,l,f=[],h=0,d="",p=0;for(f.start=e,f.end=t,e=f[0]=e+"",t=f[1]=t+"",r&&(r(f),e=f[0],t=f[1]),f.length=0,n=e.match(N)||[],o=t.match(N)||[],i&&(i._next=null,i.blob=1,f._firstPT=f._applyPT=i),u=o.length,s=0;s<u;s++)l=o[s],d+=(c=t.substr(h,t.indexOf(l,h)-h))||!s?c:",",h+=c.length,p?p=(p+1)%5:"rgba("===c.substr(-5)&&(p=1),l===n[s]||n.length<=s?d+=l:(d&&(f.push(d),d=""),a=parseFloat(n[s]),f.push(a),f._firstPT={_next:f._firstPT,t:f,p:f.length-1,s:a,c:("="===l.charAt(1)?parseInt(l.charAt(0)+"1",10)*parseFloat(l.substr(2)):parseFloat(l)-a)||0,f:0,m:p&&p<4?Math.round:X}),h+=l.length;return(d+=t.substr(h))&&f.push(d),f.setRatio=z,U.test(t)&&(f.end=null),f},q=function(e,t,r,i,n,o,a,s,u){"function"==typeof i&&(i=i(u||0,e));var c=typeof e[t],l="function"!=c?"":t.indexOf("set")||"function"!=typeof e["get"+t.substr(3)]?t:"get"+t.substr(3),f="get"!==r?r:l?a?e[l](a):e[l]():e[t],h="string"==typeof i&&"="===i.charAt(1),d={t:e,p:t,s:f,f:"function"==c,pg:0,n:n||t,m:o?"function"==typeof o?o:Math.round:0,pr:0,c:h?parseInt(i.charAt(0)+"1",10)*parseFloat(i.substr(2)):parseFloat(i)-f||0};if(("number"!=typeof f||"number"!=typeof i&&!h)&&(a||isNaN(f)||!h&&isNaN(i)||"boolean"==typeof f||"boolean"==typeof i?(d.fp=a,d={t:W(f,h?parseFloat(d.s)+d.c+(d.s+"").replace(/[0-9\-\.]/g,""):i,s||L.defaultStringFilter,d),p:"setRatio",s:0,c:1,f:2,pg:0,n:n||t,pr:0,m:0}):(d.s=parseFloat(f),h||(d.c=parseFloat(i)-d.s||0))),d.c)return(d._next=this._firstPT)&&(d._next._prev=d),this._firstPT=d},H=L._internals={isArray:w,isSelector:j,lazyTweens:F,blobDif:W},G=L._plugins={},V=H.tweenLookup={},Y=0,J=H.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1,yoyoEase:1,stagger:1},K={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},Z=I._rootFramesTimeline=new D,Q=I._rootTimeline=new D,$=30,ee=H.lazyRender=function(){var e,t,r=F.length;for(B={},e=0;e<r;e++)(t=F[e])&&!1!==t._lazy&&(t.render(t._lazy[0],t._lazy[1],!0),t._lazy=!1);F.length=0};Q._startTime=m.time,Z._startTime=m.frame,Q._active=Z._active=!0,setTimeout(ee,1),I._updateRoot=L.render=function(){var e,t,r;if(F.length&&ee(),Q.render((m.time-Q._startTime)*Q._timeScale,!1,!1),Z.render((m.frame-Z._startTime)*Z._timeScale,!1,!1),F.length&&ee(),m.frame>=$){for(r in $=m.frame+(parseInt(L.autoSleep,10)||120),V){for(e=(t=V[r].tweens).length;-1<--e;)t[e]._gc&&t.splice(e,1);0===t.length&&delete V[r]}if((!(r=Q._first)||r._paused)&&L.autoSleep&&!Z._first&&1===m._listeners.tick.length){for(;r&&r._paused;)r=r._next;r||m.sleep()}}},m.addEventListener("tick",I._updateRoot);var te=function(e,t,r){var i,n,o=e._gsTweenID;if(V[o||(e._gsTweenID=o="t"+Y++)]||(V[o]={target:e,tweens:[]}),t&&((i=V[o].tweens)[n=i.length]=t,r))for(;-1<--n;)i[n]===t&&i.splice(n,1);return V[o].tweens},re=function(e,t,r,i){var n,o,a=e.vars.onOverwrite;return a&&(n=a(e,t,r,i)),(a=L.onOverwrite)&&(o=a(e,t,r,i)),!1!==n&&!1!==o},ie=function(e,t,r,i,n){var o,a,s,u;if(1===i||4<=i){for(u=n.length,o=0;o<u;o++)if((s=n[o])!==t)s._gc||s._kill(null,e,t)&&(a=!0);else if(5===i)break;return a}var c,l=t._startTime+g,f=[],h=0,d=0===t._duration;for(o=n.length;-1<--o;)(s=n[o])===t||s._gc||s._paused||(s._timeline!==t._timeline?(c=c||ne(t,0,d),0===ne(s,c,d)&&(f[h++]=s)):s._startTime<=l&&s._startTime+s.totalDuration()/s._timeScale>l&&((d||!s._initted)&&l-s._startTime<=2e-8||(f[h++]=s)));for(o=h;-1<--o;)if(u=(s=f[o])._firstPT,2===i&&s._kill(r,e,t)&&(a=!0),2!==i||!s._firstPT&&s._initted&&u){if(2!==i&&!re(s,t))continue;s._enabled(!1,!1)&&(a=!0)}return a},ne=function(e,t,r){for(var i=e._timeline,n=i._timeScale,o=e._startTime;i._timeline;){if(o+=i._startTime,n*=i._timeScale,i._paused)return-100;i=i._timeline}return t<(o/=n)?o-t:r&&o===t||!e._initted&&o-t<2e-8?g:(o+=e.totalDuration()/e._timeScale/n)>t+g?0:o-t-g};n._init=function(){var e,t,r,i,n,o,a=this.vars,s=this._overwrittenProps,u=this._duration,c=!!a.immediateRender,l=a.ease,f=this._startAt;if(a.startAt){for(i in f&&(f.render(-1,!0),f.kill()),n={},a.startAt)n[i]=a.startAt[i];if(n.data="isStart",n.overwrite=!1,n.immediateRender=!0,n.lazy=c&&!1!==a.lazy,n.startAt=n.delay=null,n.onUpdate=a.onUpdate,n.onUpdateParams=a.onUpdateParams,n.onUpdateScope=a.onUpdateScope||a.callbackScope||this,this._startAt=L.to(this.target||{},0,n),c)if(0<this._time)this._startAt=null;else if(0!==u)return}else if(a.runBackwards&&0!==u)if(f)f.render(-1,!0),f.kill(),this._startAt=null;else{for(i in 0!==this._time&&(c=!1),r={},a)J[i]&&"autoCSS"!==i||(r[i]=a[i]);if(r.overwrite=0,r.data="isFromStart",r.lazy=c&&!1!==a.lazy,r.immediateRender=c,this._startAt=L.to(this.target,0,r),c){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=l=l?l instanceof M?l:"function"==typeof l?new M(l,a.easeParams):P[l]||L.defaultEase:L.defaultEase,a.easeParams instanceof Array&&l.config&&(this._ease=l.config.apply(l,a.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(o=this._targets.length,e=0;e<o;e++)this._initProps(this._targets[e],this._propLookup[e]={},this._siblings[e],s?s[e]:null,e)&&(t=!0);else t=this._initProps(this.target,this._propLookup,this._siblings,s,0);if(t&&L._onPluginEvent("_onInitAllProps",this),s&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),a.runBackwards)for(r=this._firstPT;r;)r.s+=r.c,r.c=-r.c,r=r._next;this._onUpdate=a.onUpdate,this._initted=!0},n._initProps=function(e,t,r,i,n){var o,a,s,u,c,l;if(null==e)return!1;for(o in B[e._gsTweenID]&&ee(),this.vars.css||e.style&&e!==h&&e.nodeType&&G.css&&!1!==this.vars.autoCSS&&function(e,t){var r,i={};for(r in e)J[r]||r in t&&"transform"!==r&&"x"!==r&&"y"!==r&&"width"!==r&&"height"!==r&&"className"!==r&&"border"!==r||!(!G[r]||G[r]&&G[r]._autoCSS)||(i[r]=e[r],delete e[r]);e.css=i}(this.vars,e),this.vars)if(l=this.vars[o],J[o])l&&(l instanceof Array||l.push&&w(l))&&-1!==l.join("").indexOf("{self}")&&(this.vars[o]=l=this._swapSelfInParams(l,this));else if(G[o]&&(u=new G[o])._onInitTween(e,this.vars[o],this,n)){for(this._firstPT=c={_next:this._firstPT,t:u,p:"setRatio",s:0,c:1,f:1,n:o,pg:1,pr:u._priority,m:0},a=u._overwriteProps.length;-1<--a;)t[u._overwriteProps[a]]=this._firstPT;(u._priority||u._onInitAllProps)&&(s=!0),(u._onDisable||u._onEnable)&&(this._notifyPluginsOfEnabled=!0),c._next&&(c._next._prev=c)}else t[o]=q.call(this,e,o,"get",l,o,0,null,this.vars.stringFilter,n);return i&&this._kill(i,e)?this._initProps(e,t,r,i,n):1<this._overwrite&&this._firstPT&&1<r.length&&ie(e,this,t,this._overwrite,r)?(this._kill(t,e),this._initProps(e,t,r,i,n)):(this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration)&&(B[e._gsTweenID]=!0),s)},n.render=function(e,t,r){var i,n,o,a,s=this,u=s._time,c=s._duration,l=s._rawPrevTime;if(c-g<=e&&0<=e)s._totalTime=s._time=c,s.ratio=s._ease._calcEnd?s._ease.getRatio(1):1,s._reversed||(i=!0,n="onComplete",r=r||s._timeline.autoRemoveChildren),0===c&&(s._initted||!s.vars.lazy||r)&&(s._startTime===s._timeline._duration&&(e=0),(l<0||e<=0&&-g<=e||l===g&&"isPause"!==s.data)&&l!==e&&(r=!0,g<l&&(n="onReverseComplete")),s._rawPrevTime=a=!t||e||l===e?e:g);else if(e<g)s._totalTime=s._time=0,s.ratio=s._ease._calcEnd?s._ease.getRatio(0):0,(0!==u||0===c&&0<l)&&(n="onReverseComplete",i=s._reversed),-g<e?e=0:e<0&&(s._active=!1,0===c&&(s._initted||!s.vars.lazy||r)&&(0<=l&&(l!==g||"isPause"!==s.data)&&(r=!0),s._rawPrevTime=a=!t||e||l===e?e:g)),(!s._initted||s._startAt&&s._startAt.progress())&&(r=!0);else if(s._totalTime=s._time=e,s._easeType){var f=e/c,h=s._easeType,d=s._easePower;(1===h||3===h&&.5<=f)&&(f=1-f),3===h&&(f*=2),1===d?f*=f:2===d?f*=f*f:3===d?f*=f*f*f:4===d&&(f*=f*f*f*f),s.ratio=1===h?1-f:2===h?f:e/c<.5?f/2:1-f/2}else s.ratio=s._ease.getRatio(e/c);if(s._time!==u||r){if(!s._initted){if(s._init(),!s._initted||s._gc)return;if(!r&&s._firstPT&&(!1!==s.vars.lazy&&s._duration||s.vars.lazy&&!s._duration))return s._time=s._totalTime=u,s._rawPrevTime=l,F.push(s),void(s._lazy=[e,t]);s._time&&!i?s.ratio=s._ease.getRatio(s._time/c):i&&s._ease._calcEnd&&(s.ratio=s._ease.getRatio(0===s._time?0:1))}for(!1!==s._lazy&&(s._lazy=!1),s._active||!s._paused&&s._time!==u&&0<=e&&(s._active=!0),0===u&&(s._startAt&&(0<=e?s._startAt.render(e,!0,r):n||(n="_dummyGS")),s.vars.onStart&&(0===s._time&&0!==c||t||s._callback("onStart"))),o=s._firstPT;o;)o.f?o.t[o.p](o.c*s.ratio+o.s):o.t[o.p]=o.c*s.ratio+o.s,o=o._next;s._onUpdate&&(e<0&&s._startAt&&-1e-4!==e&&s._startAt.render(e,!0,r),t||(s._time!==u||i||r)&&s._callback("onUpdate")),n&&(s._gc&&!r||(e<0&&s._startAt&&!s._onUpdate&&-1e-4!==e&&s._startAt.render(e,!0,r),i&&(s._timeline.autoRemoveChildren&&s._enabled(!1,!1),s._active=!1),!t&&s.vars[n]&&s._callback(n),0===c&&s._rawPrevTime===g&&a!==g&&(s._rawPrevTime=0)))}},n._kill=function(e,t,r){if("all"===e&&(e=null),null==e&&(null==t||t===this.target))return this._lazy=!1,this._enabled(!1,!1);t="string"!=typeof t?t||this._targets||this.target:L.selector(t)||t;var i,n,o,a,s,u,c,l,f,h=r&&this._time&&r._startTime===this._startTime&&this._timeline===r._timeline,d=this._firstPT;if((w(t)||j(t))&&"number"!=typeof t[0])for(i=t.length;-1<--i;)this._kill(e,t[i],r)&&(u=!0);else{if(this._targets){for(i=this._targets.length;-1<--i;)if(t===this._targets[i]){s=this._propLookup[i]||{},this._overwrittenProps=this._overwrittenProps||[],n=this._overwrittenProps[i]=e?this._overwrittenProps[i]||{}:"all";break}}else{if(t!==this.target)return!1;s=this._propLookup,n=this._overwrittenProps=e?this._overwrittenProps||{}:"all"}if(s){if(c=e||s,l=e!==n&&"all"!==n&&e!==s&&("object"!=typeof e||!e._tempKill),r&&(L.onOverwrite||this.vars.onOverwrite)){for(o in c)s[o]&&(f||(f=[]),f.push(o));if((f||!e)&&!re(this,r,t,f))return!1}for(o in c)(a=s[o])&&(h&&(a.f?a.t[a.p](a.s):a.t[a.p]=a.s,u=!0),a.pg&&a.t._kill(c)&&(u=!0),a.pg&&0!==a.t._overwriteProps.length||(a._prev?a._prev._next=a._next:a===this._firstPT&&(this._firstPT=a._next),a._next&&(a._next._prev=a._prev),a._next=a._prev=null),delete s[o]),l&&(n[o]=1);!this._firstPT&&this._initted&&d&&this._enabled(!1,!1)}}return u},n.invalidate=function(){this._notifyPluginsOfEnabled&&L._onPluginEvent("_onDisable",this);var e=this._time;return this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],I.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-g,this.render(e,!1,!1!==this.vars.lazy)),this},n._enabled=function(e,t){if(b||m.wake(),e&&this._gc){var r,i=this._targets;if(i)for(r=i.length;-1<--r;)this._siblings[r]=te(i[r],this,!0);else this._siblings=te(this.target,this,!0)}return I.prototype._enabled.call(this,e,t),!(!this._notifyPluginsOfEnabled||!this._firstPT)&&L._onPluginEvent(e?"_onEnable":"_onDisable",this)},L.to=function(e,t,r){return new L(e,t,r)},L.from=function(e,t,r){return r.runBackwards=!0,r.immediateRender=0!=r.immediateRender,new L(e,t,r)},L.fromTo=function(e,t,r,i){return i.startAt=r,i.immediateRender=0!=i.immediateRender&&0!=r.immediateRender,new L(e,t,i)},L.delayedCall=function(e,t,r,i,n){return new L(t,0,{delay:e,onComplete:t,onCompleteParams:r,callbackScope:i,onReverseComplete:t,onReverseCompleteParams:r,immediateRender:!1,lazy:!1,useFrames:n,overwrite:0})},L.set=function(e,t){return new L(e,0,t)},L.getTweensOf=function(e,t){if(null==e)return[];var r,i,n,o;if(e="string"!=typeof e?e:L.selector(e)||e,(w(e)||j(e))&&"number"!=typeof e[0]){for(r=e.length,i=[];-1<--r;)i=i.concat(L.getTweensOf(e[r],t));for(r=i.length;-1<--r;)for(o=i[r],n=r;-1<--n;)o===i[n]&&i.splice(r,1)}else if(e._gsTweenID)for(r=(i=te(e).concat()).length;-1<--r;)(i[r]._gc||t&&!i[r].isActive())&&i.splice(r,1);return i||[]},L.killTweensOf=L.killDelayedCallsTo=function(e,t,r){"object"==typeof t&&(r=t,t=!1);for(var i=L.getTweensOf(e,t),n=i.length;-1<--n;)i[n]._kill(r,e)};var oe=S("plugins.TweenPlugin",function(e,t){this._overwriteProps=(e||"").split(","),this._propName=this._overwriteProps[0],this._priority=t||0,this._super=oe.prototype},!0);if(n=oe.prototype,oe.version="1.19.0",oe.API=2,n._firstPT=null,n._addTween=q,n.setRatio=z,n._kill=function(e){var t,r=this._overwriteProps,i=this._firstPT;if(null!=e[this._propName])this._overwriteProps=[];else for(t=r.length;-1<--t;)null!=e[r[t]]&&r.splice(t,1);for(;i;)null!=e[i.n]&&(i._next&&(i._next._prev=i._prev),i._prev?(i._prev._next=i._next,i._prev=null):this._firstPT===i&&(this._firstPT=i._next)),i=i._next;return!1},n._mod=n._roundProps=function(e){for(var t,r=this._firstPT;r;)(t=e[this._propName]||null!=r.n&&e[r.n.split(this._propName+"_").join("")])&&"function"==typeof t&&(2===r.f?r.t._applyPT.m=t:r.m=t),r=r._next},L._onPluginEvent=function(e,t){var r,i,n,o,a,s=t._firstPT;if("_onInitAllProps"===e){for(;s;){for(a=s._next,i=n;i&&i.pr>s.pr;)i=i._next;(s._prev=i?i._prev:o)?s._prev._next=s:n=s,(s._next=i)?i._prev=s:o=s,s=a}s=t._firstPT=n}for(;s;)s.pg&&"function"==typeof s.t[e]&&s.t[e]()&&(r=!0),s=s._next;return r},oe.activate=function(e){for(var t=e.length;-1<--t;)e[t].API===oe.API&&(G[(new e[t])._propName]=e[t]);return!0},s.plugin=function(e){if(!(e&&e.propName&&e.init&&e.API))throw"illegal plugin definition.";var t,r=e.propName,i=e.priority||0,n=e.overwriteProps,o={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},a=S("plugins."+r.charAt(0).toUpperCase()+r.substr(1)+"Plugin",function(){oe.call(this,r,i),this._overwriteProps=n||[]},!0===e.global),s=a.prototype=new oe(r);for(t in(s.constructor=a).API=e.API,o)"function"==typeof e[t]&&(s[o[t]]=e[t]);return a.version=e.version,oe.activate([a]),a},t=h._gsQueue){for(r=0;r<t.length;r++)t[r]();for(n in x)x[n].func||h.console.log("GSAP encountered missing dependency: "+n)}b=!1}("undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window,"TweenMax");var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(t,s,e){var r=function(e){t.call(this,e),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=!!this.vars.yoyo,this._dirty=!0},k=1e-8,i=s._internals,C=i.lazyTweens,A=i.lazyRender,u=_gsScope._gsDefine.globals,c=new e(null,null,1,0),n=r.prototype=new t;return n.constructor=r,n.kill()._gc=!1,r.version="2.1.3",n.invalidate=function(){return this._yoyo=!!this.vars.yoyo,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),t.prototype.invalidate.call(this)},n.addCallback=function(e,t,r,i){return this.add(s.delayedCall(0,e,r,i),t)},n.removeCallback=function(e,t){if(e)if(null==t)this._kill(null,e);else for(var r=this.getTweensOf(e,!1),i=r.length,n=this._parseTimeOrLabel(t);-1<--i;)r[i]._startTime===n&&r[i]._enabled(!1,!1);return this},n.removePause=function(e){return this.removeCallback(t._internals.pauseCallback,e)},n.tweenTo=function(e,t){t=t||{};var r,i,n,o={ease:c,useFrames:this.usesFrames(),immediateRender:!1,lazy:!1},a=t.repeat&&u.TweenMax||s;for(i in t)o[i]=t[i];return o.time=this._parseTimeOrLabel(e),r=Math.abs(Number(o.time)-this._time)/this._timeScale||.001,n=new a(this,r,o),o.onStart=function(){n.target.paused(!0),n.vars.time===n.target.time()||r!==n.duration()||n.isFromTo||n.duration(Math.abs(n.vars.time-n.target.time())/n.target._timeScale).render(n.time(),!0,!0),t.onStart&&t.onStart.apply(t.onStartScope||t.callbackScope||n,t.onStartParams||[])},n},n.tweenFromTo=function(e,t,r){r=r||{},e=this._parseTimeOrLabel(e),r.startAt={onComplete:this.seek,onCompleteParams:[e],callbackScope:this},r.immediateRender=!1!==r.immediateRender;var i=this.tweenTo(t,r);return i.isFromTo=1,i.duration(Math.abs(i.vars.time-e)/this._timeScale||.001)},n.render=function(e,t,r){this._gc&&this._enabled(!0,!1);var i,n,o,a,s,u,c,l,f,h=this,d=h._time,p=h._dirty?h.totalDuration():h._totalDuration,v=h._duration,m=h._totalTime,b=h._startTime,y=h._timeScale,g=h._rawPrevTime,_=h._paused,w=h._cycle;if(d!==h._time&&(e+=h._time-d),p-k<=e&&0<=e)h._locked||(h._totalTime=p,h._cycle=h._repeat),h._reversed||h._hasPausedChild()||(n=!0,a="onComplete",s=!!h._timeline.autoRemoveChildren,0===h._duration&&(e<=0&&-k<=e||g<0||g===k)&&g!==e&&h._first&&(s=!0,k<g&&(a="onReverseComplete"))),h._rawPrevTime=h._duration||!t||e||h._rawPrevTime===e?e:k,h._yoyo&&1&h._cycle?h._time=e=0:e=(h._time=v)+1e-4;else if(e<k)if(h._locked||(h._totalTime=h._cycle=0),h._time=0,-k<e&&(e=0),(0!==d||0===v&&g!==k&&(0<g||e<0&&0<=g)&&!h._locked)&&(a="onReverseComplete",n=h._reversed),e<0)h._active=!1,h._timeline.autoRemoveChildren&&h._reversed?(s=n=!0,a="onReverseComplete"):0<=g&&h._first&&(s=!0),h._rawPrevTime=e;else{if(h._rawPrevTime=v||!t||e||h._rawPrevTime===e?e:k,0===e&&n)for(i=h._first;i&&0===i._startTime;)i._duration||(n=!1),i=i._next;e=0,h._initted||(s=!0)}else 0===v&&g<0&&(s=!0),h._time=h._rawPrevTime=e,h._locked||(h._totalTime=e,0!==h._repeat&&(u=v+h._repeatDelay,h._cycle=h._totalTime/u>>0,h._cycle&&h._cycle===h._totalTime/u&&m<=e&&h._cycle--,h._time=h._totalTime-h._cycle*u,h._yoyo&&1&h._cycle&&(h._time=v-h._time),h._time>v?e=(h._time=v)+1e-4:h._time<0?h._time=e=0:e=h._time));if(h._hasPause&&!h._forcingPlayhead&&!t){if(d<(e=h._time)||h._repeat&&w!==h._cycle)for(i=h._first;i&&i._startTime<=e&&!c;)i._duration||"isPause"!==i.data||i.ratio||0===i._startTime&&0===h._rawPrevTime||(c=i),i=i._next;else for(i=h._last;i&&i._startTime>=e&&!c;)i._duration||"isPause"===i.data&&0<i._rawPrevTime&&(c=i),i=i._prev;c&&(f=h._startTime+(h._reversed?h._duration-c._startTime:c._startTime)/h._timeScale,c._startTime<v&&(h._time=h._rawPrevTime=e=c._startTime,h._totalTime=e+h._cycle*(h._totalDuration+h._repeatDelay)))}if(h._cycle!==w&&!h._locked){var x=h._yoyo&&0!=(1&w),T=x===(h._yoyo&&0!=(1&h._cycle)),S=h._totalTime,M=h._cycle,P=h._rawPrevTime,E=h._time;if(h._totalTime=w*v,h._cycle<w?x=!x:h._totalTime+=v,h._time=d,h._rawPrevTime=0===v?g-1e-4:g,h._cycle=w,h._locked=!0,d=x?0:v,h.render(d,t,0===v),t||h._gc||h.vars.onRepeat&&(h._cycle=M,h._locked=!1,h._callback("onRepeat")),d!==h._time)return;if(T&&(h._cycle=w,h._locked=!0,d=x?v+1e-4:-1e-4,h.render(d,!0,!1)),h._locked=!1,h._paused&&!_)return;h._time=E,h._totalTime=S,h._cycle=M,h._rawPrevTime=P}if(h._time!==d&&h._first||r||s||c){if(h._initted||(h._initted=!0),h._active||!h._paused&&h._totalTime!==m&&0<e&&(h._active=!0),0===m&&h.vars.onStart&&(0===h._totalTime&&h._totalDuration||t||h._callback("onStart")),d<=(l=h._time))for(i=h._first;i&&(o=i._next,l===h._time&&(!h._paused||_));)(i._active||i._startTime<=h._time&&!i._paused&&!i._gc)&&(c===i&&(h.pause(),h._pauseTime=f),i._reversed?i.render((i._dirty?i.totalDuration():i._totalDuration)-(e-i._startTime)*i._timeScale,t,r):i.render((e-i._startTime)*i._timeScale,t,r)),i=o;else for(i=h._last;i&&(o=i._prev,l===h._time&&(!h._paused||_));){if(i._active||i._startTime<=d&&!i._paused&&!i._gc){if(c===i){for(c=i._prev;c&&c.endTime()>h._time;)c.render(c._reversed?c.totalDuration()-(e-c._startTime)*c._timeScale:(e-c._startTime)*c._timeScale,t,r),c=c._prev;c=null,h.pause(),h._pauseTime=f}i._reversed?i.render((i._dirty?i.totalDuration():i._totalDuration)-(e-i._startTime)*i._timeScale,t,r):i.render((e-i._startTime)*i._timeScale,t,r)}i=o}h._onUpdate&&(t||(C.length&&A(),h._callback("onUpdate"))),a&&(h._locked||h._gc||b!==h._startTime&&y===h._timeScale||(0===h._time||p>=h.totalDuration())&&(n&&(C.length&&A(),h._timeline.autoRemoveChildren&&h._enabled(!1,!1),h._active=!1),!t&&h.vars[a]&&h._callback(a)))}else m!==h._totalTime&&h._onUpdate&&(t||h._callback("onUpdate"))},n.getActive=function(e,t,r){var i,n,o=[],a=this.getChildren(e||null==e,t||null==e,!!r),s=0,u=a.length;for(i=0;i<u;i++)(n=a[i]).isActive()&&(o[s++]=n);return o},n.getLabelAfter=function(e){e||0!==e&&(e=this._time);var t,r=this.getLabelsArray(),i=r.length;for(t=0;t<i;t++)if(r[t].time>e)return r[t].name;return null},n.getLabelBefore=function(e){null==e&&(e=this._time);for(var t=this.getLabelsArray(),r=t.length;-1<--r;)if(t[r].time<e)return t[r].name;return null},n.getLabelsArray=function(){var e,t=[],r=0;for(e in this._labels)t[r++]={time:this._labels[e],name:e};return t.sort(function(e,t){return e.time-t.time}),t},n.invalidate=function(){return this._locked=!1,t.prototype.invalidate.call(this)},n.progress=function(e,t){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!=(1&this._cycle)?1-e:e)+this._cycle*(this._duration+this._repeatDelay),t):this._time/this.duration()||0},n.totalProgress=function(e,t){return arguments.length?this.totalTime(this.totalDuration()*e,t):this._totalTime/this.totalDuration()||0},n.totalDuration=function(e){return arguments.length?-1!==this._repeat&&e?this.timeScale(this.totalDuration()/e):this:(this._dirty&&(t.prototype.totalDuration.call(this),this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},n.time=function(e,t){if(!arguments.length)return this._time;this._dirty&&this.totalDuration();var r=this._duration,i=this._cycle,n=i*(r+this._repeatDelay);return r<e&&(e=r),this.totalTime(this._yoyo&&1&i?r-e+n:this._repeat?e+n:e,t)},n.repeat=function(e){return arguments.length?(this._repeat=e,this._uncache(!0)):this._repeat},n.repeatDelay=function(e){return arguments.length?(this._repeatDelay=e,this._uncache(!0)):this._repeatDelay},n.yoyo=function(e){return arguments.length?(this._yoyo=e,this):this._yoyo},n.currentLabel=function(e){return arguments.length?this.seek(e,!0):this.getLabelBefore(this._time+k)},r},!0),_gsScope._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(f,h,p){var v=function(e){h.call(this,e);var t,r,i=this.vars;for(r in this._labels={},this.autoRemoveChildren=!!i.autoRemoveChildren,this.smoothChildTiming=!!i.smoothChildTiming,this._sortChildren=!0,this._onUpdate=i.onUpdate,i)t=i[r],d(t)&&-1!==t.join("").indexOf("{self}")&&(i[r]=this._swapSelfInParams(t));d(i.tweens)&&this.add(i.tweens,0,i.align,i.stagger)},e=p._internals,t=v._internals={},m=e.isSelector,d=e.isArray,b=e.lazyTweens,y=e.lazyRender,a=_gsScope._gsDefine.globals,g=function(e){var t,r={};for(t in e)r[t]=e[t];return r},_=function(e,t,r){var i,n,o=e.cycle;for(i in o)n=o[i],e[i]="function"==typeof n?n(r,t[r],t):n[r%n.length];delete e.cycle},o=t.pauseCallback=function(){},c=function(e,t,r,i){var n="immediateRender";return n in t||(t[n]=!(r&&!1===r[n]||i)),t},w=function(e){if("function"==typeof e)return e;var p="object"==typeof e?e:{each:e},v=p.ease,m=p.from||0,b=p.base||0,y={},g=isNaN(m),_=p.axis,w={center:.5,end:1}[m]||0;return function(e,t,r){var i,n,o,a,s,u,c,l,f,h=(r||p).length,d=y[h];if(!d){if(!(f="auto"===p.grid?0:(p.grid||[1/0])[0])){for(c=-1/0;c<(c=r[f++].getBoundingClientRect().left)&&f<h;);f--}for(d=y[h]=[],i=g?Math.min(f,h)*w-.5:m%f,n=g?h*w/f-.5:m/f|0,l=1/(c=0),u=0;u<h;u++)o=u%f-i,a=n-(u/f|0),d[u]=s=_?Math.abs("y"===_?a:o):Math.sqrt(o*o+a*a),c<s&&(c=s),s<l&&(l=s);d.max=c-l,d.min=l,d.v=h=p.amount||p.each*(h<f?h-1:_?"y"===_?h/f:f:Math.max(f,h/f))||0,d.b=h<0?b-h:b}return h=(d[e]-d.min)/d.max,d.b+(v?v.getRatio(h):h)*d.v}},r=v.prototype=new h;return v.version="2.1.3",v.distribute=w,r.constructor=v,r.kill()._gc=r._forcingPlayhead=r._hasPause=!1,r.to=function(e,t,r,i){var n=r.repeat&&a.TweenMax||p;return t?this.add(new n(e,t,r),i):this.set(e,r,i)},r.from=function(e,t,r,i){return this.add((r.repeat&&a.TweenMax||p).from(e,t,c(0,r)),i)},r.fromTo=function(e,t,r,i,n){var o=i.repeat&&a.TweenMax||p;return i=c(0,i,r),t?this.add(o.fromTo(e,t,r,i),n):this.set(e,i,n)},r.staggerTo=function(e,t,r,i,n,o,a,s){var u,c,l=new v({onComplete:o,onCompleteParams:a,callbackScope:s,smoothChildTiming:this.smoothChildTiming}),f=w(r.stagger||i),h=r.startAt,d=r.cycle;for("string"==typeof e&&(e=p.selector(e)||e),m(e=e||[])&&(e=function(e){var t,r=[],i=e.length;for(t=0;t!==i;r.push(e[t++]));return r}(e)),c=0;c<e.length;c++)u=g(r),h&&(u.startAt=g(h),h.cycle&&_(u.startAt,e,c)),d&&(_(u,e,c),null!=u.duration&&(t=u.duration,delete u.duration)),l.to(e[c],t,u,f(c,e[c],e));return this.add(l,n)},r.staggerFrom=function(e,t,r,i,n,o,a,s){return r.runBackwards=!0,this.staggerTo(e,t,c(0,r),i,n,o,a,s)},r.staggerFromTo=function(e,t,r,i,n,o,a,s,u){return i.startAt=r,this.staggerTo(e,t,c(0,i,r),n,o,a,s,u)},r.call=function(e,t,r,i){return this.add(p.delayedCall(0,e,t,r),i)},r.set=function(e,t,r){return this.add(new p(e,0,c(0,t,null,!0)),r)},v.exportRoot=function(e,t){null==(e=e||{}).smoothChildTiming&&(e.smoothChildTiming=!0);var r,i,n,o,a=new v(e),s=a._timeline;for(null==t&&(t=!0),s._remove(a,!0),a._startTime=0,a._rawPrevTime=a._time=a._totalTime=s._time,n=s._first;n;)o=n._next,t&&n instanceof p&&n.target===n.vars.onComplete||((i=n._startTime-n._delay)<0&&(r=1),a.add(n,i)),n=o;return s.add(a,0),r&&a.totalDuration(),a},r.add=function(e,t,r,i){var n,o,a,s,u,c,l=this;if("number"!=typeof t&&(t=l._parseTimeOrLabel(t,0,!0,e)),!(e instanceof f)){if(e instanceof Array||e&&e.push&&d(e)){for(r=r||"normal",i=i||0,n=t,o=e.length,a=0;a<o;a++)d(s=e[a])&&(s=new v({tweens:s})),l.add(s,n),"string"!=typeof s&&"function"!=typeof s&&("sequence"===r?n=s._startTime+s.totalDuration()/s._timeScale:"start"===r&&(s._startTime-=s.delay())),n+=i;return l._uncache(!0)}if("string"==typeof e)return l.addLabel(e,t);if("function"!=typeof e)throw"Cannot add "+e+" into the timeline; it is not a tween, timeline, function, or string.";e=p.delayedCall(0,e)}if(h.prototype.add.call(l,e,t),(e._time||!e._duration&&e._initted)&&(n=(l.rawTime()-e._startTime)*e._timeScale,(!e._duration||1e-5<Math.abs(Math.max(0,Math.min(e.totalDuration(),n)))-e._totalTime)&&e.render(n,!1,!1)),(l._gc||l._time===l._duration)&&!l._paused&&l._duration<l.duration())for(c=(u=l).rawTime()>e._startTime;u._timeline;)c&&u._timeline.smoothChildTiming?u.totalTime(u._totalTime,!0):u._gc&&u._enabled(!0,!1),u=u._timeline;return l},r.remove=function(e){if(e instanceof f){this._remove(e,!1);var t=e._timeline=e.vars.useFrames?f._rootFramesTimeline:f._rootTimeline;return e._startTime=(e._paused?e._pauseTime:t._time)-(e._reversed?e.totalDuration()-e._totalTime:e._totalTime)/e._timeScale,this}if(e instanceof Array||e&&e.push&&d(e)){for(var r=e.length;-1<--r;)this.remove(e[r]);return this}return"string"==typeof e?this.removeLabel(e):this.kill(null,e)},r._remove=function(e,t){return h.prototype._remove.call(this,e,t),this._last?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},r.append=function(e,t){return this.add(e,this._parseTimeOrLabel(null,t,!0,e))},r.insert=r.insertMultiple=function(e,t,r,i){return this.add(e,t||0,r,i)},r.appendMultiple=function(e,t,r,i){return this.add(e,this._parseTimeOrLabel(null,t,!0,e),r,i)},r.addLabel=function(e,t){return this._labels[e]=this._parseTimeOrLabel(t),this},r.addPause=function(e,t,r,i){var n=p.delayedCall(0,o,r,i||this);return n.vars.onComplete=n.vars.onReverseComplete=t,n.data="isPause",this._hasPause=!0,this.add(n,e)},r.removeLabel=function(e){return delete this._labels[e],this},r.getLabelTime=function(e){return null!=this._labels[e]?this._labels[e]:-1},r._parseTimeOrLabel=function(e,t,r,i){var n,o;if(i instanceof f&&i.timeline===this)this.remove(i);else if(i&&(i instanceof Array||i.push&&d(i)))for(o=i.length;-1<--o;)i[o]instanceof f&&i[o].timeline===this&&this.remove(i[o]);if(n="number"!=typeof e||t?99999999999<this.duration()?this.recent().endTime(!1):this._duration:0,"string"==typeof t)return this._parseTimeOrLabel(t,r&&"number"==typeof e&&null==this._labels[t]?e-n:0,r);if(t=t||0,"string"!=typeof e||!isNaN(e)&&null==this._labels[e])null==e&&(e=n);else{if(-1===(o=e.indexOf("=")))return null==this._labels[e]?r?this._labels[e]=n+t:t:this._labels[e]+t;t=parseInt(e.charAt(o-1)+"1",10)*Number(e.substr(o+1)),e=1<o?this._parseTimeOrLabel(e.substr(0,o-1),0,r):n}return Number(e)+t},r.seek=function(e,t){return this.totalTime("number"==typeof e?e:this._parseTimeOrLabel(e),!1!==t)},r.stop=function(){return this.paused(!0)},r.gotoAndPlay=function(e,t){return this.play(e,t)},r.gotoAndStop=function(e,t){return this.pause(e,t)},r.render=function(e,t,r){this._gc&&this._enabled(!0,!1);var i,n,o,a,s,u,c,l,f=this,h=f._time,d=f._dirty?f.totalDuration():f._totalDuration,p=f._startTime,v=f._timeScale,m=f._paused;if(h!==f._time&&(e+=f._time-h),f._hasPause&&!f._forcingPlayhead&&!t){if(h<e)for(i=f._first;i&&i._startTime<=e&&!u;)i._duration||"isPause"!==i.data||i.ratio||0===i._startTime&&0===f._rawPrevTime||(u=i),i=i._next;else for(i=f._last;i&&i._startTime>=e&&!u;)i._duration||"isPause"===i.data&&0<i._rawPrevTime&&(u=i),i=i._prev;u&&(f._time=f._totalTime=e=u._startTime,l=f._startTime+(f._reversed?f._duration-e:e)/f._timeScale)}if(d-1e-8<=e&&0<=e)f._totalTime=f._time=d,f._reversed||f._hasPausedChild()||(n=!0,a="onComplete",s=!!f._timeline.autoRemoveChildren,0===f._duration&&(e<=0&&-1e-8<=e||f._rawPrevTime<0||1e-8===f._rawPrevTime)&&f._rawPrevTime!==e&&f._first&&(s=!0,1e-8<f._rawPrevTime&&(a="onReverseComplete"))),f._rawPrevTime=f._duration||!t||e||f._rawPrevTime===e?e:1e-8,e=d+1e-4;else if(e<1e-8)if(f._totalTime=f._time=0,-1e-8<e&&(e=0),(0!==h||0===f._duration&&1e-8!==f._rawPrevTime&&(0<f._rawPrevTime||e<0&&0<=f._rawPrevTime))&&(a="onReverseComplete",n=f._reversed),e<0)f._active=!1,f._timeline.autoRemoveChildren&&f._reversed?(s=n=!0,a="onReverseComplete"):0<=f._rawPrevTime&&f._first&&(s=!0),f._rawPrevTime=e;else{if(f._rawPrevTime=f._duration||!t||e||f._rawPrevTime===e?e:1e-8,0===e&&n)for(i=f._first;i&&0===i._startTime;)i._duration||(n=!1),i=i._next;e=0,f._initted||(s=!0)}else f._totalTime=f._time=f._rawPrevTime=e;if(f._time!==h&&f._first||r||s||u){if(f._initted||(f._initted=!0),f._active||!f._paused&&f._time!==h&&0<e&&(f._active=!0),0===h&&f.vars.onStart&&(0===f._time&&f._duration||t||f._callback("onStart")),h<=(c=f._time))for(i=f._first;i&&(o=i._next,c===f._time&&(!f._paused||m));)(i._active||i._startTime<=c&&!i._paused&&!i._gc)&&(u===i&&(f.pause(),f._pauseTime=l),i._reversed?i.render((i._dirty?i.totalDuration():i._totalDuration)-(e-i._startTime)*i._timeScale,t,r):i.render((e-i._startTime)*i._timeScale,t,r)),i=o;else for(i=f._last;i&&(o=i._prev,c===f._time&&(!f._paused||m));){if(i._active||i._startTime<=h&&!i._paused&&!i._gc){if(u===i){for(u=i._prev;u&&u.endTime()>f._time;)u.render(u._reversed?u.totalDuration()-(e-u._startTime)*u._timeScale:(e-u._startTime)*u._timeScale,t,r),u=u._prev;u=null,f.pause(),f._pauseTime=l}i._reversed?i.render((i._dirty?i.totalDuration():i._totalDuration)-(e-i._startTime)*i._timeScale,t,r):i.render((e-i._startTime)*i._timeScale,t,r)}i=o}f._onUpdate&&(t||(b.length&&y(),f._callback("onUpdate"))),a&&(f._gc||p!==f._startTime&&v===f._timeScale||(0===f._time||d>=f.totalDuration())&&(n&&(b.length&&y(),f._timeline.autoRemoveChildren&&f._enabled(!1,!1),f._active=!1),!t&&f.vars[a]&&f._callback(a)))}},r._hasPausedChild=function(){for(var e=this._first;e;){if(e._paused||e instanceof v&&e._hasPausedChild())return!0;e=e._next}return!1},r.getChildren=function(e,t,r,i){i=i||-9999999999;for(var n=[],o=this._first,a=0;o;)o._startTime<i||(o instanceof p?!1!==t&&(n[a++]=o):(!1!==r&&(n[a++]=o),!1!==e&&(a=(n=n.concat(o.getChildren(!0,t,r))).length))),o=o._next;return n},r.getTweensOf=function(e,t){var r,i,n=this._gc,o=[],a=0;for(n&&this._enabled(!0,!0),i=(r=p.getTweensOf(e)).length;-1<--i;)(r[i].timeline===this||t&&this._contains(r[i]))&&(o[a++]=r[i]);return n&&this._enabled(!1,!0),o},r.recent=function(){return this._recent},r._contains=function(e){for(var t=e.timeline;t;){if(t===this)return!0;t=t.timeline}return!1},r.shiftChildren=function(e,t,r){r=r||0;for(var i,n=this._first,o=this._labels;n;)n._startTime>=r&&(n._startTime+=e),n=n._next;if(t)for(i in o)o[i]>=r&&(o[i]+=e);return this._uncache(!0)},r._kill=function(e,t){if(!e&&!t)return this._enabled(!1,!1);for(var r=t?this.getTweensOf(t):this.getChildren(!0,!0,!1),i=r.length,n=!1;-1<--i;)r[i]._kill(e,t)&&(n=!0);return n},r.clear=function(e){var t=this.getChildren(!1,!0,!0),r=t.length;for(this._time=this._totalTime=0;-1<--r;)t[r]._enabled(!1,!1);return!1!==e&&(this._labels={}),this._uncache(!0)},r.invalidate=function(){for(var e=this._first;e;)e.invalidate(),e=e._next;return f.prototype.invalidate.call(this)},r._enabled=function(e,t){if(e===this._gc)for(var r=this._first;r;)r._enabled(e,!0),r=r._next;return h.prototype._enabled.call(this,e,t)},r.totalTime=function(e,t,r){this._forcingPlayhead=!0;var i=f.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,i},r.duration=function(e){return arguments.length?(0!==this.duration()&&0!==e&&this.timeScale(this._duration/e),this):(this._dirty&&this.totalDuration(),this._duration)},r.totalDuration=function(e){if(arguments.length)return e&&this.totalDuration()?this.timeScale(this._totalDuration/e):this;if(this._dirty){for(var t,r,i=0,n=this,o=n._last,a=999999999999;o;)t=o._prev,o._dirty&&o.totalDuration(),o._startTime>a&&n._sortChildren&&!o._paused&&!n._calculatingDuration?(n._calculatingDuration=1,n.add(o,o._startTime-o._delay),n._calculatingDuration=0):a=o._startTime,o._startTime<0&&!o._paused&&(i-=o._startTime,n._timeline.smoothChildTiming&&(n._startTime+=o._startTime/n._timeScale,n._time-=o._startTime,n._totalTime-=o._startTime,n._rawPrevTime-=o._startTime),n.shiftChildren(-o._startTime,!1,-9999999999),a=0),i<(r=o._startTime+o._totalDuration/o._timeScale)&&(i=r),o=t;n._duration=n._totalDuration=i,n._dirty=!1}return this._totalDuration},r.paused=function(e){if(!1===e&&this._paused)for(var t=this._first;t;)t._startTime===this._time&&"isPause"===t.data&&(t._rawPrevTime=0),t=t._next;return f.prototype.paused.apply(this,arguments)},r.usesFrames=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===f._rootFramesTimeline},r.rawTime=function(e){return e&&(this._paused||this._repeat&&0<this.time()&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(e)-this._startTime)*this._timeScale},v},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(e){"use strict";var t=function(){return(_gsScope.GreenSockGlobals||_gsScope).TimelineMax};"undefined"!=typeof module&&module.exports?(require("./TweenLite.js"),module.exports=t()):"function"==typeof define&&define.amd&&define(["TweenLite"],t)}(),function o(a,s,u){function c(r,e){if(!s[r]){if(!a[r]){var t="function"==typeof require&&require;if(!e&&t)return t(r,!0);if(l)return l(r,!0);var i=new Error("Cannot find module '"+r+"'");throw i.code="MODULE_NOT_FOUND",i}var n=s[r]={exports:{}};a[r][0].call(n.exports,function(e){var t=a[r][1][e];return c(t||e)},n,n.exports,o,a,s,u)}return s[r].exports}for(var l="function"==typeof require&&require,e=0;e<u.length;e++)c(u[e]);return c}({1:[function(e,t,r){"use strict";var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),n=function e(t,r,i){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,r);if(void 0===n){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,i)}if("value"in n)return n.value;var a=n.get;return void 0!==a?a.call(i):void 0};var o=e("./wait"),a=function(e){function a(e,t,r,i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),n=n||{};var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,e,n));return o.type="Angle",n.load?o.load(n.load):(o.angle=t,o.speed=r,o.duration=i||0),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(a,o),i(a,[{key:"save",value:function(){var e=n(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"save",this).call(this);return e.angle=this.angle,e.speed=this.speed,e}},{key:"load",value:function(e){n(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"load",this).call(this,e),this.angle=e.angle,this.speed=e.speed}},{key:"calculate",value:function(e){this.object.x+=this.cos*e*this.speed,this.object.y+=this.sin*e*this.speed}},{key:"reverse",value:function(){this.angle+=Math.PI}},{key:"angle",get:function(){return this._angle},set:function(e){this._angle=e,this.sin=Math.sin(this._angle),this.cos=Math.cos(this._angle)}}]),a}();t.exports=a},{"./wait":11}],2:[function(e,t,r){"use strict";var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),n=function e(t,r,i){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,r);if(void 0===n){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,i)}if("value"in n)return n.value;var a=n.get;return void 0!==a?a.call(i):void 0};var a=e("yy-angle"),s=e("./wait"),o=function(e){function o(e,t,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i=i||{};var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e,i));return n.type="Face",n.target=t,i.load?n.load(i.load):n.speed=r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,s),i(o,[{key:"save",value:function(){if(this.options.cancel)return null;var e=n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"save",this).call(this);return e.speed=this.speed,e.keepAlive=this.options.keepAlive,e}},{key:"load",value:function(e){n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"load",this).call(this,e),this.speed=e.speed,this.options.keepAlive=e.keepAlive}},{key:"calculate",value:function(e){var t=a.angleTwoPoints(this.object.position,this.target),r=a.differenceAngles(t,this.object.rotation);if(0===r){if(this.emit("done",this.object),!this.options.keepAlive)return!0}else{var i=a.differenceAnglesSign(t,this.object.rotation),n=this.speed*e,o=r<n?r:n;this.object.rotation+=o*i}}}]),o}();t.exports=o},{"./wait":11,"yy-angle":22}],3:[function(e,t,r){"use strict";var i={list:e("./list"),wait:e("./wait"),to:e("./to"),shake:e("./shake"),tint:e("./tint"),face:e("./face"),angle:e("./angle"),target:e("./target"),movie:e("./movie"),load:e("./load")};PIXI.extras.Ease=i,t.exports=i},{"./angle":1,"./face":2,"./list":4,"./load":5,"./movie":6,"./shake":7,"./target":8,"./tint":9,"./to":10,"./wait":11}],4:[function(e,t,r){"use strict";var n=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();var o=e("eventemitter3"),a=e("./angle"),s=e("./face"),u=e("./load"),c=e("./movie"),l=e("./shake"),f=e("./target"),h=e("./tint"),d=e("./to"),p=e("./wait"),i=function(e){function i(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),e=e||{};var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));if(!e.noTicker){var r=e.ticker||PIXI.ticker.shared;r.add(function(){return t.update(r.elapsedMS)})}return t.list=[],t.empty=!0,t.removeWaiting=[],t.removeAllWaiting=!1,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,o),n(i,[{key:"add",value:function(){var e=void 0,t=!0,r=!1,i=void 0;try{for(var n,o=arguments[Symbol.iterator]();!(t=(n=o.next()).done);t=!0){var a=n.value;if(Array.isArray(a)){var s=!0,u=!1,c=void 0;try{for(var l,f=a[Symbol.iterator]();!(s=(l=f.next()).done);s=!0){var h=l.value;e||(e=h),this.list.push(h)}}catch(e){u=!0,c=e}finally{try{!s&&f.return&&f.return()}finally{if(u)throw c}}}else e=a,this.list.push(a)}}catch(e){r=!0,i=e}finally{try{!t&&o.return&&o.return()}finally{if(r)throw i}}return this.empty=!1,e}},{key:"remove",value:function(e){if(this.inUpdate)this.removeWaiting.push(e);else{var t=this.list.indexOf(e);-1!==t&&this.list.splice(t,1)}}},{key:"removeAll",value:function(){this.inUpdate?this.removeAllWaiting=!0:this.list=[]}},{key:"update",value:function(e){this.inUpdate=!0;for(var t=0,r=this.list.length;t<r;t++)this.list[t]&&this.list[t].update(e)&&(this.list.splice(t,1),t--,r--);for(this.emit("each",this),0!==this.list.length||this.empty||(this.emit("done",this),this.empty=!0),this.inUpdate=!1,this.removeAllWaiting&&(this.removeAll(),this.removeAllWaiting=!1);this.removeWaiting.length;)this.remove(this.removeWaiting.pop())}},{key:"to",value:function(){return this.add(new(Function.prototype.bind.apply(d,[null].concat(Array.prototype.slice.call(arguments)))))}},{key:"angle",value:function(){return this.add(new(Function.prototype.bind.apply(a,[null].concat(Array.prototype.slice.call(arguments)))))}},{key:"face",value:function(){return this.add(new(Function.prototype.bind.apply(s,[null].concat(Array.prototype.slice.call(arguments)))))}},{key:"load",value:function(){return this.add(new(Function.prototype.bind.apply(u,[null].concat(Array.prototype.slice.call(arguments)))))}},{key:"movie",value:function(){return this.add(new(Function.prototype.bind.apply(c,[null].concat(Array.prototype.slice.call(arguments)))))}},{key:"shake",value:function(){return this.add(new(Function.prototype.bind.apply(l,[null].concat(Array.prototype.slice.call(arguments)))))}},{key:"target",value:function(){return this.add(new(Function.prototype.bind.apply(f,[null].concat(Array.prototype.slice.call(arguments)))))}},{key:"tint",value:function(){return this.add(new(Function.prototype.bind.apply(h,[null].concat(Array.prototype.slice.call(arguments)))))}},{key:"wait",value:function(){return this.add(new(Function.prototype.bind.apply(p,[null].concat(Array.prototype.slice.call(arguments)))))}},{key:"count",get:function(){return this.list.length}},{key:"countRunning",get:function(){var e=0,t=!0,r=!1,i=void 0;try{for(var n,o=this.list[Symbol.iterator]();!(t=(n=o.next()).done);t=!0){n.value.pause||e++}}catch(e){r=!0,i=e}finally{try{!t&&o.return&&o.return()}finally{if(r)throw i}}return e}}]),i}();t.exports=i},{"./angle":1,"./face":2,"./load":5,"./movie":6,"./shake":7,"./target":8,"./tint":9,"./to":10,"./wait":11,eventemitter3:12}],5:[function(e,t,r){"use strict";var i=e("./wait"),n=e("./to"),o=e("./tint"),a=e("./shake"),s=e("./angle"),u=e("./face"),c=e("./target"),l=e("./movie");t.exports=function(e,t){if(!t)return null;var r={load:t};switch(t.type){case"Wait":return new i(e,r);case"To":return new n(e,null,null,r);case"Tint":return new o(e,null,null,r);case"Shake":return new a(e,null,null,r);case"Angle":return new s(e,null,null,null,r);case"Face":return new u(e[0],e[1],null,r);case"Target":return new c(e[0],e[1],null,r);case"Movie":return new l(e,e[1],null,r)}}},{"./angle":1,"./face":2,"./movie":6,"./shake":7,"./target":8,"./tint":9,"./to":10,"./wait":11}],6:[function(e,t,r){"use strict";var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),n=function e(t,r,i){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,r);if(void 0===n){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,i)}if("value"in n)return n.value;var a=n.get;return void 0!==a?a.call(i):void 0};var a=e("./wait"),o=function(e){function o(e,t,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i=i||{};var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e,i));return n.type="Movie",Array.isArray(e)&&(n.list=e,n.object=n.list[0]),i.load?n.load(i.load):(n.textures=t,n.duration=r,n.current=0,n.length=t.length,n.interval=r/n.length,n.isReverse=!1,n.restart()),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,a),i(o,[{key:"save",value:function(){var e=n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"save",this).call(this);return e.goto=this.goto,e.current=this.current,e.length=this.length,e.interval=this.interval,e}},{key:"load",value:function(e){n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"load",this).call(this,e),this.goto=e.goto,this.current=e.current,this.interval=e.current}},{key:"restart",value:function(){this.current=0,this.time=0,this.isReverse=!1}},{key:"reverse",value:function(){this.isReverse=!this.isReverse}},{key:"calculate",value:function(){var e=Math.round(this.options.ease(this.time,0,this.length-1,this.duration));if(this.isReverse&&(e=this.length-1-e),this.list)for(var t=0;t<this.list.length;t++)this.list[t].texture=this.textures[e];else this.object.texture=this.textures[e]}}]),o}();t.exports=o},{"./wait":11}],7:[function(e,t,r){"use strict";var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),n=function e(t,r,i){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,r);if(void 0===n){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,i)}if("value"in n)return n.value;var a=n.get;return void 0!==a?a.call(i):void 0};var o=e("./wait"),a=function(e){function s(e,t,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),i=i||{};var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,e,i));if(n.type="Shake",Array.isArray(e)&&(n.array=!0,n.list=e),i.load)n.load(i.load);else{if(n.list){n.start=[];for(var o=0;o<e.length;o++){var a=e[o];n.start[o]={x:a.x,y:a.y}}}else n.start={x:e.x,y:e.y};n.amount=t,n.duration=r}return n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(s,o),i(s,[{key:"save",value:function(){var e=n(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"save",this).call(this);return e.start=this.start,e.amount=this.amount,e}},{key:"load",value:function(e){n(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"load",this).call(this,e),this.start=e.start,this.amount=e.amount}},{key:"calculate",value:function(){var e=this.object,t=this.start,r=this.amount;if(this.array)for(var i=this.list,n=0;n<i.length;n++){var o=i[n],a=t[n];o.x=a.x+Math.floor(Math.random()*r*2)-r,o.y=a.y+Math.floor(Math.random()*r*2)-r}e.x=t.x+Math.floor(Math.random()*r*2)-r,e.y=t.y+Math.floor(Math.random()*r*2)-r}},{key:"done",value:function(){var e=this.object,t=this.start;if(this.array)for(var r=this.list,i=0;i<r.length;i++){var n=r[i],o=t[i];n.x=o.x,n.y=o.y}else e.x=t.x,e.y=t.y}}]),s}();t.exports=a},{"./wait":11}],8:[function(e,t,r){"use strict";var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),n=function e(t,r,i){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,r);if(void 0===n){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,i)}if("value"in n)return n.value;var a=n.get;return void 0!==a?a.call(i):void 0};var a=e("./wait"),o=function(e){function o(e,t,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i=i||{};var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e,i));return n.type="Target",n.target=t,i.load?n.load(i.load):n.speed=r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,a),i(o,[{key:"save",value:function(){var e=n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"save",this).call(this);return e.speed=this.speed,e.keepAlive=this.options.keepAlive,e}},{key:"load",value:function(e){n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"load",this).call(this,e),this.speed=e.speed,this.options.keepAlive=e.keepAlive}},{key:"calculate",value:function(e){var t=this.target.x-this.object.x,r=this.target.y-this.object.y;if(0==t&&0==r){if(this.emit("done",this.object),!this.options.keepAlive)return!0}else{var i=Math.atan2(r,t);this.object.x+=Math.cos(i)*e*this.speed,this.object.y+=Math.sin(i)*e*this.speed,0<=t!=0<=this.target.x-this.object.x&&(this.object.x=this.target.x),0<=r!=0<=this.target.y-this.object.y&&(this.object.y=this.target.y)}}}]),o}();t.exports=o},{"./wait":11}],9:[function(e,t,r){"use strict";var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),n=function e(t,r,i){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,r);if(void 0===n){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,i)}if("value"in n)return n.value;var a=n.get;return void 0!==a?a.call(i):void 0};var m=e("yy-color"),a=e("./wait"),o=function(e){function o(e,t,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i=i||{};var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e,i));return n.type="Tint",Array.isArray(e)&&(n.list=e,n.object=n.list[0]),n.duration=r,i.load?n.load(i.load):Array.isArray(t)?n.tints=[n.object.tint].concat(function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(t)):(n.start=n.object.tint,n.to=t),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,a),i(o,[{key:"save",value:function(){var e=n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"save",this).call(this);return e.start=this.start,e.to=this.to,e}},{key:"load",value:function(e){n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"load",this).call(this,e),this.start=e.start,this.to=e.to}},{key:"calculate",value:function(){var e=this.options.ease(this.time,0,1,this.duration);if(this.tints)for(var t=1/(this.tints.length-1),r=t,i=1;i<this.tints.length;i++){if(e<=r){var n=m.blend(1-(r-e)/t,this.tints[i-1],this.tints[i]);if(this.list){var o=!0,a=!1,s=void 0;try{for(var u,c=this.list[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){u.value.tint=n}}catch(e){a=!0,s=e}finally{try{!o&&c.return&&c.return()}finally{if(a)throw s}}}else this.object.tint=n;break}r+=t}else{var l=m.blend(e,this.start,this.to);if(this.list){var f=!0,h=!1,d=void 0;try{for(var p,v=this.list[Symbol.iterator]();!(f=(p=v.next()).done);f=!0){p.value.tint=l}}catch(e){h=!0,d=e}finally{try{!f&&v.return&&v.return()}finally{if(h)throw d}}}else this.object.tint=l}}},{key:"reverse",value:function(){if(this.tints){for(var e=[],t=this.tints.length-1;0<=t;t--)e.push(this.tints[t]);this.tints=e}else{var r=this.to;this.to=this.start,this.start=r}}}]),o}();t.exports=o},{"./wait":11,"yy-color":23}],10:[function(e,t,r){"use strict";var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),n=function e(t,r,i){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,r);if(void 0===n){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,i)}if("value"in n)return n.value;var a=n.get;return void 0!==a?a.call(i):void 0};var a=e("./wait"),o=function(e){function o(e,t,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i=i||{};var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e,i));return n.type="To",Array.isArray(e)&&(n.list=e,n.object=n.list[0]),i.load?n.load(i.load):(n.goto=t,n.fixScale(),n.duration=r,n.restart()),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,a),i(o,[{key:"fixScale",value:function(){void 0===this.goto.scale||Number.isNaN(this.goto.scale)||(this.goto.scale={x:this.goto.scale,y:this.goto.scale})}},{key:"save",value:function(){var e=n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"save",this).call(this);return e.goto=this.goto,e.start=this.start,e.delta=this.delta,e.keys=this.keys,e}},{key:"load",value:function(e){n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"load",this).call(this,e),this.goto=e.goto,this.start=e.start,this.delta=e.delta,this.keys=e.keys}},{key:"restart",value:function(){var e=0,t=this.start=[],r=this.delta=[],i=this.keys=[],n=this.goto,o=this.object;for(var a in n){if(isNaN(n[a])){i[e]={key:a,children:[]},t[e]=[],r[e]=[];var s=0;for(var u in n[a])i[e].children[s]=u,t[e][s]=parseFloat(o[a][u]),t[e][s]=this._correctDOM(u,t[e][s]),t[e][s]=isNaN(this.start[e][s])?0:t[e][s],r[e][s]=n[a][u]-t[e][s],s++}else t[e]=parseFloat(o[a]),t[e]=this._correctDOM(a,t[e]),t[e]=isNaN(this.start[e])?0:t[e],r[e]=n[a]-t[e],i[e]=a;e++}this.time=0}},{key:"reverse",value:function(){for(var e=this.object,t=this.keys,r=this.goto,i=this.delta,n=this.start,o=0,a=t.length;o<a;o++){var s=t[o];if(isNaN(r[s]))for(var u=0,c=s.children.length;u<c;u++)i[o][u]=-i[o][u],n[o][u]=parseFloat(e[s.key][s.children[u]]),n[o][u]=isNaN(n[o][u])?0:n[o][u];else i[o]=-i[o],n[o]=parseFloat(e[s]),n[o]=isNaN(n[o])?0:n[o]}}},{key:"calculate",value:function(){for(var e=this.object,t=this.list,r=this.keys,i=this.goto,n=this.time,o=this.start,a=this.delta,s=this.duration,u=this.options.ease,c=0,l=this.keys.length;c<l;c++){var f=r[c];if(isNaN(i[f]))for(var h=f.key,d=0,p=f.children.length;d<p;d++){var v=f.children[d],m=e[h][v]=s<=n?o[c][d]+a[c][d]:u(n,o[c][d],a[c][d],s);if(t)for(var b=1,y=t.length;b<y;b++)t[b][h][v]=m}else{var g=r[c],_=e[g]=s<=n?o[c]+a[c]:u(n,o[c],a[c],s);if(t)for(var w=1,x=this.list.length;w<x;w++)t[w][g]=_}}}}]),o}();t.exports=o},{"./wait":11}],11:[function(e,t,r){"use strict";var n=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();var o=e("penner"),a=e("eventemitter3"),i=function(e){function i(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return r.object=e,r.options=t||{},r.type="Wait",r.options.load?r.load(r.options.load):r.time=0,r.options.ease&&"function"!=typeof r.options.ease&&(r.options.easeName=r.options.ease,r.options.ease=o[r.options.ease]),r.options.ease||(r.options.ease=o.linear),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,a),n(i,[{key:"save",value:function(){var e={type:this.type,time:this.time,duration:this.duration,ease:this.options.easeName},t=this.options;return t.wait&&(e.wait=t.wait),void 0!==t.id&&(e.id=t.id),t.pause&&(e.pause=t.pause),t.repeat&&(e.repeat=t.repeat),t.reverse&&(e.reverse=t.reverse),e}},{key:"load",value:function(e){this.options.wait=e.wait,this.options.pause=e.pause,this.options.repeat=e.repeat,this.options.reverse=e.reverse,this.options.id=e.id,this.options.ease=e.ease,this.options.ease&&"function"!=typeof this.options.ease&&(this.options.easeName=this.options.ease,this.options.ease=o[this.options.ease]),this.options.ease||(this.options.ease=o.linear),this.time=e.time,this.duration=e.duration}},{key:"end",value:function(e){if(this.options.reverse)this.reverse(),this.time=e,this.options.repeat?!0!==this.options.repeat&&this.options.repeat--:!0===this.options.reverse?this.options.reverse=!1:this.options.reverse--,this.emit("loop",this.list||this.object);else{if(!this.options.repeat)return this.done(),this.emit("done",this.list||this.object,e),!0;this.time=e,!0!==this.options.repeat&&this.options.repeat--,this.emit("loop",this.list||this.object)}}},{key:"update",value:function(e){var t=this.options;if(!t.pause){if(t.wait){if(t.wait-=e,!(t.wait<=0))return void this.emit("wait",e,this.list||this.object);e=-t.wait,t.wait=!1}this.first||(this.first=!0,this.emit("first",this.list||this.object)),this.time+=e;var r=0,i=this.duration,n=this.time;0!==i&&i<n&&(r=n-i,this.time=n=i);var o=this.calculate(e);return this.emit("each",e,this.list||this.object,this),"Wait"===this.type||0!==i&&n===i?this.end(r):o||n===i}}},{key:"_correctDOM",value:function(e,t){switch(e){case"opacity":return isNaN(t)?1:t}return t}},{key:"reverse",value:function(){}},{key:"calculate",value:function(){}},{key:"done",value:function(){}},{key:"pause",set:function(e){this.options.pause=e},get:function(){return this.options.pause}}]),i}();t.exports=i},{eventemitter3:12,penner:13}],12:[function(e,t,r){"use strict";var i=Object.prototype.hasOwnProperty,d="~";function n(){}function s(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,r,i,n){if("function"!=typeof r)throw new TypeError("The listener must be a function");var o=new s(r,i||e,n),a=d?d+t:t;return e._events[a]?e._events[a].fn?e._events[a]=[e._events[a],o]:e._events[a].push(o):(e._events[a]=o,e._eventsCount++),e}function c(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(d=!1)),a.prototype.eventNames=function(){var e,t,r=[];if(0===this._eventsCount)return r;for(t in e=this._events)i.call(e,t)&&r.push(d?t.slice(1):t);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},a.prototype.listeners=function(e){var t=d?d+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,n=r.length,o=new Array(n);i<n;i++)o[i]=r[i].fn;return o},a.prototype.listenerCount=function(e){var t=d?d+e:e,r=this._events[t];return r?r.fn?1:r.length:0},a.prototype.emit=function(e,t,r,i,n,o){var a=d?d+e:e;if(!this._events[a])return!1;var s,u,c=this._events[a],l=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,i),!0;case 5:return c.fn.call(c.context,t,r,i,n),!0;case 6:return c.fn.call(c.context,t,r,i,n,o),!0}for(u=1,s=new Array(l-1);u<l;u++)s[u-1]=arguments[u];c.fn.apply(c.context,s)}else{var f,h=c.length;for(u=0;u<h;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),l){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,r);break;case 4:c[u].fn.call(c[u].context,t,r,i);break;default:if(!s)for(f=1,s=new Array(l-1);f<l;f++)s[f-1]=arguments[f];c[u].fn.apply(c[u].context,s)}}return!0},a.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},a.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},a.prototype.removeListener=function(e,t,r,i){var n=d?d+e:e;if(!this._events[n])return this;if(!t)return c(this,n),this;var o=this._events[n];if(o.fn)o.fn!==t||i&&!o.once||r&&o.context!==r||c(this,n);else{for(var a=0,s=[],u=o.length;a<u;a++)(o[a].fn!==t||i&&!o[a].once||r&&o[a].context!==r)&&s.push(o[a]);s.length?this._events[n]=1===s.length?s[0]:s:c(this,n)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=d?d+e:e,this._events[t]&&c(this,t)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=d,a.EventEmitter=a,void 0!==t&&(t.exports=a)},{}],13:[function(e,t,r){(function(){var n;(function(e){"object"==typeof r?t.exports=e:"function"==typeof define&&define.amd?define([],e):this.penner=e})(n={linear:function(e,t,r,i){return r*e/i+t},easeInQuad:function(e,t,r,i){return r*(e/=i)*e+t},easeOutQuad:function(e,t,r,i){return-r*(e/=i)*(e-2)+t},easeInOutQuad:function(e,t,r,i){return(e/=i/2)<1?r/2*e*e+t:-r/2*(--e*(e-2)-1)+t},easeInCubic:function(e,t,r,i){return r*(e/=i)*e*e+t},easeOutCubic:function(e,t,r,i){return r*((e=e/i-1)*e*e+1)+t},easeInOutCubic:function(e,t,r,i){return(e/=i/2)<1?r/2*e*e*e+t:r/2*((e-=2)*e*e+2)+t},easeInQuart:function(e,t,r,i){return r*(e/=i)*e*e*e+t},easeOutQuart:function(e,t,r,i){return-r*((e=e/i-1)*e*e*e-1)+t},easeInOutQuart:function(e,t,r,i){return(e/=i/2)<1?r/2*e*e*e*e+t:-r/2*((e-=2)*e*e*e-2)+t},easeInQuint:function(e,t,r,i){return r*(e/=i)*e*e*e*e+t},easeOutQuint:function(e,t,r,i){return r*((e=e/i-1)*e*e*e*e+1)+t},easeInOutQuint:function(e,t,r,i){return(e/=i/2)<1?r/2*e*e*e*e*e+t:r/2*((e-=2)*e*e*e*e+2)+t},easeInSine:function(e,t,r,i){return-r*Math.cos(e/i*(Math.PI/2))+r+t},easeOutSine:function(e,t,r,i){return r*Math.sin(e/i*(Math.PI/2))+t},easeInOutSine:function(e,t,r,i){return-r/2*(Math.cos(Math.PI*e/i)-1)+t},easeInExpo:function(e,t,r,i){return 0===e?t:r*Math.pow(2,10*(e/i-1))+t},easeOutExpo:function(e,t,r,i){return e===i?t+r:r*(1-Math.pow(2,-10*e/i))+t},easeInOutExpo:function(e,t,r,i){return(e/=i/2)<1?r/2*Math.pow(2,10*(e-1))+t:r/2*(2-Math.pow(2,-10*--e))+t},easeInCirc:function(e,t,r,i){return-r*(Math.sqrt(1-(e/=i)*e)-1)+t},easeOutCirc:function(e,t,r,i){return r*Math.sqrt(1-(e=e/i-1)*e)+t},easeInOutCirc:function(e,t,r,i){return(e/=i/2)<1?-r/2*(Math.sqrt(1-e*e)-1)+t:r/2*(Math.sqrt(1-(e-=2)*e)+1)+t},easeInElastic:function(e,t,r,i){var n,o,a;return a=1.70158,(o=0)===e||(e/=i),o||(o=.3*i),a=(n=r)<Math.abs(r)?(n=r,o/4):o/(2*Math.PI)*Math.asin(r/n),-n*Math.pow(2,10*(e-=1))*Math.sin((e*i-a)*(2*Math.PI)/o)+t},easeOutElastic:function(e,t,r,i){var n,o,a;return a=1.70158,(o=0)===e||(e/=i),o||(o=.3*i),a=(n=r)<Math.abs(r)?(n=r,o/4):o/(2*Math.PI)*Math.asin(r/n),n*Math.pow(2,-10*e)*Math.sin((e*i-a)*(2*Math.PI)/o)+r+t},easeInOutElastic:function(e,t,r,i){var n,o,a;return a=1.70158,(o=0)===e||(e/=i/2),o||(o=i*(.3*1.5)),a=(n=r)<Math.abs(r)?(n=r,o/4):o/(2*Math.PI)*Math.asin(r/n),e<1?n*Math.pow(2,10*(e-=1))*Math.sin((e*i-a)*(2*Math.PI)/o)*-.5+t:n*Math.pow(2,-10*(e-=1))*Math.sin((e*i-a)*(2*Math.PI)/o)*.5+r+t},easeInBack:function(e,t,r,i,n){return void 0===n&&(n=1.70158),r*(e/=i)*e*((n+1)*e-n)+t},easeOutBack:function(e,t,r,i,n){return void 0===n&&(n=1.70158),r*((e=e/i-1)*e*((n+1)*e+n)+1)+t},easeInOutBack:function(e,t,r,i,n){return void 0===n&&(n=1.70158),(e/=i/2)<1?r/2*(e*e*((1+(n*=1.525))*e-n))+t:r/2*((e-=2)*e*((1+(n*=1.525))*e+n)+2)+t},easeInBounce:function(e,t,r,i){return r-n.easeOutBounce(i-e,0,r,i)+t},easeOutBounce:function(e,t,r,i){return(e/=i)<1/2.75?r*(7.5625*e*e)+t:e<2/2.75?r*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?r*(7.5625*(e-=2.25/2.75)*e+.9375)+t:r*(7.5625*(e-=2.625/2.75)*e+.984375)+t},easeInOutBounce:function(e,t,r,i){return e<i/2?.5*n.easeInBounce(2*e,0,r,i)+t:.5*n.easeOutBounce(2*e-i,0,r,i)+.5*r+t}})}).call(this)},{}],14:[function(e,t,r){var i=e("./lib/alea"),n=e("./lib/xor128"),o=e("./lib/xorwow"),a=e("./lib/xorshift7"),s=e("./lib/xor4096"),u=e("./lib/tychei"),c=e("./seedrandom");c.alea=i,c.xor128=n,c.xorwow=o,c.xorshift7=a,c.xor4096=s,c.tychei=u,t.exports=c},{"./lib/alea":15,"./lib/tychei":16,"./lib/xor128":17,"./lib/xor4096":18,"./lib/xorshift7":19,"./lib/xorwow":20,"./seedrandom":21}],15:[function(e,t,r){!function(e,t,r){function o(e){var t=this,r=function(){var i=4022871197;return function(e){e=e.toString();for(var t=0;t<e.length;t++){var r=.02519603282416938*(i+=e.charCodeAt(t));r-=i=r>>>0,i=(r*=i)>>>0,i+=4294967296*(r-=i)}return 2.3283064365386963e-10*(i>>>0)}}();t.next=function(){var e=2091639*t.s0+2.3283064365386963e-10*t.c;return t.s0=t.s1,t.s1=t.s2,t.s2=e-(t.c=0|e)},t.c=1,t.s0=r(" "),t.s1=r(" "),t.s2=r(" "),t.s0-=r(e),t.s0<0&&(t.s0+=1),t.s1-=r(e),t.s1<0&&(t.s1+=1),t.s2-=r(e),t.s2<0&&(t.s2+=1),r=null}function a(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function i(e,t){var r=new o(e),i=t&&t.state,n=r.next;return n.int32=function(){return 4294967296*r.next()|0},n.double=function(){return n()+11102230246251565e-32*(2097152*n()|0)},n.quick=n,i&&("object"==typeof i&&a(i,r),n.state=function(){return a(r,{})}),n}t&&t.exports?t.exports=i:r&&r.amd?r(function(){return i}):this.alea=i}(0,"object"==typeof t&&t,"function"==typeof define&&define)},{}],16:[function(e,t,r){!function(e,t,r){function o(e){var n=this,t="";n.next=function(){var e=n.b,t=n.c,r=n.d,i=n.a;return e=e<<25^e>>>7^t,t=t-r|0,r=r<<24^r>>>8^i,i=i-e|0,n.b=e=e<<20^e>>>12^t,n.c=t=t-r|0,n.d=r<<16^t>>>16^i,n.a=i-e|0},n.a=0,n.b=0,n.c=-1640531527,n.d=1367130551,e===Math.floor(e)?(n.a=e/4294967296|0,n.b=0|e):t+=e;for(var r=0;r<t.length+20;r++)n.b^=0|t.charCodeAt(r),n.next()}function a(e,t){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t}function i(e,t){var r=new o(e),i=t&&t.state,n=function(){return(r.next()>>>0)/4294967296};return n.double=function(){do{var e=((r.next()>>>11)+(r.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},n.int32=r.next,n.quick=n,i&&("object"==typeof i&&a(i,r),n.state=function(){return a(r,{})}),n}t&&t.exports?t.exports=i:r&&r.amd?r(function(){return i}):this.tychei=i}(0,"object"==typeof t&&t,"function"==typeof define&&define)},{}],17:[function(e,t,r){!function(e,t,r){function o(e){var t=this,r="";t.x=0,t.y=0,t.z=0,t.w=0,t.next=function(){var e=t.x^t.x<<11;return t.x=t.y,t.y=t.z,t.z=t.w,t.w^=t.w>>>19^e^e>>>8},e===(0|e)?t.x=e:r+=e;for(var i=0;i<r.length+64;i++)t.x^=0|r.charCodeAt(i),t.next()}function a(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t}function i(e,t){var r=new o(e),i=t&&t.state,n=function(){return(r.next()>>>0)/4294967296};return n.double=function(){do{var e=((r.next()>>>11)+(r.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},n.int32=r.next,n.quick=n,i&&("object"==typeof i&&a(i,r),n.state=function(){return a(r,{})}),n}t&&t.exports?t.exports=i:r&&r.amd?r(function(){return i}):this.xor128=i}(0,"object"==typeof t&&t,"function"==typeof define&&define)},{}],18:[function(e,t,r){!function(e,t,r){function o(e){var o=this;o.next=function(){var e,t,r=o.w,i=o.X,n=o.i;return o.w=r=r+1640531527|0,t=i[n+34&127],e=i[n=n+1&127],t^=t<<13,e^=e<<17,t^=t>>>15,e^=e>>>12,t=i[n]=t^e,o.i=n,t+(r^r>>>16)|0},function(e,t){var r,i,n,o,a,s=[],u=128;for(t===(0|t)?(i=t,t=null):(t+="\0",i=0,u=Math.max(u,t.length)),n=0,o=-32;o<u;++o)t&&(i^=t.charCodeAt((o+32)%t.length)),0===o&&(a=i),i^=i<<10,i^=i>>>15,i^=i<<4,i^=i>>>13,0<=o&&(a=a+1640531527|0,n=0==(r=s[127&o]^=i+a)?n+1:0);for(128<=n&&(s[127&(t&&t.length||0)]=-1),n=127,o=512;0<o;--o)i=s[n+34&127],r=s[n=n+1&127],i^=i<<13,r^=r<<17,i^=i>>>15,r^=r>>>12,s[n]=i^r;e.w=a,e.X=s,e.i=n}(o,e)}function a(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function i(e,t){null==e&&(e=+new Date);var r=new o(e),i=t&&t.state,n=function(){return(r.next()>>>0)/4294967296};return n.double=function(){do{var e=((r.next()>>>11)+(r.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},n.int32=r.next,n.quick=n,i&&(i.X&&a(i,r),n.state=function(){return a(r,{})}),n}t&&t.exports?t.exports=i:r&&r.amd?r(function(){return i}):this.xor4096=i}(0,"object"==typeof t&&t,"function"==typeof define&&define)},{}],19:[function(e,t,r){!function(e,t,r){function o(e){var n=this;n.next=function(){var e,t,r=n.x,i=n.i;return e=r[i],t=(e^=e>>>7)^e<<24,t^=(e=r[i+1&7])^e>>>10,t^=(e=r[i+3&7])^e>>>3,t^=(e=r[i+4&7])^e<<7,e=r[i+7&7],t^=(e^=e<<13)^e<<9,r[i]=t,n.i=i+1&7,t},function(e,t){var r,i=[];if(t===(0|t))i[0]=t;else for(t=""+t,r=0;r<t.length;++r)i[7&r]=i[7&r]<<15^t.charCodeAt(r)+i[r+1&7]<<13;for(;i.length<8;)i.push(0);for(r=0;r<8&&0===i[r];++r);for(8==r?i[7]=-1:i[r],e.x=i,e.i=0,r=256;0<r;--r)e.next()}(n,e)}function a(e,t){return t.x=e.x.slice(),t.i=e.i,t}function i(e,t){null==e&&(e=+new Date);var r=new o(e),i=t&&t.state,n=function(){return(r.next()>>>0)/4294967296};return n.double=function(){do{var e=((r.next()>>>11)+(r.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},n.int32=r.next,n.quick=n,i&&(i.x&&a(i,r),n.state=function(){return a(r,{})}),n}t&&t.exports?t.exports=i:r&&r.amd?r(function(){return i}):this.xorshift7=i}(0,"object"==typeof t&&t,"function"==typeof define&&define)},{}],20:[function(e,t,r){!function(e,t,r){function o(e){var t=this,r="";t.next=function(){var e=t.x^t.x>>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,(t.d=t.d+362437|0)+(t.v=t.v^t.v<<4^e^e<<1)|0},t.x=0,t.y=0,t.z=0,t.w=0,e===((t.v=0)|e)?t.x=e:r+=e;for(var i=0;i<r.length+64;i++)t.x^=0|r.charCodeAt(i),i==r.length&&(t.d=t.x<<10^t.x>>>4),t.next()}function a(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t.v=e.v,t.d=e.d,t}function i(e,t){var r=new o(e),i=t&&t.state,n=function(){return(r.next()>>>0)/4294967296};return n.double=function(){do{var e=((r.next()>>>11)+(r.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},n.int32=r.next,n.quick=n,i&&("object"==typeof i&&a(i,r),n.state=function(){return a(r,{})}),n}t&&t.exports?t.exports=i:r&&r.amd?r(function(){return i}):this.xorwow=i}(0,"object"==typeof t&&t,"function"==typeof define&&define)},{}],21:[function(t,r,e){!function(s,u){var c,l=this,f=256,h=6,d="random",p=u.pow(f,h),v=u.pow(2,52),m=2*v,b=f-1;function e(e,t,r){var i=[],n=_(function e(t,r){var i,n=[],o=typeof t;if(r&&"object"==o)for(i in t)try{n.push(e(t[i],r-1))}catch(e){}return n.length?n:"string"==o?t:t+"\0"}((t=1==t?{entropy:!0}:t||{}).entropy?[e,w(s)]:null==e?function(){try{var e;return c&&(e=c.randomBytes)?e=e(f):(e=new Uint8Array(f),(l.crypto||l.msCrypto).getRandomValues(e)),w(e)}catch(e){var t=l.navigator,r=t&&t.plugins;return[+new Date,l,r,l.screen,w(s)]}}():e,3),i),o=new y(i),a=function(){for(var e=o.g(h),t=p,r=0;e<v;)e=(e+r)*f,t*=f,r=o.g(1);for(;m<=e;)e/=2,t/=2,r>>>=1;return(e+r)/t};return a.int32=function(){return 0|o.g(4)},a.quick=function(){return o.g(4)/4294967296},a.double=a,_(w(o.S),s),(t.pass||r||function(e,t,r,i){return i&&(i.S&&g(i,o),e.state=function(){return g(o,{})}),r?(u[d]=e,t):e})(a,n,"global"in t?t.global:this==u,t.state)}function y(e){var t,r=e.length,a=this,i=0,n=a.i=a.j=0,o=a.S=[];for(r||(e=[r++]);i<f;)o[i]=i++;for(i=0;i<f;i++)o[i]=o[n=b&n+e[i%r]+(t=o[i])],o[n]=t;(a.g=function(e){for(var t,r=0,i=a.i,n=a.j,o=a.S;e--;)t=o[i=b&i+1],r=r*f+o[b&(o[i]=o[n=b&n+t])+(o[n]=t)];return a.i=i,a.j=n,r})(f)}function g(e,t){return t.i=e.i,t.j=e.j,t.S=e.S.slice(),t}function _(e,t){for(var r,i=e+"",n=0;n<i.length;)t[b&n]=b&(r^=19*t[b&n])+i.charCodeAt(n++);return w(t)}function w(e){return String.fromCharCode.apply(0,e)}if(u["seed"+d]=e,_(u.random(),s),"object"==typeof r&&r.exports){r.exports=e;try{c=t("crypto")}catch(e){}}else"function"==typeof define&&define.amd&&define(function(){return e})}([],Math)},{crypto:25}],22:[function(e,t,r){var i=180/Math.PI,n=Math.PI/180,o=Math.PI/2,a=3*Math.PI/2,s=Math.PI,u=o,c=a,l=s,f=2*Math.PI,h=Math.PI/4,d=Math.PI/2;function p(e,t){var r;return 0<((e-t+Math.PI)%(r=f)+r)%r-Math.PI?1:-1}function v(e,t){var r=Math.abs(e-t)%f;return r>Math.PI?f-r:r}function m(e){return e-f*Math.floor(e/f)}t.exports={UP:o,DOWN:a,LEFT:s,RIGHT:0,NORTH:u,SOUTH:c,WEST:l,EAST:0,PI_2:f,PI_QUARTER:h,PI_HALF:d,toDegrees:function(e){return e*i},toRadians:function(e){return e*n},isAngleBetween:function(e,t,r){if(((r-t)%f+f)%f>=Math.PI){var i=t;t=r,r=i}return t<=r?t<=e&&e<=r:t<=e||e<=r},differenceAnglesSign:p,differenceAngles:v,shortestAngle:function(e,t){return v(t,e)*p(t,e)+e},normalize:m,angleTwoPoints:function(){return 4===arguments.length?Math.atan2(arguments[3]-arguments[1],arguments[2]-arguments[0]):Math.atan2(arguments[1].y-arguments[0].y,arguments[1].x-arguments[0].x)},distanceTwoPoints:function(){return 2===arguments.length?Math.sqrt(Math.pow(arguments[1].x-arguments[0].x,2)+Math.pow(arguments[1].y-arguments[0].y,2)):Math.sqrt(Math.pow(arguments[2]-arguments[0],2)+Math.pow(arguments[3]-arguments[1],2))},distanceTwoPointsSquared:function(){return 2===arguments.length?Math.pow(arguments[1].x-arguments[0].x,2)+Math.pow(arguments[1].y-arguments[0].y,2):Math.pow(arguments[2]-arguments[0],2)+Math.pow(arguments[3]-arguments[1],2)},closestAngle:function(e){var t=v(e,s),r=v(e,0),i=v(e,o),n=v(e,a);return t<=r&&t<=i&&t<=n?s:r<=i&&r<=n?0:i<=n?o:a},equals:function(e,t,r){return r?v(e,t)<r:m(e)===m(t)},explain:function(e){switch(e){case o:return"UP";case a:return"DOWN";case s:return"LEFT";case 0:return"RIGHT";default:return"NOT CARDINAL"}}}},{}],23:[function(e,t,r){var s=e("yy-random");t.exports={poundToHex:function(e){return"0x"+parseInt(e.substr(1)).toString(16)},hexToPound:function(e){return"#"+e.substr(2)},valueToPound:function(e){return"#"+e.toString(16)},hexToHsl:function(e){var t,r,i=this.hexToRgb(e),n=i.r,o=i.g,a=i.b,s=Math.max(n,o,a),u=Math.min(n,o,a),c=(s+u)/2;if(s===u)t=r=0;else{var l=s-u;switch(r=.5<c?l/(2-s-u):l/(s+u),s){case n:t=(o-a)/l+(o<a?6:0);break;case o:t=(a-n)/l+2;break;case a:t=(n-o)/l+4}t/=6}return{h:t,s:r,l:c}},hslToHex:function(e){var t,r,i,n,o,a;function s(e,t,r){return r<0&&(r+=1),1<r&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(a=1===arguments.length?(n=e.h,o=e.s,e.l):(n=e,o=arguments[1],arguments[2]),0===o)t=r=i=a;else{var u=a<.5?a*(1+o):a+o-a*o,c=2*a-u;t=s(c,u,n+1/3),r=s(c,u,n),i=s(c,u,n-1/3)}return this.rgbToHex(255*t,255*r,255*i)},hexToRgb:function(e){if(0===e)e="0x000000";else if("string"!=typeof e){var t="000000"+e.toString(16);e="0x"+t.substr(t.length-6)}var r=/^0x?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return r?{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)}:null},rgbToHex:function(e,t,r){if(1===arguments.length)if(Array.isArray(e)){var i=e;e=i[0],t=i[1],r=i[2]}else{var n=e.replace(/( *rgb *\( *)|( )|(\) *;?)/,"").split(",");e=n[0],t=n[1],r=n[2]}return"0x"+((1<<24)+(parseInt(e)<<16)+(parseInt(t)<<8)+parseInt(r)).toString(16).slice(1)},darken:function(e,t){return this.blend(t,e,0)},saturate:function(e,t){t=0===t?0:t||10;var r=this.hexToHsl(e);return r.s+=t/100,r.s=Math.min(1,Math.max(0,r.s)),this.hslToHex(r)},desaturate:function(e,t){t=0===t?0:t||10;var r=this.hexToHsl(e);return r.s-=t/100,r.s=Math.min(1,Math.max(0,r.s)),this.hslToHex(r)},blend:function(e,t,r){if(0===e)return t;if(1===e)return r;var i=1-e;return i*(t>>16)+e*(r>>16)<<16|i*(t>>8&255)+e*(r>>8&255)<<8|i*(255&t)+e*(255&r)},random:function(e,t){function r(){return s.range(e,t)}var i=s.pick([{r:1,g:1,b:1},{r:1,g:1,b:0},{r:1,g:0,b:1},{r:0,g:1,b:1},{r:1,g:0,b:0},{r:0,g:1,b:0},{r:0,g:0,b:1}]);return e=e||0,t=t||255,this.rgbToHex(i.r?r():0,i.g?r():0,i.b?r():0)},randomHSL:function(e,t,r,i,n,o){var a={h:s.range(e,t),s:s.range(r,i,!0),l:s.range(n,o,!0)};return this.hslToHex(a)},randomGoldenRatioHSL:function(e,t,r){for(var i=s.get(1,!0),n=[],o=0;o<e;o++)n.push(this.hslToHex(i,t,r)),i=(i+.618033988749895)%1;return n}}},{"yy-random":24}],24:[function(e,t,r){"use strict";var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();var n=e("seedrandom"),o=function(){function r(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),this.generator=Math.random}return i(r,[{key:"seed",value:function(e,t){t=t||{},this.generator=n[t.PRNG||"alea"](e,{state:t.state}),this.options=t}},{key:"save",value:function(){if(this.generator!==Math.random)return this.generator.state()}},{key:"restore",value:function(e){this.generator=n[this.options.PRNG||"alea"]("",{state:e})}},{key:"seedOld",value:function(t){this.generator=function(){var e=1e4*Math.sin(t++);return e-Math.floor(e)}}},{key:"separateSeed",value:function(e){var t=new r;return t.seed(e),t}},{key:"reset",value:function(){this.generator=Math.random}},{key:"get",value:function(e,t){var r=e<0?-1:1;e*=r;return(t?this.generator()*e:Math.floor(this.generator()*e))*r}},{key:"getHuge",value:function(){return this.get(Number.MAX_SAFE_INTEGER)}},{key:"middle",value:function(e,t,r){var i=t/2;return this.range(e-i,e+i,r)}},{key:"range",value:function(e,t,r){if(t===e)return t;if(r)return this.get(t-e,!0)+e;var i=void 0;return e<0&&0<t?i=-e+t+1:0===e&&0<t?i=t+1:e<0&&0===t?(i=e-1,e=1):i=e<0&&t<0?t-e-1:t-e+1,Math.floor(this.generator()*i)+e}},{key:"rangeMultiple",value:function(e,t,r,i){for(var n=[],o=0;o<r;o++)n.push(this.range(e,t,i));return n}},{key:"middleMultiple",value:function(e,t,r,i){for(var n=[],o=0;o<r;o++)n.push(e(e,t,i));return n}},{key:"sign",value:function(e){return e=e||.5,this.generator()<e?1:-1}},{key:"chance",value:function(e){return this.generator()<(e||.5)}},{key:"angle",value:function(){return this.get(2*Math.PI,!0)}},{key:"shuffle",value:function(e,t){if(t&&(e=e.slice()),0===e.length)return e;for(var r=e.length,i=void 0,n=void 0;0!==r;)n=this.get(r),i=e[r-=1],e[r]=e[n],e[n]=i;return e}},{key:"pick",value:function(e,t){if(t){var r=this.get(e.length),i=e[r];return e.splice(r,1),i}return e[this.get(e.length)]}},{key:"property",value:function(e){var t,r=0;for(var i in e)this.chance(1/++r)&&(t=i);return t}},{key:"set",value:function(e,t,r){var i,n=[],o=[];for(i=e;i<t;i++)o.push(i);for(i=0;i<r;i++){var a=this.get(o.length);n.push(o[a]),o.splice(a,1)}return n}},{key:"distribution",value:function(e,t,r,i,n,o){var a=Math.floor((t-e)/r),s=a/2,u=a/4,c=[];i&&c.push(e);for(var l=0;l<r;l++)c.push(e+l*a+s+this.range(-u,u,o));return n&&c.push(t),c}},{key:"weightedProbabilityInt",value:function(e,t,r,i){function n(){for(var e=void 0,t=void 0,r=void 0;1<=(r=(e=2*this.get(1,!0)-1)*e+(t=2*this.get(1,!0)-1)*t)||0===r;);return e*Math.sqrt(-2*Math.log(r)/r)}if(i=i||1,!(Math.random()<.81546))return this.range(e,t);for(;;){var o=n()*i+r;if(e<=o&&o<=t)return o}}},{key:"color",value:function(){return this.get(16777215)}}]),r}();t.exports=new o},{seedrandom:14}],25:[function(e,t,r){},{}]},{},[3]),function o(a,s,u){function c(r,e){if(!s[r]){if(!a[r]){var t="function"==typeof require&&require;if(!e&&t)return t(r,!0);if(l)return l(r,!0);var i=new Error("Cannot find module '"+r+"'");throw i.code="MODULE_NOT_FOUND",i}var n=s[r]={exports:{}};a[r][0].call(n.exports,function(e){var t=a[r][1][e];return c(t||e)},n,n.exports,o,a,s,u)}return s[r].exports}for(var l="function"==typeof require&&require,e=0;e<u.length;e++)c(u[e]);return c}({1:[function(e,t,r){"use strict";var n=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();var o=e("./utils"),a=e("./plugin");t.exports=function(e){function i(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e));return t=t||{},r.time=t.time||150,r.ease=o.ease(t.ease,"easeInOutSine"),r.friction=t.friction||.5,t.sides=t.sides||"all",t.sides&&("all"===t.sides?r.top=r.bottom=r.left=r.right=!0:"horizontal"===t.sides?r.right=r.left=!0:"vertical"===t.sides?r.top=r.bottom=!0:(r.top=-1!==t.sides.indexOf("top"),r.bottom=-1!==t.sides.indexOf("bottom"),r.left=-1!==t.sides.indexOf("left"),r.right=-1!==t.sides.indexOf("right"))),r.parseUnderflow(t.underflow||"center"),r.last={},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,a),n(i,[{key:"parseUnderflow",value:function(e){"center"===(e=e.toLowerCase())?(this.underflowX=0,this.underflowY=0):(this.underflowX=-1!==e.indexOf("left")?-1:-1!==e.indexOf("right")?1:0,this.underflowY=-1!==e.indexOf("top")?-1:-1!==e.indexOf("bottom")?1:0)}},{key:"down",value:function(){this.toX=this.toY=null}},{key:"up",value:function(){this.bounce()}},{key:"update",value:function(e){if(!this.paused){if(this.bounce(),this.toX){var t=this.toX;t.time+=e,this.parent.emit("moved",{viewport:this.parent,type:"bounce-x"}),t.time>=this.time?(this.parent.x=t.end,this.toX=null,this.parent.emit("bounce-x-end",this.parent)):this.parent.x=this.ease(t.time,t.start,t.delta,this.time),this.parent.dirty=!0}if(this.toY){var r=this.toY;r.time+=e,this.parent.emit("moved",{viewport:this.parent,type:"bounce-y"}),r.time>=this.time?(this.parent.y=r.end,this.toY=null,this.parent.emit("bounce-y-end",this.parent)):this.parent.y=this.ease(r.time,r.start,r.delta,this.time),this.parent.dirty=!0}}}},{key:"calcUnderflowX",value:function(){var e=void 0;switch(this.underflowX){case-1:e=0;break;case 1:e=this.parent.screenWidth-this.parent.screenWorldWidth;break;default:e=(this.parent.screenWidth-this.parent.screenWorldWidth)/2}return e}},{key:"calcUnderflowY",value:function(){var e=void 0;switch(this.underflowY){case-1:e=0;break;case 1:e=this.parent.screenHeight-this.parent.screenWorldHeight;break;default:e=(this.parent.screenHeight-this.parent.screenWorldHeight)/2}return e}},{key:"bounce",value:function(){if(!this.paused){var e=void 0,t=this.parent.plugins.decelerate;t&&(t.x||t.y)&&(t.x&&t.percentChangeX===t.friction||t.y&&t.percentChangeY===t.friction)&&(((e=this.parent.OOB()).left&&this.left||e.right&&this.right)&&(t.percentChangeX=this.friction),(e.top&&this.top||e.bottom&&this.bottom)&&(t.percentChangeY=this.friction));var r=this.parent.plugins.drag||{},i=this.parent.plugins.pinch||{};if(t=t||{},!(r.active||i.active||this.toX&&this.toY||t.x&&t.y)){var n=(e=e||this.parent.OOB()).cornerPoint;if(!this.toX&&!t.x){var o=null;e.left&&this.left?o=this.parent.screenWorldWidth<this.parent.screenWidth?this.calcUnderflowX():0:e.right&&this.right&&(o=this.parent.screenWorldWidth<this.parent.screenWidth?this.calcUnderflowX():-n.x),null!==o&&this.parent.x!==o&&(this.toX={time:0,start:this.parent.x,delta:o-this.parent.x,end:o},this.parent.emit("bounce-x-start",this.parent))}if(!this.toY&&!t.y){var a=null;e.top&&this.top?a=this.parent.screenWorldHeight<this.parent.screenHeight?this.calcUnderflowY():0:e.bottom&&this.bottom&&(a=this.parent.screenWorldHeight<this.parent.screenHeight?this.calcUnderflowY():-n.y),null!==a&&this.parent.y!==a&&(this.toY={time:0,start:this.parent.y,delta:a-this.parent.y,end:a},this.parent.emit("bounce-y-start",this.parent))}}}}},{key:"reset",value:function(){this.toX=this.toY=null}}]),i}()},{"./plugin":9,"./utils":12}],2:[function(e,t,r){"use strict";var n=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();var o=e("./plugin");t.exports=function(e){function i(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e));return r.minWidth=t.minWidth,r.minHeight=t.minHeight,r.maxWidth=t.maxWidth,r.maxHeight=t.maxHeight,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,o),n(i,[{key:"resize",value:function(){this.clamp()}},{key:"clamp",value:function(){if(!this.paused){var e=this.parent.worldScreenWidth,t=this.parent.worldScreenHeight;this.minWidth&&e<this.minWidth&&(this.parent.fitWidth(this.minWidth),e=this.parent.worldScreenWidth,t=this.parent.worldScreenHeight,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})),this.maxWidth&&e>this.maxWidth&&(this.parent.fitWidth(this.maxWidth),e=this.parent.worldScreenWidth,t=this.parent.worldScreenHeight,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})),this.minHeight&&t<this.minHeight&&(this.parent.fitHeight(this.minHeight),e=this.parent.worldScreenWidth,t=this.parent.worldScreenHeight,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})),this.maxHeight&&t>this.maxHeight&&(this.parent.fitHeight(this.maxHeight),this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"}))}}}]),i}()},{"./plugin":9}],3:[function(e,t,r){"use strict";var n=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();var o=e("./plugin"),a=e("./utils");t.exports=function(e){function i(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),t=t||{};var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e));return void 0===t.direction?(r.left=a.defaults(t.left,null),r.right=a.defaults(t.right,null),r.top=a.defaults(t.top,null),r.bottom=a.defaults(t.bottom,null)):(r.left="x"===t.direction||"all"===t.direction,r.right="x"===t.direction||"all"===t.direction,r.top="y"===t.direction||"all"===t.direction,r.bottom="y"===t.direction||"all"===t.direction),r.parseUnderflow(t.underflow||"center"),r.move(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,o),n(i,[{key:"parseUnderflow",value:function(e){"center"===(e=e.toLowerCase())?(this.underflowX=0,this.underflowY=0):(this.underflowX=-1!==e.indexOf("left")?-1:-1!==e.indexOf("right")?1:0,this.underflowY=-1!==e.indexOf("top")?-1:-1!==e.indexOf("bottom")?1:0)}},{key:"move",value:function(){this.update()}},{key:"update",value:function(){if(!this.paused){var e=this.parent.plugins.decelerate||{};if(null!==this.left||null!==this.right){var t=void 0;if(this.parent.screenWorldWidth<this.parent.screenWidth)switch(this.underflowX){case-1:0!==this.parent.x&&(t=!(this.parent.x=0));break;case 1:this.parent.x!==this.parent.screenWidth-this.parent.screenWorldWidth&&(this.parent.x=this.parent.screenWidth-this.parent.screenWorldWidth,t=!0);break;default:this.parent.x!==(this.parent.screenWidth-this.parent.screenWorldWidth)/2&&(this.parent.x=(this.parent.screenWidth-this.parent.screenWorldWidth)/2,t=!0)}else null!==this.left&&this.parent.left<(!0===this.left?0:this.left)&&(this.parent.x=-(!0===this.left?0:this.left)*this.parent.scale.x,t=!(e.x=0)),null!==this.right&&this.parent.right>(!0===this.right?this.parent.worldWidth:this.right)&&(this.parent.x=-(!0===this.right?this.parent.worldWidth:this.right)*this.parent.scale.x+this.parent.screenWidth,t=!(e.x=0));t&&this.parent.emit("moved",{viewport:this.parent,type:"clamp-x"})}if(null!==this.top||null!==this.bottom){var r=void 0;if(this.parent.screenWorldHeight<this.parent.screenHeight)switch(this.underflowY){case-1:0!==this.parent.y&&(r=!(this.parent.y=0));break;case 1:this.parent.y!==this.parent.screenHeight-this.parent.screenWorldHeight&&(this.parent.y=this.parent.screenHeight-this.parent.screenWorldHeight,r=!0);break;default:this.parent.y!==(this.parent.screenHeight-this.parent.screenWorldHeight)/2&&(this.parent.y=(this.parent.screenHeight-this.parent.screenWorldHeight)/2,r=!0)}else null!==this.top&&this.parent.top<(!0===this.top?0:this.top)&&(this.parent.y=-(!0===this.top?0:this.top)*this.parent.scale.y,r=!(e.y=0)),null!==this.bottom&&this.parent.bottom>(!0===this.bottom?this.parent.worldHeight:this.bottom)&&(this.parent.y=-(!0===this.bottom?this.parent.worldHeight:this.bottom)*this.parent.scale.y+this.parent.screenHeight,r=!(e.y=0));r&&this.parent.emit("moved",{viewport:this.parent,type:"clamp-y"})}}}}]),i}()},{"./plugin":9,"./utils":12}],4:[function(e,t,r){"use strict";var n=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();e("./utils");var o=e("./plugin");t.exports=function(e){function i(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e));return t=t||{},r.friction=t.friction||.95,r.bounce=t.bounce||.5,r.minSpeed=void 0!==t.minSpeed?t.minSpeed:.01,r.saved=[],r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,o),n(i,[{key:"down",value:function(){this.saved=[],this.x=this.y=!1}},{key:"move",value:function(){if(!this.paused){var e=this.parent.countDownPointers();(1===e||1<e&&!this.parent.plugins.pinch)&&(this.saved.push({x:this.parent.x,y:this.parent.y,time:performance.now()}),60<this.saved.length&&this.saved.splice(0,30))}}},{key:"up",value:function(){if(0===this.parent.countDownPointers()&&this.saved.length){var e=performance.now(),t=!0,r=!1,i=void 0;try{for(var n,o=this.saved[Symbol.iterator]();!(t=(n=o.next()).done);t=!0){var a=n.value;if(a.time>=e-100){var s=e-a.time;this.x=(this.parent.x-a.x)/s,this.y=(this.parent.y-a.y)/s,this.percentChangeX=this.percentChangeY=this.friction;break}}}catch(e){r=!0,i=e}finally{try{!t&&o.return&&o.return()}finally{if(r)throw i}}}}},{key:"activate",value:function(e){void 0!==(e=e||{}).x&&(this.x=e.x,this.percentChangeX=this.friction),void 0!==e.y&&(this.y=e.y,this.percentChangeY=this.friction)}},{key:"update",value:function(e){if(!this.paused){var t=void 0;this.x&&(this.parent.x+=this.x*e,this.x*=this.percentChangeX,Math.abs(this.x)<this.minSpeed&&(this.x=0),t=!0),this.y&&(this.parent.y+=this.y*e,this.y*=this.percentChangeY,Math.abs(this.y)<this.minSpeed&&(this.y=0),t=!0),t&&(this.parent.dirty=!0,this.parent.emit("moved",{viewport:this.parent,type:"decelerate"}))}}},{key:"reset",value:function(){this.x=this.y=null}}]),i}()},{"./plugin":9,"./utils":12}],5:[function(e,t,r){"use strict";var n=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();var o=e("./utils"),a=e("./plugin");t.exports=function(e){function i(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),t=t||{};var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e));return r.moved=!1,r.wheelActive=o.defaults(t.wheel,!0),r.wheelScroll=t.wheelScroll||1,r.reverse=t.reverse?1:-1,r.clampWheel=t.clampWheel,r.xDirection=!t.direction||"all"===t.direction||"x"===t.direction,r.yDirection=!t.direction||"all"===t.direction||"y"===t.direction,r.parseUnderflow(t.underflow||"center"),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,a),n(i,[{key:"parseUnderflow",value:function(e){"center"===(e=e.toLowerCase())?(this.underflowX=0,this.underflowY=0):(this.underflowX=-1!==e.indexOf("left")?-1:-1!==e.indexOf("right")?1:0,this.underflowY=-1!==e.indexOf("top")?-1:-1!==e.indexOf("bottom")?1:0)}},{key:"down",value:function(e){if(!this.paused){var t=this.parent.countDownPointers();if((1===t||1<t&&!this.parent.plugins.pinch)&&this.parent.parent){var r=this.parent.parent.toLocal(e.data.global);this.last={x:e.data.global.x,y:e.data.global.y,parent:r},this.current=e.data.pointerId}else this.last=null}}},{key:"move",value:function(e){if(!this.paused&&this.last&&this.current===e.data.pointerId){var t=e.data.global.x,r=e.data.global.y,i=this.parent.countDownPointers();if(1===i||1<i&&!this.parent.plugins.pinch){var n=t-this.last.x,o=r-this.last.y;if(this.moved||this.xDirection&&this.parent.checkThreshold(n)||this.yDirection&&this.parent.checkThreshold(o)){var a=this.parent.parent.toLocal(e.data.global);this.xDirection&&(this.parent.x+=a.x-this.last.parent.x),this.yDirection&&(this.parent.y+=a.y-this.last.parent.y),this.last={x:t,y:r,parent:a},this.moved||this.parent.emit("drag-start",{screen:this.last,world:this.parent.toWorld(this.last),viewport:this.parent}),this.moved=!0,this.parent.dirty=!0,this.parent.emit("moved",{viewport:this.parent,type:"drag"})}}else this.moved=!1}}},{key:"up",value:function(){var e=this.parent.getTouchPointers();if(1===e.length){var t=e[0];if(t.last){var r=this.parent.parent.toLocal(t.last);this.last={x:t.last.x,y:t.last.y,parent:r},this.current=t.last.data.pointerId}this.moved=!1}else this.last&&this.moved&&(this.parent.emit("drag-end",{screen:this.last,world:this.parent.toWorld(this.last),viewport:this.parent}),this.last=this.moved=!1)}},{key:"wheel",value:function(e){if(!this.paused&&this.wheelActive){var t=this.parent.plugins.wheel;if(!t)return this.parent.x+=e.deltaX*this.wheelScroll*this.reverse,this.parent.y+=e.deltaY*this.wheelScroll*this.reverse,this.clampWheel&&this.clamp(),this.parent.emit("wheel-scroll",this.parent),this.parent.emit("moved",this.parent),this.parent.dirty=!0,e.preventDefault(),!0}}},{key:"resume",value:function(){this.last=null,this.paused=!1}},{key:"clamp",value:function(){var e=this.parent.plugins.decelerate||{};if("y"!==this.clampWheel)if(this.parent.screenWorldWidth<this.parent.screenWidth)switch(this.underflowX){case-1:this.parent.x=0;break;case 1:this.parent.x=this.parent.screenWidth-this.parent.screenWorldWidth;break;default:this.parent.x=(this.parent.screenWidth-this.parent.screenWorldWidth)/2}else this.parent.left<0?(this.parent.x=0,e.x=0):this.parent.right>this.parent.worldWidth&&(this.parent.x=-this.parent.worldWidth*this.parent.scale.x+this.parent.screenWidth,e.x=0);if("x"!==this.clampWheel)if(this.parent.screenWorldHeight<this.parent.screenHeight)switch(this.underflowY){case-1:this.parent.y=0;break;case 1:this.parent.y=this.parent.screenHeight-this.parent.screenWorldHeight;break;default:this.parent.y=(this.parent.screenHeight-this.parent.screenWorldHeight)/2}else this.parent.top<0&&(this.parent.y=0,e.y=0),this.parent.bottom>this.parent.worldHeight&&(this.parent.y=-this.parent.worldHeight*this.parent.scale.y+this.parent.screenHeight,e.y=0)}},{key:"active",get:function(){return this.moved}}]),i}()},{"./plugin":9,"./utils":12}],6:[function(e,t,r){"use strict";var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();var o=e("./plugin");t.exports=function(e){function n(e,t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return r=r||{},i.speed=r.speed||0,i.target=t,i.radius=r.radius,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,o),i(n,[{key:"update",value:function(){if(!this.paused){var e=this.parent.center,t=this.target.x,r=this.target.y;if(this.radius){if(!(Math.sqrt(Math.pow(this.target.y-e.y,2)+Math.pow(this.target.x-e.x,2))>this.radius))return;var i=Math.atan2(this.target.y-e.y,this.target.x-e.x);t=this.target.x-Math.cos(i)*this.radius,r=this.target.y-Math.sin(i)*this.radius}if(this.speed){var n=t-e.x,o=r-e.y;if(n||o){var a=Math.atan2(r-e.y,t-e.x),s=Math.cos(a)*this.speed,u=Math.sin(a)*this.speed,c=Math.abs(s)>Math.abs(n)?t:e.x+s,l=Math.abs(u)>Math.abs(o)?r:e.y+u;this.parent.moveCenter(c,l),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}}else this.parent.moveCenter(t,r),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}}}]),n}()},{"./plugin":9}],7:[function(e,t,r){"use strict";var n=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();var o=e("./utils"),a=e("./plugin");t.exports=function(e){function i(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e));return t=t||{},r.options=t,r.reverse=t.reverse?1:-1,r.noDecelerate=t.noDecelerate,r.linear=t.linear,r.radiusSquared=Math.pow(t.radius,2),r.resize(),r.speed=t.speed||8,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,a),n(i,[{key:"resize",value:function(){var e=this.options,t=e.distance;o.exists(t)?(this.left=t,this.top=t,this.right=window.innerWidth-t,this.bottom=window.innerHeight-t):this.radius||(this.left=o.exists(e.left)?e.left:null,this.top=o.exists(e.top)?e.top:null,this.right=o.exists(e.right)?window.innerWidth-e.right:null,this.bottom=o.exists(e.bottom)?window.innerHeight-e.bottom:null)}},{key:"down",value:function(){this.horizontal=this.vertical=null}},{key:"move",value:function(e){if("MOUSE"===e.data.identifier&&0===e.data.buttons){var t=e.data.global.x,r=e.data.global.y;if(this.radiusSquared){var i=this.parent.toScreen(this.parent.center);if(Math.pow(i.x-t,2)+Math.pow(i.y-r,2)>=this.radiusSquared){var n=Math.atan2(i.y-r,i.x-t);this.linear?(this.horizontal=Math.round(Math.cos(n))*this.speed*this.reverse*.06,this.vertical=Math.round(Math.sin(n))*this.speed*this.reverse*.06):(this.horizontal=Math.cos(n)*this.speed*this.reverse*.06,this.vertical=Math.sin(n)*this.speed*this.reverse*.06)}else this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=0}else o.exists(this.left)&&t<this.left?this.horizontal=1*this.reverse*this.speed*.06:o.exists(this.right)&&t>this.right?this.horizontal=-1*this.reverse*this.speed*.06:(this.decelerateHorizontal(),this.horizontal=0),o.exists(this.top)&&r<this.top?this.vertical=1*this.reverse*this.speed*.06:o.exists(this.bottom)&&r>this.bottom?this.vertical=-1*this.reverse*this.speed*.06:(this.decelerateVertical(),this.vertical=0)}}},{key:"decelerateHorizontal",value:function(){var e=this.parent.plugins.decelerate;this.horizontal&&e&&!this.noDecelerate&&e.activate({x:this.horizontal*this.speed*this.reverse/(1e3/60)})}},{key:"decelerateVertical",value:function(){var e=this.parent.plugins.decelerate;this.vertical&&e&&!this.noDecelerate&&e.activate({y:this.vertical*this.speed*this.reverse/(1e3/60)})}},{key:"up",value:function(){this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=null}},{key:"update",value:function(){if(!this.paused&&(this.horizontal||this.vertical)){var e=this.parent.center;this.horizontal&&(e.x+=this.horizontal*this.speed),this.vertical&&(e.y+=this.vertical*this.speed),this.parent.moveCenter(e),this.parent.emit("moved",{viewport:this.parent,type:"mouse-edges"})}}}]),i}()},{"./plugin":9,"./utils":12}],8:[function(e,t,r){"use strict";var n=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();var o=e("./plugin");t.exports=function(e){function i(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e));return t=t||{},r.percent=t.percent||1,r.noDrag=t.noDrag,r.center=t.center,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,o),n(i,[{key:"down",value:function(){2<=this.parent.countDownPointers()&&(this.active=!0)}},{key:"move",value:function(e){if(!this.paused&&this.active){var t=e.data.global.x,r=e.data.global.y,i=this.parent.getTouchPointers();if(2<=i.length){var n=i[0],o=i[1],a=n.last&&o.last?Math.sqrt(Math.pow(o.last.x-n.last.x,2)+Math.pow(o.last.y-n.last.y,2)):null;if(n.pointerId===e.data.pointerId?n.last={x:t,y:r,data:e.data}:o.pointerId===e.data.pointerId&&(o.last={x:t,y:r,data:e.data}),a){var s=void 0,u={x:n.last.x+(o.last.x-n.last.x)/2,y:n.last.y+(o.last.y-n.last.y)/2};this.center||(s=this.parent.toLocal(u));var c=(Math.sqrt(Math.pow(o.last.x-n.last.x,2)+Math.pow(o.last.y-n.last.y,2))-a)/this.parent.screenWidth*this.parent.scale.x*this.percent;this.parent.scale.x+=c,this.parent.scale.y+=c,this.parent.emit("zoomed",{viewport:this.parent,type:"pinch"});var l=this.parent.plugins["clamp-zoom"];if(l&&l.clamp(),this.center)this.parent.moveCenter(this.center);else{var f=this.parent.toGlobal(s);this.parent.x+=u.x-f.x,this.parent.y+=u.y-f.y,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})}!this.noDrag&&this.lastCenter&&(this.parent.x+=u.x-this.lastCenter.x,this.parent.y+=u.y-this.lastCenter.y,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})),this.lastCenter=u,this.moved=!0}else this.pinching||(this.parent.emit("pinch-start",this.parent),this.pinching=!0);this.parent.dirty=!0}}}},{key:"up",value:function(){this.pinching&&this.parent.touches.length<=1&&(this.active=!1,this.lastCenter=null,this.pinching=!1,this.moved=!1,this.parent.emit("pinch-end",this.parent))}}]),i}()},{"./plugin":9}],9:[function(e,t,r){"use strict";var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();t.exports=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.parent=e,this.paused=!1}return i(t,[{key:"down",value:function(){}},{key:"move",value:function(){}},{key:"up",value:function(){}},{key:"wheel",value:function(){}},{key:"update",value:function(){}},{key:"resize",value:function(){}},{key:"reset",value:function(){}},{key:"pause",value:function(){this.paused=!0}},{key:"resume",value:function(){this.paused=!1}}]),t}()},{}],10:[function(e,t,r){"use strict";var n=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();var o=e("./plugin"),a=e("./utils");t.exports=function(e){function i(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e));return t=t||{},r.width=t.width,r.height=t.height,0<r.width&&(r.x_scale=e._screenWidth/r.width),0<r.height&&(r.y_scale=e._screenHeight/r.height),r.xIndependent=a.exists(r.x_scale),r.yIndependent=a.exists(r.y_scale),r.x_scale=r.xIndependent?r.x_scale:r.y_scale,r.y_scale=r.yIndependent?r.y_scale:r.x_scale,r.time=a.defaults(t.time,1e3),r.ease=a.ease(t.ease,"easeInOutSine"),r.center=t.center,r.noMove=t.noMove,r.stopOnResize=t.stopOnResize,r.removeOnInterrupt=t.removeOnInterrupt,r.removeOnComplete=a.defaults(t.removeOnComplete,!0),r.interrupt=a.defaults(t.interrupt,!0),0===r.time?(e.container.scale.x=r.x_scale,e.container.scale.y=r.y_scale,r.removeOnComplete&&r.parent.removePlugin("snap-zoom")):t.forceStart&&r.createSnapping(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,o),n(i,[{key:"createSnapping",value:function(){var e=this.parent.scale;this.snapping={time:0,startX:e.x,startY:e.y,deltaX:this.x_scale-e.x,deltaY:this.y_scale-e.y},this.parent.emit("snap-zoom-start",this.parent)}},{key:"resize",value:function(){this.snapping=null,0<this.width&&(this.x_scale=this.parent._screenWidth/this.width),0<this.height&&(this.y_scale=this.parent._screenHeight/this.height),this.x_scale=this.xIndependent?this.x_scale:this.y_scale,this.y_scale=this.yIndependent?this.y_scale:this.x_scale}},{key:"reset",value:function(){this.snapping=null}},{key:"wheel",value:function(){this.removeOnInterrupt&&this.parent.removePlugin("snap-zoom")}},{key:"down",value:function(){this.removeOnInterrupt?this.parent.removePlugin("snap-zoom"):this.interrupt&&(this.snapping=null)}},{key:"update",value:function(e){if(!(this.paused||this.interrupt&&0!==this.parent.countDownPointers())){var t=void 0;if(this.center||this.noMove||(t=this.parent.center),this.snapping){if(this.snapping){var r=this.snapping;if(r.time+=e,r.time>=this.time)this.parent.scale.set(this.x_scale,this.y_scale),this.removeOnComplete&&this.parent.removePlugin("snap-zoom"),this.parent.emit("snap-zoom-end",this.parent),this.snapping=null;else{var i=this.snapping;this.parent.scale.x=this.ease(i.time,i.startX,i.deltaX,this.time),this.parent.scale.y=this.ease(i.time,i.startY,i.deltaY,this.time)}var n=this.parent.plugins["clamp-zoom"];n&&n.clamp(),this.noMove||(this.center?this.parent.moveCenter(this.center):this.parent.moveCenter(t))}}else this.parent.scale.x===this.x_scale&&this.parent.scale.y===this.y_scale||this.createSnapping()}}},{key:"resume",value:function(){this.snapping=null,function e(t,r,i){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,r);if(void 0===n){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,i)}if("value"in n)return n.value;var a=n.get;return void 0!==a?a.call(i):void 0}(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"resume",this).call(this)}}]),i}()},{"./plugin":9,"./utils":12}],11:[function(e,t,r){"use strict";var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();var n=e("./plugin"),a=e("./utils");t.exports=function(e){function o(e,t,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e));return i=i||{},n.friction=i.friction||.8,n.time=i.time||1e3,n.ease=a.ease(i.ease,"easeInOutSine"),n.x=t,n.y=r,n.topLeft=i.topLeft,n.interrupt=a.defaults(i.interrupt,!0),n.removeOnComplete=i.removeOnComplete,n.removeOnInterrupt=i.removeOnInterrupt,i.forceStart&&n.startEase(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,n),i(o,[{key:"snapStart",value:function(){this.percent=0,this.snapping={time:0};var e=this.topLeft?this.parent.corner:this.parent.center;this.deltaX=this.x-e.x,this.deltaY=this.y-e.y,this.startX=e.x,this.startY=e.y,this.parent.emit("snap-start",this.parent)}},{key:"wheel",value:function(){this.removeOnInterrupt&&this.parent.removePlugin("snap")}},{key:"down",value:function(){this.removeOnInterrupt?this.parent.removePlugin("snap"):this.interrupt&&(this.snapping=null)}},{key:"up",value:function(){if(0===this.parent.countDownPointers()){var e=this.parent.plugins.decelerate;e&&(e.x||e.y)&&(e.percentChangeX=e.percentChangeY=this.friction)}}},{key:"update",value:function(e){if(!(this.paused||this.interrupt&&0!==this.parent.countDownPointers()))if(this.snapping){var t=this.snapping;t.time+=e;var r=void 0,i=void 0,n=void 0;if(t.time>this.time)r=!0,i=this.startX+this.deltaX,n=this.startY+this.deltaY;else{var o=this.ease(t.time,0,1,this.time);i=this.startX+this.deltaX*o,n=this.startY+this.deltaY*o}this.topLeft?this.parent.moveCorner(i,n):this.parent.moveCenter(i,n),this.parent.emit("moved",{viewport:this.parent,type:"snap"}),r&&(this.removeOnComplete&&this.parent.removePlugin("snap"),this.parent.emit("snap-end",this.parent),this.snapping=null)}else{var a=this.topLeft?this.parent.corner:this.parent.center;a.x===this.x&&a.y===this.y||this.snapStart()}}}]),o}()},{"./plugin":9,"./utils":12}],12:[function(e,t,r){"use strict";var i=e("penner");function n(e){return null!=e}t.exports={exists:n,defaults:function(e,t){return null!=e?e:t},ease:function(e,t){return n(e)?"function"==typeof e?e:"string"==typeof e?i[e]:void 0:i[t]}}},{penner:15}],13:[function(e,t,r){"use strict";var i=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();var n=e("./utils"),o=e("./drag"),a=e("./pinch"),s=e("./clamp"),u=e("./clamp-zoom"),c=e("./decelerate"),l=e("./bounce"),f=e("./snap"),h=e("./snap-zoom"),d=e("./follow"),p=e("./wheel"),v=e("./mouse-edges"),m=["drag","pinch","wheel","follow","mouse-edges","decelerate","bounce","snap-zoom","clamp-zoom","snap","clamp"],b=function(e){function r(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),e=e||{};var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return t.plugins={},t.pluginsList=[],t._screenWidth=e.screenWidth,t._screenHeight=e.screenHeight,t._worldWidth=e.worldWidth,t._worldHeight=e.worldHeight,t.hitAreaFullScreen=n.defaults(e.hitAreaFullScreen,!0),t.forceHitArea=e.forceHitArea,t.threshold=n.defaults(e.threshold,5),t.interaction=e.interaction||null,t.div=e.divWheel||document.body,t.listeners(t.div),t.touches=[],t.ticker=e.ticker||PIXI.ticker.shared,t.tickerFunction=function(){return t.update()},t.ticker.add(t.tickerFunction),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,PIXI.Container),i(r,[{key:"removeListeners",value:function(){this.ticker.remove(this.tickerFunction),this.div.removeEventListener("wheel",this.wheelFunction)}},{key:"destroy",value:function(e){(function e(t,r,i){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,r);if(void 0===n){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,i)}if("value"in n)return n.value;var a=n.get;return void 0!==a?a.call(i):void 0})(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"destroy",this).call(this,e),this.removeListeners()}},{key:"update",value:function(){if(!this.pause){var e=!0,t=!1,r=void 0;try{for(var i,n=this.pluginsList[Symbol.iterator]();!(e=(i=n.next()).done);e=!0){i.value.update(this.ticker.elapsedMS)}}catch(e){t=!0,r=e}finally{try{!e&&n.return&&n.return()}finally{if(t)throw r}}}this.forceHitArea||(this.hitArea.x=this.left,this.hitArea.y=this.top,this.hitArea.width=this.worldScreenWidth,this.hitArea.height=this.worldScreenHeight)}},{key:"resize",value:function(e,t,r,i){this._screenWidth=e||window.innerWidth,this._screenHeight=t||window.innerHeight,this._worldWidth=r,this._worldHeight=i,this.resizePlugins()}},{key:"resizePlugins",value:function(){var e=!0,t=!1,r=void 0;try{for(var i,n=this.pluginsList[Symbol.iterator]();!(e=(i=n.next()).done);e=!0){i.value.resize()}}catch(e){t=!0,r=e}finally{try{!e&&n.return&&n.return()}finally{if(t)throw r}}}},{key:"listeners",value:function(e){var t=this;this.interactive=!0,this.forceHitArea||(this.hitArea=new PIXI.Rectangle(0,0,this.worldWidth,this.worldHeight)),this.on("pointerdown",this.down),this.on("pointermove",this.move),this.on("pointerup",this.up),this.on("pointerupoutside",this.up),this.on("pointercancel",this.up),this.on("pointerout",this.up),this.wheelFunction=function(e){return t.handleWheel(e)},e.addEventListener("wheel",this.wheelFunction),this.leftDown=!1}},{key:"down",value:function(e){if(!this.pause){if("mouse"===e.data.pointerType?0==e.data.originalEvent.button&&(this.leftDown=!0):this.touches.push(e.data.pointerId),1===this.countDownPointers()){this.last={x:e.data.global.x,y:e.data.global.y};var t=this.plugins.decelerate,r=this.plugins.bounce;t&&(t.x||t.y)||r&&(r.toX||r.toY)||(this.clickedAvailable=!0)}else this.clickedAvailable=!1;var i=!0,n=!1,o=void 0;try{for(var a,s=this.pluginsList[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){a.value.down(e)}}catch(e){n=!0,o=e}finally{try{!i&&s.return&&s.return()}finally{if(n)throw o}}}}},{key:"checkThreshold",value:function(e){return Math.abs(e)>=this.threshold}},{key:"move",value:function(e){if(!this.pause){var t=!0,r=!1,i=void 0;try{for(var n,o=this.pluginsList[Symbol.iterator]();!(t=(n=o.next()).done);t=!0){n.value.move(e)}}catch(e){r=!0,i=e}finally{try{!t&&o.return&&o.return()}finally{if(r)throw i}}if(this.clickedAvailable){var a=e.data.global.x-this.last.x,s=e.data.global.y-this.last.y;(this.checkThreshold(a)||this.checkThreshold(s))&&(this.clickedAvailable=!1)}}}},{key:"up",value:function(e){if(!this.pause){if(e.data.originalEvent instanceof MouseEvent&&0==e.data.originalEvent.button&&(this.leftDown=!1),"mouse"!==e.data.pointerType)for(var t=0;t<this.touches.length;t++)if(this.touches[t]===e.data.pointerId){this.touches.splice(t,1);break}var r=!0,i=!1,n=void 0;try{for(var o,a=this.pluginsList[Symbol.iterator]();!(r=(o=a.next()).done);r=!0){o.value.up(e)}}catch(e){i=!0,n=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw n}}this.clickedAvailable&&0===this.countDownPointers()&&(this.emit("clicked",{screen:this.last,world:this.toWorld(this.last),viewport:this}),this.clickedAvailable=!1)}}},{key:"getPointerPosition",value:function(e){var t=new PIXI.Point;return this.interaction?this.interaction.mapPositionToPoint(t,e.clientX,e.clientY):(t.x=e.clientX,t.y=e.clientY),t}},{key:"handleWheel",value:function(e){if(!this.pause){var t=this.toLocal(this.getPointerPosition(e));if(this.left<=t.x&&t.x<=this.right&&this.top<=t.y&&t.y<=this.bottom){var r=void 0,i=!0,n=!1,o=void 0;try{for(var a,s=this.pluginsList[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){a.value.wheel(e)&&(r=!0)}}catch(e){n=!0,o=e}finally{try{!i&&s.return&&s.return()}finally{if(n)throw o}}return r}}}},{key:"toWorld",value:function(){if(2!==arguments.length)return this.toLocal(arguments[0]);var e=arguments[0],t=arguments[1];return this.toLocal({x:e,y:t})}},{key:"toScreen",value:function(){if(2===arguments.length){var e=arguments[0],t=arguments[1];return this.toGlobal({x:e,y:t})}var r=arguments[0];return this.toGlobal(r)}},{key:"moveCenter",value:function(){var e=void 0,t=void 0;return t=isNaN(arguments[0])?(e=arguments[0].x,arguments[0].y):(e=arguments[0],arguments[1]),this.position.set((this.worldScreenWidth/2-e)*this.scale.x,(this.worldScreenHeight/2-t)*this.scale.y),this._reset(),this}},{key:"moveCorner",value:function(){return 1===arguments.length?this.position.set(-arguments[0].x*this.scale.x,-arguments[0].y*this.scale.y):this.position.set(-arguments[0]*this.scale.x,-arguments[1]*this.scale.y),this._reset(),this}},{key:"fitWidth",value:function(e,t){var r=void 0;return t&&(r=this.center),e=e||this.worldWidth,this.scale.x=this.screenWidth/e,this.scale.y=this.scale.x,t&&this.moveCenter(r),this}},{key:"fitHeight",value:function(e,t){var r=void 0;return t&&(r=this.center),e=e||this.worldHeight,this.scale.y=this.screenHeight/e,this.scale.x=this.scale.y,t&&this.moveCenter(r),this}},{key:"fitWorld",value:function(e){var t=void 0;return e&&(t=this.center),this.scale.x=this._screenWidth/this._worldWidth,this.scale.y=this._screenHeight/this._worldHeight,this.scale.x<this.scale.y?this.scale.y=this.scale.x:this.scale.x=this.scale.y,e&&this.moveCenter(t),this}},{key:"fit",value:function(e,t,r){var i=void 0;return e&&(i=this.center),t=t||this.worldWidth,r=r||this.worldHeight,this.scale.x=this.screenWidth/t,this.scale.y=this.screenHeight/r,this.scale.x<this.scale.y?this.scale.y=this.scale.x:this.scale.x=this.scale.y,e&&this.moveCenter(i),this}},{key:"zoomPercent",value:function(e,t){var r=void 0;t&&(r=this.center);var i=this.scale.x+this.scale.x*e;return this.scale.set(i),t&&this.moveCenter(r),this}},{key:"zoom",value:function(e,t){return this.fitWidth(e+this.worldScreenWidth,t),this}},{key:"snapZoom",value:function(e){return this.plugins["snap-zoom"]=new h(this,e),this.pluginsSort(),this}},{key:"OOB",value:function(){var e={};return e.left=this.left<0,e.right=this.right>this._worldWidth,e.top=this.top<0,e.bottom=this.bottom>this._worldHeight,e.cornerPoint={x:this._worldWidth*this.scale.x-this._screenWidth,y:this._worldHeight*this.scale.y-this._screenHeight},e}},{key:"countDownPointers",value:function(){return(this.leftDown?1:0)+this.touches.length}},{key:"getTouchPointers",value:function(){var e=[],t=this.trackedPointers;for(var r in t){var i=t[r];-1!==this.touches.indexOf(i.pointerId)&&e.push(i)}return e}},{key:"getPointers",value:function(){var e=[],t=this.trackedPointers;for(var r in t)e.push(t[r]);return e}},{key:"_reset",value:function(){this.plugins.bounce&&(this.plugins.bounce.reset(),this.plugins.bounce.bounce()),this.plugins.decelerate&&this.plugins.decelerate.reset(),this.plugins.snap&&this.plugins.snap.reset(),this.plugins.clamp&&this.plugins.clamp.update(),this.plugins["clamp-zoom"]&&this.plugins["clamp-zoom"].clamp(),this.dirty=!0}},{key:"removePlugin",value:function(e){this.plugins[e]&&(this.plugins[e]=null,this.emit(e+"-remove"),this.pluginsSort())}},{key:"pausePlugin",value:function(e){this.plugins[e]&&this.plugins[e].pause()}},{key:"resumePlugin",value:function(e){this.plugins[e]&&this.plugins[e].resume()}},{key:"pluginsSort",value:function(){var e=!0,t=!(this.pluginsList=[]),r=void 0;try{for(var i,n=m[Symbol.iterator]();!(e=(i=n.next()).done);e=!0){var o=i.value;this.plugins[o]&&this.pluginsList.push(this.plugins[o])}}catch(e){t=!0,r=e}finally{try{!e&&n.return&&n.return()}finally{if(t)throw r}}}},{key:"drag",value:function(e){return this.plugins.drag=new o(this,e),this.pluginsSort(),this}},{key:"clamp",value:function(e){return this.plugins.clamp=new s(this,e),this.pluginsSort(),this}},{key:"decelerate",value:function(e){return this.plugins.decelerate=new c(this,e),this.pluginsSort(),this}},{key:"bounce",value:function(e){return this.plugins.bounce=new l(this,e),this.pluginsSort(),this}},{key:"pinch",value:function(e){return this.plugins.pinch=new a(this,e),this.pluginsSort(),this}},{key:"snap",value:function(e,t,r){return this.plugins.snap=new f(this,e,t,r),this.pluginsSort(),this}},{key:"follow",value:function(e,t){return this.plugins.follow=new d(this,e,t),this.pluginsSort(),this}},{key:"wheel",value:function(e){return this.plugins.wheel=new p(this,e),this.pluginsSort(),this}},{key:"clampZoom",value:function(e){return this.plugins["clamp-zoom"]=new u(this,e),this.pluginsSort(),this}},{key:"mouseEdges",value:function(e){return this.plugins["mouse-edges"]=new v(this,e),this.pluginsSort(),this}},{key:"screenWidth",get:function(){return this._screenWidth},set:function(e){this._screenWidth=e}},{key:"screenHeight",get:function(){return this._screenHeight},set:function(e){this._screenHeight=e}},{key:"worldWidth",get:function(){return this._worldWidth?this._worldWidth:this.width},set:function(e){this._worldWidth=e,this.resizePlugins()}},{key:"worldHeight",get:function(){return this._worldHeight?this._worldHeight:this.height},set:function(e){this._worldHeight=e,this.resizePlugins()}},{key:"worldScreenWidth",get:function(){return this._screenWidth/this.scale.x}},{key:"worldScreenHeight",get:function(){return this._screenHeight/this.scale.y}},{key:"screenWorldWidth",get:function(){return this._worldWidth*this.scale.x}},{key:"screenWorldHeight",get:function(){return this._worldHeight*this.scale.y}},{key:"center",get:function(){return{x:this.worldScreenWidth/2-this.x/this.scale.x,y:this.worldScreenHeight/2-this.y/this.scale.y}},set:function(e){this.moveCenter(e)}},{key:"corner",get:function(){return{x:-this.x/this.scale.x,y:-this.y/this.scale.y}},set:function(e){this.moveCorner(e)}},{key:"right",get:function(){return-this.x/this.scale.x+this.worldScreenWidth},set:function(e){this.x=-e*this.scale.x+this.screenWidth,this._reset()}},{key:"left",get:function(){return-this.x/this.scale.x},set:function(e){this.x=-e*this.scale.x,this._reset()}},{key:"top",get:function(){return-this.y/this.scale.y},set:function(e){this.y=-e*this.scale.y,this._reset()}},{key:"bottom",get:function(){return-this.y/this.scale.y+this.worldScreenHeight},set:function(e){this.y=-e*this.scale.y+this.screenHeight,this._reset()}},{key:"dirty",get:function(){return this._dirty},set:function(e){this._dirty=e}},{key:"forceHitArea",get:function(){return this._forceHitArea},set:function(e){e?(this._forceHitArea=e,this.hitArea=e):(this._forceHitArea=!1,this.hitArea=new PIXI.Rectangle(0,0,this.worldWidth,this.worldHeight))}},{key:"pause",get:function(){return this._pause},set:function(e){(this._pause=e)&&(this.touches=[],this.leftDown=!1)}}]),r}();PIXI.extras.Viewport=b,t.exports=b},{"./bounce":1,"./clamp":3,"./clamp-zoom":2,"./decelerate":4,"./drag":5,"./follow":6,"./mouse-edges":7,"./pinch":8,"./snap":11,"./snap-zoom":10,"./utils":12,"./wheel":14}],14:[function(e,t,r){"use strict";var n=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();var o=e("./plugin");t.exports=function(e){function i(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e));return t=t||{},r.percent=t.percent||.1,r.center=t.center,r.reverse=t.reverse,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,o),n(i,[{key:"wheel",value:function(e){if(!this.paused){var t=void 0;t=this.reverse?0<e.deltaY?1+this.percent:1-this.percent:0<e.deltaY?1-this.percent:1+this.percent;var r=this.parent.getPointerPosition(e),i=void 0;this.center||(i=this.parent.toLocal(r)),this.parent.scale.x*=t,this.parent.scale.y*=t,this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});var n=this.parent.plugins["clamp-zoom"];if(n&&n.clamp(),this.center)this.parent.moveCenter(this.center);else{var o=this.parent.toGlobal(i);this.parent.x+=r.x-o.x,this.parent.y+=r.y-o.y}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel",{wheel:{dx:e.deltaX,dy:e.deltaY,dz:e.deltaZ},event:e,viewport:this.parent}),e.preventDefault()}}}]),i}()},{"./plugin":9}],15:[function(e,t,r){(function(){var n;(function(e){"object"==typeof r?t.exports=e:"function"==typeof define&&define.amd?define([],e):this.penner=e})(n={linear:function(e,t,r,i){return r*e/i+t},easeInQuad:function(e,t,r,i){return r*(e/=i)*e+t},easeOutQuad:function(e,t,r,i){return-r*(e/=i)*(e-2)+t},easeInOutQuad:function(e,t,r,i){return(e/=i/2)<1?r/2*e*e+t:-r/2*(--e*(e-2)-1)+t},easeInCubic:function(e,t,r,i){return r*(e/=i)*e*e+t},easeOutCubic:function(e,t,r,i){return r*((e=e/i-1)*e*e+1)+t},easeInOutCubic:function(e,t,r,i){return(e/=i/2)<1?r/2*e*e*e+t:r/2*((e-=2)*e*e+2)+t},easeInQuart:function(e,t,r,i){return r*(e/=i)*e*e*e+t},easeOutQuart:function(e,t,r,i){return-r*((e=e/i-1)*e*e*e-1)+t},easeInOutQuart:function(e,t,r,i){return(e/=i/2)<1?r/2*e*e*e*e+t:-r/2*((e-=2)*e*e*e-2)+t},easeInQuint:function(e,t,r,i){return r*(e/=i)*e*e*e*e+t},easeOutQuint:function(e,t,r,i){return r*((e=e/i-1)*e*e*e*e+1)+t},easeInOutQuint:function(e,t,r,i){return(e/=i/2)<1?r/2*e*e*e*e*e+t:r/2*((e-=2)*e*e*e*e+2)+t},easeInSine:function(e,t,r,i){return-r*Math.cos(e/i*(Math.PI/2))+r+t},easeOutSine:function(e,t,r,i){return r*Math.sin(e/i*(Math.PI/2))+t},easeInOutSine:function(e,t,r,i){return-r/2*(Math.cos(Math.PI*e/i)-1)+t},easeInExpo:function(e,t,r,i){return 0===e?t:r*Math.pow(2,10*(e/i-1))+t},easeOutExpo:function(e,t,r,i){return e===i?t+r:r*(1-Math.pow(2,-10*e/i))+t},easeInOutExpo:function(e,t,r,i){return(e/=i/2)<1?r/2*Math.pow(2,10*(e-1))+t:r/2*(2-Math.pow(2,-10*--e))+t},easeInCirc:function(e,t,r,i){return-r*(Math.sqrt(1-(e/=i)*e)-1)+t},easeOutCirc:function(e,t,r,i){return r*Math.sqrt(1-(e=e/i-1)*e)+t},easeInOutCirc:function(e,t,r,i){return(e/=i/2)<1?-r/2*(Math.sqrt(1-e*e)-1)+t:r/2*(Math.sqrt(1-(e-=2)*e)+1)+t},easeInElastic:function(e,t,r,i){var n,o,a;return a=1.70158,(o=0)===e||(e/=i),o||(o=.3*i),a=(n=r)<Math.abs(r)?(n=r,o/4):o/(2*Math.PI)*Math.asin(r/n),-n*Math.pow(2,10*(e-=1))*Math.sin((e*i-a)*(2*Math.PI)/o)+t},easeOutElastic:function(e,t,r,i){var n,o,a;return a=1.70158,(o=0)===e||(e/=i),o||(o=.3*i),a=(n=r)<Math.abs(r)?(n=r,o/4):o/(2*Math.PI)*Math.asin(r/n),n*Math.pow(2,-10*e)*Math.sin((e*i-a)*(2*Math.PI)/o)+r+t},easeInOutElastic:function(e,t,r,i){var n,o,a;return a=1.70158,(o=0)===e||(e/=i/2),o||(o=i*(.3*1.5)),a=(n=r)<Math.abs(r)?(n=r,o/4):o/(2*Math.PI)*Math.asin(r/n),e<1?n*Math.pow(2,10*(e-=1))*Math.sin((e*i-a)*(2*Math.PI)/o)*-.5+t:n*Math.pow(2,-10*(e-=1))*Math.sin((e*i-a)*(2*Math.PI)/o)*.5+r+t},easeInBack:function(e,t,r,i,n){return void 0===n&&(n=1.70158),r*(e/=i)*e*((n+1)*e-n)+t},easeOutBack:function(e,t,r,i,n){return void 0===n&&(n=1.70158),r*((e=e/i-1)*e*((n+1)*e+n)+1)+t},easeInOutBack:function(e,t,r,i,n){return void 0===n&&(n=1.70158),(e/=i/2)<1?r/2*(e*e*((1+(n*=1.525))*e-n))+t:r/2*((e-=2)*e*((1+(n*=1.525))*e+n)+2)+t},easeInBounce:function(e,t,r,i){return r-n.easeOutBounce(i-e,0,r,i)+t},easeOutBounce:function(e,t,r,i){return(e/=i)<1/2.75?r*(7.5625*e*e)+t:e<2/2.75?r*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?r*(7.5625*(e-=2.25/2.75)*e+.9375)+t:r*(7.5625*(e-=2.625/2.75)*e+.984375)+t},easeInOutBounce:function(e,t,r,i){return e<i/2?.5*n.easeInBounce(2*e,0,r,i)+t:.5*n.easeOutBounce(2*e-i,0,r,i)+.5*r+t}})}).call(this)},{}]},{},[13]),function(){"use strict";var f="undefined"==typeof WebKitCSSMatrix?new DOMMatrix:new WebKitCSSMatrix;function h(e,t,r){this.x=e,this.y=t,this.z=r}function d(t){try{return"undefined"==typeof WebKitCSSMatrix?new DOMMatrix(t):new WebKitCSSMatrix(t)}catch(e){return console.warn(t),console.warn(e.toString()),f}}function i(e){for(var t=f,r=e;null!=r&&r!==r.ownerDocument.documentElement;){var i=window.getComputedStyle(r,void 0).transform||"none";t=("none"===i?f:d(i)).multiply(t),r=r.parentNode}for(var n=e.offsetWidth,o=e.offsetHeight,a=4,s=1/0,u=1/0;0<=--a;){var c=new h(0===a||1===a?0:n,0===a||3===a?0:o,0).transformBy(t);c.x<s&&(s=c.x),c.y<u&&(u=c.y)}var l=e.getBoundingClientRect();return t=f.translate(window.pageXOffset+l.left-s,window.pageYOffset+l.top-u,0).multiply(t)}h.prototype.transformBy=function(e){var t=e.multiply(f.translate(this.x,this.y,this.z));return new h(t.m41,t.m42,t.m43)},window.convertPointFromPageToNode=function(e,t,r){return new h(t,r,0).transformBy(i(e).inverse())},window.convertPointFromNodeToPage=function(e,t,r){return new h(t,r,0).transformBy(i(e))}}();