LocalCDN-Firefox-Chrome-Brave/resources/p5.js/1.9.0/p5.min.jsm

2 lines
1005 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! p5.js v1.9.0 November 28, 2023 */
!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).p5=e()}(function(){var s,t,r;return function o(n,s,i){function a(t,e){if(!s[t]){if(!n[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}r=s[t]={exports:{}},n[t][0].call(r.exports,function(e){return a(n[t][1][e]||e)},r,r.exports,o,n,s,i)}return s[t].exports}for(var l="function"==typeof require&&require,e=0;e<i.length;e++)a(i[e]);return a}({1:[function(e,t,r){"use strict";r.byteLength=function(e){var e=c(e),t=e[0],e=e[1];return 3*(t+e)/4-e},r.toByteArray=function(e){var t,r,o=c(e),n=o[0],o=o[1],s=new u(function(e,t){return 3*(e+t)/4-t}(n,o)),i=0,a=0<o?n-4:n;for(r=0;r<a;r+=4)t=l[e.charCodeAt(r)]<<18|l[e.charCodeAt(r+1)]<<12|l[e.charCodeAt(r+2)]<<6|l[e.charCodeAt(r+3)],s[i++]=t>>16&255,s[i++]=t>>8&255,s[i++]=255&t;2===o&&(t=l[e.charCodeAt(r)]<<2|l[e.charCodeAt(r+1)]>>4,s[i++]=255&t);1===o&&(t=l[e.charCodeAt(r)]<<10|l[e.charCodeAt(r+1)]<<4|l[e.charCodeAt(r+2)]>>2,s[i++]=t>>8&255,s[i++]=255&t);return s},r.fromByteArray=function(e){for(var t,r=e.length,o=r%3,n=[],s=0,i=r-o;s<i;s+=16383)n.push(function(e,t,r){for(var o,n=[],s=t;s<r;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),n.push(function(e){return a[e>>18&63]+a[e>>12&63]+a[e>>6&63]+a[63&e]}(o));return n.join("")}(e,s,i<s+16383?i:s+16383));1==o?(t=e[r-1],n.push(a[t>>2]+a[t<<4&63]+"==")):2==o&&(t=(e[r-2]<<8)+e[r-1],n.push(a[t>>10]+a[t>>4&63]+a[t<<2&63]+"="));return n.join("")};for(var a=[],l=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,s=o.length;n<s;++n)a[n]=o[n],l[o.charCodeAt(n)]=n;function c(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");e=e.indexOf("="),t=(e=-1===e?t:e)===t?0:4-e%4;return[e,t]}l["-".charCodeAt(0)]=62,l["_".charCodeAt(0)]=63},{}],2:[function(e,t,r){},{}],3:[function(e,t,r){},{}],4:[function(A,e,L){!function(d){"use strict";var S=A("base64-js"),s=A("ieee754"),e="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null,t=(L.Buffer=d,L.SlowBuffer=function(e){+e!=e&&(e=0);return d.alloc(+e)},L.INSPECT_MAX_BYTES=50,2147483647);function l(e){if(t<e)throw new RangeError('The value "'+e+'" is invalid for option "size"');e=new Uint8Array(e);return Object.setPrototypeOf(e,d.prototype),e}function d(e,t,r){if("number"!=typeof e)return o(e,t,r);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return i(e)}function o(e,t,r){if("string"==typeof e){var o=e,n=t;if(d.isEncoding(n="string"==typeof n&&""!==n?n:"utf8"))return s=0|h(o,n),i=l(s),i=(o=i.write(o,n))!==s?i.slice(0,o):i;throw new TypeError("Unknown encoding: "+n)}if(ArrayBuffer.isView(e))return u(e);if(null!=e){if(C(e,ArrayBuffer)||e&&C(e.buffer,ArrayBuffer)){var s=e,o=t,i=r;if(o<0||s.byteLength<o)throw new RangeError('"offset" is outside of buffer bounds');if(s.byteLength<o+(i||0))throw new RangeError('"length" is outside of buffer bounds');return s=void 0===o&&void 0===i?new Uint8Array(s):void 0===i?new Uint8Array(s,o):new Uint8Array(s,o,i),Object.setPrototypeOf(s,d.prototype),s}if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return d.from(n,t,r);var a=function(e){{var t,r;if(d.isBuffer(e))return t=0|c(e.length),0!==(r=l(t)).length&&e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||O(e.length)?l(0):u(e);if("Buffer"===e.type&&Array.isArray(e.data))return u(e.data)}(e);if(a)return a;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return d.from(e[Symbol.toPrimitive]("string"),t,r)}throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function n(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function i(e){return n(e),l(e<0?0:0|c(e))}function u(e){for(var t=e.length<0?0:0|c(e.length),r=l(t),o=0;o<t;o+=1)r[o]=255&e[o];return r}function c(e){if(t<=e)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+t.toString(16)+" bytes");return 0|e}function h(e,t){if(d.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||C(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,o=2<arguments.length&&!0===arguments[2];if(!o&&0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return M(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return E(e).length;default:if(n)return o?-1:M(e).length;t=(""+t).toLowerCase(),n=!0}}function r(e,t,r){var o,n=!1;if((t=void 0===t||t<0?0:t)>this.length)return"";if((r=void 0===r||r>this.length?this.length:r)<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":var s=this,i=t,a=r,l=s.length;(!a||a<0||l<a)&&(a=l);for(var u="",c=i=!i||i<0?0:i;c<a;++c)u+=P[s[c]];return u;case"utf8":case"utf-8":return T(this,t,r);case"ascii":var d=this,l=t,h=r,f="";h=Math.min(d.length,h);for(var p=l;p<h;++p)f+=String.fromCharCode(127&d[p]);return f;case"latin1":case"binary":var m=this,i=t,y=r,g="";y=Math.min(m.length,y);for(var v=i;v<y;++v)g+=String.fromCharCode(m[v]);return g;case"base64":return b=this,o=r,0===(j=t)&&o===b.length?S.fromByteArray(b):S.fromByteArray(b.slice(j,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":for(var b=t,j=r,_=this.slice(b,j),x="",w=0;w<_.length;w+=2)x+=String.fromCharCode(_[w]+256*_[w+1]);return x;default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function a(e,t,r){var o=e[t];e[t]=e[r],e[r]=o}function f(e,t,r,o,n){if(0===e.length)return-1;if("string"==typeof r?(o=r,r=0):2147483647<r?r=2147483647:r<-2147483648&&(r=-2147483648),(r=(r=O(r=+r)?n?0:e.length-1:r)<0?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=d.from(t,o)),d.isBuffer(t))return 0===t.length?-1:p(e,t,r,o,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?(n?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,r):p(e,[t],r,o,n);throw new TypeError("val must be string, number or Buffer")}function p(e,t,r,o,n){var s=1,i=e.length,a=t.length;if(void 0!==o&&("ucs2"===(o=String(o).toLowerCase())||"ucs-2"===o||"utf16le"===o||"utf-16le"===o)){if(e.length<2||t.length<2)return-1;i/=s=2,a/=2,r/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(n)for(var u=-1,c=r;c<i;c++)if(l(e,c)===l(t,-1===u?0:c-u)){if(c-(u=-1===u?c:u)+1===a)return u*s}else-1!==u&&(c-=c-u),u=-1;else for(c=r=i<r+a?i-a:r;0<=c;c--){for(var d=!0,h=0;h<a;h++)if(l(e,c+h)!==l(t,h)){d=!1;break}if(d)return c}return-1}function y(e,t,r,o){return k(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,o)}function g(e,t,r,o){return k(function(e,t){for(var r,o,n=[],s=0;s<e.length&&!((t-=2)<0);++s)o=e.charCodeAt(s),r=o>>8,o=o%256,n.push(o),n.push(r);return n}(t,e.length-r),e,r,o)}function T(e,t,r){r=Math.min(e.length,r);for(var o=[],n=t;n<r;){var s,i,a,l,u=e[n],c=null,d=239<u?4:223<u?3:191<u?2:1;if(n+d<=r)switch(d){case 1:u<128&&(c=u);break;case 2:128==(192&(s=e[n+1]))&&127<(l=(31&u)<<6|63&s)&&(c=l);break;case 3:s=e[n+1],i=e[n+2],128==(192&s)&&128==(192&i)&&2047<(l=(15&u)<<12|(63&s)<<6|63&i)&&(l<55296||57343<l)&&(c=l);break;case 4:s=e[n+1],i=e[n+2],a=e[n+3],128==(192&s)&&128==(192&i)&&128==(192&a)&&65535<(l=(15&u)<<18|(63&s)<<12|(63&i)<<6|63&a)&&l<1114112&&(c=l)}null===c?(c=65533,d=1):65535<c&&(c-=65536,o.push(c>>>10&1023|55296),c=56320|1023&c),o.push(c),n+=d}var h=o,f=h.length;if(f<=v)return String.fromCharCode.apply(String,h);for(var p="",m=0;m<f;)p+=String.fromCharCode.apply(String,h.slice(m,m+=v));return p}L.kMaxLength=t,(d.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&d[Symbol.species]===d&&Object.defineProperty(d,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),d.poolSize=8192,d.from=o,Object.setPrototypeOf(d.prototype,Uint8Array.prototype),Object.setPrototypeOf(d,Uint8Array),d.alloc=function(e,t,r){return t=t,r=r,n(e=e),!(e<=0)&&void 0!==t?"string"==typeof r?l(e).fill(t,r):l(e).fill(t):l(e)},d.allocUnsafe=i,d.allocUnsafeSlow=i,d.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==d.prototype},d.compare=function(e,t){if(C(e,Uint8Array)&&(e=d.from(e,e.offset,e.byteLength)),C(t,Uint8Array)&&(t=d.from(t,t.offset,t.byteLength)),!d.isBuffer(e)||!d.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,o=t.length,n=0,s=Math.min(r,o);n<s;++n)if(e[n]!==t[n]){r=e[n],o=t[n];break}return r<o?-1:o<r?1:0},d.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}},d.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return d.alloc(0);if(void 0===t)for(n=t=0;n<e.length;++n)t+=e[n].length;for(var r=d.allocUnsafe(t),o=0,n=0;n<e.length;++n){var s=e[n];if(C(s,Uint8Array)&&(s=d.from(s)),!d.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,o),o+=s.length}return r},d.byteLength=h,d.prototype._isBuffer=!0,d.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)a(this,t,t+1);return this},d.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)a(this,t,t+3),a(this,t+1,t+2);return this},d.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)a(this,t,t+7),a(this,t+1,t+6),a(this,t+2,t+5),a(this,t+3,t+4);return this},d.prototype.toLocaleString=d.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):r.apply(this,arguments)},d.prototype.equals=function(e){if(d.isBuffer(e))return this===e||0===d.compare(this,e);throw new TypeError("Argument must be a Buffer")},d.prototype.inspect=function(){var e="",t=L.INSPECT_MAX_BYTES,e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim();return this.length>t&&(e+=" ... "),"<Buffer "+e+">"},e&&(d.prototype[e]=d.prototype.inspect),d.prototype.compare=function(e,t,r,o,n){if(C(e,Uint8Array)&&(e=d.from(e,e.offset,e.byteLength)),!d.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===r&&(r=e?e.length:0),void 0===o&&(o=0),void 0===n&&(n=this.length),(t=void 0===t?0:t)<0||r>e.length||o<0||n>this.length)throw new RangeError("out of range index");if(n<=o&&r<=t)return 0;if(n<=o)return-1;if(r<=t)return 1;if(this===e)return 0;for(var s=(n>>>=0)-(o>>>=0),i=(r>>>=0)-(t>>>=0),a=Math.min(s,i),l=this.slice(o,n),u=e.slice(t,r),c=0;c<a;++c)if(l[c]!==u[c]){s=l[c],i=u[c];break}return s<i?-1:i<s?1:0},d.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},d.prototype.indexOf=function(e,t,r){return f(this,e,t,r,!0)},d.prototype.lastIndexOf=function(e,t,r){return f(this,e,t,r,!1)},d.prototype.write=function(e,t,r,o){if(void 0===t)o="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)o=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===o&&(o="utf8")):(o=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");o=o||"utf8";for(var s,i,a,l=!1;;)switch(o){case"hex":var u=this,c=e,d=t,h=r,f=(d=Number(d)||0,u.length-d);(!h||f<(h=Number(h)))&&(h=f),(f=c.length)/2<h&&(h=f/2);for(var p=0;p<h;++p){var m=parseInt(c.substr(2*p,2),16);if(O(m))return p;u[d+p]=m}return p;case"utf8":case"utf-8":return f=t,a=r,k(M(e,(i=this).length-f),i,f,a);case"ascii":return y(this,e,t,r);case"latin1":case"binary":return y(this,e,t,r);case"base64":return i=this,a=t,s=r,k(E(e),i,a,s);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g(this,e,t,r);default:if(l)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),l=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var v=4096;function m(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 b(e,t,r,o,n,s){if(!d.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(n<t||t<s)throw new RangeError('"value" argument is out of bounds');if(r+o>e.length)throw new RangeError("Index out of range")}function j(e,t,r,o){if(r+o>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function _(e,t,r,o,n){return t=+t,r>>>=0,n||j(e,0,r,4),s.write(e,t,r,o,23,4),r+4}function x(e,t,r,o,n){return t=+t,r>>>=0,n||j(e,0,r,8),s.write(e,t,r,o,52,8),r+8}d.prototype.slice=function(e,t){var r=this.length,r=((e=~~e)<0?(e+=r)<0&&(e=0):r<e&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):r<t&&(t=r),t<e&&(t=e),this.subarray(e,t));return Object.setPrototypeOf(r,d.prototype),r},d.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||m(e,t,this.length);for(var o=this[e],n=1,s=0;++s<t&&(n*=256);)o+=this[e+s]*n;return o},d.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||m(e,t,this.length);for(var o=this[e+--t],n=1;0<t&&(n*=256);)o+=this[e+--t]*n;return o},d.prototype.readUInt8=function(e,t){return e>>>=0,t||m(e,1,this.length),this[e]},d.prototype.readUInt16LE=function(e,t){return e>>>=0,t||m(e,2,this.length),this[e]|this[e+1]<<8},d.prototype.readUInt16BE=function(e,t){return e>>>=0,t||m(e,2,this.length),this[e]<<8|this[e+1]},d.prototype.readUInt32LE=function(e,t){return e>>>=0,t||m(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},d.prototype.readUInt32BE=function(e,t){return e>>>=0,t||m(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},d.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||m(e,t,this.length);for(var o=this[e],n=1,s=0;++s<t&&(n*=256);)o+=this[e+s]*n;return(n*=128)<=o&&(o-=Math.pow(2,8*t)),o},d.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||m(e,t,this.length);for(var o=t,n=1,s=this[e+--o];0<o&&(n*=256);)s+=this[e+--o]*n;return(n*=128)<=s&&(s-=Math.pow(2,8*t)),s},d.prototype.readInt8=function(e,t){return e>>>=0,t||m(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},d.prototype.readInt16LE=function(e,t){e>>>=0,t||m(e,2,this.length);t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},d.prototype.readInt16BE=function(e,t){e>>>=0,t||m(e,2,this.length);t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},d.prototype.readInt32LE=function(e,t){return e>>>=0,t||m(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},d.prototype.readInt32BE=function(e,t){return e>>>=0,t||m(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},d.prototype.readFloatLE=function(e,t){return e>>>=0,t||m(e,4,this.length),s.read(this,e,!0,23,4)},d.prototype.readFloatBE=function(e,t){return e>>>=0,t||m(e,4,this.length),s.read(this,e,!1,23,4)},d.prototype.readDoubleLE=function(e,t){return e>>>=0,t||m(e,8,this.length),s.read(this,e,!0,52,8)},d.prototype.readDoubleBE=function(e,t){return e>>>=0,t||m(e,8,this.length),s.read(this,e,!1,52,8)},d.prototype.writeUIntLE=function(e,t,r,o){e=+e,t>>>=0,r>>>=0,o||b(this,e,t,r,Math.pow(2,8*r)-1,0);var n=1,s=0;for(this[t]=255&e;++s<r&&(n*=256);)this[t+s]=e/n&255;return t+r},d.prototype.writeUIntBE=function(e,t,r,o){e=+e,t>>>=0,r>>>=0,o||b(this,e,t,r,Math.pow(2,8*r)-1,0);var n=r-1,s=1;for(this[t+n]=255&e;0<=--n&&(s*=256);)this[t+n]=e/s&255;return t+r},d.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,1,255,0),this[t]=255&e,t+1},d.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},d.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},d.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},d.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},d.prototype.writeIntLE=function(e,t,r,o){e=+e,t>>>=0,o||b(this,e,t,r,(o=Math.pow(2,8*r-1))-1,-o);var n=0,s=1,i=0;for(this[t]=255&e;++n<r&&(s*=256);)e<0&&0===i&&0!==this[t+n-1]&&(i=1),this[t+n]=(e/s>>0)-i&255;return t+r},d.prototype.writeIntBE=function(e,t,r,o){e=+e,t>>>=0,o||b(this,e,t,r,(o=Math.pow(2,8*r-1))-1,-o);var n=r-1,s=1,i=0;for(this[t+n]=255&e;0<=--n&&(s*=256);)e<0&&0===i&&0!==this[t+n+1]&&(i=1),this[t+n]=(e/s>>0)-i&255;return t+r},d.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,1,127,-128),this[t]=255&(e=e<0?255+e+1:e),t+1},d.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},d.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},d.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},d.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,4,2147483647,-2147483648),this[t]=(e=e<0?4294967295+e+1:e)>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},d.prototype.writeFloatLE=function(e,t,r){return _(this,e,t,!0,r)},d.prototype.writeFloatBE=function(e,t,r){return _(this,e,t,!1,r)},d.prototype.writeDoubleLE=function(e,t,r){return x(this,e,t,!0,r)},d.prototype.writeDoubleBE=function(e,t,r){return x(this,e,t,!1,r)},d.prototype.copy=function(e,t,r,o){if(!d.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r=r||0,o||0===o||(o=this.length),t>=e.length&&(t=e.length),(o=0<o&&o<r?r:o)===r)return 0;if(0===e.length||0===this.length)return 0;if((t=t||0)<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length);var n=(o=e.length-t<o-r?e.length-t+r:o)-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,o);else if(this===e&&r<t&&t<o)for(var s=n-1;0<=s;--s)e[s+t]=this[s+r];else Uint8Array.prototype.set.call(e,this.subarray(r,o),t);return n},d.prototype.fill=function(e,t,r,o){if("string"==typeof e){if("string"==typeof t?(o=t,t=0,r=this.length):"string"==typeof r&&(o=r,r=this.length),void 0!==o&&"string"!=typeof o)throw new TypeError("encoding must be a string");if("string"==typeof o&&!d.isEncoding(o))throw new TypeError("Unknown encoding: "+o);var n;1===e.length&&(n=e.charCodeAt(0),("utf8"===o&&n<128||"latin1"===o)&&(e=n))}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");var s;if(!(r<=t))if(t>>>=0,r=void 0===r?this.length:r>>>0,"number"==typeof(e=e||0))for(s=t;s<r;++s)this[s]=e;else{var i=d.isBuffer(e)?e:d.from(e,o),a=i.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<r-t;++s)this[s+t]=i[s%a]}return this};var w=/[^+/0-9A-Za-z-_]/g;function M(e,t){t=t||1/0;for(var r,o=e.length,n=null,s=[],i=0;i<o;++i){if(55295<(r=e.charCodeAt(i))&&r<57344){if(!n){if(56319<r){-1<(t-=3)&&s.push(239,191,189);continue}if(i+1===o){-1<(t-=3)&&s.push(239,191,189);continue}n=r;continue}if(r<56320){-1<(t-=3)&&s.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&-1<(t-=3)&&s.push(239,191,189);if(n=null,r<128){if(--t<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.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;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function E(e){return S.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(w,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function k(e,t,r,o){for(var n=0;n<o&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function C(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function O(e){return e!=e}var P=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var o=16*r,n=0;n<16;++n)t[o+n]=e[r]+e[n];return t}()}.call(this,A("buffer").Buffer)},{"base64-js":1,buffer:4,ieee754:246}],5:[function(e,t,r){t.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},{}],6:[function(e,t,r){var o=e("../internals/is-object");t.exports=function(e){if(o(e)||null===e)return e;throw TypeError("Can't set "+String(e)+" as a prototype")}},{"../internals/is-object":74}],7:[function(e,t,r){var o=e("../internals/well-known-symbol"),n=e("../internals/object-create"),e=e("../internals/object-define-property"),s=o("unscopables"),i=Array.prototype;null==i[s]&&e.f(i,s,{configurable:!0,value:n(null)}),t.exports=function(e){i[s][e]=!0}},{"../internals/object-create":90,"../internals/object-define-property":92,"../internals/well-known-symbol":148}],8:[function(e,t,r){"use strict";var o=e("../internals/string-multibyte").charAt;t.exports=function(e,t,r){return t+(r?o(e,t).length:1)}},{"../internals/string-multibyte":123}],9:[function(e,t,r){t.exports=function(e,t,r){if(e instanceof t)return e;throw TypeError("Incorrect "+(r?r+" ":"")+"invocation")}},{}],10:[function(e,t,r){var o=e("../internals/is-object");t.exports=function(e){if(o(e))return e;throw TypeError(String(e)+" is not an object")}},{"../internals/is-object":74}],11:[function(e,t,r){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},{}],12:[function(e,t,r){"use strict";function o(e){return l(e)&&u(M,c(e))}var n,s=e("../internals/array-buffer-native"),i=e("../internals/descriptors"),a=e("../internals/global"),l=e("../internals/is-object"),u=e("../internals/has"),c=e("../internals/classof"),d=e("../internals/create-non-enumerable-property"),h=e("../internals/redefine"),f=e("../internals/object-define-property").f,p=e("../internals/object-get-prototype-of"),m=e("../internals/object-set-prototype-of"),y=e("../internals/well-known-symbol"),e=e("../internals/uid"),g=a.Int8Array,v=g&&g.prototype,b=a.Uint8ClampedArray,b=b&&b.prototype,j=g&&p(g),_=v&&p(v),x=Object.prototype,w=x.isPrototypeOf,y=y("toStringTag"),S=e("TYPED_ARRAY_TAG"),T=s&&!!m&&"Opera"!==c(a.opera),e=!1,M={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8};for(n in M)a[n]||(T=!1);if((!T||"function"!=typeof j||j===Function.prototype)&&(j=function(){throw TypeError("Incorrect invocation")},T))for(n in M)a[n]&&m(a[n],j);if((!T||!_||_===x)&&(_=j.prototype,T))for(n in M)a[n]&&m(a[n].prototype,_);if(T&&p(b)!==_&&m(b,_),i&&!u(_,y))for(n in e=!0,f(_,y,{get:function(){return l(this)?this[S]:void 0}}),M)a[n]&&d(a[n],S,n);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:T,TYPED_ARRAY_TAG:e&&S,aTypedArray:function(e){if(o(e))return e;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(e){if(m){if(w.call(j,e))return e}else for(var t in M)if(u(M,n)){t=a[t];if(t&&(e===t||w.call(t,e)))return e}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r){if(i){if(r)for(var o in M){o=a[o];o&&u(o.prototype,e)&&delete o.prototype[e]}_[e]&&!r||h(_,e,!r&&T&&v[e]||t)}},exportTypedArrayStaticMethod:function(e,t,r){var o,n;if(i){if(m){if(r)for(o in M)(n=a[o])&&u(n,e)&&delete n[e];if(j[e]&&!r)return;try{return h(j,e,!r&&T&&g[e]||t)}catch(e){}}for(o in M)!(n=a[o])||n[e]&&!r||h(n,e,t)}},isView:function(e){e=c(e);return"DataView"===e||u(M,e)},isTypedArray:o,TypedArray:j,TypedArrayPrototype:_}},{"../internals/array-buffer-native":11,"../internals/classof":29,"../internals/create-non-enumerable-property":38,"../internals/descriptors":43,"../internals/global":59,"../internals/has":60,"../internals/is-object":74,"../internals/object-define-property":92,"../internals/object-get-prototype-of":97,"../internals/object-set-prototype-of":101,"../internals/redefine":108,"../internals/uid":145,"../internals/well-known-symbol":148}],13:[function(e,t,D){"use strict";function r(e){return[255&e]}function o(e){return[255&e,e>>8&255]}function n(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function s(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function i(e){return O(e,23,4)}function F(e){return O(e,52,8)}function a(e,t){H(e[w],t,{get:function(){return b(this)[t]}})}function l(e,t,r,o){if(r=m(r),e=b(e),r+t>e.byteLength)throw C(S);var n=b(e.buffer).bytes,r=r+e.byteOffset,e=n.slice(r,r+t);return o?e:e.reverse()}function u(e,t,r,o,n,s){if(r=m(r),e=b(e),r+t>e.byteLength)throw C(S);for(var i=b(e.buffer).bytes,a=r+e.byteOffset,l=o(+n),u=0;u<t;u++)i[a+u]=l[s?u:t-u-1]}var c=e("../internals/global"),d=e("../internals/descriptors"),U=e("../internals/array-buffer-native"),N=e("../internals/create-non-enumerable-property"),h=e("../internals/redefine-all"),f=e("../internals/fails"),p=e("../internals/an-instance"),B=e("../internals/to-integer"),G=e("../internals/to-length"),m=e("../internals/to-index"),y=e("../internals/ieee754"),V=e("../internals/object-get-prototype-of"),g=e("../internals/object-set-prototype-of"),z=e("../internals/object-get-own-property-names").f,H=e("../internals/object-define-property").f,W=e("../internals/array-fill"),v=e("../internals/set-to-string-tag"),e=e("../internals/internal-state"),b=e.get,j=e.set,_="ArrayBuffer",x="DataView",w="prototype",S="Wrong index",T=c[_],M=T,E=c[x],e=E&&E[w],k=Object.prototype,C=c.RangeError,O=y.pack,P=y.unpack;if(U){if(!f(function(){T(1)})||!f(function(){new T(-1)})||f(function(){return new T,new T(1.5),new T(NaN),T.name!=_})){for(var A,c=(M=function(e){return p(this,M),new T(m(e))})[w]=T[w],L=z(T),R=0;L.length>R;)(A=L[R++])in M||N(M,A,T[A]);c.constructor=M}g&&V(e)!==k&&g(e,k);var y=new E(new M(2)),I=e.setInt8;y.setInt8(0,2147483648),y.setInt8(1,2147483649),!y.getInt8(0)&&y.getInt8(1)||h(e,{setInt8:function(e,t){I.call(this,e,t<<24>>24)},setUint8:function(e,t){I.call(this,e,t<<24>>24)}},{unsafe:!0})}else M=function(e){p(this,M,_);e=m(e);j(this,{bytes:W.call(new Array(e),0),byteLength:e}),d||(this.byteLength=e)},E=function(e,t,r){p(this,E,x),p(e,M,x);var o=b(e).byteLength,t=B(t);if(t<0||o<t)throw C("Wrong offset");if(o<t+(r=void 0===r?o-t:G(r)))throw C("Wrong length");j(this,{buffer:e,byteLength:r,byteOffset:t}),d||(this.buffer=e,this.byteLength=r,this.byteOffset=t)},d&&(a(M,"byteLength"),a(E,"buffer"),a(E,"byteLength"),a(E,"byteOffset")),h(E[w],{getInt8:function(e){return l(this,1,e)[0]<<24>>24},getUint8:function(e){return l(this,1,e)[0]},getInt16:function(e){e=l(this,2,e,1<arguments.length?arguments[1]:void 0);return(e[1]<<8|e[0])<<16>>16},getUint16:function(e){e=l(this,2,e,1<arguments.length?arguments[1]:void 0);return e[1]<<8|e[0]},getInt32:function(e){return s(l(this,4,e,1<arguments.length?arguments[1]:void 0))},getUint32:function(e){return s(l(this,4,e,1<arguments.length?arguments[1]:void 0))>>>0},getFloat32:function(e){return P(l(this,4,e,1<arguments.length?arguments[1]:void 0),23)},getFloat64:function(e){return P(l(this,8,e,1<arguments.length?arguments[1]:void 0),52)},setInt8:function(e,t){u(this,1,e,r,t)},setUint8:function(e,t){u(this,1,e,r,t)},setInt16:function(e,t){u(this,2,e,o,t,2<arguments.length?arguments[2]:void 0)},setUint16:function(e,t){u(this,2,e,o,t,2<arguments.length?arguments[2]:void 0)},setInt32:function(e,t){u(this,4,e,n,t,2<arguments.length?arguments[2]:void 0)},setUint32:function(e,t){u(this,4,e,n,t,2<arguments.length?arguments[2]:void 0)},setFloat32:function(e,t){u(this,4,e,i,t,2<arguments.length?arguments[2]:void 0)},setFloat64:function(e,t){u(this,8,e,F,t,2<arguments.length?arguments[2]:void 0)}});v(M,_),v(E,x),t.exports={ArrayBuffer:M,DataView:E}},{"../internals/an-instance":9,"../internals/array-buffer-native":11,"../internals/array-fill":15,"../internals/create-non-enumerable-property":38,"../internals/descriptors":43,"../internals/fails":51,"../internals/global":59,"../internals/ieee754":65,"../internals/internal-state":70,"../internals/object-define-property":92,"../internals/object-get-own-property-names":95,"../internals/object-get-prototype-of":97,"../internals/object-set-prototype-of":101,"../internals/redefine-all":107,"../internals/set-to-string-tag":117,"../internals/to-index":133,"../internals/to-integer":135,"../internals/to-length":136}],14:[function(e,t,r){"use strict";var l=e("../internals/to-object"),u=e("../internals/to-absolute-index"),c=e("../internals/to-length"),d=Math.min;t.exports=[].copyWithin||function(e,t){var r=l(this),o=c(r.length),n=u(e,o),s=u(t,o),e=2<arguments.length?arguments[2]:void 0,i=d((void 0===e?o:u(e,o))-s,o-n),a=1;for(s<n&&n<s+i&&(a=-1,s+=i-1,n+=i-1);0<i--;)s in r?r[n]=r[s]:delete r[n],n+=a,s+=a;return r}},{"../internals/to-absolute-index":132,"../internals/to-length":136,"../internals/to-object":137}],15:[function(e,t,r){"use strict";var i=e("../internals/to-object"),a=e("../internals/to-absolute-index"),l=e("../internals/to-length");t.exports=function(e){for(var t=i(this),r=l(t.length),o=arguments.length,n=a(1<o?arguments[1]:void 0,r),o=2<o?arguments[2]:void 0,s=void 0===o?r:a(o,r);n<s;)t[n++]=e;return t}},{"../internals/to-absolute-index":132,"../internals/to-length":136,"../internals/to-object":137}],16:[function(e,t,r){"use strict";var o=e("../internals/array-iteration").forEach,n=e("../internals/array-method-is-strict"),e=e("../internals/array-method-uses-to-length"),n=n("forEach"),e=e("forEach");t.exports=n&&e?[].forEach:function(e){return o(this,e,1<arguments.length?arguments[1]:void 0)}},{"../internals/array-iteration":19,"../internals/array-method-is-strict":22,"../internals/array-method-uses-to-length":23}],17:[function(e,t,r){"use strict";var f=e("../internals/function-bind-context"),p=e("../internals/to-object"),m=e("../internals/call-with-safe-iteration-closing"),y=e("../internals/is-array-iterator-method"),g=e("../internals/to-length"),v=e("../internals/create-property"),b=e("../internals/get-iterator-method");t.exports=function(e){var t,r,o,n,s,i,a=p(e),e="function"==typeof this?this:Array,l=arguments.length,u=1<l?arguments[1]:void 0,c=void 0!==u,d=b(a),h=0;if(c&&(u=f(u,2<l?arguments[2]:void 0,2)),null==d||e==Array&&y(d))for(r=new e(t=g(a.length));h<t;h++)i=c?u(a[h],h):a[h],v(r,h,i);else for(s=(n=d.call(a)).next,r=new e;!(o=s.call(n)).done;h++)i=c?m(n,u,[o.value,h],!0):o.value,v(r,h,i);return r.length=h,r}},{"../internals/call-with-safe-iteration-closing":26,"../internals/create-property":40,"../internals/function-bind-context":54,"../internals/get-iterator-method":57,"../internals/is-array-iterator-method":71,"../internals/to-length":136,"../internals/to-object":137}],18:[function(e,t,r){function o(a){return function(e,t,r){var o,n=l(e),s=u(n.length),i=c(r,s);if(a&&t!=t){for(;i<s;)if((o=n[i++])!=o)return!0}else for(;i<s;i++)if((a||i in n)&&n[i]===t)return a||i||0;return!a&&-1}}var l=e("../internals/to-indexed-object"),u=e("../internals/to-length"),c=e("../internals/to-absolute-index");t.exports={includes:o(!0),indexOf:o(!1)}},{"../internals/to-absolute-index":132,"../internals/to-indexed-object":134,"../internals/to-length":136}],19:[function(e,t,r){function o(h){var f=1==h,p=2==h,m=3==h,y=4==h,g=6==h,v=5==h||g;return function(e,t,r,o){for(var n,s,i=_(e),a=j(i),l=b(t,r,3),u=x(a.length),c=0,t=o||w,d=f?t(e,u):p?t(e,0):void 0;c<u;c++)if((v||c in a)&&(s=l(n=a[c],c,i),h))if(f)d[c]=s;else if(s)switch(h){case 3:return!0;case 5:return n;case 6:return c;case 2:S.call(d,n)}else if(y)return!1;return g?-1:m||y?y:d}}var b=e("../internals/function-bind-context"),j=e("../internals/indexed-object"),_=e("../internals/to-object"),x=e("../internals/to-length"),w=e("../internals/array-species-create"),S=[].push;t.exports={forEach:o(0),map:o(1),filter:o(2),some:o(3),every:o(4),find:o(5),findIndex:o(6)}},{"../internals/array-species-create":25,"../internals/function-bind-context":54,"../internals/indexed-object":66,"../internals/to-length":136,"../internals/to-object":137}],20:[function(e,t,r){"use strict";var n=e("../internals/to-indexed-object"),s=e("../internals/to-integer"),i=e("../internals/to-length"),o=e("../internals/array-method-is-strict"),e=e("../internals/array-method-uses-to-length"),a=Math.min,l=[].lastIndexOf,u=!!l&&1/[1].lastIndexOf(1,-0)<0,o=o("lastIndexOf"),e=e("indexOf",{ACCESSORS:!0,1:0});t.exports=u||!o||!e?function(e){if(u)return l.apply(this,arguments)||0;var t=n(this),r=i(t.length),o=r-1;for((o=1<arguments.length?a(o,s(arguments[1])):o)<0&&(o=r+o);0<=o;o--)if(o in t&&t[o]===e)return o||0;return-1}:l},{"../internals/array-method-is-strict":22,"../internals/array-method-uses-to-length":23,"../internals/to-indexed-object":134,"../internals/to-integer":135,"../internals/to-length":136}],21:[function(e,t,r){var o=e("../internals/fails"),n=e("../internals/well-known-symbol"),s=e("../internals/engine-v8-version"),i=n("species");t.exports=function(t){return 51<=s||!o(function(){var e=[];return(e.constructor={})[i]=function(){return{foo:1}},1!==e[t](Boolean).foo})}},{"../internals/engine-v8-version":48,"../internals/fails":51,"../internals/well-known-symbol":148}],22:[function(e,t,r){"use strict";var o=e("../internals/fails");t.exports=function(e,t){var r=[][e];return!!r&&o(function(){r.call(null,t||function(){throw 1},1)})}},{"../internals/fails":51}],23:[function(e,t,r){function i(e){throw e}var a=e("../internals/descriptors"),l=e("../internals/fails"),u=e("../internals/has"),c=Object.defineProperty,d={};t.exports=function(e,t){var r,o,n,s;return u(d,e)?d[e]:(r=[][e],o=!!u(t=t||{},"ACCESSORS")&&t.ACCESSORS,n=u(t,0)?t[0]:i,s=u(t,1)?t[1]:void 0,d[e]=!!r&&!l(function(){if(o&&!a)return!0;var e={length:-1};o?c(e,1,{enumerable:!0,get:i}):e[1]=1,r.call(e,n,s)}))}},{"../internals/descriptors":43,"../internals/fails":51,"../internals/has":60}],24:[function(e,t,r){function o(u){return function(e,t,r,o){c(t);var n=d(e),s=h(n),i=f(n.length),a=u?i-1:0,l=u?-1:1;if(r<2)for(;;){if(a in s){o=s[a],a+=l;break}if(a+=l,u?a<0:i<=a)throw TypeError("Reduce of empty array with no initial value")}for(;u?0<=a:a<i;a+=l)a in s&&(o=t(o,s[a],a,n));return o}}var c=e("../internals/a-function"),d=e("../internals/to-object"),h=e("../internals/indexed-object"),f=e("../internals/to-length");t.exports={left:o(!1),right:o(!0)}},{"../internals/a-function":5,"../internals/indexed-object":66,"../internals/to-length":136,"../internals/to-object":137}],25:[function(e,t,r){var o=e("../internals/is-object"),n=e("../internals/is-array"),s=e("../internals/well-known-symbol")("species");t.exports=function(e,t){var r;return new(void 0===(r=n(e)&&("function"==typeof(r=e.constructor)&&(r===Array||n(r.prototype))||o(r)&&null===(r=r[s]))?void 0:r)?Array:r)(0===t?0:t)}},{"../internals/is-array":72,"../internals/is-object":74,"../internals/well-known-symbol":148}],26:[function(e,t,r){var n=e("../internals/an-object");t.exports=function(t,e,r,o){try{return o?e(n(r)[0],r[1]):e(r)}catch(e){o=t.return;throw void 0!==o&&n(o.call(t)),e}}},{"../internals/an-object":10}],27:[function(e,t,r){var n=e("../internals/well-known-symbol")("iterator"),s=!1;try{var o=0,i={next:function(){return{done:!!o++}},return:function(){s=!0}};i[n]=function(){return this},Array.from(i,function(){throw 2})}catch(e){}t.exports=function(e,t){if(!t&&!s)return!1;var r=!1;try{var o={};o[n]=function(){return{next:function(){return{done:r=!0}}}},e(o)}catch(e){}return r}},{"../internals/well-known-symbol":148}],28:[function(e,t,r){var o={}.toString;t.exports=function(e){return o.call(e).slice(8,-1)}},{}],29:[function(e,t,r){var o=e("../internals/to-string-tag-support"),n=e("../internals/classof-raw"),s=e("../internals/well-known-symbol")("toStringTag"),i="Arguments"==n(function(){return arguments}());t.exports=o?n:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=function(e,t){try{return e[t]}catch(e){}}(e=Object(e),s))?t:i?n(e):"Object"==(t=n(e))&&"function"==typeof e.callee?"Arguments":t}},{"../internals/classof-raw":28,"../internals/to-string-tag-support":141,"../internals/well-known-symbol":148}],30:[function(e,t,r){"use strict";var u=e("../internals/object-define-property").f,c=e("../internals/object-create"),d=e("../internals/redefine-all"),h=e("../internals/function-bind-context"),f=e("../internals/an-instance"),p=e("../internals/iterate"),i=e("../internals/define-iterator"),a=e("../internals/set-species"),m=e("../internals/descriptors"),y=e("../internals/internal-metadata").fastKey,e=e("../internals/internal-state"),g=e.set,v=e.getterFor;t.exports={getConstructor:function(e,r,o,n){function s(e,t,r){var o,n=l(e),s=i(e,t);return s?s.value=r:(n.last=s={index:o=y(t,!0),key:t,value:r,previous:t=n.last,next:void 0,removed:!1},n.first||(n.first=s),t&&(t.next=s),m?n.size++:e.size++,"F"!==o&&(n.index[o]=s)),e}function i(e,t){var r,e=l(e),o=y(t);if("F"!==o)return e.index[o];for(r=e.first;r;r=r.next)if(r.key==t)return r}var a=e(function(e,t){f(e,a,r),g(e,{type:r,index:c(null),first:void 0,last:void 0,size:0}),m||(e.size=0),null!=t&&p(t,e[n],e,o)}),l=v(r);return d(a.prototype,{clear:function(){for(var e=l(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,m?e.size=0:this.size=0},delete:function(e){var t,r,o=l(this),e=i(this,e);return e&&(t=e.next,r=e.previous,delete o.index[e.index],e.removed=!0,r&&(r.next=t),t&&(t.previous=r),o.first==e&&(o.first=t),o.last==e&&(o.last=r),m?o.size--:this.size--),!!e},forEach:function(e){for(var t,r=l(this),o=h(e,1<arguments.length?arguments[1]:void 0,3);t=t?t.next:r.first;)for(o(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!i(this,e)}}),d(a.prototype,o?{get:function(e){e=i(this,e);return e&&e.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),m&&u(a.prototype,"size",{get:function(){return l(this).size}}),a},setStrong:function(e,t,r){var o=t+" Iterator",n=v(t),s=v(o);i(e,t,function(e,t){g(this,{type:o,target:e,state:n(e),kind:t,last:void 0})},function(){for(var e=s(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:{value:e.target=void 0,done:!0}},r?"entries":"values",!r,!0),a(t)}}},{"../internals/an-instance":9,"../internals/define-iterator":41,"../internals/descriptors":43,"../internals/function-bind-context":54,"../internals/internal-metadata":69,"../internals/internal-state":70,"../internals/iterate":77,"../internals/object-create":90,"../internals/object-define-property":92,"../internals/redefine-all":107,"../internals/set-species":116}],31:[function(e,t,r){"use strict";function l(e){return e.frozen||(e.frozen=new o)}function o(){this.entries=[]}function n(e,t){return i(e.entries,function(e){return e[0]===t})}var u=e("../internals/redefine-all"),c=e("../internals/internal-metadata").getWeakData,d=e("../internals/an-object"),h=e("../internals/is-object"),f=e("../internals/an-instance"),p=e("../internals/iterate"),s=e("../internals/array-iteration"),m=e("../internals/has"),e=e("../internals/internal-state"),y=e.set,g=e.getterFor,i=s.find,a=s.findIndex,v=0;o.prototype={get:function(e){e=n(this,e);if(e)return e[1]},has:function(e){return!!n(this,e)},set:function(e,t){var r=n(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(t){var e=a(this.entries,function(e){return e[0]===t});return~e&&this.entries.splice(e,1),!!~e}},t.exports={getConstructor:function(e,r,o,n){function s(e,t,r){var o=a(e),n=c(d(t),!0);return!0===n?l(o).set(t,r):n[o.id]=r,e}var i=e(function(e,t){f(e,i,r),y(e,{type:r,id:v++,frozen:void 0}),null!=t&&p(t,e[n],e,o)}),a=g(r);return u(i.prototype,{delete:function(e){var t,r=a(this);return!!h(e)&&(!0===(t=c(e))?l(r).delete(e):t&&m(t,r.id)&&delete t[r.id])},has:function(e){var t,r=a(this);return!!h(e)&&(!0===(t=c(e))?l(r).has(e):t&&m(t,r.id))}}),u(i.prototype,o?{get:function(e){var t,r=a(this);if(h(e))return!0===(t=c(e))?l(r).get(e):t?t[r.id]:void 0},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),i}}},{"../internals/an-instance":9,"../internals/an-object":10,"../internals/array-iteration":19,"../internals/has":60,"../internals/internal-metadata":69,"../internals/internal-state":70,"../internals/is-object":74,"../internals/iterate":77,"../internals/redefine-all":107}],32:[function(e,t,r){"use strict";var y=e("../internals/export"),g=e("../internals/global"),v=e("../internals/is-forced"),b=e("../internals/redefine"),j=e("../internals/internal-metadata"),_=e("../internals/iterate"),x=e("../internals/an-instance"),w=e("../internals/is-object"),S=e("../internals/fails"),T=e("../internals/check-correctness-of-iteration"),M=e("../internals/set-to-string-tag"),E=e("../internals/inherit-if-required");t.exports=function(r,e,t){function o(e){var r=f[e];b(f,e,"add"==e?function(e){return r.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(c&&!w(e))&&r.call(this,0===e?0:e)}:"get"==e?function(e){return c&&!w(e)?void 0:r.call(this,0===e?0:e)}:"has"==e?function(e){return!(c&&!w(e))&&r.call(this,0===e?0:e)}:function(e,t){return r.call(this,0===e?0:e,t),this})}var n,s,i,a,l,u=-1!==r.indexOf("Map"),c=-1!==r.indexOf("Weak"),d=u?"set":"add",h=g[r],f=h&&h.prototype,p=h,m={};return v(r,"function"!=typeof h||!(c||f.forEach&&!S(function(){(new h).entries().next()})))?(p=t.getConstructor(e,r,u,d),j.REQUIRED=!0):v(r,!0)&&(s=(n=new p)[d](c?{}:-0,1)!=n,i=S(function(){n.has(1)}),a=T(function(e){new h(e)}),l=!c&&S(function(){for(var e=new h,t=5;t--;)e[d](t,t);return!e.has(-0)}),a||(((p=e(function(e,t){x(e,p,r);e=E(new h,e,p);return null!=t&&_(t,e[d],e,u),e})).prototype=f).constructor=p),(i||l)&&(o("delete"),o("has"),u&&o("get")),(l||s)&&o(d),c&&f.clear&&delete f.clear),m[r]=p,y({global:!0,forced:p!=h},m),M(p,r),c||t.setStrong(p,r,u),p}},{"../internals/an-instance":9,"../internals/check-correctness-of-iteration":27,"../internals/export":50,"../internals/fails":51,"../internals/global":59,"../internals/inherit-if-required":67,"../internals/internal-metadata":69,"../internals/is-forced":73,"../internals/is-object":74,"../internals/iterate":77,"../internals/redefine":108,"../internals/set-to-string-tag":117}],33:[function(e,t,r){var a=e("../internals/has"),l=e("../internals/own-keys"),u=e("../internals/object-get-own-property-descriptor"),c=e("../internals/object-define-property");t.exports=function(e,t){for(var r=l(t),o=c.f,n=u.f,s=0;s<r.length;s++){var i=r[s];a(e,i)||o(e,i,n(t,i))}}},{"../internals/has":60,"../internals/object-define-property":92,"../internals/object-get-own-property-descriptor":93,"../internals/own-keys":103}],34:[function(e,t,r){var o=e("../internals/well-known-symbol")("match");t.exports=function(t){var r=/./;try{"/./"[t](r)}catch(e){try{return r[o]=!1,"/./"[t](r)}catch(e){}}return!1}},{"../internals/well-known-symbol":148}],35:[function(e,t,r){e=e("../internals/fails");t.exports=!e(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},{"../internals/fails":51}],36:[function(e,t,r){var s=e("../internals/require-object-coercible"),i=/"/g;t.exports=function(e,t,r,o){var e=String(s(e)),n="<"+t;return""!==r&&(n+=" "+r+'="'+String(o).replace(i,"&quot;")+'"'),n+">"+e+"</"+t+">"}},{"../internals/require-object-coercible":113}],37:[function(e,t,r){"use strict";function o(){return this}var n=e("../internals/iterators-core").IteratorPrototype,s=e("../internals/object-create"),i=e("../internals/create-property-descriptor"),a=e("../internals/set-to-string-tag"),l=e("../internals/iterators");t.exports=function(e,t,r){t+=" Iterator";return e.prototype=s(n,{next:i(1,r)}),a(e,t,!1,!0),l[t]=o,e}},{"../internals/create-property-descriptor":39,"../internals/iterators":79,"../internals/iterators-core":78,"../internals/object-create":90,"../internals/set-to-string-tag":117}],38:[function(e,t,r){var o=e("../internals/descriptors"),n=e("../internals/object-define-property"),s=e("../internals/create-property-descriptor");t.exports=o?function(e,t,r){return n.f(e,t,s(1,r))}:function(e,t,r){return e[t]=r,e}},{"../internals/create-property-descriptor":39,"../internals/descriptors":43,"../internals/object-define-property":92}],39:[function(e,t,r){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],40:[function(e,t,r){"use strict";var o=e("../internals/to-primitive"),n=e("../internals/object-define-property"),s=e("../internals/create-property-descriptor");t.exports=function(e,t,r){t=o(t);t in e?n.f(e,t,s(0,r)):e[t]=r}},{"../internals/create-property-descriptor":39,"../internals/object-define-property":92,"../internals/to-primitive":140}],41:[function(e,t,r){"use strict";function m(){return this}var y=e("../internals/export"),g=e("../internals/create-iterator-constructor"),v=e("../internals/object-get-prototype-of"),b=e("../internals/object-set-prototype-of"),j=e("../internals/set-to-string-tag"),_=e("../internals/create-non-enumerable-property"),x=e("../internals/redefine"),o=e("../internals/well-known-symbol"),w=e("../internals/is-pure"),S=e("../internals/iterators"),e=e("../internals/iterators-core"),T=e.IteratorPrototype,M=e.BUGGY_SAFARI_ITERATORS,E=o("iterator"),k="values",C="entries";t.exports=function(e,t,r,o,n,s,i){g(r,t,o);function a(e){if(e===n&&f)return f;if(!M&&e in d)return d[e];switch(e){case"keys":case k:case C:return function(){return new r(this,e)}}return function(){return new r(this)}}var l,u,o=t+" Iterator",c=!1,d=e.prototype,h=d[E]||d["@@iterator"]||n&&d[n],f=!M&&h||a(n),p="Array"==t&&d.entries||h;if(p&&(p=v(p.call(new e)),T!==Object.prototype&&p.next&&(w||v(p)===T||(b?b(p,T):"function"!=typeof p[E]&&_(p,E,m)),j(p,o,!0,!0),w&&(S[o]=m))),n==k&&h&&h.name!==k&&(c=!0,f=function(){return h.call(this)}),w&&!i||d[E]===f||_(d,E,f),S[t]=f,n)if(l={values:a(k),keys:s?f:a("keys"),entries:a(C)},i)for(u in l)!M&&!c&&u in d||x(d,u,l[u]);else y({target:t,proto:!0,forced:M||c},l);return l}},{"../internals/create-iterator-constructor":37,"../internals/create-non-enumerable-property":38,"../internals/export":50,"../internals/is-pure":75,"../internals/iterators":79,"../internals/iterators-core":78,"../internals/object-get-prototype-of":97,"../internals/object-set-prototype-of":101,"../internals/redefine":108,"../internals/set-to-string-tag":117,"../internals/well-known-symbol":148}],42:[function(e,t,r){var o=e("../internals/path"),n=e("../internals/has"),s=e("../internals/well-known-symbol-wrapped"),i=e("../internals/object-define-property").f;t.exports=function(e){var t=o.Symbol||(o.Symbol={});n(t,e)||i(t,e,{value:s.f(e)})}},{"../internals/has":60,"../internals/object-define-property":92,"../internals/path":104,"../internals/well-known-symbol-wrapped":147}],43:[function(e,t,r){e=e("../internals/fails");t.exports=!e(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})},{"../internals/fails":51}],44:[function(e,t,r){var o=e("../internals/global"),e=e("../internals/is-object"),n=o.document,s=e(n)&&e(n.createElement);t.exports=function(e){return s?n.createElement(e):{}}},{"../internals/global":59,"../internals/is-object":74}],45:[function(e,t,r){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},{}],46:[function(e,t,r){e=e("../internals/engine-user-agent");t.exports=/(iphone|ipod|ipad).*applewebkit/i.test(e)},{"../internals/engine-user-agent":47}],47:[function(e,t,r){e=e("../internals/get-built-in");t.exports=e("navigator","userAgent")||""},{"../internals/get-built-in":56}],48:[function(e,t,r){var o,n,s=e("../internals/global"),e=e("../internals/engine-user-agent"),s=s.process,s=s&&s.versions,s=s&&s.v8;s?n=(o=s.split("."))[0]+o[1]:e&&(!(o=e.match(/Edge\/(\d+)/))||74<=o[1])&&(o=e.match(/Chrome\/(\d+)/))&&(n=o[1]),t.exports=n&&+n},{"../internals/engine-user-agent":47,"../internals/global":59}],49:[function(e,t,r){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],50:[function(e,t,r){var u=e("../internals/global"),c=e("../internals/object-get-own-property-descriptor").f,d=e("../internals/create-non-enumerable-property"),h=e("../internals/redefine"),f=e("../internals/set-global"),p=e("../internals/copy-constructor-properties"),m=e("../internals/is-forced");t.exports=function(e,t){var r,o,n,s=e.target,i=e.global,a=e.stat,l=i?u:a?u[s]||f(s,{}):(u[s]||{}).prototype;if(l)for(r in t){if(o=t[r],n=e.noTargetGet?(n=c(l,r))&&n.value:l[r],!m(i?r:s+(a?".":"#")+r,e.forced)&&void 0!==n){if(typeof o==typeof n)continue;p(o,n)}(e.sham||n&&n.sham)&&d(o,"sham",!0),h(l,r,o,e)}}},{"../internals/copy-constructor-properties":33,"../internals/create-non-enumerable-property":38,"../internals/global":59,"../internals/is-forced":73,"../internals/object-get-own-property-descriptor":93,"../internals/redefine":108,"../internals/set-global":115}],51:[function(e,t,r){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],52:[function(e,t,r){"use strict";e("../modules/es.regexp.exec");var u=e("../internals/redefine"),c=e("../internals/fails"),d=e("../internals/well-known-symbol"),h=e("../internals/regexp-exec"),f=e("../internals/create-non-enumerable-property"),p=d("species"),m=!c(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),y="$0"==="a".replace(/./,"$0"),e=d("replace"),g=!!/./[e]&&""===/./[e]("a","$0"),v=!c(function(){var e=/(?:)/,t=e.exec,e=(e.exec=function(){return t.apply(this,arguments)},"ab".split(e));return 2!==e.length||"a"!==e[0]||"b"!==e[1]});t.exports=function(r,e,t,o){var s,n,i=d(r),a=!c(function(){var e={};return e[i]=function(){return 7},7!=""[r](e)}),l=a&&!c(function(){var e=!1,t=/a/;return"split"===r&&((t={constructor:{}}).constructor[p]=function(){return t},t.flags="",t[i]=/./[i]),t.exec=function(){return e=!0,null},t[i](""),!e});a&&l&&("replace"!==r||m&&y&&!g)&&("split"!==r||v)||(s=/./[i],t=(l=t(i,""[r],function(e,t,r,o,n){return t.exec===h?a&&!n?{done:!0,value:s.call(t,r,o)}:{done:!0,value:e.call(r,t,o)}:{done:!1}},{REPLACE_KEEPS_$0:y,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:g}))[0],n=l[1],u(String.prototype,r,t),u(RegExp.prototype,i,2==e?function(e,t){return n.call(e,this,t)}:function(e){return n.call(e,this)})),o&&f(RegExp.prototype[i],"sham",!0)}},{"../internals/create-non-enumerable-property":38,"../internals/fails":51,"../internals/redefine":108,"../internals/regexp-exec":110,"../internals/well-known-symbol":148,"../modules/es.regexp.exec":187}],53:[function(e,t,r){e=e("../internals/fails");t.exports=!e(function(){return Object.isExtensible(Object.preventExtensions({}))})},{"../internals/fails":51}],54:[function(e,t,r){var s=e("../internals/a-function");t.exports=function(o,n,e){if(s(o),void 0===n)return o;switch(e){case 0:return function(){return o.call(n)};case 1:return function(e){return o.call(n,e)};case 2:return function(e,t){return o.call(n,e,t)};case 3:return function(e,t,r){return o.call(n,e,t,r)}}return function(){return o.apply(n,arguments)}}},{"../internals/a-function":5}],55:[function(e,t,r){"use strict";var o=e("../internals/a-function"),n=e("../internals/is-object"),c=[].slice,d={};t.exports=Function.bind||function(i){var a=o(this),l=c.call(arguments,1),u=function(){var e=l.concat(c.call(arguments));if(this instanceof u){var t=a,r=e.length,o=e;if(!(r in d)){for(var n=[],s=0;s<r;s++)n[s]="a["+s+"]";d[r]=Function("C,a","return new C("+n.join(",")+")")}return d[r](t,o)}return a.apply(i,e)};return n(a.prototype)&&(u.prototype=a.prototype),u}},{"../internals/a-function":5,"../internals/is-object":74}],56:[function(e,t,r){function o(e){return"function"==typeof e?e:void 0}var n=e("../internals/path"),s=e("../internals/global");t.exports=function(e,t){return arguments.length<2?o(n[e])||o(s[e]):n[e]&&n[e][t]||s[e]&&s[e][t]}},{"../internals/global":59,"../internals/path":104}],57:[function(e,t,r){var o=e("../internals/classof"),n=e("../internals/iterators"),s=e("../internals/well-known-symbol")("iterator");t.exports=function(e){if(null!=e)return e[s]||e["@@iterator"]||n[o(e)]}},{"../internals/classof":29,"../internals/iterators":79,"../internals/well-known-symbol":148}],58:[function(e,t,r){var o=e("../internals/an-object"),n=e("../internals/get-iterator-method");t.exports=function(e){var t=n(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return o(t.call(e))}},{"../internals/an-object":10,"../internals/get-iterator-method":57}],59:[function(e,r,t){!function(e){function t(e){return e&&e.Math==Math&&e}r.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof e&&e)||Function("return this")()}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],60:[function(e,t,r){var o={}.hasOwnProperty;t.exports=function(e,t){return o.call(e,t)}},{}],61:[function(e,t,r){t.exports={}},{}],62:[function(e,t,r){var o=e("../internals/global");t.exports=function(e,t){var r=o.console;r&&r.error&&(1===arguments.length?r.error(e):r.error(e,t))}},{"../internals/global":59}],63:[function(e,t,r){e=e("../internals/get-built-in");t.exports=e("document","documentElement")},{"../internals/get-built-in":56}],64:[function(e,t,r){var o=e("../internals/descriptors"),n=e("../internals/fails"),s=e("../internals/document-create-element");t.exports=!o&&!n(function(){return 7!=Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a})},{"../internals/descriptors":43,"../internals/document-create-element":44,"../internals/fails":51}],65:[function(e,t,r){var h=Math.abs,f=Math.pow,p=Math.floor,m=Math.log,y=Math.LN2;t.exports={pack:function(e,t,r){var o,n,s,i=new Array(r),a=8*r-t-1,r=(1<<a)-1,l=r>>1,u=23===t?f(2,-24)-f(2,-77):0,c=e<0||0===e&&1/e<0?1:0,d=0;for((e=h(e))!=e||e===1/0?(n=e!=e?1:0,o=r):(o=p(m(e)/y),e*(s=f(2,-o))<1&&(o--,s*=2),2<=(e+=1<=o+l?u/s:u*f(2,1-l))*s&&(o++,s/=2),r<=o+l?(n=0,o=r):1<=o+l?(n=(e*s-1)*f(2,t),o+=l):(n=e*f(2,l-1)*f(2,t),o=0));8<=t;i[d++]=255&n,n/=256,t-=8);for(o=o<<t|n,a+=t;0<a;i[d++]=255&o,o/=256,a-=8);return i[--d]|=128*c,i},unpack:function(e,t){var r,o=e.length,n=8*o-t-1,s=(1<<n)-1,i=s>>1,a=n-7,l=o-1,n=e[l--],u=127&n;for(n>>=7;0<a;u=256*u+e[l],l--,a-=8);for(r=u&(1<<-a)-1,u>>=-a,a+=t;0<a;r=256*r+e[l],l--,a-=8);if(0===u)u=1-i;else{if(u===s)return r?NaN:n?-1/0:1/0;r+=f(2,t),u-=i}return(n?-1:1)*r*f(2,u-t)}}},{}],66:[function(e,t,r){var o=e("../internals/fails"),n=e("../internals/classof-raw"),s="".split;t.exports=o(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return"String"==n(e)?s.call(e,""):Object(e)}:Object},{"../internals/classof-raw":28,"../internals/fails":51}],67:[function(e,t,r){var o=e("../internals/is-object"),n=e("../internals/object-set-prototype-of");t.exports=function(e,t,r){return n&&"function"==typeof(t=t.constructor)&&t!==r&&o(t=t.prototype)&&t!==r.prototype&&n(e,t),e}},{"../internals/is-object":74,"../internals/object-set-prototype-of":101}],68:[function(e,t,r){var e=e("../internals/shared-store"),o=Function.toString;"function"!=typeof e.inspectSource&&(e.inspectSource=function(e){return o.call(e)}),t.exports=e.inspectSource},{"../internals/shared-store":119}],69:[function(e,t,r){function o(e){a(e,c,{value:{objectID:"O"+ ++d,weakData:{}}})}var n=e("../internals/hidden-keys"),s=e("../internals/is-object"),i=e("../internals/has"),a=e("../internals/object-define-property").f,l=e("../internals/uid"),u=e("../internals/freezing"),c=l("meta"),d=0,h=Object.isExtensible||function(){return!0},f=t.exports={REQUIRED:!1,fastKey:function(e,t){if(!s(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,c)){if(!h(e))return"F";if(!t)return"E";o(e)}return e[c].objectID},getWeakData:function(e,t){if(!i(e,c)){if(!h(e))return!0;if(!t)return!1;o(e)}return e[c].weakData},onFreeze:function(e){return u&&f.REQUIRED&&h(e)&&!i(e,c)&&o(e),e}};n[c]=!0},{"../internals/freezing":53,"../internals/has":60,"../internals/hidden-keys":61,"../internals/is-object":74,"../internals/object-define-property":92,"../internals/uid":145}],70:[function(e,t,r){var o,n,s,i,a,l,u,c,d=e("../internals/native-weak-map"),h=e("../internals/global"),f=e("../internals/is-object"),p=e("../internals/create-non-enumerable-property"),m=e("../internals/has"),y=e("../internals/shared-key"),e=e("../internals/hidden-keys"),h=h.WeakMap;u=d?(o=new h,n=o.get,s=o.has,i=o.set,a=function(e,t){return i.call(o,e,t),t},l=function(e){return n.call(o,e)||{}},function(e){return s.call(o,e)}):(e[c=y("state")]=!0,a=function(e,t){return p(e,c,t),t},l=function(e){return m(e,c)?e[c]:{}},function(e){return m(e,c)}),t.exports={set:a,get:l,has:u,enforce:function(e){return u(e)?l(e):a(e,{})},getterFor:function(t){return function(e){if(f(e)&&(e=l(e)).type===t)return e;throw TypeError("Incompatible receiver, "+t+" required")}}}},{"../internals/create-non-enumerable-property":38,"../internals/global":59,"../internals/has":60,"../internals/hidden-keys":61,"../internals/is-object":74,"../internals/native-weak-map":85,"../internals/shared-key":118}],71:[function(e,t,r){var o=e("../internals/well-known-symbol"),n=e("../internals/iterators"),s=o("iterator"),i=Array.prototype;t.exports=function(e){return void 0!==e&&(n.Array===e||i[s]===e)}},{"../internals/iterators":79,"../internals/well-known-symbol":148}],72:[function(e,t,r){var o=e("../internals/classof-raw");t.exports=Array.isArray||function(e){return"Array"==o(e)}},{"../internals/classof-raw":28}],73:[function(e,t,r){function o(e,t){return(e=a[i(e)])==u||e!=l&&("function"==typeof t?n(t):!!t)}var n=e("../internals/fails"),s=/#|\.prototype\./,i=o.normalize=function(e){return String(e).replace(s,".").toLowerCase()},a=o.data={},l=o.NATIVE="N",u=o.POLYFILL="P";t.exports=o},{"../internals/fails":51}],74:[function(e,t,r){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],75:[function(e,t,r){t.exports=!1},{}],76:[function(e,t,r){var o=e("../internals/is-object"),n=e("../internals/classof-raw"),s=e("../internals/well-known-symbol")("match");t.exports=function(e){var t;return o(e)&&(void 0!==(t=e[s])?!!t:"RegExp"==n(e))}},{"../internals/classof-raw":28,"../internals/is-object":74,"../internals/well-known-symbol":148}],77:[function(e,t,r){function h(e,t){this.stopped=e,this.result=t}var f=e("../internals/an-object"),p=e("../internals/is-array-iterator-method"),m=e("../internals/to-length"),y=e("../internals/function-bind-context"),g=e("../internals/get-iterator-method"),v=e("../internals/call-with-safe-iteration-closing");(t.exports=function(e,t,r,o,n){var s,i,a,l,u,c,d=y(t,r,o?2:1);if(n)s=e;else{if("function"!=typeof(t=g(e)))throw TypeError("Target is not iterable");if(p(t)){for(i=0,a=m(e.length);i<a;i++)if((l=o?d(f(c=e[i])[0],c[1]):d(e[i]))&&l instanceof h)return l;return new h(!1)}s=t.call(e)}for(u=s.next;!(c=u.call(s)).done;)if("object"==typeof(l=v(s,d,c.value,o))&&l&&l instanceof h)return l;return new h(!1)}).stop=function(e){return new h(!0,e)}},{"../internals/an-object":10,"../internals/call-with-safe-iteration-closing":26,"../internals/function-bind-context":54,"../internals/get-iterator-method":57,"../internals/is-array-iterator-method":71,"../internals/to-length":136}],78:[function(e,t,r){"use strict";var o,n,s=e("../internals/object-get-prototype-of"),i=e("../internals/create-non-enumerable-property"),a=e("../internals/has"),l=e("../internals/well-known-symbol"),e=e("../internals/is-pure"),l=l("iterator"),u=!1;[].keys&&("next"in(n=[].keys())?(s=s(s(n)))!==Object.prototype&&(o=s):u=!0),null==o&&(o={}),e||a(o,l)||i(o,l,function(){return this}),t.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:u}},{"../internals/create-non-enumerable-property":38,"../internals/has":60,"../internals/is-pure":75,"../internals/object-get-prototype-of":97,"../internals/well-known-symbol":148}],79:[function(e,t,r){t.exports={}},{}],80:[function(e,t,r){t.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},{}],81:[function(e,t,r){var o,n,s,i,a,l,u,c,d=e("../internals/global"),h=e("../internals/object-get-own-property-descriptor").f,f=e("../internals/classof-raw"),p=e("../internals/task").set,e=e("../internals/engine-is-ios"),m=d.MutationObserver||d.WebKitMutationObserver,y=d.process,g=d.Promise,v="process"==f(y),f=h(d,"queueMicrotask"),h=f&&f.value;h||(o=function(){var e,t;for(v&&(e=y.domain)&&e.exit();n;){t=n.fn,n=n.next;try{t()}catch(e){throw n?i():s=void 0,e}}s=void 0,e&&e.enter()},i=v?function(){y.nextTick(o)}:m&&!e?(a=!0,l=document.createTextNode(""),new m(o).observe(l,{characterData:!0}),function(){l.data=a=!a}):g&&g.resolve?(u=g.resolve(void 0),c=u.then,function(){c.call(u,o)}):function(){p.call(d,o)}),t.exports=h||function(e){e={fn:e,next:void 0};s&&(s.next=e),n||(n=e,i()),s=e}},{"../internals/classof-raw":28,"../internals/engine-is-ios":46,"../internals/global":59,"../internals/object-get-own-property-descriptor":93,"../internals/task":130}],82:[function(e,t,r){e=e("../internals/global");t.exports=e.Promise},{"../internals/global":59}],83:[function(e,t,r){e=e("../internals/fails");t.exports=!!Object.getOwnPropertySymbols&&!e(function(){return!String(Symbol())})},{"../internals/fails":51}],84:[function(e,t,r){var o=e("../internals/fails"),n=e("../internals/well-known-symbol"),s=e("../internals/is-pure"),i=n("iterator");t.exports=!o(function(){var e=new URL("b?a=1&b=2&c=3","http://a"),r=e.searchParams,o="";return e.pathname="c%20d",r.forEach(function(e,t){r.delete("b"),o+=t+e}),s&&!e.toJSON||!r.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==r.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!r[i]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==o||"x"!==new URL("http://x",void 0).host})},{"../internals/fails":51,"../internals/is-pure":75,"../internals/well-known-symbol":148}],85:[function(e,t,r){var o=e("../internals/global"),e=e("../internals/inspect-source"),o=o.WeakMap;t.exports="function"==typeof o&&/native code/.test(e(o))},{"../internals/global":59,"../internals/inspect-source":68}],86:[function(e,t,r){"use strict";function o(e){var r,o;this.promise=new e(function(e,t){if(void 0!==r||void 0!==o)throw TypeError("Bad Promise constructor");r=e,o=t}),this.resolve=n(r),this.reject=n(o)}var n=e("../internals/a-function");t.exports.f=function(e){return new o(e)}},{"../internals/a-function":5}],87:[function(e,t,r){var o=e("../internals/is-regexp");t.exports=function(e){if(o(e))throw TypeError("The method doesn't accept regular expressions");return e}},{"../internals/is-regexp":76}],88:[function(e,t,r){var o=e("../internals/global").isFinite;t.exports=Number.isFinite||function(e){return"number"==typeof e&&o(e)}},{"../internals/global":59}],89:[function(e,t,r){"use strict";var h=e("../internals/descriptors"),o=e("../internals/fails"),f=e("../internals/object-keys"),p=e("../internals/object-get-own-property-symbols"),m=e("../internals/object-property-is-enumerable"),y=e("../internals/to-object"),g=e("../internals/indexed-object"),n=Object.assign,s=Object.defineProperty;t.exports=!n||o(function(){var e,t,r,o;return!(!h||1===n({b:1},n(s({},"a",{enumerable:!0,get:function(){s(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)||(t={},o="abcdefghijklmnopqrst",(e={})[r=Symbol()]=7,o.split("").forEach(function(e){t[e]=e}),7!=n({},e)[r]||f(n({},t)).join("")!=o)})?function(e,t){for(var r=y(e),o=arguments.length,n=1,s=p.f,i=m.f;n<o;)for(var a,l=g(arguments[n++]),u=s?f(l).concat(s(l)):f(l),c=u.length,d=0;d<c;)a=u[d++],h&&!i.call(l,a)||(r[a]=l[a]);return r}:n},{"../internals/descriptors":43,"../internals/fails":51,"../internals/indexed-object":66,"../internals/object-get-own-property-symbols":96,"../internals/object-keys":99,"../internals/object-property-is-enumerable":100,"../internals/to-object":137}],90:[function(e,t,r){function o(){}var n,s=e("../internals/an-object"),i=e("../internals/object-define-properties"),a=e("../internals/enum-bug-keys"),l=e("../internals/hidden-keys"),u=e("../internals/html"),c=e("../internals/document-create-element"),e=e("../internals/shared-key"),d="prototype",h="script",f=e("IE_PROTO"),p=function(e){return"<"+h+">"+e+"</"+h+">"},m=function(){try{n=document.domain&&new ActiveXObject("htmlfile")}catch(e){}m=n?((e=n).write(p("")),e.close(),t=e.parentWindow.Object,e=null,t):(e=c("iframe"),t="java"+h+":",e.style.display="none",u.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F);for(var e,t,r=a.length;r--;)delete m[d][a[r]];return m()};l[f]=!0,t.exports=Object.create||function(e,t){var r;return null!==e?(o[d]=s(e),r=new o,o[d]=null,r[f]=e):r=m(),void 0===t?r:i(r,t)}},{"../internals/an-object":10,"../internals/document-create-element":44,"../internals/enum-bug-keys":49,"../internals/hidden-keys":61,"../internals/html":63,"../internals/object-define-properties":91,"../internals/shared-key":118}],91:[function(e,t,r){var o=e("../internals/descriptors"),i=e("../internals/object-define-property"),a=e("../internals/an-object"),l=e("../internals/object-keys");t.exports=o?Object.defineProperties:function(e,t){a(e);for(var r,o=l(t),n=o.length,s=0;s<n;)i.f(e,r=o[s++],t[r]);return e}},{"../internals/an-object":10,"../internals/descriptors":43,"../internals/object-define-property":92,"../internals/object-keys":99}],92:[function(e,t,r){var o=e("../internals/descriptors"),n=e("../internals/ie8-dom-define"),s=e("../internals/an-object"),i=e("../internals/to-primitive"),a=Object.defineProperty;r.f=o?a:function(e,t,r){if(s(e),t=i(t,!0),s(r),n)try{return a(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},{"../internals/an-object":10,"../internals/descriptors":43,"../internals/ie8-dom-define":64,"../internals/to-primitive":140}],93:[function(e,t,r){var o=e("../internals/descriptors"),n=e("../internals/object-property-is-enumerable"),s=e("../internals/create-property-descriptor"),i=e("../internals/to-indexed-object"),a=e("../internals/to-primitive"),l=e("../internals/has"),u=e("../internals/ie8-dom-define"),c=Object.getOwnPropertyDescriptor;r.f=o?c:function(e,t){if(e=i(e),t=a(t,!0),u)try{return c(e,t)}catch(e){}if(l(e,t))return s(!n.f.call(e,t),e[t])}},{"../internals/create-property-descriptor":39,"../internals/descriptors":43,"../internals/has":60,"../internals/ie8-dom-define":64,"../internals/object-property-is-enumerable":100,"../internals/to-indexed-object":134,"../internals/to-primitive":140}],94:[function(e,t,r){var o=e("../internals/to-indexed-object"),n=e("../internals/object-get-own-property-names").f,s={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(e){if(!i||"[object Window]"!=s.call(e))return n(o(e));try{return n(e)}catch(e){return i.slice()}}},{"../internals/object-get-own-property-names":95,"../internals/to-indexed-object":134}],95:[function(e,t,r){var o=e("../internals/object-keys-internal"),n=e("../internals/enum-bug-keys").concat("length","prototype");r.f=Object.getOwnPropertyNames||function(e){return o(e,n)}},{"../internals/enum-bug-keys":49,"../internals/object-keys-internal":98}],96:[function(e,t,r){r.f=Object.getOwnPropertySymbols},{}],97:[function(e,t,r){var o=e("../internals/has"),n=e("../internals/to-object"),s=e("../internals/shared-key"),e=e("../internals/correct-prototype-getter"),i=s("IE_PROTO"),a=Object.prototype;t.exports=e?Object.getPrototypeOf:function(e){return e=n(e),o(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},{"../internals/correct-prototype-getter":35,"../internals/has":60,"../internals/shared-key":118,"../internals/to-object":137}],98:[function(e,t,r){var i=e("../internals/has"),a=e("../internals/to-indexed-object"),l=e("../internals/array-includes").indexOf,u=e("../internals/hidden-keys");t.exports=function(e,t){var r,o=a(e),n=0,s=[];for(r in o)!i(u,r)&&i(o,r)&&s.push(r);for(;t.length>n;)!i(o,r=t[n++])||~l(s,r)||s.push(r);return s}},{"../internals/array-includes":18,"../internals/has":60,"../internals/hidden-keys":61,"../internals/to-indexed-object":134}],99:[function(e,t,r){var o=e("../internals/object-keys-internal"),n=e("../internals/enum-bug-keys");t.exports=Object.keys||function(e){return o(e,n)}},{"../internals/enum-bug-keys":49,"../internals/object-keys-internal":98}],100:[function(e,t,r){"use strict";var o={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,s=n&&!o.call({1:2},1);r.f=s?function(e){e=n(this,e);return!!e&&e.enumerable}:o},{}],101:[function(e,t,r){var n=e("../internals/an-object"),s=e("../internals/a-possible-prototype");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var r,o=!1,e={};try{(r=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(e,[]),o=e instanceof Array}catch(e){}return function(e,t){return n(e),s(t),o?r.call(e,t):e.__proto__=t,e}}():void 0)},{"../internals/a-possible-prototype":6,"../internals/an-object":10}],102:[function(e,t,r){"use strict";var o=e("../internals/to-string-tag-support"),n=e("../internals/classof");t.exports=o?{}.toString:function(){return"[object "+n(this)+"]"}},{"../internals/classof":29,"../internals/to-string-tag-support":141}],103:[function(e,t,r){var o=e("../internals/get-built-in"),n=e("../internals/object-get-own-property-names"),s=e("../internals/object-get-own-property-symbols"),i=e("../internals/an-object");t.exports=o("Reflect","ownKeys")||function(e){var t=n.f(i(e)),r=s.f;return r?t.concat(r(e)):t}},{"../internals/an-object":10,"../internals/get-built-in":56,"../internals/object-get-own-property-names":95,"../internals/object-get-own-property-symbols":96}],104:[function(e,t,r){e=e("../internals/global");t.exports=e},{"../internals/global":59}],105:[function(e,t,r){t.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},{}],106:[function(e,t,r){var o=e("../internals/an-object"),n=e("../internals/is-object"),s=e("../internals/new-promise-capability");t.exports=function(e,t){return o(e),n(t)&&t.constructor===e?t:((0,(e=s.f(e)).resolve)(t),e.promise)}},{"../internals/an-object":10,"../internals/is-object":74,"../internals/new-promise-capability":86}],107:[function(e,t,r){var n=e("../internals/redefine");t.exports=function(e,t,r){for(var o in t)n(e,o,t[o],r);return e}},{"../internals/redefine":108}],108:[function(e,t,r){var i=e("../internals/global"),a=e("../internals/create-non-enumerable-property"),l=e("../internals/has"),u=e("../internals/set-global"),o=e("../internals/inspect-source"),e=e("../internals/internal-state"),n=e.get,c=e.enforce,d=String(String).split("String");(t.exports=function(e,t,r,o){var n=!!o&&!!o.unsafe,s=!!o&&!!o.enumerable,o=!!o&&!!o.noTargetGet;"function"==typeof r&&("string"!=typeof t||l(r,"name")||a(r,"name",t),c(r).source=d.join("string"==typeof t?t:"")),e===i?s?e[t]=r:u(t,r):(n?!o&&e[t]&&(s=!0):delete e[t],s?e[t]=r:a(e,t,r))})(Function.prototype,"toString",function(){return"function"==typeof this&&n(this).source||o(this)})},{"../internals/create-non-enumerable-property":38,"../internals/global":59,"../internals/has":60,"../internals/inspect-source":68,"../internals/internal-state":70,"../internals/set-global":115}],109:[function(e,t,r){var o=e("./classof-raw"),n=e("./regexp-exec");t.exports=function(e,t){var r=e.exec;if("function"==typeof r){r=r.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==o(e))throw TypeError("RegExp#exec called on incompatible receiver");return n.call(e,t)}},{"./classof-raw":28,"./regexp-exec":110}],110:[function(e,t,r){"use strict";var o,n,d=e("./regexp-flags"),e=e("./regexp-sticky-helpers"),h=RegExp.prototype.exec,f=String.prototype.replace,s=h,p=(o=/a/,n=/b*/g,h.call(o,"a"),h.call(n,"a"),0!==o.lastIndex||0!==n.lastIndex),m=e.UNSUPPORTED_Y||e.BROKEN_CARET,y=void 0!==/()??/.exec("")[1];t.exports=s=p||y||m?function(e){var t,r,o,n,s=this,i=m&&s.sticky,a=d.call(s),l=s.source,u=0,c=e;return i&&(-1===(a=a.replace("y","")).indexOf("g")&&(a+="g"),c=String(e).slice(s.lastIndex),0<s.lastIndex&&(!s.multiline||s.multiline&&"\n"!==e[s.lastIndex-1])&&(l="(?: "+l+")",c=" "+c,u++),r=new RegExp("^(?:"+l+")",a)),y&&(r=new RegExp("^"+l+"$(?!\\s)",a)),p&&(t=s.lastIndex),o=h.call(i?r:s,c),i?o?(o.input=o.input.slice(u),o[0]=o[0].slice(u),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:p&&o&&(s.lastIndex=s.global?o.index+o[0].length:t),y&&o&&1<o.length&&f.call(o[0],r,function(){for(n=1;n<arguments.length-2;n++)void 0===arguments[n]&&(o[n]=void 0)}),o}:s},{"./regexp-flags":111,"./regexp-sticky-helpers":112}],111:[function(e,t,r){"use strict";var o=e("../internals/an-object");t.exports=function(){var e=o(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},{"../internals/an-object":10}],112:[function(e,t,r){"use strict";e=e("./fails");function o(e,t){return RegExp(e,t)}r.UNSUPPORTED_Y=e(function(){var e=o("a","y");return e.lastIndex=2,null!=e.exec("abcd")}),r.BROKEN_CARET=e(function(){var e=o("^r","gy");return e.lastIndex=2,null!=e.exec("str")})},{"./fails":51}],113:[function(e,t,r){t.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},{}],114:[function(e,t,r){t.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},{}],115:[function(e,t,r){var o=e("../internals/global"),n=e("../internals/create-non-enumerable-property");t.exports=function(t,r){try{n(o,t,r)}catch(e){o[t]=r}return r}},{"../internals/create-non-enumerable-property":38,"../internals/global":59}],116:[function(e,t,r){"use strict";var o=e("../internals/get-built-in"),n=e("../internals/object-define-property"),s=e("../internals/well-known-symbol"),i=e("../internals/descriptors"),a=s("species");t.exports=function(e){var e=o(e),t=n.f;i&&e&&!e[a]&&t(e,a,{configurable:!0,get:function(){return this}})}},{"../internals/descriptors":43,"../internals/get-built-in":56,"../internals/object-define-property":92,"../internals/well-known-symbol":148}],117:[function(e,t,r){var o=e("../internals/object-define-property").f,n=e("../internals/has"),s=e("../internals/well-known-symbol")("toStringTag");t.exports=function(e,t,r){e&&!n(e=r?e:e.prototype,s)&&o(e,s,{configurable:!0,value:t})}},{"../internals/has":60,"../internals/object-define-property":92,"../internals/well-known-symbol":148}],118:[function(e,t,r){var o=e("../internals/shared"),n=e("../internals/uid"),s=o("keys");t.exports=function(e){return s[e]||(s[e]=n(e))}},{"../internals/shared":120,"../internals/uid":145}],119:[function(e,t,r){var o=e("../internals/global"),e=e("../internals/set-global"),n="__core-js_shared__",o=o[n]||e(n,{});t.exports=o},{"../internals/global":59,"../internals/set-global":115}],120:[function(e,t,r){var o=e("../internals/is-pure"),n=e("../internals/shared-store");(t.exports=function(e,t){return n[e]||(n[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:o?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},{"../internals/is-pure":75,"../internals/shared-store":119}],121:[function(e,t,r){var o=e("../internals/an-object"),n=e("../internals/a-function"),s=e("../internals/well-known-symbol")("species");t.exports=function(e,t){var e=o(e).constructor;return void 0===e||null==(e=o(e)[s])?t:n(e)}},{"../internals/a-function":5,"../internals/an-object":10,"../internals/well-known-symbol":148}],122:[function(e,t,r){var o=e("../internals/fails");t.exports=function(t){return o(function(){var e=""[t]('"');return e!==e.toLowerCase()||3<e.split('"').length})}},{"../internals/fails":51}],123:[function(e,t,r){function o(n){return function(e,t){var r,e=String(i(e)),t=s(t),o=e.length;return t<0||o<=t?n?"":void 0:(r=e.charCodeAt(t))<55296||56319<r||t+1===o||(o=e.charCodeAt(t+1))<56320||57343<o?n?e.charAt(t):r:n?e.slice(t,t+2):o-56320+(r-55296<<10)+65536}}var s=e("../internals/to-integer"),i=e("../internals/require-object-coercible");t.exports={codeAt:o(!1),charAt:o(!0)}},{"../internals/require-object-coercible":113,"../internals/to-integer":135}],124:[function(e,t,r){e=e("../internals/engine-user-agent");t.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(e)},{"../internals/engine-user-agent":47}],125:[function(e,t,r){function o(n){return function(e,t,r){var e=String(a(e)),o=e.length,r=void 0===r?" ":String(r),t=s(t);return t<=o||""==r?e:((o=i.call(r,l((t=t-o)/r.length))).length>t&&(o=o.slice(0,t)),n?e+o:o+e)}}var s=e("../internals/to-length"),i=e("../internals/string-repeat"),a=e("../internals/require-object-coercible"),l=Math.ceil;t.exports={start:o(!1),end:o(!0)}},{"../internals/require-object-coercible":113,"../internals/string-repeat":127,"../internals/to-length":136}],126:[function(e,t,r){"use strict";function g(e){return e+22+75*(e<26)}function s(e){var t,r=[],o=(e=function(e){for(var t=[],r=0,o=e.length;r<o;){var n,s=e.charCodeAt(r++);55296<=s&&s<=56319&&r<o?56320==(64512&(n=e.charCodeAt(r++)))?t.push(((1023&s)<<10)+(1023&n)+65536):(t.push(s),r--):t.push(s)}return t}(e)).length,n=128,s=0,i=72;for(c=0;c<e.length;c++)(t=e[c])<128&&r.push(M(t));var a=r.length,l=a;for(a&&r.push("-");l<o;){for(var u=v,c=0;c<e.length;c++)n<=(t=e[c])&&t<u&&(u=t);var d=l+1;if(u-n>T((v-s)/d))throw RangeError(w);for(s+=(u-n)*d,n=u,c=0;c<e.length;c++){if((t=e[c])<n&&++s>v)throw RangeError(w);if(t==n){for(var h=s,f=b;;f+=b){var p=f<=i?1:i+j<=f?j:f-i;if(h<p)break;var m=h-p,y=b-p;r.push(M(g(p+m%y))),h=T(m/y)}r.push(M(g(h))),i=function(e,t,r){var o=0;for(e=r?T(e/x):e>>1,e+=T(e/t);S*j>>1<e;o+=b)e=T(e/S);return T(o+(S+1)*e/(e+_))}(s,d,l==a),s=0,++l}}++s,++n}return r.join("")}var v=2147483647,b=36,j=26,_=38,x=700,i=/[^\0-\u007E]/,a=/[.\u3002\uFF0E\uFF61]/g,w="Overflow: input needs wider integers to process",S=b-1,T=Math.floor,M=String.fromCharCode;t.exports=function(e){for(var t,r=[],o=e.toLowerCase().replace(a,".").split("."),n=0;n<o.length;n++)t=o[n],r.push(i.test(t)?"xn--"+s(t):t);return r.join(".")}},{}],127:[function(e,t,r){"use strict";var n=e("../internals/to-integer"),s=e("../internals/require-object-coercible");t.exports="".repeat||function(e){var t=String(s(this)),r="",o=n(e);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;0<o;(o>>>=1)&&(t+=t))1&o&&(r+=t);return r}},{"../internals/require-object-coercible":113,"../internals/to-integer":135}],128:[function(e,t,r){var o=e("../internals/fails"),n=e("../internals/whitespaces");t.exports=function(e){return o(function(){return!!n[e]()||"…"!="…"[e]()||n[e].name!==e})}},{"../internals/fails":51,"../internals/whitespaces":149}],129:[function(e,t,r){function o(t){return function(e){e=String(n(e));return 1&t&&(e=e.replace(s,"")),e=2&t?e.replace(i,""):e}}var n=e("../internals/require-object-coercible"),e="["+e("../internals/whitespaces")+"]",s=RegExp("^"+e+e+"*"),i=RegExp(e+e+"*$");t.exports={start:o(1),end:o(2),trim:o(3)}},{"../internals/require-object-coercible":113,"../internals/whitespaces":149}],130:[function(e,t,r){function o(e){return function(){x(e)}}function n(e){x(e.data)}function s(e){a.postMessage(e+"",f.protocol+"//"+f.host)}var i,a=e("../internals/global"),l=e("../internals/fails"),u=e("../internals/classof-raw"),c=e("../internals/function-bind-context"),d=e("../internals/html"),h=e("../internals/document-create-element"),e=e("../internals/engine-is-ios"),f=a.location,p=a.setImmediate,m=a.clearImmediate,y=a.process,g=a.MessageChannel,v=a.Dispatch,b=0,j={},_="onreadystatechange",x=function(e){var t;j.hasOwnProperty(e)&&(t=j[e],delete j[e],t())};p&&m||(p=function(e){for(var t=[],r=1;r<arguments.length;)t.push(arguments[r++]);return j[++b]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},i(b),b},m=function(e){delete j[e]},"process"==u(y)?i=function(e){y.nextTick(o(e))}:v&&v.now?i=function(e){v.now(o(e))}:g&&!e?(e=(u=new g).port2,u.port1.onmessage=n,i=c(e.postMessage,e,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||l(s)||"file:"===f.protocol?i=_ in h("script")?function(e){d.appendChild(h("script"))[_]=function(){d.removeChild(this),x(e)}}:function(e){setTimeout(o(e),0)}:(i=s,a.addEventListener("message",n,!1))),t.exports={set:p,clear:m}},{"../internals/classof-raw":28,"../internals/document-create-element":44,"../internals/engine-is-ios":46,"../internals/fails":51,"../internals/function-bind-context":54,"../internals/global":59,"../internals/html":63}],131:[function(e,t,r){var o=e("../internals/classof-raw");t.exports=function(e){if("number"!=typeof e&&"Number"!=o(e))throw TypeError("Incorrect invocation");return+e}},{"../internals/classof-raw":28}],132:[function(e,t,r){var o=e("../internals/to-integer"),n=Math.max,s=Math.min;t.exports=function(e,t){e=o(e);return e<0?n(e+t,0):s(e,t)}},{"../internals/to-integer":135}],133:[function(e,t,r){var o=e("../internals/to-integer"),n=e("../internals/to-length");t.exports=function(e){if(void 0===e)return 0;var e=o(e),t=n(e);if(e!==t)throw RangeError("Wrong length or index");return t}},{"../internals/to-integer":135,"../internals/to-length":136}],134:[function(e,t,r){var o=e("../internals/indexed-object"),n=e("../internals/require-object-coercible");t.exports=function(e){return o(n(e))}},{"../internals/indexed-object":66,"../internals/require-object-coercible":113}],135:[function(e,t,r){var o=Math.ceil,n=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(0<e?n:o)(e)}},{}],136:[function(e,t,r){var o=e("../internals/to-integer"),n=Math.min;t.exports=function(e){return 0<e?n(o(e),9007199254740991):0}},{"../internals/to-integer":135}],137:[function(e,t,r){var o=e("../internals/require-object-coercible");t.exports=function(e){return Object(o(e))}},{"../internals/require-object-coercible":113}],138:[function(e,t,r){var o=e("../internals/to-positive-integer");t.exports=function(e,t){e=o(e);if(e%t)throw RangeError("Wrong offset");return e}},{"../internals/to-positive-integer":139}],139:[function(e,t,r){var o=e("../internals/to-integer");t.exports=function(e){e=o(e);if(e<0)throw RangeError("The argument can't be less than 0");return e}},{"../internals/to-integer":135}],140:[function(e,t,r){var n=e("../internals/is-object");t.exports=function(e,t){if(!n(e))return e;var r,o;if(t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e))||"function"==typeof(r=e.valueOf)&&!n(o=r.call(e))||!t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},{"../internals/is-object":74}],141:[function(e,t,r){var o={};o[e("../internals/well-known-symbol")("toStringTag")]="z",t.exports="[object z]"===String(o)},{"../internals/well-known-symbol":148}],142:[function(e,t,D){"use strict";function f(e,t){for(var r=0,o=t.length,n=new(Q(e))(o);r<o;)n[r]=t[r++];return n}function r(e,t){M(e,t,{get:function(){return T(this)[t]}})}function p(e){return e instanceof k||"ArrayBuffer"==(e=B(e))||"SharedArrayBuffer"==e}function o(e,t){return L(e)&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)}function n(e,t){return o(e,t=d(t,!0))?U(2,e[t]):X(e,t)}function s(e,t,r){return!(o(e,t=d(t,!0))&&b(r)&&h(r,"value"))||h(r,"get")||h(r,"set")||r.configurable||h(r,"writable")&&!r.writable||h(r,"enumerable")&&!r.enumerable?M(e,t,r):(e[t]=r.value,e)}var a=e("../internals/export"),l=e("../internals/global"),i=e("../internals/descriptors"),F=e("../internals/typed-array-constructors-require-wrappers"),u=e("../internals/array-buffer-view-core"),c=e("../internals/array-buffer"),m=e("../internals/an-instance"),U=e("../internals/create-property-descriptor"),y=e("../internals/create-non-enumerable-property"),N=e("../internals/to-length"),g=e("../internals/to-index"),v=e("../internals/to-offset"),d=e("../internals/to-primitive"),h=e("../internals/has"),B=e("../internals/classof"),b=e("../internals/is-object"),G=e("../internals/object-create"),j=e("../internals/object-set-prototype-of"),V=e("../internals/object-get-own-property-names").f,_=e("../internals/typed-array-from"),z=e("../internals/array-iteration").forEach,H=e("../internals/set-species"),x=e("../internals/object-define-property"),w=e("../internals/object-get-own-property-descriptor"),S=e("../internals/internal-state"),W=e("../internals/inherit-if-required"),T=S.get,q=S.set,M=x.f,X=w.f,Y=Math.round,E=l.RangeError,k=c.ArrayBuffer,Z=c.DataView,C=u.NATIVE_ARRAY_BUFFER_VIEWS,O=u.TYPED_ARRAY_TAG,P=u.TypedArray,A=u.TypedArrayPrototype,Q=u.aTypedArrayConstructor,L=u.isTypedArray,R="BYTES_PER_ELEMENT",I="Wrong length";i?(C||(w.f=n,x.f=s,r(A,"buffer"),r(A,"byteOffset"),r(A,"byteLength"),r(A,"length")),a({target:"Object",stat:!0,forced:!C},{getOwnPropertyDescriptor:n,defineProperty:s}),t.exports=function(e,t,n){function u(e,o){M(e,o,{get:function(){var e=this,t=o;return(e=T(e)).view[r](t*c+e.byteOffset,!0)},set:function(e){var t=this,r=o;t=T(t),n&&(e=(e=Y(e))<0?0:255<e?255:255&e),t.view[s](r*c+t.byteOffset,e,!0)},enumerable:!0})}var c=e.match(/\d+$/)[0]/8,d=e+(n?"Clamped":"")+"Array",r="get"+e,s="set"+e,i=l[d],h=i,e=h&&h.prototype,o={};C?F&&(h=t(function(e,t,r,o){return m(e,h,d),W(b(t)?p(t)?void 0!==o?new i(t,v(r,c),o):void 0!==r?new i(t,v(r,c)):new i(t):L(t)?f(h,t):_.call(h,t):new i(g(t)),e,h)}),j&&j(h,P),z(V(i),function(e){e in h||y(h,e,i[e])}),h.prototype=e):(h=t(function(e,t,r,o){m(e,h,d);var n,s,i=0,a=0;if(b(t)){if(!p(t))return L(t)?f(h,t):_.call(h,t);var l=t,a=v(r,c),r=t.byteLength;if(void 0===o){if(r%c)throw E(I);if((n=r-a)<0)throw E(I)}else if(r<(n=N(o)*c)+a)throw E(I);s=n/c}else s=g(t),l=new k(n=s*c);for(q(e,{buffer:l,byteOffset:a,byteLength:n,length:s,view:new Z(l)});i<s;)u(e,i++)}),j&&j(h,P),e=h.prototype=G(A)),e.constructor!==h&&y(e,"constructor",h),O&&y(e,O,d),o[d]=h,a({global:!0,forced:h!=i,sham:!C},o),R in h||y(h,R,c),R in e||y(e,R,c),H(d)}):t.exports=function(){}},{"../internals/an-instance":9,"../internals/array-buffer":13,"../internals/array-buffer-view-core":12,"../internals/array-iteration":19,"../internals/classof":29,"../internals/create-non-enumerable-property":38,"../internals/create-property-descriptor":39,"../internals/descriptors":43,"../internals/export":50,"../internals/global":59,"../internals/has":60,"../internals/inherit-if-required":67,"../internals/internal-state":70,"../internals/is-object":74,"../internals/object-create":90,"../internals/object-define-property":92,"../internals/object-get-own-property-descriptor":93,"../internals/object-get-own-property-names":95,"../internals/object-set-prototype-of":101,"../internals/set-species":116,"../internals/to-index":133,"../internals/to-length":136,"../internals/to-offset":138,"../internals/to-primitive":140,"../internals/typed-array-constructors-require-wrappers":143,"../internals/typed-array-from":144}],143:[function(e,t,r){var o=e("../internals/global"),n=e("../internals/fails"),s=e("../internals/check-correctness-of-iteration"),e=e("../internals/array-buffer-view-core").NATIVE_ARRAY_BUFFER_VIEWS,i=o.ArrayBuffer,a=o.Int8Array;t.exports=!e||!n(function(){a(1)})||!n(function(){new a(-1)})||!s(function(e){new a,new a(null),new a(1.5),new a(e)},!0)||n(function(){return 1!==new a(new i(2),1,void 0).length})},{"../internals/array-buffer-view-core":12,"../internals/check-correctness-of-iteration":27,"../internals/fails":51,"../internals/global":59}],144:[function(e,t,r){var h=e("../internals/to-object"),f=e("../internals/to-length"),p=e("../internals/get-iterator-method"),m=e("../internals/is-array-iterator-method"),y=e("../internals/function-bind-context"),g=e("../internals/array-buffer-view-core").aTypedArrayConstructor;t.exports=function(e){var t,r,o,n,s,i,a=h(e),l=arguments.length,u=1<l?arguments[1]:void 0,c=void 0!==u,d=p(a);if(null!=d&&!m(d))for(i=(s=d.call(a)).next,a=[];!(n=i.call(s)).done;)a.push(n.value);for(c&&2<l&&(u=y(u,arguments[2],2)),r=f(a.length),o=new(g(this))(r),t=0;t<r;t++)o[t]=c?u(a[t],t):a[t];return o}},{"../internals/array-buffer-view-core":12,"../internals/function-bind-context":54,"../internals/get-iterator-method":57,"../internals/is-array-iterator-method":71,"../internals/to-length":136,"../internals/to-object":137}],145:[function(e,t,r){var o=0,n=Math.random();t.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++o+n).toString(36)}},{}],146:[function(e,t,r){e=e("../internals/native-symbol");t.exports=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},{"../internals/native-symbol":83}],147:[function(e,t,r){e=e("../internals/well-known-symbol");r.f=e},{"../internals/well-known-symbol":148}],148:[function(e,t,r){var o=e("../internals/global"),n=e("../internals/shared"),s=e("../internals/has"),i=e("../internals/uid"),a=e("../internals/native-symbol"),e=e("../internals/use-symbol-as-uid"),l=n("wks"),u=o.Symbol,c=e?u:u&&u.withoutSetter||i;t.exports=function(e){return s(l,e)||(a&&s(u,e)?l[e]=u[e]:l[e]=c("Symbol."+e)),l[e]}},{"../internals/global":59,"../internals/has":60,"../internals/native-symbol":83,"../internals/shared":120,"../internals/uid":145,"../internals/use-symbol-as-uid":146}],149:[function(e,t,r){t.exports="\t\n\v\f\r    \u2028\u2029\ufeff"},{}],150:[function(e,t,r){"use strict";var o=e("../internals/export"),n=e("../internals/global"),s=e("../internals/array-buffer"),e=e("../internals/set-species"),i="ArrayBuffer",s=s[i];o({global:!0,forced:n[i]!==s},{ArrayBuffer:s}),e(i)},{"../internals/array-buffer":13,"../internals/export":50,"../internals/global":59,"../internals/set-species":116}],151:[function(e,t,r){"use strict";var o=e("../internals/export"),n=e("../internals/fails"),d=e("../internals/is-array"),h=e("../internals/is-object"),f=e("../internals/to-object"),p=e("../internals/to-length"),m=e("../internals/create-property"),y=e("../internals/array-species-create"),s=e("../internals/array-method-has-species-support"),i=e("../internals/well-known-symbol"),e=e("../internals/engine-v8-version"),g=i("isConcatSpreadable"),v=9007199254740991,b="Maximum allowed index exceeded",i=51<=e||!n(function(){var e=[];return e[g]=!1,e.concat()[0]!==e}),e=s("concat");o({target:"Array",proto:!0,forced:!i||!e},{concat:function(e){for(var t,r,o,n,s,i=f(this),a=y(i,0),l=0,u=-1,c=arguments.length;u<c;u++)if(s=void 0,!h(n=o=-1===u?i:arguments[u])||(void 0!==(s=n[g])?!s:!d(n))){if(v<=l)throw TypeError(b);m(a,l++,o)}else{if(r=p(o.length),v<l+r)throw TypeError(b);for(t=0;t<r;t++,l++)t in o&&m(a,l,o[t])}return a.length=l,a}})},{"../internals/array-method-has-species-support":21,"../internals/array-species-create":25,"../internals/create-property":40,"../internals/engine-v8-version":48,"../internals/export":50,"../internals/fails":51,"../internals/is-array":72,"../internals/is-object":74,"../internals/to-length":136,"../internals/to-object":137,"../internals/well-known-symbol":148}],152:[function(e,t,r){var o=e("../internals/export"),n=e("../internals/array-copy-within"),e=e("../internals/add-to-unscopables");o({target:"Array",proto:!0},{copyWithin:n}),e("copyWithin")},{"../internals/add-to-unscopables":7,"../internals/array-copy-within":14,"../internals/export":50}],153:[function(e,t,r){"use strict";var o=e("../internals/export"),n=e("../internals/array-iteration").every,s=e("../internals/array-method-is-strict"),e=e("../internals/array-method-uses-to-length"),s=s("every"),e=e("every");o({target:"Array",proto:!0,forced:!s||!e},{every:function(e){return n(this,e,1<arguments.length?arguments[1]:void 0)}})},{"../internals/array-iteration":19,"../internals/array-method-is-strict":22,"../internals/array-method-uses-to-length":23,"../internals/export":50}],154:[function(e,t,r){var o=e("../internals/export"),n=e("../internals/array-fill"),e=e("../internals/add-to-unscopables");o({target:"Array",proto:!0},{fill:n}),e("fill")},{"../internals/add-to-unscopables":7,"../internals/array-fill":15,"../internals/export":50}],155:[function(e,t,r){"use strict";var o=e("../internals/export"),n=e("../internals/array-iteration").filter,s=e("../internals/array-method-has-species-support"),e=e("../internals/array-method-uses-to-length"),s=s("filter"),e=e("filter");o({target:"Array",proto:!0,forced:!s||!e},{filter:function(e){return n(this,e,1<arguments.length?arguments[1]:void 0)}})},{"../internals/array-iteration":19,"../internals/array-method-has-species-support":21,"../internals/array-method-uses-to-length":23,"../internals/export":50}],156:[function(e,t,r){"use strict";var o=e("../internals/export"),n=e("../internals/array-iteration").findIndex,s=e("../internals/add-to-unscopables"),e=e("../internals/array-method-uses-to-length"),i="findIndex",a=!0,e=e(i);i in[]&&Array(1)[i](function(){a=!1}),o({target:"Array",proto:!0,forced:a||!e},{findIndex:function(e){return n(this,e,1<arguments.length?arguments[1]:void 0)}}),s(i)},{"../internals/add-to-unscopables":7,"../internals/array-iteration":19,"../internals/array-method-uses-to-length":23,"../internals/export":50}],157:[function(e,t,r){"use strict";var o=e("../internals/export"),e=e("../internals/array-for-each");o({target:"Array",proto:!0,forced:[].forEach!=e},{forEach:e})},{"../internals/array-for-each":16,"../internals/export":50}],158:[function(e,t,r){var o=e("../internals/export"),n=e("../internals/array-from");o({target:"Array",stat:!0,forced:!e("../internals/check-correctness-of-iteration")(function(e){Array.from(e)})},{from:n})},{"../internals/array-from":17,"../internals/check-correctness-of-iteration":27,"../internals/export":50}],159:[function(e,t,r){"use strict";var o=e("../internals/export"),n=e("../internals/array-includes").includes,s=e("../internals/add-to-unscopables");o({target:"Array",proto:!0,forced:!e("../internals/array-method-uses-to-length")("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return n(this,e,1<arguments.length?arguments[1]:void 0)}}),s("includes")},{"../internals/add-to-unscopables":7,"../internals/array-includes":18,"../internals/array-method-uses-to-length":23,"../internals/export":50}],160:[function(e,t,r){"use strict";var o=e("../internals/export"),n=e("../internals/array-includes").indexOf,s=e("../internals/array-method-is-strict"),e=e("../internals/array-method-uses-to-length"),i=[].indexOf,a=!!i&&1/[1].indexOf(1,-0)<0,s=s("indexOf"),e=e("indexOf",{ACCESSORS:!0,1:0});o({target:"Array",proto:!0,forced:a||!s||!e},{indexOf:function(e){return a?i.apply(this,arguments)||0:n(this,e,1<arguments.length?arguments[1]:void 0)}})},{"../internals/array-includes":18,"../internals/array-method-is-strict":22,"../internals/array-method-uses-to-length":23,"../internals/export":50}],161:[function(e,t,r){"use strict";var o=e("../internals/to-indexed-object"),n=e("../internals/add-to-unscopables"),s=e("../internals/iterators"),i=e("../internals/internal-state"),e=e("../internals/define-iterator"),a="Array Iterator",l=i.set,u=i.getterFor(a);t.exports=e(Array,"Array",function(e,t){l(this,{type:a,target:o(e),index:0,kind:t})},function(){var e=u(this),t=e.target,r=e.kind,o=e.index++;return!t||o>=t.length?{value:e.target=void 0,done:!0}:"keys"==r?{value:o,done:!1}:"values"==r?{value:t[o],done:!1}:{value:[o,t[o]],done:!1}},"values"),s.Arguments=s.Array,n("keys"),n("values"),n("entries")},{"../internals/add-to-unscopables":7,"../internals/define-iterator":41,"../internals/internal-state":70,"../internals/iterators":79,"../internals/to-indexed-object":134}],162:[function(e,t,r){"use strict";var o=e("../internals/export"),n=e("../internals/indexed-object"),s=e("../internals/to-indexed-object"),e=e("../internals/array-method-is-strict"),i=[].join,n=n!=Object,e=e("join",",");o({target:"Array",proto:!0,forced:n||!e},{join:function(e){return i.call(s(this),void 0===e?",":e)}})},{"../internals/array-method-is-strict":22,"../internals/export":50,"../internals/indexed-object":66,"../internals/to-indexed-object":134}],163:[function(e,t,r){var o=e("../internals/export"),e=e("../internals/array-last-index-of");o({target:"Array",proto:!0,forced:e!==[].lastIndexOf},{lastIndexOf:e})},{"../internals/array-last-index-of":20,"../internals/export":50}],164:[function(e,t,r){"use strict";var o=e("../internals/export"),n=e("../internals/array-iteration").map,s=e("../internals/array-method-has-species-support"),e=e("../internals/array-method-uses-to-length"),s=s("map"),e=e("map");o({target:"Array",proto:!0,forced:!s||!e},{map:function(e){return n(this,e,1<arguments.length?arguments[1]:void 0)}})},{"../internals/array-iteration":19,"../internals/array-method-has-species-support":21,"../internals/array-method-uses-to-length":23,"../internals/export":50}],165:[function(e,t,r){"use strict";var o=e("../internals/export"),u=e("../internals/is-object"),c=e("../internals/is-array"),d=e("../internals/to-absolute-index"),h=e("../internals/to-length"),f=e("../internals/to-indexed-object"),p=e("../internals/create-property"),n=e("../internals/well-known-symbol"),s=e("../internals/array-method-has-species-support"),e=e("../internals/array-method-uses-to-length"),s=s("slice"),e=e("slice",{ACCESSORS:!0,0:0,1:2}),m=n("species"),y=[].slice,g=Math.max;o({target:"Array",proto:!0,forced:!s||!e},{slice:function(e,t){var r,o,n,s=f(this),i=h(s.length),a=d(e,i),l=d(void 0===t?i:t,i);if(c(s)&&((r="function"==typeof(r=s.constructor)&&(r===Array||c(r.prototype))||u(r)&&null===(r=r[m])?void 0:r)===Array||void 0===r))return y.call(s,a,l);for(o=new(void 0===r?Array:r)(g(l-a,0)),n=0;a<l;a++,n++)a in s&&p(o,n,s[a]);return o.length=n,o}})},{"../internals/array-method-has-species-support":21,"../internals/array-method-uses-to-length":23,"../internals/create-property":40,"../internals/export":50,"../internals/is-array":72,"../internals/is-object":74,"../internals/to-absolute-index":132,"../internals/to-indexed-object":134,"../internals/to-length":136,"../internals/well-known-symbol":148}],166:[function(e,t,r){"use strict";var o=e("../internals/export"),n=e("../internals/array-iteration").some,s=e("../internals/array-method-is-strict"),e=e("../internals/array-method-uses-to-length"),s=s("some"),e=e("some");o({target:"Array",proto:!0,forced:!s||!e},{some:function(e){return n(this,e,1<arguments.length?arguments[1]:void 0)}})},{"../internals/array-iteration":19,"../internals/array-method-is-strict":22,"../internals/array-method-uses-to-length":23,"../internals/export":50}],167:[function(e,t,r){"use strict";var o=e("../internals/export"),d=e("../internals/to-absolute-index"),h=e("../internals/to-integer"),f=e("../internals/to-length"),p=e("../internals/to-object"),m=e("../internals/array-species-create"),y=e("../internals/create-property"),n=e("../internals/array-method-has-species-support"),e=e("../internals/array-method-uses-to-length"),n=n("splice"),e=e("splice",{ACCESSORS:!0,0:0,1:2}),g=Math.max,v=Math.min;o({target:"Array",proto:!0,forced:!n||!e},{splice:function(e,t){var r,o,n,s,i,a,l=p(this),u=f(l.length),c=d(e,u),e=arguments.length;if(0===e?r=o=0:o=1===e?(r=0,u-c):(r=e-2,v(g(h(t),0),u-c)),9007199254740991<u+r-o)throw TypeError("Maximum allowed length exceeded");for(n=m(l,o),s=0;s<o;s++)(i=c+s)in l&&y(n,s,l[i]);if(r<(n.length=o)){for(s=c;s<u-o;s++)a=s+r,(i=s+o)in l?l[a]=l[i]:delete l[a];for(s=u;u-o+r<s;s--)delete l[s-1]}else if(o<r)for(s=u-o;c<s;s--)a=s+r-1,(i=s+o-1)in l?l[a]=l[i]:delete l[a];for(s=0;s<r;s++)l[s+c]=arguments[s+2];return l.length=u-o+r,n}})},{"../internals/array-method-has-species-support":21,"../internals/array-method-uses-to-length":23,"../internals/array-species-create":25,"../internals/create-property":40,"../internals/export":50,"../internals/to-absolute-index":132,"../internals/to-integer":135,"../internals/to-length":136,"../internals/to-object":137}],168:[function(e,t,r){var o=e("../internals/descriptors"),e=e("../internals/object-define-property").f,n=Function.prototype,s=n.toString,i=/^\s*function ([^ (]*)/;!o||"name"in n||e(n,"name",{configurable:!0,get:function(){try{return s.call(this).match(i)[1]}catch(e){return""}}})},{"../internals/descriptors":43,"../internals/object-define-property":92}],169:[function(e,t,r){"use strict";var o=e("../internals/collection"),e=e("../internals/collection-strong");t.exports=o("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},e)},{"../internals/collection":32,"../internals/collection-strong":30}],170:[function(e,t,r){var e=e("../internals/export"),o=Math.hypot,l=Math.abs,u=Math.sqrt;e({target:"Math",stat:!0,forced:!!o&&o(1/0,NaN)!==1/0},{hypot:function(e,t){for(var r,o,n=0,s=0,i=arguments.length,a=0;s<i;)a<(r=l(arguments[s++]))?(n=n*(o=a/r)*o+1,a=r):n+=0<r?(o=r/a)*o:r;return a===1/0?1/0:a*u(n)}})},{"../internals/export":50}],171:[function(e,t,r){var e=e("../internals/export"),o=Math.log,n=Math.LN2;e({target:"Math",stat:!0},{log2:function(e){return o(e)/n}})},{"../internals/export":50}],172:[function(e,t,r){e("../internals/export")({target:"Math",stat:!0},{sign:e("../internals/math-sign")})},{"../internals/export":50,"../internals/math-sign":80}],173:[function(e,t,r){"use strict";function o(e){var t,r,o,n,s,i,a,l=d(e,!1);if("string"==typeof l&&2<l.length)if(43===(e=(l=g(l)).charCodeAt(0))||45===e){if(88===(t=l.charCodeAt(2))||120===t)return NaN}else if(48===e){switch(l.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+l}for(s=(n=l.slice(2)).length,i=0;i<s;i++)if((a=n.charCodeAt(i))<48||o<a)return NaN;return parseInt(n,r)}return+l}var n=e("../internals/descriptors"),s=e("../internals/global"),i=e("../internals/is-forced"),a=e("../internals/redefine"),l=e("../internals/has"),u=e("../internals/classof-raw"),c=e("../internals/inherit-if-required"),d=e("../internals/to-primitive"),h=e("../internals/fails"),f=e("../internals/object-create"),p=e("../internals/object-get-own-property-names").f,m=e("../internals/object-get-own-property-descriptor").f,y=e("../internals/object-define-property").f,g=e("../internals/string-trim").trim,v="Number",b=s[v],j=b.prototype,_=u(f(j))==v;if(i(v,!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var x,w=function(e){var e=arguments.length<1?0:e,t=this;return t instanceof w&&(_?h(function(){j.valueOf.call(t)}):u(t)!=v)?c(new b(o(e)),t,w):o(e)},S=n?p(b):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),T=0;S.length>T;T++)l(b,x=S[T])&&!l(w,x)&&y(w,x,m(b,x));(w.prototype=j).constructor=w,a(s,v,w)}},{"../internals/classof-raw":28,"../internals/descriptors":43,"../internals/fails":51,"../internals/global":59,"../internals/has":60,"../internals/inherit-if-required":67,"../internals/is-forced":73,"../internals/object-create":90,"../internals/object-define-property":92,"../internals/object-get-own-property-descriptor":93,"../internals/object-get-own-property-names":95,"../internals/redefine":108,"../internals/string-trim":129,"../internals/to-primitive":140}],174:[function(e,t,r){e("../internals/export")({target:"Number",stat:!0},{isFinite:e("../internals/number-is-finite")})},{"../internals/export":50,"../internals/number-is-finite":88}],175:[function(e,t,r){"use strict";function c(e,t,r){return 0===t?r:t%2==1?c(e,t-1,r*e):c(e*e,t/2,r)}var o=e("../internals/export"),d=e("../internals/to-integer"),h=e("../internals/this-number-value"),f=e("../internals/string-repeat"),e=e("../internals/fails"),n=1..toFixed,p=Math.floor;o({target:"Number",proto:!0,forced:n&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==0xde0b6b3a7640080.toFixed(0))||!e(function(){n.call({})})},{toFixed:function(e){function t(e,t){for(var r=-1,o=t;++r<6;)o+=e*a[r],a[r]=o%1e7,o=p(o/1e7)}function r(e){for(var t=6,r=0;0<=--t;)r+=a[t],a[t]=p(r/e),r=r%e*1e7}function o(){for(var e,t=6,r="";0<=--t;)""===r&&0!==t&&0===a[t]||(e=String(a[t]),r=""===r?e:r+f.call("0",7-e.length)+e);return r}var n,s,i=h(this),e=d(e),a=[0,0,0,0,0,0],l="",u="0";if(e<0||20<e)throw RangeError("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||1e21<=i)return String(i);if(i<0&&(l="-",i=-i),1e-21<i)if(i=(n=function(e){for(var t=0,r=e;4096<=r;)t+=12,r/=4096;for(;2<=r;)t+=1,r/=2;return t}(i*c(2,69,1))-69)<0?i*c(2,-n,1):i/c(2,n,1),i*=4503599627370496,0<(n=52-n)){for(t(0,i),s=e;7<=s;)t(1e7,0),s-=7;for(t(c(10,s,1),0),s=n-1;23<=s;)r(1<<23),s-=23;r(1<<s),t(1,1),r(2),u=o()}else t(0,i),t(1<<-n,0),u=o()+f.call("0",e);return u=0<e?l+((i=u.length)<=e?"0."+f.call("0",e-i)+u:u.slice(0,i-e)+"."+u.slice(i-e)):l+u}})},{"../internals/export":50,"../internals/fails":51,"../internals/string-repeat":127,"../internals/this-number-value":131,"../internals/to-integer":135}],176:[function(e,t,r){var o=e("../internals/export"),e=e("../internals/object-assign");o({target:"Object",stat:!0,forced:Object.assign!==e},{assign:e})},{"../internals/export":50,"../internals/object-assign":89}],177:[function(e,t,r){var o=e("../internals/export"),n=e("../internals/iterate"),s=e("../internals/create-property");o({target:"Object",stat:!0},{fromEntries:function(e){var r={};return n(e,function(e,t){s(r,e,t)},void 0,!0),r}})},{"../internals/create-property":40,"../internals/export":50,"../internals/iterate":77}],178:[function(e,t,r){var o=e("../internals/export"),n=e("../internals/fails"),s=e("../internals/to-indexed-object"),i=e("../internals/object-get-own-property-descriptor").f,e=e("../internals/descriptors"),n=n(function(){i(1)});o({target:"Object",stat:!0,forced:!e||n,sham:!e},{getOwnPropertyDescriptor:function(e,t){return i(s(e),t)}})},{"../internals/descriptors":43,"../internals/export":50,"../internals/fails":51,"../internals/object-get-own-property-descriptor":93,"../internals/to-indexed-object":134}],179:[function(e,t,r){var o=e("../internals/export"),n=e("../internals/fails"),e=e("../internals/object-get-own-property-names-external").f;o({target:"Object",stat:!0,forced:n(function(){return!Object.getOwnPropertyNames(1)})},{getOwnPropertyNames:e})},{"../internals/export":50,"../internals/fails":51,"../internals/object-get-own-property-names-external":94}],180:[function(e,t,r){var o=e("../internals/export"),n=e("../internals/fails"),s=e("../internals/to-object"),i=e("../internals/object-get-prototype-of"),e=e("../internals/correct-prototype-getter");o({target:"Object",stat:!0,forced:n(function(){i(1)}),sham:!e},{getPrototypeOf:function(e){return i(s(e))}})},{"../internals/correct-prototype-getter":35,"../internals/export":50,"../internals/fails":51,"../internals/object-get-prototype-of":97,"../internals/to-object":137}],181:[function(e,t,r){var o=e("../internals/export"),n=e("../internals/to-object"),s=e("../internals/object-keys");o({target:"Object",stat:!0,forced:e("../internals/fails")(function(){s(1)})},{keys:function(e){return s(n(e))}})},{"../internals/export":50,"../internals/fails":51,"../internals/object-keys":99,"../internals/to-object":137}],182:[function(e,t,r){var o=e("../internals/to-string-tag-support"),n=e("../internals/redefine"),e=e("../internals/object-to-string");o||n(Object.prototype,"toString",e,{unsafe:!0})},{"../internals/object-to-string":102,"../internals/redefine":108,"../internals/to-string-tag-support":141}],183:[function(e,D,F){"use strict";var r,t,o,n,s=e("../internals/export"),i=e("../internals/is-pure"),g=e("../internals/global"),a=e("../internals/get-built-in"),l=e("../internals/native-promise-constructor"),U=e("../internals/redefine"),N=e("../internals/redefine-all"),B=e("../internals/set-to-string-tag"),G=e("../internals/set-species"),V=e("../internals/is-object"),c=e("../internals/a-function"),z=e("../internals/an-instance"),H=e("../internals/classof-raw"),W=e("../internals/inspect-source"),d=e("../internals/iterate"),q=e("../internals/check-correctness-of-iteration"),X=e("../internals/species-constructor"),v=e("../internals/task").set,u=e("../internals/microtask"),h=e("../internals/promise-resolve"),Y=e("../internals/host-report-errors"),f=e("../internals/new-promise-capability"),b=e("../internals/perform"),p=e("../internals/internal-state"),Z=e("../internals/is-forced"),m=e("../internals/well-known-symbol"),y=e("../internals/engine-v8-version"),Q=m("species"),j="Promise",_=p.get,J=p.set,K=p.getterFor(j),x=l,w=g.TypeError,S=g.document,T=g.process,M=a("fetch"),E=f.f,$=E,k="process"==H(T),ee=!!(S&&S.createEvent&&g.dispatchEvent),C="unhandledrejection",te="rejectionhandled",O=1,re=2,P=1,oe=2,e=Z(j,function(){var e,t;if(!(W(x)!==String(x))){if(66===y)return!0;if(!k&&"function"!=typeof PromiseRejectionEvent)return!0}return!(!i||x.prototype.finally)||!(51<=y&&/native code/.test(x))&&(t=function(e){e(function(){},function(){})},((e=x.resolve(1)).constructor={})[Q]=t,!(e.then(function(){})instanceof t))}),m=e||!q(function(e){x.all(e).catch(function(){})}),ne=function(e){var t;return!(!V(e)||"function"!=typeof(t=e.then))&&t},A=function(f,p,m){var y;p.notified||(p.notified=!0,y=p.reactions,u(function(){for(var r,o,e=p.value,t=p.state==O,n=0;y.length>n;){var s,i,a,l=y[n++],u=t?l.ok:l.fail,c=l.resolve,d=l.reject,h=l.domain;try{u?(t||(p.rejection===oe&&function(e,t){v.call(g,function(){if(k)T.emit("rejectionHandled",e);else se(te,e,t.value)})}(f,p),p.rejection=P),!0===u?s=e:(h&&h.enter(),s=u(e),h&&(h.exit(),a=!0)),s===l.promise?d(w("Promise-chain cycle")):(i=ne(s))?i.call(s,c,d):c(s)):d(e)}catch(e){h&&!a&&h.exit(),d(e)}}p.reactions=[],p.notified=!1,m&&!p.rejection&&(r=f,o=p,v.call(g,function(){var e=o.value,t=ie(o);if(t&&(t=b(function(){k?T.emit("unhandledRejection",e,r):se(C,r,e)}),o.rejection=k||ie(o)?oe:P,t.error))throw t.value}))}))},se=function(e,t,r){var o;ee?((o=S.createEvent("Event")).promise=t,o.reason=r,o.initEvent(e,!1,!0),g.dispatchEvent(o)):o={promise:t,reason:r},(t=g["on"+e])?t(o):e===C&&Y("Unhandled promise rejection",r)},ie=function(e){return e.rejection!==P&&!e.parent},L=function(t,r,o,n){return function(e){t(r,o,e,n)}},R=function(e,t,r,o){t.done||(t.done=!0,(t=o?o:t).value=r,t.state=re,A(e,t,!0))},I=function(r,o,e,t){if(!o.done){o.done=!0,t&&(o=t);try{if(r===e)throw w("Promise can't be resolved itself");var n=ne(e);n?u(function(){var t={done:!1};try{n.call(e,L(I,r,t,o),L(R,r,t,o))}catch(e){R(r,t,e,o)}}):(o.value=e,o.state=O,A(r,o,!1))}catch(e){R(r,{done:!1},e,o)}}};e&&(x=function(e){z(this,x,j),c(e),r.call(this);var t=_(this);try{e(L(I,this,t),L(R,this,t))}catch(e){R(this,t,e)}},(r=function(e){J(this,{type:j,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=N(x.prototype,{then:function(e,t){var r=K(this),o=E(X(this,x));return o.ok="function"!=typeof e||e,o.fail="function"==typeof t&&t,o.domain=k?T.domain:void 0,r.parent=!0,r.reactions.push(o),0!=r.state&&A(this,r,!1),o.promise},catch:function(e){return this.then(void 0,e)}}),t=function(){var e=new r,t=_(e);this.promise=e,this.resolve=L(I,e,t),this.reject=L(R,e,t)},f.f=E=function(e){return e===x||e===o?new t:$(e)},i||"function"!=typeof l||(n=l.prototype.then,U(l.prototype,"then",function(e,t){var r=this;return new x(function(e,t){n.call(r,e,t)}).then(e,t)},{unsafe:!0}),"function"==typeof M&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return h(x,M.apply(g,arguments))}}))),s({global:!0,wrap:!0,forced:e},{Promise:x}),B(x,j,!1,!0),G(j),o=a(j),s({target:j,stat:!0,forced:e},{reject:function(e){var t=E(this);return t.reject.call(void 0,e),t.promise}}),s({target:j,stat:!0,forced:i||e},{resolve:function(e){return h(i&&this===o?x:this,e)}}),s({target:j,stat:!0,forced:m},{all:function(e){var a=this,t=E(a),l=t.resolve,u=t.reject,r=b(function(){var o=c(a.resolve),n=[],s=0,i=1;d(e,function(e){var t=s++,r=!1;n.push(void 0),i++,o.call(a,e).then(function(e){r||(r=!0,n[t]=e,--i||l(n))},u)}),--i||l(n)});return r.error&&u(r.value),t.promise},race:function(e){var r=this,o=E(r),n=o.reject,t=b(function(){var t=c(r.resolve);d(e,function(e){t.call(r,e).then(o.resolve,n)})});return t.error&&n(t.value),o.promise}})},{"../internals/a-function":5,"../internals/an-instance":9,"../internals/check-correctness-of-iteration":27,"../internals/classof-raw":28,"../internals/engine-v8-version":48,"../internals/export":50,"../internals/get-built-in":56,"../internals/global":59,"../internals/host-report-errors":62,"../internals/inspect-source":68,"../internals/internal-state":70,"../internals/is-forced":73,"../internals/is-object":74,"../internals/is-pure":75,"../internals/iterate":77,"../internals/microtask":81,"../internals/native-promise-constructor":82,"../internals/new-promise-capability":86,"../internals/perform":105,"../internals/promise-resolve":106,"../internals/redefine":108,"../internals/redefine-all":107,"../internals/set-species":116,"../internals/set-to-string-tag":117,"../internals/species-constructor":121,"../internals/task":130,"../internals/well-known-symbol":148}],184:[function(e,t,r){var o=e("../internals/export"),n=e("../internals/get-built-in"),s=e("../internals/a-function"),i=e("../internals/an-object"),a=e("../internals/is-object"),l=e("../internals/object-create"),u=e("../internals/function-bind"),e=e("../internals/fails"),c=n("Reflect","construct"),d=e(function(){function e(){}return!(c(function(){},[],e)instanceof e)}),h=!e(function(){c(function(){})}),n=d||h;o({target:"Reflect",stat:!0,forced:n,sham:n},{construct:function(e,t){s(e),i(t);var r=arguments.length<3?e:s(arguments[2]);if(h&&!d)return c(e,t,r);if(e==r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var o=[null];return o.push.apply(o,t),new(u.apply(e,o))}o=r.prototype,r=l(a(o)?o:Object.prototype),o=Function.apply.call(e,r,t);return a(o)?o:r}})},{"../internals/a-function":5,"../internals/an-object":10,"../internals/export":50,"../internals/fails":51,"../internals/function-bind":55,"../internals/get-built-in":56,"../internals/is-object":74,"../internals/object-create":90}],185:[function(e,t,r){var o=e("../internals/export"),s=e("../internals/is-object"),i=e("../internals/an-object"),a=e("../internals/has"),l=e("../internals/object-get-own-property-descriptor"),u=e("../internals/object-get-prototype-of");o({target:"Reflect",stat:!0},{get:function e(t,r){var o,n=arguments.length<3?t:arguments[2];return i(t)===n?t[r]:(o=l.f(t,r))?a(o,"value")?o.value:void 0===o.get?void 0:o.get.call(n):s(o=u(t))?e(o,r,n):void 0}})},{"../internals/an-object":10,"../internals/export":50,"../internals/has":60,"../internals/is-object":74,"../internals/object-get-own-property-descriptor":93,"../internals/object-get-prototype-of":97}],186:[function(e,t,r){var o=e("../internals/descriptors"),n=e("../internals/global"),s=e("../internals/is-forced"),i=e("../internals/inherit-if-required"),a=e("../internals/object-define-property").f,l=e("../internals/object-get-own-property-names").f,u=e("../internals/is-regexp"),c=e("../internals/regexp-flags"),d=e("../internals/regexp-sticky-helpers"),h=e("../internals/redefine"),f=e("../internals/fails"),p=e("../internals/internal-state").set,m=e("../internals/set-species"),y=e("../internals/well-known-symbol")("match"),g=n.RegExp,v=g.prototype,b=/a/g,j=/a/g,_=new g(b)!==b,x=d.UNSUPPORTED_Y;if(o&&s("RegExp",!_||x||f(function(){return j[y]=!1,g(b)!=b||g(j)==j||"/a/i"!=g(b,"i")}))){for(var w=function(e,t){var r,o=this instanceof w,n=u(e),s=void 0===t;if(!o&&n&&e.constructor===w&&s)return e;_?n&&!s&&(e=e.source):e instanceof w&&(s&&(t=c.call(e)),e=e.source),x&&(r=!!t&&-1<t.indexOf("y"))&&(t=t.replace(/y/g,""));n=i(_?new g(e,t):g(e,t),o?this:v,w);return x&&r&&p(n,{sticky:r}),n},S=l(g),T=0;S.length>T;)!function(t){t in w||a(w,t,{configurable:!0,get:function(){return g[t]},set:function(e){g[t]=e}})}(S[T++]);(v.constructor=w).prototype=v,h(n,"RegExp",w)}m("RegExp")},{"../internals/descriptors":43,"../internals/fails":51,"../internals/global":59,"../internals/inherit-if-required":67,"../internals/internal-state":70,"../internals/is-forced":73,"../internals/is-regexp":76,"../internals/object-define-property":92,"../internals/object-get-own-property-names":95,"../internals/redefine":108,"../internals/regexp-flags":111,"../internals/regexp-sticky-helpers":112,"../internals/set-species":116,"../internals/well-known-symbol":148}],187:[function(e,t,r){"use strict";var o=e("../internals/export"),e=e("../internals/regexp-exec");o({target:"RegExp",proto:!0,forced:/./.exec!==e},{exec:e})},{"../internals/export":50,"../internals/regexp-exec":110}],188:[function(e,t,r){"use strict";var o=e("../internals/redefine"),n=e("../internals/an-object"),s=e("../internals/fails"),i=e("../internals/regexp-flags"),e="toString",a=RegExp.prototype,l=a[e],s=s(function(){return"/a/b"!=l.call({source:"a",flags:"b"})}),u=l.name!=e;(s||u)&&o(RegExp.prototype,e,function(){var e=n(this),t=String(e.source),r=e.flags;return"/"+t+"/"+String(void 0===r&&e instanceof RegExp&&!("flags"in a)?i.call(e):r)},{unsafe:!0})},{"../internals/an-object":10,"../internals/fails":51,"../internals/redefine":108,"../internals/regexp-flags":111}],189:[function(e,t,r){"use strict";var o=e("../internals/collection"),e=e("../internals/collection-strong");t.exports=o("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},e)},{"../internals/collection":32,"../internals/collection-strong":30}],190:[function(e,t,r){"use strict";var o=e("../internals/export"),n=e("../internals/object-get-own-property-descriptor").f,s=e("../internals/to-length"),i=e("../internals/not-a-regexp"),a=e("../internals/require-object-coercible"),l=e("../internals/correct-is-regexp-logic"),e=e("../internals/is-pure"),u="".endsWith,c=Math.min,l=l("endsWith");o({target:"String",proto:!0,forced:!!(e||l||(!(o=n(String.prototype,"endsWith"))||o.writable))&&!l},{endsWith:function(e){var t=String(a(this)),r=(i(e),1<arguments.length?arguments[1]:void 0),o=s(t.length),r=void 0===r?o:c(s(r),o),o=String(e);return u?u.call(t,o,r):t.slice(r-o.length,r)===o}})},{"../internals/correct-is-regexp-logic":34,"../internals/export":50,"../internals/is-pure":75,"../internals/not-a-regexp":87,"../internals/object-get-own-property-descriptor":93,"../internals/require-object-coercible":113,"../internals/to-length":136}],191:[function(e,t,r){"use strict";var o=e("../internals/export"),n=e("../internals/not-a-regexp"),s=e("../internals/require-object-coercible");o({target:"String",proto:!0,forced:!e("../internals/correct-is-regexp-logic")("includes")},{includes:function(e){return!!~String(s(this)).indexOf(n(e),1<arguments.length?arguments[1]:void 0)}})},{"../internals/correct-is-regexp-logic":34,"../internals/export":50,"../internals/not-a-regexp":87,"../internals/require-object-coercible":113}],192:[function(e,t,r){"use strict";var o=e("../internals/string-multibyte").charAt,n=e("../internals/internal-state"),e=e("../internals/define-iterator"),s="String Iterator",i=n.set,a=n.getterFor(s);e(String,"String",function(e){i(this,{type:s,string:String(e),index:0})},function(){var e=a(this),t=e.string,r=e.index;return r>=t.length?{value:void 0,done:!0}:(t=o(t,r),e.index+=t.length,{value:t,done:!1})})},{"../internals/define-iterator":41,"../internals/internal-state":70,"../internals/string-multibyte":123}],193:[function(e,t,r){"use strict";var o=e("../internals/fix-regexp-well-known-symbol-logic"),c=e("../internals/an-object"),d=e("../internals/to-length"),n=e("../internals/require-object-coercible"),h=e("../internals/advance-string-index"),f=e("../internals/regexp-exec-abstract");o("match",1,function(o,l,u){return[function(e){var t=n(this),r=null==e?void 0:e[o];return void 0!==r?r.call(e,t):new RegExp(e)[o](String(t))},function(e){var t=u(l,e,this);if(t.done)return t.value;var r=c(e),o=String(this);if(!r.global)return f(r,o);for(var n=r.unicode,s=[],i=r.lastIndex=0;null!==(a=f(r,o));){var a=String(a[0]);""===(s[i]=a)&&(r.lastIndex=h(o,d(r.lastIndex),n)),i++}return 0===i?null:s}]})},{"../internals/advance-string-index":8,"../internals/an-object":10,"../internals/fix-regexp-well-known-symbol-logic":52,"../internals/regexp-exec-abstract":109,"../internals/require-object-coercible":113,"../internals/to-length":136}],194:[function(e,t,r){"use strict";var o=e("../internals/export"),n=e("../internals/string-pad").start;o({target:"String",proto:!0,forced:e("../internals/string-pad-webkit-bug")},{padStart:function(e){return n(this,e,1<arguments.length?arguments[1]:void 0)}})},{"../internals/export":50,"../internals/string-pad":125,"../internals/string-pad-webkit-bug":124}],195:[function(e,t,r){e("../internals/export")({target:"String",proto:!0},{repeat:e("../internals/string-repeat")})},{"../internals/export":50,"../internals/string-repeat":127}],196:[function(e,t,r){"use strict";var o=e("../internals/fix-regexp-well-known-symbol-logic"),T=e("../internals/an-object"),M=e("../internals/to-object"),E=e("../internals/to-length"),k=e("../internals/to-integer"),s=e("../internals/require-object-coercible"),C=e("../internals/advance-string-index"),O=e("../internals/regexp-exec-abstract"),P=Math.max,A=Math.min,L=Math.floor,R=/\$([$&'`]|\d\d?|<[^>]*>)/g,I=/\$([$&'`]|\d\d?)/g;o("replace",2,function(n,j,_,e){var x=e.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,w=e.REPLACE_KEEPS_$0,S=x?"$":"$0";return[function(e,t){var r=s(this),o=null==e?void 0:e[n];return void 0!==o?o.call(e,r,t):j.call(String(r),e,t)},function(e,t){if(!x&&w||"string"==typeof t&&-1===t.indexOf(S)){var r=_(j,e,this,t);if(r.done)return r.value}for(var o,n=T(e),s=String(this),i="function"==typeof t,a=(i||(t=String(t)),n.global),l=(a&&(o=n.unicode,n.lastIndex=0),[]);null!==(f=O(n,s))&&(l.push(f),a);)""===String(f[0])&&(n.lastIndex=C(s,E(n.lastIndex),o));for(var u,c="",d=0,h=0;h<l.length;h++){for(var f=l[h],p=String(f[0]),m=P(A(k(f.index),s.length),0),y=[],g=1;g<f.length;g++)y.push(void 0===(u=f[g])?u:String(u));var v=f.groups,b=i?(b=[p].concat(y,m,s),void 0!==v&&b.push(v),String(t.apply(void 0,b))):function(s,i,a,l,u,e){var c=a+s.length,d=l.length,t=I;void 0!==u&&(u=M(u),t=R);return j.call(e,t,function(e,t){var r;switch(t.charAt(0)){case"$":return"$";case"&":return s;case"`":return i.slice(0,a);case"'":return i.slice(c);case"<":r=u[t.slice(1,-1)];break;default:var o,n=+t;if(0==n)return e;if(d<n)return 0!==(o=L(n/10))&&o<=d?void 0===l[o-1]?t.charAt(1):l[o-1]+t.charAt(1):e;r=l[n-1]}return void 0===r?"":r})}(p,s,m,y,v,t);d<=m&&(c+=s.slice(d,m)+b,d=m+p.length)}return c+s.slice(d)}]})},{"../internals/advance-string-index":8,"../internals/an-object":10,"../internals/fix-regexp-well-known-symbol-logic":52,"../internals/regexp-exec-abstract":109,"../internals/require-object-coercible":113,"../internals/to-integer":135,"../internals/to-length":136,"../internals/to-object":137}],197:[function(e,t,r){"use strict";var o=e("../internals/fix-regexp-well-known-symbol-logic"),i=e("../internals/an-object"),a=e("../internals/require-object-coercible"),l=e("../internals/same-value"),u=e("../internals/regexp-exec-abstract");o("search",1,function(o,n,s){return[function(e){var t=a(this),r=null==e?void 0:e[o];return void 0!==r?r.call(e,t):new RegExp(e)[o](String(t))},function(e){var t,r=s(n,e,this);return r.done?r.value:(r=i(e),e=String(this),t=r.lastIndex,l(t,0)||(r.lastIndex=0),e=u(r,e),l(r.lastIndex,t)||(r.lastIndex=t),null===e?-1:e.index)}]})},{"../internals/an-object":10,"../internals/fix-regexp-well-known-symbol-logic":52,"../internals/regexp-exec-abstract":109,"../internals/require-object-coercible":113,"../internals/same-value":114}],198:[function(e,t,r){"use strict";var o=e("../internals/fix-regexp-well-known-symbol-logic"),c=e("../internals/is-regexp"),g=e("../internals/an-object"),d=e("../internals/require-object-coercible"),v=e("../internals/species-constructor"),b=e("../internals/advance-string-index"),j=e("../internals/to-length"),_=e("../internals/regexp-exec-abstract"),h=e("../internals/regexp-exec"),e=e("../internals/fails"),f=[].push,x=Math.min,w=4294967295,S=!e(function(){return!RegExp(w,"y")});o("split",2,function(n,p,m){var y="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||1<".".split(/()()/).length||"".split(/.?/).length?function(e,t){var r=String(d(this)),o=void 0===t?w:t>>>0;if(0==o)return[];if(void 0===e)return[r];if(!c(e))return p.call(r,e,o);for(var n,s,i,a=[],t=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),l=0,u=new RegExp(e.source,t+"g");(n=h.call(u,r))&&!(l<(s=u.lastIndex)&&(a.push(r.slice(l,n.index)),1<n.length&&n.index<r.length&&f.apply(a,n.slice(1)),i=n[0].length,l=s,a.length>=o));)u.lastIndex===n.index&&u.lastIndex++;return l===r.length?!i&&u.test("")||a.push(""):a.push(r.slice(l)),a.length>o?a.slice(0,o):a}:"0".split(void 0,0).length?function(e,t){return void 0===e&&0===t?[]:p.call(this,e,t)}:p;return[function(e,t){var r=d(this),o=null==e?void 0:e[n];return void 0!==o?o.call(e,r,t):y.call(String(r),e,t)},function(e,t){var r=m(y,e,this,t,y!==p);if(r.done)return r.value;var r=g(e),o=String(this),e=v(r,RegExp),n=r.unicode,s=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(S?"y":"g"),i=new e(S?r:"^(?:"+r.source+")",s),a=void 0===t?w:t>>>0;if(0==a)return[];if(0===o.length)return null===_(i,o)?[o]:[];for(var l=0,u=0,c=[];u<o.length;){i.lastIndex=S?u:0;var d,h=_(i,S?o:o.slice(u));if(null===h||(d=x(j(i.lastIndex+(S?0:u)),o.length))===l)u=b(o,u,n);else{if(c.push(o.slice(l,u)),c.length===a)return c;for(var f=1;f<=h.length-1;f++)if(c.push(h[f]),c.length===a)return c;u=l=d}}return c.push(o.slice(l)),c}]},!S)},{"../internals/advance-string-index":8,"../internals/an-object":10,"../internals/fails":51,"../internals/fix-regexp-well-known-symbol-logic":52,"../internals/is-regexp":76,"../internals/regexp-exec":110,"../internals/regexp-exec-abstract":109,"../internals/require-object-coercible":113,"../internals/species-constructor":121,"../internals/to-length":136}],199:[function(e,t,r){"use strict";var o=e("../internals/export"),n=e("../internals/object-get-own-property-descriptor").f,s=e("../internals/to-length"),i=e("../internals/not-a-regexp"),a=e("../internals/require-object-coercible"),l=e("../internals/correct-is-regexp-logic"),e=e("../internals/is-pure"),u="".startsWith,c=Math.min,l=l("startsWith");o({target:"String",proto:!0,forced:!!(e||l||(!(o=n(String.prototype,"startsWith"))||o.writable))&&!l},{startsWith:function(e){var t=String(a(this)),r=(i(e),s(c(1<arguments.length?arguments[1]:void 0,t.length))),e=String(e);return u?u.call(t,e,r):t.slice(r,r+e.length)===e}})},{"../internals/correct-is-regexp-logic":34,"../internals/export":50,"../internals/is-pure":75,"../internals/not-a-regexp":87,"../internals/object-get-own-property-descriptor":93,"../internals/require-object-coercible":113,"../internals/to-length":136}],200:[function(e,t,r){"use strict";var o=e("../internals/export"),n=e("../internals/create-html");o({target:"String",proto:!0,forced:e("../internals/string-html-forced")("sub")},{sub:function(){return n(this,"sub","","")}})},{"../internals/create-html":36,"../internals/export":50,"../internals/string-html-forced":122}],201:[function(e,t,r){"use strict";var o=e("../internals/export"),n=e("../internals/string-trim").trim;o({target:"String",proto:!0,forced:e("../internals/string-trim-forced")("trim")},{trim:function(){return n(this)}})},{"../internals/export":50,"../internals/string-trim":129,"../internals/string-trim-forced":128}],202:[function(e,t,r){"use strict";var o,n,s,i,a,l=e("../internals/export"),u=e("../internals/descriptors"),c=e("../internals/global"),d=e("../internals/has"),h=e("../internals/is-object"),f=e("../internals/object-define-property").f,e=e("../internals/copy-constructor-properties"),p=c.Symbol;!u||"function"!=typeof p||"description"in p.prototype&&void 0===p().description||(o={},e(n=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof n?new p(e):void 0===e?p():p(e);return""===e&&(o[t]=!0),t},p),(c=n.prototype=p.prototype).constructor=n,s=c.toString,i="Symbol(test)"==String(p("test")),a=/^Symbol\((.*)\)[^)]+$/,f(c,"description",{configurable:!0,get:function(){var e=h(this)?this.valueOf():this,t=s.call(e);return d(o,e)?"":""===(e=i?t.slice(7,-1):t.replace(a,"$1"))?void 0:e}}),l({global:!0,forced:!0},{Symbol:n}))},{"../internals/copy-constructor-properties":33,"../internals/descriptors":43,"../internals/export":50,"../internals/global":59,"../internals/has":60,"../internals/is-object":74,"../internals/object-define-property":92}],203:[function(e,t,r){e("../internals/define-well-known-symbol")("iterator")},{"../internals/define-well-known-symbol":42}],204:[function(e,D,F){"use strict";function o(e,t){var r=M[e]=f(w[_]);return ie(r,{type:j,tag:e,description:t}),s||(r.description=t),r}function r(t,e){u(t);var r=c(e),e=q(r).concat(I(r));return v(e,function(e){s&&!R.call(r,e)||L(t,e,r[e])}),t}function t(e,t){var r,e=c(e),t=d(t,!0);if(e!==x||!l(M,t)||l(E,t))return!(r=le(e,t))||!l(M,t)||l(e,b)&&e[b][t]||(r.enumerable=!0),r}function U(e){var e=ue(c(e)),t=[];return v(e,function(e){l(M,e)||l(ee,e)||t.push(e)}),t}var n=e("../internals/export"),N=e("../internals/global"),B=e("../internals/get-built-in"),G=e("../internals/is-pure"),s=e("../internals/descriptors"),i=e("../internals/native-symbol"),V=e("../internals/use-symbol-as-uid"),a=e("../internals/fails"),l=e("../internals/has"),z=e("../internals/is-array"),H=e("../internals/is-object"),u=e("../internals/an-object"),W=e("../internals/to-object"),c=e("../internals/to-indexed-object"),d=e("../internals/to-primitive"),h=e("../internals/create-property-descriptor"),f=e("../internals/object-create"),q=e("../internals/object-keys"),X=e("../internals/object-get-own-property-names"),Y=e("../internals/object-get-own-property-names-external"),p=e("../internals/object-get-own-property-symbols"),Z=e("../internals/object-get-own-property-descriptor"),Q=e("../internals/object-define-property"),J=e("../internals/object-property-is-enumerable"),K=e("../internals/create-non-enumerable-property"),m=e("../internals/redefine"),y=e("../internals/shared"),$=e("../internals/shared-key"),ee=e("../internals/hidden-keys"),te=e("../internals/uid"),re=e("../internals/well-known-symbol"),oe=e("../internals/well-known-symbol-wrapped"),ne=e("../internals/define-well-known-symbol"),se=e("../internals/set-to-string-tag"),g=e("../internals/internal-state"),v=e("../internals/array-iteration").forEach,b=$("hidden"),j="Symbol",_="prototype",e=re("toPrimitive"),ie=g.set,ae=g.getterFor(j),x=Object[_],w=N.Symbol,S=B("JSON","stringify"),le=Z.f,T=Q.f,ue=Y.f,ce=J.f,M=y("symbols"),E=y("op-symbols"),k=y("string-to-symbol-registry"),C=y("symbol-to-string-registry"),$=y("wks"),g=N.QObject,O=!g||!g[_]||!g[_].findChild,P=s&&a(function(){return 7!=f(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a})?function(e,t,r){var o=le(x,t);o&&delete x[t],T(e,t,r),o&&e!==x&&T(x,t,o)}:T,A=V?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof w},L=function(e,t,r){e===x&&L(E,t,r),u(e);t=d(t,!0);return u(r),(l(M,t)?(r.enumerable?(l(e,b)&&e[b][t]&&(e[b][t]=!1),r=f(r,{enumerable:h(0,!1)})):(l(e,b)||T(e,b,h(1,{})),e[b][t]=!0),P):T)(e,t,r)},R=function(e){var e=d(e,!0),t=ce.call(this,e);return!(this===x&&l(M,e)&&!l(E,e))&&(!(t||!l(this,e)||!l(M,e)||l(this,b)&&this[b][e])||t)},I=function(e){var t=e===x,e=ue(t?E:c(e)),r=[];return v(e,function(e){!l(M,e)||t&&!l(x,e)||r.push(M[e])}),r};i||(m((w=function(){if(this instanceof w)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=te(e),r=function(e){this===x&&r.call(E,e),l(this,b)&&l(this[b],t)&&(this[b][t]=!1),P(this,t,h(1,e))};return s&&O&&P(x,t,{configurable:!0,set:r}),o(t,e)})[_],"toString",function(){return ae(this).tag}),m(w,"withoutSetter",function(e){return o(te(e),e)}),J.f=R,Q.f=L,Z.f=t,X.f=Y.f=U,p.f=I,oe.f=function(e){return o(re(e),e)},s&&(T(w[_],"description",{configurable:!0,get:function(){return ae(this).description}}),G||m(x,"propertyIsEnumerable",R,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!i,sham:!i},{Symbol:w}),v(q($),function(e){ne(e)}),n({target:j,stat:!0,forced:!i},{for:function(e){var t,e=String(e);return l(k,e)?k[e]:(t=w(e),k[e]=t,C[t]=e,t)},keyFor:function(e){if(!A(e))throw TypeError(e+" is not a symbol");if(l(C,e))return C[e]},useSetter:function(){O=!0},useSimple:function(){O=!1}}),n({target:"Object",stat:!0,forced:!i,sham:!s},{create:function(e,t){return void 0===t?f(e):r(f(e),t)},defineProperty:L,defineProperties:r,getOwnPropertyDescriptor:t}),n({target:"Object",stat:!0,forced:!i},{getOwnPropertyNames:U,getOwnPropertySymbols:I}),n({target:"Object",stat:!0,forced:a(function(){p.f(1)})},{getOwnPropertySymbols:function(e){return p.f(W(e))}}),S&&n({target:"JSON",stat:!0,forced:!i||a(function(){var e=w();return"[null]"!=S([e])||"{}"!=S({a:e})||"{}"!=S(Object(e))})},{stringify:function(e,t,r){for(var o,n=[e],s=1;s<arguments.length;)n.push(arguments[s++]);if((H(o=t)||void 0!==e)&&!A(e))return z(t)||(t=function(e,t){if("function"==typeof o&&(t=o.call(this,e,t)),!A(t))return t}),n[1]=t,S.apply(null,n)}}),w[_][e]||K(w[_],e,w[_].valueOf),se(w,j),ee[b]=!0},{"../internals/an-object":10,"../internals/array-iteration":19,"../internals/create-non-enumerable-property":38,"../internals/create-property-descriptor":39,"../internals/define-well-known-symbol":42,"../internals/descriptors":43,"../internals/export":50,"../internals/fails":51,"../internals/get-built-in":56,"../internals/global":59,"../internals/has":60,"../internals/hidden-keys":61,"../internals/internal-state":70,"../internals/is-array":72,"../internals/is-object":74,"../internals/is-pure":75,"../internals/native-symbol":83,"../internals/object-create":90,"../internals/object-define-property":92,"../internals/object-get-own-property-descriptor":93,"../internals/object-get-own-property-names":95,"../internals/object-get-own-property-names-external":94,"../internals/object-get-own-property-symbols":96,"../internals/object-keys":99,"../internals/object-property-is-enumerable":100,"../internals/redefine":108,"../internals/set-to-string-tag":117,"../internals/shared":120,"../internals/shared-key":118,"../internals/to-indexed-object":134,"../internals/to-object":137,"../internals/to-primitive":140,"../internals/uid":145,"../internals/use-symbol-as-uid":146,"../internals/well-known-symbol":148,"../internals/well-known-symbol-wrapped":147}],205:[function(e,t,r){"use strict";var o=e("../internals/array-buffer-view-core"),n=e("../internals/array-copy-within"),s=o.aTypedArray;(0,o.exportTypedArrayMethod)("copyWithin",function(e,t){return n.call(s(this),e,t,2<arguments.length?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-copy-within":14}],206:[function(e,t,r){"use strict";var o=e("../internals/array-buffer-view-core"),n=e("../internals/array-iteration").every,s=o.aTypedArray;(0,o.exportTypedArrayMethod)("every",function(e){return n(s(this),e,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-iteration":19}],207:[function(e,t,r){"use strict";var o=e("../internals/array-buffer-view-core"),n=e("../internals/array-fill"),s=o.aTypedArray;(0,o.exportTypedArrayMethod)("fill",function(e){return n.apply(s(this),arguments)})},{"../internals/array-buffer-view-core":12,"../internals/array-fill":15}],208:[function(e,t,r){"use strict";var o=e("../internals/array-buffer-view-core"),s=e("../internals/array-iteration").filter,i=e("../internals/species-constructor"),a=o.aTypedArray,l=o.aTypedArrayConstructor;(0,o.exportTypedArrayMethod)("filter",function(e){for(var t=s(a(this),e,1<arguments.length?arguments[1]:void 0),e=i(this,this.constructor),r=0,o=t.length,n=new(l(e))(o);r<o;)n[r]=t[r++];return n})},{"../internals/array-buffer-view-core":12,"../internals/array-iteration":19,"../internals/species-constructor":121}],209:[function(e,t,r){"use strict";var o=e("../internals/array-buffer-view-core"),n=e("../internals/array-iteration").findIndex,s=o.aTypedArray;(0,o.exportTypedArrayMethod)("findIndex",function(e){return n(s(this),e,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-iteration":19}],210:[function(e,t,r){"use strict";var o=e("../internals/array-buffer-view-core"),n=e("../internals/array-iteration").find,s=o.aTypedArray;(0,o.exportTypedArrayMethod)("find",function(e){return n(s(this),e,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-iteration":19}],211:[function(e,t,r){e("../internals/typed-array-constructor")("Float32",function(o){return function(e,t,r){return o(this,e,t,r)}})},{"../internals/typed-array-constructor":142}],212:[function(e,t,r){e("../internals/typed-array-constructor")("Float64",function(o){return function(e,t,r){return o(this,e,t,r)}})},{"../internals/typed-array-constructor":142}],213:[function(e,t,r){"use strict";var o=e("../internals/array-buffer-view-core"),n=e("../internals/array-iteration").forEach,s=o.aTypedArray;(0,o.exportTypedArrayMethod)("forEach",function(e){n(s(this),e,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-iteration":19}],214:[function(e,t,r){"use strict";var o=e("../internals/array-buffer-view-core"),n=e("../internals/array-includes").includes,s=o.aTypedArray;(0,o.exportTypedArrayMethod)("includes",function(e){return n(s(this),e,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-includes":18}],215:[function(e,t,r){"use strict";var o=e("../internals/array-buffer-view-core"),n=e("../internals/array-includes").indexOf,s=o.aTypedArray;(0,o.exportTypedArrayMethod)("indexOf",function(e){return n(s(this),e,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-includes":18}],216:[function(e,t,r){e("../internals/typed-array-constructor")("Int16",function(o){return function(e,t,r){return o(this,e,t,r)}})},{"../internals/typed-array-constructor":142}],217:[function(e,t,r){e("../internals/typed-array-constructor")("Int32",function(o){return function(e,t,r){return o(this,e,t,r)}})},{"../internals/typed-array-constructor":142}],218:[function(e,t,r){"use strict";function o(){return a.call(c(this))}var n=e("../internals/global"),s=e("../internals/array-buffer-view-core"),i=e("../modules/es.array.iterator"),e=e("../internals/well-known-symbol")("iterator"),n=n.Uint8Array,a=i.values,l=i.keys,u=i.entries,c=s.aTypedArray,i=s.exportTypedArrayMethod,s=n&&n.prototype[e],n=!!s&&("values"==s.name||null==s.name);i("entries",function(){return u.call(c(this))}),i("keys",function(){return l.call(c(this))}),i("values",o,!n),i(e,o,!n)},{"../internals/array-buffer-view-core":12,"../internals/global":59,"../internals/well-known-symbol":148,"../modules/es.array.iterator":161}],219:[function(e,t,r){"use strict";var e=e("../internals/array-buffer-view-core"),o=e.aTypedArray,e=e.exportTypedArrayMethod,n=[].join;e("join",function(e){return n.apply(o(this),arguments)})},{"../internals/array-buffer-view-core":12}],220:[function(e,t,r){"use strict";var o=e("../internals/array-buffer-view-core"),n=e("../internals/array-last-index-of"),s=o.aTypedArray;(0,o.exportTypedArrayMethod)("lastIndexOf",function(e){return n.apply(s(this),arguments)})},{"../internals/array-buffer-view-core":12,"../internals/array-last-index-of":20}],221:[function(e,t,r){"use strict";var o=e("../internals/array-buffer-view-core"),n=e("../internals/array-iteration").map,s=e("../internals/species-constructor"),i=o.aTypedArray,a=o.aTypedArrayConstructor;(0,o.exportTypedArrayMethod)("map",function(e){return n(i(this),e,1<arguments.length?arguments[1]:void 0,function(e,t){return new(a(s(e,e.constructor)))(t)})})},{"../internals/array-buffer-view-core":12,"../internals/array-iteration":19,"../internals/species-constructor":121}],222:[function(e,t,r){"use strict";var o=e("../internals/array-buffer-view-core"),n=e("../internals/array-reduce").right,s=o.aTypedArray;(0,o.exportTypedArrayMethod)("reduceRight",function(e){return n(s(this),e,arguments.length,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-reduce":24}],223:[function(e,t,r){"use strict";var o=e("../internals/array-buffer-view-core"),n=e("../internals/array-reduce").left,s=o.aTypedArray;(0,o.exportTypedArrayMethod)("reduce",function(e){return n(s(this),e,arguments.length,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-reduce":24}],224:[function(e,t,r){"use strict";var e=e("../internals/array-buffer-view-core"),n=e.aTypedArray,e=e.exportTypedArrayMethod,s=Math.floor;e("reverse",function(){for(var e,t=n(this).length,r=s(t/2),o=0;o<r;)e=this[o],this[o++]=this[--t],this[t]=e;return this})},{"../internals/array-buffer-view-core":12}],225:[function(e,t,r){"use strict";var o=e("../internals/array-buffer-view-core"),i=e("../internals/to-length"),a=e("../internals/to-offset"),l=e("../internals/to-object"),e=e("../internals/fails"),u=o.aTypedArray;(0,o.exportTypedArrayMethod)("set",function(e){u(this);var t=a(1<arguments.length?arguments[1]:void 0,1),r=this.length,o=l(e),n=i(o.length),s=0;if(r<n+t)throw RangeError("Wrong length");for(;s<n;)this[t+s]=o[s++]},e(function(){new Int8Array(1).set({})}))},{"../internals/array-buffer-view-core":12,"../internals/fails":51,"../internals/to-length":136,"../internals/to-object":137,"../internals/to-offset":138}],226:[function(e,t,r){"use strict";var o=e("../internals/array-buffer-view-core"),i=e("../internals/species-constructor"),e=e("../internals/fails"),a=o.aTypedArray,l=o.aTypedArrayConstructor,o=o.exportTypedArrayMethod,u=[].slice;o("slice",function(e,t){for(var r=u.call(a(this),e,t),e=i(this,this.constructor),o=0,n=r.length,s=new(l(e))(n);o<n;)s[o]=r[o++];return s},e(function(){new Int8Array(1).slice()}))},{"../internals/array-buffer-view-core":12,"../internals/fails":51,"../internals/species-constructor":121}],227:[function(e,t,r){"use strict";var o=e("../internals/array-buffer-view-core"),n=e("../internals/array-iteration").some,s=o.aTypedArray;(0,o.exportTypedArrayMethod)("some",function(e){return n(s(this),e,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-iteration":19}],228:[function(e,t,r){"use strict";var e=e("../internals/array-buffer-view-core"),o=e.aTypedArray,e=e.exportTypedArrayMethod,n=[].sort;e("sort",function(e){return n.call(o(this),e)})},{"../internals/array-buffer-view-core":12}],229:[function(e,t,r){"use strict";var o=e("../internals/array-buffer-view-core"),n=e("../internals/to-length"),s=e("../internals/to-absolute-index"),i=e("../internals/species-constructor"),a=o.aTypedArray;(0,o.exportTypedArrayMethod)("subarray",function(e,t){var r=a(this),o=r.length,e=s(e,o);return new(i(r,r.constructor))(r.buffer,r.byteOffset+e*r.BYTES_PER_ELEMENT,n((void 0===t?o:s(t,o))-e))})},{"../internals/array-buffer-view-core":12,"../internals/species-constructor":121,"../internals/to-absolute-index":132,"../internals/to-length":136}],230:[function(e,t,r){"use strict";var o=e("../internals/global"),n=e("../internals/array-buffer-view-core"),e=e("../internals/fails"),s=o.Int8Array,i=n.aTypedArray,o=n.exportTypedArrayMethod,a=[].toLocaleString,l=[].slice,u=!!s&&e(function(){a.call(new s(1))});o("toLocaleString",function(){return a.apply(u?l.call(i(this)):i(this),arguments)},e(function(){return[1,2].toLocaleString()!=new s([1,2]).toLocaleString()})||!e(function(){s.prototype.toLocaleString.call([1,2])}))},{"../internals/array-buffer-view-core":12,"../internals/fails":51,"../internals/global":59}],231:[function(e,t,r){"use strict";var o=e("../internals/array-buffer-view-core").exportTypedArrayMethod,n=e("../internals/fails"),e=e("../internals/global").Uint8Array,e=e&&e.prototype||{},s=[].toString,i=[].join,n=(n(function(){s.call({})})&&(s=function(){return i.call(this)}),e.toString!=s);o("toString",s,n)},{"../internals/array-buffer-view-core":12,"../internals/fails":51,"../internals/global":59}],232:[function(e,t,r){e("../internals/typed-array-constructor")("Uint16",function(o){return function(e,t,r){return o(this,e,t,r)}})},{"../internals/typed-array-constructor":142}],233:[function(e,t,r){e("../internals/typed-array-constructor")("Uint32",function(o){return function(e,t,r){return o(this,e,t,r)}})},{"../internals/typed-array-constructor":142}],234:[function(e,t,r){e("../internals/typed-array-constructor")("Uint8",function(o){return function(e,t,r){return o(this,e,t,r)}})},{"../internals/typed-array-constructor":142}],235:[function(e,t,r){e("../internals/typed-array-constructor")("Uint8",function(o){return function(e,t,r){return o(this,e,t,r)}},!0)},{"../internals/typed-array-constructor":142}],236:[function(e,t,r){"use strict";function o(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}var n,s,i,a,l,u=e("../internals/global"),c=e("../internals/redefine-all"),d=e("../internals/internal-metadata"),h=e("../internals/collection"),f=e("../internals/collection-weak"),p=e("../internals/is-object"),m=e("../internals/internal-state").enforce,e=e("../internals/native-weak-map"),u=!u.ActiveXObject&&"ActiveXObject"in u,y=Object.isExtensible,t=t.exports=h("WeakMap",o,f);e&&u&&(n=f.getConstructor(o,"WeakMap",!0),d.REQUIRED=!0,h=t.prototype,s=h.delete,i=h.has,a=h.get,l=h.set,c(h,{delete:function(e){var t;return p(e)&&!y(e)?((t=m(this)).frozen||(t.frozen=new n),s.call(this,e)||t.frozen.delete(e)):s.call(this,e)},has:function(e){var t;return p(e)&&!y(e)?((t=m(this)).frozen||(t.frozen=new n),i.call(this,e)||t.frozen.has(e)):i.call(this,e)},get:function(e){var t;return!p(e)||y(e)||((t=m(this)).frozen||(t.frozen=new n),i.call(this,e))?a.call(this,e):t.frozen.get(e)},set:function(e,t){var r;return!p(e)||y(e)||((r=m(this)).frozen||(r.frozen=new n),i.call(this,e))?l.call(this,e,t):r.frozen.set(e,t),this}}))},{"../internals/collection":32,"../internals/collection-weak":31,"../internals/global":59,"../internals/internal-metadata":69,"../internals/internal-state":70,"../internals/is-object":74,"../internals/native-weak-map":85,"../internals/redefine-all":107}],237:[function(e,t,r){var o,n=e("../internals/global"),s=e("../internals/dom-iterables"),i=e("../internals/array-for-each"),a=e("../internals/create-non-enumerable-property");for(o in s){var l=n[o],l=l&&l.prototype;if(l&&l.forEach!==i)try{a(l,"forEach",i)}catch(e){l.forEach=i}}},{"../internals/array-for-each":16,"../internals/create-non-enumerable-property":38,"../internals/dom-iterables":45,"../internals/global":59}],238:[function(e,t,r){var o,n=e("../internals/global"),s=e("../internals/dom-iterables"),i=e("../modules/es.array.iterator"),a=e("../internals/create-non-enumerable-property"),e=e("../internals/well-known-symbol"),l=e("iterator"),u=e("toStringTag"),c=i.values;for(o in s){var d=n[o],h=d&&d.prototype;if(h){if(h[l]!==c)try{a(h,l,c)}catch(e){h[l]=c}if(h[u]||a(h,u,o),s[o])for(var f in i)if(h[f]!==i[f])try{a(h,f,i[f])}catch(e){h[f]=i[f]}}}},{"../internals/create-non-enumerable-property":38,"../internals/dom-iterables":45,"../internals/global":59,"../internals/well-known-symbol":148,"../modules/es.array.iterator":161}],239:[function(e,t,D){"use strict";e("../modules/es.array.iterator");function n(t){try{return decodeURIComponent(t)}catch(e){return t}}function r(e){return B[e]}function s(e){return encodeURIComponent(e).replace(N,r)}function c(e){this.entries.length=0,R(this.entries,e)}function u(e,t){if(e<t)throw TypeError("Not enough arguments")}function d(){y(this,d,k);var e,t,r,o,n,s,i,a,l=0<arguments.length?arguments[0]:void 0,u=[];if(O(this,{type:k,entries:u,updateURL:function(){},updateSearchParams:c}),void 0!==l)if(_(l))if("function"==typeof(e=T(l)))for(r=(t=e.call(l)).next;!(o=r.call(t)).done;){if((s=(n=(o=S(j(o.value))).next).call(o)).done||(i=n.call(o)).done||!n.call(o).done)throw TypeError("Expected sequence with length 2");u.push({key:s.value+"",value:i.value+""})}else for(a in l)g(l,a)&&u.push({key:a,value:l[a]+""});else R(u,"string"==typeof l?"?"===l.charAt(0)?l.slice(1):l:l+"")}var o=e("../internals/export"),i=e("../internals/get-built-in"),a=e("../internals/native-url"),l=e("../internals/redefine"),h=e("../internals/redefine-all"),f=e("../internals/set-to-string-tag"),p=e("../internals/create-iterator-constructor"),m=e("../internals/internal-state"),y=e("../internals/an-instance"),g=e("../internals/has"),v=e("../internals/function-bind-context"),b=e("../internals/classof"),j=e("../internals/an-object"),_=e("../internals/is-object"),x=e("../internals/object-create"),w=e("../internals/create-property-descriptor"),S=e("../internals/get-iterator"),T=e("../internals/get-iterator-method"),e=e("../internals/well-known-symbol"),M=i("fetch"),E=i("Headers"),i=e("iterator"),k="URLSearchParams",C=k+"Iterator",O=m.set,P=m.getterFor(k),F=m.getterFor(C),U=/\+/g,A=Array(4),L=function(e){var t,r=e.replace(U," "),o=4;try{return decodeURIComponent(r)}catch(e){for(;o;)r=r.replace((t=o--,A[t-1]||(A[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))),n);return r}},N=/[!'()~]|%20/g,B={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},R=function(e,t){if(t)for(var r,o=t.split("&"),n=0;n<o.length;)(r=o[n++]).length&&(r=r.split("="),e.push({key:L(r.shift()),value:L(r.join("="))}))},I=p(function(e,t){O(this,{type:C,iterator:S(P(e).entries),kind:t})},"Iterator",function(){var e=F(this),t=e.kind,e=e.iterator.next(),r=e.value;return e.done||(e.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),e}),e=d.prototype;h(e,{append:function(e,t){u(arguments.length,2);var r=P(this);r.entries.push({key:e+"",value:t+""}),r.updateURL()},delete:function(e){u(arguments.length,1);for(var t=P(this),r=t.entries,o=e+"",n=0;n<r.length;)r[n].key===o?r.splice(n,1):n++;t.updateURL()},get:function(e){u(arguments.length,1);for(var t=P(this).entries,r=e+"",o=0;o<t.length;o++)if(t[o].key===r)return t[o].value;return null},getAll:function(e){u(arguments.length,1);for(var t=P(this).entries,r=e+"",o=[],n=0;n<t.length;n++)t[n].key===r&&o.push(t[n].value);return o},has:function(e){u(arguments.length,1);for(var t=P(this).entries,r=e+"",o=0;o<t.length;)if(t[o++].key===r)return!0;return!1},set:function(e,t){u(arguments.length,1);for(var r,o=P(this),n=o.entries,s=!1,i=e+"",a=t+"",l=0;l<n.length;l++)(r=n[l]).key===i&&(s?n.splice(l--,1):(s=!0,r.value=a));s||n.push({key:i,value:a}),o.updateURL()},sort:function(){for(var e,t,r=P(this),o=r.entries,n=o.slice(),s=o.length=0;s<n.length;s++){for(e=n[s],t=0;t<s;t++)if(o[t].key>e.key){o.splice(t,0,e);break}t===s&&o.push(e)}r.updateURL()},forEach:function(e){for(var t,r=P(this).entries,o=v(e,1<arguments.length?arguments[1]:void 0,3),n=0;n<r.length;)o((t=r[n++]).value,t.key,this)},keys:function(){return new I(this,"keys")},values:function(){return new I(this,"values")},entries:function(){return new I(this,"entries")}},{enumerable:!0}),l(e,i,e.entries),l(e,"toString",function(){for(var e,t=P(this).entries,r=[],o=0;o<t.length;)e=t[o++],r.push(s(e.key)+"="+s(e.value));return r.join("&")},{enumerable:!0}),f(d,k),o({global:!0,forced:!a},{URLSearchParams:d}),a||"function"!=typeof M||"function"!=typeof E||o({global:!0,enumerable:!0,forced:!0},{fetch:function(e){var t,r,o,e=[e];return 1<arguments.length&&(_(t=arguments[1])&&(r=t.body,b(r)===k&&((o=t.headers?new E(t.headers):new E).has("content-type")||o.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=x(t,{body:w(0,String(r)),headers:w(0,o)}))),e.push(t)),M.apply(this,e)}}),t.exports={URLSearchParams:d,getState:P}},{"../internals/an-instance":9,"../internals/an-object":10,"../internals/classof":29,"../internals/create-iterator-constructor":37,"../internals/create-property-descriptor":39,"../internals/export":50,"../internals/function-bind-context":54,"../internals/get-built-in":56,"../internals/get-iterator":58,"../internals/get-iterator-method":57,"../internals/has":60,"../internals/internal-state":70,"../internals/is-object":74,"../internals/native-url":84,"../internals/object-create":90,"../internals/redefine":108,"../internals/redefine-all":107,"../internals/set-to-string-tag":117,"../internals/well-known-symbol":148,"../modules/es.array.iterator":161}],240:[function(e,y,F){"use strict";e("../modules/es.string.iterator");function c(e){var t,r,o,n;if("number"==typeof e){for(t=[],r=0;r<4;r++)t.unshift(e%256),e=Y(e/256);return t.join(".")}if("object"!=typeof e)return e;for(t="",o=le(e),r=0;r<8;r++)n&&0===e[r]||(n=n&&!1,o===r?(t+=r?":":"::",n=!0):(t+=e[r].toString(16),r<7&&(t+=":")));return"["+t+"]"}function n(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme}function a(e,t,r,o){var n,s,i,a=r||me,l=0,u="",c=!1,d=!1,h=!1;for(r||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(ie,"")),t=t.replace(ae,""),n=b(t);l<=n.length;){switch(s=n[l],a){case me:if(!s||!K.test(s)){if(r)return j;a=ge;continue}u+=s.toLowerCase(),a=ye;break;case ye:if(s&&($.test(s)||"+"==s||"-"==s||"."==s))u+=s.toLowerCase();else{if(":"!=s){if(r)return j;u="",a=ge,l=0;continue}if(r&&(k(e)!=v(E,u)||"file"==u&&(C(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=u,r)return void(k(e)&&E[e.scheme]==e.port&&(e.port=null));u="","file"==e.scheme?a=Me:k(e)&&o&&o.scheme==e.scheme?a=ve:k(e)?a=xe:"/"==n[l+1]?(a=be,l++):(e.cannotBeABaseURL=!0,e.path.push(""),a=Ce)}break;case ge:if(!o||o.cannotBeABaseURL&&"#"!=s)return j;if(o.cannotBeABaseURL&&"#"==s){e.scheme=o.scheme,e.path=o.path.slice(),e.query=o.query,e.fragment="",e.cannotBeABaseURL=!0,a=D;break}a="file"==o.scheme?Me:je;continue;case ve:if("/"!=s||"/"!=n[l+1]){a=je;continue}a=P,l++;break;case be:if("/"==s){a=A;break}a=R;continue;case je:if(e.scheme=o.scheme,s==g)e.username=o.username,e.password=o.password,e.host=o.host,e.port=o.port,e.path=o.path.slice(),e.query=o.query;else if("/"==s||"\\"==s&&k(e))a=_e;else if("?"==s)e.username=o.username,e.password=o.password,e.host=o.host,e.port=o.port,e.path=o.path.slice(),e.query="",a=I;else{if("#"!=s){e.username=o.username,e.password=o.password,e.host=o.host,e.port=o.port,e.path=o.path.slice(),e.path.pop(),a=R;continue}e.username=o.username,e.password=o.password,e.host=o.host,e.port=o.port,e.path=o.path.slice(),e.query=o.query,e.fragment="",a=D}break;case _e:if(!k(e)||"/"!=s&&"\\"!=s){if("/"!=s){e.username=o.username,e.password=o.password,e.host=o.host,e.port=o.port,a=R;continue}a=A}else a=P;break;case xe:if(a=P,"/"!=s||"/"!=u.charAt(l+1))continue;l++;break;case P:if("/"==s||"\\"==s)break;a=A;continue;case A:if("@"==s){c&&(u="%40"+u);for(var c=!0,f=b(u),p=0;p<f.length;p++){var m=f[p];":"!=m||h?(m=M(m,T),h?e.password+=m:e.username+=m):h=!0}u=""}else if(s==g||"/"==s||"?"==s||"#"==s||"\\"==s&&k(e)){if(c&&""==u)return Q;l-=b(u).length+1,u="",a=we}else u+=s;break;case we:case Se:if(r&&"file"==e.scheme){a=ke;continue}if(":"!=s||d){if(s==g||"/"==s||"?"==s||"#"==s||"\\"==s&&k(e)){if(k(e)&&""==u)return _;if(r&&""==u&&(C(e)||null!==e.port))return;if(i=w(e,u))return i;if(u="",a=L,r)return;continue}"["==s?d=!0:"]"==s&&(d=!1),u+=s}else{if(""==u)return _;if(i=w(e,u))return i;if(u="",a=Te,r==Se)return}break;case Te:if(!x.test(s)){if(s==g||"/"==s||"?"==s||"#"==s||"\\"==s&&k(e)||r){if(""!=u){var y=parseInt(u,10);if(65535<y)return J;e.port=k(e)&&y===E[e.scheme]?null:y,u=""}if(r)return;a=L;continue}return J}u+=s;break;case Me:if(e.scheme="file","/"==s||"\\"==s)a=Ee;else{if(!o||"file"!=o.scheme){a=R;continue}if(s==g)e.host=o.host,e.path=o.path.slice(),e.query=o.query;else if("?"==s)e.host=o.host,e.path=o.path.slice(),e.query="",a=I;else{if("#"!=s){de(n.slice(l).join(""))||(e.host=o.host,e.path=o.path.slice(),he(e)),a=R;continue}e.host=o.host,e.path=o.path.slice(),e.query=o.query,e.fragment="",a=D}}break;case Ee:if("/"==s||"\\"==s){a=ke;break}o&&"file"==o.scheme&&!de(n.slice(l).join(""))&&(O(o.path[0],!0)?e.path.push(o.path[0]):e.host=o.host),a=R;continue;case ke:if(s==g||"/"==s||"\\"==s||"?"==s||"#"==s){if(!r&&O(u))a=R;else{if(""==u){if(e.host="",r)return}else{if(i=w(e,u))return i;if("localhost"==e.host&&(e.host=""),r)return;u=""}a=L}continue}u+=s;break;case L:if(k(e)){if(a=R,"/"!=s&&"\\"!=s)continue}else if(r||"?"!=s)if(r||"#"!=s){if(s!=g&&(a=R,"/"!=s))continue}else e.fragment="",a=D;else e.query="",a=I;break;case R:if(s==g||"/"==s||"\\"==s&&k(e)||!r&&("?"==s||"#"==s)){if(pe(u)?(he(e),"/"==s||"\\"==s&&k(e)||e.path.push("")):fe(u)?"/"==s||"\\"==s&&k(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&O(u)&&(e.host&&(e.host=""),u=u.charAt(0)+":"),e.path.push(u)),u="","file"==e.scheme&&(s==g||"?"==s||"#"==s))for(;1<e.path.length&&""===e.path[0];)e.path.shift();"?"==s?(e.query="",a=I):"#"==s&&(e.fragment="",a=D)}else u+=M(s,ce);break;case Ce:"?"==s?(e.query="",a=I):"#"==s?(e.fragment="",a=D):s!=g&&(e.path[0]+=M(s,S));break;case I:r||"#"!=s?s!=g&&("'"==s&&k(e)?e.query+="%27":e.query+="#"==s?"%23":M(s,S)):(e.fragment="",a=D);break;case D:s!=g&&(e.fragment+=M(s,ue))}l++}}function l(e){var t,r,o=G(this,l,"URL"),n=1<arguments.length?arguments[1]:void 0,e=String(e),s=X(o,{type:"URL"});if(void 0!==n)if(n instanceof l)t=p(n);else if(r=a(t={},String(n)))throw TypeError(r);if(r=a(s,e,null,t))throw TypeError(r);var i=s.searchParams=new q;(n=f(i)).updateSearchParams(s.query),n.updateURL=function(){s.query=String(i)||null},u||(o.href=m.call(o),o.origin=Oe.call(o),o.protocol=Pe.call(o),o.username=Ae.call(o),o.password=Le.call(o),o.host=Re.call(o),o.hostname=Ie.call(o),o.port=De.call(o),o.pathname=Fe.call(o),o.search=Ue.call(o),o.searchParams=Ne.call(o),o.hash=Be.call(o))}function t(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}}var g,r,o,U=e("../internals/export"),u=e("../internals/descriptors"),N=e("../internals/native-url"),s=e("../internals/global"),B=e("../internals/object-define-properties"),i=e("../internals/redefine"),G=e("../internals/an-instance"),v=e("../internals/has"),d=e("../internals/object-assign"),b=e("../internals/array-from"),V=e("../internals/string-multibyte").codeAt,z=e("../internals/string-punycode-to-ascii"),H=e("../internals/set-to-string-tag"),W=e("../modules/web.url-search-params"),e=e("../internals/internal-state"),h=s.URL,q=W.URLSearchParams,f=W.getState,X=e.set,p=e.getterFor("URL"),Y=Math.floor,Z=Math.pow,Q="Invalid authority",j="Invalid scheme",_="Invalid host",J="Invalid port",K=/[A-Za-z]/,$=/[\d+-.A-Za-z]/,x=/\d/,ee=/^(0x|0X)/,te=/^[0-7]+$/,re=/^\d+$/,oe=/^[\dA-Fa-f]+$/,ne=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,se=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,ie=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,ae=/[\u0009\u000A\u000D]/g,w=function(e,t){var r,o,n;if("["==t.charAt(0))return"]"==t.charAt(t.length-1)&&(r=function(e){var t=[0,0,0,0,0,0,0,0],r=0,o=null,n=0,s,i,a,l,u,c,d,h=function(){return e.charAt(n)};if(h()==":"){if(e.charAt(1)!=":")return;n+=2;r++;o=r}while(h()){if(r==8)return;if(h()==":"){if(o!==null)return;n++;r++;o=r;continue}s=i=0;while(i<4&&oe.test(h())){s=s*16+parseInt(h(),16);n++;i++}if(h()=="."){if(i==0)return;n-=i;if(r>6)return;a=0;while(h()){l=null;if(a>0)if(h()=="."&&a<4)n++;else return;if(!x.test(h()))return;while(x.test(h())){u=parseInt(h(),10);if(l===null)l=u;else if(l==0)return;else l=l*10+u;if(l>255)return;n++}t[r]=t[r]*256+l;a++;if(a==2||a==4)r++}if(a!=4)return;break}else if(h()==":"){n++;if(!h())return}else if(h())return;t[r++]=s}if(o!==null){c=r-o;r=7;while(r!=0&&c>0){d=t[r];t[r--]=t[o+c-1];t[o+--c]=d}}else if(r!=8)return;return t}(t.slice(1,-1)))?void(e.host=r):_;if(k(e))return t=z(t),ne.test(t)||null===(r=function(e){var t=e.split("."),r,o,n,s,i,a,l;if(t.length&&t[t.length-1]=="")t.pop();if((r=t.length)>4)return e;for(o=[],n=0;n<r;n++){s=t[n];if(s=="")return e;i=10;if(s.length>1&&s.charAt(0)=="0"){i=ee.test(s)?16:8;s=s.slice(i==8?1:2)}if(s==="")a=0;else{if(!(i==10?re:i==8?te:oe).test(s))return e;a=parseInt(s,i)}o.push(a)}for(n=0;n<r;n++){a=o[n];if(n==r-1){if(a>=Z(256,5-r))return null}else if(a>255)return null}for(l=o.pop(),n=0;n<o.length;n++)l+=o[n]*Z(256,3-n);return l}(t))?_:void(e.host=r);if(se.test(t))return _;for(r="",o=b(t),n=0;n<o.length;n++)r+=M(o[n],S);e.host=r},le=function(e){for(var t=null,r=1,o=null,n=0,s=0;s<8;s++)0!==e[s]?(r<n&&(t=o,r=n),o=null,n=0):(null===o&&(o=s),++n);return r<n&&(t=o,r=n),t},S={},ue=d({},S,{" ":1,'"':1,"<":1,">":1,"`":1}),ce=d({},ue,{"#":1,"?":1,"{":1,"}":1}),T=d({},ce,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),M=function(e,t){var r=V(e,0);return 32<r&&r<127&&!v(t,e)?e:encodeURIComponent(e)},E={ftp:21,file:null,http:80,https:443,ws:80,wss:443},k=function(e){return v(E,e.scheme)},C=function(e){return""!=e.username||""!=e.password},O=function(e,t){return 2==e.length&&K.test(e.charAt(0))&&(":"==(e=e.charAt(1))||!t&&"|"==e)},de=function(e){return 1<e.length&&O(e.slice(0,2))&&(2==e.length||"/"===(e=e.charAt(2))||"\\"===e||"?"===e||"#"===e)},he=function(e){var t=e.path,r=t.length;!r||"file"==e.scheme&&1==r&&O(t[0],!0)||t.pop()},fe=function(e){return"."===e||"%2e"===e.toLowerCase()},pe=function(e){return".."===(e=e.toLowerCase())||"%2e."===e||".%2e"===e||"%2e%2e"===e},me={},ye={},ge={},ve={},be={},je={},_e={},xe={},P={},A={},we={},Se={},Te={},Me={},Ee={},ke={},L={},R={},Ce={},I={},D={},s=l.prototype,m=function(){var e=p(this),t=e.scheme,r=e.username,o=e.password,n=e.host,s=e.port,i=e.path,a=e.query,l=e.fragment,u=t+":";return null!==n?(u+="//",C(e)&&(u+=r+(o?":"+o:"")+"@"),u+=c(n),null!==s&&(u+=":"+s)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?i[0]:i.length?"/"+i.join("/"):"",null!==a&&(u+="?"+a),null!==l&&(u+="#"+l),u},Oe=function(){var e=p(this),t=e.scheme,r=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&k(e)?t+"://"+c(e.host)+(null!==r?":"+r:""):"null"},Pe=function(){return p(this).scheme+":"},Ae=function(){return p(this).username},Le=function(){return p(this).password},Re=function(){var e=p(this),t=e.host,e=e.port;return null===t?"":null===e?c(t):c(t)+":"+e},Ie=function(){var e=p(this).host;return null===e?"":c(e)},De=function(){var e=p(this).port;return null===e?"":String(e)},Fe=function(){var e=p(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Ue=function(){var e=p(this).query;return e?"?"+e:""},Ne=function(){return p(this).searchParams},Be=function(){var e=p(this).fragment;return e?"#"+e:""};u&&B(s,{href:t(m,function(e){var t=p(this),e=String(e),e=a(t,e);if(e)throw TypeError(e);f(t.searchParams).updateSearchParams(t.query)}),origin:t(Oe),protocol:t(Pe,function(e){var t=p(this);a(t,String(e)+":",me)}),username:t(Ae,function(e){var t=p(this),r=b(String(e));if(!n(t)){t.username="";for(var o=0;o<r.length;o++)t.username+=M(r[o],T)}}),password:t(Le,function(e){var t=p(this),r=b(String(e));if(!n(t)){t.password="";for(var o=0;o<r.length;o++)t.password+=M(r[o],T)}}),host:t(Re,function(e){var t=p(this);t.cannotBeABaseURL||a(t,String(e),we)}),hostname:t(Ie,function(e){var t=p(this);t.cannotBeABaseURL||a(t,String(e),Se)}),port:t(De,function(e){var t=p(this);n(t)||(""==(e=String(e))?t.port=null:a(t,e,Te))}),pathname:t(Fe,function(e){var t=p(this);t.cannotBeABaseURL||(t.path=[],a(t,e+"",L))}),search:t(Ue,function(e){var t=p(this);""==(e=String(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",a(t,e,I)),f(t.searchParams).updateSearchParams(t.query)}),searchParams:t(Ne),hash:t(Be,function(e){var t=p(this);""==(e=String(e))?t.fragment=null:("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",a(t,e,D))})}),i(s,"toJSON",function(){return m.call(this)},{enumerable:!0}),i(s,"toString",function(){return m.call(this)},{enumerable:!0}),h&&(r=h.createObjectURL,o=h.revokeObjectURL,r&&i(l,"createObjectURL",function(e){return r.apply(h,arguments)}),o&&i(l,"revokeObjectURL",function(e){return o.apply(h,arguments)})),H(l,"URL"),U({global:!0,forced:!N,sham:!u},{URL:l})},{"../internals/an-instance":9,"../internals/array-from":17,"../internals/descriptors":43,"../internals/export":50,"../internals/global":59,"../internals/has":60,"../internals/internal-state":70,"../internals/native-url":84,"../internals/object-assign":89,"../internals/object-define-properties":91,"../internals/redefine":108,"../internals/set-to-string-tag":117,"../internals/string-multibyte":123,"../internals/string-punycode-to-ascii":126,"../modules/es.string.iterator":192,"../modules/web.url-search-params":239}],241:[function(e,t,r){"use strict";t.exports=e("./").polyfill()},{"./":242}],242:[function(V,r,o){!function(B,G){var e,t;e=this,t=function(){"use strict";function l(e){return"function"==typeof e}var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=0,t=void 0,n=void 0,i=function(e,t){d[o]=e,d[o+1]=t,2===(o+=2)&&(n?n(h):D())};var e="undefined"!=typeof window?window:void 0,s=e||{},s=s.MutationObserver||s.WebKitMutationObserver,a="undefined"==typeof self&&void 0!==B&&"[object process]"==={}.toString.call(B),u="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function c(){var e=setTimeout;return function(){return e(h,1)}}var d=new Array(1e3);function h(){for(var e=0;e<o;e+=2)(0,d[e])(d[e+1]),d[e]=void 0,d[e+1]=void 0;o=0}function f(){try{var e=Function("return this")().require("vertx");return void 0!==(t=e.runOnLoop||e.runOnContext)?function(){t(h)}:c()}catch(e){return c()}}var p,m,y,D=void 0;function g(e,t){var r,o=this,n=new this.constructor(j),s=(void 0===n[b]&&A(n),o._state);return s?(r=arguments[s-1],i(function(){return O(s,n,r,o._result)})):k(o,n,e,t),n}function v(e){var t;return e&&"object"==typeof e&&e.constructor===this?e:(T(t=new this(j),e),t)}var D=a?function(){return B.nextTick(h)}:s?(m=0,a=new s(h),y=document.createTextNode(""),a.observe(y,{characterData:!0}),function(){y.data=m=++m%2}):u?((p=new MessageChannel).port1.onmessage=h,function(){return p.port2.postMessage(0)}):(void 0===e&&"function"==typeof V?f:c)(),b=Math.random().toString(36).substring(2);function j(){}var _=void 0,x=1,w=2;function F(e,o,n){i(function(t){var r=!1,e=function(e,t,r,o){try{e.call(t,r,o)}catch(e){return e}}(n,o,function(e){r||(r=!0,(o!==e?T:M)(t,e))},function(e){r||(r=!0,E(t,e))},t._label);!r&&e&&(r=!0,E(t,e))},e)}function S(e,t,r){var o,n;t.constructor===e.constructor&&r===g&&t.constructor.resolve===v?(o=e,(n=t)._state===x?M(o,n._result):n._state===w?E(o,n._result):k(n,void 0,function(e){return T(o,e)},function(e){return E(o,e)})):void 0!==r&&l(r)?F(e,t,r):M(e,t)}function T(t,e){if(t===e)E(t,new TypeError("You cannot resolve a promise with itself"));else if(r=typeof e,null===e||"object"!=r&&"function"!=r)M(t,e);else{r=void 0;try{r=e.then}catch(e){return void E(t,e)}S(t,e,r)}var r}function U(e){e._onerror&&e._onerror(e._result),C(e)}function M(e,t){e._state===_&&(e._result=t,e._state=x,0!==e._subscribers.length&&i(C,e))}function E(e,t){e._state===_&&(e._state=w,e._result=t,i(U,e))}function k(e,t,r,o){var n=e._subscribers,s=n.length;e._onerror=null,n[s]=t,n[s+x]=r,n[s+w]=o,0===s&&e._state&&i(C,e)}function C(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var o,n=void 0,s=e._result,i=0;i<t.length;i+=3)o=t[i],n=t[i+r],o?O(r,o,n,s):n(s);e._subscribers.length=0}}function O(e,t,r,o){var n=l(r),s=void 0,i=void 0,a=!0;if(n){try{s=r(o)}catch(e){a=!1,i=e}if(t===s)return void E(t,new TypeError("A promises callback cannot return that same promise."))}else s=o;t._state===_&&(n&&a?T(t,s):!1===a?E(t,i):e===x?M(t,s):e===w&&E(t,s))}var P=0;function A(e){e[b]=P++,e._state=void 0,e._result=void 0,e._subscribers=[]}L.prototype._enumerate=function(e){for(var t=0;this._state===_&&t<e.length;t++)this._eachEntry(e[t],t)},L.prototype._eachEntry=function(t,e){var r=this._instanceConstructor,o=r.resolve;if(o===v){var n,s=void 0,i=void 0,a=!1;try{s=t.then}catch(e){a=!0,i=e}s===g&&t._state!==_?this._settledAt(t._state,e,t._result):"function"!=typeof s?(this._remaining--,this._result[e]=t):r===R?(n=new r(j),a?E(n,i):S(n,t,s),this._willSettleAt(n,e)):this._willSettleAt(new r(function(e){return e(t)}),e)}else this._willSettleAt(o(t),e)},L.prototype._settledAt=function(e,t,r){var o=this.promise;o._state===_&&(this._remaining--,e===w?E(o,r):this._result[t]=r),0===this._remaining&&M(o,this._result)},L.prototype._willSettleAt=function(e,t){var r=this;k(e,void 0,function(e){return r._settledAt(x,t,e)},function(e){return r._settledAt(w,t,e)})};var N=L;function L(e,t){this._instanceConstructor=e,this.promise=new e(j),this.promise[b]||A(this.promise),r(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0!==this.length&&(this.length=this.length||0,this._enumerate(t),0!==this._remaining)||M(this.promise,this._result)):E(this.promise,new Error("Array Methods must be provided an Array"))}I.prototype.catch=function(e){return this.then(null,e)},I.prototype.finally=function(t){var r=this.constructor;return l(t)?this.then(function(e){return r.resolve(t()).then(function(){return e})},function(e){return r.resolve(t()).then(function(){throw e})}):this.then(t,t)};var R=I;function I(e){if(this[b]=P++,this._result=this._state=void 0,this._subscribers=[],j!==e){if("function"!=typeof e)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof I))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");var t=this;try{e(function(e){T(t,e)},function(e){E(t,e)})}catch(e){E(t,e)}}}return R.prototype.then=g,R.all=function(e){return new N(this,e).promise},R.race=function(n){var s=this;return r(n)?new s(function(e,t){for(var r=n.length,o=0;o<r;o++)s.resolve(n[o]).then(e,t)}):new s(function(e,t){return t(new TypeError("You must pass an array to race."))})},R.resolve=v,R.reject=function(e){var t=new this(j);return E(t,e),t},R._setScheduler=function(e){n=e},R._setAsap=function(e){i=e},R._asap=i,R.polyfill=function(){var e=void 0;if(void 0!==G)e=G;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===r&&!t.cast)return}e.Promise=R},R.Promise=R},"object"==typeof o&&void 0!==r?r.exports=t():"function"==typeof s&&s.amd?s(t):e.ES6Promise=t()}.call(this,V("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:251}],243:[function(e,t,r){var o,n;o=this,n=function(e,t){"use strict";var r=5e3,o="callback";function d(t){try{delete window[t]}catch(e){window[t]=void 0}}function h(e){e=document.getElementById(e);e&&document.getElementsByTagName("head")[0].removeChild(e)}t.exports=function(s){var i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],a=s,l=i.timeout||r,u=i.jsonpCallback||o,c=void 0;return new Promise(function(t,e){var r=i.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),o=u+"_"+r,n=(window[r]=function(e){t({ok:!0,json:function(){return Promise.resolve(e)}}),c&&clearTimeout(c),h(o),d(r)},a+=-1===a.indexOf("?")?"?":"&",document.createElement("script"));n.setAttribute("src",""+a+u+"="+r),i.charset&&n.setAttribute("charset",i.charset),n.id=o,document.getElementsByTagName("head")[0].appendChild(n),c=setTimeout(function(){e(new Error("JSONP request to "+s+" timed out")),d(r),h(o),window[r]=function(){d(r)}},l),n.onerror=function(){e(new Error("JSONP request to "+s+" failed")),d(r),h(o),c&&clearTimeout(c)}})}},"function"==typeof s&&s.amd?s(["exports","module"],n):void 0!==r&&void 0!==t?n(0,t):(n(n={exports:{}},n),o.fetchJsonp=n.exports)},{}],244:[function(e,t,r){var o=function(a){"use strict";var l,u,c,d,h,f,t,p,m,o,e;if(!(void 0===a||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent)))return e=a.document,l=function(){return a.URL||a.webkitURL||a},u=e.createElementNS("http://www.w3.org/1999/xhtml","a"),c="download"in u,d=/constructor/i.test(a.HTMLElement)||a.safari,h=/CriOS\/[\d]+/.test(navigator.userAgent),f=function(e){(a.setImmediate||a.setTimeout)(function(){throw e},0)},t=4e4,p=function(e){setTimeout(function(){"string"==typeof e?l().revokeObjectURL(e):e.remove()},t)},m=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e},e=(o=function(e,r,t){t||(e=m(e));var o,n,s=this,t="application/octet-stream"===e.type,i=function(){for(var e=s,t="writestart progress write writeend".split(" "),r=void 0,o=(t=[].concat(t)).length;o--;){var n=e["on"+t[o]];if("function"==typeof n)try{n.call(e,r||e)}catch(e){f(e)}}};s.readyState=s.INIT,c?(o=l().createObjectURL(e),setTimeout(function(){var e,t;u.href=o,u.download=r,e=u,t=new MouseEvent("click"),e.dispatchEvent(t),i(),p(o),s.readyState=s.DONE})):(h||t&&d)&&a.FileReader?((n=new FileReader).onloadend=function(){var e=h?n.result:n.result.replace(/^data:[^;]*;/,"data:attachment/file;");a.open(e,"_blank")||(a.location.href=e),e=void 0,s.readyState=s.DONE,i()},n.readAsDataURL(e),s.readyState=s.INIT):(o=o||l().createObjectURL(e),!t&&a.open(o,"_blank")||(a.location.href=o),s.readyState=s.DONE,i(),p(o))}).prototype,"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t,r){return t=t||e.name||"download",r||(e=m(e)),navigator.msSaveOrOpenBlob(e,t)}:(e.abort=function(){},e.readyState=e.INIT=0,e.WRITING=1,e.DONE=2,e.error=e.onwritestart=e.onprogress=e.onwrite=e.onabort=e.onerror=e.onwriteend=null,function(e,t,r){return new o(e,t||e.name||"download",r)})}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);void 0!==t&&t.exports?t.exports.saveAs=o:null!=s&&null!==s.amd&&s("FileSaver.js",function(){return o})},{}],245:[function(e,t,r){var o,n=Object.defineProperty,s=(n(r,"__esModule",{value:!0}),r),i={GIFEncoder:()=>h,applyPalette:()=>function(e,t,r="rgb565"){if(!e||!e.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(e instanceof Uint8Array||e instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");if(256<t.length)throw new Error("applyPalette() only works with 256 colors or less");const o=new Uint32Array(e.buffer),n=o.length,s="rgb444"===r?4096:65536,i=new Uint8Array(n),a=new Array(s);if("rgba4444"===r)for(let e=0;e<n;e++){var l=o[e],u=l>>24&255,c=l>>16&255,d=l>>8&255,l=255&l,h=P(l,d,c,u),h=h in a?a[h]:a[h]=function(t,r,o,n,s){let i=0,a=1e100;for(let e=0;e<s.length;e++){var l,u=s[e],c=v(u[3]-n);c>a||(l=u[0],(c+=v(l-t))>a||(l=u[1],(c+=v(l-r))>a||(l=u[2],(c+=v(l-o))>a||(a=c,i=e))))}return i}(l,d,c,u,t);i[e]=h}else{const g="rgb444"===r?A:O;for(let e=0;e<n;e++){var f=o[e],p=f>>16&255,m=f>>8&255,f=255&f,y=g(f,m,p),y=y in a?a[y]:a[y]=function(t,r,o,n){let s=0,i=1e100;for(let e=0;e<n.length;e++){var a,l=n[e],u=v(l[0]-t);u>i||(a=l[1],(u+=v(a-r))>i||(a=l[2],(u+=v(a-o))>i||(i=u,s=e)))}return s}(f,m,p,t);i[e]=y}}return i},default:()=>f,nearestColor:()=>function(e,t,r=u){return e[l(e,t,r)]},nearestColorIndex:()=>l,nearestColorIndexWithDistance:()=>d,prequantize:()=>function(e,{roundRGB:r=5,roundAlpha:o=10,oneBitAlpha:n=null}={}){const s=new Uint32Array(e.buffer);for(let t=0;t<s.length;t++){var i=s[t];let e=i>>24&255;var a,l=i>>16&255,u=i>>8&255,i=255&i;e=c(e,o),n&&(a="number"==typeof n?n:127,e=e<=a?0:255),i=c(i,r),u=c(u,r),l=c(l,r),s[t]=e<<24|l<<16|u<<8|i<<0}},quantize:()=>function(e,t,r={}){var{format:o="rgb565",clearAlpha:n=!0,clearAlphaColor:s=0,clearAlphaThreshold:i=0,oneBitAlpha:a=!1}=r;if(!e||!e.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(e instanceof Uint8Array||e instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");e=new Uint32Array(e.buffer);let l=!1!==r.useSqrt;const u="rgba4444"===o,c=function(r,e){const t="rgb444"===e?4096:65536,o=new Array(t),n=r.length;if("rgba4444"===e)for(let t=0;t<n;++t){var s=r[t],i=s>>24&255,a=s>>16&255,l=s>>8&255,s=255&s,u=P(s,l,a,i);let e=u in o?o[u]:o[u]=D();e.rc+=s,e.gc+=l,e.bc+=a,e.ac+=i,e.cnt++}else if("rgb444"===e)for(let t=0;t<n;++t){var c=r[t],d=c>>16&255,h=c>>8&255,c=255&c,f=A(c,h,d);let e=f in o?o[f]:o[f]=D();e.rc+=c,e.gc+=h,e.bc+=d,e.cnt++}else for(let t=0;t<n;++t){var p=r[t],m=p>>16&255,y=p>>8&255,p=255&p,g=O(p,y,m);let e=g in o?o[g]:o[g]=D();e.rc+=p,e.gc+=y,e.bc+=m,e.cnt++}return o}(e,o),d=c.length,h=d-1,f=new Uint32Array(d+1);for(var p=0,m=0;m<d;++m){const C=c[m];null!=C&&(M=1/C.cnt,u&&(C.ac*=M),C.rc*=M,C.gc*=M,C.bc*=M,c[p++]=C)}R(t)/p<.022&&(l=!1);for(var y,g,v,m=0;m<p-1;++m)c[m].fw=m+1,c[m+1].bk=m,l&&(c[m].cnt=Math.sqrt(c[m].cnt));l&&(c[m].cnt=Math.sqrt(c[m].cnt));for(m=0;m<p;++m){I(c,m,!1);var b=c[m].err;for(g=++f[0];1<g&&(v=g>>1,!(c[y=f[v]].err<=b));g=v)f[g]=y;f[g]=m}var j,_=p-t;for(m=0;m<_;){for(;;){var x=f[1];if((j=c[x]).tm>=j.mtm&&c[j.nn].mtm<=j.tm)break;j.mtm==h?x=f[1]=f[f[0]--]:(I(c,x,!1),j.tm=m);b=c[x].err;for(g=1;(v=g+g)<=f[0]&&(v<f[0]&&c[f[v]].err>c[f[v+1]].err&&v++,!(b<=c[y=f[v]].err));g=v)f[g]=y;f[g]=x}var w=c[j.nn],S=j.cnt,T=w.cnt,M=1/(S+T);u&&(j.ac=M*(S*j.ac+T*w.ac)),j.rc=M*(S*j.rc+T*w.rc),j.gc=M*(S*j.gc+T*w.gc),j.bc=M*(S*j.bc+T*w.bc),j.cnt+=w.cnt,j.mtm=++m,c[w.bk].fw=w.fw,c[w.fw].bk=w.bk,w.mtm=h}let E=[];for(m=0;;0){let e=L(Math.round(c[m].rc),0,255),t=L(Math.round(c[m].gc),0,255),r=L(Math.round(c[m].bc),0,255),o=255;u&&(o=L(Math.round(c[m].ac),0,255),a&&(k="number"==typeof a?a:127,o=o<=k?0:255),n&&o<=i&&(e=t=r=s,o=0));var k=u?[e,t,r,o]:[e,t,r];if(function(t,r){for(let e=0;e<t.length;e++){var o=t[e],n=o[0]===r[0]&&o[1]===r[1]&&o[2]===r[2],o=!(4<=o.length&&4<=r.length)||o[3]===r[3];if(n&&o)return!0}return!1}(E,k)||E.push(k),0==(m=c[m].fw))break}return E},snapColorsToPalette:()=>function(r,o,e=5){if(r.length&&o.length){var n=r.map(e=>e.slice(0,3)),s=e*e,i=r[0].length;for(let t=0;t<o.length;t++){let e=o[t];e=e.length<i?[e[0],e[1],e[2],255]:e.length>i?e.slice(0,3):e.slice();var a=d(n,e.slice(0,3),u),l=a[0],a=a[1];0<a&&a<=s&&(r[l]=e)}}}};for(o in i)n(s,o,{get:i[o],enumerable:!0});var a={signature:"GIF",version:"89a",trailer:59,extensionIntroducer:33,applicationExtensionLabel:255,graphicControlExtensionLabel:249,imageSeparator:44,signatureSize:3,versionSize:3,globalColorTableFlagMask:128,colorResolutionMask:112,sortFlagMask:8,globalColorTableSizeMask:7,applicationIdentifierSize:8,applicationAuthCodeSize:3,disposalMethodMask:28,userInputFlagMask:2,transparentColorFlagMask:1,localColorTableFlagMask:128,interlaceFlagMask:64,idSortFlagMask:32,localColorTableSizeMask:7};function E(e=256){let n=0,s=new Uint8Array(e);return{get buffer(){return s.buffer},reset(){n=0},bytesView(){return s.subarray(0,n)},bytes(){return s.slice(0,n)},writeByte(e){i(n+1),s[n]=e,n++},writeBytes(t,r=0,o=t.length){i(n+o);for(let e=0;e<o;e++)s[n++]=t[e+r]},writeBytesView(e,t=0,r=e.byteLength){i(n+r),s.set(e.subarray(t,t+r),n),n+=r}};function i(e){var t=s.length;if(!(e<=t)){e=Math.max(e,t*(t<1048576?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));const r=s;s=new Uint8Array(e),0<n&&s.set(r.subarray(0,n),0)}}}var k=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];var S=function(e,t,r,o,n=E(512),s=new Uint8Array(256),i=new Int32Array(5003),a=new Int32Array(5003)){var l=i.length,o=Math.max(2,o);s.fill(0),a.fill(0),i.fill(-1);let u=0,c=0;var d=o+1;const h=d;let f=!1,p=h,m=(1<<p)-1;var y=1<<d-1;const g=1+y;let v=2+y,b=0,j=r[0],_=0;for(let e=l;e<65536;e*=2)++_;_=8-_,n.writeByte(o),M(y);var x=r.length;for(let t=1;t<x;t++)e:{var w=r[t],S=(w<<12)+j;let e=w<<_^j;if(i[e]===S)j=a[e];else{for(var T=0===e?1:l-e;0<=i[e];)if((e-=T)<0&&(e+=l),i[e]===S){j=a[e];break e}M(j),j=w,v<4096?(a[e]=v++,i[e]=S):(i.fill(-1),v=2+y,f=!0,M(y))}}return M(j),M(g),n.writeByte(0),n.bytesView();function M(e){for(u&=k[c],0<c?u|=e<<c:u=e,c+=p;8<=c;)s[b++]=255&u,254<=b&&(n.writeByte(b),n.writeBytesView(s,0,b),b=0),u>>=8,c-=8;if((v>m||f)&&(f?(p=h,m=(1<<p)-1,f=!1):(++p,m=12===p?1<<p:(1<<p)-1)),e==g){for(;0<c;)s[b++]=255&u,254<=b&&(n.writeByte(b),n.writeBytesView(s,0,b),b=0),u>>=8,c-=8;0<b&&(n.writeByte(b),n.writeBytesView(s,0,b),b=0)}}};function O(e,t,r){return e<<8&63488|t<<2&992|r>>3}function P(e,t,r,o){return e>>4|240&t|(240&r)<<4|(240&o)<<8}function A(e,t,r){return e>>4<<8|240&t|r>>4}function L(e,t,r){return e<t?t:r<e?r:e}function R(e){return e*e}function I(e,t,r){var o=0,n=1e100;const s=e[t];for(var i=s.cnt,a=s.ac,l=s.rc,u=s.gc,c=s.bc,d=s.fw;0!=d;d=e[d].fw){var h,f=e[d],p=f.cnt,p=i*p/(i+p);n<=p||(h=0,r&&n<=(h+=p*R(f.ac-a))||n<=(h+=p*R(f.rc-l))||n<=(h+=p*R(f.gc-u))||n<=(h+=p*R(f.bc-c))||(n=h,o=d))}s.err=n,s.nn=o}function D(){return{ac:0,rc:0,gc:0,bc:0,cnt:0,nn:0,fw:0,bk:0,tm:0,mtm:0,err:0}}function u(e,t){for(var r=0,o=0;o<e.length;o++){var n=e[o]-t[o];r+=n*n}return r}function c(e,t){return 1<t?Math.round(e/t)*t:e}function v(e){return e*e}function l(t,r,o=u){let n=1/0,s=-1;for(let e=0;e<t.length;e++){var i=o(r,t[e]);i<n&&(n=i,s=e)}return s}function d(t,r,o=u){let n=1/0,s=-1;for(let e=0;e<t.length;e++){var i=o(r,t[e]);i<n&&(n=i,s=e)}return[s,n]}function h(e={}){const{initialCapacity:t=4096,auto:g=!0}=e,v=E(t);const b=new Uint8Array(256),j=new Int32Array(5003),_=new Int32Array(5003);let x=!1;return{reset(){v.reset(),x=!1},finish(){v.writeByte(a.trailer)},bytes(){return v.bytes()},bytesView(){return v.bytesView()},get buffer(){return v.buffer},get stream(){return v},writeHeader:w,writeFrame(e,t,r,o={}){var{transparent:n=!1,transparentIndex:s=0,delay:i=0,palette:a=null,repeat:l=0,colorDepth:u=8,dispose:c=-1}=o;let d=!1;if(g?x||(d=!0,w(),x=!0):d=Boolean(o.first),t=Math.max(0,Math.floor(t)),r=Math.max(0,Math.floor(r)),d){if(!a)throw new Error("First frame must include a { palette } option");var[o,h,f,p,m=8]=[v,t,r,a,u];p=F(p.length)-1,m=128|m-1<<4|p,M(o,h),M(o,f),o.writeBytes([m,0,0]),T(v,a),0<=l&&(p=v,h=l,p.writeByte(33),p.writeByte(255),p.writeByte(11),C(p,"NETSCAPE2.0"),p.writeByte(3),p.writeByte(1),M(p,h),p.writeByte(0))}var y,f=Math.round(i/10),o=v,m=c,l=f,h=n,p=s,i=(o.writeByte(33),o.writeByte(249),o.writeByte(4),p<0&&(p=0,h=!1),h=h?(y=1,2):y=0,0<=m&&(h=7&m),h<<=2,o.writeByte(0|h|y),M(o,l),o.writeByte(p||0),o.writeByte(0),Boolean(a)&&!d);c=v,n=t,s=r,y=i?a:null,c.writeByte(44),M(c,0),M(c,0),M(c,n),M(c,s),y?(n=F(y.length)-1,c.writeByte(128|n)):c.writeByte(0),i&&T(v,a),[l,o,s,n,c=8,i,a,e]=[v,e,t,r,u,b,j,_],S(s,n,o,c,l,i,a,e)}};function w(){C(v,"GIF89a")}}function T(r,o){var e=1<<F(o.length);for(let t=0;t<e;t++){let e=[0,0,0];t<o.length&&(e=o[t]),r.writeByte(e[0]),r.writeByte(e[1]),r.writeByte(e[2])}}function M(e,t){e.writeByte(255&t),e.writeByte(t>>8&255)}function C(e,t){for(var r=0;r<t.length;r++)e.writeByte(t.charCodeAt(r))}function F(e){return Math.max(Math.ceil(Math.log2(e)),1)}var f=h},{}],246:[function(e,t,r){r.read=function(e,t,r,o,n){var s,i,a=8*n-o-1,l=(1<<a)-1,u=l>>1,c=-7,d=r?n-1:0,h=r?-1:1,n=e[t+d];for(d+=h,s=n&(1<<-c)-1,n>>=-c,c+=a;0<c;s=256*s+e[t+d],d+=h,c-=8);for(i=s&(1<<-c)-1,s>>=-c,c+=o;0<c;i=256*i+e[t+d],d+=h,c-=8);if(0===s)s=1-u;else{if(s===l)return i?NaN:1/0*(n?-1:1);i+=Math.pow(2,o),s-=u}return(n?-1:1)*i*Math.pow(2,s-o)},r.write=function(e,t,r,o,n,s){var i,a,l=8*s-n-1,u=(1<<l)-1,c=u>>1,d=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,h=o?0:s-1,f=o?1:-1,s=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,i=u):(i=Math.floor(Math.log(t)/Math.LN2),t*(o=Math.pow(2,-i))<1&&(i--,o*=2),2<=(t+=1<=i+c?d/o:d*Math.pow(2,1-c))*o&&(i++,o/=2),u<=i+c?(a=0,i=u):1<=i+c?(a=(t*o-1)*Math.pow(2,n),i+=c):(a=t*Math.pow(2,c-1)*Math.pow(2,n),i=0));8<=n;e[r+h]=255&a,h+=f,a/=256,n-=8);for(i=i<<n|a,l+=n;0<l;e[r+h]=255&i,h+=f,i/=256,l-=8);e[r+h-f]|=128*s}},{}],247:[function(o,e,c){"use strict";var t;function y(e,t){return e.b===t.b&&e.a===t.a}function g(e,t){return e.b<t.b||e.b===t.b&&e.a<=t.a}function v(e,t,r){var o=t.b-e.b,n=r.b-t.b;return 0<o+n?o<n?t.a-e.a+o/(o+n)*(e.a-r.a):t.a-r.a+n/(o+n)*(r.a-e.a):0}function b(e,t,r){var o=t.b-e.b,n=r.b-t.b;return 0<o+n?(t.a-r.a)*o+(t.a-e.a)*n:0}function j(e,t){return e.a<t.a||e.a===t.a&&e.b<=t.b}function V(e,t,r){var o=t.a-e.a,n=r.a-t.a;return 0<o+n?o<n?t.b-e.b+o/(o+n)*(e.b-r.b):t.b-r.b+n/(o+n)*(r.b-e.b):0}function z(e,t,r){var o=t.a-e.a,n=r.a-t.a;return 0<o+n?(t.b-r.b)*o+(t.b-e.b)*n:0}function _(e,t,r,o){return(e=e<0?0:e)<=(r=r<0?0:r)?0===r?(t+o)/2:t+e/(e+r)*(o-t):o+r/(e+r)*(t-o)}function d(e){var t=s(e.b);return n(t,e.c),n(t.b,e.c),i(t,e.a),t}function x(e,t){var r=!1,o=!1;e!==t&&(t.a!==e.a&&(o=!0,M(t.a,e.a)),t.d!==e.d&&(r=!0,a(t.d,e.d)),T(t,e),o||(n(t,e.a),e.a.c=e),r||(i(t,e.d),e.d.a=e))}function m(e){var t=e.b,r=!1;e.d!==e.b.d&&(r=!0,a(e.d,e.b.d)),e.c===e?M(e.a,null):(e.b.d.a=e.b.e,e.a.c=e.c,T(e,e.b.e),r||i(e,e.d)),t.c===t?(M(t.a,null),a(t.d,null)):(e.d.a=t.b.e,t.a.c=t.c,T(t,t.b.e)),H(e)}function w(e){var t=s(e),r=t.b;return T(t,e.e),t.a=e.b.a,n(r,t.a),t.d=r.d=e.d,t=t.b,T(e.b,e.b.b.e),T(e.b,t),e.b.a=t.a,t.b.a.c=t.b,t.b.d=e.b.d,t.f=e.f,t.b.f=e.b.f,t}function S(e,t){var r=!1,o=s(e),n=o.b;return t.d!==e.d&&(r=!0,a(t.d,e.d)),T(o,e.e),T(n,t),o.a=e.b.a,n.a=t.a,o.d=n.d=e.d,e.d.a=n,r||i(o,e.d),o}function s(e){var t=new u,r=new u,o=e.b.h;return(((r.h=o).b.h=t).h=e).b.h=r,t.b=r,((t.c=t).e=r).b=t,(r.c=r).e=t}function T(e,t){var r=e.c,o=t.c;r.b.e=t,(o.b.e=e).c=o,t.c=r}function n(e,t){var r=t.f,o=new D(t,r);for(r.e=o,r=(t.f=o).c=e;r.a=o,(r=r.c)!==e;);}function i(e,t){var r=t.d,o=new te(t,r);for(r.b=o,(t.d=o).a=e,o.c=t.c,r=e;r.d=o,(r=r.e)!==e;);}function H(e){var t=e.h;e=e.b.h,(t.b.h=e).b.h=t}function M(e,t){for(var r=e.c,o=r;o.a=t,(o=o.c)!==r;);r=e.f,((o=e.e).f=r).e=o}function a(e,t){for(var r=e.a,o=r;o.d=t,(o=o.e)!==r;);r=e.d,((o=e.b).d=r).b=o}function W(e){var t=0;return Math.abs(e[1])>Math.abs(e[0])&&(t=1),t=Math.abs(e[2])>Math.abs(e[t])?2:t}function E(e,t){e.f+=t.f,e.b.f+=t.b.f}function h(e,t,r){return e=e.a,t=t.a,r=r.a,t.b.a===e?r.b.a===e?g(t.a,r.a)?b(r.b.a,t.a,r.a)<=0:0<=b(t.b.a,r.a,t.a):b(r.b.a,e,r.a)<=0:r.b.a===e?0<=b(t.b.a,e,t.a):(t=v(t.b.a,e,t.a),(e=v(r.b.a,e,r.a))<=t)}function k(e){e.a.i=null;var t=e.e;t.a.c=t.c,t.c.a=t.a,e.e=null}function C(e,t){m(e.a),e.c=!1,(e.a=t).i=e}function O(e){for(var t=e.a.a;(e=G(e)).a.a===t;);return e.c&&(C(e,t=S(B(e).a.b,e.a.e)),e=G(e)),e}function q(e,t,r){var o=new N;return o.a=r,o.e=p(e.f,t.e,o),r.i=o}function X(e,t){switch(e.s){case 100130:return 0!=(1&t);case 100131:return 0!==t;case 100132:return 0<t;case 100133:return t<0;case 100134:return 2<=t||t<=-2}return!1}function f(e){var t=e.a,r=t.d;r.c=e.d,r.a=t,k(e)}function P(e,t,r){for(t=(e=t).a;e!==r;){e.c=!1;var o=B(e),n=o.a;if(n.a!==t.a){if(!o.c){f(e);break}C(o,n=S(t.c.b,n.b))}t.c!==n&&(x(n.b.e,n),x(t,n)),f(e),t=o.a,e=o}return t}function A(e,t,r,o,n,s){for(var i=!0;q(e,t,r.b),(r=r.c)!==o;);for(null===n&&(n=B(t).a.b.c);(r=(o=B(t)).a.b).a===n.a;)r.c!==n&&(x(r.b.e,r),x(n.b.e,r)),o.f=t.f-r.f,o.d=X(e,o.f),t.b=!0,!i&&R(e,t)&&(E(r,n),k(t),m(n)),i=!1,t=o,n=r;t.b=!0,s&&J(e,t)}function Y(e,t,r,o,n){var s=[t.g[0],t.g[1],t.g[2]];t.d=null,t.d=e.o&&e.o(s,r,o,e.c)||null,null===t.d&&(n?e.n||(l(e,100156),e.n=!0):t.d=r[0])}function L(e,t,r){var o=[null,null,null,null];o[0]=t.a.d,o[1]=r.a.d,Y(e,t.a,o,[.5,.5,0,0],!1),x(t,r)}function Z(e,t,r,o,n){var s=Math.abs(t.b-e.b)+Math.abs(t.a-e.a),i=Math.abs(r.b-e.b)+Math.abs(r.a-e.a),a=n+1;o[n]=.5*i/(s+i),o[a]=.5*s/(s+i),e.g[0]+=o[n]*t.g[0]+o[a]*r.g[0],e.g[1]+=o[n]*t.g[1]+o[a]*r.g[1],e.g[2]+=o[n]*t.g[2]+o[a]*r.g[2]}function R(e,t){var r=B(t),o=t.a,n=r.a;if(g(o.a,n.a)){if(0<b(n.b.a,o.a,n.a))return;if(y(o.a,n.a)){if(o.a!==n.a){var r=e.e,s=o.a.h;if(0<=s){var i=(r=r.b).d,a=r.e,l=r.c,u=l[s];i[u]=i[r.a],(l[i[u]]=u)<=--r.a&&(u<=1||g(a[i[u>>1]],a[i[u]])?U:ue)(r,u),a[s]=null,l[s]=r.b,r.b=s}else for(r.c[-(s+1)]=null;0<r.a&&null===r.c[r.d[r.a-1]];)--r.a;L(e,n.b.e,o)}}else w(n.b),x(o,n.b.e),t.b=r.b=!0}else{if(b(o.b.a,n.a,o.a)<0)return;G(t).b=t.b=!0,w(o.b),x(n.b.e,o)}return 1}function Q(e,t){var r=B(t),o=t.a,n=r.a,s=o.a,i=n.a,a=o.b.a,l=n.b.a,u=new D;if(b(a,e.a,s),b(l,e.a,i),!(s===i||Math.min(s.a,a.a)>Math.max(i.a,l.a))){if(g(s,i)){if(0<b(l,s,i))return}else if(b(a,i,s)<0)return;var c,d,h=a,f=s,p=l,m=i;if(g(h,f)||(c=h,h=f,f=c),g(p,m)||(c=p,p=m,m=c),g(h,p)||(c=h,h=p,p=c,c=f,f=m,m=c),g(p,f)?g(f,m)?((c=v(h,p,f))+(d=v(p,f,m))<0&&(c=-c,d=-d),u.b=_(c,p.b,d,f.b)):((c=b(h,p,f))+(d=-b(h,m,f))<0&&(c=-c,d=-d),u.b=_(c,p.b,d,m.b)):u.b=(p.b+f.b)/2,j(h,f)||(c=h,h=f,f=c),j(p,m)||(c=p,p=m,m=c),j(h,p)||(c=h,h=p,p=c,c=f,f=m,m=c),j(p,f)?j(f,m)?((c=V(h,p,f))+(d=V(p,f,m))<0&&(c=-c,d=-d),u.a=_(c,p.a,d,f.a)):((c=z(h,p,f))+(d=-z(h,m,f))<0&&(c=-c,d=-d),u.a=_(c,p.a,d,m.a)):u.a=(p.a+f.a)/2,g(u,e.a)&&(u.b=e.a.b,u.a=e.a.a),h=g(s,i)?s:i,g(h,u)&&(u.b=h.b,u.a=h.a),y(u,s)||y(u,i))return R(e,t),0;if(!y(a,e.a)&&0<=b(a,e.a,u)||!y(l,e.a)&&b(l,e.a,u)<=0){if(l===e.a)w(o.b),x(n.b,o),o=B(t=O(t)).a,P(e,B(t),r),A(e,t,o.b.e,o,o,!0);else{if(a!==e.a)return 0<=b(a,e.a,u)&&(G(t).b=t.b=!0,w(o.b),o.a.b=e.a.b,o.a.a=e.a.a),void(b(l,e.a,u)<=0&&(t.b=r.b=!0,w(n.b),n.a.b=e.a.b,n.a.a=e.a.a));for(w(n.b),x(o.e,n.b.e),i=(s=r=t).a.b.a;(s=G(s)).a.b.a===i;);s=B(t=s).a.b.c,r.a=n.b.e,A(e,t,(n=P(e,r,null)).c,o.b.c,s,!0)}return 1}w(o.b),w(n.b),x(n.b.e,o),o.a.b=u.b,o.a.a=u.a,o.a.h=ne(e.e,o.a),o=o.a,n=[0,0,0,0],u=[s.d,a.d,i.d,l.d],o.g[0]=o.g[1]=o.g[2]=0,Z(o,s,a,n,0),Z(o,i,l,n,2),Y(e,o,u,n,!0),G(t).b=t.b=r.b=!0}}function J(e,t){for(var r=B(t);;){for(;r.b;)r=B(t=r);if(!t.b&&(null===(t=G(r=t))||!t.b))break;t.b=!1;var o=t.a,n=r.a;if(s=o.b.a!==n.b.a)e:{var s,i=B(s=t),a=s.a,l=i.a,u=void 0;if(g(a.b.a,l.b.a)){if(b(a.b.a,l.b.a,a.a)<0){s=!1;break e}G(s).b=s.b=!0,u=w(a),x(l.b,u),u.d.c=s.d}else{if(0<b(l.b.a,a.b.a,l.a)){s=!1;break e}s.b=i.b=!0,u=w(l),x(a.e,l.b),u.b.d.c=s.d}s=!0}if(s&&(r.c?(k(r),m(n),n=(r=B(t)).a):t.c&&(k(t),m(o),o=(t=G(r)).a)),o.a!==n.a)if(o.b.a===n.b.a||t.c||r.c||o.b.a!==e.a&&n.b.a!==e.a)R(e,t);else if(Q(e,t))break;o.a===n.a&&o.b.a===n.b.a&&(E(n,o),k(t),m(o),t=G(r))}}function K(e,t){var r=new N,o=d(e.b);o.a.b=4e150,o.a.a=t,o.b.a.b=-4e150,o.b.a.a=t,e.a=o.b.a,r.a=o,r.f=0,r.d=!1,r.c=!1,r.h=!0,r.b=!1,o=p(o=e.f,o.a,r),r.e=o}function $(e){this.a=new ee,this.b=e,this.c=h}function p(e,t,r){for(;null!==(t=t.c).b&&!e.c(e.b,t.b,r););return e=new ee(r,t.a,t),t.a.c=e,t.a=e}function ee(e,t,r){this.b=e||null,this.a=t||this,this.c=r||this}function r(){this.d=0,this.p=this.b=this.q=null,this.j=[0,0,0],this.s=100130,this.n=!1,this.o=this.a=this.e=this.f=null,this.m=!1,this.c=this.r=this.i=this.k=this.l=this.h=null}function I(e,t){if(e.d!==t)for(;e.d!==t;)if(e.d<t)switch(e.d){case 0:l(e,100151),e.u(null);break;case 1:l(e,100152),e.t()}else switch(e.d){case 2:l(e,100154),e.v();break;case 1:l(e,100153),e.w()}}function l(e,t){e.p&&e.p(t,e.c)}function te(e,t){this.b=e||this,this.d=t||this,this.a=null,this.c=!1}function u(){(this.h=this).i=this.d=this.a=this.e=this.c=this.b=null,this.f=0}function re(){this.c=new D,this.a=new te,this.b=new u,this.d=new u,this.b.b=this.d,this.d.b=this.b}function D(e,t){this.e=e||this,this.f=t||this,this.d=this.c=null,this.g=[0,0,0],this.h=this.a=this.b=0}function oe(){this.c=[],this.d=null,this.a=0,this.e=!1,this.b=new ie}function ne(e,t){var r,o,n;return e.e?(2*(o=++(r=e.b).a)>r.f&&(r.f*=2,r.c=ae(r.c,r.f+1)),0===r.b?n=o:(n=r.b,r.b=r.c[r.b]),r.e[n]=t,r.c[n]=o,r.d[o]=n,r.h&&ue(r,o),n):(r=e.a++,e.c[r]=t,-(r+1))}function se(e){if(0===e.a)return le(e.b);var t=e.c[e.d[e.a-1]];if(0!==e.b.a&&g(F(e.b),t))return le(e.b);for(;--e.a,0<e.a&&null===e.c[e.d[e.a-1]];);return t}function ie(){this.d=ae([0],33),this.e=[null,null],this.c=[0,0],this.a=0,this.f=32,this.b=0,this.h=!1,this.d[1]=1}function ae(e,t){for(var r=Array(t),o=0;o<e.length;o++)r[o]=e[o];for(;o<t;o++)r[o]=0;return r}function F(e){return e.e[e.d[1]]}function le(e){var t=e.d,r=e.e,o=e.c,n=t[1],s=r[n];return 0<e.a&&(t[1]=t[e.a],o[t[1]]=1,r[n]=null,o[n]=e.b,e.b=n,0<--e.a&&U(e,1)),s}function U(e,t){for(var r=e.d,o=e.e,n=e.c,s=t,i=r[s];;){var a=s<<1,l=(a<e.a&&g(o[r[a+1]],o[r[a]])&&(a+=1),r[a]);if(a>e.a||g(o[i],o[l])){n[r[s]=i]=s;break}n[r[s]=l]=s,s=a}}function ue(e,t){for(var r=e.d,o=e.e,n=e.c,s=t,i=r[s];;){var a=s>>1,l=r[a];if(0==a||g(o[l],o[i])){n[r[s]=i]=s;break}n[r[s]=l]=s,s=a}}function N(){this.e=this.a=null,this.f=0,this.c=this.b=this.h=this.d=!1}function B(e){return e.e.c.b}function G(e){return e.e.a.b}(t=r.prototype).x=function(){I(this,0)},t.B=function(e,t){switch(e){case 100142:return;case 100140:switch(t){case 100130:case 100131:case 100132:case 100133:case 100134:return void(this.s=t)}break;case 100141:return void(this.m=!!t);default:return void l(this,100900)}l(this,100901)},t.y=function(e){switch(e){case 100142:return 0;case 100140:return this.s;case 100141:return this.m;default:l(this,100900)}return!1},t.A=function(e,t,r){this.j[0]=e,this.j[1]=t,this.j[2]=r},t.z=function(e,t){var r=t||null;switch(e){case 100100:case 100106:this.h=r;break;case 100104:case 100110:this.l=r;break;case 100101:case 100107:this.k=r;break;case 100102:case 100108:this.i=r;break;case 100103:case 100109:this.p=r;break;case 100105:case 100111:this.o=r;break;case 100112:this.r=r;break;default:l(this,100900)}},t.C=function(e,t){var r=!1,o=[0,0,0];I(this,2);for(var n=0;n<3;++n){var s=e[n];s<-1e150&&(s=-1e150,r=!0),1e150<s&&(s=1e150,r=!0),o[n]=s}r&&l(this,100155),null===(r=this.q)?x(r=d(this.b),r.b):(w(r),r=r.e),r.a.d=t,r.a.g[0]=o[0],r.a.g[1]=o[1],r.a.g[2]=o[2],r.f=1,r.b.f=-1,this.q=r},t.u=function(e){I(this,0),this.d=1,this.b=new re,this.c=e},t.t=function(){I(this,1),this.d=2,this.q=null},t.v=function(){I(this,2),this.d=1},t.w=function(){I(this,1),this.d=0;var e,t,r=this.j[0],o=this.j[1],n=this.j[2],s=!1,i=[r,o,n];if(0===r&&0===o&&0===n){for(var o=[-2e150,-2e150,-2e150],a=[2e150,2e150,2e150],n=[],l=[],r=(s=this.b.c).e;r!==s;r=r.e)for(var u=0;u<3;++u){var c=r.g[u];c<a[u]&&(a[u]=c,l[u]=r),c>o[u]&&(o[u]=c,n[u]=r)}if(o[1]-a[1]>o[r=0]-a[0]&&(r=1),a[r=o[2]-a[2]>o[r]-a[r]?2:r]>=o[r])i[0]=0,i[1]=0,i[2]=1;else{for(a=l[r],n=n[r],l=[o=0,0,0],a=[a.g[0]-n.g[0],a.g[1]-n.g[1],a.g[2]-n.g[2]],u=[0,0,0],r=s.e;r!==s;r=r.e)u[0]=r.g[0]-n.g[0],u[1]=r.g[1]-n.g[1],u[2]=r.g[2]-n.g[2],l[0]=a[1]*u[2]-a[2]*u[1],l[1]=a[2]*u[0]-a[0]*u[2],l[2]=a[0]*u[1]-a[1]*u[0],o<(c=l[0]*l[0]+l[1]*l[1]+l[2]*l[2])&&(o=c,i[0]=l[0],i[1]=l[1],i[2]=l[2]);o<=0&&(i[0]=i[1]=i[2]=0,i[W(a)]=1)}s=!0}for(l=W(i),r=this.b.c,o=(l+1)%3,n=(l+2)%3,l=0<i[l]?1:-1,i=r.e;i!==r;i=i.e)i.b=i.g[o],i.a=l*i.g[n];if(s){for(i=0,r=(s=this.b.a).b;r!==s;r=r.b)if(!((o=r.a).f<=0))for(;i+=(o.a.b-o.b.a.b)*(o.a.a+o.b.a.a),(o=o.e)!==r.a;);if(i<0)for(s=(i=this.b.c).e;s!==i;s=s.e)s.a=-s.a}for(this.n=!1,i=this.b.b,r=i.h;r!==i;r=s)s=r.h,o=r.e,y(r.a,r.b.a)&&r.e.e!==r&&(L(this,o,r),m(r),o=(r=o).e),o.e===r&&(o!==r&&(o!==s&&o!==s.b||(s=s.h),m(o)),r!==s&&r!==s.b||(s=s.h),m(r));for(this.e=i=new oe,s=this.b.c,r=s.e;r!==s;r=r.e)r.h=ne(i,r);var d=i;d.d=[];for(var h=0;h<d.a;h++)d.d[h]=h;d.d.sort(function(r){return function(e,t){return g(r[e],r[t])?1:-1}}(d.c)),d.e=!0;for(var f=d.b,p=f.a;1<=p;--p)U(f,p);for(f.h=!0,this.f=new $(this),K(this,-4e150),K(this,4e150);null!==(i=se(this.e));){for(;;){e:if(0===(r=this.e).a)s=F(r.b);else if(s=r.c[r.d[r.a-1]],0!==r.b.a&&g(r=F(r.b),s)){s=r;break e}if(null===s||!y(s,i))break;s=se(this.e),L(this,i.c,s.c)}!function e(t,r){for(var o,n=(t.a=r).c;null===n.i;)if((n=n.c)===r.c){var n=t,s=r;(c=new N).a=s.c.b;for(var i=(a=n.f).a;null!==(i=i.a).b&&!a.c(a.b,c,i.b););var a,l,u=B(a=i.b),c=a.a,i=u.a;return void(0===b(c.b.a,s,c.a)?y((c=a.a).a,s)||y(c.b.a,s)||(w(c.b),a.c&&(m(c.c),a.c=!1),x(s.c,c),e(n,s)):(l=g(i.b.a,c.b.a)?a:u,u=void 0,a.d||l.c?(u=l===a?S(s.c.b,c.e):S(i.b.c.b,s.c).b,l.c?C(l,u):((a=q(c=n,a,u)).f=G(a).f+a.a.f,a.d=X(c,a.f)),e(n,s)):A(n,a,s.c,s.c,null,!0)))}a=(c=B(n=O(n.i))).a,(c=P(t,c,null)).c===a?(c=(a=c).c,i=B(n),u=n.a,l=i.a,o=!1,u.b.a!==l.b.a&&Q(t,n),y(u.a,t.a)&&(x(c.b.e,u),c=B(n=O(n)).a,P(t,B(n),i),o=!0),y(l.a,t.a)&&(x(a,l.b.e),a=P(t,i,null),o=!0),o?A(t,n,a.c,c,c,!0):(s=g(l.a,u.a)?l.b.e:u,A(t,n,s=S(a.c.b,s),s.c,s.c,!1),s.b.i.c=!0,J(t,n))):A(t,n,c.c,a,a,!0)}(this,i)}for(this.a=this.f.a.a.b.a.a,i=0;null!==(s=this.f.a.a.b);)s.h||++i,k(s);for(this.f=null,(i=this.e).b=null,i.d=null,this.e=i.c=null,i=this.b,r=i.a.b;r!==i.a;r=s)s=r.b,(r=r.a).e.e===r&&(E(r.c,r),m(r));if(!this.n){if(i=this.b,this.m)for(r=i.b.h;r!==i.b;r=s)s=r.h,r.b.d.c!==r.d.c?r.f=r.d.c?1:-1:m(r);else for(r=i.a.b;r!==i.a;r=s)if(s=r.b,r.c){for(r=r.a;g(r.b.a,r.a);r=r.c.b);for(;g(r.a,r.b.a);r=r.e);for(o=r.c.b,n=void 0;r.e!==o;)if(g(r.b.a,o.a)){for(;o.e!==r&&(g((t=o.e).b.a,t.a)||b(o.a,o.b.a,o.e.b.a)<=0);)o=(n=S(o.e,o)).b;o=o.c.b}else{for(;o.e!==r&&(g((e=r.c.b).a,e.b.a)||0<=b(r.b.a,r.a,r.c.b.a));)r=(n=S(r,r.c.b)).b;r=r.e}for(;o.e.e!==r;)n=S(o.e,o),o=n.b}if(this.h||this.i||this.k||this.l)if(this.m){for(s=(i=this.b).a.b;s!==i.a;s=s.b)if(s.c){for(this.h&&this.h(2,this.c),r=s.a;this.k&&this.k(r.a.d,this.c),(r=r.e)!==s.a;);this.i&&this.i(this.c)}}else{for(i=this.b,s=!!this.l,r=!1,o=-1,n=i.a.d;n!==i.a;n=n.d)if(n.c)for(r||(this.h&&this.h(4,this.c),r=!0),l=n.a;s&&(a=l.b.d.c?0:1,o!==a&&(o=a,this.l&&this.l(!!o,this.c))),this.k&&this.k(l.a.d,this.c),(l=l.e)!==n.a;);r&&this.i&&this.i(this.c)}if(this.r){for(i=this.b,r=i.a.b;r!==i.a;r=s)if(s=r.b,!r.c){for(n=(o=r.a).e,l=void 0;n=(l=n).e,(l.d=null)===l.b.d&&(l.c===l?M(l.a,null):(l.a.c=l.c,T(l,l.b.e)),(a=l.b).c===a?M(a.a,null):(a.a.c=a.c,T(a,a.b.e)),H(l)),l!==o;);o=r.d,((r=r.b).d=o).b=r}return this.r(this.b),void(this.c=this.b=null)}}this.b=this.c=null},this.libtess={GluTesselator:r,windingRule:{GLU_TESS_WINDING_ODD:100130,GLU_TESS_WINDING_NONZERO:100131,GLU_TESS_WINDING_POSITIVE:100132,GLU_TESS_WINDING_NEGATIVE:100133,GLU_TESS_WINDING_ABS_GEQ_TWO:100134},primitiveType:{GL_LINE_LOOP:2,GL_TRIANGLES:4,GL_TRIANGLE_STRIP:5,GL_TRIANGLE_FAN:6},errorType:{GLU_TESS_MISSING_BEGIN_POLYGON:100151,GLU_TESS_MISSING_END_POLYGON:100153,GLU_TESS_MISSING_BEGIN_CONTOUR:100152,GLU_TESS_MISSING_END_CONTOUR:100154,GLU_TESS_COORD_TOO_LARGE:100155,GLU_TESS_NEED_COMBINE_CALLBACK:100156},gluEnum:{GLU_TESS_MESH:100112,GLU_TESS_TOLERANCE:100142,GLU_TESS_WINDING_RULE:100140,GLU_TESS_BOUNDARY_ONLY:100141,GLU_INVALID_ENUM:100900,GLU_INVALID_VALUE:100901,GLU_TESS_BEGIN:100100,GLU_TESS_VERTEX:100101,GLU_TESS_END:100102,GLU_TESS_ERROR:100103,GLU_TESS_EDGE_FLAG:100104,GLU_TESS_COMBINE:100105,GLU_TESS_BEGIN_DATA:100106,GLU_TESS_VERTEX_DATA:100107,GLU_TESS_END_DATA:100108,GLU_TESS_ERROR_DATA:100109,GLU_TESS_EDGE_FLAG_DATA:100110,GLU_TESS_COMBINE_DATA:100111}},r.prototype.gluDeleteTess=r.prototype.x,r.prototype.gluTessProperty=r.prototype.B,r.prototype.gluGetTessProperty=r.prototype.y,r.prototype.gluTessNormal=r.prototype.A,r.prototype.gluTessCallback=r.prototype.z,r.prototype.gluTessVertex=r.prototype.C,r.prototype.gluTessBeginPolygon=r.prototype.u,r.prototype.gluTessBeginContour=r.prototype.t,r.prototype.gluTessEndContour=r.prototype.v,r.prototype.gluTessEndPolygon=r.prototype.w,void 0!==e&&(e.exports=this.libtess)},{}],248:[function(e,t,r){"use strict";function o(g,e,t,r){var v=0,o=void 0===(r=void 0===r?{}:r).loop?null:r.loop,b=void 0===r.palette?null:r.palette;if(e<=0||t<=0||65535<e||65535<t)throw new Error("Width/Height invalid.");function j(e){e=e.length;if(e<2||256<e||e&e-1)throw new Error("Invalid code/color length, must be power of 2 and 2 .. 256.");return e}g[v++]=71,g[v++]=73,g[v++]=70,g[v++]=56,g[v++]=57,g[v++]=97;var n=0,s=0;if(null!==b){for(var i=j(b);i>>=1;)++n;if(i=1<<n,--n,void 0!==r.background){if(i<=(s=r.background))throw new Error("Background index out of range.");if(0===s)throw new Error("Background index explicitly passed as 0.")}}if(g[v++]=255&e,g[v++]=e>>8&255,g[v++]=255&t,g[v++]=t>>8&255,g[v++]=(null!==b?128:0)|n,g[v++]=s,g[v++]=0,null!==b)for(var a=0,l=b.length;a<l;++a){var u=b[a];g[v++]=u>>16&255,g[v++]=u>>8&255,g[v++]=255&u}if(null!==o){if(o<0||65535<o)throw new Error("Loop count invalid.");g[v++]=33,g[v++]=255,g[v++]=11,g[v++]=78,g[v++]=69,g[v++]=84,g[v++]=83,g[v++]=67,g[v++]=65,g[v++]=80,g[v++]=69,g[v++]=50,g[v++]=46,g[v++]=48,g[v++]=3,g[v++]=1,g[v++]=255&o,g[v++]=o>>8&255,g[v++]=0}var _=!1;this.addFrame=function(e,t,r,o,n,s){if(!0===_&&(--v,_=!1),s=void 0===s?{}:s,e<0||t<0||65535<e||65535<t)throw new Error("x/y invalid.");if(r<=0||o<=0||65535<r||65535<o)throw new Error("Width/Height invalid.");if(n.length<r*o)throw new Error("Not enough pixels for the frame size.");var i=!0,a=s.palette;if(null==a&&(i=!1,a=b),null==a)throw new Error("Must supply either a local or global palette.");for(var l=j(a),u=0;l>>=1;)++u;var l=1<<u,c=void 0===s.delay?0:s.delay,d=void 0===s.disposal?0:s.disposal;if(d<0||3<d)throw new Error("Disposal out of range.");var h=!1,f=0;if(void 0!==s.transparent&&null!==s.transparent&&(h=!0,(f=s.transparent)<0||l<=f))throw new Error("Transparent color index.");if(0===d&&!h&&0===c||(g[v++]=33,g[v++]=249,g[v++]=4,g[v++]=d<<2|(!0===h?1:0),g[v++]=255&c,g[v++]=c>>8&255,g[v++]=f,g[v++]=0),g[v++]=44,g[v++]=255&e,g[v++]=e>>8&255,g[v++]=255&t,g[v++]=t>>8&255,g[v++]=255&r,g[v++]=r>>8&255,g[v++]=255&o,g[v++]=o>>8&255,g[v++]=!0===i?128|u-1:0,!0===i)for(var p=0,m=a.length;p<m;++p){var y=a[p];g[v++]=y>>16&255,g[v++]=y>>8&255,g[v++]=255&y}return v=function(t,r,e,o){t[r++]=e;var n=r++,s=1<<e,i=s-1,a=1+s,l=1+a,u=e+1,c=0,d=0;function h(e){for(;e<=c;)t[r++]=255&d,d>>=8,c-=8,r===n+256&&(t[n]=255,n=r++)}function f(e){d|=e<<c,c+=u,h(8)}var p=o[0]&i,m={};f(s);for(var y=1,g=o.length;y<g;++y){var v=o[y]&i,b=p<<8|v,j=m[b];if(void 0===j){for(d|=p<<c,c+=u;8<=c;)t[r++]=255&d,d>>=8,c-=8,r===n+256&&(t[n]=255,n=r++);4096===l?(f(s),l=1+a,u=e+1,m={}):(1<<u<=l&&++u,m[b]=l++),p=v}else p=j}f(p),f(a),h(1),n+1===r?t[n]=0:(t[n]=r-n-1,t[r++]=0);return r}(g,v,u<2?2:u,n)},this.end=function(){return!1===_&&(g[v++]=59,_=!0),v},this.getOutputBuffer=function(){return g},this.setOutputBuffer=function(e){g=e},this.getOutputBufferPosition=function(){return v},this.setOutputBufferPosition=function(e){v=e}}function M(e,t,r,o){for(var n=e[t++],s=1<<n,i=1+s,a=1+i,l=n+1,u=(1<<l)-1,c=0,d=0,h=0,f=e[t++],p=new Int32Array(4096),m=null;;){for(;c<16&&0!==f;)d|=e[t++]<<c,c+=8,1===f?f=e[t++]:--f;if(c<l)break;var y=d&u;if(d>>=l,c-=l,y==s)a=1+i,u=(1<<(l=n+1))-1,m=null;else{if(y==i)break;for(var g=y<a?y:m,v=0,b=g;s<b;)b=p[b]>>8,++v;var j=b;if(o<h+v+(g!==y?1:0))return void console.log("Warning, gif stream longer than expected.");r[h++]=j;var _=h+=v;for(g!==y&&(r[h++]=j),b=g;v--;)b=p[b],r[--_]=255&b,b>>=8;null!==m&&a<4096&&(p[a++]=m<<8|j,u+1<=a&&l<12&&(++l,u=u<<1|1)),m=y}}h!==o&&console.log("Warning, gif stream shorter than expected.")}try{r.GifWriter=o,r.GifReader=function(b){var e=0;if(71!==b[e++]||73!==b[e++]||70!==b[e++]||56!==b[e++]||56!=(b[e++]+1&253)||97!==b[e++])throw new Error("Invalid GIF 87a/89a header.");var j=b[e++]|b[e++]<<8,t=b[e++]|b[e++]<<8,r=b[e++],o=1<<1+(7&r),n=(b[e++],b[e++],null),s=null,i=(r>>7&&(n=e,e+=3*(s=o)),!0),a=[],l=0,u=null,c=0,d=null;for(this.width=j,this.height=t;i&&e<b.length;)switch(b[e++]){case 33:switch(b[e++]){case 255:if(11!==b[e]||78==b[e+1]&&69==b[e+2]&&84==b[e+3]&&83==b[e+4]&&67==b[e+5]&&65==b[e+6]&&80==b[e+7]&&69==b[e+8]&&50==b[e+9]&&46==b[e+10]&&48==b[e+11]&&3==b[e+12]&&1==b[e+13]&&0==b[e+16])e+=14,d=b[e++]|b[e++]<<8,e++;else for(e+=12;;){if(!(0<=(f=b[e++])))throw Error("Invalid block size");if(0===f)break;e+=f}break;case 249:if(4!==b[e++]||0!==b[e+4])throw new Error("Invalid graphics extension block.");var h=b[e++],l=b[e++]|b[e++]<<8,u=b[e++];0==(1&h)&&(u=null),c=h>>2&7,e++;break;case 254:for(;;){if(!(0<=(f=b[e++])))throw Error("Invalid block size");if(0===f)break;e+=f}break;default:throw new Error("Unknown graphic control label: 0x"+b[e-1].toString(16))}break;case 44:var f,p=b[e++]|b[e++]<<8,m=b[e++]|b[e++]<<8,y=b[e++]|b[e++]<<8,g=b[e++]|b[e++]<<8,v=b[e++],_=v>>6&1,x=1<<1+(7&v),w=n,S=s,T=!1,v=(v>>7&&(T=!0,w=e,e+=3*(S=x)),e);for(e++;;){if(!(0<=(f=b[e++])))throw Error("Invalid block size");if(0===f)break;e+=f}a.push({x:p,y:m,width:y,height:g,has_local_palette:T,palette_offset:w,palette_size:S,data_offset:v,data_length:e-v,transparent_index:u,interlaced:!!_,delay:l,disposal:c});break;case 59:i=!1;break;default:throw new Error("Unknown gif block: 0x"+b[e-1].toString(16))}this.numFrames=function(){return a.length},this.loopCount=function(){return d},this.frameInfo=function(e){if(e<0||e>=a.length)throw new Error("Frame index out of range.");return a[e]},this.decodeAndBlitFrameBGRA=function(e,t){for(var e=this.frameInfo(e),r=e.width*e.height,o=new Uint8Array(r),n=(M(b,e.data_offset,o,r),e.palette_offset),s=e.transparent_index,i=(null===s&&(s=256),e.width),a=j-i,l=i,u=4*(e.y*j+e.x),c=4*((e.y+e.height)*j+e.x),d=u,h=4*a,f=(!0===e.interlaced&&(h+=4*j*7),8),p=0,m=o.length;p<m;++p){var y,g,v=o[p];0===l&&(l=i,c<=(d+=h)&&(h=4*a+4*j*(f-1),d=u+(i+a)*(f<<1),f>>=1)),v===s?d+=4:(y=b[n+3*v],g=b[n+3*v+1],v=b[n+3*v+2],t[d++]=v,t[d++]=g,t[d++]=y,t[d++]=255),--l}},this.decodeAndBlitFrameRGBA=function(e,t){for(var e=this.frameInfo(e),r=e.width*e.height,o=new Uint8Array(r),n=(M(b,e.data_offset,o,r),e.palette_offset),s=e.transparent_index,i=(null===s&&(s=256),e.width),a=j-i,l=i,u=4*(e.y*j+e.x),c=4*((e.y+e.height)*j+e.x),d=u,h=4*a,f=(!0===e.interlaced&&(h+=4*j*7),8),p=0,m=o.length;p<m;++p){var y,g,v=o[p];0===l&&(l=i,c<=(d+=h)&&(h=4*a+4*j*(f-1),d=u+(i+a)*(f<<1),f>>=1)),v===s?d+=4:(y=b[n+3*v],g=b[n+3*v+1],v=b[n+3*v+2],t[d++]=y,t[d++]=g,t[d++]=v,t[d++]=255),--l}}}}catch(e){}},{}],249:[function(Ar,r,o){!function(Pr){var e,t;e=this,t=function(j){"use strict";function D(e){if(null==this)throw TypeError();var t,r=String(this),o=r.length,e=e?Number(e):0;if(!((e=e!=e?0:e)<0||o<=e))return 55296<=(t=r.charCodeAt(e))&&t<=56319&&e+1<o&&56320<=(o=r.charCodeAt(e+1))&&o<=57343?1024*(t-55296)+o-56320+65536:t}String.prototype.codePointAt||((F=function(){try{var e={},t=Object.defineProperty,r=t(e,e,e)&&t}catch(e){}return r}())?F(String.prototype,"codePointAt",{value:D,configurable:!0,writable:!0}):String.prototype.codePointAt=D);var F,U=0,N=-3;function B(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function G(e,t){this.source=e,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=t,this.destLen=0,this.ltree=new B,this.dtree=new B}var V=new B,z=new B,H=new Uint8Array(30),W=new Uint16Array(30),q=new Uint8Array(30),X=new Uint16Array(30),Y=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Z=new B,v=new Uint8Array(320);function Q(e,t,r,o){for(var n,s=0;s<r;++s)e[s]=0;for(s=0;s<30-r;++s)e[s+r]=s/r|0;for(n=o,s=0;s<30;++s)t[s]=n,n+=1<<e[s]}var J=new Uint16Array(16);function K(e,t,r,o){for(var n,s=0;s<16;++s)e.table[s]=0;for(s=0;s<o;++s)e.table[t[r+s]]++;for(s=n=e.table[0]=0;s<16;++s)J[s]=n,n+=e.table[s];for(s=0;s<o;++s)t[r+s]&&(e.trans[J[t[r+s]]++]=s)}function b(e,t,r){if(!t)return r;for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var o=e.tag&65535>>>16-t;return e.tag>>>=t,e.bitcount-=t,o+r}function $(e,t){for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;for(var r=0,o=0,n=0,s=e.tag;o=2*o+(1&s),s>>>=1,r+=t.table[++n],0<=(o-=t.table[n]););return e.tag=s,e.bitcount-=n,t.trans[r+o]}function ee(e,t,r){for(;;){var o=$(e,t);if(256===o)return U;if(o<256)e.dest[e.destLen++]=o;else for(var n,s=b(e,H[o-=257],W[o]),o=$(e,r),i=n=e.destLen-b(e,q[o],X[o]);i<n+s;++i)e.dest[e.destLen++]=e.dest[i]}}for(var e=V,te=z,t=0;t<7;++t)e.table[t]=0;for(e.table[7]=24,e.table[8]=152,e.table[9]=112,t=0;t<24;++t)e.trans[t]=256+t;for(t=0;t<144;++t)e.trans[24+t]=t;for(t=0;t<8;++t)e.trans[168+t]=280+t;for(t=0;t<112;++t)e.trans[176+t]=144+t;for(t=0;t<5;++t)te.table[t]=0;for(te.table[5]=32,t=0;t<32;++t)te.trans[t]=t;Q(H,W,4,3),Q(q,X,2,1),H[28]=0,W[28]=258;var re=function(e,t){var r,o,n,s=new G(e,t);do{switch(n=void 0,(o=s).bitcount--||(o.tag=o.source[o.sourceIndex++],o.bitcount=7),n=1&o.tag,o.tag>>>=1,o=n,b(s,2,0)){case 0:r=function(e){for(var t,r;8<e.bitcount;)e.sourceIndex--,e.bitcount-=8;if((t=256*e.source[e.sourceIndex+1]+e.source[e.sourceIndex])!==(65535&~(256*e.source[e.sourceIndex+3]+e.source[e.sourceIndex+2])))return N;for(e.sourceIndex+=4,r=t;r;--r)e.dest[e.destLen++]=e.source[e.sourceIndex++];return e.bitcount=0,U}(s);break;case 1:r=ee(s,V,z);break;case 2:y=m=p=g=i=f=h=d=c=u=l=a=void 0;for(var i,a=s,l=s.ltree,u=s.dtree,c=b(a,5,257),d=b(a,5,1),h=b(a,4,4),f=0;f<19;++f)v[f]=0;for(f=0;f<h;++f){var p=b(a,3,0);v[Y[f]]=p}for(K(Z,v,0,19),i=0;i<c+d;){var m=$(a,Z);switch(m){case 16:for(var y=v[i-1],g=b(a,2,3);g;--g)v[i++]=y;break;case 17:for(g=b(a,3,3);g;--g)v[i++]=0;break;case 18:for(g=b(a,7,11);g;--g)v[i++]=0;break;default:v[i++]=m}}K(l,v,0,c),K(u,v,c,d),r=ee(s,s.ltree,s.dtree);break;default:r=N}if(r!==U)throw new Error("Data error")}while(!o);return s.destLen<s.dest.length?"function"==typeof s.dest.slice?s.dest.slice(0,s.destLen):s.dest.subarray(0,s.destLen):s.dest};function g(e,t,r,o,n){return Math.pow(1-n,3)*e+3*Math.pow(1-n,2)*n*t+3*(1-n)*Math.pow(n,2)*r+Math.pow(n,3)*o}function a(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}function h(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}function oe(e){throw new Error(e)}function ne(e,t){e||oe(t)}a.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)},a.prototype.addPoint=function(e,t){"number"==typeof e&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),"number"==typeof t&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),t<this.y1&&(this.y1=t),t>this.y2&&(this.y2=t))},a.prototype.addX=function(e){this.addPoint(e,null)},a.prototype.addY=function(e){this.addPoint(null,e)},a.prototype.addBezier=function(e,t,r,o,n,s,i,a){var l=[e,t],u=[r,o],c=[n,s],d=[i,a];this.addPoint(e,t),this.addPoint(i,a);for(var h=0;h<=1;h++){var f,p=6*l[h]-12*u[h]+6*c[h],m=-3*l[h]+9*u[h]-9*c[h]+3*d[h],y=3*u[h]-3*l[h];0==m?0==p||0<(f=-y/p)&&f<1&&(0===h&&this.addX(g(l[h],u[h],c[h],d[h],f)),1===h&&this.addY(g(l[h],u[h],c[h],d[h],f))):(f=Math.pow(p,2)-4*y*m)<0||(0<(y=(-p+Math.sqrt(f))/(2*m))&&y<1&&(0===h&&this.addX(g(l[h],u[h],c[h],d[h],y)),1===h&&this.addY(g(l[h],u[h],c[h],d[h],y))),0<(y=(-p-Math.sqrt(f))/(2*m))&&y<1&&(0===h&&this.addX(g(l[h],u[h],c[h],d[h],y)),1===h&&this.addY(g(l[h],u[h],c[h],d[h],y))))}},a.prototype.addQuad=function(e,t,r,o,n,s){r=e+2/3*(r-e),o=t+2/3*(o-t);this.addBezier(e,t,r,o,r+1/3*(n-e),o+1/3*(s-t),n,s)},h.prototype.moveTo=function(e,t){this.commands.push({type:"M",x:e,y:t})},h.prototype.lineTo=function(e,t){this.commands.push({type:"L",x:e,y:t})},h.prototype.curveTo=h.prototype.bezierCurveTo=function(e,t,r,o,n,s){this.commands.push({type:"C",x1:e,y1:t,x2:r,y2:o,x:n,y:s})},h.prototype.quadTo=h.prototype.quadraticCurveTo=function(e,t,r,o){this.commands.push({type:"Q",x1:e,y1:t,x:r,y:o})},h.prototype.close=h.prototype.closePath=function(){this.commands.push({type:"Z"})},h.prototype.extend=function(e){var t;if(e.commands)e=e.commands;else if(e instanceof a)return t=e,this.moveTo(t.x1,t.y1),this.lineTo(t.x2,t.y1),this.lineTo(t.x2,t.y2),this.lineTo(t.x1,t.y2),void this.close();Array.prototype.push.apply(this.commands,e)},h.prototype.getBoundingBox=function(){for(var e=new a,t=0,r=0,o=0,n=0,s=0;s<this.commands.length;s++){var i=this.commands[s];switch(i.type){case"M":e.addPoint(i.x,i.y),t=o=i.x,r=n=i.y;break;case"L":e.addPoint(i.x,i.y),o=i.x,n=i.y;break;case"Q":e.addQuad(o,n,i.x1,i.y1,i.x,i.y),o=i.x,n=i.y;break;case"C":e.addBezier(o,n,i.x1,i.y1,i.x2,i.y2,i.x,i.y),o=i.x,n=i.y;break;case"Z":o=t,n=r;break;default:throw new Error("Unexpected path command "+i.type)}}return e.isEmpty()&&e.addPoint(0,0),e},h.prototype.draw=function(e){e.beginPath();for(var t=0;t<this.commands.length;t+=1){var r=this.commands[t];"M"===r.type?e.moveTo(r.x,r.y):"L"===r.type?e.lineTo(r.x,r.y):"C"===r.type?e.bezierCurveTo(r.x1,r.y1,r.x2,r.y2,r.x,r.y):"Q"===r.type?e.quadraticCurveTo(r.x1,r.y1,r.x,r.y):"Z"===r.type&&e.closePath()}this.fill&&(e.fillStyle=this.fill,e.fill()),this.stroke&&(e.strokeStyle=this.stroke,e.lineWidth=this.strokeWidth,e.stroke())},h.prototype.toPathData=function(n){function e(){for(var e=arguments,t="",r=0;r<arguments.length;r+=1){var o=e[r];0<=o&&0<r&&(t+=" "),t+=(o=o,Math.round(o)===o?""+Math.round(o):o.toFixed(n))}return t}n=void 0!==n?n:2;for(var t="",r=0;r<this.commands.length;r+=1){var o=this.commands[r];"M"===o.type?t+="M"+e(o.x,o.y):"L"===o.type?t+="L"+e(o.x,o.y):"C"===o.type?t+="C"+e(o.x1,o.y1,o.x2,o.y2,o.x,o.y):"Q"===o.type?t+="Q"+e(o.x1,o.y1,o.x,o.y):"Z"===o.type&&(t+="Z")}return t},h.prototype.toSVG=function(e){var t=(t='<path d="')+this.toPathData(e)+'"';return this.fill&&"black"!==this.fill&&(null===this.fill?t+=' fill="none"':t+=' fill="'+this.fill+'"'),this.stroke&&(t+=' stroke="'+this.stroke+'" stroke-width="'+this.strokeWidth+'"'),t+="/>"},h.prototype.toDOMElement=function(e){var e=this.toPathData(e),t=document.createElementNS("http://www.w3.org/2000/svg","path");return t.setAttribute("d",e),t};var L={fail:oe,argument:ne,assert:ne},m={},w={},l={};function r(e){return function(){return e}}w.BYTE=function(e){return L.argument(0<=e&&e<=255,"Byte value should be between 0 and 255."),[e]},l.BYTE=r(1),w.CHAR=function(e){return[e.charCodeAt(0)]},l.CHAR=r(1),w.CHARARRAY=function(e){for(var t=[],r=0;r<e.length;r+=1)t[r]=e.charCodeAt(r);return t},l.CHARARRAY=function(e){return e.length},w.USHORT=function(e){return[e>>8&255,255&e]},l.USHORT=r(2),w.SHORT=function(e){return[(e=32768<=e?-(65536-e):e)>>8&255,255&e]},l.SHORT=r(2),w.UINT24=function(e){return[e>>16&255,e>>8&255,255&e]},l.UINT24=r(3),w.ULONG=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]},l.ULONG=r(4),w.LONG=function(e){return[(e=2147483648<=e?-(4294967296-e):e)>>24&255,e>>16&255,e>>8&255,255&e]},l.LONG=r(4),w.FIXED=w.ULONG,l.FIXED=l.ULONG,w.FWORD=w.SHORT,l.FWORD=l.SHORT,w.UFWORD=w.USHORT,l.UFWORD=l.USHORT,w.LONGDATETIME=function(e){return[0,0,0,0,e>>24&255,e>>16&255,e>>8&255,255&e]},l.LONGDATETIME=r(8),w.TAG=function(e){return L.argument(4===e.length,"Tag should be exactly 4 ASCII characters."),[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]},l.TAG=r(4),w.Card8=w.BYTE,l.Card8=l.BYTE,w.Card16=w.USHORT,l.Card16=l.USHORT,w.OffSize=w.BYTE,l.OffSize=l.BYTE,w.SID=w.USHORT,l.SID=l.USHORT,w.NUMBER=function(e){return-107<=e&&e<=107?[e+139]:108<=e&&e<=1131?[247+((e-=108)>>8),255&e]:-1131<=e&&e<=-108?[251+((e=-e-108)>>8),255&e]:-32768<=e&&e<=32767?w.NUMBER16(e):w.NUMBER32(e)},l.NUMBER=function(e){return w.NUMBER(e).length},w.NUMBER16=function(e){return[28,e>>8&255,255&e]},l.NUMBER16=r(3),w.NUMBER32=function(e){return[29,e>>24&255,e>>16&255,e>>8&255,255&e]},l.NUMBER32=r(5),w.REAL=function(e){for(var t=e.toString(),r=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(t),o=(r&&(r=parseFloat("1e"+((r[2]?+r[2]:0)+r[1].length)),t=(Math.round(e*r)/r).toString()),""),n=0,s=t.length;n<s;n+=1){var i=t[n];o+="e"===i?"-"===t[++n]?"c":"b":"."===i?"a":"-"===i?"e":i}for(var a=[30],l=0,u=(o+=1&o.length?"f":"ff").length;l<u;l+=2)a.push(parseInt(o.substr(l,2),16));return a},l.REAL=function(e){return w.REAL(e).length},w.NAME=w.CHARARRAY,l.NAME=l.CHARARRAY,w.STRING=w.CHARARRAY,l.STRING=l.CHARARRAY,m.UTF8=function(e,t,r){for(var o=[],n=r,s=0;s<n;s++,t+=1)o[s]=e.getUint8(t);return String.fromCharCode.apply(null,o)},m.UTF16=function(e,t,r){for(var o=[],n=r/2,s=0;s<n;s++,t+=2)o[s]=e.getUint16(t);return String.fromCharCode.apply(null,o)},w.UTF16=function(e){for(var t=[],r=0;r<e.length;r+=1){var o=e.charCodeAt(r);t[t.length]=o>>8&255,t[t.length]=255&o}return t},l.UTF16=function(e){return 2*e.length};var se,ie={"x-mac-croatian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ","x-mac-cyrillic":"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю","x-mac-gaelic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ","x-mac-greek":"Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ­","x-mac-icelandic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-inuit":"ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł","x-mac-ce":"ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ",macintosh:"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-romanian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-turkish":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"},ae=(m.MACSTRING=function(e,t,r,o){var n=ie[o];if(void 0!==n){for(var s="",i=0;i<r;i++){var a=e.getUint8(t+i);s+=a<=127?String.fromCharCode(a):n[127&a]}return s}},"function"==typeof WeakMap&&new WeakMap);function le(e){return-128<=e&&e<=127}w.MACSTRING=function(e,t){var r=function(e){if(!se)for(var t in se={},ie)se[t]=new String(t);var r=se[e];if(void 0!==r){if(ae){var o=ae.get(r);if(void 0!==o)return o}var n=ie[e];if(void 0!==n){for(var s={},i=0;i<n.length;i++)s[n.charCodeAt(i)]=i+128;return ae&&ae.set(r,s),s}}}(t);if(void 0!==r){for(var o=[],n=0;n<e.length;n++){var s=e.charCodeAt(n);if(128<=s&&void 0===(s=r[s]))return;o[n]=s}return o}},l.MACSTRING=function(e,t){e=w.MACSTRING(e,t);return void 0!==e?e.length:0},w.VARDELTAS=function(e){for(var t=0,r=[];t<e.length;)var o=e[t],t=(0===o?function(e,t,r){for(var o=0,n=e.length;t<n&&o<64&&0===e[t];)++t,++o;return r.push(128|o-1),t}:-128<=o&&o<=127?function(e,t,r){for(var o=0,n=e.length,s=t;s<n&&o<64;){var i=e[s];if(!le(i))break;if(0===i&&s+1<n&&0===e[s+1])break;++s,++o}r.push(o-1);for(var a=t;a<s;++a)r.push(e[a]+256&255);return s}:function(e,t,r){for(var o=0,n=e.length,s=t;s<n&&o<64;){var i=e[s];if(0===i)break;if(le(i)&&s+1<n&&le(e[s+1]))break;++s,++o}r.push(64|o-1);for(var a=t;a<s;++a){var l=e[a];r.push(l+65536>>8&255,l+256&255)}return s})(e,t,r);return r},w.INDEX=function(e){for(var t=1,r=[t],o=[],n=0;n<e.length;n+=1){var s=w.OBJECT(e[n]);Array.prototype.push.apply(o,s),t+=s.length,r.push(t)}if(0===o.length)return[0,0];for(var i=[],a=1+Math.floor(Math.log(t)/Math.log(2))/8|0,l=[void 0,w.BYTE,w.USHORT,w.UINT24,w.ULONG][a],u=0;u<r.length;u+=1){var c=l(r[u]);Array.prototype.push.apply(i,c)}return Array.prototype.concat(w.Card16(e.length),w.OffSize(a),i,o)},l.INDEX=function(e){return w.INDEX(e).length},w.DICT=function(e){for(var t=[],r=Object.keys(e),o=r.length,n=0;n<o;n+=1){var s=parseInt(r[n],0),i=e[s];t=(t=t.concat(w.OPERAND(i.value,i.type))).concat(w.OPERATOR(s))}return t},l.DICT=function(e){return w.DICT(e).length},w.OPERATOR=function(e){return e<1200?[e]:[12,e-1200]},w.OPERAND=function(e,t){var r=[];if(Array.isArray(t))for(var o=0;o<t.length;o+=1)L.argument(e.length===t.length,"Not enough arguments given for type"+t),r=r.concat(w.OPERAND(e[o],t[o]));else if("SID"===t)r=r.concat(w.NUMBER(e));else if("offset"===t)r=r.concat(w.NUMBER32(e));else if("number"===t)r=r.concat(w.NUMBER(e));else{if("real"!==t)throw new Error("Unknown operand type "+t);r=r.concat(w.REAL(e))}return r},w.OP=w.BYTE,l.OP=l.BYTE;var ue="function"==typeof WeakMap&&new WeakMap;function n(e,t,r){for(var o=0;o<t.length;o+=1){var n=t[o];this[n.name]=n.value}if(this.tableName=e,this.fields=t,r)for(var s=Object.keys(r),i=0;i<s.length;i+=1){var a=s[i],l=r[a];void 0!==this[a]&&(this[a]=l)}}function ce(e,t,r){void 0===r&&(r=t.length);var o=new Array(t.length+1);o[0]={name:e+"Count",type:"USHORT",value:r};for(var n=0;n<t.length;n++)o[n+1]={name:e+n,type:"USHORT",value:t[n]};return o}function de(e,t,r){var o=t.length,n=new Array(o+1);n[0]={name:e+"Count",type:"USHORT",value:o};for(var s=0;s<o;s++)n[s+1]={name:e+s,type:"TABLE",value:r(t[s],s)};return n}function he(e,t,r){var o=t.length,n=[];n[0]={name:e+"Count",type:"USHORT",value:o};for(var s=0;s<o;s++)n=n.concat(r(t[s],s));return n}function fe(e){1===e.format?n.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(ce("glyph",e.glyphs))):L.assert(!1,"Can't create coverage table format 2 yet.")}function pe(e){n.call(this,"scriptListTable",he("scriptRecord",e,function(e,t){var r=e.script,o=r.defaultLangSys;return L.assert(!!o,"Unable to write GSUB: script "+e.tag+" has no default language system."),[{name:"scriptTag"+t,type:"TAG",value:e.tag},{name:"script"+t,type:"TABLE",value:new n("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new n("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:o.reqFeatureIndex}].concat(ce("featureIndex",o.featureIndexes)))}].concat(he("langSys",r.langSysRecords,function(e,t){var r=e.langSys;return[{name:"langSysTag"+t,type:"TAG",value:e.tag},{name:"langSys"+t,type:"TABLE",value:new n("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:r.reqFeatureIndex}].concat(ce("featureIndex",r.featureIndexes)))}]})))}]}))}function me(e){n.call(this,"featureListTable",he("featureRecord",e,function(e,t){var r=e.feature;return[{name:"featureTag"+t,type:"TAG",value:e.tag},{name:"feature"+t,type:"TABLE",value:new n("featureTable",[{name:"featureParams",type:"USHORT",value:r.featureParams}].concat(ce("lookupListIndex",r.lookupListIndexes)))}]}))}function ye(e,r){n.call(this,"lookupListTable",de("lookup",e,function(e){var t=r[e.lookupType];return L.assert(!!t,"Unable to write GSUB lookup type "+e.lookupType+" tables."),new n("lookupTable",[{name:"lookupType",type:"USHORT",value:e.lookupType},{name:"lookupFlag",type:"USHORT",value:e.lookupFlag}].concat(de("subtable",e.subtables,t)))}))}w.CHARSTRING=function(e){if(ue){var t=ue.get(e);if(void 0!==t)return t}for(var r=[],o=e.length,n=0;n<o;n+=1)var s=e[n],r=r.concat(w[s.type](s.value));return ue&&ue.set(e,r),r},l.CHARSTRING=function(e){return w.CHARSTRING(e).length},w.OBJECT=function(e){var t=w[e.type];return L.argument(void 0!==t,"No encoding function for type "+e.type),t(e.value)},l.OBJECT=function(e){var t=l[e.type];return L.argument(void 0!==t,"No sizeOf function for type "+e.type),t(e.value)},w.TABLE=function(e){for(var t=[],r=e.fields.length,o=[],n=[],s=0;s<r;s+=1){var i=e.fields[s],a=w[i.type],l=(L.argument(void 0!==a,"No encoding function for field type "+i.type+" ("+i.name+")"),e[i.name]),a=a(l=void 0===l?i.value:l);"TABLE"===i.type?(n.push(t.length),t=t.concat([0,0]),o.push(a)):t=t.concat(a)}for(var u=0;u<o.length;u+=1){var c=n[u],d=t.length;L.argument(d<65536,"Table "+e.tableName+" too big."),t[c]=d>>8,t[c+1]=255&d,t=t.concat(o[u])}return t},l.TABLE=function(e){for(var t=0,r=e.fields.length,o=0;o<r;o+=1){var n=e.fields[o],s=l[n.type],i=(L.argument(void 0!==s,"No sizeOf function for field type "+n.type+" ("+n.name+")"),e[n.name]);t+=s(i=void 0===i?n.value:i),"TABLE"===n.type&&(t+=2)}return t},w.RECORD=w.TABLE,l.RECORD=l.TABLE,w.LITERAL=function(e){return e},l.LITERAL=function(e){return e.length},n.prototype.encode=function(){return w.TABLE(this)},n.prototype.sizeOf=function(){return l.TABLE(this)};var S={Table:n,Record:n,Coverage:(fe.prototype=Object.create(n.prototype)).constructor=fe,ScriptList:(pe.prototype=Object.create(n.prototype)).constructor=pe,FeatureList:(me.prototype=Object.create(n.prototype)).constructor=me,LookupList:(ye.prototype=Object.create(n.prototype)).constructor=ye,ushortList:ce,tableList:de,recordList:he};function ge(e,t){return e.getUint8(t)}function ve(e,t){return e.getUint16(t,!1)}function be(e,t){return e.getUint32(t,!1)}function je(e,t){return e.getInt16(t,!1)+e.getUint16(t+2,!1)/65535}var _e={byte:1,uShort:2,short:2,uLong:4,fixed:4,longDateTime:8,tag:4};function u(e,t){this.data=e,this.offset=t,this.relativeOffset=0}u.prototype.parseByte=function(){var e=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},u.prototype.parseChar=function(){var e=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},u.prototype.parseCard8=u.prototype.parseByte,u.prototype.parseCard16=u.prototype.parseUShort=function(){var e=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},u.prototype.parseSID=u.prototype.parseUShort,u.prototype.parseOffset16=u.prototype.parseUShort,u.prototype.parseShort=function(){var e=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},u.prototype.parseF2Dot14=function(){var e=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,e},u.prototype.parseOffset32=u.prototype.parseULong=function(){var e=be(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},u.prototype.parseFixed=function(){var e=je(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},u.prototype.parseString=function(e){var t=this.data,r=this.offset+this.relativeOffset,o="";this.relativeOffset+=e;for(var n=0;n<e;n++)o+=String.fromCharCode(t.getUint8(r+n));return o},u.prototype.parseTag=function(){return this.parseString(4)},u.prototype.parseLongDateTime=function(){var e=be(this.data,this.offset+this.relativeOffset+4);return e-=2082844800,this.relativeOffset+=8,e},u.prototype.parseVersion=function(e){var t=ve(this.data,this.offset+this.relativeOffset),r=ve(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,t+r/(e=void 0===e?4096:e)/10},u.prototype.skip=function(e,t){this.relativeOffset+=_e[e]*(t=void 0===t?1:t)},u.prototype.parseULongList=function(e){void 0===e&&(e=this.parseULong());for(var t=new Array(e),r=this.data,o=this.offset+this.relativeOffset,n=0;n<e;n++)t[n]=r.getUint32(o),o+=4;return this.relativeOffset+=4*e,t},u.prototype.parseOffset16List=u.prototype.parseUShortList=function(e){void 0===e&&(e=this.parseUShort());for(var t=new Array(e),r=this.data,o=this.offset+this.relativeOffset,n=0;n<e;n++)t[n]=r.getUint16(o),o+=2;return this.relativeOffset+=2*e,t},u.prototype.parseShortList=function(e){for(var t=new Array(e),r=this.data,o=this.offset+this.relativeOffset,n=0;n<e;n++)t[n]=r.getInt16(o),o+=2;return this.relativeOffset+=2*e,t},u.prototype.parseByteList=function(e){for(var t=new Array(e),r=this.data,o=this.offset+this.relativeOffset,n=0;n<e;n++)t[n]=r.getUint8(o++);return this.relativeOffset+=e,t},u.prototype.parseList=function(e,t){t||(t=e,e=this.parseUShort());for(var r=new Array(e),o=0;o<e;o++)r[o]=t.call(this);return r},u.prototype.parseList32=function(e,t){t||(t=e,e=this.parseULong());for(var r=new Array(e),o=0;o<e;o++)r[o]=t.call(this);return r},u.prototype.parseRecordList=function(e,t){t||(t=e,e=this.parseUShort());for(var r=new Array(e),o=Object.keys(t),n=0;n<e;n++){for(var s={},i=0;i<o.length;i++){var a=o[i],l=t[a];s[a]=l.call(this)}r[n]=s}return r},u.prototype.parseRecordList32=function(e,t){t||(t=e,e=this.parseULong());for(var r=new Array(e),o=Object.keys(t),n=0;n<e;n++){for(var s={},i=0;i<o.length;i++){var a=o[i],l=t[a];s[a]=l.call(this)}r[n]=s}return r},u.prototype.parseStruct=function(e){if("function"==typeof e)return e.call(this);for(var t=Object.keys(e),r={},o=0;o<t.length;o++){var n=t[o],s=e[n];r[n]=s.call(this)}return r},u.prototype.parseValueRecord=function(e){var t;if(0!==(e=void 0===e?this.parseUShort():e))return t={},1&e&&(t.xPlacement=this.parseShort()),2&e&&(t.yPlacement=this.parseShort()),4&e&&(t.xAdvance=this.parseShort()),8&e&&(t.yAdvance=this.parseShort()),16&e&&(t.xPlaDevice=void 0,this.parseShort()),32&e&&(t.yPlaDevice=void 0,this.parseShort()),64&e&&(t.xAdvDevice=void 0,this.parseShort()),128&e&&(t.yAdvDevice=void 0,this.parseShort()),t},u.prototype.parseValueRecordList=function(){for(var e=this.parseUShort(),t=this.parseUShort(),r=new Array(t),o=0;o<t;o++)r[o]=this.parseValueRecord(e);return r},u.prototype.parsePointer=function(e){var t=this.parseOffset16();if(0<t)return new u(this.data,this.offset+t).parseStruct(e)},u.prototype.parsePointer32=function(e){var t=this.parseOffset32();if(0<t)return new u(this.data,this.offset+t).parseStruct(e)},u.prototype.parseListOfLists=function(e){for(var t=this.parseOffset16List(),r=t.length,o=this.relativeOffset,n=new Array(r),s=0;s<r;s++){var i=t[s];if(0===i)n[s]=void 0;else if(this.relativeOffset=i,e){for(var a=this.parseOffset16List(),l=new Array(a.length),u=0;u<a.length;u++)this.relativeOffset=i+a[u],l[u]=e.call(this);n[s]=l}else n[s]=this.parseUShortList()}return this.relativeOffset=o,n},u.prototype.parseCoverage=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort(),r=this.parseUShort();if(1===t)return{format:1,glyphs:this.parseUShortList(r)};if(2!==t)throw new Error("0x"+e.toString(16)+": Coverage format must be 1 or 2.");for(var o=new Array(r),n=0;n<r;n++)o[n]={start:this.parseUShort(),end:this.parseUShort(),index:this.parseUShort()};return{format:2,ranges:o}},u.prototype.parseClassDef=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(1===t)return{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()};if(2===t)return{format:2,ranges:this.parseRecordList({start:u.uShort,end:u.uShort,classId:u.uShort})};throw new Error("0x"+e.toString(16)+": ClassDef format must be 1 or 2.")},u.list=function(e,t){return function(){return this.parseList(e,t)}},u.list32=function(e,t){return function(){return this.parseList32(e,t)}},u.recordList=function(e,t){return function(){return this.parseRecordList(e,t)}},u.recordList32=function(e,t){return function(){return this.parseRecordList32(e,t)}},u.pointer=function(e){return function(){return this.parsePointer(e)}},u.pointer32=function(e){return function(){return this.parsePointer32(e)}},u.tag=u.prototype.parseTag,u.byte=u.prototype.parseByte,u.uShort=u.offset16=u.prototype.parseUShort,u.uShortList=u.prototype.parseUShortList,u.uLong=u.offset32=u.prototype.parseULong,u.uLongList=u.prototype.parseULongList,u.struct=u.prototype.parseStruct,u.coverage=u.prototype.parseCoverage,u.classDef=u.prototype.parseClassDef;var xe={reserved:u.uShort,reqFeatureIndex:u.uShort,featureIndexes:u.uShortList},R=(u.prototype.parseScriptList=function(){return this.parsePointer(u.recordList({tag:u.tag,script:u.pointer({defaultLangSys:u.pointer(xe),langSysRecords:u.recordList({tag:u.tag,langSys:u.pointer(xe)})})}))||[]},u.prototype.parseFeatureList=function(){return this.parsePointer(u.recordList({tag:u.tag,feature:u.pointer({featureParams:u.offset16,lookupListIndexes:u.uShortList})}))||[]},u.prototype.parseLookupList=function(o){return this.parsePointer(u.list(u.pointer(function(){var e=this.parseUShort(),t=(L.argument(1<=e&&e<=9,"GPOS/GSUB lookup type "+e+" unknown."),this.parseUShort()),r=16&t;return{lookupType:e,lookupFlag:t,subtables:this.parseList(u.pointer(o[e])),markFilteringSet:r?this.parseUShort():void 0}})))||[]},u.prototype.parseFeatureVariationsList=function(){return this.parsePointer32(function(){var e=this.parseUShort(),t=this.parseUShort();return L.argument(1===e&&t<1,"GPOS/GSUB feature variations table unknown."),this.parseRecordList32({conditionSetOffset:u.offset32,featureTableSubstitutionOffset:u.offset32})})||[]},{getByte:ge,getCard8:ge,getUShort:ve,getCard16:ve,getShort:function(e,t){return e.getInt16(t,!1)},getULong:be,getFixed:je,getTag:function(e,t){for(var r="",o=t;o<t+4;o+=1)r+=String.fromCharCode(e.getInt8(o));return r},getOffset:function(e,t,r){for(var o=0,n=0;n<r;n+=1)o=(o<<=8)+e.getUint8(t+n);return o},getBytes:function(e,t,r){for(var o=[],n=t;n<r;n+=1)o.push(e.getUint8(n));return o},bytesToString:function(e){for(var t="",r=0;r<e.length;r+=1)t+=String.fromCharCode(e[r]);return t},Parser:u});var we={parse:function(e,t){for(var r={},o=(r.version=R.getUShort(e,t),L.argument(0===r.version,"cmap table version should be 0."),r.numTables=R.getUShort(e,t+2),-1),n=r.numTables-1;0<=n;--n){var s=R.getUShort(e,t+4+8*n),i=R.getUShort(e,t+4+8*n+2);if(3===s&&(0===i||1===i||10===i)||0===s&&(0===i||1===i||2===i||3===i||4===i)){o=R.getULong(e,t+4+8*n+4);break}}if(-1===o)throw new Error("No valid cmap sub-tables found.");var a=new R.Parser(e,t+o);if(r.format=a.parseUShort(),12===r.format){var l,u=r,c=a;c.parseUShort(),u.length=c.parseULong(),u.language=c.parseULong(),u.groupCount=l=c.parseULong(),u.glyphIndexMap={};for(var d=0;d<l;d+=1)for(var h=c.parseULong(),f=c.parseULong(),p=c.parseULong(),m=h;m<=f;m+=1)u.glyphIndexMap[m]=p,p++}else{if(4!==r.format)throw new Error("Only format 4 and 12 cmap tables are supported (found format "+r.format+").");var y=r,g=e,v=t,b=o;y.length=a.parseUShort(),y.language=a.parseUShort(),y.segCount=j=a.parseUShort()>>1,a.skip("uShort",3),y.glyphIndexMap={};for(var j,_=new R.Parser(g,v+b+14),x=new R.Parser(g,v+b+16+2*j),w=new R.Parser(g,v+b+16+4*j),S=new R.Parser(g,v+b+16+6*j),T=v+b+16+8*j,M=0;M<j-1;M+=1)for(var E=void 0,k=_.parseUShort(),C=x.parseUShort(),O=w.parseShort(),P=S.parseUShort(),A=C;A<=k;A+=1)0!==P?(T=(T=S.offset+S.relativeOffset-2)+P+2*(A-C),0!==(E=R.getUShort(g,T))&&(E=E+O&65535)):E=A+O&65535,y.glyphIndexMap[A]=E}return r},make:function(e){for(var t=!0,r=e.length-1;0<r;--r)if(65535<e.get(r).unicode){console.log("Adding CMAP format 12 (needed!)"),t=!1;break}var o,n,s=[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:t?1:2},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:t?12:20}],i=(s=(s=t?s:s.concat([{name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}])).concat([{name:"format",type:"USHORT",value:4},{name:"cmap4Length",type:"USHORT",value:0},{name:"language",type:"USHORT",value:0},{name:"segCountX2",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]),new S.Table("cmap",s));for(i.segments=[],r=0;r<e.length;r+=1){for(var a=e.get(r),l=0;l<a.unicodes.length;l+=1)o=a.unicodes[l],n=r,i.segments.push({end:o,start:o,delta:-(o-n),offset:0,glyphIndex:n});i.segments=i.segments.sort(function(e,t){return e.start-t.start})}i.segments.push({end:65535,start:65535,delta:1,offset:0});var u=i.segments.length,c=0,d=[],h=[],f=[],p=[],m=[],y=[];for(r=0;r<u;r+=1){var g=i.segments[r];g.end<=65535&&g.start<=65535?(d=d.concat({name:"end_"+r,type:"USHORT",value:g.end}),h=h.concat({name:"start_"+r,type:"USHORT",value:g.start}),f=f.concat({name:"idDelta_"+r,type:"SHORT",value:g.delta}),p=p.concat({name:"idRangeOffset_"+r,type:"USHORT",value:g.offset}),void 0!==g.glyphId&&(m=m.concat({name:"glyph_"+r,type:"USHORT",value:g.glyphId}))):c+=1,t||void 0===g.glyphIndex||(y=(y=(y=y.concat({name:"cmap12Start_"+r,type:"ULONG",value:g.start})).concat({name:"cmap12End_"+r,type:"ULONG",value:g.end})).concat({name:"cmap12Glyph_"+r,type:"ULONG",value:g.glyphIndex}))}return i.segCountX2=2*(u-c),i.searchRange=2*Math.pow(2,Math.floor(Math.log(u-c)/Math.log(2))),i.entrySelector=Math.log(i.searchRange/2)/Math.log(2),i.rangeShift=i.segCountX2-i.searchRange,i.fields=i.fields.concat(d),i.fields.push({name:"reservedPad",type:"USHORT",value:0}),i.fields=i.fields.concat(h),i.fields=i.fields.concat(f),i.fields=i.fields.concat(p),i.fields=i.fields.concat(m),i.cmap4Length=14+2*d.length+2+2*h.length+2*f.length+2*p.length+2*m.length,t||(s=16+4*y.length,i.cmap12Offset=20+i.cmap4Length,i.fields=i.fields.concat([{name:"cmap12Format",type:"USHORT",value:12},{name:"cmap12Reserved",type:"USHORT",value:0},{name:"cmap12Length",type:"ULONG",value:s},{name:"cmap12Language",type:"ULONG",value:0},{name:"cmap12nGroups",type:"ULONG",value:y.length/3}]),i.fields=i.fields.concat(y)),i}},Se=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","266 ff","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],Te=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls"],Me=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],c=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];function Ee(e){this.font=e}function ke(e){this.cmap=e}function Ce(e,t){this.encoding=e,this.charset=t}function Oe(e){switch(e.version){case 1:this.names=c.slice();break;case 2:this.names=new Array(e.numberOfGlyphs);for(var t=0;t<e.numberOfGlyphs;t++)e.glyphNameIndex[t]<c.length?this.names[t]=c[e.glyphNameIndex[t]]:this.names[t]=e.names[e.glyphNameIndex[t]-c.length];break;case 2.5:this.names=new Array(e.numberOfGlyphs);for(var r=0;r<e.numberOfGlyphs;r++)this.names[r]=c[r+e.glyphNameIndex[r]];break;default:this.names=[]}}Ee.prototype.charToGlyphIndex=function(e){var t=e.codePointAt(0),r=this.font.glyphs;if(r)for(var o=0;o<r.length;o+=1)for(var n=r.get(o),s=0;s<n.unicodes.length;s+=1)if(n.unicodes[s]===t)return o;return null},ke.prototype.charToGlyphIndex=function(e){return this.cmap.glyphIndexMap[e.codePointAt(0)]||0},Ce.prototype.charToGlyphIndex=function(e){e=e.codePointAt(0),e=this.encoding[e];return this.charset.indexOf(e)},Oe.prototype.nameToGlyphIndex=function(e){return this.names.indexOf(e)},Oe.prototype.glyphIndexToName=function(e){return this.names[e]};var d={line:function(e,t,r,o,n){e.beginPath(),e.moveTo(t,r),e.lineTo(o,n),e.stroke()}};function f(e){this.bindConstructorValues(e)}function Pe(t,e,r){Object.defineProperty(t,e,{get:function(){return t.path,t[r]},set:function(e){t[r]=e},enumerable:!0,configurable:!0})}function Ae(e,t){if(this.font=e,this.glyphs={},Array.isArray(t))for(var r=0;r<t.length;r++)this.glyphs[r]=t[r];this.length=t&&t.length||0}f.prototype.bindConstructorValues=function(e){var t;this.index=e.index||0,this.name=e.name||null,this.unicode=e.unicode||void 0,this.unicodes=e.unicodes||void 0!==e.unicode?[e.unicode]:[],e.xMin&&(this.xMin=e.xMin),e.yMin&&(this.yMin=e.yMin),e.xMax&&(this.xMax=e.xMax),e.yMax&&(this.yMax=e.yMax),e.advanceWidth&&(this.advanceWidth=e.advanceWidth),Object.defineProperty(this,"path",(e=e.path,t=e||new h,{configurable:!0,get:function(){return t="function"==typeof t?t():t},set:function(e){t=e}}))},f.prototype.addUnicode=function(e){0===this.unicodes.length&&(this.unicode=e),this.unicodes.push(e)},f.prototype.getBoundingBox=function(){return this.path.getBoundingBox()},f.prototype.getPath=function(e,t,r,o,n){e=void 0!==e?e:0,t=void 0!==t?t:0,r=void 0!==r?r:72;for(var s,i,a=(o=o||{}).xScale,l=o.yScale,u=((s=o.hinting&&n&&n.hinting?this.path&&n.hinting.exec(this,r):s)?(i=n.hinting.getCommands(s),e=Math.round(e),t=Math.round(t),a=l=1):(i=this.path.commands,o=1/this.path.unitsPerEm*r,void 0===a&&(a=o),void 0===l&&(l=o)),new h),c=0;c<i.length;c+=1){var d=i[c];"M"===d.type?u.moveTo(e+d.x*a,t+-d.y*l):"L"===d.type?u.lineTo(e+d.x*a,t+-d.y*l):"Q"===d.type?u.quadraticCurveTo(e+d.x1*a,t+-d.y1*l,e+d.x*a,t+-d.y*l):"C"===d.type?u.curveTo(e+d.x1*a,t+-d.y1*l,e+d.x2*a,t+-d.y2*l,e+d.x*a,t+-d.y*l):"Z"===d.type&&u.closePath()}return u},f.prototype.getContours=function(){if(void 0===this.points)return[];for(var e=[],t=[],r=0;r<this.points.length;r+=1){var o=this.points[r];t.push(o),o.lastPointOfContour&&(e.push(t),t=[])}return L.argument(0===t.length,"There are still points left in the current contour."),e},f.prototype.getMetrics=function(){for(var e=this.path.commands,t=[],r=[],o=0;o<e.length;o+=1){var n=e[o];"Z"!==n.type&&(t.push(n.x),r.push(n.y)),"Q"!==n.type&&"C"!==n.type||(t.push(n.x1),r.push(n.y1)),"C"===n.type&&(t.push(n.x2),r.push(n.y2))}var s={xMin:Math.min.apply(null,t),yMin:Math.min.apply(null,r),xMax:Math.max.apply(null,t),yMax:Math.max.apply(null,r),leftSideBearing:this.leftSideBearing};return isFinite(s.xMin)||(s.xMin=0),isFinite(s.xMax)||(s.xMax=this.advanceWidth),isFinite(s.yMin)||(s.yMin=0),isFinite(s.yMax)||(s.yMax=0),s.rightSideBearing=this.advanceWidth-s.leftSideBearing-(s.xMax-s.xMin),s},f.prototype.draw=function(e,t,r,o,n){this.getPath(t,r,o,n).draw(e)},f.prototype.drawPoints=function(i,e,t,r){function o(e,t,r,o){var n=2*Math.PI;i.beginPath();for(var s=0;s<e.length;s+=1)i.moveTo(t+e[s].x*o,r+e[s].y*o),i.arc(t+e[s].x*o,r+e[s].y*o,2,0,n,!1);i.closePath(),i.fill()}e=void 0!==e?e:0,t=void 0!==t?t:0;for(var r=1/this.path.unitsPerEm*(r=void 0!==r?r:24),n=[],s=[],a=this.path,l=0;l<a.commands.length;l+=1){var u=a.commands[l];void 0!==u.x&&n.push({x:u.x,y:-u.y}),void 0!==u.x1&&s.push({x:u.x1,y:-u.y1}),void 0!==u.x2&&s.push({x:u.x2,y:-u.y2})}i.fillStyle="blue",o(n,e,t,r),i.fillStyle="red",o(s,e,t,r)},f.prototype.drawMetrics=function(e,t,r,o){t=void 0!==t?t:0,r=void 0!==r?r:0,o=1/this.path.unitsPerEm*(o=void 0!==o?o:24),e.lineWidth=1,e.strokeStyle="black",d.line(e,t,-1e4,t,1e4),d.line(e,-1e4,r,1e4,r);var n=this.xMin||0,s=this.yMin||0,i=this.xMax||0,a=this.yMax||0,l=this.advanceWidth||0;e.strokeStyle="blue",d.line(e,t+n*o,-1e4,t+n*o,1e4),d.line(e,t+i*o,-1e4,t+i*o,1e4),d.line(e,-1e4,r+-s*o,1e4,r+-s*o),d.line(e,-1e4,r+-a*o,1e4,r+-a*o),e.strokeStyle="green",d.line(e,t+l*o,-1e4,t+l*o,1e4)},Ae.prototype.get=function(e){return"function"==typeof this.glyphs[e]&&(this.glyphs[e]=this.glyphs[e]()),this.glyphs[e]},Ae.prototype.push=function(e,t){this.glyphs[e]=t,this.length++};var p={GlyphSet:Ae,glyphLoader:function(e,t){return new f({index:t,font:e})},ttfGlyphLoader:function(r,e,o,n,s,i){return function(){var t=new f({index:e,font:r});return t.path=function(){o(t,n,s);var e=i(r.glyphs,t);return e.unitsPerEm=r.unitsPerEm,e},Pe(t,"xMin","_xMin"),Pe(t,"xMax","_xMax"),Pe(t,"yMin","_yMin"),Pe(t,"yMax","_yMax"),t}},cffGlyphLoader:function(r,e,o,n){return function(){var t=new f({index:e,font:r});return t.path=function(){var e=o(r,t,n);return e.unitsPerEm=r.unitsPerEm,e},t}}};function Le(e){e=e.length<1240?107:e.length<33900?1131:32768;return e}function y(e,t,r){var o,n=[],s=[],i=R.getCard16(e,t);if(0!==i){for(var a=R.getByte(e,t+2),l=t+(i+1)*a+2,u=t+3,c=0;c<i+1;c+=1)n.push(R.getOffset(e,u,a)),u+=a;o=l+n[i]}else o=t+2;for(var d=0;d<n.length-1;d+=1){var h=R.getBytes(e,l+n[d],l+n[d+1]);r&&(h=r(h)),s.push(h)}return{objects:s,startOffset:t,endOffset:o}}function Re(e,t){if(28===t)return e.parseByte()<<8|e.parseByte();if(29===t)return e.parseByte()<<24|e.parseByte()<<16|e.parseByte()<<8|e.parseByte();if(30===t){for(var r=e,o="",n=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];;){var s=r.parseByte(),i=s>>4,s=15&s;if(15==i)break;if(o+=n[i],15==s)break;o+=n[s]}return parseFloat(o)}if(32<=t&&t<=246)return t-139;if(247<=t&&t<=250)return 256*(t-247)+e.parseByte()+108;if(251<=t&&t<=254)return 256*-(t-251)-e.parseByte()-108;throw new Error("Invalid b0 "+t)}function Ie(e,t,r){var o=new R.Parser(e,t=void 0!==t?t:0),n=[],s=[];for(r=void 0!==r?r:e.length;o.relativeOffset<r;){var i=o.parseByte();i<=21?(12===i&&(i=1200+o.parseByte()),n.push([i,s]),s=[]):s.push(Re(o,i))}for(var a=n,l={},u=0;u<a.length;u+=1){var c=a[u][0],d=a[u][1],h=void 0,h=1===d.length?d[0]:d;if(l.hasOwnProperty(c)&&!isNaN(l[c]))throw new Error("Object "+l+" already has key "+c);l[c]=h}return l}function De(e,t){return t=t<=390?Se[t]:e[t-391]}function Fe(e,t,r){for(var o,n={},s=0;s<t.length;s+=1){var i=t[s];if(Array.isArray(i.type)){var a=[];a.length=i.type.length;for(var l=0;l<i.type.length;l++)void 0===(o=void 0!==e[i.op]?e[i.op][l]:void 0)&&(o=void 0!==i.value&&void 0!==i.value[l]?i.value[l]:null),"SID"===i.type[l]&&(o=De(r,o)),a[l]=o;n[i.name]=a}else void 0===(o=e[i.op])&&(o=void 0!==i.value?i.value:null),"SID"===i.type&&(o=De(r,o)),n[i.name]=o}return n}var Ue=[{name:"version",op:0,type:"SID"},{name:"notice",op:1,type:"SID"},{name:"copyright",op:1200,type:"SID"},{name:"fullName",op:2,type:"SID"},{name:"familyName",op:3,type:"SID"},{name:"weight",op:4,type:"SID"},{name:"isFixedPitch",op:1201,type:"number",value:0},{name:"italicAngle",op:1202,type:"number",value:0},{name:"underlinePosition",op:1203,type:"number",value:-100},{name:"underlineThickness",op:1204,type:"number",value:50},{name:"paintType",op:1205,type:"number",value:0},{name:"charstringType",op:1206,type:"number",value:2},{name:"fontMatrix",op:1207,type:["real","real","real","real","real","real"],value:[.001,0,0,.001,0,0]},{name:"uniqueId",op:13,type:"number"},{name:"fontBBox",op:5,type:["number","number","number","number"],value:[0,0,0,0]},{name:"strokeWidth",op:1208,type:"number",value:0},{name:"xuid",op:14,type:[],value:null},{name:"charset",op:15,type:"offset",value:0},{name:"encoding",op:16,type:"offset",value:0},{name:"charStrings",op:17,type:"offset",value:0},{name:"private",op:18,type:["number","offset"],value:[0,0]},{name:"ros",op:1230,type:["SID","SID","number"]},{name:"cidFontVersion",op:1231,type:"number",value:0},{name:"cidFontRevision",op:1232,type:"number",value:0},{name:"cidFontType",op:1233,type:"number",value:0},{name:"cidCount",op:1234,type:"number",value:8720},{name:"uidBase",op:1235,type:"number"},{name:"fdArray",op:1236,type:"offset"},{name:"fdSelect",op:1237,type:"offset"},{name:"fontName",op:1238,type:"SID"}],Ne=[{name:"subrs",op:19,type:"offset",value:0},{name:"defaultWidthX",op:20,type:"number",value:0},{name:"nominalWidthX",op:21,type:"number",value:0}];function Be(e,t,r,o){return Fe(Ie(e,t,r),Ne,o)}function Ge(e,t,r,o){for(var n=[],s=0;s<r.length;s+=1){var i=new DataView(new Uint8Array(r[s]).buffer),i=(a=o,Fe(Ie(i,0,i.byteLength),Ue,a)),a=(i._subrs=[],i._subrsBias=0,i.private[0]),l=i.private[1];0!==a&&0!==l&&(a=Be(e,l+t,a,o),i._defaultWidthX=a.defaultWidthX,i._nominalWidthX=a.nominalWidthX,0!==a.subrs&&(l=y(e,l+a.subrs+t),i._subrs=l.objects,i._subrsBias=Le(i._subrs)),i._privateDict=a),n.push(i)}return n}function Ve(y,g,e){var v,b,j,_,t,x,w,r,S,T=new h,M=[],E=0,k=!1,C=!1,O=0,P=0,A=(S=(y.isCIDFont?(t=y.tables.cff.topDict._fdSelect[g.index],t=y.tables.cff.topDict._fdArray[t],x=t._subrs,w=t._subrsBias,r=t._defaultWidthX,t):(x=y.tables.cff.topDict._subrs,w=y.tables.cff.topDict._subrsBias,r=y.tables.cff.topDict._defaultWidthX,y.tables.cff.topDict))._nominalWidthX,r);function L(e,t){C&&T.closePath(),T.moveTo(e,t),C=!0}function R(){M.length%2==0||k||(A=M.shift()+S),E+=M.length>>1,M.length=0,k=!0}return function e(t){for(var r,o,n,s,i,a,l,u,c,d,h,f,p=0;p<t.length;){var m=t[p];switch(p+=1,m){case 1:case 3:R();break;case 4:1<M.length&&!k&&(A=M.shift()+S,k=!0),P+=M.pop(),L(O,P);break;case 5:for(;0<M.length;)O+=M.shift(),P+=M.shift(),T.lineTo(O,P);break;case 6:for(;0<M.length&&(O+=M.shift(),T.lineTo(O,P),0!==M.length);)P+=M.shift(),T.lineTo(O,P);break;case 7:for(;0<M.length&&(P+=M.shift(),T.lineTo(O,P),0!==M.length);)O+=M.shift(),T.lineTo(O,P);break;case 8:for(;0<M.length;)v=O+M.shift(),b=P+M.shift(),j=v+M.shift(),_=b+M.shift(),O=j+M.shift(),P=_+M.shift(),T.curveTo(v,b,j,_,O,P);break;case 10:i=M.pop()+w,(a=x[i])&&e(a);break;case 11:return;case 12:switch(m=t[p],p+=1,m){case 35:v=O+M.shift(),b=P+M.shift(),j=v+M.shift(),_=b+M.shift(),l=j+M.shift(),u=_+M.shift(),c=l+M.shift(),d=u+M.shift(),h=c+M.shift(),f=d+M.shift(),O=h+M.shift(),P=f+M.shift(),M.shift(),T.curveTo(v,b,j,_,l,u),T.curveTo(c,d,h,f,O,P);break;case 34:v=O+M.shift(),b=P,j=v+M.shift(),_=b+M.shift(),l=j+M.shift(),u=_,c=l+M.shift(),d=_,h=c+M.shift(),f=P,O=h+M.shift(),T.curveTo(v,b,j,_,l,u),T.curveTo(c,d,h,f,O,P);break;case 36:v=O+M.shift(),b=P+M.shift(),j=v+M.shift(),_=b+M.shift(),l=j+M.shift(),u=_,c=l+M.shift(),d=_,h=c+M.shift(),f=d+M.shift(),O=h+M.shift(),T.curveTo(v,b,j,_,l,u),T.curveTo(c,d,h,f,O,P);break;case 37:v=O+M.shift(),b=P+M.shift(),j=v+M.shift(),_=b+M.shift(),l=j+M.shift(),u=_+M.shift(),c=l+M.shift(),d=u+M.shift(),h=c+M.shift(),f=d+M.shift(),Math.abs(h-O)>Math.abs(f-P)?O=h+M.shift():P=f+M.shift(),T.curveTo(v,b,j,_,l,u),T.curveTo(c,d,h,f,O,P);break;default:console.log("Glyph "+g.index+": unknown operator 1200"+m),M.length=0}break;case 14:0<M.length&&!k&&(A=M.shift()+S,k=!0),C&&(T.closePath(),C=!1);break;case 18:R();break;case 19:case 20:R(),p+=E+7>>3;break;case 21:2<M.length&&!k&&(A=M.shift()+S,k=!0),P+=M.pop(),L(O+=M.pop(),P);break;case 22:1<M.length&&!k&&(A=M.shift()+S,k=!0),L(O+=M.pop(),P);break;case 23:R();break;case 24:for(;2<M.length;)v=O+M.shift(),b=P+M.shift(),j=v+M.shift(),_=b+M.shift(),O=j+M.shift(),P=_+M.shift(),T.curveTo(v,b,j,_,O,P);O+=M.shift(),P+=M.shift(),T.lineTo(O,P);break;case 25:for(;6<M.length;)O+=M.shift(),P+=M.shift(),T.lineTo(O,P);v=O+M.shift(),b=P+M.shift(),j=v+M.shift(),_=b+M.shift(),O=j+M.shift(),P=_+M.shift(),T.curveTo(v,b,j,_,O,P);break;case 26:for(M.length%2&&(O+=M.shift());0<M.length;)v=O,b=P+M.shift(),j=v+M.shift(),_=b+M.shift(),O=j,P=_+M.shift(),T.curveTo(v,b,j,_,O,P);break;case 27:for(M.length%2&&(P+=M.shift());0<M.length;)v=O+M.shift(),b=P,j=v+M.shift(),_=b+M.shift(),O=j+M.shift(),P=_,T.curveTo(v,b,j,_,O,P);break;case 28:r=t[p],o=t[p+1],M.push((r<<24|o<<16)>>16),p+=2;break;case 29:i=M.pop()+y.gsubrsBias,(a=y.gsubrs[i])&&e(a);break;case 30:for(;0<M.length&&(v=O,b=P+M.shift(),j=v+M.shift(),_=b+M.shift(),O=j+M.shift(),P=_+(1===M.length?M.shift():0),T.curveTo(v,b,j,_,O,P),0!==M.length);)v=O+M.shift(),b=P,j=v+M.shift(),_=b+M.shift(),P=_+M.shift(),O=j+(1===M.length?M.shift():0),T.curveTo(v,b,j,_,O,P);break;case 31:for(;0<M.length&&(v=O+M.shift(),b=P,j=v+M.shift(),_=b+M.shift(),P=_+M.shift(),O=j+(1===M.length?M.shift():0),T.curveTo(v,b,j,_,O,P),0!==M.length);)v=O,b=P+M.shift(),j=v+M.shift(),_=b+M.shift(),O=j+M.shift(),P=_+(1===M.length?M.shift():0),T.curveTo(v,b,j,_,O,P);break;default:m<32?console.log("Glyph "+g.index+": unknown operator "+m):m<247?M.push(m-139):m<251?(r=t[p],p+=1,M.push(256*(m-247)+r+108)):m<255?(r=t[p],p+=1,M.push(256*-(m-251)-r-108)):(r=t[p],o=t[p+1],n=t[p+2],s=t[p+3],p+=4,M.push((r<<24|o<<16|n<<8|s)/65536))}}}(e),g.advanceWidth=A,T}function ze(e,t){var r,o=Se.indexOf(e);return 0<=o&&(r=o),0<=(o=t.indexOf(e))?r=o+Se.length:(r=Se.length+t.length,t.push(e)),r}function He(e,t,r){for(var o={},n=0;n<e.length;n+=1){var s=e[n],i=t[s.name];void 0===i||function e(t,r){if(t===r)return 1;if(Array.isArray(t)&&Array.isArray(r)&&t.length===r.length){for(var o=0;o<t.length;o+=1)if(!e(t[o],r[o]))return;return 1}}(i,s.value)||("SID"===s.type&&(i=ze(i,r)),o[s.op]={name:s.name,type:s.type,value:i})}return o}function We(e,t){var r=new S.Record("Top DICT",[{name:"dict",type:"DICT",value:{}}]);return r.dict=He(Ue,e,t),r}function qe(e){var t=new S.Record("Top DICT INDEX",[{name:"topDicts",type:"INDEX",value:[]}]);return t.topDicts=[{name:"topDict_0",type:"TABLE",value:e}],t}function Xe(e){for(var t=new S.Record("CharStrings INDEX",[{name:"charStrings",type:"INDEX",value:[]}]),r=0;r<e.length;r+=1){var o=e.get(r),n=function(e){for(var t=[],r=e.path,o=(t.push({name:"width",type:"NUMBER",value:e.advanceWidth}),0),n=0,s=0;s<r.commands.length;s+=1){var i,a,l,u,c=void 0,d=void 0,h=r.commands[s];"M"===(h="Q"===h.type?{type:"C",x:h.x,y:h.y,x1:1/3*o+2/3*h.x1,y1:1/3*n+2/3*h.y1,x2:1/3*h.x+2/3*h.x1,y2:1/3*h.y+2/3*h.y1}:h).type?(c=Math.round(h.x-o),d=Math.round(h.y-n),t.push({name:"dx",type:"NUMBER",value:c}),t.push({name:"dy",type:"NUMBER",value:d}),t.push({name:"rmoveto",type:"OP",value:21}),o=Math.round(h.x),n=Math.round(h.y)):"L"===h.type?(c=Math.round(h.x-o),d=Math.round(h.y-n),t.push({name:"dx",type:"NUMBER",value:c}),t.push({name:"dy",type:"NUMBER",value:d}),t.push({name:"rlineto",type:"OP",value:5}),o=Math.round(h.x),n=Math.round(h.y)):"C"===h.type&&(i=Math.round(h.x1-o),a=Math.round(h.y1-n),l=Math.round(h.x2-h.x1),u=Math.round(h.y2-h.y1),c=Math.round(h.x-h.x2),d=Math.round(h.y-h.y2),t.push({name:"dx1",type:"NUMBER",value:i}),t.push({name:"dy1",type:"NUMBER",value:a}),t.push({name:"dx2",type:"NUMBER",value:l}),t.push({name:"dy2",type:"NUMBER",value:u}),t.push({name:"dx",type:"NUMBER",value:c}),t.push({name:"dy",type:"NUMBER",value:d}),t.push({name:"rrcurveto",type:"OP",value:8}),o=Math.round(h.x),n=Math.round(h.y))}return t.push({name:"endchar",type:"OP",value:14}),t}(o);t.charStrings.push({name:o.name,type:"CHARSTRING",value:n})}return t}var Ye={parse:function(e,t,r){r.tables.cff={},o=e,n=t,(s={}).formatMajor=R.getCard8(o,n),s.formatMinor=R.getCard8(o,n+1),s.size=R.getCard8(o,n+2),s.offsetSize=R.getCard8(o,n+3),s.startOffset=n,s.endOffset=n+4;var o=y(e,s.endOffset,R.bytesToString),n=y(e,o.endOffset),s=y(e,n.endOffset,R.bytesToString),o=y(e,s.endOffset);if(r.gsubrs=o.objects,r.gsubrsBias=Le(r.gsubrs),1!==(o=Ge(e,t,n.objects,s.objects)).length)throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = "+o.length);if(n=o[0],(r.tables.cff.topDict=n)._privateDict&&(r.defaultWidthX=n._privateDict.defaultWidthX,r.nominalWidthX=n._privateDict.nominalWidthX),void 0!==n.ros[0]&&void 0!==n.ros[1]&&(r.isCIDFont=!0),r.isCIDFont){var o=n.fdArray,i=n.fdSelect;if(0===o||0===i)throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");o=Ge(e,t,y(e,o+=t).objects,s.objects);n._fdArray=o,n._fdSelect=function(e,t,r,o){var n,s=[],i=new R.Parser(e,t);if(0===(e=i.parseCard8()))for(var a=0;a<r;a++){if(o<=(n=i.parseCard8()))throw new Error("CFF table CID Font FDSelect has bad FD index value "+n+" (FD count "+o+")");s.push(n)}else{if(3!==e)throw new Error("CFF Table CID Font FDSelect table has unsupported format "+e);var l,u=i.parseCard16(),c=i.parseCard16();if(0!==c)throw new Error("CFF Table CID Font FDSelect format 3 range has bad initial GID "+c);for(var d=0;d<u;d++){if(n=i.parseCard8(),l=i.parseCard16(),o<=n)throw new Error("CFF table CID Font FDSelect has bad FD index value "+n+" (FD count "+o+")");if(r<l)throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID "+l);for(;c<l;c++)s.push(n);c=l}if(l!==r)throw new Error("CFF Table CID Font FDSelect format 3 range has bad final GID "+l)}return s}(e,i+=t,r.numGlyphs,o.length)}var i=t+n.private[1],o=Be(e,i,n.private[0],s.objects),a=(r.defaultWidthX=o.defaultWidthX,r.nominalWidthX=o.nominalWidthX,0!==o.subrs?(i=y(e,i+o.subrs),r.subrs=i.objects,r.subrsBias=Le(r.subrs)):(r.subrs=[],r.subrsBias=0),y(e,t+n.charStrings)),o=(r.nGlyphs=a.objects.length,function(e,t,r,o){var n=new R.Parser(e,t),s=(--r,[".notdef"]);if(0===(e=n.parseCard8()))for(var i=0;i<r;i+=1)a=n.parseSID(),s.push(De(o,a));else if(1===e)for(;s.length<=r;)for(var a=n.parseSID(),l=n.parseCard8(),u=0;u<=l;u+=1)s.push(De(o,a)),a+=1;else{if(2!==e)throw new Error("Unknown charset format "+e);for(;s.length<=r;){a=n.parseSID(),l=n.parseCard16();for(var c=0;c<=l;c+=1)s.push(De(o,a)),a+=1}}return s}(e,t+n.charset,r.nGlyphs,s.objects));0===n.encoding?r.cffEncoding=new Ce(Te,o):1===n.encoding?r.cffEncoding=new Ce(Me,o):r.cffEncoding=function(e,t,r){var o={},n=new R.Parser(e,t);if(0===(e=n.parseCard8()))for(var s=n.parseCard8(),i=0;i<s;i+=1)o[l=n.parseCard8()]=i;else{if(1!==e)throw new Error("Unknown encoding format "+e);for(var a=n.parseCard8(),l=1,u=0;u<a;u+=1)for(var c=n.parseCard8(),d=n.parseCard8(),h=c;h<=c+d;h+=1)o[h]=l,l+=1}return new Ce(o,r)}(e,t+n.encoding,o),r.encoding=r.encoding||r.cffEncoding,r.glyphs=new p.GlyphSet(r);for(var l=0;l<r.nGlyphs;l+=1){var u=a.objects[l];r.glyphs.push(l,p.cffGlyphLoader(r,l,Ve,u))}},make:function(e,t){for(var r,o=new S.Table("CFF ",[{name:"header",type:"RECORD"},{name:"nameIndex",type:"RECORD"},{name:"topDictIndex",type:"RECORD"},{name:"stringIndex",type:"RECORD"},{name:"globalSubrIndex",type:"RECORD"},{name:"charsets",type:"RECORD"},{name:"charStringsIndex",type:"RECORD"},{name:"privateDict",type:"RECORD"}]),n=1/t.unitsPerEm,n={version:t.version,fullName:t.fullName,familyName:t.familyName,weight:t.weightName,fontBBox:t.fontBBox||[0,0,0,0],fontMatrix:[n,0,0,n,0,0],charset:999,encoding:0,charStrings:999,private:[0,999]},s=[],i=1;i<e.length;i+=1)r=e.get(i),s.push(r.name);var a,l,u=[],t=(o.header=new S.Record("Header",[{name:"major",type:"Card8",value:1},{name:"minor",type:"Card8",value:0},{name:"hdrSize",type:"Card8",value:4},{name:"major",type:"Card8",value:1}]),o.nameIndex=function(e){var t=new S.Record("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);t.names=[];for(var r=0;r<e.length;r+=1)t.names.push({name:"name_"+r,type:"NAME",value:e[r]});return t}([t.postScriptName]),We(n,u)),c=(o.topDictIndex=qe(t),o.globalSubrIndex=new S.Record("Global Subr INDEX",[{name:"subrs",type:"INDEX",value:[]}]),o.charsets=function(e,t){for(var r=new S.Record("Charsets",[{name:"format",type:"Card8",value:0}]),o=0;o<e.length;o+=1){var n=ze(e[o],t);r.fields.push({name:"glyph_"+o,type:"SID",value:n})}return r}(s,u),o.charStringsIndex=Xe(e),o.privateDict=(c={},a=u,(l=new S.Record("Private DICT",[{name:"dict",type:"DICT",value:{}}])).dict=He(Ne,c,a),l),o.stringIndex=function(e){var t=new S.Record("String INDEX",[{name:"strings",type:"INDEX",value:[]}]);t.strings=[];for(var r=0;r<e.length;r+=1)t.strings.push({name:"string_"+r,type:"STRING",value:e[r]});return t}(u),o.header.sizeOf()+o.nameIndex.sizeOf()+o.topDictIndex.sizeOf()+o.stringIndex.sizeOf()+o.globalSubrIndex.sizeOf());return n.charset=c,n.encoding=0,n.charStrings=n.charset+o.charsets.sizeOf(),n.private[1]=n.charStrings+o.charStringsIndex.sizeOf(),t=We(n,u),o.topDictIndex=qe(t),o}};var Ze={parse:function(e,t){var r={},e=new R.Parser(e,t);return r.version=e.parseVersion(),r.fontRevision=Math.round(1e3*e.parseFixed())/1e3,r.checkSumAdjustment=e.parseULong(),r.magicNumber=e.parseULong(),L.argument(1594834165===r.magicNumber,"Font header has wrong magic number."),r.flags=e.parseUShort(),r.unitsPerEm=e.parseUShort(),r.created=e.parseLongDateTime(),r.modified=e.parseLongDateTime(),r.xMin=e.parseShort(),r.yMin=e.parseShort(),r.xMax=e.parseShort(),r.yMax=e.parseShort(),r.macStyle=e.parseUShort(),r.lowestRecPPEM=e.parseUShort(),r.fontDirectionHint=e.parseShort(),r.indexToLocFormat=e.parseShort(),r.glyphDataFormat=e.parseShort(),r},make:function(e){var t=Math.round((new Date).getTime()/1e3)+2082844800,r=t;return e.createdTimestamp&&(r=e.createdTimestamp+2082844800),new S.Table("head",[{name:"version",type:"FIXED",value:65536},{name:"fontRevision",type:"FIXED",value:65536},{name:"checkSumAdjustment",type:"ULONG",value:0},{name:"magicNumber",type:"ULONG",value:1594834165},{name:"flags",type:"USHORT",value:0},{name:"unitsPerEm",type:"USHORT",value:1e3},{name:"created",type:"LONGDATETIME",value:r},{name:"modified",type:"LONGDATETIME",value:t},{name:"xMin",type:"SHORT",value:0},{name:"yMin",type:"SHORT",value:0},{name:"xMax",type:"SHORT",value:0},{name:"yMax",type:"SHORT",value:0},{name:"macStyle",type:"USHORT",value:0},{name:"lowestRecPPEM",type:"USHORT",value:0},{name:"fontDirectionHint",type:"SHORT",value:2},{name:"indexToLocFormat",type:"SHORT",value:0},{name:"glyphDataFormat",type:"SHORT",value:0}],e)}};var Qe={parse:function(e,t){var r={},e=new R.Parser(e,t);return r.version=e.parseVersion(),r.ascender=e.parseShort(),r.descender=e.parseShort(),r.lineGap=e.parseShort(),r.advanceWidthMax=e.parseUShort(),r.minLeftSideBearing=e.parseShort(),r.minRightSideBearing=e.parseShort(),r.xMaxExtent=e.parseShort(),r.caretSlopeRise=e.parseShort(),r.caretSlopeRun=e.parseShort(),r.caretOffset=e.parseShort(),e.relativeOffset+=8,r.metricDataFormat=e.parseShort(),r.numberOfHMetrics=e.parseUShort(),r},make:function(e){return new S.Table("hhea",[{name:"version",type:"FIXED",value:65536},{name:"ascender",type:"FWORD",value:0},{name:"descender",type:"FWORD",value:0},{name:"lineGap",type:"FWORD",value:0},{name:"advanceWidthMax",type:"UFWORD",value:0},{name:"minLeftSideBearing",type:"FWORD",value:0},{name:"minRightSideBearing",type:"FWORD",value:0},{name:"xMaxExtent",type:"FWORD",value:0},{name:"caretSlopeRise",type:"SHORT",value:1},{name:"caretSlopeRun",type:"SHORT",value:0},{name:"caretOffset",type:"SHORT",value:0},{name:"reserved1",type:"SHORT",value:0},{name:"reserved2",type:"SHORT",value:0},{name:"reserved3",type:"SHORT",value:0},{name:"reserved4",type:"SHORT",value:0},{name:"metricDataFormat",type:"SHORT",value:0},{name:"numberOfHMetrics",type:"USHORT",value:0}],e)}};var Je={parse:function(e,t,r,o,n){for(var s,i,a=new R.Parser(e,t),l=0;l<o;l+=1){l<r&&(s=a.parseUShort(),i=a.parseShort());var u=n.get(l);u.advanceWidth=s,u.leftSideBearing=i}},make:function(e){for(var t=new S.Table("hmtx",[]),r=0;r<e.length;r+=1){var o=e.get(r),n=o.advanceWidth||0,o=o.leftSideBearing||0;t.fields.push({name:"advanceWidth_"+r,type:"USHORT",value:n}),t.fields.push({name:"leftSideBearing_"+r,type:"SHORT",value:o})}return t}};var Ke={make:function(e){for(var t=new S.Table("ltag",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"numTags",type:"ULONG",value:e.length}]),r="",o=12+4*e.length,n=0;n<e.length;++n){var s=r.indexOf(e[n]);s<0&&(s=r.length,r+=e[n]),t.fields.push({name:"offset "+n,type:"USHORT",value:o+s}),t.fields.push({name:"length "+n,type:"USHORT",value:e[n].length})}return t.fields.push({name:"stringPool",type:"CHARARRAY",value:r}),t},parse:function(e,t){for(var r=new R.Parser(e,t),o=r.parseULong(),n=(L.argument(1===o,"Unsupported ltag table version."),r.skip("uLong",1),r.parseULong()),s=[],i=0;i<n;i++){for(var a="",l=t+r.parseUShort(),u=r.parseUShort(),c=l;c<l+u;++c)a+=String.fromCharCode(e.getInt8(c));s.push(a)}return s}};var $e={parse:function(e,t){var r={},e=new R.Parser(e,t);return r.version=e.parseVersion(),r.numGlyphs=e.parseUShort(),1===r.version&&(r.maxPoints=e.parseUShort(),r.maxContours=e.parseUShort(),r.maxCompositePoints=e.parseUShort(),r.maxCompositeContours=e.parseUShort(),r.maxZones=e.parseUShort(),r.maxTwilightPoints=e.parseUShort(),r.maxStorage=e.parseUShort(),r.maxFunctionDefs=e.parseUShort(),r.maxInstructionDefs=e.parseUShort(),r.maxStackElements=e.parseUShort(),r.maxSizeOfInstructions=e.parseUShort(),r.maxComponentElements=e.parseUShort(),r.maxComponentDepth=e.parseUShort()),r},make:function(e){return new S.Table("maxp",[{name:"version",type:"FIXED",value:20480},{name:"numGlyphs",type:"USHORT",value:e}])}},et=["copyright","fontFamily","fontSubfamily","uniqueID","fullName","version","postScriptName","trademark","manufacturer","designer","description","manufacturerURL","designerURL","license","licenseURL","reserved","preferredFamily","preferredSubfamily","compatibleFullName","sampleText","postScriptFindFontName","wwsFamily","wwsSubfamily"],tt={0:"en",1:"fr",2:"de",3:"it",4:"nl",5:"sv",6:"es",7:"da",8:"pt",9:"no",10:"he",11:"ja",12:"ar",13:"fi",14:"el",15:"is",16:"mt",17:"tr",18:"hr",19:"zh-Hant",20:"ur",21:"hi",22:"th",23:"ko",24:"lt",25:"pl",26:"hu",27:"es",28:"lv",29:"se",30:"fo",31:"fa",32:"ru",33:"zh",34:"nl-BE",35:"ga",36:"sq",37:"ro",38:"cz",39:"sk",40:"si",41:"yi",42:"sr",43:"mk",44:"bg",45:"uk",46:"be",47:"uz",48:"kk",49:"az-Cyrl",50:"az-Arab",51:"hy",52:"ka",53:"mo",54:"ky",55:"tg",56:"tk",57:"mn-CN",58:"mn",59:"ps",60:"ks",61:"ku",62:"sd",63:"bo",64:"ne",65:"sa",66:"mr",67:"bn",68:"as",69:"gu",70:"pa",71:"or",72:"ml",73:"kn",74:"ta",75:"te",76:"si",77:"my",78:"km",79:"lo",80:"vi",81:"id",82:"tl",83:"ms",84:"ms-Arab",85:"am",86:"ti",87:"om",88:"so",89:"sw",90:"rw",91:"rn",92:"ny",93:"mg",94:"eo",128:"cy",129:"eu",130:"ca",131:"la",132:"qu",133:"gn",134:"ay",135:"tt",136:"ug",137:"dz",138:"jv",139:"su",140:"gl",141:"af",142:"br",143:"iu",144:"gd",145:"gv",146:"ga",147:"to",148:"el-polyton",149:"kl",150:"az",151:"nn"},rt={0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:5,11:1,12:4,13:0,14:6,15:0,16:0,17:0,18:0,19:2,20:4,21:9,22:21,23:3,24:29,25:29,26:29,27:29,28:29,29:0,30:0,31:4,32:7,33:25,34:0,35:0,36:0,37:0,38:29,39:29,40:0,41:5,42:7,43:7,44:7,45:7,46:7,47:7,48:7,49:7,50:4,51:24,52:23,53:7,54:7,55:7,56:7,57:27,58:7,59:4,60:4,61:4,62:4,63:26,64:9,65:9,66:9,67:13,68:13,69:11,70:10,71:12,72:17,73:16,74:14,75:15,76:18,77:19,78:20,79:22,80:30,81:0,82:0,83:0,84:4,85:28,86:28,87:28,88:0,89:0,90:0,91:0,92:0,93:0,94:0,128:0,129:0,130:0,131:0,132:0,133:0,134:0,135:7,136:4,137:26,138:0,139:0,140:0,141:0,142:0,143:28,144:0,145:0,146:0,147:0,148:6,149:0,150:0,151:0},ot={1078:"af",1052:"sq",1156:"gsw",1118:"am",5121:"ar-DZ",15361:"ar-BH",3073:"ar",2049:"ar-IQ",11265:"ar-JO",13313:"ar-KW",12289:"ar-LB",4097:"ar-LY",6145:"ary",8193:"ar-OM",16385:"ar-QA",1025:"ar-SA",10241:"ar-SY",7169:"aeb",14337:"ar-AE",9217:"ar-YE",1067:"hy",1101:"as",2092:"az-Cyrl",1068:"az",1133:"ba",1069:"eu",1059:"be",2117:"bn",1093:"bn-IN",8218:"bs-Cyrl",5146:"bs",1150:"br",1026:"bg",1027:"ca",3076:"zh-HK",5124:"zh-MO",2052:"zh",4100:"zh-SG",1028:"zh-TW",1155:"co",1050:"hr",4122:"hr-BA",1029:"cs",1030:"da",1164:"prs",1125:"dv",2067:"nl-BE",1043:"nl",3081:"en-AU",10249:"en-BZ",4105:"en-CA",9225:"en-029",16393:"en-IN",6153:"en-IE",8201:"en-JM",17417:"en-MY",5129:"en-NZ",13321:"en-PH",18441:"en-SG",7177:"en-ZA",11273:"en-TT",2057:"en-GB",1033:"en",12297:"en-ZW",1061:"et",1080:"fo",1124:"fil",1035:"fi",2060:"fr-BE",3084:"fr-CA",1036:"fr",5132:"fr-LU",6156:"fr-MC",4108:"fr-CH",1122:"fy",1110:"gl",1079:"ka",3079:"de-AT",1031:"de",5127:"de-LI",4103:"de-LU",2055:"de-CH",1032:"el",1135:"kl",1095:"gu",1128:"ha",1037:"he",1081:"hi",1038:"hu",1039:"is",1136:"ig",1057:"id",1117:"iu",2141:"iu-Latn",2108:"ga",1076:"xh",1077:"zu",1040:"it",2064:"it-CH",1041:"ja",1099:"kn",1087:"kk",1107:"km",1158:"quc",1159:"rw",1089:"sw",1111:"kok",1042:"ko",1088:"ky",1108:"lo",1062:"lv",1063:"lt",2094:"dsb",1134:"lb",1071:"mk",2110:"ms-BN",1086:"ms",1100:"ml",1082:"mt",1153:"mi",1146:"arn",1102:"mr",1148:"moh",1104:"mn",2128:"mn-CN",1121:"ne",1044:"nb",2068:"nn",1154:"oc",1096:"or",1123:"ps",1045:"pl",1046:"pt",2070:"pt-PT",1094:"pa",1131:"qu-BO",2155:"qu-EC",3179:"qu",1048:"ro",1047:"rm",1049:"ru",9275:"smn",4155:"smj-NO",5179:"smj",3131:"se-FI",1083:"se",2107:"se-SE",8251:"sms",6203:"sma-NO",7227:"sms",1103:"sa",7194:"sr-Cyrl-BA",3098:"sr",6170:"sr-Latn-BA",2074:"sr-Latn",1132:"nso",1074:"tn",1115:"si",1051:"sk",1060:"sl",11274:"es-AR",16394:"es-BO",13322:"es-CL",9226:"es-CO",5130:"es-CR",7178:"es-DO",12298:"es-EC",17418:"es-SV",4106:"es-GT",18442:"es-HN",2058:"es-MX",19466:"es-NI",6154:"es-PA",15370:"es-PY",10250:"es-PE",20490:"es-PR",3082:"es",1034:"es",21514:"es-US",14346:"es-UY",8202:"es-VE",2077:"sv-FI",1053:"sv",1114:"syr",1064:"tg",2143:"tzm",1097:"ta",1092:"tt",1098:"te",1054:"th",1105:"bo",1055:"tr",1090:"tk",1152:"ug",1058:"uk",1070:"hsb",1056:"ur",2115:"uz-Cyrl",1091:"uz",1066:"vi",1106:"cy",1160:"wo",1157:"sah",1144:"ii",1130:"yo"};var nt="utf-16",st={0:"macintosh",1:"x-mac-japanese",2:"x-mac-chinesetrad",3:"x-mac-korean",6:"x-mac-greek",7:"x-mac-cyrillic",9:"x-mac-devanagai",10:"x-mac-gurmukhi",11:"x-mac-gujarati",12:"x-mac-oriya",13:"x-mac-bengali",14:"x-mac-tamil",15:"x-mac-telugu",16:"x-mac-kannada",17:"x-mac-malayalam",18:"x-mac-sinhalese",19:"x-mac-burmese",20:"x-mac-khmer",21:"x-mac-thai",22:"x-mac-lao",23:"x-mac-georgian",24:"x-mac-armenian",25:"x-mac-chinesesimp",26:"x-mac-tibetan",27:"x-mac-mongolian",28:"x-mac-ethiopic",29:"x-mac-ce",30:"x-mac-vietnamese",31:"x-mac-extarabic"},it={15:"x-mac-icelandic",17:"x-mac-turkish",18:"x-mac-croatian",24:"x-mac-ce",25:"x-mac-ce",26:"x-mac-ce",27:"x-mac-ce",28:"x-mac-ce",30:"x-mac-icelandic",37:"x-mac-romanian",38:"x-mac-ce",39:"x-mac-ce",40:"x-mac-ce",143:"x-mac-inuit",146:"x-mac-gaelic"};function at(e,t,r){switch(e){case 0:return nt;case 1:return it[r]||st[t];case 3:if(1===t||10===t)return nt}}function lt(e){var t,r={};for(t in e)r[e[t]]=parseInt(t);return r}function ut(e,t,r,o,n,s){return new S.Record("NameRecord",[{name:"platformID",type:"USHORT",value:e},{name:"encodingID",type:"USHORT",value:t},{name:"languageID",type:"USHORT",value:r},{name:"nameID",type:"USHORT",value:o},{name:"length",type:"USHORT",value:n},{name:"offset",type:"USHORT",value:s}])}function ct(e,t){if((r=function(e,t){var r=e.length,o=t.length-r+1;e:for(var n=0;n<o;n++)for(;n<o;n++){for(var s=0;s<r;s++)if(t[n+s]!==e[s])continue e;return n}return-1}(e,t))<0)for(var r=t.length,o=0,n=e.length;o<n;++o)t.push(e[o]);return r}var dt={parse:function(e,t,r){for(var o={},n=new R.Parser(e,t),t=n.parseUShort(),s=n.parseUShort(),i=n.offset+n.parseUShort(),a=0;a<s;a++){var l=n.parseUShort(),u=n.parseUShort(),c=n.parseUShort(),d=n.parseUShort(),d=et[d]||d,h=n.parseUShort(),f=n.parseUShort(),p=function(e,t,r){switch(e){case 0:if(65535===t)return"und";if(r)return r[t];break;case 1:return tt[t];case 3:return ot[t]}}(l,c,r),l=at(l,u,c);void 0!==l&&void 0!==p&&(u=void 0,(u=l===nt?m.UTF16(e,i+f,h):m.MACSTRING(e,i+f,h,l))&&((c=void 0===(c=o[d])?o[d]={}:c)[p]=u))}return 1===t&&n.parseUShort(),o},make:function(e,t){var r,o=[],n={},s=lt(et);for(r in e){var i=s[r];if(void 0===i&&(i=r),h=parseInt(i),isNaN(h))throw new Error('Name table entry "'+r+'" does not exist, see nameTableNames for complete list.');n[h]=e[r],o.push(h)}for(var a=lt(tt),l=lt(ot),u=[],c=[],d=0;d<o.length;d++){var h,f,p=n[h=o[d]];for(f in p){var m=p[f],y=1,g=a[f],v=rt[g],b=at(y,v,g),b=w.MACSTRING(m,b),j=(void 0===b&&(y=0,(g=t.indexOf(f))<0&&(g=t.length,t.push(f)),v=4,b=w.UTF16(m)),ct(b,c)),y=(u.push(ut(y,v,g,h,b.length,j)),l[f]);void 0!==y&&(g=ct(v=w.UTF16(m),c),u.push(ut(3,1,y,h,v.length,g)))}}u.sort(function(e,t){return e.platformID-t.platformID||e.encodingID-t.encodingID||e.languageID-t.languageID||e.nameID-t.nameID});for(var _=new S.Table("name",[{name:"format",type:"USHORT",value:0},{name:"count",type:"USHORT",value:u.length},{name:"stringOffset",type:"USHORT",value:6+12*u.length}]),x=0;x<u.length;x++)_.fields.push({name:"record_"+x,type:"RECORD",value:u[x]});return _.fields.push({name:"strings",type:"LITERAL",value:c}),_}},ht=[{begin:0,end:127},{begin:128,end:255},{begin:256,end:383},{begin:384,end:591},{begin:592,end:687},{begin:688,end:767},{begin:768,end:879},{begin:880,end:1023},{begin:11392,end:11519},{begin:1024,end:1279},{begin:1328,end:1423},{begin:1424,end:1535},{begin:42240,end:42559},{begin:1536,end:1791},{begin:1984,end:2047},{begin:2304,end:2431},{begin:2432,end:2559},{begin:2560,end:2687},{begin:2688,end:2815},{begin:2816,end:2943},{begin:2944,end:3071},{begin:3072,end:3199},{begin:3200,end:3327},{begin:3328,end:3455},{begin:3584,end:3711},{begin:3712,end:3839},{begin:4256,end:4351},{begin:6912,end:7039},{begin:4352,end:4607},{begin:7680,end:7935},{begin:7936,end:8191},{begin:8192,end:8303},{begin:8304,end:8351},{begin:8352,end:8399},{begin:8400,end:8447},{begin:8448,end:8527},{begin:8528,end:8591},{begin:8592,end:8703},{begin:8704,end:8959},{begin:8960,end:9215},{begin:9216,end:9279},{begin:9280,end:9311},{begin:9312,end:9471},{begin:9472,end:9599},{begin:9600,end:9631},{begin:9632,end:9727},{begin:9728,end:9983},{begin:9984,end:10175},{begin:12288,end:12351},{begin:12352,end:12447},{begin:12448,end:12543},{begin:12544,end:12591},{begin:12592,end:12687},{begin:43072,end:43135},{begin:12800,end:13055},{begin:13056,end:13311},{begin:44032,end:55215},{begin:55296,end:57343},{begin:67840,end:67871},{begin:19968,end:40959},{begin:57344,end:63743},{begin:12736,end:12783},{begin:64256,end:64335},{begin:64336,end:65023},{begin:65056,end:65071},{begin:65040,end:65055},{begin:65104,end:65135},{begin:65136,end:65279},{begin:65280,end:65519},{begin:65520,end:65535},{begin:3840,end:4095},{begin:1792,end:1871},{begin:1920,end:1983},{begin:3456,end:3583},{begin:4096,end:4255},{begin:4608,end:4991},{begin:5024,end:5119},{begin:5120,end:5759},{begin:5760,end:5791},{begin:5792,end:5887},{begin:6016,end:6143},{begin:6144,end:6319},{begin:10240,end:10495},{begin:40960,end:42127},{begin:5888,end:5919},{begin:66304,end:66351},{begin:66352,end:66383},{begin:66560,end:66639},{begin:118784,end:119039},{begin:119808,end:120831},{begin:1044480,end:1048573},{begin:65024,end:65039},{begin:917504,end:917631},{begin:6400,end:6479},{begin:6480,end:6527},{begin:6528,end:6623},{begin:6656,end:6687},{begin:11264,end:11359},{begin:11568,end:11647},{begin:19904,end:19967},{begin:43008,end:43055},{begin:65536,end:65663},{begin:65856,end:65935},{begin:66432,end:66463},{begin:66464,end:66527},{begin:66640,end:66687},{begin:66688,end:66735},{begin:67584,end:67647},{begin:68096,end:68191},{begin:119552,end:119647},{begin:73728,end:74751},{begin:119648,end:119679},{begin:7040,end:7103},{begin:7168,end:7247},{begin:7248,end:7295},{begin:43136,end:43231},{begin:43264,end:43311},{begin:43312,end:43359},{begin:43520,end:43615},{begin:65936,end:65999},{begin:66e3,end:66047},{begin:66208,end:66271},{begin:127024,end:127135}];var ft={parse:function(e,t){var r={},o=new R.Parser(e,t);r.version=o.parseUShort(),r.xAvgCharWidth=o.parseShort(),r.usWeightClass=o.parseUShort(),r.usWidthClass=o.parseUShort(),r.fsType=o.parseUShort(),r.ySubscriptXSize=o.parseShort(),r.ySubscriptYSize=o.parseShort(),r.ySubscriptXOffset=o.parseShort(),r.ySubscriptYOffset=o.parseShort(),r.ySuperscriptXSize=o.parseShort(),r.ySuperscriptYSize=o.parseShort(),r.ySuperscriptXOffset=o.parseShort(),r.ySuperscriptYOffset=o.parseShort(),r.yStrikeoutSize=o.parseShort(),r.yStrikeoutPosition=o.parseShort(),r.sFamilyClass=o.parseShort(),r.panose=[];for(var n=0;n<10;n++)r.panose[n]=o.parseByte();return r.ulUnicodeRange1=o.parseULong(),r.ulUnicodeRange2=o.parseULong(),r.ulUnicodeRange3=o.parseULong(),r.ulUnicodeRange4=o.parseULong(),r.achVendID=String.fromCharCode(o.parseByte(),o.parseByte(),o.parseByte(),o.parseByte()),r.fsSelection=o.parseUShort(),r.usFirstCharIndex=o.parseUShort(),r.usLastCharIndex=o.parseUShort(),r.sTypoAscender=o.parseShort(),r.sTypoDescender=o.parseShort(),r.sTypoLineGap=o.parseShort(),r.usWinAscent=o.parseUShort(),r.usWinDescent=o.parseUShort(),1<=r.version&&(r.ulCodePageRange1=o.parseULong(),r.ulCodePageRange2=o.parseULong()),2<=r.version&&(r.sxHeight=o.parseShort(),r.sCapHeight=o.parseShort(),r.usDefaultChar=o.parseUShort(),r.usBreakChar=o.parseUShort(),r.usMaxContent=o.parseUShort()),r},make:function(e){return new S.Table("OS/2",[{name:"version",type:"USHORT",value:3},{name:"xAvgCharWidth",type:"SHORT",value:0},{name:"usWeightClass",type:"USHORT",value:0},{name:"usWidthClass",type:"USHORT",value:0},{name:"fsType",type:"USHORT",value:0},{name:"ySubscriptXSize",type:"SHORT",value:650},{name:"ySubscriptYSize",type:"SHORT",value:699},{name:"ySubscriptXOffset",type:"SHORT",value:0},{name:"ySubscriptYOffset",type:"SHORT",value:140},{name:"ySuperscriptXSize",type:"SHORT",value:650},{name:"ySuperscriptYSize",type:"SHORT",value:699},{name:"ySuperscriptXOffset",type:"SHORT",value:0},{name:"ySuperscriptYOffset",type:"SHORT",value:479},{name:"yStrikeoutSize",type:"SHORT",value:49},{name:"yStrikeoutPosition",type:"SHORT",value:258},{name:"sFamilyClass",type:"SHORT",value:0},{name:"bFamilyType",type:"BYTE",value:0},{name:"bSerifStyle",type:"BYTE",value:0},{name:"bWeight",type:"BYTE",value:0},{name:"bProportion",type:"BYTE",value:0},{name:"bContrast",type:"BYTE",value:0},{name:"bStrokeVariation",type:"BYTE",value:0},{name:"bArmStyle",type:"BYTE",value:0},{name:"bLetterform",type:"BYTE",value:0},{name:"bMidline",type:"BYTE",value:0},{name:"bXHeight",type:"BYTE",value:0},{name:"ulUnicodeRange1",type:"ULONG",value:0},{name:"ulUnicodeRange2",type:"ULONG",value:0},{name:"ulUnicodeRange3",type:"ULONG",value:0},{name:"ulUnicodeRange4",type:"ULONG",value:0},{name:"achVendID",type:"CHARARRAY",value:"XXXX"},{name:"fsSelection",type:"USHORT",value:0},{name:"usFirstCharIndex",type:"USHORT",value:0},{name:"usLastCharIndex",type:"USHORT",value:0},{name:"sTypoAscender",type:"SHORT",value:0},{name:"sTypoDescender",type:"SHORT",value:0},{name:"sTypoLineGap",type:"SHORT",value:0},{name:"usWinAscent",type:"USHORT",value:0},{name:"usWinDescent",type:"USHORT",value:0},{name:"ulCodePageRange1",type:"ULONG",value:0},{name:"ulCodePageRange2",type:"ULONG",value:0},{name:"sxHeight",type:"SHORT",value:0},{name:"sCapHeight",type:"SHORT",value:0},{name:"usDefaultChar",type:"USHORT",value:0},{name:"usBreakChar",type:"USHORT",value:0},{name:"usMaxContext",type:"USHORT",value:0}],e)},unicodeRanges:ht,getUnicodeRange:function(e){for(var t=0;t<ht.length;t+=1){var r=ht[t];if(e>=r.begin&&e<r.end)return t}return-1}};var pt={parse:function(e,t){var r={},o=new R.Parser(e,t);switch(r.version=o.parseVersion(),r.italicAngle=o.parseFixed(),r.underlinePosition=o.parseShort(),r.underlineThickness=o.parseShort(),r.isFixedPitch=o.parseULong(),r.minMemType42=o.parseULong(),r.maxMemType42=o.parseULong(),r.minMemType1=o.parseULong(),r.maxMemType1=o.parseULong(),r.version){case 1:r.names=c.slice();break;case 2:r.numberOfGlyphs=o.parseUShort(),r.glyphNameIndex=new Array(r.numberOfGlyphs);for(var n=0;n<r.numberOfGlyphs;n++)r.glyphNameIndex[n]=o.parseUShort();r.names=[];for(var s,i=0;i<r.numberOfGlyphs;i++)r.glyphNameIndex[i]>=c.length&&(s=o.parseChar(),r.names.push(o.parseString(s)));break;case 2.5:r.numberOfGlyphs=o.parseUShort(),r.offset=new Array(r.numberOfGlyphs);for(var a=0;a<r.numberOfGlyphs;a++)r.offset[a]=o.parseChar()}return r},make:function(){return new S.Table("post",[{name:"version",type:"FIXED",value:196608},{name:"italicAngle",type:"FIXED",value:0},{name:"underlinePosition",type:"FWORD",value:0},{name:"underlineThickness",type:"FWORD",value:0},{name:"isFixedPitch",type:"ULONG",value:0},{name:"minMemType42",type:"ULONG",value:0},{name:"maxMemType42",type:"ULONG",value:0},{name:"minMemType1",type:"ULONG",value:0},{name:"maxMemType1",type:"ULONG",value:0}])}},o=new Array(9),s=(o[1]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{substFormat:1,coverage:this.parsePointer(u.coverage),deltaGlyphId:this.parseUShort()}:2===t?{substFormat:2,coverage:this.parsePointer(u.coverage),substitute:this.parseOffset16List()}:void L.assert(!1,"0x"+e.toString(16)+": lookup type 1 format must be 1 or 2.")},o[2]=function(){var e=this.parseUShort();return L.argument(1===e,"GSUB Multiple Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(u.coverage),sequences:this.parseListOfLists()}},o[3]=function(){var e=this.parseUShort();return L.argument(1===e,"GSUB Alternate Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(u.coverage),alternateSets:this.parseListOfLists()}},o[4]=function(){var e=this.parseUShort();return L.argument(1===e,"GSUB ligature table identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(u.coverage),ligatureSets:this.parseListOfLists(function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}})}},{sequenceIndex:u.uShort,lookupListIndex:u.uShort});o[5]=function(){var e,t,r=this.offset+this.relativeOffset,o=this.parseUShort();return 1===o?{substFormat:o,coverage:this.parsePointer(u.coverage),ruleSets:this.parseListOfLists(function(){var e=this.parseUShort(),t=this.parseUShort();return{input:this.parseUShortList(e-1),lookupRecords:this.parseRecordList(t,s)}})}:2===o?{substFormat:o,coverage:this.parsePointer(u.coverage),classDef:this.parsePointer(u.classDef),classSets:this.parseListOfLists(function(){var e=this.parseUShort(),t=this.parseUShort();return{classes:this.parseUShortList(e-1),lookupRecords:this.parseRecordList(t,s)}})}:3===o?(e=this.parseUShort(),t=this.parseUShort(),{substFormat:o,coverages:this.parseList(e,u.pointer(u.coverage)),lookupRecords:this.parseRecordList(t,s)}):void L.assert(!1,"0x"+r.toString(16)+": lookup type 5 format must be 1, 2 or 3.")},o[6]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{substFormat:1,coverage:this.parsePointer(u.coverage),chainRuleSets:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(s)}})}:2===t?{substFormat:2,coverage:this.parsePointer(u.coverage),backtrackClassDef:this.parsePointer(u.classDef),inputClassDef:this.parsePointer(u.classDef),lookaheadClassDef:this.parsePointer(u.classDef),chainClassSet:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(s)}})}:3===t?{substFormat:3,backtrackCoverage:this.parseList(u.pointer(u.coverage)),inputCoverage:this.parseList(u.pointer(u.coverage)),lookaheadCoverage:this.parseList(u.pointer(u.coverage)),lookupRecords:this.parseRecordList(s)}:void L.assert(!1,"0x"+e.toString(16)+": lookup type 6 format must be 1, 2 or 3.")},o[7]=function(){var e=this.parseUShort(),e=(L.argument(1===e,"GSUB Extension Substitution subtable identifier-format must be 1"),this.parseUShort()),t=new u(this.data,this.offset+this.parseULong());return{substFormat:1,lookupType:e,extension:o[e].call(t)}},o[8]=function(){var e=this.parseUShort();return L.argument(1===e,"GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(u.coverage),backtrackCoverage:this.parseList(u.pointer(u.coverage)),lookaheadCoverage:this.parseList(u.pointer(u.coverage)),substitutes:this.parseUShortList()}};var mt=new Array(9);mt[1]=function(e){return 1===e.substFormat?new S.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new S.Coverage(e.coverage)},{name:"deltaGlyphID",type:"USHORT",value:e.deltaGlyphId}]):new S.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:2},{name:"coverage",type:"TABLE",value:new S.Coverage(e.coverage)}].concat(S.ushortList("substitute",e.substitute)))},mt[3]=function(e){return L.assert(1===e.substFormat,"Lookup type 3 substFormat must be 1."),new S.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new S.Coverage(e.coverage)}].concat(S.tableList("altSet",e.alternateSets,function(e){return new S.Table("alternateSetTable",S.ushortList("alternate",e))})))},mt[4]=function(e){return L.assert(1===e.substFormat,"Lookup type 4 substFormat must be 1."),new S.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new S.Coverage(e.coverage)}].concat(S.tableList("ligSet",e.ligatureSets,function(e){return new S.Table("ligatureSetTable",S.tableList("ligature",e,function(e){return new S.Table("ligatureTable",[{name:"ligGlyph",type:"USHORT",value:e.ligGlyph}].concat(S.ushortList("component",e.components,e.components.length+1)))}))})))};var yt={parse:function(e,t){return t=(e=new u(e,t=t||0)).parseVersion(1),L.argument(1===t||1.1===t,"Unsupported GSUB table version."),1===t?{version:t,scripts:e.parseScriptList(),features:e.parseFeatureList(),lookups:e.parseLookupList(o)}:{version:t,scripts:e.parseScriptList(),features:e.parseFeatureList(),lookups:e.parseLookupList(o),variations:e.parseFeatureVariationsList()}},make:function(e){return new S.Table("GSUB",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new S.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new S.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new S.LookupList(e.lookups,mt)}])}};var gt={parse:function(e,t){for(var r=new R.Parser(e,t),o=r.parseULong(),n=(L.argument(1===o,"Unsupported META table version."),r.parseULong(),r.parseULong(),r.parseULong()),s={},i=0;i<n;i++){var a=r.parseTag(),l=r.parseULong(),u=r.parseULong(),l=m.UTF8(e,t+l,u);s[a]=l}return s},make:function(e){var t,r=Object.keys(e).length,o="",n=16+12*r,s=new S.Table("meta",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"offset",type:"ULONG",value:n},{name:"numTags",type:"ULONG",value:r}]);for(t in e){var i=o.length;o+=e[t],s.fields.push({name:"tag "+t,type:"TAG",value:t}),s.fields.push({name:"offset "+t,type:"ULONG",value:n+i}),s.fields.push({name:"length "+t,type:"ULONG",value:e[t].length})}return s.fields.push({name:"stringPool",type:"CHARARRAY",value:o}),s}};function vt(e){return Math.log(e)/Math.log(2)|0}function bt(e){for(;e.length%4!=0;)e.push(0);for(var t=0,r=0;r<e.length;r+=4)t+=(e[r]<<24)+(e[r+1]<<16)+(e[r+2]<<8)+e[r+3];return t%=Math.pow(2,32)}function jt(e,t,r,o){return new S.Record("Table Record",[{name:"tag",type:"TAG",value:void 0!==e?e:""},{name:"checkSum",type:"ULONG",value:void 0!==t?t:0},{name:"offset",type:"ULONG",value:void 0!==r?r:0},{name:"length",type:"ULONG",value:void 0!==o?o:0}])}function _t(e){for(var t=new S.Table("sfnt",[{name:"version",type:"TAG",value:"OTTO"},{name:"numTables",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]),r=(t.tables=e,t.numTables=e.length,Math.pow(2,vt(t.numTables))),o=(t.searchRange=16*r,t.entrySelector=vt(r),t.rangeShift=16*t.numTables-t.searchRange,[]),n=[],s=t.sizeOf()+jt().sizeOf()*t.numTables;s%4!=0;)s+=1,n.push({name:"padding",type:"BYTE",value:0});for(var i=0;i<e.length;i+=1){var a=e[i],l=(L.argument(4===a.tableName.length,"Table name"+a.tableName+" is invalid."),a.sizeOf()),u=jt(a.tableName,bt(a.encode()),s,l);for(o.push({name:u.tag+" Table Record",type:"RECORD",value:u}),n.push({name:a.tableName+" table",type:"RECORD",value:a}),s+=l,L.argument(!isNaN(s),"Something went wrong calculating the offset.");s%4!=0;)s+=1,n.push({name:"padding",type:"BYTE",value:0})}return o.sort(function(e,t){return e.value.tag>t.value.tag?1:-1}),t.fields=t.fields.concat(o),t.fields=t.fields.concat(n),t}function xt(e,t,r){for(var o=0;o<t.length;o+=1){var n=e.charToGlyphIndex(t[o]);if(0<n)return e.glyphs.get(n).getMetrics()}return r}var wt={make:_t,fontToTable:function(e){for(var t,r=[],o=[],n=[],s=[],i=[],a=[],l=[],u=0,c=0,d=0,h=0,f=0,p=0;p<e.glyphs.length;p+=1){var m=e.glyphs.get(p),y=0|m.unicode;if(isNaN(m.advanceWidth))throw new Error("Glyph "+m.name+" ("+p+"): advanceWidth is not a number.");(y<t||void 0===t)&&0<y&&(t=y),u<y&&(u=y);var y=ft.getUnicodeRange(y);if(y<32)c|=1<<y;else if(y<64)d|=1<<y-32;else if(y<96)h|=1<<y-64;else{if(!(y<123))throw new Error("Unicode ranges bits > 123 are reserved for internal usage");f|=1<<y-96}".notdef"!==m.name&&(y=m.getMetrics(),r.push(y.xMin),o.push(y.yMin),n.push(y.xMax),s.push(y.yMax),a.push(y.leftSideBearing),l.push(y.rightSideBearing),i.push(m.advanceWidth))}var g,v={xMin:Math.min.apply(null,r),yMin:Math.min.apply(null,o),xMax:Math.max.apply(null,n),yMax:Math.max.apply(null,s),advanceWidthMax:Math.max.apply(null,i),advanceWidthAvg:function(e){for(var t=0,r=0;r<e.length;r+=1)t+=e[r];return t/e.length}(i),minLeftSideBearing:Math.min.apply(null,a),maxLeftSideBearing:Math.max.apply(null,a),minRightSideBearing:Math.min.apply(null,l)},b=(v.ascender=e.ascender,v.descender=e.descender,Ze.make({flags:3,unitsPerEm:e.unitsPerEm,xMin:v.xMin,yMin:v.yMin,xMax:v.xMax,yMax:v.yMax,lowestRecPPEM:3,createdTimestamp:e.createdTimestamp})),j=Qe.make({ascender:v.ascender,descender:v.descender,advanceWidthMax:v.advanceWidthMax,minLeftSideBearing:v.minLeftSideBearing,minRightSideBearing:v.minRightSideBearing,xMaxExtent:v.maxLeftSideBearing+(v.xMax-v.xMin),numberOfHMetrics:e.glyphs.length}),_=$e.make(e.glyphs.length),x=ft.make({xAvgCharWidth:Math.round(v.advanceWidthAvg),usWeightClass:e.tables.os2.usWeightClass,usWidthClass:e.tables.os2.usWidthClass,usFirstCharIndex:t,usLastCharIndex:u,ulUnicodeRange1:c,ulUnicodeRange2:d,ulUnicodeRange3:h,ulUnicodeRange4:f,fsSelection:e.tables.os2.fsSelection,sTypoAscender:v.ascender,sTypoDescender:v.descender,sTypoLineGap:0,usWinAscent:v.yMax,usWinDescent:Math.abs(v.yMin),ulCodePageRange1:1,sxHeight:xt(e,"xyvw",{yMax:Math.round(v.ascender/2)}).yMax,sCapHeight:xt(e,"HIKLEFJMNTZBDPRAGOQSUVWXY",v).yMax,usDefaultChar:e.hasChar(" ")?32:0,usBreakChar:e.hasChar(" ")?32:0}),w=Je.make(e.glyphs),S=we.make(e.glyphs),T=e.getEnglishName("fontFamily"),M=e.getEnglishName("fontSubfamily"),E=T+" "+M,k=(k=e.getEnglishName("postScriptName"))||T.replace(/\s/g,"")+"-"+M,C={};for(g in e.names)C[g]=e.names[g];C.uniqueID||(C.uniqueID={en:e.getEnglishName("manufacturer")+":"+E}),C.postScriptName||(C.postScriptName={en:k}),C.preferredFamily||(C.preferredFamily=e.names.fontFamily),C.preferredSubfamily||(C.preferredSubfamily=e.names.fontSubfamily);var O=[],P=dt.make(C,O),O=0<O.length?Ke.make(O):void 0,A=pt.make(),E=Ye.make(e.glyphs,{version:e.getEnglishName("version"),fullName:E,familyName:T,weightName:M,postScriptName:k,unitsPerEm:e.unitsPerEm,fontBBox:[0,v.yMin,v.ascender,v.advanceWidthMax]}),T=e.metas&&0<Object.keys(e.metas).length?gt.make(e.metas):void 0,M=[b,j,_,x,P,S,A,E,w];O&&M.push(O),e.tables.gsub&&M.push(yt.make(e.tables.gsub)),T&&M.push(T);for(var D=bt((k=_t(M)).encode()),L=k.fields,R=!1,I=0;I<L.length;I+=1)if("head table"===L[I].name){L[I].value.checkSumAdjustment=2981146554-D,R=!0;break}if(R)return k;throw new Error("Could not find head table with checkSum to adjust.")},computeCheckSum:bt};function St(e,t){for(var r=0,o=e.length-1;r<=o;){var n=r+o>>>1,s=e[n].tag;if(s===t)return n;s<t?r=1+n:o=n-1}return-r-1}function Tt(e,t){for(var r=0,o=e.length-1;r<=o;){var n=r+o>>>1,s=e[n];if(s===t)return n;s<t?r=1+n:o=n-1}return-r-1}function Mt(e,t){for(var r=0,o=e.length-1;r<=o;){var n,s=r+o>>>1,i=(n=e[s]).start;if(i===t)return n;i<t?r=1+s:o=s-1}if(0<r)return t>(n=e[r-1]).end?0:n}function Et(e,t){this.font=e,this.tableName=t}function kt(e){Et.call(this,e,"gpos")}function i(e){Et.call(this,e,"gsub")}function Ct(e,t,r){for(var o=e.subtables,n=0;n<o.length;n++){var s=o[n];if(s.substFormat===t)return s}if(r)return o.push(r),r}function Ot(e){for(var t=new ArrayBuffer(e.length),r=new Uint8Array(t),o=0;o<e.length;++o)r[o]=e[o];return t}function _(e,t){if(!e)throw t}function Pt(e,t,r,o,n){var s=0<(t&o)?(s=e.parseByte(),r+(s=0==(t&n)?-s:s)):0<(t&n)?r:r+e.parseShort();return s}function At(e,t,r){var o,n=new R.Parser(t,r);if(e.numberOfContours=n.parseShort(),e._xMin=n.parseShort(),e._yMin=n.parseShort(),e._xMax=n.parseShort(),e._yMax=n.parseShort(),0<e.numberOfContours){for(var s=e.endPointIndices=[],i=0;i<e.numberOfContours;i+=1)s.push(n.parseUShort());e.instructionLength=n.parseUShort(),e.instructions=[];for(var a=0;a<e.instructionLength;a+=1)e.instructions.push(n.parseByte());for(var l=s[s.length-1]+1,u=[],c=0;c<l;c+=1)if(o=n.parseByte(),u.push(o),0<(8&o))for(var d=n.parseByte(),h=0;h<d;h+=1)u.push(o),c+=1;if(L.argument(u.length===l,"Bad flags."),0<s.length){var f,p=[];if(0<l){for(var m=0;m<l;m+=1)o=u[m],(f={}).onCurve=!!(1&o),f.lastPointOfContour=0<=s.indexOf(m),p.push(f);for(var y=0,g=0;g<l;g+=1)o=u[g],(f=p[g]).x=Pt(n,o,y,2,16),y=f.x;for(var v=0,b=0;b<l;b+=1)o=u[b],(f=p[b]).y=Pt(n,o,v,4,32),v=f.y}e.points=p}else e.points=[]}else if(0===e.numberOfContours)e.points=[];else{e.isComposite=!0,e.points=[],e.components=[];for(var j=!0;j;){u=n.parseUShort();var _={glyphIndex:n.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};0<(1&u)?0<(2&u)?(_.dx=n.parseShort(),_.dy=n.parseShort()):_.matchedPoints=[n.parseUShort(),n.parseUShort()]:0<(2&u)?(_.dx=n.parseChar(),_.dy=n.parseChar()):_.matchedPoints=[n.parseByte(),n.parseByte()],0<(8&u)?_.xScale=_.yScale=n.parseF2Dot14():0<(64&u)?(_.xScale=n.parseF2Dot14(),_.yScale=n.parseF2Dot14()):0<(128&u)&&(_.xScale=n.parseF2Dot14(),_.scale01=n.parseF2Dot14(),_.scale10=n.parseF2Dot14(),_.yScale=n.parseF2Dot14()),e.components.push(_),j=!!(32&u)}if(256&u){e.instructionLength=n.parseUShort(),e.instructions=[];for(var x=0;x<e.instructionLength;x+=1)e.instructions.push(n.parseByte())}}}function Lt(e,t){for(var r=[],o=0;o<e.length;o+=1){var n=e[o],n={x:t.xScale*n.x+t.scale01*n.y+t.dx,y:t.scale10*n.x+t.yScale*n.y+t.dy,onCurve:n.onCurve,lastPointOfContour:n.lastPointOfContour};r.push(n)}return r}function Rt(e){var t=new h;if(e)for(var r=function(e){for(var t=[],r=[],o=0;o<e.length;o+=1){var n=e[o];r.push(n),n.lastPointOfContour&&(t.push(r),r=[])}return L.argument(0===r.length,"There are still points left in the current contour."),t}(e),o=0;o<r.length;++o){var n,s=r[o],i=s[s.length-1],a=s[0];i.onCurve?t.moveTo(i.x,i.y):a.onCurve?t.moveTo(a.x,a.y):(n={x:.5*(i.x+a.x),y:.5*(i.y+a.y)},t.moveTo(n.x,n.y));for(var l=0;l<s.length;++l){var u,c=i,i=a,a=s[(l+1)%s.length];i.onCurve?t.lineTo(i.x,i.y):(u=a,c.onCurve||(i.x,c.x,i.y,c.y),a.onCurve||(u={x:.5*(i.x+a.x),y:.5*(i.y+a.y)}),t.quadraticCurveTo(i.x,i.y,u.x,u.y))}t.closePath()}return t}function It(e,t){if(t.isComposite)for(var r=0;r<t.components.length;r+=1){var o=t.components[r],n=e.get(o.glyphIndex);if(n.getPath(),n.points){var s=void 0;if(void 0===o.matchedPoints)s=Lt(n.points,o);else{if(o.matchedPoints[0]>t.points.length-1||o.matchedPoints[1]>n.points.length-1)throw Error("Matched points out of range in "+t.name);var i=t.points[o.matchedPoints[0]],a=n.points[o.matchedPoints[1]],o={xScale:o.xScale,scale01:o.scale01,scale10:o.scale10,yScale:o.yScale,dx:0,dy:0},a=Lt([a],o)[0];o.dx=i.x-a.x,o.dy=i.y-a.y,s=Lt(n.points,o)}t.points=t.points.concat(s)}}return Rt(t.points)}(kt.prototype=Et.prototype={searchTag:St,binSearch:Tt,getTable:function(e){var t=this.font.tables[this.tableName];return t=!t&&e?this.font.tables[this.tableName]=this.createDefaultTable():t},getScriptNames:function(){var e=this.getTable();return e?e.scripts.map(function(e){return e.tag}):[]},getDefaultScriptName:function(){var e=this.getTable();if(e){for(var t=!1,r=0;r<e.scripts.length;r++){var o=e.scripts[r].tag;if("DFLT"===o)return o;"latn"===o&&(t=!0)}return t?"latn":void 0}},getScriptTable:function(e,t){var r,o=this.getTable(t);if(o)return r=o.scripts,0<=(o=St(o.scripts,e=e||"DFLT"))?r[o].script:t?(r.splice(-1-o,0,t={tag:e,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}),t.script):void 0},getLangSysTable:function(e,t,r){var o,e=this.getScriptTable(e,r);if(e)return t&&"dflt"!==t&&"DFLT"!==t?0<=(o=St(e.langSysRecords,t))?e.langSysRecords[o].langSys:r?(e.langSysRecords.splice(-1-o,0,r={tag:t,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}}),r.langSys):void 0:e.defaultLangSys},getFeatureTable:function(e,t,r,o){e=this.getLangSysTable(e,t,o);if(e){for(var n,s=e.featureIndexes,i=this.font.tables[this.tableName].features,a=0;a<s.length;a++)if((n=i[s[a]]).tag===r)return n.feature;if(o)return t=i.length,L.assert(0===t||r>=i[t-1].tag,"Features must be added in alphabetical order."),i.push(n={tag:r,feature:{params:0,lookupListIndexes:[]}}),s.push(t),n.feature}},getLookupTables:function(e,t,r,o,n){var e=this.getFeatureTable(e,t,r,n),s=[];if(e){for(var i,a=e.lookupListIndexes,l=this.font.tables[this.tableName].lookups,u=0;u<a.length;u++)(i=l[a[u]]).lookupType===o&&s.push(i);if(0===s.length&&n)return t=l.length,l.push(i={lookupType:o,lookupFlag:0,subtables:[],markFilteringSet:void 0}),a.push(t),[i]}return s},getGlyphClass:function(e,t){switch(e.format){case 1:return e.startGlyph<=t&&t<e.startGlyph+e.classes.length?e.classes[t-e.startGlyph]:0;case 2:var r=Mt(e.ranges,t);return r?r.classId:0}},getCoverageIndex:function(e,t){switch(e.format){case 1:var r=Tt(e.glyphs,t);return 0<=r?r:-1;case 2:r=Mt(e.ranges,t);return r?r.index+t-r.start:-1}},expandCoverage:function(e){if(1===e.format)return e.glyphs;for(var t=[],r=e.ranges,o=0;o<r.length;o++)for(var n=r[o],s=n.start,i=n.end,a=s;a<=i;a++)t.push(a);return t}}).init=function(){var e=this.getDefaultScriptName();this.defaultKerningTables=this.getKerningTables(e)},kt.prototype.getKerningValue=function(e,t,r){for(var o=0;o<e.length;o++)for(var n=e[o].subtables,s=0;s<n.length;s++){var i=n[s],a=this.getCoverageIndex(i.coverage,t);if(!(a<0))switch(i.posFormat){case 1:for(var l=i.pairSets[a],u=0;u<l.length;u++){var c=l[u];if(c.secondGlyph===r)return c.value1&&c.value1.xAdvance||0}break;case 2:var d=this.getGlyphClass(i.classDef1,t),h=this.getGlyphClass(i.classDef2,r),d=i.classRecords[d][h];return d.value1&&d.value1.xAdvance||0}}return 0},kt.prototype.getKerningTables=function(e,t){if(this.font.tables.gpos)return this.getLookupTables(e,t,"kern",2)},(i.prototype=Et.prototype).createDefaultTable=function(){return{version:1,scripts:[{tag:"DFLT",script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}],features:[],lookups:[]}},i.prototype.getSingle=function(e,t,r){for(var o=[],n=this.getLookupTables(t,r,e,1),s=0;s<n.length;s++)for(var i=n[s].subtables,a=0;a<i.length;a++){var l=i[a],u=this.expandCoverage(l.coverage),c=void 0;if(1===l.substFormat)for(var d=l.deltaGlyphId,c=0;c<u.length;c++){var h=u[c];o.push({sub:h,by:h+d})}else{var f=l.substitute;for(c=0;c<u.length;c++)o.push({sub:u[c],by:f[c]})}}return o},i.prototype.getAlternates=function(e,t,r){for(var o=[],n=this.getLookupTables(t,r,e,3),s=0;s<n.length;s++)for(var i=n[s].subtables,a=0;a<i.length;a++)for(var l=i[a],u=this.expandCoverage(l.coverage),c=l.alternateSets,d=0;d<u.length;d++)o.push({sub:u[d],by:c[d]});return o},i.prototype.getLigatures=function(e,t,r){for(var o=[],n=this.getLookupTables(t,r,e,4),s=0;s<n.length;s++)for(var i=n[s].subtables,a=0;a<i.length;a++)for(var l=i[a],u=this.expandCoverage(l.coverage),c=l.ligatureSets,d=0;d<u.length;d++)for(var h=u[d],f=c[d],p=0;p<f.length;p++){var m=f[p];o.push({sub:[h].concat(m.components),by:m.ligGlyph})}return o},i.prototype.addSingle=function(e,t,r,o){r=Ct(this.getLookupTables(r,o,e,1,!0)[0],2,{substFormat:2,coverage:{format:1,glyphs:[]},substitute:[]}),L.assert(1===r.coverage.format,"Ligature: unable to modify coverage table format "+r.coverage.format),o=t.sub,e=this.binSearch(r.coverage.glyphs,o);e<0&&(r.coverage.glyphs.splice(e=-1-e,0,o),r.substitute.splice(e,0,0)),r.substitute[e]=t.by},i.prototype.addAlternate=function(e,t,r,o){r=Ct(this.getLookupTables(r,o,e,3,!0)[0],1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]}),L.assert(1===r.coverage.format,"Ligature: unable to modify coverage table format "+r.coverage.format),o=t.sub,e=this.binSearch(r.coverage.glyphs,o);e<0&&(r.coverage.glyphs.splice(e=-1-e,0,o),r.alternateSets.splice(e,0,0)),r.alternateSets[e]=t.by},i.prototype.addLigature=function(e,t,r,o){var r=this.getLookupTables(r,o,e,4,!0)[0],o=r.subtables[0],e=(o||(r.subtables[0]=o={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]}),L.assert(1===o.coverage.format,"Ligature: unable to modify coverage table format "+o.coverage.format),t.sub[0]),n=t.sub.slice(1),r={ligGlyph:t.by,components:n},t=this.binSearch(o.coverage.glyphs,e);if(0<=t){for(var s=o.ligatureSets[t],i=0;i<s.length;i++)if(function(e,t){var r=e.length;if(r===t.length){for(var o=0;o<r;o++)if(e[o]!==t[o])return;return 1}}(s[i].components,n))return;s.push(r)}else o.coverage.glyphs.splice(t=-1-t,0,e),o.ligatureSets.splice(t,0,[r])},i.prototype.getFeature=function(e,t,r){if(/ss\d\d/.test(e))return this.getSingle(e,t,r);switch(e){case"aalt":case"salt":return this.getSingle(e,t,r).concat(this.getAlternates(e,t,r));case"dlig":case"liga":case"rlig":return this.getLigatures(e,t,r)}},i.prototype.add=function(e,t,r,o){if(/ss\d\d/.test(e))return this.addSingle(e,t,r,o);switch(e){case"aalt":case"salt":return"number"==typeof t.by?this.addSingle(e,t,r,o):this.addAlternate(e,t,r,o);case"dlig":case"liga":case"rlig":return this.addLigature(e,t,r,o)}};var Dt={getPath:Rt,parse:function(e,t,r,o){for(var n=new p.GlyphSet(o),s=0;s<r.length-1;s+=1){var i=r[s];i!==r[s+1]?n.push(s,p.ttfGlyphLoader(o,s,At,e,t+i,It)):n.push(s,p.glyphLoader(o,s))}return n}};function Ft(e){this.font=e,this.getCommands=function(e){return Dt.getPath(e).commands},this._fpgmState=this._prepState=void 0,this._errorState=0}function Ut(e){return e}function Nt(e){return Math.sign(e)*Math.round(Math.abs(e))}function Bt(e){return Math.sign(e)*Math.round(Math.abs(2*e))/2}function Gt(e){return Math.sign(e)*(Math.round(Math.abs(e)+.5)-.5)}function Vt(e){return Math.sign(e)*Math.ceil(Math.abs(e))}function zt(e){return Math.sign(e)*Math.floor(Math.abs(e))}function Ht(e){var t=this.srPeriod,r=this.srPhase,o=1;return e<0&&(e=-e,o=-1),e+=this.srThreshold-r,e=Math.trunc(e/t)*t,(e+=r)<0?r*o:e*o}var x={x:1,y:0,axis:"x",distance:function(e,t,r,o){return(r?e.xo:e.x)-(o?t.xo:t.x)},interpolate:function(e,t,r,o){var n,s,i,a,l,u,c;if(!o||o===this)return n=e.xo-t.xo,s=e.xo-r.xo,l=t.x-t.xo,u=r.x-r.xo,0===(c=(i=Math.abs(n))+(a=Math.abs(s)))?void(e.x=e.xo+(l+u)/2):void(e.x=e.xo+(l*a+u*i)/c);n=o.distance(e,t,!0,!0),s=o.distance(e,r,!0,!0),l=o.distance(t,t,!1,!0),u=o.distance(r,r,!1,!0),0===(c=(i=Math.abs(n))+(a=Math.abs(s)))?x.setRelative(e,e,(l+u)/2,o,!0):x.setRelative(e,e,(l*a+u*i)/c,o,!0)},normalSlope:Number.NEGATIVE_INFINITY,setRelative:function(e,t,r,o,n){var s,i;o&&o!==this?(s=n?t.xo:t.x,i=n?t.yo:t.y,s+=r*o.x,i+=r*o.y,e.x=s+(e.y-i)/o.normalSlope):e.x=(n?t.xo:t.x)+r},slope:0,touch:function(e){e.xTouched=!0},touched:function(e){return e.xTouched},untouch:function(e){e.xTouched=!1}},T={x:0,y:1,axis:"y",distance:function(e,t,r,o){return(r?e.yo:e.y)-(o?t.yo:t.y)},interpolate:function(e,t,r,o){var n,s,i,a,l,u,c;if(!o||o===this)return n=e.yo-t.yo,s=e.yo-r.yo,l=t.y-t.yo,u=r.y-r.yo,0===(c=(i=Math.abs(n))+(a=Math.abs(s)))?void(e.y=e.yo+(l+u)/2):void(e.y=e.yo+(l*a+u*i)/c);n=o.distance(e,t,!0,!0),s=o.distance(e,r,!0,!0),l=o.distance(t,t,!1,!0),u=o.distance(r,r,!1,!0),0===(c=(i=Math.abs(n))+(a=Math.abs(s)))?T.setRelative(e,e,(l+u)/2,o,!0):T.setRelative(e,e,(l*a+u*i)/c,o,!0)},normalSlope:0,setRelative:function(e,t,r,o,n){var s,i;o&&o!==this?(s=n?t.xo:t.x,i=n?t.yo:t.y,s+=r*o.x,i+=r*o.y,e.y=i+o.normalSlope*(e.x-s)):e.y=(n?t.yo:t.y)+r},slope:Number.POSITIVE_INFINITY,touch:function(e){e.yTouched=!0},touched:function(e){return e.yTouched},untouch:function(e){e.yTouched=!1}};function Wt(e,t){this.x=e,this.y=t,this.axis=void 0,this.slope=t/e,this.normalSlope=-e/t,Object.freeze(this)}function qt(e,t){var r=Math.sqrt(e*e+t*t);return t/=r,1===(e/=r)&&0===t?x:0===e&&1===t?T:new Wt(e,t)}function M(e,t,r,o){this.x=this.xo=Math.round(64*e)/64,this.y=this.yo=Math.round(64*t)/64,this.lastPointOfContour=r,this.onCurve=o,this.prevPointOnContour=void 0,this.nextPointOnContour=void 0,this.xTouched=!1,this.yTouched=!1,Object.preventExtensions(this)}Object.freeze(x),Object.freeze(T),Wt.prototype.distance=function(e,t,r,o){return this.x*x.distance(e,t,r,o)+this.y*T.distance(e,t,r,o)},Wt.prototype.interpolate=function(e,t,r,o){var n=o.distance(e,t,!0,!0),s=o.distance(e,r,!0,!0),t=o.distance(t,t,!1,!0),r=o.distance(r,r,!1,!0),n=Math.abs(n),s=Math.abs(s),i=n+s;0===i?this.setRelative(e,e,(t+r)/2,o,!0):this.setRelative(e,e,(t*s+r*n)/i,o,!0)},Wt.prototype.setRelative=function(e,t,r,o,n){var s=n?t.xo:t.x,n=n?t.yo:t.y,t=s+r*(o=o||this).x,s=n+r*o.y,n=o.normalSlope,r=this.slope,o=e.x,i=e.y;e.x=(r*o-n*t+s-i)/(r-n),e.y=r*(e.x-o)+i},Wt.prototype.touch=function(e){e.xTouched=!0,e.yTouched=!0},M.prototype.nextTouched=function(e){for(var t=this.nextPointOnContour;!e.touched(t)&&t!==this;)t=t.nextPointOnContour;return t},M.prototype.prevTouched=function(e){for(var t=this.prevPointOnContour;!e.touched(t)&&t!==this;)t=t.prevPointOnContour;return t};var Xt=Object.freeze(new M(0,0)),Yt={cvCutIn:17/16,deltaBase:9,deltaShift:.125,loop:1,minDis:1,autoFlip:!0};function E(e,t){switch(this.env=e,this.stack=[],this.prog=t,e){case"glyf":this.zp0=this.zp1=this.zp2=1,this.rp0=this.rp1=this.rp2=0;case"prep":this.fv=this.pv=this.dpv=x,this.round=Nt}}function Zt(e){for(var t=e.tZone=new Array(e.gZone.length),r=0;r<t.length;r++)t[r]=new M(0,0)}function Qt(e,t){var r,o=e.prog,n=e.ip,s=1;do{if(88===(r=o[++n]))s++;else if(89===r)s--;else if(64===r)n+=o[n+1]+1;else if(65===r)n+=2*o[n+1]+1;else if(176<=r&&r<=183)n+=r-176+1;else if(184<=r&&r<=191)n+=2*(r-184+1);else if(t&&1===s&&27===r)break}while(0<s);e.ip=n}function Jt(e,t){j.DEBUG&&console.log(t.step,"SVTCA["+e.axis+"]"),t.fv=t.pv=t.dpv=e}function Kt(e,t){j.DEBUG&&console.log(t.step,"SPVTCA["+e.axis+"]"),t.pv=t.dpv=e}function $t(e,t){j.DEBUG&&console.log(t.step,"SFVTCA["+e.axis+"]"),t.fv=e}function er(e,t){var r,o=t.stack,n=o.pop(),o=o.pop(),s=t.z2[n],i=t.z1[o];j.DEBUG&&console.log("SPVTL["+e+"]",n,o),n=e?(r=s.y-i.y,i.x-s.x):(r=i.x-s.x,i.y-s.y),t.pv=t.dpv=qt(r,n)}function tr(e,t){var r,o=t.stack,n=o.pop(),o=o.pop(),s=t.z2[n],i=t.z1[o];j.DEBUG&&console.log("SFVTL["+e+"]",n,o),n=e?(r=s.y-i.y,i.x-s.x):(r=i.x-s.x,i.y-s.y),t.fv=qt(r,n)}function rr(e){j.DEBUG&&console.log(e.step,"POP[]"),e.stack.pop()}function or(e,t){var r=t.stack.pop(),o=t.z0[r],n=t.fv,s=t.pv,i=(j.DEBUG&&console.log(t.step,"MDAP["+e+"]",r),s.distance(o,Xt));e&&(i=t.round(i)),n.setRelative(o,Xt,i,s),n.touch(o),t.rp0=t.rp1=r}function nr(e,t){var r,o,n,s=t.z2,i=s.length-2;j.DEBUG&&console.log(t.step,"IUP["+e.axis+"]");for(var a=0;a<i;a++)r=s[a],e.touched(r)||(o=r.prevTouched(e))!==r&&(o===(n=r.nextTouched(e))&&e.setRelative(r,r,e.distance(o,o,!1,!0),e,!0),e.interpolate(r,o,n,e))}function sr(e,t){for(var r=t.stack,o=e?t.rp1:t.rp2,n=(e?t.z0:t.z1)[o],s=t.fv,i=t.pv,a=t.loop,l=t.z2;a--;){var u=r.pop(),c=l[u],d=i.distance(n,n,!1,!0);s.setRelative(c,c,d,i),s.touch(c),j.DEBUG&&console.log(t.step,(1<t.loop?"loop "+(t.loop-a)+": ":"")+"SHP["+(e?"rp1":"rp2")+"]",u)}t.loop=1}function ir(e,t){for(var r=t.stack,o=e?t.rp1:t.rp2,n=(e?t.z0:t.z1)[o],s=t.fv,i=t.pv,o=r.pop(),a=t.z2[t.contours[o]],l=a,u=(j.DEBUG&&console.log(t.step,"SHC["+e+"]",o),i.distance(n,n,!1,!0));l!==n&&s.setRelative(l,l,u,i),(l=l.nextPointOnContour)!==a;);}function ar(e,t){var r,o,n=t.stack,s=e?t.rp1:t.rp2,s=(e?t.z0:t.z1)[s],i=t.fv,a=t.pv,n=n.pop();switch(j.DEBUG&&console.log(t.step,"SHZ["+e+"]",n),n){case 0:r=t.tZone;break;case 1:r=t.gZone;break;default:throw new Error("Invalid zone")}for(var l=a.distance(s,s,!1,!0),u=r.length-2,c=0;c<u;c++)o=r[c],i.setRelative(o,o,l,a)}function lr(e,t){var r=t.stack,o=r.pop()/64,r=r.pop(),n=t.z1[r],s=t.z0[t.rp0],i=t.fv,a=t.pv;i.setRelative(n,s,o,a),i.touch(n),j.DEBUG&&console.log(t.step,"MSIRP["+e+"]",o,r),t.rp1=t.rp0,t.rp2=r,e&&(t.rp0=r)}function ur(e,t){var r=t.stack,o=r.pop(),r=r.pop(),n=t.z0[r],s=t.fv,i=t.pv,a=t.cvt[o],o=(j.DEBUG&&console.log(t.step,"MIAP["+e+"]",o,"(",a,")",r),i.distance(n,Xt));e&&(Math.abs(o-a)<t.cvCutIn&&(o=a),o=t.round(o)),s.setRelative(n,Xt,o,i),0===t.zp0&&(n.xo=n.x,n.yo=n.y),s.touch(n),t.rp0=t.rp1=r}function cr(e,t){var r=t.stack,o=r.pop(),n=t.z2[o];j.DEBUG&&console.log(t.step,"GC["+e+"]",o),r.push(64*t.dpv.distance(n,Xt,e,!1))}function dr(e,t){var r=t.stack,o=r.pop(),r=r.pop(),n=t.z1[o],s=t.z0[r],s=t.dpv.distance(s,n,e,e);j.DEBUG&&console.log(t.step,"MD["+e+"]",o,r,"->",s),t.stack.push(Math.round(64*s))}function hr(e,t){var r=t.stack,o=r.pop(),n=t.fv,s=t.pv,i=t.ppem,a=t.deltaBase+16*(e-1),l=t.deltaShift,u=t.z0;j.DEBUG&&console.log(t.step,"DELTAP["+e+"]",o,r);for(var c=0;c<o;c++){var d=r.pop(),h=r.pop();a+((240&h)>>4)===i&&(0<=(h=(15&h)-8)&&h++,j.DEBUG&&console.log(t.step,"DELTAPFIX",d,"by",h*l),d=u[d],n.setRelative(d,d,h*l,s))}}function fr(e,t){var r=t.stack,o=r.pop();j.DEBUG&&console.log(t.step,"ROUND[]"),r.push(64*t.round(o/64))}function pr(e,t){var r=t.stack,o=r.pop(),n=t.ppem,s=t.deltaBase+16*(e-1),i=t.deltaShift;j.DEBUG&&console.log(t.step,"DELTAC["+e+"]",o,r);for(var a=0;a<o;a++){var l=r.pop(),u=r.pop();s+((240&u)>>4)===n&&(0<=(u=(15&u)-8)&&u++,u=u*i,j.DEBUG&&console.log(t.step,"DELTACFIX",l,"by",u),t.cvt[l]+=u)}}function mr(e,t){var r,o=t.stack,n=o.pop(),o=o.pop(),s=t.z2[n],i=t.z1[o];j.DEBUG&&console.log(t.step,"SDPVTL["+e+"]",n,o),n=e?(r=s.y-i.y,i.x-s.x):(r=i.x-s.x,i.y-s.y),t.dpv=qt(r,n)}function k(e,t){var r=t.stack,o=t.prog,n=t.ip;j.DEBUG&&console.log(t.step,"PUSHB["+e+"]");for(var s=0;s<e;s++)r.push(o[++n]);t.ip=n}function C(e,t){var r=t.ip,o=t.prog,n=t.stack;j.DEBUG&&console.log(t.ip,"PUSHW["+e+"]");for(var s=0;s<e;s++){var i=o[++r]<<8|o[++r];32768&i&&(i=-(1+(65535^i))),n.push(i)}t.ip=r}function O(e,t,r,o,n,s){var i,a,l=s.stack,u=e&&l.pop(),l=l.pop(),c=s.rp0,c=s.z0[c],d=s.z1[l],h=s.minDis,f=s.fv,p=s.dpv,m=i=p.distance(d,c,!0,!0),y=0<=m?1:-1;m=Math.abs(m),e&&(a=s.cvt[u],o&&Math.abs(m-a)<s.cvCutIn&&(m=a)),r&&m<h&&(m=h),o&&(m=s.round(m)),f.setRelative(d,c,y*m,p),f.touch(d),j.DEBUG&&console.log(s.step,(e?"MIRP[":"MDRP[")+(t?"M":"m")+(r?">":"_")+(o?"R":"_")+(0===n?"Gr":1===n?"Bl":2===n?"Wh":"")+"]",e?u+"("+s.cvt[u]+","+a+")":"",l,"(d =",i,"->",y*m,")"),s.rp1=s.rp0,s.rp2=l,t&&(s.rp0=l)}Ft.prototype.exec=function(e,t){if("number"!=typeof t)throw new Error("Point size is not a number!");if(!(2<this._errorState)){var r=this.font,o=this._prepState;if(!o||o.ppem!==t){var n=this._fpgmState;if(!n){E.prototype=Yt,(n=this._fpgmState=new E("fpgm",r.tables.fpgm)).funcs=[],n.font=r,j.DEBUG&&(console.log("---EXEC FPGM---"),n.step=-1);try{vr(n)}catch(e){return console.log("Hinting error in FPGM:"+e),void(this._errorState=3)}}E.prototype=n,(o=this._prepState=new E("prep",r.tables.prep)).ppem=t;var s=r.tables.cvt;if(s)for(var i=o.cvt=new Array(s.length),a=t/r.unitsPerEm,l=0;l<s.length;l++)i[l]=s[l]*a;else o.cvt=[];j.DEBUG&&(console.log("---EXEC PREP---"),o.step=-1);try{vr(o)}catch(e){this._errorState<2&&console.log("Hinting error in PREP:"+e),this._errorState=2}}if(!(1<this._errorState))try{return yr(e,o)}catch(e){this._errorState<1&&(console.log("Hinting error:"+e),console.log("Note: further hinting errors are silenced")),this._errorState=1}}};var yr=function(e,t){var r=t.ppem/t.font.unitsPerEm,o=r,n=e.components;if(E.prototype=t,n){for(var s=t.font,i=[],a=[],l=0;l<n.length;l++){var u=n[l],c=s.glyphs.get(u.glyphIndex),d=new E("glyf",c.instructions);j.DEBUG&&(console.log("---EXEC COMP "+l+"---"),d.step=-1),gr(c,d,r,o);for(var h=Math.round(u.dx*r),f=Math.round(u.dy*o),p=d.gZone,m=d.contours,y=0;y<p.length;y++){var g=p[y];g.xTouched=g.yTouched=!1,g.xo=g.x=g.x+h,g.yo=g.y=g.y+f}var v=i.length;i.push.apply(i,p);for(var b=0;b<m.length;b++)a.push(m[b]+v)}e.instructions&&!d.inhibitGridFit&&((d=new E("glyf",e.instructions)).gZone=d.z0=d.z1=d.z2=i,d.contours=a,i.push(new M(0,0),new M(Math.round(e.advanceWidth*r),0)),j.DEBUG&&(console.log("---EXEC COMPOSITE---"),d.step=-1),vr(d),i.length-=2)}else d=new E("glyf",e.instructions),j.DEBUG&&(console.log("---EXEC GLYPH---"),d.step=-1),gr(e,d,r,o),i=d.gZone;return i},gr=function(e,t,r,o){for(var n,s,i,a=e.points||[],l=a.length,u=t.gZone=t.z0=t.z1=t.z2=[],c=t.contours=[],d=0;d<l;d++)n=a[d],u[d]=new M(n.x*r,n.y*o,n.lastPointOfContour,n.onCurve);for(var h=0;h<l;h++)n=u[h],s||(s=n,c.push(h)),n.lastPointOfContour?((n.nextPointOnContour=s).prevPointOnContour=n,s=void 0):(i=u[h+1],(n.nextPointOnContour=i).prevPointOnContour=n);if(!t.inhibitGridFit){if(j.DEBUG){console.log("PROCESSING GLYPH",t.stack);for(var f=0;f<l;f++)console.log(f,u[f].x,u[f].y)}if(u.push(new M(0,0),new M(Math.round(e.advanceWidth*r),0)),vr(t),u.length-=2,j.DEBUG){console.log("FINISHED GLYPH",t.stack);for(var p=0;p<l;p++)console.log(p,u[p].x,u[p].y)}}},vr=function(e){var t=e.prog;if(t){var r,o=t.length;for(e.ip=0;e.ip<o;e.ip++){if(j.DEBUG&&e.step++,!(r=br[t[e.ip]]))throw new Error("unknown instruction: 0x"+Number(t[e.ip]).toString(16));r(e)}}},br=[Jt.bind(void 0,T),Jt.bind(void 0,x),Kt.bind(void 0,T),Kt.bind(void 0,x),$t.bind(void 0,T),$t.bind(void 0,x),er.bind(void 0,0),er.bind(void 0,1),tr.bind(void 0,0),tr.bind(void 0,1),function(e){var t=(r=e.stack).pop(),r=r.pop();j.DEBUG&&console.log(e.step,"SPVFS[]",t,r),e.pv=e.dpv=qt(r,t)},function(e){var t=(r=e.stack).pop(),r=r.pop();j.DEBUG&&console.log(e.step,"SPVFS[]",t,r),e.fv=qt(r,t)},function(e){var t=e.stack,r=e.pv;j.DEBUG&&console.log(e.step,"GPV[]"),t.push(16384*r.x),t.push(16384*r.y)},function(e){var t=e.stack,r=e.fv;j.DEBUG&&console.log(e.step,"GFV[]"),t.push(16384*r.x),t.push(16384*r.y)},function(e){e.fv=e.pv,j.DEBUG&&console.log(e.step,"SFVTPV[]")},function(e){var t=(s=e.stack).pop(),r=s.pop(),o=s.pop(),n=s.pop(),s=s.pop(),i=e.z0,a=e.z1,l=i[t],i=i[r],u=a[o],a=a[n],e=e.z2[s],t=(j.DEBUG&&console.log("ISECT[], ",t,r,o,n,s),l.x),r=l.y,o=i.x,n=i.y,s=u.x,l=u.y,i=a.x,u=a.y,a=(t-o)*(l-u)-(r-n)*(s-i),c=t*n-r*o,d=s*u-l*i;e.x=(c*(s-i)-d*(t-o))/a,e.y=(c*(l-u)-d*(r-n))/a},function(e){e.rp0=e.stack.pop(),j.DEBUG&&console.log(e.step,"SRP0[]",e.rp0)},function(e){e.rp1=e.stack.pop(),j.DEBUG&&console.log(e.step,"SRP1[]",e.rp1)},function(e){e.rp2=e.stack.pop(),j.DEBUG&&console.log(e.step,"SRP2[]",e.rp2)},function(e){var t=e.stack.pop();switch(j.DEBUG&&console.log(e.step,"SZP0[]",t),e.zp0=t){case 0:e.tZone||Zt(e),e.z0=e.tZone;break;case 1:e.z0=e.gZone;break;default:throw new Error("Invalid zone pointer")}},function(e){var t=e.stack.pop();switch(j.DEBUG&&console.log(e.step,"SZP1[]",t),e.zp1=t){case 0:e.tZone||Zt(e),e.z1=e.tZone;break;case 1:e.z1=e.gZone;break;default:throw new Error("Invalid zone pointer")}},function(e){var t=e.stack.pop();switch(j.DEBUG&&console.log(e.step,"SZP2[]",t),e.zp2=t){case 0:e.tZone||Zt(e),e.z2=e.tZone;break;case 1:e.z2=e.gZone;break;default:throw new Error("Invalid zone pointer")}},function(e){var t=e.stack.pop();switch(j.DEBUG&&console.log(e.step,"SZPS[]",t),e.zp0=e.zp1=e.zp2=t){case 0:e.tZone||Zt(e),e.z0=e.z1=e.z2=e.tZone;break;case 1:e.z0=e.z1=e.z2=e.gZone;break;default:throw new Error("Invalid zone pointer")}},function(e){e.loop=e.stack.pop(),j.DEBUG&&console.log(e.step,"SLOOP[]",e.loop)},function(e){j.DEBUG&&console.log(e.step,"RTG[]"),e.round=Nt},function(e){j.DEBUG&&console.log(e.step,"RTHG[]"),e.round=Gt},function(e){var t=e.stack.pop();j.DEBUG&&console.log(e.step,"SMD[]",t),e.minDis=t/64},function(e){j.DEBUG&&console.log(e.step,"ELSE[]"),Qt(e,!1)},function(e){var t=e.stack.pop();j.DEBUG&&console.log(e.step,"JMPR[]",t),e.ip+=t-1},function(e){var t=e.stack.pop();j.DEBUG&&console.log(e.step,"SCVTCI[]",t),e.cvCutIn=t/64},void 0,void 0,function(e){var t=e.stack;j.DEBUG&&console.log(e.step,"DUP[]"),t.push(t[t.length-1])},rr,function(e){j.DEBUG&&console.log(e.step,"CLEAR[]"),e.stack.length=0},function(e){var t=e.stack,r=t.pop(),o=t.pop();j.DEBUG&&console.log(e.step,"SWAP[]"),t.push(r),t.push(o)},function(e){var t=e.stack;j.DEBUG&&console.log(e.step,"DEPTH[]"),t.push(t.length)},function(e){var t=e.stack,r=t.pop();j.DEBUG&&console.log(e.step,"CINDEX[]",r),t.push(t[t.length-r])},function(e){var t=e.stack,r=t.pop();j.DEBUG&&console.log(e.step,"MINDEX[]",r),t.push(t.splice(t.length-r,1)[0])},void 0,void 0,void 0,function(e){var t=(o=e.stack).pop(),r=o.pop(),o=(j.DEBUG&&console.log(e.step,"LOOPCALL[]",t,r),e.ip),n=e.prog;e.prog=e.funcs[t];for(var s=0;s<r;s++)vr(e),j.DEBUG&&console.log(++e.step,s+1<r?"next loopcall":"done loopcall",s);e.ip=o,e.prog=n},function(e){var t=e.stack.pop(),r=(j.DEBUG&&console.log(e.step,"CALL[]",t),e.ip),o=e.prog;e.prog=e.funcs[t],vr(e),e.ip=r,e.prog=o,j.DEBUG&&console.log(++e.step,"returning from",t)},function(e){if("fpgm"!==e.env)throw new Error("FDEF not allowed here");var t=e.stack,r=e.prog,o=e.ip,t=t.pop(),n=o;for(j.DEBUG&&console.log(e.step,"FDEF[]",t);45!==r[++o];);e.ip=o,e.funcs[t]=r.slice(n+1,o)},void 0,or.bind(void 0,0),or.bind(void 0,1),nr.bind(void 0,T),nr.bind(void 0,x),sr.bind(void 0,0),sr.bind(void 0,1),ir.bind(void 0,0),ir.bind(void 0,1),ar.bind(void 0,0),ar.bind(void 0,1),function(e){for(var t=e.stack,r=e.loop,o=e.fv,n=t.pop()/64,s=e.z2;r--;){var i=t.pop(),a=s[i];j.DEBUG&&console.log(e.step,(1<e.loop?"loop "+(e.loop-r)+": ":"")+"SHPIX[]",i,n),o.setRelative(a,a,n),o.touch(a)}e.loop=1},function(e){for(var t=e.stack,r=e.rp1,o=e.rp2,n=e.loop,s=e.z0[r],i=e.z1[o],a=e.fv,l=e.dpv,u=e.z2;n--;){var c=t.pop(),d=u[c];j.DEBUG&&console.log(e.step,(1<e.loop?"loop "+(e.loop-n)+": ":"")+"IP[]",c,r,"<->",o),a.interpolate(d,s,i,l),a.touch(d)}e.loop=1},lr.bind(void 0,0),lr.bind(void 0,1),function(e){for(var t=e.stack,r=e.rp0,o=e.z0[r],n=e.loop,s=e.fv,i=e.pv,a=e.z1;n--;){var l=t.pop(),u=a[l];j.DEBUG&&console.log(e.step,(1<e.loop?"loop "+(e.loop-n)+": ":"")+"ALIGNRP[]",l),s.setRelative(u,o,0,i),s.touch(u)}e.loop=1},function(e){j.DEBUG&&console.log(e.step,"RTDG[]"),e.round=Bt},ur.bind(void 0,0),ur.bind(void 0,1),function(e){var t=e.prog,r=e.ip,o=e.stack,n=t[++r];j.DEBUG&&console.log(e.step,"NPUSHB[]",n);for(var s=0;s<n;s++)o.push(t[++r]);e.ip=r},function(e){var t=e.ip,r=e.prog,o=e.stack,n=r[++t];j.DEBUG&&console.log(e.step,"NPUSHW[]",n);for(var s=0;s<n;s++){var i=r[++t]<<8|r[++t];32768&i&&(i=-(1+(65535^i))),o.push(i)}e.ip=t},function(e){var t=e.stack,r=(r=e.store)||(e.store=[]),o=t.pop(),t=t.pop();j.DEBUG&&console.log(e.step,"WS",o,t),r[t]=o},function(e){var t=e.stack,r=e.store,o=t.pop(),e=(j.DEBUG&&console.log(e.step,"RS",o),r&&r[o]||0);t.push(e)},function(e){var t=(r=e.stack).pop(),r=r.pop();j.DEBUG&&console.log(e.step,"WCVTP",t,r),e.cvt[r]=t/64},function(e){var t=e.stack,r=t.pop();j.DEBUG&&console.log(e.step,"RCVT",r),t.push(64*e.cvt[r])},cr.bind(void 0,0),cr.bind(void 0,1),void 0,dr.bind(void 0,0),dr.bind(void 0,1),function(e){j.DEBUG&&console.log(e.step,"MPPEM[]"),e.stack.push(e.ppem)},void 0,function(e){j.DEBUG&&console.log(e.step,"FLIPON[]"),e.autoFlip=!0},void 0,void 0,function(e){var t=e.stack,r=t.pop(),o=t.pop();j.DEBUG&&console.log(e.step,"LT[]",r,o),t.push(o<r?1:0)},function(e){var t=e.stack,r=t.pop(),o=t.pop();j.DEBUG&&console.log(e.step,"LTEQ[]",r,o),t.push(o<=r?1:0)},function(e){var t=e.stack,r=t.pop(),o=t.pop();j.DEBUG&&console.log(e.step,"GT[]",r,o),t.push(r<o?1:0)},function(e){var t=e.stack,r=t.pop(),o=t.pop();j.DEBUG&&console.log(e.step,"GTEQ[]",r,o),t.push(r<=o?1:0)},function(e){var t=e.stack,r=t.pop(),o=t.pop();j.DEBUG&&console.log(e.step,"EQ[]",r,o),t.push(r===o?1:0)},function(e){var t=e.stack,r=t.pop(),o=t.pop();j.DEBUG&&console.log(e.step,"NEQ[]",r,o),t.push(r!==o?1:0)},function(e){var t=e.stack,r=t.pop();j.DEBUG&&console.log(e.step,"ODD[]",r),t.push(Math.trunc(r)%2?1:0)},function(e){var t=e.stack,r=t.pop();j.DEBUG&&console.log(e.step,"EVEN[]",r),t.push(Math.trunc(r)%2?0:1)},function(e){var t=e.stack.pop();j.DEBUG&&console.log(e.step,"IF[]",t),t||(Qt(e,!0),j.DEBUG&&console.log(e.step,"EIF[]"))},function(e){j.DEBUG&&console.log(e.step,"EIF[]")},function(e){var t=e.stack,r=t.pop(),o=t.pop();j.DEBUG&&console.log(e.step,"AND[]",r,o),t.push(r&&o?1:0)},function(e){var t=e.stack,r=t.pop(),o=t.pop();j.DEBUG&&console.log(e.step,"OR[]",r,o),t.push(r||o?1:0)},function(e){var t=e.stack,r=t.pop();j.DEBUG&&console.log(e.step,"NOT[]",r),t.push(r?0:1)},hr.bind(void 0,1),function(e){var t=e.stack.pop();j.DEBUG&&console.log(e.step,"SDB[]",t),e.deltaBase=t},function(e){var t=e.stack.pop();j.DEBUG&&console.log(e.step,"SDS[]",t),e.deltaShift=Math.pow(.5,t)},function(e){var t=e.stack,r=t.pop(),o=t.pop();j.DEBUG&&console.log(e.step,"ADD[]",r,o),t.push(o+r)},function(e){var t=e.stack,r=t.pop(),o=t.pop();j.DEBUG&&console.log(e.step,"SUB[]",r,o),t.push(o-r)},function(e){var t=e.stack,r=t.pop(),o=t.pop();j.DEBUG&&console.log(e.step,"DIV[]",r,o),t.push(64*o/r)},function(e){var t=e.stack,r=t.pop(),o=t.pop();j.DEBUG&&console.log(e.step,"MUL[]",r,o),t.push(o*r/64)},function(e){var t=e.stack,r=t.pop();j.DEBUG&&console.log(e.step,"ABS[]",r),t.push(Math.abs(r))},function(e){var t=e.stack,r=t.pop();j.DEBUG&&console.log(e.step,"NEG[]",r),t.push(-r)},function(e){var t=e.stack,r=t.pop();j.DEBUG&&console.log(e.step,"FLOOR[]",r),t.push(64*Math.floor(r/64))},function(e){var t=e.stack,r=t.pop();j.DEBUG&&console.log(e.step,"CEILING[]",r),t.push(64*Math.ceil(r/64))},fr.bind(void 0,0),fr.bind(void 0,1),fr.bind(void 0,2),fr.bind(void 0,3),void 0,void 0,void 0,void 0,function(e){var t=(r=e.stack).pop(),r=r.pop();j.DEBUG&&console.log(e.step,"WCVTF[]",t,r),e.cvt[r]=t*e.ppem/e.font.unitsPerEm},hr.bind(void 0,2),hr.bind(void 0,3),pr.bind(void 0,1),pr.bind(void 0,2),pr.bind(void 0,3),function(e){var t,r=e.stack.pop();switch(j.DEBUG&&console.log(e.step,"SROUND[]",r),e.round=Ht,192&r){case 0:t=.5;break;case 64:t=1;break;case 128:t=2;break;default:throw new Error("invalid SROUND value")}switch(e.srPeriod=t,48&r){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*t;break;case 32:e.srPhase=.5*t;break;case 48:e.srPhase=.75*t;break;default:throw new Error("invalid SROUND value")}e.srThreshold=0===(r&=15)?0:(r/8-.5)*t},function(e){var t,r=e.stack.pop();switch(j.DEBUG&&console.log(e.step,"S45ROUND[]",r),e.round=Ht,192&r){case 0:t=Math.sqrt(2)/2;break;case 64:t=Math.sqrt(2);break;case 128:t=2*Math.sqrt(2);break;default:throw new Error("invalid S45ROUND value")}switch(e.srPeriod=t,48&r){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*t;break;case 32:e.srPhase=.5*t;break;case 48:e.srPhase=.75*t;break;default:throw new Error("invalid S45ROUND value")}e.srThreshold=0===(r&=15)?0:(r/8-.5)*t},void 0,void 0,function(e){j.DEBUG&&console.log(e.step,"ROFF[]"),e.round=Ut},void 0,function(e){j.DEBUG&&console.log(e.step,"RUTG[]"),e.round=Vt},function(e){j.DEBUG&&console.log(e.step,"RDTG[]"),e.round=zt},rr,rr,void 0,void 0,void 0,void 0,void 0,function(e){var t=e.stack.pop();j.DEBUG&&console.log(e.step,"SCANCTRL[]",t)},mr.bind(void 0,0),mr.bind(void 0,1),function(e){var t=e.stack,r=t.pop(),o=0;j.DEBUG&&console.log(e.step,"GETINFO[]",r),1&r&&(o=35),32&r&&(o|=4096),t.push(o)},void 0,function(e){var t=e.stack,r=t.pop(),o=t.pop(),n=t.pop();j.DEBUG&&console.log(e.step,"ROLL[]"),t.push(o),t.push(r),t.push(n)},function(e){var t=e.stack,r=t.pop(),o=t.pop();j.DEBUG&&console.log(e.step,"MAX[]",r,o),t.push(Math.max(o,r))},function(e){var t=e.stack,r=t.pop(),o=t.pop();j.DEBUG&&console.log(e.step,"MIN[]",r,o),t.push(Math.min(o,r))},function(e){var t=e.stack.pop();j.DEBUG&&console.log(e.step,"SCANTYPE[]",t)},function(e){var t=e.stack.pop(),r=e.stack.pop();switch(j.DEBUG&&console.log(e.step,"INSTCTRL[]",t,r),t){case 1:return void(e.inhibitGridFit=!!r);case 2:return void(e.ignoreCvt=!!r);default:throw new Error("invalid INSTCTRL[] selector")}},void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,k.bind(void 0,1),k.bind(void 0,2),k.bind(void 0,3),k.bind(void 0,4),k.bind(void 0,5),k.bind(void 0,6),k.bind(void 0,7),k.bind(void 0,8),C.bind(void 0,1),C.bind(void 0,2),C.bind(void 0,3),C.bind(void 0,4),C.bind(void 0,5),C.bind(void 0,6),C.bind(void 0,7),C.bind(void 0,8),O.bind(void 0,0,0,0,0,0),O.bind(void 0,0,0,0,0,1),O.bind(void 0,0,0,0,0,2),O.bind(void 0,0,0,0,0,3),O.bind(void 0,0,0,0,1,0),O.bind(void 0,0,0,0,1,1),O.bind(void 0,0,0,0,1,2),O.bind(void 0,0,0,0,1,3),O.bind(void 0,0,0,1,0,0),O.bind(void 0,0,0,1,0,1),O.bind(void 0,0,0,1,0,2),O.bind(void 0,0,0,1,0,3),O.bind(void 0,0,0,1,1,0),O.bind(void 0,0,0,1,1,1),O.bind(void 0,0,0,1,1,2),O.bind(void 0,0,0,1,1,3),O.bind(void 0,0,1,0,0,0),O.bind(void 0,0,1,0,0,1),O.bind(void 0,0,1,0,0,2),O.bind(void 0,0,1,0,0,3),O.bind(void 0,0,1,0,1,0),O.bind(void 0,0,1,0,1,1),O.bind(void 0,0,1,0,1,2),O.bind(void 0,0,1,0,1,3),O.bind(void 0,0,1,1,0,0),O.bind(void 0,0,1,1,0,1),O.bind(void 0,0,1,1,0,2),O.bind(void 0,0,1,1,0,3),O.bind(void 0,0,1,1,1,0),O.bind(void 0,0,1,1,1,1),O.bind(void 0,0,1,1,1,2),O.bind(void 0,0,1,1,1,3),O.bind(void 0,1,0,0,0,0),O.bind(void 0,1,0,0,0,1),O.bind(void 0,1,0,0,0,2),O.bind(void 0,1,0,0,0,3),O.bind(void 0,1,0,0,1,0),O.bind(void 0,1,0,0,1,1),O.bind(void 0,1,0,0,1,2),O.bind(void 0,1,0,0,1,3),O.bind(void 0,1,0,1,0,0),O.bind(void 0,1,0,1,0,1),O.bind(void 0,1,0,1,0,2),O.bind(void 0,1,0,1,0,3),O.bind(void 0,1,0,1,1,0),O.bind(void 0,1,0,1,1,1),O.bind(void 0,1,0,1,1,2),O.bind(void 0,1,0,1,1,3),O.bind(void 0,1,1,0,0,0),O.bind(void 0,1,1,0,0,1),O.bind(void 0,1,1,0,0,2),O.bind(void 0,1,1,0,0,3),O.bind(void 0,1,1,0,1,0),O.bind(void 0,1,1,0,1,1),O.bind(void 0,1,1,0,1,2),O.bind(void 0,1,1,0,1,3),O.bind(void 0,1,1,1,0,0),O.bind(void 0,1,1,1,0,1),O.bind(void 0,1,1,1,0,2),O.bind(void 0,1,1,1,0,3),O.bind(void 0,1,1,1,1,0),O.bind(void 0,1,1,1,1,1),O.bind(void 0,1,1,1,1,2),O.bind(void 0,1,1,1,1,3)],jr=Array.from||function(e){return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]?|[^\uD800-\uDFFF]|./g)||[]};function P(e){(e=e||{}).empty||(_(e.familyName,"When creating a new Font object, familyName is required."),_(e.styleName,"When creating a new Font object, styleName is required."),_(e.unitsPerEm,"When creating a new Font object, unitsPerEm is required."),_(e.ascender,"When creating a new Font object, ascender is required."),_(e.descender,"When creating a new Font object, descender is required."),_(e.descender<0,"Descender should be negative (e.g. -512)."),this.names={fontFamily:{en:e.familyName||" "},fontSubfamily:{en:e.styleName||" "},fullName:{en:e.fullName||e.familyName+" "+e.styleName},postScriptName:{en:e.postScriptName||(e.familyName+e.styleName).replace(/\s/g,"")},designer:{en:e.designer||" "},designerURL:{en:e.designerURL||" "},manufacturer:{en:e.manufacturer||" "},manufacturerURL:{en:e.manufacturerURL||" "},license:{en:e.license||" "},licenseURL:{en:e.licenseURL||" "},version:{en:e.version||"Version 0.1"},description:{en:e.description||" "},copyright:{en:e.copyright||" "},trademark:{en:e.trademark||" "}},this.unitsPerEm=e.unitsPerEm||1e3,this.ascender=e.ascender,this.descender=e.descender,this.createdTimestamp=e.createdTimestamp,this.tables={os2:{usWeightClass:e.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:e.widthClass||this.usWidthClasses.MEDIUM,fsSelection:e.fsSelection||this.fsSelectionValues.REGULAR}}),this.supported=!0,this.glyphs=new p.GlyphSet(this,e.glyphs||[]),this.encoding=new Ee(this),this.position=new kt(this),this.substitution=new i(this),this.tables=this.tables||{},Object.defineProperty(this,"hinting",{get:function(){return this._hinting||("truetype"===this.outlinesFormat?this._hinting=new Ft(this):void 0)}})}function _r(e,t){var r,o=JSON.stringify(e),n=256;for(r in t){var s=parseInt(r);if(s&&!(s<256)){if(JSON.stringify(t[r])===o)return s;n<=s&&(n=s+1)}}return t[n]=e,n}P.prototype.hasChar=function(e){return null!==this.encoding.charToGlyphIndex(e)},P.prototype.charToGlyphIndex=function(e){return this.encoding.charToGlyphIndex(e)},P.prototype.charToGlyph=function(e){e=this.charToGlyphIndex(e);return this.glyphs.get(e)||this.glyphs.get(0)},P.prototype.stringToGlyphs=function(e,t){t=t||this.defaultRenderOptions;for(var r=jr(e),o=[],n=0;n<r.length;n+=1){var s=r[n];o.push(this.charToGlyphIndex(s))}var i=o.length;if(t.features){var e=t.script||this.substitution.getDefaultScriptName(),a=[];t.features.liga&&(a=a.concat(this.substitution.getFeature("liga",e,t.language))),t.features.rlig&&(a=a.concat(this.substitution.getFeature("rlig",e,t.language)));for(var l=0;l<i;l+=1)for(var u=0;u<a.length;u++){for(var c=a[u],d=c.sub,h=d.length,f=0;f<h&&d[f]===o[l+f];)f++;f===h&&(o.splice(l,h,c.by),i=i-h+1)}}for(var p=new Array(i),m=this.glyphs.get(0),y=0;y<i;y+=1)p[y]=this.glyphs.get(o[y])||m;return p},P.prototype.nameToGlyphIndex=function(e){return this.glyphNames.nameToGlyphIndex(e)},P.prototype.nameToGlyph=function(e){e=this.nameToGlyphIndex(e);return this.glyphs.get(e)||this.glyphs.get(0)},P.prototype.glyphIndexToName=function(e){return this.glyphNames.glyphIndexToName?this.glyphNames.glyphIndexToName(e):""},P.prototype.getKerningValue=function(e,t){e=e.index||e,t=t.index||t;var r=this.position.defaultKerningTables;return r?this.position.getKerningValue(r,e,t):this.kerningPairs[e+","+t]||0},P.prototype.defaultRenderOptions={kerning:!0,features:{liga:!0,rlig:!0}},P.prototype.forEachGlyph=function(e,t,r,o,n,s){t=void 0!==t?t:0,r=void 0!==r?r:0,n=n||this.defaultRenderOptions;var i,a=1/this.unitsPerEm*(o=void 0!==o?o:72),l=this.stringToGlyphs(e,n);n.kerning&&(e=n.script||this.position.getDefaultScriptName(),i=this.position.getKerningTables(e,n.language));for(var u=0;u<l.length;u+=1){var c=l[u];s.call(this,c,t,r,o,n),c.advanceWidth&&(t+=c.advanceWidth*a),n.kerning&&u<l.length-1&&(t+=(i?this.position.getKerningValue(i,c.index,l[u+1].index):this.getKerningValue(c,l[u+1]))*a),n.letterSpacing?t+=n.letterSpacing*o:n.tracking&&(t+=n.tracking/1e3*o)}return t},P.prototype.getPath=function(e,t,r,o,n){var s=new h;return this.forEachGlyph(e,t,r,o,n,function(e,t,r,o){e=e.getPath(t,r,o,n,this);s.extend(e)}),s},P.prototype.getPaths=function(e,t,r,o,n){var s=[];return this.forEachGlyph(e,t,r,o,n,function(e,t,r,o){e=e.getPath(t,r,o,n,this);s.push(e)}),s},P.prototype.getAdvanceWidth=function(e,t,r){return this.forEachGlyph(e,0,0,t,r,function(){})},P.prototype.draw=function(e,t,r,o,n,s){this.getPath(t,r,o,n,s).draw(e)},P.prototype.drawPoints=function(n,e,t,r,o,s){this.forEachGlyph(e,t,r,o,s,function(e,t,r,o){e.drawPoints(n,t,r,o)})},P.prototype.drawMetrics=function(n,e,t,r,o,s){this.forEachGlyph(e,t,r,o,s,function(e,t,r,o){e.drawMetrics(n,t,r,o)})},P.prototype.getEnglishName=function(e){e=this.names[e];if(e)return e.en},P.prototype.validate=function(){var t=this;function e(e){e=t.getEnglishName(e);e&&e.trim().length}e("fontFamily"),e("weightName"),e("manufacturer"),e("copyright"),e("version"),this.unitsPerEm},P.prototype.toTables=function(){return wt.fontToTable(this)},P.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()},P.prototype.toArrayBuffer=function(){for(var e=this.toTables().encode(),t=new ArrayBuffer(e.length),r=new Uint8Array(t),o=0;o<e.length;o++)r[o]=e[o];return t},P.prototype.download=function(t){var e=this.getEnglishName("fontFamily"),r=this.getEnglishName("fontSubfamily"),o=(t=t||e.replace(/\s/g,"")+"-"+r+".otf",this.toArrayBuffer());"undefined"!=typeof window?(window.requestFileSystem=window.requestFileSystem||window.webkitRequestFileSystem,window.requestFileSystem(window.TEMPORARY,o.byteLength,function(e){e.root.getFile(t,{create:!0},function(r){r.createWriter(function(e){var t=new DataView(o),t=new Blob([t],{type:"font/opentype"});e.write(t),e.addEventListener("writeend",function(){location.href=r.toURL()},!1)})})},function(e){throw new Error(e.name+": "+e.message)})):(e=Ar("fs"),r=function(e){for(var t=new Pr(e.byteLength),r=new Uint8Array(e),o=0;o<t.length;++o)t[o]=r[o];return t}(o),e.writeFileSync(t,r))},P.prototype.fsSelectionValues={ITALIC:1,UNDERSCORE:2,NEGATIVE:4,OUTLINED:8,STRIKEOUT:16,BOLD:32,REGULAR:64,USER_TYPO_METRICS:128,WWS:256,OBLIQUE:512},P.prototype.usWidthClasses={ULTRA_CONDENSED:1,EXTRA_CONDENSED:2,CONDENSED:3,SEMI_CONDENSED:4,MEDIUM:5,SEMI_EXPANDED:6,EXPANDED:7,EXTRA_EXPANDED:8,ULTRA_EXPANDED:9},P.prototype.usWeightClasses={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900};var xr={make:function(e,t){var r=new S.Table("fvar",[{name:"version",type:"ULONG",value:65536},{name:"offsetToData",type:"USHORT",value:0},{name:"countSizePairs",type:"USHORT",value:2},{name:"axisCount",type:"USHORT",value:e.axes.length},{name:"axisSize",type:"USHORT",value:20},{name:"instanceCount",type:"USHORT",value:e.instances.length},{name:"instanceSize",type:"USHORT",value:4+4*e.axes.length}]);r.offsetToData=r.sizeOf();for(var o,n,s,i=0;i<e.axes.length;i++)r.fields=r.fields.concat((o=i,n=e.axes[i],s=t,s=_r(n.name,t),[{name:"tag_"+o,type:"TAG",value:n.tag},{name:"minValue_"+o,type:"FIXED",value:n.minValue<<16},{name:"defaultValue_"+o,type:"FIXED",value:n.defaultValue<<16},{name:"maxValue_"+o,type:"FIXED",value:n.maxValue<<16},{name:"flags_"+o,type:"USHORT",value:0},{name:"nameID_"+o,type:"USHORT",value:s}]));for(var a=0;a<e.instances.length;a++)r.fields=r.fields.concat(function(e,t,r,o){for(var n=[{name:"nameID_"+e,type:"USHORT",value:_r(t.name,o)},{name:"flags_"+e,type:"USHORT",value:0}],s=0;s<r.length;++s){var i=r[s].tag;n.push({name:"axis_"+e+" "+i,type:"FIXED",value:t.coordinates[i]<<16})}return n}(a,e.instances[a],e.axes,t));return r},parse:function(e,t,r){for(var o,n,s,i,a=new R.Parser(e,t),l=a.parseULong(),u=(L.argument(65536===l,"Unsupported fvar table version."),a.parseOffset16()),c=(a.skip("uShort",1),a.parseUShort()),d=a.parseUShort(),h=a.parseUShort(),f=a.parseUShort(),p=[],m=0;m<c;m++)p.push((o=e,n=t+u+m*d,s=r,void 0,i={},o=new R.Parser(o,n),i.tag=o.parseTag(),i.minValue=o.parseFixed(),i.defaultValue=o.parseFixed(),i.maxValue=o.parseFixed(),o.skip("uShort",1),i.name=s[o.parseUShort()]||{},i));for(var y=[],g=t+u+c*d,v=0;v<h;v++)y.push(function(e,t,r,o){var n={},s=new R.Parser(e,t);n.name=o[s.parseUShort()]||{},s.skip("uShort",1),n.coordinates={};for(var i=0;i<r.length;++i)n.coordinates[r[i].tag]=s.parseFixed();return n}(e,g+v*f,p,r));return{axes:p,instances:y}}},A=new Array(10);A[1]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{posFormat:1,coverage:this.parsePointer(u.coverage),value:this.parseValueRecord()}:2===t?{posFormat:2,coverage:this.parsePointer(u.coverage),values:this.parseValueRecordList()}:void L.assert(!1,"0x"+e.toString(16)+": GPOS lookup type 1 format must be 1 or 2.")},A[2]=function(){var e,t,r,o,n=this.offset+this.relativeOffset,s=this.parseUShort(),n=(L.assert(1===s||2===s,"0x"+n.toString(16)+": GPOS lookup type 2 format must be 1 or 2."),this.parsePointer(u.coverage)),i=this.parseUShort(),a=this.parseUShort();return 1===s?{posFormat:s,coverage:n,valueFormat1:i,valueFormat2:a,pairSets:this.parseList(u.pointer(u.list(function(){return{secondGlyph:this.parseUShort(),value1:this.parseValueRecord(i),value2:this.parseValueRecord(a)}})))}:2===s?(e=this.parsePointer(u.classDef),t=this.parsePointer(u.classDef),r=this.parseUShort(),o=this.parseUShort(),{posFormat:s,coverage:n,valueFormat1:i,valueFormat2:a,classDef1:e,classDef2:t,class1Count:r,class2Count:o,classRecords:this.parseList(r,u.list(o,function(){return{value1:this.parseValueRecord(i),value2:this.parseValueRecord(a)}}))}):void 0},A[3]=function(){return{error:"GPOS Lookup 3 not supported"}},A[4]=function(){return{error:"GPOS Lookup 4 not supported"}},A[5]=function(){return{error:"GPOS Lookup 5 not supported"}},A[6]=function(){return{error:"GPOS Lookup 6 not supported"}},A[7]=function(){return{error:"GPOS Lookup 7 not supported"}},A[8]=function(){return{error:"GPOS Lookup 8 not supported"}},A[9]=function(){return{error:"GPOS Lookup 9 not supported"}};var wr=new Array(10);var Sr={parse:function(e,t){return t=(e=new u(e,t=t||0)).parseVersion(1),L.argument(1===t||1.1===t,"Unsupported GPOS table version "+t),1===t?{version:t,scripts:e.parseScriptList(),features:e.parseFeatureList(),lookups:e.parseLookupList(A)}:{version:t,scripts:e.parseScriptList(),features:e.parseFeatureList(),lookups:e.parseLookupList(A),variations:e.parseFeatureVariationsList()}},make:function(e){return new S.Table("GPOS",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new S.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new S.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new S.LookupList(e.lookups,wr)}])}};var Tr={parse:function(e,t){if(e=new R.Parser(e,t),0===(t=e.parseUShort())){var r=e,o={},n=(r.skip("uShort"),r.parseUShort()),s=(L.argument(0===n,"Unsupported kern sub-table version."),r.skip("uShort",2),r.parseUShort());r.skip("uShort",3);for(var i=0;i<s;i+=1){var a=r.parseUShort(),l=r.parseUShort(),u=r.parseShort();o[a+","+l]=u}return o}if(1!==t)throw new Error("Unsupported kern table version ("+t+").");var c=e,d={},n=(c.skip("uShort"),1<c.parseULong()&&console.warn("Only the first kern subtable is supported."),c.skip("uLong"),255&c.parseUShort());if(c.skip("uShort"),0==n){var h=c.parseUShort();c.skip("uShort",3);for(var f=0;f<h;f+=1){var p=c.parseUShort(),m=c.parseUShort(),y=c.parseShort();d[p+","+m]=y}}return d}};var Mr={parse:function(e,t,r,o){for(var n=new R.Parser(e,t),s=o?n.parseUShort:n.parseULong,i=[],a=0;a<r+1;a+=1){var l=s.call(n);o&&(l*=2),i.push(l)}return i}};function Er(e,r){Ar("fs").readFile(e,function(e,t){if(e)return r(e.message);r(null,Ot(t))})}function kr(e,t){var r=new XMLHttpRequest;r.open("get",e,!0),r.responseType="arraybuffer",r.onload=function(){return r.response?t(null,r.response):t("Font could not be loaded: "+r.statusText)},r.onerror=function(){t("Font could not be loaded")},r.send()}function Cr(e,t){for(var r=[],o=12,n=0;n<t;n+=1){var s=R.getTag(e,o),i=R.getULong(e,o+4),a=R.getULong(e,o+8),l=R.getULong(e,o+12);r.push({tag:s,checksum:i,offset:a,length:l,compression:!1}),o+=16}return r}function I(e,t){if("WOFF"!==t.compression)return{data:e,offset:t.offset};var e=new Uint8Array(e.buffer,t.offset+2,t.compressedLength-2),r=new Uint8Array(t.length);if(re(e,r),r.byteLength!==t.length)throw new Error("Decompression error: "+t.tag+" decompressed length doesn't match recorded length");return{data:new DataView(r.buffer,0),offset:0}}function Or(e){var t,r,o,n,s,i,a,l,u,c,d,h,f,p,m=new P({empty:!0}),y=new DataView(e,0),g=[],e=R.getTag(y,0);if(e===String.fromCharCode(0,1,0,0)||"true"===e||"typ1"===e)m.outlinesFormat="truetype",g=Cr(y,o=R.getUShort(y,4));else if("OTTO"===e)m.outlinesFormat="cff",g=Cr(y,o=R.getUShort(y,4));else{if("wOFF"!==e)throw new Error("Unsupported OpenType signature "+e);var v=R.getTag(y,4);if(v===String.fromCharCode(0,1,0,0))m.outlinesFormat="truetype";else{if("OTTO"!==v)throw new Error("Unsupported OpenType flavor "+e);m.outlinesFormat="cff"}g=function(e,t){for(var r=[],o=44,n=0;n<t;n+=1){var s=R.getTag(e,o),i=R.getULong(e,o+4),a=R.getULong(e,o+8),l=R.getULong(e,o+12),u=void 0,u=a<l&&"WOFF";r.push({tag:s,offset:i,compression:u,compressedLength:a,length:l}),o+=20}return r}(y,o=R.getUShort(y,12))}for(var b=0;b<o;b+=1){var j=g[b],_=void 0;switch(j.tag){case"cmap":_=I(y,j),m.tables.cmap=we.parse(_.data,_.offset),m.encoding=new ke(m.tables.cmap);break;case"cvt ":_=I(y,j),p=new R.Parser(_.data,_.offset),m.tables.cvt=p.parseShortList(j.length/2);break;case"fvar":s=j;break;case"fpgm":_=I(y,j),p=new R.Parser(_.data,_.offset),m.tables.fpgm=p.parseByteList(j.length);break;case"head":_=I(y,j),m.tables.head=Ze.parse(_.data,_.offset),m.unitsPerEm=m.tables.head.unitsPerEm,t=m.tables.head.indexToLocFormat;break;case"hhea":_=I(y,j),m.tables.hhea=Qe.parse(_.data,_.offset),m.ascender=m.tables.hhea.ascender,m.descender=m.tables.hhea.descender,m.numberOfHMetrics=m.tables.hhea.numberOfHMetrics;break;case"hmtx":u=j;break;case"ltag":_=I(y,j),r=Ke.parse(_.data,_.offset);break;case"maxp":_=I(y,j),m.tables.maxp=$e.parse(_.data,_.offset),m.numGlyphs=m.tables.maxp.numGlyphs;break;case"name":h=j;break;case"OS/2":_=I(y,j),m.tables.os2=ft.parse(_.data,_.offset);break;case"post":_=I(y,j),m.tables.post=pt.parse(_.data,_.offset),m.glyphNames=new Oe(m.tables.post);break;case"prep":_=I(y,j),p=new R.Parser(_.data,_.offset),m.tables.prep=p.parseByteList(j.length);break;case"glyf":i=j;break;case"loca":d=j;break;case"CFF ":n=j;break;case"kern":c=j;break;case"GPOS":a=j;break;case"GSUB":l=j;break;case"meta":f=j}}v=I(y,h);if(m.tables.name=dt.parse(v.data,v.offset,r),m.names=m.tables.name,i&&d){e=0===t,v=I(y,d),v=Mr.parse(v.data,v.offset,m.numGlyphs,e),e=I(y,i);m.glyphs=Dt.parse(e.data,e.offset,v,m)}else{if(!n)throw new Error("Font doesn't contain TrueType or CFF outlines.");e=I(y,n);Ye.parse(e.data,e.offset,m)}for(var v=I(y,u),x=(Je.parse(v.data,v.offset,m.numberOfHMetrics,m.numGlyphs,m.glyphs),m),w=x.tables.cmap.glyphIndexMap,S=Object.keys(w),T=0;T<S.length;T+=1){var M,E=S[T],k=w[E];(M=x.glyphs.get(k)).addUnicode(parseInt(E))}for(var C=0;C<x.glyphs.length;C+=1)M=x.glyphs.get(C),x.cffEncoding?x.isCIDFont?M.name="gid"+C:M.name=x.cffEncoding.charset[C]:x.glyphNames.names&&(M.name=x.glyphNames.glyphIndexToName(C));return c?(e=I(y,c),m.kerningPairs=Tr.parse(e.data,e.offset)):m.kerningPairs={},a&&(v=I(y,a),m.tables.gpos=Sr.parse(v.data,v.offset),m.position.init()),l&&(e=I(y,l),m.tables.gsub=yt.parse(e.data,e.offset)),s&&(v=I(y,s),m.tables.fvar=xr.parse(v.data,v.offset,m.names)),f&&(e=I(y,f),m.tables.meta=gt.parse(e.data,e.offset),m.metas=m.tables.meta),m}j.Font=P,j.Glyph=f,j.Path=h,j.BoundingBox=a,j._parse=R,j.parse=Or,j.load=function(e,o){("undefined"==typeof window?Er:kr)(e,function(e,t){if(e)return o(e);var r;try{r=Or(t)}catch(e){return o(e,null)}return o(null,r)})},j.loadSync=function(e){return Or(Ot(Ar("fs").readFileSync(e)))},Object.defineProperty(j,"__esModule",{value:!0})},"object"==typeof o&&void 0!==r?t(o):"function"==typeof s&&s.amd?s(["exports"],t):t(e.opentype={})}.call(this,Ar("buffer").Buffer)},{buffer:4,fs:2}],250:[function(e,t,u){!function(n){function s(e,t){for(var r=0,o=e.length-1;0<=o;o--){var n=e[o];"."===n?e.splice(o,1):".."===n?(e.splice(o,1),r++):r&&(e.splice(o,1),r--)}if(t)for(;r--;)e.unshift("..");return e}function i(e,t){if(e.filter)return e.filter(t);for(var r=[],o=0;o<e.length;o++)t(e[o],o,e)&&r.push(e[o]);return r}u.resolve=function(){for(var e="",t=!1,r=arguments.length-1;-1<=r&&!t;r--){var o=0<=r?arguments[r]:n.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(e=o+"/"+e,t="/"===o.charAt(0))}return(t?"/":"")+(e=s(i(e.split("/"),function(e){return!!e}),!t).join("/"))||"."},u.normalize=function(e){var t=u.isAbsolute(e),r="/"===o(e,-1);return(e=(e=s(i(e.split("/"),function(e){return!!e}),!t).join("/"))||t?e:".")&&r&&(e+="/"),(t?"/":"")+e},u.isAbsolute=function(e){return"/"===e.charAt(0)},u.join=function(){var e=Array.prototype.slice.call(arguments,0);return u.normalize(i(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},u.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=u.resolve(e).substr(1),t=u.resolve(t).substr(1);for(var o=r(e.split("/")),n=r(t.split("/")),s=Math.min(o.length,n.length),i=s,a=0;a<s;a++)if(o[a]!==n[a]){i=a;break}for(var l=[],a=i;a<o.length;a++)l.push("..");return(l=l.concat(n.slice(i))).join("/")},u.sep="/",u.delimiter=":",u.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=47===e.charCodeAt(0),r=-1,o=!0,n=e.length-1;1<=n;--n)if(47===e.charCodeAt(n)){if(!o){r=n;break}}else o=!1;return-1===r?t?"/":".":t&&1===r?"/":e.slice(0,r)},u.basename=function(e,t){e=function(e){"string"!=typeof e&&(e+="");for(var t=0,r=-1,o=!0,n=e.length-1;0<=n;--n)if(47===e.charCodeAt(n)){if(!o){t=n+1;break}}else-1===r&&(o=!1,r=n+1);return-1===r?"":e.slice(t,r)}(e);return e=t&&e.substr(-1*t.length)===t?e.substr(0,e.length-t.length):e},u.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,r=0,o=-1,n=!0,s=0,i=e.length-1;0<=i;--i){var a=e.charCodeAt(i);if(47===a){if(n)continue;r=i+1;break}-1===o&&(n=!1,o=i+1),46===a?-1===t?t=i:1!==s&&(s=1):-1!==t&&(s=-1)}return-1===t||-1===o||0===s||1===s&&t===o-1&&t===r+1?"":e.slice(t,o)};var o="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:251}],251:[function(e,t,r){var o,n,t=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}try{o="function"==typeof setTimeout?setTimeout:s}catch(e){o=s}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}function a(t){if(o===setTimeout)return setTimeout(t,0);if((o===s||!o)&&setTimeout)return(o=setTimeout)(t,0);try{return o(t,0)}catch(e){try{return o.call(null,t,0)}catch(e){return o.call(this,t,0)}}}var l,u=[],c=!1,d=-1;function h(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&f())}function f(){if(!c){for(var e=a(h),t=(c=!0,u.length);t;){for(l=u,u=[];++d<t;)l&&l[d].run();d=-1,t=u.length}l=null,c=!1,!function(t){if(n===clearTimeout)return clearTimeout(t);if((n===i||!n)&&clearTimeout)return(n=clearTimeout)(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}t.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];u.push(new p(e,t)),1!==u.length||c||a(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=m,t.addListener=m,t.once=m,t.off=m,t.removeListener=m,t.removeAllListeners=m,t.emit=m,t.prependListener=m,t.prependOnceListener=m,t.listeners=function(e){return[]},t.binding=function(e){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(e){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},{}],252:[function(e,t,r){t=function(s){"use strict";var l,e=Object.prototype,u=e.hasOwnProperty,t="function"==typeof Symbol?Symbol:{},o=t.iterator||"@@iterator",r=t.asyncIterator||"@@asyncIterator",n=t.toStringTag||"@@toStringTag";function i(e,t,r,o){var n,s,i,a,t=t&&t.prototype instanceof y?t:y,t=Object.create(t.prototype),o=new S(o||[]);return t._invoke=(n=e,s=r,i=o,a=d,function(e,t){if(a===f)throw new Error("Generator is already running");if(a===p){if("throw"===e)throw t;return M()}for(i.method=e,i.arg=t;;){var r=i.delegate;if(r){r=function e(t,r){var o=t.iterator[r.method];if(o===l){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=l,e(t,r),"throw"===r.method))return m;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}o=c(o,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;o=o.arg;if(!o)return r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m;{if(!o.done)return o;r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=l)}r.delegate=null;return m}(r,i);if(r){if(r===m)continue;return r}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(a===d)throw a=p,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a=f;r=c(n,s,i);if("normal"===r.type){if(a=i.done?p:h,r.arg!==m)return{value:r.arg,done:i.done}}else"throw"===r.type&&(a=p,i.method="throw",i.arg=r.arg)}}),t}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}s.wrap=i;var d="suspendedStart",h="suspendedYield",f="executing",p="completed",m={};function y(){}function a(){}function g(){}var t={},v=(t[o]=function(){return this},Object.getPrototypeOf),v=v&&v(v(T([]))),b=(v&&v!==e&&u.call(v,o)&&(t=v),g.prototype=y.prototype=Object.create(t));function j(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function _(i){var t;this._invoke=function(r,o){function e(){return new Promise(function(e,t){!function t(e,r,o,n){var s,e=c(i[e],i,r);if("throw"!==e.type)return(r=(s=e.arg).value)&&"object"==typeof r&&u.call(r,"__await")?Promise.resolve(r.__await).then(function(e){t("next",e,o,n)},function(e){t("throw",e,o,n)}):Promise.resolve(r).then(function(e){s.value=e,o(s)},function(e){return t("throw",e,o,n)});n(e.arg)}(r,o,e,t)})}return t=t?t.then(e,e):e()}}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function T(t){if(t){var r,e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return r=-1,(e=function e(){for(;++r<t.length;)if(u.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=l,e.done=!0,e}).next=e}return{next:M}}function M(){return{value:l,done:!0}}return(a.prototype=b.constructor=g).constructor=a,g[n]=a.displayName="GeneratorFunction",s.isGeneratorFunction=function(e){e="function"==typeof e&&e.constructor;return!!e&&(e===a||"GeneratorFunction"===(e.displayName||e.name))},s.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,n in e||(e[n]="GeneratorFunction")),e.prototype=Object.create(b),e},s.awrap=function(e){return{__await:e}},j(_.prototype),_.prototype[r]=function(){return this},s.AsyncIterator=_,s.async=function(e,t,r,o){var n=new _(i(e,t,r,o));return s.isGeneratorFunction(t)?n:n.next().then(function(e){return e.done?e.value:n.next()})},j(b),b[n]="Generator",b[o]=function(){return this},b.toString=function(){return"[object Generator]"},s.keys=function(r){var e,o=[];for(e in r)o.push(e);return o.reverse(),function e(){for(;o.length;){var t=o.pop();if(t in r)return e.value=t,e.done=!1,e}return e.done=!0,e}},s.values=T,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=l,this.done=!1,this.delegate=null,this.method="next",this.arg=l,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&u.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=l)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var o=this;function e(e,t){return s.type="throw",s.arg=r,o.next=e,t&&(o.method="next",o.arg=l),!!t}for(var t=this.tryEntries.length-1;0<=t;--t){var n=this.tryEntries[t],s=n.completion;if("root"===n.tryLoc)return e("end");if(n.tryLoc<=this.prev){var i=u.call(n,"catchLoc"),a=u.call(n,"finallyLoc");if(i&&a){if(this.prev<n.catchLoc)return e(n.catchLoc,!0);if(this.prev<n.finallyLoc)return e(n.finallyLoc)}else if(i){if(this.prev<n.catchLoc)return e(n.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return e(n.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;0<=r;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&u.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var n=o;break}}var s=(n=n&&("break"===e||"continue"===e)&&n.tryLoc<=t&&t<=n.finallyLoc?null:n)?n.completion:{};return s.type=e,s.arg=t,n?(this.method="next",this.next=n.finallyLoc,m):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),w(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r,o,n=this.tryEntries[t];if(n.tryLoc===e)return"throw"===(r=n.completion).type&&(o=r.arg,w(n)),o}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:T(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=l),m}},s}("object"==typeof t?t.exports:{});try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},{}],253:[function(e,t,r){!function(e){"use strict";var t,r,i,o,n,s,a,l,u,c;function d(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function h(e){return e="string"!=typeof e?String(e):e}function f(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r&&(e[Symbol.iterator]=function(){return e}),e}function p(t){this.map={},t instanceof p?t.forEach(function(e,t){this.append(t,e)},this):Array.isArray(t)?t.forEach(function(e){this.append(e[0],e[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function m(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function y(r){return new Promise(function(e,t){r.onload=function(){e(r.result)},r.onerror=function(){t(r.error)}})}function g(e){var t=new FileReader,r=y(t);return t.readAsArrayBuffer(e),r}function v(e){var t;return e.slice?e.slice(0):((t=new Uint8Array(e.byteLength)).set(new Uint8Array(e)),t.buffer)}function b(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e)if("string"==typeof e)this._bodyText=e;else if(i&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(o&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(n&&i&&a(e))this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!n||!ArrayBuffer.prototype.isPrototypeOf(e)&&!l(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=v(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=m(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e,t,r=m(this);if(r)return r;if(this._bodyBlob)return r=this._bodyBlob,e=new FileReader,t=y(e),e.readAsText(r),t;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),o=0;o<t.length;o++)r[o]=String.fromCharCode(t[o]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(_)}),this.json=function(){return this.text().then(JSON.parse)},this}function j(e,t){var r,o=(t=t||{}).body;if(e instanceof j){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new p(e.headers)),this.method=e.method,this.mode=e.mode,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new p(t.headers)),this.method=(e=t.method||this.method||"GET",r=e.toUpperCase(),-1<u.indexOf(r)?r:e),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function _(e){var r=new FormData;return e.trim().split("&").forEach(function(e){var t;e&&(t=(e=e.split("=")).shift().replace(/\+/g," "),e=e.join("=").replace(/\+/g," "),r.append(decodeURIComponent(t),decodeURIComponent(e)))}),r}function x(e,t){t=t||{},this.type="default",this.status=void 0===t.status?200:t.status,this.ok=200<=this.status&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}e.fetch||(t="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in e,(n="ArrayBuffer"in e)&&(s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=function(e){return e&&DataView.prototype.isPrototypeOf(e)},l=ArrayBuffer.isView||function(e){return e&&-1<s.indexOf(Object.prototype.toString.call(e))}),p.prototype.append=function(e,t){e=d(e),t=h(t);var r=this.map[e];this.map[e]=r?r+","+t:t},p.prototype.delete=function(e){delete this.map[d(e)]},p.prototype.get=function(e){return e=d(e),this.has(e)?this.map[e]:null},p.prototype.has=function(e){return this.map.hasOwnProperty(d(e))},p.prototype.set=function(e,t){this.map[d(e)]=h(t)},p.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},p.prototype.keys=function(){var r=[];return this.forEach(function(e,t){r.push(t)}),f(r)},p.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),f(t)},p.prototype.entries=function(){var r=[];return this.forEach(function(e,t){r.push([t,e])}),f(r)},r&&(p.prototype[Symbol.iterator]=p.prototype.entries),u=["DELETE","GET","HEAD","OPTIONS","POST","PUT"],j.prototype.clone=function(){return new j(this,{body:this._bodyInit})},b.call(j.prototype),b.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},x.error=function(){var e=new x(null,{status:0,statusText:""});return e.type="error",e},c=[301,302,303,307,308],x.redirect=function(e,t){if(-1===c.indexOf(t))throw new RangeError("Invalid status code");return new x(null,{status:t,headers:{location:e}})},e.Headers=p,e.Request=j,e.Response=x,e.fetch=function(r,s){return new Promise(function(o,e){var t=new j(r,s),n=new XMLHttpRequest;n.onload=function(){var r,e={status:n.status,statusText:n.statusText,headers:(e=n.getAllResponseHeaders()||"",r=new p,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(e){var e=e.split(":"),t=e.shift().trim();t&&(e=e.join(":").trim(),r.append(t,e))}),r)},t=(e.url="responseURL"in n?n.responseURL:e.headers.get("X-Request-URL"),"response"in n?n.response:n.responseText);o(new x(t,e))},n.onerror=function(){e(new TypeError("Network request failed"))},n.ontimeout=function(){e(new TypeError("Network request failed"))},n.open(t.method,t.url,!0),"include"===t.credentials?n.withCredentials=!0:"omit"===t.credentials&&(n.withCredentials=!1),"responseType"in n&&i&&(n.responseType="blob"),t.headers.forEach(function(e,t){n.setRequestHeader(t,e)}),n.send(void 0===t._bodyInit?null:t._bodyInit)})},e.fetch.polyfill=!0)}("undefined"!=typeof self?self:this)},{}],254:[function(e,t,r){"use strict";e("core-js/modules/es.function.name"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.split"),e("core-js/modules/es.function.name"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.split"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var l,o=n(e("../core/main")),u=n(e("../color/color_conversion"));function n(e){return e&&e.__esModule?e:{default:e}}var c=[{h:0,s:0,b:.8275,name:"gray"},{h:0,s:0,b:.8627,name:"gray"},{h:0,s:0,b:.7529,name:"gray"},{h:.0167,s:.1176,b:1,name:"light pink"}],d=[{h:0,s:0,b:0,name:"black"},{h:0,s:0,b:.5,name:"gray"},{h:0,s:0,b:1,name:"white"},{h:0,s:.5,b:.5,name:"dark maroon"},{h:0,s:.5,b:1,name:"salmon pink"},{h:0,s:1,b:0,name:"black"},{h:0,s:1,b:.5,name:"dark red"},{h:0,s:1,b:1,name:"red"},{h:5,s:0,b:1,name:"very light peach"},{h:5,s:.5,b:.5,name:"brown"},{h:5,s:.5,b:1,name:"peach"},{h:5,s:1,b:.5,name:"brick red"},{h:5,s:1,b:1,name:"crimson"},{h:10,s:0,b:1,name:"light peach"},{h:10,s:.5,b:.5,name:"brown"},{h:10,s:.5,b:1,name:"light orange"},{h:10,s:1,b:.5,name:"brown"},{h:10,s:1,b:1,name:"orange"},{h:15,s:0,b:1,name:"very light yellow"},{h:15,s:.5,b:.5,name:"olive green"},{h:15,s:.5,b:1,name:"light yellow"},{h:15,s:1,b:0,name:"dark olive green"},{h:15,s:1,b:.5,name:"olive green"},{h:15,s:1,b:1,name:"yellow"},{h:20,s:0,b:1,name:"very light yellow"},{h:20,s:.5,b:.5,name:"olive green"},{h:20,s:.5,b:1,name:"light yellow green"},{h:20,s:1,b:0,name:"dark olive green"},{h:20,s:1,b:.5,name:"dark yellow green"},{h:20,s:1,b:1,name:"yellow green"},{h:25,s:.5,b:.5,name:"dark yellow green"},{h:25,s:.5,b:1,name:"light green"},{h:25,s:1,b:.5,name:"dark green"},{h:25,s:1,b:1,name:"green"},{h:30,s:.5,b:1,name:"light green"},{h:30,s:1,b:.5,name:"dark green"},{h:30,s:1,b:1,name:"green"},{h:35,s:0,b:.5,name:"light green"},{h:35,s:0,b:1,name:"very light green"},{h:35,s:.5,b:.5,name:"dark green"},{h:35,s:.5,b:1,name:"light green"},{h:35,s:1,b:0,name:"very dark green"},{h:35,s:1,b:.5,name:"dark green"},{h:35,s:1,b:1,name:"green"},{h:40,s:0,b:1,name:"very light green"},{h:40,s:.5,b:.5,name:"dark green"},{h:40,s:.5,b:1,name:"light green"},{h:40,s:1,b:.5,name:"dark green"},{h:40,s:1,b:1,name:"green"},{h:45,s:.5,b:1,name:"light turquoise"},{h:45,s:1,b:.5,name:"dark turquoise"},{h:45,s:1,b:1,name:"turquoise"},{h:50,s:0,b:1,name:"light sky blue"},{h:50,s:.5,b:.5,name:"dark cyan"},{h:50,s:.5,b:1,name:"light cyan"},{h:50,s:1,b:.5,name:"dark cyan"},{h:50,s:1,b:1,name:"cyan"},{h:55,s:0,b:1,name:"light sky blue"},{h:55,s:.5,b:1,name:"light sky blue"},{h:55,s:1,b:.5,name:"dark blue"},{h:55,s:1,b:1,name:"sky blue"},{h:60,s:0,b:.5,name:"gray"},{h:60,s:0,b:1,name:"very light blue"},{h:60,s:.5,b:.5,name:"blue"},{h:60,s:.5,b:1,name:"light blue"},{h:60,s:1,b:.5,name:"navy blue"},{h:60,s:1,b:1,name:"blue"},{h:65,s:0,b:1,name:"lavender"},{h:65,s:.5,b:.5,name:"navy blue"},{h:65,s:.5,b:1,name:"light purple"},{h:65,s:1,b:.5,name:"dark navy blue"},{h:65,s:1,b:1,name:"blue"},{h:70,s:0,b:1,name:"lavender"},{h:70,s:.5,b:.5,name:"navy blue"},{h:70,s:.5,b:1,name:"lavender blue"},{h:70,s:1,b:.5,name:"dark navy blue"},{h:70,s:1,b:1,name:"blue"},{h:75,s:.5,b:1,name:"lavender"},{h:75,s:1,b:.5,name:"dark purple"},{h:75,s:1,b:1,name:"purple"},{h:80,s:.5,b:1,name:"pinkish purple"},{h:80,s:1,b:.5,name:"dark purple"},{h:80,s:1,b:1,name:"purple"},{h:85,s:0,b:1,name:"light pink"},{h:85,s:.5,b:.5,name:"purple"},{h:85,s:.5,b:1,name:"light fuchsia"},{h:85,s:1,b:.5,name:"dark fuchsia"},{h:85,s:1,b:1,name:"fuchsia"},{h:90,s:.5,b:.5,name:"dark fuchsia"},{h:90,s:.5,b:1,name:"hot pink"},{h:90,s:1,b:.5,name:"dark fuchsia"},{h:90,s:1,b:1,name:"fuchsia"},{h:95,s:0,b:1,name:"pink"},{h:95,s:.5,b:1,name:"light pink"},{h:95,s:1,b:.5,name:"dark magenta"},{h:95,s:1,b:1,name:"magenta"}];o.default.prototype._rgbColorName=function(e){var t,r,e=u.default._rgbaToHSBA(e),o=[(l=e)[0],e[1],e[2]];0!==o[0]&&(o[0]=Math.round(100*o[0]),(e=o[0].toString().split(""))[r=e.length-1]=parseInt(e[r]),e[r]<2.5?e[r]=0:2.5<=e[r]&&e[r]<7.5&&(e[r]=5),2===e.length?(e[0]=parseInt(e[0]),7.5<=e[r]&&(e[r]=0,e[0]=e[0]+1),o[0]=10*e[0]+e[1]):7.5<=e[r]?o[0]=10:o[0]=e[r]),o[2]=o[2]/255;for(var n=o.length-1;1<=n;n--)o[n]<=.25?o[n]=0:.25<o[n]&&o[n]<.75?o[n]=.5:o[n]=1;if(0===o[0]&&0===o[1]&&1===o[2]){for(var s=2;0<=s;s--)l[s]=Math.round(1e4*l[s])/1e4;for(var i=0;i<c.length;i++){if(c[i].h===l[0]&&c[i].s===l[1]&&c[i].b===l[2]){t=c[i].name;break}t="white"}}else for(var a=0;a<d.length;a++)if(d[a].h===o[0]&&d[a].s===o[1]&&d[a].b===o[2]){t=d[a].name;break}return t};e=o.default;r.default=e},{"../color/color_conversion":260,"../core/main":275,"core-js/modules/es.function.name":168,"core-js/modules/es.object.to-string":182,"core-js/modules/es.regexp.exec":187,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.split":198}],255:[function(e,t,r){"use strict";e("core-js/modules/es.array.concat"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.ends-with"),e("core-js/modules/es.string.replace"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.ends-with"),e("core-js/modules/es.string.replace"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var s=(e=e("../core/main"))&&e.__esModule?e:{default:e};var i="_Description",a="_fallbackDesc",l="_fallbackTable",u="_Label",c="_labelDesc",d="_labelTable";function h(e){if("label"===e||"fallback"===e)throw new Error("description should not be LABEL or FALLBACK");return e.endsWith(".")||e.endsWith(";")||e.endsWith(",")||e.endsWith("?")||e.endsWith("!")||(e+="."),e}s.default.prototype.describe=function(e,t){var r;s.default._validateParameters("describe",arguments),"string"==typeof e&&(r=this.canvas.id,e=h(e),this.dummyDOM||(this.dummyDOM=document.getElementById(r).parentNode),this.descriptions||(this.descriptions={}),this.descriptions.fallback?this.descriptions.fallback.innerHTML!==e&&(this.descriptions.fallback.innerHTML=e):this._describeHTML("fallback",e),t===this.LABEL&&(this.descriptions.label?this.descriptions.label.innerHTML!==e&&(this.descriptions.label.innerHTML=e):this._describeHTML("label",e)))},s.default.prototype.describeElement=function(e,t,r){var o,n;s.default._validateParameters("describeElement",arguments),"string"==typeof t&&"string"==typeof e&&(o=this.canvas.id,t=h(t),n=function(e){if("label"===e||"fallback"===e)throw new Error("element name should not be LABEL or FALLBACK");e.endsWith(".")||e.endsWith(";")||e.endsWith(",")?e=e.replace(/.$/,":"):e.endsWith(":")||(e+=":");return e}(e),e=e.replace(/[^a-zA-Z0-9]/g,""),n='<th scope="row">'.concat(n,"</th><td>").concat(t,"</td>"),this.dummyDOM||(this.dummyDOM=document.getElementById(o).parentNode),this.descriptions?this.descriptions.fallbackElements||(this.descriptions.fallbackElements={}):this.descriptions={fallbackElements:{}},this.descriptions.fallbackElements[e]?this.descriptions.fallbackElements[e].innerHTML!==n&&(this.descriptions.fallbackElements[e].innerHTML=n):this._describeElementHTML("fallback",e,n),r===this.LABEL&&(this.descriptions.labelElements||(this.descriptions.labelElements={}),this.descriptions.labelElements[e]?this.descriptions.labelElements[e].innerHTML!==n&&(this.descriptions.labelElements[e].innerHTML=n):this._describeElementHTML("label",e,n)))},s.default.prototype._describeHTML=function(e,t){var r,o=this.canvas.id;"fallback"===e?(this.dummyDOM.querySelector("#".concat(o+i))?this.dummyDOM.querySelector("#"+o+l).insertAdjacentHTML("beforebegin",'<p id="'.concat(o+a,'"></p>')):(r='<div id="'.concat(o).concat(i,'" role="region" aria-label="Canvas Description"><p id="').concat(o).concat(a,'"></p></div>'),this.dummyDOM.querySelector("#".concat(o,"accessibleOutput"))?this.dummyDOM.querySelector("#".concat(o,"accessibleOutput")).insertAdjacentHTML("beforebegin",r):this.dummyDOM.querySelector("#".concat(o)).innerHTML=r),this.descriptions.fallback=this.dummyDOM.querySelector("#".concat(o).concat(a)),this.descriptions.fallback.innerHTML=t):"label"===e&&(this.dummyDOM.querySelector("#".concat(o+u))?this.dummyDOM.querySelector("#".concat(o+d))&&this.dummyDOM.querySelector("#".concat(o+d)).insertAdjacentHTML("beforebegin",'<p id="'.concat(o).concat(c,'"></p>')):(r='<div id="'.concat(o).concat(u,'" class="p5Label"><p id="').concat(o).concat(c,'"></p></div>'),this.dummyDOM.querySelector("#".concat(o,"accessibleOutputLabel"))?this.dummyDOM.querySelector("#".concat(o,"accessibleOutputLabel")).insertAdjacentHTML("beforebegin",r):this.dummyDOM.querySelector("#"+o).insertAdjacentHTML("afterend",r)),this.descriptions.label=this.dummyDOM.querySelector("#"+o+c),this.descriptions.label.innerHTML=t)},s.default.prototype._describeElementHTML=function(e,t,r){var o,n=this.canvas.id;"fallback"===e?(this.dummyDOM.querySelector("#".concat(n+i))?this.dummyDOM.querySelector("#"+n+l)||this.dummyDOM.querySelector("#"+n+a).insertAdjacentHTML("afterend",'<table id="'.concat(n).concat(l,'"><caption>Canvas elements and their descriptions</caption></table>')):(o='<div id="'.concat(n).concat(i,'" role="region" aria-label="Canvas Description"><table id="').concat(n).concat(l,'"><caption>Canvas elements and their descriptions</caption></table></div>'),this.dummyDOM.querySelector("#".concat(n,"accessibleOutput"))?this.dummyDOM.querySelector("#".concat(n,"accessibleOutput")).insertAdjacentHTML("beforebegin",o):this.dummyDOM.querySelector("#"+n).innerHTML=o),(o=document.createElement("tr")).id=n+"_fte_"+t,this.dummyDOM.querySelector("#"+n+l).appendChild(o),this.descriptions.fallbackElements[t]=this.dummyDOM.querySelector("#".concat(n).concat("_fte_").concat(t)),this.descriptions.fallbackElements[t].innerHTML=r):"label"===e&&(this.dummyDOM.querySelector("#".concat(n+u))?this.dummyDOM.querySelector("#".concat(n+d))||this.dummyDOM.querySelector("#"+n+c).insertAdjacentHTML("afterend",'<table id="'.concat(n+d,'"></table>')):(o='<div id="'.concat(n).concat(u,'" class="p5Label"><table id="').concat(n).concat(d,'"></table></div>'),this.dummyDOM.querySelector("#".concat(n,"accessibleOutputLabel"))?this.dummyDOM.querySelector("#".concat(n,"accessibleOutputLabel")).insertAdjacentHTML("beforebegin",o):this.dummyDOM.querySelector("#"+n).insertAdjacentHTML("afterend",o)),(e=document.createElement("tr")).id=n+"_lte_"+t,this.dummyDOM.querySelector("#"+n+d).appendChild(e),this.descriptions.labelElements[t]=this.dummyDOM.querySelector("#".concat(n).concat("_lte_").concat(t)),this.descriptions.labelElements[t].innerHTML=r)};e=s.default;r.default=e},{"../core/main":275,"core-js/modules/es.array.concat":151,"core-js/modules/es.regexp.exec":187,"core-js/modules/es.string.ends-with":190,"core-js/modules/es.string.replace":196}],256:[function(e,t,r){"use strict";e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.from"),e("core-js/modules/es.array.map"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.from"),e("core-js/modules/es.array.map"),e("core-js/modules/es.string.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;e=(e=e("../core/main"))&&e.__esModule?e:{default:e};e.default.prototype._updateGridOutput=function(e){var t,r,o,n;this.dummyDOM.querySelector("#".concat(e,"_summary"))&&(t=this._accessibleOutputs[e],o=function(e,t,r,o){t="".concat(t," canvas, ").concat(r," by ").concat(o," pixels, contains ").concat(e[0]);t=(1===e[0]?"".concat(t," shape: "):"".concat(t," shapes: ")).concat(e[1]);return t}((r=function(e,t){var r,o="",n="",s=0;for(r in t){var i,a=0;for(i in t[r]){var l='<li id="'.concat(e,"shape").concat(s,'">').concat(t[r][i].color," ").concat(r,",");"line"===r?l+=" location = ".concat(t[r][i].pos,", length = ").concat(t[r][i].length," pixels"):(l+=" location = ".concat(t[r][i].pos),"point"!==r&&(l+=", area = ".concat(t[r][i].area," %")),l+="</li>"),o+=l,a++,s++}n=1<a?"".concat(n," ").concat(a," ").concat(r,"s"):"".concat(n," ").concat(a," ").concat(r)}return{numShapes:[s,n],details:o}}(e,this.ingredients.shapes)).numShapes,this.ingredients.colors.background,this.width,this.height),n=function(e,t){var r,o,n=0,s="",i=Array.from(Array(10),function(){return Array(10)});for(r in t)for(var a in t[r]){var l=void 0;l="line"!==r?'<a href="#'.concat(e,"shape").concat(n,'">').concat(t[r][a].color," ").concat(r,"</a>"):'<a href="#'.concat(e,"shape").concat(n,'">').concat(t[r][a].color," ").concat(r," midpoint</a>"),i[t[r][a].loc.locY][t[r][a].loc.locX]?i[t[r][a].loc.locY][t[r][a].loc.locX]=i[t[r][a].loc.locY][t[r][a].loc.locX]+" "+l:i[t[r][a].loc.locY][t[r][a].loc.locX]=l,n++}for(o in i){var u,c="<tr>";for(u in i[o])c+="<td>",void 0!==i[o][u]&&(c+=i[o][u]),c+="</td>";s=s+c+"</tr>"}return s}(e,this.ingredients.shapes),o!==t.summary.innerHTML&&(t.summary.innerHTML=o),n!==t.map.innerHTML&&(t.map.innerHTML=n),r.details!==t.shapeDetails.innerHTML&&(t.shapeDetails.innerHTML=r.details),this._accessibleOutputs[e]=t)};e=e.default;r.default=e},{"../core/main":275,"core-js/modules/es.array.concat":151,"core-js/modules/es.array.from":158,"core-js/modules/es.array.map":164,"core-js/modules/es.string.iterator":192}],257:[function(e,t,r){"use strict";e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.fill"),e("core-js/modules/es.array.from"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.map"),e("core-js/modules/es.number.to-fixed"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.fill"),e("core-js/modules/es.array.map"),e("core-js/modules/es.number.to-fixed"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=(e=e("../core/main"))&&e.__esModule?e:{default:e};function l(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function u(e,t,r){t=Math.floor(e[0]/t*10),e=Math.floor(e[1]/r*10);return 10===t&&(t-=1),10===e&&(e-=1),{locX:t,locY:e}}o.default.prototype.textOutput=function(e){o.default._validateParameters("textOutput",arguments),this._accessibleOutputs.text||(this._accessibleOutputs.text=!0,this._createOutput("textOutput","Fallback"),e===this.LABEL&&(this._accessibleOutputs.textLabel=!0,this._createOutput("textOutput","Label")))},o.default.prototype.gridOutput=function(e){o.default._validateParameters("gridOutput",arguments),this._accessibleOutputs.grid||(this._accessibleOutputs.grid=!0,this._createOutput("gridOutput","Fallback"),e===this.LABEL&&(this._accessibleOutputs.gridLabel=!0,this._createOutput("gridOutput","Label")))},o.default.prototype._addAccsOutput=function(){return this._accessibleOutputs||(this._accessibleOutputs={text:!1,grid:!1,textLabel:!1,gridLabel:!1}),this._accessibleOutputs.grid||this._accessibleOutputs.text},o.default.prototype._createOutput=function(e,t){var r,o,n,s=this.canvas.id,i=(this.ingredients||(this.ingredients={shapes:{},colors:{background:"white",fill:"white",stroke:"black"},pShapes:""}),this.dummyDOM||(this.dummyDOM=document.getElementById(s).parentNode),"");"Fallback"===t?(r=s+e,this.dummyDOM.querySelector("#".concat(o=s+"accessibleOutput"))||(this.dummyDOM.querySelector("#".concat(s,"_Description"))?this.dummyDOM.querySelector("#".concat(s,"_Description")).insertAdjacentHTML("afterend",'<div id="'.concat(o,'" role="region" aria-label="Canvas Outputs"></div>')):this.dummyDOM.querySelector("#".concat(s)).innerHTML='<div id="'.concat(o,'" role="region" aria-label="Canvas Outputs"></div>'))):"Label"===t&&(r=s+e+(i=t),this.dummyDOM.querySelector("#".concat(o=s+"accessibleOutput"+t))||(this.dummyDOM.querySelector("#".concat(s,"_Label"))?this.dummyDOM.querySelector("#".concat(s,"_Label")):this.dummyDOM.querySelector("#".concat(s))).insertAdjacentHTML("afterend",'<div id="'.concat(o,'"></div>'))),this._accessibleOutputs[r]={},"textOutput"===e?(i="#".concat(s,"gridOutput").concat(i),n='<div id="'.concat(r,'">Text Output<div id="').concat(r,'Summary" aria-label="text output summary"><p id="').concat(r,'_summary"></p><ul id="').concat(r,'_list"></ul></div><table id="').concat(r,'_shapeDetails" summary="text output shape details"></table></div>'),this.dummyDOM.querySelector(i)?this.dummyDOM.querySelector(i).insertAdjacentHTML("beforebegin",n):this.dummyDOM.querySelector("#".concat(o)).innerHTML=n,this._accessibleOutputs[r].list=this.dummyDOM.querySelector("#".concat(r,"_list"))):"gridOutput"===e&&(i="#".concat(s,"textOutput").concat(i),n='<div id="'.concat(r,'">Grid Output<p id="').concat(r,'_summary" aria-label="grid output summary"><table id="').concat(r,'_map" summary="grid output content"></table><ul id="').concat(r,'_shapeDetails" aria-label="grid output shape details"></ul></div>'),this.dummyDOM.querySelector(i)?this.dummyDOM.querySelector(i).insertAdjacentHTML("afterend",n):this.dummyDOM.querySelector("#".concat(o)).innerHTML=n,this._accessibleOutputs[r].map=this.dummyDOM.querySelector("#".concat(r,"_map"))),this._accessibleOutputs[r].shapeDetails=this.dummyDOM.querySelector("#".concat(r,"_shapeDetails")),this._accessibleOutputs[r].summary=this.dummyDOM.querySelector("#".concat(r,"_summary"))},o.default.prototype._updateAccsOutput=function(){var e=this.canvas.id;JSON.stringify(this.ingredients.shapes)!==this.ingredients.pShapes&&(this.ingredients.pShapes=JSON.stringify(this.ingredients.shapes),this._accessibleOutputs.text&&this._updateTextOutput(e+"textOutput"),this._accessibleOutputs.grid&&this._updateGridOutput(e+"gridOutput"),this._accessibleOutputs.textLabel&&this._updateTextOutput(e+"textOutputLabel"),this._accessibleOutputs.gridLabel&&this._updateGridOutput(e+"gridOutputLabel"))},o.default.prototype._accsBackground=function(e){this.ingredients.pShapes=JSON.stringify(this.ingredients.shapes),this.ingredients.shapes={},this.ingredients.colors.backgroundRGBA!==e&&(this.ingredients.colors.backgroundRGBA=e,this.ingredients.colors.background=this._rgbColorName(e))},o.default.prototype._accsCanvasColors=function(e,t){"fill"===e?this.ingredients.colors.fillRGBA!==t&&(this.ingredients.colors.fillRGBA=t,this.ingredients.colors.fill=this._rgbColorName(t)):"stroke"===e&&this.ingredients.colors.strokeRGBA!==t&&(this.ingredients.colors.strokeRGBA=t,this.ingredients.colors.stroke=this._rgbColorName(t))},o.default.prototype._accsOutput=function(e,t){"ellipse"===e&&t[2]===t[3]?e="circle":"rectangle"===e&&t[2]===t[3]&&(e="square");var r,o,n={},s=!0,i=function(e,t){var r;e="rectangle"===e||"ellipse"===e||"arc"===e||"circle"===e||"square"===e?(r=Math.round(t[0]+t[2]/2),Math.round(t[1]+t[3]/2)):"triangle"===e?(r=(t[0]+t[2]+t[4])/3,(t[1]+t[3]+t[5])/3):"quadrilateral"===e?(r=(t[0]+t[2]+t[4]+t[6])/4,(t[1]+t[3]+t[5]+t[7])/4):"line"===e?(r=(t[0]+t[2])/2,(t[1]+t[3])/2):(r=t[0],t[1]);return[r,e]}(e,t);if("line"===e?(n.color=this.ingredients.colors.stroke,n.length=Math.round(this.dist(t[0],t[1],t[2],t[3])),r=this._getPos(t[0],[1]),o=this._getPos(t[2],[3]),n.loc=u(i,this.width,this.height),n.pos=r===o?"at ".concat(r):"from ".concat(r," to ").concat(o)):("point"===e?n.color=this.ingredients.colors.stroke:(n.color=this.ingredients.colors.fill,n.area=this._getArea(e,t)),n.pos=this._getPos.apply(this,l(i)),n.loc=u(i,this.width,this.height)),this.ingredients.shapes[e]){if(this.ingredients.shapes[e]!==[n]){for(var a in this.ingredients.shapes[e])JSON.stringify(this.ingredients.shapes[e][a])===JSON.stringify(n)&&(s=!1);!0===s&&this.ingredients.shapes[e].push(n)}}else this.ingredients.shapes[e]=[n]},o.default.prototype._getPos=function(e,t){var e=new DOMPointReadOnly(e,t),t=this._renderer.isP3D?new DOMMatrix(this._renderer.uMVMatrix.mat4):this.drawingContext.getTransform(),e=e.matrixTransform(t),t=e.x,e=e.y,r=this.width,o=this.height;return t<.4*r?e<.4*o?"top left":.6*o<e?"bottom left":"mid left":.6*r<t?e<.4*o?"top right":.6*o<e?"bottom right":"mid right":e<.4*o?"top middle":.6*o<e?"bottom middle":"middle"},o.default.prototype._getArea=function(e,t){var r,o,n=0,s=("arc"===e?(n=(r=((t[5]-t[4])%(2*Math.PI)+2*Math.PI)%(2*Math.PI))*t[2]*t[3]/8,"open"!==t[6]&&"chord"!==t[6]||(o=t[0],u=t[1],s=t[0]+t[2]/2*Math.cos(t[4]).toFixed(2),c=t[1]+t[3]/2*Math.sin(t[4]).toFixed(2),a=t[0]+t[2]/2*Math.cos(t[5]).toFixed(2),i=t[1]+t[3]/2*Math.sin(t[5]).toFixed(2),o=Math.abs(o*(c-i)+s*(i-u)+a*(u-c))/2,r>Math.PI?n+=o:n-=o)):"ellipse"===e||"circle"===e?n=3.14*t[2]/2*t[3]/2:"line"===e||"point"===e?n=0:"quadrilateral"===e?n=Math.abs((t[6]+t[0])*(t[7]-t[1])+(t[0]+t[2])*(t[1]-t[3])+(t[2]+t[4])*(t[3]-t[5])+(t[4]+t[6])*(t[5]-t[7]))/2:"rectangle"===e||"square"===e?n=t[2]*t[3]:"triangle"===e&&(n=Math.abs(t[0]*(t[3]-t[5])+t[2]*(t[5]-t[1])+t[4]*(t[1]-t[3]))/2),this.width*this._pixelDensity),i=this.height*this._pixelDensity,a=[new DOMPoint(0,0),new DOMPoint(s,0),new DOMPoint(s,i),new DOMPoint(0,i)],l=(this._renderer.isP3D?new DOMMatrix(this._renderer.uMVMatrix.mat4):this.drawingContext.getTransform()).inverse(),u=a.map(function(e){return e.matrixTransform(l)}),c=Math.abs((u[3].x+u[0].x)*(u[3].y-u[0].y)+(u[0].x+u[1].x)*(u[0].y-u[1].y)+(u[1].x+u[2].x)*(u[1].y-u[2].y)+(u[2].x+u[3].x)*(u[2].y-u[3].y))/2;return Math.round(100*n/c)};e=o.default;r.default=e},{"../core/main":275,"core-js/modules/es.array.concat":151,"core-js/modules/es.array.fill":154,"core-js/modules/es.array.from":158,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.map":164,"core-js/modules/es.number.to-fixed":175,"core-js/modules/es.object.to-string":182,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/web.dom-collections.iterator":238}],258:[function(e,t,r){"use strict";e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.concat"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;e=(e=e("../core/main"))&&e.__esModule?e:{default:e};e.default.prototype._updateTextOutput=function(e){var t,r,o,n;this.dummyDOM.querySelector("#".concat(e,"_summary"))&&(t=this._accessibleOutputs[e],o=function(e,t,r,o){r="Your output is a, ".concat(r," by ").concat(o," pixels, ").concat(t," canvas containing the following");r=1===e?"".concat(r," shape:"):"".concat(r," ").concat(e," shapes:");return r}((r=function(e,t){var r,o="",n=0;for(r in t)for(var s in t[r]){var i='<li><a href="#'.concat(e,"shape").concat(n,'">').concat(t[r][s].color," ").concat(r,"</a>");"line"===r?i+=", ".concat(t[r][s].pos,", ").concat(t[r][s].length," pixels long.</li>"):(i+=", at ".concat(t[r][s].pos),"point"!==r&&(i+=", covering ".concat(t[r][s].area,"% of the canvas")),i+=".</li>"),o+=i,n++}return{numShapes:n,listShapes:o}}(e,this.ingredients.shapes)).numShapes,this.ingredients.colors.background,this.width,this.height),n=function(e,t){var r,o="",n=0;for(r in t)for(var s in t[r]){var i='<tr id="'.concat(e,"shape").concat(n,'"><th>').concat(t[r][s].color," ").concat(r,"</th>");"line"===r?i+="<td>location = ".concat(t[r][s].pos,"</td><td>length = ").concat(t[r][s].length," pixels</td></tr>"):(i+="<td>location = ".concat(t[r][s].pos,"</td>"),"point"!==r&&(i+="<td> area = ".concat(t[r][s].area,"%</td>")),i+="</tr>"),o+=i,n++}return o}(e,this.ingredients.shapes),o!==t.summary.innerHTML&&(t.summary.innerHTML=o),r.listShapes!==t.list.innerHTML&&(t.list.innerHTML=r.listShapes),n!==t.shapeDetails.innerHTML&&(t.shapeDetails.innerHTML=n),this._accessibleOutputs[e]=t)};e=e.default;r.default=e},{"../core/main":275,"core-js/modules/es.array.concat":151}],259:[function(e,t,r){"use strict";var o=(o=e("./core/main"))&&o.__esModule?o:{default:o};e("./core/constants"),e("./core/environment"),e("./core/friendly_errors/stacktrace"),e("./core/friendly_errors/validate_params"),e("./core/friendly_errors/file_errors"),e("./core/friendly_errors/fes_core"),e("./core/friendly_errors/sketch_reader"),e("./core/helpers"),e("./core/legacy"),e("./core/preload"),e("./core/p5.Element"),e("./core/p5.Graphics"),e("./core/p5.Renderer"),e("./core/p5.Renderer2D"),e("./core/rendering"),e("./core/shim"),e("./core/structure"),e("./core/transform"),e("./core/shape/2d_primitives"),e("./core/shape/attributes"),e("./core/shape/curves"),e("./core/shape/vertex"),e("./accessibility/outputs"),e("./accessibility/textOutput"),e("./accessibility/gridOutput"),e("./accessibility/color_namer"),e("./color/color_conversion"),e("./color/creating_reading"),e("./color/p5.Color"),e("./color/setting"),e("./data/p5.TypedDict"),e("./data/local_storage.js"),e("./dom/dom"),e("./accessibility/describe"),e("./events/acceleration"),e("./events/keyboard"),e("./events/mouse"),e("./events/touch"),e("./image/filters"),e("./image/image"),e("./image/loading_displaying"),e("./image/p5.Image"),e("./image/pixels"),e("./io/files"),e("./io/p5.Table"),e("./io/p5.TableRow"),e("./io/p5.XML"),e("./math/calculation"),e("./math/math"),e("./math/noise"),e("./math/p5.Vector"),e("./math/random"),e("./math/trigonometry"),e("./typography/attributes"),e("./typography/loading_displaying"),e("./typography/p5.Font"),e("./utilities/array_functions"),e("./utilities/conversion"),e("./utilities/string_functions"),e("./utilities/time_date"),e("./webgl/3d_primitives"),e("./webgl/interaction"),e("./webgl/light"),e("./webgl/loading"),e("./webgl/material"),e("./webgl/p5.Camera"),e("./webgl/p5.DataArray"),e("./webgl/p5.Geometry"),e("./webgl/p5.Matrix"),e("./webgl/p5.RendererGL.Immediate"),e("./webgl/p5.RendererGL"),e("./webgl/p5.RendererGL.Retained"),e("./webgl/p5.Framebuffer"),e("./webgl/p5.Shader"),e("./webgl/p5.RenderBuffer"),e("./webgl/p5.Texture"),e("./webgl/text"),e("./core/init"),t.exports=o.default},{"./accessibility/color_namer":254,"./accessibility/describe":255,"./accessibility/gridOutput":256,"./accessibility/outputs":257,"./accessibility/textOutput":258,"./color/color_conversion":260,"./color/creating_reading":261,"./color/p5.Color":262,"./color/setting":263,"./core/constants":264,"./core/environment":265,"./core/friendly_errors/fes_core":266,"./core/friendly_errors/file_errors":267,"./core/friendly_errors/sketch_reader":268,"./core/friendly_errors/stacktrace":269,"./core/friendly_errors/validate_params":270,"./core/helpers":271,"./core/init":272,"./core/legacy":274,"./core/main":275,"./core/p5.Element":276,"./core/p5.Graphics":277,"./core/p5.Renderer":278,"./core/p5.Renderer2D":279,"./core/preload":280,"./core/rendering":281,"./core/shape/2d_primitives":282,"./core/shape/attributes":283,"./core/shape/curves":284,"./core/shape/vertex":285,"./core/shim":286,"./core/structure":287,"./core/transform":288,"./data/local_storage.js":289,"./data/p5.TypedDict":290,"./dom/dom":291,"./events/acceleration":292,"./events/keyboard":293,"./events/mouse":294,"./events/touch":295,"./image/filters":296,"./image/image":297,"./image/loading_displaying":298,"./image/p5.Image":299,"./image/pixels":300,"./io/files":301,"./io/p5.Table":302,"./io/p5.TableRow":303,"./io/p5.XML":304,"./math/calculation":305,"./math/math":306,"./math/noise":307,"./math/p5.Vector":308,"./math/random":309,"./math/trigonometry":310,"./typography/attributes":311,"./typography/loading_displaying":312,"./typography/p5.Font":313,"./utilities/array_functions":314,"./utilities/conversion":315,"./utilities/string_functions":316,"./utilities/time_date":317,"./webgl/3d_primitives":318,"./webgl/interaction":320,"./webgl/light":321,"./webgl/loading":322,"./webgl/material":323,"./webgl/p5.Camera":324,"./webgl/p5.DataArray":325,"./webgl/p5.Framebuffer":326,"./webgl/p5.Geometry":327,"./webgl/p5.Matrix":328,"./webgl/p5.RenderBuffer":329,"./webgl/p5.RendererGL":332,"./webgl/p5.RendererGL.Immediate":330,"./webgl/p5.RendererGL.Retained":331,"./webgl/p5.Shader":333,"./webgl/p5.Texture":334,"./webgl/text":335}],260:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;e=(e=e("../core/main"))&&e.__esModule?e:{default:e};e.default.ColorConversion={_hsbaToHSLA:function(e){var t=e[0],r=e[1],o=e[2],n=(2-r)*o/2;return 0!=n&&(1==n?r=0:n<.5?r/=2-r:r=r*o/(2-2*n)),[t,r,n,e[3]]},_hsbaToRGBA:function(e){var t,r,o,n,s,i=6*e[0],a=e[1],l=e[2];return 0===a?[l,l,l,e[3]]:(r=l*(1-a),o=l*(1-a*(i-(t=Math.floor(i)))),a=l*(1-a*(1+t-i)),i=1===t?(n=o,s=l,r):2===t?(n=r,s=l,a):3===t?(n=r,s=o,l):4===t?(n=a,s=r,l):5===t?(n=l,s=r,o):(n=l,s=a,r),[n,s,i,e[3]])},_hslaToHSBA:function(e){var t=e[0],r=e[1],o=e[2],n=o<.5?(1+r)*o:o+r-o*r;return[t,r=2*(n-o)/n,n,e[3]]},_hslaToRGBA:function(e){var t,r=6*e[0],o=e[1],n=e[2];return 0===o?[n,n,n,e[3]]:[(t=function(e,t,r){return e<0?e+=6:6<=e&&(e-=6),e<1?t+(r-t)*e:e<3?r:e<4?t+(r-t)*(4-e):t})(2+r,o=2*n-(n=n<.5?(1+o)*n:n+o-n*o),n),t(r,o,n),t(r-2,o,n),e[3]]},_rgbaToHSBA:function(e){var t,r,o=e[0],n=e[1],s=e[2],i=Math.max(o,n,s),a=i-Math.min(o,n,s);return 0==a?r=t=0:(r=a/i,o===i?t=(n-s)/a:n===i?t=2+(s-o)/a:s===i&&(t=4+(o-n)/a),t<0?t+=6:6<=t&&(t-=6)),[t/6,r,i,e[3]]},_rgbaToHSLA:function(e){var t,r,o=e[0],n=e[1],s=e[2],i=Math.max(o,n,s),a=Math.min(o,n,s),l=i+a,a=i-a;return 0==a?r=t=0:(r=l<1?a/l:a/(2-l),o===i?t=(n-s)/a:n===i?t=2+(s-o)/a:s===i&&(t=4+(o-n)/a),t<0?t+=6:6<=t&&(t-=6)),[t/6,r,l/2,e[3]]}};e=e.default.ColorConversion;r.default=e},{"../core/main":275}],261:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.map"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.map"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var l=(n=e("../core/main"))&&n.__esModule?n:{default:n},u=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("../core/constants"));function a(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,a=function(){return e},e)}e("./p5.Color"),e("../core/friendly_errors/validate_params"),e("../core/friendly_errors/file_errors"),e("../core/friendly_errors/fes_core"),l.default.prototype.alpha=function(e){return l.default._validateParameters("alpha",arguments),this.color(e)._getAlpha()},l.default.prototype.blue=function(e){return l.default._validateParameters("blue",arguments),this.color(e)._getBlue()},l.default.prototype.brightness=function(e){return l.default._validateParameters("brightness",arguments),this.color(e)._getBrightness()},l.default.prototype.color=function(){var e;return l.default._validateParameters("color",arguments),arguments[0]instanceof l.default.Color?arguments[0]:(e=arguments[0]instanceof Array?arguments[0]:arguments,new l.default.Color(this,e))},l.default.prototype.green=function(e){return l.default._validateParameters("green",arguments),this.color(e)._getGreen()},l.default.prototype.hue=function(e){return l.default._validateParameters("hue",arguments),this.color(e)._getHue()},l.default.prototype.lerpColor=function(e,t,r){l.default._validateParameters("lerpColor",arguments);var o,n,s,i=this._colorMode,a=this._colorMaxes;if(i===u.RGB)n=e.levels.map(function(e){return e/255}),s=t.levels.map(function(e){return e/255});else if(i===u.HSB)e._getBrightness(),t._getBrightness(),n=e.hsba,s=t.hsba;else{if(i!==u.HSL)throw new Error("".concat(i,"cannot be used for interpolation."));e._getLightness(),t._getLightness(),n=e.hsla,s=t.hsla}return r=Math.max(Math.min(r,1),0),void 0===this.lerp&&(this.lerp=function(e,t,r){return r*(t-e)+e}),e=this.lerp(n[0],s[0],r),t=this.lerp(n[1],s[1],r),o=this.lerp(n[2],s[2],r),n=this.lerp(n[3],s[3],r),e*=a[i][0],t*=a[i][1],o*=a[i][2],n*=a[i][3],this.color(e,t,o,n)},l.default.prototype.lightness=function(e){return l.default._validateParameters("lightness",arguments),this.color(e)._getLightness()},l.default.prototype.red=function(e){return l.default._validateParameters("red",arguments),this.color(e)._getRed()},l.default.prototype.saturation=function(e){return l.default._validateParameters("saturation",arguments),this.color(e)._getSaturation()};var n=l.default;r.default=n},{"../core/constants":264,"../core/friendly_errors/fes_core":266,"../core/friendly_errors/file_errors":267,"../core/friendly_errors/validate_params":270,"../core/main":275,"./p5.Color":262,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.map":164,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.to-string":182,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}],262:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.constructor"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.trim"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.constructor"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.trim"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=s(e("../core/main")),d=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("../core/constants")),h=s(e("./color_conversion"));function a(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,a=function(){return e},e)}function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var f={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},e=/\s*/,u=/(\d{1,3})/,c=/((?:\d+(?:\.\d+)?)|(?:\.\d+))/,p=new RegExp("".concat(c.source,"%")),m={HEX3:/^#([a-f0-9])([a-f0-9])([a-f0-9])$/i,HEX4:/^#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])$/i,HEX6:/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i,HEX8:/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i,RGB:new RegExp(["^rgb\\(",u.source,",",u.source,",",u.source,"\\)$"].join(e.source),"i"),RGB_PERCENT:new RegExp(["^rgb\\(",p.source,",",p.source,",",p.source,"\\)$"].join(e.source),"i"),RGBA:new RegExp(["^rgba\\(",u.source,",",u.source,",",u.source,",",c.source,"\\)$"].join(e.source),"i"),RGBA_PERCENT:new RegExp(["^rgba\\(",p.source,",",p.source,",",p.source,",",c.source,"\\)$"].join(e.source),"i"),HSL:new RegExp(["^hsl\\(",u.source,",",p.source,",",p.source,"\\)$"].join(e.source),"i"),HSLA:new RegExp(["^hsla\\(",u.source,",",p.source,",",p.source,",",c.source,"\\)$"].join(e.source),"i"),HSB:new RegExp(["^hsb\\(",u.source,",",p.source,",",p.source,"\\)$"].join(e.source),"i"),HSBA:new RegExp(["^hsba\\(",u.source,",",p.source,",",p.source,",",c.source,"\\)$"].join(e.source),"i")},u=(n.default.Color=function(){function c(e,t){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");if(this._storeModeAndMaxes(e._colorMode,e._colorMaxes),![d.RGB,d.HSL,d.HSB].includes(this.mode))throw new Error("".concat(this.mode," is an invalid colorMode."));this._array=c._parseInputs.apply(this,t),this._calculateLevels()}var e,t,r;return e=c,r=[{key:"_parseInputs",value:function(e,t,r,o){var n,s=arguments.length,i=this.mode,a=this.maxes[i],l=[];if(3<=s){for(l[0]=e/a[0],l[1]=t/a[1],l[2]=r/a[2],l[3]="number"==typeof o?o/a[3]:1,n=l.length-1;0<=n;--n){var u=l[n];u<0?l[n]=0:1<u&&(l[n]=1)}return i===d.HSL?h.default._hslaToRGBA(l):i===d.HSB?h.default._hsbaToRGBA(l):l}if(1===s&&"string"==typeof e){r=e.trim().toLowerCase();if(f[r])return c._parseInputs.call(this,f[r]);if(m.HEX3.test(r))return(l=m.HEX3.exec(r).slice(1).map(function(e){return parseInt(e+e,16)/255}))[3]=1,l;if(m.HEX6.test(r))return(l=m.HEX6.exec(r).slice(1).map(function(e){return parseInt(e,16)/255}))[3]=1,l;if(m.HEX4.test(r))return l=m.HEX4.exec(r).slice(1).map(function(e){return parseInt(e+e,16)/255});if(m.HEX8.test(r))return l=m.HEX8.exec(r).slice(1).map(function(e){return parseInt(e,16)/255});if(m.RGB.test(r))return(l=m.RGB.exec(r).slice(1).map(function(e){return e/255}))[3]=1,l;if(m.RGB_PERCENT.test(r))return(l=m.RGB_PERCENT.exec(r).slice(1).map(function(e){return parseFloat(e)/100}))[3]=1,l;if(m.RGBA.test(r))return l=m.RGBA.exec(r).slice(1).map(function(e,t){return 3===t?parseFloat(e):e/255});if(m.RGBA_PERCENT.test(r))return l=m.RGBA_PERCENT.exec(r).slice(1).map(function(e,t){return 3===t?parseFloat(e):parseFloat(e)/100});if(m.HSL.test(r)?(l=m.HSL.exec(r).slice(1).map(function(e,t){return 0===t?parseInt(e,10)/360:parseInt(e,10)/100}))[3]=1:m.HSLA.test(r)&&(l=m.HSLA.exec(r).slice(1).map(function(e,t){return 0===t?parseInt(e,10)/360:3===t?parseFloat(e):parseInt(e,10)/100})),(l=l.map(function(e){return Math.max(Math.min(e,1),0)})).length)return h.default._hslaToRGBA(l);if(m.HSB.test(r)?(l=m.HSB.exec(r).slice(1).map(function(e,t){return 0===t?parseInt(e,10)/360:parseInt(e,10)/100}))[3]=1:m.HSBA.test(r)&&(l=m.HSBA.exec(r).slice(1).map(function(e,t){return 0===t?parseInt(e,10)/360:3===t?parseFloat(e):parseInt(e,10)/100})),l.length){for(n=l.length-1;0<=n;--n)l[n]=Math.max(Math.min(l[n],1),0);return h.default._hsbaToRGBA(l)}l=[1,1,1,1]}else{if(1!==s&&2!==s||"number"!=typeof e)throw new Error("".concat(arguments,"is not a valid color representation."));l[0]=e/a[2],l[1]=e/a[2],l[2]=e/a[2],l[3]="number"==typeof t?t/a[3]:1,l=l.map(function(e){return Math.max(Math.min(e,1),0)})}return l}}],(t=[{key:"toString",value:function(e){var t=this.levels,r=this._array,o=r[3];switch(e){case"#rrggbb":return"#".concat(t[0]<16?"0".concat(t[0].toString(16)):t[0].toString(16),t[1]<16?"0".concat(t[1].toString(16)):t[1].toString(16),t[2]<16?"0".concat(t[2].toString(16)):t[2].toString(16));case"#rrggbbaa":return"#".concat(t[0]<16?"0".concat(t[0].toString(16)):t[0].toString(16),t[1]<16?"0".concat(t[1].toString(16)):t[1].toString(16),t[2]<16?"0".concat(t[2].toString(16)):t[2].toString(16),t[3]<16?"0".concat(t[3].toString(16)):t[3].toString(16));case"#rgb":return"#".concat(Math.round(15*r[0]).toString(16),Math.round(15*r[1]).toString(16),Math.round(15*r[2]).toString(16));case"#rgba":return"#".concat(Math.round(15*r[0]).toString(16),Math.round(15*r[1]).toString(16),Math.round(15*r[2]).toString(16),Math.round(15*r[3]).toString(16));case"rgb":return"rgb(".concat(t[0],", ",t[1],", ",t[2],")");case"rgb%":return"rgb(".concat((100*r[0]).toPrecision(3),"%, ",(100*r[1]).toPrecision(3),"%, ",(100*r[2]).toPrecision(3),"%)");case"rgba%":return"rgba(".concat((100*r[0]).toPrecision(3),"%, ",(100*r[1]).toPrecision(3),"%, ",(100*r[2]).toPrecision(3),"%, ",(100*r[3]).toPrecision(3),"%)");case"hsb":case"hsv":return this.hsba||(this.hsba=h.default._rgbaToHSBA(this._array)),"hsb(".concat(this.hsba[0]*this.maxes[d.HSB][0],", ",this.hsba[1]*this.maxes[d.HSB][1],", ",this.hsba[2]*this.maxes[d.HSB][2],")");case"hsb%":case"hsv%":return this.hsba||(this.hsba=h.default._rgbaToHSBA(this._array)),"hsb(".concat((100*this.hsba[0]).toPrecision(3),"%, ",(100*this.hsba[1]).toPrecision(3),"%, ",(100*this.hsba[2]).toPrecision(3),"%)");case"hsba":case"hsva":return this.hsba||(this.hsba=h.default._rgbaToHSBA(this._array)),"hsba(".concat(this.hsba[0]*this.maxes[d.HSB][0],", ",this.hsba[1]*this.maxes[d.HSB][1],", ",this.hsba[2]*this.maxes[d.HSB][2],", ",o,")");case"hsba%":case"hsva%":return this.hsba||(this.hsba=h.default._rgbaToHSBA(this._array)),"hsba(".concat((100*this.hsba[0]).toPrecision(3),"%, ",(100*this.hsba[1]).toPrecision(3),"%, ",(100*this.hsba[2]).toPrecision(3),"%, ",(100*o).toPrecision(3),"%)");case"hsl":return this.hsla||(this.hsla=h.default._rgbaToHSLA(this._array)),"hsl(".concat(this.hsla[0]*this.maxes[d.HSL][0],", ",this.hsla[1]*this.maxes[d.HSL][1],", ",this.hsla[2]*this.maxes[d.HSL][2],")");case"hsl%":return this.hsla||(this.hsla=h.default._rgbaToHSLA(this._array)),"hsl(".concat((100*this.hsla[0]).toPrecision(3),"%, ",(100*this.hsla[1]).toPrecision(3),"%, ",(100*this.hsla[2]).toPrecision(3),"%)");case"hsla":return this.hsla||(this.hsla=h.default._rgbaToHSLA(this._array)),"hsla(".concat(this.hsla[0]*this.maxes[d.HSL][0],", ",this.hsla[1]*this.maxes[d.HSL][1],", ",this.hsla[2]*this.maxes[d.HSL][2],", ",o,")");case"hsla%":return this.hsla||(this.hsla=h.default._rgbaToHSLA(this._array)),"hsl(".concat((100*this.hsla[0]).toPrecision(3),"%, ",(100*this.hsla[1]).toPrecision(3),"%, ",(100*this.hsla[2]).toPrecision(3),"%, ",(100*o).toPrecision(3),"%)");default:return"rgba(".concat(t[0],",",t[1],",",t[2],",",o,")")}}},{key:"setRed",value:function(e){this._array[0]=e/this.maxes[d.RGB][0],this._calculateLevels()}},{key:"setGreen",value:function(e){this._array[1]=e/this.maxes[d.RGB][1],this._calculateLevels()}},{key:"setBlue",value:function(e){this._array[2]=e/this.maxes[d.RGB][2],this._calculateLevels()}},{key:"setAlpha",value:function(e){this._array[3]=e/this.maxes[this.mode][3],this._calculateLevels()}},{key:"_calculateLevels",value:function(){for(var e=this._array,t=this.levels=new Array(e.length),r=e.length-1;0<=r;--r)t[r]=Math.round(255*e[r]);this.hsla=null,this.hsba=null}},{key:"_getAlpha",value:function(){return this._array[3]*this.maxes[this.mode][3]}},{key:"_storeModeAndMaxes",value:function(e,t){this.mode=e,this.maxes=t}},{key:"_getMode",value:function(){return this.mode}},{key:"_getMaxes",value:function(){return this.maxes}},{key:"_getBlue",value:function(){return this._array[2]*this.maxes[d.RGB][2]}},{key:"_getBrightness",value:function(){return this.hsba||(this.hsba=h.default._rgbaToHSBA(this._array)),this.hsba[2]*this.maxes[d.HSB][2]}},{key:"_getGreen",value:function(){return this._array[1]*this.maxes[d.RGB][1]}},{key:"_getHue",value:function(){return this.mode===d.HSB?(this.hsba||(this.hsba=h.default._rgbaToHSBA(this._array)),this.hsba[0]*this.maxes[d.HSB][0]):(this.hsla||(this.hsla=h.default._rgbaToHSLA(this._array)),this.hsla[0]*this.maxes[d.HSL][0])}},{key:"_getLightness",value:function(){return this.hsla||(this.hsla=h.default._rgbaToHSLA(this._array)),this.hsla[2]*this.maxes[d.HSL][2]}},{key:"_getRed",value:function(){return this._array[0]*this.maxes[d.RGB][0]}},{key:"_getSaturation",value:function(){return this.mode===d.HSB?(this.hsba||(this.hsba=h.default._rgbaToHSBA(this._array)),this.hsba[1]*this.maxes[d.HSB][1]):(this.hsla||(this.hsla=h.default._rgbaToHSLA(this._array)),this.hsla[1]*this.maxes[d.HSL][1])}}])&&l(e.prototype,t),r&&l(e,r),c}(),n.default.Color);r.default=u},{"../core/constants":264,"../core/main":275,"./color_conversion":260,"core-js/modules/es.array.includes":159,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.join":162,"core-js/modules/es.array.map":164,"core-js/modules/es.array.slice":165,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.to-string":182,"core-js/modules/es.regexp.constructor":186,"core-js/modules/es.regexp.exec":187,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.includes":191,"core-js/modules/es.string.iterator":192,"core-js/modules/es.string.trim":201,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}],263:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.fill"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.fill"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var s=(n=e("../core/main"))&&n.__esModule?n:{default:n},a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("../core/constants"));function l(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,l=function(){return e},e)}e("./p5.Color"),s.default.prototype.beginClip=function(){this._renderer.beginClip(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{})},s.default.prototype.endClip=function(){this._renderer.endClip()},s.default.prototype.clip=function(e,t){this._renderer.beginClip(t),e(),this._renderer.endClip(t)},s.default.prototype.background=function(){var e;return(e=this._renderer).background.apply(e,arguments),this},s.default.prototype.clear=function(){return this._renderer.clear((arguments.length<=0?void 0:arguments[0])||0,(arguments.length<=1?void 0:arguments[1])||0,(arguments.length<=2?void 0:arguments[2])||0,(arguments.length<=3?void 0:arguments[3])||0),this},s.default.prototype.colorMode=function(e,t,r,o,n){return s.default._validateParameters("colorMode",arguments),e!==a.RGB&&e!==a.HSB&&e!==a.HSL||(this._colorMode=e,e=this._colorMaxes[e],2===arguments.length?(e[0]=t,e[1]=t,e[2]=t,e[3]=t):4===arguments.length?(e[0]=t,e[1]=r,e[2]=o):5===arguments.length&&(e[0]=t,e[1]=r,e[2]=o,e[3]=n)),this},s.default.prototype.fill=function(){var e;return this._renderer._setProperty("_fillSet",!0),this._renderer._setProperty("_doFill",!0),(e=this._renderer).fill.apply(e,arguments),this},s.default.prototype.noFill=function(){return this._renderer._setProperty("_doFill",!1),this},s.default.prototype.noStroke=function(){return this._renderer._setProperty("_doStroke",!1),this},s.default.prototype.stroke=function(){var e;return this._renderer._setProperty("_strokeSet",!0),this._renderer._setProperty("_doStroke",!0),(e=this._renderer).stroke.apply(e,arguments),this},s.default.prototype.erase=function(){return this._renderer.erase(0<arguments.length&&void 0!==arguments[0]?arguments[0]:255,1<arguments.length&&void 0!==arguments[1]?arguments[1]:255),this},s.default.prototype.noErase=function(){return this._renderer.noErase(),this};var n=s.default;r.default=n},{"../core/constants":264,"../core/main":275,"./p5.Color":262,"core-js/modules/es.array.fill":154,"core-js/modules/es.array.iterator":161,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.to-string":182,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}],264:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.QUADRATIC=r.LINEAR=r._CTX_MIDDLE=r._DEFAULT_LEADMULT=r._DEFAULT_TEXT_FILL=r.WORD=r.CHAR=r.BOLDITALIC=r.BOLD=r.ITALIC=r.NORMAL=r.BLUR=r.ERODE=r.DILATE=r.POSTERIZE=r.INVERT=r.OPAQUE=r.GRAY=r.THRESHOLD=r.BURN=r.DODGE=r.SOFT_LIGHT=r.HARD_LIGHT=r.OVERLAY=r.REPLACE=r.SCREEN=r.MULTIPLY=r.EXCLUSION=r.SUBTRACT=r.DIFFERENCE=r.LIGHTEST=r.DARKEST=r.ADD=r.REMOVE=r.BLEND=r.UP_ARROW=r.TAB=r.SHIFT=r.RIGHT_ARROW=r.RETURN=r.OPTION=r.LEFT_ARROW=r.ESCAPE=r.ENTER=r.DOWN_ARROW=r.DELETE=r.CONTROL=r.BACKSPACE=r.ALT=r.AUTO=r.HSL=r.HSB=r.RGB=r.MITER=r.BEVEL=r.ROUND=r.SQUARE=r.PROJECT=r.PIE=r.CHORD=r.OPEN=r.CLOSE=r.TESS=r.QUAD_STRIP=r.QUADS=r.TRIANGLE_STRIP=r.TRIANGLE_FAN=r.TRIANGLES=r.LINE_LOOP=r.LINE_STRIP=r.LINES=r.POINTS=r.BASELINE=r.BOTTOM=r.TOP=r.CENTER=r.LEFT=r.RIGHT=r.RADIUS=r.CORNERS=r.CORNER=r.RAD_TO_DEG=r.DEG_TO_RAD=r.RADIANS=r.DEGREES=r.TWO_PI=r.TAU=r.QUARTER_PI=r.PI=r.HALF_PI=r.WAIT=r.TEXT=r.MOVE=r.HAND=r.CROSS=r.ARROW=r.WEBGL2=r.WEBGL=r.P2D=r.VERSION=void 0,r.RGBA=r.HALF_FLOAT=r.FLOAT=r.UNSIGNED_INT=r.UNSIGNED_BYTE=r.COVER=r.CONTAIN=r.FALLBACK=r.LABEL=r.AXES=r.GRID=r._DEFAULT_FILL=r._DEFAULT_STROKE=r.PORTRAIT=r.LANDSCAPE=r.SMOOTH=r.FLAT=r.MIRROR=r.CLAMP=r.REPEAT=r.NEAREST=r.IMAGE=r.IMMEDIATE=r.TEXTURE=r.FILL=r.STROKE=r.CURVE=r.BEZIER=void 0;var o=Math.PI,n=(r.VERSION="1.9.0",r.P2D="p2d",r.WEBGL="webgl",r.WEBGL2="webgl2",r.ARROW="default",r.CROSS="crosshair",r.HAND="pointer",r.MOVE="move",r.TEXT="text",r.WAIT="wait",o/2),n=(r.HALF_PI=n,o),n=(r.PI=n,o/4),n=(r.QUARTER_PI=n,2*o),n=(r.TAU=n,2*o),n=(r.TWO_PI=n,r.DEGREES="degrees",r.RADIANS="radians",o/180),n=(r.DEG_TO_RAD=n,180/o);r.RAD_TO_DEG=n,r.CORNER="corner",r.CORNERS="corners",r.RADIUS="radius",r.RIGHT="right",r.LEFT="left",r.CENTER="center",r.TOP="top",r.BOTTOM="bottom",r.BASELINE="alphabetic",r.POINTS=0,r.LINES=1,r.LINE_STRIP=3,r.LINE_LOOP=2,r.TRIANGLES=4,r.TRIANGLE_FAN=6,r.TRIANGLE_STRIP=5,r.QUADS="quads",r.QUAD_STRIP="quad_strip",r.TESS="tess",r.CLOSE="close",r.OPEN="open",r.CHORD="chord",r.PIE="pie",r.PROJECT="square",r.SQUARE="butt",r.ROUND="round",r.BEVEL="bevel",r.MITER="miter",r.RGB="rgb",r.HSB="hsb",r.HSL="hsl",r.AUTO="auto",r.ALT=18,r.BACKSPACE=8,r.CONTROL=17,r.DELETE=46,r.DOWN_ARROW=40,r.ENTER=13,r.ESCAPE=27,r.LEFT_ARROW=37,r.OPTION=18,r.RETURN=13,r.RIGHT_ARROW=39,r.SHIFT=16,r.TAB=9,r.UP_ARROW=38,r.BLEND="source-over",r.REMOVE="destination-out",r.ADD="lighter",r.DARKEST="darken",r.LIGHTEST="lighten",r.DIFFERENCE="difference",r.SUBTRACT="subtract",r.EXCLUSION="exclusion",r.MULTIPLY="multiply",r.SCREEN="screen",r.REPLACE="copy",r.OVERLAY="overlay",r.HARD_LIGHT="hard-light",r.SOFT_LIGHT="soft-light",r.DODGE="color-dodge",r.BURN="color-burn",r.THRESHOLD="threshold",r.GRAY="gray",r.OPAQUE="opaque",r.INVERT="invert",r.POSTERIZE="posterize",r.DILATE="dilate",r.ERODE="erode",r.BLUR="blur",r.NORMAL="normal",r.ITALIC="italic",r.BOLD="bold",r.BOLDITALIC="bold italic",r.CHAR="CHAR",r.WORD="WORD",r._DEFAULT_TEXT_FILL="#000000",r._DEFAULT_LEADMULT=1.25,r._CTX_MIDDLE="middle",r.LINEAR="linear",r.QUADRATIC="quadratic",r.BEZIER="bezier",r.CURVE="curve",r.STROKE="stroke",r.FILL="fill",r.TEXTURE="texture",r.IMMEDIATE="immediate",r.IMAGE="image",r.NEAREST="nearest",r.REPEAT="repeat",r.CLAMP="clamp",r.MIRROR="mirror",r.FLAT="flat",r.SMOOTH="smooth",r.LANDSCAPE="landscape",r.PORTRAIT="portrait",r._DEFAULT_STROKE="#000000",r._DEFAULT_FILL="#FFFFFF",r.GRID="grid",r.AXES="axes",r.LABEL="label",r.FALLBACK="fallback",r.CONTAIN="contain",r.COVER="cover",r.UNSIGNED_BYTE="unsigned-byte",r.UNSIGNED_INT="unsigned-int",r.FLOAT="float",r.HALF_FLOAT="half-float";r.RGBA="rgba"},{}],265:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.filter"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.search"),e("core-js/modules/es.string.split"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.filter"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.search"),e("core-js/modules/es.string.split"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=(s=e("./main"))&&s.__esModule?s:{default:s},s=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("./constants"));function a(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,a=function(){return e},e)}var l=[s.ARROW,s.CROSS,s.HAND,s.MOVE,s.TEXT,s.WAIT],u=(n.default.prototype._frameRate=0,n.default.prototype._lastFrameTime=window.performance.now(),n.default.prototype._targetFrameRate=60,window.print),c=!1;function d(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth||0}function h(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight||0}n.default.prototype.print=function(){var e;arguments.length?(e=console).log.apply(e,arguments):c||(u(),window.confirm("You just tried to print the webpage. Do you want to prevent this from running again?")&&(c=!0))},n.default.prototype.frameCount=0,n.default.prototype.deltaTime=0,n.default.prototype.focused=document.hasFocus(),n.default.prototype.cursor=function(e,t,r){var o,n="auto",s=this._curElement.elt;l.includes(e)?n=e:"string"==typeof e&&(o="",t&&r&&"number"==typeof t&&"number"==typeof r&&(o="".concat(t," ").concat(r)),n="http://"===e.substring(0,7)||"https://"===e.substring(0,8)||/\.(cur|jpg|jpeg|gif|png|CUR|JPG|JPEG|GIF|PNG)$/.test(e)?"url(".concat(e,") ").concat(o,", auto"):e),s.style.cursor=n},n.default.prototype.frameRate=function(e){return n.default._validateParameters("frameRate",arguments),"number"!=typeof e||e<0?this._frameRate:(this._setProperty("_targetFrameRate",e),0===e&&this._setProperty("_frameRate",e),this)},n.default.prototype.getFrameRate=function(){return this.frameRate()},n.default.prototype.setFrameRate=function(e){return this.frameRate(e)},n.default.prototype.getTargetFrameRate=function(){return this._targetFrameRate},n.default.prototype.noCursor=function(){this._curElement.elt.style.cursor="none"},n.default.prototype.webglVersion=s.P2D,n.default.prototype.displayWidth=screen.width,n.default.prototype.displayHeight=screen.height,n.default.prototype.windowWidth=d(),n.default.prototype.windowHeight=h(),n.default.prototype._onresize=function(e){this._setProperty("windowWidth",d()),this._setProperty("windowHeight",h());var t=this._isGlobal?window:this;"function"!=typeof t.windowResized||void 0===(t=t.windowResized(e))||t||e.preventDefault()},n.default.prototype.width=0,n.default.prototype.height=0,n.default.prototype.fullscreen=function(e){if(n.default._validateParameters("fullscreen",arguments),void 0===e)return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;if(e){e=document.documentElement;if(!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled))throw new Error("Fullscreen not enabled in this browser.");e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()}else document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},n.default.prototype.pixelDensity=function(e){var t;return n.default._validateParameters("pixelDensity",arguments),"number"==typeof e?(e!==this._pixelDensity&&(this._pixelDensity=e),(t=this).resizeCanvas(this.width,this.height,!0)):t=this._pixelDensity,t},n.default.prototype.displayDensity=function(){return window.devicePixelRatio},n.default.prototype.getURL=function(){return location.href},n.default.prototype.getURLPath=function(){return location.pathname.split("/").filter(function(e){return""!==e})},n.default.prototype.getURLParams=function(){for(var e,t=/[?&]([^&=]+)(?:[&=])([^&=]+)/gim,r={};null!=(e=t.exec(location.search));)e.index===t.lastIndex&&t.lastIndex++,r[e[1]]=e[2];return r};e=n.default;r.default=e},{"./constants":264,"./main":275,"core-js/modules/es.array.concat":151,"core-js/modules/es.array.filter":155,"core-js/modules/es.array.includes":159,"core-js/modules/es.array.iterator":161,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.to-string":182,"core-js/modules/es.regexp.exec":187,"core-js/modules/es.string.includes":191,"core-js/modules/es.string.iterator":192,"core-js/modules/es.string.search":197,"core-js/modules/es.string.split":198,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}],266:[function(r,e,t){"use strict";r("core-js/modules/es.symbol"),r("core-js/modules/es.symbol.description"),r("core-js/modules/es.symbol.iterator"),r("core-js/modules/es.array.concat"),r("core-js/modules/es.array.filter"),r("core-js/modules/es.array.for-each"),r("core-js/modules/es.array.includes"),r("core-js/modules/es.array.iterator"),r("core-js/modules/es.array.join"),r("core-js/modules/es.array.map"),r("core-js/modules/es.array.slice"),r("core-js/modules/es.array.some"),r("core-js/modules/es.function.name"),r("core-js/modules/es.object.assign"),r("core-js/modules/es.object.get-own-property-names"),r("core-js/modules/es.object.keys"),r("core-js/modules/es.object.to-string"),r("core-js/modules/es.regexp.constructor"),r("core-js/modules/es.regexp.exec"),r("core-js/modules/es.regexp.to-string"),r("core-js/modules/es.string.iterator"),r("core-js/modules/es.string.match"),r("core-js/modules/es.string.replace"),r("core-js/modules/es.string.split"),r("core-js/modules/es.string.starts-with"),r("core-js/modules/web.dom-collections.for-each"),r("core-js/modules/web.dom-collections.iterator"),r("core-js/modules/es.symbol"),r("core-js/modules/es.symbol.description"),r("core-js/modules/es.symbol.iterator"),r("core-js/modules/es.array.concat"),r("core-js/modules/es.array.filter"),r("core-js/modules/es.array.for-each"),r("core-js/modules/es.array.includes"),r("core-js/modules/es.array.iterator"),r("core-js/modules/es.array.join"),r("core-js/modules/es.array.map"),r("core-js/modules/es.array.slice"),r("core-js/modules/es.array.some"),r("core-js/modules/es.function.name"),r("core-js/modules/es.object.assign"),r("core-js/modules/es.object.get-own-property-names"),r("core-js/modules/es.object.keys"),r("core-js/modules/es.object.to-string"),r("core-js/modules/es.regexp.constructor"),r("core-js/modules/es.regexp.exec"),r("core-js/modules/es.regexp.to-string"),r("core-js/modules/es.string.iterator"),r("core-js/modules/es.string.match"),r("core-js/modules/es.string.replace"),r("core-js/modules/es.string.split"),r("core-js/modules/es.string.starts-with"),r("core-js/modules/web.dom-collections.for-each"),r("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(l=r("../main"))&&l.__esModule?l:{default:l};r("../internationalization");function n(r,o){o=o||console.log.bind(console),s||i(),s.some(function(e){var t;if(r.message&&null!==r.message.match("\\W?".concat(e.name,"\\W")))return t="function"===e.type?"".concat(e.name,"()"):e.name,o("Did you just try to use p5.js's ".concat(t," ").concat(e.type,"? If so, you may want to move it into your sketch's setup() function.\n\nFor more details, see: ").concat(a)),!0})}var s=null,i=null,a=(o.default._friendlyError=o.default._checkForUserDefinedFunctions=o.default._fesErrorMonitor=function(){},s=null,"https://github.com/processing/p5.js/wiki/p5.js-overview#why-cant-i-assign-variables-using-p5-functions-and-variables-before-setup"),i=function(){function e(r){return Object.getOwnPropertyNames(r).filter(function(e){return"_"!==e[0]&&(!(e in t)&&(t[e]=!0))}).map(function(e){var t="function"==typeof r[e]?"function":e===e.toUpperCase()?"constant":"variable";return{name:e,type:t}})}var t={};(s=[].concat(e(o.default.prototype),e(r("../constants")))).sort(function(e,t){return t.name.length-e.name.length})},l=(o.default.prototype._helpForMisusedAtTopLevelCode=n,"complete"!==document.readyState&&(window.addEventListener("error",n,!1),window.addEventListener("load",function(){window.removeEventListener("error",n,!1)})),o.default);t.default=l},{"../constants":264,"../internationalization":273,"../main":275,"./browser_errors":void 0,"core-js/modules/es.array.concat":151,"core-js/modules/es.array.filter":155,"core-js/modules/es.array.for-each":157,"core-js/modules/es.array.includes":159,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.join":162,"core-js/modules/es.array.map":164,"core-js/modules/es.array.slice":165,"core-js/modules/es.array.some":166,"core-js/modules/es.function.name":168,"core-js/modules/es.object.assign":176,"core-js/modules/es.object.get-own-property-names":179,"core-js/modules/es.object.keys":181,"core-js/modules/es.object.to-string":182,"core-js/modules/es.regexp.constructor":186,"core-js/modules/es.regexp.exec":187,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.iterator":192,"core-js/modules/es.string.match":193,"core-js/modules/es.string.replace":196,"core-js/modules/es.string.split":198,"core-js/modules/es.string.starts-with":199,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/web.dom-collections.for-each":237,"core-js/modules/web.dom-collections.iterator":238}],267:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=(o=e("../main"))&&o.__esModule?o:{default:o};e("../internationalization");o.default._friendlyFileLoadError=function(){};e=o.default;r.default=e},{"../internationalization":273,"../main":275}],268:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.filter"),e("core-js/modules/es.array.for-each"),e("core-js/modules/es.array.from"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.constructor"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.match"),e("core-js/modules/es.string.split"),e("core-js/modules/es.string.trim"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.for-each"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.filter"),e("core-js/modules/es.array.for-each"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.regexp.constructor"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.match"),e("core-js/modules/es.string.split"),e("core-js/modules/es.string.trim"),e("core-js/modules/web.dom-collections.for-each"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=O(e("../main")),s=e("../internationalization"),a=C(e("../constants")),l,u,c,d,h,f,p,m,y,g,v,b,j,_,x,w,S,T,M,E,I;function k(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,k=function(){return e},e)}function C(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=k();if(t&&t.has(e))return t.get(e);var r,o,n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e)Object.prototype.hasOwnProperty.call(e,r)&&((o=s?Object.getOwnPropertyDescriptor(e,r):null)&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]);return n.default=e,t&&t.set(e,n),n}function O(e){return e&&e.__esModule?e:{default:e}}function D(e){return L(e)||A(e)||P()}function P(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function A(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function L(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}n.default._fesCodeReader=function(){};var R=n.default;r.default=R},{"../constants":264,"../internationalization":273,"../main":275,"core-js/modules/es.array.filter":155,"core-js/modules/es.array.for-each":157,"core-js/modules/es.array.from":158,"core-js/modules/es.array.includes":159,"core-js/modules/es.array.index-of":160,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.join":162,"core-js/modules/es.array.map":164,"core-js/modules/es.array.slice":165,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.keys":181,"core-js/modules/es.object.to-string":182,"core-js/modules/es.regexp.constructor":186,"core-js/modules/es.regexp.exec":187,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.includes":191,"core-js/modules/es.string.iterator":192,"core-js/modules/es.string.match":193,"core-js/modules/es.string.split":198,"core-js/modules/es.string.trim":201,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.for-each":237,"core-js/modules/web.dom-collections.iterator":238}],269:[function(e,t,r){"use strict";e("core-js/modules/es.array.filter"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.match"),e("core-js/modules/es.string.replace"),e("core-js/modules/es.string.split"),e("core-js/modules/es.array.filter"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.match"),e("core-js/modules/es.string.replace"),e("core-js/modules/es.string.split"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;e=(e=e("../main"))&&e.__esModule?e:{default:e};function o(){var t=/(^|@)\S+:\d+/,r=/^\s*at .*(\S+:\d+|\(native\))/m,o=/^(eval@)?(\[native code])?$/;return{parse:function(e){return void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(r)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):void 0},extractLocation:function(e){return-1===e.indexOf(":")?[e]:[(e=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,"")))[1],e[2]||void 0,e[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(r)},this).map(function(e){var t=(e=-1<e.indexOf("(eval ")?e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""):e).replace(/^\s+/,"").replace(/\(eval code/g,"("),r=t.match(/ (\((.+):(\d+):(\d+)\)$)/),t=(t=r?t.replace(r[0],""):t).split(/\s+/).slice(1),r=this.extractLocation(r?r[1]:t.pop());return{functionName:t.join(" ")||void 0,fileName:-1<["eval","<anonymous>"].indexOf(r[0])?void 0:r[0],lineNumber:r[1],columnNumber:r[2],source:e}},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(o)},this).map(function(e){var t,r;return-1===(e=-1<e.indexOf(" > eval")?e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1"):e).indexOf("@")&&-1===e.indexOf(":")?{functionName:e}:{functionName:(r=e.match(t=/((.*".+"[^@]*)?[^@]*)(?:@)/))&&r[1]?r[1]:void 0,fileName:(r=this.extractLocation(e.replace(t,"")))[0],lineNumber:r[1],columnNumber:r[2],source:e}},this)},parseOpera:function(e){return!e.stacktrace||-1<e.message.indexOf("\n")&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),o=[],n=2,s=r.length;n<s;n+=2){var i=t.exec(r[n]);i&&o.push({fileName:i[2],lineNumber:i[1],source:r[n]})}return o},parseOpera10:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),o=[],n=0,s=r.length;n<s;n+=2){var i=t.exec(r[n]);i&&o.push({functionName:i[3]||void 0,fileName:i[2],lineNumber:i[1],source:r[n]})}return o},parseOpera11:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(t)&&!e.match(/^Error created at/)},this).map(function(e){var t,r=e.split("@"),o=this.extractLocation(r.pop()),r=r.shift()||"";return{functionName:r.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,args:void 0===(t=r.match(/\(([^)]*)\)/)?r.replace(/^[^(]+\(([^)]*)\)$/,"$1"):t)||"[arguments not available]"===t?void 0:t.split(","),fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e}},this)}}}e.default._getErrorStackParser=function(){return new o};e=e.default;r.default=e},{"../main":275,"core-js/modules/es.array.filter":155,"core-js/modules/es.array.index-of":160,"core-js/modules/es.array.join":162,"core-js/modules/es.array.map":164,"core-js/modules/es.array.slice":165,"core-js/modules/es.regexp.exec":187,"core-js/modules/es.string.match":193,"core-js/modules/es.string.replace":196,"core-js/modules/es.string.split":198}],270:[function(e,t,r){"use strict";function o(e){return(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})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.for-each"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.last-index-of"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.function.name"),e("core-js/modules/es.map"),e("core-js/modules/es.number.constructor"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.get-prototype-of"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.reflect.construct"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.set"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.split"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.for-each"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.for-each"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.last-index-of"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.function.name"),e("core-js/modules/es.number.constructor"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.set"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.split"),e("core-js/modules/web.dom-collections.for-each"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=(n=e("../main"))&&n.__esModule?n:{default:n};(function(e){if(e&&e.__esModule)return;if(null===e||"object"!==a(e)&&"function"!=typeof e)return;var t=i();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o)})(e("../constants")),e("../internationalization");function i(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,i=function(){return e},e)}function a(e){return(a="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}n.default._validateParameters=n.default._clearValidateParamsCache=function(){};e=n.default;r.default=e},{"../../../docs/parameterData.json":void 0,"../constants":264,"../internationalization":273,"../main":275,"core-js/modules/es.array.concat":151,"core-js/modules/es.array.for-each":157,"core-js/modules/es.array.includes":159,"core-js/modules/es.array.index-of":160,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.join":162,"core-js/modules/es.array.last-index-of":163,"core-js/modules/es.array.map":164,"core-js/modules/es.array.slice":165,"core-js/modules/es.function.name":168,"core-js/modules/es.map":169,"core-js/modules/es.number.constructor":173,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.get-prototype-of":180,"core-js/modules/es.object.keys":181,"core-js/modules/es.object.to-string":182,"core-js/modules/es.reflect.construct":184,"core-js/modules/es.regexp.exec":187,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.set":189,"core-js/modules/es.string.includes":191,"core-js/modules/es.string.iterator":192,"core-js/modules/es.string.split":198,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.for-each":237,"core-js/modules/web.dom-collections.iterator":238}],271:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var s=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("./constants"));function a(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,a=function(){return e},e)}r.default={modeAdjust:function(e,t,r,o,n){return n===s.CORNER?{x:e,y:t,w:r,h:o}:n===s.CORNERS?{x:e,y:t,w:r-e,h:o-t}:n===s.RADIUS?{x:e-r,y:t-o,w:2*r,h:2*o}:n===s.CENTER?{x:e-.5*r,y:t-.5*o,w:r,h:o}:void 0}}},{"./constants":264,"core-js/modules/es.array.iterator":161,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.to-string":182,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}],272:[function(e,t,r){"use strict";e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.promise"),e("core-js/modules/es.string.iterator"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.promise"),e("core-js/modules/es.string.iterator"),e("core-js/modules/web.dom-collections.iterator");var o=(n=e("../core/main"))&&n.__esModule?n:{default:n};e("./internationalization");var n=Promise.resolve();Promise.all([new Promise(function(e,t){"complete"===document.readyState?e():window.addEventListener("load",e,!1)}),n]).then(function(){void 0!==window._setupDone?console.warn("p5.js seems to have been imported multiple times. Please remove the duplicate import"):window.mocha||(window.setup&&"function"==typeof window.setup||window.draw&&"function"==typeof window.draw)&&!o.default.instance&&new o.default})},{"../core/main":275,"./internationalization":273,"core-js/modules/es.array.iterator":161,"core-js/modules/es.object.to-string":182,"core-js/modules/es.promise":183,"core-js/modules/es.string.iterator":192,"core-js/modules/web.dom-collections.iterator":238}],273:[function(e,t,r){"use strict";e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.promise"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.split"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.promise"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.split"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.setTranslatorLanguage=r.currentTranslatorLanguage=r.availableTranslatorLanguages=r.initialize=r.translator=void 0;var n,s,o=a(e("i18next")),i=a(e("i18next-browser-languagedetector"));function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var u=function(){function r(e,t){if(!(this instanceof r))throw new TypeError("Cannot call a class as a function");this.init(e,t)}var e,t,o;return e=r,(t=[{key:"fetchWithTimeout",value:function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:2e3;return Promise.race([fetch(e,t),new Promise(function(e,t){return setTimeout(function(){return t(new Error("timeout"))},r)})])}},{key:"init",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};this.services=e,this.options=t}},{key:"read",value:function(e,t,r){var o=this.options.loadPath;e===this.options.fallback?r(null,n[e][t]):s.includes(e)?(o=this.services.interpolator.interpolate(o,{lng:e,ns:t}),this.loadUrl(o,r)):r("Not found",!1)}},{key:"loadUrl",value:function(t,r){this.fetchWithTimeout(t).then(function(e){if(e.ok)return e.json();throw new Error("failed loading ".concat(t))},function(){throw new Error("failed loading ".concat(t))}).then(function(e){return r(null,e)}).catch(r)}}])&&l(e.prototype,t),o&&l(e,o),r}();u.type="backend",r.translator=function(e,t){console.debug("p5.js translator called before translations were loaded"),o.default.t(e,t)},r.initialize=function(){return o.default.use(i.default).use(u).init({fallbackLng:"en",nestingPrefix:"$tr(",nestingSuffix:")",defaultNS:"translation",returnEmptyString:!1,interpolation:{escapeValue:!1},detection:{checkWhitelist:!1,order:["querystring","navigator","htmlTag","path","subdomain"],caches:[]},backend:{fallback:"en",loadPath:"https://cdn.jsdelivr.net/npm/p5/translations/{{lng}}/{{ns}}.json"},partialBundledLanguages:!0,resources:n}).then(function(e){r.translator=e},function(e){return console.debug("Translations failed to load (".concat(e,")"))})},r.availableTranslatorLanguages=function(){return o.default.languages},r.currentTranslatorLanguage=function(e){return o.default.language};r.setTranslatorLanguage=function(e){return o.default.changeLanguage(e||void 0,function(e){return console.debug("Translations failed to load (".concat(e,")"))})}},{"../../translations":void 0,"../../translations/dev":void 0,"core-js/modules/es.array.includes":159,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.join":162,"core-js/modules/es.array.slice":165,"core-js/modules/es.object.keys":181,"core-js/modules/es.object.to-string":182,"core-js/modules/es.promise":183,"core-js/modules/es.regexp.exec":187,"core-js/modules/es.string.includes":191,"core-js/modules/es.string.iterator":192,"core-js/modules/es.string.split":198,"core-js/modules/web.dom-collections.iterator":238,i18next:3,"i18next-browser-languagedetector":3}],274:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;e=(e=e("./main"))&&e.__esModule?e:{default:e};e.default.prototype.pushStyle=function(){throw new Error("pushStyle() not used, see push()")},e.default.prototype.popStyle=function(){throw new Error("popStyle() not used, see pop()")},e.default.prototype.popMatrix=function(){throw new Error("popMatrix() not used, see pop()")},e.default.prototype.pushMatrix=function(){throw new Error("pushMatrix() not used, see push()")};e=e.default;r.default=e},{"./main":275}],275:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.for-each"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.array.splice"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.get-own-property-names"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.for-each"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.for-each"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.array.splice"),e("core-js/modules/es.object.get-own-property-names"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/web.dom-collections.for-each"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,e("./shim");var n=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("./constants"));function a(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,a=function(){return e},e)}function s(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var l,u=function(){function g(e,t){var d=this;if(!(this instanceof g))throw new TypeError("Cannot call a class as a function");this._setupDone=!1,this._preloadDone=!1,this._pixelDensity=Math.ceil(window.devicePixelRatio)||1,this._userNode=t,this._curElement=null,this._elements=[],this._glAttributes=null,this._requestAnimId=0,this._preloadCount=0,this._isGlobal=!1,this._loop=!0,this._startListener=null,this._initializeInstanceVariables(),this._defaultCanvasSize={width:100,height:100},this._events={mousemove:null,mousedown:null,mouseup:null,dragend:null,dragover:null,click:null,dblclick:null,mouseover:null,mouseout:null,keydown:null,keyup:null,keypress:null,touchstart:null,touchmove:null,touchend:null,resize:null,blur:null},this._millisStart=-1,this._recording=!1,this._lcg_random_state=null,this._gaussian_previous=!1,this._events.wheel=null,this._loadingScreenId="p5_loading",this._registeredMethods={};var t=Object.getOwnPropertyNames(g.prototype._registeredMethods),r=!0,o=!1,n=void 0;try{for(var s,i=t[Symbol.iterator]();!(r=(s=i.next()).done);r=!0){var a=s.value;this._registeredMethods[a]=g.prototype._registeredMethods[a].slice()}}catch(e){o=!0,n=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw n}}window.DeviceOrientationEvent&&(this._events.deviceorientation=null),window.DeviceMotionEvent&&!window._isNodeWebkit&&(this._events.devicemotion=null),g.prototype.callRegisteredHooksFor=function(t){var e=this||g.prototype,r=this._isGlobal?window:this;if(e._registeredMethods.hasOwnProperty(t)){var e=e._registeredMethods[t],o=!0,t=!1,n=void 0;try{for(var s,i=e[Symbol.iterator]();!(o=(s=i.next()).done);o=!0){var a=s.value;"function"==typeof a&&a.call(r)}}catch(e){t=!0,n=e}finally{try{o||null==i.return||i.return()}finally{if(t)throw n}}}},this._start=function(){d._userNode&&"string"==typeof d._userNode&&(d._userNode=document.getElementById(d._userNode));var e=d._isGlobal?window:d;if(e.preload){d.callRegisteredHooksFor("beforePreload");var t,r=document.getElementById(d._loadingScreenId),o=(r||((r=document.createElement("div")).innerHTML="Loading...",r.style.position="absolute",r.id=d._loadingScreenId,(d._userNode||document.body).appendChild(r)),d._preloadMethods);for(t in o){o[t]=o[t]||g;var n=o[t];n!==g.prototype&&n!==g||(d._isGlobal&&(window[t]=d._wrapPreload(d,t)),n=d),d._registeredPreloadMethods[t]=n[t],n[t]=d._wrapPreload(n,t)}e.preload(),d._runIfPreloadsAreDone()}else d._setup(),d._recording||d._draw()},this._runIfPreloadsAreDone=function(){var e,t=this._isGlobal?window:this;0===t._preloadCount&&((e=document.getElementById(t._loadingScreenId))&&e.parentNode.removeChild(e),this.callRegisteredHooksFor("afterPreload"),this._setupDone||(this._lastTargetFrameTime=window.performance.now(),this._lastRealFrameTime=window.performance.now(),t._setup(),this._recording||t._draw()))},this._decrementPreload=function(){var e=this._isGlobal?window:this;e._preloadDone||"function"!=typeof e.preload||(e._setProperty("_preloadCount",e._preloadCount-1),e._runIfPreloadsAreDone())},this._wrapPreload=function(o,n){var s=this;return function(){s._incrementPreload();for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return s._registeredPreloadMethods[n].apply(o,t)}},this._incrementPreload=function(){var e=this._isGlobal?window:this;e._preloadDone||e._setProperty("_preloadCount",e._preloadCount+1)},this._setup=function(){d.callRegisteredHooksFor("beforeSetup"),d.createCanvas(d._defaultCanvasSize.width,d._defaultCanvasSize.height,"p2d");var e=d._isGlobal?window:d;if("function"==typeof e.preload)for(var t in d._preloadMethods)e[t]=d._preloadMethods[t][t],e[t]&&d&&(e[t]=e[t].bind(d));d._millisStart=window.performance.now(),e._preloadDone=!0,"function"==typeof e.setup&&e.setup();var r=document.getElementsByTagName("canvas"),o=!0,n=!1,s=void 0;try{for(var i,a=r[Symbol.iterator]();!(o=(i=a.next()).done);o=!0){var l=i.value;"true"===l.dataset.hidden&&(l.style.visibility="",delete l.dataset.hidden)}}catch(e){n=!0,s=e}finally{try{o||null==a.return||a.return()}finally{if(n)throw s}}d._lastTargetFrameTime=window.performance.now(),d._lastRealFrameTime=window.performance.now(),d._setupDone=!0,(d._accessibleOutputs.grid||d._accessibleOutputs.text)&&d._updateAccsOutput(),d.callRegisteredHooksFor("afterSetup")},this._draw=function(){var e=window.performance.now(),t=e-d._lastTargetFrameTime,r=1e3/d._targetFrameRate;(!d._loop||r-5<=t)&&(d.deltaTime=e-d._lastRealFrameTime,d._setProperty("deltaTime",d.deltaTime),d._frameRate=1e3/d.deltaTime,d.redraw(),d._lastTargetFrameTime=Math.max(d._lastTargetFrameTime+r,e),d._lastRealFrameTime=e,void 0!==d._updateMouseCoords&&(d._updateMouseCoords(),d._setProperty("movedX",0),d._setProperty("movedY",0))),d._loop&&(d._requestAnimId=window.requestAnimationFrame(d._draw))},this._setProperty=function(e,t){d[e]=t,d._isGlobal&&(window[e]=t)},this.remove=function(){d._startListener&&window.removeEventListener("load",d._startListener,!1);var t=document.getElementById(d._loadingScreenId);if(t&&(t.parentNode.removeChild(t),d._incrementPreload()),d._curElement){for(var e in d._loop=!1,d._requestAnimId&&window.cancelAnimationFrame(d._requestAnimId),d._events)window.removeEventListener(e,d._events[e]);var r=!0,t=!1,o=void 0;try{for(var n,s=d._elements[Symbol.iterator]();!(r=(n=s.next()).done);r=!0){var i,a=n.value;for(i in a.elt&&a.elt.parentNode&&a.elt.parentNode.removeChild(a.elt),a._events)a.elt.removeEventListener(i,a._events[i])}}catch(e){t=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(t)throw o}}var l=d;d._registeredMethods.remove.forEach(function(e){void 0!==e&&e.call(l)})}if(d._isGlobal){for(var u in g.prototype)try{delete window[u]}catch(e){window[u]=void 0}for(var c in d)if(d.hasOwnProperty(c))try{delete window[c]}catch(e){window[c]=void 0}g.instance=null}},this._registeredMethods.init.forEach(function(e){void 0!==e&&e.call(this)},this),this._setupPromisePreloads();var l,u,c=this._createFriendlyGlobalFunctionBinder();if(e)e(this),g._checkForUserDefinedFunctions(this);else{for(var h in this._isGlobal=!0,g.instance=this,g.prototype)"function"==typeof g.prototype[h]?(l=h.substring(2),this._events.hasOwnProperty(l)||(Math.hasOwnProperty(h)&&Math[h]===g.prototype[h]?c(h,g.prototype[h]):c(h,g.prototype[h].bind(this)))):c(h,g.prototype[h]);for(var f in this)this.hasOwnProperty(f)&&c(f,this[f])}for(u in this._events){var p=this["_on".concat(u)];p&&(p=p.bind(this),window.addEventListener(u,p,{passive:!1}),this._events[u]=p)}function m(){d._setProperty("focused",!0)}function y(){d._setProperty("focused",!1)}window.addEventListener("focus",m),window.addEventListener("blur",y),this.registerMethod("remove",function(){window.removeEventListener("focus",m),window.removeEventListener("blur",y)}),"complete"===document.readyState?this._start():(this._startListener=this._start.bind(this),window.addEventListener("load",this._startListener,!1))}var e,t,r;return e=g,(t=[{key:"_initializeInstanceVariables",value:function(){this._accessibleOutputs={text:!1,grid:!1,textLabel:!1,gridLabel:!1},this._styles=[],this._bezierDetail=20,this._curveDetail=20,this._colorMode=n.RGB,this._colorMaxes={rgb:[255,255,255,255],hsb:[360,100,100,1],hsl:[360,100,100,1]},this._downKeys={}}},{key:"registerPreloadMethod",value:function(e,t){g.prototype._preloadMethods.hasOwnProperty(e)||(g.prototype._preloadMethods[e]=t)}},{key:"registerMethod",value:function(e,t){var r=this||g.prototype;r._registeredMethods.hasOwnProperty(e)||(r._registeredMethods[e]=[]),r._registeredMethods[e].push(t)}},{key:"unregisterMethod",value:function(e,t){var r=this||g.prototype;if(r._registeredMethods.hasOwnProperty(e)){for(var o=r._registeredMethods[e],n=[],s=0;s<o.length;s++)o[s]===t&&n.push(s);for(var i=n.length-1;0<=i;i--)o.splice(n[i],1)}}},{key:"_createFriendlyGlobalFunctionBinder",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},r=e.globalObject||window;e.log||console.log.bind(console);return function(e,t){g.disableFriendlyErrors,r[e]=t}}}])&&s(e.prototype,t),r&&s(e,r),g}();for(l in u.instance=null,u.disableFriendlyErrors=!1,n)u.prototype[l]=n[l];u.VERSION=n.VERSION,u.prototype._preloadMethods={loadJSON:u.prototype,loadImage:u.prototype,loadStrings:u.prototype,loadXML:u.prototype,loadBytes:u.prototype,loadTable:u.prototype,loadFont:u.prototype,loadModel:u.prototype,loadShader:u.prototype},u.prototype._registeredMethods={init:[],pre:[],post:[],remove:[]},u.prototype._registeredPreloadMethods={},r.default=u},{"./constants":264,"./shim":286,"core-js/modules/es.array.for-each":157,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.slice":165,"core-js/modules/es.array.splice":167,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.get-own-property-names":179,"core-js/modules/es.object.to-string":182,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.for-each":237,"core-js/modules/web.dom-collections.iterator":238}],276:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=(e=e("./main"))&&e.__esModule?e:{default:e};function s(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}n.default.Element=function(){function r(e,t){if(!(this instanceof r))throw new TypeError("Cannot call a class as a function");this.elt=e,this._pInst=this._pixelsState=t,this._events={},this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight}var e,t,o;return e=r,o=[{key:"_adjustListener",value:function(e,t,r){return!1===t?n.default.Element._detachListener(e,r):n.default.Element._attachListener(e,t,r),this}},{key:"_attachListener",value:function(e,t,r){r._events[e]&&n.default.Element._detachListener(e,r);t=t.bind(r);r.elt.addEventListener(e,t,!1),r._events[e]=t}},{key:"_detachListener",value:function(e,t){var r=t._events[e];t.elt.removeEventListener(e,r,!1),t._events[e]=null}}],(t=[{key:"parent",value:function(e){return void 0===e?this.elt.parentNode:("string"==typeof e?("#"===e[0]&&(e=e.substring(1)),e=document.getElementById(e)):e instanceof n.default.Element&&(e=e.elt),e.appendChild(this.elt),this)}},{key:"id",value:function(e){return void 0===e?this.elt.id:(this.elt.id=e,this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight,this)}},{key:"class",value:function(e){return void 0===e?this.elt.className:(this.elt.className=e,this)}},{key:"mousePressed",value:function(t){return n.default.Element._adjustListener("mousedown",function(e){return this._pInst._setProperty("mouseIsPressed",!0),this._pInst._setMouseButton(e),t.call(this,e)},this),this}},{key:"doubleClicked",value:function(e){return n.default.Element._adjustListener("dblclick",e,this),this}},{key:"mouseWheel",value:function(e){return n.default.Element._adjustListener("wheel",e,this),this}},{key:"mouseReleased",value:function(e){return n.default.Element._adjustListener("mouseup",e,this),this}},{key:"mouseClicked",value:function(e){return n.default.Element._adjustListener("click",e,this),this}},{key:"mouseMoved",value:function(e){return n.default.Element._adjustListener("mousemove",e,this),this}},{key:"mouseOver",value:function(e){return n.default.Element._adjustListener("mouseover",e,this),this}},{key:"mouseOut",value:function(e){return n.default.Element._adjustListener("mouseout",e,this),this}},{key:"touchStarted",value:function(e){return n.default.Element._adjustListener("touchstart",e,this),this}},{key:"touchMoved",value:function(e){return n.default.Element._adjustListener("touchmove",e,this),this}},{key:"touchEnded",value:function(e){return n.default.Element._adjustListener("touchend",e,this),this}},{key:"dragOver",value:function(e){return n.default.Element._adjustListener("dragover",e,this),this}},{key:"dragLeave",value:function(e){return n.default.Element._adjustListener("dragleave",e,this),this}},{key:"_setProperty",value:function(e,t){this[e]=t}}])&&s(e.prototype,t),o&&s(e,o),r}();e=n.default.Element;r.default=e},{"./main":275}],277:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.splice"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.get-prototype-of"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.reflect.construct"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.splice"),e("core-js/modules/es.object.get-prototype-of"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var c=(u=e("./main"))&&u.__esModule?u:{default:u},d=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("./constants"));function a(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,a=function(){return e},e)}function n(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(r){return function(){var e,t=l(r);return f(this,function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch(e){}}}()?(e=l(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function f(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}c.default.Graphics=function(e){var t=u;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e);var r,l=h(u);function u(e,t,r,o,n){var s;if(!(this instanceof u))throw new TypeError("Cannot call a class as a function");a=n||document.createElement("canvas"),(s=l.call(this,a,o)).canvas=a;var i,a=r||d.P2D,r=o._userNode||document.body;for(i in n||r.appendChild(s.canvas),c.default.prototype)s[i]||("function"==typeof c.default.prototype[i]?s[i]=c.default.prototype[i].bind(p(s)):s[i]=c.default.prototype[i]);return c.default.prototype._initializeInstanceVariables.apply(p(s)),s.width=e,s.height=t,s._pixelDensity=o._pixelDensity,a===d.WEBGL?s._renderer=new c.default.RendererGL(s.canvas,p(s),!1):s._renderer=new c.default.Renderer2D(s.canvas,p(s),!1),o._elements.push(p(s)),Object.defineProperty(p(s),"deltaTime",{get:function(){return this._pInst.deltaTime}}),s._renderer.resize(e,t),s._renderer._applyDefaults(),f(s,p(s))}return t=u,(e=[{key:"reset",value:function(){this._renderer.resetMatrix(),this._renderer.isP3D&&this._renderer._update()}},{key:"remove",value:function(){this.elt.parentNode&&this.elt.parentNode.removeChild(this.elt);var e,t=this._pInst._elements.indexOf(this);for(e in-1!==t&&this._pInst._elements.splice(t,1),this._events)this.elt.removeEventListener(e,this._events[e])}},{key:"createFramebuffer",value:function(e){return new c.default.Framebuffer(this,e)}}])&&n(t.prototype,e),r&&n(t,r),u}(c.default.Element);var u=c.default.Graphics;r.default=u},{"./constants":264,"./main":275,"core-js/modules/es.array.index-of":160,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.splice":167,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.get-prototype-of":180,"core-js/modules/es.object.to-string":182,"core-js/modules/es.reflect.construct":184,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}],278:[function(e,t,r){"use strict";function o(e){return(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})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.number.constructor"),e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.get-prototype-of"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.reflect.construct"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.replace"),e("core-js/modules/es.string.split"),e("core-js/modules/es.string.trim"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.number.constructor"),e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.get-prototype-of"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.replace"),e("core-js/modules/es.string.split"),e("core-js/modules/es.string.trim"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=(s=e("./main"))&&s.__esModule?s:{default:s},P=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==l(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("../core/constants"));function i(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,i=function(){return e},e)}function l(e){return(l="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}function u(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(o){return function(){var e,t,r=n(o);return e=function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch(e){}}}()?(e=n(this).constructor,Reflect.construct(r,arguments,e)):r.apply(this,arguments),r=this,!(t=e)||"object"!==l(t)&&"function"!=typeof t?h(r):t}}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function n(e){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var s=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e);var r,n=d(s);function s(e,t,r){var o;if(this instanceof s)return(o=n.call(this,e,t)).canvas=e,o._pixelsState=t,r?(o._isMainCanvas=!0,o._pInst._setProperty("_curElement",h(o)),o._pInst._setProperty("canvas",o.canvas),o._pInst._setProperty("width",o.width),o._pInst._setProperty("height",o.height)):(o.canvas.style.display="none",o._styles=[]),o._clipping=!1,o._clipInvert=!1,o._textSize=12,o._textLeading=15,o._textFont="sans-serif",o._textStyle=P.NORMAL,o._textAscent=null,o._textDescent=null,o._textAlign=P.LEFT,o._textBaseline=P.BASELINE,o._textWrap=P.WORD,o._rectMode=P.CORNER,o._ellipseMode=P.CENTER,o._curveTightness=0,o._imageMode=P.CORNER,o._tint=null,o._doStroke=!0,o._doFill=!0,o._strokeSet=!1,o._fillSet=!1,o._leadingSet=!1,o._pushPopDepth=0,o;throw new TypeError("Cannot call a class as a function")}return t=s,(e=[{key:"push",value:function(){return this._pushPopDepth++,{properties:{_doStroke:this._doStroke,_strokeSet:this._strokeSet,_doFill:this._doFill,_fillSet:this._fillSet,_tint:this._tint,_imageMode:this._imageMode,_rectMode:this._rectMode,_ellipseMode:this._ellipseMode,_textFont:this._textFont,_textLeading:this._textLeading,_leadingSet:this._leadingSet,_textSize:this._textSize,_textAlign:this._textAlign,_textBaseline:this._textBaseline,_textStyle:this._textStyle,_textWrap:this._textWrap}}}},{key:"pop",value:function(e){this._pushPopDepth--,e.properties&&Object.assign(this,e.properties)}},{key:"beginClip",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(this._clipping)throw new Error("It looks like you're trying to clip while already in the middle of clipping. Did you forget to endClip()?");this._clipping=!0,this._clipInvert=e.invert}},{key:"endClip",value:function(){if(!this._clipping)throw new Error("It looks like you've called endClip() without beginClip(). Did you forget to call beginClip() first?");this._clipping=!1}},{key:"resize",value:function(e,t){this.width=e,this.height=t,this.elt.width=e*this._pInst._pixelDensity,this.elt.height=t*this._pInst._pixelDensity,this.elt.style.width="".concat(e,"px"),this.elt.style.height="".concat(t,"px"),this._isMainCanvas&&(this._pInst._setProperty("width",this.width),this._pInst._setProperty("height",this.height))}},{key:"get",value:function(e,t,r,o){var n=this._pixelsState,s=n._pixelDensity,i=this.canvas;if(void 0===e&&void 0===t)e=t=0,r=n.width,o=n.height;else if(e*=s,t*=s,void 0===r&&void 0===o)return e<0||t<0||e>=i.width||t>=i.height?[0,0,0,0]:this._getPixel(e,t);n=new a.default.Image(r*s,o*s);return n.pixelDensity(s),n.canvas.getContext("2d").drawImage(i,e,t,r*s,o*s,0,0,r*s,o*s),n}},{key:"textLeading",value:function(e){return"number"==typeof e?(this._setProperty("_leadingSet",!0),this._setProperty("_textLeading",e),this._pInst):this._textLeading}},{key:"textStyle",value:function(e){return e?(e!==P.NORMAL&&e!==P.ITALIC&&e!==P.BOLD&&e!==P.BOLDITALIC||this._setProperty("_textStyle",e),this._applyTextProperties()):this._textStyle}},{key:"textAscent",value:function(){return null===this._textAscent&&this._updateTextMetrics(),this._textAscent}},{key:"textDescent",value:function(){return null===this._textDescent&&this._updateTextMetrics(),this._textDescent}},{key:"textAlign",value:function(e,t){return void 0!==e?(this._setProperty("_textAlign",e),void 0!==t&&this._setProperty("_textBaseline",t),this._applyTextProperties()):{horizontal:this._textAlign,vertical:this._textBaseline}}},{key:"textWrap",value:function(e){return this._setProperty("_textWrap",e),this._textWrap}},{key:"text",value:function(e,t,r,o,n){var s,i,a,l,u=this._pInst,c=this._textWrap,d=Number.MAX_VALUE,h=r;if((this._doFill||this._doStroke)&&void 0!==e){if(s=(e=(e="string"!=typeof e?e.toString():e).replace(/(\t)/g," ")).split("\n"),void 0!==o){switch(this._rectMode===P.CENTER&&(t-=o/2),this._textAlign){case P.CENTER:t+=o/2;break;case P.RIGHT:t+=o}if(void 0!==n){this._rectMode===P.CENTER&&(r-=n/2,h-=n/2);var e=r,f=u.textAscent();switch(this._textBaseline){case P.BOTTOM:l=r+n,r=Math.max(l,r),h+=f;break;case P.CENTER:l=r+n/2,r=Math.max(l,r),h+=f/2}d=r+n-f,this._textBaseline===P.CENTER&&(d=e+n-f/2)}else this._textBaseline!==P.BOTTOM&&this._textBaseline!==P.CENTER||(h=r-(e=u.textSize()*this._textLeading)/2,d=r+e/2);if(c===P.WORD){for(var p=[],m=0;m<s.length;m++){for(var y="",g=s[m].split(" "),v=0;v<g.length;v++)i="".concat(y+g[v])+" ",y=o<(a=this.textWidth(i))&&0<y.length?(p.push(y),"".concat(g[v])+" "):i;p.push(y)}var b=0;this._textBaseline===P.CENTER?b=(p.length-1)*u.textLeading()/2:this._textBaseline===P.BOTTOM&&(b=(p.length-1)*u.textLeading());for(var j=0;j<s.length;j++){y="",g=s[j].split(" ");for(var _=0;_<g.length;_++)i="".concat(y+g[_])+" ",o<(a=this.textWidth(i))&&0<y.length?(this._renderText(u,y.trim(),t,r-b,d,h),y="".concat(g[_])+" ",r+=u.textLeading()):y=i;this._renderText(u,y.trim(),t,r-b,d,h),r+=u.textLeading()}}else{for(var x=[],w=0;w<s.length;w++)for(var S=s[w].split(y=""),T=0;T<S.length;T++)i="".concat(y+S[T]),(a=this.textWidth(i))<=o?y+=S[T]:o<a&&0<y.length&&(x.push(y),y="".concat(S[T]));x.push(y);var M=0;this._textBaseline===P.CENTER?M=(x.length-1)*u.textLeading()/2:this._textBaseline===P.BOTTOM&&(M=(x.length-1)*u.textLeading());for(var E=0;E<s.length;E++){S=s[E].split(y="");for(var k=0;k<S.length;k++)i="".concat(y+S[k]),(a=this.textWidth(i))<=o?y+=S[k]:o<a&&0<y.length&&(this._renderText(u,y.trim(),t,r-M,d,h),r+=u.textLeading(),y="".concat(S[k]))}this._renderText(u,y.trim(),t,r-M,d,h),r+=u.textLeading()}}else{var C=0;this._textBaseline===P.CENTER?C=(s.length-1)*u.textLeading()/2:this._textBaseline===P.BOTTOM&&(C=(s.length-1)*u.textLeading());for(var O=0;O<s.length;O++)this._renderText(u,s[O],t,r-C,d,h-C),r+=u.textLeading()}return u}}},{key:"_applyDefaults",value:function(){return this}},{key:"_isOpenType",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this._textFont;return"object"===l(e)&&e.font&&e.font.supported}},{key:"_updateTextMetrics",value:function(){var e,t,r,o,n,s;return this._isOpenType()?(this._setProperty("_textAscent",this._textFont._textAscent()),this._setProperty("_textDescent",this._textFont._textDescent())):((e=document.createElement("span")).style.fontFamily=this._textFont,e.style.fontSize="".concat(this._textSize,"px"),e.innerHTML="ABCjgq|",(s=document.createElement("div")).style.display="inline-block",s.style.width="1px",s.style.height="0px",o=((t=document.createElement("div")).appendChild(e),t.appendChild(s),t.style.height="0px",t.style.overflow="hidden",document.body.appendChild(t),s.style.verticalAlign="baseline",f(s)),n=f(e),r=o[1]-n[1],o=(s.style.verticalAlign="bottom",f(s)),n=f(e),s=o[1]-n[1]-r,document.body.removeChild(t),this._setProperty("_textAscent",r),this._setProperty("_textDescent",s)),this}}])&&u(t.prototype,e),r&&u(t,r),s}(a.default.Element);function f(e){var t=0,r=0;if(e.offsetParent)for(;t+=e.offsetLeft,r+=e.offsetTop,e=e.offsetParent;);else t+=e.offsetLeft,r+=e.offsetTop;return[t,r]}s.prototype.textSize=function(e){return"number"==typeof e?(this._setProperty("_textSize",e),this._leadingSet||this._setProperty("_textLeading",e*P._DEFAULT_LEADMULT),this._applyTextProperties()):this._textSize},a.default.Renderer=s;e=a.default.Renderer;r.default=e},{"../core/constants":264,"./main":275,"core-js/modules/es.array.iterator":161,"core-js/modules/es.number.constructor":173,"core-js/modules/es.object.assign":176,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.get-prototype-of":180,"core-js/modules/es.object.to-string":182,"core-js/modules/es.reflect.construct":184,"core-js/modules/es.regexp.exec":187,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.iterator":192,"core-js/modules/es.string.replace":196,"core-js/modules/es.string.split":198,"core-js/modules/es.string.trim":201,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}],279:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.fill"),e("core-js/modules/es.array.for-each"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.function.name"),e("core-js/modules/es.number.to-fixed"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.get-prototype-of"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.reflect.construct"),e("core-js/modules/es.reflect.get"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.fill"),e("core-js/modules/es.array.for-each"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.function.name"),e("core-js/modules/es.number.to-fixed"),e("core-js/modules/es.object.get-prototype-of"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.to-string"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var d=(n=e("./main"))&&n.__esModule?n:{default:n},p=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("./constants"));function a(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,a=function(){return e},e)}function s(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function l(e,t,r){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var e=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(e)return(e=Object.getOwnPropertyDescriptor(e,t)).get?e.get.call(r):e.value})(e,t,r||e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(r){return function(){var e,t=h(r),t=(e=function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch(e){}}}()?(e=h(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(!e||"object"!==i(e)&&"function"!=typeof e){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e("./p5.Renderer");var f="rgba(0,0,0,0)",n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e);var r,o=c(n);function n(e,t,r){if(this instanceof n)return(e=o.call(this,e,t,r)).drawingContext=e.canvas.getContext("2d"),e._pInst._setProperty("drawingContext",e.drawingContext),e;throw new TypeError("Cannot call a class as a function")}return t=n,(e=[{key:"getFilterGraphicsLayer",value:function(){var e;return this.filterGraphicsLayer||(e=(this._pInst instanceof d.default.Graphics?this._pInst:this)._pInst,this.filterGraphicsLayer=new d.default.Graphics(this.width,this.height,p.WEBGL,e)),this.filterGraphicsLayer.width===this.width&&this.filterGraphicsLayer.height===this.height||this.filterGraphicsLayer.resizeCanvas(this.width,this.height),this.filterGraphicsLayer.pixelDensity()!==this._pInst.pixelDensity()&&this.filterGraphicsLayer.pixelDensity(this._pInst.pixelDensity()),this.filterGraphicsLayer}},{key:"_applyDefaults",value:function(){this._cachedFillStyle=this._cachedStrokeStyle=void 0,this._cachedBlendMode=p.BLEND,this._setFill(p._DEFAULT_FILL),this._setStroke(p._DEFAULT_STROKE),this.drawingContext.lineCap=p.ROUND,this.drawingContext.font="normal 12px sans-serif"}},{key:"resize",value:function(e,t){l(h(n.prototype),"resize",this).call(this,e,t),this.drawingContext.scale(this._pInst._pixelDensity,this._pInst._pixelDensity)}},{key:"background",value:function(){var e,t;this.drawingContext.save(),this.resetMatrix(),(arguments.length<=0?void 0:arguments[0])instanceof d.default.Image?0<=(arguments.length<=1?void 0:arguments[1])?(e=arguments.length<=0?void 0:arguments[0],this.drawingContext.globalAlpha=(arguments.length<=1?void 0:arguments[1])/255,this._pInst.image(e,0,0,this.width,this.height)):this._pInst.image(arguments.length<=0?void 0:arguments[0],0,0,this.width,this.height):(e=this._getFill(),t=(t=this._pInst).color.apply(t,arguments),this._pInst._addAccsOutput()&&this._pInst._accsBackground(t.levels),t=t.toString(),this._setFill(t),this._isErasing&&this.blendMode(this._cachedBlendMode),this.drawingContext.fillRect(0,0,this.width,this.height),this._setFill(e),this._isErasing&&this._pInst.erase()),this.drawingContext.restore()}},{key:"clear",value:function(){this.drawingContext.save(),this.resetMatrix(),this.drawingContext.clearRect(0,0,this.width,this.height),this.drawingContext.restore()}},{key:"fill",value:function(){var e=(e=this._pInst).color.apply(e,arguments);this._setFill(e.toString()),this._pInst._addAccsOutput()&&this._pInst._accsCanvasColors("fill",e.levels)}},{key:"stroke",value:function(){var e=(e=this._pInst).color.apply(e,arguments);this._setStroke(e.toString()),this._pInst._addAccsOutput()&&this._pInst._accsCanvasColors("stroke",e.levels)}},{key:"erase",value:function(e,t){this._isErasing||(this._cachedFillStyle=this.drawingContext.fillStyle,e=this._pInst.color(255,e).toString(),this.drawingContext.fillStyle=e,this._cachedStrokeStyle=this.drawingContext.strokeStyle,e=this._pInst.color(255,t).toString(),this.drawingContext.strokeStyle=e,t=this._cachedBlendMode,this.blendMode(p.REMOVE),this._cachedBlendMode=t,this._isErasing=!0)}},{key:"noErase",value:function(){this._isErasing&&(this.drawingContext.fillStyle=this._cachedFillStyle,this.drawingContext.strokeStyle=this._cachedStrokeStyle,this.blendMode(this._cachedBlendMode),this._isErasing=!1)}},{key:"beginClip",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=(l(h(n.prototype),"beginClip",this).call(this,e),this._cachedFillStyle=this.drawingContext.fillStyle,this._pInst.color(255,0).toString()),e=(this.drawingContext.fillStyle=e,this._cachedStrokeStyle=this.drawingContext.strokeStyle,this._pInst.color(255,0).toString()),e=(this.drawingContext.strokeStyle=e,this._cachedBlendMode);this.blendMode(p.BLEND),this._cachedBlendMode=e,this.drawingContext.beginPath(),this._clipInvert&&(this.drawingContext.moveTo(-2*this.width,-2*this.height),this.drawingContext.lineTo(-2*this.width,2*this.height),this.drawingContext.lineTo(2*this.width,2*this.height),this.drawingContext.lineTo(2*this.width,-2*this.height),this.drawingContext.closePath())}},{key:"endClip",value:function(){this._doFillStrokeClose(),this.drawingContext.clip(),l(h(n.prototype),"endClip",this).call(this),this.drawingContext.fillStyle=this._cachedFillStyle,this.drawingContext.strokeStyle=this._cachedStrokeStyle,this.blendMode(this._cachedBlendMode)}},{key:"image",value:function(e,t,r,o,n,s,i,a,l){e.gifProperties&&e._animateGif(this._pInst);try{d.default.MediaElement&&e instanceof d.default.MediaElement&&e._ensureCanvas();var u=(u=this._tint&&e.canvas?this._getTintedImageCanvas(e):u)||e.canvas||e.elt,c=1;e.width&&0<e.width&&(c=u.width/e.width),this._isErasing&&this.blendMode(this._cachedBlendMode),this.drawingContext.drawImage(u,c*t,c*r,c*o,c*n,s,i,a,l),this._isErasing&&this._pInst.erase()}catch(e){if("NS_ERROR_NOT_AVAILABLE"!==e.name)throw e}}},{key:"_getTintedImageCanvas",value:function(e){if(!e.canvas)return e;e.tintCanvas||(e.tintCanvas=document.createElement("canvas")),e.tintCanvas.width!==e.canvas.width&&(e.tintCanvas.width=e.canvas.width),e.tintCanvas.height!==e.canvas.height&&(e.tintCanvas.height=e.canvas.height);var t=e.tintCanvas.getContext("2d");return t.save(),t.clearRect(0,0,e.canvas.width,e.canvas.height),(this._tint[0]<255||this._tint[1]<255||this._tint[2]<255)&&(t.drawImage(e.canvas,0,0),t.globalCompositeOperation="luminosity",t.drawImage(e.canvas,0,0),t.globalCompositeOperation="color",t.drawImage(e.canvas,0,0),t.globalCompositeOperation="multiply",t.fillStyle="rgb(".concat(this._tint.slice(0,3).join(", "),")"),t.fillRect(0,0,e.canvas.width,e.canvas.height),t.globalCompositeOperation="destination-in"),t.globalAlpha=this._tint[3]/255,t.drawImage(e.canvas,0,0),t.restore(),e.tintCanvas}},{key:"blendMode",value:function(e){if(e===p.SUBTRACT)console.warn("blendMode(SUBTRACT) only works in WEBGL mode.");else{if(e!==p.BLEND&&e!==p.REMOVE&&e!==p.DARKEST&&e!==p.LIGHTEST&&e!==p.DIFFERENCE&&e!==p.MULTIPLY&&e!==p.EXCLUSION&&e!==p.SCREEN&&e!==p.REPLACE&&e!==p.OVERLAY&&e!==p.HARD_LIGHT&&e!==p.SOFT_LIGHT&&e!==p.DODGE&&e!==p.BURN&&e!==p.ADD)throw new Error("Mode ".concat(e," not recognized."));this._cachedBlendMode=e,this.drawingContext.globalCompositeOperation=e}}},{key:"blend",value:function(){for(var e=this.drawingContext.globalCompositeOperation,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];var n=r[r.length-1],s=Array.prototype.slice.call(r,0,r.length-1);this.drawingContext.globalCompositeOperation=n,d.default.prototype.copy.apply(this,s),this.drawingContext.globalCompositeOperation=e}},{key:"_getPixel",value:function(e,t){e=this.drawingContext.getImageData(e,t,1,1).data;return[e[0],e[1],e[2],e[3]]}},{key:"loadPixels",value:function(){var e=this._pixelsState,t=e._pixelDensity,r=this.width*t,t=this.height*t,r=this.drawingContext.getImageData(0,0,r,t);e._setProperty("imageData",r),e._setProperty("pixels",r.data)}},{key:"set",value:function(e,t,r){e=Math.floor(e),t=Math.floor(t);var o=this._pixelsState;if(r instanceof d.default.Image)this.drawingContext.save(),this.drawingContext.setTransform(1,0,0,1,0,0),this.drawingContext.scale(o._pixelDensity,o._pixelDensity),this.drawingContext.clearRect(e,t,r.width,r.height),this.drawingContext.drawImage(r.canvas,e,t),this.drawingContext.restore();else{var n=0,s=0,i=0,a=0,l=4*(t*o._pixelDensity*(this.width*o._pixelDensity)+e*o._pixelDensity);if(o.imageData||o.loadPixels.call(o),"number"==typeof r)l<o.pixels.length&&(i=s=n=r,a=255);else if(r instanceof Array){if(r.length<4)throw new Error("pixel array must be of the form [R, G, B, A]");l<o.pixels.length&&(n=r[0],s=r[1],i=r[2],a=r[3])}else r instanceof d.default.Color&&l<o.pixels.length&&(n=r.levels[0],s=r.levels[1],i=r.levels[2],a=r.levels[3]);for(var u=0;u<o._pixelDensity;u++)for(var c=0;c<o._pixelDensity;c++)l=4*((t*o._pixelDensity+c)*this.width*o._pixelDensity+(e*o._pixelDensity+u)),o.pixels[l]=n,o.pixels[l+1]=s,o.pixels[l+2]=i,o.pixels[l+3]=a}}},{key:"updatePixels",value:function(e,t,r,o){var n=this._pixelsState,s=n._pixelDensity;void 0===e&&void 0===t&&void 0===r&&void 0===o&&(t=e=0,r=this.width,o=this.height),e*=s,t*=s,r*=s,o*=s,this.gifProperties&&(this.gifProperties.frames[this.gifProperties.displayIndex].image=n.imageData),this.drawingContext.putImageData(n.imageData,e,t,0,0,r,o)}},{key:"_acuteArcToBezier",value:function(e,t){var r=t/2,o=Math.cos(r),n=Math.sin(r),s=1/Math.tan(r),r=e+r,i=Math.cos(r),r=Math.sin(r),a=(4-o)/3,n=n+(o-a)*s;return{ax:Math.cos(e).toFixed(7),ay:Math.sin(e).toFixed(7),bx:(a*i+n*r).toFixed(7),by:(a*r-n*i).toFixed(7),cx:(a*i-n*r).toFixed(7),cy:(a*r+n*i).toFixed(7),dx:Math.cos(e+t).toFixed(7),dy:Math.sin(e+t).toFixed(7)}}},{key:"arc",value:function(r,o,e,t,n,s,i){var a,l=this.drawingContext,u=e/2,c=t/2,d=[];for(r+=u,o+=c;1e-5<=s-n;)a=Math.min(s-n,p.HALF_PI),d.push(this._acuteArcToBezier(n,a)),n+=a;return this._doFill&&(this._clipping||l.beginPath(),d.forEach(function(e,t){0===t&&l.moveTo(r+e.ax*u,o+e.ay*c),l.bezierCurveTo(r+e.bx*u,o+e.by*c,r+e.cx*u,o+e.cy*c,r+e.dx*u,o+e.dy*c)}),i!==p.PIE&&null!=i||l.lineTo(r,o),l.closePath(),this._clipping||l.fill()),this._doStroke&&(this._clipping||l.beginPath(),d.forEach(function(e,t){0===t&&l.moveTo(r+e.ax*u,o+e.ay*c),l.bezierCurveTo(r+e.bx*u,o+e.by*c,r+e.cx*u,o+e.cy*c,r+e.dx*u,o+e.dy*c)}),i===p.PIE?(l.lineTo(r,o),l.closePath()):i===p.CHORD&&l.closePath(),this._clipping||l.stroke()),this}},{key:"ellipse",value:function(e){var t=this.drawingContext,r=this._doFill,o=this._doStroke,n=parseFloat(e[0]),s=parseFloat(e[1]),i=parseFloat(e[2]),e=parseFloat(e[3]);if(r&&!o){if(this._getFill()===f)return this}else if(!r&&o&&this._getStroke()===f)return this;var a=i/2*.5522847498,l=e/2*.5522847498,u=n+i,c=s+e,i=n+i/2,e=s+e/2;this._clipping||t.beginPath(),t.moveTo(n,e),t.bezierCurveTo(n,e-l,i-a,s,i,s),t.bezierCurveTo(i+a,s,u,e-l,u,e),t.bezierCurveTo(u,e+l,i+a,c,i,c),t.bezierCurveTo(i-a,c,n,e+l,n,e),!this._clipping&&r&&t.fill(),!this._clipping&&o&&t.stroke()}},{key:"line",value:function(e,t,r,o){var n=this.drawingContext;return this._doStroke&&this._getStroke()!==f&&(this._clipping||n.beginPath(),n.moveTo(e,t),n.lineTo(r,o),n.stroke()),this}},{key:"point",value:function(e,t){var r,o,n=this.drawingContext;return!this._doStroke||this._getStroke()===f?this:(r=this._getStroke(),o=this._getFill(),this._clipping||this._setFill(r),this._clipping||n.beginPath(),n.arc(e,t,n.lineWidth/2,0,p.TWO_PI,!1),void(this._clipping||(n.fill(),this._setFill(o))))}},{key:"quad",value:function(e,t,r,o,n,s,i,a){var l=this.drawingContext,u=this._doFill,c=this._doStroke;if(u&&!c){if(this._getFill()===f)return this}else if(!u&&c&&this._getStroke()===f)return this;return this._clipping||l.beginPath(),l.moveTo(e,t),l.lineTo(r,o),l.lineTo(n,s),l.lineTo(i,a),l.closePath(),!this._clipping&&u&&l.fill(),!this._clipping&&c&&l.stroke(),this}},{key:"rect",value:function(e){var t,r,o=e[0],n=e[1],s=e[2],i=e[3],a=e[4],l=e[5],u=e[6],e=e[7],c=this.drawingContext,d=this._doFill,h=this._doStroke;if(d&&!h){if(this._getFill()===f)return this}else if(!d&&h&&this._getStroke()===f)return this;return this._clipping||c.beginPath(),void 0===a?c.rect(o,n,s,i):(void 0===l&&(l=a),void 0===u&&(u=l),void 0===e&&(e=u),h=(d=Math.abs(s))/2,r=(t=Math.abs(i))/2,t<2*(a=d<2*a?h:a)&&(a=r),t<2*(l=d<2*l?h:l)&&(l=r),t<2*(u=d<2*u?h:u)&&(u=r),t<2*(e=d<2*e?h:e)&&(e=r),this._clipping||c.beginPath(),c.moveTo(o+a,n),c.arcTo(o+s,n,o+s,n+i,l),c.arcTo(o+s,n+i,o,n+i,u),c.arcTo(o,n+i,o,n,e),c.arcTo(o,n,o+s,n,a),c.closePath()),!this._clipping&&this._doFill&&c.fill(),!this._clipping&&this._doStroke&&c.stroke(),this}},{key:"triangle",value:function(e){var t=this.drawingContext,r=this._doFill,o=this._doStroke,n=e[0],s=e[1],i=e[2],a=e[3],l=e[4],e=e[5];if(r&&!o){if(this._getFill()===f)return this}else if(!r&&o&&this._getStroke()===f)return this;this._clipping||t.beginPath(),t.moveTo(n,s),t.lineTo(i,a),t.lineTo(l,e),t.closePath(),!this._clipping&&r&&t.fill(),!this._clipping&&o&&t.stroke()}},{key:"endShape",value:function(e,t,r,o,n,s,i){if(0!==t.length&&(this._doStroke||this._doFill)){var a,l,u,c=e===p.CLOSE,d=(c&&!s&&t.push(t[0]),t.length);if(r&&null===i){if(3<d){var h=[],f=1-this._curveTightness;for(this._clipping||this.drawingContext.beginPath(),this.drawingContext.moveTo(t[1][0],t[1][1]),l=1;l+2<d;l++)a=t[l],h[0]=[a[0],a[1]],h[1]=[a[0]+(f*t[l+1][0]-f*t[l-1][0])/6,a[1]+(f*t[l+1][1]-f*t[l-1][1])/6],h[2]=[t[l+1][0]+(f*t[l][0]-f*t[l+2][0])/6,t[l+1][1]+(f*t[l][1]-f*t[l+2][1])/6],h[3]=[t[l+1][0],t[l+1][1]],this.drawingContext.bezierCurveTo(h[1][0],h[1][1],h[2][0],h[2][1],h[3][0],h[3][1]);c&&this.drawingContext.lineTo(t[l+1][0],t[l+1][1]),this._doFillStrokeClose(c)}}else if(o&&null===i){for(this._clipping||this.drawingContext.beginPath(),l=0;l<d;l++)t[l].isVert?t[l].moveTo?this.drawingContext.moveTo(t[l][0],t[l][1]):this.drawingContext.lineTo(t[l][0],t[l][1]):this.drawingContext.bezierCurveTo(t[l][0],t[l][1],t[l][2],t[l][3],t[l][4],t[l][5]);this._doFillStrokeClose(c)}else if(n&&null===i){for(this._clipping||this.drawingContext.beginPath(),l=0;l<d;l++)t[l].isVert?t[l].moveTo?this.drawingContext.moveTo(t[l][0],t[l][1]):this.drawingContext.lineTo(t[l][0],t[l][1]):this.drawingContext.quadraticCurveTo(t[l][0],t[l][1],t[l][2],t[l][3]);this._doFillStrokeClose(c)}else if(i===p.POINTS)for(l=0;l<d;l++)a=t[l],this._doStroke&&this._pInst.stroke(a[6]),this._pInst.point(a[0],a[1]);else if(i===p.LINES)for(l=0;l+1<d;l+=2)a=t[l],this._doStroke&&this._pInst.stroke(t[l+1][6]),this._pInst.line(a[0],a[1],t[l+1][0],t[l+1][1]);else if(i===p.TRIANGLES)for(l=0;l+2<d;l+=3)a=t[l],this._clipping||this.drawingContext.beginPath(),this.drawingContext.moveTo(a[0],a[1]),this.drawingContext.lineTo(t[l+1][0],t[l+1][1]),this.drawingContext.lineTo(t[l+2][0],t[l+2][1]),this.drawingContext.closePath(),!this._clipping&&this._doFill&&(this._pInst.fill(t[l+2][5]),this.drawingContext.fill()),!this._clipping&&this._doStroke&&(this._pInst.stroke(t[l+2][6]),this.drawingContext.stroke());else if(i===p.TRIANGLE_STRIP)for(l=0;l+1<d;l++)a=t[l],this._clipping||this.drawingContext.beginPath(),this.drawingContext.moveTo(t[l+1][0],t[l+1][1]),this.drawingContext.lineTo(a[0],a[1]),!this._clipping&&this._doStroke&&this._pInst.stroke(t[l+1][6]),!this._clipping&&this._doFill&&this._pInst.fill(t[l+1][5]),l+2<d&&(this.drawingContext.lineTo(t[l+2][0],t[l+2][1]),!this._clipping&&this._doStroke&&this._pInst.stroke(t[l+2][6]),!this._clipping&&this._doFill&&this._pInst.fill(t[l+2][5])),this._doFillStrokeClose(c);else if(i===p.TRIANGLE_FAN){if(2<d){for(this._clipping||this.drawingContext.beginPath(),l=2;l<d;l++)a=t[l],this.drawingContext.moveTo(t[0][0],t[0][1]),this.drawingContext.lineTo(t[l-1][0],t[l-1][1]),this.drawingContext.lineTo(a[0],a[1]),this.drawingContext.lineTo(t[0][0],t[0][1]),l<d-1&&(this._doFill&&a[5]!==t[l+1][5]||this._doStroke&&a[6]!==t[l+1][6])&&(!this._clipping&&this._doFill&&(this._pInst.fill(a[5]),this.drawingContext.fill(),this._pInst.fill(t[l+1][5])),!this._clipping&&this._doStroke&&(this._pInst.stroke(a[6]),this.drawingContext.stroke(),this._pInst.stroke(t[l+1][6])),this.drawingContext.closePath(),this._clipping||this.drawingContext.beginPath());this._doFillStrokeClose(c)}}else if(i===p.QUADS)for(l=0;l+3<d;l+=4){for(a=t[l],this._clipping||this.drawingContext.beginPath(),this.drawingContext.moveTo(a[0],a[1]),u=1;u<4;u++)this.drawingContext.lineTo(t[l+u][0],t[l+u][1]);this.drawingContext.lineTo(a[0],a[1]),!this._clipping&&this._doFill&&this._pInst.fill(t[l+3][5]),!this._clipping&&this._doStroke&&this._pInst.stroke(t[l+3][6]),this._doFillStrokeClose(c)}else if(i===p.QUAD_STRIP){if(3<d)for(l=0;l+1<d;l+=2)a=t[l],this._clipping||this.drawingContext.beginPath(),l+3<d?(this.drawingContext.moveTo(t[l+2][0],t[l+2][1]),this.drawingContext.lineTo(a[0],a[1]),this.drawingContext.lineTo(t[l+1][0],t[l+1][1]),this.drawingContext.lineTo(t[l+3][0],t[l+3][1]),!this._clipping&&this._doFill&&this._pInst.fill(t[l+3][5]),!this._clipping&&this._doStroke&&this._pInst.stroke(t[l+3][6])):(this.drawingContext.moveTo(a[0],a[1]),this.drawingContext.lineTo(t[l+1][0],t[l+1][1])),this._doFillStrokeClose(c)}else{for(this._clipping||this.drawingContext.beginPath(),this.drawingContext.moveTo(t[0][0],t[0][1]),l=1;l<d;l++)(a=t[l]).isVert&&(a.moveTo?(c&&this.drawingContext.closePath(),this.drawingContext.moveTo(a[0],a[1])):this.drawingContext.lineTo(a[0],a[1]));this._doFillStrokeClose(c)}s=n=o=r=!1,c&&t.pop()}return this}},{key:"strokeCap",value:function(e){return e!==p.ROUND&&e!==p.SQUARE&&e!==p.PROJECT||(this.drawingContext.lineCap=e),this}},{key:"strokeJoin",value:function(e){return e!==p.ROUND&&e!==p.BEVEL&&e!==p.MITER||(this.drawingContext.lineJoin=e),this}},{key:"strokeWeight",value:function(e){return this.drawingContext.lineWidth=void 0===e||0===e?1e-4:e,this}},{key:"_getFill",value:function(){return this._cachedFillStyle||(this._cachedFillStyle=this.drawingContext.fillStyle),this._cachedFillStyle}},{key:"_setFill",value:function(e){e!==this._cachedFillStyle&&(this.drawingContext.fillStyle=e,this._cachedFillStyle=e)}},{key:"_getStroke",value:function(){return this._cachedStrokeStyle||(this._cachedStrokeStyle=this.drawingContext.strokeStyle),this._cachedStrokeStyle}},{key:"_setStroke",value:function(e){e!==this._cachedStrokeStyle&&(this.drawingContext.strokeStyle=e,this._cachedStrokeStyle=e)}},{key:"bezier",value:function(e,t,r,o,n,s,i,a){return this._pInst.beginShape(),this._pInst.vertex(e,t),this._pInst.bezierVertex(r,o,n,s,i,a),this._pInst.endShape(),this}},{key:"curve",value:function(e,t,r,o,n,s,i,a){return this._pInst.beginShape(),this._pInst.curveVertex(e,t),this._pInst.curveVertex(r,o),this._pInst.curveVertex(n,s),this._pInst.curveVertex(i,a),this._pInst.endShape(),this}},{key:"_doFillStrokeClose",value:function(e){e&&this.drawingContext.closePath(),!this._clipping&&this._doFill&&this.drawingContext.fill(),!this._clipping&&this._doStroke&&this.drawingContext.stroke()}},{key:"applyMatrix",value:function(e,t,r,o,n,s){this.drawingContext.transform(e,t,r,o,n,s)}},{key:"resetMatrix",value:function(){return this.drawingContext.setTransform(1,0,0,1,0,0),this.drawingContext.scale(this._pInst._pixelDensity,this._pInst._pixelDensity),this}},{key:"rotate",value:function(e){this.drawingContext.rotate(e)}},{key:"scale",value:function(e,t){return this.drawingContext.scale(e,t),this}},{key:"translate",value:function(e,t){return e instanceof d.default.Vector&&(t=e.y,e=e.x),this.drawingContext.translate(e,t),this}},{key:"_renderText",value:function(e,t,r,o,n,s){if(!(o<s||n<=o))return e.push(),this._isOpenType()?this._textFont._renderPath(t,r,o,{renderer:this}):(this._doStroke&&this._strokeSet&&this.drawingContext.strokeText(t,r,o),!this._clipping&&this._doFill&&(this._fillSet||this._setFill(p._DEFAULT_TEXT_FILL),this.drawingContext.fillText(t,r,o))),e.pop(),e}},{key:"textWidth",value:function(e){return this._isOpenType()?this._textFont._textWidth(e,this._textSize):this.drawingContext.measureText(e).width}},{key:"_applyTextProperties",value:function(){var e,t=this._pInst;return this._setProperty("_textAscent",null),this._setProperty("_textDescent",null),e=this._textFont,this._isOpenType()&&(e=this._textFont.font.familyName,this._setProperty("_textStyle",this._textFont.font.styleName)),this.drawingContext.font="".concat(this._textStyle||"normal"," ").concat(this._textSize||12,"px ").concat(e||"sans-serif"),this.drawingContext.textAlign=this._textAlign,this._textBaseline===p.CENTER?this.drawingContext.textBaseline=p._CTX_MIDDLE:this.drawingContext.textBaseline=this._textBaseline,t}},{key:"push",value:function(){return this.drawingContext.save(),l(h(n.prototype),"push",this).call(this)}},{key:"pop",value:function(e){this.drawingContext.restore(),this._cachedFillStyle=this.drawingContext.fillStyle,this._cachedStrokeStyle=this.drawingContext.strokeStyle,l(h(n.prototype),"pop",this).call(this,e)}}])&&s(t.prototype,e),r&&s(t,r),n}(d.default.Renderer),e=(n.prototype.text=function(e,t,r,o,n){void 0!==o&&this.drawingContext.textBaseline===p.BASELINE&&(s=!0,this.drawingContext.textBaseline=p.TOP);var s,o=d.default.Renderer.prototype.text.apply(this,arguments);return s&&(this.drawingContext.textBaseline=p.BASELINE),o},d.default.Renderer2D=n,d.default.Renderer2D);r.default=e},{"./constants":264,"./main":275,"./p5.Renderer":278,"core-js/modules/es.array.concat":151,"core-js/modules/es.array.fill":154,"core-js/modules/es.array.for-each":157,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.join":162,"core-js/modules/es.array.slice":165,"core-js/modules/es.function.name":168,"core-js/modules/es.number.to-fixed":175,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.get-prototype-of":180,"core-js/modules/es.object.to-string":182,"core-js/modules/es.reflect.construct":184,"core-js/modules/es.reflect.get":185,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}],280:[function(e,t,r){"use strict";e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.promise"),e("core-js/modules/es.string.iterator"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.promise"),e("core-js/modules/es.string.iterator"),e("core-js/modules/web.dom-collections.iterator");var h=(e=e("./main"))&&e.__esModule?e:{default:e};h.default.prototype._promisePreloads=[];function o(){return{}}var f=!(h.default.prototype.registerPromisePreload=function(e){h.default.prototype._promisePreloads.push(e)});h.default.prototype._setupPromisePreloads=function(){var e=!0,t=!1,r=void 0;try{for(var o,n=this._promisePreloads[Symbol.iterator]();!(e=(o=n.next()).done);e=!0){var s=o.value,i=this,a=s.method,l=s.addCallbacks,u=s.legacyPreloadSetup,c=s.target||this,d=c[a].bind(c);if(c===h.default.prototype){if(f)continue;i=null,d=c[a]}c[a]=this._wrapPromisePreload(i,d,l),u&&(c[u.method]=this._legacyPreloadGenerator(i,u,c[a]))}}catch(e){t=!0,r=e}finally{try{e||null==n.return||n.return()}finally{if(t)throw r}}f=!0},h.default.prototype._wrapPromisePreload=function(e,l,u){var t=function(){for(var e=this,t=(this._incrementPreload(),null),r=null,o=arguments.length,n=new Array(o),s=0;s<o;s++)n[s]=arguments[s];if(u)for(var i=n.length-1;0<=i&&!r&&"function"==typeof n[i];i--)r=t,t=n.pop();var a=Promise.resolve(l.apply(this,n));return t&&a.then(t),r&&a.catch(r),a.then(function(){return e._decrementPreload()}),a};return t=e?t.bind(e):t};h.default.prototype._legacyPreloadGenerator=function(e,t,s){var i=t.createBaseObject||o,t=function(){var t=this;this._incrementPreload();for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var n=i.apply(this,r);return s.apply(this,r).then(function(e){Object.assign(n,e),t._decrementPreload()}),n};return t=e?t.bind(e):t}},{"./main":275,"core-js/modules/es.array.iterator":161,"core-js/modules/es.object.assign":176,"core-js/modules/es.object.to-string":182,"core-js/modules/es.promise":183,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/web.dom-collections.iterator":238}],281:[function(e,t,r){"use strict";function o(e){return(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})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.filter"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.filter"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var l=(n=e("./main"))&&n.__esModule?n:{default:n},u=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("./constants"));function i(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,i=function(){return e},e)}function a(e){return(a="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("./p5.Graphics"),e("./p5.Renderer2D"),e("../webgl/p5.RendererGL");var c="defaultCanvas0",n=(l.default.prototype.createCanvas=function(e,t,r,o){var n,s,i;if(l.default._validateParameters("createCanvas",arguments),arguments[2]instanceof HTMLCanvasElement?(r=u.P2D,o=arguments[2]):n=r||u.P2D,o)(i=document.getElementById(c))&&i.parentNode.removeChild(i),i=o,this._defaultGraphicsCreated=!1;else{if(n===u.WEBGL)(i=document.getElementById(c))&&(i.parentNode.removeChild(i),s=this._renderer,this._elements=this._elements.filter(function(e){return e!==s})),(i=document.createElement("canvas")).id=c,i.classList.add("p5Canvas");else if(this._defaultGraphicsCreated)i=this.canvas;else{i=o||document.createElement("canvas");for(var a=0;document.getElementById("defaultCanvas".concat(a));)a++;c="defaultCanvas".concat(a),i.id=c,i.classList.add("p5Canvas")}this._setupDone||(i.dataset.hidden=!0,i.style.visibility="hidden"),(this._userNode||(0===document.getElementsByTagName("main").length&&(r=document.createElement("main"),document.body.appendChild(r)),document.getElementsByTagName("main")[0])).appendChild(i)}return n===u.WEBGL?(this._setProperty("_renderer",new l.default.RendererGL(i,this,!0)),this._elements.push(this._renderer)):this._defaultGraphicsCreated||(this._setProperty("_renderer",new l.default.Renderer2D(i,this,!0)),this._defaultGraphicsCreated=!0,this._elements.push(this._renderer)),this._renderer.resize(e,t),this._renderer._applyDefaults(),this._renderer},l.default.prototype.resizeCanvas=function(e,t,r){if(l.default._validateParameters("resizeCanvas",arguments),this._renderer){var o,n,s={};for(o in this.drawingContext){var i=this.drawingContext[o];"object"!==a(i)&&"function"!=typeof i&&(s[o]=i)}for(n in this.width=e,this.height=t,this._renderer.resize(e,t),s)try{this.drawingContext[n]=s[n]}catch(e){}r||this.redraw()}this._addAccsOutput()&&this._updateAccsOutput()},l.default.prototype.noCanvas=function(){this.canvas&&this.canvas.parentNode.removeChild(this.canvas)},l.default.prototype.createGraphics=function(e,t){for(var r=arguments.length,o=new Array(2<r?r-2:0),n=2;n<r;n++)o[n-2]=arguments[n];return o[0]instanceof HTMLCanvasElement&&(o[1]=o[0],o[0]=u.P2D),l.default._validateParameters("createGraphics",arguments),new l.default.Graphics(e,t,o[0],this,o[1])},l.default.prototype.createFramebuffer=function(e){return new l.default.Framebuffer(this,e)},l.default.prototype.blendMode=function(e){l.default._validateParameters("blendMode",arguments),e===u.NORMAL&&(console.warn("NORMAL has been deprecated for use in blendMode. defaulting to BLEND instead."),e=u.BLEND),this._renderer.blendMode(e)},l.default);r.default=n},{"../webgl/p5.RendererGL":332,"./constants":264,"./main":275,"./p5.Graphics":277,"./p5.Renderer2D":279,"core-js/modules/es.array.filter":155,"core-js/modules/es.array.iterator":161,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.to-string":182,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}],282:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.from"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.slice"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var l=n(e("../main")),a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("../constants")),u=n(e("../helpers"));function c(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,c=function(){return e},e)}function n(e){return e&&e.__esModule?e:{default:e}}function s(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}e("../friendly_errors/fes_core"),e("../friendly_errors/file_errors"),e("../friendly_errors/validate_params"),l.default.prototype._normalizeArcAngles=function(e,t,r,o,n){var s;return e-=a.TWO_PI*Math.floor(e/a.TWO_PI),t-=a.TWO_PI*Math.floor(t/a.TWO_PI),s=Math.min(Math.abs(e-t),a.TWO_PI-Math.abs(e-t)),n&&(e=e<=a.HALF_PI?Math.atan(r/o*Math.tan(e)):e>a.HALF_PI&&e<=3*a.HALF_PI?Math.atan(r/o*Math.tan(e))+a.PI:Math.atan(r/o*Math.tan(e))+a.TWO_PI,t=t<=a.HALF_PI?Math.atan(r/o*Math.tan(t)):t>a.HALF_PI&&t<=3*a.HALF_PI?Math.atan(r/o*Math.tan(t))+a.PI:Math.atan(r/o*Math.tan(t))+a.TWO_PI),t<e&&(t+=a.TWO_PI),{start:e,stop:t,correspondToSamePoint:s<1e-5}},l.default.prototype.arc=function(e,t,r,o,n,s,i,a){return l.default._validateParameters("arc",arguments),(this._renderer._doStroke||this._renderer._doFill)&&n!==s&&(n=this._toRadians(n),s=this._toRadians(s),r=Math.abs(r),o=Math.abs(o),e=u.default.modeAdjust(e,t,r,o,this._renderer._ellipseMode),(t=this._normalizeArcAngles(n,s,e.w,e.h,!0)).correspondToSamePoint?this._renderer.ellipse([e.x,e.y,e.w,e.h,a]):(this._renderer.arc(e.x,e.y,e.w,e.h,t.start,t.stop,i,a),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("arc",[e.x,e.y,e.w,e.h,t.start,t.stop,i]))),this},l.default.prototype.ellipse=function(e,t,r,o,n){return l.default._validateParameters("ellipse",arguments),this._renderEllipse.apply(this,arguments)},l.default.prototype.circle=function(){l.default._validateParameters("circle",arguments);var e=Array.prototype.slice.call(arguments,0,2);return e.push(arguments[2]),e.push(arguments[2]),this._renderEllipse.apply(this,s(e))},l.default.prototype._renderEllipse=function(e,t,r,o,n){return(this._renderer._doStroke||this._renderer._doFill)&&(r<0&&(r=Math.abs(r)),void 0===o?o=r:o<0&&(o=Math.abs(o)),e=u.default.modeAdjust(e,t,r,o,this._renderer._ellipseMode),this._renderer.ellipse([e.x,e.y,e.w,e.h,n]),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("ellipse",[e.x,e.y,e.w,e.h])),this},l.default.prototype.line=function(){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return l.default._validateParameters("line",r),this._renderer._doStroke&&(e=this._renderer).line.apply(e,r),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("line",r),this},l.default.prototype.point=function(){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return l.default._validateParameters("point",r),this._renderer._doStroke&&(1===r.length&&r[0]instanceof l.default.Vector?this._renderer.point.call(this._renderer,r[0].x,r[0].y,r[0].z):((e=this._renderer).point.apply(e,r),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("point",r))),this},l.default.prototype.quad=function(){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return l.default._validateParameters("quad",r),(this._renderer._doStroke||this._renderer._doFill)&&(this._renderer.isP3D&&r.length<12?this._renderer.quad.call(this._renderer,r[0],r[1],0,r[2],r[3],0,r[4],r[5],0,r[6],r[7],0,r[8],r[9]):((e=this._renderer).quad.apply(e,r),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("quadrilateral",r))),this},l.default.prototype.rect=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return l.default._validateParameters("rect",t),this._renderRect.apply(this,t)},l.default.prototype.square=function(e,t,r,o,n,s,i){return l.default._validateParameters("square",arguments),this._renderRect.call(this,e,t,r,r,o,n,s,i)},l.default.prototype._renderRect=function(){if(this._renderer._doStroke||this._renderer._doFill){3===arguments.length&&(arguments[3]=arguments[2]);for(var e=u.default.modeAdjust(arguments[0],arguments[1],arguments[2],arguments[3],this._renderer._rectMode),t=[e.x,e.y,e.w,e.h],r=4;r<arguments.length;r++)t[r]=arguments[r];this._renderer.rect(t),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("rectangle",[e.x,e.y,e.w,e.h])}return this},l.default.prototype.triangle=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return l.default._validateParameters("triangle",t),(this._renderer._doStroke||this._renderer._doFill)&&this._renderer.triangle(t),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("triangle",t),this};e=l.default;r.default=e},{"../constants":264,"../friendly_errors/fes_core":266,"../friendly_errors/file_errors":267,"../friendly_errors/validate_params":270,"../helpers":271,"../main":275,"core-js/modules/es.array.from":158,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.slice":165,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.to-string":182,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}],283:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=(l=e("../main"))&&l.__esModule?l:{default:l},s=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("../constants"));function a(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,a=function(){return e},e)}n.default.prototype.ellipseMode=function(e){return n.default._validateParameters("ellipseMode",arguments),e!==s.CORNER&&e!==s.CORNERS&&e!==s.RADIUS&&e!==s.CENTER||(this._renderer._ellipseMode=e),this},n.default.prototype.noSmooth=function(){return this._renderer.isP3D?this.setAttributes("antialias",!1):"imageSmoothingEnabled"in this.drawingContext&&(this.drawingContext.imageSmoothingEnabled=!1),this},n.default.prototype.rectMode=function(e){return n.default._validateParameters("rectMode",arguments),e!==s.CORNER&&e!==s.CORNERS&&e!==s.RADIUS&&e!==s.CENTER||(this._renderer._rectMode=e),this},n.default.prototype.smooth=function(){return this.setAttributes("antialias",!0),this._renderer.isP3D||"imageSmoothingEnabled"in this.drawingContext&&(this.drawingContext.imageSmoothingEnabled=!0),this},n.default.prototype.strokeCap=function(e){return n.default._validateParameters("strokeCap",arguments),e!==s.ROUND&&e!==s.SQUARE&&e!==s.PROJECT||this._renderer.strokeCap(e),this},n.default.prototype.strokeJoin=function(e){return n.default._validateParameters("strokeJoin",arguments),e!==s.ROUND&&e!==s.BEVEL&&e!==s.MITER||this._renderer.strokeJoin(e),this},n.default.prototype.strokeWeight=function(e){return n.default._validateParameters("strokeWeight",arguments),this._renderer.strokeWeight(e),this};var l=n.default;r.default=l},{"../constants":264,"../main":275,"core-js/modules/es.array.iterator":161,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.to-string":182,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}],284:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var l=(o=e("../main"))&&o.__esModule?o:{default:o};e("../friendly_errors/fes_core"),e("../friendly_errors/file_errors"),e("../friendly_errors/validate_params"),l.default.prototype.bezier=function(){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return l.default._validateParameters("bezier",r),(this._renderer._doStroke||this._renderer._doFill)&&(e=this._renderer).bezier.apply(e,r),this},l.default.prototype.bezierDetail=function(e){return l.default._validateParameters("bezierDetail",arguments),this._bezierDetail=e,this},l.default.prototype.bezierPoint=function(e,t,r,o,n){l.default._validateParameters("bezierPoint",arguments);var s=1-n;return Math.pow(s,3)*e+3*Math.pow(s,2)*n*t+3*s*Math.pow(n,2)*r+Math.pow(n,3)*o},l.default.prototype.bezierTangent=function(e,t,r,o,n){l.default._validateParameters("bezierTangent",arguments);var s=1-n;return 3*o*Math.pow(n,2)-3*r*Math.pow(n,2)+6*r*s*n-6*t*s*n+3*t*Math.pow(s,2)-3*e*Math.pow(s,2)},l.default.prototype.curve=function(){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return l.default._validateParameters("curve",r),this._renderer._doStroke&&(e=this._renderer).curve.apply(e,r),this},l.default.prototype.curveDetail=function(e){return l.default._validateParameters("curveDetail",arguments),this._curveDetail=e<3?3:e,this},l.default.prototype.curveTightness=function(e){return l.default._validateParameters("curveTightness",arguments),this._renderer._curveTightness=e,this},l.default.prototype.curvePoint=function(e,t,r,o,n){l.default._validateParameters("curvePoint",arguments);var s=this._renderer._curveTightness,i=n*n*n,a=n*n;return e*((s-1)/2*i+(1-s)*a+(s-1)/2*n)+t*((s+3)/2*i+(-5-s)/2*a+1)+r*((-3-s)/2*i+(s+2)*a+(1-s)/2*n)+o*((1-s)/2*i+(s-1)/2*a)},l.default.prototype.curveTangent=function(e,t,r,o,n){l.default._validateParameters("curveTangent",arguments);var s=this._renderer._curveTightness,i=n*n*3,n=2*n;return e*((s-1)/2*i+(1-s)*n+(s-1)/2)+t*((s+3)/2*i+(-5-s)/2*n)+r*((-3-s)/2*i+(s+2)*n+(1-s)/2)+o*((1-s)/2*i+(s-1)/2*n)};var o=l.default;r.default=o},{"../friendly_errors/fes_core":266,"../friendly_errors/file_errors":267,"../friendly_errors/validate_params":270,"../main":275}],285:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.slice"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=(y=e("../main"))&&y.__esModule?y:{default:y},l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("../constants"));function u(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,u=function(){return e},e)}var n=null,c=[],d=[],h=!1,s=!1,f=!1,p=!1,m=!0,y=(a.default.prototype.beginContour=function(){return this._renderer.isP3D?this._renderer.beginContour():(d=[],p=!0),this},a.default.prototype.beginShape=function(e){var t;return a.default._validateParameters("beginShape",arguments),this._renderer.isP3D?(t=this._renderer).beginShape.apply(t,arguments):(n=e===l.POINTS||e===l.LINES||e===l.TRIANGLES||e===l.TRIANGLE_FAN||e===l.TRIANGLE_STRIP||e===l.QUADS||e===l.QUAD_STRIP?e:null,c=[],d=[]),this},a.default.prototype.bezierVertex=function(){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];if(a.default._validateParameters("bezierVertex",r),this._renderer.isP3D)(e=this._renderer).bezierVertex.apply(e,r);else if(0===c.length)a.default._friendlyError("vertex() must be used once before calling bezierVertex()","bezierVertex");else{h=!0;for(var n=[],s=0;s<r.length;s++)n[s]=r[s];n.isVert=!1,(p?d:c).push(n)}return this},a.default.prototype.curveVertex=function(){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return a.default._validateParameters("curveVertex",r),this._renderer.isP3D?(e=this._renderer).curveVertex.apply(e,r):(s=!0,this.vertex(r[0],r[1])),this},a.default.prototype.endContour=function(){if(!this._renderer.isP3D){var e=d[0].slice();e.isVert=d[0].isVert,e.moveTo=!1,d.push(e),m&&(c.push(c[0]),m=!1);for(var t=0;t<d.length;t++)c.push(d[t])}return this},a.default.prototype.endShape=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;if(a.default._validateParameters("endShape",arguments),t<1&&(console.log("🌸 p5.js says: You can not have less than one instance"),t=1),this._renderer.isP3D)this._renderer.endShape(e,s,h,f,p,n,t);else{if(1!==t&&console.log("🌸 p5.js says: Instancing is only supported in WebGL2 mode"),0===c.length)return this;if(!this._renderer._doStroke&&!this._renderer._doFill)return this;t=e===l.CLOSE;t&&!p&&c.push(c[0]),this._renderer.endShape(e,c,s,h,f,p,n),m=!(p=f=h=s=!1),t&&c.pop()}return this},a.default.prototype.quadraticVertex=function(){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];if(a.default._validateParameters("quadraticVertex",r),this._renderer.isP3D)(e=this._renderer).quadraticVertex.apply(e,r);else{if(this._contourInited)return(e={}).x=r[0],e.y=r[1],e.x3=r[2],e.y3=r[3],e.type=l.QUADRATIC,this._contourVertices.push(e),this;if(0<c.length){f=!0;for(var n=[],s=0;s<r.length;s++)n[s]=r[s];n.isVert=!1,(p?d:c).push(n)}else a.default._friendlyError("vertex() must be used once before calling quadraticVertex()","quadraticVertex")}return this},a.default.prototype.vertex=function(e,t,r,o,n){var s;return this._renderer.isP3D?(s=this._renderer).vertex.apply(s,arguments):((s=[]).isVert=!0,s[0]=e,s[1]=t,s[2]=0,s[3]=0,s[4]=0,s[5]=this._renderer._getFill(),s[6]=this._renderer._getStroke(),r&&(s.moveTo=r),(p?(0===d.length&&(s.moveTo=!0),d):c).push(s)),this},a.default.prototype.normal=function(e,t,r){var o;return this._assert3d("normal"),a.default._validateParameters("normal",arguments),(o=this._renderer).normal.apply(o,arguments),this},a.default);r.default=y},{"../constants":264,"../main":275,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.slice":165,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.to-string":182,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}],286:[function(e,t,r){"use strict";function o(e){return(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})(e)}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function n(e){return(n="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}var l,u,c;e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.filter"),e("core-js/modules/es.array.from"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.typed-array.uint8-clamped-array"),e("core-js/modules/es.typed-array.copy-within"),e("core-js/modules/es.typed-array.every"),e("core-js/modules/es.typed-array.fill"),e("core-js/modules/es.typed-array.filter"),e("core-js/modules/es.typed-array.find"),e("core-js/modules/es.typed-array.find-index"),e("core-js/modules/es.typed-array.for-each"),e("core-js/modules/es.typed-array.includes"),e("core-js/modules/es.typed-array.index-of"),e("core-js/modules/es.typed-array.iterator"),e("core-js/modules/es.typed-array.join"),e("core-js/modules/es.typed-array.last-index-of"),e("core-js/modules/es.typed-array.map"),e("core-js/modules/es.typed-array.reduce"),e("core-js/modules/es.typed-array.reduce-right"),e("core-js/modules/es.typed-array.reverse"),e("core-js/modules/es.typed-array.set"),e("core-js/modules/es.typed-array.slice"),e("core-js/modules/es.typed-array.some"),e("core-js/modules/es.typed-array.sort"),e("core-js/modules/es.typed-array.subarray"),e("core-js/modules/es.typed-array.to-locale-string"),e("core-js/modules/es.typed-array.to-string"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.filter"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.typed-array.uint8-clamped-array"),e("core-js/modules/es.typed-array.copy-within"),e("core-js/modules/es.typed-array.every"),e("core-js/modules/es.typed-array.fill"),e("core-js/modules/es.typed-array.filter"),e("core-js/modules/es.typed-array.find"),e("core-js/modules/es.typed-array.find-index"),e("core-js/modules/es.typed-array.for-each"),e("core-js/modules/es.typed-array.includes"),e("core-js/modules/es.typed-array.index-of"),e("core-js/modules/es.typed-array.iterator"),e("core-js/modules/es.typed-array.join"),e("core-js/modules/es.typed-array.last-index-of"),e("core-js/modules/es.typed-array.map"),e("core-js/modules/es.typed-array.reduce"),e("core-js/modules/es.typed-array.reduce-right"),e("core-js/modules/es.typed-array.reverse"),e("core-js/modules/es.typed-array.set"),e("core-js/modules/es.typed-array.slice"),e("core-js/modules/es.typed-array.some"),e("core-js/modules/es.typed-array.sort"),e("core-js/modules/es.typed-array.subarray"),e("core-js/modules/es.typed-array.to-locale-string"),e("core-js/modules/es.typed-array.to-string"),e("core-js/modules/web.dom-collections.iterator"),window.requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e,t){window.setTimeout(e,1e3/60)},"undefined"==typeof Uint8ClampedArray||Uint8ClampedArray.prototype.slice||Object.defineProperty(Uint8ClampedArray.prototype,"slice",{value:Array.prototype.slice,writable:!0,configurable:!0,enumerable:!1}),Object.assign||(l=Object.keys,e=Object.defineProperty,u="function"==typeof Symbol&&"symbol"===n(Symbol()),c=Object.prototype.propertyIsEnumerable,e(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("target must be an object");for(var r,o=Object(e),n=1;n<arguments.length;++n){var s=Object(arguments[n]),i=l(s);for(u&&Object.getOwnPropertySymbols&&i.push.apply(i,a(Object.getOwnPropertySymbols(s).filter(function(t){return function(e){return c.call(t,e)}}(s)))),r=0;r<i.length;++r)o[i[r]]=s[i[r]]}return o},configurable:!0,enumerable:!1,writable:!0}))},{"core-js/modules/es.array.filter":155,"core-js/modules/es.array.from":158,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.slice":165,"core-js/modules/es.object.assign":176,"core-js/modules/es.object.keys":181,"core-js/modules/es.object.to-string":182,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.typed-array.copy-within":205,"core-js/modules/es.typed-array.every":206,"core-js/modules/es.typed-array.fill":207,"core-js/modules/es.typed-array.filter":208,"core-js/modules/es.typed-array.find":210,"core-js/modules/es.typed-array.find-index":209,"core-js/modules/es.typed-array.for-each":213,"core-js/modules/es.typed-array.includes":214,"core-js/modules/es.typed-array.index-of":215,"core-js/modules/es.typed-array.iterator":218,"core-js/modules/es.typed-array.join":219,"core-js/modules/es.typed-array.last-index-of":220,"core-js/modules/es.typed-array.map":221,"core-js/modules/es.typed-array.reduce":223,"core-js/modules/es.typed-array.reduce-right":222,"core-js/modules/es.typed-array.reverse":224,"core-js/modules/es.typed-array.set":225,"core-js/modules/es.typed-array.slice":226,"core-js/modules/es.typed-array.some":227,"core-js/modules/es.typed-array.sort":228,"core-js/modules/es.typed-array.subarray":229,"core-js/modules/es.typed-array.to-locale-string":230,"core-js/modules/es.typed-array.to-string":231,"core-js/modules/es.typed-array.uint8-clamped-array":235,"core-js/modules/web.dom-collections.iterator":238}],287:[function(e,t,r){"use strict";e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.assign"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;e=(e=e("./main"))&&e.__esModule?e:{default:e};e.default.prototype.noLoop=function(){this._loop=!1},e.default.prototype.loop=function(){this._loop||(this._loop=!0,this._setupDone&&this._draw())},e.default.prototype.isLooping=function(){return this._loop},e.default.prototype.push=function(){this._styles.push({props:{_colorMode:this._colorMode},renderer:this._renderer.push()})},e.default.prototype.pop=function(){var e=this._styles.pop();e?(this._renderer.pop(e.renderer),Object.assign(this,e.props)):console.warn("pop() was called without matching push()")},e.default.prototype.redraw=function(e){if(!this._inUserDraw&&this._setupDone){var t=parseInt(e),r=((isNaN(t)||t<1)&&(t=1),this._isGlobal?window:this);if("function"==typeof r.draw){void 0===r.setup&&r.scale(r._pixelDensity,r._pixelDensity);for(var o=0;o<t;o++){r.resetMatrix(),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._updateAccsOutput(),r._renderer.isP3D&&r._renderer._update(),r._setProperty("frameCount",r.frameCount+1),this.callRegisteredHooksFor("pre"),this._inUserDraw=!0;try{r.draw()}finally{this._inUserDraw=!1}this.callRegisteredHooksFor("post")}}}};e=e.default;r.default=e},{"./main":275,"core-js/modules/es.object.assign":176}],288:[function(e,t,r){"use strict";e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.from"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.get-prototype-of"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.typed-array.uint8-array"),e("core-js/modules/es.typed-array.copy-within"),e("core-js/modules/es.typed-array.every"),e("core-js/modules/es.typed-array.fill"),e("core-js/modules/es.typed-array.filter"),e("core-js/modules/es.typed-array.find"),e("core-js/modules/es.typed-array.find-index"),e("core-js/modules/es.typed-array.for-each"),e("core-js/modules/es.typed-array.includes"),e("core-js/modules/es.typed-array.index-of"),e("core-js/modules/es.typed-array.iterator"),e("core-js/modules/es.typed-array.join"),e("core-js/modules/es.typed-array.last-index-of"),e("core-js/modules/es.typed-array.map"),e("core-js/modules/es.typed-array.reduce"),e("core-js/modules/es.typed-array.reduce-right"),e("core-js/modules/es.typed-array.reverse"),e("core-js/modules/es.typed-array.set"),e("core-js/modules/es.typed-array.slice"),e("core-js/modules/es.typed-array.some"),e("core-js/modules/es.typed-array.sort"),e("core-js/modules/es.typed-array.subarray"),e("core-js/modules/es.typed-array.to-locale-string"),e("core-js/modules/es.typed-array.to-string"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.get-prototype-of"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.typed-array.uint8-array"),e("core-js/modules/es.typed-array.copy-within"),e("core-js/modules/es.typed-array.every"),e("core-js/modules/es.typed-array.fill"),e("core-js/modules/es.typed-array.filter"),e("core-js/modules/es.typed-array.find"),e("core-js/modules/es.typed-array.find-index"),e("core-js/modules/es.typed-array.for-each"),e("core-js/modules/es.typed-array.includes"),e("core-js/modules/es.typed-array.index-of"),e("core-js/modules/es.typed-array.iterator"),e("core-js/modules/es.typed-array.join"),e("core-js/modules/es.typed-array.last-index-of"),e("core-js/modules/es.typed-array.map"),e("core-js/modules/es.typed-array.reduce"),e("core-js/modules/es.typed-array.reduce-right"),e("core-js/modules/es.typed-array.reverse"),e("core-js/modules/es.typed-array.set"),e("core-js/modules/es.typed-array.slice"),e("core-js/modules/es.typed-array.some"),e("core-js/modules/es.typed-array.sort"),e("core-js/modules/es.typed-array.subarray"),e("core-js/modules/es.typed-array.to-locale-string"),e("core-js/modules/es.typed-array.to-string"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=(e=e("./main"))&&e.__esModule?e:{default:e};function o(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}n.default.prototype.applyMatrix=function(){var e=(arguments.length<=0?void 0:arguments[0])instanceof Object.getPrototypeOf(Uint8Array);return Array.isArray(arguments.length<=0?void 0:arguments[0])||e?(e=this._renderer).applyMatrix.apply(e,o(arguments.length<=0?void 0:arguments[0])):(e=this._renderer).applyMatrix.apply(e,arguments),this},n.default.prototype.resetMatrix=function(){return this._renderer.resetMatrix(),this},n.default.prototype.rotate=function(e,t){return n.default._validateParameters("rotate",arguments),this._renderer.rotate(this._toRadians(e),t),this},n.default.prototype.rotateX=function(e){return this._assert3d("rotateX"),n.default._validateParameters("rotateX",arguments),this._renderer.rotateX(this._toRadians(e)),this},n.default.prototype.rotateY=function(e){return this._assert3d("rotateY"),n.default._validateParameters("rotateY",arguments),this._renderer.rotateY(this._toRadians(e)),this},n.default.prototype.rotateZ=function(e){return this._assert3d("rotateZ"),n.default._validateParameters("rotateZ",arguments),this._renderer.rotateZ(this._toRadians(e)),this},n.default.prototype.scale=function(e,t,r){var o;return n.default._validateParameters("scale",arguments),e instanceof n.default.Vector?(e=(o=e).x,t=o.y,r=o.z):e instanceof Array&&(e=(o=e)[0],t=o[1],r=o[2]||1),isNaN(t)?t=r=e:isNaN(r)&&(r=1),this._renderer.scale.call(this._renderer,e,t,r),this},n.default.prototype.shearX=function(e){n.default._validateParameters("shearX",arguments);e=this._toRadians(e);return this._renderer.applyMatrix(1,0,Math.tan(e),1,0,0),this},n.default.prototype.shearY=function(e){n.default._validateParameters("shearY",arguments);e=this._toRadians(e);return this._renderer.applyMatrix(1,Math.tan(e),0,1,0,0),this},n.default.prototype.translate=function(e,t,r){return n.default._validateParameters("translate",arguments),this._renderer.isP3D?this._renderer.translate(e,t,r):this._renderer.translate(e,t),this};e=n.default;r.default=e},{"./main":275,"core-js/modules/es.array.from":158,"core-js/modules/es.array.iterator":161,"core-js/modules/es.object.get-prototype-of":180,"core-js/modules/es.object.to-string":182,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.typed-array.copy-within":205,"core-js/modules/es.typed-array.every":206,"core-js/modules/es.typed-array.fill":207,"core-js/modules/es.typed-array.filter":208,"core-js/modules/es.typed-array.find":210,"core-js/modules/es.typed-array.find-index":209,"core-js/modules/es.typed-array.for-each":213,"core-js/modules/es.typed-array.includes":214,"core-js/modules/es.typed-array.index-of":215,"core-js/modules/es.typed-array.iterator":218,"core-js/modules/es.typed-array.join":219,"core-js/modules/es.typed-array.last-index-of":220,"core-js/modules/es.typed-array.map":221,"core-js/modules/es.typed-array.reduce":223,"core-js/modules/es.typed-array.reduce-right":222,"core-js/modules/es.typed-array.reverse":224,"core-js/modules/es.typed-array.set":225,"core-js/modules/es.typed-array.slice":226,"core-js/modules/es.typed-array.some":227,"core-js/modules/es.typed-array.sort":228,"core-js/modules/es.typed-array.subarray":229,"core-js/modules/es.typed-array.to-locale-string":230,"core-js/modules/es.typed-array.to-string":231,"core-js/modules/es.typed-array.uint8-array":234,"core-js/modules/web.dom-collections.iterator":238}],289:[function(e,t,r){"use strict";function o(e){return(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})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.from"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.ends-with"),e("core-js/modules/es.string.iterator"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.ends-with"),e("core-js/modules/es.string.iterator"),e("core-js/modules/web.dom-collections.iterator");var n=(e=e("../core/main"))&&e.__esModule?e:{default:e};function s(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}n.default.prototype.storeItem=function(e,t){"string"!=typeof e&&console.log("The argument that you passed to storeItem() - ".concat(e," is not a string.")),e.endsWith("p5TypeID")&&console.log("The argument that you passed to storeItem() - ".concat(e," must not end with 'p5TypeID'.")),void 0===t&&console.log("You cannot store undefined variables using storeItem().");var r=i(t);switch(r){case"number":case"boolean":t=t.toString();break;case"object":t instanceof n.default.Color?r="p5.Color":t instanceof n.default.Vector&&(r="p5.Vector",t=[t.x,t.y,t.z]),t=JSON.stringify(t)}localStorage.setItem(e,t);e="".concat(e,"p5TypeID");localStorage.setItem(e,r)},n.default.prototype.getItem=function(e){var t=localStorage.getItem(e),r=localStorage.getItem("".concat(e,"p5TypeID"));if(void 0===r)console.log("Unable to determine type of item stored under ".concat(e,"in local storage. Did you save the item with something other than setItem()?"));else if(null!==t)switch(r){case"number":t=parseFloat(t);break;case"boolean":t="true"===t;break;case"object":t=JSON.parse(t);break;case"p5.Color":t=JSON.parse(t),t=this.color.apply(this,s(t.levels));break;case"p5.Vector":t=JSON.parse(t),t=this.createVector.apply(this,s(t))}return t},n.default.prototype.clearStorage=function(){localStorage.clear()},n.default.prototype.removeItem=function(e){"string"!=typeof e&&console.log("The argument that you passed to removeItem() - ".concat(e," is not a string.")),localStorage.removeItem(e),localStorage.removeItem("".concat(e,"p5TypeID"))}},{"../core/main":275,"core-js/modules/es.array.from":158,"core-js/modules/es.array.iterator":161,"core-js/modules/es.object.to-string":182,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.ends-with":190,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/web.dom-collections.iterator":238}],290:[function(e,t,r){"use strict";function o(e){return(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})(e)}function n(e){return(n="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.get-prototype-of"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.reflect.construct"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.object.keys"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var s=(e=e("../core/main"))&&e.__esModule?e:{default:e};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(r){return function(){var e,t=u(r),t=(e=function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch(e){}}}()?(e=u(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(!e||"object"!==n(e)&&"function"!=typeof e){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function h(e,t,r){t&&d(e.prototype,t),r&&d(e,r)}s.default.prototype.createStringDict=function(e,t){return s.default._validateParameters("createStringDict",arguments),new s.default.StringDict(e,t)},s.default.prototype.createNumberDict=function(e,t){return s.default._validateParameters("createNumberDict",arguments),new s.default.NumberDict(e,t)},s.default.TypedDict=function(){function r(e,t){return c(this,r),e instanceof Object?this.data=e:(this.data={},this.data[e]=t),this}return h(r,[{key:"size",value:function(){return Object.keys(this.data).length}},{key:"hasKey",value:function(e){return this.data.hasOwnProperty(e)}},{key:"get",value:function(e){if(this.data.hasOwnProperty(e))return this.data[e];console.log("".concat(e," does not exist in this Dictionary"))}},{key:"set",value:function(e,t){this._validate(t)?this.data[e]=t:console.log("Those values dont work for this dictionary type.")}},{key:"_addObj",value:function(e){for(var t in e)this.set(t,e[t])}},{key:"create",value:function(e,t){e instanceof Object&&void 0===t?this._addObj(e):void 0!==e?this.set(e,t):console.log("In order to create a new Dictionary entry you must pass an object or a key, value pair")}},{key:"clear",value:function(){this.data={}}},{key:"remove",value:function(e){if(!this.data.hasOwnProperty(e))throw new Error("".concat(e," does not exist in this Dictionary"));delete this.data[e]}},{key:"print",value:function(){for(var e in this.data)console.log("key:".concat(e," value:").concat(this.data[e]))}},{key:"saveTable",value:function(e){var t,r="";for(t in this.data)r+="".concat(t,",").concat(this.data[t],"\n");var o=new Blob([r],{type:"text/csv"});s.default.prototype.downloadFile(o,e||"mycsv","csv")}},{key:"saveJSON",value:function(e,t){s.default.prototype.saveJSON(this.data,e,t)}},{key:"_validate",value:function(e){return!0}}]),r}(),s.default.StringDict=function(){i(n,s.default.TypedDict);var o=l(n);function n(){c(this,n);for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return o.call.apply(o,[this].concat(t))}return h(n,[{key:"_validate",value:function(e){return"string"==typeof e}}]),n}(),s.default.NumberDict=function(){i(n,s.default.TypedDict);var o=l(n);function n(){c(this,n);for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return o.call.apply(o,[this].concat(t))}return h(n,[{key:"_validate",value:function(e){return"number"==typeof e}},{key:"add",value:function(e,t){this.data.hasOwnProperty(e)?this.data[e]+=t:console.log("The key - ".concat(e," does not exist in this dictionary."))}},{key:"sub",value:function(e,t){this.add(e,-t)}},{key:"mult",value:function(e,t){this.data.hasOwnProperty(e)?this.data[e]*=t:console.log("The key - ".concat(e," does not exist in this dictionary."))}},{key:"div",value:function(e,t){this.data.hasOwnProperty(e)?this.data[e]/=t:console.log("The key - ".concat(e," does not exist in this dictionary."))}},{key:"_valueTest",value:function(e){if(0===Object.keys(this.data).length)throw new Error("Unable to search for a minimum or maximum value on an empty NumberDict");if(1===Object.keys(this.data).length)return this.data[Object.keys(this.data)[0]];var t,r=this.data[Object.keys(this.data)[0]];for(t in this.data)this.data[t]*e<r*e&&(r=this.data[t]);return r}},{key:"minValue",value:function(){return this._valueTest(1)}},{key:"maxValue",value:function(){return this._valueTest(-1)}},{key:"_keyTest",value:function(e){if(0===Object.keys(this.data).length)throw new Error("Unable to use minValue on an empty NumberDict");if(1===Object.keys(this.data).length)return Object.keys(this.data)[0];for(var t=Object.keys(this.data)[0],r=1;r<Object.keys(this.data).length;r++)Object.keys(this.data)[r]*e<t*e&&(t=Object.keys(this.data)[r]);return t}},{key:"minKey",value:function(){return this._keyTest(1)}},{key:"maxKey",value:function(){return this._keyTest(-1)}}]),n}();e=s.default.TypedDict;r.default=e},{"../core/main":275,"core-js/modules/es.array.concat":151,"core-js/modules/es.array.iterator":161,"core-js/modules/es.object.get-prototype-of":180,"core-js/modules/es.object.keys":181,"core-js/modules/es.object.to-string":182,"core-js/modules/es.reflect.construct":184,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/web.dom-collections.iterator":238}],291:[function(t,r,o){"use strict";function n(e){return(n="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})(e)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.every"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.function.name"),t("core-js/modules/es.object.get-prototype-of"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.reflect.construct"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.trim"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/web.url"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.every"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.function.name"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.trim"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/web.url"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var f=(t=t("../core/main"))&&t.__esModule?t:{default:t};function s(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function a(e,t,r){t&&s(e.prototype,t),r&&s(e,r)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(o){return function(){var e,t,r=i(o);return e=function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch(e){}}}()?(e=i(this).constructor,Reflect.construct(r,arguments,e)):r.apply(this,arguments),r=this,!(t=e)||"object"!==h(t)&&"function"!=typeof t?c(r):t}}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e){return(h="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)})(e)}function p(e,t,r){(t._userNode||document.body).appendChild(e);r=new(r?f.default.MediaElement:f.default.Element)(e,t);return t._elements.push(r),r}function m(e,t,r,o){var n=document.createElement(t),s=("string"==typeof(r=r||"")&&(r=[r]),!0),t=!1,i=void 0;try{for(var a,l=r[Symbol.iterator]();!(s=(a=l.next()).done);s=!0){var u=a.value,c=document.createElement("source");c.setAttribute("src",u),n.appendChild(c)}}catch(e){t=!0,i=e}finally{try{s||null==l.return||l.return()}finally{if(t)throw i}}"function"==typeof o&&n.addEventListener("canplaythrough",function e(){o(),n.removeEventListener("canplaythrough",e)});var d=p(n,e,!0);return d.loadedmetadata=!1,n.addEventListener("loadedmetadata",function(){d.width=n.videoWidth,d.height=n.videoHeight,0===d.elt.width&&(d.elt.width=n.videoWidth),0===d.elt.height&&(d.elt.height=n.videoHeight),d.presetPlaybackRate&&(d.elt.playbackRate=d.presetPlaybackRate,delete d.presetPlaybackRate),d.loadedmetadata=!0}),d}f.default.prototype.select=function(e,t){f.default._validateParameters("select",arguments);t=this._getContainer(t).querySelector(e);return t?this._wrapElement(t):null},f.default.prototype.selectAll=function(e,t){f.default._validateParameters("selectAll",arguments);var r=[],o=this._getContainer(t).querySelectorAll(e);if(o)for(var n=0;n<o.length;n++){var s=this._wrapElement(o[n]);r.push(s)}return r},f.default.prototype._getContainer=function(e){var t=document;return"string"==typeof e?t=document.querySelector(e)||document:e instanceof f.default.Element?t=e.elt:e instanceof HTMLElement&&(t=e),t},f.default.prototype._wrapElement=function(e){var t,r=Array.prototype.slice.call(e.children);return"INPUT"===e.tagName&&"checkbox"===e.type?((t=new f.default.Element(e,this)).checked=function(){return 0===arguments.length?this.elt.checked:(this.elt.checked=!(arguments.length<=0||!arguments[0]),this)},t):"VIDEO"===e.tagName||"AUDIO"===e.tagName?new f.default.MediaElement(e,this):"SELECT"===e.tagName?this.createSelect(new f.default.Element(e,this)):0<r.length&&r.every(function(e){return"INPUT"===e.tagName||"LABEL"===e.tagName})?this.createRadio(new f.default.Element(e,this)):new f.default.Element(e,this)},f.default.prototype.removeElements=function(e){f.default._validateParameters("removeElements",arguments);this._elements.filter(function(e){return!(e.elt instanceof HTMLCanvasElement)}).map(function(e){return e.remove()})},f.default.Element.prototype.changed=function(e){return f.default.Element._adjustListener("change",e,this),this},f.default.Element.prototype.input=function(e){return f.default.Element._adjustListener("input",e,this),this},f.default.prototype.createDiv=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t=document.createElement("div");return t.innerHTML=e,p(t,this)},f.default.prototype.createP=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t=document.createElement("p");return t.innerHTML=e,p(t,this)},f.default.prototype.createSpan=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t=document.createElement("span");return t.innerHTML=e,p(t,this)},f.default.prototype.createImg=function(){f.default._validateParameters("createImg",arguments);var t,r=document.createElement("img"),o=arguments;return 1<o.length&&"string"==typeof o[1]&&(r.alt=o[1]),2<o.length&&"string"==typeof o[2]&&(r.crossOrigin=o[2]),r.src=o[0],t=p(r,this),r.addEventListener("load",function(){t.width=r.offsetWidth||r.width,t.height=r.offsetHeight||r.height;var e=o[o.length-1];"function"==typeof e&&e(t)}),t},f.default.prototype.createA=function(e,t,r){f.default._validateParameters("createA",arguments);var o=document.createElement("a");return o.href=e,o.innerHTML=t,r&&(o.target=r),p(o,this)},f.default.prototype.createSlider=function(e,t,r,o){f.default._validateParameters("createSlider",arguments);var n=document.createElement("input");return n.type="range",n.min=e,n.max=t,0===o?n.step=1e-18:o&&(n.step=o),"number"==typeof r&&(n.value=r),p(n,this)},f.default.prototype.createButton=function(e,t){f.default._validateParameters("createButton",arguments);var r=document.createElement("button");return r.innerHTML=e,t&&(r.value=t),p(r,this)},f.default.prototype.createCheckbox=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];f.default._validateParameters("createCheckbox",t);var o=document.createElement("div"),n=document.createElement("input"),s=(n.type="checkbox",document.createElement("label")),i=(s.appendChild(n),o.appendChild(s),p(o,this));return i.checked=function(){var e=i.elt.firstElementChild.getElementsByTagName("input")[0];if(e){if(0===arguments.length)return e.checked;e.checked=!(arguments.length<=0||!arguments[0])}return i},this.value=function(e){return i.value=e,this},t[0]&&(i.value(t[0]),(o=document.createElement("span")).innerHTML=t[0],s.appendChild(o)),t[1]&&(n.checked=!0),i},f.default.prototype.createSelect=function(){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];f.default._validateParameters("createSelect",r);var n,s=r[0];return s instanceof f.default.Element&&s.elt instanceof HTMLSelectElement?this.elt=(e=s).elt:s instanceof HTMLSelectElement?(e=p(s,this),this.elt=s):(n=document.createElement("select"),s&&"boolean"==typeof s&&n.setAttribute("multiple","true"),e=p(n,this),this.elt=n),e.option=function(e,t){var r;if(void 0!==e){for(var o,n=0;n<this.elt.length;n+=1)if(this.elt[n].textContent===e){r=n;break}void 0!==r?!1===t?this.elt.remove(r):this.elt[r].value=t:((o=document.createElement("option")).textContent=e,o.value=void 0===t?e:t,this.elt.appendChild(o),this._pInst._elements.push(o))}},e.selected=function(e){if(void 0!==e){for(var t=0;t<this.elt.length;t+=1)this.elt[t].value.toString()===e.toString()&&(this.elt.selectedIndex=t);return this}if(this.elt.getAttribute("multiple")){var r=[],o=!0,n=!1,s=void 0;try{for(var i,a=this.elt.selectedOptions[Symbol.iterator]();!(o=(i=a.next()).done);o=!0){var l=i.value;r.push(l.value)}}catch(e){n=!0,s=e}finally{try{o||null==a.return||a.return()}finally{if(n)throw s}}return r}return this.elt.value},e.disable=function(e){if("string"==typeof e)for(var t=0;t<this.elt.length;t++)this.elt[t].value.toString()===e&&(this.elt[t].disabled=!0,this.elt[t].selected=!1);else this.elt.disabled=!0;return this},e.enable=function(e){if("string"==typeof e)for(var t=0;t<this.elt.length;t++)this.elt[t].value.toString()===e&&(this.elt[t].disabled=!1,this.elt[t].selected=!1);else{this.elt.disabled=!1;for(var r=0;r<this.elt.length;r++)this.elt[r].disabled=!1,this.elt[r].selected=!1}return this},e},f.default.prototype.createRadio=function(){function t(e){return e instanceof HTMLInputElement&&"radio"===e.type}function d(e){return e instanceof HTMLLabelElement}var h,e,r,o=arguments.length<=0?void 0:arguments[0];o instanceof f.default.Element&&(o.elt instanceof HTMLDivElement||o.elt instanceof HTMLSpanElement)?(h=o,this.elt=o.elt):o instanceof HTMLDivElement||o instanceof HTMLSpanElement?(h=p(o,this),e=this.elt=o,"string"==typeof(arguments.length<=1?void 0:arguments[1])&&(r=arguments.length<=1?void 0:arguments[1])):("string"==typeof o&&(r=o),e=document.createElement("div"),h=p(e,this),this.elt=e),h._name=r||"radioOption";return h._getOptionsArray=function(){return Array.from(this.elt.children).filter(function(e){return t(e)||d(e)&&t(e.firstElementChild)}).map(function(e){return t(e)?e:e.firstElementChild})},h.option=function(e,t){var r,o,n,s=!0,i=!1,a=void 0;try{for(var l,u=h._getOptionsArray()[Symbol.iterator]();!(s=(l=u.next()).done);s=!0){var c=l.value;if(c.value===e){r=c;break}}}catch(e){i=!0,a=e}finally{try{s||null==u.return||u.return()}finally{if(i)throw a}}return void 0===r&&((r=document.createElement("input")).setAttribute("type","radio"),r.setAttribute("value",e)),r.setAttribute("name",h._name),d(r.parentElement)?o=r.parentElement:(o=document.createElement("label")).insertAdjacentElement("afterbegin",r),o.lastElementChild instanceof HTMLSpanElement?n=o.lastElementChild:(n=document.createElement("span"),r.insertAdjacentElement("afterend",n)),n.innerHTML=void 0===t?e:t,this.elt.appendChild(o),r},h.remove=function(e){var t=!0,r=!1,o=void 0;try{for(var n,s=h._getOptionsArray()[Symbol.iterator]();!(t=(n=s.next()).done);t=!0){var i=n.value;if(i.value===e)return void(d(i.parentElement)?i.parentElement:i).remove()}}catch(e){r=!0,o=e}finally{try{t||null==s.return||s.return()}finally{if(r)throw o}}},h.value=function(){var e="",t=!0,r=!1,o=void 0;try{for(var n,s=h._getOptionsArray()[Symbol.iterator]();!(t=(n=s.next()).done);t=!0){var i=n.value;if(i.checked){e=i.value;break}}}catch(e){r=!0,o=e}finally{try{t||null==s.return||s.return()}finally{if(r)throw o}}return e},h.selected=function(e){var t=null;if(void 0===e){var r=!0,o=!1,n=void 0;try{for(var s,i=h._getOptionsArray()[Symbol.iterator]();!(r=(s=i.next()).done);r=!0){var a=s.value;if(a.checked){t=a;break}}}catch(e){o=!0,n=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw n}}}else{h._getOptionsArray().forEach(function(e){e.checked=!1,e.removeAttribute("checked")});var l=!0,o=!1,n=void 0;try{for(var u,c=h._getOptionsArray()[Symbol.iterator]();!(l=(u=c.next()).done);l=!0){var d=u.value;d.value===e&&(d.setAttribute("checked",!0),d.checked=!0,t=d)}}catch(e){o=!0,n=e}finally{try{l||null==c.return||c.return()}finally{if(o)throw n}}}return t},h.disable=function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],t=!0,r=!1,o=void 0;try{for(var n,s=h._getOptionsArray()[Symbol.iterator]();!(t=(n=s.next()).done);t=!0)n.value.setAttribute("disabled",e)}catch(e){r=!0,o=e}finally{try{t||null==s.return||s.return()}finally{if(r)throw o}}},h},f.default.prototype.createColorPicker=function(e){f.default._validateParameters("createColorPicker",arguments);var t=document.createElement("input");return t.type="color",e?e instanceof f.default.Color?t.value=e.toString("#rrggbb"):(f.default.prototype._colorMode="rgb",f.default.prototype._colorMaxes={rgb:[255,255,255,255],hsb:[360,100,100,1],hsl:[360,100,100,1]},t.value=f.default.prototype.color(e).toString("#rrggbb")):t.value="#000000",(t=p(t,this)).color=function(){return e&&(e.mode&&(f.default.prototype._colorMode=e.mode),e.maxes&&(f.default.prototype._colorMaxes=e.maxes)),f.default.prototype.color(this.elt.value)},t},f.default.prototype.createInput=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"text",r=(f.default._validateParameters("createInput",arguments),document.createElement("input"));return r.setAttribute("value",e),r.setAttribute("type",t),p(r,this)},f.default.prototype.createFileInput=function(a){var e,t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];f.default._validateParameters("createFileInput",arguments);if(window.File&&window.FileReader&&window.FileList&&window.Blob)return(e=document.createElement("input")).setAttribute("type","file"),t&&e.setAttribute("multiple",!0),e.addEventListener("change",function(e){var t=!0,r=!1,o=void 0;try{for(var n,s=e.target.files[Symbol.iterator]();!(t=(n=s.next()).done);t=!0){var i=n.value;f.default.File._load(i,a)}}catch(e){r=!0,o=e}finally{try{t||null==s.return||s.return()}finally{if(r)throw o}}},!1),p(e,this);console.log("The File APIs are not fully supported in this browser. Cannot create element.")},f.default.prototype.createVideo=function(e,t){return f.default._validateParameters("createVideo",arguments),m(this,"video",e,t)},f.default.prototype.createAudio=function(e,t){return f.default._validateParameters("createAudio",arguments),m(this,"audio",e,t)},f.default.prototype.VIDEO="video",f.default.prototype.AUDIO="audio",void 0===navigator.mediaDevices&&(navigator.mediaDevices={}),void 0===navigator.mediaDevices.getUserMedia&&(navigator.mediaDevices.getUserMedia=function(r){var o=navigator.webkitGetUserMedia||navigator.mozGetUserMedia;return o?new Promise(function(e,t){o.call(navigator,r,e,t)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}),f.default.prototype.createCapture=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(f.default._validateParameters("createCapture",t),!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia)throw new DOMException("getUserMedia not supported in this browser");for(var o,n=!0,s=!0,i=0,a=t;i<a.length;i++){var l=a[i];l===f.default.prototype.VIDEO?s=!1:l===f.default.prototype.AUDIO?n=!1:"object"===h(l)?u=l:"function"==typeof l&&(o=l)}var u=u||{video:n,audio:s},c=document.createElement("video"),d=(c.setAttribute("playsinline",""),navigator.mediaDevices.getUserMedia(u).then(function(t){try{"srcObject"in c?c.srcObject=t:c.src=window.URL.createObjectURL(t)}catch(e){c.src=t}},console.log),p(c,this,!0));return d.loadedmetadata=!1,c.addEventListener("loadedmetadata",function(){c.play(),c.width?(d.width=c.width,d.height=c.height):(d.width=d.elt.width=c.videoWidth,d.height=d.elt.height=c.videoHeight),d.loadedmetadata=!0,o&&o(c.srcObject)}),d},f.default.prototype.createElement=function(e,t){f.default._validateParameters("createElement",arguments);e=document.createElement(e);return void 0!==t&&(e.innerHTML=t),p(e,this)},f.default.Element.prototype.addClass=function(e){return this.elt.className?this.hasClass(e)||(this.elt.className=this.elt.className+" "+e):this.elt.className=e,this},f.default.Element.prototype.removeClass=function(e){return this.elt.classList.remove(e),this},f.default.Element.prototype.hasClass=function(e){return this.elt.classList.contains(e)},f.default.Element.prototype.toggleClass=function(e){return this.elt.classList.contains(e)?this.elt.classList.remove(e):this.elt.classList.add(e),this},f.default.Element.prototype.child=function(e){return void 0===e?this.elt.childNodes:("string"==typeof e?("#"===e[0]&&(e=e.substring(1)),e=document.getElementById(e)):e instanceof f.default.Element&&(e=e.elt),e instanceof HTMLElement&&this.elt.appendChild(e),this)},f.default.Element.prototype.center=function(e){var t=this.elt.style.display,r="none"===this.elt.style.display,o="none"===this.parent().style.display,n={x:this.elt.offsetLeft,y:this.elt.offsetTop},s=(r&&this.show(),o&&this.parent().show(),this.elt.style.display="block",this.position(0,0),Math.abs(this.parent().offsetWidth-this.elt.offsetWidth)),i=Math.abs(this.parent().offsetHeight-this.elt.offsetHeight);return"both"===e||void 0===e?this.position(s/2+this.parent().offsetLeft,i/2+this.parent().offsetTop):"horizontal"===e?this.position(s/2+this.parent().offsetLeft,n.y):"vertical"===e&&this.position(n.x,i/2+this.parent().offsetTop),this.style("display",t),r&&this.hide(),o&&this.parent().hide(),this},f.default.Element.prototype.html=function(){return 0===arguments.length?this.elt.innerHTML:(arguments.length<=1||!arguments[1]?this.elt.innerHTML=arguments.length<=0?void 0:arguments[0]:this.elt.insertAdjacentHTML("beforeend",arguments.length<=0?void 0:arguments[0]),this)},f.default.Element.prototype.position=function(){return 0===arguments.length?{x:this.elt.offsetLeft,y:this.elt.offsetTop}:(this.elt.style.position="static"!==(arguments.length<=2?void 0:arguments[2])&&"fixed"!==(arguments.length<=2?void 0:arguments[2])&&"relative"!==(arguments.length<=2?void 0:arguments[2])&&"sticky"!==(arguments.length<=2?void 0:arguments[2])&&"initial"!==(arguments.length<=2?void 0:arguments[2])&&"inherit"!==(arguments.length<=2?void 0:arguments[2])?"absolute":arguments.length<=2?void 0:arguments[2],this.elt.style.left=(arguments.length<=0?void 0:arguments[0])+"px",this.elt.style.top=(arguments.length<=1?void 0:arguments[1])+"px",this.x=arguments.length<=0?void 0:arguments[0],this.y=arguments.length<=1?void 0:arguments[1],this)},f.default.Element.prototype._translate=function(){this.elt.style.position="absolute";var e="";return this.elt.style.transform&&(e=(e=this.elt.style.transform.replace(/translate3d\(.*\)/g,"")).replace(/translate[X-Z]?\(.*\)/g,"")),2===arguments.length?this.elt.style.transform="translate("+(arguments.length<=0?void 0:arguments[0])+"px, "+(arguments.length<=1?void 0:arguments[1])+"px)":2<arguments.length&&(this.elt.style.transform="translate3d("+(arguments.length<=0?void 0:arguments[0])+"px,"+(arguments.length<=1?void 0:arguments[1])+"px,"+(arguments.length<=2?void 0:arguments[2])+"px)",this.elt.parentElement.style.perspective=3===arguments.length?"1000px":(arguments.length<=3?void 0:arguments[3])+"px"),this.elt.style.transform+=e,this},f.default.Element.prototype._rotate=function(){var e="";return this.elt.style.transform&&(e=(e=this.elt.style.transform.replace(/rotate3d\(.*\)/g,"")).replace(/rotate[X-Z]?\(.*\)/g,"")),1===arguments.length?this.elt.style.transform="rotate("+(arguments.length<=0?void 0:arguments[0])+"deg)":2===arguments.length?this.elt.style.transform="rotate("+(arguments.length<=0?void 0:arguments[0])+"deg, "+(arguments.length<=1?void 0:arguments[1])+"deg)":3===arguments.length&&(this.elt.style.transform="rotateX("+(arguments.length<=0?void 0:arguments[0])+"deg)",this.elt.style.transform+="rotateY("+(arguments.length<=1?void 0:arguments[1])+"deg)",this.elt.style.transform+="rotateZ("+(arguments.length<=2?void 0:arguments[2])+"deg)"),this.elt.style.transform+=e,this},f.default.Element.prototype.style=function(e,t){if(void 0===(t=t instanceof f.default.Color?"rgba("+t.levels[0]+","+t.levels[1]+","+t.levels[2]+","+t.levels[3]/255+")":t)){if(-1===e.indexOf(":"))return window.getComputedStyle(this.elt).getPropertyValue(e);for(var r=e.split(";"),o=0;o<r.length;o++){var n=r[o].split(":");n[0]&&n[1]&&(this.elt.style[n[0].trim()]=n[1].trim())}}else this.elt.style[e]=t,"width"!==e&&"height"!==e&&"left"!==e&&"top"!==e||(t=window.getComputedStyle(this.elt).getPropertyValue(e).replace(/[^\d.]/g,""),this[e]=Math.round(parseFloat(t,10)));return this},f.default.Element.prototype.attribute=function(e,t){if(null==this.elt.firstChild||"checkbox"!==this.elt.firstChild.type&&"radio"!==this.elt.firstChild.type)return void 0===t?this.elt.getAttribute(e):(this.elt.setAttribute(e,t),this);if(void 0===t)return this.elt.firstChild.getAttribute(e);for(var r=0;r<this.elt.childNodes.length;r++)this.elt.childNodes[r].setAttribute(e,t)},f.default.Element.prototype.removeAttribute=function(e){if(null!=this.elt.firstChild&&("checkbox"===this.elt.firstChild.type||"radio"===this.elt.firstChild.type))for(var t=0;t<this.elt.childNodes.length;t++)this.elt.childNodes[t].removeAttribute(e);return this.elt.removeAttribute(e),this},f.default.Element.prototype.value=function(){return 0<arguments.length?(this.elt.value=arguments.length<=0?void 0:arguments[0],this):"range"===this.elt.type?parseFloat(this.elt.value):this.elt.value},f.default.Element.prototype.show=function(){return this.elt.style.display="block",this},f.default.Element.prototype.hide=function(){return this.elt.style.display="none",this},f.default.Element.prototype.size=function(e,t){if(0===arguments.length)return{width:this.elt.offsetWidth,height:this.elt.offsetHeight};var r=e,o=t,n=f.default.prototype.AUTO;if(r!==n||o!==n){if(r===n?r=t*this.width/this.height:o===n&&(o=e*this.height/this.width),this.elt instanceof HTMLCanvasElement){var s,i={},a=this.elt.getContext("2d");for(s in a)i[s]=a[s];for(s in this.elt.setAttribute("width",r*this._pInst._pixelDensity),this.elt.setAttribute("height",o*this._pInst._pixelDensity),this.elt.style.width=r+"px",this.elt.style.height=o+"px",this._pInst.scale(this._pInst._pixelDensity,this._pInst._pixelDensity),i)this.elt.getContext("2d")[s]=i[s]}else this.elt.style.width=r+"px",this.elt.style.height=o+"px",this.elt.width=r,this.elt.height=o;this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight,this._pInst&&this._pInst._curElement&&this._pInst._curElement.elt===this.elt&&(this._pInst._setProperty("width",this.elt.offsetWidth),this._pInst._setProperty("height",this.elt.offsetHeight))}return this},f.default.Element.prototype.remove=function(){this instanceof f.default.MediaElement&&(this.stop(),null!==(t=this.elt.srcObject)&&t.getTracks().forEach(function(e){e.stop()}));var e,t=this._pInst._elements.indexOf(this);for(e in-1!==t&&this._pInst._elements.splice(t,1),this._events)this.elt.removeEventListener(e,this._events[e]);this.elt&&this.elt.parentNode&&this.elt.parentNode.removeChild(this.elt)},f.default.Element.prototype.drop=function(a,l){var e;return window.File&&window.FileReader&&window.FileList&&window.Blob?(this._dragDisabled||(this._dragDisabled=!0,this.elt.addEventListener("dragover",e=function(e){e.preventDefault()}),this.elt.addEventListener("dragleave",e)),f.default.Element._attachListener("drop",function(e){e.preventDefault(),"function"==typeof l&&l.call(this,e);var e=e.dataTransfer.files,t=!0,r=!1,o=void 0;try{for(var n,s=e[Symbol.iterator]();!(t=(n=s.next()).done);t=!0){var i=n.value;f.default.File._load(i,a)}}catch(e){r=!0,o=e}finally{try{t||null==s.return||s.return()}finally{if(r)throw o}}},this)):console.log("The File APIs are not fully supported in this browser."),this},f.default.Element.prototype.draggable=function(r){var e,o="ontouchstart"in window,n=0,s=0,i=0,a=0,l=o?"touchend":"mouseup",u=o?"touchmove":"mousemove";function c(e){var t;e=e||window.event,a=o?(t=e.changedTouches,n=i-parseInt(t[0].clientX),s=a-parseInt(t[0].clientY),i=parseInt(t[0].clientX),parseInt(t[0].clientY)):(n=i-parseInt(e.clientX),s=a-parseInt(e.clientY),i=parseInt(e.clientX),parseInt(e.clientY)),r.style.left=r.offsetLeft-n+"px",r.style.top=r.offsetTop-s+"px"}function d(){document.removeEventListener(l,d,!1),document.removeEventListener(u,c,!1)}return void 0===r?e=r=this.elt:r!==this.elt&&r.elt!==this.elt&&(r=r.elt,e=this.elt),e.addEventListener(o?"touchstart":"mousedown",function(e){{var t;e=e||window.event,a=o?(t=e.changedTouches,i=parseInt(t[0].clientX),parseInt(t[0].clientY)):(i=parseInt(e.clientX),parseInt(e.clientY))}return document.addEventListener(l,d,!1),document.addEventListener(u,c,!1),!1},!1),e.style.cursor="move",this};function y(e,t,r,o){d(this,y),this.callback=e,this.time=t,this.id=r,this.val=o}t=function(t){var r=i;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),t&&l(r,t);var s=u(i);function i(o,e){d(this,i);var n=c(e=s.call(this,o,e));return e.elt.crossOrigin="anonymous",e._prevTime=0,e._cueIDCounter=0,e._cues=[],e.pixels=[],e._pixelsState=c(e),e._pixelDensity=1,e._modified=!1,e._frameOnCanvas=-1,Object.defineProperty(n,"src",{get:function(){var e=n.elt.children[0].src,t=n.elt.src===window.location.href?"":n.elt.src;return e===window.location.href?t:e},set:function(e){for(var t=0;t<n.elt.children.length;t++)n.elt.removeChild(n.elt.children[t]);var r=document.createElement("source");r.src=e,o.appendChild(r),n.elt.src=e,n.modified=!0}}),n._onended=function(){},n.elt.onended=function(){n._onended(n)},e}return a(i,[{key:"play",value:function(){var e;return this.elt.currentTime===this.elt.duration&&(this.elt.currentTime=0),1<this.elt.readyState||this.elt.load(),(e=this.elt.play())&&e.catch&&e.catch(function(e){"NotAllowedError"===e.name?console.error(e):console.error("Media play method encountered an unexpected error",e)}),this}},{key:"stop",value:function(){return this.elt.pause(),this.elt.currentTime=0,this}},{key:"pause",value:function(){return this.elt.pause(),this}},{key:"loop",value:function(){return this.elt.setAttribute("loop",!0),this.play(),this}},{key:"noLoop",value:function(){return this.elt.removeAttribute("loop"),this}},{key:"_setupAutoplayFailDetection",value:function(){var t=setTimeout(function(){console.error(e)},500);this.elt.addEventListener("play",function(){return clearTimeout(t)},{passive:!0,once:!0})}},{key:"autoplay",value:function(e){var t=this,r=this.elt.getAttribute("autoplay");return this.elt.setAttribute("autoplay",e),e&&!r&&(e=function(){return t._setupAutoplayFailDetection()},4===this.elt.readyState?e():this.elt.addEventListener("canplay",e,{passive:!0,once:!0})),this}},{key:"volume",value:function(e){if(void 0===e)return this.elt.volume;this.elt.volume=e}},{key:"speed",value:function(e){if(void 0===e)return this.presetPlaybackRate||this.elt.playbackRate;this.loadedmetadata?this.elt.playbackRate=e:this.presetPlaybackRate=e}},{key:"time",value:function(e){return void 0===e?this.elt.currentTime:(this.elt.currentTime=e,this)}},{key:"duration",value:function(){return this.elt.duration}},{key:"_ensureCanvas",value:function(){this.canvas||(this.canvas=document.createElement("canvas"),this.drawingContext=this.canvas.getContext("2d"),this.setModified(!0));var e=this._frameOnCanvas!==this._pInst.frameCount;this.loadedmetadata&&e&&(this.canvas.width!==this.elt.width&&(this.canvas.width=this.elt.width,this.canvas.height=this.elt.height,this.width=this.canvas.width,this.height=this.canvas.height),this.drawingContext.clearRect(0,0,this.canvas.width,this.canvas.height),this.drawingContext.drawImage(this.elt,0,0,this.canvas.width,this.canvas.height),this.setModified(!0),this._frameOnCanvas=this._pInst.frameCount)}},{key:"loadPixels",value:function(){this._ensureCanvas();for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return f.default.Renderer2D.prototype.loadPixels.apply(this,t)}},{key:"updatePixels",value:function(e,t,r,o){return this.loadedmetadata&&(this._ensureCanvas(),f.default.Renderer2D.prototype.updatePixels.call(this,e,t,r,o)),this.setModified(!0),this}},{key:"get",value:function(){this._ensureCanvas();for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return f.default.Renderer2D.prototype.get.apply(this,t)}},{key:"_getPixel",value:function(){this.loadPixels();for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return f.default.Renderer2D.prototype._getPixel.apply(this,t)}},{key:"set",value:function(e,t,r){this.loadedmetadata&&(this._ensureCanvas(),f.default.Renderer2D.prototype.set.call(this,e,t,r),this.setModified(!0))}},{key:"copy",value:function(){this._ensureCanvas();for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];f.default.prototype.copy.apply(this,t)}},{key:"mask",value:function(){this.loadPixels(),this.setModified(!0);for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];f.default.Image.prototype.mask.apply(this,t)}},{key:"isModified",value:function(){return this._modified}},{key:"setModified",value:function(e){this._modified=e}},{key:"onended",value:function(e){return this._onended=e,this}},{key:"connect",value:function(e){var t,r;if("function"==typeof f.default.prototype.getAudioContext)t=f.default.prototype.getAudioContext(),r=f.default.soundOut.input;else try{r=(t=e.context).destination}catch(e){throw"connect() is meant to be used with Web Audio API or p5.sound.js"}this.audioSourceNode||(this.audioSourceNode=t.createMediaElementSource(this.elt),this.audioSourceNode.connect(r)),e?e.input?this.audioSourceNode.connect(e.input):this.audioSourceNode.connect(e):this.audioSourceNode.connect(r)}},{key:"disconnect",value:function(){if(!this.audioSourceNode)throw"nothing to disconnect";this.audioSourceNode.disconnect()}},{key:"showControls",value:function(){this.elt.style["text-align"]="inherit",this.elt.controls=!0}},{key:"hideControls",value:function(){this.elt.controls=!1}},{key:"addCue",value:function(e,t,r){var o=this._cueIDCounter++,t=new y(t,e,o,r);return this._cues.push(t),this.elt.ontimeupdate||(this.elt.ontimeupdate=this._onTimeUpdate.bind(this)),o}},{key:"removeCue",value:function(e){for(var t=0;t<this._cues.length;t++)this._cues[t].id===e&&(console.log(e),this._cues.splice(t,1));0===this._cues.length&&(this.elt.ontimeupdate=null)}},{key:"clearCues",value:function(){this._cues=[],this.elt.ontimeupdate=null}},{key:"_onTimeUpdate",value:function(){for(var e=this.time(),t=0;t<this._cues.length;t++){var r=this._cues[t].time,o=this._cues[t].val;this._prevTime<r&&r<=e&&this._cues[t].callback(o)}this._prevTime=e}}]),i}(f.default.Element),f.default.MediaElement=t,t=function(){function r(e,t){d(this,r),this.file=e,this._pInst=t;t=e.type.split("/");this.type=t[0],this.subtype=t[1],this.name=e.name,this.size=e.size,this.data=void 0}return a(r,null,[{key:"_createLoader",value:function(o,n){var e=new FileReader;return e.onload=function(e){var t,r=new f.default.File(o);"application/json"===r.file.type?r.data=JSON.parse(e.target.result):"text/xml"===r.file.type?(t=(new DOMParser).parseFromString(e.target.result,"text/xml"),r.data=new f.default.XML(t.documentElement)):r.data=e.target.result,n(r)},e}},{key:"_load",value:function(e,t){var r;/^text\//.test(e.type)||"application/json"===e.type?f.default.File._createLoader(e,t).readAsText(e):/^(video|audio)\//.test(e.type)?((r=new f.default.File(e)).data=URL.createObjectURL(e),t(r)):f.default.File._createLoader(e,t).readAsDataURL(e)}}]),r}(),f.default.File=t,t=f.default;o.default=t},{"../core/main":275,"core-js/modules/es.array.every":153,"core-js/modules/es.array.filter":155,"core-js/modules/es.array.for-each":157,"core-js/modules/es.array.from":158,"core-js/modules/es.array.index-of":160,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.map":164,"core-js/modules/es.array.slice":165,"core-js/modules/es.array.splice":167,"core-js/modules/es.function.name":168,"core-js/modules/es.object.get-prototype-of":180,"core-js/modules/es.object.to-string":182,"core-js/modules/es.promise":183,"core-js/modules/es.reflect.construct":184,"core-js/modules/es.regexp.exec":187,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.iterator":192,"core-js/modules/es.string.replace":196,"core-js/modules/es.string.split":198,"core-js/modules/es.string.trim":201,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/web.dom-collections.for-each":237,"core-js/modules/web.dom-collections.iterator":238,"core-js/modules/web.url":240}],292:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=(y=e("../core/main"))&&y.__esModule?y:{default:y},s=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("../core/constants"));function a(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,a=function(){return e},e)}n.default.prototype.deviceOrientation=1<window.innerWidth/window.innerHeight?"landscape":"portrait",n.default.prototype.accelerationX=0,n.default.prototype.accelerationY=0,n.default.prototype.accelerationZ=0,n.default.prototype.pAccelerationX=0,n.default.prototype.pAccelerationY=0,n.default.prototype.pAccelerationZ=0,n.default.prototype._updatePAccelerations=function(){this._setProperty("pAccelerationX",this.accelerationX),this._setProperty("pAccelerationY",this.accelerationY),this._setProperty("pAccelerationZ",this.accelerationZ)},n.default.prototype.rotationX=0,n.default.prototype.rotationY=0,n.default.prototype.rotationZ=0,n.default.prototype.pRotationX=0,n.default.prototype.pRotationY=0;var l=n.default.prototype.pRotationZ=0,u=0,c=0,d="clockwise",h="clockwise",f="clockwise",p=(n.default.prototype.pRotateDirectionX=void 0,n.default.prototype.pRotateDirectionY=void 0,n.default.prototype.pRotateDirectionZ=void 0,n.default.prototype._updatePRotations=function(){this._setProperty("pRotationX",this.rotationX),this._setProperty("pRotationY",this.rotationY),this._setProperty("pRotationZ",this.rotationZ)},n.default.prototype.turnAxis=void 0,.5),m=30,y=(n.default.prototype.setMoveThreshold=function(e){n.default._validateParameters("setMoveThreshold",arguments),p=e},n.default.prototype.setShakeThreshold=function(e){n.default._validateParameters("setShakeThreshold",arguments),m=e},n.default.prototype._ondeviceorientation=function(e){this._updatePRotations(),this._angleMode===s.radians&&(e.beta=e.beta*(_PI/180),e.gamma=e.gamma*(_PI/180),e.alpha=e.alpha*(_PI/180)),this._setProperty("rotationX",e.beta),this._setProperty("rotationY",e.gamma),this._setProperty("rotationZ",e.alpha),this._handleMotion()},n.default.prototype._ondevicemotion=function(e){this._updatePAccelerations(),this._setProperty("accelerationX",2*e.acceleration.x),this._setProperty("accelerationY",2*e.acceleration.y),this._setProperty("accelerationZ",2*e.acceleration.z),this._handleMotion()},n.default.prototype._handleMotion=function(){90===window.orientation||-90===window.orientation?this._setProperty("deviceOrientation","landscape"):0===window.orientation?this._setProperty("deviceOrientation","portrait"):void 0===window.orientation&&this._setProperty("deviceOrientation","undefined");var e,t,r,o,n,s=this._isGlobal?window:this;"function"==typeof s.deviceMoved&&(Math.abs(this.accelerationX-this.pAccelerationX)>p||Math.abs(this.accelerationY-this.pAccelerationY)>p||Math.abs(this.accelerationZ-this.pAccelerationZ)>p)&&s.deviceMoved(),"function"==typeof s.deviceTurned&&(t=this.rotationX+180,e=this.pRotationX+180,r=l+180,0<t-e&&t-e<270||t-e<-270?d="clockwise":(t-e<0||270<t-e)&&(d="counter-clockwise"),d!==this.pRotateDirectionX&&(r=t),90<Math.abs(t-r)&&Math.abs(t-r)<270&&(r=t,this._setProperty("turnAxis","X"),s.deviceTurned()),this.pRotateDirectionX=d,l=r-180,e=this.rotationY+180,t=this.pRotationY+180,r=u+180,0<e-t&&e-t<270||e-t<-270?h="clockwise":(e-t<0||270<e-this.pRotationY)&&(h="counter-clockwise"),h!==this.pRotateDirectionY&&(r=e),90<Math.abs(e-r)&&Math.abs(e-r)<270&&(r=e,this._setProperty("turnAxis","Y"),s.deviceTurned()),this.pRotateDirectionY=h,u=r-180,0<this.rotationZ-this.pRotationZ&&this.rotationZ-this.pRotationZ<270||this.rotationZ-this.pRotationZ<-270?f="clockwise":(this.rotationZ-this.pRotationZ<0||270<this.rotationZ-this.pRotationZ)&&(f="counter-clockwise"),f!==this.pRotateDirectionZ&&(c=this.rotationZ),90<Math.abs(this.rotationZ-c)&&Math.abs(this.rotationZ-c)<270&&(c=this.rotationZ,this._setProperty("turnAxis","Z"),s.deviceTurned()),this.pRotateDirectionZ=f,this._setProperty("turnAxis",void 0)),"function"==typeof s.deviceShaken&&(null!==this.pAccelerationX&&(o=Math.abs(this.accelerationX-this.pAccelerationX),n=Math.abs(this.accelerationY-this.pAccelerationY)),m<o+n&&s.deviceShaken())},n.default);r.default=y},{"../core/constants":264,"../core/main":275,"core-js/modules/es.array.iterator":161,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.to-string":182,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}],293:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=(e=e("../core/main"))&&e.__esModule?e:{default:e};o.default.prototype.isKeyPressed=!1,o.default.prototype.keyIsPressed=!1,o.default.prototype.key="",o.default.prototype.keyCode=0,o.default.prototype._onkeydown=function(e){var t;this._downKeys[e.which]||(this._setProperty("isKeyPressed",!0),this._setProperty("keyIsPressed",!0),this._setProperty("keyCode",e.which),this._downKeys[e.which]=!0,this._setProperty("key",e.key||String.fromCharCode(e.which)||e.which),"function"!=typeof(t=this._isGlobal?window:this).keyPressed||e.charCode||!1===t.keyPressed(e)&&e.preventDefault())},o.default.prototype._onkeyup=function(e){this._downKeys[e.which]=!1,this._areDownKeys()||(this._setProperty("isKeyPressed",!1),this._setProperty("keyIsPressed",!1)),this._setProperty("_lastKeyCodeTyped",null),this._setProperty("key",e.key||String.fromCharCode(e.which)||e.which),this._setProperty("keyCode",e.which);var t=this._isGlobal?window:this;"function"==typeof t.keyReleased&&!1===t.keyReleased(e)&&e.preventDefault()},o.default.prototype._onkeypress=function(e){var t;e.which!==this._lastKeyCodeTyped&&(this._setProperty("_lastKeyCodeTyped",e.which),this._setProperty("key",e.key||String.fromCharCode(e.which)||e.which),"function"==typeof(t=this._isGlobal?window:this).keyTyped&&!1===t.keyTyped(e)&&e.preventDefault())},o.default.prototype._onblur=function(e){this._downKeys={}},o.default.prototype.keyIsDown=function(e){return o.default._validateParameters("keyIsDown",arguments),this._downKeys[e]||!1},o.default.prototype._areDownKeys=function(){for(var e in this._downKeys)if(this._downKeys.hasOwnProperty(e)&&!0===this._downKeys[e])return!0;return!1};e=o.default;r.default=e},{"../core/main":275}],294:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.string.includes"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=(n=e("../core/main"))&&n.__esModule?n:{default:n},s=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("../core/constants"));function a(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,a=function(){return e},e)}n.default.prototype.movedX=0,n.default.prototype.movedY=0,n.default.prototype._hasMouseInteracted=!1,n.default.prototype.mouseX=0,n.default.prototype.mouseY=0,n.default.prototype.pmouseX=0,n.default.prototype.pmouseY=0,n.default.prototype.winMouseX=0,n.default.prototype.winMouseY=0,n.default.prototype.pwinMouseX=0,n.default.prototype.pwinMouseY=0,n.default.prototype.mouseButton=0,n.default.prototype.mouseIsPressed=!1,n.default.prototype._updateNextMouseCoords=function(e){var t,r,o,n,s;null!==this._curElement&&(!e.touches||0<e.touches.length)&&(t=this._curElement.elt,r=this.width,o=this.height,(n=e)&&!n.clientX&&(n.touches?n=n.touches[0]:n.changedTouches&&(n=n.changedTouches[0])),s=t.getBoundingClientRect(),r=t.scrollWidth/r||1,t=t.scrollHeight/o||1,o={x:(n.clientX-s.left)/r,y:(n.clientY-s.top)/t,winX:n.clientX,winY:n.clientY,id:n.identifier},this._setProperty("movedX",e.movementX),this._setProperty("movedY",e.movementY),this._setProperty("mouseX",o.x),this._setProperty("mouseY",o.y),this._setProperty("winMouseX",o.winX),this._setProperty("winMouseY",o.winY)),this._hasMouseInteracted||(this._updateMouseCoords(),this._setProperty("_hasMouseInteracted",!0))},n.default.prototype._updateMouseCoords=function(){this._setProperty("pmouseX",this.mouseX),this._setProperty("pmouseY",this.mouseY),this._setProperty("pwinMouseX",this.winMouseX),this._setProperty("pwinMouseY",this.winMouseY),this._setProperty("_pmouseWheelDeltaY",this._mouseWheelDeltaY)},n.default.prototype._setMouseButton=function(e){1===e.button?this._setProperty("mouseButton",s.CENTER):2===e.button?this._setProperty("mouseButton",s.RIGHT):this._setProperty("mouseButton",s.LEFT)},n.default.prototype._onmousemove=function(e){var t=this._isGlobal?window:this;this._updateNextMouseCoords(e),this.mouseIsPressed?"function"==typeof t.mouseDragged?!1===t.mouseDragged(e)&&e.preventDefault():"function"==typeof t.touchMoved&&!1===t.touchMoved(e)&&e.preventDefault():"function"==typeof t.mouseMoved&&!1===t.mouseMoved(e)&&e.preventDefault()},n.default.prototype._onmousedown=function(e){var t=this._isGlobal?window:this;this._setProperty("mouseIsPressed",!0),this._setMouseButton(e),this._updateNextMouseCoords(e),"function"==typeof t.mousePressed?!1===t.mousePressed(e)&&e.preventDefault():navigator.userAgent.toLowerCase().includes("safari")&&"function"==typeof t.touchStarted&&!1===t.touchStarted(e)&&e.preventDefault()},n.default.prototype._onmouseup=function(e){var t=this._isGlobal?window:this;this._setProperty("mouseIsPressed",!1),"function"==typeof t.mouseReleased?!1===t.mouseReleased(e)&&e.preventDefault():"function"==typeof t.touchEnded&&!1===t.touchEnded(e)&&e.preventDefault()},n.default.prototype._ondragend=n.default.prototype._onmouseup,n.default.prototype._ondragover=n.default.prototype._onmousemove,n.default.prototype._onclick=function(e){var t=this._isGlobal?window:this;"function"==typeof t.mouseClicked&&!1===t.mouseClicked(e)&&e.preventDefault()},n.default.prototype._ondblclick=function(e){var t=this._isGlobal?window:this;"function"==typeof t.doubleClicked&&!1===t.doubleClicked(e)&&e.preventDefault()},n.default.prototype._mouseWheelDeltaY=0,n.default.prototype._pmouseWheelDeltaY=0,n.default.prototype._onwheel=function(e){var t=this._isGlobal?window:this;this._setProperty("_mouseWheelDeltaY",e.deltaY),"function"==typeof t.mouseWheel&&(e.delta=e.deltaY,!1===t.mouseWheel(e)&&e.preventDefault())},n.default.prototype.requestPointerLock=function(){var e=this._curElement.elt;return e.requestPointerLock=e.requestPointerLock||e.mozRequestPointerLock,e.requestPointerLock?(e.requestPointerLock(),!0):(console.log("requestPointerLock is not implemented in this browser"),!1)},n.default.prototype.exitPointerLock=function(){document.exitPointerLock()};e=n.default;r.default=e},{"../core/constants":264,"../core/main":275,"core-js/modules/es.array.includes":159,"core-js/modules/es.array.iterator":161,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.to-string":182,"core-js/modules/es.string.includes":191,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}],295:[function(e,t,r){"use strict";e("core-js/modules/es.array.includes"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.string.includes"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;e=(e=e("../core/main"))&&e.__esModule?e:{default:e};e.default.prototype.touches=[],e.default.prototype._updateTouchCoords=function(e){if(null!==this._curElement){for(var t=[],r=0;r<e.touches.length;r++)t[r]=function(e,t,r,o){var n=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,s=e.getBoundingClientRect(),t=e.scrollWidth/t||1,e=e.scrollHeight/r||1,r=o.touches[n]||o.changedTouches[n];return{x:(r.clientX-s.left)/t,y:(r.clientY-s.top)/e,winX:r.clientX,winY:r.clientY,id:r.identifier}}(this._curElement.elt,this.width,this.height,e,r);this._setProperty("touches",t)}},e.default.prototype._ontouchstart=function(e){var t=this._isGlobal?window:this;this._setProperty("mouseIsPressed",!0),this._updateTouchCoords(e),this._updateNextMouseCoords(e),this._updateMouseCoords(),"function"==typeof t.touchStarted?!1===t.touchStarted(e)&&e.preventDefault():navigator.userAgent.toLowerCase().includes("safari")&&"function"==typeof t.mousePressed&&!1===t.mousePressed(e)&&e.preventDefault()},e.default.prototype._ontouchmove=function(e){var t=this._isGlobal?window:this;this._updateTouchCoords(e),this._updateNextMouseCoords(e),"function"==typeof t.touchMoved?!1===t.touchMoved(e)&&e.preventDefault():"function"==typeof t.mouseDragged&&!1===t.mouseDragged(e)&&e.preventDefault()},e.default.prototype._ontouchend=function(e){this._setProperty("mouseIsPressed",!1),this._updateTouchCoords(e),this._updateNextMouseCoords(e);var t=this._isGlobal?window:this;"function"==typeof t.touchEnded?!1===t.touchEnded(e)&&e.preventDefault():"function"==typeof t.mouseReleased&&!1===t.mouseReleased(e)&&e.preventDefault()};e=e.default;r.default=e},{"../core/main":275,"core-js/modules/es.array.includes":159,"core-js/modules/es.string.includes":191}],296:[function(e,t,r){"use strict";e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.typed-array.int32-array"),e("core-js/modules/es.typed-array.uint8-array"),e("core-js/modules/es.typed-array.copy-within"),e("core-js/modules/es.typed-array.every"),e("core-js/modules/es.typed-array.fill"),e("core-js/modules/es.typed-array.filter"),e("core-js/modules/es.typed-array.find"),e("core-js/modules/es.typed-array.find-index"),e("core-js/modules/es.typed-array.for-each"),e("core-js/modules/es.typed-array.includes"),e("core-js/modules/es.typed-array.index-of"),e("core-js/modules/es.typed-array.iterator"),e("core-js/modules/es.typed-array.join"),e("core-js/modules/es.typed-array.last-index-of"),e("core-js/modules/es.typed-array.map"),e("core-js/modules/es.typed-array.reduce"),e("core-js/modules/es.typed-array.reduce-right"),e("core-js/modules/es.typed-array.reverse"),e("core-js/modules/es.typed-array.set"),e("core-js/modules/es.typed-array.slice"),e("core-js/modules/es.typed-array.some"),e("core-js/modules/es.typed-array.sort"),e("core-js/modules/es.typed-array.subarray"),e("core-js/modules/es.typed-array.to-locale-string"),e("core-js/modules/es.typed-array.to-string"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.typed-array.int32-array"),e("core-js/modules/es.typed-array.uint8-array"),e("core-js/modules/es.typed-array.copy-within"),e("core-js/modules/es.typed-array.every"),e("core-js/modules/es.typed-array.fill"),e("core-js/modules/es.typed-array.filter"),e("core-js/modules/es.typed-array.find"),e("core-js/modules/es.typed-array.find-index"),e("core-js/modules/es.typed-array.for-each"),e("core-js/modules/es.typed-array.includes"),e("core-js/modules/es.typed-array.index-of"),e("core-js/modules/es.typed-array.iterator"),e("core-js/modules/es.typed-array.join"),e("core-js/modules/es.typed-array.last-index-of"),e("core-js/modules/es.typed-array.map"),e("core-js/modules/es.typed-array.reduce"),e("core-js/modules/es.typed-array.reduce-right"),e("core-js/modules/es.typed-array.reverse"),e("core-js/modules/es.typed-array.set"),e("core-js/modules/es.typed-array.slice"),e("core-js/modules/es.typed-array.some"),e("core-js/modules/es.typed-array.sort"),e("core-js/modules/es.typed-array.subarray"),e("core-js/modules/es.typed-array.to-locale-string"),e("core-js/modules/es.typed-array.to-string"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var U,N,B,G,V={_toPixels:function(e){var t,r;return e instanceof ImageData?e.data:e.getContext("2d")?e.getContext("2d").getImageData(0,0,e.width,e.height).data:e.getContext("webgl")?(r=(t=e.getContext("webgl")).drawingBufferWidth*t.drawingBufferHeight*4,r=new Uint8Array(r),t.readPixels(0,0,e.width,e.height,t.RGBA,t.UNSIGNED_BYTE,r),r):void 0},_getARGB:function(e,t){t*=4;return e[3+t]<<24&4278190080|e[t]<<16&16711680|e[1+t]<<8&65280|255&e[2+t]},_setPixels:function(e,t){for(var r,o=0,n=e.length;o<n;o++)e[0+(r=4*o)]=(16711680&t[o])>>>16,e[1+r]=(65280&t[o])>>>8,e[2+r]=255&t[o],e[3+r]=(4278190080&t[o])>>>24},_toImageData:function(e){return e instanceof ImageData?e:e.getContext("2d").getImageData(0,0,e.width,e.height)},_createImageData:function(e,t){return V._tmpCanvas=document.createElement("canvas"),V._tmpCtx=V._tmpCanvas.getContext("2d"),this._tmpCtx.createImageData(e,t)},apply:function(e,t,r){var o=e.getContext("2d"),n=o.getImageData(0,0,e.width,e.height),t=t(n,r);t instanceof ImageData?o.putImageData(t,0,0,0,0,e.width,e.height):o.putImageData(n,0,0,0,0,e.width,e.height)},threshold:function(e,t){for(var r=V._toPixels(e),o=(void 0===t&&(t=.5),Math.floor(255*t)),n=0;n<r.length;n+=4){var s=void 0,s=o<=.2126*r[n]+.7152*r[n+1]+.0722*r[n+2]?255:0;r[n]=r[n+1]=r[n+2]=s}},gray:function(e){for(var t=V._toPixels(e),r=0;r<t.length;r+=4){var o=t[r],n=t[r+1],s=t[r+2];t[r]=t[r+1]=t[r+2]=.2126*o+.7152*n+.0722*s}},opaque:function(e){for(var t=V._toPixels(e),r=0;r<t.length;r+=4)t[r+3]=255;return t},invert:function(e){for(var t=V._toPixels(e),r=0;r<t.length;r+=4)t[r]=255-t[r],t[r+1]=255-t[r+1],t[r+2]=255-t[r+2]},posterize:function(e,t){var r=V._toPixels(e);if((t=void 0===t?4:t)<2||255<t)throw new Error("Level must be greater than 2 and less than 255 for posterize");for(var o=t-1,n=0;n<r.length;n+=4){var s=r[n],i=r[n+1],a=r[n+2];r[n]=255*(s*t>>8)/o,r[n+1]=255*(i*t>>8)/o,r[n+2]=255*(a*t>>8)/o}},dilate:function(e){for(var t,r,o,n,s,i,a,l,u,c=V._toPixels(e),d=0,h=c.length?c.length/4:0,f=new Int32Array(h);d<h;)for(r=(t=d)+e.width;d<r;)n=o=V._getARGB(c,d),(u=d-1)<t&&(u=d),r<=(l=d+1)&&(l=d),(s=d-e.width)<0&&(s=0),h<=(i=d+e.width)&&(i=d),s=V._getARGB(c,s),u=V._getARGB(c,u),i=V._getARGB(c,i),(n=77*(n>>16&255)+151*(n>>8&255)+28*(255&n))<(a=77*(u>>16&255)+151*(u>>8&255)+28*(255&u))&&(o=u,n=a),n<(a=77*((u=V._getARGB(c,l))>>16&255)+151*(u>>8&255)+28*(255&u))&&(o=u,n=a),n<(l=77*(s>>16&255)+151*(s>>8&255)+28*(255&s))&&(o=s,n=l),n<(u=77*(i>>16&255)+151*(i>>8&255)+28*(255&i))&&(o=i,n=u),f[d++]=o;V._setPixels(c,f)},erode:function(e){for(var t,r,o,n,s,i,a,l,u,c=V._toPixels(e),d=0,h=c.length?c.length/4:0,f=new Int32Array(h);d<h;)for(r=(t=d)+e.width;d<r;)n=o=V._getARGB(c,d),(u=d-1)<t&&(u=d),r<=(l=d+1)&&(l=d),(s=d-e.width)<0&&(s=0),h<=(i=d+e.width)&&(i=d),s=V._getARGB(c,s),u=V._getARGB(c,u),i=V._getARGB(c,i),(a=77*(u>>16&255)+151*(u>>8&255)+28*(255&u))<(n=77*(n>>16&255)+151*(n>>8&255)+28*(255&n))&&(o=u,n=a),(a=77*((u=V._getARGB(c,l))>>16&255)+151*(u>>8&255)+28*(255&u))<n&&(o=u,n=a),(l=77*(s>>16&255)+151*(s>>8&255)+28*(255&s))<n&&(o=s,n=l),(u=77*(i>>16&255)+151*(i>>8&255)+28*(255&i))<n&&(o=i,n=u),f[d++]=o;V._setPixels(c,f)},blur:function(e,D){for(var t,r,o,n,s,i,a,l,u,c,d=V._toPixels(e),h=e.width,f=e.height,p=h*f,m=new Int32Array(p),y=0;y<p;y++)m[y]=V._getARGB(d,y);var g,v,b,j,_,x,w,S,T=new Int32Array(p),M=new Int32Array(p),E=new Int32Array(p),F=new Int32Array(p),k=0,C=3.5*D|0;if(U!==(C=C<1?1:C<248?C:248)){N=1+(U=C)<<1,B=new Int32Array(N),G=new Array(N);for(var O=0;O<N;O++)G[O]=new Int32Array(256);for(var P=1,A=C-1;P<C;P++){B[C+P]=B[A]=x=A*A,w=G[C+P],S=G[A--];for(var L=0;L<256;L++)w[L]=S[L]=x*L}_=B[C]=C*C,w=G[C];for(var R=0;R<256;R++)w[R]=_*R}for(v=0;v<f;v++){for(g=0;g<h;g++){if(n=o=r=s=t=0,(i=g-U)<0)c=-i,i=0;else{if(h<=i)break;c=0}for(b=c;b<N&&!(h<=i);b++){var I=m[i+k];j=G[b],s+=j[(-16777216&I)>>>24],r+=j[(16711680&I)>>16],o+=j[(65280&I)>>8],n+=j[255&I],t+=B[b],i++}T[a=k+g]=s/t,M[a]=r/t,E[a]=o/t,F[a]=n/t}k+=h}for(u=(l=-U)*h,v=k=0;v<f;v++){for(g=0;g<h;g++){if(n=o=r=s=t=0,l<0)c=a=-l,i=g;else{if(f<=l)break;c=0,a=l,i=g+u}for(b=c;b<N&&!(f<=a);b++)j=G[b],s+=j[T[i]],r+=j[M[i]],o+=j[E[i]],n+=j[F[i]],t+=B[b],a++,i+=h;m[g+k]=s/t<<24|r/t<<16|o/t<<8|n/t}k+=h,u+=h,l++}V._setPixels(d,m)}};r.default=V},{"core-js/modules/es.array.iterator":161,"core-js/modules/es.object.to-string":182,"core-js/modules/es.typed-array.copy-within":205,"core-js/modules/es.typed-array.every":206,"core-js/modules/es.typed-array.fill":207,"core-js/modules/es.typed-array.filter":208,"core-js/modules/es.typed-array.find":210,"core-js/modules/es.typed-array.find-index":209,"core-js/modules/es.typed-array.for-each":213,"core-js/modules/es.typed-array.includes":214,"core-js/modules/es.typed-array.index-of":215,"core-js/modules/es.typed-array.int32-array":217,"core-js/modules/es.typed-array.iterator":218,"core-js/modules/es.typed-array.join":219,"core-js/modules/es.typed-array.last-index-of":220,"core-js/modules/es.typed-array.map":221,"core-js/modules/es.typed-array.reduce":223,"core-js/modules/es.typed-array.reduce-right":222,"core-js/modules/es.typed-array.reverse":224,"core-js/modules/es.typed-array.set":225,"core-js/modules/es.typed-array.slice":226,"core-js/modules/es.typed-array.some":227,"core-js/modules/es.typed-array.sort":228,"core-js/modules/es.typed-array.subarray":229,"core-js/modules/es.typed-array.to-locale-string":230,"core-js/modules/es.typed-array.to-string":231,"core-js/modules/es.typed-array.uint8-array":234}],297:[function(e,t,r){"use strict";e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.filter"),e("core-js/modules/es.array.for-each"),e("core-js/modules/es.array.from"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.set"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.replace"),e("core-js/modules/es.string.split"),e("core-js/modules/es.typed-array.uint8-array"),e("core-js/modules/es.typed-array.uint32-array"),e("core-js/modules/es.typed-array.copy-within"),e("core-js/modules/es.typed-array.every"),e("core-js/modules/es.typed-array.fill"),e("core-js/modules/es.typed-array.filter"),e("core-js/modules/es.typed-array.find"),e("core-js/modules/es.typed-array.find-index"),e("core-js/modules/es.typed-array.for-each"),e("core-js/modules/es.typed-array.includes"),e("core-js/modules/es.typed-array.index-of"),e("core-js/modules/es.typed-array.iterator"),e("core-js/modules/es.typed-array.join"),e("core-js/modules/es.typed-array.last-index-of"),e("core-js/modules/es.typed-array.map"),e("core-js/modules/es.typed-array.reduce"),e("core-js/modules/es.typed-array.reduce-right"),e("core-js/modules/es.typed-array.reverse"),e("core-js/modules/es.typed-array.set"),e("core-js/modules/es.typed-array.slice"),e("core-js/modules/es.typed-array.some"),e("core-js/modules/es.typed-array.sort"),e("core-js/modules/es.typed-array.subarray"),e("core-js/modules/es.typed-array.to-locale-string"),e("core-js/modules/es.typed-array.to-string"),e("core-js/modules/web.dom-collections.for-each"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.filter"),e("core-js/modules/es.array.for-each"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.set"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.replace"),e("core-js/modules/es.string.split"),e("core-js/modules/es.typed-array.uint8-array"),e("core-js/modules/es.typed-array.uint32-array"),e("core-js/modules/es.typed-array.copy-within"),e("core-js/modules/es.typed-array.every"),e("core-js/modules/es.typed-array.fill"),e("core-js/modules/es.typed-array.filter"),e("core-js/modules/es.typed-array.find"),e("core-js/modules/es.typed-array.find-index"),e("core-js/modules/es.typed-array.for-each"),e("core-js/modules/es.typed-array.includes"),e("core-js/modules/es.typed-array.index-of"),e("core-js/modules/es.typed-array.iterator"),e("core-js/modules/es.typed-array.join"),e("core-js/modules/es.typed-array.last-index-of"),e("core-js/modules/es.typed-array.map"),e("core-js/modules/es.typed-array.reduce"),e("core-js/modules/es.typed-array.reduce-right"),e("core-js/modules/es.typed-array.reverse"),e("core-js/modules/es.typed-array.set"),e("core-js/modules/es.typed-array.slice"),e("core-js/modules/es.typed-array.some"),e("core-js/modules/es.typed-array.sort"),e("core-js/modules/es.typed-array.subarray"),e("core-js/modules/es.typed-array.to-locale-string"),e("core-js/modules/es.typed-array.to-string"),e("core-js/modules/web.dom-collections.for-each"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var C=o(e("../core/main")),O=o(e("omggif"));function o(e){return e&&e.__esModule?e:{default:e}}function P(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}C.default.prototype.createImage=function(e,t){return C.default._validateParameters("createImage",arguments),new C.default.Image(e,t)},C.default.prototype.saveCanvas=function(){C.default._validateParameters("saveCanvas",arguments);var e,t,r,o,n,s,i=[].slice.call(arguments);switch(arguments[0]instanceof HTMLCanvasElement?(e=arguments[0],i.shift()):arguments[0]instanceof C.default.Element?(e=arguments[0].elt,i.shift()):arguments[0]instanceof C.default.Framebuffer?((n=this.createGraphics((o=arguments[0]).width,o.height)).pixelDensity(pixelDensity()),o.loadPixels(),n.loadPixels(),n.pixels.set(o.pixels),n.updatePixels(),e=n.elt,i.shift()):e=this._curElement&&this._curElement.elt,1<=i.length&&(t=i[0]),r=(r=2<=i.length?i[1]:r)||C.default.prototype._checkFileExtension(t,r)[1]||"png"){default:s="image/png";break;case"jpeg":case"jpg":s="image/jpeg"}e.toBlob(function(e){C.default.prototype.downloadFile(e,t,r),n&&n.remove()},s)},C.default.prototype.encodeAndDownloadGif=function(d,e){for(var h=d.gifProperties,t=h.loopLimit,r=(1===t?t=null:null===t&&(t=0),new Uint8Array(d.width*d.height*h.numFrames)),f=[],o={},n=0;n<h.numFrames;n++){for(var s=new Set,i=h.frames[n].image.data,a=i.length,l=new Uint32Array(d.width*d.height),u=0,c=0;u<a;u+=4,c++){var p=i[u+0]<<16|i[u+1]<<8|i[u+2]<<0;s.add(p),l[c]=p}var m=P(s).sort().toString();void 0===o[m]?o[m]={freq:1,frames:[n]}:(o[m].freq+=1,o[m].frames.push(n)),f.push(l)}for(var y=[],g=Object.keys(o).sort(function(e,t){return o[t].freq-o[e].freq}),v=g[0].split(",").map(function(e){return parseInt(e)}),y=y.concat(o[v].frames),b=new Set(v),j=1;j<g.length;j++){var _=g[j].split(",").map(function(e){return parseInt(e)}).filter(function(e){return!b.has(e)});if(v.length+_.length<=256){for(var x=0;x<_.length;x++)v.push(_[x]),b.add(_[x]);y=y.concat(o[g[j]].frames)}}y=new Set(y);for(var w={},S=0;S<v.length;S++)w[v[S]]||(w[v[S]]=S);for(var T=1;T<v.length;)T<<=1;v.length=T;for(var t={loop:t,palette:new Uint32Array(v)},M=new O.default.GifWriter(r,d.width,d.height,t),E={},k=0;k<h.numFrames;k++)!function(r){var o=!y.has(r),n=o?[]:v,s=new Uint8Array(d.width*d.height),i={},a=new Set,e=(f[r].forEach(function(e,t){o?(void 0===i[e]&&(i[e]=n.length,n.push(e)),s[t]=i[e]):s[t]=w[e],0<r&&f[r-1][t]!==e&&a.add(e)}),{}),t=n.filter(function(e){return!a.has(e)});if(0<t.length){var t=t[0],l=(o?i:w)[t];if(0<r){for(var u=0;u<f[r].length;u++)f[r-1][u]===f[r][u]&&(s[u]=l);e.transparent=l,E.frameOpts.disposal=1}}if(e.delay=h.frames[r].delay/10,o){for(var c=1;c<n.length;)c<<=1;n.length=c,e.palette=new Uint32Array(n)}0<r&&M.addFrame(0,0,d.width,d.height,E.pixelPaletteIndex,E.frameOpts),E={pixelPaletteIndex:s,frameOpts:e}}(k);E.frameOpts.disposal=1,M.addFrame(0,0,d.width,d.height,E.pixelPaletteIndex,E.frameOpts);t=new Blob([r.slice(0,M.end())],{type:"image/gif"});C.default.prototype.downloadFile(t,e,"gif")},C.default.prototype.saveFrames=function(e,t,r,o,n){C.default._validateParameters("saveFrames",arguments);r=C.default.prototype.constrain(r=r||3,0,15);r*=1e3;var o=C.default.prototype.constrain(o||15,0,22),s=0,i=C.default.prototype._makeFrame,a=this._curElement.elt,l=[],u=setInterval(function(){l.push(i(e+s,t,a)),s++},1e3/o);setTimeout(function(){if(clearInterval(u),n)n(l);else for(var e=0,t=l;e<t.length;e++){var r=t[e];C.default.prototype.downloadFile(r.imageData,r.filename,r.ext)}l=[]},.01+r)},C.default.prototype._makeFrame=function(e,t,r){var o,r=this?this._curElement.elt:r;if(t)switch(t.toLowerCase()){case"png":o="image/png";break;case"jpeg":case"jpg":o="image/jpeg";break;default:o="image/png"}else t="png",o="image/png";var r=(r=r.toDataURL(o)).replace(o,"image/octet-stream"),n={};return n.imageData=r,n.filename=e,n.ext=t,n};e=C.default;r.default=e},{"../core/main":275,"core-js/modules/es.array.concat":151,"core-js/modules/es.array.filter":155,"core-js/modules/es.array.for-each":157,"core-js/modules/es.array.from":158,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.map":164,"core-js/modules/es.array.slice":165,"core-js/modules/es.object.keys":181,"core-js/modules/es.object.to-string":182,"core-js/modules/es.regexp.exec":187,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.set":189,"core-js/modules/es.string.iterator":192,"core-js/modules/es.string.replace":196,"core-js/modules/es.string.split":198,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.typed-array.copy-within":205,"core-js/modules/es.typed-array.every":206,"core-js/modules/es.typed-array.fill":207,"core-js/modules/es.typed-array.filter":208,"core-js/modules/es.typed-array.find":210,"core-js/modules/es.typed-array.find-index":209,"core-js/modules/es.typed-array.for-each":213,"core-js/modules/es.typed-array.includes":214,"core-js/modules/es.typed-array.index-of":215,"core-js/modules/es.typed-array.iterator":218,"core-js/modules/es.typed-array.join":219,"core-js/modules/es.typed-array.last-index-of":220,"core-js/modules/es.typed-array.map":221,"core-js/modules/es.typed-array.reduce":223,"core-js/modules/es.typed-array.reduce-right":222,"core-js/modules/es.typed-array.reverse":224,"core-js/modules/es.typed-array.set":225,"core-js/modules/es.typed-array.slice":226,"core-js/modules/es.typed-array.some":227,"core-js/modules/es.typed-array.sort":228,"core-js/modules/es.typed-array.subarray":229,"core-js/modules/es.typed-array.to-locale-string":230,"core-js/modules/es.typed-array.to-string":231,"core-js/modules/es.typed-array.uint32-array":233,"core-js/modules/es.typed-array.uint8-array":234,"core-js/modules/web.dom-collections.for-each":237,"core-js/modules/web.dom-collections.iterator":238,omggif:248}],298:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.copy-within"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.promise"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.typed-array.uint8-array"),e("core-js/modules/es.typed-array.uint8-clamped-array"),e("core-js/modules/es.typed-array.copy-within"),e("core-js/modules/es.typed-array.every"),e("core-js/modules/es.typed-array.fill"),e("core-js/modules/es.typed-array.filter"),e("core-js/modules/es.typed-array.find"),e("core-js/modules/es.typed-array.find-index"),e("core-js/modules/es.typed-array.for-each"),e("core-js/modules/es.typed-array.includes"),e("core-js/modules/es.typed-array.index-of"),e("core-js/modules/es.typed-array.iterator"),e("core-js/modules/es.typed-array.join"),e("core-js/modules/es.typed-array.last-index-of"),e("core-js/modules/es.typed-array.map"),e("core-js/modules/es.typed-array.reduce"),e("core-js/modules/es.typed-array.reduce-right"),e("core-js/modules/es.typed-array.reverse"),e("core-js/modules/es.typed-array.set"),e("core-js/modules/es.typed-array.slice"),e("core-js/modules/es.typed-array.some"),e("core-js/modules/es.typed-array.sort"),e("core-js/modules/es.typed-array.subarray"),e("core-js/modules/es.typed-array.to-locale-string"),e("core-js/modules/es.typed-array.to-string"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.copy-within"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.promise"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.typed-array.uint8-array"),e("core-js/modules/es.typed-array.uint8-clamped-array"),e("core-js/modules/es.typed-array.copy-within"),e("core-js/modules/es.typed-array.every"),e("core-js/modules/es.typed-array.fill"),e("core-js/modules/es.typed-array.filter"),e("core-js/modules/es.typed-array.find"),e("core-js/modules/es.typed-array.find-index"),e("core-js/modules/es.typed-array.for-each"),e("core-js/modules/es.typed-array.includes"),e("core-js/modules/es.typed-array.index-of"),e("core-js/modules/es.typed-array.iterator"),e("core-js/modules/es.typed-array.join"),e("core-js/modules/es.typed-array.last-index-of"),e("core-js/modules/es.typed-array.map"),e("core-js/modules/es.typed-array.reduce"),e("core-js/modules/es.typed-array.reduce-right"),e("core-js/modules/es.typed-array.reverse"),e("core-js/modules/es.typed-array.set"),e("core-js/modules/es.typed-array.slice"),e("core-js/modules/es.typed-array.some"),e("core-js/modules/es.typed-array.sort"),e("core-js/modules/es.typed-array.subarray"),e("core-js/modules/es.typed-array.to-locale-string"),e("core-js/modules/es.typed-array.to-string"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,e("regenerator-runtime/runtime");var O=n(e("../core/main")),m=n(e("../core/helpers")),j=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("../core/constants")),g=n(e("omggif")),P=e("gifenc");function a(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,a=function(){return e},e)}function n(e){return e&&e.__esModule?e:{default:e}}function l(e,t,r,o,n,s,i){try{var a=e[s](i),l=a.value}catch(e){return void r(e)}a.done?t(l):Promise.resolve(l).then(o,n)}function y(e,t,r,o,n,s,i,a,l,u,c){var d,h,f,p,m,y,g,v,b;return e===j.COVER&&(d=t,f=r,g=s,v=i,y=a,b=l,h=u,p=c,m=Math.max(g/h,v/p),g/=m,v/=m,m=y,y=b,d===j.CENTER?m+=(h-g)/2:d===j.RIGHT&&(m+=h-g),f===j.CENTER?y+=(p-v)/2:f===j.BOTTOM&&(y+=p-v),a=(b={x:m,y:y,w:g,h:v}).x,l=b.y,u=b.w,c=b.h),e===j.CONTAIN&&(d=t,h=r,f=o,p=n,m=s,y=i,g=u,v=c,b=Math.max(g/m,v/y),g/=b,v/=b,b=f,f=p,d===j.CENTER?b+=(m-g)/2:d===j.RIGHT&&(b+=m-g),h===j.CENTER?f+=(y-v)/2:h===j.BOTTOM&&(f+=y-v),o=(e={x:b,y:f,w:g,h:v}).x,n=e.y,s=e.w,i=e.h),{sx:a,sy:l,sw:u,sh:c,dx:o,dy:n,dw:s,dh:i}}function v(e,t){return 0<e&&e<t?e:t}e("../core/friendly_errors/validate_params"),e("../core/friendly_errors/file_errors"),e("../core/friendly_errors/fes_core"),O.default.prototype.loadImage=function(o,f,p){O.default._validateParameters("loadImage",arguments);var m=new O.default.Image(1,1,this),y=this,e=new Request(o,{method:"GET",mode:"cors"});return fetch(o,e).then(function(e){var t,r=e.headers.get("content-type");null===r&&console.warn("The image you loaded does not have a Content-Type header. If you are using the online editor consider reuploading the asset."),r&&r.includes("image/gif")?e.arrayBuffer().then(function(e){if(e){for(var e=new Uint8Array(e),r=m,t=f,o=p,n=function(e){y._decrementPreload()}.bind(y),s=new g.default.GifReader(e),i=(r.width=r.canvas.width=s.width,r.height=r.canvas.height=s.height,[]),a=s.numFrames(),l=new Uint8ClampedArray(r.width*r.height*4),u=0;u<a;u++){var c=s.frameInfo(u),d=r.drawingContext.getImageData(0,0,r.width,r.height),h=(l=d.data.slice(),!function(e,t){try{t.decodeAndBlitFrameRGBA(e,l)}catch(e){O.default._friendlyFileLoadError(8,r.src),"function"==typeof o?o(e):console.error(e)}}(u,s),new ImageData(l,r.width,r.height)),h=(r.drawingContext.putImageData(h,0,0),c.delay);0===h&&(h=10),i.push({image:r.drawingContext.getImageData(0,0,r.width,r.height),delay:10*h}),2===c.disposal?r.drawingContext.clearRect(c.x,c.y,c.width,c.height):3===c.disposal&&r.drawingContext.putImageData(d,0,0,c.x,c.y,c.width,c.height)}null===(e=s.loopCount())?e=1:0===e&&(e=null),r.drawingContext.putImageData(i[0].image,0,0),1<i.length&&(r.gifProperties={displayIndex:0,loopLimit:e,loopCount:0,frames:i,numFrames:a,playing:!0,timeDisplayed:0,lastChangeTime:0}),"function"==typeof t&&t(r),n()}},function(e){"function"==typeof p?(p(e),y._decrementPreload()):console.error(e)}):((t=new Image).onload=function(){m.width=m.canvas.width=t.width,m.height=m.canvas.height=t.height,m.drawingContext.drawImage(t,0,0),m.modified=!0,"function"==typeof f&&f(m),y._decrementPreload()},t.onerror=function(e){O.default._friendlyFileLoadError(0,t.src),"function"==typeof p?(p(e),y._decrementPreload()):console.error(e)},0!==o.indexOf("data:image/")&&(t.crossOrigin="Anonymous"),t.src=o),m.modified=!0}).catch(function(e){O.default._friendlyFileLoadError(0,o),"function"==typeof p?(p(e),y._decrementPreload()):console.error(e)}),m},O.default.prototype.saveGif=function(){a=regeneratorRuntime.mark(function e(t,r){var o,n,s,i,a,l,u,c,d,h,f,p,m,y,g,v,b,j,_,x,w,S,T,M,E,k,C=arguments;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=2<C.length&&void 0!==C[2]?C[2]:{delay:0,units:"seconds",silent:!1,notificationDuration:0,notificationID:"progressBar"},"string"!=typeof t)throw TypeError("fileName parameter must be a string");e.next=3;break;case 3:if("number"!=typeof r)throw TypeError("Duration parameter must be a number");e.next=5;break;case 5:if(n=o&&o.delay||0,s=o&&o.units||"seconds",i=o&&o.silent||!1,a=o&&o.notificationDuration||0,l=o&&o.notificationID||"progressBar","number"!=typeof n)throw TypeError("Delay parameter must be a number");e.next=12;break;case 12:if("seconds"!==s&&"frames"!==s)throw TypeError('Units parameter must be either "frames" or "seconds"');e.next=14;break;case 14:if("boolean"!=typeof i)throw TypeError("Silent parameter must be a boolean");e.next=16;break;case 16:if("number"!=typeof a)throw TypeError("Notification duration parameter must be a number");e.next=18;break;case 18:if("string"!=typeof l)throw TypeError("Notification ID parameter must be a string");e.next=20;break;case 20:return this._recording=!0,h=this._targetFrameRate,u=(u=1/(h=h!==1/0&&void 0!==h&&0!==h?h:60)*1e3)<20?20:u,d=(c="seconds"===s?r*h:r)+(h="seconds"===s?n*h:n),h=h,this.frameCount=h,f=this._pixelDensity,this.pixelDensity(1),p=[],null!==document.getElementById(l)&&document.getElementById(l).remove(),i||((m=this.createP("")).id(l),m.style("font-size","16px"),m.style("font-family","Montserrat"),m.style("background-color","#ffffffa0"),m.style("padding","8px"),m.style("border-radius","10px"),m.position(0,0)),this._renderer instanceof O.default.RendererGL&&(g=this.drawingContext,y=new Uint8Array(g.drawingBufferWidth*g.drawingBufferHeight*4)),this.noLoop(),e.next=39,Promise.resolve();case 39:if(h<d)return this.redraw(),M=void 0,M=this._renderer instanceof O.default.RendererGL?(y=new Uint8Array(g.drawingBufferWidth*g.drawingBufferHeight*4),g.readPixels(0,0,g.drawingBufferWidth,g.drawingBufferHeight,g.RGBA,g.UNSIGNED_BYTE,y),function(e){for(var t=parseInt(height/2),r=4*width,o=new Uint8Array(4*width),n=0;n<t;++n){var s=n*r,i=(height-n-1)*r;o.set(e.subarray(s,s+r)),e.copyWithin(s,i,i+r),e.set(o,i)}return e}(y)):this.drawingContext.getImageData(0,0,this.width,this.height).data,p.push(M),h++,i||m.html("Saved frame <b>"+p.length.toString()+"</b> out of "+c.toString()),e.next=48,new Promise(function(e){return setTimeout(e,0)});e.next=50;break;case 48:e.next=39;break;case 50:i||m.html("Frames processed, generating color palette..."),this.loop(),this.pixelDensity(f),v=(0,P.GIFEncoder)(),b=function(e){for(var t=new Uint8Array(e.length*e[0].length),r=0;r<e.length;r++)t.set(e[r],r*e[0].length);var o=(0,P.quantize)(t,256,{format:"rgba4444",oneBitAlpha:!0});256===o.length?o[o.length-1]=[255*Math.random(),255*Math.random(),255*Math.random(),0]:o.push([255*Math.random(),255*Math.random(),255*Math.random(),0]);return o}(p),j={},_=function(e){for(var t=e.length/4,r=new Uint8Array(t),o=0;o<t;o++){var n=e[4*o]<<24|e[4*o+1]<<16|e[4*o+2]<<8|e[4*o+3];void 0===j[n]&&(j[n]=(0,P.nearestColorIndex)(b,e.slice(4*o,4*(o+1)))),r[o]=j[n]}return r},x=b.length-1,w=[],S=0;case 60:if(!(S<p.length)){e.next=71;break}if(T=_(p[S]),M=T.slice(),0===S)v.writeFrame(T,this.width,this.height,{palette:b,delay:u,dispose:1});else{for(E=0;E<T.length;E++)T[E]===w[E]&&(T[E]=x);v.writeFrame(T,this.width,this.height,{delay:u,transparent:!0,transparentIndex:x,dispose:1})}return w=M,i||m.html("Rendered frame <b>"+S.toString()+"</b> out of "+c.toString()),e.next=68,new Promise(function(e){return setTimeout(e,0)});case 68:S++,e.next=60;break;case 71:v.finish(),k=v.bytesView(),k=new Blob([k],{type:"image/gif"}),p=[],this._recording=!1,this.loop(),i||(m.html("Done. Downloading your gif!🌸"),0<a&&setTimeout(function(){return m.remove()},1e3*a)),O.default.prototype.downloadFile(k,t,"gif");case 80:case"end":return e.stop()}},e,this)});var a,r=function(){var e=this,i=arguments;return new Promise(function(t,r){var o=a.apply(e,i);function n(e){l(o,t,r,n,s,"next",e)}function s(e){l(o,t,r,n,s,"throw",e)}n(void 0)})};return function(e,t){return r.apply(this,arguments)}}(),O.default.prototype.image=function(e,t,r,o,n,s,i,a,l,u,c,d){O.default._validateParameters("image",arguments);var h=e.width,f=e.height,p=(d=d||j.CENTER,c=c||j.CENTER,e.elt&&(h=void 0!==h?h:e.elt.width,f=void 0!==f?f:e.elt.height),e.elt&&e.elt.videoWidth&&!e.canvas&&(h=void 0!==h?h:e.elt.videoWidth,f=void 0!==f?f:e.elt.videoHeight),o||h),n=n||f,s=s||0,i=i||0,a=v(void 0!==a?a:h,h),h=v(void 0!==l?l:f,f),l=1;e.elt&&!e.canvas&&e.elt.style.width&&(l=e.elt.videoWidth&&!o?e.elt.videoWidth:e.elt.width,l/=parseInt(e.elt.style.width,10)),s*=l,i*=l,h*=l,a*=l;f=y(u,c,d,(f=m.default.modeAdjust(t,r,p,n,this._renderer._imageMode)).x,f.y,f.w,f.h,s,i,a,h);this._renderer.image(e,f.sx,f.sy,f.sw,f.sh,f.dx,f.dy,f.dw,f.dh)},O.default.prototype.tint=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];O.default._validateParameters("tint",t);var o=this.color.apply(this,t);this._renderer._tint=o.levels},O.default.prototype.noTint=function(){this._renderer._tint=null},O.default.prototype._getTintedImageCanvas=O.default.Renderer2D.prototype._getTintedImageCanvas,O.default.prototype.imageMode=function(e){O.default._validateParameters("imageMode",arguments),e!==j.CORNER&&e!==j.CORNERS&&e!==j.CENTER||(this._renderer._imageMode=e)};e=O.default;r.default=e},{"../core/constants":264,"../core/friendly_errors/fes_core":266,"../core/friendly_errors/file_errors":267,"../core/friendly_errors/validate_params":270,"../core/helpers":271,"../core/main":275,"core-js/modules/es.array.copy-within":152,"core-js/modules/es.array.includes":159,"core-js/modules/es.array.index-of":160,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.slice":165,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.to-string":182,"core-js/modules/es.promise":183,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.includes":191,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.typed-array.copy-within":205,"core-js/modules/es.typed-array.every":206,"core-js/modules/es.typed-array.fill":207,"core-js/modules/es.typed-array.filter":208,"core-js/modules/es.typed-array.find":210,"core-js/modules/es.typed-array.find-index":209,"core-js/modules/es.typed-array.for-each":213,"core-js/modules/es.typed-array.includes":214,"core-js/modules/es.typed-array.index-of":215,"core-js/modules/es.typed-array.iterator":218,"core-js/modules/es.typed-array.join":219,"core-js/modules/es.typed-array.last-index-of":220,"core-js/modules/es.typed-array.map":221,"core-js/modules/es.typed-array.reduce":223,"core-js/modules/es.typed-array.reduce-right":222,"core-js/modules/es.typed-array.reverse":224,"core-js/modules/es.typed-array.set":225,"core-js/modules/es.typed-array.slice":226,"core-js/modules/es.typed-array.some":227,"core-js/modules/es.typed-array.sort":228,"core-js/modules/es.typed-array.subarray":229,"core-js/modules/es.typed-array.to-locale-string":230,"core-js/modules/es.typed-array.to-string":231,"core-js/modules/es.typed-array.uint8-array":234,"core-js/modules/es.typed-array.uint8-clamped-array":235,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238,gifenc:245,omggif:248,"regenerator-runtime/runtime":252}],299:[function(e,t,r){"use strict";e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var s=o(e("../core/main")),n=o(e("./filters"));function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}s.default.Image=function(){function r(e,t){if(!(this instanceof r))throw new TypeError("Cannot call a class as a function");this.width=e,this.height=t,this.canvas=document.createElement("canvas"),this.canvas.width=this.width,this.canvas.height=this.height,this.drawingContext=this.canvas.getContext("2d"),(this._pixelsState=this)._pixelDensity=1,this.gifProperties=null,this._modified=!1,this.pixels=[]}var e,t,o;return e=r,(t=[{key:"pixelDensity",value:function(e){return void 0!==e?(e<=0&&(s.default._friendlyParamError({type:"INVALID_VALUE",format:{types:["Number"]},position:1},"pixelDensity"),e=1),this._pixelDensity=e,this.width/=e,this.height/=e,this):this._pixelDensity}},{key:"_animateGif",value:function(e){var t,r=this.gifProperties,e=e._lastRealFrameTime;0===r.lastChangeTime&&(r.lastChangeTime=e),r.playing&&(r.timeDisplayed=e-r.lastChangeTime,t=r.frames[r.displayIndex].delay,r.timeDisplayed>=t&&(t=Math.floor(r.timeDisplayed/t),r.timeDisplayed=0,r.lastChangeTime=e,r.displayIndex+=t,r.loopCount=Math.floor(r.displayIndex/r.numFrames),null!==r.loopLimit&&r.loopCount>=r.loopLimit?r.playing=!1:(e=r.displayIndex%r.numFrames,this.drawingContext.putImageData(r.frames[e].image,0,0),r.displayIndex=e,this.setModified(!0))))}},{key:"_setProperty",value:function(e,t){this[e]=t,this.setModified(!0)}},{key:"loadPixels",value:function(){s.default.Renderer2D.prototype.loadPixels.call(this),this.setModified(!0)}},{key:"updatePixels",value:function(e,t,r,o){s.default.Renderer2D.prototype.updatePixels.call(this,e,t,r,o),this.setModified(!0)}},{key:"get",value:function(e,t,r,o){return s.default._validateParameters("p5.Image.get",arguments),s.default.Renderer2D.prototype.get.apply(this,arguments)}},{key:"_getPixel",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return s.default.Renderer2D.prototype._getPixel.apply(this,t)}},{key:"set",value:function(e,t,r){s.default.Renderer2D.prototype.set.call(this,e,t,r),this.setModified(!0)}},{key:"resize",value:function(e,t){0===e&&0===t?(e=this.canvas.width,t=this.canvas.height):0===e?e=this.canvas.width*t/this.canvas.height:0===t&&(t=this.canvas.height*e/this.canvas.width),e=Math.floor(e),t=Math.floor(t);var r=document.createElement("canvas");if(r.width=e,r.height=t,this.gifProperties)for(var o=this.gifProperties,n=0;n<o.numFrames;n++){for(var s=this.drawingContext.createImageData(e,t),i=(d=d=c=u=l=void 0,o.frames[n].image),a=s,l=0,u=0;u<a.height;u++)for(var c=0;c<a.width;c++){var d=Math.floor(c*i.width/a.width),d=4*(Math.floor(u*i.height/a.height)*i.width+d);a.data[l++]=i.data[d++],a.data[l++]=i.data[d++],a.data[l++]=i.data[d++],a.data[l++]=i.data[+d]}o.frames[n].image=s}r.getContext("2d").drawImage(this.canvas,0,0,this.canvas.width,this.canvas.height,0,0,r.width,r.height),this.canvas.width=this.width=e,this.canvas.height=this.height=t,this.drawingContext.drawImage(r,0,0,e,t,0,0,e,t),0<this.pixels.length&&this.loadPixels(),this.setModified(!0)}},{key:"copy",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];s.default.prototype.copy.apply(this,t)}},{key:"mask",value:function(e){var t=this.drawingContext.globalCompositeOperation,r=1,o=[e=void 0===e?this:e,0,0,(r=e instanceof s.default.Renderer?e._pInst._pixelDensity:r)*e.width,r*e.height,0,0,this.width,this.height];if(this.drawingContext.globalCompositeOperation="destination-in",this.gifProperties){for(var n=0;n<this.gifProperties.frames.length;n++)this.drawingContext.putImageData(this.gifProperties.frames[n].image,0,0),this.copy.apply(this,o),this.gifProperties.frames[n].image=this.drawingContext.getImageData(0,0,this.width,this.height);this.drawingContext.putImageData(this.gifProperties.frames[this.gifProperties.displayIndex].image,0,0)}else this.copy.apply(this,o);this.drawingContext.globalCompositeOperation=t,this.setModified(!0)}},{key:"filter",value:function(e,t){n.default.apply(this.canvas,n.default[e],t),this.setModified(!0)}},{key:"blend",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];s.default._validateParameters("p5.Image.blend",arguments),s.default.prototype.blend.apply(this,t),this.setModified(!0)}},{key:"setModified",value:function(e){this._modified=e}},{key:"isModified",value:function(){return this._modified}},{key:"save",value:function(e,t){this.gifProperties?s.default.prototype.encodeAndDownloadGif(this,e):s.default.prototype.saveCanvas(this.canvas,e,t)}},{key:"reset",value:function(){var e;this.gifProperties&&((e=this.gifProperties).playing=!0,e.timeSinceStart=0,e.timeDisplayed=0,e.lastChangeTime=0,e.loopCount=0,e.displayIndex=0,this.drawingContext.putImageData(e.frames[0].image,0,0))}},{key:"getCurrentFrame",value:function(){var e;if(this.gifProperties)return(e=this.gifProperties).displayIndex%e.numFrames}},{key:"setFrame",value:function(e){var t;this.gifProperties&&(e<(t=this.gifProperties).numFrames&&0<=e?(t.timeDisplayed=0,t.lastChangeTime=0,t.displayIndex=e,this.drawingContext.putImageData(t.frames[e].image,0,0)):console.log("Cannot set GIF to a frame number that is higher than total number of frames or below zero."))}},{key:"numFrames",value:function(){if(this.gifProperties)return this.gifProperties.numFrames}},{key:"play",value:function(){this.gifProperties&&(this.gifProperties.playing=!0)}},{key:"pause",value:function(){this.gifProperties&&(this.gifProperties.playing=!1)}},{key:"delay",value:function(e,t){if(this.gifProperties){var r=this.gifProperties;if(t<r.numFrames&&0<=t)r.frames[t].delay=e;else{var o=!0,t=!1,n=void 0;try{for(var s,i=r.frames[Symbol.iterator]();!(o=(s=i.next()).done);o=!0)s.value.delay=e}catch(e){t=!0,n=e}finally{try{o||null==i.return||i.return()}finally{if(t)throw n}}}}}}])&&i(e.prototype,t),o&&i(e,o),r}();e=s.default.Image;r.default=e},{"../core/main":275,"./filters":296,"core-js/modules/es.array.iterator":161,"core-js/modules/es.object.to-string":182,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/web.dom-collections.iterator":238}],300:[function(e,t,r){"use strict";e("core-js/modules/es.array.filter"),e("core-js/modules/es.array.filter"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var f=o(e("../core/main")),a=o(e("./filters"));function o(e){return e&&e.__esModule?e:{default:e}}e("../color/p5.Color"),f.default.prototype.pixels=[],f.default.prototype.blend=function(){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];f.default._validateParameters("blend",r),this._renderer?(e=this._renderer).blend.apply(e,r):f.default.Renderer2D.prototype.blend.apply(this,r)},f.default.prototype.copy=function(){for(var e,t,r,o,n,s,i,a,l,u=arguments.length,c=new Array(u),d=0;d<u;d++)c[d]=arguments[d];if(f.default._validateParameters("copy",c),9===c.length)e=c[0],t=c[1],r=c[2],o=c[3],n=c[4],s=c[5],i=c[6],a=c[7],l=c[8];else{if(8!==c.length)throw new Error("Signature not supported");e=this,t=c[0],r=c[1],o=c[2],n=c[3],s=c[4],i=c[5],a=c[6],l=c[7]}f.default.prototype._copyHelper(this,e,t,r,o,n,s,i,a,l)},f.default.prototype._copyHelper=function(e,t,r,o,n,s,i,a,l,u){var c=t.canvas.width/t.width,d=0,h=0;t._renderer&&t._renderer.isP3D&&(d=t.width/2,h=t.height/2),e._renderer&&e._renderer.isP3D?f.default.RendererGL.prototype.image.call(e._renderer,t,r+d,o+h,n,s,i,a,l,u):e.drawingContext.drawImage(t.canvas,c*(r+d),c*(o+h),c*n,c*s,i,a,l,u)},f.default.prototype.getFilterGraphicsLayer=function(){return this._renderer.getFilterGraphicsLayer()},f.default.prototype.filter=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];f.default._validateParameters("filter",arguments);var o=function(){var e,t={shader:void 0,operation:void 0,value:void 0,useWebGL:!0};return(arguments.length<=0?void 0:arguments[0])instanceof f.default.Shader?t.shader=arguments.length<=0?void 0:arguments[0]:(t.operation=arguments.length<=0?void 0:arguments[0],1<arguments.length&&"number"==typeof(arguments.length<=1?void 0:arguments[1])&&(t.value=arguments.length<=1?void 0:arguments[1]),!1===((e=arguments.length-1)<0||arguments.length<=e?void 0:arguments[e])&&(t.useWebGL=!1)),t}.apply(void 0,t),n=o.shader,s=o.operation,i=o.value,o=o.useWebGL;this._renderer.isP3D&&n?f.default.RendererGL.prototype.filter.call(this._renderer,n):o||this._renderer.isP3D?(!o&&this._renderer.isP3D&&console.warn("filter() with useWebGL=false is not supported in WEBGL"),this._renderer.isP3D?f.default.RendererGL.prototype.filter.call(this._renderer,s,i):((n=this.getFilterGraphicsLayer()).copy(this._renderer,0,0,this.width,this.height,-this.width/2,-this.height/2,this.width,this.height),this._renderer.clear(),this._renderer.resetMatrix(),n.filter.apply(n,t),this._renderer._pInst.image(n,0,0),n.clear())):void 0!==this.canvas?a.default.apply(this.canvas,a.default[s],i):a.default.apply(this.elt,a.default[s],i)},f.default.prototype.get=function(e,t,r,o){var n;return f.default._validateParameters("get",arguments),(n=this._renderer).get.apply(n,arguments)},f.default.prototype.loadPixels=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];f.default._validateParameters("loadPixels",t),this._renderer.loadPixels()},f.default.prototype.set=function(e,t,r){this._renderer.set(e,t,r)},f.default.prototype.updatePixels=function(e,t,r,o){f.default._validateParameters("updatePixels",arguments),0!==this.pixels.length&&this._renderer.updatePixels(e,t,r,o)};e=f.default;r.default=e},{"../color/p5.Color":262,"../core/main":275,"./filters":296,"core-js/modules/es.array.filter":155}],301:[function(e,t,r){"use strict";function o(e){return(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})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.last-index-of"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.array.splice"),e("core-js/modules/es.function.name"),e("core-js/modules/es.object.from-entries"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.promise"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.replace"),e("core-js/modules/es.string.split"),e("core-js/modules/es.typed-array.uint8-array"),e("core-js/modules/es.typed-array.copy-within"),e("core-js/modules/es.typed-array.every"),e("core-js/modules/es.typed-array.fill"),e("core-js/modules/es.typed-array.filter"),e("core-js/modules/es.typed-array.find"),e("core-js/modules/es.typed-array.find-index"),e("core-js/modules/es.typed-array.for-each"),e("core-js/modules/es.typed-array.includes"),e("core-js/modules/es.typed-array.index-of"),e("core-js/modules/es.typed-array.iterator"),e("core-js/modules/es.typed-array.join"),e("core-js/modules/es.typed-array.last-index-of"),e("core-js/modules/es.typed-array.map"),e("core-js/modules/es.typed-array.reduce"),e("core-js/modules/es.typed-array.reduce-right"),e("core-js/modules/es.typed-array.reverse"),e("core-js/modules/es.typed-array.set"),e("core-js/modules/es.typed-array.slice"),e("core-js/modules/es.typed-array.some"),e("core-js/modules/es.typed-array.sort"),e("core-js/modules/es.typed-array.subarray"),e("core-js/modules/es.typed-array.to-locale-string"),e("core-js/modules/es.typed-array.to-string"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/web.url"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.last-index-of"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.array.splice"),e("core-js/modules/es.function.name"),e("core-js/modules/es.object.from-entries"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.promise"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.replace"),e("core-js/modules/es.string.split"),e("core-js/modules/es.typed-array.uint8-array"),e("core-js/modules/es.typed-array.copy-within"),e("core-js/modules/es.typed-array.every"),e("core-js/modules/es.typed-array.fill"),e("core-js/modules/es.typed-array.filter"),e("core-js/modules/es.typed-array.find"),e("core-js/modules/es.typed-array.find-index"),e("core-js/modules/es.typed-array.for-each"),e("core-js/modules/es.typed-array.includes"),e("core-js/modules/es.typed-array.index-of"),e("core-js/modules/es.typed-array.iterator"),e("core-js/modules/es.typed-array.join"),e("core-js/modules/es.typed-array.last-index-of"),e("core-js/modules/es.typed-array.map"),e("core-js/modules/es.typed-array.reduce"),e("core-js/modules/es.typed-array.reduce-right"),e("core-js/modules/es.typed-array.reverse"),e("core-js/modules/es.typed-array.set"),e("core-js/modules/es.typed-array.slice"),e("core-js/modules/es.typed-array.some"),e("core-js/modules/es.typed-array.sort"),e("core-js/modules/es.typed-array.subarray"),e("core-js/modules/es.typed-array.to-locale-string"),e("core-js/modules/es.typed-array.to-string"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/web.url"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var v=s(e("../core/main")),m=(e("whatwg-fetch"),e("es6-promise/auto"),s(e("fetch-jsonp"))),n=s(e("file-saver"));function s(e){return e&&e.__esModule?e:{default:e}}function y(e){return(y="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}function g(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function i(e,t){t&&!0!==t&&"true"!==t||(t="");var r="";return(e=e||"untitled")&&e.includes(".")&&(r=e.split(".").pop()),t&&r!==t&&(r=t,e="".concat(e,".").concat(r)),[e,r]}e("../core/friendly_errors/validate_params"),e("../core/friendly_errors/file_errors"),e("../core/friendly_errors/fes_core"),v.default.prototype.loadJSON=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];v.default._validateParameters("loadJSON",t);for(var o,n,s,i=t[0],a={},l="json",u=1;u<t.length;u++){var c=t[u];"string"==typeof c?"jsonp"!==c&&"json"!==c||(l=c):"function"==typeof c?o?n=c:o=c:"object"===y(c)&&(c.hasOwnProperty("jsonpCallback")||c.hasOwnProperty("jsonpCallbackFunction"))&&(l="jsonp",s=c)}var d=this;return this.httpDo(i,"GET",s,l,function(e){for(var t in e)a[t]=e[t];void 0!==o&&o(e),d._decrementPreload()},function(e){if(v.default._friendlyFileLoadError(5,i),!n)throw e;n(e)}),a},v.default.prototype.loadStrings=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];v.default._validateParameters("loadStrings",t);for(var n,o,s=[],i=1;i<t.length;i++){var a=t[i];"function"==typeof a&&(void 0===n?n=a:void 0===o&&(o=a))}var l=this;return v.default.prototype.httpDo.call(this,t[0],"GET","text",function(e){for(var t=e.replace(/\r\n/g,"\r").replace(/\n/g,"\r").split(/\r/),r=0,o=t.length;r<o;r+=32768)Array.prototype.push.apply(s,t.slice(r,Math.min(r+32768,o)));void 0!==n&&n(s),l._decrementPreload()},function(e){if(v.default._friendlyFileLoadError(3,e),!o)throw e;o(e)}),s},v.default.prototype.loadTable=function(t){var f,r,p,e=[],m=!1,o=t.substring(t.lastIndexOf(".")+1,t.length);"csv"===o?p=",":"ssv"===o?p=";":"tsv"===o&&(p="\t");for(var n=1;n<arguments.length;n++)"function"==typeof arguments[n]?void 0===f?f=arguments[n]:void 0===r&&(r=arguments[n]):"string"==typeof arguments[n]&&(e.push(arguments[n]),"header"===arguments[n]&&(m=!0),"csv"===arguments[n]?p=",":"ssv"===arguments[n]?p=";":"tsv"===arguments[n]&&(p="\t"));var y=new v.default.Table,g=this;return this.httpDo(t,"GET","table",function(e){for(var t,r,o={},n=0,s=[],i=0,a=null,l=function(){o.currentState=n,o.token=""},u=function(){a.push(o.token),l()},c=function(){o.currentState=4,s.push(a),a=null};;){if(null==(t=e[i++])){if(o.escaped)throw new Error("Unclosed quote in file.");if(a){u(),c();break}}if(null===a&&(o.escaped=!1,a=[],l()),o.currentState===n){if('"'===t){o.escaped=!0,o.currentState=1;continue}o.currentState=1}if(1===o.currentState&&o.escaped)if('"'===t)'"'===e[i]?(o.token+='"',i++):(o.escaped=!1,o.currentState=2);else{if("\r"===t)continue;o.token+=t}else"\r"===t?("\n"===e[i]&&i++,u(),c()):"\n"===t?(u(),c()):t===p?u():1===o.currentState&&(o.token+=t)}if(m)y.columns=s.shift();else for(var d=0;d<s[0].length;d++)y.columns[d]="null";for(var h=0;h<s.length;h++)(1!==s[h].length||"undefined"!==s[h][0]&&""!==s[h][0])&&((r=new v.default.TableRow).arr=s[h],r.obj=function(r,e){if(void 0===(e=e||[]))for(var t=0;t<r.length;t++)e[t.toString()]=t;return Object.fromEntries(e.map(function(e,t){return[e,r[t]]}))}(s[h],y.columns),y.addRow(r));"function"==typeof f&&f(y),g._decrementPreload()},function(e){v.default._friendlyFileLoadError(2,t),r?r(e):console.error(e)}),y},v.default.prototype.loadXML=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var o,n,s=new v.default.XML,i=1;i<t.length;i++){var a=t[i];"function"==typeof a&&(void 0===o?o=a:void 0===n&&(n=a))}var l=this;return this.httpDo(t[0],"GET","xml",function(e){for(var t in e)s[t]=e[t];void 0!==o&&o(s),l._decrementPreload()},function(e){if(v.default._friendlyFileLoadError(1,e),!n)throw e;n(e)}),s},v.default.prototype.loadBytes=function(t,r,o){var n={},s=this;return this.httpDo(t,"GET","arrayBuffer",function(e){n.bytes=new Uint8Array(e),"function"==typeof r&&r(n),s._decrementPreload()},function(e){if(v.default._friendlyFileLoadError(6,t),!o)throw e;o(e)}),n},v.default.prototype.httpGet=function(){v.default._validateParameters("httpGet",arguments);var e=Array.prototype.slice.call(arguments);return e.splice(1,0,"GET"),v.default.prototype.httpDo.apply(this,e)},v.default.prototype.httpPost=function(){v.default._validateParameters("httpPost",arguments);var e=Array.prototype.slice.call(arguments);return e.splice(1,0,"POST"),v.default.prototype.httpDo.apply(this,e)},v.default.prototype.httpDo=function(){for(var r,e,t,o={},n=0,s="text/plain",i=arguments.length-1;0<i&&"function"==typeof(i<0||arguments.length<=i?void 0:arguments[i]);i--)n++;var a=arguments.length-n,l=arguments.length<=0?void 0:arguments[0];if(2==a&&"string"==typeof l&&"object"===y(arguments.length<=1?void 0:arguments[1]))p=new Request(l,arguments.length<=1?void 0:arguments[1]),e=arguments.length<=2?void 0:arguments[2],t=arguments.length<=3?void 0:arguments[3];else{for(var u,c="GET",d=1;d<arguments.length;d++){var h=d<0||arguments.length<=d?void 0:arguments[d];if("string"==typeof h)"GET"===h||"POST"===h||"PUT"===h||"DELETE"===h?c=h:"json"===h||"jsonp"===h||"binary"===h||"arrayBuffer"===h||"xml"===h||"text"===h||"table"===h?r=h:u=h;else if("number"==typeof h)u=h.toString();else if("object"===y(h))if(h.hasOwnProperty("jsonpCallback")||h.hasOwnProperty("jsonpCallbackFunction"))for(var f in h)o[f]=h[f];else s=h instanceof v.default.XML?(u=h.serialize(),"application/xml"):(u=JSON.stringify(h),"application/json");else"function"==typeof h&&(e?t=h:e=h)}var a="GET"===c?new Headers:new Headers({"Content-Type":s}),p=new Request(l,{method:c,mode:"cors",body:u,headers:a})}return(a=(a="jsonp"===(r=r||(l.includes("json")?"json":l.includes("xml")?"xml":"text"))?(0,m.default)(l,o):fetch(p)).then(function(e){if(!e.ok)throw(t=new Error(e.body)).status=e.status,t.ok=!1,t;var t=0;switch((t="jsonp"!==r?e.headers.get("content-length"):t)&&64e6<t&&v.default._friendlyFileLoadError(7,l),r){case"json":case"jsonp":return e.json();case"binary":return e.blob();case"arrayBuffer":return e.arrayBuffer();case"xml":return e.text().then(function(e){e=(new DOMParser).parseFromString(e,"text/xml");return new v.default.XML(e.documentElement)});default:return e.text()}})).then(e||function(){}),a.catch(t||console.error),a},window.URL=window.URL||window.webkitURL,v.default.prototype._pWriters=[],v.default.prototype.createWriter=function(e,t){var r,o;for(o in v.default.prototype._pWriters)if(v.default.prototype._pWriters[o].name===e)return r=new v.default.PrintWriter(e+this.millis(),t),v.default.prototype._pWriters.push(r),r;return r=new v.default.PrintWriter(e,t),v.default.prototype._pWriters.push(r),r},v.default.PrintWriter=function(r,o){var n=this;this.name=r,this.content="",this.write=function(e){this.content+=e},this.print=function(e){this.content+="".concat(e,"\n")},this.clear=function(){this.content=""},this.close=function(){var e,t=[];for(e in t.push(this.content),v.default.prototype.writeFile(t,r,o),v.default.prototype._pWriters)v.default.prototype._pWriters[e].name===this.name&&v.default.prototype._pWriters.splice(e,1);n.clear(),n={}}},v.default.prototype.save=function(e,t,r){var o=arguments,n=(this._curElement||this).elt;if(0===o.length)v.default.prototype.saveCanvas(n);else if(o[0]instanceof v.default.Renderer||o[0]instanceof v.default.Graphics)v.default.prototype.saveCanvas(o[0].elt,o[1],o[2]);else if(1===o.length&&"string"==typeof o[0])v.default.prototype.saveCanvas(n,o[0]);else switch(i(o[1],o[2])[1]){case"json":return void v.default.prototype.saveJSON(o[0],o[1],o[2]);case"txt":return void v.default.prototype.saveStrings(o[0],o[1],o[2]);default:o[0]instanceof Array?v.default.prototype.saveStrings(o[0],o[1],o[2]):o[0]instanceof v.default.Table?v.default.prototype.saveTable(o[0],o[1],o[2]):o[0]instanceof v.default.Image?v.default.prototype.saveCanvas(o[0].canvas,o[1]):o[0]instanceof v.default.SoundFile&&v.default.prototype.saveSound(o[0],o[1],o[2],o[3])}},v.default.prototype.saveJSON=function(e,t,r){v.default._validateParameters("saveJSON",arguments),r=r?JSON.stringify(e):JSON.stringify(e,void 0,2),this.saveStrings(r.split("\n"),t,"json")},v.default.prototype.saveJSONObject=v.default.prototype.saveJSON,v.default.prototype.saveJSONArray=v.default.prototype.saveJSON,v.default.prototype.saveStrings=function(e,t,r,o){v.default._validateParameters("saveStrings",arguments);for(var n=this.createWriter(t,r||"txt"),s=0;s<e.length;s++)o?n.write(e[s]+"\r\n"):n.write(e[s]+"\n");n.close(),n.clear()},v.default.prototype.saveTable=function(e,t,r){v.default._validateParameters("saveTable",arguments),o=void 0===r?t.substring(t.lastIndexOf(".")+1,t.length):r;var o,n=this.createWriter(t,o),s=e.columns,i="tsv"===o?"\t":",";if("html"!==o){if("0"!==s[0]){for(var a=0;a<s.length;a++)a<s.length-1?n.write(s[a]+i):n.write(s[a]);n.write("\n")}for(var l=0;l<e.rows.length;l++){for(var u=void 0,u=0;u<e.rows[l].arr.length;u++)u<e.rows[l].arr.length-1?"csv"===o&&String(e.rows[l].arr[u]).includes(",")?n.write('"'+e.rows[l].arr[u]+'"'+i):n.write(e.rows[l].arr[u]+i):"csv"===o&&String(e.rows[l].arr[u]).includes(",")?n.write('"'+e.rows[l].arr[u]+'"'):n.write(e.rows[l].arr[u]);n.write("\n")}}else{n.print("<html>"),n.print("<head>");if(n.print(' <meta http-equiv="content-type" content="text/html;charset=utf-8" />'),n.print("</head>"),n.print("<body>"),n.print(" <table>"),"0"!==s[0]){n.print(" <tr>");for(var c=0;c<s.length;c++){var d=g(s[c]);n.print(" <td>".concat(d)),n.print(" </td>")}n.print(" </tr>")}for(var h=0;h<e.rows.length;h++){n.print(" <tr>");for(var f=0;f<e.columns.length;f++){var p=g(e.rows[h].getString(f));n.print(" <td>".concat(p)),n.print(" </td>")}n.print(" </tr>")}n.print(" </table>"),n.print("</body>"),n.print("</html>")}n.close(),n.clear()},v.default.prototype.writeFile=function(e,t,r){var o="application/octet-stream",e=(v.default.prototype._isSafari()&&(o="text/plain"),new Blob(e,{type:o}));v.default.prototype.downloadFile(e,t,r)},v.default.prototype.downloadFile=function(e,t,r){var o,t=i(t,r),r=t[0];e instanceof Blob?n.default.saveAs(e,r):((o=document.createElement("a")).href=e,o.download=r,o.onclick=function(e){document.body.removeChild(e.target),e.stopPropagation()},o.style.display="none",document.body.appendChild(o),v.default.prototype._isSafari()&&(e=(e='Hello, Safari user! To download this file...\n1. Go to File --\x3e Save As.\n2. Choose "Page Source" as the Format.\n')+'3. Name it with this extension: ."'.concat(t[1],'"'),alert(e)),o.click())},v.default.prototype._checkFileExtension=i,v.default.prototype._isSafari=function(){return 0<Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")};e=v.default;r.default=e},{"../core/friendly_errors/fes_core":266,"../core/friendly_errors/file_errors":267,"../core/friendly_errors/validate_params":270,"../core/main":275,"core-js/modules/es.array.concat":151,"core-js/modules/es.array.includes":159,"core-js/modules/es.array.index-of":160,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.last-index-of":163,"core-js/modules/es.array.map":164,"core-js/modules/es.array.slice":165,"core-js/modules/es.array.splice":167,"core-js/modules/es.function.name":168,"core-js/modules/es.object.from-entries":177,"core-js/modules/es.object.to-string":182,"core-js/modules/es.promise":183,"core-js/modules/es.regexp.exec":187,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.includes":191,"core-js/modules/es.string.iterator":192,"core-js/modules/es.string.replace":196,"core-js/modules/es.string.split":198,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.typed-array.copy-within":205,"core-js/modules/es.typed-array.every":206,"core-js/modules/es.typed-array.fill":207,"core-js/modules/es.typed-array.filter":208,"core-js/modules/es.typed-array.find":210,"core-js/modules/es.typed-array.find-index":209,"core-js/modules/es.typed-array.for-each":213,"core-js/modules/es.typed-array.includes":214,"core-js/modules/es.typed-array.index-of":215,"core-js/modules/es.typed-array.iterator":218,"core-js/modules/es.typed-array.join":219,"core-js/modules/es.typed-array.last-index-of":220,"core-js/modules/es.typed-array.map":221,"core-js/modules/es.typed-array.reduce":223,"core-js/modules/es.typed-array.reduce-right":222,"core-js/modules/es.typed-array.reverse":224,"core-js/modules/es.typed-array.set":225,"core-js/modules/es.typed-array.slice":226,"core-js/modules/es.typed-array.some":227,"core-js/modules/es.typed-array.sort":228,"core-js/modules/es.typed-array.subarray":229,"core-js/modules/es.typed-array.to-locale-string":230,"core-js/modules/es.typed-array.to-string":231,"core-js/modules/es.typed-array.uint8-array":234,"core-js/modules/web.dom-collections.iterator":238,"core-js/modules/web.url":240,"es6-promise/auto":241,"fetch-jsonp":243,"file-saver":244,"whatwg-fetch":253}],302:[function(e,t,r){"use strict";e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.splice"),e("core-js/modules/es.regexp.constructor"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.match"),e("core-js/modules/es.string.replace"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.splice"),e("core-js/modules/es.regexp.constructor"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.match"),e("core-js/modules/es.string.replace"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=(e=e("../core/main"))&&e.__esModule?e:{default:e};function s(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}n.default.Table=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.columns=[],this.rows=[]}var e,r,o;return e=t,(r=[{key:"addRow",value:function(e){e=e||new n.default.TableRow;if(void 0===e.arr||void 0===e.obj)throw new Error("invalid TableRow: ".concat(e));return(e.table=this).rows.push(e),e}},{key:"removeRow",value:function(e){this.rows[e].table=null;e=this.rows.splice(e+1,this.rows.length);this.rows.pop(),this.rows=this.rows.concat(e)}},{key:"getRow",value:function(e){return this.rows[e]}},{key:"getRows",value:function(){return this.rows}},{key:"findRow",value:function(e,t){if("string"==typeof t){for(var r=0;r<this.rows.length;r++)if(this.rows[r].obj[t]===e)return this.rows[r]}else for(var o=0;o<this.rows.length;o++)if(this.rows[o].arr[t]===e)return this.rows[o];return null}},{key:"findRows",value:function(e,t){var r=[];if("string"==typeof t)for(var o=0;o<this.rows.length;o++)this.rows[o].obj[t]===e&&r.push(this.rows[o]);else for(var n=0;n<this.rows.length;n++)this.rows[n].arr[t]===e&&r.push(this.rows[n]);return r}},{key:"matchRow",value:function(e,t){if("number"==typeof t){for(var r=0;r<this.rows.length;r++)if(this.rows[r].arr[t].match(e))return this.rows[r]}else for(var o=0;o<this.rows.length;o++)if(this.rows[o].obj[t].match(e))return this.rows[o];return null}},{key:"matchRows",value:function(e,t){var r=[];if("number"==typeof t)for(var o=0;o<this.rows.length;o++)this.rows[o].arr[t].match(e)&&r.push(this.rows[o]);else for(var n=0;n<this.rows.length;n++)this.rows[n].obj[t].match(e)&&r.push(this.rows[n]);return r}},{key:"getColumn",value:function(e){var t=[];if("string"==typeof e)for(var r=0;r<this.rows.length;r++)t.push(this.rows[r].obj[e]);else for(var o=0;o<this.rows.length;o++)t.push(this.rows[o].arr[e]);return t}},{key:"clearRows",value:function(){delete this.rows,this.rows=[]}},{key:"addColumn",value:function(e){this.columns.push(e||null)}},{key:"getColumnCount",value:function(){return this.columns.length}},{key:"getRowCount",value:function(){return this.rows.length}},{key:"removeTokens",value:function(e,t){for(var r=[],o=0;o<e.length;o++)r.push(e.charAt(o).replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"));var n=new RegExp(r.join("|"),"g");if(void 0===t)for(var s=0;s<this.columns.length;s++)for(var i=0;i<this.rows.length;i++){var a=(a=this.rows[i].arr[s]).replace(n,"");this.rows[i].arr[s]=a,this.rows[i].obj[this.columns[s]]=a}else if("string"==typeof t)for(var l=0;l<this.rows.length;l++){var u=(u=this.rows[l].obj[t]).replace(n,""),c=(this.rows[l].obj[t]=u,this.columns.indexOf(t));this.rows[l].arr[c]=u}else for(var d=0;d<this.rows.length;d++){var h=(h=this.rows[d].arr[t]).replace(n,"");this.rows[d].arr[t]=h,this.rows[d].obj[this.columns[t]]=h}}},{key:"trim",value:function(e){var t=new RegExp(" ","g");if(void 0===e)for(var r=0;r<this.columns.length;r++)for(var o=0;o<this.rows.length;o++){var n=(n=this.rows[o].arr[r]).replace(t,"");this.rows[o].arr[r]=n,this.rows[o].obj[this.columns[r]]=n}else if("string"==typeof e)for(var s=0;s<this.rows.length;s++){var i=(i=this.rows[s].obj[e]).replace(t,""),a=(this.rows[s].obj[e]=i,this.columns.indexOf(e));this.rows[s].arr[a]=i}else for(var l=0;l<this.rows.length;l++){var u=(u=this.rows[l].arr[e]).replace(t,"");this.rows[l].arr[e]=u,this.rows[l].obj[this.columns[e]]=u}}},{key:"removeColumn",value:function(e){"string"==typeof e?r=this.columns.indexOf(t=e):t=this.columns[r=e];var t,r,e=this.columns.splice(r+1,this.columns.length);this.columns.pop(),this.columns=this.columns.concat(e);for(var o=0;o<this.rows.length;o++){var n=this.rows[o].arr,s=n.splice(r+1,n.length);n.pop(),this.rows[o].arr=n.concat(s),delete this.rows[o].obj[t]}}},{key:"set",value:function(e,t,r){this.rows[e].set(t,r)}},{key:"setNum",value:function(e,t,r){this.rows[e].setNum(t,r)}},{key:"setString",value:function(e,t,r){this.rows[e].setString(t,r)}},{key:"get",value:function(e,t){return this.rows[e].get(t)}},{key:"getNum",value:function(e,t){return this.rows[e].getNum(t)}},{key:"getString",value:function(e,t){return this.rows[e].getString(t)}},{key:"getObject",value:function(e){for(var t,r={},o=0;o<this.rows.length;o++)if(t=this.rows[o].obj,"string"==typeof e){if(!(0<=this.columns.indexOf(e)))throw new Error('This table has no column named "'.concat(e,'"'));r[t[e]]=t}else r[o]=this.rows[o].obj;return r}},{key:"getArray",value:function(){for(var e=[],t=0;t<this.rows.length;t++)e.push(this.rows[t].arr);return e}}])&&s(e.prototype,r),o&&s(e,o),t}();e=n.default;r.default=e},{"../core/main":275,"core-js/modules/es.array.concat":151,"core-js/modules/es.array.index-of":160,"core-js/modules/es.array.join":162,"core-js/modules/es.array.splice":167,"core-js/modules/es.regexp.constructor":186,"core-js/modules/es.regexp.exec":187,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.match":193,"core-js/modules/es.string.replace":196}],303:[function(e,t,r){"use strict";e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.from-entries"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.split"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.from-entries"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.split"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;e=(e=e("../core/main"))&&e.__esModule?e:{default:e};function n(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}e.default.TableRow=function(){function o(e,t){if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");var r=[];e&&(r=e.split(t=t||",")),this.arr=r,this.obj=Object.fromEntries(r.entries()),this.table=null}var e,t,r;return e=o,(t=[{key:"set",value:function(e,t){if("string"==typeof e){var r=this.table.columns.indexOf(e);if(!(0<=r))throw new Error('This table has no column named "'.concat(e,'"'));this.obj[e]=t,this.arr[r]=t}else{if(!(e<this.table.columns.length))throw new Error("Column #".concat(e," is out of the range of this table"));this.arr[e]=t;r=this.table.columns[e];this.obj[r]=t}}},{key:"setNum",value:function(e,t){t=parseFloat(t);this.set(e,t)}},{key:"setString",value:function(e,t){t=t.toString();this.set(e,t)}},{key:"get",value:function(e){return("string"==typeof e?this.obj:this.arr)[e]}},{key:"getNum",value:function(e){var t="string"==typeof e?parseFloat(this.obj[e]):parseFloat(this.arr[e]);if("NaN"===t.toString())throw"Error: ".concat(this.obj[e]," is NaN (Not a Number)");return t}},{key:"getString",value:function(e){return("string"==typeof e?this.obj:this.arr)[e].toString()}}])&&n(e.prototype,t),r&&n(e,r),o}();e=e.default;r.default=e},{"../core/main":275,"core-js/modules/es.array.index-of":160,"core-js/modules/es.array.iterator":161,"core-js/modules/es.object.from-entries":177,"core-js/modules/es.object.to-string":182,"core-js/modules/es.regexp.exec":187,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.split":198,"core-js/modules/web.dom-collections.iterator":238}],304:[function(e,t,r){"use strict";e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.number.constructor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.replace"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.number.constructor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.replace"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=(e=e("../core/main"))&&e.__esModule?e:{default:e};function n(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function s(e){for(var t=[],r=0;r<e.length;r++)t.push(new a.default.XML(e[r]));return t}a.default.XML=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");e?this.DOM=e:(e=document.implementation.createDocument(null,"doc"),this.DOM=e.createElement("root"))}var e,r,o;return e=t,(r=[{key:"getParent",value:function(){return new a.default.XML(this.DOM.parentElement)}},{key:"getName",value:function(){return this.DOM.tagName}},{key:"setName",value:function(e){var t=this.DOM.innerHTML,r=this.DOM.attributes,o=document.implementation.createDocument(null,"default").createElement(e);o.innerHTML=t;for(var n=0;n<r.length;n++)o.setAttribute(r[n].nodeName,r.nodeValue);this.DOM=o}},{key:"hasChildren",value:function(){return 0<this.DOM.children.length}},{key:"listChildren",value:function(){for(var e=[],t=0;t<this.DOM.childNodes.length;t++)e.push(this.DOM.childNodes[t].nodeName);return e}},{key:"getChildren",value:function(e){return s(e?this.DOM.getElementsByTagName(e):this.DOM.children)}},{key:"getChild",value:function(e){if("string"!=typeof e)return new a.default.XML(this.DOM.children[e]);var t=!0,r=!1,o=void 0;try{for(var n,s=this.DOM.children[Symbol.iterator]();!(t=(n=s.next()).done);t=!0){var i=n.value;if(i.tagName===e)return new a.default.XML(i)}}catch(e){r=!0,o=e}finally{try{t||null==s.return||s.return()}finally{if(r)throw o}}}},{key:"addChild",value:function(e){e instanceof a.default.XML&&this.DOM.appendChild(e.DOM)}},{key:"removeChild",value:function(e){var t=-1;if("string"==typeof e){for(var r=0;r<this.DOM.children.length;r++)if(this.DOM.children[r].tagName===e){t=r;break}}else t=e;-1!==t&&this.DOM.removeChild(this.DOM.children[t])}},{key:"getAttributeCount",value:function(){return this.DOM.attributes.length}},{key:"listAttributes",value:function(){var e=[],t=!0,r=!1,o=void 0;try{for(var n,s=this.DOM.attributes[Symbol.iterator]();!(t=(n=s.next()).done);t=!0){var i=n.value;e.push(i.nodeName)}}catch(e){r=!0,o=e}finally{try{t||null==s.return||s.return()}finally{if(r)throw o}}return e}},{key:"hasAttribute",value:function(e){var t={},r=!0,o=!1,n=void 0;try{for(var s,i=this.DOM.attributes[Symbol.iterator]();!(r=(s=i.next()).done);r=!0){var a=s.value;t[a.nodeName]=a.nodeValue}}catch(e){o=!0,n=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw n}}return!!t[e]}},{key:"getNum",value:function(e,t){var r={},o=!0,n=!1,s=void 0;try{for(var i,a=this.DOM.attributes[Symbol.iterator]();!(o=(i=a.next()).done);o=!0){var l=i.value;r[l.nodeName]=l.nodeValue}}catch(e){n=!0,s=e}finally{try{o||null==a.return||a.return()}finally{if(n)throw s}}return Number(r[e])||t||0}},{key:"getString",value:function(e,t){var r={},o=!0,n=!1,s=void 0;try{for(var i,a=this.DOM.attributes[Symbol.iterator]();!(o=(i=a.next()).done);o=!0){var l=i.value;r[l.nodeName]=l.nodeValue}}catch(e){n=!0,s=e}finally{try{o||null==a.return||a.return()}finally{if(n)throw s}}return r[e]?String(r[e]):t||null}},{key:"setAttribute",value:function(e,t){this.DOM.setAttribute(e,t)}},{key:"getContent",value:function(e){var t=this.DOM.textContent;return(t=t.replace(/\s\s+/g,","))||e||null}},{key:"setContent",value:function(e){this.DOM.children.length||(this.DOM.textContent=e)}},{key:"serialize",value:function(){return(new XMLSerializer).serializeToString(this.DOM)}}])&&n(e.prototype,r),o&&n(e,o),t}();e=a.default;r.default=e},{"../core/main":275,"core-js/modules/es.array.iterator":161,"core-js/modules/es.number.constructor":173,"core-js/modules/es.object.to-string":182,"core-js/modules/es.regexp.exec":187,"core-js/modules/es.string.iterator":192,"core-js/modules/es.string.replace":196,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/web.dom-collections.iterator":238}],305:[function(e,t,r){"use strict";e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.math.hypot"),e("core-js/modules/es.number.constructor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.iterator"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.math.hypot"),e("core-js/modules/es.number.constructor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.iterator"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=(e=e("../core/main"))&&e.__esModule?e:{default:e};i.default.prototype.abs=Math.abs,i.default.prototype.ceil=Math.ceil,i.default.prototype.constrain=function(e,t,r){return i.default._validateParameters("constrain",arguments),Math.max(Math.min(e,r),t)},i.default.prototype.dist=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return i.default._validateParameters("dist",t),4===t.length?Math.hypot(t[2]-t[0],t[3]-t[1]):6===t.length?Math.hypot(t[3]-t[0],t[4]-t[1],t[5]-t[2]):void 0},i.default.prototype.exp=Math.exp,i.default.prototype.floor=Math.floor,i.default.prototype.lerp=function(e,t,r){return i.default._validateParameters("lerp",arguments),r*(t-e)+e},i.default.prototype.log=Math.log,i.default.prototype.mag=function(e,t){return i.default._validateParameters("mag",arguments),Math.hypot(e,t)},i.default.prototype.map=function(e,t,r,o,n,s){i.default._validateParameters("map",arguments);e=(e-t)/(r-t)*(n-o)+o;return s?o<n?this.constrain(e,o,n):this.constrain(e,n,o):e},i.default.prototype.max=function(){for(var e=function(e){var t=-1/0,r=!0,o=!1,n=void 0;try{for(var s,i=e[Symbol.iterator]();!(r=(s=i.next()).done);r=!0)var a=s.value,t=t<a?a:t}catch(e){o=!0,n=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw n}}return t},t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return r[0]instanceof Array?e(r[0]):e(r)},i.default.prototype.min=function(){for(var e=function(e){var t=1/0,r=!0,o=!1,n=void 0;try{for(var s,i=e[Symbol.iterator]();!(r=(s=i.next()).done);r=!0)var a=s.value,t=a<t?a:t}catch(e){o=!0,n=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw n}}return t},t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return r[0]instanceof Array?e(r[0]):e(r)},i.default.prototype.norm=function(e,t,r){return i.default._validateParameters("norm",arguments),this.map(e,t,r,0,1)},i.default.prototype.pow=Math.pow,i.default.prototype.round=function(e,t){return t?(t=Math.pow(10,t),Math.round(e*t)/t):Math.round(e)},i.default.prototype.sq=function(e){return e*e},i.default.prototype.sqrt=Math.sqrt,i.default.prototype.fract=function(e){i.default._validateParameters("fract",arguments);var t,r=0,e=Number(e);return isNaN(e)||Math.abs(e)===1/0?e:(e<0&&(e=-e,r=1),String(e).includes(".")&&!String(e).includes("e")?(t=String(e),t=Number("0"+t.slice(t.indexOf("."))),Math.abs(r-t)):e<1?Math.abs(r-e):0)};e=i.default;r.default=e},{"../core/main":275,"core-js/modules/es.array.includes":159,"core-js/modules/es.array.index-of":160,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.map":164,"core-js/modules/es.array.slice":165,"core-js/modules/es.math.hypot":170,"core-js/modules/es.number.constructor":173,"core-js/modules/es.object.to-string":182,"core-js/modules/es.string.includes":191,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/web.dom-collections.iterator":238}],306:[function(e,t,r){"use strict";e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.reflect.construct"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.slice"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=(e=e("../core/main"))&&e.__esModule?e:{default:e};function n(e,t,r){return(n=function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch(e){}}}()?Reflect.construct:function(e,t,r){var o=[null];o.push.apply(o,t);t=new(Function.bind.apply(e,o));return r&&s(t,r.prototype),t}).apply(null,arguments)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}o.default.prototype.createVector=function(e,t,r){return this instanceof o.default?n(o.default.Vector,[this._fromRadians.bind(this),this._toRadians.bind(this)].concat(Array.prototype.slice.call(arguments))):new o.default.Vector(e,t,r)};e=o.default;r.default=e},{"../core/main":275,"core-js/modules/es.array.concat":151,"core-js/modules/es.array.slice":165,"core-js/modules/es.object.to-string":182,"core-js/modules/es.reflect.construct":184,"core-js/modules/es.regexp.to-string":188}],307:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;e=(e=e("../core/main"))&&e.__esModule?e:{default:e};function b(e){return.5*(1-Math.cos(e*Math.PI))}var j,_=4095,x=4,w=.5,e=(e.default.prototype.noise=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;if(null==j){j=new Array(4096);for(var o=0;o<4096;o++)j[o]=Math.random()}e<0&&(e=-e),t<0&&(t=-t),r<0&&(r=-r);for(var n,s,i=Math.floor(e),a=Math.floor(t),l=Math.floor(r),u=e-i,c=t-a,d=r-l,h=0,f=.5,p=0;p<x;p++){var m=i+(a<<4)+(l<<8),y=b(u),g=b(c),v=j[m&_];v+=y*(j[m+1&_]-v),n=j[m+16&_],v+=g*((n+=y*(j[m+16+1&_]-n))-v),n=j[(m+=256)&_],n+=y*(j[m+1&_]-n),s=j[m+16&_],n+=g*((s+=y*(j[m+16+1&_]-s))-n),h+=(v+=b(d)*(n-v))*f,f*=w,i<<=1,a<<=1,l<<=1,1<=(u*=2)&&(i++,u--),1<=(c*=2)&&(a++,c--),1<=(d*=2)&&(l++,d--)}return h},e.default.prototype.noiseDetail=function(e,t){0<e&&(x=e),0<t&&(w=t)},e.default.prototype.noiseSeed=function(e){o=4294967296;var t,r,o,n={setSeed:function(e){r=t=(null==e?Math.random()*o:e)>>>0},getSeed:function(){return t},rand:function(){return(r=(1664525*r+1013904223)%o)/o}};n.setSeed(e),j=new Array(4096);for(var s=0;s<4096;s++)j[s]=n.rand()},e.default);r.default=e},{"../core/main":275}],308:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.every"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.array.some"),e("core-js/modules/es.math.sign"),e("core-js/modules/es.number.constructor"),e("core-js/modules/es.number.is-finite"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.sub"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.every"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.array.some"),e("core-js/modules/es.math.sign"),e("core-js/modules/es.number.constructor"),e("core-js/modules/es.number.is-finite"),e("core-js/modules/es.string.sub"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=(n=e("../core/main"))&&n.__esModule?n:{default:n},s=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("../core/constants"));function l(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,l=function(){return e},e)}function u(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function c(e,t){return 0!==e&&(this.x=this.x%e),0!==t&&(this.y=this.y%t),this}function d(e,t,r){return 0!==e&&(this.x=this.x%e),0!==t&&(this.y=this.y%t),0!==r&&(this.z=this.z%r),this}a.default.Vector=function(){function n(){var e=this,t=n;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");var r,o,e="function"==typeof(arguments.length<=0?void 0:arguments[0])?(this.isPInst=!0,this._fromRadians=arguments.length<=0?void 0:arguments[0],this._toRadians=arguments.length<=1?void 0:arguments[1],r=(arguments.length<=2?void 0:arguments[2])||0,o=(arguments.length<=3?void 0:arguments[3])||0,(arguments.length<=4?void 0:arguments[4])||0):(r=(arguments.length<=0?void 0:arguments[0])||0,o=(arguments.length<=1?void 0:arguments[1])||0,(arguments.length<=2?void 0:arguments[2])||0);this.x=r,this.y=o,this.z=e}var e,t,r;return e=n,r=[{key:"fromAngle",value:function(e,t){return new a.default.Vector((t=void 0===t?1:t)*Math.cos(e),t*Math.sin(e),0)}},{key:"fromAngles",value:function(e,t,r){void 0===r&&(r=1);var o=Math.cos(t),t=Math.sin(t),n=Math.cos(e),e=Math.sin(e);return new a.default.Vector(r*e*t,-r*n,r*e*o)}},{key:"random2D",value:function(){return this.fromAngle(Math.random()*s.TWO_PI)}},{key:"random3D",value:function(){var e=Math.random()*s.TWO_PI,t=2*Math.random()-1,r=Math.sqrt(1-t*t),o=r*Math.cos(e),r=r*Math.sin(e);return new a.default.Vector(o,r,t)}},{key:"copy",value:function(e){return e.copy(e)}},{key:"add",value:function(e,t,r){return r?r.set(e):(r=e.copy(),3===arguments.length&&a.default._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.add")),r.add(t),r}},{key:"rem",value:function(e,t){if(e instanceof a.default.Vector&&t instanceof a.default.Vector)return(e=e.copy()).rem(t),e}},{key:"sub",value:function(e,t,r){return r?r.set(e):(r=e.copy(),3===arguments.length&&a.default._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.sub")),r.sub(t),r}},{key:"mult",value:function(e,t,r){return r?r.set(e):(r=e.copy(),3===arguments.length&&a.default._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.mult")),r.mult(t),r}},{key:"rotate",value:function(e,t,r){return 2===arguments.length?r=e.copy():(r instanceof a.default.Vector||a.default._friendlyError("The target parameter should be of type p5.Vector","p5.Vector.rotate"),r.set(e)),r.rotate(t),r}},{key:"div",value:function(e,t,r){return r?r.set(e):(r=e.copy(),3===arguments.length&&a.default._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.div")),r.div(t),r}},{key:"dot",value:function(e,t){return e.dot(t)}},{key:"cross",value:function(e,t){return e.cross(t)}},{key:"dist",value:function(e,t){return e.dist(t)}},{key:"lerp",value:function(e,t,r,o){return o?o.set(e):(o=e.copy(),4===arguments.length&&a.default._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.lerp")),o.lerp(t,r),o}},{key:"slerp",value:function(e,t,r,o){return o?o.set(e):(o=e.copy(),4===arguments.length&&a.default._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.slerp")),o.slerp(t,r),o}},{key:"mag",value:function(e){return e.mag()}},{key:"magSq",value:function(e){return e.magSq()}},{key:"normalize",value:function(e,t){return arguments.length<2?t=e.copy():(t instanceof a.default.Vector||a.default._friendlyError("The target parameter should be of type p5.Vector","p5.Vector.normalize"),t.set(e)),t.normalize()}},{key:"limit",value:function(e,t,r){return arguments.length<3?r=e.copy():(r instanceof a.default.Vector||a.default._friendlyError("The target parameter should be of type p5.Vector","p5.Vector.limit"),r.set(e)),r.limit(t)}},{key:"setMag",value:function(e,t,r){return arguments.length<3?r=e.copy():(r instanceof a.default.Vector||a.default._friendlyError("The target parameter should be of type p5.Vector","p5.Vector.setMag"),r.set(e)),r.setMag(t)}},{key:"heading",value:function(e){return e.heading()}},{key:"angleBetween",value:function(e,t){return e.angleBetween(t)}},{key:"reflect",value:function(e,t,r){return arguments.length<3?r=e.copy():(r instanceof a.default.Vector||a.default._friendlyError("The target parameter should be of type p5.Vector","p5.Vector.reflect"),r.set(e)),r.reflect(t)}},{key:"array",value:function(e){return e.array()}},{key:"equals",value:function(e,t){var r;return e instanceof a.default.Vector?r=e:e instanceof Array?r=(new a.default.Vector).set(e):a.default._friendlyError("The v1 parameter should be of type Array or p5.Vector","p5.Vector.equals"),r.equals(t)}}],(t=[{key:"toString",value:function(){return"p5.Vector Object : [".concat(this.x,", ").concat(this.y,", ").concat(this.z,"]")}},{key:"set",value:function(e,t,r){return e instanceof a.default.Vector?(this.x=e.x||0,this.y=e.y||0,this.z=e.z||0):Array.isArray(e)?(this.x=e[0]||0,this.y=e[1]||0,this.z=e[2]||0):(this.x=e||0,this.y=t||0,this.z=r||0),this}},{key:"copy",value:function(){return this.isPInst?new a.default.Vector(this._fromRadians,this._toRadians,this.x,this.y,this.z):new a.default.Vector(this.x,this.y,this.z)}},{key:"add",value:function(e,t,r){return e instanceof a.default.Vector?(this.x+=e.x||0,this.y+=e.y||0,this.z+=e.z||0):Array.isArray(e)?(this.x+=e[0]||0,this.y+=e[1]||0,this.z+=e[2]||0):(this.x+=e||0,this.y+=t||0,this.z+=r||0),this}},{key:"rem",value:function(e,t,r){var o;if(e instanceof a.default.Vector){if([e.x,e.y,e.z].every(Number.isFinite))return n=parseFloat(e.x),s=parseFloat(e.y),o=parseFloat(e.z),d.call(this,n,s,o)}else if(Array.isArray(e)){if(e.every(function(e){return Number.isFinite(e)}))return 2===e.length?c.call(this,e[0],e[1]):3===e.length?d.call(this,e[0],e[1],e[2]):void 0}else if(1===arguments.length){if(Number.isFinite(e)&&0!==e)return this.x=this.x%e,this.y=this.y%e,this.z=this.z%e,this}else if(2===arguments.length){var n=Array.prototype.slice.call(arguments);if(n.every(function(e){return Number.isFinite(e)})&&2===n.length)return c.call(this,n[0],n[1])}else if(3===arguments.length){var s=Array.prototype.slice.call(arguments);if(s.every(function(e){return Number.isFinite(e)})&&3===s.length)return d.call(this,s[0],s[1],s[2])}}},{key:"sub",value:function(e,t,r){return e instanceof a.default.Vector?(this.x-=e.x||0,this.y-=e.y||0,this.z-=e.z||0):Array.isArray(e)?(this.x-=e[0]||0,this.y-=e[1]||0,this.z-=e[2]||0):(this.x-=e||0,this.y-=t||0,this.z-=r||0),this}},{key:"mult",value:function(e,t,r){var o;return e instanceof a.default.Vector?Number.isFinite(e.x)&&Number.isFinite(e.y)&&Number.isFinite(e.z)&&"number"==typeof e.x&&"number"==typeof e.y&&"number"==typeof e.z?(this.x*=e.x,this.y*=e.y,this.z*=e.z):console.warn("p5.Vector.prototype.mult:","x contains components that are either undefined or not finite numbers"):Array.isArray(e)?e.every(function(e){return Number.isFinite(e)})&&e.every(function(e){return"number"==typeof e})?1===e.length?(this.x*=e[0],this.y*=e[0],this.z*=e[0]):2===e.length?(this.x*=e[0],this.y*=e[1]):3===e.length&&(this.x*=e[0],this.y*=e[1],this.z*=e[2]):console.warn("p5.Vector.prototype.mult:","x contains elements that are either undefined or not finite numbers"):(o=Array.prototype.slice.call(arguments)).every(function(e){return Number.isFinite(e)})&&o.every(function(e){return"number"==typeof e})?(1===arguments.length&&(this.x*=e,this.y*=e,this.z*=e),2===arguments.length&&(this.x*=e,this.y*=t),3===arguments.length&&(this.x*=e,this.y*=t,this.z*=r)):console.warn("p5.Vector.prototype.mult:","x, y, or z arguments are either undefined or not a finite number"),this}},{key:"div",value:function(e,t,r){if(e instanceof a.default.Vector)if(Number.isFinite(e.x)&&Number.isFinite(e.y)&&Number.isFinite(e.z)&&"number"==typeof e.x&&"number"==typeof e.y&&"number"==typeof e.z){var o=0===e.z&&0===this.z;if(0===e.x||0===e.y||!o&&0===e.z)return console.warn("p5.Vector.prototype.div:","divide by 0"),this;this.x/=e.x,this.y/=e.y,o||(this.z/=e.z)}else console.warn("p5.Vector.prototype.div:","x contains components that are either undefined or not finite numbers");else if(Array.isArray(e))if(e.every(function(e){return Number.isFinite(e)})&&e.every(function(e){return"number"==typeof e})){if(e.some(function(e){return 0===e}))return console.warn("p5.Vector.prototype.div:","divide by 0"),this;1===e.length?(this.x/=e[0],this.y/=e[0],this.z/=e[0]):2===e.length?(this.x/=e[0],this.y/=e[1]):3===e.length&&(this.x/=e[0],this.y/=e[1],this.z/=e[2])}else console.warn("p5.Vector.prototype.div:","x contains components that are either undefined or not finite numbers");else{o=Array.prototype.slice.call(arguments);if(o.every(function(e){return Number.isFinite(e)})&&o.every(function(e){return"number"==typeof e})){if(o.some(function(e){return 0===e}))return console.warn("p5.Vector.prototype.div:","divide by 0"),this;1===arguments.length&&(this.x/=e,this.y/=e,this.z/=e),2===arguments.length&&(this.x/=e,this.y/=t),3===arguments.length&&(this.x/=e,this.y/=t,this.z/=r)}else console.warn("p5.Vector.prototype.div:","x, y, or z arguments are either undefined or not a finite number")}return this}},{key:"mag",value:function(){return Math.sqrt(this.magSq())}},{key:"magSq",value:function(){var e=this.x,t=this.y,r=this.z;return e*e+t*t+r*r}},{key:"dot",value:function(e,t,r){return e instanceof a.default.Vector?this.dot(e.x,e.y,e.z):this.x*(e||0)+this.y*(t||0)+this.z*(r||0)}},{key:"cross",value:function(e){var t=this.y*e.z-this.z*e.y,r=this.z*e.x-this.x*e.z,e=this.x*e.y-this.y*e.x;return this.isPInst?new a.default.Vector(this._fromRadians,this._toRadians,t,r,e):new a.default.Vector(t,r,e)}},{key:"dist",value:function(e){return e.copy().sub(this).mag()}},{key:"normalize",value:function(){var e=this.mag();return 0!==e&&this.mult(1/e),this}},{key:"limit",value:function(e){var t=this.magSq();return e*e<t&&this.div(Math.sqrt(t)).mult(e),this}},{key:"setMag",value:function(e){return this.normalize().mult(e)}},{key:"heading",value:function(){var e=Math.atan2(this.y,this.x);return this.isPInst?this._fromRadians(e):e}},{key:"setHeading",value:function(e){this.isPInst&&(e=this._toRadians(e));var t=this.mag();return this.x=t*Math.cos(e),this.y=t*Math.sin(e),this}},{key:"rotate",value:function(e){var e=this.heading()+e,t=(this.isPInst&&(e=this._toRadians(e)),this.mag());return this.x=Math.cos(e)*t,this.y=Math.sin(e)*t,this}},{key:"angleBetween",value:function(e){var t;return 0==this.magSq()*e.magSq()?NaN:(t=this.cross(e),e=Math.atan2(t.mag(),this.dot(e))*Math.sign(t.z||1),this.isPInst?this._fromRadians(e):e)}},{key:"lerp",value:function(e,t,r,o){return e instanceof a.default.Vector?this.lerp(e.x,e.y,e.z,t):(this.x+=(e-this.x)*o||0,this.y+=(t-this.y)*o||0,this.z+=(r-this.z)*o||0,this)}},{key:"slerp",value:function(e,t){if(0!==t){if(1===t)return this.set(e);var r=this.mag(),o=e.mag();if(0==r*o)this.mult(1-t).add(e.x*t,e.y*t,e.z*t);else{var n=this.cross(e),s=n.mag(),i=Math.atan2(s,this.dot(e));if(0<s)n.x/=s,n.y/=s,n.z/=s;else{if(i<.5*Math.PI)return this.mult(1-t).add(e.x*t,e.y*t,e.z*t),this;0===this.z&&0===e.z?n.set(0,0,1):0!==this.x?n.set(this.y,-this.x,0).normalize():n.set(1,0,0)}s=n.cross(this),e=1-t+t*o/r,n=e*Math.cos(t*i),o=e*Math.sin(t*i);this.x=this.x*n+s.x*o,this.y=this.y*n+s.y*o,this.z=this.z*n+s.z*o}}return this}},{key:"reflect",value:function(e){return e.normalize(),this.sub(e.mult(2*this.dot(e)))}},{key:"array",value:function(){return[this.x||0,this.y||0,this.z||0]}},{key:"equals",value:function(e,t,r){var o,n,e=e instanceof a.default.Vector?(o=e.x||0,n=e.y||0,e.z||0):Array.isArray(e)?(o=e[0]||0,n=e[1]||0,e[2]||0):(o=e||0,n=t||0,r||0);return this.x===o&&this.y===n&&this.z===e}}])&&u(e.prototype,t),r&&u(e,r),n}();var n=a.default.Vector;r.default=n},{"../core/constants":264,"../core/main":275,"core-js/modules/es.array.concat":151,"core-js/modules/es.array.every":153,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.slice":165,"core-js/modules/es.array.some":166,"core-js/modules/es.math.sign":172,"core-js/modules/es.number.constructor":173,"core-js/modules/es.number.is-finite":174,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.to-string":182,"core-js/modules/es.string.iterator":192,"core-js/modules/es.string.sub":200,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}],309:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=(e=e("../core/main"))&&e.__esModule?e:{default:e};var s="_lcg_random_state",o=4294967296,i=0,e=(n.default.prototype._lcg=function(e){return this[e]=(1664525*this[e]+1013904223)%o,this[e]/o},n.default.prototype._lcgSetSeed=function(e,t){this[e]=(null==t?Math.random()*o:t)>>>0},n.default.prototype.randomSeed=function(e){this._lcgSetSeed(s,e),this._gaussian_previous=!1},n.default.prototype.random=function(e,t){var r,o;return n.default._validateParameters("random",arguments),r=null!=this[s]?this._lcg(s):Math.random(),void 0===e?r:void 0===t?e instanceof Array?e[Math.floor(r*e.length)]:r*e:(t<e&&(o=e,e=t,t=o),r*(t-e)+e)},n.default.prototype.randomGaussian=function(e){var t,r,o,n,s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;if(this._gaussian_previous)t=i,this._gaussian_previous=!1;else{for(;1<=(n=(r=this.random(2)-1)*r+(o=this.random(2)-1)*o););t=r*(n=Math.sqrt(-2*Math.log(n)/n)),i=o*n,this._gaussian_previous=!0}return t*s+(e||0)},n.default);r.default=e},{"../core/main":275}],310:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=(l=e("../core/main"))&&l.__esModule?l:{default:l},s=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("../core/constants"));function a(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,a=function(){return e},e)}n.default.prototype._angleMode=s.RADIANS,n.default.prototype.acos=function(e){return this._fromRadians(Math.acos(e))},n.default.prototype.asin=function(e){return this._fromRadians(Math.asin(e))},n.default.prototype.atan=function(e){return this._fromRadians(Math.atan(e))},n.default.prototype.atan2=function(e,t){return this._fromRadians(Math.atan2(e,t))},n.default.prototype.cos=function(e){return Math.cos(this._toRadians(e))},n.default.prototype.sin=function(e){return Math.sin(this._toRadians(e))},n.default.prototype.tan=function(e){return Math.tan(this._toRadians(e))},n.default.prototype.degrees=function(e){return e*s.RAD_TO_DEG},n.default.prototype.radians=function(e){return e*s.DEG_TO_RAD},n.default.prototype.angleMode=function(e){if(n.default._validateParameters("angleMode",arguments),void 0===e)return this._angleMode;e!==s.DEGREES&&e!==s.RADIANS||(this._angleMode=e)},n.default.prototype._toRadians=function(e){return this._angleMode===s.DEGREES?e*s.DEG_TO_RAD:e},n.default.prototype._toDegrees=function(e){return this._angleMode===s.RADIANS?e*s.RAD_TO_DEG:e},n.default.prototype._fromRadians=function(e){return this._angleMode===s.DEGREES?e*s.RAD_TO_DEG:e};var l=n.default;r.default=l},{"../core/constants":264,"../core/main":275,"core-js/modules/es.array.iterator":161,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.to-string":182,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}],311:[function(e,t,r){"use strict";e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.replace"),e("core-js/modules/es.string.split"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.replace"),e("core-js/modules/es.string.split"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=(e=e("../core/main"))&&e.__esModule?e:{default:e};i.default.prototype.textAlign=function(e,t){var r;return i.default._validateParameters("textAlign",arguments),(r=this._renderer).textAlign.apply(r,arguments)},i.default.prototype.textLeading=function(e){var t;return i.default._validateParameters("textLeading",arguments),(t=this._renderer).textLeading.apply(t,arguments)},i.default.prototype.textSize=function(e){var t;return i.default._validateParameters("textSize",arguments),(t=this._renderer).textSize.apply(t,arguments)},i.default.prototype.textStyle=function(e){var t;return i.default._validateParameters("textStyle",arguments),(t=this._renderer).textStyle.apply(t,arguments)},i.default.prototype.textWidth=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t[0]+="",i.default._validateParameters("textWidth",t),0===t[0].length)return 0;for(var o=t[0].replace(/\t/g," ").split(/\r?\n|\r|\n/g),n=[],s=0;s<o.length;s++)n.push(this._renderer.textWidth(o[s]));return Math.max.apply(Math,n)},i.default.prototype.textAscent=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return i.default._validateParameters("textAscent",t),this._renderer.textAscent()},i.default.prototype.textDescent=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return i.default._validateParameters("textDescent",t),this._renderer.textDescent()},i.default.prototype._updateTextMetrics=function(){return this._renderer._updateTextMetrics()},i.default.prototype.textWrap=function(e){if("WORD"!==e&&"CHAR"!==e)throw"Error: textWrap accepts only WORD or CHAR";return this._renderer.textWrap(e)};e=i.default;r.default=e},{"../core/main":275,"core-js/modules/es.regexp.exec":187,"core-js/modules/es.string.replace":196,"core-js/modules/es.string.split":198}],312:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.last-index-of"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.split"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.last-index-of"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.split"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var l=(c=e("../core/main"))&&c.__esModule?c:{default:c},n=s(e("../core/constants")),u=s(e("opentype.js"));function a(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,a=function(){return e},e)}function s(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r,o,n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e)Object.prototype.hasOwnProperty.call(e,r)&&((o=s?Object.getOwnPropertyDescriptor(e,r):null)&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]);return n.default=e,t&&t.set(e,n),n}e("../core/friendly_errors/validate_params"),e("../core/friendly_errors/file_errors"),e("../core/friendly_errors/fes_core"),l.default.prototype.loadFont=function(o,n,s){l.default._validateParameters("loadFont",arguments);var i=new l.default.Font(this),a=this;return u.load(o,function(e,t){if(e)return l.default._friendlyFileLoadError(4,o),void 0!==s?s(e):void console.error(e,o);i.font=t,void 0!==n&&n(i),a._decrementPreload();var e=o.split("\\").pop().split("/").pop(),t=e.lastIndexOf("."),r=t<1?null:e.slice(t+1);["ttf","otf","woff","woff2"].includes(r)&&(r=e.slice(0,-1!==t?t:0),(e=document.createElement("style")).appendChild(document.createTextNode("\n@font-face {\nfont-family: ".concat(r,";\nsrc: url(").concat(o,");\n}\n"))),document.head.appendChild(e))}),i},l.default.prototype.text=function(e,t,r,o,n){var s;return l.default._validateParameters("text",arguments),this._renderer._doFill||this._renderer._doStroke?(s=this._renderer).text.apply(s,arguments):this},l.default.prototype.textFont=function(e,t){if(l.default._validateParameters("textFont",arguments),arguments.length){if(e)return this._renderer._setProperty("_textFont",e),t&&(this._renderer._setProperty("_textSize",t),this._renderer._leadingSet||this._renderer._setProperty("_textLeading",t*n._DEFAULT_LEADMULT)),this._renderer._applyTextProperties();throw new Error("null font passed to textFont")}return this._renderer._textFont};var c=l.default;r.default=c},{"../core/constants":264,"../core/friendly_errors/fes_core":266,"../core/friendly_errors/file_errors":267,"../core/friendly_errors/validate_params":270,"../core/main":275,"core-js/modules/es.array.concat":151,"core-js/modules/es.array.includes":159,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.last-index-of":163,"core-js/modules/es.array.slice":165,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.to-string":182,"core-js/modules/es.regexp.exec":187,"core-js/modules/es.string.iterator":192,"core-js/modules/es.string.split":198,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238,"opentype.js":249}],313:[function(e,t,r){"use strict";function o(e){return(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})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.fill"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.array.splice"),e("core-js/modules/es.function.name"),e("core-js/modules/es.number.to-fixed"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.replace"),e("core-js/modules/es.string.split"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.fill"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.array.splice"),e("core-js/modules/es.function.name"),e("core-js/modules/es.number.to-fixed"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.replace"),e("core-js/modules/es.string.split"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=(n=e("../core/main"))&&n.__esModule?n:{default:n},v=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==j(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("../core/constants"));function i(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,i=function(){return e},e)}function j(e){return(j="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}function s(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function _(e,t){var r=e.length;return e[t<0?t%r+r:t%r]}function x(e,t,r,o){var n,s,i;return o?(void 0===x.tmpPoint1&&(x.tmpPoint1=[],x.tmpPoint2=[]),s=x.tmpPoint1,i=x.tmpPoint2,s.x=t.x-e.x,s.y=t.y-e.y,i.x=r.x-t.x,i.y=r.y-t.y,n=s.x*i.x+s.y*i.y,s=Math.sqrt(s.x*s.x+s.y*s.y),i=Math.sqrt(i.x*i.x+i.y*i.y),Math.acos(n/(s*i))<o):0==(t[0]-e[0])*(r[1]-e[1])-(r[0]-e[0])*(t[1]-e[1])}function d(e,t,r,o,n,s,i,a,l){var u=1-l,c=Math.pow(u,3),d=Math.pow(u,2),h=l*l,f=h*l,p=c*e+3*d*l*r+3*u*l*l*n+f*i,c=c*t+3*d*l*o+3*u*l*l*s+f*a,d=e+2*l*(r-e)+h*(n-2*r+e),f=t+2*l*(o-t)+h*(s-2*o+t),m=r+2*l*(n-r)+h*(i-2*n+r),h=o+2*l*(s-o)+h*(a-2*s+o),e=u*e+l*r,r=u*t+l*o,t=u*n+l*i,o=u*s+l*a,n=90-180*Math.atan2(d-m,f-h)/Math.PI;return(m<d||f<h)&&(n+=180),{x:p,y:c,m:{x:d,y:f},n:{x:m,y:h},start:{x:e,y:r},end:{x:t,y:o},alpha:n}}function h(e,t,r,o,n,s,i,a,l){return null==l?f(e,t,r,o,n,s,i,a):d(e,t,r,o,n,s,i,a,function(e,t,r,o,n,s,i,a,l){if(!(l<0||f(e,t,r,o,n,s,i,a)<l)){var u,c=.5,d=1-c;for(u=f(e,t,r,o,n,s,i,a,d);.01<Math.abs(u-l);)u=f(e,t,r,o,n,s,i,a,d+=(u<l?1:-1)*(c/=2));return d}}(e,t,r,o,n,s,i,a,l))}function w(e,t,r){for(var o,n,s,i,a,l=0,u=0,c=(e=function(e,t){function r(e,t,r){var o,n;if(!e)return["C",t.x,t.y,t.x,t.y,t.x,t.y];switch(e[0]in{T:1,Q:1}||(t.qx=t.qy=null),e[0]){case"M":t.X=e[1],t.Y=e[2];break;case"A":e=["C"].concat(M.apply(0,[t.x,t.y].concat(e.slice(1))));break;case"S":n="C"===r||"S"===r?(o=2*t.x-t.bx,2*t.y-t.by):(o=t.x,t.y),e=["C",o,n].concat(e.slice(1));break;case"T":"Q"===r||"T"===r?(t.qx=2*t.x-t.qx,t.qy=2*t.y-t.qy):(t.qx=t.x,t.qy=t.y),e=["C"].concat(E(t.x,t.y,t.qx,t.qy,e[1],e[2]));break;case"Q":t.qx=e[1],t.qy=e[2],e=["C"].concat(E(t.x,t.y,e[1],e[2],e[3],e[4]));break;case"L":e=["C"].concat(T(t.x,t.y,e[1],e[2]));break;case"H":e=["C"].concat(T(t.x,t.y,e[1],t.y));break;case"V":e=["C"].concat(T(t.x,t.y,t.x,e[1]));break;case"Z":e=["C"].concat(T(t.x,t.y,t.X,t.Y))}return e}function o(e,t){if(7<e[t].length){e[t].shift();for(var r=e[t];r.length;)c[t]="A",a&&(d[t]="A"),e.splice(t++,0,["C"].concat(r.splice(0,6)));e.splice(t,1),s=Math.max(i.length,a&&a.length||0)}}function n(e,t,r,o,n){e&&t&&"M"===e[n][0]&&"M"!==t[n][0]&&(t.splice(n,0,["M",o.x,o.y]),r.bx=0,r.by=0,r.x=e[n][1],r.y=e[n][2],s=Math.max(i.length,a&&a.length||0))}var s,i=b(e),a=t&&b(t),l={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},u={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},c=[],d=[],h="",f="";s=Math.max(i.length,a&&a.length||0);for(var p=0;p<s;p++){"C"!==(h=i[p]?i[p][0]:h)&&(c[p]=h,p&&(f=c[p-1])),i[p]=r(i[p],l,f),"A"!==c[p]&&"C"===h&&(c[p]="C"),o(i,p),a&&("C"!==(h=a[p]?a[p][0]:h)&&(d[p]=h,p&&(f=d[p-1])),a[p]=r(a[p],u,f),"A"!==d[p]&&"C"===h&&(d[p]="C"),o(a,p)),n(i,a,l,u,p),n(a,i,u,l,p);var m=i[p],y=a&&a[p],g=m.length,v=a&&y.length;l.x=m[g-2],l.y=m[g-1],l.bx=parseFloat(m[g-4])||l.x,l.by=parseFloat(m[g-3])||l.y,u.bx=a&&(parseFloat(y[v-4])||u.x),u.by=a&&(parseFloat(y[v-3])||u.y),u.x=a&&y[v-2],u.y=a&&y[v-1]}return a?[i,a]:i}(e)).length;u<c;u++){if("M"===(s=e[u])[0])o=+s[1],n=+s[2];else{if(t<l+(i=h(o,n,s[1],s[2],s[3],s[4],s[5],s[6]))&&!r)return{x:(a=h(o,n,s[1],s[2],s[3],s[4],s[5],s[6],t-l)).x,y:a.y,alpha:a.alpha};l+=i,o=+s[5],n=+s[6]}s.shift()}return a=(a=r?l:d(o,n,s[0],s[1],s[2],s[3],s[4],s[5],1)).alpha?{x:a.x,y:a.y,alpha:a.alpha}:a}function b(e){var t=[],r=0,o=0,n=0,s=0,i=0;if(e){"M"===e[0][0]&&(n=r=+e[0][1],s=o=+e[0][2],i++,t[0]=["M",r,o]);for(var a,l,u=3===e.length&&"M"===e[0][0]&&"R"===e[1][0].toUpperCase()&&"Z"===e[2][0].toUpperCase(),c=i,d=e.length;c<d;c++){if(t.push(a=[]),(l=e[c])[0]!==String.prototype.toUpperCase.call(l[0]))switch(a[0]=String.prototype.toUpperCase.call(l[0]),a[0]){case"A":a[1]=l[1],a[2]=l[2],a[3]=l[3],a[4]=l[4],a[5]=l[5],a[6]=+(l[6]+r),a[7]=+(l[7]+o);break;case"V":a[1]=+l[1]+o;break;case"H":a[1]=+l[1]+r;break;case"R":for(var h,f=2,p=(h=[r,o].concat(l.slice(1))).length;f<p;f++)h[f]=+h[f]+r,h[++f]=+h[f]+o;t.pop(),t=t.concat(S(h,u));break;case"M":n=+l[1]+r,s=+l[2]+o;break;default:for(var m=1,y=l.length;m<y;m++)a[m]=+l[m]+(m%2?r:o)}else if("R"===l[0])h=[r,o].concat(l.slice(1)),t.pop(),t=t.concat(S(h,u)),a=["R"].concat(l.slice(-2));else for(var g=0,v=l.length;g<v;g++)a[g]=l[g];switch(a[0]){case"Z":r=n,o=s;break;case"H":r=a[1];break;case"V":o=a[1];break;case"M":n=a[a.length-2],s=a[a.length-1];break;default:r=a[a.length-2],o=a[a.length-1]}}}return t}function M(e,t,r,o,n,s,i,a,l,u){function c(e,t,r){return{x:e*Math.cos(r)-t*Math.sin(r),y:e*Math.sin(r)+t*Math.cos(r)}}var d,h=Math.PI,f=120*h/180,p=h/180*(+n||0),m=[],y=(u?(x=u[0],d=u[1],j=u[2],_=u[3]):(e=(v=c(e,t,-p)).x,t=v.y,1<(y=(g=(e-(a=(v=c(a,l,-p)).x))/2)*g/(r*r)+(v=(t-(l=v.y))/2)*v/(o*o))&&(r*=y=Math.sqrt(y),o*=y),y=r*r,b=o*o,j=(s=(s===i?-1:1)*Math.sqrt(Math.abs((y*b-y*v*v-b*g*g)/(y*v*v+b*g*g))))*r*v/o+(e+a)/2,_=s*-o*g/r+(t+l)/2,x=Math.asin(((t-_)/o).toFixed(9)),d=Math.asin(((l-_)/o).toFixed(9)),(x=e<j?h-x:x)<0&&(x=2*h+x),(d=a<j?h-d:d)<0&&(d=2*h+d),i&&d<x&&(x-=2*h),!i&&x<d&&(d-=2*h)),d-x),g=(Math.abs(y)>f&&(b=d,v=a,s=l,d=x+f*(i&&x<d?1:-1),m=M(a=j+r*Math.cos(d),l=_+o*Math.sin(d),r,o,n,0,i,v,s,[d,b,j,_])),y=d-x,Math.cos(x)),h=Math.sin(x),f=Math.cos(d),n=Math.sin(d),i=Math.tan(y/4),v=4/3*r*i,s=4/3*o*i,b=[e,t],j=[e+v*h,t-s*g],_=[a+v*n,l-s*f],x=[a,l];if(j[0]=2*b[0]-j[0],j[1]=2*b[1]-j[1],u)return[j,_,x].concat(m);for(var w=[],S=0,T=(m=[j,_,x].concat(m).join().split(",")).length;S<T;S++)w[S]=S%2?c(m[S-1],m[S],p).y:c(m[S],m[S+1],p).x;return w}function S(e,t){for(var r=[],o=0,n=e.length;o<n-2*!t;o+=2){var s=[{x:+e[o-2],y:+e[o-1]},{x:+e[o],y:+e[o+1]},{x:+e[o+2],y:+e[o+3]},{x:+e[o+4],y:+e[o+5]}];t?o?n-4===o?s[3]={x:+e[0],y:+e[1]}:n-2===o&&(s[2]={x:+e[0],y:+e[1]},s[3]={x:+e[2],y:+e[3]}):s[0]={x:+e[n-2],y:+e[n-1]}:n-4===o?s[3]=s[2]:o||(s[0]={x:+e[o],y:+e[o+1]}),r.push(["C",(-s[0].x+6*s[1].x+s[2].x)/6,(-s[0].y+6*s[1].y+s[2].y)/6,(s[1].x+6*s[2].x-s[3].x)/6,(s[1].y+6*s[2].y-s[3].y)/6,s[2].x,s[2].y])}return r}function T(e,t,r,o){return[e,t,r,o,r,o]}function E(e,t,r,o,n,s){return[1/3*e+2/3*r,1/3*t+2/3*o,1/3*n+2/3*r,1/3*s+2/3*o,n,s]}function f(e,t,r,o,n,s,i,a,l){for(var u=(l=1<(l=null==l?1:l)?1:l<0?0:l)/2,c=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=0,h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0;f<12;f++){var p=u*c[f]+u,m=y(p,e,r,n,i),p=y(p,t,o,s,a);d+=h[f]*Math.sqrt(m*m+p*p)}return u*d}function y(e,t,r,o,n){return e*(e*(-3*t+9*r-9*o+3*n)+6*t-12*r+6*o)-3*t+3*r}n.default.Font=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.parent=e,this.cache={},this.font=void 0}var e,r,o;return e=t,(r=[{key:"textBounds",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,o=3<arguments.length?arguments[3]:void 0,n=4<arguments.length?arguments[4]:void 0,s=n&&n.renderer&&n.renderer._pInst||this.parent,i=s._renderer.drawingContext,o=(i.textAlign||v.LEFT,i.textBaseline||v.BASELINE,o||s._renderer._textSize);if(!g){for(var a=[],l=[],u=[],c=(u[0]=[],[]),d=this._scale(o),h=s._renderer.textLeading(),f=0,p=(this.font.forEachGlyph(e,t,r,o,n,function(e,t,r,o){var n=e.getMetrics();0===e.index||10===e.index?u[f+=1]=[]:(u[f].push(t+n.xMin*d),u[f].push(t+n.xMax*d),c.push(r+f*h+-n.yMin*d),c.push(r+f*h+-n.yMax*d))}),0<u[f].length&&(a[f]=Math.min.apply(null,u[f]),l[f]=Math.max.apply(null,u[f])),0),m=0;m<=f;m++){a[m]=Math.min.apply(null,u[m]),l[m]=Math.max.apply(null,u[m]);var y=l[m]-a[m];p<y&&(p=y)}var i=Math.min.apply(null,a),g={x:i,y:r=Math.min.apply(null,c),h:Math.max.apply(null,c)-r,w:p,advance:i-t},o=this._handleAlignment(s._renderer,e,g.x,g.y,g.w+g.advance);g.x=o.x,g.y=o.y}return g}},{key:"textToPoints",value:function(e,t,r,o,n){var s=t,i=[],a=e.split(/\r?\n|\r|\n/g);o=o||this.parent._renderer._textSize;for(var l,u,c,d=0;d<a.length;d++){var h=0;t=s;for(var f=(f=a[d]).replace("\t"," "),p=this._getGlyphs(f),m=0;m<p.length;m++){if(u=f,!((c=p)[l=m].name&&"space"===c[l].name||u.length===c.length&&" "===u[l]))for(var y=function(e){for(var t,r=[],o=0;o<e.length;o++)"M"===e[o].type&&(t&&r.push(t),t=[]),t.push(function(e){var t=[e.type];"M"===e.type||"L"===e.type?t.push(e.x,e.y):"C"===e.type?t.push(e.x1,e.y1,e.x2,e.y2,e.x,e.y):"Q"===e.type&&t.push(e.x1,e.y1,e.x,e.y);return t}(e[o]));return r.push(t),r}(p[m].getPath(t,r,o).commands),g=0;g<y.length;g++)for(var v=function(e,t){for(var t=function(e,t){if("object"!==j(e))e=t;else for(var r in t)void 0===e[r]&&(e[r]=t[r]);return e}(t,{sampleFactor:.1,simplifyThreshold:0}),r=w(e,0,1),o=r/(r*t.sampleFactor),n=[],s=0;s<r;s+=o)n.push(w(e,s));t.simplifyThreshold&&!function(e){for(var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=0,o=e.length-1;3<e.length&&0<=o;--o)x(_(e,o-1),_(e,o),_(e,o+1),t)&&(e.splice(o%e.length,1),r++)}(n,t.simplifyThreshold);return n}(y[g],n),b=0;b<v.length;b++)v[b].x+=h,i.push(v[b]);h+=p[m].advanceWidth*this._scale(o)}r+=this.parent._renderer._textLeading}return i}},{key:"_getGlyphs",value:function(e){return this.font.stringToGlyphs(e)}},{key:"_getPath",value:function(e,t,r,o){var n=(o&&o.renderer&&o.renderer._pInst||this.parent)._renderer,t=this._handleAlignment(n,e,t,r);return this.font.getPath(e,t.x,t.y,n._textSize,o)}},{key:"_getPathData",value:function(e,t,r,o){var n=3;return"string"==typeof e&&2<arguments.length?e=this._getPath(e,t,r,o):"object"===j(t)&&(o=t),o&&"number"==typeof o.decimals&&(n=o.decimals),e.toPathData(n)}},{key:"_getSVG",value:function(e,t,r,o){var n=3;return"string"==typeof e&&2<arguments.length?e=this._getPath(e,t,r,o):"object"===j(t)&&(o=t),o&&("number"==typeof o.decimals&&(n=o.decimals),"number"==typeof o.strokeWidth&&(e.strokeWidth=o.strokeWidth),void 0!==o.fill&&(e.fill=o.fill),void 0!==o.stroke&&(e.stroke=o.stroke)),e.toSVG(n)}},{key:"_renderPath",value:function(e,t,r,o){var n=o&&o.renderer||this.parent._renderer,s=n.drawingContext,e=("object"===j(e)&&e.commands?e:this._getPath(e,t,r,o)).commands,i=(s.beginPath(),!0),t=!1,r=void 0;try{for(var a,l=e[Symbol.iterator]();!(i=(a=l.next()).done);i=!0){var u=a.value;"M"===u.type?s.moveTo(u.x,u.y):"L"===u.type?s.lineTo(u.x,u.y):"C"===u.type?s.bezierCurveTo(u.x1,u.y1,u.x2,u.y2,u.x,u.y):"Q"===u.type?s.quadraticCurveTo(u.x1,u.y1,u.x,u.y):"Z"===u.type&&s.closePath()}}catch(e){t=!0,r=e}finally{try{i||null==l.return||l.return()}finally{if(t)throw r}}return n._doStroke&&n._strokeSet&&!n._clipping&&s.stroke(),n._doFill&&!n._clipping&&(n._fillSet||n._setFill(v._DEFAULT_TEXT_FILL),s.fill()),this}},{key:"_textWidth",value:function(e,t){return this.font.getAdvanceWidth(e,t)}},{key:"_textAscent",value:function(e){return this.font.ascender*this._scale(e)}},{key:"_textDescent",value:function(e){return-this.font.descender*this._scale(e)}},{key:"_scale",value:function(e){return 1/this.font.unitsPerEm*(e||this.parent._renderer._textSize)}},{key:"_handleAlignment",value:function(e,t,r,o,n){var s=e._textSize;switch(void 0===n&&(n=this._textWidth(t,s)),e._textAlign){case v.CENTER:r-=n/2;break;case v.RIGHT:r-=n}switch(e._textBaseline){case v.TOP:o+=this._textAscent(s);break;case v.CENTER:o+=this._textAscent(s)/2;break;case v.BOTTOM:o-=this._textDescent(s)}return{x:r,y:o}}}])&&s(e.prototype,r),o&&s(e,o),t}();e=n.default;r.default=e},{"../core/constants":264,"../core/main":275,"core-js/modules/es.array.concat":151,"core-js/modules/es.array.fill":154,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.join":162,"core-js/modules/es.array.slice":165,"core-js/modules/es.array.splice":167,"core-js/modules/es.function.name":168,"core-js/modules/es.number.to-fixed":175,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.to-string":182,"core-js/modules/es.regexp.exec":187,"core-js/modules/es.string.iterator":192,"core-js/modules/es.string.replace":196,"core-js/modules/es.string.split":198,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}],314:[function(e,t,r){"use strict";e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.array.splice"),e("core-js/modules/es.array-buffer.constructor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.array.splice"),e("core-js/modules/es.array-buffer.constructor"),e("core-js/modules/es.object.to-string"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;e=(e=e("../core/main"))&&e.__esModule?e:{default:e};e.default.prototype.append=function(e,t){return e.push(t),e},e.default.prototype.arrayCopy=function(e,t,r,o,n){var s,i;e=void 0!==n?(i=Math.min(n,e.length),s=o,e.slice(t,i+t)):(i=void 0!==r?(i=r,Math.min(i,e.length)):e.length,r=t,e.slice(s=0,i)),Array.prototype.splice.apply(r,[s,i].concat(e))},e.default.prototype.concat=function(e,t){return e.concat(t)},e.default.prototype.reverse=function(e){return e.reverse()},e.default.prototype.shorten=function(e){return e.pop(),e},e.default.prototype.shuffle=function(e,t){for(var r,o,n=ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(e),s=(e=t||n?e:e.slice()).length;1<s;)r=this.random(0,1)*s|0,o=e[--s],e[s]=e[r],e[r]=o;return e},e.default.prototype.sort=function(e,t){var r=t?e.slice(0,Math.min(t,e.length)):e,t=t?e.slice(Math.min(t,e.length)):[];return(r="string"==typeof r[0]?r.sort():r.sort(function(e,t){return e-t})).concat(t)},e.default.prototype.splice=function(e,t,r){return Array.prototype.splice.apply(e,[r,0].concat(t)),e},e.default.prototype.subset=function(e,t,r){return void 0!==r?e.slice(t,t+r):e.slice(t,e.length)};e=e.default;r.default=e},{"../core/main":275,"core-js/modules/es.array-buffer.constructor":150,"core-js/modules/es.array.concat":151,"core-js/modules/es.array.slice":165,"core-js/modules/es.array.splice":167,"core-js/modules/es.object.to-string":182}],315:[function(e,t,r){"use strict";e("core-js/modules/es.array.map"),e("core-js/modules/es.number.constructor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.repeat"),e("core-js/modules/es.array.map"),e("core-js/modules/es.number.constructor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.repeat"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=(e=e("../core/main"))&&e.__esModule?e:{default:e};o.default.prototype.float=function(e){return e instanceof Array?e.map(parseFloat):parseFloat(e)},o.default.prototype.int=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:10;return e===1/0||"Infinity"===e?1/0:e===-1/0||"-Infinity"===e?-1/0:"string"==typeof e?parseInt(e,t):"number"==typeof e?0|e:"boolean"==typeof e?e?1:0:e instanceof Array?e.map(function(e){return o.default.prototype.int(e,t)}):void 0},o.default.prototype.str=function(e){return e instanceof Array?e.map(o.default.prototype.str):String(e)},o.default.prototype.boolean=function(e){return"number"==typeof e?0!==e:"string"==typeof e?"true"===e.toLowerCase():"boolean"==typeof e?e:e instanceof Array?e.map(o.default.prototype.boolean):void 0},o.default.prototype.byte=function(e){e=o.default.prototype.int(e,10);return"number"==typeof e?(e+128)%256-128:e instanceof Array?e.map(o.default.prototype.byte):void 0},o.default.prototype.char=function(e){return"number"!=typeof e||isNaN(e)?e instanceof Array?e.map(o.default.prototype.char):"string"==typeof e?o.default.prototype.char(parseInt(e,10)):void 0:String.fromCharCode(e)},o.default.prototype.unchar=function(e){return"string"==typeof e&&1===e.length?e.charCodeAt(0):e instanceof Array?e.map(o.default.prototype.unchar):void 0},o.default.prototype.hex=function(e,t){if(t=null==t?8:t,e instanceof Array)return e.map(function(e){return o.default.prototype.hex(e,t)});if(e===1/0||e===-1/0)return(e===1/0?"F":"0").repeat(t);if("number"==typeof e){e<0&&(e=4294967295+e+1);for(var r=Number(e).toString(16).toUpperCase();r.length<t;)r="0".concat(r);return r=r.length>=t?r.substring(r.length-t,r.length):r}},o.default.prototype.unhex=function(e){return e instanceof Array?e.map(o.default.prototype.unhex):parseInt("0x".concat(e),16)};e=o.default;r.default=e},{"../core/main":275,"core-js/modules/es.array.map":164,"core-js/modules/es.number.constructor":173,"core-js/modules/es.object.to-string":182,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.repeat":195}],316:[function(e,t,r){"use strict";e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.filter"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.number.to-fixed"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.constructor"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.match"),e("core-js/modules/es.string.pad-start"),e("core-js/modules/es.string.replace"),e("core-js/modules/es.string.split"),e("core-js/modules/es.string.trim"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.filter"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.number.to-fixed"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.constructor"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.match"),e("core-js/modules/es.string.pad-start"),e("core-js/modules/es.string.replace"),e("core-js/modules/es.string.split"),e("core-js/modules/es.string.trim"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var s=(u=e("../core/main"))&&u.__esModule?u:{default:u};function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],o=!0,n=!1,s=void 0;try{for(var i,a=e[Symbol.iterator]();!(o=(i=a.next()).done)&&(r.push(i.value),!t||r.length!==t);o=!0);}catch(e){n=!0,s=e}finally{try{o||null==a.return||a.return()}finally{if(n)throw s}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function o(e,t,r){var o=i(e.toString().split("."),2),n=o[0],o=o[1];return void 0===r?(n=n.padStart(t,"0"),o?n+"."+o:n):(n=(e=i(e.toFixed(r).toString().split("."),2))[0],o=e[1],n=n.padStart(t,"0"),void 0===o?n:n+"."+o)}function n(e,t){var r=(e=e.toString()).indexOf("."),o=-1!==r?e.substring(r):"",e=(e=-1!==r?e.substring(0,r):e).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");if(0===t)o="";else if(void 0!==t)if(t>o.length)for(var n=t-(o+=-1===r?".":"").length+1,s=0;s<n;s++)o+="0";else o=o.substring(0,t+1);return e+o}function a(e){return 0<parseFloat(e)?"+".concat(e.toString()):e.toString()}function l(e){return 0<=parseFloat(e)?" ".concat(e.toString()):e.toString()}e("../core/friendly_errors/validate_params"),e("../core/friendly_errors/file_errors"),e("../core/friendly_errors/fes_core"),s.default.prototype.join=function(e,t){return s.default._validateParameters("join",arguments),e.join(t)},s.default.prototype.match=function(e,t){return s.default._validateParameters("match",arguments),e.match(t)},s.default.prototype.matchAll=function(e,t){s.default._validateParameters("matchAll",arguments);for(var r=new RegExp(t,"g"),o=r.exec(e),n=[];null!==o;)n.push(o),o=r.exec(e);return n},s.default.prototype.nf=function(e,t,r){return s.default._validateParameters("nf",arguments),e instanceof Array?e.map(function(e){return o(e,t,r)}):"[object Arguments]"===Object.prototype.toString.call(e)?3===e.length?this.nf(e[0],e[1],e[2]):2===e.length?this.nf(e[0],e[1]):this.nf(e[0]):o(e,t,r)},s.default.prototype.nfc=function(e,t){return s.default._validateParameters("nfc",arguments),e instanceof Array?e.map(function(e){return n(e,t)}):n(e,t)},s.default.prototype.nfp=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];s.default._validateParameters("nfp",t);var o=s.default.prototype.nf.apply(this,t);return o instanceof Array?o.map(a):a(o)},s.default.prototype.nfs=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];s.default._validateParameters("nfs",t);var o=s.default.prototype.nf.apply(this,t);return o instanceof Array?o.map(l):l(o)},s.default.prototype.split=function(e,t){return s.default._validateParameters("split",arguments),e.split(t)},s.default.prototype.splitTokens=function(e,t){var r,o;return s.default._validateParameters("splitTokens",arguments),o=void 0!==t?(o=/\]/g.exec(t=t),(r=/\[/g.exec(t))&&o?(t=t.slice(0,o.index)+t.slice(o.index+1),r=/\[/g.exec(t),t=t.slice(0,r.index)+t.slice(r.index+1),new RegExp("[\\[".concat(t,"\\]]"),"g")):o?(t=t.slice(0,o.index)+t.slice(o.index+1),new RegExp("[".concat(t,"\\]]"),"g")):r?(t=t.slice(0,r.index)+t.slice(r.index+1),new RegExp("[".concat(t,"\\[]"),"g")):new RegExp("[".concat(t,"]"),"g")):/\s/g,e.split(o).filter(function(e){return e})},s.default.prototype.trim=function(e){return s.default._validateParameters("trim",arguments),e instanceof Array?e.map(this.trim):e.trim()};var u=s.default;r.default=u},{"../core/friendly_errors/fes_core":266,"../core/friendly_errors/file_errors":267,"../core/friendly_errors/validate_params":270,"../core/main":275,"core-js/modules/es.array.filter":155,"core-js/modules/es.array.index-of":160,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.join":162,"core-js/modules/es.array.map":164,"core-js/modules/es.array.slice":165,"core-js/modules/es.number.to-fixed":175,"core-js/modules/es.object.to-string":182,"core-js/modules/es.regexp.constructor":186,"core-js/modules/es.regexp.exec":187,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.iterator":192,"core-js/modules/es.string.match":193,"core-js/modules/es.string.pad-start":194,"core-js/modules/es.string.replace":196,"core-js/modules/es.string.split":198,"core-js/modules/es.string.trim":201,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/web.dom-collections.iterator":238}],317:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;e=(e=e("../core/main"))&&e.__esModule?e:{default:e};e.default.prototype.day=function(){return(new Date).getDate()},e.default.prototype.hour=function(){return(new Date).getHours()},e.default.prototype.minute=function(){return(new Date).getMinutes()},e.default.prototype.millis=function(){return-1===this._millisStart?0:window.performance.now()-this._millisStart},e.default.prototype.month=function(){return(new Date).getMonth()+1},e.default.prototype.second=function(){return(new Date).getSeconds()},e.default.prototype.year=function(){return(new Date).getFullYear()};e=e.default;r.default=e},{"../core/main":275}],318:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.for-each"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.math.hypot"),e("core-js/modules/es.math.sign"),e("core-js/modules/es.number.to-fixed"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.for-each"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.math.hypot"),e("core-js/modules/es.math.sign"),e("core-js/modules/es.number.to-fixed"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var S=(n=e("../core/main"))&&n.__esModule?n:{default:n},_=(e("./p5.Geometry"),function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("../core/constants")));function a(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,a=function(){return e},e)}S.default.prototype.beginGeometry=function(){return this._renderer.beginGeometry()},S.default.prototype.endGeometry=function(){return this._renderer.endGeometry()},S.default.prototype.buildGeometry=function(e){return this._renderer.buildGeometry(e)},S.default.prototype.freeGeometry=function(e){this._renderer._freeBuffers(e.gid)},S.default.prototype.plane=function(e,t,r,o){this._assert3d("plane"),S.default._validateParameters("plane",arguments),void 0===e&&(e=50),void 0===t&&(t=e),void 0===o&&(o=1);var n,s="plane|".concat(r=void 0===r?1:r,"|").concat(o);return this._renderer.geometryInHash(s)||((n=new S.default.Geometry(r,o,function(){for(var e,t,r=0;r<=this.detailY;r++)for(var o=r/this.detailY,n=0;n<=this.detailX;n++)e=n/this.detailX,t=new S.default.Vector(e-.5,o-.5,0),this.vertices.push(t),this.uvs.push(e,o)})).computeFaces().computeNormals(),r<=1&&o<=1?n._makeTriangleEdges()._edgesToVertices():this._renderer._doStroke&&console.log("Cannot draw stroke on plane objects with more than 1 detailX or 1 detailY"),this._renderer.createBuffers(s,n)),this._renderer.drawBuffersScaled(s,e,t,1),this},S.default.prototype.box=function(e,t,r,o,n){this._assert3d("box"),S.default._validateParameters("box",arguments),void 0===e&&(e=50),void 0===t&&(t=e),void 0===r&&(r=t);var s,i=this._renderer.attributes&&this._renderer.attributes.perPixelLighting,i=(void 0===n&&(n=i?1:4),"box|".concat(o=void 0===o?i?1:4:o,"|").concat(n));return this._renderer.geometryInHash(i)||((s=new S.default.Geometry(o,n,function(){var n=this;this.edges=[[0,1],[1,3],[3,2],[6,7],[8,9],[9,11],[14,15],[16,17],[17,19],[18,19],[20,21],[22,23]],[[0,4,2,6],[1,3,5,7],[0,1,4,5],[2,6,3,7],[0,2,1,3],[4,5,6,7]].forEach(function(e,t){for(var t=4*t,r=0;r<4;r++){var o=e[r],o=new S.default.Vector((2*(1&o)-1)/2,((2&o)-1)/2,((4&o)/2-1)/2);n.vertices.push(o),n.uvs.push(1&r,(2&r)/2)}n.faces.push([t,1+t,2+t]),n.faces.push([2+t,1+t,3+t])})})).computeNormals(),o<=4&&n<=4?s._edgesToVertices():this._renderer._doStroke&&console.log("Cannot draw stroke on box objects with more than 4 detailX or 4 detailY"),this._renderer.createBuffers(i,s)),this._renderer.drawBuffersScaled(i,e,t,r),this},S.default.prototype.sphere=function(e,t,r){return this._assert3d("sphere"),S.default._validateParameters("sphere",arguments),this.ellipsoid(e=void 0===e?50:e,e,e,t=void 0===t?24:t,r=void 0===r?16:r),this};function l(e,t,r,o,n,s,i){e=e<=0?1:e,t=t<0?0:t,r=r<=0?e:r,o=o<3?3:o;for(var a,l,u=(s=void 0===s||s)?-2:0,c=(n=n<1?1:n)+((i=void 0===i?0!==t:i)?2:0),d=Math.atan2(e-t,r),h=Math.sin(d),f=Math.cos(d),p=u;p<=c;++p){var m=p/n,y=r*m,g=void 0,g=p<0?(m=y=0,e):n<p?(y=r,m=1,t):e+(t-e)*m;for(-2!==p&&p!==n+2||(g=0),y-=r/2,a=0;a<o;++a){var v=a/(o-1),b=2*Math.PI*v,j=Math.sin(b),b=Math.cos(b),_=(this.vertices.push(new S.default.Vector(j*g,y,b*g)),void 0),_=p<0?new S.default.Vector(0,-1,0):n<p&&t?new S.default.Vector(0,1,0):new S.default.Vector(j*f,h,b*f);this.vertexNormals.push(_),this.uvs.push(v,m)}}var x=0;if(s){for(l=0;l<o;++l)this.faces.push([x+l,x+o+(l+1)%o,x+o+l]);x+=2*o}for(p=0;p<n;++p){for(a=0;a<o;++a){var w=(a+1)%o;this.faces.push([x+a,x+w,x+o+w]),this.faces.push([x+a,x+o+w,x+o+a])}x+=o}if(i)for(x+=o,a=0;a<o;++a)this.faces.push([x+a,x+(a+1)%o,x+o])}S.default.prototype.cylinder=function(e,t,r,o,n,s){this._assert3d("cylinder"),S.default._validateParameters("cylinder",arguments),void 0===e&&(e=50),void 0===t&&(t=e),void 0===o&&(o=1),void 0===s&&(s=!0),void 0===n&&(n=!0);var i,a="cylinder|".concat(r=void 0===r?24:r,"|").concat(o,"|").concat(n,"|").concat(s);return this._renderer.geometryInHash(a)||(i=new S.default.Geometry(r,o),l.call(i,1,1,1,r,o,n,s),r<=24&&o<=16?i._makeTriangleEdges()._edgesToVertices():this._renderer._doStroke&&console.log("Cannot draw stroke on cylinder objects with more than 24 detailX or 16 detailY"),this._renderer.createBuffers(a,i)),this._renderer.drawBuffersScaled(a,e,t,e),this},S.default.prototype.cone=function(e,t,r,o,n){this._assert3d("cone"),S.default._validateParameters("cone",arguments),void 0===e&&(e=50),void 0===t&&(t=e),void 0===o&&(o=1),void 0===n&&(n=!0);var s,i="cone|".concat(r=void 0===r?24:r,"|").concat(o,"|").concat(n);return this._renderer.geometryInHash(i)||(s=new S.default.Geometry(r,o),l.call(s,1,0,1,r,o,n,!1),r<=24&&o<=16?s._makeTriangleEdges()._edgesToVertices():this._renderer._doStroke&&console.log("Cannot draw stroke on cone objects with more than 24 detailX or 16 detailY"),this._renderer.createBuffers(i,s)),this._renderer.drawBuffersScaled(i,e,t,e),this},S.default.prototype.ellipsoid=function(e,t,r,o,n){this._assert3d("ellipsoid"),S.default._validateParameters("ellipsoid",arguments),void 0===e&&(e=50),void 0===t&&(t=e),void 0===r&&(r=e),void 0===n&&(n=16);var s,i="ellipsoid|".concat(o=void 0===o?24:o,"|").concat(n);return this._renderer.geometryInHash(i)||((s=new S.default.Geometry(o,n,function(){for(var e=0;e<=this.detailY;e++)for(var t=e/this.detailY,r=Math.PI*t-Math.PI/2,o=Math.cos(r),n=Math.sin(r),s=0;s<=this.detailX;s++){var i=s/this.detailX,a=2*Math.PI*i,l=Math.cos(a),a=Math.sin(a),a=new S.default.Vector(o*a,n,o*l);this.vertices.push(a),this.vertexNormals.push(a),this.uvs.push(i,t)}})).computeFaces(),o<=24&&n<=24?s._makeTriangleEdges()._edgesToVertices():this._renderer._doStroke&&console.log("Cannot draw stroke on ellipsoids with more than 24 detailX or 24 detailY"),this._renderer.createBuffers(i,s)),this._renderer.drawBuffersScaled(i,e,t,r),this},S.default.prototype.torus=function(e,t,r,o){if(this._assert3d("torus"),S.default._validateParameters("torus",arguments),void 0===e)e=50;else if(!e)return;if(void 0===t)t=10;else if(!t)return;void 0===r&&(r=24),void 0===o&&(o=16);var n,d=(t/e).toPrecision(4),t="torus|".concat(d,"|").concat(r,"|").concat(o);return this._renderer.geometryInHash(t)||((n=new S.default.Geometry(r,o,function(){for(var e=0;e<=this.detailY;e++)for(var t=e/this.detailY,r=2*Math.PI*t,o=Math.cos(r),n=Math.sin(r),s=1+d*o,i=0;i<=this.detailX;i++){var a=i/this.detailX,l=2*Math.PI*a,u=Math.cos(l),l=Math.sin(l),c=new S.default.Vector(s*u,s*l,d*n),u=new S.default.Vector(o*u,o*l,n);this.vertices.push(c),this.vertexNormals.push(u),this.uvs.push(a,t)}})).computeFaces(),r<=24&&o<=16?n._makeTriangleEdges()._edgesToVertices():this._renderer._doStroke&&console.log("Cannot draw strokes on torus object with more than 24 detailX or 16 detailY"),this._renderer.createBuffers(t,n)),this._renderer.drawBuffersScaled(t,e,e,e),this},S.default.RendererGL.prototype.point=function(e,t,r){var o=[];return o.push(new S.default.Vector(e,t,r=void 0===r?0:r)),this._drawPoints(o,this.immediateMode.buffers.point),this},S.default.RendererGL.prototype.triangle=function(e){var t=e[0],r=e[1],o=e[2],n=e[3],s=e[4],e=e[5],i=(this.geometryInHash("tri")||((i=new S.default.Geometry(1,1,function(){var e=[];e.push(new S.default.Vector(0,0,0)),e.push(new S.default.Vector(1,0,0)),e.push(new S.default.Vector(0,1,0)),this.edges=[[0,1],[1,2],[2,0]],this.vertices=e,this.faces=[[0,1,2]],this.uvs=[0,0,1,0,1,1]}))._edgesToVertices(),i.computeNormals(),this.createBuffers("tri",i)),this.uMVMatrix.copy());try{var a=Math.sign(t*n-o*r+o*e-s*n+s*r-t*e),l=new S.default.Matrix([o-t,n-r,0,0,s-t,e-r,0,0,0,0,a,0,t,r,0,1]).mult(this.uMVMatrix);this.uMVMatrix=l,this.drawBuffers("tri")}finally{this.uMVMatrix=i}return this},S.default.RendererGL.prototype.ellipse=function(e){this.arc(e[0],e[1],e[2],e[3],0,_.TWO_PI,_.OPEN,e[4])},S.default.RendererGL.prototype.arc=function(e){var t,r=arguments[1],o=arguments[2],n=arguments[3],s=arguments[4],i=arguments[5],a=arguments[6],l=arguments[7]||25,u=(Math.abs(i-s)>=_.TWO_PI?"".concat(c="ellipse","|"):"".concat(c="arc","|").concat(s,"|").concat(i,"|").concat(a,"|")).concat(l,"|"),c=(this.geometryInHash(u)||((t=new S.default.Geometry(l,1,function(){if(s.toFixed(10)!==i.toFixed(10)){a!==_.PIE&&void 0!==a||(this.vertices.push(new S.default.Vector(.5,.5,0)),this.uvs.push([.5,.5]));for(var e=0;e<=l;e++){var t=(i-s)*(e/l)+s,r=.5+Math.cos(t)/2,t=.5+Math.sin(t)/2;this.vertices.push(new S.default.Vector(r,t,0)),this.uvs.push([r,t]),e<l-1&&(this.faces.push([0,e+1,e+2]),this.edges.push([e+1,e+2]))}switch(a){case _.PIE:this.faces.push([0,this.vertices.length-2,this.vertices.length-1]),this.edges.push([0,1]),this.edges.push([this.vertices.length-2,this.vertices.length-1]),this.edges.push([0,this.vertices.length-1]);break;case _.CHORD:this.edges.push([0,1]),this.edges.push([0,this.vertices.length-1]);break;case _.OPEN:this.edges.push([0,1]);break;default:this.faces.push([0,this.vertices.length-2,this.vertices.length-1]),this.edges.push([this.vertices.length-2,this.vertices.length-1])}}})).computeNormals(),l<=50?t._edgesToVertices(t):this._doStroke&&console.log("Cannot apply a stroke to an ".concat(c," with more than 50 detail")),this.createBuffers(u,t)),this.uMVMatrix.copy());try{this.uMVMatrix.translate([e,r,0]),this.uMVMatrix.scale(o,n,1),this.drawBuffers(u)}finally{this.uMVMatrix=c}return this},S.default.RendererGL.prototype.rect=function(e){var t=e[0],r=e[1],o=e[2],n=e[3];if(void 0===e[4]){var s=this._pInst._glAttributes.perPixelLighting,i=e[4]||(s?1:24),a=e[5]||(s?1:16),s="rect|".concat(i,"|").concat(a),l=(this.geometryInHash(s)||((l=new S.default.Geometry(i,a,function(){for(var e=0;e<=this.detailY;e++)for(var t=e/this.detailY,r=0;r<=this.detailX;r++){var o=r/this.detailX,n=new S.default.Vector(o,t,0);this.vertices.push(n),this.uvs.push(o,t)}0<i&&0<a&&(this.edges=[[0,i],[i,(i+1)*(a+1)-1],[(i+1)*(a+1)-1,(i+1)*a],[(i+1)*a,0]])})).computeFaces().computeNormals()._edgesToVertices(),this.createBuffers(s,l)),this.uMVMatrix.copy());try{this.uMVMatrix.translate([t,r,0]),this.uMVMatrix.scale(o,n,1),this.drawBuffers(s)}finally{this.uMVMatrix=l}}else{var s=e[4],l=void 0===e[5]?s:e[5],u=void 0===e[6]?l:e[6],e=void 0===e[7]?u:e[7],c=o,d=n,h=((c+=t)<t&&(h=t,t=c,c=h),(d+=r)<r&&(h=r,r=d,d=h),Math.min((c-t)/2,(d-r)/2)),f=(h<s&&(s=h),h<l&&(l=h),h<u&&(u=h),h<e&&(e=h),t),p=r,h=c,t=d,m=(this.beginShape(),0!==l?(this.vertex(h-l,p),this.quadraticVertex(h,p,h,p+l)):this.vertex(h,p),0!==u?(this.vertex(h,t-u),this.quadraticVertex(h,t,h-u,t)):this.vertex(h,t),0!==e?(this.vertex(f+e,t),this.quadraticVertex(f,t,f,t-e)):this.vertex(f,t),0!==s?(this.vertex(f,p+s),this.quadraticVertex(f,p,f+s,p)):this.vertex(f,p),!(this.immediateMode.geometry.uvs.length=0)),r=!1,c=void 0;try{for(var y,g=this.immediateMode.geometry.vertices[Symbol.iterator]();!(m=(y=g.next()).done);m=!0){var v=y.value,b=(v.x-f)/o,j=(v.y-p)/n;this.immediateMode.geometry.uvs.push(b,j)}}catch(e){r=!0,c=e}finally{try{m||null==g.return||g.return()}finally{if(r)throw c}}this.endShape(_.CLOSE)}return this},S.default.RendererGL.prototype.quad=function(i,a,l,u,c,d,h,f,p,m,y,g,e,t){void 0===e&&(e=2),void 0===t&&(t=2);var r="quad|".concat(i,"|").concat(a,"|").concat(l,"|").concat(u,"|").concat(c,"|").concat(d,"|").concat(h,"|").concat(f,"|").concat(p,"|").concat(m,"|").concat(y,"|").concat(g,"|").concat(e,"|").concat(t);if(!this.geometryInHash(r)){var o=new S.default.Geometry(e,t,function(){for(var e=1/(this.detailX-1),t=1/(this.detailY-1),r=0;r<this.detailY;r++)for(var o=0;o<this.detailX;o++){var n=o*e,s=r*t;this.vertices.push(new S.default.Vector((1-n)*((1-s)*i+s*m)+n*((1-s)*u+s*h),(1-n)*((1-s)*a+s*y)+n*((1-s)*c+s*f),(1-n)*((1-s)*l+s*g)+n*((1-s)*d+s*p))),this.uvs.push([n,s])}});o.faces=[];for(var n=0;n<t-1;n++)for(var s=0;s<e-1;s++){var v=s+n*e,b=s+1+(n+1)*e,j=s+(n+1)*e;o.faces.push([v,s+1+n*e,b]),o.faces.push([v,b,j])}o.computeNormals();for(var _=[o.edges.length=0,2,3,1],x=0;x<_.length;x++)o.edges.push([_[x],_[(x+1)%_.length]]);o._edgesToVertices(),this.createBuffers(r,o)}return this.drawBuffers(r),this},S.default.RendererGL.prototype.bezier=function(e,t,r,o,n,s,i,a,l,u,c,d){8===arguments.length&&(c=a,u=i,a=s,i=n,n=o,o=r,r=s=l=d=0);var h=this._pInst._bezierDetail||20;this.beginShape();for(var f=0;f<=h;f++){var p=Math.pow(1-f/h,3),m=f/h*3*Math.pow(1-f/h,2),y=3*Math.pow(f/h,2)*(1-f/h),g=Math.pow(f/h,3);this.vertex(e*p+o*m+i*y+u*g,t*p+n*m+a*y+c*g,r*p+s*m+l*y+d*g)}return this.endShape(),this},S.default.RendererGL.prototype.curve=function(e,t,r,o,n,s,i,a,l,u,c,d){8===arguments.length&&(u=i,c=a,i=n,a=o,n=o=r,r=s=l=d=0);var h=this._pInst._curveDetail;this.beginShape();for(var f=0;f<=h;f++){var p=.5*Math.pow(f/h,3),m=.5*Math.pow(f/h,2),y=f/h*.5;this.vertex(p*(3*o-e-3*i+u)+m*(2*e-5*o+4*i-u)+y*(-e+i)+2*o*.5,p*(3*n-t-3*a+c)+m*(2*t-5*n+4*a-c)+y*(-t+a)+2*n*.5,p*(3*s-r-3*l+d)+m*(2*r-5*s+4*l-d)+y*(-r+l)+2*s*.5)}return this.endShape(),this},S.default.RendererGL.prototype.line=function(){return 6===arguments.length?(this.beginShape(_.LINES),this.vertex(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2]),this.vertex(arguments.length<=3?void 0:arguments[3],arguments.length<=4?void 0:arguments[4],arguments.length<=5?void 0:arguments[5]),this.endShape()):4===arguments.length&&(this.beginShape(_.LINES),this.vertex(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],0),this.vertex(arguments.length<=2?void 0:arguments[2],arguments.length<=3?void 0:arguments[3],0),this.endShape()),this},S.default.RendererGL.prototype.bezierVertex=function(){if(0===this.immediateMode._bezierVertex.length)throw Error("vertex() must be used once before calling bezierVertex()");var e,t,r,o,n,s,i=[],a=[],l=arguments.length;if(0===this._lookUpTableBezier.length||this._lutBezierDetail!==this._pInst._curveDetail){this._lookUpTableBezier=[],this._lutBezierDetail=this._pInst._curveDetail;for(var u=1/this._lutBezierDetail,c=0,d=1,h=0;c<1;){if(s=parseFloat(c.toFixed(6)),this._lookUpTableBezier[h]=this._bezierCoefficients(s),d.toFixed(6)===u.toFixed(6)){s=parseFloat(d.toFixed(6))+parseFloat(c.toFixed(6)),++h,this._lookUpTableBezier[h]=this._bezierCoefficients(s);break}c+=u,d-=u,++h}}for(var f=this._lookUpTableBezier.length,p=[],m=0;m<4;m++)p.push([]);p[0]=this.immediateMode.geometry.vertexColors.slice(-4),p[3]=this.curFillColor.slice();var y=[];for(m=0;m<4;m++)y.push([]);if(y[0]=this.immediateMode.geometry.vertexStrokeColors.slice(-4),y[3]=this.curStrokeColor.slice(),6===l){this.isBezier=!0;var i=[this.immediateMode._bezierVertex[0],arguments.length<=0?void 0:arguments[0],arguments.length<=2?void 0:arguments[2],arguments.length<=4?void 0:arguments[4]],a=[this.immediateMode._bezierVertex[1],arguments.length<=1?void 0:arguments[1],arguments.length<=3?void 0:arguments[3],arguments.length<=5?void 0:arguments[5]],g=Math.hypot(i[0]-i[1],a[0]-a[1]),v=Math.hypot(i[1]-i[2],a[1]-a[2]),b=Math.hypot(i[2]-i[3],a[2]-a[3]),v=g+v+b;for(g/=v,b/=v,n=0;n<4;n++)p[1].push(p[0][n]*(1-g)+p[3][n]*g),p[2].push(p[0][n]*b+p[3][n]*(1-b)),y[1].push(y[0][n]*(1-g)+y[3][n]*g),y[2].push(y[0][n]*b+y[3][n]*(1-b));for(o=0;o<f;o++){for(this.curFillColor=[0,0,0,0],this.curStrokeColor=[0,0,0,0],m=e=t=0;m<4;m++){for(n=0;n<4;n++)this.curFillColor[n]+=this._lookUpTableBezier[o][m]*p[m][n],this.curStrokeColor[n]+=this._lookUpTableBezier[o][m]*y[m][n];e+=i[m]*this._lookUpTableBezier[o][m],t+=a[m]*this._lookUpTableBezier[o][m]}this.vertex(e,t)}this.curFillColor=p[3],this.curStrokeColor=y[3],this.immediateMode._bezierVertex[0]=arguments.length<=4?void 0:arguments[4],this.immediateMode._bezierVertex[1]=arguments.length<=5?void 0:arguments[5]}else if(9===l){this.isBezier=!0,i=[this.immediateMode._bezierVertex[0],arguments.length<=0?void 0:arguments[0],arguments.length<=3?void 0:arguments[3],arguments.length<=6?void 0:arguments[6]],a=[this.immediateMode._bezierVertex[1],arguments.length<=1?void 0:arguments[1],arguments.length<=4?void 0:arguments[4],arguments.length<=7?void 0:arguments[7]];var j=[this.immediateMode._bezierVertex[2],arguments.length<=2?void 0:arguments[2],arguments.length<=5?void 0:arguments[5],arguments.length<=8?void 0:arguments[8]],_=Math.hypot(i[0]-i[1],a[0]-a[1],j[0]-j[1]),v=Math.hypot(i[1]-i[2],a[1]-a[2],j[1]-j[2]),x=Math.hypot(i[2]-i[3],a[2]-a[3],j[2]-j[3]),l=_+v+x;for(_/=l,x/=l,n=0;n<4;n++)p[1].push(p[0][n]*(1-_)+p[3][n]*_),p[2].push(p[0][n]*x+p[3][n]*(1-x)),y[1].push(y[0][n]*(1-_)+y[3][n]*_),y[2].push(y[0][n]*x+y[3][n]*(1-x));for(o=0;o<f;o++){for(this.curFillColor=[0,0,0,0],this.curStrokeColor=[0,0,0,0],m=e=t=r=0;m<4;m++){for(n=0;n<4;n++)this.curFillColor[n]+=this._lookUpTableBezier[o][m]*p[m][n],this.curStrokeColor[n]+=this._lookUpTableBezier[o][m]*y[m][n];e+=i[m]*this._lookUpTableBezier[o][m],t+=a[m]*this._lookUpTableBezier[o][m],r+=j[m]*this._lookUpTableBezier[o][m]}this.vertex(e,t,r)}this.curFillColor=p[3],this.curStrokeColor=y[3],this.immediateMode._bezierVertex[0]=arguments.length<=6?void 0:arguments[6],this.immediateMode._bezierVertex[1]=arguments.length<=7?void 0:arguments[7],this.immediateMode._bezierVertex[2]=arguments.length<=8?void 0:arguments[8]}},S.default.RendererGL.prototype.quadraticVertex=function(){if(0===this.immediateMode._quadraticVertex.length)throw Error("vertex() must be used once before calling quadraticVertex()");var e,t,r,o,n,s,i=[],a=[],l=arguments.length;if(0===this._lookUpTableQuadratic.length||this._lutQuadraticDetail!==this._pInst._curveDetail){this._lookUpTableQuadratic=[],this._lutQuadraticDetail=this._pInst._curveDetail;for(var u=1/this._lutQuadraticDetail,c=0,d=1,h=0;c<1;){if(s=parseFloat(c.toFixed(6)),this._lookUpTableQuadratic[h]=this._quadraticCoefficients(s),d.toFixed(6)===u.toFixed(6)){s=parseFloat(d.toFixed(6))+parseFloat(c.toFixed(6)),++h,this._lookUpTableQuadratic[h]=this._quadraticCoefficients(s);break}c+=u,d-=u,++h}}for(var f=this._lookUpTableQuadratic.length,p=[],m=0;m<3;m++)p.push([]);p[0]=this.immediateMode.geometry.vertexColors.slice(-4),p[2]=this.curFillColor.slice();var y=[];for(m=0;m<3;m++)y.push([]);if(y[0]=this.immediateMode.geometry.vertexStrokeColors.slice(-4),y[2]=this.curStrokeColor.slice(),4===l){this.isQuadratic=!0;var i=[this.immediateMode._quadraticVertex[0],arguments.length<=0?void 0:arguments[0],arguments.length<=2?void 0:arguments[2]],a=[this.immediateMode._quadraticVertex[1],arguments.length<=1?void 0:arguments[1],arguments.length<=3?void 0:arguments[3]],g=Math.hypot(i[0]-i[1],a[0]-a[1]);for(g/=g+Math.hypot(i[1]-i[2],a[1]-a[2]),n=0;n<4;n++)p[1].push(p[0][n]*(1-g)+p[2][n]*g),y[1].push(y[0][n]*(1-g)+y[2][n]*g);for(o=0;o<f;o++){for(this.curFillColor=[0,0,0,0],this.curStrokeColor=[0,0,0,0],m=e=t=0;m<3;m++){for(n=0;n<4;n++)this.curFillColor[n]+=this._lookUpTableQuadratic[o][m]*p[m][n],this.curStrokeColor[n]+=this._lookUpTableQuadratic[o][m]*y[m][n];e+=i[m]*this._lookUpTableQuadratic[o][m],t+=a[m]*this._lookUpTableQuadratic[o][m]}this.vertex(e,t)}this.curFillColor=p[2],this.curStrokeColor=y[2],this.immediateMode._quadraticVertex[0]=arguments.length<=2?void 0:arguments[2],this.immediateMode._quadraticVertex[1]=arguments.length<=3?void 0:arguments[3]}else if(6===l){this.isQuadratic=!0,i=[this.immediateMode._quadraticVertex[0],arguments.length<=0?void 0:arguments[0],arguments.length<=3?void 0:arguments[3]],a=[this.immediateMode._quadraticVertex[1],arguments.length<=1?void 0:arguments[1],arguments.length<=4?void 0:arguments[4]];var v=[this.immediateMode._quadraticVertex[2],arguments.length<=2?void 0:arguments[2],arguments.length<=5?void 0:arguments[5]],b=Math.hypot(i[0]-i[1],a[0]-a[1],v[0]-v[1]);for(b/=b+Math.hypot(i[1]-i[2],a[1]-a[2],v[1]-v[2]),n=0;n<4;n++)p[1].push(p[0][n]*(1-b)+p[2][n]*b),y[1].push(y[0][n]*(1-b)+y[2][n]*b);for(o=0;o<f;o++){for(this.curFillColor=[0,0,0,0],this.curStrokeColor=[0,0,0,0],m=e=t=r=0;m<3;m++){for(n=0;n<4;n++)this.curFillColor[n]+=this._lookUpTableQuadratic[o][m]*p[m][n],this.curStrokeColor[n]+=this._lookUpTableQuadratic[o][m]*y[m][n];e+=i[m]*this._lookUpTableQuadratic[o][m],t+=a[m]*this._lookUpTableQuadratic[o][m],r+=v[m]*this._lookUpTableQuadratic[o][m]}this.vertex(e,t,r)}this.curFillColor=p[2],this.curStrokeColor=y[2],this.immediateMode._quadraticVertex[0]=arguments.length<=3?void 0:arguments[3],this.immediateMode._quadraticVertex[1]=arguments.length<=4?void 0:arguments[4],this.immediateMode._quadraticVertex[2]=arguments.length<=5?void 0:arguments[5]}},S.default.RendererGL.prototype.curveVertex=function(){var e,t,r,o,n,s,i=[],a=[],l=arguments.length;if(0===this._lookUpTableBezier.length||this._lutBezierDetail!==this._pInst._curveDetail){this._lookUpTableBezier=[],this._lutBezierDetail=this._pInst._curveDetail;for(var u=1/this._lutBezierDetail,c=0,d=1,h=0;c<1;){if(s=parseFloat(c.toFixed(6)),this._lookUpTableBezier[h]=this._bezierCoefficients(s),d.toFixed(6)===u.toFixed(6)){s=parseFloat(d.toFixed(6))+parseFloat(c.toFixed(6)),++h,this._lookUpTableBezier[h]=this._bezierCoefficients(s);break}c+=u,d-=u,++h}}var f=this._lookUpTableBezier.length;if(2===l){if(this.immediateMode._curveVertex.push(arguments.length<=0?void 0:arguments[0]),this.immediateMode._curveVertex.push(arguments.length<=1?void 0:arguments[1]),8===this.immediateMode._curveVertex.length){for(this.isCurve=!0,i=this._bezierToCatmull([this.immediateMode._curveVertex[0],this.immediateMode._curveVertex[2],this.immediateMode._curveVertex[4],this.immediateMode._curveVertex[6]]),a=this._bezierToCatmull([this.immediateMode._curveVertex[1],this.immediateMode._curveVertex[3],this.immediateMode._curveVertex[5],this.immediateMode._curveVertex[7]]),n=0;n<f;n++)t=i[0]*this._lookUpTableBezier[n][0]+i[1]*this._lookUpTableBezier[n][1]+i[2]*this._lookUpTableBezier[n][2]+i[3]*this._lookUpTableBezier[n][3],r=a[0]*this._lookUpTableBezier[n][0]+a[1]*this._lookUpTableBezier[n][1]+a[2]*this._lookUpTableBezier[n][2]+a[3]*this._lookUpTableBezier[n][3],this.vertex(t,r);for(n=0;n<l;n++)this.immediateMode._curveVertex.shift()}}else if(3===l&&(this.immediateMode._curveVertex.push(arguments.length<=0?void 0:arguments[0]),this.immediateMode._curveVertex.push(arguments.length<=1?void 0:arguments[1]),this.immediateMode._curveVertex.push(arguments.length<=2?void 0:arguments[2]),12===this.immediateMode._curveVertex.length)){for(this.isCurve=!0,i=this._bezierToCatmull([this.immediateMode._curveVertex[0],this.immediateMode._curveVertex[3],this.immediateMode._curveVertex[6],this.immediateMode._curveVertex[9]]),a=this._bezierToCatmull([this.immediateMode._curveVertex[1],this.immediateMode._curveVertex[4],this.immediateMode._curveVertex[7],this.immediateMode._curveVertex[10]]),e=this._bezierToCatmull([this.immediateMode._curveVertex[2],this.immediateMode._curveVertex[5],this.immediateMode._curveVertex[8],this.immediateMode._curveVertex[11]]),n=0;n<f;n++)t=i[0]*this._lookUpTableBezier[n][0]+i[1]*this._lookUpTableBezier[n][1]+i[2]*this._lookUpTableBezier[n][2]+i[3]*this._lookUpTableBezier[n][3],r=a[0]*this._lookUpTableBezier[n][0]+a[1]*this._lookUpTableBezier[n][1]+a[2]*this._lookUpTableBezier[n][2]+a[3]*this._lookUpTableBezier[n][3],o=e[0]*this._lookUpTableBezier[n][0]+e[1]*this._lookUpTableBezier[n][1]+e[2]*this._lookUpTableBezier[n][2]+e[3]*this._lookUpTableBezier[n][3],this.vertex(t,r,o);for(n=0;n<l;n++)this.immediateMode._curveVertex.shift()}},S.default.RendererGL.prototype.image=function(e,t,r,o,n,s,i,a,l){this._isErasing&&this.blendMode(this._cachedBlendMode),this._pInst.push(),this._pInst.noLights(),this._pInst.noStroke(),this._pInst.texture(e),this._pInst.textureMode(_.NORMAL);var u=0,c=(t<=e.width&&(u=t/e.width),1),t=(t+o<=e.width&&(c=(t+o)/e.width),0),o=(r<=e.height&&(t=r/e.height),1);r+n<=e.height&&(o=(r+n)/e.height),this.beginShape(),this.vertex(s,i,0,u,t),this.vertex(s+a,i,0,c,t),this.vertex(s+a,i+l,0,c,o),this.vertex(s,i+l,0,u,o),this.endShape(_.CLOSE),this._pInst.pop(),this._isErasing&&this.blendMode(_.REMOVE)};var n=S.default;r.default=n},{"../core/constants":264,"../core/main":275,"./p5.Geometry":327,"core-js/modules/es.array.concat":151,"core-js/modules/es.array.for-each":157,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.slice":165,"core-js/modules/es.math.hypot":170,"core-js/modules/es.math.sign":172,"core-js/modules/es.number.to-fixed":175,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.to-string":182,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}],319:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.every"),e("core-js/modules/es.array.from"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.map"),e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.every"),e("core-js/modules/es.array.map"),e("core-js/modules/es.object.assign"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=(c=e("../core/main"))&&c.__esModule?c:{default:c},a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("../core/constants"));function l(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,l=function(){return e},e)}function s(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function u(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var c=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");(this.renderer=e)._pInst.push(),this.identityMatrix=new n.default.Matrix,e.uMVMatrix=new n.default.Matrix,this.geometry=new n.default.Geometry,this.geometry.gid="_p5_GeometryBuilder_".concat(t.nextGeometryId),t.nextGeometryId++,this.hasTransform=!1}var e,r,o;return e=t,(r=[{key:"transformVertices",value:function(e){var t=this;return this.hasTransform?e.map(function(e){return t.renderer.uMVMatrix.multiplyPoint(e)}):e}},{key:"transformNormals",value:function(e){var t=this;return this.hasTransform?e.map(function(e){return t.renderer.uNMatrix.multiplyVec3(e)}):e}},{key:"addGeometry",value:function(e){for(var t,r=this,o=(this.hasTransform=!this.renderer.uMVMatrix.mat4.every(function(e,t){return e===r.identityMatrix.mat4[t]}),this.hasTransform&&this.renderer.uNMatrix.inverseTranspose(this.renderer.uMVMatrix),this.geometry.vertices.length),n=((t=this.geometry.vertices).push.apply(t,s(this.transformVertices(e.vertices))),(t=this.geometry.vertexNormals).push.apply(t,s(this.transformNormals(e.vertexNormals))),(t=this.geometry.uvs).push.apply(t,s(e.uvs)),this.renderer._doFill&&(t=this.geometry.faces).push.apply(t,s(e.faces.map(function(e){return e.map(function(e){return e+o})}))),this.renderer._doStroke&&(t=this.geometry.edges).push.apply(t,s(e.edges.map(function(e){return e.map(function(e){return e+o})}))),s(e.vertexColors));n.length<4*e.vertices.length;)n.push.apply(n,s(this.renderer.curFillColor));(t=this.geometry.vertexColors).push.apply(t,s(n))}},{key:"addImmediate",value:function(){var e=this.renderer.immediateMode.geometry,t=this.renderer.immediateMode.shapeMode,r=[];if(this.renderer._doFill)if(t===a.TRIANGLE_STRIP||t===a.QUAD_STRIP)for(var o=2;o<e.vertices.length;o++)o%2==0?r.push([o,o-1,o-2]):r.push([o,o-2,o-1]);else if(t===a.TRIANGLE_FAN)for(var n=2;n<e.vertices.length;n++)r.push([0,n-1,n]);else for(var s=0;s<e.vertices.length;s+=3)r.push([s,s+1,s+2]);this.addGeometry(Object.assign({},e,{faces:r}))}},{key:"addRetained",value:function(e){this.addGeometry(e.model)}},{key:"finish",value:function(){return this.renderer._pInst.pop(),this.geometry}}])&&u(e.prototype,r),o&&u(e,o),t}();c.nextGeometryId=0,r.default=c},{"../core/constants":264,"../core/main":275,"core-js/modules/es.array.every":153,"core-js/modules/es.array.from":158,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.map":164,"core-js/modules/es.object.assign":176,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.to-string":182,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}],320:[function(e,t,r){"use strict";function o(e){return(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})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.for-each"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.splice"),e("core-js/modules/es.math.hypot"),e("core-js/modules/es.math.sign"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.for-each"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.for-each"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.splice"),e("core-js/modules/es.math.hypot"),e("core-js/modules/es.math.sign"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/web.dom-collections.for-each"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var g=(s=e("../core/main"))&&s.__esModule?s:{default:s},n=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==v(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("../core/constants"));function i(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,i=function(){return e},e)}function v(e){return(v="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}g.default.prototype.orbitControl=function(e,t,r,o){var n=this,s=(this._assert3d("orbitControl"),g.default._validateParameters("orbitControl",arguments),this._renderer._curCamera);void 0===e&&(e=1),void 0===t&&(t=e),void 0===r&&(r=1),"object"!==v(o)&&(o={}),!0!==this.contextMenuDisabled&&(this.canvas.oncontextmenu=function(){return!1},this._setProperty("contextMenuDisabled",!0)),!0!==this.wheelDefaultDisabled&&(this.canvas.onwheel=function(){return!1},this._setProperty("wheelDefaultDisabled",!0));var i=o.disableTouchActions;!0===this.touchActionsDisabled||void 0!==i&&!i||(this.canvas.style["touch-action"]="none",this._setProperty("touchActionsDisabled",!0));var a,l,u,i=o.freeRotation,o=void 0!==i&&i,c=[],i=(this.touches.forEach(function(t){n._renderer.prevTouches.forEach(function(e){t.id===e.id&&(e={x:t.x,y:t.y,px:e.x,py:e.y},c.push(e))})}),this._renderer.prevTouches=this.touches,0),d=0,h=0,f=0,p=0,m=this.height<this.width?this.height:this.width,y=!1;return 0<c.length?(y=0<c[0].x&&c[0].x<this.width&&0<c[0].y&&c[0].y<this.height,1===c.length?(d=-e*((a=c[0]).x-a.px)/m,h=t*(a.y-a.py)/m):(a=c[0],l=c[1],i=-(Math.hypot(a.x-l.x,a.y-l.y)-Math.hypot(a.px-l.px,a.py-l.py))*r*4e-4,f=.5*(a.x+l.x)-.5*(a.px+l.px),p=.5*(a.y+l.y)-.5*(a.py+l.py)),0<this.touches.length?y&&(this._renderer.executeRotateAndMove=!0,this._renderer.executeZoom=!0):(this._renderer.executeRotateAndMove=!1,this._renderer.executeZoom=!1)):(y=0<this.mouseX&&this.mouseX<this.width&&0<this.mouseY&&this.mouseY<this.height,0!==this._mouseWheelDeltaY?(i=Math.sign(this._mouseWheelDeltaY)*r,i*=.01,this._mouseWheelDeltaY=0,y&&(this._renderer.executeZoom=!0)):this._renderer.zoomFlag=!1,this.mouseIsPressed?(this.mouseButton===this.LEFT?(d=-e*this.movedX/m,h=t*this.movedY/m):this.mouseButton===this.RIGHT&&(f=this.movedX,p=this.movedY*s.yScale),y&&(this._renderer.executeRotateAndMove=!0)):this._renderer.executeRotateAndMove=!1),0!==i&&this._renderer.executeZoom&&(this._renderer.zoomVelocity+=i),.001<Math.abs(this._renderer.zoomVelocity)?(o?s._orbitFree(0,0,this._renderer.zoomVelocity):s._orbit(0,0,this._renderer.zoomVelocity),0!==s.projMatrix.mat4[15]&&(s.projMatrix.mat4[0]*=Math.pow(10,-this._renderer.zoomVelocity),s.projMatrix.mat4[5]*=Math.pow(10,-this._renderer.zoomVelocity),this._renderer.uPMatrix.mat4[0]=s.projMatrix.mat4[0],this._renderer.uPMatrix.mat4[5]=s.projMatrix.mat4[5]),this._renderer.zoomVelocity*=.85):this._renderer.zoomVelocity=0,0===d&&0===h||!this._renderer.executeRotateAndMove||this._renderer.rotateVelocity.add(.6*d,.6*h),1e-6<this._renderer.rotateVelocity.magSq()?(o?s._orbitFree(-this._renderer.rotateVelocity.x,this._renderer.rotateVelocity.y,0):s._orbit(this._renderer.rotateVelocity.x,this._renderer.rotateVelocity.y,0),this._renderer.rotateVelocity.mult(.85)):this._renderer.rotateVelocity.set(0,0),0===f&&0===p||!this._renderer.executeRotateAndMove||(a=2*f/this.width,l=2*-p/this.height,this._renderer.moveVelocity.add(.15*a,.15*l)),1e-6<this._renderer.moveVelocity.magSq()?(r=s._getLocalAxes(),e=s.eyeX-s.centerX,t=s.eyeY-s.centerY,m=s.eyeZ-s.centerZ,y=Math.sqrt(e*e+t*t+m*m),i=new g.default.Vector(s.centerX,s.centerY,s.centerZ),i=s.cameraMatrix.multiplyPoint(i),(i=this._renderer.uPMatrix.multiplyAndNormalizePoint(i)).x-=this._renderer.moveVelocity.x,i.y-=this._renderer.moveVelocity.y,h=0===(d=this._renderer.uPMatrix.mat4)[15]?(u=(d[8]+i.x)/d[0]*y,(d[9]+i.y)/d[5]*y):(u=(i.x-d[12])/d[0],(i.y-d[13])/d[5]),s.setPosition(s.eyeX+u*r.x[0]+h*r.y[0],s.eyeY+u*r.x[1]+h*r.y[1],s.eyeZ+u*r.x[2]+h*r.y[2]),this._renderer.moveVelocity.mult(.85)):this._renderer.moveVelocity.set(0,0),this},g.default.prototype.debugMode=function(){this._assert3d("debugMode");for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];g.default._validateParameters("debugMode",t);for(var o=this._registeredMethods.post.length-1;0<=o;o--)this._registeredMethods.post[o].toString()!==this._grid().toString()&&this._registeredMethods.post[o].toString()!==this._axesIcon().toString()||this._registeredMethods.post.splice(o,1);t[0]===n.GRID?this.registerMethod("post",this._grid.call(this,t[1],t[2],t[3],t[4],t[5])):t[0]===n.AXES?this.registerMethod("post",this._axesIcon.call(this,t[1],t[2],t[3],t[4])):(this.registerMethod("post",this._grid.call(this,t[0],t[1],t[2],t[3],t[4])),this.registerMethod("post",this._axesIcon.call(this,t[5],t[6],t[7],t[8])))},g.default.prototype.noDebugMode=function(){this._assert3d("noDebugMode");for(var e=this._registeredMethods.post.length-1;0<=e;e--)this._registeredMethods.post[e].toString()!==this._grid().toString()&&this._registeredMethods.post[e].toString()!==this._axesIcon().toString()||this._registeredMethods.post.splice(e,1)},g.default.prototype._grid=function(e,r,o,n,s){void 0===e&&(e=this.width/2),void 0===r&&(r=Math.round(e/30)<4?4:Math.round(e/30)),void 0===o&&(o=0),void 0===n&&(n=0),void 0===s&&(s=0);var i=e/r,a=e/2;return function(){this.push(),this.stroke(255*this._renderer.curStrokeColor[0],255*this._renderer.curStrokeColor[1],255*this._renderer.curStrokeColor[2]),this._renderer.uMVMatrix.set(this._renderer._curCamera.cameraMatrix.mat4[0],this._renderer._curCamera.cameraMatrix.mat4[1],this._renderer._curCamera.cameraMatrix.mat4[2],this._renderer._curCamera.cameraMatrix.mat4[3],this._renderer._curCamera.cameraMatrix.mat4[4],this._renderer._curCamera.cameraMatrix.mat4[5],this._renderer._curCamera.cameraMatrix.mat4[6],this._renderer._curCamera.cameraMatrix.mat4[7],this._renderer._curCamera.cameraMatrix.mat4[8],this._renderer._curCamera.cameraMatrix.mat4[9],this._renderer._curCamera.cameraMatrix.mat4[10],this._renderer._curCamera.cameraMatrix.mat4[11],this._renderer._curCamera.cameraMatrix.mat4[12],this._renderer._curCamera.cameraMatrix.mat4[13],this._renderer._curCamera.cameraMatrix.mat4[14],this._renderer._curCamera.cameraMatrix.mat4[15]);for(var e=0;e<=r;e++)this.beginShape(this.LINES),this.vertex(-a+o,n,e*i-a+s),this.vertex(a+o,n,e*i-a+s),this.endShape();for(var t=0;t<=r;t++)this.beginShape(this.LINES),this.vertex(t*i-a+o,n,-a+s),this.vertex(t*i-a+o,n,a+s),this.endShape();this.pop()}},g.default.prototype._axesIcon=function(e,t,r,o){return void 0===e&&(e=40<this.width/20?this.width/20:40),void 0===t&&(t=-this.width/4),void 0===r&&(r=t),void 0===o&&(o=t),function(){this.push(),this._renderer.uMVMatrix.set(this._renderer._curCamera.cameraMatrix.mat4[0],this._renderer._curCamera.cameraMatrix.mat4[1],this._renderer._curCamera.cameraMatrix.mat4[2],this._renderer._curCamera.cameraMatrix.mat4[3],this._renderer._curCamera.cameraMatrix.mat4[4],this._renderer._curCamera.cameraMatrix.mat4[5],this._renderer._curCamera.cameraMatrix.mat4[6],this._renderer._curCamera.cameraMatrix.mat4[7],this._renderer._curCamera.cameraMatrix.mat4[8],this._renderer._curCamera.cameraMatrix.mat4[9],this._renderer._curCamera.cameraMatrix.mat4[10],this._renderer._curCamera.cameraMatrix.mat4[11],this._renderer._curCamera.cameraMatrix.mat4[12],this._renderer._curCamera.cameraMatrix.mat4[13],this._renderer._curCamera.cameraMatrix.mat4[14],this._renderer._curCamera.cameraMatrix.mat4[15]),this.strokeWeight(2),this.stroke(255,0,0),this.beginShape(this.LINES),this.vertex(t,r,o),this.vertex(t+e,r,o),this.endShape(),this.stroke(0,255,0),this.beginShape(this.LINES),this.vertex(t,r,o),this.vertex(t,r+e,o),this.endShape(),this.stroke(0,0,255),this.beginShape(this.LINES),this.vertex(t,r,o),this.vertex(t,r,o+e),this.endShape(),this.pop()}};var s=g.default;r.default=s},{"../core/constants":264,"../core/main":275,"core-js/modules/es.array.for-each":157,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.splice":167,"core-js/modules/es.math.hypot":170,"core-js/modules/es.math.sign":172,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.to-string":182,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.for-each":237,"core-js/modules/web.dom-collections.iterator":238}],321:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var m=(e=e("../core/main"))&&e.__esModule?e:{default:e};m.default.prototype.ambientLight=function(e,t,r,o){this._assert3d("ambientLight"),m.default._validateParameters("ambientLight",arguments);var n=this.color.apply(this,arguments);return this._renderer.ambientLightColors.push(n._array[0],n._array[1],n._array[2]),this._renderer._enableLighting=!0,this},m.default.prototype.specularColor=function(e,t,r){this._assert3d("specularColor"),m.default._validateParameters("specularColor",arguments);var o=this.color.apply(this,arguments);return this._renderer.specularColors=[o._array[0],o._array[1],o._array[2]],this},m.default.prototype.directionalLight=function(e,t,r,o,n,s){this._assert3d("directionalLight"),m.default._validateParameters("directionalLight",arguments),e=e instanceof m.default.Color?e:this.color(e,t,r);var i,a,t=arguments[arguments.length-1],r="number"==typeof t?(i=arguments[arguments.length-3],a=arguments[arguments.length-2],arguments[arguments.length-1]):(i=t.x,a=t.y,t.z),t=Math.sqrt(i*i+a*a+r*r);return this._renderer.directionalLightDirections.push(i/t,a/t,r/t),this._renderer.directionalLightDiffuseColors.push(e._array[0],e._array[1],e._array[2]),Array.prototype.push.apply(this._renderer.directionalLightSpecularColors,this._renderer.specularColors),this._renderer._enableLighting=!0,this},m.default.prototype.pointLight=function(e,t,r,o,n,s){this._assert3d("pointLight"),m.default._validateParameters("pointLight",arguments),e=e instanceof m.default.Color?e:this.color(e,t,r);var i,a,t=arguments[arguments.length-1],r="number"==typeof t?(i=arguments[arguments.length-3],a=arguments[arguments.length-2],arguments[arguments.length-1]):(i=t.x,a=t.y,t.z);return this._renderer.pointLightPositions.push(i,a,r),this._renderer.pointLightDiffuseColors.push(e._array[0],e._array[1],e._array[2]),Array.prototype.push.apply(this._renderer.pointLightSpecularColors,this._renderer.specularColors),this._renderer._enableLighting=!0,this},m.default.prototype.imageLight=function(e){this._renderer.activeImageLight=e,this._renderer._enableLighting=!0},m.default.prototype.lights=function(){this._assert3d("lights");var e=this.color("rgb(128,128,128)");return this.ambientLight(e),this.directionalLight(e,0,0,-1),this},m.default.prototype.lightFalloff=function(e,t,r){return this._assert3d("lightFalloff"),m.default._validateParameters("lightFalloff",arguments),e<0&&(e=0,console.warn("Value of constant argument in lightFalloff() should be never be negative. Set to 0.")),t<0&&(t=0,console.warn("Value of linear argument in lightFalloff() should be never be negative. Set to 0.")),r<0&&(r=0,console.warn("Value of quadratic argument in lightFalloff() should be never be negative. Set to 0.")),0===e&&0===t&&0===r&&(e=1,console.warn("Either one of the three arguments in lightFalloff() should be greater than zero. Set constant argument to 1.")),this._renderer.constantAttenuation=e,this._renderer.linearAttenuation=t,this._renderer.quadraticAttenuation=r,this},m.default.prototype.spotLight=function(e,t,r,o,n,s,i,a,l,u,c){this._assert3d("spotLight"),m.default._validateParameters("spotLight",arguments);var d,h,f,p=arguments.length;switch(p){case 11:case 10:d=this.color(e,t,r),h=new m.default.Vector(o,n,s),f=new m.default.Vector(i,a,l);break;case 9:e instanceof m.default.Color?(d=e,h=new m.default.Vector(t,r,o),f=new m.default.Vector(n,s,i),u=a,c=l):o instanceof m.default.Vector?(d=this.color(e,t,r),h=o,f=new m.default.Vector(n,s,i),u=a,c=l):i instanceof m.default.Vector?(d=this.color(e,t,r),h=new m.default.Vector(o,n,s),f=i,u=a,c=l):(d=this.color(e,t,r),h=new m.default.Vector(o,n,s),f=new m.default.Vector(i,a,l));break;case 8:u=(f=e instanceof m.default.Color?(d=e,h=new m.default.Vector(t,r,o),new m.default.Vector(n,s,i)):o instanceof m.default.Vector?(d=this.color(e,t,r),h=o,new m.default.Vector(n,s,i)):(d=this.color(e,t,r),h=new m.default.Vector(o,n,s),i),a);break;case 7:e instanceof m.default.Color&&t instanceof m.default.Vector?(d=e,h=t,f=new m.default.Vector(r,o,n),u=s,c=i):e instanceof m.default.Color&&n instanceof m.default.Vector?(d=e,h=new m.default.Vector(t,r,o),f=n,u=s,c=i):o instanceof m.default.Vector&&n instanceof m.default.Vector?(d=this.color(e,t,r),h=o,f=n,u=s,c=i):f=e instanceof m.default.Color?(d=e,h=new m.default.Vector(t,r,o),new m.default.Vector(n,s,i)):o instanceof m.default.Vector?(d=this.color(e,t,r),h=o,new m.default.Vector(n,s,i)):(d=this.color(e,t,r),h=new m.default.Vector(o,n,s),i);break;case 6:o instanceof m.default.Vector&&n instanceof m.default.Vector?(d=this.color(e,t,r),h=o,f=n,u=s):e instanceof m.default.Color&&n instanceof m.default.Vector?(d=e,h=new m.default.Vector(t,r,o),f=n,u=s):e instanceof m.default.Color&&t instanceof m.default.Vector&&(d=e,h=t,f=new m.default.Vector(r,o,n),u=s);break;case 5:e instanceof m.default.Color&&t instanceof m.default.Vector&&r instanceof m.default.Vector?(d=e,h=t,f=r,u=o,c=n):o instanceof m.default.Vector&&n instanceof m.default.Vector?(d=this.color(e,t,r),h=o,f=n):e instanceof m.default.Color&&n instanceof m.default.Vector?(d=e,h=new m.default.Vector(t,r,o),f=n):e instanceof m.default.Color&&t instanceof m.default.Vector&&(d=e,h=t,f=new m.default.Vector(r,o,n));break;case 4:d=e,h=t,f=r,u=o;break;case 3:d=e,h=t,f=r;break;default:return console.warn("Sorry, input for spotlight() is not in prescribed format. Too ".concat(p<3?"few":"many"," arguments were provided")),this}return this._renderer.spotLightDiffuseColors.push(d._array[0],d._array[1],d._array[2]),Array.prototype.push.apply(this._renderer.spotLightSpecularColors,this._renderer.specularColors),this._renderer.spotLightPositions.push(h.x,h.y,h.z),f.normalize(),this._renderer.spotLightDirections.push(f.x,f.y,f.z),void 0===u&&(u=Math.PI/3),void 0!==c&&c<1?(c=1,console.warn("Value of concentration needs to be greater than 1. Setting it to 1")):void 0===c&&(c=100),u=this._renderer._pInst._toRadians(u),this._renderer.spotLightAngle.push(Math.cos(u)),this._renderer.spotLightConc.push(c),this._renderer._enableLighting=!0,this},m.default.prototype.noLights=function(){this._assert3d("noLights");for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return m.default._validateParameters("noLights",t),this._renderer._enableLighting=!1,this._renderer.ambientLightColors.length=0,this._renderer.specularColors=[1,1,1],this._renderer.directionalLightDirections.length=0,this._renderer.directionalLightDiffuseColors.length=0,this._renderer.directionalLightSpecularColors.length=0,this._renderer.pointLightPositions.length=0,this._renderer.pointLightDiffuseColors.length=0,this._renderer.pointLightSpecularColors.length=0,this._renderer.spotLightPositions.length=0,this._renderer.spotLightDirections.length=0,this._renderer.spotLightDiffuseColors.length=0,this._renderer.spotLightSpecularColors.length=0,this._renderer.spotLightAngle.length=0,this._renderer.spotLightConc.length=0,this._renderer.constantAttenuation=1,this._renderer.linearAttenuation=0,this._renderer.quadraticAttenuation=0,this._renderer._useShininess=1,this};e=m.default;r.default=e},{"../core/main":275}],322:[function(e,t,r){"use strict";e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.array.splice"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.match"),e("core-js/modules/es.string.split"),e("core-js/modules/es.string.trim"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.array.splice"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.match"),e("core-js/modules/es.string.split"),e("core-js/modules/es.string.trim"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var x=(o=e("../core/main"))&&o.__esModule?o:{default:o};e("./p5.Geometry"),x.default.prototype.loadModel=function(e){x.default._validateParameters("loadModel",arguments);var y,g,t,r=e.slice(-4),v=("boolean"==typeof arguments[1]?(y=arguments[1],g=arguments[2],t=arguments[3],void 0!==arguments[4]&&(r=arguments[4])):(y=!1,g=arguments[1],t=arguments[2],void 0!==arguments[3]&&(r=arguments[3])),new x.default.Geometry),b=(v.gid="".concat(e,"|").concat(y),this);return r.match(/\.stl$/i)?this.httpDo(e,"GET","arrayBuffer",function(e){!function(e,t){if(function(e){for(var t=new DataView(e),r=[115,111,108,105,100],o=0;o<5;o++)if(function(e,t,r){for(var o=0,n=e.length;o<n;o++)if(e[o]!==t.getUint8(r+o,!1))return;return 1}(r,t,o))return;return 1}(t))!function(e,t){for(var r,o,n,s,i,a,l,u=new DataView(t),c=u.getUint32(80,!0),d=!1,h=0;h<70;h++)1129270351===u.getUint32(h,!1)&&82===u.getUint8(h+4)&&61===u.getUint8(h+5)&&(d=!0,s=[],i=u.getUint8(h+6)/255,a=u.getUint8(h+7)/255,l=u.getUint8(h+8)/255);for(var f=0;f<c;f++){for(var p,m=84+50*f,y=u.getFloat32(m,!0),g=u.getFloat32(4+m,!0),v=u.getFloat32(8+m,!0),b=(d&&(p=u.getUint16(48+m,!0),n=0==(32768&p)?(r=(31&p)/31,o=(p>>5&31)/31,(p>>10&31)/31):(r=i,o=a,l)),new x.default.Vector(y,g,v)),j=1;j<=3;j++){var _=m+12*j,_=new x.default.Vector(u.getFloat32(_,!0),u.getFloat32(4+_,!0),u.getFloat32(8+_,!0));e.vertices.push(_),e.vertexNormals.push(b),d&&s.push(r,o,n)}e.faces.push([3*f,3*f+1,3*f+2]),e.uvs.push([0,0],[0,0],[0,0])}}(e,t);else{t=new DataView(t);if(!("TextDecoder"in window))return console.warn("Sorry, ASCII STL loading only works in browsers that support TextDecoder (https://caniuse.com/#feat=textencoder)");t=new TextDecoder("utf-8").decode(t).split("\n");!function(e,t){for(var r,o,n="",s=[],i=0;i<t.length;++i){for(var a=t[i].trim(),l=a.split(" "),u=0;u<l.length;++u)""===l[u]&&l.splice(u,1);if(0!==l.length)switch(n){case"":if("solid"!==l[0])return console.error(a),console.error('Invalid state "'.concat(l[0],'", should be "solid"'));n="solid";break;case"solid":if("facet"!==l[0]||"normal"!==l[1])return console.error(a),console.error('Invalid state "'.concat(l[0],'", should be "facet normal"'));r=new x.default.Vector(parseFloat(l[2]),parseFloat(l[3]),parseFloat(l[4])),e.vertexNormals.push(r,r,r),n="facet normal";break;case"facet normal":if("outer"!==l[0]||"loop"!==l[1])return console.error(a),console.error('Invalid state "'.concat(l[0],'", should be "outer loop"'));n="vertex";break;case"vertex":if("vertex"===l[0])o=new x.default.Vector(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3])),e.vertices.push(o),e.uvs.push([0,0]),s.push(e.vertices.indexOf(o));else{if("endloop"!==l[0])return console.error(a),console.error('Invalid state "'.concat(l[0],'", should be "vertex" or "endloop"'));e.faces.push(s),s=[],n="endloop"}break;case"endloop":if("endfacet"!==l[0])return console.error(a),console.error('Invalid state "'.concat(l[0],'", should be "endfacet"'));n="endfacet";break;case"endfacet":if("endsolid"!==l[0]){if("facet"!==l[0]||"normal"!==l[1])return console.error(a),console.error('Invalid state "'.concat(l[0],'", should be "endsolid" or "facet normal"'));r=new x.default.Vector(parseFloat(l[2]),parseFloat(l[3]),parseFloat(l[4])),e.vertexNormals.push(r,r,r),n="facet normal"}break;default:console.error('Invalid state "'.concat(n,'"'))}}}(e,t)}}(v,e),y&&v.normalize(),b._decrementPreload(),"function"==typeof g&&g(v)},t):r.match(/\.obj$/i)?this.loadStrings(e,function(e){for(var t=v,r=e,o={v:[],vt:[],vn:[]},n={},s=0;s<r.length;++s){var i=r[s].trim().split(/\b\s+/);if(0<i.length)if("v"===i[0]||"vn"===i[0]){var a=new x.default.Vector(parseFloat(i[1]),parseFloat(i[2]),parseFloat(i[3]));o[i[0]].push(a)}else if("vt"===i[0]){a=[parseFloat(i[1]),1-parseFloat(i[2])];o[i[0]].push(a)}else if("f"===i[0])for(var l=3;l<i.length;++l){for(var u=[],c=[1,l-1,l],d=0;d<c.length;++d){var h=i[c[d]],f=0;if(void 0!==n[h])f=n[h];else{for(var p=h.split("/"),m=0;m<p.length;m++)p[m]=parseInt(p[m])-1;f=n[h]=t.vertices.length,t.vertices.push(o.v[p[0]].copy()),o.vt[p[1]]?t.uvs.push(o.vt[p[1]].slice()):t.uvs.push([0,0]),o.vn[p[2]]&&t.vertexNormals.push(o.vn[p[2]].copy())}u.push(f)}u[0]!==u[1]&&u[0]!==u[2]&&u[1]!==u[2]&&t.faces.push(u)}}0===t.vertexNormals.length&&t.computeNormals(),y&&v.normalize(),b._decrementPreload(),"function"==typeof g&&g(v)},t):(x.default._friendlyFileLoadError(3,e),t?t():x.default._friendlyError("Sorry, the file type is invalid. Only OBJ and STL files are supported.")),v},x.default.prototype.model=function(e){this._assert3d("model"),x.default._validateParameters("model",arguments),0<e.vertices.length&&(this._renderer.geometryInHash(e.gid)||(0===e.edges.length&&e._makeTriangleEdges(),e._edgesToVertices(),this._renderer.createBuffers(e.gid,e)),this._renderer.drawBuffers(e.gid))};var o=x.default;r.default=o},{"../core/main":275,"./p5.Geometry":327,"core-js/modules/es.array.concat":151,"core-js/modules/es.array.index-of":160,"core-js/modules/es.array.slice":165,"core-js/modules/es.array.splice":167,"core-js/modules/es.object.to-string":182,"core-js/modules/es.regexp.exec":187,"core-js/modules/es.string.match":193,"core-js/modules/es.string.split":198,"core-js/modules/es.string.trim":201}],323:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.join"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.join"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.iterator"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var u=(s=e("../core/main"))&&s.__esModule?s:{default:s},n=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("../core/constants"));function a(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,a=function(){return e},e)}e("./p5.Texture"),u.default.prototype.loadShader=function(e,t,r,o){u.default._validateParameters("loadShader",arguments),o=o||console.error;function n(){i._decrementPreload(),r&&r(s)}var s=new u.default.Shader,i=this,a=!1,l=!1;return this.loadStrings(e,function(e){s._vertSrc=e.join("\n"),l=!0,a&&n()},o),this.loadStrings(t,function(e){s._fragSrc=e.join("\n"),a=!0,l&&n()},o),s},u.default.prototype.createShader=function(e,t){return u.default._validateParameters("createShader",arguments),new u.default.Shader(this._renderer,e,t)},u.default.prototype.createFilterShader=function(e){u.default._validateParameters("createFilterShader",arguments);var t=e.includes("#version 300 es")?"#version 300 es\n uniform mat4 uModelViewMatrix;\n uniform mat4 uProjectionMatrix;\n\n in vec3 aPosition;\n in vec2 aTexCoord;\n out vec2 vTexCoord;\n\n void main() {\n // transferring texcoords for the frag shader\n vTexCoord = aTexCoord;\n\n // copy position with a fourth coordinate for projection (1.0 is normal)\n vec4 positionVec4 = vec4(aPosition, 1.0);\n\n // project to 3D space\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n }\n ":"\n uniform mat4 uModelViewMatrix;\n uniform mat4 uProjectionMatrix;\n\n attribute vec3 aPosition;\n // texcoords only come from p5 to vertex shader\n // so pass texcoords on to the fragment shader in a varying variable\n attribute vec2 aTexCoord;\n varying vec2 vTexCoord;\n\n void main() {\n // transferring texcoords for the frag shader\n vTexCoord = aTexCoord;\n\n // copy position with a fourth coordinate for projection (1.0 is normal)\n vec4 positionVec4 = vec4(aPosition, 1.0);\n\n // project to 3D space\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n }\n ",t=new u.default.Shader(this._renderer,t,e);return this._renderer.GL?t.ensureCompiledOnContext(this):t.ensureCompiledOnContext(this._renderer.getFilterGraphicsLayer()),t},u.default.prototype.shader=function(e){return this._assert3d("shader"),u.default._validateParameters("shader",arguments),e.ensureCompiledOnContext(this),e.isStrokeShader()?this._renderer.userStrokeShader=e:(this._renderer.userFillShader=e,this._renderer._useNormalMaterial=!1),this},u.default.prototype.resetShader=function(){return this._renderer.userFillShader=this._renderer.userStrokeShader=null,this},u.default.prototype.texture=function(e){return this._assert3d("texture"),u.default._validateParameters("texture",arguments),e.gifProperties&&e._animateGif(this),this._renderer.drawMode=n.TEXTURE,this._renderer._useNormalMaterial=!1,this._renderer._tex=e,this._renderer._setProperty("_doFill",!0),this},u.default.prototype.textureMode=function(e){e!==n.IMAGE&&e!==n.NORMAL?console.warn("You tried to set ".concat(e," textureMode only supports IMAGE & NORMAL ")):this._renderer.textureMode=e},u.default.prototype.textureWrap=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,r=(this._renderer.textureWrapX=e,this._renderer.textureWrapY=t,!0),o=!1,n=void 0;try{for(var s,i=this._renderer.textures.values()[Symbol.iterator]();!(r=(s=i.next()).done);r=!0)s.value.setWrapMode(e,t)}catch(e){o=!0,n=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw n}}},u.default.prototype.normalMaterial=function(){this._assert3d("normalMaterial");for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return u.default._validateParameters("normalMaterial",t),this._renderer.drawMode=n.FILL,this._renderer._useSpecularMaterial=!1,this._renderer._useEmissiveMaterial=!1,this._renderer._useNormalMaterial=!0,this._renderer.curFillColor=[1,1,1,1],this._renderer._setProperty("_doFill",!0),this.noStroke(),this},u.default.prototype.ambientMaterial=function(e,t,r){this._assert3d("ambientMaterial"),u.default._validateParameters("ambientMaterial",arguments);var o=u.default.prototype.color.apply(this,arguments);return this._renderer._hasSetAmbient=!0,this._renderer.curAmbientColor=o._array,this._renderer._useNormalMaterial=!1,this._renderer._enableLighting=!0,this._renderer._setProperty("_doFill",!0),this},u.default.prototype.emissiveMaterial=function(e,t,r,o){this._assert3d("emissiveMaterial"),u.default._validateParameters("emissiveMaterial",arguments);var n=u.default.prototype.color.apply(this,arguments);return this._renderer.curEmissiveColor=n._array,this._renderer._useEmissiveMaterial=!0,this._renderer._useNormalMaterial=!1,this._renderer._enableLighting=!0,this},u.default.prototype.specularMaterial=function(e,t,r,o){this._assert3d("specularMaterial"),u.default._validateParameters("specularMaterial",arguments);var n=u.default.prototype.color.apply(this,arguments);return this._renderer.curSpecularColor=n._array,this._renderer._useSpecularMaterial=!0,this._renderer._useNormalMaterial=!1,this._renderer._enableLighting=!0,this},u.default.prototype.shininess=function(e){return this._assert3d("shininess"),u.default._validateParameters("shininess",arguments),this._renderer._useShininess=e=e<1?1:e,this},u.default.RendererGL.prototype._applyColorBlend=function(e){var t=this.GL,r=this.drawMode===n.TEXTURE,r=this.userFillShader||this.userStrokeShader||this.userPointShader||r||this.curBlendMode!==n.BLEND||e[e.length-1]<1||this._isErasing;return r!==this._isBlending&&(r||this.curBlendMode!==n.BLEND&&this.curBlendMode!==n.ADD?t.enable(t.BLEND):t.disable(t.BLEND),t.depthMask(!0),this._isBlending=r),this._applyBlendMode(),e},u.default.RendererGL.prototype._applyBlendMode=function(){if(this._cachedBlendMode!==this.curBlendMode){var e=this.GL;switch(this.curBlendMode){case n.BLEND:e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA);break;case n.ADD:e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ONE);break;case n.REMOVE:e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ZERO,e.ONE_MINUS_SRC_ALPHA);break;case n.MULTIPLY:e.blendEquation(e.FUNC_ADD),e.blendFunc(e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA);break;case n.SCREEN:e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_COLOR);break;case n.EXCLUSION:e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ONE_MINUS_DST_COLOR,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE);break;case n.REPLACE:e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ZERO);break;case n.SUBTRACT:e.blendEquationSeparate(e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD),e.blendFuncSeparate(e.ONE,e.ONE,e.ONE,e.ONE_MINUS_SRC_ALPHA);break;case n.DARKEST:this.blendExt?(e.blendEquationSeparate(this.blendExt.MIN||this.blendExt.MIN_EXT,e.FUNC_ADD),e.blendFuncSeparate(e.ONE,e.ONE,e.ONE,e.ONE)):console.warn("blendMode(DARKEST) does not work in your browser in WEBGL mode.");break;case n.LIGHTEST:this.blendExt?(e.blendEquationSeparate(this.blendExt.MAX||this.blendExt.MAX_EXT,e.FUNC_ADD),e.blendFuncSeparate(e.ONE,e.ONE,e.ONE,e.ONE)):console.warn("blendMode(LIGHTEST) does not work in your browser in WEBGL mode.");break;default:console.error("Oops! Somehow RendererGL set curBlendMode to an unsupported mode.")}this._isErasing||(this._cachedBlendMode=this.curBlendMode)}};var s=u.default;r.default=s},{"../core/constants":264,"../core/main":275,"./p5.Texture":334,"core-js/modules/es.array.includes":159,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.join":162,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.to-string":182,"core-js/modules/es.string.includes":191,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}],324:[function(e,t,r){"use strict";e("core-js/modules/es.array.slice"),e("core-js/modules/es.math.hypot"),e("core-js/modules/es.string.sub"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.math.hypot"),e("core-js/modules/es.string.sub"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var _=(e=e("../core/main"))&&e.__esModule?e:{default:e};function n(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}_.default.prototype.camera=function(){var e;this._assert3d("camera");for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return _.default._validateParameters("camera",r),(e=this._renderer._curCamera).camera.apply(e,r),this},_.default.prototype.perspective=function(){var e;this._assert3d("perspective");for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return _.default._validateParameters("perspective",r),(e=this._renderer._curCamera).perspective.apply(e,r),this},_.default.prototype.ortho=function(){var e;this._assert3d("ortho");for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return _.default._validateParameters("ortho",r),(e=this._renderer._curCamera).ortho.apply(e,r),this},_.default.prototype.frustum=function(){var e;this._assert3d("frustum");for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return _.default._validateParameters("frustum",r),(e=this._renderer._curCamera).frustum.apply(e,r),this},_.default.prototype.createCamera=function(){this._assert3d("createCamera");var e=new _.default.Camera(this._renderer);return e._computeCameraDefaultSettings(),e._setDefaultCamera(),this._renderer._curCamera=e},_.default.Camera=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this._renderer=e,this.cameraType="default",this.cameraMatrix=new _.default.Matrix,this.projMatrix=new _.default.Matrix,this.yScale=1}var e,r,o;return e=t,(r=[{key:"perspective",value:function(e,t,r,o){this.cameraType=0<arguments.length?"custom":"default",void 0===e?(e=this.defaultCameraFOV,this.cameraFOV=e):this.cameraFOV=this._renderer._pInst._toRadians(e),void 0===t&&(t=this.defaultAspectRatio),void 0===r&&(r=this.defaultCameraNear),void 0===o&&(o=this.defaultCameraFar),r<=1e-4&&(r=.01,console.log("Avoid perspective near plane values close to or below 0. Setting value to 0.01.")),o<r&&console.log("Perspective far plane value is less than near plane value. Nothing will be shown."),this.aspectRatio=t,this.cameraNear=r,this.cameraFar=o,this.projMatrix=_.default.Matrix.identity();var e=1/Math.tan(this.cameraFOV/2),n=1/(this.cameraNear-this.cameraFar);this.projMatrix.set(e/t,0,0,0,0,-e*this.yScale,0,0,0,0,(o+r)*n,-1,0,0,2*o*r*n,0),this._isActive()&&this._renderer.uPMatrix.set(this.projMatrix.mat4[0],this.projMatrix.mat4[1],this.projMatrix.mat4[2],this.projMatrix.mat4[3],this.projMatrix.mat4[4],this.projMatrix.mat4[5],this.projMatrix.mat4[6],this.projMatrix.mat4[7],this.projMatrix.mat4[8],this.projMatrix.mat4[9],this.projMatrix.mat4[10],this.projMatrix.mat4[11],this.projMatrix.mat4[12],this.projMatrix.mat4[13],this.projMatrix.mat4[14],this.projMatrix.mat4[15])}},{key:"ortho",value:function(e,t,r,o,n,s){void 0===e&&(e=-this._renderer.width/2),void 0===t&&(t=+this._renderer.width/2),void 0===r&&(r=-this._renderer.height/2),void 0===o&&(o=+this._renderer.height/2),void 0===n&&(n=0),void 0===s&&(s=Math.max(this._renderer.width,this._renderer.height)),this.cameraNear=n;var i=t-e,a=o-r,l=(this.cameraFar=s)-n,u=2/i,c=2/a*this.yScale,d=-2/l,t=-(t+e)/i,e=-(o+r)/a,i=-(s+n)/l;this.projMatrix=_.default.Matrix.identity(),this.projMatrix.set(u,0,0,0,0,-c,0,0,0,0,d,0,t,e,i,1),this._isActive()&&this._renderer.uPMatrix.set(this.projMatrix.mat4[0],this.projMatrix.mat4[1],this.projMatrix.mat4[2],this.projMatrix.mat4[3],this.projMatrix.mat4[4],this.projMatrix.mat4[5],this.projMatrix.mat4[6],this.projMatrix.mat4[7],this.projMatrix.mat4[8],this.projMatrix.mat4[9],this.projMatrix.mat4[10],this.projMatrix.mat4[11],this.projMatrix.mat4[12],this.projMatrix.mat4[13],this.projMatrix.mat4[14],this.projMatrix.mat4[15]),this.cameraType="custom"}},{key:"frustum",value:function(e,t,r,o,n,s){void 0===e&&(e=.05*-this._renderer.width),void 0===t&&(t=.05*+this._renderer.width),void 0===r&&(r=.05*+this._renderer.height),void 0===o&&(o=.05*-this._renderer.height),void 0===n&&(n=this.defaultCameraNear),void 0===s&&(s=this.defaultCameraFar),this.cameraNear=n;var i=t-e,a=o-r,l=(this.cameraFar=s)-n,u=2*n/i,c=2*n/a*this.yScale,d=-2*s*n/l,t=(t+e)/i,e=(o+r)/a,i=-(s+n)/l;this.projMatrix=_.default.Matrix.identity(),this.projMatrix.set(u,0,0,0,0,-c,0,0,t,e,i,-1,0,0,d,0),this._isActive()&&this._renderer.uPMatrix.set(this.projMatrix.mat4[0],this.projMatrix.mat4[1],this.projMatrix.mat4[2],this.projMatrix.mat4[3],this.projMatrix.mat4[4],this.projMatrix.mat4[5],this.projMatrix.mat4[6],this.projMatrix.mat4[7],this.projMatrix.mat4[8],this.projMatrix.mat4[9],this.projMatrix.mat4[10],this.projMatrix.mat4[11],this.projMatrix.mat4[12],this.projMatrix.mat4[13],this.projMatrix.mat4[14],this.projMatrix.mat4[15]),this.cameraType="custom"}},{key:"_rotateView",value:function(e,t,r,o){var n=this.centerX,s=this.centerY,i=this.centerZ,a=(n-=this.eyeX,s-=this.eyeY,i-=this.eyeZ,_.default.Matrix.identity(this._renderer._pInst)),e=(a.rotate(this._renderer._pInst._toRadians(e),t,r,o),[n*a.mat4[0]+s*a.mat4[4]+i*a.mat4[8],n*a.mat4[1]+s*a.mat4[5]+i*a.mat4[9],n*a.mat4[2]+s*a.mat4[6]+i*a.mat4[10]]);e[0]+=this.eyeX,e[1]+=this.eyeY,e[2]+=this.eyeZ,this.camera(this.eyeX,this.eyeY,this.eyeZ,e[0],e[1],e[2],this.upX,this.upY,this.upZ)}},{key:"pan",value:function(e){var t=this._getLocalAxes();this._rotateView(e,t.y[0],t.y[1],t.y[2])}},{key:"tilt",value:function(e){var t=this._getLocalAxes();this._rotateView(e,t.x[0],t.x[1],t.x[2])}},{key:"lookAt",value:function(e,t,r){this.camera(this.eyeX,this.eyeY,this.eyeZ,e,t,r,this.upX,this.upY,this.upZ)}},{key:"camera",value:function(e,t,r,o,n,s,i,a,l){void 0===e&&(e=this.defaultEyeX,t=this.defaultEyeY,r=this.defaultEyeZ,o=e,n=t,a=1,l=i=s=0),this.eyeX=e,this.eyeY=t,this.eyeZ=r,void 0!==o&&(this.centerX=o,this.centerY=n,this.centerZ=s),void 0!==i&&(this.upX=i,this.upY=a,this.upZ=l);o=this._getLocalAxes(),this.cameraMatrix.set(o.x[0],o.y[0],o.z[0],0,o.x[1],o.y[1],o.z[1],0,o.x[2],o.y[2],o.z[2],0,0,0,0,1),n=-e;return this.cameraMatrix.translate([n,-t,-r]),this._isActive()&&this._renderer.uMVMatrix.set(this.cameraMatrix.mat4[0],this.cameraMatrix.mat4[1],this.cameraMatrix.mat4[2],this.cameraMatrix.mat4[3],this.cameraMatrix.mat4[4],this.cameraMatrix.mat4[5],this.cameraMatrix.mat4[6],this.cameraMatrix.mat4[7],this.cameraMatrix.mat4[8],this.cameraMatrix.mat4[9],this.cameraMatrix.mat4[10],this.cameraMatrix.mat4[11],this.cameraMatrix.mat4[12],this.cameraMatrix.mat4[13],this.cameraMatrix.mat4[14],this.cameraMatrix.mat4[15]),this}},{key:"move",value:function(e,t,r){var o=this._getLocalAxes(),e=[o.x[0]*e,o.x[1]*e,o.x[2]*e],t=[o.y[0]*t,o.y[1]*t,o.y[2]*t],o=[o.z[0]*r,o.z[1]*r,o.z[2]*r];this.camera(this.eyeX+e[0]+t[0]+o[0],this.eyeY+e[1]+t[1]+o[1],this.eyeZ+e[2]+t[2]+o[2],this.centerX+e[0]+t[0]+o[0],this.centerY+e[1]+t[1]+o[1],this.centerZ+e[2]+t[2]+o[2],this.upX,this.upY,this.upZ)}},{key:"setPosition",value:function(e,t,r){var o=e-this.eyeX,n=t-this.eyeY,s=r-this.eyeZ;this.camera(e,t,r,this.centerX+o,this.centerY+n,this.centerZ+s,this.upX,this.upY,this.upZ)}},{key:"set",value:function(e){for(var t=0,r=["eyeX","eyeY","eyeZ","centerX","centerY","centerZ","upX","upY","upZ","cameraFOV","aspectRatio","cameraNear","cameraFar","cameraType","yScale"];t<r.length;t++){var o=r[t];this[o]=e[o]}this.cameraMatrix=e.cameraMatrix.copy(),this.projMatrix=e.projMatrix.copy(),this._isActive()&&(this._renderer.uMVMatrix.mat4=this.cameraMatrix.mat4.slice(),this._renderer.uPMatrix.mat4=this.projMatrix.mat4.slice())}},{key:"slerp",value:function(e,t,r){var o,n,s,i,a,l,u,c,d,h,f,p,m,y,g,v,b,j;0===r?this.set(e):1===r?this.set(t):(0!==this.projMatrix.mat4[15]&&(this.projMatrix.mat4[0]=e.projMatrix.mat4[0]*Math.pow(t.projMatrix.mat4[0]/e.projMatrix.mat4[0],r),this.projMatrix.mat4[5]=e.projMatrix.mat4[5]*Math.pow(t.projMatrix.mat4[5]/e.projMatrix.mat4[5],r),this._isActive()&&(this._renderer.uPMatrix.mat4=this.projMatrix.mat4.slice())),i=new _.default.Vector(e.eyeX,e.eyeY,e.eyeZ),a=new _.default.Vector(t.eyeX,t.eyeY,t.eyeZ),v=new _.default.Vector(e.centerX,e.centerY,e.centerZ),j=new _.default.Vector(t.centerX,t.centerY,t.centerZ),s=_.default.Vector.dist(i,v),o=_.default.Vector.dist(a,j),o=s*Math.pow(o/s,r),s=_.default.Vector.sub(i,a),n=1,1e-6<(b=(y=i.copy().sub(a).sub(v).add(j)).magSq())&&(n=_.default.Vector.dot(s,y)/b,n=Math.max(0,Math.min(n,1))),s=_.default.Vector.lerp(_.default.Vector.lerp(i,v,n),_.default.Vector.lerp(a,j,n),r),y=e.cameraMatrix.createSubMatrix3x3(),b=t.cameraMatrix.createSubMatrix3x3(),i=y.row(2),v=b.row(2),a=y.row(1),j=b.row(1),e=new _.default.Vector,t=new _.default.Vector,l=new _.default.Vector,u=new _.default.Vector,1-(c=.5*((y=(b=b.mult3x3(y.copy().transpose3x3())).diagonal())[0]+y[1]+y[2]-1))<1e-7?(e.set(_.default.Vector.lerp(i,v,r)).normalize(),l.set(e).mult(n*o).add(s),u.set(e).mult((n-1)*o).add(s),t.set(_.default.Vector.lerp(a,j,r)).normalize()):(v=1/(1-c),j=Math.max(y[0],y[1],y[2]),p=b.mat3[1]+b.mat3[3],m=b.mat3[2]+b.mat3[6],g=b.mat3[5]+b.mat3[7],j=j===y[0]?(h=.5*p*(v/=d=Math.sqrt((y[0]-c)*v)),f=.5*m*v,.5*(b.mat3[7]-b.mat3[5])/d):j===y[1]?(f=.5*g*(v/=h=Math.sqrt((y[1]-c)*v)),d=.5*p*v,.5*(b.mat3[2]-b.mat3[6])/h):(d=.5*m*(v/=f=Math.sqrt((y[2]-c)*v)),h=.5*g*v,.5*(b.mat3[3]-b.mat3[1])/f),p=r*Math.atan2(j,c),m=Math.cos(p),y=Math.sin(p),(j=new _.default.Matrix("mat3",[m+(g=1-m)*d*d,g*(v=d*h)+y*f,g*(b=f*d)-y*h,g*v-y*f,m+g*h*h,g*(r=h*f)+y*d,g*b+y*h,g*r-y*d,m+g*f*f])).multiplyVec3(i,e),l.set(e).mult(n*o).add(s),u.set(e).mult((n-1)*o).add(s),j.multiplyVec3(a,t)),this.camera(l.x,l.y,l.z,u.x,u.y,u.z,t.x,t.y,t.z))}},{key:"_computeCameraDefaultSettings",value:function(){this.defaultAspectRatio=this._renderer.width/this._renderer.height,this.defaultEyeX=0,this.defaultEyeY=0,this.defaultEyeZ=800,this.defaultCameraFOV=2*Math.atan(this._renderer.height/2/this.defaultEyeZ),this.defaultCenterX=0,this.defaultCenterY=0,this.defaultCenterZ=0,this.defaultCameraNear=.1*this.defaultEyeZ,this.defaultCameraFar=10*this.defaultEyeZ}},{key:"_setDefaultCamera",value:function(){this.cameraFOV=this.defaultCameraFOV,this.aspectRatio=this.defaultAspectRatio,this.eyeX=this.defaultEyeX,this.eyeY=this.defaultEyeY,this.eyeZ=this.defaultEyeZ,this.centerX=this.defaultCenterX,this.centerY=this.defaultCenterY,this.centerZ=this.defaultCenterZ,this.upX=0,this.upY=1,this.upZ=0,this.cameraNear=this.defaultCameraNear,this.cameraFar=this.defaultCameraFar,this.perspective(),this.camera(),this.cameraType="default"}},{key:"_resize",value:function(){"default"===this.cameraType&&(this._computeCameraDefaultSettings(),this.cameraFOV=this.defaultCameraFOV,this.aspectRatio=this.defaultAspectRatio,this.perspective())}},{key:"copy",value:function(){var e=new _.default.Camera(this._renderer);return e.cameraFOV=this.cameraFOV,e.aspectRatio=this.aspectRatio,e.eyeX=this.eyeX,e.eyeY=this.eyeY,e.eyeZ=this.eyeZ,e.centerX=this.centerX,e.centerY=this.centerY,e.centerZ=this.centerZ,e.upX=this.upX,e.upY=this.upY,e.upZ=this.upZ,e.cameraNear=this.cameraNear,e.cameraFar=this.cameraFar,e.cameraType=this.cameraType,e.cameraMatrix=this.cameraMatrix.copy(),e.projMatrix=this.projMatrix.copy(),e.yScale=this.yScale,e}},{key:"_getLocalAxes",value:function(){var e=this.eyeX-this.centerX,t=this.eyeY-this.centerY,r=this.eyeZ-this.centerZ,o=Math.sqrt(e*e+t*t+r*r),o=(0!==o&&(e/=o,t/=o,r/=o),this.upX),n=(a=this.upY)*r-(l=this.upZ)*t,s=-o*r+l*e,i=o*t-a*e,o=t*i-r*s,a=-e*i+r*n,l=e*s-t*n,u=Math.sqrt(n*n+s*s+i*i),u=(0!==u&&(n/=u,s/=u,i/=u),Math.sqrt(o*o+a*a+l*l));return 0!==u&&(o/=u,a/=u,l/=u),{x:[n,s,i],y:[o,a,l],z:[e,t,r]}}},{key:"_orbit",value:function(e,t,r){var o=this.eyeX-this.centerX,n=this.eyeY-this.centerY,s=this.eyeZ-this.centerZ,i=Math.hypot(o,n,s),o=new _.default.Vector(o,n,s).normalize(),n=new _.default.Vector(this.upX,this.upY,this.upZ).normalize(),s=new _.default.Vector.cross(n,o).normalize(),a=new _.default.Vector.cross(s,n),r=((i=(i*=Math.pow(10,r))<this.cameraNear?this.cameraNear:i)>this.cameraFar&&(i=this.cameraFar),Math.acos(Math.max(-1,Math.min(1,_.default.Vector.dot(o,n))))+t),t=e;(r<=0||r>=Math.PI)&&(this.upX*=-1,this.upY*=-1,this.upZ*=-1),n.mult(Math.cos(r)),a.mult(Math.cos(t)*Math.sin(r)),s.mult(Math.sin(t)*Math.sin(r)),o.set(n).add(a).add(s),this.eyeX=i*o.x+this.centerX,this.eyeY=i*o.y+this.centerY,this.eyeZ=i*o.z+this.centerZ,this.camera(this.eyeX,this.eyeY,this.eyeZ,this.centerX,this.centerY,this.centerZ,this.upX,this.upY,this.upZ)}},{key:"_orbitFree",value:function(e,t,r){var o=this.eyeX-this.centerX,n=this.eyeY-this.centerY,s=this.eyeZ-this.centerZ,i=Math.hypot(o,n,s),o=new _.default.Vector(o,n,s).normalize(),n=new _.default.Vector(this.upX,this.upY,this.upZ),s=new _.default.Vector.cross(n,o).normalize(),a=new _.default.Vector.cross(o,s),l=Math.atan2(t,e),l=(a.mult(Math.sin(l)),s.mult(Math.cos(l)).add(a),Math.sqrt(e*e+t*t)),a=new _.default.Vector.cross(o,s),e=((i=(i*=Math.pow(10,r))<this.cameraNear?this.cameraNear:i)>this.cameraFar&&(i=this.cameraFar),Math.cos(l)),t=Math.sin(l),r=n.dot(o),l=n.dot(s),u=r*e+l*t,r=-r*t+l*e,l=n.dot(a);n.x=u*o.x+r*s.x+l*a.x,n.y=u*o.y+r*s.y+l*a.y,n.z=u*o.z+r*s.z+l*a.z,s.mult(-t),o.mult(e).add(s).mult(i),this.camera(o.x+this.centerX,o.y+this.centerY,o.z+this.centerZ,this.centerX,this.centerY,this.centerZ,n.x,n.y,n.z)}},{key:"_isActive",value:function(){return this===this._renderer._curCamera}}])&&n(e.prototype,r),o&&n(e,o),t}(),_.default.prototype.setCamera=function(e){this._renderer._curCamera=e,this._renderer.uPMatrix.set(e.projMatrix.mat4[0],e.projMatrix.mat4[1],e.projMatrix.mat4[2],e.projMatrix.mat4[3],e.projMatrix.mat4[4],e.projMatrix.mat4[5],e.projMatrix.mat4[6],e.projMatrix.mat4[7],e.projMatrix.mat4[8],e.projMatrix.mat4[9],e.projMatrix.mat4[10],e.projMatrix.mat4[11],e.projMatrix.mat4[12],e.projMatrix.mat4[13],e.projMatrix.mat4[14],e.projMatrix.mat4[15])};e=_.default.Camera;r.default=e},{"../core/main":275,"core-js/modules/es.array.slice":165,"core-js/modules/es.math.hypot":170,"core-js/modules/es.string.sub":200}],325:[function(e,t,r){"use strict";e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.math.log2"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.typed-array.float32-array"),e("core-js/modules/es.typed-array.copy-within"),e("core-js/modules/es.typed-array.every"),e("core-js/modules/es.typed-array.fill"),e("core-js/modules/es.typed-array.filter"),e("core-js/modules/es.typed-array.find"),e("core-js/modules/es.typed-array.find-index"),e("core-js/modules/es.typed-array.for-each"),e("core-js/modules/es.typed-array.includes"),e("core-js/modules/es.typed-array.index-of"),e("core-js/modules/es.typed-array.iterator"),e("core-js/modules/es.typed-array.join"),e("core-js/modules/es.typed-array.last-index-of"),e("core-js/modules/es.typed-array.map"),e("core-js/modules/es.typed-array.reduce"),e("core-js/modules/es.typed-array.reduce-right"),e("core-js/modules/es.typed-array.reverse"),e("core-js/modules/es.typed-array.set"),e("core-js/modules/es.typed-array.slice"),e("core-js/modules/es.typed-array.some"),e("core-js/modules/es.typed-array.sort"),e("core-js/modules/es.typed-array.subarray"),e("core-js/modules/es.typed-array.to-locale-string"),e("core-js/modules/es.typed-array.to-string"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.math.log2"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.typed-array.float32-array"),e("core-js/modules/es.typed-array.copy-within"),e("core-js/modules/es.typed-array.every"),e("core-js/modules/es.typed-array.fill"),e("core-js/modules/es.typed-array.filter"),e("core-js/modules/es.typed-array.find"),e("core-js/modules/es.typed-array.find-index"),e("core-js/modules/es.typed-array.for-each"),e("core-js/modules/es.typed-array.includes"),e("core-js/modules/es.typed-array.index-of"),e("core-js/modules/es.typed-array.iterator"),e("core-js/modules/es.typed-array.join"),e("core-js/modules/es.typed-array.last-index-of"),e("core-js/modules/es.typed-array.map"),e("core-js/modules/es.typed-array.reduce"),e("core-js/modules/es.typed-array.reduce-right"),e("core-js/modules/es.typed-array.reverse"),e("core-js/modules/es.typed-array.set"),e("core-js/modules/es.typed-array.slice"),e("core-js/modules/es.typed-array.some"),e("core-js/modules/es.typed-array.sort"),e("core-js/modules/es.typed-array.subarray"),e("core-js/modules/es.typed-array.to-locale-string"),e("core-js/modules/es.typed-array.to-string"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;e=(e=e("../core/main"))&&e.__esModule?e:{default:e};function n(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}e.default.DataArray=function(){function o(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:128,t=this,r=o;if(!(t instanceof r))throw new TypeError("Cannot call a class as a function");this.length=0,this.data=new Float32Array(e),this.initialLength=e}var e,t,r;return e=o,(t=[{key:"dataArray",value:function(){return this.subArray(0,this.length)}},{key:"clear",value:function(){this.length=0}},{key:"rescale",value:function(){var e;this.length<this.data.length/2&&(e=1<<Math.ceil(Math.log2(this.length)),(e=new Float32Array(e)).set(this.data.subarray(0,this.length),0),this.data=e)}},{key:"reset",value:function(){this.clear(),this.data=new Float32Array(this.initialLength)}},{key:"push",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.ensureLength(this.length+t.length),this.data.set(t,this.length),this.length+=t.length}},{key:"slice",value:function(e,t){return this.data.slice(e,Math.min(t,this.length))}},{key:"subArray",value:function(e,t){return this.data.subarray(e,Math.min(t,this.length))}},{key:"ensureLength",value:function(e){for(;this.data.length<e;){var t=new Float32Array(2*this.data.length);t.set(this.data,0),this.data=t}}}])&&n(e.prototype,t),r&&n(e,r),o}();e=e.default.DataArray;r.default=e},{"../core/main":275,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.slice":165,"core-js/modules/es.math.log2":171,"core-js/modules/es.object.to-string":182,"core-js/modules/es.typed-array.copy-within":205,"core-js/modules/es.typed-array.every":206,"core-js/modules/es.typed-array.fill":207,"core-js/modules/es.typed-array.filter":208,"core-js/modules/es.typed-array.find":210,"core-js/modules/es.typed-array.find-index":209,"core-js/modules/es.typed-array.float32-array":211,"core-js/modules/es.typed-array.for-each":213,"core-js/modules/es.typed-array.includes":214,"core-js/modules/es.typed-array.index-of":215,"core-js/modules/es.typed-array.iterator":218,"core-js/modules/es.typed-array.join":219,"core-js/modules/es.typed-array.last-index-of":220,"core-js/modules/es.typed-array.map":221,"core-js/modules/es.typed-array.reduce":223,"core-js/modules/es.typed-array.reduce-right":222,"core-js/modules/es.typed-array.reverse":224,"core-js/modules/es.typed-array.set":225,"core-js/modules/es.typed-array.slice":226,"core-js/modules/es.typed-array.some":227,"core-js/modules/es.typed-array.sort":228,"core-js/modules/es.typed-array.subarray":229,"core-js/modules/es.typed-array.to-locale-string":230,"core-js/modules/es.typed-array.to-string":231}],326:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.fill"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.get-prototype-of"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.reflect.construct"),e("core-js/modules/es.reflect.get"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.typed-array.float32-array"),e("core-js/modules/es.typed-array.uint8-array"),e("core-js/modules/es.typed-array.uint8-clamped-array"),e("core-js/modules/es.typed-array.copy-within"),e("core-js/modules/es.typed-array.every"),e("core-js/modules/es.typed-array.fill"),e("core-js/modules/es.typed-array.filter"),e("core-js/modules/es.typed-array.find"),e("core-js/modules/es.typed-array.find-index"),e("core-js/modules/es.typed-array.for-each"),e("core-js/modules/es.typed-array.includes"),e("core-js/modules/es.typed-array.index-of"),e("core-js/modules/es.typed-array.iterator"),e("core-js/modules/es.typed-array.join"),e("core-js/modules/es.typed-array.last-index-of"),e("core-js/modules/es.typed-array.map"),e("core-js/modules/es.typed-array.reduce"),e("core-js/modules/es.typed-array.reduce-right"),e("core-js/modules/es.typed-array.reverse"),e("core-js/modules/es.typed-array.set"),e("core-js/modules/es.typed-array.slice"),e("core-js/modules/es.typed-array.some"),e("core-js/modules/es.typed-array.sort"),e("core-js/modules/es.typed-array.subarray"),e("core-js/modules/es.typed-array.to-locale-string"),e("core-js/modules/es.typed-array.to-string"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.fill"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.get-prototype-of"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.typed-array.float32-array"),e("core-js/modules/es.typed-array.uint8-array"),e("core-js/modules/es.typed-array.uint8-clamped-array"),e("core-js/modules/es.typed-array.copy-within"),e("core-js/modules/es.typed-array.every"),e("core-js/modules/es.typed-array.fill"),e("core-js/modules/es.typed-array.filter"),e("core-js/modules/es.typed-array.find"),e("core-js/modules/es.typed-array.find-index"),e("core-js/modules/es.typed-array.for-each"),e("core-js/modules/es.typed-array.includes"),e("core-js/modules/es.typed-array.index-of"),e("core-js/modules/es.typed-array.iterator"),e("core-js/modules/es.typed-array.join"),e("core-js/modules/es.typed-array.last-index-of"),e("core-js/modules/es.typed-array.map"),e("core-js/modules/es.typed-array.reduce"),e("core-js/modules/es.typed-array.reduce-right"),e("core-js/modules/es.typed-array.reverse"),e("core-js/modules/es.typed-array.set"),e("core-js/modules/es.typed-array.slice"),e("core-js/modules/es.typed-array.some"),e("core-js/modules/es.typed-array.sort"),e("core-js/modules/es.typed-array.subarray"),e("core-js/modules/es.typed-array.to-locale-string"),e("core-js/modules/es.typed-array.to-string"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var f=(_=e("../core/main"))&&_.__esModule?_:{default:_},a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("../core/constants")),n=e("./p5.Texture"),p=e("./p5.RendererGL");function l(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,l=function(){return e},e)}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],o=!0,n=!1,s=void 0;try{for(var i,a=e[Symbol.iterator]();!(o=(i=a.next()).done)&&(r.push(i.value),!t||r.length!==t);o=!0);}catch(e){n=!0,s=e}finally{try{o||null==a.return||a.return()}finally{if(n)throw s}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function h(e,t,r){t&&d(e.prototype,t),r&&d(e,r)}function m(e,t,r){return(m="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var e=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}(e,t);if(e)return(e=Object.getOwnPropertyDescriptor(e,t)).get?e.get.call(r):e.value})(e,t,r||e)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(r){return function(){var e,t=v(r),t=(e=function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch(e){}}}()?(e=v(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(!e||"object"!==i(e)&&"function"!=typeof e){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e);var r=g(o);function o(e){var t;return c(this,o),(t=r.call(this,e.target._renderer)).fbo=e,t.yScale=-1,t}return h(o,[{key:"_computeCameraDefaultSettings",value:function(){m(v(o.prototype),"_computeCameraDefaultSettings",this).call(this),this.defaultAspectRatio=this.fbo.width/this.fbo.height,this.defaultCameraFOV=2*Math.atan(this.fbo.height/2/this.defaultEyeZ)}}]),o}(f.default.Camera),j=(f.default.FramebufferCamera=b,function(){function r(e,t){c(this,r),this.framebuffer=e,this.property=t}return h(r,[{key:"rawTexture",value:function(){return this.framebuffer[this.property]}},{key:"width",get:function(){return this.framebuffer.width*this.framebuffer.density}},{key:"height",get:function(){return this.framebuffer.height*this.framebuffer.density}}]),r}()),_=(f.default.FramebufferTexture=j,function(){function o(e){var t=this,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},e=(c(this,o),this.target=e,this.target._renderer.framebuffers.add(this),this._isClipApplied=!1,this.pixels=[],this.format=r.format||a.UNSIGNED_BYTE,this.channels=r.channels||(e._renderer._pInst._glAttributes.alpha?a.RGBA:a.RGB),this.useDepth=void 0===r.depth||r.depth,this.depthFormat=r.depthFormat||a.FLOAT,this.textureFiltering=r.textureFiltering||a.LINEAR,void 0===r.antialias?this.antialiasSamples=e._renderer._pInst._glAttributes.antialias?2:0:"number"==typeof r.antialias?this.antialiasSamples=r.antialias:this.antialiasSamples=r.antialias?2:0,this.antialias=0<this.antialiasSamples,this.antialias&&e.webglVersion!==a.WEBGL2&&(console.warn("Antialiasing is unsupported in a WebGL 1 context"),this.antialias=!1),r.width&&r.height?(this.width=r.width,this.height=r.height,this.autoSized=!1):(void 0===r.width!=(void 0===r.height)&&console.warn("Please supply both width and height for a framebuffer to give it a size. Only one was given, so the framebuffer will match the size of its canvas."),this.width=e.width,this.height=e.height,this.autoSized=!0),this.density=r.density||e.pixelDensity(),e._renderer.GL);if(this.gl=e,this._checkIfFormatsAvailable(),r.stencil&&!this.useDepth&&console.warn("A stencil buffer can only be used if also using depth. Since the framebuffer has no depth buffer, the stencil buffer will be ignored."),this.useStencil=this.useDepth&&(void 0===r.stencil||r.stencil),this.framebuffer=e.createFramebuffer(),!this.framebuffer)throw new Error("Unable to create a framebuffer");if(this.antialias&&(this.aaFramebuffer=e.createFramebuffer(),!this.aaFramebuffer))throw new Error("Unable to create a framebuffer for antialiasing");this._recreateTextures();r=this.target._renderer._curCamera;this.defaultCamera=this.createCamera(),this.target._renderer._curCamera=r,this.draw(function(){return t.target.clear()})}return h(o,[{key:"resize",value:function(e,t){this.autoSized=!1,this.width=e,this.height=t,this._handleResize()}},{key:"pixelDensity",value:function(e){if(!e)return this.density;this.autoSized=!1,this.density=e,this._handleResize()}},{key:"autoSized",value:function(e){if(void 0===e)return this.autoSized;this.autoSized=e,this._handleResize()}},{key:"_checkIfFormatsAvailable",value:function(){var e=this.gl,e=(this.useDepth&&this.target.webglVersion===a.WEBGL&&!e.getExtension("WEBGL_depth_texture")&&(console.warn("Unable to create depth textures in this environment. Falling back to a framebuffer without depth."),this.useDepth=!1),this.useDepth&&this.target.webglVersion===a.WEBGL&&this.depthFormat===a.FLOAT&&(console.warn("FLOAT depth format is unavailable in WebGL 1. Defaulting to UNSIGNED_INT."),this.depthFormat=a.UNSIGNED_INT),[a.UNSIGNED_BYTE,a.FLOAT,a.HALF_FLOAT].includes(this.format)||(console.warn("Unknown Framebuffer format. Please use UNSIGNED_BYTE, FLOAT, or HALF_FLOAT. Defaulting to UNSIGNED_BYTE."),this.format=a.UNSIGNED_BYTE),this.useDepth&&![a.UNSIGNED_INT,a.FLOAT].includes(this.depthFormat)&&(console.warn("Unknown Framebuffer depth format. Please use UNSIGNED_INT or FLOAT. Defaulting to FLOAT."),this.depthFormat=a.FLOAT),(0,n.checkWebGLCapabilities)(this.target._renderer));e.float||this.format!==a.FLOAT||(console.warn("This environment does not support FLOAT textures. Falling back to UNSIGNED_BYTE."),this.format=a.UNSIGNED_BYTE),this.useDepth&&!e.float&&this.depthFormat===a.FLOAT&&(console.warn("This environment does not support FLOAT depth textures. Falling back to UNSIGNED_INT."),this.depthFormat=a.UNSIGNED_INT),e.halfFloat||this.format!==a.HALF_FLOAT||(console.warn("This environment does not support HALF_FLOAT textures. Falling back to UNSIGNED_BYTE."),this.format=a.UNSIGNED_BYTE),this.channels===a.RGB&&[a.FLOAT,a.HALF_FLOAT].includes(this.format)&&(console.warn("FLOAT and HALF_FLOAT formats do not work cross-platform with only RGB channels. Falling back to RGBA."),this.channels=a.RGBA)}},{key:"_recreateTextures",value:function(){var e=this.gl,t=(this._updateSize(),e.getParameter(e.TEXTURE_BINDING_2D)),r=e.getParameter(e.FRAMEBUFFER_BINDING),o=e.createTexture();if(!o)throw new Error("Unable to create color texture");e.bindTexture(e.TEXTURE_2D,o);var n=this._glColorFormat();if(e.texImage2D(e.TEXTURE_2D,0,n.internalFormat,this.width*this.density,this.height*this.density,0,n.format,n.type,null),this.colorTexture=o,e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,o,0),this.useDepth){var o=e.createTexture();if(!o)throw new Error("Unable to create depth texture");var s=this._glDepthFormat();e.bindTexture(e.TEXTURE_2D,o),e.texImage2D(e.TEXTURE_2D,0,s.internalFormat,this.width*this.density,this.height*this.density,0,s.format,s.type,null),e.framebufferTexture2D(e.FRAMEBUFFER,this.useStencil?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,e.TEXTURE_2D,o,0),this.depthTexture=o}this.antialias&&(this.colorRenderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,this.colorRenderbuffer),e.renderbufferStorageMultisample(e.RENDERBUFFER,Math.max(0,Math.min(this.antialiasSamples,e.getParameter(e.MAX_SAMPLES))),n.internalFormat,this.width*this.density,this.height*this.density),this.useDepth&&(s=this._glDepthFormat(),this.depthRenderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,this.depthRenderbuffer),e.renderbufferStorageMultisample(e.RENDERBUFFER,Math.max(0,Math.min(this.antialiasSamples,e.getParameter(e.MAX_SAMPLES))),s.internalFormat,this.width*this.density,this.height*this.density)),e.bindFramebuffer(e.FRAMEBUFFER,this.aaFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.RENDERBUFFER,this.colorRenderbuffer),this.useDepth&&e.framebufferRenderbuffer(e.FRAMEBUFFER,this.useStencil?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,e.RENDERBUFFER,this.depthRenderbuffer)),this.useDepth&&(this.depth=new j(this,"depthTexture"),o=e.NEAREST,this.depthP5Texture=new f.default.Texture(this.target._renderer,this.depth,{minFilter:o,magFilter:o}),this.target._renderer.textures.set(this.depth,this.depthP5Texture)),this.color=new j(this,"colorTexture");n=this.textureFiltering===a.LINEAR?e.LINEAR:e.NEAREST;this.colorP5Texture=new f.default.Texture(this.target._renderer,this.color,{minFilter:n,magFilter:n}),this.target._renderer.textures.set(this.color,this.colorP5Texture),e.bindTexture(e.TEXTURE_2D,t),e.bindFramebuffer(e.FRAMEBUFFER,r)}},{key:"_glColorFormat",value:function(){var e,t,r=this.gl,o=this.format===a.FLOAT?r.FLOAT:this.format===a.HALF_FLOAT?this.target.webglVersion===a.WEBGL2?r.HALF_FLOAT:r.getExtension("OES_texture_half_float").HALF_FLOAT_OES:r.UNSIGNED_BYTE,n=this.channels===a.RGBA?r.RGBA:r.RGB;return{internalFormat:this.target.webglVersion===a.WEBGL2?(s(t={},r.FLOAT,s({},r.RGBA,r.RGBA32F)),s(t,r.HALF_FLOAT,s({},r.RGBA,r.RGBA16F)),s(t,r.UNSIGNED_BYTE,(s(e={},r.RGBA,r.RGBA8),s(e,r.RGB,r.RGB8),e)),t[o][n]):this.format===a.HALF_FLOAT?r.RGBA:n,format:n,type:o}}},{key:"_glDepthFormat",value:function(){var e=this.gl,t=this.useStencil?this.depthFormat===a.FLOAT?e.FLOAT_32_UNSIGNED_INT_24_8_REV:this.target.webglVersion===a.WEBGL2?e.UNSIGNED_INT_24_8:e.getExtension("WEBGL_depth_texture").UNSIGNED_INT_24_8_WEBGL:this.depthFormat===a.FLOAT?e.FLOAT:e.UNSIGNED_INT,r=this.useStencil?e.DEPTH_STENCIL:e.DEPTH_COMPONENT,e=this.useStencil?this.depthFormat===a.FLOAT?e.DEPTH32F_STENCIL8:this.target.webglVersion===a.WEBGL2?e.DEPTH24_STENCIL8:e.DEPTH_STENCIL:this.target.webglVersion===a.WEBGL2?this.depthFormat===a.FLOAT?e.DEPTH_COMPONENT32F:e.DEPTH_COMPONENT24:e.DEPTH_COMPONENT;return{internalFormat:e,format:r,type:t}}},{key:"_updateSize",value:function(){this.autoSized&&(this.width=this.target.width,this.height=this.target.height,this.density=this.target.pixelDensity())}},{key:"_canvasSizeChanged",value:function(){this.autoSized&&this._handleResize()}},{key:"_handleResize",value:function(){var e=this.color,t=this.depth,r=this.colorRenderbuffer,o=this.depthRenderbuffer,e=(this._deleteTexture(e),t&&this._deleteTexture(t),this.gl);r&&e.deleteRenderbuffer(r),o&&e.deleteRenderbuffer(o),this._recreateTextures(),this.defaultCamera._resize()}},{key:"createCamera",value:function(){var e=new b(this);return e._computeCameraDefaultSettings(),e._setDefaultCamera(),this.target._renderer._curCamera=e}},{key:"_deleteTexture",value:function(e){this.gl.deleteTexture(e.rawTexture()),this.target._renderer.textures.delete(e)}},{key:"remove",value:function(){var e=this.gl;this._deleteTexture(this.color),this.depth&&this._deleteTexture(this.depth),e.deleteFramebuffer(this.framebuffer),this.aaFramebuffer&&e.deleteFramebuffer(this.aaFramebuffer),this.depthRenderbuffer&&e.deleteRenderbuffer(this.depthRenderbuffer),this.colorRenderbuffer&&e.deleteRenderbuffer(this.colorRenderbuffer),this.target._renderer.framebuffers.delete(this)}},{key:"begin",value:function(){this.prevFramebuffer=this.target._renderer.activeFramebuffer(),this.prevFramebuffer&&this.prevFramebuffer._beforeEnd(),this.target._renderer.activeFramebuffers.push(this),this._beforeBegin(),this.target.push(),this.target.setCamera(this.defaultCamera),this.target._renderer.uMVMatrix.set(this.target._renderer._curCamera.cameraMatrix.mat4[0],this.target._renderer._curCamera.cameraMatrix.mat4[1],this.target._renderer._curCamera.cameraMatrix.mat4[2],this.target._renderer._curCamera.cameraMatrix.mat4[3],this.target._renderer._curCamera.cameraMatrix.mat4[4],this.target._renderer._curCamera.cameraMatrix.mat4[5],this.target._renderer._curCamera.cameraMatrix.mat4[6],this.target._renderer._curCamera.cameraMatrix.mat4[7],this.target._renderer._curCamera.cameraMatrix.mat4[8],this.target._renderer._curCamera.cameraMatrix.mat4[9],this.target._renderer._curCamera.cameraMatrix.mat4[10],this.target._renderer._curCamera.cameraMatrix.mat4[11],this.target._renderer._curCamera.cameraMatrix.mat4[12],this.target._renderer._curCamera.cameraMatrix.mat4[13],this.target._renderer._curCamera.cameraMatrix.mat4[14],this.target._renderer._curCamera.cameraMatrix.mat4[15])}},{key:"_framebufferToBind",value:function(){return this.antialias?this.aaFramebuffer:this.framebuffer}},{key:"_beforeBegin",value:function(){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,this._framebufferToBind()),this.target._renderer.viewport(this.width*this.density,this.height*this.density)}},{key:"_beforeEnd",value:function(){if(this.antialias){var e=this.gl,t=(e.bindFramebuffer(e.READ_FRAMEBUFFER,this.aaFramebuffer),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,this.framebuffer),[[e.COLOR_BUFFER_BIT,this.colorP5Texture.glMagFilter]]);this.useDepth&&t.push([e.DEPTH_BUFFER_BIT,this.depthP5Texture.glMagFilter]);for(var r=0,o=t;r<o.length;r++){var n=u(o[r],2),s=n[0],n=n[1];e.blitFramebuffer(0,0,this.width*this.density,this.height*this.density,0,0,this.width*this.density,this.height*this.density,s,n)}}}},{key:"end",value:function(){var e=this.gl;if(this.target.pop(),this.target._renderer.activeFramebuffers.pop()!==this)throw new Error("It looks like you've called end() while another Framebuffer is active.");this._beforeEnd(),this.prevFramebuffer?this.prevFramebuffer._beforeBegin():(e.bindFramebuffer(e.FRAMEBUFFER,null),this.target._renderer.viewport(this.target._renderer._origViewport.width,this.target._renderer._origViewport.height)),this.target._renderer._applyStencilTestIfClipping()}},{key:"draw",value:function(e){this.begin(),e(),this.end()}},{key:"loadPixels",value:function(){var e=this.gl,t=this.target._renderer.activeFramebuffer(),r=(e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer),this._glColorFormat());this.pixels=(0,p.readPixelsWebGL)(this.pixels,e,this.framebuffer,0,0,this.width*this.density,this.height*this.density,r.format,r.type),t?e.bindFramebuffer(e.FRAMEBUFFER,t._framebufferToBind()):e.bindFramebuffer(e.FRAMEBUFFER,null)}},{key:"get",value:function(e,t,r,o){f.default._validateParameters("p5.Framebuffer.get",arguments);var n=this._glColorFormat();if(void 0===e&&void 0===t)t=e=0,r=this.width,o=this.height;else if(void 0===r&&void 0===o)return(e<0||t<0||e>=this.width||t>=this.height)&&(console.warn("The x and y values passed to p5.Framebuffer.get are outside of its range and will be clamped."),e=this.target.constrain(e,0,this.width-1),t=this.target.constrain(t,0,this.height-1)),(0,p.readPixelWebGL)(this.gl,this.framebuffer,e*this.density,t*this.density,n.format,n.type);e=this.target.constrain(e,0,this.width-1),t=this.target.constrain(t,0,this.height-1),r=this.target.constrain(r,1,this.width-e),o=this.target.constrain(o,1,this.height-t);for(var s=(0,p.readPixelsWebGL)(void 0,this.gl,this.framebuffer,e*this.density,t*this.density,r*this.density,o*this.density,n.format,n.type),i=new Uint8ClampedArray(r*o*this.density*this.density*4),a=(i.fill(255),n.type===this.gl.RGB?3:4),l=0;l<o*this.density;l++)for(var u=0;u<r*this.density;u++)for(var c=0;c<4;c++){var d,h=4*(l*r*this.density+u)+c;c<a&&(d=4==a?h:(l*r*this.density+u)*a+c,i[h]=s[d])}e=new f.default.Image(r*this.density,o*this.density);return e.imageData=e.canvas.getContext("2d").createImageData(e.width,e.height),e.imageData.data.set(i),e.pixels=e.imageData.data,e.updatePixels(),1!==this.density&&e.resize(r,o),e}},{key:"updatePixels",value:function(){var e=this.gl,t=(this.colorP5Texture.bindTexture(),this._glColorFormat()),r=t.format===e.RGBA?4:3,r=this.width*this.height*this.density*this.density*r,o=t.type===e.UNSIGNED_BYTE?Uint8Array:Float32Array;if(!(this.pixels instanceof o)||this.pixels.length!==r)throw new Error("The pixels array has not been set correctly. Please call loadPixels() before updatePixels().");e.texImage2D(e.TEXTURE_2D,0,t.internalFormat,this.width*this.density,this.height*this.density,0,t.format,t.type,this.pixels),this.colorP5Texture.unbindTexture();o=this.target._renderer.activeFramebuffer();this.antialias?(this.begin(),this.target.push(),this.target.imageMode(this.target.CENTER),this.target.resetMatrix(),this.target.noStroke(),this.target.clear(),this.target.image(this,0,0),this.target.pop(),this.useDepth&&(e.clearDepth(1),e.clear(e.DEPTH_BUFFER_BIT)),this.end()):(e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer),this.useDepth&&(e.clearDepth(1),e.clear(e.DEPTH_BUFFER_BIT)),o?e.bindFramebuffer(e.FRAMEBUFFER,o._framebufferToBind()):e.bindFramebuffer(e.FRAMEBUFFER,null))}}]),o}()),e=f.default.Framebuffer=_;r.default=e},{"../core/constants":264,"../core/main":275,"./p5.RendererGL":332,"./p5.Texture":334,"core-js/modules/es.array.fill":154,"core-js/modules/es.array.includes":159,"core-js/modules/es.array.iterator":161,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.get-prototype-of":180,"core-js/modules/es.object.to-string":182,"core-js/modules/es.reflect.construct":184,"core-js/modules/es.reflect.get":185,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.includes":191,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.typed-array.copy-within":205,"core-js/modules/es.typed-array.every":206,"core-js/modules/es.typed-array.fill":207,"core-js/modules/es.typed-array.filter":208,"core-js/modules/es.typed-array.find":210,"core-js/modules/es.typed-array.find-index":209,"core-js/modules/es.typed-array.float32-array":211,"core-js/modules/es.typed-array.for-each":213,"core-js/modules/es.typed-array.includes":214,"core-js/modules/es.typed-array.index-of":215,"core-js/modules/es.typed-array.iterator":218,"core-js/modules/es.typed-array.join":219,"core-js/modules/es.typed-array.last-index-of":220,"core-js/modules/es.typed-array.map":221,"core-js/modules/es.typed-array.reduce":223,"core-js/modules/es.typed-array.reduce-right":222,"core-js/modules/es.typed-array.reverse":224,"core-js/modules/es.typed-array.set":225,"core-js/modules/es.typed-array.slice":226,"core-js/modules/es.typed-array.some":227,"core-js/modules/es.typed-array.sort":228,"core-js/modules/es.typed-array.subarray":229,"core-js/modules/es.typed-array.to-locale-string":230,"core-js/modules/es.typed-array.to-string":231,"core-js/modules/es.typed-array.uint8-array":234,"core-js/modules/es.typed-array.uint8-clamped-array":235,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}],327:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.for-each"),e("core-js/modules/es.array.from"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.map"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.set"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.sub"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.for-each"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.for-each"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.map"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.set"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.sub"),e("core-js/modules/web.dom-collections.for-each"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var m=(s=e("../core/main"))&&s.__esModule?s:{default:s},y=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("../core/constants"));function a(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,a=function(){return e},e)}function c(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function n(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}m.default.Geometry=function(){function o(e,t,r){if(this instanceof o)return this.vertices=[],this.lineVertices=new m.default.DataArray,this.lineTangentsIn=new m.default.DataArray,this.lineTangentsOut=new m.default.DataArray,this.lineSides=new m.default.DataArray,this.vertexNormals=[],this.faces=[],this.uvs=[],this.edges=[],this.vertexColors=[],this.vertexStrokeColors=[],this.lineVertexColors=new m.default.DataArray,this.detailX=void 0!==e?e:1,this.detailY=void 0!==t?t:1,this.dirtyFlags={},r instanceof Function&&r.call(this),this;throw new TypeError("Cannot call a class as a function")}var e,t,r;return e=o,(t=[{key:"reset",value:function(){this.lineVertices.clear(),this.lineTangentsIn.clear(),this.lineTangentsOut.clear(),this.lineSides.clear(),this.vertices.length=0,this.edges.length=0,this.vertexColors.length=0,this.vertexStrokeColors.length=0,this.lineVertexColors.clear(),this.vertexNormals.length=0,this.uvs.length=0,this.dirtyFlags={}}},{key:"clearColors",value:function(){return this.vertexColors=[],this}},{key:"computeFaces",value:function(){this.faces.length=0;for(var e,t,r,o=this.detailX+1,n=0;n<this.detailY;n++)for(var s=0;s<this.detailX;s++)t=(n+1)*o+s+1,this.faces.push([n*o+s,e=n*o+s+1,r=(n+1)*o+s]),this.faces.push([r,e,t]);return this}},{key:"_getFaceNormal",value:function(e){var e=this.faces[e],t=this.vertices[e[0]],r=this.vertices[e[1]],e=this.vertices[e[2]],r=m.default.Vector.sub(r,t),e=m.default.Vector.sub(e,t),t=m.default.Vector.cross(r,e),o=m.default.Vector.mag(t),r=o/(m.default.Vector.mag(r)*m.default.Vector.mag(e));return 0===r||isNaN(r)?(console.warn("p5.Geometry.prototype._getFaceNormal:","face has colinear sides or a repeated vertex"),t):(1<r&&(r=1),t.mult(Math.asin(r)/o))}},{key:"computeNormals",value:function(){var e,s=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:y.FLAT,r=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).roundToPrecision,i=this.vertexNormals,o=this.vertices,n=this.faces;if(t===y.SMOOTH){for(var a={},l=[],u=Math.pow(10,void 0===r?3:r),c=function(e){return Math.round(e*u)/u},d=function(e){return"".concat(c(e.x),",").concat(c(e.y),",").concat(c(e.z))},h=0;h<o.length;h++){var f=o[h],p=d(f);void 0===a[p]&&(a[p]=l.length,l.push(f))}n.forEach(function(e){for(var t=0;t<3;++t){var r=e[t],r=o[r],r=d(r);e[t]=a[r]}}),this.edges.forEach(function(e){for(var t=0;t<2;++t){var r=e[t],r=o[r],r=d(r);e[t]=a[r]}}),this.vertices=o=l}for(e=i.length=0;e<o.length;++e)i.push(new m.default.Vector);for(n.forEach(function(e,t){for(var r=s._getFaceNormal(t),o=0;o<3;++o){var n=e[o];i[n].add(r)}}),e=0;e<o.length;++e)i[e].normalize();return this}},{key:"averageNormals",value:function(){for(var e=0;e<=this.detailY;e++){var t=this.detailX+1,r=m.default.Vector.add(this.vertexNormals[e*t],this.vertexNormals[e*t+this.detailX]),r=m.default.Vector.div(r,2);this.vertexNormals[e*t]=r,this.vertexNormals[e*t+this.detailX]=r}return this}},{key:"averagePoleNormals",value:function(){for(var e=new m.default.Vector(0,0,0),t=0;t<this.detailX;t++)e.add(this.vertexNormals[t]);for(var e=m.default.Vector.div(e,this.detailX),r=0;r<this.detailX;r++)this.vertexNormals[r]=e;e=new m.default.Vector(0,0,0);for(var o=this.vertices.length-1;o>this.vertices.length-1-this.detailX;o--)e.add(this.vertexNormals[o]);e=m.default.Vector.div(e,this.detailX);for(var n=this.vertices.length-1;n>this.vertices.length-1-this.detailX;n--)this.vertexNormals[n]=e;return this}},{key:"_makeTriangleEdges",value:function(){for(var e=this.edges.length=0;e<this.faces.length;e++)this.edges.push([this.faces[e][0],this.faces[e][1]]),this.edges.push([this.faces[e][1],this.faces[e][2]]),this.edges.push([this.faces[e][2],this.faces[e][0]]);return this}},{key:"_edgesToVertices",value:function(){this.lineVertices.clear(),this.lineTangentsIn.clear(),this.lineTangentsOut.clear(),this.lineSides.clear();for(var e,t=new Map,r=new Set,o=0;o<this.edges.length;o++){var n,s=this.edges[o-1],i=this.edges[o],a=this.vertices[i[0]],l=this.vertices[i[1]],u=0<this.vertexStrokeColors.length?this.vertexStrokeColors.slice(4*i[0],4*(i[0]+1)):[0,0,0,0],c=0<this.vertexStrokeColors.length?this.vertexStrokeColors.slice(4*i[1],4*(i[1]+1)):[0,0,0,0],d=l.copy().sub(a).normalize(),h=0<d.magSq();h&&this._addSegment(a,l,u,c,d),0<o&&s[1]===i[0]?r.has(i[0])||(r.add(i[0]),t.delete(i[0]),e&&h&&d.dot(e)<1-1e-8&&this._addJoin(a,e,d,u)):(h&&!r.has(i[0])&&((n=t.get(i[0]))?(this._addJoin(a,n.dir,d,u),t.delete(i[0]),r.add(i[0])):t.set(i[0],{point:a,dir:d.copy().mult(-1),color:u})),e&&!r.has(s[1])&&((n=t.get(s[1]))?(this._addJoin(this.vertices[s[1]],e,n.dir.copy().mult(-1),u),t.delete(s[1]),r.add(s[1])):t.set(s[1],{point:this.vertices[s[1]],dir:e,color:u}),e=void 0)),o!==this.edges.length-1||r.has(i[1])||((a=t.get(i[1]))?(this._addJoin(l,d,a.dir.copy().mult(-1),c),t.delete(i[1]),r.add(i[1])):t.set(i[1],{point:l,dir:d,color:c})),h&&(e=d)}var f=!0,p=!1,m=void 0;try{for(var y,g=t.values()[Symbol.iterator]();!(f=(y=g.next()).done);f=!0){var v=y.value,b=v.point,j=v.dir,_=v.color;this._addCap(b,j,_)}}catch(e){p=!0,m=e}finally{try{f||null==g.return||g.return()}finally{if(p)throw m}}return this}},{key:"_addSegment",value:function(e,t,r,o,n){var e=e.array(),t=t.array(),s=n.array();this.lineSides.push(1,1,-1,1,-1,-1);for(var i=0,a=[this.lineTangentsIn,this.lineTangentsOut];i<a.length;i++)for(var l=a[i],u=0;u<6;u++)l.push.apply(l,c(s));return(n=this.lineVertices).push.apply(n,c(e).concat(c(t),c(e),c(t),c(t),c(e))),(n=this.lineVertexColors).push.apply(n,c(r).concat(c(o),c(r),c(o),c(o),c(r))),this}},{key:"_addCap",value:function(e,t,r){for(var o,n=e.array(),s=t.array(),i=[0,0,0],a=0;a<6;a++)(o=this.lineVertices).push.apply(o,c(n)),(o=this.lineTangentsIn).push.apply(o,c(s)),(o=this.lineTangentsOut).push.apply(o,i),(o=this.lineVertexColors).push.apply(o,c(r));return this.lineSides.push(-1,2,-2,1,2,-1),this}},{key:"_addJoin",value:function(e,t,r,o){for(var n,s=e.array(),i=t.array(),a=r.array(),l=0;l<12;l++)(n=this.lineVertices).push.apply(n,c(s)),(n=this.lineTangentsIn).push.apply(n,c(i)),(n=this.lineTangentsOut).push.apply(n,c(a)),(n=this.lineVertexColors).push.apply(n,c(o));return this.lineSides.push(-1,-3,-2,-1,0,-3),this.lineSides.push(3,1,2,3,0,1),this}},{key:"normalize",value:function(){if(0<this.vertices.length){for(var e=this.vertices[0].copy(),t=this.vertices[0].copy(),r=0;r<this.vertices.length;r++)e.x=Math.max(e.x,this.vertices[r].x),t.x=Math.min(t.x,this.vertices[r].x),e.y=Math.max(e.y,this.vertices[r].y),t.y=Math.min(t.y,this.vertices[r].y),e.z=Math.max(e.z,this.vertices[r].z),t.z=Math.min(t.z,this.vertices[r].z);for(var o=m.default.Vector.lerp(e,t,.5),n=m.default.Vector.sub(e,t),s=200/Math.max(Math.max(n.x,n.y),n.z),i=0;i<this.vertices.length;i++)this.vertices[i].sub(o),this.vertices[i].mult(s)}return this}}])&&n(e.prototype,t),r&&n(e,r),o}();var s=m.default.Geometry;r.default=s},{"../core/constants":264,"../core/main":275,"core-js/modules/es.array.concat":151,"core-js/modules/es.array.for-each":157,"core-js/modules/es.array.from":158,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.slice":165,"core-js/modules/es.map":169,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.to-string":182,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.set":189,"core-js/modules/es.string.iterator":192,"core-js/modules/es.string.sub":200,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.for-each":237,"core-js/modules/web.dom-collections.iterator":238}],328:[function(e,t,r){"use strict";e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.typed-array.float32-array"),e("core-js/modules/es.typed-array.copy-within"),e("core-js/modules/es.typed-array.every"),e("core-js/modules/es.typed-array.fill"),e("core-js/modules/es.typed-array.filter"),e("core-js/modules/es.typed-array.find"),e("core-js/modules/es.typed-array.find-index"),e("core-js/modules/es.typed-array.for-each"),e("core-js/modules/es.typed-array.includes"),e("core-js/modules/es.typed-array.index-of"),e("core-js/modules/es.typed-array.iterator"),e("core-js/modules/es.typed-array.join"),e("core-js/modules/es.typed-array.last-index-of"),e("core-js/modules/es.typed-array.map"),e("core-js/modules/es.typed-array.reduce"),e("core-js/modules/es.typed-array.reduce-right"),e("core-js/modules/es.typed-array.reverse"),e("core-js/modules/es.typed-array.set"),e("core-js/modules/es.typed-array.slice"),e("core-js/modules/es.typed-array.some"),e("core-js/modules/es.typed-array.sort"),e("core-js/modules/es.typed-array.subarray"),e("core-js/modules/es.typed-array.to-locale-string"),e("core-js/modules/es.typed-array.to-string"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.typed-array.float32-array"),e("core-js/modules/es.typed-array.copy-within"),e("core-js/modules/es.typed-array.every"),e("core-js/modules/es.typed-array.fill"),e("core-js/modules/es.typed-array.filter"),e("core-js/modules/es.typed-array.find"),e("core-js/modules/es.typed-array.find-index"),e("core-js/modules/es.typed-array.for-each"),e("core-js/modules/es.typed-array.includes"),e("core-js/modules/es.typed-array.index-of"),e("core-js/modules/es.typed-array.iterator"),e("core-js/modules/es.typed-array.join"),e("core-js/modules/es.typed-array.last-index-of"),e("core-js/modules/es.typed-array.map"),e("core-js/modules/es.typed-array.reduce"),e("core-js/modules/es.typed-array.reduce-right"),e("core-js/modules/es.typed-array.reverse"),e("core-js/modules/es.typed-array.set"),e("core-js/modules/es.typed-array.slice"),e("core-js/modules/es.typed-array.some"),e("core-js/modules/es.typed-array.sort"),e("core-js/modules/es.typed-array.subarray"),e("core-js/modules/es.typed-array.to-locale-string"),e("core-js/modules/es.typed-array.to-string"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var C=(e=e("../core/main"))&&e.__esModule?e:{default:e};function n(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var s=Array,O=function(e){return Array.isArray(e)},e=("undefined"!=typeof Float32Array&&(s=Float32Array,O=function(e){return Array.isArray(e)||e instanceof Float32Array}),C.default.Matrix=function(){function r(){var e=this,t=r;if(e instanceof t)return arguments.length&&((e=arguments.length-1)<0||arguments.length<=e?void 0:arguments[e])instanceof C.default&&(this.p5=(t=arguments.length-1)<0||arguments.length<=t?void 0:arguments[t]),"mat3"===(arguments.length<=0?void 0:arguments[0])?this.mat3=Array.isArray(arguments.length<=1?void 0:arguments[1])?arguments.length<=1?void 0:arguments[1]:new s([1,0,0,0,1,0,0,0,1]):this.mat4=Array.isArray(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:new s([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this;throw new TypeError("Cannot call a class as a function")}var e,t,o;return e=r,o=[{key:"identity",value:function(e){return new C.default.Matrix(e)}}],(t=[{key:"set",value:function(e){return e instanceof C.default.Matrix?this.mat4=e.mat4:O(e)?this.mat4=e:16===arguments.length&&(this.mat4[0]=e,this.mat4[1]=arguments[1],this.mat4[2]=arguments[2],this.mat4[3]=arguments[3],this.mat4[4]=arguments[4],this.mat4[5]=arguments[5],this.mat4[6]=arguments[6],this.mat4[7]=arguments[7],this.mat4[8]=arguments[8],this.mat4[9]=arguments[9],this.mat4[10]=arguments[10],this.mat4[11]=arguments[11],this.mat4[12]=arguments[12],this.mat4[13]=arguments[13],this.mat4[14]=arguments[14],this.mat4[15]=arguments[15]),this}},{key:"get",value:function(){return new C.default.Matrix(this.mat4,this.p5)}},{key:"copy",value:function(){var e;return void 0!==this.mat3?((e=new C.default.Matrix("mat3",this.p5)).mat3[0]=this.mat3[0],e.mat3[1]=this.mat3[1],e.mat3[2]=this.mat3[2],e.mat3[3]=this.mat3[3],e.mat3[4]=this.mat3[4],e.mat3[5]=this.mat3[5],e.mat3[6]=this.mat3[6],e.mat3[7]=this.mat3[7],e.mat3[8]=this.mat3[8]):((e=new C.default.Matrix(this.p5)).mat4[0]=this.mat4[0],e.mat4[1]=this.mat4[1],e.mat4[2]=this.mat4[2],e.mat4[3]=this.mat4[3],e.mat4[4]=this.mat4[4],e.mat4[5]=this.mat4[5],e.mat4[6]=this.mat4[6],e.mat4[7]=this.mat4[7],e.mat4[8]=this.mat4[8],e.mat4[9]=this.mat4[9],e.mat4[10]=this.mat4[10],e.mat4[11]=this.mat4[11],e.mat4[12]=this.mat4[12],e.mat4[13]=this.mat4[13],e.mat4[14]=this.mat4[14],e.mat4[15]=this.mat4[15]),e}},{key:"transpose",value:function(e){var t,r,o,n,s,i;return e instanceof C.default.Matrix?(t=e.mat4[1],r=e.mat4[2],o=e.mat4[3],n=e.mat4[6],s=e.mat4[7],i=e.mat4[11],this.mat4[0]=e.mat4[0],this.mat4[1]=e.mat4[4],this.mat4[2]=e.mat4[8],this.mat4[3]=e.mat4[12],this.mat4[4]=t,this.mat4[5]=e.mat4[5],this.mat4[6]=e.mat4[9],this.mat4[7]=e.mat4[13],this.mat4[8]=r,this.mat4[9]=n,this.mat4[10]=e.mat4[10],this.mat4[11]=e.mat4[14],this.mat4[12]=o,this.mat4[13]=s,this.mat4[14]=i,this.mat4[15]=e.mat4[15]):O(e)&&(t=e[1],r=e[2],o=e[3],n=e[6],s=e[7],i=e[11],this.mat4[0]=e[0],this.mat4[1]=e[4],this.mat4[2]=e[8],this.mat4[3]=e[12],this.mat4[4]=t,this.mat4[5]=e[5],this.mat4[6]=e[9],this.mat4[7]=e[13],this.mat4[8]=r,this.mat4[9]=n,this.mat4[10]=e[10],this.mat4[11]=e[14],this.mat4[12]=o,this.mat4[13]=s,this.mat4[14]=i,this.mat4[15]=e[15]),this}},{key:"invert",value:function(e){e instanceof C.default.Matrix?(t=e.mat4[0],r=e.mat4[1],o=e.mat4[2],n=e.mat4[3],s=e.mat4[4],i=e.mat4[5],a=e.mat4[6],l=e.mat4[7],u=e.mat4[8],c=e.mat4[9],d=e.mat4[10],h=e.mat4[11],f=e.mat4[12],p=e.mat4[13],m=e.mat4[14],y=e.mat4[15]):O(e)&&(t=e[0],r=e[1],o=e[2],n=e[3],s=e[4],i=e[5],a=e[6],l=e[7],u=e[8],c=e[9],d=e[10],h=e[11],f=e[12],p=e[13],m=e[14],y=e[15]);var t,r,o,n,s,i,a,l,u,c,d,h,f,p,m,y,e=t*i-r*s,g=t*a-o*s,v=t*l-n*s,b=r*a-o*i,j=r*l-n*i,_=o*l-n*a,x=u*p-c*f,w=u*m-d*f,S=u*y-h*f,T=c*m-d*p,M=c*y-h*p,E=d*y-h*m,k=e*E-g*M+v*T+b*S-j*w+_*x;return k?(this.mat4[0]=(i*E-a*M+l*T)*(k=1/k),this.mat4[1]=(o*M-r*E-n*T)*k,this.mat4[2]=(p*_-m*j+y*b)*k,this.mat4[3]=(d*j-c*_-h*b)*k,this.mat4[4]=(a*S-s*E-l*w)*k,this.mat4[5]=(t*E-o*S+n*w)*k,this.mat4[6]=(m*v-f*_-y*g)*k,this.mat4[7]=(u*_-d*v+h*g)*k,this.mat4[8]=(s*M-i*S+l*x)*k,this.mat4[9]=(r*S-t*M-n*x)*k,this.mat4[10]=(f*j-p*v+y*e)*k,this.mat4[11]=(c*v-u*j-h*e)*k,this.mat4[12]=(i*w-s*T-a*x)*k,this.mat4[13]=(t*T-r*w+o*x)*k,this.mat4[14]=(p*g-f*b-m*e)*k,this.mat4[15]=(u*b-c*g+d*e)*k,this):null}},{key:"invert3x3",value:function(){var e=this.mat3[0],t=this.mat3[1],r=this.mat3[2],o=this.mat3[3],n=this.mat3[4],s=this.mat3[5],i=this.mat3[6],a=this.mat3[7],l=this.mat3[8],u=l*n-s*a,c=-l*o+s*i,d=a*o-n*i,h=e*u+t*c+r*d;return h?(this.mat3[0]=u*(h=1/h),this.mat3[1]=(-l*t+r*a)*h,this.mat3[2]=(s*t-r*n)*h,this.mat3[3]=c*h,this.mat3[4]=(l*e-r*i)*h,this.mat3[5]=(-s*e+r*o)*h,this.mat3[6]=d*h,this.mat3[7]=(-a*e+t*i)*h,this.mat3[8]=(n*e-t*o)*h,this):null}},{key:"transpose3x3",value:function(e){var t=(e=void 0===e?this.mat3:e)[1],r=e[2],o=e[5];return this.mat3[0]=e[0],this.mat3[1]=e[3],this.mat3[2]=e[6],this.mat3[3]=t,this.mat3[4]=e[4],this.mat3[5]=e[7],this.mat3[6]=r,this.mat3[7]=o,this.mat3[8]=e[8],this}},{key:"inverseTranspose",value:function(e){e=e.mat4,void 0===this.mat3?C.default._friendlyError("sorry, this function only works with mat3"):(this.mat3[0]=e[0],this.mat3[1]=e[1],this.mat3[2]=e[2],this.mat3[3]=e[4],this.mat3[4]=e[5],this.mat3[5]=e[6],this.mat3[6]=e[8],this.mat3[7]=e[9],this.mat3[8]=e[10]),e=this.invert3x3();if(e)e.transpose3x3(this.mat3);else for(var t=0;t<9;t++)this.mat3[t]=0;return this}},{key:"determinant",value:function(){var e=this.mat4[0]*this.mat4[5]-this.mat4[1]*this.mat4[4],t=this.mat4[0]*this.mat4[6]-this.mat4[2]*this.mat4[4],r=this.mat4[0]*this.mat4[7]-this.mat4[3]*this.mat4[4],o=this.mat4[1]*this.mat4[6]-this.mat4[2]*this.mat4[5],n=this.mat4[1]*this.mat4[7]-this.mat4[3]*this.mat4[5],s=this.mat4[2]*this.mat4[7]-this.mat4[3]*this.mat4[6],i=this.mat4[8]*this.mat4[13]-this.mat4[9]*this.mat4[12],a=this.mat4[8]*this.mat4[14]-this.mat4[10]*this.mat4[12],l=this.mat4[8]*this.mat4[15]-this.mat4[11]*this.mat4[12],u=this.mat4[9]*this.mat4[14]-this.mat4[10]*this.mat4[13],c=this.mat4[9]*this.mat4[15]-this.mat4[11]*this.mat4[13];return e*(this.mat4[10]*this.mat4[15]-this.mat4[11]*this.mat4[14])-t*c+r*u+o*l-n*a+s*i}},{key:"mult",value:function(e){var t;if(e===this||e===this.mat4)t=this.copy().mat4;else if(e instanceof C.default.Matrix)t=e.mat4;else if(O(e))t=e;else{if(16!==arguments.length)return;t=arguments}var e=this.mat4[0],r=this.mat4[1],o=this.mat4[2],n=this.mat4[3];return this.mat4[0]=e*t[0]+r*t[4]+o*t[8]+n*t[12],this.mat4[1]=e*t[1]+r*t[5]+o*t[9]+n*t[13],this.mat4[2]=e*t[2]+r*t[6]+o*t[10]+n*t[14],this.mat4[3]=e*t[3]+r*t[7]+o*t[11]+n*t[15],e=this.mat4[4],r=this.mat4[5],o=this.mat4[6],n=this.mat4[7],this.mat4[4]=e*t[0]+r*t[4]+o*t[8]+n*t[12],this.mat4[5]=e*t[1]+r*t[5]+o*t[9]+n*t[13],this.mat4[6]=e*t[2]+r*t[6]+o*t[10]+n*t[14],this.mat4[7]=e*t[3]+r*t[7]+o*t[11]+n*t[15],e=this.mat4[8],r=this.mat4[9],o=this.mat4[10],n=this.mat4[11],this.mat4[8]=e*t[0]+r*t[4]+o*t[8]+n*t[12],this.mat4[9]=e*t[1]+r*t[5]+o*t[9]+n*t[13],this.mat4[10]=e*t[2]+r*t[6]+o*t[10]+n*t[14],this.mat4[11]=e*t[3]+r*t[7]+o*t[11]+n*t[15],e=this.mat4[12],r=this.mat4[13],o=this.mat4[14],n=this.mat4[15],this.mat4[12]=e*t[0]+r*t[4]+o*t[8]+n*t[12],this.mat4[13]=e*t[1]+r*t[5]+o*t[9]+n*t[13],this.mat4[14]=e*t[2]+r*t[6]+o*t[10]+n*t[14],this.mat4[15]=e*t[3]+r*t[7]+o*t[11]+n*t[15],this}},{key:"apply",value:function(e){var t;if(e===this||e===this.mat4)t=this.copy().mat4;else if(e instanceof C.default.Matrix)t=e.mat4;else if(O(e))t=e;else{if(16!==arguments.length)return;t=arguments}var e=this.mat4,r=e[0],o=e[4],n=e[8],s=e[12],r=(e[0]=t[0]*r+t[1]*o+t[2]*n+t[3]*s,e[4]=t[4]*r+t[5]*o+t[6]*n+t[7]*s,e[8]=t[8]*r+t[9]*o+t[10]*n+t[11]*s,e[12]=t[12]*r+t[13]*o+t[14]*n+t[15]*s,e[1]),o=e[5],n=e[9],s=e[13],r=(e[1]=t[0]*r+t[1]*o+t[2]*n+t[3]*s,e[5]=t[4]*r+t[5]*o+t[6]*n+t[7]*s,e[9]=t[8]*r+t[9]*o+t[10]*n+t[11]*s,e[13]=t[12]*r+t[13]*o+t[14]*n+t[15]*s,e[2]),o=e[6],n=e[10],s=e[14],r=(e[2]=t[0]*r+t[1]*o+t[2]*n+t[3]*s,e[6]=t[4]*r+t[5]*o+t[6]*n+t[7]*s,e[10]=t[8]*r+t[9]*o+t[10]*n+t[11]*s,e[14]=t[12]*r+t[13]*o+t[14]*n+t[15]*s,e[3]),o=e[7],n=e[11],s=e[15];return e[3]=t[0]*r+t[1]*o+t[2]*n+t[3]*s,e[7]=t[4]*r+t[5]*o+t[6]*n+t[7]*s,e[11]=t[8]*r+t[9]*o+t[10]*n+t[11]*s,e[15]=t[12]*r+t[13]*o+t[14]*n+t[15]*s,this}},{key:"scale",value:function(e,t,r){return e instanceof C.default.Vector?(t=e.y,r=e.z,e=e.x):e instanceof Array&&(t=e[1],r=e[2],e=e[0]),this.mat4[0]*=e,this.mat4[1]*=e,this.mat4[2]*=e,this.mat4[3]*=e,this.mat4[4]*=t,this.mat4[5]*=t,this.mat4[6]*=t,this.mat4[7]*=t,this.mat4[8]*=r,this.mat4[9]*=r,this.mat4[10]*=r,this.mat4[11]*=r,this}},{key:"rotate",value:function(e,t,r,o){t instanceof C.default.Vector?(r=t.y,o=t.z,t=t.x):t instanceof Array&&(r=t[1],o=t[2],t=t[0]);var n=Math.sqrt(t*t+r*r+o*o),n=(t*=1/n,r*=1/n,o*=1/n,this.mat4[0]),s=this.mat4[1],i=this.mat4[2],a=this.mat4[3],l=this.mat4[4],u=this.mat4[5],c=this.mat4[6],d=this.mat4[7],h=this.mat4[8],f=this.mat4[9],p=this.mat4[10],m=this.mat4[11],y=Math.sin(e),e=Math.cos(e),g=1-e,v=t*t*g+e,b=r*t*g+o*y,j=o*t*g-r*y,_=t*r*g-o*y,x=r*r*g+e,w=o*r*g+t*y,S=t*o*g+r*y,r=r*o*g-t*y,t=o*o*g+e;return this.mat4[0]=n*v+l*b+h*j,this.mat4[1]=s*v+u*b+f*j,this.mat4[2]=i*v+c*b+p*j,this.mat4[3]=a*v+d*b+m*j,this.mat4[4]=n*_+l*x+h*w,this.mat4[5]=s*_+u*x+f*w,this.mat4[6]=i*_+c*x+p*w,this.mat4[7]=a*_+d*x+m*w,this.mat4[8]=n*S+l*r+h*t,this.mat4[9]=s*S+u*r+f*t,this.mat4[10]=i*S+c*r+p*t,this.mat4[11]=a*S+d*r+m*t,this}},{key:"translate",value:function(e){var t=e[0],r=e[1],e=e[2]||0;this.mat4[12]+=this.mat4[0]*t+this.mat4[4]*r+this.mat4[8]*e,this.mat4[13]+=this.mat4[1]*t+this.mat4[5]*r+this.mat4[9]*e,this.mat4[14]+=this.mat4[2]*t+this.mat4[6]*r+this.mat4[10]*e,this.mat4[15]+=this.mat4[3]*t+this.mat4[7]*r+this.mat4[11]*e}},{key:"rotateX",value:function(e){this.rotate(e,1,0,0)}},{key:"rotateY",value:function(e){this.rotate(e,0,1,0)}},{key:"rotateZ",value:function(e){this.rotate(e,0,0,1)}},{key:"perspective",value:function(e,t,r,o){var e=1/Math.tan(e/2),n=1/(r-o);return this.mat4[0]=e/t,this.mat4[1]=0,this.mat4[2]=0,this.mat4[3]=0,this.mat4[4]=0,this.mat4[5]=e,this.mat4[6]=0,this.mat4[7]=0,this.mat4[8]=0,this.mat4[9]=0,this.mat4[10]=(o+r)*n,this.mat4[11]=-1,this.mat4[12]=0,this.mat4[13]=0,this.mat4[14]=2*o*r*n,this.mat4[15]=0,this}},{key:"ortho",value:function(e,t,r,o,n,s){var i=1/(e-t),a=1/(r-o),l=1/(n-s);return this.mat4[0]=-2*i,this.mat4[1]=0,this.mat4[2]=0,this.mat4[3]=0,this.mat4[4]=0,this.mat4[5]=-2*a,this.mat4[6]=0,this.mat4[7]=0,this.mat4[8]=0,this.mat4[9]=0,this.mat4[10]=2*l,this.mat4[11]=0,this.mat4[12]=(e+t)*i,this.mat4[13]=(o+r)*a,this.mat4[14]=(s+n)*l,this.mat4[15]=1,this}},{key:"multiplyVec4",value:function(e,t,r,o){var n=new Array(4),s=this.mat4;return n[0]=s[0]*e+s[4]*t+s[8]*r+s[12]*o,n[1]=s[1]*e+s[5]*t+s[9]*r+s[13]*o,n[2]=s[2]*e+s[6]*t+s[10]*r+s[14]*o,n[3]=s[3]*e+s[7]*t+s[11]*r+s[15]*o,n}},{key:"multiplyPoint",value:function(e){var t=e.x,r=e.y,e=e.z,t=this.multiplyVec4(t,r,e,1);return new C.default.Vector(t[0],t[1],t[2])}},{key:"multiplyAndNormalizePoint",value:function(e){var t=e.x,r=e.y,e=e.z,t=this.multiplyVec4(t,r,e,1);return t[0]/=t[3],t[1]/=t[3],t[2]/=t[3],new C.default.Vector(t[0],t[1],t[2])}},{key:"multiplyDirection",value:function(e){var t=e.x,r=e.y,e=e.z,t=this.multiplyVec4(t,r,e,0);return new C.default.Vector(t[0],t[1],t[2])}},{key:"mult3x3",value:function(e){var t;if(e===this||e===this.mat3)t=this.copy().mat3;else if(e instanceof C.default.Matrix)t=e.mat3;else if(O(e))t=e;else{if(9!==arguments.length)return;t=arguments}var e=this.mat3[0],r=this.mat3[1],o=this.mat3[2];return this.mat3[0]=e*t[0]+r*t[3]+o*t[6],this.mat3[1]=e*t[1]+r*t[4]+o*t[7],this.mat3[2]=e*t[2]+r*t[5]+o*t[8],e=this.mat3[3],r=this.mat3[4],o=this.mat3[5],this.mat3[3]=e*t[0]+r*t[3]+o*t[6],this.mat3[4]=e*t[1]+r*t[4]+o*t[7],this.mat3[5]=e*t[2]+r*t[5]+o*t[8],e=this.mat3[6],r=this.mat3[7],o=this.mat3[8],this.mat3[6]=e*t[0]+r*t[3]+o*t[6],this.mat3[7]=e*t[1]+r*t[4]+o*t[7],this.mat3[8]=e*t[2]+r*t[5]+o*t[8],this}},{key:"column",value:function(e){return new C.default.Vector(this.mat3[3*e],this.mat3[3*e+1],this.mat3[3*e+2])}},{key:"row",value:function(e){return new C.default.Vector(this.mat3[e],this.mat3[e+3],this.mat3[e+6])}},{key:"diagonal",value:function(){return void 0!==this.mat3?[this.mat3[0],this.mat3[4],this.mat3[8]]:[this.mat4[0],this.mat4[5],this.mat4[10],this.mat4[15]]}},{key:"multiplyVec3",value:function(e,t){return(t=void 0===t?e.copy():t).x=this.row(0).dot(e),t.y=this.row(1).dot(e),t.z=this.row(2).dot(e),t}},{key:"createSubMatrix3x3",value:function(){var e=new C.default.Matrix("mat3");return e.mat3[0]=this.mat4[0],e.mat3[1]=this.mat4[1],e.mat3[2]=this.mat4[2],e.mat3[3]=this.mat4[4],e.mat3[4]=this.mat4[5],e.mat3[5]=this.mat4[6],e.mat3[6]=this.mat4[8],e.mat3[7]=this.mat4[9],e.mat3[8]=this.mat4[10],e}}])&&n(e.prototype,t),o&&n(e,o),r}(),C.default.Matrix);r.default=e},{"../core/main":275,"core-js/modules/es.array.iterator":161,"core-js/modules/es.object.to-string":182,"core-js/modules/es.typed-array.copy-within":205,"core-js/modules/es.typed-array.every":206,"core-js/modules/es.typed-array.fill":207,"core-js/modules/es.typed-array.filter":208,"core-js/modules/es.typed-array.find":210,"core-js/modules/es.typed-array.find-index":209,"core-js/modules/es.typed-array.float32-array":211,"core-js/modules/es.typed-array.for-each":213,"core-js/modules/es.typed-array.includes":214,"core-js/modules/es.typed-array.index-of":215,"core-js/modules/es.typed-array.iterator":218,"core-js/modules/es.typed-array.join":219,"core-js/modules/es.typed-array.last-index-of":220,"core-js/modules/es.typed-array.map":221,"core-js/modules/es.typed-array.reduce":223,"core-js/modules/es.typed-array.reduce-right":222,"core-js/modules/es.typed-array.reverse":224,"core-js/modules/es.typed-array.set":225,"core-js/modules/es.typed-array.slice":226,"core-js/modules/es.typed-array.some":227,"core-js/modules/es.typed-array.sort":228,"core-js/modules/es.typed-array.subarray":229,"core-js/modules/es.typed-array.to-locale-string":230,"core-js/modules/es.typed-array.to-string":231}],329:[function(e,t,r){"use strict";e("core-js/modules/es.array.map"),e("core-js/modules/es.array.map"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;e=(e=e("../core/main"))&&e.__esModule?e:{default:e};function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}e.default.RenderBuffer=function(){function i(e,t,r,o,n,s){if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");this.size=e,this.src=t,this.dst=r,this.attr=o,this._renderer=n,this.map=s}var e,t,r;return e=i,(t=[{key:"_prepareBuffer",value:function(e,t){var r,o,n,s=t.attributes,i=this._renderer.GL,a=e.model||e,s=s[this.attr];s&&(r=e[this.dst],0<(o=a[this.src]).length?((n=!r)&&(e[this.dst]=r=i.createBuffer()),i.bindBuffer(i.ARRAY_BUFFER,r),!n&&!1===a.dirtyFlags[this.src]||(n=(e=this.map)?e(o):o,this._renderer._bindBuffer(r,i.ARRAY_BUFFER,n),a.dirtyFlags[this.src]=!1),t.enableAttrib(s,this.size)):-1!==(e=s.location)&&this._renderer.registerEnabled.has(e)&&(i.disableVertexAttribArray(e),this._renderer.registerEnabled.delete(e)))}}])&&o(e.prototype,t),r&&o(e,r),i}();e=e.default.RenderBuffer;r.default=e},{"../core/main":275,"core-js/modules/es.array.map":164}],330:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.fill"),e("core-js/modules/es.array.find-index"),e("core-js/modules/es.array.from"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.map"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.fill"),e("core-js/modules/es.array.find-index"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.map"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var l=(n=e("../core/main"))&&n.__esModule?n:{default:n},h=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("../core/constants"));function a(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,a=function(){return e},e)}function f(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}e("./p5.RenderBuffer"),l.default.RendererGL.prototype.beginShape=function(e){return this.immediateMode.shapeMode=void 0!==e?e:h.TESS,this.immediateMode.geometry.reset(),this.immediateMode.contourIndices=[],this};var u={vertices:1,vertexNormals:1,vertexColors:4,vertexStrokeColors:4,uvs:2},n=(l.default.RendererGL.prototype.beginContour=function(){if(this.immediateMode.shapeMode!==h.TESS)throw new Error("WebGL mode can only use contours with beginShape(TESS).");this.immediateMode.contourIndices.push(this.immediateMode.geometry.vertices.length)},l.default.RendererGL.prototype.vertex=function(e,t){if(this.immediateMode.shapeMode===h.QUADS&&this.immediateMode.geometry.vertices.length%6==3)for(var r in u){var o=u[r],r=this.immediateMode.geometry[r];r.push.apply(r,f(r.slice(r.length-3*o,r.length-2*o)).concat(f(r.slice(r.length-o,r.length))))}var n,s,i=n=s=0,a=(3===arguments.length?i=arguments[2]:4===arguments.length?(n=arguments[2],s=arguments[3]):5===arguments.length&&(i=arguments[2],n=arguments[3],s=arguments[4]),new l.default.Vector(e,t,i)),a=(this.immediateMode.geometry.vertices.push(a),this.immediateMode.geometry.vertexNormals.push(this._currentNormal),this.curFillColor||[.5,.5,.5,1]),a=(this.immediateMode.geometry.vertexColors.push(a[0],a[1],a[2],a[3]),this.curStrokeColor||[.5,.5,.5,1]);return this.immediateMode.geometry.vertexStrokeColors.push(a[0],a[1],a[2],a[3]),this.textureMode!==h.IMAGE||this.isProcessingVertices||(null!==this._tex?0<this._tex.width&&0<this._tex.height&&(n/=this._tex.width,s/=this._tex.height):void 0===this.userFillShader&&void 0===this.userStrokeShader&&void 0===this.userPointShader&&null===this._tex&&4<=arguments.length&&console.warn("You must first call texture() before using vertex() with image based u and v coordinates")),this.immediateMode.geometry.uvs.push(n,s),this.immediateMode._bezierVertex[0]=e,this.immediateMode._bezierVertex[1]=t,this.immediateMode._bezierVertex[2]=i,this.immediateMode._quadraticVertex[0]=e,this.immediateMode._quadraticVertex[1]=t,this.immediateMode._quadraticVertex[2]=i,this},l.default.RendererGL.prototype.normal=function(e,t,r){return e instanceof l.default.Vector?this._currentNormal=e:this._currentNormal=new l.default.Vector(e,t,r),this},l.default.RendererGL.prototype.endShape=function(e,t,r,o,n,s){var i=6<arguments.length&&void 0!==arguments[6]?arguments[6]:1;return this.immediateMode.shapeMode===h.POINTS?this._drawPoints(this.immediateMode.geometry.vertices,this.immediateMode.buffers.point):(3===this.immediateMode.geometry.vertices.length&&this.immediateMode.shapeMode===h.TESS&&(this.immediateMode.shapeMode,h.TRIANGLES),this.isProcessingVertices=!0,this._processVertices.apply(this,arguments),this.isProcessingVertices=!1,this.immediateMode.shapeMode!==h.LINE_STRIP&&this.immediateMode.shapeMode!==h.LINES||(this.immediateMode.shapeMode=h.TRIANGLE_FAN),this.immediateMode.shapeMode===h.QUADS?this.immediateMode.shapeMode=h.TRIANGLES:this.immediateMode.shapeMode===h.QUAD_STRIP&&(this.immediateMode.shapeMode=h.TRIANGLE_STRIP),this._doFill&&!this.geometryBuilder&&3<=this.immediateMode.geometry.vertices.length&&this._drawImmediateFill(i),this._doStroke&&!this.geometryBuilder&&1<=this.immediateMode.geometry.lineVertices.length&&this._drawImmediateStroke(),this.geometryBuilder&&this.geometryBuilder.addImmediate(),this.isBezier=!1,this.isQuadratic=!1,this.isCurve=!1,this.immediateMode._bezierVertex.length=0,this.immediateMode._quadraticVertex.length=0,this.immediateMode._curveVertex.length=0),this},l.default.RendererGL.prototype._processVertices=function(e){var t;0!==this.immediateMode.geometry.vertices.length&&(t=this._doStroke,e=e===h.CLOSE,t&&(this.immediateMode.geometry.edges=this._calculateEdges(this.immediateMode.shapeMode,this.immediateMode.geometry.vertices,e),this.geometryBuilder||this.immediateMode.geometry._edgesToVertices()),t=this.immediateMode.shapeMode===h.TESS,e=0<this.immediateMode.contourIndices.length,this._doFill&&(this.isBezier||this.isQuadratic||this.isCurve||t||e)&&this.immediateMode.shapeMode!==h.LINES&&this._tesselateShape())},l.default.RendererGL.prototype._calculateEdges=function(e,t,r){var o=[],n=0,s=this.immediateMode.contourIndices.slice(),i=0;switch(e){case h.TRIANGLE_STRIP:for(n=0;n<t.length-2;n++)o.push([n,n+1]),o.push([n,n+2]);o.push([n,n+1]);break;case h.TRIANGLE_FAN:for(n=1;n<t.length-1;n++)o.push([0,n]),o.push([n,n+1]);o.push([0,t.length-1]);break;case h.TRIANGLES:for(n=0;n<t.length-2;n+=3)o.push([n,n+1]),o.push([n+1,n+2]),o.push([n+2,n]);break;case h.LINES:for(n=0;n<t.length-1;n+=2)o.push([n,n+1]);break;case h.QUADS:for(n=0;n<t.length-5;n+=6)o.push([n,n+1]),o.push([n+1,n+2]),o.push([n+3,n+5]),o.push([n+4,n+5]);break;case h.QUAD_STRIP:for(n=0;n<t.length-2;n+=2)o.push([n,n+1]),o.push([n,n+2]),o.push([n+1,n+3]);o.push([n,n+1]);break;default:for(n=0;n<t.length;n++)n+1<t.length&&n+1!==s[0]?o.push([n,n+1]):((r||i)&&o.push([n,i]),0<s.length&&(i=s.shift()))}return e!==h.TESS&&r&&o.push([t.length-1,0]),o},l.default.RendererGL.prototype._tesselateShape=function(){for(var u=this,e=(this.immediateMode.shapeMode=h.TRIANGLES,[[]]),t=0;t<this.immediateMode.geometry.vertices.length;t++)0<this.immediateMode.contourIndices.length&&this.immediateMode.contourIndices[0]===t&&(this.immediateMode.contourIndices.shift(),e.push([])),e[e.length-1].push(this.immediateMode.geometry.vertices[t].x,this.immediateMode.geometry.vertices[t].y,this.immediateMode.geometry.vertices[t].z,this.immediateMode.geometry.uvs[2*t],this.immediateMode.geometry.uvs[2*t+1],this.immediateMode.geometry.vertexColors[4*t],this.immediateMode.geometry.vertexColors[4*t+1],this.immediateMode.geometry.vertexColors[4*t+2],this.immediateMode.geometry.vertexColors[4*t+3],this.immediateMode.geometry.vertexNormals[t].x,this.immediateMode.geometry.vertexNormals[t].y,this.immediateMode.geometry.vertexNormals[t].z);for(var c,r=this._triangulate(e),d=this.immediateMode.geometry.vertices,o=(this.immediateMode.geometry.vertices=[],this.immediateMode.geometry.vertexNormals=[],this.immediateMode.geometry.uvs=[],[]),n=0,s=r.length;n<s;n+=l.default.RendererGL.prototype.tessyVertexSize)o.push.apply(o,f(r.slice(n+5,n+9))),this.normal.apply(this,f(r.slice(n+9,n+12))),this.vertex.apply(this,f(r.slice(n,n+5)));this.geometryBuilder&&(c=new Map,this.immediateMode.geometry.edges=this.immediateMode.geometry.edges.map(function(e){return e.map(function(e){if(!c.has(e)){var t=d[e],r=u.immediateMode.geometry.vertices.findIndex(function(e){return t.x===e.x&&t.y===e.y&&t.z===e.z});if(-1===r){for(var o=1/0,n=0,s=0;s<u.immediateMode.geometry.vertices.length;s++){var i=u.immediateMode.geometry.vertices[s],a=t.x-i.x,l=t.y-i.y,i=t.z-i.z,a=a*a+l*l+i*i;a<o&&(o=a,n=s)}r=n}c.set(e,r)}return c.get(e)})})),this.immediateMode.geometry.vertexColors=o},l.default.RendererGL.prototype._drawImmediateFill=function(){var e,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,r=this.GL,o=(this._useVertexColor=0<this.immediateMode.geometry.vertexColors.length,e=this._getImmediateFillShader(),this._setFillUniforms(e),!0),n=!1,s=void 0;try{for(var i,a=this.immediateMode.buffers.fill[Symbol.iterator]();!(o=(i=a.next()).done);o=!0)i.value._prepareBuffer(this.immediateMode.geometry,e)}catch(e){n=!0,s=e}finally{try{o||null==a.return||a.return()}finally{if(n)throw s}}if(e.disableRemainingAttributes(),this._applyColorBlend(this.curFillColor),1===t)r.drawArrays(this.immediateMode.shapeMode,0,this.immediateMode.geometry.vertices.length);else try{r.drawArraysInstanced(this.immediateMode.shapeMode,0,this.immediateMode.geometry.vertices.length,t)}catch(e){console.log("🌸 p5.js says: Instancing is only supported in WebGL2 mode")}e.unbindShader()},l.default.RendererGL.prototype._drawImmediateStroke=function(){var e=this.GL,t=(this._useLineColor=0<this.immediateMode.geometry.vertexStrokeColors.length,this._getImmediateStrokeShader()),r=(this._setStrokeUniforms(t),!0),o=!1,n=void 0;try{for(var s,i=this.immediateMode.buffers.stroke[Symbol.iterator]();!(r=(s=i.next()).done);r=!0)s.value._prepareBuffer(this.immediateMode.geometry,t)}catch(e){o=!0,n=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw n}}t.disableRemainingAttributes(),this._applyColorBlend(this.curStrokeColor),e.drawArrays(e.TRIANGLES,0,this.immediateMode.geometry.lineVertices.length/3),t.unbindShader()},l.default.RendererGL);r.default=n},{"../core/constants":264,"../core/main":275,"./p5.RenderBuffer":329,"core-js/modules/es.array.concat":151,"core-js/modules/es.array.fill":154,"core-js/modules/es.array.find-index":156,"core-js/modules/es.array.from":158,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.map":164,"core-js/modules/es.array.slice":165,"core-js/modules/es.map":169,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.to-string":182,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}],331:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.fill"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.some"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.typed-array.float32-array"),e("core-js/modules/es.typed-array.uint16-array"),e("core-js/modules/es.typed-array.uint32-array"),e("core-js/modules/es.typed-array.copy-within"),e("core-js/modules/es.typed-array.every"),e("core-js/modules/es.typed-array.fill"),e("core-js/modules/es.typed-array.filter"),e("core-js/modules/es.typed-array.find"),e("core-js/modules/es.typed-array.find-index"),e("core-js/modules/es.typed-array.for-each"),e("core-js/modules/es.typed-array.includes"),e("core-js/modules/es.typed-array.index-of"),e("core-js/modules/es.typed-array.iterator"),e("core-js/modules/es.typed-array.join"),e("core-js/modules/es.typed-array.last-index-of"),e("core-js/modules/es.typed-array.map"),e("core-js/modules/es.typed-array.reduce"),e("core-js/modules/es.typed-array.reduce-right"),e("core-js/modules/es.typed-array.reverse"),e("core-js/modules/es.typed-array.set"),e("core-js/modules/es.typed-array.slice"),e("core-js/modules/es.typed-array.some"),e("core-js/modules/es.typed-array.sort"),e("core-js/modules/es.typed-array.subarray"),e("core-js/modules/es.typed-array.to-locale-string"),e("core-js/modules/es.typed-array.to-string"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.fill"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.some"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.typed-array.float32-array"),e("core-js/modules/es.typed-array.uint16-array"),e("core-js/modules/es.typed-array.uint32-array"),e("core-js/modules/es.typed-array.copy-within"),e("core-js/modules/es.typed-array.every"),e("core-js/modules/es.typed-array.fill"),e("core-js/modules/es.typed-array.filter"),e("core-js/modules/es.typed-array.find"),e("core-js/modules/es.typed-array.find-index"),e("core-js/modules/es.typed-array.for-each"),e("core-js/modules/es.typed-array.includes"),e("core-js/modules/es.typed-array.index-of"),e("core-js/modules/es.typed-array.iterator"),e("core-js/modules/es.typed-array.join"),e("core-js/modules/es.typed-array.last-index-of"),e("core-js/modules/es.typed-array.map"),e("core-js/modules/es.typed-array.reduce"),e("core-js/modules/es.typed-array.reduce-right"),e("core-js/modules/es.typed-array.reverse"),e("core-js/modules/es.typed-array.set"),e("core-js/modules/es.typed-array.slice"),e("core-js/modules/es.typed-array.some"),e("core-js/modules/es.typed-array.sort"),e("core-js/modules/es.typed-array.subarray"),e("core-js/modules/es.typed-array.to-locale-string"),e("core-js/modules/es.typed-array.to-string"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=(s=e("../core/main"))&&s.__esModule?s:{default:s},n=(e("./p5.RendererGL"),e("./p5.RenderBuffer"),function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("../core/constants")));function l(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,l=function(){return e},e)}a.default.RendererGL.prototype.freeGeometry=function(e){e.gid?this._freeBuffers(e.gid):console.warn("The model you passed to freeGeometry does not have an id!")},a.default.RendererGL.prototype._initBufferDefaults=function(e){var t;return this._freeBuffers(e),1e3<Object.keys(this.retainedMode.geometry).length&&(t=Object.keys(this.retainedMode.geometry)[0],this._freeBuffers(t)),this.retainedMode.geometry[e]={}},a.default.RendererGL.prototype._freeBuffers=function(e){var a,l=this.retainedMode.geometry[e];function t(e){var t=!0,r=!1,o=void 0;try{for(var n,s=e[Symbol.iterator]();!(t=(n=s.next()).done);t=!0){var i=n.value;l[i.dst]&&(a.deleteBuffer(l[i.dst]),l[i.dst]=null)}}catch(e){r=!0,o=e}finally{try{t||null==s.return||s.return()}finally{if(r)throw o}}}l&&(delete this.retainedMode.geometry[e],a=this.GL,l.indexBuffer&&a.deleteBuffer(l.indexBuffer),t(this.retainedMode.buffers.stroke),t(this.retainedMode.buffers.fill))},a.default.RendererGL.prototype.createBuffers=function(e,t){var r,o,n,s=this.GL,e=this._initBufferDefaults(e),i=(e.model=t,e.indexBuffer);return t.faces.length?(i=i||(e.indexBuffer=s.createBuffer()),n=(o=(r=a.default.RendererGL.prototype._flatten(t.faces)).some(function(e){return 65535<e}))?Uint32Array:Uint16Array,this._bindBuffer(i,s.ELEMENT_ARRAY_BUFFER,r,n),e.indexBufferType=o?s.UNSIGNED_INT:s.UNSIGNED_SHORT,e.vertexCount=3*t.faces.length):(i&&(s.deleteBuffer(i),e.indexBuffer=null),e.vertexCount=t.vertices?t.vertices.length:0),e.lineVertexCount=t.lineVertices?t.lineVertices.length/3:0,e},a.default.RendererGL.prototype.drawBuffers=function(e){var t=this.GL,r=this.retainedMode.geometry[e];if(!this.geometryBuilder&&this._doFill&&0<this.retainedMode.geometry[e].vertexCount){this._useVertexColor=0<r.model.vertexColors.length;var o=this._getRetainedFillShader(),n=(this._setFillUniforms(o),!0),s=!1,i=void 0;try{for(var a,l=this.retainedMode.buffers.fill[Symbol.iterator]();!(n=(a=l.next()).done);n=!0)a.value._prepareBuffer(r,o)}catch(e){s=!0,i=e}finally{try{n||null==l.return||l.return()}finally{if(s)throw i}}o.disableRemainingAttributes(),r.indexBuffer&&this._bindBuffer(r.indexBuffer,t.ELEMENT_ARRAY_BUFFER),this._applyColorBlend(this.curFillColor),this._drawElements(t.TRIANGLES,e),o.unbindShader()}if(!this.geometryBuilder&&this._doStroke&&0<r.lineVertexCount){this._useLineColor=0<r.model.vertexStrokeColors.length;var u=this._getRetainedStrokeShader(),c=(this._setStrokeUniforms(u),!0),s=!1,i=void 0;try{for(var d,h=this.retainedMode.buffers.stroke[Symbol.iterator]();!(c=(d=h.next()).done);c=!0)d.value._prepareBuffer(r,u)}catch(e){s=!0,i=e}finally{try{c||null==h.return||h.return()}finally{if(s)throw i}}u.disableRemainingAttributes(),this._applyColorBlend(this.curStrokeColor),this._drawArrays(t.TRIANGLES,e),u.unbindShader()}return this.geometryBuilder&&this.geometryBuilder.addRetained(r),this},a.default.RendererGL.prototype.drawBuffersScaled=function(e,t,r,o){var n=this.uMVMatrix.copy();try{this.uMVMatrix.scale(t,r,o),this.drawBuffers(e)}finally{this.uMVMatrix=n}},a.default.RendererGL.prototype._drawArrays=function(e,t){return this.GL.drawArrays(e,0,this.retainedMode.geometry[t].lineVertexCount),this},a.default.RendererGL.prototype._drawElements=function(e,t){var t=this.retainedMode.geometry[t],r=this.GL;if(t.indexBuffer){if(this._pInst.webglVersion!==n.WEBGL2&&t.indexBufferType===r.UNSIGNED_INT&&!r.getExtension("OES_element_index_uint"))throw new Error("Unable to render a 3d model with > 65535 triangles. Your web browser does not support the WebGL Extension OES_element_index_uint.");r.drawElements(r.TRIANGLES,t.vertexCount,t.indexBufferType,0)}else r.drawArrays(e||r.TRIANGLES,0,t.vertexCount)},a.default.RendererGL.prototype._drawPoints=function(e,t){var r=this.GL,o=this._getImmediatePointShader();this._setPointUniforms(o),this._bindBuffer(t,r.ARRAY_BUFFER,this._vToNArray(e),Float32Array,r.STATIC_DRAW),o.enableAttrib(o.attributes.aPosition,3),this._applyColorBlend(this.curStrokeColor),r.drawArrays(r.Points,0,e.length),o.unbindShader()};var s=a.default.RendererGL;r.default=s},{"../core/constants":264,"../core/main":275,"./p5.RenderBuffer":329,"./p5.RendererGL":332,"core-js/modules/es.array.fill":154,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.some":166,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.keys":181,"core-js/modules/es.object.to-string":182,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.typed-array.copy-within":205,"core-js/modules/es.typed-array.every":206,"core-js/modules/es.typed-array.fill":207,"core-js/modules/es.typed-array.filter":208,"core-js/modules/es.typed-array.find":210,"core-js/modules/es.typed-array.find-index":209,"core-js/modules/es.typed-array.float32-array":211,"core-js/modules/es.typed-array.for-each":213,"core-js/modules/es.typed-array.includes":214,"core-js/modules/es.typed-array.index-of":215,"core-js/modules/es.typed-array.iterator":218,"core-js/modules/es.typed-array.join":219,"core-js/modules/es.typed-array.last-index-of":220,"core-js/modules/es.typed-array.map":221,"core-js/modules/es.typed-array.reduce":223,"core-js/modules/es.typed-array.reduce-right":222,"core-js/modules/es.typed-array.reverse":224,"core-js/modules/es.typed-array.set":225,"core-js/modules/es.typed-array.slice":226,"core-js/modules/es.typed-array.some":227,"core-js/modules/es.typed-array.sort":228,"core-js/modules/es.typed-array.subarray":229,"core-js/modules/es.typed-array.to-locale-string":230,"core-js/modules/es.typed-array.to-string":231,"core-js/modules/es.typed-array.uint16-array":232,"core-js/modules/es.typed-array.uint32-array":233,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}],332:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.copy-within"),e("core-js/modules/es.array.every"),e("core-js/modules/es.array.fill"),e("core-js/modules/es.array.from"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.array.some"),e("core-js/modules/es.map"),e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.get-prototype-of"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.reflect.construct"),e("core-js/modules/es.reflect.get"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.set"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.typed-array.float32-array"),e("core-js/modules/es.typed-array.float64-array"),e("core-js/modules/es.typed-array.int16-array"),e("core-js/modules/es.typed-array.uint8-array"),e("core-js/modules/es.typed-array.uint16-array"),e("core-js/modules/es.typed-array.uint32-array"),e("core-js/modules/es.typed-array.copy-within"),e("core-js/modules/es.typed-array.every"),e("core-js/modules/es.typed-array.fill"),e("core-js/modules/es.typed-array.filter"),e("core-js/modules/es.typed-array.find"),e("core-js/modules/es.typed-array.find-index"),e("core-js/modules/es.typed-array.for-each"),e("core-js/modules/es.typed-array.includes"),e("core-js/modules/es.typed-array.index-of"),e("core-js/modules/es.typed-array.iterator"),e("core-js/modules/es.typed-array.join"),e("core-js/modules/es.typed-array.last-index-of"),e("core-js/modules/es.typed-array.map"),e("core-js/modules/es.typed-array.reduce"),e("core-js/modules/es.typed-array.reduce-right"),e("core-js/modules/es.typed-array.reverse"),e("core-js/modules/es.typed-array.set"),e("core-js/modules/es.typed-array.slice"),e("core-js/modules/es.typed-array.some"),e("core-js/modules/es.typed-array.sort"),e("core-js/modules/es.typed-array.subarray"),e("core-js/modules/es.typed-array.to-locale-string"),e("core-js/modules/es.typed-array.to-string"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.copy-within"),e("core-js/modules/es.array.every"),e("core-js/modules/es.array.fill"),e("core-js/modules/es.array.from"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.array.some"),e("core-js/modules/es.map"),e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.set"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.typed-array.float32-array"),e("core-js/modules/es.typed-array.float64-array"),e("core-js/modules/es.typed-array.int16-array"),e("core-js/modules/es.typed-array.uint8-array"),e("core-js/modules/es.typed-array.uint16-array"),e("core-js/modules/es.typed-array.uint32-array"),e("core-js/modules/es.typed-array.copy-within"),e("core-js/modules/es.typed-array.every"),e("core-js/modules/es.typed-array.fill"),e("core-js/modules/es.typed-array.filter"),e("core-js/modules/es.typed-array.find"),e("core-js/modules/es.typed-array.find-index"),e("core-js/modules/es.typed-array.for-each"),e("core-js/modules/es.typed-array.includes"),e("core-js/modules/es.typed-array.index-of"),e("core-js/modules/es.typed-array.iterator"),e("core-js/modules/es.typed-array.join"),e("core-js/modules/es.typed-array.last-index-of"),e("core-js/modules/es.typed-array.map"),e("core-js/modules/es.typed-array.reduce"),e("core-js/modules/es.typed-array.reduce-right"),e("core-js/modules/es.typed-array.reverse"),e("core-js/modules/es.typed-array.set"),e("core-js/modules/es.typed-array.slice"),e("core-js/modules/es.typed-array.some"),e("core-js/modules/es.typed-array.sort"),e("core-js/modules/es.typed-array.subarray"),e("core-js/modules/es.typed-array.to-locale-string"),e("core-js/modules/es.typed-array.to-string"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.readPixelsWebGL=k,r.readPixelWebGL=C,r.default=void 0;var g=n(e("../core/main")),l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("../core/constants")),a=n(e("./GeometryBuilder")),u=n(e("libtess")),c=(e("./p5.Shader"),e("./p5.Camera"),e("../core/p5.Renderer"),e("./p5.Matrix"),e("./p5.Framebuffer"),e("path"),e("./p5.Texture"));function d(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,d=function(){return e},e)}function n(e){return e&&e.__esModule?e:{default:e}}function h(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function f(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function p(e,t,r){return(p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var e=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=b(e)););return e}(e,t);if(e)return(e=Object.getOwnPropertyDescriptor(e,t)).get?e.get.call(r):e.value})(e,t,r||e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(o){return function(){var e,t,r=b(o);return e=function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch(e){}}}()?(e=b(this).constructor,Reflect.construct(r,arguments,e)):r.apply(this,arguments),r=this,!(t=e)||"object"!==i(t)&&"function"!=typeof t?v(r):t}}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function j(e,t,r){t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}function s(e,t){T+="#define STROKE_CAP_".concat(e," ").concat(t,"\n"),w[l[e]]=t}function _(e,t){T+="#define STROKE_JOIN_".concat(e," ").concat(t,"\n"),S[l[e]]=t}var x,w={},S={},T="",e=(s("ROUND",0),s("PROJECT",1),s("SQUARE",2),_("ROUND",0),_("MITER",1),_("BEVEL",2),'#define PI 3.141592\n\nprecision highp float;\nprecision highp int;\n\nuniform mat4 uViewMatrix;\n\nuniform bool uUseLighting;\n\nuniform int uAmbientLightCount;\nuniform vec3 uAmbientColor[5];\n\nuniform int uDirectionalLightCount;\nuniform vec3 uLightingDirection[5];\nuniform vec3 uDirectionalDiffuseColors[5];\nuniform vec3 uDirectionalSpecularColors[5];\n\nuniform int uPointLightCount;\nuniform vec3 uPointLightLocation[5];\nuniform vec3 uPointLightDiffuseColors[5];\t\nuniform vec3 uPointLightSpecularColors[5];\n\nuniform int uSpotLightCount;\nuniform float uSpotLightAngle[5];\nuniform float uSpotLightConc[5];\nuniform vec3 uSpotLightDiffuseColors[5];\nuniform vec3 uSpotLightSpecularColors[5];\nuniform vec3 uSpotLightLocation[5];\nuniform vec3 uSpotLightDirection[5];\n\nuniform bool uSpecular;\nuniform float uShininess;\n\nuniform float uConstantAttenuation;\nuniform float uLinearAttenuation;\nuniform float uQuadraticAttenuation;\n\n// setting from _setImageLightUniforms()\n// boolean to initiate the calculateImageDiffuse and calculateImageSpecular\nuniform bool uUseImageLight;\n// texture for use in calculateImageDiffuse\nuniform sampler2D environmentMapDiffused;\n// texture for use in calculateImageSpecular\nuniform sampler2D environmentMapSpecular;\n// roughness for use in calculateImageSpecular\nuniform float levelOfDetail;\n\nconst float specularFactor = 2.0;\nconst float diffuseFactor = 0.73;\n\nstruct LightResult {\n float specular;\n float diffuse;\n};\n\nfloat _phongSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float shininess) {\n\n vec3 R = reflect(lightDirection, surfaceNormal);\n return pow(max(0.0, dot(R, viewDirection)), shininess);\n}\n\nfloat _lambertDiffuse(vec3 lightDirection, vec3 surfaceNormal) {\n return max(0.0, dot(-lightDirection, surfaceNormal));\n}\n\nLightResult _light(vec3 viewDirection, vec3 normal, vec3 lightVector) {\n\n vec3 lightDir = normalize(lightVector);\n\n //compute our diffuse & specular terms\n LightResult lr;\n if (uSpecular)\n lr.specular = _phongSpecular(lightDir, viewDirection, normal, uShininess);\n lr.diffuse = _lambertDiffuse(lightDir, normal);\n return lr;\n}\n\n// converts the range of "value" from [min1 to max1] to [min2 to max2]\nfloat map(float value, float min1, float max1, float min2, float max2) {\n return min2 + (value - min1) * (max2 - min2) / (max1 - min1);\n}\n\nvec2 mapTextureToNormal( vec3 v ){\n // x = r sin(phi) cos(theta) \n // y = r cos(phi) \n // z = r sin(phi) sin(theta)\n float phi = acos( v.y );\n // if phi is 0, then there are no x, z components\n float theta = 0.0;\n // else \n theta = acos(v.x / sin(phi));\n float sinTheta = v.z / sin(phi);\n if (sinTheta < 0.0) {\n // Turn it into -theta, but in the 0-2PI range\n theta = 2.0 * PI - theta;\n }\n theta = theta / (2.0 * 3.14159);\n phi = phi / 3.14159 ;\n \n vec2 angles = vec2( fract(theta + 0.25), 1.0 - phi );\n return angles;\n}\n\n\nvec3 calculateImageDiffuse( vec3 vNormal, vec3 vViewPosition ){\n // make 2 seperate builds \n vec3 worldCameraPosition = vec3(0.0, 0.0, 0.0); // hardcoded world camera position\n vec3 worldNormal = normalize(vNormal);\n vec2 newTexCoor = mapTextureToNormal( worldNormal );\n vec4 texture = TEXTURE( environmentMapDiffused, newTexCoor );\n // this is to make the darker sections more dark\n // png and jpg usually flatten the brightness so it is to reverse that\n return smoothstep(vec3(0.0), vec3(0.8), texture.xyz);\n}\n\nvec3 calculateImageSpecular( vec3 vNormal, vec3 vViewPosition ){\n vec3 worldCameraPosition = vec3(0.0, 0.0, 0.0);\n vec3 worldNormal = normalize(vNormal);\n vec3 lightDirection = normalize( vViewPosition - worldCameraPosition );\n vec3 R = reflect(lightDirection, worldNormal);\n vec2 newTexCoor = mapTextureToNormal( R );\n#ifdef WEBGL2\n vec4 outColor = textureLod(environmentMapSpecular, newTexCoor, levelOfDetail);\n#else\n vec4 outColor = TEXTURE(environmentMapSpecular, newTexCoor);\n#endif\n // this is to make the darker sections more dark\n // png and jpg usually flatten the brightness so it is to reverse that\n return pow(outColor.xyz, vec3(10.0));\n}\n\nvoid totalLight(\n vec3 modelPosition,\n vec3 normal,\n out vec3 totalDiffuse,\n out vec3 totalSpecular\n) {\n\n totalSpecular = vec3(0.0);\n\n if (!uUseLighting) {\n totalDiffuse = vec3(1.0);\n return;\n }\n\n totalDiffuse = vec3(0.0);\n\n vec3 viewDirection = normalize(-modelPosition);\n\n for (int j = 0; j < 5; j++) {\n if (j < uDirectionalLightCount) {\n vec3 lightVector = (uViewMatrix * vec4(uLightingDirection[j], 0.0)).xyz;\n vec3 lightColor = uDirectionalDiffuseColors[j];\n vec3 specularColor = uDirectionalSpecularColors[j];\n LightResult result = _light(viewDirection, normal, lightVector);\n totalDiffuse += result.diffuse * lightColor;\n totalSpecular += result.specular * lightColor * specularColor;\n }\n\n if (j < uPointLightCount) {\n vec3 lightPosition = (uViewMatrix * vec4(uPointLightLocation[j], 1.0)).xyz;\n vec3 lightVector = modelPosition - lightPosition;\n \n //calculate attenuation\n float lightDistance = length(lightVector);\n float lightFalloff = 1.0 / (uConstantAttenuation + lightDistance * uLinearAttenuation + (lightDistance * lightDistance) * uQuadraticAttenuation);\n vec3 lightColor = lightFalloff * uPointLightDiffuseColors[j];\n vec3 specularColor = lightFalloff * uPointLightSpecularColors[j];\n\n LightResult result = _light(viewDirection, normal, lightVector);\n totalDiffuse += result.diffuse * lightColor;\n totalSpecular += result.specular * lightColor * specularColor;\n }\n\n if(j < uSpotLightCount) {\n vec3 lightPosition = (uViewMatrix * vec4(uSpotLightLocation[j], 1.0)).xyz;\n vec3 lightVector = modelPosition - lightPosition;\n \n float lightDistance = length(lightVector);\n float lightFalloff = 1.0 / (uConstantAttenuation + lightDistance * uLinearAttenuation + (lightDistance * lightDistance) * uQuadraticAttenuation);\n\n vec3 lightDirection = (uViewMatrix * vec4(uSpotLightDirection[j], 0.0)).xyz;\n float spotDot = dot(normalize(lightVector), normalize(lightDirection));\n float spotFalloff;\n if(spotDot < uSpotLightAngle[j]) {\n spotFalloff = 0.0;\n }\n else {\n spotFalloff = pow(spotDot, uSpotLightConc[j]);\n }\n lightFalloff *= spotFalloff;\n\n vec3 lightColor = uSpotLightDiffuseColors[j];\n vec3 specularColor = uSpotLightSpecularColors[j];\n \n LightResult result = _light(viewDirection, normal, lightVector);\n \n totalDiffuse += result.diffuse * lightColor * lightFalloff;\n totalSpecular += result.specular * lightColor * specularColor * lightFalloff;\n }\n }\n\n if( uUseImageLight ){\n totalDiffuse += calculateImageDiffuse(normal, modelPosition);\n totalSpecular += calculateImageSpecular(normal, modelPosition);\n }\n\n totalDiffuse *= diffuseFactor;\n totalSpecular *= specularFactor;\n}\n'),M={immediateVert:"IN vec3 aPosition;\nIN vec4 aVertexColor;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform float uResolution;\nuniform float uPointSize;\n\nOUT vec4 vColor;\nvoid main(void) {\n vec4 positionVec4 = vec4(aPosition, 1.0);\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n vColor = aVertexColor;\n gl_PointSize = uPointSize;\n}\n",vertexColorVert:"IN vec3 aPosition;\nIN vec4 aVertexColor;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nOUT vec4 vColor;\n\nvoid main(void) {\n vec4 positionVec4 = vec4(aPosition, 1.0);\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n vColor = aVertexColor;\n}\n",vertexColorFrag:"IN vec4 vColor;\nvoid main(void) {\n OUT_COLOR = vec4(vColor.rgb, 1.) * vColor.a;\n}\n",normalVert:"IN vec3 aPosition;\nIN vec3 aNormal;\nIN vec2 aTexCoord;\nIN vec4 aVertexColor;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform mat3 uNormalMatrix;\n\nuniform vec4 uMaterialColor;\nuniform bool uUseVertexColor;\n\nOUT vec3 vVertexNormal;\nOUT highp vec2 vVertTexCoord;\nOUT vec4 vColor;\n\nvoid main(void) {\n vec4 positionVec4 = vec4(aPosition, 1.0);\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n vVertexNormal = normalize(vec3( uNormalMatrix * aNormal ));\n vVertTexCoord = aTexCoord;\n vColor = (uUseVertexColor ? aVertexColor : uMaterialColor);\n}\n",normalFrag:"IN vec3 vVertexNormal;\nvoid main(void) {\n OUT_COLOR = vec4(vVertexNormal, 1.0);\n}\n",basicFrag:"IN vec4 vColor;\nvoid main(void) {\n OUT_COLOR = vec4(vColor.rgb, 1.) * vColor.a;\n}\n",lightVert:e+"// include lighting.glgl\n\nIN vec3 aPosition;\nIN vec3 aNormal;\nIN vec2 aTexCoord;\nIN vec4 aVertexColor;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform mat3 uNormalMatrix;\n\nuniform bool uUseVertexColor;\nuniform vec4 uMaterialColor;\n\nOUT highp vec2 vVertTexCoord;\nOUT vec3 vDiffuseColor;\nOUT vec3 vSpecularColor;\nOUT vec4 vColor;\n\nvoid main(void) {\n\n vec4 viewModelPosition = uModelViewMatrix * vec4(aPosition, 1.0);\n gl_Position = uProjectionMatrix * viewModelPosition;\n\n vec3 vertexNormal = normalize(uNormalMatrix * aNormal);\n vVertTexCoord = aTexCoord;\n\n totalLight(viewModelPosition.xyz, vertexNormal, vDiffuseColor, vSpecularColor);\n\n for (int i = 0; i < 8; i++) {\n if (i < uAmbientLightCount) {\n vDiffuseColor += uAmbientColor[i];\n }\n }\n \n vColor = (uUseVertexColor ? aVertexColor : uMaterialColor);\n}\n",lightTextureFrag:"uniform vec4 uTint;\nuniform sampler2D uSampler;\nuniform bool isTexture;\nuniform bool uEmissive;\n\nIN highp vec2 vVertTexCoord;\nIN vec3 vDiffuseColor;\nIN vec3 vSpecularColor;\nIN vec4 vColor;\n\nvoid main(void) {\n if(uEmissive && !isTexture) {\n OUT_COLOR = vColor;\n }\n else {\n vec4 baseColor = isTexture\n // Textures come in with premultiplied alpha. To apply tint and still have\n // premultiplied alpha output, we need to multiply the RGB channels by the\n // tint RGB, and all channels by the tint alpha.\n ? TEXTURE(uSampler, vVertTexCoord) * vec4(uTint.rgb/255., 1.) * (uTint.a/255.)\n // Colors come in with unmultiplied alpha, so we need to multiply the RGB\n // channels by alpha to convert it to premultiplied alpha.\n : vec4(vColor.rgb * vColor.a, vColor.a);\n OUT_COLOR = vec4(baseColor.rgb * vDiffuseColor + vSpecularColor, baseColor.a);\n }\n}\n",phongVert:"precision highp int;\n\nIN vec3 aPosition;\nIN vec3 aNormal;\nIN vec2 aTexCoord;\nIN vec4 aVertexColor;\n\nuniform vec3 uAmbientColor[5];\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform mat3 uNormalMatrix;\nuniform int uAmbientLightCount;\n\nuniform bool uUseVertexColor;\nuniform vec4 uMaterialColor;\n\nOUT vec3 vNormal;\nOUT vec2 vTexCoord;\nOUT vec3 vViewPosition;\nOUT vec3 vAmbientColor;\nOUT vec4 vColor;\n\nvoid main(void) {\n\n vec4 viewModelPosition = uModelViewMatrix * vec4(aPosition, 1.0);\n\n // Pass varyings to fragment shader\n vViewPosition = viewModelPosition.xyz;\n gl_Position = uProjectionMatrix * viewModelPosition; \n\n vNormal = uNormalMatrix * aNormal;\n vTexCoord = aTexCoord;\n\n // TODO: this should be a uniform\n vAmbientColor = vec3(0.0);\n for (int i = 0; i < 5; i++) {\n if (i < uAmbientLightCount) {\n vAmbientColor += uAmbientColor[i];\n }\n }\n \n vColor = (uUseVertexColor ? aVertexColor : uMaterialColor);\n}\n",phongFrag:e+"// include lighting.glsl\nprecision highp int;\n\nuniform bool uHasSetAmbient;\nuniform vec4 uSpecularMatColor;\nuniform vec4 uAmbientMatColor;\nuniform vec4 uEmissiveMatColor;\n\nuniform vec4 uTint;\nuniform sampler2D uSampler;\nuniform bool isTexture;\n\nIN vec3 vNormal;\nIN vec2 vTexCoord;\nIN vec3 vViewPosition;\nIN vec3 vAmbientColor;\nIN vec4 vColor;\n\nvoid main(void) {\n\n vec3 diffuse;\n vec3 specular;\n totalLight(vViewPosition, normalize(vNormal), diffuse, specular);\n\n // Calculating final color as result of all lights (plus emissive term).\n\n vec4 baseColor = isTexture\n // Textures come in with premultiplied alpha. To apply tint and still have\n // premultiplied alpha output, we need to multiply the RGB channels by the\n // tint RGB, and all channels by the tint alpha.\n ? TEXTURE(uSampler, vTexCoord) * vec4(uTint.rgb/255., 1.) * (uTint.a/255.)\n // Colors come in with unmultiplied alpha, so we need to multiply the RGB\n // channels by alpha to convert it to premultiplied alpha.\n : vec4(vColor.rgb * vColor.a, vColor.a);\n OUT_COLOR = vec4(diffuse * baseColor.rgb + \n vAmbientColor * (\n uHasSetAmbient ? uAmbientMatColor.rgb : baseColor.rgb\n ) + \n specular * uSpecularMatColor.rgb + \n uEmissiveMatColor.rgb, baseColor.a);\n}\n",fontVert:"IN vec3 aPosition;\nIN vec2 aTexCoord;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nuniform vec4 uGlyphRect;\nuniform float uGlyphOffset;\n\nOUT vec2 vTexCoord;\nOUT float w;\n\nvoid main() {\n vec4 positionVec4 = vec4(aPosition, 1.0);\n\n // scale by the size of the glyph's rectangle\n positionVec4.xy *= uGlyphRect.zw - uGlyphRect.xy;\n\n // Expand glyph bounding boxes by 1px on each side to give a bit of room\n // for antialiasing\n vec3 newOrigin = (uModelViewMatrix * vec4(0., 0., 0., 1.)).xyz;\n vec3 newDX = (uModelViewMatrix * vec4(1., 0., 0., 1.)).xyz;\n vec3 newDY = (uModelViewMatrix * vec4(0., 1., 0., 1.)).xyz;\n vec2 pixelScale = vec2(\n 1. / length(newOrigin - newDX),\n 1. / length(newOrigin - newDY)\n );\n vec2 offset = pixelScale * normalize(aTexCoord - vec2(0.5, 0.5)) * vec2(1., -1.);\n vec2 textureOffset = offset * (1. / vec2(\n uGlyphRect.z - uGlyphRect.x,\n uGlyphRect.w - uGlyphRect.y\n ));\n\n // move to the corner of the glyph\n positionVec4.xy += uGlyphRect.xy;\n\n // move to the letter's line offset\n positionVec4.x += uGlyphOffset;\n\n positionVec4.xy += offset;\n \n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n vTexCoord = aTexCoord + textureOffset;\n w = gl_Position.w;\n}\n",fontFrag:"#ifndef WEBGL2\n#extension GL_OES_standard_derivatives : enable\n#endif\n\n#if 0\n // simulate integer math using floats\n\t#define int float\n\t#define ivec2 vec2\n\t#define INT(x) float(x)\n\n\tint ifloor(float v) { return floor(v); }\n\tivec2 ifloor(vec2 v) { return floor(v); }\n\n#else\n // use native integer math\n\tprecision highp int;\n\t#define INT(x) x\n\n\tint ifloor(float v) { return int(v); }\n\tint ifloor(int v) { return v; }\n\tivec2 ifloor(vec2 v) { return ivec2(v); }\n\n#endif\n\nuniform sampler2D uSamplerStrokes;\nuniform sampler2D uSamplerRowStrokes;\nuniform sampler2D uSamplerRows;\nuniform sampler2D uSamplerColStrokes;\nuniform sampler2D uSamplerCols;\n\nuniform ivec2 uStrokeImageSize;\nuniform ivec2 uCellsImageSize;\nuniform ivec2 uGridImageSize;\n\nuniform ivec2 uGridOffset;\nuniform ivec2 uGridSize;\nuniform vec4 uMaterialColor;\n\nIN vec2 vTexCoord;\n\n// some helper functions\nint ROUND(float v) { return ifloor(v + 0.5); }\nivec2 ROUND(vec2 v) { return ifloor(v + 0.5); }\nfloat saturate(float v) { return clamp(v, 0.0, 1.0); }\nvec2 saturate(vec2 v) { return clamp(v, 0.0, 1.0); }\n\nint mul(float v1, int v2) {\n return ifloor(v1 * float(v2));\n}\n\nivec2 mul(vec2 v1, ivec2 v2) {\n return ifloor(v1 * vec2(v2) + 0.5);\n}\n\n// unpack a 16-bit integer from a float vec2\nint getInt16(vec2 v) {\n ivec2 iv = ROUND(v * 255.0);\n return iv.x * INT(128) + iv.y;\n}\n\nvec2 pixelScale;\nvec2 coverage = vec2(0.0);\nvec2 weight = vec2(0.5);\nconst float minDistance = 1.0/8192.0;\nconst float hardness = 1.05; // amount of antialias\n\n// the maximum number of curves in a glyph\nconst int N = INT(250);\n\n// retrieves an indexed pixel from a sampler\nvec4 getTexel(sampler2D sampler, int pos, ivec2 size) {\n int width = size.x;\n int y = ifloor(pos / width);\n int x = pos - y * width; // pos % width\n\n return TEXTURE(sampler, (vec2(x, y) + 0.5) / vec2(size));\n}\n\nvoid calulateCrossings(vec2 p0, vec2 p1, vec2 p2, out vec2 C1, out vec2 C2) {\n\n // get the coefficients of the quadratic in t\n vec2 a = p0 - p1 * 2.0 + p2;\n vec2 b = p0 - p1;\n vec2 c = p0 - vTexCoord;\n\n // found out which values of 't' it crosses the axes\n vec2 surd = sqrt(max(vec2(0.0), b * b - a * c));\n vec2 t1 = ((b - surd) / a).yx;\n vec2 t2 = ((b + surd) / a).yx;\n\n // approximate straight lines to avoid rounding errors\n if (abs(a.y) < 0.001)\n t1.x = t2.x = c.y / (2.0 * b.y);\n\n if (abs(a.x) < 0.001)\n t1.y = t2.y = c.x / (2.0 * b.x);\n\n // plug into quadratic formula to find the corrdinates of the crossings\n C1 = ((a * t1 - b * 2.0) * t1 + c) * pixelScale;\n C2 = ((a * t2 - b * 2.0) * t2 + c) * pixelScale;\n}\n\nvoid coverageX(vec2 p0, vec2 p1, vec2 p2) {\n\n vec2 C1, C2;\n calulateCrossings(p0, p1, p2, C1, C2);\n\n // determine on which side of the x-axis the points lie\n bool y0 = p0.y > vTexCoord.y;\n bool y1 = p1.y > vTexCoord.y;\n bool y2 = p2.y > vTexCoord.y;\n\n // could web be under the curve (after t1)?\n if (y1 ? !y2 : y0) {\n // add the coverage for t1\n coverage.x += saturate(C1.x + 0.5);\n // calculate the anti-aliasing for t1\n weight.x = min(weight.x, abs(C1.x));\n }\n\n // are we outside the curve (after t2)?\n if (y1 ? !y0 : y2) {\n // subtract the coverage for t2\n coverage.x -= saturate(C2.x + 0.5);\n // calculate the anti-aliasing for t2\n weight.x = min(weight.x, abs(C2.x));\n }\n}\n\n// this is essentially the same as coverageX, but with the axes swapped\nvoid coverageY(vec2 p0, vec2 p1, vec2 p2) {\n\n vec2 C1, C2;\n calulateCrossings(p0, p1, p2, C1, C2);\n\n bool x0 = p0.x > vTexCoord.x;\n bool x1 = p1.x > vTexCoord.x;\n bool x2 = p2.x > vTexCoord.x;\n\n if (x1 ? !x2 : x0) {\n coverage.y -= saturate(C1.y + 0.5);\n weight.y = min(weight.y, abs(C1.y));\n }\n\n if (x1 ? !x0 : x2) {\n coverage.y += saturate(C2.y + 0.5);\n weight.y = min(weight.y, abs(C2.y));\n }\n}\n\nvoid main() {\n\n // calculate the pixel scale based on screen-coordinates\n pixelScale = hardness / fwidth(vTexCoord);\n\n // which grid cell is this pixel in?\n ivec2 gridCoord = ifloor(vTexCoord * vec2(uGridSize));\n\n // intersect curves in this row\n {\n // the index into the row info bitmap\n int rowIndex = gridCoord.y + uGridOffset.y;\n // fetch the info texel\n vec4 rowInfo = getTexel(uSamplerRows, rowIndex, uGridImageSize);\n // unpack the rowInfo\n int rowStrokeIndex = getInt16(rowInfo.xy);\n int rowStrokeCount = getInt16(rowInfo.zw);\n\n for (int iRowStroke = INT(0); iRowStroke < N; iRowStroke++) {\n if (iRowStroke >= rowStrokeCount)\n break;\n\n // each stroke is made up of 3 points: the start and control point\n // and the start of the next curve.\n // fetch the indices of this pair of strokes:\n vec4 strokeIndices = getTexel(uSamplerRowStrokes, rowStrokeIndex++, uCellsImageSize);\n\n // unpack the stroke index\n int strokePos = getInt16(strokeIndices.xy);\n\n // fetch the two strokes\n vec4 stroke0 = getTexel(uSamplerStrokes, strokePos + INT(0), uStrokeImageSize);\n vec4 stroke1 = getTexel(uSamplerStrokes, strokePos + INT(1), uStrokeImageSize);\n\n // calculate the coverage\n coverageX(stroke0.xy, stroke0.zw, stroke1.xy);\n }\n }\n\n // intersect curves in this column\n {\n int colIndex = gridCoord.x + uGridOffset.x;\n vec4 colInfo = getTexel(uSamplerCols, colIndex, uGridImageSize);\n int colStrokeIndex = getInt16(colInfo.xy);\n int colStrokeCount = getInt16(colInfo.zw);\n \n for (int iColStroke = INT(0); iColStroke < N; iColStroke++) {\n if (iColStroke >= colStrokeCount)\n break;\n\n vec4 strokeIndices = getTexel(uSamplerColStrokes, colStrokeIndex++, uCellsImageSize);\n\n int strokePos = getInt16(strokeIndices.xy);\n vec4 stroke0 = getTexel(uSamplerStrokes, strokePos + INT(0), uStrokeImageSize);\n vec4 stroke1 = getTexel(uSamplerStrokes, strokePos + INT(1), uStrokeImageSize);\n coverageY(stroke0.xy, stroke0.zw, stroke1.xy);\n }\n }\n\n weight = saturate(1.0 - weight * 2.0);\n float distance = max(weight.x + weight.y, minDistance); // manhattan approx.\n float antialias = abs(dot(coverage, weight) / distance);\n float cover = min(abs(coverage.x), abs(coverage.y));\n OUT_COLOR = vec4(uMaterialColor.rgb, 1.) * uMaterialColor.a;\n OUT_COLOR *= saturate(max(antialias, cover));\n}\n",lineVert:T+"/*\n Part of the Processing project - http://processing.org\n Copyright (c) 2012-15 The Processing Foundation\n Copyright (c) 2004-12 Ben Fry and Casey Reas\n Copyright (c) 2001-04 Massachusetts Institute of Technology\n This library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation, version 2.1.\n This library is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n You should have received a copy of the GNU Lesser General\n Public License along with this library; if not, write to the\n Free Software Foundation, Inc., 59 Temple Place, Suite 330,\n Boston, MA 02111-1307 USA\n*/\n\n#define PROCESSING_LINE_SHADER\n\nprecision mediump int;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform float uStrokeWeight;\n\nuniform bool uUseLineColor;\nuniform vec4 uMaterialColor;\n\nuniform vec4 uViewport;\nuniform int uPerspective;\nuniform int uStrokeJoin;\n\nIN vec4 aPosition;\nIN vec3 aTangentIn;\nIN vec3 aTangentOut;\nIN float aSide;\nIN vec4 aVertexColor;\n\nOUT vec4 vColor;\nOUT vec2 vTangent;\nOUT vec2 vCenter;\nOUT vec2 vPosition;\nOUT float vMaxDist;\nOUT float vCap;\nOUT float vJoin;\n\nvec2 lineIntersection(vec2 aPoint, vec2 aDir, vec2 bPoint, vec2 bDir) {\n // Rotate and translate so a starts at the origin and goes out to the right\n bPoint -= aPoint;\n vec2 rotatedBFrom = vec2(\n bPoint.x*aDir.x + bPoint.y*aDir.y,\n bPoint.y*aDir.x - bPoint.x*aDir.y\n );\n vec2 bTo = bPoint + bDir;\n vec2 rotatedBTo = vec2(\n bTo.x*aDir.x + bTo.y*aDir.y,\n bTo.y*aDir.x - bTo.x*aDir.y\n );\n float intersectionDistance =\n rotatedBTo.x + (rotatedBFrom.x - rotatedBTo.x) * rotatedBTo.y /\n (rotatedBTo.y - rotatedBFrom.y);\n return aPoint + aDir * intersectionDistance;\n}\n\nvoid main() {\n // Caps have one of either the in or out tangent set to 0\n vCap = (aTangentIn == vec3(0.)) != (aTangentOut == (vec3(0.)))\n ? 1. : 0.;\n\n // Joins have two unique, defined tangents\n vJoin = (\n aTangentIn != vec3(0.) &&\n aTangentOut != vec3(0.) &&\n aTangentIn != aTangentOut\n ) ? 1. : 0.;\n\n vec4 posp = uModelViewMatrix * aPosition;\n vec4 posqIn = uModelViewMatrix * (aPosition + vec4(aTangentIn, 0));\n vec4 posqOut = uModelViewMatrix * (aPosition + vec4(aTangentOut, 0));\n\n float facingCamera = pow(\n // The word space tangent's z value is 0 if it's facing the camera\n abs(normalize(posqIn-posp).z),\n\n // Using pow() here to ramp `facingCamera` up from 0 to 1 really quickly\n // so most lines get scaled and don't get clipped\n 0.25\n );\n\n // using a scale <1 moves the lines towards the camera\n // in order to prevent popping effects due to half of\n // the line disappearing behind the geometry faces.\n float scale = mix(1., 0.995, facingCamera);\n\n // Moving vertices slightly toward the camera\n // to avoid depth-fighting with the fill triangles.\n // Discussed here:\n // http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=252848 \n posp.xyz = posp.xyz * scale;\n posqIn.xyz = posqIn.xyz * scale;\n posqOut.xyz = posqOut.xyz * scale;\n\n vec4 p = uProjectionMatrix * posp;\n vec4 qIn = uProjectionMatrix * posqIn;\n vec4 qOut = uProjectionMatrix * posqOut;\n vCenter = p.xy;\n\n // formula to convert from clip space (range -1..1) to screen space (range 0..[width or height])\n // screen_p = (p.xy/p.w + <1,1>) * 0.5 * uViewport.zw\n\n // prevent division by W by transforming the tangent formula (div by 0 causes\n // the line to disappear, see https://github.com/processing/processing/issues/5183)\n // t = screen_q - screen_p\n //\n // tangent is normalized and we don't care which aDirection it points to (+-)\n // t = +- normalize( screen_q - screen_p )\n // t = +- normalize( (q.xy/q.w+<1,1>)*0.5*uViewport.zw - (p.xy/p.w+<1,1>)*0.5*uViewport.zw )\n //\n // extract common factor, <1,1> - <1,1> cancels out\n // t = +- normalize( (q.xy/q.w - p.xy/p.w) * 0.5 * uViewport.zw )\n //\n // convert to common divisor\n // t = +- normalize( ((q.xy*p.w - p.xy*q.w) / (p.w*q.w)) * 0.5 * uViewport.zw )\n //\n // remove the common scalar divisor/factor, not needed due to normalize and +-\n // (keep uViewport - can't remove because it has different components for x and y\n // and corrects for aspect ratio, see https://github.com/processing/processing/issues/5181)\n // t = +- normalize( (q.xy*p.w - p.xy*q.w) * uViewport.zw )\n\n vec2 tangentIn = normalize((qIn.xy*p.w - p.xy*qIn.w) * uViewport.zw);\n vec2 tangentOut = normalize((qOut.xy*p.w - p.xy*qOut.w) * uViewport.zw);\n\n vec2 curPerspScale;\n if(uPerspective == 1) {\n // Perspective ---\n // convert from world to clip by multiplying with projection scaling factor\n // to get the right thickness (see https://github.com/processing/processing/issues/5182)\n\n // The y value of the projection matrix may be flipped if rendering to a Framebuffer.\n // Multiplying again by its sign here negates the flip to get just the scale.\n curPerspScale = (uProjectionMatrix * vec4(1, sign(uProjectionMatrix[1][1]), 0, 0)).xy;\n } else {\n // No Perspective ---\n // multiply by W (to cancel out division by W later in the pipeline) and\n // convert from screen to clip (derived from clip to screen above)\n curPerspScale = p.w / (0.5 * uViewport.zw);\n }\n\n vec2 offset;\n if (vJoin == 1.) {\n vTangent = normalize(tangentIn + tangentOut);\n vec2 normalIn = vec2(-tangentIn.y, tangentIn.x);\n vec2 normalOut = vec2(-tangentOut.y, tangentOut.x);\n float side = sign(aSide);\n float sideEnum = abs(aSide);\n\n // We generate vertices for joins on either side of the centerline, but\n // the \"elbow\" side is the only one needing a join. By not setting the\n // offset for the other side, all its vertices will end up in the same\n // spot and not render, effectively discarding it.\n if (sign(dot(tangentOut, vec2(-tangentIn.y, tangentIn.x))) != side) {\n // Side enums:\n // 1: the side going into the join\n // 2: the middle of the join\n // 3: the side going out of the join\n if (sideEnum == 2.) {\n // Calculate the position + tangent on either side of the join, and\n // find where the lines intersect to find the elbow of the join\n vec2 c = (posp.xy/posp.w + vec2(1.,1.)) * 0.5 * uViewport.zw;\n vec2 intersection = lineIntersection(\n c + (side * normalIn * uStrokeWeight / 2.),\n tangentIn,\n c + (side * normalOut * uStrokeWeight / 2.),\n tangentOut\n );\n offset = (intersection - c);\n\n // When lines are thick and the angle of the join approaches 180, the\n // elbow might be really far from the center. We'll apply a limit to\n // the magnitude to avoid lines going across the whole screen when this\n // happens.\n float mag = length(offset);\n float maxMag = 3. * uStrokeWeight;\n if (mag > maxMag) {\n offset *= maxMag / mag;\n }\n } else if (sideEnum == 1.) {\n offset = side * normalIn * uStrokeWeight / 2.;\n } else if (sideEnum == 3.) {\n offset = side * normalOut * uStrokeWeight / 2.;\n }\n }\n if (uStrokeJoin == STROKE_JOIN_BEVEL) {\n vec2 avgNormal = vec2(-vTangent.y, vTangent.x);\n vMaxDist = abs(dot(avgNormal, normalIn * uStrokeWeight / 2.));\n } else {\n vMaxDist = uStrokeWeight / 2.;\n }\n } else {\n vec2 tangent = aTangentIn == vec3(0.) ? tangentOut : tangentIn;\n vTangent = tangent;\n vec2 normal = vec2(-tangent.y, tangent.x);\n\n float normalOffset = sign(aSide);\n // Caps will have side values of -2 or 2 on the edge of the cap that\n // extends out from the line\n float tangentOffset = abs(aSide) - 1.;\n offset = (normal * normalOffset + tangent * tangentOffset) *\n uStrokeWeight * 0.5;\n vMaxDist = uStrokeWeight / 2.;\n }\n vPosition = vCenter + offset;\n\n gl_Position.xy = p.xy + offset.xy * curPerspScale;\n gl_Position.zw = p.zw;\n \n vColor = (uUseLineColor ? aVertexColor : uMaterialColor);\n}\n",lineFrag:T+"precision mediump int;\n\nuniform vec4 uMaterialColor;\nuniform int uStrokeCap;\nuniform int uStrokeJoin;\nuniform float uStrokeWeight;\n\nIN vec4 vColor;\nIN vec2 vTangent;\nIN vec2 vCenter;\nIN vec2 vPosition;\nIN float vMaxDist;\nIN float vCap;\nIN float vJoin;\n\nfloat distSquared(vec2 a, vec2 b) {\n vec2 aToB = b - a;\n return dot(aToB, aToB);\n}\n\nvoid main() {\n if (vCap > 0.) {\n if (\n uStrokeCap == STROKE_CAP_ROUND &&\n distSquared(vPosition, vCenter) > uStrokeWeight * uStrokeWeight * 0.25\n ) {\n discard;\n } else if (\n uStrokeCap == STROKE_CAP_SQUARE &&\n dot(vPosition - vCenter, vTangent) > 0.\n ) {\n discard;\n }\n // Use full area for PROJECT\n } else if (vJoin > 0.) {\n if (\n uStrokeJoin == STROKE_JOIN_ROUND &&\n distSquared(vPosition, vCenter) > uStrokeWeight * uStrokeWeight * 0.25\n ) {\n discard;\n } else if (uStrokeJoin == STROKE_JOIN_BEVEL) {\n vec2 normal = vec2(-vTangent.y, vTangent.x);\n if (abs(dot(vPosition - vCenter, normal)) > vMaxDist) {\n discard;\n }\n }\n // Use full area for MITER\n }\n OUT_COLOR = vec4(vColor.rgb, 1.) * vColor.a;\n}\n",pointVert:"IN vec3 aPosition;\nuniform float uPointSize;\nOUT float vStrokeWeight;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nvoid main() {\n\tvec4 positionVec4 = vec4(aPosition, 1.0);\n\tgl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n\tgl_PointSize = uPointSize;\n\tvStrokeWeight = uPointSize;\n}\n",pointFrag:"precision mediump int;\nuniform vec4 uMaterialColor;\nIN float vStrokeWeight;\n\nvoid main(){\n float mask = 0.0;\n\n // make a circular mask using the gl_PointCoord (goes from 0 - 1 on a point)\n // might be able to get a nicer edge on big strokeweights with smoothstep but slightly less performant\n\n mask = step(0.98, length(gl_PointCoord * 2.0 - 1.0));\n\n // if strokeWeight is 1 or less lets just draw a square\n // this prevents weird artifacting from carving circles when our points are really small\n // if strokeWeight is larger than 1, we just use it as is\n\n mask = mix(0.0, mask, clamp(floor(vStrokeWeight - 0.5),0.0,1.0));\n\n // throw away the borders of the mask\n // otherwise we get weird alpha blending issues\n\n if(mask > 0.98){\n discard;\n }\n\n OUT_COLOR = vec4(uMaterialColor.rgb, 1.) * uMaterialColor.a;\n}\n",imageLightVert:"precision highp float;\nattribute vec3 aPosition;\nattribute vec3 aNormal;\nattribute vec2 aTexCoord;\n\nvarying vec3 localPos;\nvarying vec3 vWorldNormal;\nvarying vec3 vWorldPosition;\nvarying vec2 vTexCoord;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform mat3 uNormalMatrix;\n\nvoid main() {\n // Multiply the position by the matrix.\n vec4 viewModelPosition = uModelViewMatrix * vec4(aPosition, 1.0);\n gl_Position = uProjectionMatrix * viewModelPosition; \n \n // orient the normals and pass to the fragment shader\n vWorldNormal = uNormalMatrix * aNormal;\n \n // send the view position to the fragment shader\n vWorldPosition = (uModelViewMatrix * vec4(aPosition, 1.0)).xyz;\n \n localPos = vWorldPosition;\n vTexCoord = aTexCoord;\n}\n\n\n/*\nin the vertex shader we'll compute the world position and world oriented normal of the vertices and pass those to the fragment shader as varyings.\n*/\n",imageLightDiffusedFrag:"precision highp float;\nvarying vec3 localPos;\n\n// the HDR cubemap converted (can be from an equirectangular environment map.)\nuniform sampler2D environmentMap;\nvarying vec2 vTexCoord;\n\nconst float PI = 3.14159265359;\n\nvec2 nTOE( vec3 v ){\n // x = r sin(phi) cos(theta) \n // y = r cos(phi) \n // z = r sin(phi) sin(theta)\n float phi = acos( v.y );\n // if phi is 0, then there are no x, z components\n float theta = 0.0;\n // else \n theta = acos(v.x / sin(phi));\n float sinTheta = v.z / sin(phi);\n if (sinTheta < 0.0) {\n // Turn it into -theta, but in the 0-2PI range\n theta = 2.0 * PI - theta;\n }\n theta = theta / (2.0 * 3.14159);\n phi = phi / 3.14159 ;\n \n vec2 angles = vec2( phi, theta );\n return angles;\n}\n\nvoid main()\n{ \t \n\t// the sample direction equals the hemisphere's orientation\n float phi = vTexCoord.x * 2.0 * PI;\n float theta = vTexCoord.y * PI;\n float x = sin(theta) * cos(phi);\n float y = sin(theta) * sin(phi);\n float z = cos(theta);\n vec3 normal = vec3( x, y, z);\n\n\t// Discretely sampling the hemisphere given the integral's\n // spherical coordinates translates to the following fragment code:\n\tvec3 irradiance = vec3(0.0); \n\tvec3 up\t= vec3(0.0, 1.0, 0.0);\n\tvec3 right = normalize(cross(up, normal));\n\tup = normalize(cross(normal, right));\n\n\t// We specify a fixed sampleDelta delta value to traverse\n // the hemisphere; decreasing or increasing the sample delta\n // will increase or decrease the accuracy respectively.\n\tconst float sampleDelta = 0.025;\n\tfloat nrSamples = 0.0;\n \n\tfor(float phi = 0.0; phi < 2.0 * PI; phi += sampleDelta)\n\t{\n for(float theta = 0.0; theta < ( 0.5 ) * PI; theta += sampleDelta)\n {\n // spherical to cartesian (in tangent space) // tangent space to world // add each sample result to irradiance\n float x = sin(theta) * cos(phi);\n float y = sin(theta) * sin(phi);\n float z = cos(theta);\n vec3 tangentSample = vec3( x, y, z);\n \n vec3 sampleVec = tangentSample.x * right + tangentSample.y * up + tangentSample.z * normal;\n irradiance += (texture2D(environmentMap, nTOE(sampleVec)).xyz) * cos(theta) * sin(theta);\n nrSamples++;\n }\n\t}\n\t// divide by the total number of samples taken, giving us the average sampled irradiance.\n\tirradiance = PI * irradiance * (1.0 / float(nrSamples )) ;\n \n \n\tgl_FragColor = vec4(irradiance, 1.0);\n}",imageLightSpecularFrag:"precision highp float;\r\nvarying vec3 localPos;\r\nvarying vec2 vTexCoord;\r\n\r\n// our texture\r\nuniform sampler2D environmentMap;\r\nuniform float roughness;\r\n\r\nconst float PI = 3.14159265359;\r\n\r\nfloat VanDerCorput(int bits);\r\nvec2 HammersleyNoBitOps(int i, int N);\r\nvec3 ImportanceSampleGGX(vec2 Xi, vec3 N, float roughness);\r\n\r\n\r\nvec2 nTOE( vec3 v ){\r\n // x = r sin(phi) cos(theta) \r\n // y = r cos(phi) \r\n // z = r sin(phi) sin(theta)\r\n float phi = acos( v.y );\r\n // if phi is 0, then there are no x, z components\r\n float theta = 0.0;\r\n // else \r\n theta = acos(v.x / sin(phi));\r\n float sinTheta = v.z / sin(phi);\r\n if (sinTheta < 0.0) {\r\n // Turn it into -theta, but in the 0-2PI range\r\n theta = 2.0 * PI - theta;\r\n }\r\n theta = theta / (2.0 * 3.14159);\r\n phi = phi / 3.14159 ;\r\n \r\n vec2 angles = vec2( phi, theta );\r\n return angles;\r\n}\r\n\r\n\r\nvoid main(){\r\n const int SAMPLE_COUNT = 1024; // 4096\r\n float totalWeight = 0.0;\r\n vec3 prefilteredColor = vec3(0.0);\r\n float phi = vTexCoord.x * 2.0 * PI;\r\n float theta = vTexCoord.y * PI;\r\n float x = sin(theta) * cos(phi);\r\n float y = sin(theta) * sin(phi);\r\n float z = cos(theta);\r\n vec3 N = vec3(x,y,z);\r\n vec3 V = N;\r\n for (int i = 0; i < SAMPLE_COUNT; ++i)\r\n {\r\n vec2 Xi = HammersleyNoBitOps(i, SAMPLE_COUNT);\r\n vec3 H = ImportanceSampleGGX(Xi, N, roughness);\r\n vec3 L = normalize(2.0 * dot(V, H) * H - V);\r\n\r\n float NdotL = max(dot(N, L), 0.0);\r\n if (NdotL > 0.0)\r\n {\r\n prefilteredColor += texture2D(environmentMap, nTOE(L)).xyz * NdotL;\r\n totalWeight += NdotL;\r\n }\r\n }\r\n prefilteredColor = prefilteredColor / totalWeight;\r\n\r\n gl_FragColor = vec4(prefilteredColor, 1.0);\r\n}\r\n\r\nvec3 ImportanceSampleGGX(vec2 Xi, vec3 N, float roughness){\r\n float a = roughness * roughness;\r\n\r\n float phi = 2.0 * PI * Xi.x;\r\n float cosTheta = sqrt((1.0 - Xi.y) / (1.0 + (a * a - 1.0) * Xi.y));\r\n float sinTheta = sqrt(1.0 - cosTheta * cosTheta);\r\n // from spherical coordinates to cartesian coordinates\r\n vec3 H;\r\n H.x = cos(phi) * sinTheta;\r\n H.y = sin(phi) * sinTheta;\r\n H.z = cosTheta;\r\n\r\n // from tangent-space vector to world-space sample vector\r\n vec3 up = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);\r\n vec3 tangent = normalize(cross(up, N));\r\n vec3 bitangent = cross(N, tangent);\r\n\r\n vec3 sampleVec = tangent * H.x + bitangent * H.y + N * H.z;\r\n return normalize(sampleVec);\r\n}\r\n\r\n\r\nfloat VanDerCorput(int n, int base)\r\n{\r\n float invBase = 1.0 / float(base);\r\n float denom = 1.0;\r\n float result = 0.0;\r\n\r\n for (int i = 0; i < 32; ++i)\r\n {\r\n\tif (n > 0)\r\n\t{\r\n \tdenom = mod(float(n), 2.0);\r\n \tresult += denom * invBase;\r\n \tinvBase = invBase / 2.0;\r\n \tn = int(float(n) / 2.0);\r\n\t}\r\n }\r\n\r\n return result;\r\n}\r\n\r\nvec2 HammersleyNoBitOps(int i, int N)\r\n{\r\n return vec2(float(i) / float(N), VanDerCorput(i, 2));\r\n}\r\n"};for(x in M)M[x]="#ifdef WEBGL2\n\n#define IN in\n#define OUT out\n\n#ifdef FRAGMENT_SHADER\nout vec4 outColor;\n#define OUT_COLOR outColor\n#endif\n#define TEXTURE texture\n\n#else\n\n#ifdef FRAGMENT_SHADER\n#define IN varying\n#else\n#define IN attribute\n#endif\n#define OUT varying\n#define TEXTURE texture2D\n\n#ifdef FRAGMENT_SHADER\n#define OUT_COLOR gl_FragColor\n#endif\n\n#endif\n"+M[x];j(e={},l.GRAY,"precision highp float;\n\nvarying vec2 vTexCoord;\n\nuniform sampler2D tex0;\n\nfloat luma(vec3 color) {\n // weighted grayscale with luminance values\n return dot(color, vec3(0.2126, 0.7152, 0.0722));\n}\n\nvoid main() {\n vec4 tex = texture2D(tex0, vTexCoord);\n float gray = luma(tex.rgb);\n gl_FragColor = vec4(gray, gray, gray, tex.a);\n}\n"),j(e,l.ERODE,"// Reduces the bright areas in an image\n\nprecision highp float;\n\nvarying vec2 vTexCoord;\n\nuniform sampler2D tex0;\nuniform vec2 texelSize;\n\nfloat luma(vec3 color) {\n // weighted grayscale with luminance values\n // weights 77, 151, 28 taken from src/image/filters.js\n return dot(color, vec3(0.300781, 0.589844, 0.109375));\n}\n\nvoid main() {\n vec4 color = texture2D(tex0, vTexCoord);\n float lum = luma(color.rgb);\n\n // set current color as the darkest neighbor color\n\n vec4 neighbors[4];\n neighbors[0] = texture2D(tex0, vTexCoord + vec2( texelSize.x, 0.0));\n neighbors[1] = texture2D(tex0, vTexCoord + vec2(-texelSize.x, 0.0));\n neighbors[2] = texture2D(tex0, vTexCoord + vec2(0.0, texelSize.y));\n neighbors[3] = texture2D(tex0, vTexCoord + vec2(0.0, -texelSize.y));\n\n for (int i = 0; i < 4; i++) {\n vec4 neighborColor = neighbors[i];\n float neighborLum = luma(neighborColor.rgb);\n\n if (neighborLum < lum) {\n color = neighborColor;\n lum = neighborLum;\n }\n }\n\n gl_FragColor = color;\n}\n"),j(e,l.DILATE,"// Increase the bright areas in an image\n\nprecision highp float;\n\nvarying vec2 vTexCoord;\n\nuniform sampler2D tex0;\nuniform vec2 texelSize;\n\nfloat luma(vec3 color) {\n // weighted grayscale with luminance values\n // weights 77, 151, 28 taken from src/image/filters.js\n return dot(color, vec3(0.300781, 0.589844, 0.109375));\n}\n\nvoid main() {\n vec4 color = texture2D(tex0, vTexCoord);\n float lum = luma(color.rgb);\n\n // set current color as the brightest neighbor color\n\n vec4 neighbors[4];\n neighbors[0] = texture2D(tex0, vTexCoord + vec2( texelSize.x, 0.0));\n neighbors[1] = texture2D(tex0, vTexCoord + vec2(-texelSize.x, 0.0));\n neighbors[2] = texture2D(tex0, vTexCoord + vec2(0.0, texelSize.y));\n neighbors[3] = texture2D(tex0, vTexCoord + vec2(0.0, -texelSize.y));\n\n for (int i = 0; i < 4; i++) {\n vec4 neighborColor = neighbors[i];\n float neighborLum = luma(neighborColor.rgb);\n\n if (neighborLum > lum) {\n color = neighborColor;\n lum = neighborLum;\n }\n }\n\n gl_FragColor = color;\n}\n"),j(e,l.BLUR,"precision highp float;\n\n// Two-pass blur filter, unweighted kernel.\n// See also a similar blur at Adam Ferriss' repo of shader examples:\n// https://github.com/aferriss/p5jsShaderExamples/blob/gh-pages/4_image-effects/4-9_single-pass-blur/effect.frag\n\n\nuniform sampler2D tex0;\nvarying vec2 vTexCoord;\nuniform vec2 direction;\nuniform vec2 canvasSize;\nuniform float radius;\n\nfloat random(vec2 p) {\n vec3 p3 = fract(vec3(p.xyx) * .1031);\n p3 += dot(p3, p3.yzx + 33.33);\n return fract((p3.x + p3.y) * p3.z);\n}\n\n// This isn't a real Gaussian weight, it's a quadratic weight. It's what the\n// CPU mode's blur uses though, so we also use it here to match.\nfloat quadWeight(float x, float e) {\n return pow(e-abs(x), 2.);\n}\n\nvoid main(){\n vec2 uv = vTexCoord;\n\n // A reasonable maximum number of samples\n const float maxSamples = 64.0;\n\n float numSamples = floor(7. * radius);\n if (fract(numSamples / 2.) == 0.) {\n numSamples++;\n }\n vec4 avg = vec4(0.0);\n float total = 0.0;\n\n // Calculate the spacing to avoid skewing if numSamples > maxSamples\n float spacing = 1.0;\n if (numSamples > maxSamples) {\n spacing = numSamples / maxSamples;\n numSamples = maxSamples;\n }\n\n float randomOffset = (spacing - 1.0) * mix(-0.5, 0.5, random(gl_FragCoord.xy));\n for (float i = 0.0; i < maxSamples; i++) {\n if (i >= numSamples) break;\n\n float sample = i * spacing - (numSamples - 1.0) * 0.5 * spacing + randomOffset;\n vec2 sampleCoord = uv + vec2(sample, sample) / canvasSize * direction;\n float weight = quadWeight(sample, (numSamples - 1.0) * 0.5 * spacing);\n\n avg += weight * texture2D(tex0, sampleCoord);\n total += weight;\n }\n\n avg /= total;\n gl_FragColor = avg;\n}\n"),j(e,l.POSTERIZE,"// Limit color space for a stylized cartoon / poster effect\n\nprecision highp float;\n\nvarying vec2 vTexCoord;\n\nuniform sampler2D tex0;\nuniform float filterParameter;\n\nvec3 quantize(vec3 color, float n) {\n // restrict values to N options/bins\n // and floor each channel to nearest value\n //\n // eg. when N = 5, values = 0.0, 0.25, 0.50, 0.75, 1.0\n // then quantize (0.1, 0.7, 0.9) -> (0.0, 0.5, 1.0)\n\n color = color * n;\n color = floor(color);\n color = color / (n - 1.0);\n return color;\n}\n\nvoid main() {\n vec4 color = texture2D(tex0, vTexCoord);\n\n vec3 restrictedColor = quantize(color.rgb / color.a, filterParameter);\n\n gl_FragColor = vec4(restrictedColor.rgb * color.a, color.a);\n}\n"),j(e,l.OPAQUE,"// Set alpha channel to entirely opaque\n\nprecision highp float;\n\nvarying vec2 vTexCoord;\n\nuniform sampler2D tex0;\n\nvoid main() {\n vec4 color = texture2D(tex0, vTexCoord);\n gl_FragColor = vec4(color.rgb / color.a, 1.0);\n}\n"),j(e,l.INVERT,"// Set each pixel to inverse value\n// Note that original INVERT does not change the opacity, so this follows suit\n\nprecision highp float;\n\nvarying vec2 vTexCoord;\n\nuniform sampler2D tex0;\n\nvoid main() {\nvec4 color = texture2D(tex0, vTexCoord);\nvec3 origColor = color.rgb / color.a;\nvec3 invertedColor = vec3(1.0) - origColor;\ngl_FragColor = vec4(invertedColor * color.a, color.a);\n}\n"),j(e,l.THRESHOLD,"// Convert pixels to either white or black, \n// depending on if their luma is above or below filterParameter\n\nprecision highp float;\n\nvarying vec2 vTexCoord;\n\nuniform sampler2D tex0;\nuniform float filterParameter;\n\nfloat luma(vec3 color) {\n // weighted grayscale with luminance values\n return dot(color, vec3(0.2126, 0.7152, 0.0722));\n}\n\nvoid main() {\n vec4 color = texture2D(tex0, vTexCoord);\n float gray = luma(color.rgb / color.a);\n // floor() used to match src/image/filters.js\n float threshold = floor(filterParameter * 255.0) / 255.0;\n float blackOrWhite = step(threshold, gray);\n gl_FragColor = vec4(vec3(blackOrWhite) * color.a, color.a);\n}\n");var E=e;function k(e,t,r,o,n,s,i,a,l,u){var c=t.getParameter(t.FRAMEBUFFER_BINDING),r=(t.bindFramebuffer(t.FRAMEBUFFER,r),a===t.RGBA?4:3),d=s*i*r,h=l===t.UNSIGNED_BYTE?Uint8Array:Float32Array;if(e instanceof h&&e.length===d||(e=new h(d)),t.readPixels(o,u?u-n-i:n,s,i,a,l,e),t.bindFramebuffer(t.FRAMEBUFFER,c),u)for(var f=Math.floor(i/2),p=new h(s*r),m=0;m<f;m++){var y=m*s*4,g=(i-m-1)*s*4;p.set(e.subarray(y,y+4*s)),e.copyWithin(y,g,g+4*s),e.set(p,g)}return e}function C(e,t,r,o,n,s,i){var a=e.getParameter(e.FRAMEBUFFER_BINDING),t=(e.bindFramebuffer(e.FRAMEBUFFER,t),n===e.RGBA?4:3),t=new(s===e.UNSIGNED_BYTE?Uint8Array:Float32Array)(t);return e.readPixels(r,i?i-o-1:o,1,1,n,s,t),e.bindFramebuffer(e.FRAMEBUFFER,a),Array.from(t)}g.default.prototype.setAttributes=function(e,t){if(void 0===this._glAttributes)console.log("You are trying to use setAttributes on a p5.Graphics object that does not use a WEBGL renderer.");else{var r=!0;if(void 0!==t?(null===this._glAttributes&&(this._glAttributes={}),this._glAttributes[e]!==t&&(this._glAttributes[e]=t,r=!1)):e instanceof Object&&this._glAttributes!==e&&(this._glAttributes=e,r=!1),this._renderer.isP3D&&!r){if(!this._setupDone)for(var o in this._renderer.retainedMode.geometry)if(this._renderer.retainedMode.geometry.hasOwnProperty(o))return void g.default._friendlyError("Sorry, Could not set the attributes, you need to call setAttributes() before calling the other drawing methods in setup()");this.push(),this._renderer._resetContext(),this.pop(),this._renderer._curCamera&&(this._renderer._curCamera._renderer=this._renderer)}}},g.default.RendererGL=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e);var r,n=y(s);function s(e,t,r,o){if(this instanceof s)return(e=n.call(this,e,t,r))._setAttributeDefaults(t),e._initContext(),e.isP3D=!0,e.geometryBuilder=void 0,e.GL=e.drawingContext,e._pInst._setProperty("drawingContext",e.drawingContext),e._isErasing=!1,e._clipDepths=[],e._isClipApplied=!1,e._stencilTestOn=!1,e._enableLighting=!1,e.ambientLightColors=[],e.specularColors=[1,1,1],e.directionalLightDirections=[],e.directionalLightDiffuseColors=[],e.directionalLightSpecularColors=[],e.pointLightPositions=[],e.pointLightDiffuseColors=[],e.pointLightSpecularColors=[],e.spotLightPositions=[],e.spotLightDirections=[],e.spotLightDiffuseColors=[],e.spotLightSpecularColors=[],e.spotLightAngle=[],e.spotLightConc=[],e.activeImageLight=null,e.diffusedTextures=new Map,e.specularTextures=new Map,e.drawMode=l.FILL,e.curFillColor=e._cachedFillStyle=[1,1,1,1],e.curAmbientColor=e._cachedFillStyle=[1,1,1,1],e.curSpecularColor=e._cachedFillStyle=[0,0,0,0],e.curEmissiveColor=e._cachedFillStyle=[0,0,0,0],e.curStrokeColor=e._cachedStrokeStyle=[0,0,0,1],e.curBlendMode=l.BLEND,e._cachedBlendMode=void 0,e.webglVersion===l.WEBGL2?e.blendExt=e.GL:e.blendExt=e.GL.getExtension("EXT_blend_minmax"),e._isBlending=!1,e._hasSetAmbient=!1,e._useSpecularMaterial=!1,e._useEmissiveMaterial=!1,e._useNormalMaterial=!1,e._useShininess=1,e._useLineColor=!1,e._useVertexColor=!1,e.registerEnabled=new Set,e._tint=[255,255,255,255],e.constantAttenuation=1,e.linearAttenuation=0,e.quadraticAttenuation=0,e.uMVMatrix=new g.default.Matrix,e.uPMatrix=new g.default.Matrix,e.uNMatrix=new g.default.Matrix("mat3"),e._currentNormal=new g.default.Vector(0,0,1),e._curCamera=new g.default.Camera(v(e)),e._curCamera._computeCameraDefaultSettings(),e._curCamera._setDefaultCamera(),e.filterCamera=new g.default.Camera(v(e)),e.filterCamera._computeCameraDefaultSettings(),e.filterCamera._setDefaultCamera(),e.prevTouches=[],e.zoomVelocity=0,e.rotateVelocity=new g.default.Vector(0,0),e.moveVelocity=new g.default.Vector(0,0),e.executeZoom=!1,e.executeRotateAndMove=!1,e._defaultLightShader=void 0,e._defaultImmediateModeShader=void 0,e._defaultNormalShader=void 0,e._defaultColorShader=void 0,e._defaultPointShader=void 0,e.userFillShader=void 0,e.userStrokeShader=void 0,e.userPointShader=void 0,e.retainedMode={geometry:{},buffers:{stroke:[new g.default.RenderBuffer(4,"lineVertexColors","lineColorBuffer","aVertexColor",v(e)),new g.default.RenderBuffer(3,"lineVertices","lineVerticesBuffer","aPosition",v(e)),new g.default.RenderBuffer(3,"lineTangentsIn","lineTangentsInBuffer","aTangentIn",v(e)),new g.default.RenderBuffer(3,"lineTangentsOut","lineTangentsOutBuffer","aTangentOut",v(e)),new g.default.RenderBuffer(1,"lineSides","lineSidesBuffer","aSide",v(e))],fill:[new g.default.RenderBuffer(3,"vertices","vertexBuffer","aPosition",v(e),e._vToNArray),new g.default.RenderBuffer(3,"vertexNormals","normalBuffer","aNormal",v(e),e._vToNArray),new g.default.RenderBuffer(4,"vertexColors","colorBuffer","aVertexColor",v(e)),new g.default.RenderBuffer(3,"vertexAmbients","ambientBuffer","aAmbientColor",v(e)),new g.default.RenderBuffer(2,"uvs","uvBuffer","aTexCoord",v(e),e._flatten)],text:[new g.default.RenderBuffer(3,"vertices","vertexBuffer","aPosition",v(e),e._vToNArray),new g.default.RenderBuffer(2,"uvs","uvBuffer","aTexCoord",v(e),e._flatten)]}},e.immediateMode={geometry:new g.default.Geometry,shapeMode:l.TRIANGLE_FAN,contourIndices:[],_bezierVertex:[],_quadraticVertex:[],_curveVertex:[],buffers:{fill:[new g.default.RenderBuffer(3,"vertices","vertexBuffer","aPosition",v(e),e._vToNArray),new g.default.RenderBuffer(3,"vertexNormals","normalBuffer","aNormal",v(e),e._vToNArray),new g.default.RenderBuffer(4,"vertexColors","colorBuffer","aVertexColor",v(e)),new g.default.RenderBuffer(3,"vertexAmbients","ambientBuffer","aAmbientColor",v(e)),new g.default.RenderBuffer(2,"uvs","uvBuffer","aTexCoord",v(e),e._flatten)],stroke:[new g.default.RenderBuffer(4,"lineVertexColors","lineColorBuffer","aVertexColor",v(e)),new g.default.RenderBuffer(3,"lineVertices","lineVerticesBuffer","aPosition",v(e)),new g.default.RenderBuffer(3,"lineTangentsIn","lineTangentsInBuffer","aTangentIn",v(e)),new g.default.RenderBuffer(3,"lineTangentsOut","lineTangentsOutBuffer","aTangentOut",v(e)),new g.default.RenderBuffer(1,"lineSides","lineSidesBuffer","aSide",v(e))],point:e.GL.createBuffer()}},e.pointSize=5,e.curStrokeWeight=1,e.curStrokeCap=l.ROUND,e.curStrokeJoin=l.ROUND,e.textures=new Map,e.framebuffers=new Set,e.activeFramebuffers=[],e.filterShader=void 0,e.filterLayer=void 0,e.filterLayerTemp=void 0,e.defaultFilterShaders={},e.textureMode=l.IMAGE,e.textureWrapX=l.CLAMP,e.textureWrapY=l.CLAMP,e._tex=null,e._curveTightness=6,e._lookUpTableBezier=[],e._lookUpTableQuadratic=[],e._lutBezierDetail=0,e._lutQuadraticDetail=0,e.isProcessingVertices=!1,e._tessy=e._initTessy(),e.fontInfos={},e._curShader=void 0,e;throw new TypeError("Cannot call a class as a function")}return t=s,(e=[{key:"beginGeometry",value:function(){if(this.geometryBuilder)throw new Error("It looks like `beginGeometry()` is being called while another p5.Geometry is already being build.");this.geometryBuilder=new a.default(this)}},{key:"endGeometry",value:function(){var e;if(this.geometryBuilder)return e=this.geometryBuilder.finish(),this.geometryBuilder=void 0,e;throw new Error("Make sure you call beginGeometry() before endGeometry()!")}},{key:"buildGeometry",value:function(e){return this.beginGeometry(),e(),this.endGeometry()}},{key:"_setAttributeDefaults",value:function(e){var t={alpha:!0,depth:!0,stencil:!0,antialias:navigator.userAgent.toLowerCase().includes("safari"),premultipliedAlpha:!0,preserveDrawingBuffer:!0,perPixelLighting:!0,version:2};null===e._glAttributes?e._glAttributes=t:e._glAttributes=Object.assign(t,e._glAttributes)}},{key:"_initContext",value:function(){if(1!==this._pInst._glAttributes.version&&(this.drawingContext=this.canvas.getContext("webgl2",this._pInst._glAttributes)),this.webglVersion=this.drawingContext?l.WEBGL2:l.WEBGL,this._pInst._setProperty("webglVersion",this.webglVersion),this.drawingContext||(this.drawingContext=this.canvas.getContext("webgl",this._pInst._glAttributes)||this.canvas.getContext("experimental-webgl",this._pInst._glAttributes)),null===this.drawingContext)throw new Error("Error creating webgl context");var e=this.drawingContext;e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.viewport(0,0,e.drawingBufferWidth,e.drawingBufferHeight),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),this._viewport=this.drawingContext.getParameter(this.drawingContext.VIEWPORT)}},{key:"_resetContext",value:function(e,t){var r,o=this.width,n=this.height,s=this.canvas.id,i=this._pInst instanceof g.default.Graphics,s=(i?((r=this._pInst).canvas.parentNode.removeChild(r.canvas),r.canvas=document.createElement("canvas"),(r._pInst._userNode||document.body).appendChild(r.canvas),g.default.Element.call(r,r.canvas,r._pInst),r.width=o,r.height=n):((r=this.canvas)&&r.parentNode.removeChild(r),(r=document.createElement("canvas")).id=s,(this._pInst._userNode||document.body).appendChild(r),this._pInst.canvas=r,this.canvas=r),new g.default.RendererGL(this._pInst.canvas,this._pInst,!i));this._pInst._setProperty("_renderer",s),s.resize(o,n),s._applyDefaults(),i||this._pInst._elements.push(s),"function"==typeof t&&setTimeout(function(){t.apply(window._renderer,e)},0)}},{key:"_update",value:function(){this.uMVMatrix.set(this._curCamera.cameraMatrix.mat4[0],this._curCamera.cameraMatrix.mat4[1],this._curCamera.cameraMatrix.mat4[2],this._curCamera.cameraMatrix.mat4[3],this._curCamera.cameraMatrix.mat4[4],this._curCamera.cameraMatrix.mat4[5],this._curCamera.cameraMatrix.mat4[6],this._curCamera.cameraMatrix.mat4[7],this._curCamera.cameraMatrix.mat4[8],this._curCamera.cameraMatrix.mat4[9],this._curCamera.cameraMatrix.mat4[10],this._curCamera.cameraMatrix.mat4[11],this._curCamera.cameraMatrix.mat4[12],this._curCamera.cameraMatrix.mat4[13],this._curCamera.cameraMatrix.mat4[14],this._curCamera.cameraMatrix.mat4[15]),this.ambientLightColors.length=0,this.specularColors=[1,1,1],this.directionalLightDirections.length=0,this.directionalLightDiffuseColors.length=0,this.directionalLightSpecularColors.length=0,this.pointLightPositions.length=0,this.pointLightDiffuseColors.length=0,this.pointLightSpecularColors.length=0,this.spotLightPositions.length=0,this.spotLightDirections.length=0,this.spotLightDiffuseColors.length=0,this.spotLightSpecularColors.length=0,this.spotLightAngle.length=0,this.spotLightConc.length=0,this._enableLighting=!1,this._tint=[255,255,255,255],this.GL.clearStencil(0),this.GL.clear(this.GL.DEPTH_BUFFER_BIT|this.GL.STENCIL_BUFFER_BIT),this.GL.disable(this.GL.STENCIL_TEST)}},{key:"background",value:function(){var e=(e=this._pInst).color.apply(e,arguments),t=e.levels[0]/255,r=e.levels[1]/255,o=e.levels[2]/255,e=e.levels[3]/255;this.clear(t,r,o,e)}},{key:"fill",value:function(e,t,r,o){var n=g.default.prototype.color.apply(this._pInst,arguments);this.curFillColor=n._array,this.drawMode=l.FILL,this._useNormalMaterial=!1,this._tex=null}},{key:"stroke",value:function(e,t,r,o){var n=g.default.prototype.color.apply(this._pInst,arguments);this.curStrokeColor=n._array}},{key:"strokeCap",value:function(e){this.curStrokeCap=e}},{key:"strokeJoin",value:function(e){this.curStrokeJoin=e}},{key:"getFilterLayer",value:function(){return this.filterLayer||(this.filterLayer=this._pInst.createFramebuffer()),this.filterLayer}},{key:"getFilterLayerTemp",value:function(){return this.filterLayerTemp||(this.filterLayerTemp=this._pInst.createFramebuffer()),this.filterLayerTemp}},{key:"matchSize",value:function(e,t){e.width===t.width&&e.height===t.height||e.resize(t.width,t.height),e.pixelDensity()!==t.pixelDensity()&&e.pixelDensity(t.pixelDensity())}},{key:"filter",value:function(){var e,t,r=this,o=this.getFilterLayer(),n=void 0,s=void 0,i=("string"==typeof(arguments.length<=0?void 0:arguments[0])?(s=arguments.length<=0?void 0:arguments[0],j(e={},l.BLUR,3),j(e,l.POSTERIZE,4),j(e,l.THRESHOLD,.5),n=s in(e=e)&&void 0===(arguments.length<=1?void 0:arguments[1])?e[s]:arguments.length<=1?void 0:arguments[1],s in this.defaultFilterShaders||(this.defaultFilterShaders[s]=new g.default.Shader(o._renderer,"uniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nattribute vec3 aPosition;\n// texcoords only come from p5 to vertex shader\n// so pass texcoords on to the fragment shader in a varying variable\nattribute vec2 aTexCoord;\nvarying vec2 vTexCoord;\n\nvoid main() {\n // transferring texcoords for the frag shader\n vTexCoord = aTexCoord;\n\n // copy position with a fourth coordinate for projection (1.0 is normal)\n vec4 positionVec4 = vec4(aPosition, 1.0);\n\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n}\n",E[s])),this.filterShader=this.defaultFilterShaders[s]):this.filterShader=arguments.length<=0?void 0:arguments[0],this.activeFramebuffer()||this),a=(this.matchSize(o,i),i!==this&&(this.filterCamera=this.getFilterLayer().createCamera()),o.draw(function(){return r._pInst.clear()}),[1/(i.width*i.pixelDensity()),1/(i.height*i.pixelDensity())]);s===l.BLUR?(t=this.getFilterLayerTemp(),this.matchSize(t,i),this._pInst.push(),this._pInst.noStroke(),this._pInst.shader(this.filterShader),this.filterShader.setUniform("texelSize",a),this.filterShader.setUniform("canvasSize",[i.width,i.height]),this.filterShader.setUniform("radius",Math.max(1,n)),t.draw(function(){r.filterShader.setUniform("direction",[1,0]),r.filterShader.setUniform("tex0",i),r._pInst.clear(),r._pInst.shader(r.filterShader),r._pInst.rect(-i.width/2,-i.height/2,i.width,i.height)}),o.draw(function(){r.filterShader.setUniform("direction",[0,1]),r.filterShader.setUniform("tex0",t),r._pInst.clear(),r._pInst.shader(r.filterShader),r._pInst.rect(-i.width/2,-i.height/2,i.width,i.height)}),this._pInst.pop()):o.draw(function(){r._pInst.noStroke(),r._pInst.shader(r.filterShader),r.filterShader.setUniform("tex0",i),r.filterShader.setUniform("texelSize",a),r.filterShader.setUniform("canvasSize",[i.width,i.height]),r.filterShader.setUniform("filterParameter",n),r._pInst.rect(-i.width/2,-i.height/2,i.width,i.height)}),this._pInst.push(),this._pInst.noStroke(),this.clear(),this._pInst.push(),this._pInst.imageMode(l.CORNER),this._pInst.blendMode(l.BLEND),this.filterCamera._resize(),this._pInst.setCamera(this.filterCamera),this._pInst.resetMatrix(),this._pInst.image(o,-this.width/2,-this.height/2,this.width,this.height),this._pInst.pop(),this._pInst.pop()}},{key:"pixelDensity",value:function(e){return e?this._pInst.pixelDensity(e):this._pInst.pixelDensity()}},{key:"blendMode",value:function(e){e===l.DARKEST||e===l.LIGHTEST||e===l.ADD||e===l.BLEND||e===l.SUBTRACT||e===l.SCREEN||e===l.EXCLUSION||e===l.REPLACE||e===l.MULTIPLY||e===l.REMOVE?this.curBlendMode=e:e!==l.BURN&&e!==l.OVERLAY&&e!==l.HARD_LIGHT&&e!==l.SOFT_LIGHT&&e!==l.DODGE||console.warn("BURN, OVERLAY, HARD_LIGHT, SOFT_LIGHT, and DODGE only work for blendMode in 2D mode.")}},{key:"erase",value:function(e,t){this._isErasing||(this._cachedBlendMode=this.curBlendMode,this._isErasing=!0,this.blendMode(l.REMOVE),this._cachedFillStyle=this.curFillColor.slice(),this.curFillColor=[1,1,1,e/255],this._cachedStrokeStyle=this.curStrokeColor.slice(),this.curStrokeColor=[1,1,1,t/255])}},{key:"noErase",value:function(){var e;this._isErasing&&(this.curFillColor=this._cachedFillStyle.slice(),this.curStrokeColor=this._cachedStrokeStyle.slice(),e=this.curBlendMode,this.blendMode(this._cachedBlendMode),this._cachedBlendMode=e,this._isErasing=!1,this._applyBlendMode())}},{key:"drawTarget",value:function(){return this.activeFramebuffers[this.activeFramebuffers.length-1]||this}},{key:"beginClip",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=(p(b(s.prototype),"beginClip",this).call(this,e),this.drawTarget()._isClipApplied=!0,this.GL);e.clearStencil(0),e.clear(e.STENCIL_BUFFER_BIT),e.enable(e.STENCIL_TEST),this._stencilTestOn=!0,e.stencilFunc(e.ALWAYS,1,255),e.stencilOp(e.KEEP,e.KEEP,e.REPLACE),e.disable(e.DEPTH_TEST),this._pInst.push(),this._pInst.resetShader(),this._doFill&&this._pInst.fill(0,0),this._doStroke&&this._pInst.stroke(0,0)}},{key:"endClip",value:function(){this._pInst.pop();var e=this.GL;e.stencilOp(e.KEEP,e.KEEP,e.KEEP),e.stencilFunc(this._clipInvert?e.EQUAL:e.NOTEQUAL,0,255),e.enable(e.DEPTH_TEST),this._clipDepths.push(this._pushPopDepth),p(b(s.prototype),"endClip",this).call(this)}},{key:"_clearClip",value:function(){this.GL.clearStencil(1),this.GL.clear(this.GL.STENCIL_BUFFER_BIT),0<this._clipDepths.length&&this._clipDepths.pop(),this.drawTarget()._isClipApplied=!1}},{key:"strokeWeight",value:function(e){this.curStrokeWeight!==e&&(this.pointSize=e,this.curStrokeWeight=e)}},{key:"_getPixel",value:function(e,t){var r=this.GL;return C(r,null,e,t,r.RGBA,r.UNSIGNED_BYTE,this._pInst.height*this._pInst.pixelDensity())}},{key:"loadPixels",value:function(){var e,t,r=this._pixelsState;!0!==this._pInst._glAttributes.preserveDrawingBuffer?console.log("loadPixels only works in WebGL when preserveDrawingBuffer is true."):(e=this._pInst._pixelDensity,t=this.GL,r._setProperty("pixels",k(r.pixels,t,null,0,0,this.width*e,this.height*e,t.RGBA,t.UNSIGNED_BYTE,this.height*e)))}},{key:"updatePixels",value:function(){var e=this._getTempFramebuffer();e.pixels=this._pixelsState.pixels,e.updatePixels(),this._pInst.push(),this._pInst.resetMatrix(),this._pInst.clear(),this._pInst.imageMode(l.CENTER),this._pInst.image(e,0,0),this._pInst.pop(),this.GL.clearDepth(1),this.GL.clear(this.GL.DEPTH_BUFFER_BIT)}},{key:"_getTempFramebuffer",value:function(){return this._tempFramebuffer||(this._tempFramebuffer=this._pInst.createFramebuffer({format:l.UNSIGNED_BYTE,useDepth:this._pInst._glAttributes.depth,depthFormat:l.UNSIGNED_INT,antialias:this._pInst._glAttributes.antialias})),this._tempFramebuffer}},{key:"geometryInHash",value:function(e){return void 0!==this.retainedMode.geometry[e]}},{key:"viewport",value:function(e,t){this._viewport=[0,0,e,t],this.GL.viewport(0,0,e,t)}},{key:"resize",value:function(t,r){g.default.Renderer.prototype.resize.call(this,t,r),this._origViewport={width:this.GL.drawingBufferWidth,height:this.GL.drawingBufferHeight},this.viewport(this._origViewport.width,this._origViewport.height),this._curCamera._resize();var t=this._pixelsState,e=(void 0!==t.pixels&&t._setProperty("pixels",new Uint8Array(this.GL.drawingBufferWidth*this.GL.drawingBufferHeight*4)),!0),r=!1,t=void 0;try{for(var o,n=this.framebuffers[Symbol.iterator]();!(e=(o=n.next()).done);e=!0)o.value._canvasSizeChanged()}catch(e){r=!0,t=e}finally{try{e||null==n.return||n.return()}finally{if(r)throw t}}}},{key:"clear",value:function(){var e=(arguments.length<=0?void 0:arguments[0])||0,t=(arguments.length<=1?void 0:arguments[1])||0,r=(arguments.length<=2?void 0:arguments[2])||0,o=(arguments.length<=3?void 0:arguments[3])||0,n=this.activeFramebuffer();n&&n.format===l.UNSIGNED_BYTE&&!n.antialias&&0===o&&(o=1e-10),this.GL.clearColor(e*o,t*o,r*o,o),this.GL.clearDepth(1),this.GL.clear(this.GL.COLOR_BUFFER_BIT|this.GL.DEPTH_BUFFER_BIT)}},{key:"applyMatrix",value:function(e,t,r,o,n,s){16===arguments.length?g.default.Matrix.prototype.apply.apply(this.uMVMatrix,arguments):this.uMVMatrix.apply([e,t,0,0,r,o,0,0,0,0,1,0,n,s,0,1])}},{key:"translate",value:function(e,t,r){return e instanceof g.default.Vector&&(r=e.z,t=e.y,e=e.x),this.uMVMatrix.translate([e,t,r]),this}},{key:"scale",value:function(e,t,r){return this.uMVMatrix.scale(e,t,r),this}},{key:"rotate",value:function(e,t){return void 0===t?this.rotateZ(e):(g.default.Matrix.prototype.rotate.apply(this.uMVMatrix,arguments),this)}},{key:"rotateX",value:function(e){return this.rotate(e,1,0,0),this}},{key:"rotateY",value:function(e){return this.rotate(e,0,1,0),this}},{key:"rotateZ",value:function(e){return this.rotate(e,0,0,1),this}},{key:"push",value:function(){var e=g.default.Renderer.prototype.push.apply(this),t=e.properties;return t.uMVMatrix=this.uMVMatrix.copy(),t.uPMatrix=this.uPMatrix.copy(),t._curCamera=this._curCamera,this._curCamera=this._curCamera.copy(),t.ambientLightColors=this.ambientLightColors.slice(),t.specularColors=this.specularColors.slice(),t.directionalLightDirections=this.directionalLightDirections.slice(),t.directionalLightDiffuseColors=this.directionalLightDiffuseColors.slice(),t.directionalLightSpecularColors=this.directionalLightSpecularColors.slice(),t.pointLightPositions=this.pointLightPositions.slice(),t.pointLightDiffuseColors=this.pointLightDiffuseColors.slice(),t.pointLightSpecularColors=this.pointLightSpecularColors.slice(),t.spotLightPositions=this.spotLightPositions.slice(),t.spotLightDirections=this.spotLightDirections.slice(),t.spotLightDiffuseColors=this.spotLightDiffuseColors.slice(),t.spotLightSpecularColors=this.spotLightSpecularColors.slice(),t.spotLightAngle=this.spotLightAngle.slice(),t.spotLightConc=this.spotLightConc.slice(),t.userFillShader=this.userFillShader,t.userStrokeShader=this.userStrokeShader,t.userPointShader=this.userPointShader,t.pointSize=this.pointSize,t.curStrokeWeight=this.curStrokeWeight,t.curStrokeColor=this.curStrokeColor,t.curFillColor=this.curFillColor,t.curAmbientColor=this.curAmbientColor,t.curSpecularColor=this.curSpecularColor,t.curEmissiveColor=this.curEmissiveColor,t._hasSetAmbient=this._hasSetAmbient,t._useSpecularMaterial=this._useSpecularMaterial,t._useEmissiveMaterial=this._useEmissiveMaterial,t._useShininess=this._useShininess,t.constantAttenuation=this.constantAttenuation,t.linearAttenuation=this.linearAttenuation,t.quadraticAttenuation=this.quadraticAttenuation,t._enableLighting=this._enableLighting,t._useNormalMaterial=this._useNormalMaterial,t._tex=this._tex,t.drawMode=this.drawMode,t._currentNormal=this._currentNormal,t.curBlendMode=this.curBlendMode,t.activeImageLight=this.activeImageLight,e}},{key:"pop",value:function(){var e;0<this._clipDepths.length&&this._pushPopDepth===this._clipDepths[this._clipDepths.length-1]&&this._clearClip();for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];(e=p(b(s.prototype),"pop",this)).call.apply(e,[this].concat(r)),this._applyStencilTestIfClipping()}},{key:"_applyStencilTestIfClipping",value:function(){var e=this.drawTarget();e._isClipApplied!==this._stencilTestOn&&(e._isClipApplied?(this.GL.enable(this.GL.STENCIL_TEST),this._stencilTestOn=!0):(this.GL.disable(this.GL.STENCIL_TEST),this._stencilTestOn=!1))}},{key:"resetMatrix",value:function(){return this.uMVMatrix.set(this._curCamera.cameraMatrix.mat4[0],this._curCamera.cameraMatrix.mat4[1],this._curCamera.cameraMatrix.mat4[2],this._curCamera.cameraMatrix.mat4[3],this._curCamera.cameraMatrix.mat4[4],this._curCamera.cameraMatrix.mat4[5],this._curCamera.cameraMatrix.mat4[6],this._curCamera.cameraMatrix.mat4[7],this._curCamera.cameraMatrix.mat4[8],this._curCamera.cameraMatrix.mat4[9],this._curCamera.cameraMatrix.mat4[10],this._curCamera.cameraMatrix.mat4[11],this._curCamera.cameraMatrix.mat4[12],this._curCamera.cameraMatrix.mat4[13],this._curCamera.cameraMatrix.mat4[14],this._curCamera.cameraMatrix.mat4[15]),this}},{key:"_getImmediateStrokeShader",value:function(){var e=this.userStrokeShader;return e&&e.isStrokeShader()?e:this._getLineShader()}},{key:"_getRetainedStrokeShader",value:function(){return this._getImmediateStrokeShader()}},{key:"_getImmediateFillShader",value:function(){var e=this.userFillShader;if(this._useNormalMaterial&&(!e||!e.isNormalShader()))return this._getNormalShader();if(this._enableLighting){if(!e||!e.isLightShader())return this._getLightShader()}else if(this._tex){if(!e||!e.isTextureShader())return this._getLightShader()}else if(!e)return this._getImmediateModeShader();return e}},{key:"_getRetainedFillShader",value:function(){if(this._useNormalMaterial)return this._getNormalShader();var e=this.userFillShader;if(this._enableLighting){if(!e||!e.isLightShader())return this._getLightShader()}else if(this._tex){if(!e||!e.isTextureShader())return this._getLightShader()}else if(!e)return this._getColorShader();return e}},{key:"_getImmediatePointShader",value:function(){var e=this.userPointShader;return e&&e.isPointShader()?e:this._getPointShader()}},{key:"_getRetainedLineShader",value:function(){return this._getImmediateLineShader()}},{key:"_getLightShader",value:function(){return this._defaultLightShader||(this._pInst._glAttributes.perPixelLighting?this._defaultLightShader=new g.default.Shader(this,this._webGL2CompatibilityPrefix("vert","highp")+M.phongVert,this._webGL2CompatibilityPrefix("frag","highp")+M.phongFrag):this._defaultLightShader=new g.default.Shader(this,this._webGL2CompatibilityPrefix("vert","highp")+M.lightVert,this._webGL2CompatibilityPrefix("frag","highp")+M.lightTextureFrag)),this._defaultLightShader}},{key:"_getImmediateModeShader",value:function(){return this._defaultImmediateModeShader||(this._defaultImmediateModeShader=new g.default.Shader(this,this._webGL2CompatibilityPrefix("vert","mediump")+M.immediateVert,this._webGL2CompatibilityPrefix("frag","mediump")+M.vertexColorFrag)),this._defaultImmediateModeShader}},{key:"_getNormalShader",value:function(){return this._defaultNormalShader||(this._defaultNormalShader=new g.default.Shader(this,this._webGL2CompatibilityPrefix("vert","mediump")+M.normalVert,this._webGL2CompatibilityPrefix("frag","mediump")+M.normalFrag)),this._defaultNormalShader}},{key:"_getColorShader",value:function(){return this._defaultColorShader||(this._defaultColorShader=new g.default.Shader(this,this._webGL2CompatibilityPrefix("vert","mediump")+M.normalVert,this._webGL2CompatibilityPrefix("frag","mediump")+M.basicFrag)),this._defaultColorShader}},{key:"_getPointShader",value:function(){return this._defaultPointShader||(this._defaultPointShader=new g.default.Shader(this,this._webGL2CompatibilityPrefix("vert","mediump")+M.pointVert,this._webGL2CompatibilityPrefix("frag","mediump")+M.pointFrag)),this._defaultPointShader}},{key:"_getLineShader",value:function(){return this._defaultLineShader||(this._defaultLineShader=new g.default.Shader(this,this._webGL2CompatibilityPrefix("vert","mediump")+M.lineVert,this._webGL2CompatibilityPrefix("frag","mediump")+M.lineFrag)),this._defaultLineShader}},{key:"_getFontShader",value:function(){return this._defaultFontShader||(this.webglVersion===l.WEBGL&&this.GL.getExtension("OES_standard_derivatives"),this._defaultFontShader=new g.default.Shader(this,this._webGL2CompatibilityPrefix("vert","mediump")+M.fontVert,this._webGL2CompatibilityPrefix("frag","mediump")+M.fontFrag)),this._defaultFontShader}},{key:"_webGL2CompatibilityPrefix",value:function(e,t){var r="";return this.webglVersion===l.WEBGL2&&(r+="#version 300 es\n#define WEBGL2\n"),"vert"===e?r+="#define VERTEX_SHADER\n":"frag"===e&&(r+="#define FRAGMENT_SHADER\n"),t&&(r+="precision ".concat(t," float;\n")),r}},{key:"_getEmptyTexture",value:function(){var e;return this._emptyTexture||((e=new g.default.Image(1,1)).set(0,0,255),this._emptyTexture=new g.default.Texture(this,e)),this._emptyTexture}},{key:"getTexture",value:function(e){e instanceof g.default.Framebuffer&&(e=e.color);var t=this.textures.get(e);return t||(t=new g.default.Texture(this,e),this.textures.set(e,t),t)}},{key:"getDiffusedTexture",value:function(e){var t,r;return null!=this.diffusedTextures.get(e)?this.diffusedTextures.get(e):(0,t=Math.floor(e.height/e.width*200),r=(t=this._pInst.createGraphics(200,t,l.WEBGL)).createShader(M.imageLightVert,M.imageLightDiffusedFrag),t.shader(r),r.setUniform("environmentMap",e),t.noStroke(),t.rectMode(t.CENTER),t.rect(0,0,t.width,t.height),this.diffusedTextures.set(e,t),t)}},{key:"getSpecularTexture",value:function(e){if(null!=this.specularTextures.get(e))return this.specularTextures.get(e);var t,r=[],o=this._pInst.createGraphics(512,512,l.WEBGL),n=Math.log(512)/Math.log(2);o.pixelDensity(1);for(var s=512;1<=s;s/=2){o.resizeCanvas(s,s);var i=1-Math.log(s)/Math.log(2)/n,a=o.createShader(M.imageLightVert,M.imageLightSpecularFrag);o.shader(a),o.clear(),a.setUniform("environmentMap",e),a.setUniform("roughness",i),o.noStroke(),o.plane(s,s),r.push(o.get().drawingContext.getImageData(0,0,s,s))}return o.remove(),t=new c.MipmapTexture(this,r,{}),this.specularTextures.set(e,t),t}},{key:"activeFramebuffer",value:function(){return this.activeFramebuffers[this.activeFramebuffers.length-1]||null}},{key:"createFramebuffer",value:function(e){return new g.default.Framebuffer(this,e)}},{key:"_setStrokeUniforms",value:function(e){e.bindShader(),e.setUniform("uUseLineColor",this._useLineColor),e.setUniform("uMaterialColor",this.curStrokeColor),e.setUniform("uStrokeWeight",this.curStrokeWeight),e.setUniform("uStrokeCap",w[this.curStrokeCap]),e.setUniform("uStrokeJoin",S[this.curStrokeJoin])}},{key:"_setFillUniforms",value:function(e){e.bindShader(),e.setUniform("uUseVertexColor",this._useVertexColor),e.setUniform("uMaterialColor",this.curFillColor),e.setUniform("isTexture",!!this._tex),this._tex&&e.setUniform("uSampler",this._tex),e.setUniform("uTint",this._tint),e.setUniform("uHasSetAmbient",this._hasSetAmbient),e.setUniform("uAmbientMatColor",this.curAmbientColor),e.setUniform("uSpecularMatColor",this.curSpecularColor),e.setUniform("uEmissiveMatColor",this.curEmissiveColor),e.setUniform("uSpecular",this._useSpecularMaterial),e.setUniform("uEmissive",this._useEmissiveMaterial),e.setUniform("uShininess",this._useShininess),this._setImageLightUniforms(e),e.setUniform("uUseLighting",this._enableLighting);var t=this.pointLightDiffuseColors.length/3,t=(e.setUniform("uPointLightCount",t),e.setUniform("uPointLightLocation",this.pointLightPositions),e.setUniform("uPointLightDiffuseColors",this.pointLightDiffuseColors),e.setUniform("uPointLightSpecularColors",this.pointLightSpecularColors),this.directionalLightDiffuseColors.length/3),t=(e.setUniform("uDirectionalLightCount",t),e.setUniform("uLightingDirection",this.directionalLightDirections),e.setUniform("uDirectionalDiffuseColors",this.directionalLightDiffuseColors),e.setUniform("uDirectionalSpecularColors",this.directionalLightSpecularColors),this.ambientLightColors.length/3),t=(e.setUniform("uAmbientLightCount",t),e.setUniform("uAmbientColor",this.ambientLightColors),this.spotLightDiffuseColors.length/3);e.setUniform("uSpotLightCount",t),e.setUniform("uSpotLightAngle",this.spotLightAngle),e.setUniform("uSpotLightConc",this.spotLightConc),e.setUniform("uSpotLightDiffuseColors",this.spotLightDiffuseColors),e.setUniform("uSpotLightSpecularColors",this.spotLightSpecularColors),e.setUniform("uSpotLightLocation",this.spotLightPositions),e.setUniform("uSpotLightDirection",this.spotLightDirections),e.setUniform("uConstantAttenuation",this.constantAttenuation),e.setUniform("uLinearAttenuation",this.linearAttenuation),e.setUniform("uQuadraticAttenuation",this.quadraticAttenuation),e.bindTextures()}},{key:"_setImageLightUniforms",value:function(e){var t,r;e.setUniform("uUseImageLight",null!=this.activeImageLight),this.activeImageLight&&(t=this.getDiffusedTexture(this.activeImageLight),e.setUniform("environmentMapDiffused",t),t=this.getSpecularTexture(this.activeImageLight),r=20/this._useShininess,e.setUniform("levelOfDetail",8*r),e.setUniform("environmentMapSpecular",t))}},{key:"_setPointUniforms",value:function(e){e.bindShader(),e.setUniform("uMaterialColor",this.curStrokeColor),e.setUniform("uPointSize",this.pointSize*this._pInst._pixelDensity)}},{key:"_bindBuffer",value:function(e,t,r,o,n){t=t||this.GL.ARRAY_BUFFER,this.GL.bindBuffer(t,e),void 0!==r&&((e=r)instanceof g.default.DataArray?e=r.dataArray():e instanceof(o||Float32Array)||(e=new(o||Float32Array)(e)),this.GL.bufferData(t,e,n||this.GL.STATIC_DRAW))}},{key:"_arraysEqual",value:function(e,r){return e.length===r.length&&e.every(function(e,t){return e===r[t]})}},{key:"_isTypedArray",value:function(t){return[Float32Array,Float64Array,Int16Array,Uint16Array,Uint32Array].some(function(e){return t instanceof e})}},{key:"_flatten",value:function(e){if(0===e.length)return[];var t;if(2e4<e.length){for(var r=[],o=e.slice(),n=o.pop();Array.isArray(n)?o.push.apply(o,h(n)):r.push(n),o.length&&void 0!==(n=o.pop()););return r.reverse(),r}return(t=[]).concat.apply(t,h(e))}},{key:"_vToNArray",value:function(e){var t=[],r=!0,o=!1,n=void 0;try{for(var s,i=e[Symbol.iterator]();!(r=(s=i.next()).done);r=!0){var a=s.value;t.push(a.x,a.y,a.z)}}catch(e){o=!0,n=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw n}}return t}},{key:"_bezierCoefficients",value:function(e){var t=e*e,r=1-e,o=r*r;return[o*r,3*o*e,3*r*t,t*e]}},{key:"_quadraticCoefficients",value:function(e){var t=1-e;return[t*t,2*t*e,e*e]}},{key:"_bezierToCatmull",value:function(e){return[e[1],e[1]+(e[2]-e[0])/this._curveTightness,e[2]-(e[3]-e[1])/this._curveTightness,e[2]]}},{key:"_initTessy",value:function(){var e=new u.default.GluTesselator;return e.gluTessCallback(u.default.gluEnum.GLU_TESS_VERTEX_DATA,function(e,t){for(var r=0;r<e.length;r++)t.push(e[r])}),e.gluTessCallback(u.default.gluEnum.GLU_TESS_BEGIN,function(e){e!==u.default.primitiveType.GL_TRIANGLES&&console.log("expected TRIANGLES but got type: ".concat(e))}),e.gluTessCallback(u.default.gluEnum.GLU_TESS_ERROR,function(e){console.log("error callback"),console.log("error number: ".concat(e))}),e.gluTessCallback(u.default.gluEnum.GLU_TESS_COMBINE,function(e,t,r){for(var o=new Array(g.default.RendererGL.prototype.tessyVertexSize).fill(0),n=0;n<r.length;n++)for(var s=0;s<o.length;s++)0!==r[n]&&t[n]&&(o[s]+=t[n][s]*r[n]);return o}),e.gluTessCallback(u.default.gluEnum.GLU_TESS_EDGE_FLAG,function(e){}),e.gluTessProperty(u.default.gluEnum.GLU_TESS_WINDING_RULE,u.default.windingRule.GLU_TESS_WINDING_NONZERO),e}},{key:"_triangulate",value:function(e){var t=e[0]?e[0][2]:void 0,r=!0,o=!0,n=!1,s=void 0;try{for(var i,a=e[Symbol.iterator]();!(o=(i=a.next()).done);o=!0)for(var l=i.value,u=0;u<l.length;u+=g.default.RendererGL.prototype.tessyVertexSize)if(l[u+2]!==t){r=!1;break}}catch(e){n=!0,s=e}finally{try{o||null==a.return||a.return()}finally{if(n)throw s}}r?this._tessy.gluTessNormal(0,0,1):this._tessy.gluTessNormal(0,0,0);var n=[],c=(this._tessy.gluTessBeginPolygon(n),!0),s=!1,d=void 0;try{for(var h,f=e[Symbol.iterator]();!(c=(h=f.next()).done);c=!0){var p=h.value;this._tessy.gluTessBeginContour();for(var m=0;m<p.length;m+=g.default.RendererGL.prototype.tessyVertexSize){var y=p.slice(m,m+g.default.RendererGL.prototype.tessyVertexSize);this._tessy.gluTessVertex(y,y)}this._tessy.gluTessEndContour()}}catch(e){s=!0,d=e}finally{try{c||null==f.return||f.return()}finally{if(s)throw d}}return this._tessy.gluTessEndPolygon(),n}}])&&f(t.prototype,e),r&&f(t,r),s}(g.default.Renderer),g.default.prototype._assert3d=function(e){if(!this._renderer.isP3D)throw new Error("".concat(e,"() is only supported in WEBGL mode. If you'd like to use 3D graphics and WebGL, see https://p5js.org/examples/form-3d-primitives.html for more information."))},g.default.RendererGL.prototype.tessyVertexSize=12;e=g.default.RendererGL;r.default=e},{"../core/constants":264,"../core/main":275,"../core/p5.Renderer":278,"./GeometryBuilder":319,"./p5.Camera":324,"./p5.Framebuffer":326,"./p5.Matrix":328,"./p5.Shader":333,"./p5.Texture":334,"core-js/modules/es.array.concat":151,"core-js/modules/es.array.copy-within":152,"core-js/modules/es.array.every":153,"core-js/modules/es.array.fill":154,"core-js/modules/es.array.from":158,"core-js/modules/es.array.includes":159,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.slice":165,"core-js/modules/es.array.some":166,"core-js/modules/es.map":169,"core-js/modules/es.object.assign":176,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.get-prototype-of":180,"core-js/modules/es.object.to-string":182,"core-js/modules/es.reflect.construct":184,"core-js/modules/es.reflect.get":185,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.set":189,"core-js/modules/es.string.includes":191,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.typed-array.copy-within":205,"core-js/modules/es.typed-array.every":206,"core-js/modules/es.typed-array.fill":207,"core-js/modules/es.typed-array.filter":208,"core-js/modules/es.typed-array.find":210,"core-js/modules/es.typed-array.find-index":209,"core-js/modules/es.typed-array.float32-array":211,"core-js/modules/es.typed-array.float64-array":212,"core-js/modules/es.typed-array.for-each":213,"core-js/modules/es.typed-array.includes":214,"core-js/modules/es.typed-array.index-of":215,"core-js/modules/es.typed-array.int16-array":216,"core-js/modules/es.typed-array.iterator":218,"core-js/modules/es.typed-array.join":219,"core-js/modules/es.typed-array.last-index-of":220,"core-js/modules/es.typed-array.map":221,"core-js/modules/es.typed-array.reduce":223,"core-js/modules/es.typed-array.reduce-right":222,"core-js/modules/es.typed-array.reverse":224,"core-js/modules/es.typed-array.set":225,"core-js/modules/es.typed-array.slice":226,"core-js/modules/es.typed-array.some":227,"core-js/modules/es.typed-array.sort":228,"core-js/modules/es.typed-array.subarray":229,"core-js/modules/es.typed-array.to-locale-string":230,"core-js/modules/es.typed-array.to-string":231,"core-js/modules/es.typed-array.uint16-array":232,"core-js/modules/es.typed-array.uint32-array":233,"core-js/modules/es.typed-array.uint8-array":234,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238,libtess:247,path:250}],333:[function(e,t,r){"use strict";e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.array.some"),e("core-js/modules/es.function.name"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.array.some"),e("core-js/modules/es.function.name"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var s=(e=e("../core/main"))&&e.__esModule?e:{default:e};function n(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}s.default.Shader=function(){function o(e,t,r){if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");this._renderer=e,this._vertSrc=t,this._fragSrc=r,this._vertShader=-1,this._fragShader=-1,this._glProgram=0,this._loadedAttributes=!1,this.attributes={},this._loadedUniforms=!1,this.uniforms={},this._bound=!1,this.samplers=[]}var e,t,r;return e=o,(t=[{key:"init",value:function(){if(0===this._glProgram){var e=this._renderer.GL;if(this._vertShader=e.createShader(e.VERTEX_SHADER),e.shaderSource(this._vertShader,this._vertSrc),e.compileShader(this._vertShader),!e.getShaderParameter(this._vertShader,e.COMPILE_STATUS))return s.default._friendlyError("Yikes! An error occurred compiling the vertex shader:".concat(e.getShaderInfoLog(this._vertShader))),null;if(this._fragShader=e.createShader(e.FRAGMENT_SHADER),e.shaderSource(this._fragShader,this._fragSrc),e.compileShader(this._fragShader),!e.getShaderParameter(this._fragShader,e.COMPILE_STATUS))return s.default._friendlyError("Darn! An error occurred compiling the fragment shader:".concat(e.getShaderInfoLog(this._fragShader))),null;this._glProgram=e.createProgram(),e.attachShader(this._glProgram,this._vertShader),e.attachShader(this._glProgram,this._fragShader),e.linkProgram(this._glProgram),e.getProgramParameter(this._glProgram,e.LINK_STATUS)||s.default._friendlyError("Snap! Error linking shader program: ".concat(e.getProgramInfoLog(this._glProgram))),this._loadAttributes(),this._loadUniforms()}return this}},{key:"copyToContext",value:function(e){var t=new s.default.Shader(e._renderer,this._vertSrc,this._fragSrc);return t.ensureCompiledOnContext(e),t}},{key:"ensureCompiledOnContext",value:function(e){if(0!==this._glProgram&&this._renderer!==e._renderer)throw new Error("The shader being run is attached to a different context. Do you need to copy it to this context first with .copyToContext()?");0===this._glProgram&&(this._renderer=e._renderer,this.init())}},{key:"_loadAttributes",value:function(){if(!this._loadedAttributes){this.attributes={};for(var e=this._renderer.GL,t=e.getProgramParameter(this._glProgram,e.ACTIVE_ATTRIBUTES),r=0;r<t;++r){var o=e.getActiveAttrib(this._glProgram,r),n=o.name,s=e.getAttribLocation(this._glProgram,n),i={};i.name=n,i.location=s,i.index=r,i.type=o.type,i.size=o.size,this.attributes[n]=i}this._loadedAttributes=!0}}},{key:"_loadUniforms",value:function(){if(!this._loadedUniforms){for(var e=this._renderer.GL,t=e.getProgramParameter(this._glProgram,e.ACTIVE_UNIFORMS),r=0,o=0;o<t;++o){var n=e.getActiveUniform(this._glProgram,o),s={},i=(s.location=e.getUniformLocation(this._glProgram,n.name),s.size=n.size,n.name);1<n.size&&(i=i.substring(0,i.indexOf("[0]"))),s.name=i,s.type=n.type,s._cachedData=void 0,s.type===e.SAMPLER_2D&&(s.samplerIndex=r,r++,this.samplers.push(s)),s.isArray=1<n.size||s.type===e.FLOAT_MAT3||s.type===e.FLOAT_MAT4||s.type===e.FLOAT_VEC2||s.type===e.FLOAT_VEC3||s.type===e.FLOAT_VEC4||s.type===e.INT_VEC2||s.type===e.INT_VEC4||s.type===e.INT_VEC3,this.uniforms[i]=s}this._loadedUniforms=!0}}},{key:"compile",value:function(){}},{key:"bindShader",value:function(){this.init(),this._bound||(this.useProgram(),this._bound=!0,this._setMatrixUniforms(),this.setUniform("uViewport",this._renderer._viewport))}},{key:"unbindShader",value:function(){return this._bound&&(this.unbindTextures(),this._bound=!1),this}},{key:"bindTextures",value:function(){var e=this._renderer.GL,t=!0,r=!1,o=void 0;try{for(var n,s=this.samplers[Symbol.iterator]();!(t=(n=s.next()).done);t=!0){var i=n.value,a=i.texture;void 0===a&&(a=this._renderer._getEmptyTexture()),e.activeTexture(e.TEXTURE0+i.samplerIndex),a.bindTexture(),a.update(),e.uniform1i(i.location,i.samplerIndex)}}catch(e){r=!0,o=e}finally{try{t||null==s.return||s.return()}finally{if(r)throw o}}}},{key:"updateTextures",value:function(){var e=!0,t=!1,r=void 0;try{for(var o,n=this.samplers[Symbol.iterator]();!(e=(o=n.next()).done);e=!0){var s=o.value.texture;s&&s.update()}}catch(e){t=!0,r=e}finally{try{e||null==n.return||n.return()}finally{if(t)throw r}}}},{key:"unbindTextures",value:function(){var e=!0,t=!1,r=void 0;try{for(var o,n=this.samplers[Symbol.iterator]();!(e=(o=n.next()).done);e=!0){var s=o.value;this.setUniform(s.name,this._renderer._getEmptyTexture())}}catch(e){t=!0,r=e}finally{try{e||null==n.return||n.return()}finally{if(t)throw r}}}},{key:"_setMatrixUniforms",value:function(){var e=this._renderer._curCamera.cameraMatrix,t=this._renderer.uPMatrix,r=this._renderer.uMVMatrix,o=r.copy();o.mult(t),this.isStrokeShader()&&("default"===this._renderer._curCamera.cameraType?this.setUniform("uPerspective",1):this.setUniform("uPerspective",0)),this.setUniform("uViewMatrix",e.mat4),this.setUniform("uProjectionMatrix",t.mat4),this.setUniform("uModelViewMatrix",r.mat4),this.setUniform("uModelViewProjectionMatrix",o.mat4),this.uniforms.uNormalMatrix&&(this._renderer.uNMatrix.inverseTranspose(this._renderer.uMVMatrix),this.setUniform("uNormalMatrix",this._renderer.uNMatrix.mat3))}},{key:"useProgram",value:function(){var e=this._renderer.GL;return this._renderer._curShader!==this&&(e.useProgram(this._glProgram),this._renderer._curShader=this),this}},{key:"setUniform",value:function(e,t){var r=this.uniforms[e];if(r){var o=this._renderer.GL;if(r.isArray){if(r._cachedData&&this._renderer._arraysEqual(r._cachedData,t))return;r._cachedData=t.slice(0)}else{if(r._cachedData&&r._cachedData===t)return;Array.isArray(t)?r._cachedData=t.slice(0):r._cachedData=t}var n=r.location;switch(this.useProgram(),r.type){case o.BOOL:!0===t?o.uniform1i(n,1):o.uniform1i(n,0);break;case o.INT:1<r.size?t.length&&o.uniform1iv(n,t):o.uniform1i(n,t);break;case o.FLOAT:1<r.size?t.length&&o.uniform1fv(n,t):o.uniform1f(n,t);break;case o.FLOAT_MAT3:o.uniformMatrix3fv(n,!1,t);break;case o.FLOAT_MAT4:o.uniformMatrix4fv(n,!1,t);break;case o.FLOAT_VEC2:1<r.size?t.length&&o.uniform2fv(n,t):o.uniform2f(n,t[0],t[1]);break;case o.FLOAT_VEC3:1<r.size?t.length&&o.uniform3fv(n,t):o.uniform3f(n,t[0],t[1],t[2]);break;case o.FLOAT_VEC4:1<r.size?t.length&&o.uniform4fv(n,t):o.uniform4f(n,t[0],t[1],t[2],t[3]);break;case o.INT_VEC2:1<r.size?t.length&&o.uniform2iv(n,t):o.uniform2i(n,t[0],t[1]);break;case o.INT_VEC3:1<r.size?t.length&&o.uniform3iv(n,t):o.uniform3i(n,t[0],t[1],t[2]);break;case o.INT_VEC4:1<r.size?t.length&&o.uniform4iv(n,t):o.uniform4i(n,t[0],t[1],t[2],t[3]);break;case o.SAMPLER_2D:o.activeTexture(o.TEXTURE0+r.samplerIndex),r.texture=t instanceof s.default.Texture?t:this._renderer.getTexture(t),o.uniform1i(n,r.samplerIndex),r.texture.src.gifProperties&&r.texture.src._animateGif(this._renderer._pInst)}return this}}},{key:"isLightShader",value:function(){return void 0!==this.attributes.aNormal||void 0!==this.uniforms.uUseLighting||void 0!==this.uniforms.uAmbientLightCount||void 0!==this.uniforms.uDirectionalLightCount||void 0!==this.uniforms.uPointLightCount||void 0!==this.uniforms.uAmbientColor||void 0!==this.uniforms.uDirectionalDiffuseColors||void 0!==this.uniforms.uDirectionalSpecularColors||void 0!==this.uniforms.uPointLightLocation||void 0!==this.uniforms.uPointLightDiffuseColors||void 0!==this.uniforms.uPointLightSpecularColors||void 0!==this.uniforms.uLightingDirection||void 0!==this.uniforms.uSpecular}},{key:"isNormalShader",value:function(){return void 0!==this.attributes.aNormal}},{key:"isTextureShader",value:function(){return 0<this.samplers.length}},{key:"isColorShader",value:function(){return void 0!==this.attributes.aVertexColor||void 0!==this.uniforms.uMaterialColor}},{key:"isTexLightShader",value:function(){return this.isLightShader()&&this.isTextureShader()}},{key:"isStrokeShader",value:function(){return void 0!==this.uniforms.uStrokeWeight}},{key:"enableAttrib",value:function(e,t,r,o,n,s){var i;return e&&-1!==(e=e.location)&&(i=this._renderer.GL,this._renderer.registerEnabled.has(e)||(i.enableVertexAttribArray(e),this._renderer.registerEnabled.add(e)),this._renderer.GL.vertexAttribPointer(e,t,r||i.FLOAT,o||!1,n||0,s||0)),this}},{key:"disableRemainingAttributes",value:function(){var r=this,e=!0,t=!1,o=void 0;try{for(var n,s=this._renderer.registerEnabled.values()[Symbol.iterator]();!(e=(n=s.next()).done);e=!0)!function(){var t=n.value;Object.keys(r.attributes).some(function(e){return r.attributes[e].location===t})||(r._renderer.GL.disableVertexAttribArray(t),r._renderer.registerEnabled.delete(t))}()}catch(e){t=!0,o=e}finally{try{e||null==s.return||s.return()}finally{if(t)throw o}}}}])&&n(e.prototype,t),r&&n(e,r),o}();e=s.default.Shader;r.default=e},{"../core/main":275,"core-js/modules/es.array.index-of":160,"core-js/modules/es.array.iterator":161,"core-js/modules/es.array.slice":165,"core-js/modules/es.array.some":166,"core-js/modules/es.function.name":168,"core-js/modules/es.object.keys":181,"core-js/modules/es.object.to-string":182,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/web.dom-collections.iterator":238}],334:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.get-prototype-of"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.reflect.construct"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.typed-array.uint8-array"),e("core-js/modules/es.typed-array.copy-within"),e("core-js/modules/es.typed-array.every"),e("core-js/modules/es.typed-array.fill"),e("core-js/modules/es.typed-array.filter"),e("core-js/modules/es.typed-array.find"),e("core-js/modules/es.typed-array.find-index"),e("core-js/modules/es.typed-array.for-each"),e("core-js/modules/es.typed-array.includes"),e("core-js/modules/es.typed-array.index-of"),e("core-js/modules/es.typed-array.iterator"),e("core-js/modules/es.typed-array.join"),e("core-js/modules/es.typed-array.last-index-of"),e("core-js/modules/es.typed-array.map"),e("core-js/modules/es.typed-array.reduce"),e("core-js/modules/es.typed-array.reduce-right"),e("core-js/modules/es.typed-array.reverse"),e("core-js/modules/es.typed-array.set"),e("core-js/modules/es.typed-array.slice"),e("core-js/modules/es.typed-array.some"),e("core-js/modules/es.typed-array.sort"),e("core-js/modules/es.typed-array.subarray"),e("core-js/modules/es.typed-array.to-locale-string"),e("core-js/modules/es.typed-array.to-string"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.typed-array.uint8-array"),e("core-js/modules/es.typed-array.copy-within"),e("core-js/modules/es.typed-array.every"),e("core-js/modules/es.typed-array.fill"),e("core-js/modules/es.typed-array.filter"),e("core-js/modules/es.typed-array.find"),e("core-js/modules/es.typed-array.find-index"),e("core-js/modules/es.typed-array.for-each"),e("core-js/modules/es.typed-array.includes"),e("core-js/modules/es.typed-array.index-of"),e("core-js/modules/es.typed-array.iterator"),e("core-js/modules/es.typed-array.join"),e("core-js/modules/es.typed-array.last-index-of"),e("core-js/modules/es.typed-array.map"),e("core-js/modules/es.typed-array.reduce"),e("core-js/modules/es.typed-array.reduce-right"),e("core-js/modules/es.typed-array.reverse"),e("core-js/modules/es.typed-array.set"),e("core-js/modules/es.typed-array.slice"),e("core-js/modules/es.typed-array.some"),e("core-js/modules/es.typed-array.sort"),e("core-js/modules/es.typed-array.subarray"),e("core-js/modules/es.typed-array.to-locale-string"),e("core-js/modules/es.typed-array.to-string"),Object.defineProperty(r,"__esModule",{value:!0}),r.checkWebGLCapabilities=m,r.default=r.MipmapTexture=void 0;var s=(p=e("../core/main"))&&p.__esModule?p:{default:p},a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("../core/constants"));function l(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,l=function(){return e},e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(r){return function(){var e,t=n(r),t=(e=function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch(e){}}}()?(e=n(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(!e||"object"!==i(e)&&"function"!=typeof e){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}}function n(e){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function f(e,t,r){t&&h(e.prototype,t),r&&h(e,r)}s.default.Texture=function(){function n(e,t,r){d(this,n),this._renderer=e;var o=this._renderer.GL,r=(r=r||{},this.src=t,this.glTex=void 0,this.glTarget=o.TEXTURE_2D,this.glFormat=r.format||o.RGBA,this.mipmaps=!1,this.glMinFilter=r.minFilter||o.LINEAR,this.glMagFilter=r.magFilter||o.LINEAR,this.glWrapS=r.wrapS||o.CLAMP_TO_EDGE,this.glWrapT=r.wrapT||o.CLAMP_TO_EDGE,this.glDataType=r.dataType||o.UNSIGNED_BYTE,m(e)),e=(this.glFormat!==o.HALF_FLOAT||r.halfFloat||(console.log("This device does not support dataType HALF_FLOAT. Falling back to FLOAT."),this.glDataType=o.FLOAT),this.glFormat!==o.HALF_FLOAT||this.glMinFilter!==o.LINEAR&&this.glMagFilter!==o.LINEAR||r.halfFloatLinear||(console.log("This device does not support linear filtering for dataType FLOAT. Falling back to NEAREST."),this.glMinFilter===o.LINEAR&&(this.glMinFilter=o.NEAREST),this.glMagFilter===o.LINEAR&&(this.glMagFilter=o.NEAREST)),this.glFormat!==o.FLOAT||r.float||(console.log("This device does not support dataType FLOAT. Falling back to UNSIGNED_BYTE."),this.glDataType=o.UNSIGNED_BYTE),this.glFormat!==o.FLOAT||this.glMinFilter!==o.LINEAR&&this.glMagFilter!==o.LINEAR||r.floatLinear||(console.log("This device does not support linear filtering for dataType FLOAT. Falling back to NEAREST."),this.glMinFilter===o.LINEAR&&(this.glMinFilter=o.NEAREST),this.glMagFilter===o.LINEAR&&(this.glMagFilter=o.NEAREST)),this.isSrcMediaElement=void 0!==s.default.MediaElement&&t instanceof s.default.MediaElement,this._videoPrevUpdateTime=0,this.isSrcHTMLElement=void 0!==s.default.Element&&t instanceof s.default.Element&&!(t instanceof s.default.Graphics)&&!(t instanceof s.default.Renderer),this.isSrcP5Image=t instanceof s.default.Image,this.isSrcP5Graphics=t instanceof s.default.Graphics,this.isSrcP5Renderer=t instanceof s.default.Renderer,this.isImageData="undefined"!=typeof ImageData&&t instanceof ImageData,this.isFramebufferTexture=t instanceof s.default.FramebufferTexture,this._getTextureDataFromSource());return this.width=e.width,this.height=e.height,this.init(e),this}return f(n,[{key:"_getTextureDataFromSource",value:function(){var e;return this.isFramebufferTexture?e=this.src.rawTexture():this.isSrcP5Image?e=this.src.canvas:this.isSrcMediaElement||this.isSrcP5Graphics||this.isSrcP5Renderer||this.isSrcHTMLElement?e=this.src.elt:this.isImageData&&(e=this.src),e}},{key:"init",value:function(e){var t,r=this._renderer.GL;this.isFramebufferTexture||(this.glTex=r.createTexture()),this.glWrapS=this._renderer.textureWrapX,this.glWrapT=this._renderer.textureWrapY,this.setWrapMode(this.glWrapS,this.glWrapT),this.bindTexture(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,this.glMagFilter),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,this.glMinFilter),this.isFramebufferTexture||(0===this.width||0===this.height||this.isSrcMediaElement&&!this.src.loadedmetadata?(t=new Uint8Array([1,1,1,1]),r.texImage2D(this.glTarget,0,r.RGBA,1,1,0,this.glFormat,this.glDataType,t)):r.texImage2D(this.glTarget,0,this.glFormat,this.glFormat,this.glDataType,e))}},{key:"update",value:function(){var e,t,r,o=this.src;return 0!==o.width&&0!==o.height&&(!this.isFramebufferTexture&&(e=this._getTextureDataFromSource(),t=!1,r=this._renderer.GL,e.width!==this.width||e.height!==this.height?(t=!0,this.width=e.width||o.width,this.height=e.height||o.height,this.isSrcP5Image?o.setModified(!1):(this.isSrcMediaElement||this.isSrcHTMLElement)&&o.setModified(!0)):this.isSrcP5Image?o.isModified()&&o.setModified(!(t=!0)):this.isSrcMediaElement?o.isModified()?o.setModified(!(t=!0)):o.loadedmetadata&&this._videoPrevUpdateTime!==o.time()&&(this._videoPrevUpdateTime=o.time(),t=!0):this.isImageData?o._dirty&&(t=!(o._dirty=!1)):t=!0,t&&(this.bindTexture(),r.texImage2D(this.glTarget,0,this.glFormat,this.glFormat,this.glDataType,e)),t))}},{key:"bindTexture",value:function(){return this._renderer.GL.bindTexture(this.glTarget,this.getTexture()),this}},{key:"unbindTexture",value:function(){this._renderer.GL.bindTexture(this.glTarget,null)}},{key:"getTexture",value:function(){return this.isFramebufferTexture?this.src.rawTexture():this.glTex}},{key:"setInterpolation",value:function(e,t){var r=this._renderer.GL;this.glMinFilter=this.glFilter(e),this.glMagFilter=this.glFilter(t),this.bindTexture(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,this.glMinFilter),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,this.glMagFilter),this.unbindTexture()}},{key:"glFilter",value:function(e){var t=this._renderer.GL;return e===a.NEAREST?t.NEAREST:t.LINEAR}},{key:"setWrapMode",value:function(e,t){function r(e){return 0==(e&e-1)}var o=this._renderer.GL,n=this._getTextureDataFromSource(),n=n.naturalWidth&&n.naturalHeight?(s=n.naturalWidth,n.naturalHeight):(s=this.width,this.height),s=r(s),n=r(n);e===a.REPEAT?this._renderer.webglVersion===a.WEBGL2||s&&n?this.glWrapS=o.REPEAT:(console.warn("You tried to set the wrap mode to REPEAT but the texture size is not a power of two. Setting to CLAMP instead"),this.glWrapS=o.CLAMP_TO_EDGE):e===a.MIRROR?this._renderer.webglVersion===a.WEBGL2||s&&n?this.glWrapS=o.MIRRORED_REPEAT:(console.warn("You tried to set the wrap mode to MIRROR but the texture size is not a power of two. Setting to CLAMP instead"),this.glWrapS=o.CLAMP_TO_EDGE):this.glWrapS=o.CLAMP_TO_EDGE,t===a.REPEAT?this._renderer.webglVersion===a.WEBGL2||s&&n?this.glWrapT=o.REPEAT:(console.warn("You tried to set the wrap mode to REPEAT but the texture size is not a power of two. Setting to CLAMP instead"),this.glWrapT=o.CLAMP_TO_EDGE):t===a.MIRROR?this._renderer.webglVersion===a.WEBGL2||s&&n?this.glWrapT=o.MIRRORED_REPEAT:(console.warn("You tried to set the wrap mode to MIRROR but the texture size is not a power of two. Setting to CLAMP instead"),this.glWrapT=o.CLAMP_TO_EDGE):this.glWrapT=o.CLAMP_TO_EDGE,this.bindTexture(),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,this.glWrapS),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,this.glWrapT),this.unbindTexture()}}]),n}();var p=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e);var o=c(n);function n(e,t,r){d(this,n);t=(e=o.call(this,e,t,r))._renderer.GL;return e.glMinFilter===t.LINEAR&&(e.glMinFilter=t.LINEAR_MIPMAP_LINEAR),e}return f(n,[{key:"glFilter",value:function(e){return this._renderer.GL.LINEAR_MIPMAP_LINEAR}},{key:"_getTextureDataFromSource",value:function(){return this.src}},{key:"init",value:function(e){var t=this._renderer.GL;this.glTex=t.createTexture(),this.bindTexture();for(var r=0;r<e.length;r++)t.texImage2D(this.glTarget,r,this.glFormat,this.glFormat,this.glDataType,e[r]);this.glMinFilter=t.LINEAR_MIPMAP_LINEAR,t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,this.glMagFilter),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,this.glMinFilter),this.unbindTexture()}},{key:"update",value:function(){}}]),n}(s.default.Texture);function m(e){var t=e.GL,e=e.webglVersion,r=e===a.WEBGL2?t.getExtension("EXT_color_buffer_float")&&t.getExtension("EXT_float_blend"):t.getExtension("OES_texture_float"),o=r&&t.getExtension("OES_texture_float_linear"),e=e===a.WEBGL2?t.getExtension("EXT_color_buffer_float"):t.getExtension("OES_texture_half_float");return{float:r,floatLinear:o,halfFloat:e,halfFloatLinear:e&&t.getExtension("OES_texture_half_float_linear")}}r.MipmapTexture=p;e=s.default.Texture;r.default=e},{"../core/constants":264,"../core/main":275,"core-js/modules/es.array.iterator":161,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.get-prototype-of":180,"core-js/modules/es.object.to-string":182,"core-js/modules/es.reflect.construct":184,"core-js/modules/es.regexp.to-string":188,"core-js/modules/es.string.iterator":192,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.typed-array.copy-within":205,"core-js/modules/es.typed-array.every":206,"core-js/modules/es.typed-array.fill":207,"core-js/modules/es.typed-array.filter":208,"core-js/modules/es.typed-array.find":210,"core-js/modules/es.typed-array.find-index":209,"core-js/modules/es.typed-array.for-each":213,"core-js/modules/es.typed-array.includes":214,"core-js/modules/es.typed-array.index-of":215,"core-js/modules/es.typed-array.iterator":218,"core-js/modules/es.typed-array.join":219,"core-js/modules/es.typed-array.last-index-of":220,"core-js/modules/es.typed-array.map":221,"core-js/modules/es.typed-array.reduce":223,"core-js/modules/es.typed-array.reduce-right":222,"core-js/modules/es.typed-array.reverse":224,"core-js/modules/es.typed-array.set":225,"core-js/modules/es.typed-array.slice":226,"core-js/modules/es.typed-array.some":227,"core-js/modules/es.typed-array.sort":228,"core-js/modules/es.typed-array.subarray":229,"core-js/modules/es.typed-array.to-locale-string":230,"core-js/modules/es.typed-array.to-string":231,"core-js/modules/es.typed-array.uint8-array":234,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}],335:[function(e,t,r){"use strict";function o(e){return(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})(e)}function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.get-own-property-descriptor"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.split"),e("core-js/modules/es.string.sub"),e("core-js/modules/es.weak-map"),e("core-js/modules/web.dom-collections.iterator"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.split"),e("core-js/modules/es.string.sub"),e("core-js/modules/web.dom-collections.iterator");var n,B=(n=e("../core/main"))&&n.__esModule?n:{default:n},M=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var s;Object.prototype.hasOwnProperty.call(e,r)&&((s=n?Object.getOwnPropertyDescriptor(e,r):null)&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=e[r])}o.default=e,t&&t.set(e,o);return o}(e("../core/constants"));function a(){var e;return"function"!=typeof WeakMap?null:(e=new WeakMap,a=function(){return e},e)}function G(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function V(e,t,r){t&&s(e.prototype,t),r&&s(e,r)}e("./p5.Shader"),e("./p5.RendererGL.Retained"),B.default.RendererGL.prototype._applyTextProperties=function(){},B.default.RendererGL.prototype.textWidth=function(e){return this._isOpenType()?this._textFont._textWidth(e,this._textSize):0};var l=function(){function r(e,t){G(this,r),this.width=e,this.height=t,this.infos=[]}return V(r,[{key:"findImage",value:function(e){var t,r,o=this.width*this.height;if(o<e)throw new Error("font is too complex to render in 3D");for(var n=this.infos.length-1;0<=n;--n){var s=this.infos[n];if(s.index+e<o){r=(t=s).imageData;break}}if(!t){try{r=new ImageData(this.width,this.height)}catch(e){var i=document.getElementsByTagName("canvas")[0],a=!i,l=(i||((i=document.createElement("canvas")).style.display="none",document.body.appendChild(i)),i.getContext("2d"));l&&(r=l.createImageData(this.width,this.height)),a&&document.body.removeChild(i)}this.infos.push(t={index:0,imageData:r})}l=t.index;return t.index+=e,r._dirty=!0,{imageData:r,index:l}}}]),r}();function z(e,t,r,o,n){var s=e.imageData.data,e=4*e.index++;s[e++]=t,s[e++]=r,s[e++]=o,s[+e]=n}var H=Math.sqrt(3),E=function(){function t(e){G(this,t),this.font=e,this.strokeImageInfos=new l(64,64),this.colDimImageInfos=new l(64,64),this.rowDimImageInfos=new l(64,64),this.colCellImageInfos=new l(64,64),this.rowCellImageInfos=new l(64,64),this.glyphInfos={}}return V(t,[{key:"getGlyphInfo",value:function(e){var t=this.glyphInfos[e.index];if(!t){var r=e.getBoundingBox(),o=r.x1,n=r.y1,s=r.x2-o,i=r.y2-n,a=e.path.commands;if(0==s||0==i||!a.length)return this.glyphInfos[e.index]={};for(var u=[],c=[],d=[],l=8;0<=l;--l)d.push([]);for(l=8;0<=l;--l)c.push([]);var h,f,p,m,D=function(){function n(e,t,r,o){G(this,n),this.p0=e,this.c0=t,this.c1=r,this.p1=o}return V(n,[{key:"toQuadratic",value:function(){return{x:this.p0.x,y:this.p0.y,x1:this.p1.x,y1:this.p1.y,cx:(3*(this.c0.x+this.c1.x)-(this.p0.x+this.p1.x))/4,cy:(3*(this.c0.y+this.c1.y)-(this.p0.y+this.p1.y))/4}}},{key:"quadError",value:function(){return B.default.Vector.sub(B.default.Vector.sub(this.p1,this.p0),B.default.Vector.mult(B.default.Vector.sub(this.c1,this.c0),3)).mag()/2}},{key:"split",value:function(e){var t=B.default.Vector.lerp(this.p0,this.c0,e),r=B.default.Vector.lerp(this.c0,this.c1,e),o=B.default.Vector.lerp(t,r,e),r=(this.c1=B.default.Vector.lerp(this.c1,this.p1,e),this.c0=B.default.Vector.lerp(r,this.c1,e),B.default.Vector.lerp(o,this.c0,e)),e=new n(this.p0,t,o,r);return this.p0=r,e}},{key:"splitInflections",value:function(){var e=B.default.Vector.sub(this.c0,this.p0),t=B.default.Vector.sub(B.default.Vector.sub(this.c1,this.c0),e),r=B.default.Vector.sub(B.default.Vector.sub(B.default.Vector.sub(this.p1,this.c1),e),B.default.Vector.mult(t,2)),o=[],n=t.x*r.y-t.y*r.x;return 0!==n&&0<=(e=(r=e.x*r.y-e.y*r.x)*r-4*n*(e.x*t.y-e.y*t.x))&&(n<0&&(n=-n,r=-r,0),e=(-r+(t=Math.sqrt(e)))/(2*n),0<(r=(-r-t)/(2*n))&&r<1&&(o.push(this.split(r)),e=1-(1-e)/(1-r)),0<e&&e<1&&o.push(this.split(e))),o.push(this),o}}]),n}(),y=!0,g=!1,v=void 0;try{for(var b,j=a[Symbol.iterator]();!(y=(b=j.next()).done);y=!0){var _=b.value,x=(_.x-o)/s,w=(_.y-n)/i;if(!U(h,f,x,w)){switch(_.type){case"M":p=x,m=w;break;case"L":I(h,f,x,w);break;case"Q":var S=(_.x1-o)/s,T=(_.y1-n)/i;L([h,x,S],[f,w,T],{x:h,y:f,cx:S,cy:T});break;case"Z":U(h,f,p,m)?u.push({x:h,y:f}):(I(h,f,p,m),u.push({x:p,y:m}));break;case"C":for(var M=function(e,t,r,o,n,s,i,a){var e=new D(new B.default.Vector(e,t),new B.default.Vector(r,o),new B.default.Vector(n,s),new B.default.Vector(i,a)).splitInflections(),l=[],u=30/H,c=!0,t=!1,r=void 0;try{for(var d,h=e[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){for(var f=d.value,p=[],m=void 0;!(.125<=(m=u/f.quadError()));){var y=Math.pow(m,1/3),g=f.split(y),v=f.split(1-y/(1-y));l.push(g),p.push(f),f=v}m<1&&l.push(f.split(.5)),l.push(f),Array.prototype.push.apply(l,p.reverse())}}catch(e){t=!0,r=e}finally{try{c||null==h.return||h.return()}finally{if(t)throw r}}return l}(h,f,(_.x1-o)/s,(_.y1-n)/i,(_.x2-o)/s,(_.y2-n)/i,x,w),E=0;E<M.length;E++){var k=M[E].toQuadratic();L([k.x,k.x1,k.cx],[k.y,k.y1,k.cy],k)}break;default:throw new Error("unknown command type: ".concat(_.type))}h=x,f=w}}}catch(e){g=!0,v=e}finally{try{y||null==j.return||j.return()}finally{if(g)throw v}}for(var C=u.length,O=this.strokeImageInfos.findImage(C),F=O.index,P=0;P<C;++P){var A=u[P];z(O,R(A.x),R(A.y),R(A.cx),R(A.cy))}(t=this.glyphInfos[e.index]={glyph:e,uGlyphRect:[r.x1,-r.y1,r.x2,-r.y2],strokeImageInfo:O,strokes:u,colInfo:N(d,this.colDimImageInfos,this.colCellImageInfos),rowInfo:N(c,this.rowDimImageInfos,this.rowCellImageInfos)}).uGridOffset=[t.colInfo.dimOffset,t.rowInfo.dimOffset]}return t;function L(e,t,r){var o=u.length;function n(e,t,r){for(var o=e.length;0<o--;){var n=e[o];n<t&&(t=n),r<n&&(r=n)}return{min:t,max:r}}u.push(r);for(var r=n(e,1,0),e=Math.max(Math.floor(9*r.min-.5),0),s=Math.min(Math.ceil(9*r.max+.5),9),i=e;i<s;++i)d[i].push(o);for(var r=n(t,1,0),e=Math.max(Math.floor(9*r.min-.5),0),a=Math.min(Math.ceil(9*r.max+.5),9),l=e;l<a;++l)c[l].push(o)}function R(e){return(e=(r=255)*e)<(t=0)?t:r<e?r:e;var t,r}function I(e,t,r,o){L([e,r],[t,o],{x:e,y:t,cx:(e+r)/2,cy:(t+o)/2})}function U(e,t,r,o){return Math.abs(r-e)<1e-5&&Math.abs(o-t)<1e-5}function N(e,t,r){for(var o=e.length,n=t.findImage(o),t=n.index,s=0,i=0;i<o;++i)s+=e[i].length;for(var a=r.findImage(s),l=0;l<o;++l){var u=e[l],c=u.length,d=a.index;z(n,d>>7,127&d,c>>7,127&c);for(var h=0;h<c;++h){var f=u[h]+F;z(a,f>>7,127&f,0,0)}}return{cellImageInfo:a,dimOffset:t,dimImageInfo:n}}}}]),t}();B.default.RendererGL.prototype._renderText=function(e,t,r,o,n){if(this._textFont&&"string"!=typeof this._textFont){if(!(n<=o)&&this._doFill){if(this._isOpenType()){e.push();var n=this._doStroke,s=this.drawMode,i=(this._doStroke=!1,this.drawMode=M.TEXTURE,this._textFont.font),a=(a=this._textFont._fontInfo)||(this._textFont._fontInfo=new E(i)),r=this._textFont._handleAlignment(this,t,r,o),o=this._textSize/i.unitsPerEm,l=(this.translate(r.x,r.y,0),this.scale(o,o,1),this.GL),r=!this._defaultFontShader,u=this._getFontShader(),c=(u.init(),u.bindShader(),r&&(u.setUniform("uGridImageSize",[64,64]),u.setUniform("uCellsImageSize",[64,64]),u.setUniform("uStrokeImageSize",[64,64]),u.setUniform("uGridSize",[9,9])),this._applyColorBlend(this.curFillColor),this.retainedMode.geometry.glyph),d=(c||((o=this._textGeom=new B.default.Geometry(1,1,function(){for(var e=0;e<=1;e++)for(var t=0;t<=1;t++)this.vertices.push(new B.default.Vector(t,e,0)),this.uvs.push(t,e)})).computeFaces().computeNormals(),c=this.createBuffers("glyph",o)),!0),r=!1,o=void 0;try{for(var h,f=this.retainedMode.buffers.text[Symbol.iterator]();!(d=(h=f.next()).done);d=!0)h.value._prepareBuffer(c,u)}catch(e){r=!0,o=e}finally{try{d||null==f.return||f.return()}finally{if(r)throw o}}this._bindBuffer(c.indexBuffer,l.ELEMENT_ARRAY_BUFFER),u.setUniform("uMaterialColor",this.curFillColor),l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1);try{var p=0,m=null,y=i.stringToGlyphs(t),g=!0,v=!1,b=void 0;try{for(var j,_=y[Symbol.iterator]();!(g=(j=_.next()).done);g=!0){var x,w,S=j.value,T=(m&&(p+=i.getKerningValue(m,S)),a.getGlyphInfo(S));T.uGlyphRect&&(x=T.rowInfo,w=T.colInfo,u.setUniform("uSamplerStrokes",T.strokeImageInfo.imageData),u.setUniform("uSamplerRowStrokes",x.cellImageInfo.imageData),u.setUniform("uSamplerRows",x.dimImageInfo.imageData),u.setUniform("uSamplerColStrokes",w.cellImageInfo.imageData),u.setUniform("uSamplerCols",w.dimImageInfo.imageData),u.setUniform("uGridOffset",T.uGridOffset),u.setUniform("uGlyphRect",T.uGlyphRect),u.setUniform("uGlyphOffset",p),u.bindTextures(),l.drawElements(l.TRIANGLES,6,this.GL.UNSIGNED_SHORT,0)),p+=S.advanceWidth,m=S}}catch(e){v=!0,b=e}finally{try{g||null==_.return||_.return()}finally{if(v)throw b}}}finally{u.unbindShader(),this._doStroke=n,this.drawMode=s,l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),e.pop()}}else console.log("WEBGL: only Opentype (.otf) and Truetype (.ttf) fonts are supported");return e}}else console.log("WEBGL: you must load and set a font before drawing text. See `loadFont` and `textFont` for more details.")}},{"../core/constants":264,"../core/main":275,"./p5.RendererGL.Retained":331,"./p5.Shader":333,"core-js/modules/es.array.iterator":161,"core-js/modules/es.object.get-own-property-descriptor":178,"core-js/modules/es.object.to-string":182,"core-js/modules/es.regexp.exec":187,"core-js/modules/es.string.iterator":192,"core-js/modules/es.string.split":198,"core-js/modules/es.string.sub":200,"core-js/modules/es.symbol":204,"core-js/modules/es.symbol.description":202,"core-js/modules/es.symbol.iterator":203,"core-js/modules/es.weak-map":236,"core-js/modules/web.dom-collections.iterator":238}]},{},[259])(259)});