diff --git a/.eslintrc.js b/.eslintrc.js
index b3fba294..c16bfdfd 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -1,27 +1,23 @@
module.exports = {
- extends: [
- 'unobtrusive',
- 'eslint:recommended'
- ],
- plugins: ['babel'],
- env: {
- browser: true,
- node: true,
- },
- globals: {
- },
- rules: {
- semi: [2, 'always'],
- quotes: [2, 'single'],
- indent: [2, 2],
- 'linebreak-style': [2, 'unix'],
- 'brace-style': [2, '1tbs'],
- 'array-bracket-spacing': [2, 'never'],
- camelcase: [2, {properties: 'always'}],
- 'keyword-spacing': [2],
- 'eol-last': [2],
- 'no-trailing-spaces': [2],
- 'no-process-env': ['off', 'always'],
- 'no-console': ['off','always']
- }
- };
+ extends: ["unobtrusive", "eslint:recommended"],
+ plugins: ["babel"],
+ env: {
+ browser: true,
+ node: true
+ },
+ globals: {},
+ rules: {
+ semi: [2, "always"],
+ quotes: [2, "double"],
+ indent: [2, 2],
+ "linebreak-style": [2, "unix"],
+ "brace-style": [2, "1tbs"],
+ "array-bracket-spacing": [2, "never"],
+ camelcase: [2, { properties: "always" }],
+ "keyword-spacing": [2],
+ "eol-last": [2],
+ "no-trailing-spaces": [2],
+ "no-process-env": ["off", "always"],
+ "no-console": ["off", "always"]
+ }
+};
diff --git a/_source/_includes/aside-left.html b/_source/_includes/aside-left.html
index 2e041ce0..f2a22489 100644
--- a/_source/_includes/aside-left.html
+++ b/_source/_includes/aside-left.html
@@ -25,12 +25,19 @@
-
+
+
+
+

