!function(A,g){"object"==typeof exports&&"object"==typeof module?module.exports=g():"function"==typeof define&&define.amd?define([],g):"object"==typeof exports?exports.milkdropPresetConverterAWS=g():A.milkdropPresetConverterAWS=g()}("undefined"!=typeof self?self:this,function(){return function(A){var g={};function I(B){if(g[B])return g[B].exports;var C=g[B]={i:B,l:!1,exports:{}};return A[B].call(C.exports,C,C.exports,I),C.l=!0,C.exports}return I.m=A,I.c=g,I.d=function(A,g,B){I.o(A,g)||Object.defineProperty(A,g,{configurable:!1,enumerable:!0,get:B})},I.n=function(A){var g=A&&A.__esModule?function(){return A.default}:function(){return A};return I.d(g,"a",g),g},I.o=function(A,g){return Object.prototype.hasOwnProperty.call(A,g)},I.p="",I(I.s=36)}([function(A,g){var I=A.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=I)},function(A,g,I){var B=I(27)("wks"),C=I(28),Q=I(0).Symbol,E="function"==typeof Q;(A.exports=function(A){return B[A]||(B[A]=E&&Q[A]||(E?Q:C)("Symbol."+A))}).store=B},function(A,g){var I=A.exports={version:"2.5.7"};"number"==typeof __e&&(__e=I)},function(A,g,I){var B=I(5);A.exports=function(A){if(!B(A))throw TypeError(A+" is not an object!");return A}},function(A,g,I){var B=I(11),C=I(25);A.exports=I(6)?function(A,g,I){return B.f(A,g,C(1,I))}:function(A,g,I){return A[g]=I,A}},function(A,g){A.exports=function(A){return"object"==typeof A?null!==A:"function"==typeof A}},function(A,g,I){A.exports=!I(24)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(A,g){A.exports={}},function(A,g,I){var B=I(0),C=I(2),Q=I(9),E=I(4),i=I(12),n=function(A,g,I){var t,o,e,r=A&n.F,a=A&n.G,l=A&n.S,u=A&n.P,c=A&n.B,s=A&n.W,h=a?C:C[g]||(C[g]={}),f=h.prototype,D=a?B:l?B[g]:(B[g]||{}).prototype;for(t in a&&(I=g),I)(o=!r&&D&&void 0!==D[t])&&i(h,t)||(e=o?D[t]:I[t],h[t]=a&&"function"!=typeof D[t]?I[t]:c&&o?Q(e,B):s&&D[t]==e?function(A){var g=function(g,I,B){if(this instanceof A){switch(arguments.length){case 0:return new A;case 1:return new A(g);case 2:return new A(g,I)}return new A(g,I,B)}return A.apply(this,arguments)};return g.prototype=A.prototype,g}(e):u&&"function"==typeof e?Q(Function.call,e):e,u&&((h.virtual||(h.virtual={}))[t]=e,A&n.R&&f&&!f[t]&&E(f,t,e)))};n.F=1,n.G=2,n.S=4,n.P=8,n.B=16,n.W=32,n.U=64,n.R=128,A.exports=n},function(A,g,I){var B=I(10);A.exports=function(A,g,I){if(B(A),void 0===g)return A;switch(I){case 1:return function(I){return A.call(g,I)};case 2:return function(I,B){return A.call(g,I,B)};case 3:return function(I,B,C){return A.call(g,I,B,C)}}return function(){return A.apply(g,arguments)}}},function(A,g){A.exports=function(A){if("function"!=typeof A)throw TypeError(A+" is not a function!");return A}},function(A,g,I){var B=I(3),C=I(44),Q=I(45),E=Object.defineProperty;g.f=I(6)?Object.defineProperty:function(A,g,I){if(B(A),g=Q(g,!0),B(I),C)try{return E(A,g,I)}catch(A){}if("get"in I||"set"in I)throw TypeError("Accessors not supported!");return"value"in I&&(A[g]=I.value),A}},function(A,g){var I={}.hasOwnProperty;A.exports=function(A,g){return I.call(A,g)}},function(A,g){var I={}.toString;A.exports=function(A){return I.call(A).slice(8,-1)}},function(A,g){var I=Math.ceil,B=Math.floor;A.exports=function(A){return isNaN(A=+A)?0:(A>0?B:I)(A)}},function(A,g){A.exports=function(A){if(void 0==A)throw TypeError("Can't call method on "+A);return A}},function(A,g){A.exports=!0},function(A,g,I){var B=I(5),C=I(0).document,Q=B(C)&&B(C.createElement);A.exports=function(A){return Q?C.createElement(A):{}}},function(A,g,I){var B=I(52),C=I(15);A.exports=function(A){return B(C(A))}},function(A,g,I){var B=I(27)("keys"),C=I(28);A.exports=function(A){return B[A]||(B[A]=C(A))}},function(A,g,I){var B=I(11).f,C=I(12),Q=I(1)("toStringTag");A.exports=function(A,g,I){A&&!C(A=I?A:A.prototype,Q)&&B(A,Q,{configurable:!0,value:g})}},function(A,g,I){"use strict";var B=I(10);A.exports.f=function(A){return new function(A){var g,I;this.promise=new A(function(A,B){if(void 0!==g||void 0!==I)throw TypeError("Bad Promise constructor");g=A,I=B}),this.resolve=B(g),this.reject=B(I)}(A)}},function(A,g,I){A.exports={default:I(40),__esModule:!0}},function(A,g,I){"use strict";var B=I(16),C=I(8),Q=I(46),E=I(4),i=I(7),n=I(47),t=I(20),o=I(55),e=I(1)("iterator"),r=!([].keys&&"next"in[].keys()),a=function(){return this};A.exports=function(A,g,I,l,u,c,s){n(I,g,l);var h,f,D,w=function(A){if(!r&&A in y)return y[A];switch(A){case"keys":case"values":return function(){return new I(this,A)}}return function(){return new I(this,A)}},G=g+" Iterator",F="values"==u,Y=!1,y=A.prototype,d=y[e]||y["@@iterator"]||u&&y[u],R=d||w(u),N=u?F?w("entries"):R:void 0,U="Array"==g&&y.entries||d;if(U&&(D=o(U.call(new A)))!==Object.prototype&&D.next&&(t(D,G,!0),B||"function"==typeof D[e]||E(D,e,a)),F&&d&&"values"!==d.name&&(Y=!0,R=function(){return d.call(this)}),B&&!s||!r&&!Y&&y[e]||E(y,e,R),i[g]=R,i[G]=a,u)if(h={values:F?R:w("values"),keys:c?R:w("keys"),entries:N},s)for(f in h)f in y||Q(y,f,h[f]);else C(C.P+C.F*(r||Y),g,h);return h}},function(A,g){A.exports=function(A){try{return!!A()}catch(A){return!0}}},function(A,g){A.exports=function(A,g){return{enumerable:!(1&A),configurable:!(2&A),writable:!(4&A),value:g}}},function(A,g,I){var B=I(14),C=Math.min;A.exports=function(A){return A>0?C(B(A),9007199254740991):0}},function(A,g,I){var B=I(2),C=I(0),Q=C["__core-js_shared__"]||(C["__core-js_shared__"]={});(A.exports=function(A,g){return Q[A]||(Q[A]=void 0!==g?g:{})})("versions",[]).push({version:B.version,mode:I(16)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(A,g){var I=0,B=Math.random();A.exports=function(A){return"Symbol(".concat(void 0===A?"":A,")_",(++I+B).toString(36))}},function(A,g){A.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(A,g,I){var B=I(0).document;A.exports=B&&B.documentElement},function(A,g,I){var B=I(13),C=I(1)("toStringTag"),Q="Arguments"==B(function(){return arguments}());A.exports=function(A){var g,I,E;return void 0===A?"Undefined":null===A?"Null":"string"==typeof(I=function(A,g){try{return A[g]}catch(A){}}(g=Object(A),C))?I:Q?B(g):"Object"==(E=B(g))&&"function"==typeof g.callee?"Arguments":E}},function(A,g,I){var B=I(3),C=I(10),Q=I(1)("species");A.exports=function(A,g){var I,E=B(A).constructor;return void 0===E||void 0==(I=B(E)[Q])?g:C(I)}},function(A,g,I){var B,C,Q,E=I(9),i=I(67),n=I(30),t=I(17),o=I(0),e=o.process,r=o.setImmediate,a=o.clearImmediate,l=o.MessageChannel,u=o.Dispatch,c=0,s={},h=function(){var A=+this;if(s.hasOwnProperty(A)){var g=s[A];delete s[A],g()}},f=function(A){h.call(A.data)};r&&a||(r=function(A){for(var g=[],I=1;arguments.length>I;)g.push(arguments[I++]);return s[++c]=function(){i("function"==typeof A?A:Function(A),g)},B(c),c},a=function(A){delete s[A]},"process"==I(13)(e)?B=function(A){e.nextTick(E(h,A,1))}:u&&u.now?B=function(A){u.now(E(h,A,1))}:l?(Q=(C=new l).port2,C.port1.onmessage=f,B=E(Q.postMessage,Q,1)):o.addEventListener&&"function"==typeof postMessage&&!o.importScripts?(B=function(A){o.postMessage(A+"","*")},o.addEventListener("message",f,!1)):B="onreadystatechange"in t("script")?function(A){n.appendChild(t("script")).onreadystatechange=function(){n.removeChild(this),h.call(A)}}:function(A){setTimeout(E(h,A,1),0)}),A.exports={set:r,clear:a}},function(A,g){A.exports=function(A){try{return{e:!1,v:A()}}catch(A){return{e:!0,v:A}}}},function(A,g,I){var B=I(3),C=I(5),Q=I(21);A.exports=function(A,g){if(B(A),C(g)&&g.constructor===A)return g;var I=Q.f(A);return(0,I.resolve)(g),I.promise}},function(A,g,I){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.convertShader=g.convertPreset=void 0;var B=n(I(37)),C=n(I(22)),Q=n(I(75));g.convertPreset=function(){var A=(0,Q.default)(B.default.mark(function A(g){var I=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return B.default.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",new C.default(function(A,B){var C=new i.default;C.postMessage({method:"convertPreset",text:g,convertURL:I}),C.onmessage=function(g){A(g.data)},setTimeout(function(){return B(new Error("Preset conversion timed out"))},15e3)}));case 1:case"end":return A.stop()}},A,this)}));return function(g){return A.apply(this,arguments)}}(),g.convertShader=function(){var A=(0,Q.default)(B.default.mark(function A(g){var I=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return B.default.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",new C.default(function(A,B){var C=new i.default;C.postMessage({method:"convertShader",text:g,convertURL:I}),C.onmessage=function(g){Object.prototype.hasOwnProperty.call(g.data,"error")?B(new Error(g.data.error)):A(g.data)},setTimeout(function(){return B(new Error("Shader conversion timed out"))},15e3)}));case 1:case"end":return A.stop()}},A,this)}));return function(g){return A.apply(this,arguments)}}();g.convertPresetEquations=function(A,g,I,B){var C=E.default.convert_basic_preset(A,g,I,B);return{init_eqs_str:C.perFrameInitEQs?C.perFrameInitEQs.trim():"",frame_eqs_str:C.perFrameEQs?C.perFrameEQs.trim():"",pixel_eqs_str:C.perPixelEQs?C.perPixelEQs.trim():""}},g.convertWaveEquations=function(A,g,I,B){var C=E.default.make_wave_map(A,{init_eqs_str:g,frame_eqs_str:I,point_eqs_str:B});return{init_eqs_str:C.perFrameInitEQs?C.perFrameInitEQs.trim():"",frame_eqs_str:C.perFrameEQs?C.perFrameEQs.trim():"",point_eqs_str:C.perPointEQs?C.perPointEQs.trim():""}},g.convertShapeEquations=function(A,g,I){var B=E.default.make_shape_map(A,{init_eqs_str:g,frame_eqs_str:I});return{init_eqs_str:B.perFrameInitEQs?B.perFrameInitEQs.trim():"",frame_eqs_str:B.perFrameEQs?B.perFrameEQs.trim():""}};var E=n(I(76)),i=n(I(77));function n(A){return A&&A.__esModule?A:{default:A}}var t="https://p2tpeb5v8b.execute-api.us-east-2.amazonaws.com/default/milkdropShaderConverter"},function(A,g,I){A.exports=I(38)},function(A,g,I){var B=function(){return this}()||Function("return this")(),C=B.regeneratorRuntime&&Object.getOwnPropertyNames(B).indexOf("regeneratorRuntime")>=0,Q=C&&B.regeneratorRuntime;if(B.regeneratorRuntime=void 0,A.exports=I(39),C)B.regeneratorRuntime=Q;else try{delete B.regeneratorRuntime}catch(A){B.regeneratorRuntime=void 0}},function(A,g){!function(g){"use strict";var I,B=Object.prototype,C=B.hasOwnProperty,Q="function"==typeof Symbol?Symbol:{},E=Q.iterator||"@@iterator",i=Q.asyncIterator||"@@asyncIterator",n=Q.toStringTag||"@@toStringTag",t="object"==typeof A,o=g.regeneratorRuntime;if(o)t&&(A.exports=o);else{(o=g.regeneratorRuntime=t?A.exports:{}).wrap=D;var e="suspendedStart",r="suspendedYield",a="executing",l="completed",u={},c={};c[E]=function(){return this};var s=Object.getPrototypeOf,h=s&&s(s(k([])));h&&h!==B&&C.call(h,E)&&(c=h);var f=Y.prototype=G.prototype=Object.create(c);F.prototype=f.constructor=Y,Y.constructor=F,Y[n]=F.displayName="GeneratorFunction",o.isGeneratorFunction=function(A){var g="function"==typeof A&&A.constructor;return!!g&&(g===F||"GeneratorFunction"===(g.displayName||g.name))},o.mark=function(A){return Object.setPrototypeOf?Object.setPrototypeOf(A,Y):(A.__proto__=Y,n in A||(A[n]="GeneratorFunction")),A.prototype=Object.create(f),A},o.awrap=function(A){return{__await:A}},y(d.prototype),d.prototype[i]=function(){return this},o.AsyncIterator=d,o.async=function(A,g,I,B){var C=new d(D(A,g,I,B));return o.isGeneratorFunction(g)?C:C.next().then(function(A){return A.done?A.value:C.next()})},y(f),f[n]="Generator",f[E]=function(){return this},f.toString=function(){return"[object Generator]"},o.keys=function(A){var g=[];for(var I in A)g.push(I);return g.reverse(),function I(){for(;g.length;){var B=g.pop();if(B in A)return I.value=B,I.done=!1,I}return I.done=!0,I}},o.values=k,H.prototype={constructor:H,reset:function(A){if(this.prev=0,this.next=0,this.sent=this._sent=I,this.done=!1,this.delegate=null,this.method="next",this.arg=I,this.tryEntries.forEach(U),!A)for(var g in this)"t"===g.charAt(0)&&C.call(this,g)&&!isNaN(+g.slice(1))&&(this[g]=I)},stop:function(){this.done=!0;var A=this.tryEntries[0].completion;if("throw"===A.type)throw A.arg;return this.rval},dispatchException:function(A){if(this.done)throw A;var g=this;function B(B,C){return i.type="throw",i.arg=A,g.next=B,C&&(g.method="next",g.arg=I),!!C}for(var Q=this.tryEntries.length-1;Q>=0;--Q){var E=this.tryEntries[Q],i=E.completion;if("root"===E.tryLoc)return B("end");if(E.tryLoc<=this.prev){var n=C.call(E,"catchLoc"),t=C.call(E,"finallyLoc");if(n&&t){if(this.prev=0;--I){var B=this.tryEntries[I];if(B.tryLoc<=this.prev&&C.call(B,"finallyLoc")&&this.prev=0;--g){var I=this.tryEntries[g];if(I.finallyLoc===A)return this.complete(I.completion,I.afterLoc),U(I),u}},catch:function(A){for(var g=this.tryEntries.length-1;g>=0;--g){var I=this.tryEntries[g];if(I.tryLoc===A){var B=I.completion;if("throw"===B.type){var C=B.arg;U(I)}return C}}throw new Error("illegal catch attempt")},delegateYield:function(A,g,B){return this.delegate={iterator:k(A),resultName:g,nextLoc:B},"next"===this.method&&(this.arg=I),u}}}function D(A,g,I,B){var C=g&&g.prototype instanceof G?g:G,Q=Object.create(C.prototype),E=new H(B||[]);return Q._invoke=function(A,g,I){var B=e;return function(C,Q){if(B===a)throw new Error("Generator is already running");if(B===l){if("throw"===C)throw Q;return S()}for(I.method=C,I.arg=Q;;){var E=I.delegate;if(E){var i=R(E,I);if(i){if(i===u)continue;return i}}if("next"===I.method)I.sent=I._sent=I.arg;else if("throw"===I.method){if(B===e)throw B=l,I.arg;I.dispatchException(I.arg)}else"return"===I.method&&I.abrupt("return",I.arg);B=a;var n=w(A,g,I);if("normal"===n.type){if(B=I.done?l:r,n.arg===u)continue;return{value:n.arg,done:I.done}}"throw"===n.type&&(B=l,I.method="throw",I.arg=n.arg)}}}(A,I,E),Q}function w(A,g,I){try{return{type:"normal",arg:A.call(g,I)}}catch(A){return{type:"throw",arg:A}}}function G(){}function F(){}function Y(){}function y(A){["next","throw","return"].forEach(function(g){A[g]=function(A){return this._invoke(g,A)}})}function d(A){var g;this._invoke=function(I,B){function Q(){return new Promise(function(g,Q){!function g(I,B,Q,E){var i=w(A[I],A,B);if("throw"!==i.type){var n=i.arg,t=n.value;return t&&"object"==typeof t&&C.call(t,"__await")?Promise.resolve(t.__await).then(function(A){g("next",A,Q,E)},function(A){g("throw",A,Q,E)}):Promise.resolve(t).then(function(A){n.value=A,Q(n)},E)}E(i.arg)}(I,B,g,Q)})}return g=g?g.then(Q,Q):Q()}}function R(A,g){var B=A.iterator[g.method];if(B===I){if(g.delegate=null,"throw"===g.method){if(A.iterator.return&&(g.method="return",g.arg=I,R(A,g),"throw"===g.method))return u;g.method="throw",g.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var C=w(B,A.iterator,g.arg);if("throw"===C.type)return g.method="throw",g.arg=C.arg,g.delegate=null,u;var Q=C.arg;return Q?Q.done?(g[A.resultName]=Q.value,g.next=A.nextLoc,"return"!==g.method&&(g.method="next",g.arg=I),g.delegate=null,u):Q:(g.method="throw",g.arg=new TypeError("iterator result is not an object"),g.delegate=null,u)}function N(A){var g={tryLoc:A[0]};1 in A&&(g.catchLoc=A[1]),2 in A&&(g.finallyLoc=A[2],g.afterLoc=A[3]),this.tryEntries.push(g)}function U(A){var g=A.completion||{};g.type="normal",delete g.arg,A.completion=g}function H(A){this.tryEntries=[{tryLoc:"root"}],A.forEach(N,this),this.reset(!0)}function k(A){if(A){var g=A[E];if(g)return g.call(A);if("function"==typeof A.next)return A;if(!isNaN(A.length)){var B=-1,Q=function g(){for(;++B=g.length?{value:void 0,done:!0}:(A=B(g,I),this._i+=A.length,{value:A,done:!1})})},function(A,g,I){var B=I(14),C=I(15);A.exports=function(A){return function(g,I){var Q,E,i=String(C(g)),n=B(I),t=i.length;return n<0||n>=t?A?"":void 0:(Q=i.charCodeAt(n))<55296||Q>56319||n+1===t||(E=i.charCodeAt(n+1))<56320||E>57343?A?i.charAt(n):Q:A?i.slice(n,n+2):E-56320+(Q-55296<<10)+65536}}},function(A,g,I){A.exports=!I(6)&&!I(24)(function(){return 7!=Object.defineProperty(I(17)("div"),"a",{get:function(){return 7}}).a})},function(A,g,I){var B=I(5);A.exports=function(A,g){if(!B(A))return A;var I,C;if(g&&"function"==typeof(I=A.toString)&&!B(C=I.call(A)))return C;if("function"==typeof(I=A.valueOf)&&!B(C=I.call(A)))return C;if(!g&&"function"==typeof(I=A.toString)&&!B(C=I.call(A)))return C;throw TypeError("Can't convert object to primitive value")}},function(A,g,I){A.exports=I(4)},function(A,g,I){"use strict";var B=I(48),C=I(25),Q=I(20),E={};I(4)(E,I(1)("iterator"),function(){return this}),A.exports=function(A,g,I){A.prototype=B(E,{next:C(1,I)}),Q(A,g+" Iterator")}},function(A,g,I){var B=I(3),C=I(49),Q=I(29),E=I(19)("IE_PROTO"),i=function(){},n=function(){var A,g=I(17)("iframe"),B=Q.length;for(g.style.display="none",I(30).appendChild(g),g.src="javascript:",(A=g.contentWindow.document).open(),A.write("