+
\ No newline at end of file
diff --git a/_source/assets/css/styles.scss b/_source/assets/css/styles.scss
index 38643736..8253ea5a 100644
--- a/_source/assets/css/styles.scss
+++ b/_source/assets/css/styles.scss
@@ -4,7 +4,7 @@ css: true
* {
-webkit-box-sizing: border-box;
- box-sizing: border-box;
+ box-sizing: border-box;
}
@import "mixins";
@@ -16,8 +16,8 @@ css: true
$textColor: #000;
$bgColor: #fff;
$headLineColor: #333;
-$guideOneColor: #9636FC;
-$guideTwoColor: #FF4EFF;
+$guideOneColor: #9636fc;
+$guideTwoColor: #ff4eff;
// Responsive Sizes
$phone: 750px;
@@ -32,11 +32,10 @@ body {
background-image: url("/assets/images/stripe_c40ccfac0db9e43c48e95a530d787366.png");
}
-
.wrapper {
position: relative;
-webkit-box-sizing: border-box;
- box-sizing: border-box;
+ box-sizing: border-box;
max-width: 1200px;
width: 100%;
margin: 25px auto 0px;
@@ -50,12 +49,11 @@ body {
margin-top: 0px;
}
-
@include clearfix;
.logo {
background-color: white;
- height: 130px;
+ height: auto;
width: 200px;
margin-bottom: 30px;
@@ -69,10 +67,9 @@ body {
float: left;
.main-menu {
-
padding-bottom: 1em;
- ul{
+ ul {
list-style: none;
margin-left: 0;
padding-left: 0;
@@ -98,7 +95,6 @@ body {
padding-top: 150px;
}
-
a {
padding-left: 25px;
border: none;
@@ -142,27 +138,25 @@ body {
padding-right: 25px;
}
-
@include media($phone) {
float: none;
width: 90%;
margin: 0 auto 50px;
}
- #gallery-overview{
+ #gallery-overview {
display: flex;
flex-wrap: wrap;
align-content: flex-start;
}
- .gallery-overview-item{
+ .gallery-overview-item {
max-width: 350px;
margin-right: 1em;
// flex-basis: 100px;
flex-shrink: 0;
-
}
@include media($phone) {
- .gallery-overview-item{
+ .gallery-overview-item {
max-width: 100%;
}
}
@@ -197,21 +191,20 @@ body {
.gallery-overview-item-wrapper {
width: 50%;
- .gallery-overview-item{
- .heading-container{
+ .gallery-overview-item {
+ .heading-container {
height: 4em;
}
- img.gallery-thumbnail{
+ img.gallery-thumbnail {
width: 256px;
height: 144px;
}
-
}
-
}
-p.project-authors, p.project-description{
+p.project-authors,
+p.project-description {
font-size: 1.2em;
font-style: italic;
}
@@ -225,7 +218,8 @@ p {
}
}
-.fhnw-logo {
+.fhnw-logo,
+.sponsor-logo {
// padding-left: 25px;
a {
img {
@@ -257,7 +251,7 @@ p {
list-style-type: none;
width: 30px;
height: 1px;
- background-color: #2AFFFF;
+ background-color: #2affff;
position: absolute;
margin-top: -1px;
top: 50%;
@@ -267,19 +261,19 @@ p {
&:first-child {
-webkit-transform: translateY(-10px) rotate(0deg);
- transform: translateY(-10px) rotate(0deg);
+ transform: translateY(-10px) rotate(0deg);
}
&:last-child {
-webkit-transform: translateY(10px) rotate(0deg);
- transform: translateY(10px) rotate(0deg);
+ transform: translateY(10px) rotate(0deg);
}
}
&.opened ul li {
&:first-child {
-webkit-transform: translate(0) rotate(45deg);
- transform: translate(0) rotate(45deg);
+ transform: translate(0) rotate(45deg);
}
&:nth-child(2) {
@@ -288,7 +282,7 @@ p {
&:last-child {
-webkit-transform: translate(0) rotate(-45deg);
- transform: translate(0) rotate(-45deg);
+ transform: translate(0) rotate(-45deg);
}
}
@@ -302,7 +296,9 @@ img {
width: 100%;
}
-h1, h2, strong {
+h1,
+h2,
+strong {
color: $headLineColor;
}
@@ -310,14 +306,19 @@ a {
cursor: pointer;
text-decoration: none;
color: #000;
- border-bottom: 1px solid #9636FC;
+ border-bottom: 1px solid #9636fc;
&:hover {
background-image: url("/assets/images/stripe_c40ccfac0db9e43c48e95a530d787366.png");
}
}
-h1, h2, h3, h4, h5, h6 {
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
text-decoration: underline;
color: $headLineColor;
}
@@ -417,8 +418,6 @@ pre {
padding: 1.2em;
}
-
-
//-------media queries
// @media only screen
@@ -449,17 +448,22 @@ pre {
// @Son Please merge this so we don't have
// double definitions
.tweet {
- .message, .tweettime{
- font-size: 14px;
- padding-left: 25px;
-
+ font-size: 14px;
+ padding-left: 25px;
+ .message,
+ .tweettime {
}
- .message, .tweettime, .twitter-link{
- margin-bottom: 0.75em;
+ .message,
+ .tweettime,
+ .twitter-link {
}
-
+ margin-bottom: 0.75em;
+}
+.sponsors-text {
+ font-size: 14px;
+ padding-left: 25px;
+ margin-bottom: 0.75em;
}
-
a.textgrow {
padding-left: 25px;
border: none;
@@ -481,7 +485,7 @@ a.textgrow {
height: auto;
display: inline-block;
font-weight: 700;
- span{
+ span {
// position: relative;
// padding: 0px 4px;
border-bottom: 1px solid $textColor;
diff --git a/_source/assets/images/netlify-logo-light-simple.svg b/_source/assets/images/netlify-logo-light-simple.svg
new file mode 100644
index 00000000..18496999
--- /dev/null
+++ b/_source/assets/images/netlify-logo-light-simple.svg
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/_source/assets/js/basiljs.js b/_source/assets/js/basiljs.js
index 0b8fc5b5..f3581521 100644
--- a/_source/assets/js/basiljs.js
+++ b/_source/assets/js/basiljs.js
@@ -1,43 +1,49 @@
+/* globals $ */
$(document).ready(function() {
specialChars();
createGuideLines();
// MOBILE NAVIGATION
- $('.nav-o-meter').on('click', function() {
- $(this).toggleClass('opened');
- $('.main-menu').toggle();
- $('.main-menu').find('li a').bind('click', function() {
- if ($('.nav-o-meter').hasClass('opened')) {
- $('.nav-o-meter').toggleClass('opened');
- $('.main_menu').toggle();
- }
- });
+ $(".nav-o-meter").on("click", function() {
+ $(this).toggleClass("opened");
+ $(".main-menu").toggle();
+ $(".main-menu")
+ .find("li a")
+ .bind("click", function() {
+ if ($(".nav-o-meter").hasClass("opened")) {
+ $(".nav-o-meter").toggleClass("opened");
+ $(".main_menu").toggle();
+ }
+ });
});
});
function specialChars() {
- $('a.textgrow').each(function() {
- const chars = $(this).text().split('');
+ $("a.textgrow").each(function() {
+ const chars = $(this)
+ .text()
+ .split("");
const that = $(this);
that.empty();
$.each(chars, function(i, char) {
- const fontSize = 30 - (2 * i);
- const style = `border-bottom-width: ${ (i+1) }px; font-size: ${fontSize }px; top: -${(i+(2*i))}px;`;
- that.append('
' + char + '');
+ const fontSize = 30 - 2 * i;
+ const style = `border-bottom-width: ${i +
+ 1}px; font-size: ${fontSize}px; top: -${i + 2 * i}px;`;
+ that.append('
' + char + "");
});
});
}
function createGuideLines() {
- $('.guidelines').append('
');
+ $(".guidelines").append('
');
for (var b = 0; b < 5; b++) {
- $('.bottom_lines').append('
');
+ $(".bottom_lines").append('
');
}
- $('.guidelines').append('
');
+ $(".guidelines").append('
');
for (var r = 0; r < 3; r++) {
- $('.right_lines').append('
');
+ $(".right_lines").append('
');
}
- $('.guidelines').append('
');
+ $(".guidelines").append('
');
for (var i = 0; i < 4; i++) {
- $('.page_lines').append('
');
+ $(".page_lines").append('
');
}
-}
\ No newline at end of file
+}
diff --git a/_source/assets/js/main.bundle.js b/_source/assets/js/main.bundle.js
index f7f27e32..575b1027 100644
--- a/_source/assets/js/main.bundle.js
+++ b/_source/assets/js/main.bundle.js
@@ -107,12 +107,12 @@ function specialChars() {
if (element.classList.contains('dont-decorate') !== true) {
var chars = element.innerText.split('');
element.innerHTML = null;
- chars.forEach(function (char, i) {
+ chars.forEach(function (_char, i) {
var fontSize = 30 - 2 * i;
var style = "border-bottom-width: ".concat(i + 1, "px; font-size: ").concat(fontSize, "px; top: -").concat(i + 2 * i, "px;");
var node = document.createElement('span');
node.style.cssText = style;
- var content = document.createTextNode(char);
+ var content = document.createTextNode(_char);
node.appendChild(content);
element.appendChild(node);
});
@@ -134,13 +134,13 @@ function specialChars() {
element.innerHTML = null;
var minfs = 16;
var decr = (fs - minfs) / chars.length;
- chars.forEach(function (char, i) {
+ chars.forEach(function (_char2, i) {
fs -= decr;
var style = "border-bottom-width: ".concat(2 / i, "px; font-size: ").concat(fs, "px; top: -").concat(i, "px;");
var node = document.createElement('span');
node.className = 'textshrink-item';
node.style.cssText = style;
- var content = document.createTextNode(char);
+ var content = document.createTextNode(_char2);
node.appendChild(content);
element.appendChild(node);
});
@@ -528,21 +528,9 @@ module.exports = _toConsumableArray;
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
-/* WEBPACK VAR INJECTION */(function(global) {var require;var require;/*! p5.js v0.7.2 September 02, 2018 */ !function(a){if(true)module.exports=a();else { var b; }}(function(){var a;return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return require(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c||a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g
0)throw new Error("Invalid string. Length must be a multiple of 4");var k=a.length;i="="===a.charAt(k-2)?2:"="===a.charAt(k-1)?1:0,j=new e(3*a.length/4-i),g=i>0?a.length-4:a.length;var l=0;for(d=0,f=0;d>16),c((65280&h)>>8),c(255&h);return 2===i?(h=b(a.charAt(d))<<2|b(a.charAt(d+1))>>4,c(255&h)):1===i&&(h=b(a.charAt(d))<<10|b(a.charAt(d+1))<<4|b(a.charAt(d+2))>>2,c(h>>8&255),c(255&h)),j}function d(a){function b(a){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(a)}function c(a){return b(a>>18&63)+b(a>>12&63)+b(a>>6&63)+b(63&a)}var d,e,f,g=a.length%3,h="";for(d=0,f=a.length-g;d>2),h+=b(e<<4&63),h+="==";break;case 2:e=(a[a.length-2]<<8)+a[a.length-1],h+=b(e>>10),h+=b(e>>4&63),h+=b(e<<2&63),h+="="}return h}var e="undefined"!=typeof Uint8Array?Uint8Array:Array,f="+".charCodeAt(0),g="/".charCodeAt(0),h="0".charCodeAt(0),i="a".charCodeAt(0),j="A".charCodeAt(0),k="-".charCodeAt(0),l="_".charCodeAt(0);a.toByteArray=c,a.fromByteArray=d}(void 0===c?this.base64js={}:c)},{}],2:[function(a,b,c){},{}],3:[function(a,b,c){(function(b){"use strict";function d(){function a(){}try{var b=new Uint8Array(1);return b.foo=function(){return 42},b.constructor=a,42===b.foo()&&b.constructor===a&&"function"==typeof b.subarray&&0===b.subarray(1,1).byteLength}catch(a){return!1}}function e(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function f(a){return this instanceof f?(f.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof a?g(this,a):"string"==typeof a?h(this,a,arguments.length>1?arguments[1]:"utf8"):i(this,a)):arguments.length>1?new f(a,arguments[1]):new f(a)}function g(a,b){if(a=p(a,b<0?0:0|q(b)),!f.TYPED_ARRAY_SUPPORT)for(var c=0;c>>1&&(a.parent=Z),a}function q(a){if(a>=e())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+e().toString(16)+" bytes");return 0|a}function r(a,b){if(!(this instanceof r))return new r(a,b);var c=new f(a,b);return delete c.parent,c}function s(a,b){"string"!=typeof a&&(a=""+a);var c=a.length;if(0===c)return 0;for(var d=!1;;)switch(b){case"ascii":case"binary":case"raw":case"raws":return c;case"utf8":case"utf-8":return R(a).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*c;case"hex":return c>>>1;case"base64":return U(a).length;default:if(d)return R(a).length;b=(""+b).toLowerCase(),d=!0}}function t(a,b,c){var d=!1;if(b|=0,c=void 0===c||c===1/0?this.length:0|c,a||(a="utf8"),b<0&&(b=0),c>this.length&&(c=this.length),c<=b)return"";for(;;)switch(a){case"hex":return F(this,b,c);case"utf8":case"utf-8":return B(this,b,c);case"ascii":return D(this,b,c);case"binary":return E(this,b,c);case"base64":return A(this,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,b,c);default:if(d)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase(),d=!0}}function u(a,b,c,d){c=Number(c)||0;var e=a.length-c;d?(d=Number(d))>e&&(d=e):d=e;var f=b.length;if(f%2!=0)throw new Error("Invalid hex string");d>f/2&&(d=f/2);for(var g=0;g239?4:f>223?3:f>191?2:1;if(e+h<=c){var i,j,k,l;switch(h){case 1:f<128&&(g=f);break;case 2:i=a[e+1],128==(192&i)&&(l=(31&f)<<6|63&i)>127&&(g=l);break;case 3:i=a[e+1],j=a[e+2],128==(192&i)&&128==(192&j)&&(l=(15&f)<<12|(63&i)<<6|63&j)>2047&&(l<55296||l>57343)&&(g=l);break;case 4:i=a[e+1],j=a[e+2],k=a[e+3],128==(192&i)&&128==(192&j)&&128==(192&k)&&(l=(15&f)<<18|(63&i)<<12|(63&j)<<6|63&k)>65535&&l<1114112&&(g=l)}}null===g?(g=65533,h=1):g>65535&&(g-=65536,d.push(g>>>10&1023|55296),g=56320|1023&g),d.push(g),e+=h}return C(d)}function C(a){var b=a.length;if(b<=$)return String.fromCharCode.apply(String,a);for(var c="",d=0;dd)&&(c=d);for(var e="",f=b;fc)throw new RangeError("Trying to access beyond buffer length")}function I(a,b,c,d,e,g){if(!f.isBuffer(a))throw new TypeError("buffer must be a Buffer instance");if(b>e||ba.length)throw new RangeError("index out of range")}function J(a,b,c,d){b<0&&(b=65535+b+1);for(var e=0,f=Math.min(a.length-c,2);e>>8*(d?e:1-e)}function K(a,b,c,d){b<0&&(b=4294967295+b+1);for(var e=0,f=Math.min(a.length-c,4);e>>8*(d?e:3-e)&255}function L(a,b,c,d,e,f){if(b>e||ba.length)throw new RangeError("index out of range");if(c<0)throw new RangeError("index out of range")}function M(a,b,c,d,e){return e||L(a,b,c,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(a,b,c,d,23,4),c+4}function N(a,b,c,d,e){return e||L(a,b,c,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(a,b,c,d,52,8),c+8}function O(a){if(a=P(a).replace(aa,""),a.length<2)return"";for(;a.length%4!=0;)a+="=";return a}function P(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function Q(a){return a<16?"0"+a.toString(16):a.toString(16)}function R(a,b){b=b||1/0;for(var c,d=a.length,e=null,f=[],g=0;g55295&&c<57344){if(!e){if(c>56319){(b-=3)>-1&&f.push(239,191,189);continue}if(g+1===d){(b-=3)>-1&&f.push(239,191,189);continue}e=c;continue}if(c<56320){(b-=3)>-1&&f.push(239,191,189),e=c;continue}c=65536+(e-55296<<10|c-56320)}else e&&(b-=3)>-1&&f.push(239,191,189);if(e=null,c<128){if((b-=1)<0)break;f.push(c)}else if(c<2048){if((b-=2)<0)break;f.push(c>>6|192,63&c|128)}else if(c<65536){if((b-=3)<0)break;f.push(c>>12|224,c>>6&63|128,63&c|128)}else{if(!(c<1114112))throw new Error("Invalid code point");if((b-=4)<0)break;f.push(c>>18|240,c>>12&63|128,c>>6&63|128,63&c|128)}}return f}function S(a){for(var b=[],c=0;c>8,e=c%256,f.push(e),f.push(d);return f}function U(a){return W.toByteArray(O(a))}function V(a,b,c,d){for(var e=0;e=b.length||e>=a.length);e++)b[e+c]=a[e];return e}var W=a("base64-js"),X=a("ieee754"),Y=a("isarray");c.Buffer=f,c.SlowBuffer=r,c.INSPECT_MAX_BYTES=50,f.poolSize=8192;var Z={};f.TYPED_ARRAY_SUPPORT=void 0!==b.TYPED_ARRAY_SUPPORT?b.TYPED_ARRAY_SUPPORT:d(),f.TYPED_ARRAY_SUPPORT?(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array):(f.prototype.length=void 0,f.prototype.parent=void 0),f.isBuffer=function(a){return!(null==a||!a._isBuffer)},f.compare=function(a,b){if(!f.isBuffer(a)||!f.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var c=a.length,d=b.length,e=0,g=Math.min(c,d);e0&&(a=this.toString("hex",0,b).match(/.{2}/g).join(" "),this.length>b&&(a+=" ... ")),""},f.prototype.compare=function(a){if(!f.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?0:f.compare(this,a)},f.prototype.indexOf=function(a,b){function c(a,b,c){for(var d=-1,e=0;c+e2147483647?b=2147483647:b<-2147483648&&(b=-2147483648),b>>=0,0===this.length)return-1;if(b>=this.length)return-1;if(b<0&&(b=Math.max(this.length+b,0)),"string"==typeof a)return 0===a.length?-1:String.prototype.indexOf.call(this,a,b);if(f.isBuffer(a))return c(this,a,b);if("number"==typeof a)return f.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,a,b):c(this,[a],b);throw new TypeError("val must be string, number or Buffer")},f.prototype.get=function(a){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(a)},f.prototype.set=function(a,b){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(a,b)},f.prototype.write=function(a,b,c,d){if(void 0===b)d="utf8",c=this.length,b=0;else if(void 0===c&&"string"==typeof b)d=b,c=this.length,b=0;else if(isFinite(b))b|=0,isFinite(c)?(c|=0,void 0===d&&(d="utf8")):(d=c,c=void 0);else{var e=d;d=b,b=0|c,c=e}var f=this.length-b;if((void 0===c||c>f)&&(c=f),a.length>0&&(c<0||b<0)||b>this.length)throw new RangeError("attempt to write outside buffer bounds");d||(d="utf8");for(var g=!1;;)switch(d){case"hex":return u(this,a,b,c);case"utf8":case"utf-8":return v(this,a,b,c);case"ascii":return w(this,a,b,c);case"binary":return x(this,a,b,c);case"base64":return y(this,a,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,a,b,c);default:if(g)throw new TypeError("Unknown encoding: "+d);d=(""+d).toLowerCase(),g=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;f.prototype.slice=function(a,b){var c=this.length;a=~~a,b=void 0===b?c:~~b,a<0?(a+=c)<0&&(a=0):a>c&&(a=c),b<0?(b+=c)<0&&(b=0):b>c&&(b=c),b0&&(e*=256);)d+=this[a+--b]*e;return d},f.prototype.readUInt8=function(a,b){return b||H(a,1,this.length),this[a]},f.prototype.readUInt16LE=function(a,b){return b||H(a,2,this.length),this[a]|this[a+1]<<8},f.prototype.readUInt16BE=function(a,b){return b||H(a,2,this.length),this[a]<<8|this[a+1]},f.prototype.readUInt32LE=function(a,b){return b||H(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+16777216*this[a+3]},f.prototype.readUInt32BE=function(a,b){return b||H(a,4,this.length),16777216*this[a]+(this[a+1]<<16|this[a+2]<<8|this[a+3])},f.prototype.readIntLE=function(a,b,c){a|=0,b|=0,c||H(a,b,this.length);for(var d=this[a],e=1,f=0;++f=e&&(d-=Math.pow(2,8*b)),d},f.prototype.readIntBE=function(a,b,c){a|=0,b|=0,c||H(a,b,this.length);for(var d=b,e=1,f=this[a+--d];d>0&&(e*=256);)f+=this[a+--d]*e;return e*=128,f>=e&&(f-=Math.pow(2,8*b)),f},f.prototype.readInt8=function(a,b){return b||H(a,1,this.length),128&this[a]?-1*(255-this[a]+1):this[a]},f.prototype.readInt16LE=function(a,b){b||H(a,2,this.length);var c=this[a]|this[a+1]<<8;return 32768&c?4294901760|c:c},f.prototype.readInt16BE=function(a,b){b||H(a,2,this.length);var c=this[a+1]|this[a]<<8;return 32768&c?4294901760|c:c},f.prototype.readInt32LE=function(a,b){return b||H(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},f.prototype.readInt32BE=function(a,b){return b||H(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},f.prototype.readFloatLE=function(a,b){return b||H(a,4,this.length),X.read(this,a,!0,23,4)},f.prototype.readFloatBE=function(a,b){return b||H(a,4,this.length),X.read(this,a,!1,23,4)},f.prototype.readDoubleLE=function(a,b){return b||H(a,8,this.length),X.read(this,a,!0,52,8)},f.prototype.readDoubleBE=function(a,b){return b||H(a,8,this.length),X.read(this,a,!1,52,8)},f.prototype.writeUIntLE=function(a,b,c,d){a=+a,b|=0,c|=0,d||I(this,a,b,c,Math.pow(2,8*c),0);var e=1,f=0;for(this[b]=255&a;++f=0&&(f*=256);)this[b+e]=a/f&255;return b+c},f.prototype.writeUInt8=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,1,255,0),f.TYPED_ARRAY_SUPPORT||(a=Math.floor(a)),this[b]=255&a,b+1},f.prototype.writeUInt16LE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[b]=255&a,this[b+1]=a>>>8):J(this,a,b,!0),b+2},f.prototype.writeUInt16BE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=255&a):J(this,a,b,!1),b+2},f.prototype.writeUInt32LE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[b+3]=a>>>24,this[b+2]=a>>>16,this[b+1]=a>>>8,this[b]=255&a):K(this,a,b,!0),b+4},f.prototype.writeUInt32BE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=255&a):K(this,a,b,!1),b+4},f.prototype.writeIntLE=function(a,b,c,d){if(a=+a,b|=0,!d){var e=Math.pow(2,8*c-1);I(this,a,b,c,e-1,-e)}var f=0,g=1,h=a<0?1:0;for(this[b]=255&a;++f>0)-h&255;return b+c},f.prototype.writeIntBE=function(a,b,c,d){if(a=+a,b|=0,!d){var e=Math.pow(2,8*c-1);I(this,a,b,c,e-1,-e)}var f=c-1,g=1,h=a<0?1:0;for(this[b+f]=255&a;--f>=0&&(g*=256);)this[b+f]=(a/g>>0)-h&255;return b+c},f.prototype.writeInt8=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,1,127,-128),f.TYPED_ARRAY_SUPPORT||(a=Math.floor(a)),a<0&&(a=255+a+1),this[b]=255&a,b+1},f.prototype.writeInt16LE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[b]=255&a,this[b+1]=a>>>8):J(this,a,b,!0),b+2},f.prototype.writeInt16BE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=255&a):J(this,a,b,!1),b+2},f.prototype.writeInt32LE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[b]=255&a,this[b+1]=a>>>8,this[b+2]=a>>>16,this[b+3]=a>>>24):K(this,a,b,!0),b+4},f.prototype.writeInt32BE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,4,2147483647,-2147483648),a<0&&(a=4294967295+a+1),f.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=255&a):K(this,a,b,!1),b+4},f.prototype.writeFloatLE=function(a,b,c){return M(this,a,b,!0,c)},f.prototype.writeFloatBE=function(a,b,c){return M(this,a,b,!1,c)},f.prototype.writeDoubleLE=function(a,b,c){return N(this,a,b,!0,c)},f.prototype.writeDoubleBE=function(a,b,c){return N(this,a,b,!1,c)},f.prototype.copy=function(a,b,c,d){if(c||(c=0),d||0===d||(d=this.length),b>=a.length&&(b=a.length),b||(b=0),d>0&&d=this.length)throw new RangeError("sourceStart out of bounds");if(d<0)throw new RangeError("sourceEnd out of bounds");d>this.length&&(d=this.length),a.length-b=0;e--)a[e+b]=this[e+c];else if(g<1e3||!f.TYPED_ARRAY_SUPPORT)for(e=0;e=this.length)throw new RangeError("start out of bounds");if(c<0||c>this.length)throw new RangeError("end out of bounds");var d;if("number"==typeof a)for(d=b;d>1,k=-7,l=c?e-1:0,m=c?-1:1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?NaN:1/0*(n?-1:1);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.write=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?0:f-1,o=d?1:-1,p=b<0||0===b&&1/b<0?1:0;for(b=Math.abs(b),isNaN(b)||b===1/0?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],8:[function(a,b,c){var d={}.toString;b.exports=Array.isArray||function(a){return"[object Array]"==d.call(a)}},{}],9:[function(a,b,c){"use strict";function d(a,b){return a.b===b.b&&a.a===b.a}function e(a,b){return a.ba?0:a,c=0>c?0:c,a<=c?0===c?(b+d)/2:b+a/(a+c)*(d-b):d+c/(a+c)*(b-d)}function n(a){var b=s(a.b);return u(b,a.c),u(b.b,a.c),v(b,a.a),b}function o(a,b){var c=!1,d=!1;a!==b&&(b.a!==a.a&&(d=!0,x(b.a,a.a)),b.d!==a.d&&(c=!0,y(b.d,a.d)),t(b,a),d||(u(b,a.a),a.a.c=a),c||(v(b,a.d),a.d.a=a))}function p(a){var b=a.b,c=!1;a.d!==a.b.d&&(c=!0,y(a.d,a.b.d)),a.c===a?x(a.a,null):(a.b.d.a=$(a),a.a.c=a.c,t(a,$(a)),c||v(a,a.d)),b.c===b?(x(b.a,null),y(b.d,null)):(a.d.a=$(b),b.a.c=b.c,t(b,$(b))),w(a)}function q(a){var b=s(a),c=b.b;return t(b,a.e),b.a=a.b.a,u(c,b.a),b.d=c.d=a.d,b=b.b,t(a.b,$(a.b)),t(a.b,b),a.b.a=b.a,b.b.a.c=b.b,b.b.d=a.b.d,b.f=a.f,b.b.f=a.b.f,b}function r(a,b){var c=!1,d=s(a),e=d.b;return b.d!==a.d&&(c=!0,y(b.d,a.d)),t(d,a.e),t(e,b),d.a=a.b.a,e.a=b.a,d.d=e.d=a.d,a.d.a=e,c||v(d,a.d),d}function s(a){var b=new Z,c=new Z,d=a.b.h;return c.h=d,d.b.h=b,b.h=a,a.b.h=c,b.b=c,b.c=b,b.e=c,c.b=b,c.c=c,c.e=b}function t(a,b){var c=a.c,d=b.c;c.b.e=b,d.b.e=a,a.c=d,b.c=c}function u(a,b){var c=b.f,d=new aa(b,c);c.e=d,b.f=d,c=d.c=a;do{c.a=d,c=c.c}while(c!==a)}function v(a,b){var c=b.d,d=new Y(b,c);c.b=d,b.d=d,d.a=a,d.c=b.c,c=a;do{c.d=d,c=c.e}while(c!==a)}function w(a){var b=a.h;a=a.b.h,b.b.h=a,a.b.h=b}function x(a,b){var c=a.c,d=c;do{d.a=b,d=d.c}while(d!==c);c=a.f,d=a.e,d.f=c,c.e=d}function y(a,b){var c=a.a,d=c;do{d.d=b,d=d.e}while(d!==c);c=a.d,d=a.b,d.d=c,c.b=d}function z(a){var b=0;return Math.abs(a[1])>Math.abs(a[0])&&(b=1),Math.abs(a[2])>Math.abs(a[b])&&(b=2),b}function A(a,b){a.f+=b.f,a.b.f+=b.b.f}function B(a,b,c){return a=a.a,b=b.a,c=c.a,b.b.a===a?c.b.a===a?e(b.a,c.a)?0>=g(c.b.a,b.a,c.a):0<=g(b.b.a,c.a,b.a):0>=g(c.b.a,a,c.a):c.b.a===a?0<=g(b.b.a,a,b.a):(b=f(b.b.a,a,b.a),a=f(c.b.a,a,c.a),b>=a)}function C(a){a.a.i=null;var b=a.e;b.a.c=b.c,b.c.a=b.a,a.e=null}function D(a,b){p(a.a),a.c=!1,a.a=b,b.i=a}function E(a){var b=a.a.a;do{a=oa(a)}while(a.a.a===b);return a.c&&(b=r(na(a).a.b,a.a.e),D(a,b),a=oa(a)),a}function F(a,b,c){var d=new ma;return d.a=c,d.e=T(a.f,b.e,d),c.i=d}function G(a,b){switch(a.s){case 100130:return 0!=(1&b);case 100131:return 0!==b;case 100132:return 0b;case 100134:return 2<=b||-2>=b}return!1}function H(a){var b=a.a,c=b.d;c.c=a.d,c.a=b,C(a)}function I(a,b,c){for(a=b,b=b.a;a!==c;){a.c=!1;var d=na(a),e=d.a;if(e.a!==b.a){if(!d.c){H(a);break}e=r(b.c.b,e.b),D(d,e)}b.c!==e&&(o($(e),e),o(b,e)),H(a),b=d.a,a=d}return b}function J(a,b,c,d,e,f){var g=!0;do{F(a,b,c.b),c=c.c}while(c!==d);for(null===e&&(e=na(b).a.b.c);d=na(b),c=d.a.b,c.a===e.a;)c.c!==e&&(o($(c),c),o($(e),c)),d.f=b.f-c.f,d.d=G(a,d.f),b.b=!0,!g&&N(a,b)&&(A(c,e),C(b),p(e)),g=!1,b=d,e=c;b.b=!0,f&&P(a,b)}function K(a,b,c,d,e){var f=[b.g[0],b.g[1],b.g[2]];b.d=null,b.d=a.o?a.o(f,c,d,a.c)||null:null,null===b.d&&(e?a.n||(X(a,100156),a.n=!0):b.d=c[0])}function L(a,b,c){var d=[null,null,null,null];d[0]=b.a.d,d[1]=c.a.d,K(a,b.a,d,[.5,.5,0,0],!1),o(b,c)}function M(a,b,c,d,e){var f=Math.abs(b.b-a.b)+Math.abs(b.a-a.a),g=Math.abs(c.b-a.b)+Math.abs(c.a-a.a),h=e+1;d[e]=.5*g/(f+g),d[h]=.5*f/(f+g),a.g[0]+=d[e]*b.g[0]+d[h]*c.g[0],a.g[1]+=d[e]*b.g[1]+d[h]*c.g[1],a.g[2]+=d[e]*b.g[2]+d[h]*c.g[2]}function N(a,b){var c=na(b),f=b.a,h=c.a;if(e(f.a,h.a)){if(0=m?ka(c,m):e(k[j[m>>1]],k[j[m]])?ka(c,m):la(c,m)),k[i]=null,l[i]=c.b,c.b=i}else for(c.c[-(i+1)]=null;0g(f.b.a,h.a,f.a))return!1;oa(b).b=b.b=!0,q(f.b),o($(h),f)}return!0}function O(a,b){var c=na(b),k=b.a,l=c.a,n=k.a,p=l.a,r=k.b.a,s=l.b.a,t=new aa;if(g(r,a.a,n),g(s,a.a,p),n===p||Math.min(n.a,r.a)>Math.max(p.a,s.a))return!1;if(e(n,p)){if(0g(r,p,n))return!1;var u,v,w=r,x=n,y=s,z=p;if(e(w,x)||(u=w,w=x,x=u),e(y,z)||(u=y,y=z,z=u),e(w,y)||(u=w,w=y,y=u,u=x,x=z,z=u),e(y,x)?e(x,z)?(u=f(w,y,x),v=f(y,x,z),0>u+v&&(u=-u,v=-v),t.b=m(u,y.b,v,x.b)):(u=g(w,y,x),v=-g(w,z,x),0>u+v&&(u=-u,v=-v),t.b=m(u,y.b,v,z.b)):t.b=(y.b+x.b)/2,h(w,x)||(u=w,w=x,x=u),h(y,z)||(u=y,y=z,z=u),h(w,y)||(u=w,w=y,y=u,u=x,x=z,z=u),h(y,x)?h(x,z)?(u=i(w,y,x),v=i(y,x,z),0>u+v&&(u=-u,v=-v),t.a=m(u,y.a,v,x.a)):(u=j(w,y,x),v=-j(w,z,x),0>u+v&&(u=-u,v=-v),t.a=m(u,y.a,v,z.a)):t.a=(y.a+x.a)/2,e(t,a.a)&&(t.b=a.a.b,t.a=a.a.a),w=e(n,p)?n:p,e(w,t)&&(t.b=w.b,t.a=w.a),d(t,n)||d(t,p))return N(a,b),!1;if(!d(r,a.a)&&0<=g(r,a.a,t)||!d(s,a.a)&&0>=g(s,a.a,t)){if(s===a.a)return q(k.b),o(l.b,k),b=E(b),k=na(b).a,I(a,na(b),c),J(a,b,$(k),k,k,!0),!0;if(r===a.a){q(l.b),o(k.e,$(l)),n=c=b,p=n.a.b.a;do{n=oa(n)}while(n.a.b.a===p);return b=n,n=na(b).a.b.c,c.a=$(l),l=I(a,c,null),J(a,b,l.c,k.b.c,n,!0),!0}return 0<=g(r,a.a,t)&&(oa(b).b=b.b=!0,q(k.b),k.a.b=a.a.b,k.a.a=a.a.a),0>=g(s,a.a,t)&&(b.b=c.b=!0,q(l.b),l.a.b=a.a.b,l.a.a=a.a.a),!1}return q(k.b),q(l.b),o($(l),k),k.a.b=t.b,k.a.a=t.a,k.a.h=da(a.e,k.a),k=k.a,l=[0,0,0,0],t=[n.d,r.d,p.d,s.d],k.g[0]=k.g[1]=k.g[2]=0,M(k,n,r,l,0),M(k,p,s,l,2),K(a,k,t,l,!0),oa(b).b=b.b=c.b=!0,!1}function P(a,b){for(var c=na(b);;){for(;c.b;)b=c,c=na(c);if(!b.b&&(c=b,null===(b=oa(b))||!b.b))break;b.b=!1;var d,f=b.a,h=c.a;if(d=f.b.a!==h.b.a)a:{d=b;var i=na(d),j=d.a,k=i.a,l=void 0;if(e(j.b.a,k.b.a)){if(0>g(j.b.a,k.b.a,j.a)){d=!1;break a}oa(d).b=d.b=!0,l=q(j),o(k.b,l),l.d.c=d.d}else{if(0c.f&&(c.f*=2,c.c=ga(c.c,c.f+1));var e;return 0===c.b?e=d:(e=c.b,c.b=c.c[c.b]),c.e[e]=b,c.c[e]=d,c.d[d]=e,c.h&&la(c,d),e}return c=a.a++,a.c[c]=b,-(c+1)}function ea(a){if(0===a.a)return ja(a.b);var b=a.c[a.d[a.a-1]];if(0!==a.b.a&&e(ia(a.b),b))return ja(a.b);do{--a.a}while(0a.a||e(d[h],d[j])){c[g]=h,f[h]=g;break}c[g]=j,f[j]=g,g=i}}function la(a,b){for(var c=a.d,d=a.e,f=a.c,g=b,h=c[g];;){var i=g>>1,j=c[i];if(0===i||e(d[j],d[h])){c[g]=h,f[h]=g;break}c[g]=j,f[j]=g,g=i}}function ma(){this.e=this.a=null,this.f=0,this.c=this.b=this.h=this.d=!1}function na(a){return a.e.c.b}function oa(a){return a.e.a.b}var pa,qa=4e150,ra=0;pa=V.prototype,pa.x=function(){W(this,ra)},pa.B=function(a,b){switch(a){case 100142:return;case 100140:switch(b){case 100130:case 100131:case 100132:case 100133:case 100134:return void(this.s=b)}break;case 100141:return void(this.m=!!b);default:return void X(this,100900)}X(this,100901)},pa.y=function(a){switch(a){case 100142:return 0;case 100140:return this.s;case 100141:return this.m;default:X(this,100900)}return!1},pa.A=function(a,b,c){this.j[0]=a,this.j[1]=b,this.j[2]=c},pa.z=function(a,b){var c=b||null;switch(a){case 100100:case 100106:this.h=c;break;case 100104:case 100110:this.l=c;break;case 100101:case 100107:this.k=c;break;case 100102:case 100108:this.i=c;break;case 100103:case 100109:this.p=c;break;case 100105:case 100111:this.o=c;break;case 100112:this.r=c;break;default:X(this,100900)}},pa.C=function(a,b){var c=!1,d=[0,0,0];W(this,2);for(var e=0;3>e;++e){var f=a[e];-1e150>f&&(f=-1e150,c=!0),1e150m;++m){var n=a.g[m];nb[m]&&(b[m]=n,c[m]=a)}if(a=0,b[1]-i[1]>b[0]-i[0]&&(a=1),b[2]-i[2]>b[a]-i[a]&&(a=2),i[a]>=b[a])h[0]=0,h[1]=0,h[2]=1;else{for(b=0,i=j[a],c=c[a],j=[0,0,0],i=[i.g[0]-c.g[0],i.g[1]-c.g[1],i.g[2]-c.g[2]],m=[0,0,0],a=f.e;a!==f;a=a.e)m[0]=a.g[0]-c.g[0],m[1]=a.g[1]-c.g[1],m[2]=a.g[2]-c.g[2],j[0]=i[1]*m[2]-i[2]*m[1],j[1]=i[2]*m[0]-i[0]*m[2],j[2]=i[0]*m[1]-i[1]*m[0],(n=j[0]*j[0]+j[1]*j[1]+j[2]*j[2])>b&&(b=n,h[0]=j[0],h[1]=j[1],h[2]=j[2]);0>=b&&(h[0]=h[1]=h[2]=0,h[z(i)]=1)}f=!0}for(j=z(h),a=this.b.c,b=(j+1)%3,c=(j+2)%3,j=0=b.f))do{h+=(b.a.b-b.b.a.b)*(b.a.a+b.b.a.a),b=b.e}while(b!==a.a);if(0>h)for(h=this.b.c,f=h.e;f!==h;f=f.e)f.a=-f.a}for(this.n=!1,h=this.b.b,a=h.h;a!==h;a=f)f=a.h,b=a.e,d(a.a,a.b.a)&&a.e.e!==a&&(L(this,b,a),p(a),a=b,b=a.e),b.e===a&&(b!==a&&(b!==f&&b!==f.b||(f=f.h),p(b)),a!==f&&a!==f.b||(f=f.h),p(a));for(this.e=h=new ba,f=this.b.c,a=f.e;a!==f;a=a.e)a.h=da(h,a);for(ca(h),this.f=new S(this),R(this,-qa),R(this,qa);null!==(h=ea(this.e));){for(;;){a:if(a=this.e,0===a.a)f=ia(a.b);else if(f=a.c[a.d[a.a-1]],0!==a.b.a&&(a=ia(a.b),e(a,f))){f=a;break a}if(null===f||!d(f,h))break;f=ea(this.e),L(this,h.c,f.c)}Q(this,h)}for(this.a=this.f.a.a.b.a.a,h=0;null!==(f=this.f.a.a.b);)f.h||++h,C(f);for(this.f=null,h=this.e,h.b=null,h.d=null,this.e=h.c=null,h=this.b,a=h.a.b;a!==h.a;a=f)f=a.b,a=a.a,a.e.e===a&&(A(a.c,a),p(a));if(!this.n){if(h=this.b,this.m)for(a=h.b.h;a!==h.b;a=f)f=a.h,a.b.d.c!==a.d.c?a.f=a.d.c?1:-1:p(a);else for(a=h.a.b;a!==h.a;a=f)if(f=a.b,a.c){for(a=a.a;e(a.b.a,a.a);a=a.c.b);for(;e(a.a,a.b.a);a=a.e);for(b=a.c.b,c=void 0;a.e!==b;)if(e(a.b.a,b.a)){for(;b.e!==a&&(k(b.e)||0>=g(b.a,b.b.a,b.e.b.a));)c=r(b.e,b),b=c.b;b=b.c.b}else{for(;b.e!==a&&(l(a.c.b)||0<=g(a.b.a,a.a,a.c.b.a));)c=r(a,a.c.b),a=c.b;a=a.e}for(;b.e.e!==a;)c=r(b.e,b),b=c.b}if(this.h||this.i||this.k||this.l)if(this.m){for(h=this.b,f=h.a.b;f!==h.a;f=f.b)if(f.c){this.h&&this.h(2,this.c),a=f.a;do{this.k&&this.k(a.a.d,this.c),a=a.e}while(a!==f.a);this.i&&this.i(this.c)}}else{for(h=this.b,f=!!this.l,a=!1,b=-1,c=h.a.d;c!==h.a;c=c.d)if(c.c){a||(this.h&&this.h(4,this.c),a=!0),j=c.a;do{f&&(i=j.b.d.c?0:1,b!==i&&(b=i,this.l&&this.l(!!b,this.c))),this.k&&this.k(j.a.d,this.c),j=j.e}while(j!==c.a)}a&&this.i&&this.i(this.c)}if(this.r){for(h=this.b,a=h.a.b;a!==h.a;a=f)if(f=a.b,!a.c){b=a.a,c=b.e,j=void 0;do{j=c,c=j.e,j.d=null,null===j.b.d&&(j.c===j?x(j.a,null):(j.a.c=j.c,t(j,$(j))),i=j.b,i.c===i?x(i.a,null):(i.a.c=i.c,t(i,$(i))),w(j))}while(j!==b);b=a.d,a=a.b,a.d=b,b.b=a}return this.r(this.b),void(this.c=this.b=null)}}this.b=this.c=null},this.libtess={GluTesselator:V,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}},V.prototype.gluDeleteTess=V.prototype.x,V.prototype.gluTessProperty=V.prototype.B,V.prototype.gluGetTessProperty=V.prototype.y,V.prototype.gluTessNormal=V.prototype.A,V.prototype.gluTessCallback=V.prototype.z,V.prototype.gluTessVertex=V.prototype.C,V.prototype.gluTessBeginPolygon=V.prototype.u,V.prototype.gluTessBeginContour=V.prototype.t,V.prototype.gluTessEndContour=V.prototype.v,V.prototype.gluTessEndPolygon=V.prototype.w,void 0!==b&&(b.exports=this.libtess)},{}],10:[function(b,c,d){(function(e){!function(b,e){"object"==typeof d&&void 0!==c?e(d):"function"==typeof a&&a.amd?a(["exports"],e):e(b.opentype={})}(this,function(a){"use strict";function c(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function d(a,b){this.source=a,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=b,this.destLen=0,this.ltree=new c,this.dtree=new c}function f(a,b,c,d){var e,f;for(e=0;e>>=1,b}function j(a,b,c){if(!b)return c;for(;a.bitcount<24;)a.tag|=a.source[a.sourceIndex++]<>>16-b;return a.tag>>>=b,a.bitcount-=b,d+c}function k(a,b){for(;a.bitcount<24;)a.tag|=a.source[a.sourceIndex++]<>>=1,++e,c+=b.table[e],d-=b.table[e]}while(d>=0);return a.tag=f,a.bitcount-=e,b.trans[c+d]}function l(a,b,c){var d,e,f,g,i,l;for(d=j(a,5,257),e=j(a,5,1),f=j(a,4,4),g=0;g<19;++g)ue[g]=0;for(g=0;g8;)a.sourceIndex--,a.bitcount-=8;if(b=a.source[a.sourceIndex+1],b=256*b+a.source[a.sourceIndex],c=a.source[a.sourceIndex+3],c=256*c+a.source[a.sourceIndex+2],b!==(65535&~c))return le;for(a.sourceIndex+=4,d=b;d;--d)a.dest[a.destLen++]=a.source[a.sourceIndex++];return a.bitcount=0,ke}function o(a,b){var c,e,f=new d(a,b);do{switch(c=i(f),j(f,2,0)){case 0:e=n(f);break;case 1:e=m(f,me,ne);break;case 2:l(f,f.ltree,f.dtree),e=m(f,f.ltree,f.dtree);break;default:e=le}if(e!==ke)throw new Error("Data error")}while(!c);return f.destLen=-128&&a<=127}function w(a,b,c){for(var d=0,e=a.length;b>8&255,i+256&255)}return f}function z(a,b,c){for(var d=this,e=0;e>1,b.skip("uShort",3),a.glyphIndexMap={};for(var g=new Le.Parser(c,d+e+14),h=new Le.Parser(c,d+e+16+2*f),i=new Le.Parser(c,d+e+16+4*f),j=new Le.Parser(c,d+e+16+6*f),k=d+e+16+8*f,l=0;l=0;e-=1){var f=Le.getUShort(a,b+4+8*e),g=Le.getUShort(a,b+4+8*e+2);if(3===f&&(0===g||1===g||10===g)||0===f&&(0===g||1===g||2===g||3===g||4===g)){d=Le.getULong(a,b+4+8*e+4);break}}if(-1===d)throw new Error("No valid cmap sub-tables found.");var h=new Le.Parser(a,b+d);if(c.format=h.parseUShort(),12===c.format)R(c,h);else{if(4!==c.format)throw new Error("Only format 4 and 12 cmap tables are supported (found format "+c.format+").");S(c,h,a,b,d)}return c}function U(a,b,c){a.segments.push({end:b,start:b,delta:-(b-c),offset:0,glyphIndex:c})}function V(a){a.segments.push({end:65535,start:65535,delta:1,offset:0})}function W(a){var b,c=!0;for(b=a.length-1;b>0;b-=1){if(a.get(b).unicode>65535){console.log("Adding CMAP format 12 (needed!)"),c=!1;break}}var d=[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:c?1:2},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:c?12:20}];c||(d=d.concat([{name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}])),d=d.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}]);var e=new Ie.Table("cmap",d);for(e.segments=[],b=0;b>4,g=15&e;if(f===c)break;if(b+=d[f],g===c)break;b+=d[g]}return parseFloat(b)}function ma(a,b){var c,d,e,f;if(28===b)return c=a.parseByte(),d=a.parseByte(),c<<8|d;if(29===b)return c=a.parseByte(),d=a.parseByte(),e=a.parseByte(),f=a.parseByte(),c<<24|d<<16|e<<8|f;if(30===b)return la(a);if(b>=32&&b<=246)return b-139;if(b>=247&&b<=250)return c=a.parseByte(),256*(b-247)+c+108;if(b>=251&&b<=254)return c=a.parseByte(),256*-(b-251)-c-108;throw new Error("Invalid b0 "+b)}function na(a){for(var b={},c=0;c>1,p.length=0,s=!0}function f(c){for(var m,r,w,x,z,A,B,C,D,E,F,G,H=0;H1&&!s&&(y=p.shift()+n,s=!0),v+=p.pop(),d(u,v);break;case 5:for(;p.length>0;)u+=p.shift(),v+=p.shift(),o.lineTo(u,v);break;case 6:for(;p.length>0&&(u+=p.shift(),o.lineTo(u,v),0!==p.length);)v+=p.shift(),o.lineTo(u,v);break;case 7:for(;p.length>0&&(v+=p.shift(),o.lineTo(u,v),0!==p.length);)u+=p.shift(),o.lineTo(u,v);break;case 8:for(;p.length>0;)g=u+p.shift(),h=v+p.shift(),i=g+p.shift(),j=h+p.shift(),
-u=i+p.shift(),v=j+p.shift(),o.curveTo(g,h,i,j,u,v);break;case 10:z=p.pop()+l,A=k[z],A&&f(A);break;case 11:return;case 12:switch(I=c[H],H+=1,I){case 35:g=u+p.shift(),h=v+p.shift(),i=g+p.shift(),j=h+p.shift(),B=i+p.shift(),C=j+p.shift(),D=B+p.shift(),E=C+p.shift(),F=D+p.shift(),G=E+p.shift(),u=F+p.shift(),v=G+p.shift(),p.shift(),o.curveTo(g,h,i,j,B,C),o.curveTo(D,E,F,G,u,v);break;case 34:g=u+p.shift(),h=v,i=g+p.shift(),j=h+p.shift(),B=i+p.shift(),C=j,D=B+p.shift(),E=j,F=D+p.shift(),G=v,u=F+p.shift(),o.curveTo(g,h,i,j,B,C),o.curveTo(D,E,F,G,u,v);break;case 36:g=u+p.shift(),h=v+p.shift(),i=g+p.shift(),j=h+p.shift(),B=i+p.shift(),C=j,D=B+p.shift(),E=j,F=D+p.shift(),G=E+p.shift(),u=F+p.shift(),o.curveTo(g,h,i,j,B,C),o.curveTo(D,E,F,G,u,v);break;case 37:g=u+p.shift(),h=v+p.shift(),i=g+p.shift(),j=h+p.shift(),B=i+p.shift(),C=j+p.shift(),D=B+p.shift(),E=C+p.shift(),F=D+p.shift(),G=E+p.shift(),Math.abs(F-u)>Math.abs(G-v)?u=F+p.shift():v=G+p.shift(),o.curveTo(g,h,i,j,B,C),o.curveTo(D,E,F,G,u,v);break;default:console.log("Glyph "+b.index+": unknown operator 1200"+I),p.length=0}break;case 14:p.length>0&&!s&&(y=p.shift()+n,s=!0),t&&(o.closePath(),t=!1);break;case 18:e();break;case 19:case 20:e(),H+=q+7>>3;break;case 21:p.length>2&&!s&&(y=p.shift()+n,s=!0),v+=p.pop(),u+=p.pop(),d(u,v);break;case 22:p.length>1&&!s&&(y=p.shift()+n,s=!0),u+=p.pop(),d(u,v);break;case 23:e();break;case 24:for(;p.length>2;)g=u+p.shift(),h=v+p.shift(),i=g+p.shift(),j=h+p.shift(),u=i+p.shift(),v=j+p.shift(),o.curveTo(g,h,i,j,u,v);u+=p.shift(),v+=p.shift(),o.lineTo(u,v);break;case 25:for(;p.length>6;)u+=p.shift(),v+=p.shift(),o.lineTo(u,v);g=u+p.shift(),h=v+p.shift(),i=g+p.shift(),j=h+p.shift(),u=i+p.shift(),v=j+p.shift(),o.curveTo(g,h,i,j,u,v);break;case 26:for(p.length%2&&(u+=p.shift());p.length>0;)g=u,h=v+p.shift(),i=g+p.shift(),j=h+p.shift(),u=i,v=j+p.shift(),o.curveTo(g,h,i,j,u,v);break;case 27:for(p.length%2&&(v+=p.shift());p.length>0;)g=u+p.shift(),h=v,i=g+p.shift(),j=h+p.shift(),u=i+p.shift(),v=j,o.curveTo(g,h,i,j,u,v);break;case 28:m=c[H],r=c[H+1],p.push((m<<24|r<<16)>>16),H+=2;break;case 29:z=p.pop()+a.gsubrsBias,A=a.gsubrs[z],A&&f(A);break;case 30:for(;p.length>0&&(g=u,h=v+p.shift(),i=g+p.shift(),j=h+p.shift(),u=i+p.shift(),v=j+(1===p.length?p.shift():0),o.curveTo(g,h,i,j,u,v),0!==p.length);)g=u+p.shift(),h=v,i=g+p.shift(),j=h+p.shift(),v=j+p.shift(),u=i+(1===p.length?p.shift():0),o.curveTo(g,h,i,j,u,v);break;case 31:for(;p.length>0&&(g=u+p.shift(),h=v,i=g+p.shift(),j=h+p.shift(),v=j+p.shift(),u=i+(1===p.length?p.shift():0),o.curveTo(g,h,i,j,u,v),0!==p.length);)g=u,h=v+p.shift(),i=g+p.shift(),j=h+p.shift(),u=i+p.shift(),v=j+(1===p.length?p.shift():0),o.curveTo(g,h,i,j,u,v);break;default:I<32?console.log("Glyph "+b.index+": unknown operator "+I):I<247?p.push(I-139):I<251?(m=c[H],H+=1,p.push(256*(I-247)+m+108)):I<255?(m=c[H],H+=1,p.push(256*-(I-251)-m-108)):(m=c[H],r=c[H+1],w=c[H+2],x=c[H+3],H+=4,p.push((m<<24|r<<16|w<<8|x)/65536))}}}var g,h,i,j,k,l,m,n,o=new r,p=[],q=0,s=!1,t=!1,u=0,v=0;if(a.isCIDFont){var w=a.tables.cff.topDict._fdSelect[b.index],x=a.tables.cff.topDict._fdArray[w];k=x._subrs,l=x._subrsBias,m=x._defaultWidthX,n=x._nominalWidthX}else k=a.tables.cff.topDict._subrs,l=a.tables.cff.topDict._subrsBias,m=a.tables.cff.topDict._defaultWidthX,n=a.tables.cff.topDict._nominalWidthX;var y=m;return f(c),b.advanceWidth=y,o}function ya(a,b,c,d){var e,f=[],g=new Le.Parser(a,b),h=g.parseCard8();if(0===h)for(var i=0;i=d)throw new Error("CFF table CID Font FDSelect has bad FD index value "+e+" (FD count "+d+")");f.push(e)}else{if(3!==h)throw new Error("CFF Table CID Font FDSelect table has unsupported format "+h);var j=g.parseCard16(),k=g.parseCard16();if(0!==k)throw new Error("CFF Table CID Font FDSelect format 3 range has bad initial GID "+k);for(var l,m=0;m=d)throw new Error("CFF table CID Font FDSelect has bad FD index value "+e+" (FD count "+d+")");if(l>c)throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID "+l);for(;k=0&&(c=d),d=b.indexOf(a),d>=0?c=d+Ne.length:(c=Ne.length+b.length,b.push(a)),c}function Ba(){return new Ie.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}])}function Ca(a){var b=new Ie.Record("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);b.names=[];for(var c=0;c=c.begin&&a=1&&(c.ulCodePageRange1=d.parseULong(),c.ulCodePageRange2=d.parseULong()),c.version>=2&&(c.sxHeight=d.parseShort(),c.sCapHeight=d.parseShort(),c.usDefaultChar=d.parseUShort(),c.usBreakChar=d.parseUShort(),c.usMaxContent=d.parseUShort()),c}function fb(a){return new Ie.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}],a)}function gb(a,b){var c={},d=new Le.Parser(a,b);switch(c.version=d.parseVersion(),c.italicAngle=d.parseFixed(),c.underlinePosition=d.parseShort(),c.underlineThickness=d.parseShort(),c.isFixedPitch=d.parseULong(),c.minMemType42=d.parseULong(),c.maxMemType42=d.parseULong(),c.minMemType1=d.parseULong(),c.maxMemType1=d.parseULong(),c.version){case 1:c.names=Qe.slice();break;case 2:c.numberOfGlyphs=d.parseUShort(),c.glyphNameIndex=new Array(c.numberOfGlyphs);for(var e=0;e=Qe.length){var g=d.parseChar();c.names.push(d.parseString(g))}break;case 2.5:c.numberOfGlyphs=d.parseUShort(),c.offset=new Array(c.numberOfGlyphs);for(var h=0;hb.value.tag?1:-1}),b.fields=b.fields.concat(d),b.fields=b.fields.concat(e),b}function qb(a,b,c){for(var d=0;d0){return a.glyphs.get(e).getMetrics()}}return c}function rb(a){for(var b=0,c=0;cq||void 0===b)&&q>0&&(b=q),j 123 are reserved for internal usage");n|=1<0?Ze.make(G):void 0,J=kf.make(),K=Ve.make(a.glyphs,{version:a.getEnglishName("version"),fullName:C,familyName:A,weightName:B,postScriptName:D,unitsPerEm:a.unitsPerEm,fontBBox:[0,t.yMin,t.ascender,t.advanceWidthMax]}),L=a.metas&&Object.keys(a.metas).length>0?pf.make(a.metas):void 0,M=[u,v,w,x,H,z,J,K,y];I&&M.push(I),a.tables.gsub&&M.push(of.make(a.tables.gsub)),L&&M.push(L);for(var N=pb(M),O=N.encode(),P=nb(O),Q=N.fields,R=!1,S=0;S>>1,f=a[e].tag;if(f===b)return e;f>>1,f=a[e];if(f===b)return e;f>>1;c=a[f];var g=c.start;if(g===b)return c;g0)return c=a[d-1],b>c.end?0:c}function wb(a,b){this.font=a,this.tableName=b}function xb(a){wb.call(this,a,"gpos")}function yb(a){wb.call(this,a,"gsub")}function zb(a,b){var c=a.length;if(c!==b.length)return!1;for(var d=0;d0?(f=a.parseByte(),0==(b&e)&&(f=-f),f=c+f):f=(b&e)>0?c:c+a.parseShort(),f}function Gb(a,b,c){var d=new Le.Parser(b,c);a.numberOfContours=d.parseShort(),a._xMin=d.parseShort(),a._yMin=d.parseShort(),a._xMax=d.parseShort(),a._yMax=d.parseShort();var e,f;if(a.numberOfContours>0){for(var g=a.endPointIndices=[],h=0;h0)for(var l=d.parseByte(),m=0;m0){var n,o=[];if(j>0){for(var p=0;p=0,o.push(n);for(var q=0,r=0;r0?(2&e)>0?(v.dx=d.parseShort(),v.dy=d.parseShort()):v.matchedPoints=[d.parseUShort(),d.parseUShort()]:(2&e)>0?(v.dx=d.parseChar(),v.dy=d.parseChar()):v.matchedPoints=[d.parseByte(),d.parseByte()],(8&e)>0?v.xScale=v.yScale=d.parseF2Dot14():(64&e)>0?(v.xScale=d.parseF2Dot14(),v.yScale=d.parseF2Dot14()):(128&e)>0&&(v.xScale=d.parseF2Dot14(),v.scale01=d.parseF2Dot14(),v.scale10=d.parseF2Dot14(),v.yScale=d.parseF2Dot14()),a.components.push(v),u=!!(32&e)}if(256&e){a.instructionLength=d.parseUShort(),a.instructions=[];for(var w=0;wb.points.length-1||d.matchedPoints[1]>e.points.length-1)throw Error("Matched points out of range in "+b.name);var g=b.points[d.matchedPoints[0]],h=e.points[d.matchedPoints[1]],i={xScale:d.xScale,scale01:d.scale01,scale10:d.scale10,yScale:d.yScale,dx:0,dy:0};h=Hb([h],i)[0],i.dx=g.x-h.x,i.dy=g.y-h.y,f=Hb(e.points,i)}b.points=b.points.concat(f)}}return Jb(b.points)}function Lb(a,b,c,d){for(var e=new Se.GlyphSet(d),f=0;f=176&&c<=183)e+=c-176+1;else if(c>=184&&c<=191)e+=2*(c-184+1);else if(b&&1===f&&27===c)break}while(f>0);a.ip=e}function Zb(b,c){a.DEBUG&&console.log(c.step,"SVTCA["+b.axis+"]"),c.fv=c.pv=c.dpv=b}function $b(b,c){a.DEBUG&&console.log(c.step,"SPVTCA["+b.axis+"]"),c.pv=c.dpv=b}function _b(b,c){a.DEBUG&&console.log(c.step,"SFVTCA["+b.axis+"]"),c.fv=b}function ac(b,c){var d=c.stack,e=d.pop(),f=d.pop(),g=c.z2[e],h=c.z1[f];a.DEBUG&&console.log("SPVTL["+b+"]",e,f);var i,j;b?(i=g.y-h.y,j=h.x-g.x):(i=h.x-g.x,j=h.y-g.y),c.pv=c.dpv=Ub(i,j)}function bc(b,c){var d=c.stack,e=d.pop(),f=d.pop(),g=c.z2[e],h=c.z1[f];a.DEBUG&&console.log("SFVTL["+b+"]",e,f);var i,j;b?(i=g.y-h.y,j=h.x-g.x):(i=h.x-g.x,j=h.y-g.y),c.fv=Ub(i,j)}function cc(b){var c=b.stack,d=c.pop(),e=c.pop();a.DEBUG&&console.log(b.step,"SPVFS[]",d,e),b.pv=b.dpv=Ub(e,d)}function dc(b){var c=b.stack,d=c.pop(),e=c.pop();a.DEBUG&&console.log(b.step,"SPVFS[]",d,e),b.fv=Ub(e,d)}function ec(b){var c=b.stack,d=b.pv;a.DEBUG&&console.log(b.step,"GPV[]"),c.push(16384*d.x),c.push(16384*d.y)}function fc(b){var c=b.stack,d=b.fv;a.DEBUG&&console.log(b.step,"GFV[]"),c.push(16384*d.x),c.push(16384*d.y)}function gc(b){b.fv=b.pv,a.DEBUG&&console.log(b.step,"SFVTPV[]")}function hc(b){var c=b.stack,d=c.pop(),e=c.pop(),f=c.pop(),g=c.pop(),h=c.pop(),i=b.z0,j=b.z1,k=i[d],l=i[e],m=j[f],n=j[g],o=b.z2[h];a.DEBUG&&console.log("ISECT[], ",d,e,f,g,h);var p=k.x,q=k.y,r=l.x,s=l.y,t=m.x,u=m.y,v=n.x,w=n.y,x=(p-r)*(u-w)-(q-s)*(t-v),y=p*s-q*r,z=t*w-u*v;o.x=(y*(t-v)-z*(p-r))/x,o.y=(y*(u-w)-z*(q-s))/x}function ic(b){b.rp0=b.stack.pop(),a.DEBUG&&console.log(b.step,"SRP0[]",b.rp0)}function jc(b){b.rp1=b.stack.pop(),a.DEBUG&&console.log(b.step,"SRP1[]",b.rp1)}function kc(b){b.rp2=b.stack.pop(),a.DEBUG&&console.log(b.step,"SRP2[]",b.rp2)}function lc(b){var c=b.stack.pop();switch(a.DEBUG&&console.log(b.step,"SZP0[]",c),b.zp0=c,c){case 0:b.tZone||Xb(b),b.z0=b.tZone;break;case 1:b.z0=b.gZone;break;default:throw new Error("Invalid zone pointer")}}function mc(b){var c=b.stack.pop();switch(a.DEBUG&&console.log(b.step,"SZP1[]",c),b.zp1=c,c){case 0:b.tZone||Xb(b),b.z1=b.tZone;break;case 1:b.z1=b.gZone;break;default:throw new Error("Invalid zone pointer")}}function nc(b){var c=b.stack.pop();switch(a.DEBUG&&console.log(b.step,"SZP2[]",c),b.zp2=c,c){case 0:b.tZone||Xb(b),b.z2=b.tZone;break;case 1:b.z2=b.gZone;break;default:throw new Error("Invalid zone pointer")}}function oc(b){var c=b.stack.pop();switch(a.DEBUG&&console.log(b.step,"SZPS[]",c),b.zp0=b.zp1=b.zp2=c,c){case 0:b.tZone||Xb(b),b.z0=b.z1=b.z2=b.tZone;break;case 1:b.z0=b.z1=b.z2=b.gZone;break;default:throw new Error("Invalid zone pointer")}}function pc(b){b.loop=b.stack.pop(),a.DEBUG&&console.log(b.step,"SLOOP[]",b.loop)}function qc(b){a.DEBUG&&console.log(b.step,"RTG[]"),b.round=Ob}function rc(b){a.DEBUG&&console.log(b.step,"RTHG[]"),b.round=Qb}function sc(b){var c=b.stack.pop();a.DEBUG&&console.log(b.step,"SMD[]",c),b.minDis=c/64}function tc(b){a.DEBUG&&console.log(b.step,"ELSE[]"),Yb(b,!1)}function uc(b){var c=b.stack.pop();a.DEBUG&&console.log(b.step,"JMPR[]",c),b.ip+=c-1}function vc(b){var c=b.stack.pop();a.DEBUG&&console.log(b.step,"SCVTCI[]",c),b.cvCutIn=c/64}function wc(b){var c=b.stack;a.DEBUG&&console.log(b.step,"DUP[]"),c.push(c[c.length-1])}function xc(b){a.DEBUG&&console.log(b.step,"POP[]"),b.stack.pop()}function yc(b){a.DEBUG&&console.log(b.step,"CLEAR[]"),b.stack.length=0}function zc(b){var c=b.stack,d=c.pop(),e=c.pop();a.DEBUG&&console.log(b.step,"SWAP[]"),c.push(d),c.push(e)}function Ac(b){var c=b.stack;a.DEBUG&&console.log(b.step,"DEPTH[]"),c.push(c.length)}function Bc(b){var c=b.stack,d=c.pop(),e=c.pop();a.DEBUG&&console.log(b.step,"LOOPCALL[]",d,e);var f=b.ip,g=b.prog;b.prog=b.funcs[d];for(var h=0;h1?"loop "+(c.loop-i)+": ":"")+"SHP["+(b?"rp1":"rp2")+"]",k)}c.loop=1}function Jc(b,c){var d=c.stack,e=b?c.rp1:c.rp2,f=(b?c.z0:c.z1)[e],g=c.fv,h=c.pv,i=d.pop(),j=c.z2[c.contours[i]],k=j;a.DEBUG&&console.log(c.step,"SHC["+b+"]",i);var l=h.distance(f,f,!1,!0);do{k!==f&&g.setRelative(k,k,l,h),k=k.nextPointOnContour}while(k!==j)}function Kc(b,c){var d=c.stack,e=b?c.rp1:c.rp2,f=(b?c.z0:c.z1)[e],g=c.fv,h=c.pv,i=d.pop();a.DEBUG&&console.log(c.step,"SHZ["+b+"]",i);var j;switch(i){case 0:j=c.tZone;break;case 1:j=c.gZone;break;default:throw new Error("Invalid zone")}for(var k,l=h.distance(f,f,!1,!0),m=j.length-2,n=0;n1?"loop "+(b.loop-d)+": ":"")+"SHPIX[]",h,f),e.setRelative(i,i,f),e.touch(i)}b.loop=1}function Mc(b){for(var c=b.stack,d=b.rp1,e=b.rp2,f=b.loop,g=b.z0[d],h=b.z1[e],i=b.fv,j=b.dpv,k=b.z2;f--;){var l=c.pop(),m=k[l];a.DEBUG&&console.log(b.step,(b.loop>1?"loop "+(b.loop-f)+": ":"")+"IP[]",l,d,"<->",e),i.interpolate(m,g,h,j),i.touch(m)}b.loop=1}function Nc(b,c){var d=c.stack,e=d.pop()/64,f=d.pop(),g=c.z1[f],h=c.z0[c.rp0],i=c.fv,j=c.pv;i.setRelative(g,h,e,j),i.touch(g),a.DEBUG&&console.log(c.step,"MSIRP["+b+"]",e,f),c.rp1=c.rp0,c.rp2=f,b&&(c.rp0=f)}function Oc(b){for(var c=b.stack,d=b.rp0,e=b.z0[d],f=b.loop,g=b.fv,h=b.pv,i=b.z1;f--;){var j=c.pop(),k=i[j];a.DEBUG&&console.log(b.step,(b.loop>1?"loop "+(b.loop-f)+": ":"")+"ALIGNRP[]",j),g.setRelative(k,e,0,h),g.touch(k)}b.loop=1}function Pc(b){a.DEBUG&&console.log(b.step,"RTDG[]"),b.round=Pb}function Qc(b,c){var d=c.stack,e=d.pop(),f=d.pop(),g=c.z0[f],h=c.fv,i=c.pv,j=c.cvt[e];a.DEBUG&&console.log(c.step,"MIAP["+b+"]",e,"(",j,")",f);var k=i.distance(g,zf);b&&(Math.abs(k-j)",i),c.stack.push(Math.round(64*i))}function Zc(b){a.DEBUG&&console.log(b.step,"MPPEM[]"),b.stack.push(b.ppem)}function $c(b){a.DEBUG&&console.log(b.step,"FLIPON[]"),b.autoFlip=!0}function _c(b){var c=b.stack,d=c.pop(),e=c.pop();a.DEBUG&&console.log(b.step,"LT[]",d,e),c.push(ed?1:0)}function cd(b){var c=b.stack,d=c.pop(),e=c.pop();a.DEBUG&&console.log(b.step,"GTEQ[]",d,e),c.push(e>=d?1:0)}function dd(b){var c=b.stack,d=c.pop(),e=c.pop();a.DEBUG&&console.log(b.step,"EQ[]",d,e),c.push(d===e?1:0)}function ed(b){var c=b.stack,d=c.pop(),e=c.pop();a.DEBUG&&console.log(b.step,"NEQ[]",d,e),c.push(d!==e?1:0)}function fd(b){var c=b.stack,d=c.pop();a.DEBUG&&console.log(b.step,"ODD[]",d),c.push(Math.trunc(d)%2?1:0)}function gd(b){var c=b.stack,d=c.pop();a.DEBUG&&console.log(b.step,"EVEN[]",d),c.push(Math.trunc(d)%2?0:1)}function hd(b){var c=b.stack.pop();a.DEBUG&&console.log(b.step,"IF[]",c),c||(Yb(b,!0),a.DEBUG&&console.log(b.step,"EIF[]"))}function id(b){a.DEBUG&&console.log(b.step,"EIF[]")}function jd(b){var c=b.stack,d=c.pop(),e=c.pop();a.DEBUG&&console.log(b.step,"AND[]",d,e),c.push(d&&e?1:0)}function kd(b){var c=b.stack,d=c.pop(),e=c.pop();a.DEBUG&&console.log(b.step,"OR[]",d,e),c.push(d||e?1:0)}function ld(b){var c=b.stack,d=c.pop();a.DEBUG&&console.log(b.step,"NOT[]",d),c.push(d?0:1)}function md(b,c){var d=c.stack,e=d.pop(),f=c.fv,g=c.pv,h=c.ppem,i=c.deltaBase+16*(b-1),j=c.deltaShift,k=c.z0;a.DEBUG&&console.log(c.step,"DELTAP["+b+"]",e,d);for(var l=0;l>4)===h){var o=(15&n)-8;o>=0&&o++,a.DEBUG&&console.log(c.step,"DELTAPFIX",m,"by",o*j);var p=k[m];f.setRelative(p,p,o*j,g)}}}function nd(b){var c=b.stack,d=c.pop();a.DEBUG&&console.log(b.step,"SDB[]",d),b.deltaBase=d}function od(b){var c=b.stack,d=c.pop();a.DEBUG&&console.log(b.step,"SDS[]",d),b.deltaShift=Math.pow(.5,d)}function pd(b){var c=b.stack,d=c.pop(),e=c.pop();a.DEBUG&&console.log(b.step,"ADD[]",d,e),c.push(e+d)}function qd(b){var c=b.stack,d=c.pop(),e=c.pop();a.DEBUG&&console.log(b.step,"SUB[]",d,e),c.push(e-d)}function rd(b){var c=b.stack,d=c.pop(),e=c.pop();a.DEBUG&&console.log(b.step,"DIV[]",d,e),c.push(64*e/d)}function sd(b){var c=b.stack,d=c.pop(),e=c.pop();a.DEBUG&&console.log(b.step,"MUL[]",d,e),c.push(e*d/64)}function td(b){var c=b.stack,d=c.pop();a.DEBUG&&console.log(b.step,"ABS[]",d),c.push(Math.abs(d))}function ud(b){var c=b.stack,d=c.pop();a.DEBUG&&console.log(b.step,"NEG[]",d),c.push(-d)}function vd(b){var c=b.stack,d=c.pop();a.DEBUG&&console.log(b.step,"FLOOR[]",d),c.push(64*Math.floor(d/64))}function wd(b){var c=b.stack,d=c.pop();a.DEBUG&&console.log(b.step,"CEILING[]",d),c.push(64*Math.ceil(d/64))}function xd(b,c){var d=c.stack,e=d.pop();a.DEBUG&&console.log(c.step,"ROUND[]"),d.push(64*c.round(e/64))}function yd(b){var c=b.stack,d=c.pop(),e=c.pop();a.DEBUG&&console.log(b.step,"WCVTF[]",d,e),b.cvt[e]=d*b.ppem/b.font.unitsPerEm}function zd(b,c){var d=c.stack,e=d.pop(),f=c.ppem,g=c.deltaBase+16*(b-1),h=c.deltaShift;a.DEBUG&&console.log(c.step,"DELTAC["+b+"]",e,d);for(var i=0;i>4)===f){var l=(15&k)-8;l>=0&&l++;var m=l*h;a.DEBUG&&console.log(c.step,"DELTACFIX",j,"by",m),c.cvt[j]+=m}}}function Ad(b){var c=b.stack.pop();a.DEBUG&&console.log(b.step,"SROUND[]",c),b.round=wf;var d;switch(192&c){case 0:d=.5;break;case 64:d=1;break;case 128:d=2;break;default:throw new Error("invalid SROUND value")}switch(b.srPeriod=d,48&c){case 0:b.srPhase=0;break;case 16:b.srPhase=.25*d;break;case 32:b.srPhase=.5*d;break;case 48:b.srPhase=.75*d;break;default:throw new Error("invalid SROUND value")}c&=15,b.srThreshold=0===c?0:(c/8-.5)*d}function Bd(b){var c=b.stack.pop();a.DEBUG&&console.log(b.step,"S45ROUND[]",c),b.round=wf;var d;switch(192&c){case 0:d=Math.sqrt(2)/2;break;case 64:d=Math.sqrt(2);break;case 128:d=2*Math.sqrt(2);break;default:throw new Error("invalid S45ROUND value")}switch(b.srPeriod=d,48&c){case 0:b.srPhase=0;break;case 16:b.srPhase=.25*d;break;case 32:b.srPhase=.5*d;break;case 48:b.srPhase=.75*d;break;default:throw new Error("invalid S45ROUND value")}c&=15,b.srThreshold=0===c?0:(c/8-.5)*d}function Cd(b){a.DEBUG&&console.log(b.step,"ROFF[]"),b.round=Nb}function Dd(b){a.DEBUG&&console.log(b.step,"RUTG[]"),b.round=Rb}function Ed(b){a.DEBUG&&console.log(b.step,"RDTG[]"),b.round=Sb}function Fd(b){var c=b.stack.pop();a.DEBUG&&console.log(b.step,"SCANCTRL[]",c)}function Gd(b,c){var d=c.stack,e=d.pop(),f=d.pop(),g=c.z2[e],h=c.z1[f];a.DEBUG&&console.log(c.step,"SDPVTL["+b+"]",e,f);var i,j;b?(i=g.y-h.y,j=h.x-g.x):(i=h.x-g.x,j=h.y-g.y),c.dpv=Ub(i,j)}function Hd(b){var c=b.stack,d=c.pop(),e=0;a.DEBUG&&console.log(b.step,"GETINFO[]",d),1&d&&(e=35),32&d&&(e|=4096),c.push(e)}function Id(b){var c=b.stack,d=c.pop(),e=c.pop(),f=c.pop();a.DEBUG&&console.log(b.step,"ROLL[]"),c.push(e),c.push(d),c.push(f)}function Jd(b){var c=b.stack,d=c.pop(),e=c.pop();a.DEBUG&&console.log(b.step,"MAX[]",d,e),c.push(Math.max(e,d))}function Kd(b){var c=b.stack,d=c.pop(),e=c.pop();a.DEBUG&&console.log(b.step,"MIN[]",d,e),c.push(Math.min(e,d))}function Ld(b){var c=b.stack.pop();a.DEBUG&&console.log(b.step,"SCANTYPE[]",c)}function Md(b){var c=b.stack.pop(),d=b.stack.pop();switch(a.DEBUG&&console.log(b.step,"INSTCTRL[]",c,d),c){case 1:return void(b.inhibitGridFit=!!d);case 2:return void(b.ignoreCvt=!!d);default:throw new Error("invalid INSTCTRL[] selector")}}function Nd(b,c){var d=c.stack,e=c.prog,f=c.ip;a.DEBUG&&console.log(c.step,"PUSHB["+b+"]");for(var g=0;g=0?1:-1,i=Math.abs(i),b&&(k=g.cvt[m],e&&Math.abs(i-k)":"_")+(e?"R":"_")+(0===f?"Gr":1===f?"Bl":2===f?"Wh":"")+"]",b?m+"("+g.cvt[m]+","+k+")":"",n,"(d =",h,"->",j*i,")"),g.rp1=g.rp0,g.rp2=n,c&&(g.rp0=n)}function Qd(a){a=a||{},a.empty||(Eb(a.familyName,"When creating a new Font object, familyName is required."),Eb(a.styleName,"When creating a new Font object, styleName is required."),Eb(a.unitsPerEm,"When creating a new Font object, unitsPerEm is required."),Eb(a.ascender,"When creating a new Font object, ascender is required."),Eb(a.descender,"When creating a new Font object, descender is required."),Eb(a.descender<0,"Descender should be negative (e.g. -512)."),this.names={fontFamily:{en:a.familyName||" "},fontSubfamily:{en:a.styleName||" "},fullName:{en:a.fullName||a.familyName+" "+a.styleName},postScriptName:{en:a.postScriptName||(a.familyName+a.styleName).replace(/\s/g,"")},designer:{en:a.designer||" "},designerURL:{en:a.designerURL||" "},manufacturer:{en:a.manufacturer||" "},manufacturerURL:{en:a.manufacturerURL||" "},license:{en:a.license||" "},licenseURL:{en:a.licenseURL||" "},version:{en:a.version||"Version 0.1"},description:{en:a.description||" "},copyright:{en:a.copyright||" "},trademark:{en:a.trademark||" "}},this.unitsPerEm=a.unitsPerEm||1e3,this.ascender=a.ascender,this.descender=a.descender,this.createdTimestamp=a.createdTimestamp,this.tables={os2:{usWeightClass:a.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:a.widthClass||this.usWidthClasses.MEDIUM,fsSelection:a.fsSelection||this.fsSelectionValues.REGULAR}}),this.supported=!0,this.glyphs=new Se.GlyphSet(this,a.glyphs||[]),this.encoding=new X(this),this.position=new xb(this),this.substitution=new yb(this),this.tables=this.tables||{},Object.defineProperty(this,"hinting",{get:function(){return this._hinting?this._hinting:"truetype"===this.outlinesFormat?this._hinting=new Mb(this):void 0}})}function Rd(a,b){var c=JSON.stringify(a),d=256;for(var e in b){var f=parseInt(e);if(f&&!(f<256)){if(JSON.stringify(b[e])===c)return f;d<=f&&(d=f+1)}}return b[d]=a,d}function Sd(a,b,c){var d=Rd(b.name,c);return[{name:"tag_"+a,type:"TAG",value:b.tag},{name:"minValue_"+a,type:"FIXED",value:b.minValue<<16},{name:"defaultValue_"+a,type:"FIXED",value:b.defaultValue<<16},{name:"maxValue_"+a,type:"FIXED",value:b.maxValue<<16},{name:"flags_"+a,type:"USHORT",value:0},{name:"nameID_"+a,type:"USHORT",value:d}]}function Td(a,b,c){var d={},e=new Le.Parser(a,b);return d.tag=e.parseTag(),d.minValue=e.parseFixed(),d.defaultValue=e.parseFixed(),d.maxValue=e.parseFixed(),e.skip("uShort",1),d.name=c[e.parseUShort()]||{},d}function Ud(a,b,c,d){for(var e=Rd(b.name,d),f=[{name:"nameID_"+a,type:"USHORT",value:e},{name:"flags_"+a,type:"USHORT",value:0}],g=0;g1&&console.warn("Only the first kern subtable is supported."),a.skip("uLong");var c=a.parseUShort(),d=255&c;if(a.skip("uShort"),0===d){var e=a.parseUShort();a.skip("uShort",3);for(var f=0;f=c)){var e,f=b.charCodeAt(d);return f>=55296&&f<=56319&&c>d+1&&(e=b.charCodeAt(d+1))>=56320&&e<=57343?1024*(f-55296)+e-56320+65536:f}};a?a(String.prototype,"codePointAt",{value:b,configurable:!0,writable:!0}):String.prototype.codePointAt=b}();var ke=0,le=-3,me=new c,ne=new c,oe=new Uint8Array(30),pe=new Uint16Array(30),qe=new Uint8Array(30),re=new Uint16Array(30),se=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),te=new c,ue=new Uint8Array(320),ve=new Uint16Array(16);g(me,ne),f(oe,pe,4,3),f(qe,re,2,1),oe[28]=0,pe[28]=258;var we=o;q.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)},q.prototype.addPoint=function(a,b){"number"==typeof a&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=a,this.x2=a),athis.x2&&(this.x2=a)),"number"==typeof b&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=b,this.y2=b),bthis.y2&&(this.y2=b))},q.prototype.addX=function(a){this.addPoint(a,null)},q.prototype.addY=function(a){this.addPoint(null,a)},q.prototype.addBezier=function(a,b,c,d,e,f,g,h){var i=this,j=[a,b],k=[c,d],l=[e,f],m=[g,h];this.addPoint(a,b),this.addPoint(g,h);for(var n=0;n<=1;n++){var o=6*j[n]-12*k[n]+6*l[n],q=-3*j[n]+9*k[n]-9*l[n]+3*m[n],r=3*k[n]-3*j[n];if(0!==q){var s=Math.pow(o,2)-4*r*q;if(!(s<0)){var t=(-o+Math.sqrt(s))/(2*q);0=0&&d>0&&(c+=" "),c+=b(e)}return c}var d=this;a=void 0!==a?a:2;for(var e="",f=0;f"},r.prototype.toDOMElement=function(a){var b=this.toPathData(a),c=document.createElementNS("http://www.w3.org/2000/svg","path");return c.setAttribute("d",b),c};var xe={fail:s,argument:t,assert:t},ye=32768,ze=2147483648,Ae={},Be={},Ce={};Be.BYTE=function(a){return xe.argument(a>=0&&a<=255,"Byte value should be between 0 and 255."),[a]},Ce.BYTE=u(1),Be.CHAR=function(a){return[a.charCodeAt(0)]},Ce.CHAR=u(1),Be.CHARARRAY=function(a){for(var b=[],c=0;c>8&255,255&a]},Ce.USHORT=u(2),Be.SHORT=function(a){return a>=ye&&(a=-(2*ye-a)),[a>>8&255,255&a]},Ce.SHORT=u(2),Be.UINT24=function(a){return[a>>16&255,a>>8&255,255&a]},Ce.UINT24=u(3),Be.ULONG=function(a){return[a>>24&255,a>>16&255,a>>8&255,255&a]},Ce.ULONG=u(4),Be.LONG=function(a){return a>=ze&&(a=-(2*ze-a)),[a>>24&255,a>>16&255,a>>8&255,255&a]},Ce.LONG=u(4),Be.FIXED=Be.ULONG,Ce.FIXED=Ce.ULONG,Be.FWORD=Be.SHORT,Ce.FWORD=Ce.SHORT,Be.UFWORD=Be.USHORT,Ce.UFWORD=Ce.USHORT,Be.LONGDATETIME=function(a){return[0,0,0,0,a>>24&255,a>>16&255,a>>8&255,255&a]},Ce.LONGDATETIME=u(8),Be.TAG=function(a){return xe.argument(4===a.length,"Tag should be exactly 4 ASCII characters."),[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)]},Ce.TAG=u(4),Be.Card8=Be.BYTE,Ce.Card8=Ce.BYTE,Be.Card16=Be.USHORT,Ce.Card16=Ce.USHORT,Be.OffSize=Be.BYTE,Ce.OffSize=Ce.BYTE,Be.SID=Be.USHORT,Ce.SID=Ce.USHORT,Be.NUMBER=function(a){return a>=-107&&a<=107?[a+139]:a>=108&&a<=1131?(a-=108,[247+(a>>8),255&a]):a>=-1131&&a<=-108?(a=-a-108,[251+(a>>8),255&a]):a>=-32768&&a<=32767?Be.NUMBER16(a):Be.NUMBER32(a)
-},Ce.NUMBER=function(a){return Be.NUMBER(a).length},Be.NUMBER16=function(a){return[28,a>>8&255,255&a]},Ce.NUMBER16=u(3),Be.NUMBER32=function(a){return[29,a>>24&255,a>>16&255,a>>8&255,255&a]},Ce.NUMBER32=u(5),Be.REAL=function(a){var b=a.toString(),c=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(b);if(c){var d=parseFloat("1e"+((c[2]?+c[2]:0)+c[1].length));b=(Math.round(a*d)/d).toString()}for(var e="",f=0,g=b.length;f>8&255,b[b.length]=255&d}return b},Ce.UTF16=function(a){return 2*a.length};var De={"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.MACSTRING=function(a,b,c,d){var e=De[d];if(void 0!==e){for(var f="",g=0;g=128&&void 0===(f=c[f]))return;d[e]=f}return d}},Ce.MACSTRING=function(a,b){var c=Be.MACSTRING(a,b);return void 0!==c?c.length:0},Be.VARDELTAS=function(a){for(var b=0,c=[];b=-128&&d<=127?x(a,b,c):y(a,b,c)}return c},Be.INDEX=function(a){for(var b=1,c=[b],d=[],e=0;e>8,b[l+1]=255&m,b=b.concat(d[k])}return b},Ce.TABLE=function(a){for(var b=0,c=a.fields.length,d=0;d0)return new Q(this.data,this.offset+b).parseStruct(a)},Q.prototype.parsePointer32=function(a){var b=this.parseOffset32();if(b>0)return new Q(this.data,this.offset+b).parseStruct(a)},Q.prototype.parseListOfLists=function(a){for(var b=this,c=this.parseOffset16List(),d=c.length,e=this.relativeOffset,f=new Array(d),g=0;g=0)return d[e].script;if(b){var f={tag:a,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return d.splice(-1-e,0,f),f.script}}},getLangSysTable:function(a,b,c){var d=this.getScriptTable(a,c);if(d){if(!b||"dflt"===b||"DFLT"===b)return d.defaultLangSys;var e=tb(d.langSysRecords,b);if(e>=0)return d.langSysRecords[e].langSys;if(c){var f={tag:b,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return d.langSysRecords.splice(-1-e,0,f),f.langSys}}},getFeatureTable:function(a,b,c,d){var e=this.getLangSysTable(a,b,d);if(e){for(var f,g=e.featureIndexes,h=this.font.tables[this.tableName].features,i=0;i=h[j-1].tag,"Features must be added in alphabetical order."),f={tag:c,feature:{params:0,lookupListIndexes:[]}},h.push(f),g.push(j),f.feature}}},getLookupTables:function(a,b,c,d,e){var f=this.getFeatureTable(a,b,c,e),g=[];if(f){for(var h,i=f.lookupListIndexes,j=this.font.tables[this.tableName].lookups,k=0;k=0?c:-1;case 2:var d=vb(a.ranges,b);return d?d.index+b-d.start:-1}},expandCoverage:function(a){if(1===a.format)return a.glyphs;for(var b=[],c=a.ranges,d=0;d=0){for(var k=f.ligatureSets[j],l=0;l2)){var d=this.font,e=this._prepState;if(!e||e.ppem!==c){var f=this._fpgmState;if(!f){Wb.prototype=Af,f=this._fpgmState=new Wb("fpgm",d.tables.fpgm),f.funcs=[],f.font=d,a.DEBUG&&(console.log("---EXEC FPGM---"),f.step=-1);try{sf(f)}catch(a){return console.log("Hinting error in FPGM:"+a),void(this._errorState=3)}}Wb.prototype=f,e=this._prepState=new Wb("prep",d.tables.prep),e.ppem=c;var g=d.tables.cvt;if(g)for(var h=e.cvt=new Array(g.length),i=c/d.unitsPerEm,j=0;j1))try{return tf(b,e)}catch(a){return this._errorState<1&&(console.log("Hinting error:"+a),console.log("Note: further hinting errors are silenced")),void(this._errorState=1)}}},tf=function(b,c){var d,e,f,g=c.ppem/c.font.unitsPerEm,h=g,i=b.components;if(Wb.prototype=c,i){var j=c.font;e=[],d=[];for(var k=0;k0,"No English "+b+" specified.")}var c=this;b("fontFamily"),b("weightName"),b("manufacturer"),b("copyright"),b("version"),a(this.unitsPerEm>0,"No unitsPerEm specified.")},Qd.prototype.toTables=function(){return qf.fontToTable(this)},Qd.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()},Qd.prototype.toArrayBuffer=function(){for(var a=this.toTables(),b=a.encode(),c=new ArrayBuffer(b.length),d=new Uint8Array(c),e=0;e1)for(var c=1;c-1?b:a}function n(a,b){b=b||{};var c=b.body;if(a instanceof n){if(a.bodyUsed)throw new TypeError("Already read");this.url=a.url,this.credentials=a.credentials,b.headers||(this.headers=new e(a.headers)),this.method=a.method,this.mode=a.mode,c||null==a._bodyInit||(c=a._bodyInit,a.bodyUsed=!0)}else this.url=String(a);if(this.credentials=b.credentials||this.credentials||"omit",!b.headers&&this.headers||(this.headers=new e(b.headers)),this.method=m(b.method||this.method||"GET"),this.mode=b.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&c)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(c)}function o(a){var b=new FormData;return a.trim().split("&").forEach(function(a){if(a){var c=a.split("="),d=c.shift().replace(/\+/g," "),e=c.join("=").replace(/\+/g," ");b.append(decodeURIComponent(d),decodeURIComponent(e))}}),b}function p(a){var b=new e;return a.split(/\r?\n/).forEach(function(a){var c=a.split(":"),d=c.shift().trim();if(d){var e=c.join(":").trim();b.append(d,e)}}),b}function q(a,b){b||(b={}),this.type="default",this.status="status"in b?b.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in b?b.statusText:"OK",this.headers=new e(b.headers),this.url=b.url||"",this._initBody(a)}if(!a.fetch){var r={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch(a){return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};if(r.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],t=function(a){return a&&DataView.prototype.isPrototypeOf(a)},u=ArrayBuffer.isView||function(a){return a&&s.indexOf(Object.prototype.toString.call(a))>-1};e.prototype.append=function(a,d){a=b(a),d=c(d);var e=this.map[a];this.map[a]=e?e+","+d:d},e.prototype.delete=function(a){delete this.map[b(a)]},e.prototype.get=function(a){return a=b(a),this.has(a)?this.map[a]:null},e.prototype.has=function(a){return this.map.hasOwnProperty(b(a))},e.prototype.set=function(a,d){this.map[b(a)]=c(d)},e.prototype.forEach=function(a,b){for(var c in this.map)this.map.hasOwnProperty(c)&&a.call(b,this.map[c],c,this)},e.prototype.keys=function(){var a=[];return this.forEach(function(b,c){a.push(c)}),d(a)},e.prototype.values=function(){var a=[];return this.forEach(function(b){a.push(b)}),d(a)},e.prototype.entries=function(){var a=[];return this.forEach(function(b,c){a.push([c,b])}),d(a)},r.iterable&&(e.prototype[Symbol.iterator]=e.prototype.entries);var v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];n.prototype.clone=function(){return new n(this,{body:this._bodyInit})},l.call(n.prototype),l.call(q.prototype),q.prototype.clone=function(){return new q(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new e(this.headers),url:this.url})},q.error=function(){var a=new q(null,{status:0,statusText:""});return a.type="error",a};var w=[301,302,303,307,308];q.redirect=function(a,b){if(-1===w.indexOf(b))throw new RangeError("Invalid status code");return new q(null,{status:b,headers:{location:a}})},a.Headers=e,a.Request=n,a.Response=q,a.fetch=function(a,b){return new Promise(function(c,d){var e=new n(a,b),f=new XMLHttpRequest;f.onload=function(){var a={status:f.status,statusText:f.statusText,headers:p(f.getAllResponseHeaders()||"")};a.url="responseURL"in f?f.responseURL:a.headers.get("X-Request-URL");var b="response"in f?f.response:f.responseText;c(new q(b,a))},f.onerror=function(){d(new TypeError("Network request failed"))},f.ontimeout=function(){d(new TypeError("Network request failed"))},f.open(e.method,e.url,!0),"include"===e.credentials&&(f.withCredentials=!0),"responseType"in f&&r.blob&&(f.responseType="blob"),e.headers.forEach(function(a,b){f.setRequestHeader(b,a)}),f.send(void 0===e._bodyInit?null:e._bodyInit)})},a.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},{}],13:[function(a,b,c){"use strict";var d=a("./core/main");a("./core/constants"),a("./core/environment"),a("./core/error_helpers"),a("./core/helpers"),a("./core/legacy"),a("./core/p5.Element"),a("./core/p5.Graphics"),a("./core/p5.Renderer"),a("./core/p5.Renderer2D"),a("./core/rendering"),a("./core/shim"),a("./core/structure"),a("./core/transform"),a("./core/shape/2d_primitives"),a("./core/shape/attributes"),a("./core/shape/curves"),a("./core/shape/vertex"),a("./color/color_conversion"),a("./color/creating_reading"),a("./color/p5.Color"),a("./color/setting"),a("./data/p5.TypedDict"),a("./events/acceleration"),a("./events/keyboard"),a("./events/mouse"),a("./events/touch"),a("./image/filters"),a("./image/image"),a("./image/loading_displaying"),a("./image/p5.Image"),a("./image/pixels"),a("./io/files"),a("./io/p5.Table"),a("./io/p5.TableRow"),a("./io/p5.XML"),a("./math/calculation"),a("./math/math"),a("./math/noise"),a("./math/p5.Vector"),a("./math/random"),a("./math/trigonometry"),a("./typography/attributes"),a("./typography/loading_displaying"),a("./typography/p5.Font"),a("./utilities/array_functions"),a("./utilities/conversion"),a("./utilities/string_functions"),a("./utilities/time_date"),a("./webgl/3d_primitives"),a("./webgl/interaction"),a("./webgl/light"),a("./webgl/loading"),a("./webgl/material"),a("./webgl/p5.Camera"),a("./webgl/p5.Geometry"),a("./webgl/p5.Matrix"),a("./webgl/p5.RendererGL.Immediate"),a("./webgl/p5.RendererGL"),a("./webgl/p5.RendererGL.Retained"),a("./webgl/p5.Shader"),a("./webgl/p5.Texture"),a("./webgl/text"),a("./core/init"),b.exports=d},{"./color/color_conversion":14,"./color/creating_reading":15,"./color/p5.Color":16,"./color/setting":17,"./core/constants":18,"./core/environment":19,"./core/error_helpers":20,"./core/helpers":21,"./core/init":22,"./core/legacy":23,"./core/main":24,"./core/p5.Element":25,"./core/p5.Graphics":26,"./core/p5.Renderer":27,"./core/p5.Renderer2D":28,"./core/rendering":29,"./core/shape/2d_primitives":30,"./core/shape/attributes":31,"./core/shape/curves":32,"./core/shape/vertex":33,"./core/shim":34,"./core/structure":35,"./core/transform":36,"./data/p5.TypedDict":37,"./events/acceleration":38,"./events/keyboard":39,"./events/mouse":40,"./events/touch":41,"./image/filters":42,"./image/image":43,"./image/loading_displaying":44,"./image/p5.Image":45,"./image/pixels":46,"./io/files":47,"./io/p5.Table":48,"./io/p5.TableRow":49,"./io/p5.XML":50,"./math/calculation":51,"./math/math":52,"./math/noise":53,"./math/p5.Vector":54,"./math/random":55,"./math/trigonometry":56,"./typography/attributes":57,"./typography/loading_displaying":58,"./typography/p5.Font":59,"./utilities/array_functions":60,"./utilities/conversion":61,"./utilities/string_functions":62,"./utilities/time_date":63,"./webgl/3d_primitives":64,"./webgl/interaction":65,"./webgl/light":66,"./webgl/loading":67,"./webgl/material":68,"./webgl/p5.Camera":69,"./webgl/p5.Geometry":70,"./webgl/p5.Matrix":71,"./webgl/p5.RendererGL":74,"./webgl/p5.RendererGL.Immediate":72,"./webgl/p5.RendererGL.Retained":73,"./webgl/p5.Shader":75,"./webgl/p5.Texture":76,"./webgl/text":77}],14:[function(a,b,c){"use strict";var d=a("../core/main");d.ColorConversion={},d.ColorConversion._hsbaToHSLA=function(a){var b=a[0],c=a[1],d=a[2],e=(2-c)*d/2;return 0!==e&&(1===e?c=0:e<.5?c/=2-c:c=c*d/(2-2*e)),[b,c,e,a[3]]},d.ColorConversion._hsbaToRGBA=function(a){var b=6*a[0],c=a[1],d=a[2],e=[];if(0===c)e=[d,d,d,a[3]];else{var f,g,h,i=Math.floor(b),j=d*(1-c),k=d*(1-c*(b-i)),l=d*(1-c*(1+i-b));1===i?(f=k,g=d,h=j):2===i?(f=j,g=d,h=l):3===i?(f=j,g=k,h=d):4===i?(f=l,g=j,h=d):5===i?(f=d,g=j,h=k):(f=d,g=l,h=j),e=[f,g,h,a[3]]}return e},d.ColorConversion._hslaToHSBA=function(a){var b,c=a[0],d=a[1],e=a[2];return b=e<.5?(1+d)*e:e+d-e*d,d=2*(b-e)/b,[c,d,b,a[3]]},d.ColorConversion._hslaToRGBA=function(a){var b=6*a[0],c=a[1],d=a[2],e=[];if(0===c)e=[d,d,d,a[3]];else{var f;f=d<.5?(1+c)*d:d+c-d*c;var g=2*d-f,h=function(a,b,c){return a<0?a+=6:a>=6&&(a-=6),a<1?b+(c-b)*a:a<3?c:a<4?b+(c-b)*(4-a):b};e=[h(b+2,g,f),h(b,g,f),h(b-2,g,f),a[3]]}return e},d.ColorConversion._rgbaToHSBA=function(a){var b,c,d=a[0],e=a[1],f=a[2],g=Math.max(d,e,f),h=g-Math.min(d,e,f);return 0===h?(b=0,c=0):(c=h/g,d===g?b=(e-f)/h:e===g?b=2+(f-d)/h:f===g&&(b=4+(d-e)/h),b<0?b+=6:b>=6&&(b-=6)),[b/6,c,g,a[3]]},d.ColorConversion._rgbaToHSLA=function(a){var b,c,d=a[0],e=a[1],f=a[2],g=Math.max(d,e,f),h=Math.min(d,e,f),i=g+h,j=g-h;return 0===j?(b=0,c=0):(c=i<1?j/i:j/(2-i),d===g?b=(e-f)/j:e===g?b=2+(f-d)/j:f===g&&(b=4+(d-e)/j),b<0?b+=6:b>=6&&(b-=6)),[b/6,c,i/2,a[3]]},b.exports=d.ColorConversion},{"../core/main":24}],15:[function(a,b,c){"use strict";var d=a("../core/main"),e=a("../core/constants");a("./p5.Color"),a("../core/error_helpers"),d.prototype.alpha=function(a){return d._validateParameters("alpha",arguments),this.color(a)._getAlpha()},d.prototype.blue=function(a){return d._validateParameters("blue",arguments),this.color(a)._getBlue()},d.prototype.brightness=function(a){return d._validateParameters("brightness",arguments),this.color(a)._getBrightness()},d.prototype.color=function(){if(d._validateParameters("color",arguments),arguments[0]instanceof d.Color)return arguments[0];var a=arguments[0]instanceof Array?arguments[0]:arguments;return new d.Color(this,a)},d.prototype.green=function(a){return d._validateParameters("green",arguments),this.color(a)._getGreen()},d.prototype.hue=function(a){return d._validateParameters("hue",arguments),this.color(a)._getHue()},d.prototype.lerpColor=function(a,b,c){d._validateParameters("lerpColor",arguments);var f,g,h,i,j,k,l=this._colorMode,m=this._colorMaxes;if(l===e.RGB)j=a.levels.map(function(a){return a/255}),k=b.levels.map(function(a){return a/255});else if(l===e.HSB)a._getBrightness(),b._getBrightness(),j=a.hsba,k=b.hsba;else{if(l!==e.HSL)throw new Error(l+"cannot be used for interpolation.");a._getLightness(),b._getLightness(),j=a.hsla,k=b.hsla}return c=Math.max(Math.min(c,1),0),void 0===this.lerp&&(this.lerp=function(a,b,c){return c*(b-a)+a}),f=this.lerp(j[0],k[0],c),g=this.lerp(j[1],k[1],c),h=this.lerp(j[2],k[2],c),i=this.lerp(j[3],k[3],c),f*=m[l][0],g*=m[l][1],h*=m[l][2],i*=m[l][3],this.color(f,g,h,i)},d.prototype.lightness=function(a){return d._validateParameters("lightness",arguments),this.color(a)._getLightness()},d.prototype.red=function(a){return d._validateParameters("red",arguments),this.color(a)._getRed()},d.prototype.saturation=function(a){return d._validateParameters("saturation",arguments),this.color(a)._getSaturation()},b.exports=d},{"../core/constants":18,"../core/error_helpers":20,"../core/main":24,"./p5.Color":16}],16:[function(a,b,c){"use strict";var d=a("../core/main"),e=a("../core/constants"),f=a("./color_conversion");d.Color=function(a,b){if(this._storeModeAndMaxes(a._colorMode,a._colorMaxes),this.mode!==e.RGB&&this.mode!==e.HSL&&this.mode!==e.HSB)throw new Error(this.mode+" is an invalid colorMode.");return this._array=d.Color._parseInputs.apply(this,b),this._calculateLevels(),this},d.Color.prototype.toString=function(a){this.hsba||(this.hsba=f._rgbaToHSBA(this._array)),this.hsla||(this.hsla=f._rgbaToHSLA(this._array));var b=this.levels,c=this._array,d=c[3];switch(a){case"#rrggbb":return"#".concat(b[0]<16?"0".concat(b[0].toString(16)):b[0].toString(16),b[1]<16?"0".concat(b[1].toString(16)):b[1].toString(16),b[2]<16?"0".concat(b[2].toString(16)):b[2].toString(16));case"#rrggbbaa":return"#".concat(b[0]<16?"0".concat(b[0].toString(16)):b[0].toString(16),b[1]<16?"0".concat(b[1].toString(16)):b[1].toString(16),b[2]<16?"0".concat(b[2].toString(16)):b[2].toString(16),b[3]<16?"0".concat(b[2].toString(16)):b[3].toString(16));case"#rgb":return"#".concat(Math.round(15*c[0]).toString(16),Math.round(15*c[1]).toString(16),Math.round(15*c[2]).toString(16));case"#rgba":return"#".concat(Math.round(15*c[0]).toString(16),Math.round(15*c[1]).toString(16),Math.round(15*c[2]).toString(16),Math.round(15*c[3]).toString(16));case"rgb":return"rgb(".concat(b[0],", ",b[1],", ",b[2],")");case"rgb%":return"rgb(".concat((100*c[0]).toPrecision(3),"%, ",(100*c[1]).toPrecision(3),"%, ",(100*c[2]).toPrecision(3),"%)");case"rgba%":return"rgba(".concat((100*c[0]).toPrecision(3),"%, ",(100*c[1]).toPrecision(3),"%, ",(100*c[2]).toPrecision(3),"%, ",(100*c[3]).toPrecision(3),"%)");case"hsb":case"hsv":return"hsb(".concat(this.hsba[0]*this.maxes[e.HSB][0],", ",this.hsba[1]*this.maxes[e.HSB][1],", ",this.hsba[2]*this.maxes[e.HSB][2],")");case"hsb%":case"hsv%":return"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"hsba(".concat(this.hsba[0]*this.maxes[e.HSB][0],", ",this.hsba[1]*this.maxes[e.HSB][1],", ",this.hsba[2]*this.maxes[e.HSB][2],", ",d,")");case"hsba%":case"hsva%":return"hsba(".concat((100*this.hsba[0]).toPrecision(3),"%, ",(100*this.hsba[1]).toPrecision(3),"%, ",(100*this.hsba[2]).toPrecision(3),"%, ",(100*d).toPrecision(3),"%)");case"hsl":return"hsl(".concat(this.hsla[0]*this.maxes[e.HSL][0],", ",this.hsla[1]*this.maxes[e.HSL][1],", ",this.hsla[2]*this.maxes[e.HSL][2],")");case"hsl%":return"hsl(".concat((100*this.hsla[0]).toPrecision(3),"%, ",(100*this.hsla[1]).toPrecision(3),"%, ",(100*this.hsla[2]).toPrecision(3),"%)");case"hsla":return"hsla(".concat(this.hsla[0]*this.maxes[e.HSL][0],", ",this.hsla[1]*this.maxes[e.HSL][1],", ",this.hsla[2]*this.maxes[e.HSL][2],", ",d,")");case"hsla%":return"hsl(".concat((100*this.hsla[0]).toPrecision(3),"%, ",(100*this.hsla[1]).toPrecision(3),"%, ",(100*this.hsla[2]).toPrecision(3),"%, ",(100*d).toPrecision(3),"%)");case"rgba":default:return"rgba("+b[0]+","+b[1]+","+b[2]+","+d+")"}},d.Color.prototype.setRed=function(a){this._array[0]=a/this.maxes[e.RGB][0],this._calculateLevels()},d.Color.prototype.setGreen=function(a){this._array[1]=a/this.maxes[e.RGB][1],this._calculateLevels()},d.Color.prototype.setBlue=function(a){this._array[2]=a/this.maxes[e.RGB][2],this._calculateLevels()},d.Color.prototype.setAlpha=function(a){this._array[3]=a/this.maxes[this.mode][3],this._calculateLevels()},d.Color.prototype._calculateLevels=function(){for(var a=this._array,b=this.levels=new Array(a.length),c=a.length-1;c>=0;--c)b[c]=Math.round(255*a[c])},d.Color.prototype._getAlpha=function(){return this._array[3]*this.maxes[this.mode][3]},d.Color.prototype._storeModeAndMaxes=function(a,b){this.mode=a,this.maxes=b},d.Color.prototype._getMode=function(){return this.mode},d.Color.prototype._getMaxes=function(){return this.maxes},d.Color.prototype._getBlue=function(){return this._array[2]*this.maxes[e.RGB][2]},d.Color.prototype._getBrightness=function(){return this.hsba||(this.hsba=f._rgbaToHSBA(this._array)),this.hsba[2]*this.maxes[e.HSB][2]},d.Color.prototype._getGreen=function(){return this._array[1]*this.maxes[e.RGB][1]},d.Color.prototype._getHue=function(){return this.mode===e.HSB?(this.hsba||(this.hsba=f._rgbaToHSBA(this._array)),this.hsba[0]*this.maxes[e.HSB][0]):(this.hsla||(this.hsla=f._rgbaToHSLA(this._array)),this.hsla[0]*this.maxes[e.HSL][0])},d.Color.prototype._getLightness=function(){return this.hsla||(this.hsla=f._rgbaToHSLA(this._array)),this.hsla[2]*this.maxes[e.HSL][2]},d.Color.prototype._getRed=function(){return this._array[0]*this.maxes[e.RGB][0]},d.Color.prototype._getSaturation=function(){return this.mode===e.HSB?(this.hsba||(this.hsba=f._rgbaToHSBA(this._array)),this.hsba[1]*this.maxes[e.HSB][1]):(this.hsla||(this.hsla=f._rgbaToHSLA(this._array)),this.hsla[1]*this.maxes[e.HSL][1])};var g={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",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"},h=/\s*/,i=/(\d{1,3})/,j=/((?:\d+(?:\.\d+)?)|(?:\.\d+))/,k=new RegExp(j.source+"%"),l={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\\(",i.source,",",i.source,",",i.source,"\\)$"].join(h.source),"i"),RGB_PERCENT:new RegExp(["^rgb\\(",k.source,",",k.source,",",k.source,"\\)$"].join(h.source),"i"),RGBA:new RegExp(["^rgba\\(",i.source,",",i.source,",",i.source,",",j.source,"\\)$"].join(h.source),"i"),RGBA_PERCENT:new RegExp(["^rgba\\(",k.source,",",k.source,",",k.source,",",j.source,"\\)$"].join(h.source),"i"),HSL:new RegExp(["^hsl\\(",i.source,",",k.source,",",k.source,"\\)$"].join(h.source),"i"),HSLA:new RegExp(["^hsla\\(",i.source,",",k.source,",",k.source,",",j.source,"\\)$"].join(h.source),"i"),HSB:new RegExp(["^hsb\\(",i.source,",",k.source,",",k.source,"\\)$"].join(h.source),"i"),HSBA:new RegExp(["^hsba\\(",i.source,",",k.source,",",k.source,",",j.source,"\\)$"].join(h.source),"i")};d.Color._parseInputs=function(a,b,c,h){var i,j=arguments.length,k=this.mode,m=this.maxes[k],n=[];if(j>=3){for(n[0]=a/m[0],n[1]=b/m[1],n[2]=c/m[2],n[3]="number"==typeof h?h/m[3]:1,i=n.length-1;i>=0;--i){var o=n[i];o<0?n[i]=0:o>1&&(n[i]=1)}return k===e.HSL?f._hslaToRGBA(n):k===e.HSB?f._hsbaToRGBA(n):n}if(1===j&&"string"==typeof a){var p=a.trim().toLowerCase();if(g[p])return d.Color._parseInputs.call(this,g[p]);if(l.HEX3.test(p))return n=l.HEX3.exec(p).slice(1).map(function(a){return parseInt(a+a,16)/255}),n[3]=1,n;if(l.HEX6.test(p))return n=l.HEX6.exec(p).slice(1).map(function(a){return parseInt(a,16)/255}),n[3]=1,n;if(l.HEX4.test(p))return n=l.HEX4.exec(p).slice(1).map(function(a){return parseInt(a+a,16)/255});if(l.HEX8.test(p))return n=l.HEX8.exec(p).slice(1).map(function(a){return parseInt(a,16)/255});if(l.RGB.test(p))return n=l.RGB.exec(p).slice(1).map(function(a){return a/255}),n[3]=1,n;if(l.RGB_PERCENT.test(p))return n=l.RGB_PERCENT.exec(p).slice(1).map(function(a){return parseFloat(a)/100}),n[3]=1,n;if(l.RGBA.test(p))return n=l.RGBA.exec(p).slice(1).map(function(a,b){return 3===b?parseFloat(a):a/255});if(l.RGBA_PERCENT.test(p))return n=l.RGBA_PERCENT.exec(p).slice(1).map(function(a,b){return 3===b?parseFloat(a):parseFloat(a)/100});if(l.HSL.test(p)?(n=l.HSL.exec(p).slice(1).map(function(a,b){return 0===b?parseInt(a,10)/360:parseInt(a,10)/100}),n[3]=1):l.HSLA.test(p)&&(n=l.HSLA.exec(p).slice(1).map(function(a,b){return 0===b?parseInt(a,10)/360:3===b?parseFloat(a):parseInt(a,10)/100})),n=n.map(function(a){return Math.max(Math.min(a,1),0)}),n.length)return f._hslaToRGBA(n);if(l.HSB.test(p)?(n=l.HSB.exec(p).slice(1).map(function(a,b){return 0===b?parseInt(a,10)/360:parseInt(a,10)/100}),n[3]=1):l.HSBA.test(p)&&(n=l.HSBA.exec(p).slice(1).map(function(a,b){return 0===b?parseInt(a,10)/360:3===b?parseFloat(a):parseInt(a,10)/100})),n.length){for(i=n.length-1;i>=0;--i)n[i]=Math.max(Math.min(n[i],1),0);return f._hsbaToRGBA(n)}n=[1,1,1,1]}else{if(1!==j&&2!==j||"number"!=typeof a)throw new Error(arguments+"is not a valid color representation.");n[0]=a/m[2],n[1]=a/m[2],n[2]=a/m[2],n[3]="number"==typeof b?b/m[3]:1,n=n.map(function(a){return Math.max(Math.min(a,1),0)})}return n},b.exports=d.Color},{"../core/constants":18,"../core/main":24,"./color_conversion":14}],17:[function(a,b,c){"use strict";var d=a("../core/main"),e=a("../core/constants");a("./p5.Color"),d.prototype.background=function(){return arguments[0]instanceof d.Image?this.image(arguments[0],0,0,this.width,this.height):this._renderer.background.apply(this._renderer,arguments),this},d.prototype.clear=function(){return this._renderer.clear(),this},d.prototype.colorMode=function(a,b,c,f,g){if(d._validateParameters("colorMode",arguments),a===e.RGB||a===e.HSB||a===e.HSL){this._colorMode=a;var h=this._colorMaxes[a];2===arguments.length?(h[0]=b,h[1]=b,h[2]=b,h[3]=b):4===arguments.length?(h[0]=b,h[1]=c,h[2]=f):5===arguments.length&&(h[0]=b,h[1]=c,h[2]=f,h[3]=g)}return this},d.prototype.fill=function(){return this._renderer._setProperty("_fillSet",!0),this._renderer._setProperty("_doFill",!0),this._renderer.fill.apply(this._renderer,arguments),this},d.prototype.noFill=function(){return this._renderer._setProperty("_doFill",!1),this},d.prototype.noStroke=function(){return this._renderer._setProperty("_doStroke",!1),this},d.prototype.stroke=function(){return this._renderer._setProperty("_strokeSet",!0),this._renderer._setProperty("_doStroke",!0),this._renderer.stroke.apply(this._renderer,arguments),this},b.exports=d},{"../core/constants":18,"../core/main":24,"./p5.Color":16}],18:[function(a,b,c){"use strict";var d=Math.PI;b.exports={P2D:"p2d",WEBGL:"webgl",ARROW:"default",CROSS:"crosshair",HAND:"pointer",MOVE:"move",TEXT:"text",WAIT:"wait",HALF_PI:d/2,PI:d,QUARTER_PI:d/4,TAU:2*d,TWO_PI:2*d,DEGREES:"degrees",RADIANS:"radians",DEG_TO_RAD:d/180,RAD_TO_DEG:180/d,CORNER:"corner",CORNERS:"corners",RADIUS:"radius",RIGHT:"right",LEFT:"left",CENTER:"center",TOP:"top",BOTTOM:"bottom",BASELINE:"alphabetic",POINTS:0,LINES:1,LINE_STRIP:3,LINE_LOOP:2,TRIANGLES:4,TRIANGLE_FAN:6,TRIANGLE_STRIP:5,QUADS:"quads",QUAD_STRIP:"quad_strip",CLOSE:"close",OPEN:"open",CHORD:"chord",PIE:"pie",PROJECT:"square",SQUARE:"butt",ROUND:"round",BEVEL:"bevel",MITER:"miter",RGB:"rgb",HSB:"hsb",HSL:"hsl",AUTO:"auto",ALT:18,BACKSPACE:8,CONTROL:17,DELETE:46,DOWN_ARROW:40,ENTER:13,ESCAPE:27,LEFT_ARROW:37,OPTION:18,RETURN:13,RIGHT_ARROW:39,SHIFT:16,TAB:9,UP_ARROW:38,BLEND:"source-over",ADD:"lighter",DARKEST:"darken",LIGHTEST:"lighten",DIFFERENCE:"difference",EXCLUSION:"exclusion",MULTIPLY:"multiply",SCREEN:"screen",REPLACE:"copy",OVERLAY:"overlay",HARD_LIGHT:"hard-light",SOFT_LIGHT:"soft-light",DODGE:"color-dodge",BURN:"color-burn",THRESHOLD:"threshold",GRAY:"gray",OPAQUE:"opaque",INVERT:"invert",POSTERIZE:"posterize",DILATE:"dilate",ERODE:"erode",BLUR:"blur",NORMAL:"normal",ITALIC:"italic",BOLD:"bold",_DEFAULT_TEXT_FILL:"#000000",_DEFAULT_LEADMULT:1.25,_CTX_MIDDLE:"middle",LINEAR:"linear",QUADRATIC:"quadratic",BEZIER:"bezier",CURVE:"curve",STROKE:"stroke",FILL:"fill",TEXTURE:"texture",IMMEDIATE:"immediate",NEAREST:"nearest",REPEAT:"repeat",CLAMP:"clamp",MIRROR:"mirror",LANDSCAPE:"landscape",PORTRAIT:"portrait",_DEFAULT_STROKE:"#000000",_DEFAULT_FILL:"#FFFFFF",GRID:"grid",AXES:"axes"}},{}],19:[function(a,b,c){"use strict";function d(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth||0}function e(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight||0}function f(a){if(!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled))throw new Error("Fullscreen not enabled in this browser.")
-;a.requestFullscreen?a.requestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullscreen?a.webkitRequestFullscreen():a.msRequestFullscreen&&a.msRequestFullscreen()}function g(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()}var h=a("./main"),i=a("./constants"),j=[i.ARROW,i.CROSS,i.HAND,i.MOVE,i.TEXT,i.WAIT];h.prototype._frameRate=0,h.prototype._lastFrameTime=window.performance.now(),h.prototype._targetFrameRate=60;var k=window.print;h.prototype.print=function(){arguments.length?console.log.apply(console,arguments):k()},h.prototype.frameCount=0,h.prototype.focused=document.hasFocus(),h.prototype.cursor=function(a,b,c){var d="auto",e=this._curElement.elt;if(j.indexOf(a)>-1)d=a;else if("string"==typeof a){var f="";b&&c&&"number"==typeof b&&"number"==typeof c&&(f=b+" "+c),d="http://"===a.substring(0,7)||"https://"===a.substring(0,8)?"url("+a+") "+f+", auto":/\.(cur|jpg|jpeg|gif|png|CUR|JPG|JPEG|GIF|PNG)$/.test(a)?"url("+a+") "+f+", auto":a}e.style.cursor=d},h.prototype.frameRate=function(a){return h._validateParameters("frameRate",arguments),"number"!=typeof a||a<0?this._frameRate:(this._setProperty("_targetFrameRate",a),this._runFrames(),this)},h.prototype.getFrameRate=function(){return this.frameRate()},h.prototype.setFrameRate=function(a){return this.frameRate(a)},h.prototype.noCursor=function(){this._curElement.elt.style.cursor="none"},h.prototype.displayWidth=screen.width,h.prototype.displayHeight=screen.height,h.prototype.windowWidth=d(),h.prototype.windowHeight=e(),h.prototype._onresize=function(a){this._setProperty("windowWidth",d()),this._setProperty("windowHeight",e());var b,c=this._isGlobal?window:this;"function"==typeof c.windowResized&&(void 0===(b=c.windowResized(a))||b||a.preventDefault())},h.prototype.width=0,h.prototype.height=0,h.prototype.fullscreen=function(a){if(h._validateParameters("fullscreen",arguments),void 0===a)return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;a?f(document.documentElement):g()},h.prototype.pixelDensity=function(a){h._validateParameters("pixelDensity",arguments);var b;return"number"==typeof a?(a!==this._pixelDensity&&(this._pixelDensity=a,this._pixelsDirty=!0),b=this,this.resizeCanvas(this.width,this.height,!0)):b=this._pixelDensity,b},h.prototype.displayDensity=function(){return window.devicePixelRatio},h.prototype.getURL=function(){return location.href},h.prototype.getURLPath=function(){return location.pathname.split("/").filter(function(a){return""!==a})},h.prototype.getURLParams=function(){for(var a,b=/[?&]([^&=]+)(?:[&=])([^&=]+)/gim,c={};null!=(a=b.exec(location.search));)a.index===b.lastIndex&&b.lastIndex++,c[a[1]]=a[2];return c},b.exports=h},{"./constants":18,"./main":24}],20:[function(a,b,c){"use strict";var d=a("./main");a("./constants");d._validateParameters=d._friendlyFileLoadError=function(){};var e=null,f="https://github.com/processing/p5.js/wiki/p5.js-overview#why-cant-i-assign-variables-using-p5-functions-and-variables-before-setup",g=function(){var b={},c=function(a){return Object.getOwnPropertyNames(a).filter(function(a){return"_"!==a[0]&&(!(a in b)&&(b[a]=!0,!0))}).map(function(b){var c;return c="function"==typeof a[b]?"function":b===b.toUpperCase()?"constant":"variable",{name:b,type:c}})};e=[].concat(c(d.prototype),c(a("./constants"))),e.sort(function(a,b){return b.name.length-a.name.length})},h=function(a,b){b||(b=console.log.bind(console)),e||g(),e.some(function(c){if(a.message&&null!==a.message.match("\\W?"+c.name+"\\W"))return b("Did you just try to use p5.js's "+c.name+("function"===c.type?"() ":" ")+c.type+"? If so, you may want to move it into your sketch's setup() function.\n\nFor more details, see: "+f),!0})};d.prototype._helpForMisusedAtTopLevelCode=h,"complete"!==document.readyState&&(window.addEventListener("error",h,!1),window.addEventListener("load",function(){window.removeEventListener("error",h,!1)})),b.exports=d},{"../../docs/reference/data.json":void 0,"./constants":18,"./main":24}],21:[function(a,b,c){"use strict";var d=a("./constants");b.exports={modeAdjust:function(a,b,c,e,f){return f===d.CORNER?{x:a,y:b,w:c,h:e}:f===d.CORNERS?{x:a,y:b,w:c-a,h:e-b}:f===d.RADIUS?{x:a-c,y:b-e,w:2*c,h:2*e}:f===d.CENTER?{x:a-.5*c,y:b-.5*e,w:c,h:e}:void 0}}},{"./constants":18}],22:[function(a,b,c){"use strict";var d=a("../core/main"),e=function(){window.mocha||(window.setup&&"function"==typeof window.setup||window.draw&&"function"==typeof window.draw)&&!d.instance&&new d};"complete"===document.readyState?e():window.addEventListener("load",e,!1)},{"../core/main":24}],23:[function(a,b,c){"use strict";var d=a("./main");d.prototype.exit=function(){throw new Error("exit() not implemented, see remove()")},d.prototype.pushStyle=function(){throw new Error("pushStyle() not used, see push()")},d.prototype.popStyle=function(){throw new Error("popStyle() not used, see pop()")},d.prototype.size=function(){var a="size() is not a valid p5 function, to set the size of the ";throw a+="drawing canvas, please use createCanvas() instead",new Error(a)},b.exports=d},{"./main":24}],24:[function(a,b,c){"use strict";a("./shim");var d=a("./constants"),e=function(a,b,c){"boolean"==typeof b&&void 0===c&&(c=b,b=void 0),this._setupDone=!1,this._pixelDensity=Math.ceil(window.devicePixelRatio)||1,this._userNode=b,this._curElement=null,this._elements=[],this._requestAnimId=0,this._preloadCount=0,this._isGlobal=!1,this._loop=!0,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._events.wheel=null,this._loadingScreenId="p5_loading",this._registeredMethods={};for(var d=Object.getOwnPropertyNames(e.prototype._registeredMethods),f=0;f=c-5)&&(this.redraw(),this._frameRate=1e3/(a-this._lastFrameTime),this._lastFrameTime=a,void 0!==this._updateMouseCoords&&this._updateMouseCoords()),this._loop&&(this._requestAnimId=window.requestAnimationFrame(this._draw))}.bind(this),this._runFrames=function(){this._updateInterval&&clearInterval(this._updateInterval)}.bind(this),this._setProperty=function(a,b){this[a]=b,this._isGlobal&&(window[a]=b)}.bind(this),this.remove=function(){var a=document.getElementById(this._loadingScreenId);if(a&&(a.parentNode.removeChild(a),this._incrementPreload()),this._curElement){this._loop=!1,this._requestAnimId&&window.cancelAnimationFrame(this._requestAnimId);for(var b in this._events)window.removeEventListener(b,this._events[b]);for(var c=0;c-1?f.readAsText(e):f.readAsDataURL(e)}},this)):console.log("The File APIs are not fully supported in this browser."),this},g.Element.prototype._setProperty=function(a,b){this[a]=b},b.exports=g.Element},{"./main":24}],26:[function(a,b,c){"use strict";var d=a("./main"),e=a("./constants");d.Graphics=function(a,b,c,f){var g=c||e.P2D;this.canvas=document.createElement("canvas"),(f._userNode||document.body).appendChild(this.canvas),d.Element.call(this,this.canvas,f,!1);for(var h in d.prototype)this[h]||("function"==typeof d.prototype[h]?this[h]=d.prototype[h].bind(this):this[h]=d.prototype[h]);return d.prototype._initializeInstanceVariables.apply(this),this.width=a,this.height=b,this._pixelDensity=f._pixelDensity,g===e.WEBGL?this._renderer=new d.RendererGL(this.canvas,this,!1):this._renderer=new d.Renderer2D(this.canvas,this,!1),f._elements.push(this),this._renderer.resize(a,b),this._renderer._applyDefaults(),this},d.Graphics.prototype=Object.create(d.Element.prototype),d.Graphics.prototype.remove=function(){this.elt.parentNode&&this.elt.parentNode.removeChild(this.elt);var a=this._pInst._elements.indexOf(this);-1!==a&&this._pInst._elements.splice(a,1);for(var b in this._events)this.elt.removeEventListener(b,this._events[b])},b.exports=d.Graphics},{"./constants":18,"./main":24}],27:[function(a,b,c){"use strict";function d(a){var b=0,c=0;if(a.offsetParent)do{b+=a.offsetLeft,c+=a.offsetTop}while(a=a.offsetParent);else b+=a.offsetLeft,c+=a.offsetTop;return[b,c]}var e=a("./main"),f=a("../core/constants");e.Renderer=function(a,b,c){e.Element.call(this,a,b),this.canvas=a,c?(this._isMainCanvas=!0,this._pInst._setProperty("_curElement",this),this._pInst._setProperty("canvas",this.canvas),this._pInst._setProperty("width",this.width),this._pInst._setProperty("height",this.height)):(this.canvas.style.display="none",this._styles=[]),this._textSize=12,this._textLeading=15,this._textFont="sans-serif",this._textStyle=f.NORMAL,this._textAscent=null,this._textDescent=null,this._textAlign=f.LEFT,this._textBaseline=f.BASELINE,this._rectMode=f.CORNER,this._ellipseMode=f.CENTER,this._curveTightness=0,this._imageMode=f.CORNER,this._tint=null,this._doStroke=!0,this._doFill=!0,this._strokeSet=!1,this._fillSet=!1},e.Renderer.prototype=Object.create(e.Element.prototype),e.Renderer.prototype.push=function(){return{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,_textSize:this._textSize,_textAlign:this._textAlign,_textBaseline:this._textBaseline,_textStyle:this._textStyle}}},e.Renderer.prototype.pop=function(a){a.properties&&Object.assign(this,a.properties)},e.Renderer.prototype.resize=function(a,b){this.width=a,this.height=b,this.elt.width=a*this._pInst._pixelDensity,this.elt.height=b*this._pInst._pixelDensity,this.elt.style.width=a+"px",this.elt.style.height=b+"px",this._isMainCanvas&&(this._pInst._setProperty("width",this.width),this._pInst._setProperty("height",this.height))},e.Renderer.prototype.textLeading=function(a){return"number"==typeof a?(this._setProperty("_textLeading",a),this._pInst):this._textLeading},e.Renderer.prototype.textSize=function(a){return"number"==typeof a?(this._setProperty("_textSize",a),this._setProperty("_textLeading",a*f._DEFAULT_LEADMULT),this._applyTextProperties()):this._textSize},e.Renderer.prototype.textStyle=function(a){return a?(a!==f.NORMAL&&a!==f.ITALIC&&a!==f.BOLD||this._setProperty("_textStyle",a),this._applyTextProperties()):this._textStyle},e.Renderer.prototype.textAscent=function(){return null===this._textAscent&&this._updateTextMetrics(),this._textAscent},e.Renderer.prototype.textDescent=function(){return null===this._textDescent&&this._updateTextMetrics(),this._textDescent},e.Renderer.prototype.textAlign=function(a,b){return void 0!==a?(this._setProperty("_textAlign",a),void 0!==b&&this._setProperty("_textBaseline",b),this._applyTextProperties()):{horizontal:this._textAlign,vertical:this._textBaseline}},e.Renderer.prototype.text=function(a,b,c,d,e){var g,h,i,j,k,l,m,n,o,p=this._pInst,q=Number.MAX_VALUE;if((this._doFill||this._doStroke)&&void 0!==a){if("string"!=typeof a&&(a=a.toString()),a=a.replace(/(\t)/g," "),g=a.split("\n"),void 0!==d){for(o=0,i=0;id?(k=n[h]+" ",o+=p.textLeading()):k=l;switch(this._rectMode===f.CENTER&&(b-=d/2,c-=e/2),this._textAlign){case f.CENTER:b+=d/2;break;case f.RIGHT:b+=d}var r=!1;if(void 0!==e){switch(this._textBaseline){case f.BOTTOM:c+=e-o;break;case f.CENTER:c+=(e-o)/2;break;case f.BASELINE:r=!0,this._textBaseline=f.TOP}q=c+e-p.textAscent()}for(i=0;id&&k.length>0?(this._renderText(p,k,b,c,q),k=n[h]+" ",c+=p.textLeading()):k=l;this._renderText(p,k,b,c,q),c+=p.textLeading(),r&&(this._textBaseline=f.BASELINE)}}else{var s=0,t=p.textAlign().vertical;for(t===f.CENTER?s=(g.length-1)*p.textLeading()/2:t===f.BOTTOM&&(s=(g.length-1)*p.textLeading()),j=0;j0&&(l=k.width/a.width),this.drawingContext.drawImage(k,l*b,l*c,l*e,l*f,g,h,i,j)}catch(a){if("NS_ERROR_NOT_AVAILABLE"!==a.name)throw a}this._pInst._pixelsDirty=!0},d.Renderer2D.prototype._getTintedImageCanvas=function(a){if(!a.canvas)return a;var b=f._toPixels(a.canvas),c=document.createElement("canvas");c.width=a.canvas.width,c.height=a.canvas.height;for(var d=c.getContext("2d"),e=d.createImageData(a.canvas.width,a.canvas.height),g=e.data,h=0;h=this.width||b>=this.height)return[0,0,0,255];var f=this._pInst||this,g=f._pixelDensity;a=Math.floor(a),b=Math.floor(b),c=Math.floor(c),e=Math.floor(e);var h=a*g,i=b*g;if(1!==c||1!==e||this instanceof d.RendererGL){var j=Math.min(c,f.width),k=Math.min(e,f.height),l=j*g,m=k*g,n=new d.Image(j,k);return n.canvas.getContext("2d").drawImage(this.canvas,h,i,l,m,0,0,j,k),n}var o,p;return f._pixelsDirty?(o=this.drawingContext.getImageData(h,i,1,1).data,p=0):(o=f.pixels,p=4*(h+i*this.width*g)),[o[p+0],o[p+1],o[p+2],o[p+3]]},d.Renderer2D.prototype.loadPixels=function(){var a=this._pInst||this;if(a._pixelsDirty){a._pixelsDirty=!1;var b=a._pixelDensity,c=this.width*b,d=this.height*b,e=this.drawingContext.getImageData(0,0,c,d);a._setProperty("imageData",e),a._setProperty("pixels",e.data)}},d.Renderer2D.prototype.set=function(a,b,c){a=Math.floor(a),b=Math.floor(b);var e=this._pInst||this;if(c instanceof d.Image)this.drawingContext.save(),this.drawingContext.setTransform(1,0,0,1,0,0),this.drawingContext.scale(e._pixelDensity,e._pixelDensity),this.drawingContext.drawImage(c.canvas,a,b),this.drawingContext.restore(),e._pixelsDirty=!0;else{var f=0,g=0,h=0,i=0,j=4*(b*e._pixelDensity*(this.width*e._pixelDensity)+a*e._pixelDensity);if(e.imageData&&!e._pixelsDirty||e.loadPixels.call(e),"number"==typeof c)jl;)m=Math.min(g-f,e.HALF_PI),n.push(this._acuteArcToBezier(f,m)),f+=m;return this._doFill&&(i.beginPath(),n.forEach(function(c,d){0===d&&i.moveTo(a+c.ax*j,b+c.ay*k),i.bezierCurveTo(a+c.bx*j,b+c.by*k,a+c.cx*j,b+c.cy*k,a+c.dx*j,b+c.dy*k)}),h!==e.PIE&&null!=h||i.lineTo(a,b),i.closePath(),i.fill()),this._doStroke&&(i.beginPath(),n.forEach(function(c,d){0===d&&i.moveTo(a+c.ax*j,b+c.ay*k),i.bezierCurveTo(a+c.bx*j,b+c.by*k,a+c.cx*j,b+c.cy*k,a+c.dx*j,b+c.dy*k)}),h===e.PIE?(i.lineTo(a,b),i.closePath()):h===e.CHORD&&i.closePath(),i.stroke()),this},d.Renderer2D.prototype.ellipse=function(a){var b=this.drawingContext,c=this._doFill,d=this._doStroke,e=a[0],f=a[1],h=a[2],i=a[3];if(c&&!d){if(this._getFill()===g)return this}else if(!c&&d&&this._getStroke()===g)return this;var j=.5522847498,k=h/2*j,l=i/2*j,m=e+h,n=f+i,o=e+h/2,p=f+i/2;b.beginPath(),b.moveTo(e,p),b.bezierCurveTo(e,p-l,o-k,f,o,f),b.bezierCurveTo(o+k,f,m,p-l,m,p),b.bezierCurveTo(m,p+l,o+k,n,o,n),b.bezierCurveTo(o-k,n,e,p+l,e,p),b.closePath(),c&&b.fill(),d&&b.stroke()},d.Renderer2D.prototype.line=function(a,b,c,d){var e=this.drawingContext;return this._doStroke?this._getStroke()===g?this:(e.lineWidth%2==1&&e.translate(.5,.5),e.beginPath(),e.moveTo(a,b),e.lineTo(c,d),e.stroke(),e.lineWidth%2==1&&e.translate(-.5,-.5),this):this},d.Renderer2D.prototype.point=function(a,b){var c=this.drawingContext;if(!this._doStroke)return this;if(this._getStroke()===g)return this;var d=this._getStroke(),f=this._getFill();a=Math.round(a),b=Math.round(b),this._setFill(d),c.lineWidth>1?(c.beginPath(),c.arc(a,b,c.lineWidth/2,0,e.TWO_PI,!1),c.fill()):c.fillRect(a,b,1,1),this._setFill(f)},d.Renderer2D.prototype.quad=function(a,b,c,d,e,f,h,i){var j=this.drawingContext,k=this._doFill,l=this._doStroke;if(k&&!l){if(this._getFill()===g)return this}else if(!k&&l&&this._getStroke()===g)return this;return j.beginPath(),j.moveTo(a,b),j.lineTo(c,d),j.lineTo(e,f),j.lineTo(h,i),j.closePath(),k&&j.fill(),l&&j.stroke(),this},d.Renderer2D.prototype.rect=function(a){var b=a[0],c=a[1],d=a[2],e=a[3],f=a[4],h=a[5],i=a[6],j=a[7],k=this.drawingContext,l=this._doFill,m=this._doStroke;if(l&&!m){if(this._getFill()===g)return this}else if(!l&&m&&this._getStroke()===g)return this;if(this._doStroke&&k.lineWidth%2==1&&k.translate(.5,.5),k.beginPath(),void 0===f)k.rect(b,c,d,e);else{void 0===h&&(h=f),void 0===i&&(i=h),void 0===j&&(j=i);var n=d/2,o=e/2;d<2*f&&(f=n),e<2*f&&(f=o),d<2*h&&(h=n),e<2*h&&(h=o),d<2*i&&(i=n),e<2*i&&(i=o),d<2*j&&(j=n),e<2*j&&(j=o),k.beginPath(),k.moveTo(b+f,c),k.arcTo(b+d,c,b+d,c+e,h),k.arcTo(b+d,c+e,b,c+e,i),k.arcTo(b,c+e,b,c,j),k.arcTo(b,c,b+d,c,f),k.closePath()}return this._doFill&&k.fill(),this._doStroke&&k.stroke(),this._doStroke&&k.lineWidth%2==1&&k.translate(-.5,-.5),this},d.Renderer2D.prototype.triangle=function(a){var b=this.drawingContext,c=this._doFill,d=this._doStroke,e=a[0],f=a[1],h=a[2],i=a[3],j=a[4],k=a[5];if(c&&!d){if(this._getFill()===g)return this}else if(!c&&d&&this._getStroke()===g)return this;b.beginPath(),b.moveTo(e,f),b.lineTo(h,i),b.lineTo(j,k),b.closePath(),c&&b.fill(),d&&b.stroke()},d.Renderer2D.prototype.endShape=function(a,b,c,d,f,g,h){if(0===b.length)return this;if(!this._doStroke&&!this._doFill)return this;var i,j=a===e.CLOSE;j&&!g&&b.push(b[0]);var k,l,m=b.length;if(!c||h!==e.POLYGON&&null!==h)if(!d||h!==e.POLYGON&&null!==h)if(!f||h!==e.POLYGON&&null!==h)if(h===e.POINTS)for(k=0;k2){for(this.drawingContext.beginPath(),k=2;k3)for(k=0;k+13){var n=[],o=1-this._curveTightness;for(this.drawingContext.beginPath(),this.drawingContext.moveTo(b[1][0],b[1][1]),k=1;k+2=f))return a.push(),this._isOpenType()?this._textFont._renderPath(b,c,d,{renderer:this}):(this._doStroke&&this._strokeSet&&this.drawingContext.strokeText(b,c,d),this._doFill&&(this._fillSet||this._setFill(e._DEFAULT_TEXT_FILL),this.drawingContext.fillText(b,c,d))),a.pop(),this._pInst._pixelsDirty=!0,a},d.Renderer2D.prototype.textWidth=function(a){return this._isOpenType()?this._textFont._textWidth(a,this._textSize):this.drawingContext.measureText(a).width},d.Renderer2D.prototype._applyTextProperties=function(){var a,b=this._pInst;return this._setProperty("_textAscent",null),this._setProperty("_textDescent",null),a=this._textFont,this._isOpenType()&&(a=this._textFont.font.familyName,this._setProperty("_textStyle",this._textFont.font.styleName)),this.drawingContext.font=(this._textStyle||"normal")+" "+(this._textSize||12)+"px "+(a||"sans-serif"),this.drawingContext.textAlign=this._textAlign,this._textBaseline===e.CENTER?this.drawingContext.textBaseline=e._CTX_MIDDLE:this.drawingContext.textBaseline=this._textBaseline,b},d.Renderer2D.prototype.push=function(){return this.drawingContext.save(),d.Renderer.prototype.push.apply(this)},d.Renderer2D.prototype.pop=function(a){this.drawingContext.restore(),this._cachedFillStyle=this.drawingContext.fillStyle,this._cachedStrokeStyle=this.drawingContext.strokeStyle,d.Renderer.prototype.pop.call(this,a)},b.exports=d.Renderer2D},{"../image/filters":42,"./constants":18,"./main":24,"./p5.Renderer":27}],29:[function(a,b,c){"use strict";var d=a("./main"),e=a("./constants");a("./p5.Graphics"),a("./p5.Renderer2D"),a("../webgl/p5.RendererGL");var f="defaultCanvas0",g="p5Canvas";d.prototype.createCanvas=function(a,b,c){d._validateParameters("createCanvas",arguments);var h,i=c||e.P2D;if(i===e.WEBGL){if(h=document.getElementById(f)){h.parentNode.removeChild(h);var j=this._renderer;this._elements=this._elements.filter(function(a){return a!==j})}h=document.createElement("canvas"),h.id=f,h.classList.add(g)}else if(this._defaultGraphicsCreated)h=this.canvas;else{h=document.createElement("canvas");for(var k=0;document.getElementById("defaultCanvas"+k);)k++;f="defaultCanvas"+k,h.id=f,h.classList.add(g)}return this._setupDone||(h.dataset.hidden=!0,h.style.visibility="hidden"),this._userNode?this._userNode.appendChild(h):document.body.appendChild(h),i===e.WEBGL?(this._setProperty("_renderer",new d.RendererGL(h,this,!0)),this._elements.push(this._renderer)):this._defaultGraphicsCreated||(this._setProperty("_renderer",new d.Renderer2D(h,this,!0)),this._defaultGraphicsCreated=!0,this._elements.push(this._renderer)),this._renderer.resize(a,b),this._renderer._applyDefaults(),this._renderer},d.prototype.resizeCanvas=function(a,b,c){if(d._validateParameters("resizeCanvas",arguments),this._renderer){var e={};for(var f in this.drawingContext){var g=this.drawingContext[f];"object"!=typeof g&&"function"!=typeof g&&(e[f]=g)}this._renderer.resize(a,b),this.width=a,this.height=b;for(var h in e)try{this.drawingContext[h]=e[h]}catch(a){}c||this.redraw()}},d.prototype.noCanvas=function(){this.canvas&&this.canvas.parentNode.removeChild(this.canvas)},d.prototype.createGraphics=function(a,b,c){return d._validateParameters("createGraphics",arguments),new d.Graphics(a,b,c,this)},d.prototype.blendMode=function(a){if(d._validateParameters("blendMode",arguments),a!==e.BLEND&&a!==e.DARKEST&&a!==e.LIGHTEST&&a!==e.DIFFERENCE&&a!==e.MULTIPLY&&a!==e.EXCLUSION&&a!==e.SCREEN&&a!==e.REPLACE&&a!==e.OVERLAY&&a!==e.HARD_LIGHT&&a!==e.SOFT_LIGHT&&a!==e.DODGE&&a!==e.BURN&&a!==e.ADD&&a!==e.NORMAL)throw new Error("Mode "+a+" not recognized.");this._renderer.blendMode(a)},b.exports=d},{"../webgl/p5.RendererGL":74,"./constants":18,"./main":24,"./p5.Graphics":26,"./p5.Renderer2D":28}],30:[function(a,b,c){"use strict";var d=a("../main"),e=a("../constants"),f=a("../helpers");a("../error_helpers"),d.prototype.arc=function(a,b,c,g,h,i,j,k){if(d._validateParameters("arc",arguments),!this._renderer._doStroke&&!this._renderer._doFill)return this;for(h=this._toRadians(h),i=this._toRadians(i);h<0;)h+=e.TWO_PI;for(;i<0;)i+=e.TWO_PI;void 0!==h&&void 0!==i&&(i.toFixed(10)===h.toFixed(10)||Math.abs(i-h)===e.TWO_PI?(h%=e.TWO_PI,i%=e.TWO_PI,h+=e.TWO_PI):Math.abs(i-h)>e.TWO_PI&&(h%=e.TWO_PI,i%=e.TWO_PI,i+=e.TWO_PI)),h<=e.HALF_PI?h=Math.atan(c/g*Math.tan(h)):h>e.HALF_PI&&h<=3*e.HALF_PI&&(h=Math.atan(c/g*Math.tan(h))+e.PI),i<=e.HALF_PI?i=Math.atan(c/g*Math.tan(i)):i>e.HALF_PI&&i<=3*e.HALF_PI&&(i=Math.atan(c/g*Math.tan(i))+e.PI),h>i&&(i+=e.TWO_PI),c=Math.abs(c),g=Math.abs(g);var l=f.modeAdjust(a,b,c,g,this._renderer._ellipseMode);return this._renderer.arc(l.x,l.y,l.w,l.h,h,i,j,k),this},d.prototype.ellipse=function(a,b,c,e,g){if(d._validateParameters("ellipse",arguments),!this._renderer._doStroke&&!this._renderer._doFill)return this;c<0&&(c=Math.abs(c)),void 0===e?e=c:e<0&&(e=Math.abs(e));var h=f.modeAdjust(a,b,c,e,this._renderer._ellipseMode);return this._renderer.ellipse([h.x,h.y,h.w,h.h,g]),this},d.prototype.line=function(){return d._validateParameters("line",arguments),this._renderer._doStroke&&this._renderer.line.apply(this._renderer,arguments),this},d.prototype.point=function(){return d._validateParameters("point",arguments),this._renderer._doStroke&&this._renderer.point.apply(this._renderer,arguments),this},d.prototype.quad=function(){return d._validateParameters("quad",arguments),(this._renderer._doStroke||this._renderer._doFill)&&this._renderer.quad.apply(this._renderer,arguments),this},d.prototype.rect=function(){if(d._validateParameters("rect",arguments),this._renderer._doStroke||this._renderer._doFill){for(var a=f.modeAdjust(arguments[0],arguments[1],arguments[2],arguments[3],this._renderer._rectMode),b=[a.x,a.y,a.w,a.h],c=4;c0))throw new Error("vertex() must be used once before calling quadraticVertex()");k=!0;for(var b=[],c=0;cn||Math.abs(this.accelerationY-this.pAccelerationY)>n||Math.abs(this.accelerationZ-this.pAccelerationZ)>n)&&a();var b=this.deviceTurned||window.deviceTurned;if("function"==typeof b){var c=this.rotationX+180,d=this.pRotationX+180,p=h+180;c-d>0&&c-d<270||c-d<-270?k="clockwise":(c-d<0||c-d>270)&&(k="counter-clockwise"),k!==e&&(p=c),Math.abs(c-p)>90&&Math.abs(c-p)<270&&(p=c,this._setProperty("turnAxis","X"),b()),e=k,h=p-180;var q=this.rotationY+180,r=this.pRotationY+180,s=i+180;q-r>0&&q-r<270||q-r<-270?l="clockwise":(q-r<0||q-this.pRotationY>270)&&(l="counter-clockwise"),l!==f&&(s=q),Math.abs(q-s)>90&&Math.abs(q-s)<270&&(s=q,this._setProperty("turnAxis","Y"),b()),f=l,i=s-180,this.rotationZ-this.pRotationZ>0&&this.rotationZ-this.pRotationZ<270||this.rotationZ-this.pRotationZ<-270?m="clockwise":(this.rotationZ-this.pRotationZ<0||this.rotationZ-this.pRotationZ>270)&&(m="counter-clockwise"),m!==g&&(j=this.rotationZ),Math.abs(this.rotationZ-j)>90&&Math.abs(this.rotationZ-j)<270&&(j=this.rotationZ,this._setProperty("turnAxis","Z"),b()),g=m,this._setProperty("turnAxis",void 0)}var t=this.deviceShaken||window.deviceShaken;if("function"==typeof t){var u,v;null!==this.pAccelerationX&&(u=Math.abs(this.accelerationX-this.pAccelerationX),v=Math.abs(this.accelerationY-this.pAccelerationY)),u+v>o&&t()}},b.exports=d},{"../core/main":24}],39:[function(a,b,c){"use strict";function d(){for(var a in f)if(f.hasOwnProperty(a)&&!0===f[a])return!0;return!1}var e=a("../core/main"),f={};e.prototype.isKeyPressed=!1,e.prototype.keyIsPressed=!1,e.prototype.key="",e.prototype.keyCode=0,e.prototype._onkeydown=function(a){if(!f[a.which]){this._setProperty("isKeyPressed",!0),this._setProperty("keyIsPressed",!0),this._setProperty("keyCode",a.which),f[a.which]=!0,this._setProperty("key",a.key||String.fromCharCode(a.which)||a.which);var b=this.keyPressed||window.keyPressed;if("function"==typeof b&&!a.charCode){!1===b(a)&&a.preventDefault()}}},e.prototype._onkeyup=function(a){var b=this.keyReleased||window.keyReleased;if(f[a.which]=!1,d()||(this._setProperty("isKeyPressed",!1),this._setProperty("keyIsPressed",!1)),this._setProperty("_lastKeyCodeTyped",null),this._setProperty("key",a.key||String.fromCharCode(a.which)||a.which),this._setProperty("keyCode",a.which),"function"==typeof b){!1===b(a)&&a.preventDefault()}},e.prototype._onkeypress=function(a){if(a.which!==this._lastKeyCodeTyped){this._setProperty("keyCode",a.which),this._setProperty("_lastKeyCodeTyped",a.which),this._setProperty("key",String.fromCharCode(a.which));var b=this.keyTyped||window.keyTyped;if("function"==typeof b){!1===b(a)&&a.preventDefault()}}},e.prototype._onblur=function(a){f={}},e.prototype.keyIsDown=function(a){return e._validateParameters("keyIsDown",arguments),f[a]},b.exports=e},{"../core/main":24}],40:[function(a,b,c){"use strict";function d(a,b,c,d){d&&!d.clientX&&(d.touches?d=d.touches[0]:d.changedTouches&&(d=d.changedTouches[0]));var e=a.getBoundingClientRect(),f=a.scrollWidth/b,g=a.scrollHeight/c;return{x:(d.clientX-e.left)/f,y:(d.clientY-e.top)/g,winX:d.clientX,winY:d.clientY,id:d.identifier}}var e=a("../core/main"),f=a("../core/constants");e.prototype._hasMouseInteracted=!1,e.prototype.mouseX=0,e.prototype.mouseY=0,e.prototype.pmouseX=0,e.prototype.pmouseY=0,e.prototype.winMouseX=0,e.prototype.winMouseY=0,e.prototype.pwinMouseX=0,e.prototype.pwinMouseY=0,e.prototype.mouseButton=0,e.prototype.mouseIsPressed=!1,e.prototype._updateNextMouseCoords=function(a){if(null!==this._curElement&&(!a.touches||a.touches.length>0)){var b=d(this._curElement.elt,this.width,this.height,a);this._setProperty("mouseX",b.x),this._setProperty("mouseY",b.y),this._setProperty("winMouseX",b.winX),this._setProperty("winMouseY",b.winY)}this._hasMouseInteracted||(this._updateMouseCoords(),this._setProperty("_hasMouseInteracted",!0))},e.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)},e.prototype._setMouseButton=function(a){1===a.button?this._setProperty("mouseButton",f.CENTER):2===a.button?this._setProperty("mouseButton",f.RIGHT):this._setProperty("mouseButton",f.LEFT)},e.prototype._onmousemove=function(a){var b=this._isGlobal?window:this;this._updateNextMouseCoords(a),this.mouseIsPressed?"function"==typeof b.mouseDragged?!1===b.mouseDragged(a)&&a.preventDefault():"function"==typeof b.touchMoved&&!1===b.touchMoved(a)&&a.preventDefault():"function"==typeof b.mouseMoved&&!1===b.mouseMoved(a)&&a.preventDefault()},e.prototype._onmousedown=function(a){var b=this._isGlobal?window:this;this._setProperty("mouseIsPressed",!0),this._setMouseButton(a),this._updateNextMouseCoords(a),"function"==typeof b.mousePressed?!1===b.mousePressed(a)&&a.preventDefault():"function"==typeof b.touchStarted&&!1===b.touchStarted(a)&&a.preventDefault()},e.prototype._onmouseup=function(a){var b=this._isGlobal?window:this;this._setProperty("mouseIsPressed",!1),
-"function"==typeof b.mouseReleased?!1===b.mouseReleased(a)&&a.preventDefault():"function"==typeof b.touchEnded&&!1===b.touchEnded(a)&&a.preventDefault()},e.prototype._ondragend=e.prototype._onmouseup,e.prototype._ondragover=e.prototype._onmousemove,e.prototype._onclick=function(a){var b=this._isGlobal?window:this;if("function"==typeof b.mouseClicked){!1===b.mouseClicked(a)&&a.preventDefault()}},e.prototype._ondblclick=function(a){var b=this._isGlobal?window:this;if("function"==typeof b.doubleClicked){!1===b.doubleClicked(a)&&a.preventDefault()}},e.prototype._mouseWheelDeltaY=0,e.prototype._pmouseWheelDeltaY=0,e.prototype._onwheel=function(a){var b=this._isGlobal?window:this;if(this._setProperty("_mouseWheelDeltaY",a.deltaY),"function"==typeof b.mouseWheel){a.delta=a.deltaY;!1===b.mouseWheel(a)&&a.preventDefault()}},b.exports=e},{"../core/constants":18,"../core/main":24}],41:[function(a,b,c){"use strict";function d(a,b,c,d,e){e=e||0;var f=a.getBoundingClientRect(),g=a.scrollWidth/b,h=a.scrollHeight/c,i=d.touches[e]||d.changedTouches[e];return{x:(i.clientX-f.left)/g,y:(i.clientY-f.top)/h,winX:i.clientX,winY:i.clientY,id:i.identifier}}var e=a("../core/main");e.prototype.touches=[],e.prototype._updateTouchCoords=function(a){if(null!==this._curElement){for(var b=[],c=0;c=e)break;x=0}for(F=x;F=e);F++){var H=m[t+C];G=j[F],s+=G[(-16777216&H)>>>24],p+=G[(16711680&H)>>16],q+=G[(65280&H)>>8],r+=G[255&H],o+=i[F],t++}u=C+D,y[u]=s/o,z[u]=p/o,A[u]=q/o,B[u]=r/o}C+=e}for(C=0,v=-g,w=v*e,E=0;E=k)break;x=0,u=v,t=D+w}for(F=x;F=k);F++)G=j[F],s+=G[y[t]],p+=G[z[t]],q+=G[A[t]],r+=G[B[t]],o+=i[F],u++,t+=e;m[D+C]=s/o<<24|p/o<<16|q/o<<8|r/o}C+=e,w+=e,v++}f._setPixels(c,m)}var f={};f._toPixels=function(a){return a instanceof ImageData?a.data:a.getContext("2d").getImageData(0,0,a.width,a.height).data},f._getARGB=function(a,b){var c=4*b;return a[c+3]<<24&4278190080|a[c]<<16&16711680|a[c+1]<<8&65280|255&a[c+2]},f._setPixels=function(a,b){for(var c=0,d=0,e=a.length;d>>16,a[c+1]=(65280&b[d])>>>8,a[c+2]=255&b[d],a[c+3]=(4278190080&b[d])>>>24},f._toImageData=function(a){return a instanceof ImageData?a:a.getContext("2d").getImageData(0,0,a.width,a.height)},f._createImageData=function(a,b){return f._tmpCanvas=document.createElement("canvas"),f._tmpCtx=f._tmpCanvas.getContext("2d"),this._tmpCtx.createImageData(a,b)},f.apply=function(a,b,c){var d=a.getContext("2d"),e=d.getImageData(0,0,a.width,a.height),f=b(e,c);f instanceof ImageData?d.putImageData(f,0,0,0,0,a.width,a.height):d.putImageData(e,0,0,0,0,a.width,a.height)},f.threshold=function(a,b){var c=f._toPixels(a);void 0===b&&(b=.5);for(var d=Math.floor(255*b),e=0;e=d?255:0,c[e]=c[e+1]=c[e+2]=g}},f.gray=function(a){for(var b=f._toPixels(a),c=0;c255)throw new Error("Level must be greater than 2 and less than 255 for posterize");for(var d=b-1,e=0;e>8)/d,c[e+1]=255*(h*b>>8)/d,c[e+2]=255*(i*b>>8)/d}},f.dilate=function(a){for(var b,c,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t=f._toPixels(a),u=0,v=t.length?t.length/4:0,w=new Int32Array(v);u=c&&(h=u),j<0&&(j=0),k>=v&&(k=u),n=f._getARGB(t,j),m=f._getARGB(t,i),o=f._getARGB(t,k),l=f._getARGB(t,h),g=77*(d>>16&255)+151*(d>>8&255)+28*(255&d),q=77*(m>>16&255)+151*(m>>8&255)+28*(255&m),p=77*(l>>16&255)+151*(l>>8&255)+28*(255&l),r=77*(n>>16&255)+151*(n>>8&255)+28*(255&n),s=77*(o>>16&255)+151*(o>>8&255)+28*(255&o),q>g&&(e=m,g=q),p>g&&(e=l,g=p),r>g&&(e=n,g=r),s>g&&(e=o,g=s),w[u++]=e;f._setPixels(t,w)},f.erode=function(a){for(var b,c,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t=f._toPixels(a),u=0,v=t.length?t.length/4:0,w=new Int32Array(v);u=c&&(h=u),j<0&&(j=0),k>=v&&(k=u),n=f._getARGB(t,j),m=f._getARGB(t,i),o=f._getARGB(t,k),l=f._getARGB(t,h),g=77*(d>>16&255)+151*(d>>8&255)+28*(255&d),q=77*(m>>16&255)+151*(m>>8&255)+28*(255&m),p=77*(l>>16&255)+151*(l>>8&255)+28*(255&l),r=77*(n>>16&255)+151*(n>>8&255)+28*(255&n),s=77*(o>>16&255)+151*(o>>8&255)+28*(255&o),q=1&&(b=e[0]),e.length>=2&&(c=e[1]),c=c||d.prototype._checkFileExtension(b,c)[1]||"png";var f;switch(c){default:f="image/png";break;case"jpeg":case"jpg":f="image/jpeg"}a.toBlob(function(a){d.prototype.downloadFile(a,b,c)},f)},d.prototype.saveFrames=function(a,b,c,f,g){d._validateParameters("saveFrames",arguments);var h=c||3;h=d.prototype.constrain(h,0,15),h*=1e3;var i=f||15;i=d.prototype.constrain(i,0,22);var j=0,k=d.prototype._makeFrame,l=this._curElement.elt,m=setInterval(function(){k(a+j,b,l),j++},1e3/i);setTimeout(function(){if(clearInterval(m),g)g(e);else for(var a=0;a0&&a0&&this.loadPixels(),this.setModified(!0),this._pixelsDirty=!0},d.Image.prototype.copy=function(){var a,b,c,e,f,g,h,i,j;if(9===arguments.length)a=arguments[0],b=arguments[1],c=arguments[2],e=arguments[3],f=arguments[4],g=arguments[5],h=arguments[6],i=arguments[7],j=arguments[8];else{if(8!==arguments.length)throw new Error("Signature not supported");a=this,b=arguments[0],c=arguments[1],e=arguments[2],f=arguments[3],g=arguments[4],h=arguments[5],i=arguments[6],j=arguments[7]}d.Renderer2D._copyHelper(this,a,b,c,e,f,g,h,i,j),this._pixelsDirty=!0},d.Image.prototype.mask=function(a){void 0===a&&(a=this);var b=this.drawingContext.globalCompositeOperation,c=1;a instanceof d.Renderer&&(c=a._pInst._pixelDensity);var e=[a,0,0,c*a.width,c*a.height,0,0,this.width,this.height];this.drawingContext.globalCompositeOperation="destination-in",d.Image.prototype.copy.apply(this,e),this.drawingContext.globalCompositeOperation=b,this.setModified(!0)},d.Image.prototype.filter=function(a,b){e.apply(this.canvas,e[a.toLowerCase()],b),this.setModified(!0)},d.Image.prototype.blend=function(){d.prototype.blend.apply(this,arguments),this.setModified(!0)},d.Image.prototype.setModified=function(a){this._modified=a},d.Image.prototype.isModified=function(){return this._modified},d.Image.prototype.save=function(a,b){d.prototype.saveCanvas(this.canvas,a,b)},b.exports=d.Image},{"../core/main":24,"./filters":42}],46:[function(a,b,c){"use strict";var d=a("../core/main"),e=a("./filters");a("../color/p5.Color"),d.prototype.pixels=[],d.prototype.blend=function(){d._validateParameters("blend",arguments),this._renderer?this._renderer.blend.apply(this._renderer,arguments):d.Renderer2D.prototype.blend.apply(this,arguments)},d.prototype.copy=function(){d._validateParameters("copy",arguments),d.Renderer2D.prototype.copy.apply(this._renderer,arguments)},d.prototype.filter=function(a,b){d._validateParameters("filter",arguments),void 0!==this.canvas?e.apply(this.canvas,e[a.toLowerCase()],b):e.apply(this.elt,e[a.toLowerCase()],b)},d.prototype.get=function(a,b,c,d){return this._renderer.get(a,b,c,d)},d.prototype.loadPixels=function(){d._validateParameters("loadPixels",arguments),this._renderer.loadPixels()},d.prototype.set=function(a,b,c){this._renderer.set(a,b,c)},d.prototype.updatePixels=function(a,b,c,e){d._validateParameters("updatePixels",arguments),0!==this.pixels.length&&this._renderer.updatePixels(a,b,c,e)},b.exports=d},{"../color/p5.Color":16,"../core/main":24,"./filters":42}],47:[function(a,b,c){"use strict";function d(a,b){var c={};if(void 0===(b=b||[]))for(var d=0;d/g,">").replace(/"/g,""").replace(/'/g,"'")}function g(a,b){b&&!0!==b&&"true"!==b||(b=""),a||(a="untitled");var c="";return a&&a.indexOf(".")>-1&&(c=a.split(".").pop()),b&&c!==b&&(c=b,a=a+"."+c),[a,c]}function h(a){document.body.removeChild(a.target)}var i=a("../core/main");a("whatwg-fetch"),a("es6-promise").polyfill();var j=a("fetch-jsonp");a("../core/error_helpers"),i.prototype.loadJSON=function(){i._validateParameters("loadJSON",arguments);for(var a,b,c,d=arguments[0],e={},f="json",g=1;g0&&"function"==typeof arguments[l];l--)h++;var m=arguments.length-h,n=arguments[0];if(2===m&&"string"==typeof n&&"object"==typeof arguments[1])d=new Request(n,arguments[1]),b=arguments[2],c=arguments[3];else{for(var o,p="GET",q=1;q64e6&&i._friendlyFileLoadError(7,n),a){case"json":case"jsonp":return b.json();case"binary":return b.blob();case"arrayBuffer":return b.arrayBuffer();case"xml":return b.text().then(function(a){return e((new DOMParser).parseFromString(a,"text/xml").documentElement)});default:return b.text()}}),f.then(b||function(){}),f.catch(c||console.error),f},window.URL=window.URL||window.webkitURL,i.prototype._pWriters=[],i.prototype.createWriter=function(a,b){var c;for(var d in i.prototype._pWriters)if(i.prototype._pWriters[d].name===a)return c=new i.PrintWriter(a+this.millis(),b),i.prototype._pWriters.push(c),c;return c=new i.PrintWriter(a,b),i.prototype._pWriters.push(c),c},i.PrintWriter=function(a,b){var c=this;this.name=a,this.content="",this.write=function(a){this.content+=a},this.print=function(a){this.content+=a+"\n"},this.clear=function(){this.content=""},this.close=function(){var d=[];d.push(this.content),i.prototype.writeFile(d,a,b);for(var e in i.prototype._pWriters)i.prototype._pWriters[e].name===this.name&&i.prototype._pWriters.splice(e,1);c.clear(),c={}}},i.prototype.save=function(a,b,c){var d=arguments,e=this._curElement.elt;if(0===d.length)return void i.prototype.saveCanvas(e);if(d[0]instanceof i.Renderer||d[0]instanceof i.Graphics)return void i.prototype.saveCanvas(d[0].elt,d[1],d[2]);if(1===d.length&&"string"==typeof d[0])i.prototype.saveCanvas(e,d[0]);else{switch(g(d[1],d[2])[1]){case"json":return void i.prototype.saveJSON(d[0],d[1],d[2]);case"txt":return void i.prototype.saveStrings(d[0],d[1],d[2]);default:d[0]instanceof Array?i.prototype.saveStrings(d[0],d[1],d[2]):d[0]instanceof i.Table?i.prototype.saveTable(d[0],d[1],d[2]):d[0]instanceof i.Image?i.prototype.saveCanvas(d[0].canvas,d[1]):d[0]instanceof i.SoundFile&&i.prototype.saveSound(d[0],d[1],d[2],d[3])}}},i.prototype.saveJSON=function(a,b,c){i._validateParameters("saveJSON",arguments);var d;d=c?JSON.stringify(a):JSON.stringify(a,void 0,2),this.saveStrings(d.split("\n"),b,"json")},i.prototype.saveJSONObject=i.prototype.saveJSON,i.prototype.saveJSONArray=i.prototype.saveJSON,i.prototype.saveStrings=function(a,b,c){i._validateParameters("saveStrings",arguments);for(var d=c||"txt",e=this.createWriter(b,d),f=0;f"),e.print("");var m=' ',e.print(m),e.print(""),e.print(""),e.print(" "),"0"!==g[0]){e.print(" ");for(var n=0;n"+o),e.print(" ")}e.print("
")}for(var p=0;p");for(var q=0;q"+s),e.print(" ")}e.print(" ")}e.print("
"),e.print(""),e.print("