/*!
Parts of this script are from the TurboWarp Packager <https://packager.turbowarp.org/>, licensed as follows:
Copyright (C) 2021-2024 Thomas Weber

The Source Code Form of this program is available under the terms of the
Mozilla Public License, v. 2.0. You can obtain a copy of the license at
https://www.mozilla.org/en-US/MPL/2.0/.

Parts of this script are from Scratch <https://scratch.mit.edu/>, licensed as follows:
Copyright (c) 2016, Massachusetts Institute of Technology
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

/*! For license information please see scaffolding-min.js.LICENSE.txt */
!function(e){function t(t){for(var n,i,s=t[0],o=t[1],a=0,c=[];a<s.length;a++)i=s[a],Object.prototype.hasOwnProperty.call(r,i)&&r[i]&&c.push(r[i][0]),r[i]=0;for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n]);for(l&&l(t);c.length;)c.shift()()}var n={},r={0:0};function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(e){var t=[],n=r[e];if(0!==n)if(n)t.push(n[2]);else{var s=new Promise((function(t,i){n=r[e]=[t,i]}));t.push(n[2]=s);var o,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(e){return i.p+"scaffolding/"+({1:"vendors~iframe-extension-worker"}[e]||e)+".js"}(e);var l=new Error;o=function(t){a.onerror=a.onload=null,clearTimeout(c);var n=r[e];if(0!==n){if(n){var i=t&&("load"===t.type?"missing":t.type),s=t&&t.target&&t.target.src;l.message="Loading chunk "+e+" failed.\n("+i+": "+s+")",l.name="ChunkLoadError",l.type=i,l.request=s,n[1](l)}r[e]=void 0}};var c=setTimeout((function(){o({type:"timeout",target:a})}),12e4);a.onerror=a.onload=o,document.head.appendChild(a)}return Promise.all(t)},i.m=e,i.c=n,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i.oe=function(e){throw console.error(e),e};var s=window.webpackJsonp=window.webpackJsonp||[],o=s.push.bind(s);s.push=t,s=s.slice();for(var a=0;a<s.length;a++)t(s[a]);var l=o;i(i.s=414)}([function(e,t,n){var r=n(36),i=n(93),s=n(37),o=s.TYPE,a=n(91),l=a.isNewline,c=a.isName,u=a.isValidEscape,d=a.isNumberStart,h=a.isIdentifierStart,p=a.charCodeCategory,m=a.isBOM,f=n(26),g=f.cmpStr,y=f.getNewlineLength,b=f.findWhiteSpaceEnd,v=f.consumeEscaped,S=f.consumeName,w=f.consumeNumber,k=f.consumeBadUrlRemnants,T=16777215,x=24;function E(e,t){function n(t){return t<E?e.charCodeAt(t):0}function s(){return M=w(e,M),h(n(M),n(M+1),n(M+2))?(L=o.Dimension,void(M=S(e,M))):37===n(M)?(L=o.Percentage,void M++):void(L=o.Number)}function a(){const t=M;return M=S(e,M),g(e,t,M,"url")&&40===n(M)?34===n(M=b(e,M+1))||39===n(M)?(L=o.Function,void(M=t+4)):void function(){for(L=o.Url,M=b(e,M);M<e.length;M++){var t=e.charCodeAt(M);switch(p(t)){case 41:return void M++;case p.Eof:return;case p.WhiteSpace:return 41===n(M=b(e,M))||M>=e.length?void(M<e.length&&M++):(M=k(e,M),void(L=o.BadUrl));case 34:case 39:case 40:case p.NonPrintable:return M=k(e,M),void(L=o.BadUrl);case 92:if(u(t,n(M+1))){M=v(e,M)-1;break}return M=k(e,M),void(L=o.BadUrl)}}}():40===n(M)?(L=o.Function,void M++):void(L=o.Ident)}function f(t){for(t||(t=n(M++)),L=o.String;M<e.length;M++){var r=e.charCodeAt(M);switch(p(r)){case t:return void M++;case p.Eof:return;case p.WhiteSpace:if(l(r))return M+=y(e,M,r),void(L=o.BadString);break;case 92:if(M===e.length-1)break;var i=n(M+1);l(i)?M+=y(e,M+1,i):u(r,i)&&(M=v(e,M)-1)}}}t||(t=new r);for(var E=(e=String(e||"")).length,A=i(t.offsetAndType,E+1),C=i(t.balance,E+1),I=0,O=m(n(0)),M=O,N=0,R=0,D=0;M<E;){var P=e.charCodeAt(M),L=0;switch(C[I]=E,p(P)){case p.WhiteSpace:L=o.WhiteSpace,M=b(e,M+1);break;case 34:f();break;case 35:c(n(M+1))||u(n(M+1),n(M+2))?(L=o.Hash,M=S(e,M+1)):(L=o.Delim,M++);break;case 39:f();break;case 40:L=o.LeftParenthesis,M++;break;case 41:L=o.RightParenthesis,M++;break;case 43:d(P,n(M+1),n(M+2))?s():(L=o.Delim,M++);break;case 44:L=o.Comma,M++;break;case 45:d(P,n(M+1),n(M+2))?s():45===n(M+1)&&62===n(M+2)?(L=o.CDC,M+=3):h(P,n(M+1),n(M+2))?a():(L=o.Delim,M++);break;case 46:d(P,n(M+1),n(M+2))?s():(L=o.Delim,M++);break;case 47:42===n(M+1)?(L=o.Comment,1===(M=e.indexOf("*/",M+2)+2)&&(M=e.length)):(L=o.Delim,M++);break;case 58:L=o.Colon,M++;break;case 59:L=o.Semicolon,M++;break;case 60:33===n(M+1)&&45===n(M+2)&&45===n(M+3)?(L=o.CDO,M+=4):(L=o.Delim,M++);break;case 64:h(n(M+1),n(M+2),n(M+3))?(L=o.AtKeyword,M=S(e,M+1)):(L=o.Delim,M++);break;case 91:L=o.LeftSquareBracket,M++;break;case 92:u(P,n(M+1))?a():(L=o.Delim,M++);break;case 93:L=o.RightSquareBracket,M++;break;case 123:L=o.LeftCurlyBracket,M++;break;case 125:L=o.RightCurlyBracket,M++;break;case p.Digit:s();break;case p.NameStart:a();break;case p.Eof:break;default:L=o.Delim,M++}switch(L){case N:for(N=(R=C[D=R&T])>>x,C[I]=D,C[D++]=I;D<I;D++)C[D]===E&&(C[D]=I);break;case o.LeftParenthesis:case o.Function:C[I]=R,R=(N=o.RightParenthesis)<<x|I;break;case o.LeftSquareBracket:C[I]=R,R=(N=o.RightSquareBracket)<<x|I;break;case o.LeftCurlyBracket:C[I]=R,R=(N=o.RightCurlyBracket)<<x|I}A[I++]=L<<x|M}for(A[I]=o.EOF<<x|M,C[I]=E,C[E]=E;0!==R;)R=C[D=R&T],C[D]=E;return t.source=e,t.firstCharOffset=O,t.offsetAndType=A,t.tokenCount=I,t.balance=C,t.reset(),t.next(),t}Object.keys(s).forEach((function(e){E[e]=s[e]})),Object.keys(a).forEach((function(e){E[e]=a[e]})),Object.keys(f).forEach((function(e){E[e]=f[e]})),e.exports=E},function(e,t,n){const r=n(30);r.enable(),e.exports=r("vm")},function(e,t,n){const r=n(23),i=e=>{if("string"!=typeof e)return!1;for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(48===n||9===n)return!1}return!0};class s{static toNumber(e){if("number"==typeof e)return Number.isNaN(e)?0:e;const t=Number(e);return Number.isNaN(t)?0:t}static toBoolean(e){return"boolean"==typeof e?e:"string"==typeof e?""!==e&&"0"!==e&&"false"!==e.toLowerCase():Boolean(e)}static toString(e){return String(e)}static toRgbColorList(e){const t=s.toRgbColorObject(e);return[t.r,t.g,t.b]}static toRgbColorObject(e){let t;return"string"==typeof e&&"#"===e.substring(0,1)?(t=r.hexToRgb(e),t||(t={r:0,g:0,b:0,a:255})):t=r.decimalToRgb(s.toNumber(e)),t}static isWhiteSpace(e){return null===e||"string"==typeof e&&0===e.trim().length}static compare(e,t){let n=Number(e),r=Number(t);if(0===n&&i(e)?n=NaN:0===r&&i(t)&&(r=NaN),isNaN(n)||isNaN(r)){const n=String(e).toLowerCase(),r=String(t).toLowerCase();return n<r?-1:n>r?1:0}return n===1/0&&r===1/0||n===-1/0&&r===-1/0?0:n-r}static isInt(e){return"number"==typeof e?!!isNaN(e)||e===Math.floor(e):"boolean"==typeof e||"string"==typeof e&&e.indexOf(".")<0}static get LIST_INVALID(){return"INVALID"}static get LIST_ALL(){return"ALL"}static toListIndex(e,t,n){if("number"!=typeof e){if("all"===e)return n?s.LIST_ALL:s.LIST_INVALID;if("last"===e)return t>0?t:s.LIST_INVALID;if("random"===e||"any"===e)return t>0?1+Math.floor(Math.random()*t):s.LIST_INVALID}return(e=Math.floor(s.toNumber(e)))<1||e>t?s.LIST_INVALID:e}}e.exports=s},function(e,t){e.exports={BOOLEAN:"Boolean",BUTTON:"button",LABEL:"label",COMMAND:"command",CONDITIONAL:"conditional",EVENT:"event",HAT:"hat",LOOP:"loop",REPORTER:"reporter",XML:"xml"}},function(e,t){e.exports={ANGLE:"angle",BOOLEAN:"Boolean",COLOR:"color",NUMBER:"number",STRING:"string",MATRIX:"matrix",NOTE:"note",IMAGE:"image",COSTUME:"costume",SOUND:"sound"}},function(e,t){e.exports=class{static degToRad(e){return e*Math.PI/180}static radToDeg(e){return 180*e/Math.PI}static clamp(e,t,n){return Math.min(Math.max(e,t),n)}static wrapClamp(e,t,n){const r=n-t+1;return e-Math.floor((e-t)/r)*r}static tan(e){switch(e%=360){case-270:case 90:return 1/0;case-90:case 270:return-1/0;default:return Math.round(1e10*Math.tan(Math.PI*e/180))/1e10}}static reducedSortOrdering(e){const t=e.slice(0).sort(((e,t)=>e-t));return e.map((e=>t.indexOf(e)))}static inclusiveRandIntWithout(e,t,n){const r=t-e,i=e+Math.floor(Math.random()*r);return i>=n?i+1:i}static scale(e,t,n,r,i){return(e-t)/(n-t)*(i-r)+r}}},function(e,t,n){"use strict";var r=n(128),i=n(129),s=n(69),o=n(68),a=n(67);function l(e,t){return Object.keys(t).forEach((function(n){e[n]=t[n]})),e}e.exports=function e(){var t=l({},a),n="en",c={},u=function(e){return e},d=null,h="warning",p={};function m(e,t,s){var o="string"==typeof e?e:e.default,a=y(o,"object"==typeof e&&e.id||u(o),s||n);return(a.format||(a.format=i(r(a.message),s||n,p)))(t)}m.rich=function(e,t,s){var o="string"==typeof e?e:e.default,a=y(o,"object"==typeof e&&e.id||u(o),s||n);return(a.toParts||(a.toParts=i.toParts(r(a.message,{tagsType:f}),s||n,p)))(t)};var f="<>";function g(e,t){var n=e[2];return function(e,t){var r="object"==typeof n?function(e,t){return Object.keys(e).reduce((function(n,r){return n[r]=e[r](t),n}),{})}(n,t):n;return"function"==typeof e?e(r):e}}function y(e,t,n){var r=o(n,c)||"en",i=c[r]||(c[r]={}),s=i[t];if("string"==typeof s&&(s=i[t]={message:s}),!s){var a='Translation for "'+t+'" in "'+r+'" is missing';if("warning"===h)"undefined"!=typeof console&&console.warn(a);else if("ignore"!==h)throw new Error(a);var l="function"==typeof d?d(e,t,r)||e:d||e;s=i[t]={message:l}}return s}function b(e,t,r,i,a){"object"==typeof r&&"object"!=typeof i&&(a=i,i=r,r=0);var l=o(a||n,s),c=l&&s[l][e]||v;return i["="+ +t]||i[c(t-r)]||i.other}function v(){return"other"}return p[f]=g,m.setup=function(e){return(e=e||{}).locale&&(n=e.locale),"translations"in e&&(c=e.translations||{}),e.generateId&&(u=e.generateId),"missingReplacement"in e&&(d=e.missingReplacement),e.missingTranslation&&(h=e.missingTranslation),e.formats&&(e.formats.number&&l(t.number,e.formats.number),e.formats.date&&l(t.date,e.formats.date),e.formats.time&&l(t.time,e.formats.time)),e.types&&((p=e.types)[f]=g),{locale:n,translations:c,generateId:u,missingReplacement:d,missingTranslation:h,formats:t,types:p}},m.number=function(e,r,i){var s=r&&t.number[r]||t.parseNumberPattern(r)||t.number.default;return new Intl.NumberFormat(i||n,s).format(e)},m.date=function(e,r,i){var s=r&&t.date[r]||t.parseDatePattern(r)||t.date.default;return new Intl.DateTimeFormat(i||n,s).format(e)},m.time=function(e,r,i){var s=r&&t.time[r]||t.parseDatePattern(r)||t.time.default;return new Intl.DateTimeFormat(i||n,s).format(e)},m.select=function(e,t){return t[e]||t.other},m.custom=function(e,t,n,r){return e[1]in p?p[e[1]](e,t)(n,r):n},m.plural=b.bind(null,"cardinal"),m.selectordinal=b.bind(null,"ordinal"),m.namespace=e,m}()},function(e,t,n){const r=n(1);class i{static withoutTrailingDigits(e){let t=e.length-1;for(;t>=0&&"0123456789".indexOf(e.charAt(t))>-1;)t--;return e.slice(0,t+1)}static unusedName(e,t){if(t.indexOf(e)<0)return e;e=i.withoutTrailingDigits(e);let n=2;for(;t.indexOf(e+n)>=0;)n++;return e+n}static splitFirst(e,t){const n=e.indexOf(t);return n>=0?[e.substring(0,n),e.substring(n+1)]:[e,null]}static stringify(e){return JSON.stringify(e,((e,t)=>"number"!=typeof t||t!==1/0&&t!==-1/0&&!isNaN(t)?t:0))}static replaceUnsafeChars(e){if("string"!=typeof e){if(!Array.isArray(e))return r.error("Unexpected input recieved in replaceUnsafeChars"),e;e=String(e)}return e.replace(/[<>&'"]/g,(e=>{switch(e){case"<":return"lt";case">":return"gt";case"&":return"amp";case"'":return"apos";case'"':return"quot"}}))}}e.exports=i},function(e,t){const n="!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";e.exports=function(){const e=n.length,t=[];for(let r=0;r<20;r++)t[r]=n.charAt(Math.random()*e);return t.join("")}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){const r=n(8),i=n(32);class s{constructor(e,t,n,i){switch(this.id=e||r(),this.name=t,this.type=n,this.isCloud=i,this.type){case s.SCALAR_TYPE:this.value=0;break;case s.LIST_TYPE:this.value=[];break;case s.BROADCAST_MESSAGE_TYPE:this.value=this.name;break;default:throw new Error("Invalid variable type: ".concat(this.type))}}toXML(e){return e=!0===e,'<variable type="'.concat(this.type,'" id="').concat(this.id,'" islocal="').concat(e,'" iscloud="').concat(this.isCloud,'">').concat(i(this.name),"</variable>")}static get SCALAR_TYPE(){return""}static get LIST_TYPE(){return"list"}static get BROADCAST_MESSAGE_TYPE(){return"broadcast_msg"}}e.exports=s},function(e,t,n){var r;"undefined"!=typeof self&&self,r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=9)}([function(e,t,n){"use strict";t.__esModule=!0,t.copyExistingProperties=function(e,t){Object.keys(t).forEach((function(n){t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&(t[n]=e[n])}))},t.copyNamedProperties=function(e,t,n){e.forEach((function(e){var r=t[e];void 0!==r&&(n[e]=r)}))},t.isBuffer=function(e,t){return o||(o=e.createBuffer()),t instanceof o.constructor},t.isRenderbuffer=function(e,t){return a||(a=e.createRenderbuffer()),t instanceof a.constructor},t.isShader=function(e,t){return l||(l=e.createShader(e.VERTEX_SHADER)),t instanceof l.constructor},t.isTexture=function(e,t){return c||(c=e.createTexture()),t instanceof c.constructor},t.isSampler=function(e,t){if(!u){if(!e.createSampler)return!1;u=e.createSampler()}return t instanceof u.constructor},t.warn=t.error=void 0;var r,i=(r=n(2))&&r.__esModule?r:{default:r},s=i.default.console&&i.default.console.error&&"function"==typeof i.default.console.error?i.default.console.error.bind(i.default.console):function(){};t.error=s;var o,a,l,c,u,d=i.default.console&&i.default.console.warn&&"function"==typeof i.default.console.warn?i.default.console.warn.bind(i.default.console):function(){};t.warn=d},function(e,t,n){"use strict";t.__esModule=!0,t.getGLTypeForTypedArray=function(e){if(e instanceof Int8Array)return s;if(e instanceof Uint8Array)return o;if(e instanceof Uint8ClampedArray)return o;if(e instanceof Int16Array)return a;if(e instanceof Uint16Array)return l;if(e instanceof Int32Array)return c;if(e instanceof Uint32Array)return u;if(e instanceof Float32Array)return d;throw"unsupported typed array type"},t.getGLTypeForTypedArrayType=function(e){if(e===Int8Array)return s;if(e===Uint8Array)return o;if(e===Uint8ClampedArray)return o;if(e===Int16Array)return a;if(e===Uint16Array)return l;if(e===Int32Array)return c;if(e===Uint32Array)return u;if(e===Float32Array)return d;throw"unsupported typed array type"},t.getTypedArrayTypeForGLType=function(e){var t=h[e];if(!t)throw"unknown gl type";return t},t.isArrayBuffer=void 0;var r,i=(r=n(2))&&r.__esModule?r:{default:r},s=5120,o=5121,a=5122,l=5123,c=5124,u=5125,d=5126,h={},p=h;p[s]=Int8Array,p[o]=Uint8Array,p[a]=Int16Array,p[l]=Uint16Array,p[c]=Int32Array,p[u]=Uint32Array,p[d]=Float32Array,p[32819]=Uint16Array,p[32820]=Uint16Array,p[33635]=Uint16Array,p[5131]=Uint16Array,p[33640]=Uint32Array,p[35899]=Uint32Array,p[35902]=Uint32Array,p[36269]=Uint32Array,p[34042]=Uint32Array;var m=i.default.SharedArrayBuffer?function(e){return e&&e.buffer&&(e.buffer instanceof ArrayBuffer||e.buffer instanceof i.default.SharedArrayBuffer)}:function(e){return e&&e.buffer&&e.buffer instanceof ArrayBuffer};t.isArrayBuffer=m},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};t.default=r},function(e,t,n){"use strict";t.__esModule=!0,t.add=function(e,t,n){return(n=n||new r(3))[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n},t.copy=function(e,t){return(t=t||new r(3))[0]=e[0],t[1]=e[1],t[2]=e[2],t},t.create=function(e,t,n){var i=new r(3);return e&&(i[0]=e),t&&(i[1]=t),n&&(i[2]=n),i},t.cross=function(e,t,n){n=n||new r(3);var i=e[2]*t[0]-e[0]*t[2],s=e[0]*t[1]-e[1]*t[0];return n[0]=e[1]*t[2]-e[2]*t[1],n[1]=i,n[2]=s,n},t.distance=function(e,t){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)},t.distanceSq=function(e,t){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i},t.divide=function(e,t,n){return(n=n||new r(3))[0]=e[0]/t[0],n[1]=e[1]/t[1],n[2]=e[2]/t[2],n},t.divScalar=function(e,t,n){return(n=n||new r(3))[0]=e[0]/t,n[1]=e[1]/t,n[2]=e[2]/t,n},t.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]},t.lerp=function(e,t,n,i){return(i=i||new r(3))[0]=(1-n)*e[0]+n*t[0],i[1]=(1-n)*e[1]+n*t[1],i[2]=(1-n)*e[2]+n*t[2],i},t.length=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2])},t.lengthSq=function(e){return e[0]*e[0]+e[1]*e[1]+e[2]*e[2]},t.mulScalar=function(e,t,n){return(n=n||new r(3))[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n},t.multiply=function(e,t,n){return(n=n||new r(3))[0]=e[0]*t[0],n[1]=e[1]*t[1],n[2]=e[2]*t[2],n},t.negate=function(e,t){return(t=t||new r(3))[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},t.normalize=function(e,t){t=t||new r(3);var n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=Math.sqrt(n);return i>1e-5?(t[0]=e[0]/i,t[1]=e[1]/i,t[2]=e[2]/i):(t[0]=0,t[1]=0,t[2]=0),t},t.setDefaultType=function(e){var t=r;return r=e,t},t.subtract=function(e,t,n){return(n=n||new r(3))[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n};var r=Float32Array},function(e,t,n){"use strict";t.__esModule=!0,t.isWebGL1=function(e){return!e.texStorage2D},t.isWebGL2=function(e){return!!e.texStorage2D},t.glEnumToString=void 0;var r,i,s=(r={},i={},function(e,t){return function(e){var t=e.constructor.name;if(!r[t]){for(var n in e)if("number"==typeof e[n]){var s=i[e[n]];i[e[n]]=s?"".concat(s," | ").concat(n):n}r[t]=!0}}(e),i[t]||"0x"+t.toString(16)});t.glEnumToString=s},function(e,t,n){"use strict";t.__esModule=!0,t.createAttributeSetters=H,t.createProgram=L,t.createProgramFromScripts=function(e,t,n,r,i){for(var s=N(n,r,i),o=[],a=0;a<t.length;++a){var l=B(e,t[a],e[R[a]],s.errorCallback);if(!l)return null;o.push(l)}return L(e,o,s)},t.createProgramFromSources=z,t.createProgramInfo=function(e,t,n,r,i){var s=N(n,r,i),o=!0;if(t=t.map((function(e){if(e.indexOf("\n")<0){var t=u(e);t?e=t.text:(s.errorCallback("no element with id: "+e),o=!1)}return e})),!o)return null;var a=z(e,t,s);return a?K(e,a):null},t.createProgramInfoFromProgram=K,t.createUniformSetters=j,t.createUniformBlockSpecFromProgram=V,t.createUniformBlockInfoFromProgram=q,t.createUniformBlockInfo=function(e,t,n){return q(e,t.program,t.uniformBlockSpec,n)},t.createTransformFeedback=function(e,t,n){var r=e.createTransformFeedback();return e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,r),e.useProgram(t.program),W(e,t,n),e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,null),function(e,t,n){for(var r in t.transformFeedbackInfo&&(t=t.transformFeedbackInfo),n.attribs&&(n=n.attribs),n){var i=t[r];i&&e.bindBufferBase(e.TRANSFORM_FEEDBACK_BUFFER,i.index,null)}}(e,t,n),r},t.createTransformFeedbackInfo=F,t.bindTransformFeedbackInfo=W,t.setAttributes=_,t.setBuffersAndAttributes=function(e,t,n){n.vertexArrayObject?e.bindVertexArray(n.vertexArrayObject):(_(t.attribSetters||t,n.attribs),n.indices&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,n.indices))},t.setUniforms=function e(t,n){for(var r=t.uniformSetters||t,i=arguments.length,s=1;s<i;++s){var o=arguments[s];if(Array.isArray(o))for(var a=o.length,l=0;l<a;++l)e(r,o[l]);else for(var c in o){var u=r[c];u&&u(o[c])}}},t.setUniformBlock=function(e,t,n){Y(e,t,n)&&e.bufferData(e.UNIFORM_BUFFER,n.array,e.DYNAMIC_DRAW)},t.setBlockUniforms=function(e,t){var n=e.uniforms;for(var r in t){var i=n[r];if(i){var s=t[r];s.length?i.set(s):i[0]=s}}},t.bindUniformBlock=Y;var r,i=a(n(4)),s=a(n(0)),o=(r=n(2))&&r.__esModule?r:{default:r};function a(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}var l=s.error,c=s.warn,u=o.default&&o.default.document&&o.default.document.getElementById?o.default.document.getElementById.bind(o.default.document):function(){return null},d=3553,h=34067,p=32879,m=35866,f={};function g(e,t){return f[t].bindPoint}function y(e,t){return function(n){e.uniform1i(t,n)}}function b(e,t){return function(n){e.uniform1iv(t,n)}}function v(e,t){return function(n){e.uniform2iv(t,n)}}function S(e,t){return function(n){e.uniform3iv(t,n)}}function w(e,t){return function(n){e.uniform4iv(t,n)}}function k(e,t,n,r){var o=g(0,t);return i.isWebGL2(e)?function(t){var i,a;s.isTexture(e,t)?(i=t,a=null):(i=t.texture,a=t.sampler),e.uniform1i(r,n),e.activeTexture(e.TEXTURE0+n),e.bindTexture(o,i),e.bindSampler(n,a)}:function(t){e.uniform1i(r,n),e.activeTexture(e.TEXTURE0+n),e.bindTexture(o,t)}}function T(e,t,n,r,o){for(var a=g(0,t),l=new Int32Array(o),c=0;c<o;++c)l[c]=n+c;return i.isWebGL2(e)?function(t){e.uniform1iv(r,l),t.forEach((function(t,r){var i,o;e.activeTexture(e.TEXTURE0+l[r]),s.isTexture(e,t)?(i=t,o=null):(i=t.texture,o=t.sampler),e.bindSampler(n,o),e.bindTexture(a,i)}))}:function(t){e.uniform1iv(r,l),t.forEach((function(t,n){e.activeTexture(e.TEXTURE0+l[n]),e.bindTexture(a,t)}))}}function x(e,t){return function(n){e.bindBuffer(e.ARRAY_BUFFER,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribPointer(t,n.numComponents||n.size,n.type||e.FLOAT,n.normalize||!1,n.stride||0,n.offset||0),void 0!==n.divisor&&e.vertexAttribDivisor(t,n.divisor)}}function E(e,t){return function(n){e.bindBuffer(e.ARRAY_BUFFER,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribIPointer(t,n.numComponents||n.size,n.type||e.INT,n.stride||0,n.offset||0),void 0!==n.divisor&&e.vertexAttribDivisor(t,n.divisor)}}function A(e,t,n){var r=n.size,i=n.count;return function(n){e.bindBuffer(e.ARRAY_BUFFER,n.buffer);for(var s=n.size||n.numComponents||r,o=s/i,a=n.type||e.FLOAT,l=f[a].size*s,c=n.normalize||!1,u=n.offset||0,d=l/i,h=0;h<i;++h)e.enableVertexAttribArray(t+h),e.vertexAttribPointer(t+h,o,a,c,l,u+d*h),void 0!==n.divisor&&e.vertexAttribDivisor(t+h,n.divisor)}}f[5126]={Type:Float32Array,size:4,setter:function(e,t){return function(n){e.uniform1f(t,n)}},arraySetter:function(e,t){return function(n){e.uniform1fv(t,n)}}},f[35664]={Type:Float32Array,size:8,setter:function(e,t){return function(n){e.uniform2fv(t,n)}}},f[35665]={Type:Float32Array,size:12,setter:function(e,t){return function(n){e.uniform3fv(t,n)}}},f[35666]={Type:Float32Array,size:16,setter:function(e,t){return function(n){e.uniform4fv(t,n)}}},f[5124]={Type:Int32Array,size:4,setter:y,arraySetter:b},f[35667]={Type:Int32Array,size:8,setter:v},f[35668]={Type:Int32Array,size:12,setter:S},f[35669]={Type:Int32Array,size:16,setter:w},f[5125]={Type:Uint32Array,size:4,setter:function(e,t){return function(n){e.uniform1ui(t,n)}},arraySetter:function(e,t){return function(n){e.uniform1uiv(t,n)}}},f[36294]={Type:Uint32Array,size:8,setter:function(e,t){return function(n){e.uniform2uiv(t,n)}}},f[36295]={Type:Uint32Array,size:12,setter:function(e,t){return function(n){e.uniform3uiv(t,n)}}},f[36296]={Type:Uint32Array,size:16,setter:function(e,t){return function(n){e.uniform4uiv(t,n)}}},f[35670]={Type:Uint32Array,size:4,setter:y,arraySetter:b},f[35671]={Type:Uint32Array,size:8,setter:v},f[35672]={Type:Uint32Array,size:12,setter:S},f[35673]={Type:Uint32Array,size:16,setter:w},f[35674]={Type:Float32Array,size:16,setter:function(e,t){return function(n){e.uniformMatrix2fv(t,!1,n)}}},f[35675]={Type:Float32Array,size:36,setter:function(e,t){return function(n){e.uniformMatrix3fv(t,!1,n)}}},f[35676]={Type:Float32Array,size:64,setter:function(e,t){return function(n){e.uniformMatrix4fv(t,!1,n)}}},f[35685]={Type:Float32Array,size:24,setter:function(e,t){return function(n){e.uniformMatrix2x3fv(t,!1,n)}}},f[35686]={Type:Float32Array,size:32,setter:function(e,t){return function(n){e.uniformMatrix2x4fv(t,!1,n)}}},f[35687]={Type:Float32Array,size:24,setter:function(e,t){return function(n){e.uniformMatrix3x2fv(t,!1,n)}}},f[35688]={Type:Float32Array,size:48,setter:function(e,t){return function(n){e.uniformMatrix3x4fv(t,!1,n)}}},f[35689]={Type:Float32Array,size:32,setter:function(e,t){return function(n){e.uniformMatrix4x2fv(t,!1,n)}}},f[35690]={Type:Float32Array,size:48,setter:function(e,t){return function(n){e.uniformMatrix4x3fv(t,!1,n)}}},f[35678]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:d},f[35680]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:h},f[35679]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:p},f[35682]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:d},f[36289]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:m},f[36292]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:m},f[36293]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:h},f[36298]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:d},f[36299]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:p},f[36300]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:h},f[36303]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:m},f[36306]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:d},f[36307]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:p},f[36308]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:h},f[36311]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:m};var C={};C[5126]={size:4,setter:x},C[35664]={size:8,setter:x},C[35665]={size:12,setter:x},C[35666]={size:16,setter:x},C[5124]={size:4,setter:E},C[35667]={size:8,setter:E},C[35668]={size:12,setter:E},C[35669]={size:16,setter:E},C[5125]={size:4,setter:E},C[36294]={size:8,setter:E},C[36295]={size:12,setter:E},C[36296]={size:16,setter:E},C[35670]={size:4,setter:E},C[35671]={size:8,setter:E},C[35672]={size:12,setter:E},C[35673]={size:16,setter:E},C[35674]={size:4,setter:A,count:2},C[35675]={size:9,setter:A,count:3},C[35676]={size:16,setter:A,count:4};var I=void 0,O=/^[ \t]*\n/;function M(e,t,n,r){var i=r||l,s=e.createShader(n),o=0;if(O.test(t)&&(o=1,t=t.replace(O,"")),e.shaderSource(s,t),e.compileShader(s),!e.getShaderParameter(s,e.COMPILE_STATUS)){var a=e.getShaderInfoLog(s);return i(function(e,t){return t=t||0,++t,e.split("\n").map((function(e,n){return n+t+": "+e})).join("\n")}(t,o)+"\n*** Error compiling shader: "+a),e.deleteShader(s),null}return s}function N(e,t,n){var r;if("function"==typeof t&&(n=t,t=void 0),"function"==typeof e)n=e,e=void 0;else if(e&&!Array.isArray(e)){if(e.errorCallback)return e;var i=e;n=i.errorCallback,e=i.attribLocations,r=i.transformFeedbackVaryings}var s={errorCallback:n||l,transformFeedbackVaryings:r};if(e){var o={};Array.isArray(e)?e.forEach((function(e,n){o[e]=t?t[n]:n})):o=e,s.attribLocations=o}return s}var R=["VERTEX_SHADER","FRAGMENT_SHADER"];function D(e){return e.indexOf("frag")>=0?I.FRAGMENT_SHADER:e.indexOf("vert")>=0?I.VERTEX_SHADER:void 0}function P(e,t){t.forEach((function(t){e.deleteShader(t)}))}function L(e,t,n,r,i){for(var o=N(n,r,i),a=[],l=[],c=0;c<t.length;++c){var d=t[c];if("string"==typeof d){var h=u(d),p=h?h.text:d,m=e[R[c]];h&&h.type&&(m=D(h.type)||m),d=M(e,p,m,o.errorCallback),l.push(d)}s.isShader(e,d)&&a.push(d)}if(a.length!==t.length)return o.errorCallback("not enough shaders for program"),P(e,l),null;var f=e.createProgram();a.forEach((function(t){e.attachShader(f,t)})),o.attribLocations&&Object.keys(o.attribLocations).forEach((function(t){e.bindAttribLocation(f,o.attribLocations[t],t)}));var g=o.transformFeedbackVaryings;if(g&&(g.attribs&&(g=g.attribs),Array.isArray(g)||(g=Object.keys(g)),e.transformFeedbackVaryings(f,g,o.transformFeedbackMode||e.SEPARATE_ATTRIBS)),e.linkProgram(f),!e.getProgramParameter(f,e.LINK_STATUS)){var y=e.getProgramInfoLog(f);return o.errorCallback("Error in program linking:"+y),e.deleteProgram(f),P(e,l),null}return f}function B(e,t,n,r){var i,s=u(t);if(!s)throw"*** Error: unknown script element"+t;i=s.text;var o=n||D(s.type);if(!o)throw"*** Error: unknown shader type";return M(e,i,o,r)}function z(e,t,n,r,i){for(var s=N(n,r,i),o=[],a=0;a<t.length;++a){var l=M(e,t[a],e[R[a]],s.errorCallback);if(!l)return null;o.push(l)}return L(e,o,s)}function U(e){var t=e.name;return t.startsWith("gl_")||t.startsWith("webgl_")}function j(e,t){var n=0;function r(t,r){var i,s=e.getUniformLocation(t,r.name),o=r.size>1&&"[0]"===r.name.substr(-3),a=r.type,l=f[a];if(!l)throw"unknown type: 0x"+a.toString(16);if(l.bindPoint){var c=n;n+=r.size,i=o?l.arraySetter(e,a,c,s,r.size):l.setter(e,a,c,s,r.size)}else i=l.arraySetter&&o?l.arraySetter(e,s):l.setter(e,s);return i.location=s,i}for(var i={},s=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),o=0;o<s;++o){var a=e.getActiveUniform(t,o);if(!U(a)){var l=a.name;"[0]"===l.substr(-3)&&(l=l.substr(0,l.length-3));var c=r(t,a);i[l]=c}}return i}function F(e,t){for(var n={},r=e.getProgramParameter(t,e.TRANSFORM_FEEDBACK_VARYINGS),i=0;i<r;++i){var s=e.getTransformFeedbackVarying(t,i);n[s.name]={index:i,type:s.type,size:s.size}}return n}function W(e,t,n){for(var r in t.transformFeedbackInfo&&(t=t.transformFeedbackInfo),n.attribs&&(n=n.attribs),n){var i=t[r];if(i){var s=n[r];s.offset?e.bindBufferRange(e.TRANSFORM_FEEDBACK_BUFFER,i.index,s.buffer,s.offset,s.size):e.bindBufferBase(e.TRANSFORM_FEEDBACK_BUFFER,i.index,s.buffer)}}}function V(e,t){for(var n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),r=[],i=[],s=0;s<n;++s){i.push(s),r.push({});var o=e.getActiveUniform(t,s);if(U(o))break;r[s].name=o.name}[["UNIFORM_TYPE","type"],["UNIFORM_SIZE","size"],["UNIFORM_BLOCK_INDEX","blockNdx"],["UNIFORM_OFFSET","offset"]].forEach((function(n){var s=n[0],o=n[1];e.getActiveUniforms(t,i,e[s]).forEach((function(e,t){r[t][o]=e}))}));for(var a={},l=e.getProgramParameter(t,e.ACTIVE_UNIFORM_BLOCKS),c=0;c<l;++c){var u=e.getActiveUniformBlockName(t,c),d={index:c,usedByVertexShader:e.getActiveUniformBlockParameter(t,c,e.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER),usedByFragmentShader:e.getActiveUniformBlockParameter(t,c,e.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER),size:e.getActiveUniformBlockParameter(t,c,e.UNIFORM_BLOCK_DATA_SIZE),uniformIndices:e.getActiveUniformBlockParameter(t,c,e.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES)};d.used=d.usedByVertexSahder||d.usedByFragmentShader,a[u]=d}return{blockSpecs:a,uniformData:r}}var G=/\[\d+\]\.$/;function q(e,t,n,r){var i=n.blockSpecs,s=n.uniformData,o=i[r];if(!o)return c("no uniform block object named:",r),{name:r,uniforms:{}};var a=new ArrayBuffer(o.size),l=e.createBuffer(),u=o.index;e.bindBuffer(e.UNIFORM_BUFFER,l),e.uniformBlockBinding(t,o.index,u);var d=r+".";G.test(d)&&(d=d.replace(G,"."));var h={};return o.uniformIndices.forEach((function(e){var t=s[e],n=f[t.type],r=n.Type,i=t.size*n.size,o=t.name;o.substr(0,d.length)===d&&(o=o.substr(d.length)),h[o]=new r(a,t.offset,i/r.BYTES_PER_ELEMENT)})),{name:r,array:a,asFloat:new Float32Array(a),buffer:l,uniforms:h}}function Y(e,t,n){var r=(t.uniformBlockSpec||t).blockSpecs[n.name];if(r){var i=r.index;return e.bindBufferRange(e.UNIFORM_BUFFER,i,n.buffer,n.offset||0,n.array.byteLength),!0}return!1}function H(e,t){for(var n={},r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),i=0;i<r;++i){var s=e.getActiveAttrib(t,i);if(!U(s)){var o=e.getAttribLocation(t,s.name),a=C[s.type],l=a.setter(e,o,a);l.location=o,n[s.name]=l}}return n}function _(e,t){for(var n in t){var r=e[n];r&&r(t[n])}}function K(e,t){var n={program:t,uniformSetters:j(e,t),attribSetters:H(e,t)};return i.isWebGL2(e)&&(n.uniformBlockSpec=V(e,t),n.transformFeedbackInfo=F(e,t)),n}},function(e,t,n){"use strict";t.__esModule=!0,t.axisRotate=function(e,t,n,r){r=r||new i(16);var s=t[0],o=t[1],a=t[2],l=Math.sqrt(s*s+o*o+a*a),c=(s/=l)*s,u=(o/=l)*o,d=(a/=l)*a,h=Math.cos(n),p=Math.sin(n),m=1-h,f=c+(1-c)*h,g=s*o*m+a*p,y=s*a*m-o*p,b=s*o*m-a*p,v=u+(1-u)*h,S=o*a*m+s*p,w=s*a*m+o*p,k=o*a*m-s*p,T=d+(1-d)*h,x=e[0],E=e[1],A=e[2],C=e[3],I=e[4],O=e[5],M=e[6],N=e[7],R=e[8],D=e[9],P=e[10],L=e[11];return r[0]=f*x+g*I+y*R,r[1]=f*E+g*O+y*D,r[2]=f*A+g*M+y*P,r[3]=f*C+g*N+y*L,r[4]=b*x+v*I+S*R,r[5]=b*E+v*O+S*D,r[6]=b*A+v*M+S*P,r[7]=b*C+v*N+S*L,r[8]=w*x+k*I+T*R,r[9]=w*E+k*O+T*D,r[10]=w*A+k*M+T*P,r[11]=w*C+k*N+T*L,e!==r&&(r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r},t.axisRotation=function(e,t,n){n=n||new i(16);var r=e[0],s=e[1],o=e[2],a=Math.sqrt(r*r+s*s+o*o),l=(r/=a)*r,c=(s/=a)*s,u=(o/=a)*o,d=Math.cos(t),h=Math.sin(t),p=1-d;return n[0]=l+(1-l)*d,n[1]=r*s*p+o*h,n[2]=r*o*p-s*h,n[3]=0,n[4]=r*s*p-o*h,n[5]=c+(1-c)*d,n[6]=s*o*p+r*h,n[7]=0,n[8]=r*o*p+s*h,n[9]=s*o*p-r*h,n[10]=u+(1-u)*d,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n},t.copy=l,t.frustum=function(e,t,n,r,s,o,a){a=a||new i(16);var l=t-e,c=r-n,u=s-o;return a[0]=2*s/l,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=2*s/c,a[6]=0,a[7]=0,a[8]=(e+t)/l,a[9]=(r+n)/c,a[10]=o/u,a[11]=-1,a[12]=0,a[13]=0,a[14]=s*o/u,a[15]=0,a},t.getAxis=function(e,t,n){n=n||r.create();var i=4*t;return n[0]=e[i+0],n[1]=e[i+1],n[2]=e[i+2],n},t.getTranslation=function(e,t){return(t=t||r.create())[0]=e[12],t[1]=e[13],t[2]=e[14],t},t.identity=c,t.inverse=u,t.lookAt=function(e,t,n,l){l=l||new i(16);var c=s,u=o,d=a;return r.normalize(r.subtract(e,t,d),d),r.normalize(r.cross(n,d,c),c),r.normalize(r.cross(d,c,u),u),l[0]=c[0],l[1]=c[1],l[2]=c[2],l[3]=0,l[4]=u[0],l[5]=u[1],l[6]=u[2],l[7]=0,l[8]=d[0],l[9]=d[1],l[10]=d[2],l[11]=0,l[12]=e[0],l[13]=e[1],l[14]=e[2],l[15]=1,l},t.multiply=function(e,t,n){n=n||new i(16);var r=e[0],s=e[1],o=e[2],a=e[3],l=e[4],c=e[5],u=e[6],d=e[7],h=e[8],p=e[9],m=e[10],f=e[11],g=e[12],y=e[13],b=e[14],v=e[15],S=t[0],w=t[1],k=t[2],T=t[3],x=t[4],E=t[5],A=t[6],C=t[7],I=t[8],O=t[9],M=t[10],N=t[11],R=t[12],D=t[13],P=t[14],L=t[15];return n[0]=r*S+l*w+h*k+g*T,n[1]=s*S+c*w+p*k+y*T,n[2]=o*S+u*w+m*k+b*T,n[3]=a*S+d*w+f*k+v*T,n[4]=r*x+l*E+h*A+g*C,n[5]=s*x+c*E+p*A+y*C,n[6]=o*x+u*E+m*A+b*C,n[7]=a*x+d*E+f*A+v*C,n[8]=r*I+l*O+h*M+g*N,n[9]=s*I+c*O+p*M+y*N,n[10]=o*I+u*O+m*M+b*N,n[11]=a*I+d*O+f*M+v*N,n[12]=r*R+l*D+h*P+g*L,n[13]=s*R+c*D+p*P+y*L,n[14]=o*R+u*D+m*P+b*L,n[15]=a*R+d*D+f*P+v*L,n},t.negate=function(e,t){return(t=t||new i(16))[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t},t.ortho=function(e,t,n,r,s,o,a){return(a=a||new i(16))[0]=2/(t-e),a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=2/(r-n),a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=2/(s-o),a[11]=0,a[12]=(t+e)/(e-t),a[13]=(r+n)/(n-r),a[14]=(o+s)/(s-o),a[15]=1,a},t.perspective=function(e,t,n,r,s){s=s||new i(16);var o=Math.tan(.5*Math.PI-.5*e),a=1/(n-r);return s[0]=o/t,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=o,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+r)*a,s[11]=-1,s[12]=0,s[13]=0,s[14]=n*r*a*2,s[15]=0,s},t.rotateX=function(e,t,n){n=n||new i(16);var r=e[4],s=e[5],o=e[6],a=e[7],l=e[8],c=e[9],u=e[10],d=e[11],h=Math.cos(t),p=Math.sin(t);return n[4]=h*r+p*l,n[5]=h*s+p*c,n[6]=h*o+p*u,n[7]=h*a+p*d,n[8]=h*l-p*r,n[9]=h*c-p*s,n[10]=h*u-p*o,n[11]=h*d-p*a,e!==n&&(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15]),n},t.rotateY=function(e,t,n){n=n||new i(16);var r=e[0],s=e[1],o=e[2],a=e[3],l=e[8],c=e[9],u=e[10],d=e[11],h=Math.cos(t),p=Math.sin(t);return n[0]=h*r-p*l,n[1]=h*s-p*c,n[2]=h*o-p*u,n[3]=h*a-p*d,n[8]=h*l+p*r,n[9]=h*c+p*s,n[10]=h*u+p*o,n[11]=h*d+p*a,e!==n&&(n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15]),n},t.rotateZ=function(e,t,n){n=n||new i(16);var r=e[0],s=e[1],o=e[2],a=e[3],l=e[4],c=e[5],u=e[6],d=e[7],h=Math.cos(t),p=Math.sin(t);return n[0]=h*r+p*l,n[1]=h*s+p*c,n[2]=h*o+p*u,n[3]=h*a+p*d,n[4]=h*l-p*r,n[5]=h*c-p*s,n[6]=h*u-p*o,n[7]=h*d-p*a,e!==n&&(n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15]),n},t.rotationX=function(e,t){t=t||new i(16);var n=Math.cos(e),r=Math.sin(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n,t[6]=r,t[7]=0,t[8]=0,t[9]=-r,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.rotationY=function(e,t){t=t||new i(16);var n=Math.cos(e),r=Math.sin(e);return t[0]=n,t[1]=0,t[2]=-r,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=r,t[9]=0,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.rotationZ=function(e,t){t=t||new i(16);var n=Math.cos(e),r=Math.sin(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=0,t[4]=-r,t[5]=n,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.scale=function(e,t,n){n=n||new i(16);var r=t[0],s=t[1],o=t[2];return n[0]=r*e[0],n[1]=r*e[1],n[2]=r*e[2],n[3]=r*e[3],n[4]=s*e[4],n[5]=s*e[5],n[6]=s*e[6],n[7]=s*e[7],n[8]=o*e[8],n[9]=o*e[9],n[10]=o*e[10],n[11]=o*e[11],e!==n&&(n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15]),n},t.scaling=function(e,t){return(t=t||new i(16))[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.setAxis=function(e,t,n,r){r!==e&&(r=l(e,r));var i=4*n;return r[i+0]=t[0],r[i+1]=t[1],r[i+2]=t[2],r},t.setDefaultType=function(e){var t=i;return i=e,t},t.setTranslation=function(e,t,n){return n=n||c(),e!==n&&(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11]),n[12]=t[0],n[13]=t[1],n[14]=t[2],n[15]=1,n},t.transformDirection=function(e,t,n){n=n||r.create();var i=t[0],s=t[1],o=t[2];return n[0]=i*e[0]+s*e[4]+o*e[8],n[1]=i*e[1]+s*e[5]+o*e[9],n[2]=i*e[2]+s*e[6]+o*e[10],n},t.transformNormal=function(e,t,n){n=n||r.create();var i=u(e),s=t[0],o=t[1],a=t[2];return n[0]=s*i[0]+o*i[1]+a*i[2],n[1]=s*i[4]+o*i[5]+a*i[6],n[2]=s*i[8]+o*i[9]+a*i[10],n},t.transformPoint=function(e,t,n){n=n||r.create();var i=t[0],s=t[1],o=t[2],a=i*e[3]+s*e[7]+o*e[11]+e[15];return n[0]=(i*e[0]+s*e[4]+o*e[8]+e[12])/a,n[1]=(i*e[1]+s*e[5]+o*e[9]+e[13])/a,n[2]=(i*e[2]+s*e[6]+o*e[10]+e[14])/a,n},t.translate=function(e,t,n){n=n||new i(16);var r=t[0],s=t[1],o=t[2],a=e[0],l=e[1],c=e[2],u=e[3],d=e[4],h=e[5],p=e[6],m=e[7],f=e[8],g=e[9],y=e[10],b=e[11],v=e[12],S=e[13],w=e[14],k=e[15];return e!==n&&(n[0]=a,n[1]=l,n[2]=c,n[3]=u,n[4]=d,n[5]=h,n[6]=p,n[7]=m,n[8]=f,n[9]=g,n[10]=y,n[11]=b),n[12]=a*r+d*s+f*o+v,n[13]=l*r+h*s+g*o+S,n[14]=c*r+p*s+y*o+w,n[15]=u*r+m*s+b*o+k,n},t.translation=function(e,t){return(t=t||new i(16))[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t},t.transpose=function(e,t){var n;if((t=t||new i(16))===e)return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,t;var r=e[0],s=e[1],o=e[2],a=e[3],l=e[4],c=e[5],u=e[6],d=e[7],h=e[8],p=e[9],m=e[10],f=e[11],g=e[12],y=e[13],b=e[14],v=e[15];return t[0]=r,t[1]=l,t[2]=h,t[3]=g,t[4]=s,t[5]=c,t[6]=p,t[7]=y,t[8]=o,t[9]=u,t[10]=m,t[11]=b,t[12]=a,t[13]=d,t[14]=f,t[15]=v,t};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(3)),i=Float32Array,s=r.create(),o=r.create(),a=r.create();function l(e,t){return(t=t||new i(16))[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function c(e){return(e=e||new i(16))[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function u(e,t){t=t||new i(16);var n=e[0],r=e[1],s=e[2],o=e[3],a=e[4],l=e[5],c=e[6],u=e[7],d=e[8],h=e[9],p=e[10],m=e[11],f=e[12],g=e[13],y=e[14],b=e[15],v=p*b,S=y*m,w=c*b,k=y*u,T=c*m,x=p*u,E=s*b,A=y*o,C=s*m,I=p*o,O=s*u,M=c*o,N=d*g,R=f*h,D=a*g,P=f*l,L=a*h,B=d*l,z=n*g,U=f*r,j=n*h,F=d*r,W=n*l,V=a*r,G=v*l+k*h+T*g-(S*l+w*h+x*g),q=S*r+E*h+I*g-(v*r+A*h+C*g),Y=w*r+A*l+O*g-(k*r+E*l+M*g),H=x*r+C*l+M*h-(T*r+I*l+O*h),_=1/(n*G+a*q+d*Y+f*H);return t[0]=_*G,t[1]=_*q,t[2]=_*Y,t[3]=_*H,t[4]=_*(S*a+w*d+x*f-(v*a+k*d+T*f)),t[5]=_*(v*n+A*d+C*f-(S*n+E*d+I*f)),t[6]=_*(k*n+E*a+M*f-(w*n+A*a+O*f)),t[7]=_*(T*n+I*a+O*d-(x*n+C*a+M*d)),t[8]=_*(N*u+P*m+L*b-(R*u+D*m+B*b)),t[9]=_*(R*o+z*m+F*b-(N*o+U*m+j*b)),t[10]=_*(D*o+U*u+W*b-(P*o+z*u+V*b)),t[11]=_*(B*o+j*u+V*m-(L*o+F*u+W*m)),t[12]=_*(D*p+B*y+R*c-(L*y+N*c+P*p)),t[13]=_*(j*y+N*s+U*p-(z*p+F*y+R*s)),t[14]=_*(z*c+V*y+P*s-(W*y+D*s+U*c)),t[15]=_*(W*p+L*s+F*c-(j*c+V*p+B*s)),t}},function(e,t,n){"use strict";t.__esModule=!0,t.createAttribsFromArrays=g,t.createBuffersFromArrays=function(e,t){var n={};return Object.keys(t).forEach((function(r){n[r]=b(e,t[r],r)})),t.indices?(n.numElements=t.indices.length,n.elementType=r.getGLTypeForTypedArray(f(t.indices),"indices")):n.numElements=function(e){for(var t,n=0;n<y.length&&!((t=y[n])in e);++n);ii===y.length&&(t=Object.keys(e)[0]);var r=e[t],i=u(r).length,s=m(r,t),o=i/s;if(i%s>0)throw"numComponents "+s+" not correct for length "+i;return o}(t),n},t.createBufferFromArray=b,t.createBufferFromTypedArray=l,t.createBufferInfoFromArrays=function(e,t){var n={attribs:g(e,t)},i=t.indices;if(i){var s=f(i,"indices");n.indices=l(e,s,e.ELEMENT_ARRAY_BUFFER),n.numElements=s.length,n.elementType=r.getGLTypeForTypedArray(s)}else n.numElements=function(e,t){var n,r;for(r=0;r<y.length&&!((n=y[r])in t)&&!((n=o.attribPrefix+n)in t);++r);r===y.length&&(n=Object.keys(t)[0]);var i=t[n];e.bindBuffer(e.ARRAY_BUFFER,i.buffer);var s=e.getBufferParameter(e.ARRAY_BUFFER,e.BUFFER_SIZE);e.bindBuffer(e.ARRAY_BUFFER,null);var a=function(e,t){return t===e.BYTE||t===e.UNSIGNED_BYTE?1:t===e.SHORT||t===e.UNSIGNED_SHORT?2:t===e.INT||t===e.UNSIGNED_INT||t===e.FLOAT?4:0}(e,i.type),l=s/a,c=i.numComponents||i.size,u=l/c;if(u%1!=0)throw"numComponents "+c+" not correct for length "+length;return u}(e,n.attribs);return n},t.setAttribInfoBufferFromArray=function(e,t,n,r){n=f(n),void 0!==r?(e.bindBuffer(e.ARRAY_BUFFER,t.buffer),e.bufferSubData(e.ARRAY_BUFFER,r,n)):a(e,e.ARRAY_BUFFER,t.buffer,n,t.drawType)},t.setAttributePrefix=function(e){o.attribPrefix=e},t.setAttributeDefaults_=function(e){i.copyExistingProperties(e,o)},t.getNumComponents_=m,t.getArray_=u;var r=s(n(1)),i=s(n(0));function s(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}var o={attribPrefix:""};function a(e,t,n,r,i){e.bindBuffer(t,n),e.bufferData(t,r,i||e.STATIC_DRAW)}function l(e,t,n,r){if(i.isBuffer(e,t))return t;n=n||e.ARRAY_BUFFER;var s=e.createBuffer();return a(e,n,s,t,r),s}function c(e){return"indices"===e}function u(e){return e.length?e:e.data}var d=/coord|texture/i,h=/color|colour/i;function p(e,t){var n;if(t%(n=d.test(e)?2:h.test(e)?4:3)>0)throw"Can not guess numComponents for attribute '"+e+"'. Tried "+n+" but "+t+" values is not evenly divisible by "+n+". You should specify it.";return n}function m(e,t){return e.numComponents||e.size||p(t,u(e).length)}function f(e,t){if(r.isArrayBuffer(e))return e;if(r.isArrayBuffer(e.data))return e.data;Array.isArray(e)&&(e={data:e});var n=e.type;return n||(n=c(t)?Uint16Array:Float32Array),new n(e.data)}function g(e,t){var n={};return Object.keys(t).forEach((function(i){if(!c(i)){var s,a,u,d,h,g=t[i],y=g.attrib||g.name||g.attribName||o.attribPrefix+i;if("number"==typeof g||"number"==typeof g.data){h=g.data||g;var b=g.type||Float32Array,v=h*b.BYTES_PER_ELEMENT;a=r.getGLTypeForTypedArrayType(b),u=void 0!==g.normalize?g.normalize:(w=b)===Int8Array||w===Uint8Array,d=g.numComponents||g.size||p(i,h),s=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,v,g.drawType||e.STATIC_DRAW)}else{var S=f(g,i);s=l(e,S,void 0,g.drawType),a=r.getGLTypeForTypedArray(S),u=void 0!==g.normalize?g.normalize:function(e){return e instanceof Int8Array||e instanceof Uint8Array}(S),d=m(g,i),h=S.length}n[y]={buffer:s,numComponents:d,type:a,normalize:u,stride:g.stride||0,offset:g.offset||0,divisor:void 0===g.divisor?void 0:g.divisor,drawType:g.drawType}}var w})),e.bindBuffer(e.ARRAY_BUFFER,null),n}var y=["position","positions","a_position"];function b(e,t,n){var r="indices"===n?e.ELEMENT_ARRAY_BUFFER:e.ARRAY_BUFFER;return l(e,f(t,n),r)}},function(e,t,n){"use strict";t.__esModule=!0,t.setTextureDefaults_=function(e){o.copyExistingProperties(e,c),e.textureColor&&q(e.textureColor)},t.createSampler=$,t.createSamplers=function(e,t){var n={};return Object.keys(t).forEach((function(r){n[r]=$(e,t[r])})),n},t.setSamplerParameters=J,t.createTexture=me,t.setEmptyTexture=pe,t.setTextureFromArray=he,t.loadTextureFromUrl=ce,t.setTextureFromElement=ie,t.setTextureFilteringForSize=ee,t.setTextureParameters=Z,t.setDefaultTextureColor=q,t.createTextures=function(e,t,n){n=n||se;var r=0,i=[],s={},o={};function a(){0===r&&setTimeout((function(){n(i.length?i:void 0,s,o)}),0)}return Object.keys(t).forEach((function(n){var l,c,u=t[n];("string"==typeof(c=u.src)||Array.isArray(c)&&"string"==typeof c[0])&&(l=function(e,t,s){o[n]=s,--r,e&&i.push(e),a()},++r),s[n]=me(e,u,l)})),a(),s},t.resizeTexture=function(e,t,n,r,i){r=r||n.width,i=i||n.height;var s=n.target||e.TEXTURE_2D;e.bindTexture(s,t);var o,a=n.level||0,l=n.internalFormat||n.format||e.RGBA,c=F(l),d=n.format||c.format,h=n.src;if(o=h&&(u(h)||Array.isArray(h)&&"number"==typeof h[0])?n.type||V(e,h,c.type):n.type||c.type,s===e.TEXTURE_CUBE_MAP)for(var p=0;p<6;++p)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+p,a,l,r,i,0,d,o,null);else e.texImage2D(s,a,l,r,i,0,d,o,null)},t.getNumComponentsForFormat=function(e){var t=L[e];if(!t)throw"unknown format: "+e;return t.numColorComponents},t.getBytesPerElementForInternalFormat=j;var r,i=l(n(4)),s=l(n(1)),o=l(n(0)),a=(r=n(2))&&r.__esModule?r:{default:r};function l(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}var c={textureColor:new Uint8Array([128,192,255,255]),textureOptions:{},crossOrigin:void 0},u=s.isArrayBuffer,d=a.default.document&&a.default.document.createElement?a.default.document.createElement("canvas").getContext("2d"):null,h=6406,p=6407,m=6408,f=6409,g=6410,y=6402,b=34041,v=5120,S=5121,w=5122,k=5123,T=5124,x=5125,E=5126,A=5131,C=36193,I=33640,O=33319,M=33320,N=6403,R=36244,D=36248,P=36249,L={},B=L;B[6406]={numColorComponents:1},B[6409]={numColorComponents:1},B[6410]={numColorComponents:2},B[p]={numColorComponents:3},B[m]={numColorComponents:4},B[N]={numColorComponents:1},B[36244]={numColorComponents:1},B[O]={numColorComponents:2},B[33320]={numColorComponents:2},B[p]={numColorComponents:3},B[36248]={numColorComponents:3},B[m]={numColorComponents:4},B[36249]={numColorComponents:4},B[6402]={numColorComponents:1},B[34041]={numColorComponents:2};var z={},U=z;function j(e,t){var n=z[e];if(!n)throw"unknown internal format";var r=n.bytesPerElementMap[t];if(void 0===r)throw"unknown internal format";return r}function F(e){var t=z[e];if(!t)throw"unknown internal format";return{format:t.textureFormat,type:Array.isArray(t.type)?t.type[0]:t.type}}function W(e){return!(e&e-1)}function V(e,t,n){return u(t)?s.getGLTypeForTypedArray(t):n||e.UNSIGNED_BYTE}function G(e,t,n,r,i){if(i%1!=0)throw"can't guess dimensions";if(n||r){if(r){if(!n&&(n=i/r)%1)throw"can't guess dimensions"}else if((r=i/n)%1)throw"can't guess dimensions"}else{var s=Math.sqrt(i/(t===e.TEXTURE_CUBE_MAP?6:1));s%1==0?(n=s,r=s):(n=i,r=1)}return{width:n,height:r}}function q(e){c.textureColor=new Uint8Array([255*e[0],255*e[1],255*e[2],255*e[3]])}U[6406]={textureFormat:h,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[S,A,C,E]},U[6409]={textureFormat:f,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[S,A,C,E]},U[6410]={textureFormat:g,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2,4,4,8],type:[S,A,C,E]},U[p]={textureFormat:p,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,6,6,12,2],type:[S,A,C,E,33635]},U[m]={textureFormat:m,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,8,8,16,2,2],type:[S,A,C,E,32819,32820]},U[33321]={textureFormat:N,colorRenderable:!0,textureFilterable:!0,bytesPerElement:1,type:S},U[36756]={textureFormat:N,colorRenderable:!1,textureFilterable:!0,bytesPerElement:1,type:v},U[33325]={textureFormat:N,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4,2],type:[E,A]},U[33326]={textureFormat:N,colorRenderable:!1,textureFilterable:!1,bytesPerElement:4,type:E},U[33330]={textureFormat:R,colorRenderable:!0,textureFilterable:!1,bytesPerElement:1,type:S},U[33329]={textureFormat:R,colorRenderable:!0,textureFilterable:!1,bytesPerElement:1,type:v},U[33332]={textureFormat:R,colorRenderable:!0,textureFilterable:!1,bytesPerElement:2,type:k},U[33331]={textureFormat:R,colorRenderable:!0,textureFilterable:!1,bytesPerElement:2,type:w},U[33334]={textureFormat:R,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:x},U[33333]={textureFormat:R,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:T},U[33323]={textureFormat:O,colorRenderable:!0,textureFilterable:!0,bytesPerElement:2,type:S},U[36757]={textureFormat:O,colorRenderable:!1,textureFilterable:!0,bytesPerElement:2,type:v},U[33327]={textureFormat:O,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[8,4],type:[E,A]},U[33328]={textureFormat:O,colorRenderable:!1,textureFilterable:!1,bytesPerElement:8,type:E},U[33336]={textureFormat:M,colorRenderable:!0,textureFilterable:!1,bytesPerElement:2,type:S},U[33335]={textureFormat:M,colorRenderable:!0,textureFilterable:!1,bytesPerElement:2,type:v},U[33338]={textureFormat:M,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:k},U[33337]={textureFormat:M,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:w},U[33340]={textureFormat:M,colorRenderable:!0,textureFilterable:!1,bytesPerElement:8,type:x},U[33339]={textureFormat:M,colorRenderable:!0,textureFilterable:!1,bytesPerElement:8,type:T},U[32849]={textureFormat:p,colorRenderable:!0,textureFilterable:!0,bytesPerElement:3,type:S},U[35905]={textureFormat:p,colorRenderable:!1,textureFilterable:!0,bytesPerElement:3,type:S},U[36194]={textureFormat:p,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,2],type:[S,33635]},U[36758]={textureFormat:p,colorRenderable:!1,textureFilterable:!0,bytesPerElement:3,type:v},U[35898]={textureFormat:p,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[E,A,35899]},U[35901]={textureFormat:p,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[E,A,35902]},U[34843]={textureFormat:p,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6],type:[E,A]},U[34837]={textureFormat:p,colorRenderable:!1,textureFilterable:!1,bytesPerElement:12,type:E},U[36221]={textureFormat:D,colorRenderable:!1,textureFilterable:!1,bytesPerElement:3,type:S},U[36239]={textureFormat:D,colorRenderable:!1,textureFilterable:!1,bytesPerElement:3,type:v},U[36215]={textureFormat:D,colorRenderable:!1,textureFilterable:!1,bytesPerElement:6,type:k},U[36233]={textureFormat:D,colorRenderable:!1,textureFilterable:!1,bytesPerElement:6,type:w},U[36209]={textureFormat:D,colorRenderable:!1,textureFilterable:!1,bytesPerElement:12,type:x},U[36227]={textureFormat:D,colorRenderable:!1,textureFilterable:!1,bytesPerElement:12,type:T},U[32856]={textureFormat:m,colorRenderable:!0,textureFilterable:!0,bytesPerElement:4,type:S},U[35907]={textureFormat:m,colorRenderable:!0,textureFilterable:!0,bytesPerElement:4,type:S},U[36759]={textureFormat:m,colorRenderable:!1,textureFilterable:!0,bytesPerElement:4,type:v},U[32855]={textureFormat:m,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2,4],type:[S,32820,I]},U[32854]={textureFormat:m,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2],type:[S,32819]},U[32857]={textureFormat:m,colorRenderable:!0,textureFilterable:!0,bytesPerElement:4,type:I},U[34842]={textureFormat:m,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[16,8],type:[E,A]},U[34836]={textureFormat:m,colorRenderable:!1,textureFilterable:!1,bytesPerElement:16,type:E},U[36220]={textureFormat:P,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:S},U[36238]={textureFormat:P,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:v},U[36975]={textureFormat:P,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:I},U[36214]={textureFormat:P,colorRenderable:!0,textureFilterable:!1,bytesPerElement:8,type:k},U[36232]={textureFormat:P,colorRenderable:!0,textureFilterable:!1,bytesPerElement:8,type:w},U[36226]={textureFormat:P,colorRenderable:!0,textureFilterable:!1,bytesPerElement:16,type:T},U[36208]={textureFormat:P,colorRenderable:!0,textureFilterable:!1,bytesPerElement:16,type:x},U[33189]={textureFormat:y,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[k,x]},U[33190]={textureFormat:y,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:x},U[36012]={textureFormat:y,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:E},U[35056]={textureFormat:b,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:34042},U[36013]={textureFormat:b,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:36269},Object.keys(U).forEach((function(e){var t=U[e];if(t.bytesPerElementMap={},Array.isArray(t.bytesPerElement))t.bytesPerElement.forEach((function(e,n){var r=t.type[n];t.bytesPerElementMap[r]=e}));else{var n=t.type;t.bytesPerElementMap[n]=t.bytesPerElement}}));var Y={};function H(e,t){void 0!==t.colorspaceConversion&&(Y.colorspaceConversion=e.getParameter(e.UNPACK_COLORSPACE_CONVERSION_WEBGL),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,t.colorspaceConversion)),void 0!==t.premultiplyAlpha&&(Y.premultiplyAlpha=e.getParameter(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha)),void 0!==t.flipY&&(Y.flipY=e.getParameter(e.UNPACK_FLIP_Y_WEBGL),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t.flipY))}function _(e,t){void 0!==t.colorspaceConversion&&e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,Y.colorspaceConversion),void 0!==t.premultiplyAlpha&&e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Y.premultiplyAlpha),void 0!==t.flipY&&e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,Y.flipY)}function K(e){Y.unpackAlignment=e.getParameter(e.UNPACK_ALIGNMENT),i.isWebGL2(e)&&(Y.unpackRowLength=e.getParameter(e.UNPACK_ROW_LENGTH),Y.unpackImageHeight=e.getParameter(e.UNPACK_IMAGE_HEIGHT),Y.unpackSkipPixels=e.getParameter(e.UNPACK_SKIP_PIXELS),Y.unpackSkipRows=e.getParameter(e.UNPACK_SKIP_ROWS),Y.unpackSkipImages=e.getParameter(e.UNPACK_SKIP_IMAGES))}function Q(e){e.pixelStorei(e.UNPACK_ALIGNMENT,Y.unpackAlignment),i.isWebGL2(e)&&(e.pixelStorei(e.UNPACK_ROW_LENGTH,Y.unpackRowLength),e.pixelStorei(e.UNPACK_IMAGE_HEIGHT,Y.unpackImageHeight),e.pixelStorei(e.UNPACK_SKIP_PIXELS,Y.unpackSkipPixels),e.pixelStorei(e.UNPACK_SKIP_ROWS,Y.unpackSkipRows),e.pixelStorei(e.UNPACK_SKIP_IMAGES,Y.unpackSkipImages))}function X(e,t,n,r){r.minMag&&(n.call(e,t,e.TEXTURE_MIN_FILTER,r.minMag),n.call(e,t,e.TEXTURE_MAG_FILTER,r.minMag)),r.min&&n.call(e,t,e.TEXTURE_MIN_FILTER,r.min),r.mag&&n.call(e,t,e.TEXTURE_MAG_FILTER,r.mag),r.wrap&&(n.call(e,t,e.TEXTURE_WRAP_S,r.wrap),n.call(e,t,e.TEXTURE_WRAP_T,r.wrap),(t===e.TEXTURE_3D||o.isSampler(e,t))&&n.call(e,t,e.TEXTURE_WRAP_R,r.wrap)),r.wrapR&&n.call(e,t,e.TEXTURE_WRAP_R,r.wrapR),r.wrapS&&n.call(e,t,e.TEXTURE_WRAP_S,r.wrapS),r.wrapT&&n.call(e,t,e.TEXTURE_WRAP_T,r.wrapT),r.minLod&&n.call(e,t,e.TEXTURE_MIN_LOD,r.minLod),r.maxLod&&n.call(e,t,e.TEXTURE_MAX_LOD,r.maxLod),r.baseLevel&&n.call(e,t,e.TEXTURE_BASE_LEVEL,r.baseLevel),r.maxLevel&&n.call(e,t,e.TEXTURE_MAX_LEVEL,r.maxLevel)}function Z(e,t,n){var r=n.target||e.TEXTURE_2D;e.bindTexture(r,t),X(e,r,e.texParameteri,n)}function J(e,t,n){X(e,t,e.samplerParameteri,n)}function $(e,t){var n=e.createSampler();return J(e,n,t),n}function ee(e,t,n,r,s,o,a){n=n||c.textureOptions,o=o||e.RGBA,a=a||e.UNSIGNED_BYTE;var l=n.target||e.TEXTURE_2D;if(r=r||n.width,s=s||n.height,e.bindTexture(l,t),function(e,t,n,r){if(!i.isWebGL2(e))return W(t)&&W(n);var s=z[r];if(!s)throw"unknown internal format";return s.colorRenderable&&s.textureFilterable}(e,r,s,o))e.generateMipmap(l);else{var u=function(e){var t=z[e];if(!t)throw"unknown internal format";return t.textureFilterable}(o)?e.LINEAR:e.NEAREST;e.texParameteri(l,e.TEXTURE_MIN_FILTER,u),e.texParameteri(l,e.TEXTURE_MAG_FILTER,u),e.texParameteri(l,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(l,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}}function te(e){return!0===e.auto||void 0===e.auto&&void 0===e.level}function ne(e,t){return(t=t||{}).cubeFaceOrder||[e.TEXTURE_CUBE_MAP_POSITIVE_X,e.TEXTURE_CUBE_MAP_NEGATIVE_X,e.TEXTURE_CUBE_MAP_POSITIVE_Y,e.TEXTURE_CUBE_MAP_NEGATIVE_Y,e.TEXTURE_CUBE_MAP_POSITIVE_Z,e.TEXTURE_CUBE_MAP_NEGATIVE_Z]}function re(e,t){var n=ne(e,t).map((function(e,t){return{face:e,ndx:t}}));return n.sort((function(e,t){return e.face-t.face})),n}function ie(e,t,n,r){var i=(r=r||c.textureOptions).target||e.TEXTURE_2D,s=r.level||0,o=n.width,l=n.height,u=r.internalFormat||r.format||e.RGBA,h=F(u),p=r.format||h.format,m=r.type||h.type;if(H(e,r),e.bindTexture(i,t),i===e.TEXTURE_CUBE_MAP){var f,g,y=n.width,b=n.height;if(y/6===b)f=b,g=[0,0,1,0,2,0,3,0,4,0,5,0];else if(b/6===y)f=y,g=[0,0,0,1,0,2,0,3,0,4,0,5];else if(y/3==b/2)f=y/3,g=[0,0,1,0,2,0,0,1,1,1,2,1];else{if(y/2!=b/3)throw"can't figure out cube map from element: "+(n.src?n.src:n.nodeName);f=y/2,g=[0,0,1,0,0,1,1,1,0,2,1,2]}d?(d.canvas.width=f,d.canvas.height=f,o=f,l=f,re(e,r).forEach((function(t){var r=g[2*t.ndx+0]*f,i=g[2*t.ndx+1]*f;d.drawImage(n,r,i,f,f,0,0,f,f),e.texImage2D(t.face,s,u,p,m,d.canvas)})),d.canvas.width=1,d.canvas.height=1):a.default.createImageBitmap&&(o=f,l=f,re(e,r).forEach((function(c){var d=g[2*c.ndx+0]*f,h=g[2*c.ndx+1]*f;e.texImage2D(c.face,s,u,f,f,0,p,m,null),a.default.createImageBitmap(n,d,h,f,f,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then((function(n){H(e,r),e.bindTexture(i,t),e.texImage2D(c.face,s,u,p,m,n),_(e,r),te(r)&&ee(e,t,r,o,l,u,m)}))})))}else if(i===e.TEXTURE_3D||i===e.TEXTURE_2D_ARRAY){var v=Math.min(n.width,n.height),S=Math.max(n.width,n.height),w=S/v;if(w%1!=0)throw"can not compute 3D dimensions of element";var k=n.width===S?1:0,T=n.height===S?1:0;K(e),e.pixelStorei(e.UNPACK_ALIGNMENT,1),e.pixelStorei(e.UNPACK_ROW_LENGTH,n.width),e.pixelStorei(e.UNPACK_IMAGE_HEIGHT,0),e.pixelStorei(e.UNPACK_SKIP_IMAGES,0),e.texImage3D(i,s,u,v,v,v,0,p,m,null);for(var x=0;x<w;++x){var E=x*v*k,A=x*v*T;e.pixelStorei(e.UNPACK_SKIP_PIXELS,E),e.pixelStorei(e.UNPACK_SKIP_ROWS,A),e.texSubImage3D(i,s,0,0,x,v,v,1,p,m,n)}Q(e)}else e.texImage2D(i,s,u,p,m,n);_(e,r),te(r)&&ee(e,t,r,o,l,u,m),Z(e,t,r)}function se(){}function oe(e){return a.default.ImageBitmap&&e instanceof a.default.ImageBitmap||a.default.ImageData&&e instanceof a.default.ImageData||a.default.HTMLElement&&e instanceof a.default.HTMLElement}function ae(e,t,n){return oe(e)?(setTimeout((function(){n(null,e)})),e):function(e,t,n){var r;if(n=n||se,a.default.Image){r=new a.default.Image,void 0!==(t=void 0!==t?t:c.crossOrigin)&&(r.crossOrigin=t);var i=function(){r.removeEventListener("error",s),r.removeEventListener("load",l),r=null},s=function(){var t="couldn't load image: "+e;o.error(t),n(t,r),i()},l=function(){n(null,r),i()};return r.addEventListener("error",s),r.addEventListener("load",l),r.src=e,r}if(a.default.ImageBitmap){var u,d,h=function(){n(u,d)},p={};t&&(p.mode="cors"),fetch(e,p).then((function(e){if(!e.ok)throw e;return e.blob()})).then((function(e){return a.default.createImageBitmap(e,{premultiplyAlpha:"none",colorSpaceConversion:"none"})})).then((function(e){d=e,setTimeout(h)})).catch((function(e){u=e,setTimeout(h)})),r=null}return r}(e,t,n)}function le(e,t,n){var r=(n=n||c.textureOptions).target||e.TEXTURE_2D;if(e.bindTexture(r,t),!1!==n.color){var i=function(e){return e=e||c.textureColor,u(e)?e:new Uint8Array([255*e[0],255*e[1],255*e[2],255*e[3]])}(n.color);if(r===e.TEXTURE_CUBE_MAP)for(var s=0;s<6;++s)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+s,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,i);else r===e.TEXTURE_3D||r===e.TEXTURE_2D_ARRAY?e.texImage3D(r,0,e.RGBA,1,1,1,0,e.RGBA,e.UNSIGNED_BYTE,i):e.texImage2D(r,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,i)}}function ce(e,t,n,r){return r=r||se,n=n||c.textureOptions,le(e,t,n),ae((n=Object.assign({},n)).src,n.crossOrigin,(function(i,s){i?r(i,t,s):(ie(e,t,s,n),r(null,t,s))}))}function ue(e,t,n,r){r=r||se;var i=n.src;if(6!==i.length)throw"there must be 6 urls for a cubemap";var s=n.level||0,o=n.internalFormat||n.format||e.RGBA,a=F(o),l=n.format||a.format,c=n.type||e.UNSIGNED_BYTE,u=n.target||e.TEXTURE_2D;if(u!==e.TEXTURE_CUBE_MAP)throw"target must be TEXTURE_CUBE_MAP";le(e,t,n),n=Object.assign({},n);var d,h=6,p=[],m=ne(e,n);d=i.map((function(i,a){return ae(i,n.crossOrigin,(f=m[a],function(i,a){--h,i?p.push(i):a.width!==a.height?p.push("cubemap face img is not a square: "+a.src):(H(e,n),e.bindTexture(u,t),5===h?ne(e).forEach((function(t){e.texImage2D(t,s,o,l,c,a)})):e.texImage2D(f,s,o,l,c,a),_(e,n),te(n)&&e.generateMipmap(u)),0===h&&r(p.length?p:void 0,t,d)}));var f}))}function de(e,t,n,r){r=r||se;var i=n.src,s=n.internalFormat||n.format||e.RGBA,o=F(s),a=n.format||o.format,l=n.type||e.UNSIGNED_BYTE,c=n.target||e.TEXTURE_2D_ARRAY;if(c!==e.TEXTURE_3D&&c!==e.TEXTURE_2D_ARRAY)throw"target must be TEXTURE_3D or TEXTURE_2D_ARRAY";le(e,t,n),n=Object.assign({},n);var u,h=i.length,p=[],m=n.level||0,f=n.width,g=n.height,y=i.length,b=!0;u=i.map((function(i,o){return ae(i,n.crossOrigin,(v=o,function(i,o){if(--h,i)p.push(i);else{if(H(e,n),e.bindTexture(c,t),b){b=!1,f=n.width||o.width,g=n.height||o.height,e.texImage3D(c,m,s,f,g,y,0,a,l,null);for(var S=0;S<y;++S)e.texSubImage3D(c,m,0,0,S,f,g,1,a,l,o)}else{var w=o;o.width===f&&o.height===g||(w=d.canvas,d.canvas.width=f,d.canvas.height=g,d.drawImage(o,0,0,f,g)),e.texSubImage3D(c,m,0,0,v,f,g,1,a,l,w),w===d.canvas&&(d.canvas.width=0,d.canvas.height=0)}_(e,n),te(n)&&e.generateMipmap(c)}0===h&&r(p.length?p:void 0,t,u)}));var v}))}function he(e,t,n,r){var o=(r=r||c.textureOptions).target||e.TEXTURE_2D;e.bindTexture(o,t);var a=r.width,l=r.height,d=r.depth,h=r.level||0,p=r.internalFormat||r.format||e.RGBA,m=F(p),f=r.format||m.format,g=r.type||V(e,n,m.type);if(u(n))n instanceof Uint8ClampedArray&&(n=new Uint8Array(n.buffer));else{var y=s.getTypedArrayTypeForGLType(g);n=new y(n)}var b,v=j(p,g),S=n.byteLength/v;if(S%1)throw"length wrong size for format: "+i.glEnumToString(e,f);if(o===e.TEXTURE_3D)if(a||l||d)!a||l&&d?!l||a&&d?(b=G(e,o,a,l,S/d),a=b.width,l=b.height):(b=G(e,o,a,d,S/l),a=b.width,d=b.height):(b=G(e,o,l,d,S/a),l=b.width,d=b.height);else{var w=Math.cbrt(S);if(w%1!=0)throw"can't guess cube size of array of numElements: "+S;a=w,l=w,d=w}else b=G(e,o,a,l,S),a=b.width,l=b.height;if(K(e),e.pixelStorei(e.UNPACK_ALIGNMENT,r.unpackAlignment||1),H(e,r),o===e.TEXTURE_CUBE_MAP){var k=S/6*(v/n.BYTES_PER_ELEMENT);re(e,r).forEach((function(t){var r=k*t.ndx,i=n.subarray(r,r+k);e.texImage2D(t.face,h,p,a,l,0,f,g,i)}))}else o===e.TEXTURE_3D?e.texImage3D(o,h,p,a,l,d,0,f,g,n):e.texImage2D(o,h,p,a,l,0,f,g,n);return _(e,r),Q(e),{width:a,height:l,depth:d,type:g}}function pe(e,t,n){var r=n.target||e.TEXTURE_2D;e.bindTexture(r,t);var i=n.level||0,s=n.internalFormat||n.format||e.RGBA,o=F(s),a=n.format||o.format,l=n.type||o.type;if(H(e,n),r===e.TEXTURE_CUBE_MAP)for(var c=0;c<6;++c)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+c,i,s,n.width,n.height,0,a,l,null);else r===e.TEXTURE_3D?e.texImage3D(r,i,s,n.width,n.height,n.depth,0,a,l,null):e.texImage2D(r,i,s,n.width,n.height,0,a,l,null);_(e,n)}function me(e,t,n){n=n||se,t=t||c.textureOptions;var r=e.createTexture(),i=t.target||e.TEXTURE_2D,s=t.width||1,o=t.height||1,a=t.internalFormat||e.RGBA,l=F(a),d=t.type||l.type;e.bindTexture(i,r),i===e.TEXTURE_CUBE_MAP&&(e.texParameteri(i,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(i,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE));var h=t.src;if(h)if("function"==typeof h&&(h=h(e,t)),"string"==typeof h)ce(e,r,t,n);else if(u(h)||Array.isArray(h)&&("number"==typeof h[0]||Array.isArray(h[0])||u(h[0]))){var p=he(e,r,h,t);s=p.width,o=p.height,d=p.type}else if(Array.isArray(h)&&("string"==typeof h[0]||oe(h[0])))i===e.TEXTURE_CUBE_MAP?ue(e,r,t,n):de(e,r,t,n);else{if(!oe(h))throw"unsupported src type";ie(e,r,h,t),s=h.width,o=h.height}else pe(e,r,t);return te(t)&&ee(e,r,t,s,o,a,d),Z(e,r,t),r}},function(e,t,n){"use strict";t.__esModule=!0;var r={m4:!0,v3:!0,primitives:!0};t.primitives=t.v3=t.m4=void 0;var i=l(n(6));t.m4=i;var s=l(n(3));t.v3=s;var o=l(n(10));t.primitives=o;var a=n(11);function l(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||(t[e]=a[e]))}))},function(e,t,n){"use strict";t.__esModule=!0,t.create3DFVertices=C,t.createAugmentedTypedArray=h,t.createCubeVertices=x,t.createPlaneVertices=w,t.createSphereVertices=k,t.createTruncatedConeVertices=E,t.createXYQuadVertices=S,t.createCresentVertices=I,t.createCylinderVertices=O,t.createTorusVertices=M,t.createDiscVertices=N,t.deindexVertices=function(e){var t=e.indices,n={},r=t.length;return Object.keys(e).filter(p).forEach((function(i){for(var s=e[i],o=s.numComponents,a=h(o,r,s.constructor),l=0;l<r;++l)for(var c=t[l]*o,u=0;u<o;++u)a.push(s[c+u]);n[i]=a})),n},t.flattenNormals=function(e){if(e.indices)throw"can't flatten normals of indexed vertices. deindex them first";for(var t=e.normal,n=t.length,r=0;r<n;r+=9){var i=t[r+0],s=t[r+1],o=t[r+2],a=t[r+3],l=t[r+4],c=t[r+5],u=i+a+t[r+6],d=s+l+t[r+7],h=o+c+t[r+8],p=Math.sqrt(u*u+d*d+h*h);u/=p,d/=p,h/=p,t[r+0]=u,t[r+1]=d,t[r+2]=h,t[r+3]=u,t[r+4]=d,t[r+5]=h,t[r+6]=u,t[r+7]=d,t[r+8]=h}return e},t.makeRandomVertexColors=function(e,t){t=t||{};var n=e.position.numElements,r=h(4,n,Uint8Array),i=t.rand||function(e,t){return t<3?(n=256,Math.random()*n|0):255;var n};if(e.color=r,e.indices)for(var s=0;s<n;++s)r.push(i(s,0),i(s,1),i(s,2),i(s,3));else for(var o=t.vertsPerColor||3,a=n/o,l=0;l<a;++l)for(var c=[i(l,0),i(l,1),i(l,2),i(l,3)],u=0;u<o;++u)r.push(c);return e},t.reorientDirections=g,t.reorientNormals=y,t.reorientPositions=b,t.reorientVertices=v,t.concatVertices=function(e){for(var t,n={},r=function(r){var i=e[r];Object.keys(i).forEach((function(e){n[e]||(n[e]=[]),t||"indices"===e||(t=e);var r=i[e],s=u(r,e),o=c(r).length/s;n[e].push(o)}))},i=0;i<e.length;++i)r(i);var s=n[t],o={};return Object.keys(n).forEach((function(t){var n=function(t){for(var n,r=0,i=0;i<e.length;++i){var s=e[i][t];r+=c(s).length,n&&!s.data||(n=s)}return{length:r,spec:n}}(t),r=B(n.spec,n.length);!function(t,n,r){for(var i=0,s=0,o=0;o<e.length;++o){var a=e[o][t],l=c(a);"indices"===t?(L(l,r,s,i),i+=n[o]):L(l,r,s),s+=l.length}}(t,s,c(r)),o[t]=r})),o},t.duplicateVertices=function(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n],i=c(r),s=B(r,i.length);L(i,c(s),0),t[n]=s})),t},t.createDiscBuffers=t.createDiscBufferInfo=t.createTorusBuffers=t.createTorusBufferInfo=t.createCylinderBuffers=t.createCylinderBufferInfo=t.createCresentBuffers=t.createCresentBufferInfo=t.createXYQuadBuffers=t.createXYQuadBufferInfo=t.createTruncatedConeBuffers=t.createTruncatedConeBufferInfo=t.createSphereBuffers=t.createSphereBufferInfo=t.createPlaneBuffers=t.createPlaneBufferInfo=t.createCubeBuffers=t.createCubeBufferInfo=t.create3DFBuffers=t.create3DFBufferInfo=void 0;var r=l(n(7)),i=l(n(0)),s=l(n(1)),o=l(n(6)),a=l(n(3));function l(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}var c=r.getArray_,u=r.getNumComponents_;function d(e,t){var n=0;return e.push=function(){for(var t=0;t<arguments.length;++t){var r=arguments[t];if(r instanceof Array||s.isArrayBuffer(r))for(var i=0;i<r.length;++i)e[n++]=r[i];else e[n++]=r}},e.reset=function(e){n=e||0},e.numComponents=t,Object.defineProperty(e,"numElements",{get:function(){return this.length/this.numComponents|0}}),e}function h(e,t,n){return d(new(n||Float32Array)(e*t),e)}function p(e){return"indices"!==e}function m(e,t,n){for(var r=e.length,i=new Float32Array(3),s=0;s<r;s+=3)n(t,[e[s],e[s+1],e[s+2]],i),e[s]=i[0],e[s+1]=i[1],e[s+2]=i[2]}function f(e,t,n){n=n||a.create();var r=t[0],i=t[1],s=t[2];return n[0]=r*e[0]+i*e[1]+s*e[2],n[1]=r*e[4]+i*e[5]+s*e[6],n[2]=r*e[8]+i*e[9]+s*e[10],n}function g(e,t){return m(e,t,o.transformDirection),e}function y(e,t){return m(e,o.inverse(t),f),e}function b(e,t){return m(e,t,o.transformPoint),e}function v(e,t){return Object.keys(e).forEach((function(n){var r=e[n];n.indexOf("pos")>=0?b(r,t):n.indexOf("tan")>=0||n.indexOf("binorm")>=0?g(r,t):n.indexOf("norm")>=0&&y(r,t)})),e}function S(e,t,n){return e=e||2,{position:{numComponents:2,data:[(t=t||0)+-1*(e*=.5),(n=n||0)+-1*e,t+1*e,n+-1*e,t+-1*e,n+1*e,t+1*e,n+1*e]},normal:[0,0,1,0,0,1,0,0,1,0,0,1],texcoord:[0,0,1,0,0,1,1,1],indices:[0,1,2,2,1,3]}}function w(e,t,n,r,i){e=e||1,t=t||1,n=n||1,r=r||1,i=i||o.identity();for(var s=(n+1)*(r+1),a=h(3,s),l=h(3,s),c=h(2,s),u=0;u<=r;u++)for(var d=0;d<=n;d++){var p=d/n,m=u/r;a.push(e*p-.5*e,0,t*m-.5*t),l.push(0,1,0),c.push(p,m)}for(var f=n+1,g=h(3,n*r*2,Uint16Array),y=0;y<r;y++)for(var b=0;b<n;b++)g.push((y+0)*f+b,(y+1)*f+b,(y+0)*f+b+1),g.push((y+1)*f+b,(y+1)*f+b+1,(y+0)*f+b+1);return v({position:a,normal:l,texcoord:c,indices:g},i)}function k(e,t,n,r,i,s,o){if(t<=0||n<=0)throw Error("subdivisionAxis and subdivisionHeight must be > 0");r=r||0,s=s||0;for(var a=(i=i||Math.PI)-r,l=(o=o||2*Math.PI)-s,c=(t+1)*(n+1),u=h(3,c),d=h(3,c),p=h(2,c),m=0;m<=n;m++)for(var f=0;f<=t;f++){var g=f/t,y=m/n,b=l*g,v=a*y,S=Math.sin(b),w=Math.cos(b),k=Math.sin(v),T=w*k,x=Math.cos(v),E=S*k;u.push(e*T,e*x,e*E),d.push(T,x,E),p.push(1-g,y)}for(var A=t+1,C=h(3,t*n*2,Uint16Array),I=0;I<t;I++)for(var O=0;O<n;O++)C.push((O+0)*A+I,(O+0)*A+I+1,(O+1)*A+I),C.push((O+1)*A+I,(O+0)*A+I+1,(O+1)*A+I+1);return{position:u,normal:d,texcoord:p,indices:C}}var T=[[3,7,5,1],[6,2,0,4],[6,7,3,2],[0,1,5,4],[7,6,4,5],[2,3,1,0]];function x(e){for(var t=(e=e||1)/2,n=[[-t,-t,-t],[+t,-t,-t],[-t,+t,-t],[+t,+t,-t],[-t,-t,+t],[+t,-t,+t],[-t,+t,+t],[+t,+t,+t]],r=[[1,0,0],[-1,0,0],[0,1,0],[0,-1,0],[0,0,1],[0,0,-1]],i=[[1,0],[0,0],[0,1],[1,1]],s=h(3,24),o=h(3,24),a=h(2,24),l=h(3,12,Uint16Array),c=0;c<6;++c){for(var u=T[c],d=0;d<4;++d){var p=n[u[d]],m=r[c],f=i[d];s.push(p),o.push(m),a.push(f)}var g=4*c;l.push(g+0,g+1,g+2),l.push(g+0,g+2,g+3)}return{position:s,normal:o,texcoord:a,indices:l}}function E(e,t,n,r,i,s,o){if(r<3)throw Error("radialSubdivisions must be 3 or greater");if(i<1)throw Error("verticalSubdivisions must be 1 or greater");for(var a=void 0===s||s,l=void 0===o||o,c=(a?2:0)+(l?2:0),u=(r+1)*(i+1+c),d=h(3,u),p=h(3,u),m=h(2,u),f=h(3,r*(i+c)*2,Uint16Array),g=r+1,y=Math.atan2(e-t,n),b=Math.cos(y),v=Math.sin(y),S=i+(l?2:0),w=a?-2:0;w<=S;++w){var k=w/i,T=n*k,x=void 0;w<0?(T=0,k=1,x=e):w>i?(T=n,k=1,x=t):x=e+w/i*(t-e),-2!==w&&w!==i+2||(x=0,k=0),T-=n/2;for(var E=0;E<g;++E){var A=Math.sin(E*Math.PI*2/r),C=Math.cos(E*Math.PI*2/r);d.push(A*x,T,C*x),p.push(w<0||w>i?0:A*b,w<0?-1:w>i?1:v,w<0||w>i?0:C*b),m.push(E/r,1-k)}}for(var I=0;I<i+c;++I)for(var O=0;O<r;++O)f.push(g*(I+0)+0+O,g*(I+0)+1+O,g*(I+1)+1+O),f.push(g*(I+0)+0+O,g*(I+1)+1+O,g*(I+1)+0+O);return{position:d,normal:p,texcoord:m,indices:f}}function A(e,t){t=t||[];for(var n=[],r=0;r<e.length;r+=4){var i=e[r],s=e.slice(r+1,r+4);s.push.apply(s,t);for(var o=0;o<i;++o)n.push.apply(n,s)}return n}function C(){var e=[0,0,0,0,150,0,30,0,0,0,150,0,30,150,0,30,0,0,30,0,0,30,30,0,100,0,0,30,30,0,100,30,0,100,0,0,30,60,0,30,90,0,67,60,0,30,90,0,67,90,0,67,60,0,0,0,30,30,0,30,0,150,30,0,150,30,30,0,30,30,150,30,30,0,30,100,0,30,30,30,30,30,30,30,100,0,30,100,30,30,30,60,30,67,60,30,30,90,30,30,90,30,67,60,30,67,90,30,0,0,0,100,0,0,100,0,30,0,0,0,100,0,30,0,0,30,100,0,0,100,30,0,100,30,30,100,0,0,100,30,30,100,0,30,30,30,0,30,30,30,100,30,30,30,30,0,100,30,30,100,30,0,30,30,0,30,60,30,30,30,30,30,30,0,30,60,0,30,60,30,30,60,0,67,60,30,30,60,30,30,60,0,67,60,0,67,60,30,67,60,0,67,90,30,67,60,30,67,60,0,67,90,0,67,90,30,30,90,0,30,90,30,67,90,30,30,90,0,67,90,30,67,90,0,30,90,0,30,150,30,30,90,30,30,90,0,30,150,0,30,150,30,0,150,0,0,150,30,30,150,30,0,150,0,30,150,30,30,150,0,0,0,0,0,0,30,0,150,30,0,0,0,0,150,30,0,150,0],t=A([18,0,0,1,18,0,0,-1,6,0,1,0,6,1,0,0,6,0,-1,0,6,1,0,0,6,0,1,0,6,1,0,0,6,0,-1,0,6,1,0,0,6,0,-1,0,6,-1,0,0]),n=A([18,200,70,120,18,80,70,200,6,70,200,210,6,200,200,70,6,210,100,70,6,210,160,70,6,70,180,210,6,100,70,210,6,76,210,100,6,140,210,80,6,90,130,110,6,160,160,220],[255]),r=e.length/3,i={position:h(3,r),texcoord:h(2,r),normal:h(3,r),color:h(4,r,Uint8Array),indices:h(3,r/3,Uint16Array)};i.position.push(e),i.texcoord.push([.22,.19,.22,.79,.34,.19,.22,.79,.34,.79,.34,.19,.34,.19,.34,.31,.62,.19,.34,.31,.62,.31,.62,.19,.34,.43,.34,.55,.49,.43,.34,.55,.49,.55,.49,.43,0,0,1,0,0,1,0,1,1,0,1,1,0,0,1,0,0,1,0,1,1,0,1,1,0,0,1,0,0,1,0,1,1,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,0,1,1,1,0,0,1,1,1,0,0,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,0,0,1,1,1,0,0,1,1,1,0,0,0,1,1,0,1,0,0,1,0,1,1,0,0,0,1,1,1,0,0,1,1,1,0,0,0,0,1,1,1,0,0,1,1,1,0]),i.normal.push(t),i.color.push(n);for(var s=0;s<r;++s)i.indices.push(s);return i}function I(e,t,n,r,i,s,o){if(i<=0)throw Error("subdivisionDown must be > 0");var l=(o=o||1)-(s=s||0),c=2*(i+1)*4,u=h(3,c),d=h(3,c),p=h(2,c);function m(e,t,n){return e+(t-e)*n}function f(t,n,o,c,h,f){for(var g=0;g<=i;g++){var y=n/1,b=g/i,v=2*(y-.5),S=(s+b*l)*Math.PI,w=Math.sin(S),k=Math.cos(S),T=m(e,t,w),x=v*r,E=k*e,A=w*T;u.push(x,E,A);var C=a.add(a.multiply([0,w,k],o),c);d.push(C),p.push(y*h+f,b)}}for(var g=0;g<2;g++){var y=2*(g/1-.5);f(t,g,[1,1,1],[0,0,0],1,0),f(t,g,[0,0,0],[y,0,0],0,0),f(n,g,[1,1,1],[0,0,0],1,0),f(n,g,[0,0,0],[y,0,0],0,1)}var b=h(3,2*i*4,Uint16Array);function v(e,t){for(var n=0;n<i;++n)b.push(e+n+0,e+n+1,t+n+0),b.push(e+n+1,t+n+1,t+n+0)}var S=i+1;return v(0*S,4*S),v(5*S,7*S),v(6*S,2*S),v(3*S,1*S),{position:u,normal:d,texcoord:p,indices:b}}function O(e,t,n,r,i,s){return E(e,e,t,n,r,i,s)}function M(e,t,n,r,i,s){if(n<3)throw Error("radialSubdivisions must be 3 or greater");if(r<3)throw Error("verticalSubdivisions must be 3 or greater");i=i||0;for(var o=(s=s||2*Math.PI)-i,a=n+1,l=r+1,c=a*l,u=h(3,c),d=h(3,c),p=h(2,c),m=h(3,n*r*2,Uint16Array),f=0;f<l;++f)for(var g=f/r,y=g*Math.PI*2,b=Math.sin(y),v=e+b*t,S=Math.cos(y),w=S*t,k=0;k<a;++k){var T=k/n,x=i+T*o,E=Math.sin(x),A=Math.cos(x),C=E*v,I=A*v,O=E*b,M=A*b;u.push(C,w,I),d.push(O,S,M),p.push(T,1-g)}for(var N=0;N<r;++N)for(var R=0;R<n;++R){var D=1+R,P=1+N;m.push(a*N+R,a*P+R,a*N+D),m.push(a*P+R,a*P+D,a*N+D)}return{position:u,normal:d,texcoord:p,indices:m}}function N(e,t,n,r,i){if(t<3)throw Error("divisions must be at least 3");i=i||1,r=r||0;for(var s=(t+1)*((n=n||1)+1),o=h(3,s),a=h(3,s),l=h(2,s),c=h(3,n*t*2,Uint16Array),u=0,d=e-r,p=t+1,m=0;m<=n;++m){for(var f=r+d*Math.pow(m/n,i),g=0;g<=t;++g){var y=2*Math.PI*g/t,b=f*Math.cos(y),v=f*Math.sin(y);if(o.push(b,0,v),a.push(0,1,0),l.push(1-g/t,m/n),m>0&&g!==t){var S=u+(g+1),w=u+g,k=u+g-p,T=u+(g+1)-p;c.push(S,w,k),c.push(S,k,T)}}u+=t+1}return{position:o,normal:a,texcoord:l,indices:c}}function R(e){return function(t){var n=e.apply(this,Array.prototype.slice.call(arguments,1));return r.createBuffersFromArrays(t,n)}}function D(e){return function(t){var n=e.apply(null,Array.prototype.slice.call(arguments,1));return r.createBufferInfoFromArrays(t,n)}}var P=["numComponents","size","type","normalize","stride","offset","attrib","name","attribName"];function L(e,t,n,r){r=r||0;for(var i=e.length,s=0;s<i;++s)t[n+s]=e[s]+r}function B(e,t){var n=c(e),r=new n.constructor(t),s=r;return n.numComponents&&n.numElements&&d(r,n.numComponents),e.data&&(s={data:r},i.copyNamedProperties(P,e,s)),s}var z=D(C);t.create3DFBufferInfo=z;var U=R(C);t.create3DFBuffers=U;var j=D(x);t.createCubeBufferInfo=j;var F=R(x);t.createCubeBuffers=F;var W=D(w);t.createPlaneBufferInfo=W;var V=R(w);t.createPlaneBuffers=V;var G=D(k);t.createSphereBufferInfo=G;var q=R(k);t.createSphereBuffers=q;var Y=D(E);t.createTruncatedConeBufferInfo=Y;var H=R(E);t.createTruncatedConeBuffers=H;var _=D(S);t.createXYQuadBufferInfo=_;var K=R(S);t.createXYQuadBuffers=K;var Q=D(I);t.createCresentBufferInfo=Q;var X=R(I);t.createCresentBuffers=X;var Z=D(O);t.createCylinderBufferInfo=Z;var J=R(O);t.createCylinderBuffers=J;var $=D(M);t.createTorusBufferInfo=$;var ee=R(M);t.createTorusBuffers=ee;var te=D(N);t.createDiscBufferInfo=te;var ne=R(N);t.createDiscBuffers=ne},function(e,t,n){"use strict";t.__esModule=!0;var r={addExtensionsToContext:!0,getContext:!0,getWebGLContext:!0,resizeCanvasToDisplaySize:!0,setDefaults:!0};t.addExtensionsToContext=b,t.getContext=function(e,t){var n=function(e,t){for(var n=["webgl2","webgl","experimental-webgl"],r=null,i=0;i<n.length;++i)if(r=e.getContext(n[i],t)){m.addExtensionsToContext&&b(r);break}return r}(e,t);return n},t.getWebGLContext=function(e,t){var n=function(e,t){for(var n=["webgl","experimental-webgl"],r=null,i=0;i<n.length;++i)if(r=e.getContext(n[i],t)){m.addExtensionsToContext&&b(r);break}return r}(e,t);return n},t.resizeCanvasToDisplaySize=function(e,t){t=t||1,t=Math.max(0,t);var n=e.clientWidth*t|0,r=e.clientHeight*t|0;return(e.width!==n||e.height!==r)&&(e.width=n,e.height=r,!0)},t.setDefaults=function(e){o.copyExistingProperties(e,m),i.setAttributeDefaults_(e),s.setTextureDefaults_(e)};var i=p(n(7));Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||(t[e]=i[e]))}));var s=p(n(8));Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||(t[e]=s[e]))}));var o=p(n(0)),a=p(n(4));Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||(t[e]=a[e]))}));var l=n(12);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||(t[e]=l[e]))}));var c=n(13);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||(t[e]=c[e]))}));var u=n(5);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||(t[e]=u[e]))}));var d=n(1);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||(t[e]=d[e]))}));var h=n(14);function p(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||(t[e]=h[e]))}));var m={addExtensionsToContext:!0},f=/^(.*?)_/;function g(e,t){a.glEnumToString(e,0);var n=e.getExtension(t);if(n){var r={},i=f.exec(t)[1],s="_"+i;for(var l in n){var c=n[l],u="function"==typeof c,d=u?i:s,h=l;l.endsWith(d)&&(h=l.substring(0,l.length-d.length)),void 0!==e[h]?u||e[h]===c||o.warn(h,e[h],c,l):u?e[h]=function(e){return function(){return e.apply(n,arguments)}}(c):(e[h]=c,r[h]=c)}r.constructor={name:n.constructor.name},a.glEnumToString(r,0)}return n}var y=["ANGLE_instanced_arrays","EXT_blend_minmax","EXT_color_buffer_float","EXT_color_buffer_half_float","EXT_disjoint_timer_query","EXT_disjoint_timer_query_webgl2","EXT_frag_depth","EXT_sRGB","EXT_shader_texture_lod","EXT_texture_filter_anisotropic","OES_element_index_uint","OES_standard_derivatives","OES_texture_float","OES_texture_float_linear","OES_texture_half_float","OES_texture_half_float_linear","OES_vertex_array_object","WEBGL_color_buffer_float","WEBGL_compressed_texture_atc","WEBGL_compressed_texture_etc1","WEBGL_compressed_texture_pvrtc","WEBGL_compressed_texture_s3tc","WEBGL_compressed_texture_s3tc_srgb","WEBGL_depth_texture","WEBGL_draw_buffers"];function b(e){for(var t=0;t<y.length;++t)g(e,y[t])}},function(e,t,n){"use strict";t.__esModule=!0,t.drawBufferInfo=i,t.drawObjectList=function(e,t){var n=null,s=null;t.forEach((function(t){if(!1!==t.active){var o=t.programInfo,a=t.vertexArrayInfo||t.bufferInfo,l=!1,c=void 0===t.type?e.TRIANGLES:t.type;o!==n&&(n=o,e.useProgram(o.program),l=!0),(l||a!==s)&&(s&&s.vertexArrayObject&&!a.vertexArrayObject&&e.bindVertexArray(null),s=a,r.setBuffersAndAttributes(e,o,a)),r.setUniforms(o,t.uniforms),i(e,a,c,t.count,t.offset,t.instanceCount)}})),s.vertexArrayObject&&e.bindVertexArray(null)};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(5));function i(e,t,n,r,i,s){n=void 0===n?e.TRIANGLES:n;var o=t.indices,a=t.elementType,l=void 0===r?t.numElements:r;i=void 0===i?0:i,a||o?void 0!==s?e.drawElementsInstanced(n,l,void 0===a?e.UNSIGNED_SHORT:t.elementType,i,s):e.drawElements(n,l,void 0===a?e.UNSIGNED_SHORT:t.elementType,i):void 0!==s?e.drawArraysInstanced(n,i,l,s):e.drawArrays(n,i,l)}},function(e,t,n){"use strict";t.__esModule=!0,t.bindFramebufferInfo=function(e,t,n){n=n||e.FRAMEBUFFER,t?(e.bindFramebuffer(n,t.framebuffer),e.viewport(0,0,t.width,t.height)):(e.bindFramebuffer(n,null),e.viewport(0,0,e.drawingBufferWidth,e.drawingBufferHeight))},t.createFramebufferInfo=function(e,t,n,s){var o=e.FRAMEBUFFER,d=e.createFramebuffer();e.bindFramebuffer(o,d),n=n||e.drawingBufferWidth,s=s||e.drawingBufferHeight;var h=0,p={framebuffer:d,attachments:[],width:n,height:s};return(t=t||l).forEach((function(t){var l=t.attachment,d=t.format,m=function(e){return c[e]}(d);if(m||(m=a+h++),!l)if(function(e){return u[e]}(d))l=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,l),e.renderbufferStorage(e.RENDERBUFFER,d,n,s);else{var f=Object.assign({},t);f.width=n,f.height=s,void 0===f.auto&&(f.auto=!1,f.min=f.min||f.minMag||e.LINEAR,f.mag=f.mag||f.minMag||e.LINEAR,f.wrapS=f.wrapS||f.wrap||e.CLAMP_TO_EDGE,f.wrapT=f.wrapT||f.wrap||e.CLAMP_TO_EDGE),l=r.createTexture(e,f)}if(i.isRenderbuffer(e,l))e.framebufferRenderbuffer(o,m,e.RENDERBUFFER,l);else{if(!i.isTexture(e,l))throw"unknown attachment type";e.framebufferTexture2D(o,m,t.texTarget||e.TEXTURE_2D,l,t.level||0)}p.attachments.push(l)})),p},t.resizeFramebufferInfo=function(e,t,n,s,o){s=s||e.drawingBufferWidth,o=o||e.drawingBufferHeight,t.width=s,t.height=o,(n=n||l).forEach((function(n,a){var l=t.attachments[a],c=n.format;if(i.isRenderbuffer(e,l))e.bindRenderbuffer(e.RENDERBUFFER,l),e.renderbufferStorage(e.RENDERBUFFER,c,s,o);else{if(!i.isTexture(e,l))throw"unknown attachment type";r.resizeTexture(e,l,n,s,o)}}))};var r=s(n(8)),i=s(n(0));function s(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}var o=34041,a=36064,l=[{format:6408,type:5121,min:9729,wrap:33071},{format:o}],c={34041:33306,6401:36128,36168:36128,6402:36096,33189:36096},u={32854:!0,32855:!0,36194:!0,34041:!0,33189:!0,6401:!0,36168:!0}},function(e,t,n){"use strict";t.__esModule=!0,t.createVertexArrayInfo=function(e,t,n){var i=e.createVertexArray();return e.bindVertexArray(i),t.length||(t=[t]),t.forEach((function(t){r.setBuffersAndAttributes(e,t,n)})),e.bindVertexArray(null),{numElements:n.numElements,elementType:n.elementType,vertexArrayObject:i}},t.createVAOAndSetAttributes=i,t.createVAOFromBufferInfo=function(e,t,n){return i(e,t.attribSetters||t,n.attribs,n.indices)};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(5));function i(e,t,n,i){var s=e.createVertexArray();return e.bindVertexArray(s),r.setAttributes(t,n),i&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,i),e.bindVertexArray(null),s}}])},e.exports=r()},function(e,t){e.exports=class{static simple(e){return JSON.parse(JSON.stringify(e))}}},function(e,t){class n{static get BACKGROUND_LAYER(){return"background"}static get VIDEO_LAYER(){return"video"}static get PEN_LAYER(){return"pen"}static get SPRITE_LAYER(){return"sprite"}static get LAYER_GROUPS(){return[n.BACKGROUND_LAYER,n.VIDEO_LAYER,n.PEN_LAYER,n.SPRITE_LAYER]}}e.exports=n},function(e,t,n){(function(t){class n{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.nowObj;this.startTime=0,this.nowObj=e}static get USE_PERFORMANCE(){return!1}static get legacyDateCode(){return{now:function(){return(new Date).getTime()}}}static get nowObj(){return n.USE_PERFORMANCE&&"undefined"!=typeof self&&self.performance&&"now"in self.performance?self.performance:Date.now?Date:n.legacyDateCode}time(){return this.nowObj.now()}start(){this.startTime=this.nowObj.now()}timeElapsed(){return this.nowObj.now()-this.startTime}setTimeout(e,n){return t.setTimeout(e,n)}clearTimeout(e){t.clearTimeout(e)}}e.exports=n}).call(this,n(9))},function(e,t,n){const r=n(134),i=n(136);class s{static base64ToUint8Array(e){const t=r(e),n=t.length,i=new Uint8Array(n);for(let e=0;e<n;e++)i[e]=t.charCodeAt(e);return i}static uint8ArrayToBase64(e){let t="";const n=e.length;for(let r=0;r<n;r++)t+=String.fromCharCode(e[r]);return i(t)}static arrayBufferToBase64(e){return s.uint8ArrayToBase64(new Uint8Array(e))}}e.exports=s},function(e,t,n){const r=n(204),i=n(73),s=n(32),o=n(46),a=n(12),{Map:l}=n(24),c=n(75),u=n(76),d=n(1),h=n(10),p=n(47);class m{constructor(e,t){this.runtime=e,this._blocks={},this._scripts=[],Object.defineProperty(this,"_cache",{writable:!0,enumerable:!1}),this._cache={inputs:{},procedureParamNames:{},procedureDefinitions:{},_executeCached:{},_monitored:null,scripts:{},compiledScripts:{},compiledProcedures:{},proceduresPopulated:!1},this.forceNoGlow=t||!1}getCachedCompileResult(e){return Object.prototype.hasOwnProperty.call(this._cache.compiledScripts,e)?this._cache.compiledScripts[e]:null}cacheCompileResult(e,t){this._cache.compiledScripts[e]={success:!0,value:t}}cacheCompileError(e,t){this._cache.compiledScripts[e]={success:!1,value:t}}static get BRANCH_INPUT_PREFIX(){return"SUBSTACK"}getBlock(e){return this._blocks[e]}getScripts(){return this._scripts}getNextBlock(e){const t=this._blocks[e];return void 0===t?null:t.next}getBranch(e,t){const n=this._blocks[e];if(void 0===n)return null;t||(t=1);let r=m.BRANCH_INPUT_PREFIX;t>1&&(r+=t);const i=n.inputs[r];return void 0===i?null:i.block}getOpcode(e){return void 0===e?null:e.opcode}getFields(e){return void 0===e?null:e.fields}getInputs(e){if(void 0===e)return null;let t=this._cache.inputs[e.id];if(void 0!==t)return t;t={};for(const n in e.inputs)n.substring(0,m.BRANCH_INPUT_PREFIX.length)!==m.BRANCH_INPUT_PREFIX&&(t[n]=e.inputs[n]);return this._cache.inputs[e.id]=t,t}getMutation(e){return void 0===e?null:e.mutation}getTopLevelScript(e){let t=this._blocks[e];if(void 0===t)return null;for(;null!==t.parent;)t=this._blocks[t.parent];return t.id}getProcedureDefinition(e){const t=this._cache.procedureDefinitions[e];if(void 0!==t)return t;for(const t in this._blocks){if(!Object.prototype.hasOwnProperty.call(this._blocks,t))continue;const n=this._blocks[t];if("procedures_definition"===n.opcode){const r=this._getCustomBlockInternal(n);if(r&&r.mutation.proccode===e)return this._cache.procedureDefinitions[e]=t,t}}return this._cache.procedureDefinitions[e]=null,null}getProcedureParamNamesAndIds(e){return this.getProcedureParamNamesIdsAndDefaults(e).slice(0,2)}getProcedureParamNamesIdsAndDefaults(e){const t=this._cache.procedureParamNames[e];if(void 0!==t)return t;for(const t in this._blocks){if(!Object.prototype.hasOwnProperty.call(this._blocks,t))continue;const n=this._blocks[t];if("procedures_prototype"===n.opcode&&n.mutation.proccode===e){const t=JSON.parse(n.mutation.argumentnames),r=JSON.parse(n.mutation.argumentids),i=JSON.parse(n.mutation.argumentdefaults);return this._cache.procedureParamNames[e]=[t,r,i],this._cache.procedureParamNames[e]}}const n=this.runtime.getAddonBlock(e);return n?(this._cache.procedureParamNames[e]=n.namesIdsDefaults,n.namesIdsDefaults):(this._cache.procedureParamNames[e]=null,null)}populateProcedureCache(){if(!this._cache.proceduresPopulated){for(const e in this._blocks){if(!Object.prototype.hasOwnProperty.call(this._blocks,e))continue;const t=this._blocks[e];if("procedures_prototype"!==t.opcode){if("procedures_definition"===t.opcode){const n=this._getCustomBlockInternal(t);if(n){const t=n.mutation.proccode;this._cache.procedureDefinitions[t]||(this._cache.procedureDefinitions[t]=e);continue}}}else{const e=t.mutation.proccode;if(!this._cache.procedureParamNames[e]){const n=JSON.parse(t.mutation.argumentnames),r=JSON.parse(t.mutation.argumentids),i=JSON.parse(t.mutation.argumentdefaults);this._cache.procedureParamNames[e]=[n,r,i]}}}this._cache.proceduresPopulated=!0}}duplicate(){const e=new m(this.runtime,this.forceNoGlow);return e._blocks=a.simple(this._blocks),e._scripts=a.simple(this._scripts),e}blocklyListen(e){if("object"!=typeof e)return;if("string"!=typeof e.blockId&&"string"!=typeof e.varId&&"string"!=typeof e.commentId)return;const t=this.runtime.getTargetForStage(),n=this.runtime.getEditingTarget();if("stackclick"!==e.element)switch(e.type){case"create":{const t=r(e);for(let e=0;e<t.length;e++)this.createBlock(t[e]);break}case"change":this.changeBlock({id:e.blockId,element:e.element,name:e.name,value:e.newValue});break;case"move":this.moveBlock({id:e.blockId,oldParent:e.oldParentId,oldInput:e.oldInputName,newParent:e.newParentId,newInput:e.newInputName,newCoordinate:e.newCoordinate});break;case"dragOutside":this.runtime.emitBlockDragUpdate(e.isOutside);break;case"endDrag":if(this.runtime.emitBlockDragUpdate(!1),e.isOutside){const t=r(e);this.runtime.emitBlockEndDrag(t,e.blockId)}break;case"delete":if(!Object.prototype.hasOwnProperty.call(this._blocks,e.blockId)||this._blocks[e.blockId].shadow)return;this._blocks[e.blockId].topLevel&&this.runtime.quietGlow(e.blockId),this.deleteBlock(e.blockId);break;case"var_create":if(this.resetCache(),e.isLocal&&n&&!n.isStage&&!e.isCloud)n.lookupVariableById(e.varId)||(n.createVariable(e.varId,e.varName,e.varType),this.emitProjectChanged());else{if(t.lookupVariableById(e.varId))return;const n=this.runtime.targets.filter((e=>e.isOriginal));for(const t of n)if(t.lookupVariableByNameAndType(e.varName,e.varType,!0))return;t.createVariable(e.varId,e.varName,e.varType,e.isCloud),this.emitProjectChanged()}break;case"var_rename":if(n&&Object.prototype.hasOwnProperty.call(n.variables,e.varId))n.renameVariable(e.varId,e.newName),n.blocks.updateBlocksAfterVarRename(e.varId,e.newName);else{t.renameVariable(e.varId,e.newName);const n=this.runtime.targets;for(let t=0;t<n.length;t++){n[t].blocks.updateBlocksAfterVarRename(e.varId,e.newName)}}this.emitProjectChanged();break;case"var_delete":this.resetCache();(n&&Object.prototype.hasOwnProperty.call(n.variables,e.varId)?n:t).deleteVariable(e.varId),this.emitProjectChanged();break;case"comment_create":if(this.resetCache(),this.runtime.getEditingTarget()){const t=this.runtime.getEditingTarget();t.createComment(e.commentId,e.blockId,e.text,e.xy.x,e.xy.y,e.width,e.height,e.minimized),null===t.comments[e.commentId].x&&null===t.comments[e.commentId].y&&(t.comments[e.commentId].x=e.xy.x,t.comments[e.commentId].y=e.xy.y)}this.emitProjectChanged();break;case"comment_change":if(this.resetCache(),this.runtime.getEditingTarget()){const t=this.runtime.getEditingTarget();if(!Object.prototype.hasOwnProperty.call(t.comments,e.commentId))return void d.warn("Cannot change comment with id ".concat(e.commentId," because it does not exist."));const n=t.comments[e.commentId],r=e.newContents_;Object.prototype.hasOwnProperty.call(r,"minimized")&&(n.minimized=r.minimized),Object.prototype.hasOwnProperty.call(r,"width")&&Object.prototype.hasOwnProperty.call(r,"height")&&(n.width=r.width,n.height=r.height),Object.prototype.hasOwnProperty.call(r,"text")&&(n.text=r.text),this.emitProjectChanged()}break;case"comment_move":if(this.runtime.getEditingTarget()){const t=this.runtime.getEditingTarget();if(t&&!Object.prototype.hasOwnProperty.call(t.comments,e.commentId))return void d.warn("Cannot change comment with id ".concat(e.commentId," because it does not exist."));const n=t.comments[e.commentId],r=e.newCoordinate_;n.x=r.x,n.y=r.y,this.emitProjectChanged()}break;case"comment_delete":if(this.resetCache(),this.runtime.getEditingTarget()){const t=this.runtime.getEditingTarget();if(!Object.prototype.hasOwnProperty.call(t.comments,e.commentId))return;if(delete t.comments[e.commentId],e.blockId){const n=t.blocks.getBlock(e.blockId);if(!n)return void d.warn("Could not find block referenced by comment with id: ".concat(e.commentId));delete n.comment}this.emitProjectChanged()}}else this.runtime.toggleScript(e.blockId,{stackClick:!0})}resetCache(){this._cache.inputs={},this._cache.procedureParamNames={},this._cache.procedureDefinitions={},this._cache._executeCached={},this._cache._monitored=null,this._cache.scripts={},this._cache.compiledScripts={},this._cache.compiledProcedures={},this._cache.proceduresPopulated=!1}emitProjectChanged(){this.forceNoGlow||this.runtime.emitProjectChanged()}createBlock(e){Object.prototype.hasOwnProperty.call(this._blocks,e.id)||(this._blocks[e.id]=e,e.topLevel&&this._addScript(e.id),this.resetCache(),this.emitProjectChanged())}changeBlock(e){if(-1===["field","mutation","checkbox"].indexOf(e.element))return;let t=this._blocks[e.id];if(void 0!==t){switch(e.element){case"field":if(!t.fields[e.name])return;if("VARIABLE"===e.name||"LIST"===e.name||"BROADCAST_OPTION"===e.name){const n=this.runtime.getEditingTarget().lookupVariableById(e.value);n&&(t.fields[e.name].value=n.name,t.fields[e.name].id=e.value)}else{t.fields[e.name].value=e.value,"sensing_of_object_menu"===t.opcode&&("_stage_"===t.fields.OBJECT.value?this._blocks[t.parent].fields.PROPERTY.value="backdrop #":this._blocks[t.parent].fields.PROPERTY.value="x position",this.runtime.requestBlocksUpdate());const n=t.shadow&&t.parent?this._blocks[t.parent]:t;n.isMonitored&&this.runtime.requestUpdateMonitor(l({id:n.id,params:this._getBlockParams(n)}))}break;case"mutation":t.mutation=i(e.value);break;case"checkbox":{if(t.fields&&Object.keys(t.fields).length>0&&"data_variable"!==t.opcode&&"data_listcontents"!==t.opcode){const e=p(t.id,t.fields);let n=this.runtime.monitorBlocks.getBlock(e);n||(n=JSON.parse(JSON.stringify(t)),n.id=e,this.runtime.monitorBlocks.createBlock(n)),t=n}const n=t.isMonitored;t.isMonitored=e.value;let r=!1;"data_variable"===t.opcode?r=!this.runtime.getTargetForStage().variables[t.fields.VARIABLE.id]:"data_listcontents"===t.opcode&&(r=!this.runtime.getTargetForStage().variables[t.fields.LIST.id]);const i=r||Object.prototype.hasOwnProperty.call(this.runtime.monitorBlockInfo,t.opcode)&&this.runtime.monitorBlockInfo[t.opcode].isSpriteSpecific;t.targetId=i?t.targetId||this.runtime.getEditingTarget().id:null,n&&!t.isMonitored?this.runtime.requestHideMonitor(t.id):!n&&t.isMonitored&&(this.runtime.requestShowMonitor(t.id)||this.runtime.requestAddMonitor(o({id:t.id,targetId:t.targetId,spriteName:t.targetId?this.runtime.getTargetById(t.targetId).getName():null,opcode:t.opcode,params:this._getBlockParams(t),value:"",mode:"data_listcontents"===t.opcode?"list":"default"})));break}}this.emitProjectChanged(),this.resetCache()}}moveBlock(e){if(!Object.prototype.hasOwnProperty.call(this._blocks,e.id))return;const t=this._blocks[e.id];let n=!1;if(e.newCoordinate&&(n=t.x!==e.newCoordinate.x||t.y!==e.newCoordinate.y,t.x=e.newCoordinate.x,t.y=e.newCoordinate.y),void 0!==e.oldParent){const t=this._blocks[e.oldParent];void 0!==e.oldInput&&t.inputs[e.oldInput].block===e.id?t.inputs[e.oldInput].block=null:t.next===e.id&&(t.next=null),this._blocks[e.id].parent=null,n=!0}if(void 0===e.newParent)this._addScript(e.id);else{if(this._deleteScript(e.id),void 0===e.newInput)this._blocks[e.newParent].next=e.id;else{let t=null;Object.prototype.hasOwnProperty.call(this._blocks[e.newParent].inputs,e.newInput)&&(t=this._blocks[e.newParent].inputs[e.newInput].shadow),this._blocks[e.id].shadow&&(t=e.id),this._blocks[e.newParent].inputs[e.newInput]={name:e.newInput,block:e.id,shadow:t}}this._blocks[e.id].parent=e.newParent,n=!0}this.resetCache(),n&&this.emitProjectChanged()}runAllMonitored(e){null===this._cache._monitored&&(this._cache._monitored=Object.keys(this._blocks).filter((e=>this.getBlock(e).isMonitored)).map((t=>{const n=this.getBlock(t).targetId;return{blockId:t,target:n?e.getTargetById(n):null}})));const t=this._cache._monitored;for(let n=0;n<t.length;n++){const{blockId:r,target:i}=t[n];e.addMonitorScript(r,i)}}deleteBlock(e){const t=this._blocks[e];if(t){null!==t.next&&this.deleteBlock(t.next);for(const e in t.inputs)null!==t.inputs[e].block&&this.deleteBlock(t.inputs[e].block),null!==t.inputs[e].shadow&&t.inputs[e].shadow!==t.inputs[e].block&&this.deleteBlock(t.inputs[e].shadow);this._deleteScript(e),delete this._blocks[e],this.resetCache(),this.emitProjectChanged()}}deleteAllBlocks(){Object.keys(this._blocks).forEach((e=>this.deleteBlock(e)))}getAllVariableAndListReferences(e,t){const n=e||this._blocks,r=Object.create(null);for(const e in n){let i=null,s=null;if(n[e].fields.VARIABLE?(i=n[e].fields.VARIABLE,s=h.SCALAR_TYPE):n[e].fields.LIST?(i=n[e].fields.LIST,s=h.LIST_TYPE):t&&n[e].fields.BROADCAST_OPTION&&(i=n[e].fields.BROADCAST_OPTION,s=h.BROADCAST_MESSAGE_TYPE),i){const e=i.id;r[e]?r[e].push({referencingField:i,type:s}):r[e]=[{referencingField:i,type:s}]}}return r}updateBlocksAfterVarRename(e,t){const n=this._blocks;for(const r in n){let i=null;if(n[r].fields.VARIABLE?i=n[r].fields.VARIABLE:n[r].fields.LIST&&(i=n[r].fields.LIST),i){e===i.id&&(i.value=t)}}}updateTargetSpecificBlocks(e){const t=this._blocks;for(const n in t)e&&"event_whenthisspriteclicked"===t[n].opcode?t[n].opcode="event_whenstageclicked":e||"event_whenstageclicked"!==t[n].opcode||(t[n].opcode="event_whenthisspriteclicked")}updateAssetName(e,t,n){let r;if("costume"===n)r=this._getCostumeField.bind(this);else if("sound"===n)r=this._getSoundField.bind(this);else if("backdrop"===n)r=this._getBackdropField.bind(this);else{if("sprite"!==n)return;r=this._getSpriteField.bind(this)}const i=this._blocks;for(const n in i){const i=r(n);i&&i.value===e&&(i.value=t)}this.resetCache()}updateSensingOfReference(e,t,n){const r=this._blocks;let i=!1;for(const s in r){const o=r[s];if("sensing_of"===o.opcode&&o.fields.PROPERTY.value===e&&o.inputs.OBJECT.block===o.inputs.OBJECT.shadow){this.getBlock(o.inputs.OBJECT.block).fields.OBJECT.value===n&&(o.fields.PROPERTY.value=t,i=!0)}}return i&&this.resetCache(),i}_getCostumeField(e){const t=this.getBlock(e);return t&&Object.prototype.hasOwnProperty.call(t.fields,"COSTUME")?t.fields.COSTUME:null}_getSoundField(e){const t=this.getBlock(e);return t&&Object.prototype.hasOwnProperty.call(t.fields,"SOUND_MENU")?t.fields.SOUND_MENU:null}_getBackdropField(e){const t=this.getBlock(e);return t&&Object.prototype.hasOwnProperty.call(t.fields,"BACKDROP")?t.fields.BACKDROP:null}_getSpriteField(e){const t=this.getBlock(e);if(!t)return null;const n=["TOWARDS","TO","OBJECT","VIDEOONMENU2","DISTANCETOMENU","TOUCHINGOBJECTMENU","CLONE_OPTION"];for(let e=0;e<n.length;e++){const r=n[e];if(Object.prototype.hasOwnProperty.call(t.fields,r))return t.fields[r]}return null}toXML(e){return this._scripts.map((t=>this.blockToXML(t,e))).join()}blockToXML(e,t){const n=this._blocks[e];if(!n)return;const r=n.shadow?"shadow":"block";let i="<".concat(r,'\n                id="').concat(s(n.id),'"\n                type="').concat(s(n.opcode),'"\n                ').concat(n.topLevel?'x="'.concat(n.x,'" y="').concat(n.y,'"'):"","\n            >");const o=n.comment;o&&(t?Object.prototype.hasOwnProperty.call(t,o)?i+=t[o].toXML():d.warn("Could not find comment with id: ".concat(o," in provided comment descriptions.")):d.warn("Cannot serialize comment with id: ".concat(o,"; no comment descriptions provided."))),n.mutation&&(i+=this.mutationToXML(n.mutation));for(const e in n.inputs){if(!Object.prototype.hasOwnProperty.call(n.inputs,e))continue;const r=n.inputs[e];(r.block||r.shadow)&&(i+='<value name="'.concat(s(r.name),'">'),r.block&&(i+=this.blockToXML(r.block,t)),r.shadow&&r.shadow!==r.block&&(i+=this.blockToXML(r.shadow,t)),i+="</value>")}for(const e in n.fields){if(!Object.prototype.hasOwnProperty.call(n.fields,e))continue;const t=n.fields[e];i+='<field name="'.concat(s(t.name),'"');const r=t.id;r&&(i+=' id="'.concat(s(r),'"'));const o=t.variableType;"string"==typeof o&&(i+=' variabletype="'.concat(s(o),'"'));let a=t.value;"string"==typeof a&&(a=s(t.value)),i+=">".concat(a,"</field>")}return n.next&&(i+="<next>".concat(this.blockToXML(n.next,t),"</next>")),i+="</".concat(r,">"),i}mutationToXML(e){let t="<".concat(e.tagName);for(const n in e){if("children"===n||"tagName"===n)continue;let r="string"==typeof e[n]?s(e[n]):e[n];"blockInfo"===n&&(r=s(JSON.stringify(e[n]))),t+=" ".concat(n,'="').concat(r,'"')}t+=">";for(let n=0;n<e.children.length;n++)t+=this.mutationToXML(e.children[n]);return t+="</".concat(e.tagName,">"),t}_getBlockParams(e){const t={};for(const n in e.fields)t[n]=e.fields[n].value;for(const n in e.inputs){const r=this._blocks[e.inputs[n].block];for(const e in r.fields)t[e]=r.fields[e].value}return t}_getCustomBlockInternal(e){if(e.inputs&&e.inputs.custom_block)return this._blocks[e.inputs.custom_block.block]}_addScript(e){this._scripts.indexOf(e)>-1||(this._scripts.push(e),this._blocks[e].topLevel=!0)}_deleteScript(e){const t=this._scripts.indexOf(e);t>-1&&this._scripts.splice(t,1),this._blocks[e]&&(this._blocks[e].topLevel=!1)}}c.getCached=function(e,t,n){let r=e._cache._executeCached[t];if(void 0!==r)return r;const i=e.getBlock(t);return void 0===i?null:(r=void 0===n?{id:t,opcode:e.getOpcode(i),fields:e.getFields(i),inputs:e.getInputs(i),mutation:e.getMutation(i)}:new n(e,{id:t,opcode:e.getOpcode(i),fields:e.getFields(i),inputs:e.getInputs(i),mutation:e.getMutation(i)}),e._cache._executeCached[t]=r,r)};const f=u._RuntimeScriptCache;u.getScripts=function(e,t){let n=e._cache.scripts[t];if(!n){n=e._cache.scripts[t]=[];const r=e._scripts;for(let i=0;i<r.length;i++){const s=r[i];e.getBlock(s).opcode===t&&n.push(new f(e,s))}}return n},e.exports=m},function(e,t,n){var r=n(0).TYPE,i=r.WhiteSpace,s=r.Semicolon,o=r.LeftCurlyBracket,a=r.Delim;function l(){return this.scanner.tokenIndex>0&&this.scanner.lookupType(-1)===i?this.scanner.tokenIndex>1?this.scanner.getTokenStart(this.scanner.tokenIndex-1):this.scanner.firstCharOffset:this.scanner.tokenStart}function c(){return 0}e.exports={name:"Raw",structure:{value:String},parse:function(e,t,n){var r,i=this.scanner.getTokenStart(e);return this.scanner.skip(this.scanner.getRawLength(e,t||c)),r=n&&this.scanner.tokenStart>i?l.call(this):this.scanner.tokenStart,{type:"Raw",loc:this.getLocation(i,r),value:this.scanner.source.substring(i,r)}},generate:function(e){this.chunk(e.value)},mode:{default:c,leftCurlyBracket:function(e){return e===o?1:0},leftCurlyBracketOrSemicolon:function(e){return e===o||e===s?1:0},exclamationMarkOrSemicolon:function(e,t,n){return e===a&&33===t.charCodeAt(n)||e===s?1:0},semicolonIncluded:function(e){return e===s?2:0}}}},function(e,t,n){"use strict";(function(e){var r=n(120),i=n(121),s=n(122);function o(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(o()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=h(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|m(t,n);e=a(e,r);var i=e.write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(l.isBuffer(t)){var n=0|p(t.length);return 0===(e=a(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?a(e,0):h(e,t);if("Buffer"===t.type&&s(t.data))return h(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(u(t),e=a(e,t<0?0:0|p(t)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|p(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function m(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(e).length;default:if(r)return W(e).length;t=(""+t).toLowerCase(),r=!0}}function f(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return M(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return I(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return E(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){var s,o=1,a=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,a/=2,l/=2,n/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var u=-1;for(s=n;s<a;s++)if(c(e,s)===c(t,-1===u?0:s-u)){if(-1===u&&(u=s),s-u+1===l)return u*o}else-1!==u&&(s-=s-u),u=-1}else for(n+l>a&&(n=a-l),s=n;s>=0;s--){for(var d=!0,h=0;h<l;h++)if(c(e,s+h)!==c(t,h)){d=!1;break}if(d)return s}return-1}function v(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");r>s/2&&(r=s/2);for(var o=0;o<r;++o){var a=parseInt(t.substr(2*o,2),16);if(isNaN(a))return o;e[n+o]=a}return o}function S(e,t,n,r){return G(W(t,e.length-n),e,n,r)}function w(e,t,n,r){return G(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function k(e,t,n,r){return w(e,t,n,r)}function T(e,t,n,r){return G(V(t),e,n,r)}function x(e,t,n,r){return G(function(e,t){for(var n,r,i,s=[],o=0;o<e.length&&!((t-=2)<0);++o)r=(n=e.charCodeAt(o))>>8,i=n%256,s.push(i),s.push(r);return s}(t,e.length-n),e,n,r)}function E(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var s,o,a,l,c=e[i],u=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(s=e[i+1]))&&(l=(31&c)<<6|63&s)>127&&(u=l);break;case 3:s=e[i+1],o=e[i+2],128==(192&s)&&128==(192&o)&&(l=(15&c)<<12|(63&s)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:s=e[i+1],o=e[i+2],a=e[i+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&(l=(15&c)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=d}return function(e){var t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=C));return n}(r)}t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=o(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,n){return c(null,e,t,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,n){return function(e,t,n,r){return u(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}(null,e,t,n)},l.allocUnsafe=function(e){return d(null,e)},l.allocUnsafeSlow=function(e){return d(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,s=Math.min(n,r);i<s;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!s(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=l.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!l.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},l.byteLength=m,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?A(this,0,e):f.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},l.prototype.compare=function(e,t,n,r,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var s=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),a=Math.min(s,o),c=this.slice(r,i),u=e.slice(t,n),d=0;d<a;++d)if(c[d]!==u[d]){s=c[d],o=u[d];break}return s<o?-1:o<s?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},l.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return S(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return k(this,e,t,n);case"base64":return T(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function I(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function O(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function M(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",s=t;s<n;++s)i+=F(e[s]);return i}function N(e,t,n){for(var r=e.slice(t,n),i="",s=0;s<r.length;s+=2)i+=String.fromCharCode(r[s]+256*r[s+1]);return i}function R(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,i,s){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function P(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,s=Math.min(e.length-n,2);i<s;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function L(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,s=Math.min(e.length-n,4);i<s;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function B(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function z(e,t,n,r,s){return s||B(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,s){return s||B(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=l.prototype;else{var i=t-e;n=new l(i,void 0);for(var s=0;s<i;++s)n[s]=this[s+e]}return n},l.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],i=1,s=0;++s<t&&(i*=256);)r+=this[e+s]*i;return r},l.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],i=1,s=0;++s<t&&(i*=256);)r+=this[e+s]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=t,i=1,s=this[e+--r];r>0&&(i*=256);)s+=this[e+--r]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},l.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,s=0;for(this[t]=255&e;++s<n&&(i*=256);)this[t+s]=e/i&255;return t+n},l.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s<n&&(o*=256);)e<0&&0===a&&0!==this[t+s-1]&&(a=1),this[t+s]=(e/o|0)-a&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var s=n-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o|0)-a&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return z(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return z(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,s=r-n;if(this===e&&n<t&&t<r)for(i=s-1;i>=0;--i)e[i+t]=this[i+n];else if(s<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i<s;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+s),t);return s},l.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var s;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(s=t;s<n;++s)this[s]=e;else{var o=l.isBuffer(e)?e:W(new l(e,r).toString()),a=o.length;for(s=0;s<n-t;++s)this[s+t]=o[s%a]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function F(e){return e<16?"0"+e.toString(16):e.toString(16)}function W(e,t){var n;t=t||1/0;for(var r=e.length,i=null,s=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function V(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function G(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(9))},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,s=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,s),r(n)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}y(e,t,s,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&y(e,"error",t,n)}(e,i,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var l=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var i,s,o,a;if(c(n),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),o=s[t]),void 0===o)o=s[t]=n,++e._eventsCount;else if("function"==typeof o?o=s[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=u(e))>0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,a=l,console&&console.warn&&console.warn(a)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=h.bind(r);return i.listener=n,r.wrapFn=i,i}function m(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):g(i,i.length)}function f(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function y(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(s){r.once&&e.removeEventListener(t,i),n(s)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return u(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)s(l,this,t);else{var c=l.length,u=g(l,c);for(n=0;n<c;++n)s(u[n],this,t)}return!0},a.prototype.addListener=function(e,t){return d(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return d(this,e,t,!0)},a.prototype.once=function(e,t){return c(t),this.on(e,p(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,p(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,s,o;if(c(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,s=n.length-1;s>=0;s--)if(n[s]===t||n[s].listener===t){o=n[s].listener,i=s;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,s=Object.keys(n);for(r=0;r<s.length;++r)"removeListener"!==(i=s[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return m(this,e,!0)},a.prototype.rawListeners=function(e){return m(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},a.prototype.listenerCount=f,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t){function n(e){return{prev:null,next:null,data:e}}function r(e,t,n){var r;return null!==s?(r=s,s=s.cursor,r.prev=t,r.next=n,r.cursor=e.cursor):r={prev:t,next:n,cursor:e.cursor},e.cursor=r,r}function i(e){var t=e.cursor;e.cursor=t.cursor,t.prev=null,t.next=null,t.cursor=s,s=t}var s=null,o=function(){this.cursor=null,this.head=null,this.tail=null};o.createItem=n,o.prototype.createItem=n,o.prototype.updateCursors=function(e,t,n,r){for(var i=this.cursor;null!==i;)i.prev===e&&(i.prev=t),i.next===n&&(i.next=r),i=i.cursor},o.prototype.getSize=function(){for(var e=0,t=this.head;t;)e++,t=t.next;return e},o.prototype.fromArray=function(e){var t=null;this.head=null;for(var r=0;r<e.length;r++){var i=n(e[r]);null!==t?t.next=i:this.head=i,i.prev=t,t=i}return this.tail=t,this},o.prototype.toArray=function(){for(var e=this.head,t=[];e;)t.push(e.data),e=e.next;return t},o.prototype.toJSON=o.prototype.toArray,o.prototype.isEmpty=function(){return null===this.head},o.prototype.first=function(){return this.head&&this.head.data},o.prototype.last=function(){return this.tail&&this.tail.data},o.prototype.each=function(e,t){var n;void 0===t&&(t=this);for(var s=r(this,null,this.head);null!==s.next;)n=s.next,s.next=n.next,e.call(t,n.data,n,this);i(this)},o.prototype.forEach=o.prototype.each,o.prototype.eachRight=function(e,t){var n;void 0===t&&(t=this);for(var s=r(this,this.tail,null);null!==s.prev;)n=s.prev,s.prev=n.prev,e.call(t,n.data,n,this);i(this)},o.prototype.forEachRight=o.prototype.eachRight,o.prototype.reduce=function(e,t,n){var s;void 0===n&&(n=this);for(var o=r(this,null,this.head),a=t;null!==o.next;)s=o.next,o.next=s.next,a=e.call(n,a,s.data,s,this);return i(this),a},o.prototype.reduceRight=function(e,t,n){var s;void 0===n&&(n=this);for(var o=r(this,this.tail,null),a=t;null!==o.prev;)s=o.prev,o.prev=s.prev,a=e.call(n,a,s.data,s,this);return i(this),a},o.prototype.nextUntil=function(e,t,n){if(null!==e){var s;void 0===n&&(n=this);for(var o=r(this,null,e);null!==o.next&&(s=o.next,o.next=s.next,!t.call(n,s.data,s,this)););i(this)}},o.prototype.prevUntil=function(e,t,n){if(null!==e){var s;void 0===n&&(n=this);for(var o=r(this,e,null);null!==o.prev&&(s=o.prev,o.prev=s.prev,!t.call(n,s.data,s,this)););i(this)}},o.prototype.some=function(e,t){var n=this.head;for(void 0===t&&(t=this);null!==n;){if(e.call(t,n.data,n,this))return!0;n=n.next}return!1},o.prototype.map=function(e,t){var n=new o,r=this.head;for(void 0===t&&(t=this);null!==r;)n.appendData(e.call(t,r.data,r,this)),r=r.next;return n},o.prototype.filter=function(e,t){var n=new o,r=this.head;for(void 0===t&&(t=this);null!==r;)e.call(t,r.data,r,this)&&n.appendData(r.data),r=r.next;return n},o.prototype.clear=function(){this.head=null,this.tail=null},o.prototype.copy=function(){for(var e=new o,t=this.head;null!==t;)e.insert(n(t.data)),t=t.next;return e},o.prototype.prepend=function(e){return this.updateCursors(null,e,this.head,e),null!==this.head?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this},o.prototype.prependData=function(e){return this.prepend(n(e))},o.prototype.append=function(e){return this.insert(e)},o.prototype.appendData=function(e){return this.insert(n(e))},o.prototype.insert=function(e,t){if(null!=t)if(this.updateCursors(t.prev,e,t,e),null===t.prev){if(this.head!==t)throw new Error("before doesn't belong to list");this.head=e,t.prev=e,e.next=t,this.updateCursors(null,e)}else t.prev.next=e,e.prev=t.prev,t.prev=e,e.next=t;else this.updateCursors(this.tail,e,null,e),null!==this.tail?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this},o.prototype.insertData=function(e,t){return this.insert(n(e),t)},o.prototype.remove=function(e){if(this.updateCursors(e,e.prev,e,e.next),null!==e.prev)e.prev.next=e.next;else{if(this.head!==e)throw new Error("item doesn't belong to list");this.head=e.next}if(null!==e.next)e.next.prev=e.prev;else{if(this.tail!==e)throw new Error("item doesn't belong to list");this.tail=e.prev}return e.prev=null,e.next=null,e},o.prototype.push=function(e){this.insert(n(e))},o.prototype.pop=function(){if(null!==this.tail)return this.remove(this.tail)},o.prototype.unshift=function(e){this.prepend(n(e))},o.prototype.shift=function(){if(null!==this.head)return this.remove(this.head)},o.prototype.prependList=function(e){return this.insertList(e,this.head)},o.prototype.appendList=function(e){return this.insertList(e)},o.prototype.insertList=function(e,t){return null===e.head||(null!=t?(this.updateCursors(t.prev,e.tail,t,e.head),null!==t.prev?(t.prev.next=e.head,e.head.prev=t.prev):this.head=e.head,t.prev=e.tail,e.tail.next=t):(this.updateCursors(this.tail,e.tail,null,e.head),null!==this.tail?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null),this},o.prototype.replace=function(e,t){"head"in t?this.insertList(t,e):this.insert(t,e),this.remove(e)},e.exports=o},function(e,t,n){n(64),e.exports={TextEncoder:TextEncoder,TextDecoder:TextDecoder}},function(e,t,n){(function(t,n,r,i){e.exports=function e(t,n,r){function i(o,a){if(!n[o]){if(!t[o]){if(s)return s(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[o]={exports:{}};t[o][0].call(c.exports,(function(e){return i(t[o][1][e]||e)}),c,c.exports,e,t,n,r)}return n[o].exports}for(var s=!1,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){"use strict";var r=e("./utils"),i=e("./support"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(e){for(var t,n,i,o,a,l,c,u=[],d=0,h=e.length,p=h,m="string"!==r.getTypeOf(e);d<e.length;)p=h-d,i=m?(t=e[d++],n=d<h?e[d++]:0,d<h?e[d++]:0):(t=e.charCodeAt(d++),n=d<h?e.charCodeAt(d++):0,d<h?e.charCodeAt(d++):0),o=t>>2,a=(3&t)<<4|n>>4,l=1<p?(15&n)<<2|i>>6:64,c=2<p?63&i:64,u.push(s.charAt(o)+s.charAt(a)+s.charAt(l)+s.charAt(c));return u.join("")},n.decode=function(e){var t,n,r,o,a,l,c=0,u=0,d="data:";if(e.substr(0,d.length)===d)throw new Error("Invalid base64 input, it looks like a data url.");var h,p=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(e.charAt(e.length-1)===s.charAt(64)&&p--,e.charAt(e.length-2)===s.charAt(64)&&p--,p%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=i.uint8array?new Uint8Array(0|p):new Array(0|p);c<e.length;)t=s.indexOf(e.charAt(c++))<<2|(o=s.indexOf(e.charAt(c++)))>>4,n=(15&o)<<4|(a=s.indexOf(e.charAt(c++)))>>2,r=(3&a)<<6|(l=s.indexOf(e.charAt(c++))),h[u++]=t,64!==a&&(h[u++]=n),64!==l&&(h[u++]=r);return h}},{"./support":30,"./utils":32}],2:[function(e,t,n){"use strict";var r=e("./external"),i=e("./stream/DataWorker"),s=e("./stream/Crc32Probe"),o=e("./stream/DataLengthProbe");function a(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}a.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(e,t,n){return e.pipe(new s).pipe(new o("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new o("compressedSize")).withStreamInfo("compression",t)},t.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){"use strict";var r=e("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},n.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){"use strict";var r=e("./utils"),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==r.getTypeOf(e)?function(e,t,n,r){var s=i,o=r+n;e^=-1;for(var a=r;a<o;a++)e=e>>>8^s[255&(e^t[a])];return~e}(0|t,e,e.length,0):function(e,t,n,r){var s=i,o=r+n;e^=-1;for(var a=r;a<o;a++)e=e>>>8^s[255&(e^t.charCodeAt(a))];return~e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){"use strict";var r=null;r="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),s=e("./utils"),o=e("./stream/GenericWorker"),a=r?"uint8array":"array";function l(e,t){o.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic="\b\0",s.inherits(l,o),l.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(a,e.data),!1)},l.prototype.flush=function(){o.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new i[this._pakoAction]({chunkSize:65536,raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new l("Deflate",e)},n.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){"use strict";function r(e,t){var n,r="";for(n=0;n<t;n++)r+=String.fromCharCode(255&e),e>>>=8;return r}function i(e,t,n,i,o,u){var d,h,p=e.file,m=e.compression,f=u!==a.utf8encode,g=s.transformTo("string",u(p.name)),y=s.transformTo("string",a.utf8encode(p.name)),b=p.comment,v=s.transformTo("string",u(b)),S=s.transformTo("string",a.utf8encode(b)),w=y.length!==p.name.length,k=S.length!==b.length,T="",x="",E="",A=p.dir,C=p.date,I={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(I.crc32=e.crc32,I.compressedSize=e.compressedSize,I.uncompressedSize=e.uncompressedSize);var O=0;t&&(O|=8),f||!w&&!k||(O|=2048);var M=0,N=0;A&&(M|=16),"UNIX"===o?(N=798,M|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(p.unixPermissions,A)):(N=20,M|=function(e){return 63&(e||0)}(p.dosPermissions)),d=C.getUTCHours(),d<<=6,d|=C.getUTCMinutes(),d<<=5,d|=C.getUTCSeconds()/2,h=C.getUTCFullYear()-1980,h<<=4,h|=C.getUTCMonth()+1,h<<=5,h|=C.getUTCDate(),w&&(x=r(1,1)+r(l(g),4)+y,T+="up"+r(x.length,2)+x),k&&(E=r(1,1)+r(l(v),4)+S,T+="uc"+r(E.length,2)+E);var R="";return R+="\n\0",R+=r(O,2),R+=m.magic,R+=r(d,2),R+=r(h,2),R+=r(I.crc32,4),R+=r(I.compressedSize,4),R+=r(I.uncompressedSize,4),R+=r(g.length,2),R+=r(T.length,2),{fileRecord:c.LOCAL_FILE_HEADER+R+g+T,dirRecord:c.CENTRAL_FILE_HEADER+r(N,2)+R+r(v.length,2)+"\0\0\0\0"+r(M,4)+r(i,4)+g+T+v}}var s=e("../utils"),o=e("../stream/GenericWorker"),a=e("../utf8"),l=e("../crc32"),c=e("../signature");function u(e,t,n,r){o.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}s.inherits(u,o),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,o.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return c.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var n=this.bytesWritten-e,i=function(e,t,n,i,o){var a=s.transformTo("string",o(i));return c.CENTRAL_DIRECTORY_END+"\0\0\0\0"+r(e,2)+r(e,2)+r(t,4)+r(n,4)+r(a.length,2)+a}(this.dirRecords.length,n,e,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}})},u.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},u.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()})),e.on("error",(function(e){t.error(e)})),this},u.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},u.prototype.error=function(e){var t=this._sources;if(!o.prototype.error.call(this,e))return!1;for(var n=0;n<t.length;n++)try{t[n].error(e)}catch(e){}return!0},u.prototype.lock=function(){o.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=u},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,n){"use strict";var r=e("../compressions"),i=e("./ZipFileWorker");n.generateWorker=function(e,t,n){var s=new i(t.streamFiles,n,t.platform,t.encodeFileName),o=0;try{e.forEach((function(e,n){o++;var i=function(e,t){var n=e||t,i=r[n];if(!i)throw new Error(n+" is not a valid compression method !");return i}(n.options.compression,t.compression),a=n.options.compressionOptions||t.compressionOptions||{},l=n.dir,c=n.date;n._compressWorker(i,a).withStreamInfo("file",{name:e,dir:l,date:c,comment:n.comment||"",unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions}).pipe(s)})),s.entriesCount=o}catch(e){s.error(e)}return s}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,n){"use strict";function r(){if(!(this instanceof r))return new r;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new r;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}(r.prototype=e("./object")).loadAsync=e("./load"),r.support=e("./support"),r.defaults=e("./defaults"),r.version="3.10.1",r.loadAsync=function(e,t){return(new r).loadAsync(e,t)},r.external=e("./external"),t.exports=r},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,n){"use strict";var r=e("./utils"),i=e("./external"),s=e("./utf8"),o=e("./zipEntries"),a=e("./stream/Crc32Probe"),l=e("./nodejsUtils");function c(e){return new i.Promise((function(t,n){var r=e.decompressed.getContentWorker().pipe(new a);r.on("error",(function(e){n(e)})).on("end",(function(){r.streamInfo.crc32!==e.decompressed.crc32?n(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}t.exports=function(e,t){var n=this;return t=r.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:s.utf8decode}),l.isNode&&l.isStream(e)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):r.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var n=new o(t);return n.load(e),n})).then((function(e){var n=[i.Promise.resolve(e)],r=e.files;if(t.checkCRC32)for(var s=0;s<r.length;s++)n.push(c(r[s]));return i.Promise.all(n)})).then((function(e){for(var i=e.shift(),s=i.files,o=0;o<s.length;o++){var a=s[o],l=a.fileNameStr,c=r.resolve(a.fileNameStr);n.file(c,a.decompressed,{binary:!0,optimizedBinaryString:!0,date:a.date,dir:a.dir,comment:a.fileCommentStr.length?a.fileCommentStr:null,unixPermissions:a.unixPermissions,dosPermissions:a.dosPermissions,createFolders:t.createFolders}),a.dir||(n.file(c).unsafeOriginalName=l)}return i.zipComment.length&&(n.comment=i.zipComment),n}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,n){"use strict";var r=e("../utils"),i=e("../stream/GenericWorker");function s(e,t){i.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}r.inherits(s,i),s.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",(function(e){t.push({data:e,meta:{percent:0}})})).on("error",(function(e){t.isPaused?this.generatedError=e:t.error(e)})).on("end",(function(){t.isPaused?t._upstreamEnded=!0:t.end()}))},s.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=s},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,n){"use strict";var r=e("readable-stream").Readable;function i(e,t,n){r.call(this,t),this._helper=e;var i=this;e.on("data",(function(e,t){i.push(e)||i._helper.pause(),n&&n(t)})).on("error",(function(e){i.emit("error",e)})).on("end",(function(){i.push(null)}))}e("../utils").inherits(i,r),i.prototype._read=function(){this._helper.resume()},t.exports=i},{"../utils":32,"readable-stream":16}],14:[function(e,n,r){"use strict";n.exports={isNode:void 0!==t,newBufferFrom:function(e,n){if(t.from&&t.from!==Uint8Array.from)return t.from(e,n);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new t(e,n)},allocBuffer:function(e){if(t.alloc)return t.alloc(e);var n=new t(e);return n.fill(0),n},isBuffer:function(e){return t.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,n){"use strict";function r(e,t,n){var r,i=s.getTypeOf(t),a=s.extend(n||{},l);a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),"string"==typeof a.unixPermissions&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&16384&a.unixPermissions&&(a.dir=!0),a.dosPermissions&&16&a.dosPermissions&&(a.dir=!0),a.dir&&(e=f(e)),a.createFolders&&(r=m(e))&&g.call(this,r,!0);var d="string"===i&&!1===a.binary&&!1===a.base64;n&&void 0!==n.binary||(a.binary=!d),(t instanceof c&&0===t.uncompressedSize||a.dir||!t||0===t.length)&&(a.base64=!1,a.binary=!0,t="",a.compression="STORE",i="string");var y=null;y=t instanceof c||t instanceof o?t:h.isNode&&h.isStream(t)?new p(e,t):s.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var b=new u(e,y,a);this.files[e]=b}var i=e("./utf8"),s=e("./utils"),o=e("./stream/GenericWorker"),a=e("./stream/StreamHelper"),l=e("./defaults"),c=e("./compressedObject"),u=e("./zipObject"),d=e("./generate"),h=e("./nodejsUtils"),p=e("./nodejs/NodejsStreamInputAdapter"),m=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},f=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},g=function(e,t){return t=void 0!==t?t:l.createFolders,e=f(e),this.files[e]||r.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function y(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var b={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,n,r;for(t in this.files)r=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,r)},filter:function(e){var t=[];return this.forEach((function(n,r){e(n,r)&&t.push(r)})),t},file:function(e,t,n){if(1!==arguments.length)return e=this.root+e,r.call(this,e,t,n),this;if(y(e)){var i=e;return this.filter((function(e,t){return!t.dir&&i.test(e)}))}var s=this.files[this.root+e];return s&&!s.dir?s:null},folder:function(e){if(!e)return this;if(y(e))return this.filter((function(t,n){return n.dir&&e.test(t)}));var t=this.root+e,n=g.call(this,t),r=this.clone();return r.root=n.name,r},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter((function(t,n){return n.name.slice(0,e.length)===e})),r=0;r<n.length;r++)delete this.files[n[r].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,n={};try{if((n=s.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=n.type.toLowerCase(),n.compression=n.compression.toUpperCase(),"binarystring"===n.type&&(n.type="string"),!n.type)throw new Error("No output type specified.");s.checkSupport(n.type),"darwin"!==n.platform&&"freebsd"!==n.platform&&"linux"!==n.platform&&"sunos"!==n.platform||(n.platform="UNIX"),"win32"===n.platform&&(n.platform="DOS");var r=n.comment||this.comment||"";t=d.generateWorker(this,n,r)}catch(e){(t=new o("error")).error(e)}return new a(t,n.type||"string",n.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=b},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,n){"use strict";t.exports=e("stream")},{stream:void 0}],17:[function(e,t,n){"use strict";var r=e("./DataReader");function i(e){r.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(i,r),i.prototype.byteAt=function(e){return this.data[this.zero+e]},i.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),s=this.length-4;0<=s;--s)if(this.data[s]===t&&this.data[s+1]===n&&this.data[s+2]===r&&this.data[s+3]===i)return s-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),s=this.readData(4);return t===s[0]&&n===s[1]&&r===s[2]&&i===s[3]},i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],18:[function(e,t,n){"use strict";var r=e("../utils");function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t,n=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){"use strict";var r=e("./Uint8ArrayReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){"use strict";var r=e("./DataReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){"use strict";var r=e("./ArrayReader"),i=e("./DataReader");function s(e){i.call(this,e)}e("../utils").inherits(s,r),s.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=s},{"../utils":32,"./ArrayReader":17,"./DataReader":18}],22:[function(e,t,n){"use strict";var r=e("../utils"),i=e("../support"),s=e("./ArrayReader"),o=e("./StringReader"),a=e("./NodeBufferReader"),l=e("./Uint8ArrayReader");t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new a(e):i.uint8array?new l(r.transformTo("uint8array",e)):new s(r.transformTo("array",e)):new o(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){"use strict";n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,n){"use strict";var r=e("./GenericWorker"),i=e("../utils");function s(e){r.call(this,"ConvertWorker to "+e),this.destType=e}i.inherits(s,r),s.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){"use strict";var r=e("./GenericWorker"),i=e("../crc32");function s(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(s,r),s.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(s,i),s.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}r.inherits(s,i),s.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+65536);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":case"nodebuffer":e=this.data.subarray(this.index,t);break;case"array":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){"use strict";function r(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n<this._listeners[e].length;n++)this._listeners[e][n].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.end()})),e.on("error",(function(e){t.error(e)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=r},{}],29:[function(e,n,r){"use strict";var i=e("../utils"),s=e("./ConvertWorker"),o=e("./GenericWorker"),a=e("../base64"),l=e("../support"),c=e("../external"),u=null;if(l.nodestream)try{u=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function d(e,n){return new c.Promise((function(r,s){var o=[],l=e._internalType,c=e._outputType,u=e._mimeType;e.on("data",(function(e,t){o.push(e),n&&n(t)})).on("error",(function(e){o=[],s(e)})).on("end",(function(){try{var e=function(e,t,n){switch(e){case"blob":return i.newBlob(i.transformTo("arraybuffer",t),n);case"base64":return a.encode(t);default:return i.transformTo(e,t)}}(c,function(e,n){var r,i=0,s=null,o=0;for(r=0;r<n.length;r++)o+=n[r].length;switch(e){case"string":return n.join("");case"array":return Array.prototype.concat.apply([],n);case"uint8array":for(s=new Uint8Array(o),r=0;r<n.length;r++)s.set(n[r],i),i+=n[r].length;return s;case"nodebuffer":return t.concat(n);default:throw new Error("concat : unsupported type '"+e+"'")}}(l,o),u);r(e)}catch(e){s(e)}o=[]})).resume()}))}function h(e,t,n){var r=t;switch(t){case"blob":case"arraybuffer":r="uint8array";break;case"base64":r="string"}try{this._internalType=r,this._outputType=t,this._mimeType=n,i.checkSupport(r),this._worker=e.pipe(new s(r)),e.lock()}catch(e){this._worker=new o("error"),this._worker.error(e)}}h.prototype={accumulate:function(e){return d(this,e)},on:function(e,t){var n=this;return"data"===e?this._worker.on(e,(function(e){t.call(n,e.data,e.meta)})):this._worker.on(e,(function(){i.delay(t,arguments,n)})),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(i.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new u(this,{objectMode:"nodebuffer"!==this._outputType},e)}},n.exports=h},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,n,r){"use strict";if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer=void 0!==t,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else{var i=new ArrayBuffer(0);try{r.blob=0===new Blob([i],{type:"application/zip"}).size}catch(e){try{var s=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);s.append(i),r.blob=0===s.getBlob("application/zip").size}catch(e){r.blob=!1}}}try{r.nodestream=!!e("readable-stream").Readable}catch(e){r.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){"use strict";for(var r=e("./utils"),i=e("./support"),s=e("./nodejsUtils"),o=e("./stream/GenericWorker"),a=new Array(256),l=0;l<256;l++)a[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;function c(){o.call(this,"utf-8 decode"),this.leftOver=null}function u(){o.call(this,"utf-8 encode")}a[254]=a[254]=1,n.utf8encode=function(e){return i.nodebuffer?s.newBufferFrom(e,"utf-8"):function(e){var t,n,r,s,o,a=e.length,l=0;for(s=0;s<a;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(r=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(r-56320),s++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=i.uint8array?new Uint8Array(l):new Array(l),s=o=0;o<l;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(r=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(r-56320),s++),n<128?t[o++]=n:(n<2048?t[o++]=192|n>>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,n,i,s,o=e.length,l=new Array(2*o);for(t=n=0;t<o;)if((i=e[t++])<128)l[n++]=i;else if(4<(s=a[i]))l[n++]=65533,t+=s-1;else{for(i&=2===s?31:3===s?15:7;1<s&&t<o;)i=i<<6|63&e[t++],s--;1<s?l[n++]=65533:i<65536?l[n++]=i:(i-=65536,l[n++]=55296|i>>10&1023,l[n++]=56320|1023&i)}return l.length!==n&&(l.subarray?l=l.subarray(0,n):l.length=n),r.applyFromCharCode(l)}(e=r.transformTo(i.uint8array?"uint8array":"array",e))},r.inherits(c,o),c.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var s=t;(t=new Uint8Array(s.length+this.leftOver.length)).set(this.leftOver,0),t.set(s,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var o=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}(t),l=t;o!==t.length&&(i.uint8array?(l=t.subarray(0,o),this.leftOver=t.subarray(o,t.length)):(l=t.slice(0,o),this.leftOver=t.slice(o,t.length))),this.push({data:n.utf8decode(l),meta:e.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=c,r.inherits(u,o),u.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,r){"use strict";var i=e("./support"),s=e("./base64"),o=e("./nodejsUtils"),a=e("./external");function l(e){return e}function c(e,t){for(var n=0;n<e.length;++n)t[n]=255&e.charCodeAt(n);return t}e("setimmediate"),r.newBlob=function(e,t){r.checkSupport("blob");try{return new Blob([e],{type:t})}catch(r){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(e),n.getBlob(t)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var u={stringifyByChunk:function(e,t,n){var r=[],i=0,s=e.length;if(s<=n)return String.fromCharCode.apply(null,e);for(;i<s;)"array"===t||"nodebuffer"===t?r.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+n,s)))):r.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+n,s)))),i+=n;return r.join("")},stringifyByChar:function(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},applyCanBeUsed:{uint8array:function(){try{return i.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return i.nodebuffer&&1===String.fromCharCode.apply(null,o.allocBuffer(1)).length}catch(e){return!1}}()}};function d(e){var t=65536,n=r.getTypeOf(e),i=!0;if("uint8array"===n?i=u.applyCanBeUsed.uint8array:"nodebuffer"===n&&(i=u.applyCanBeUsed.nodebuffer),i)for(;1<t;)try{return u.stringifyByChunk(e,n,t)}catch(e){t=Math.floor(t/2)}return u.stringifyByChar(e)}function h(e,t){for(var n=0;n<e.length;n++)t[n]=e[n];return t}r.applyFromCharCode=d;var p={};p.string={string:l,array:function(e){return c(e,new Array(e.length))},arraybuffer:function(e){return p.string.uint8array(e).buffer},uint8array:function(e){return c(e,new Uint8Array(e.length))},nodebuffer:function(e){return c(e,o.allocBuffer(e.length))}},p.array={string:d,array:l,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(e)}},p.arraybuffer={string:function(e){return d(new Uint8Array(e))},array:function(e){return h(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:l,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(new Uint8Array(e))}},p.uint8array={string:d,array:function(e){return h(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:l,nodebuffer:function(e){return o.newBufferFrom(e)}},p.nodebuffer={string:d,array:function(e){return h(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:function(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)},nodebuffer:l},r.transformTo=function(e,t){if(t=t||"",!e)return t;r.checkSupport(e);var n=r.getTypeOf(t);return p[n][e](t)},r.resolve=function(e){for(var t=e.split("/"),n=[],r=0;r<t.length;r++){var i=t[r];"."===i||""===i&&0!==r&&r!==t.length-1||(".."===i?n.pop():n.push(i))}return n.join("/")},r.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":i.nodebuffer&&o.isBuffer(e)?"nodebuffer":i.uint8array&&e instanceof Uint8Array?"uint8array":i.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(e){if(!i[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(e){var t,n,r="";for(n=0;n<(e||"").length;n++)r+="\\x"+((t=e.charCodeAt(n))<16?"0":"")+t.toString(16).toUpperCase();return r},r.delay=function(e,t,r){n((function(){e.apply(r||null,t||[])}))},r.inherits=function(e,t){function n(){}n.prototype=t.prototype,e.prototype=new n},r.extend=function(){var e,t,n={};for(e=0;e<arguments.length;e++)for(t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&void 0===n[t]&&(n[t]=arguments[e][t]);return n},r.prepareContent=function(e,t,n,o,l){return a.Promise.resolve(t).then((function(e){var t=i.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)));return t&&"undefined"!=typeof FileReader?new a.Promise((function(t,n){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=function(e){n(e.target.error)},r.readAsArrayBuffer(e)})):t&&"function"==typeof e.arrayBuffer?e.arrayBuffer():e})).then((function(t){var u=r.getTypeOf(t);return u?("arraybuffer"===u?t=r.transformTo("uint8array",t):"string"===u&&(l?t=s.decode(t):n&&!0!==o&&(t=function(e){return c(e,i.uint8array?new Uint8Array(e.length):new Array(e.length))}(t))),t):a.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,n){"use strict";var r=e("./reader/readerFor"),i=e("./utils"),s=e("./signature"),o=e("./zipEntry"),a=e("./support");function l(e){this.files=[],this.loadOptions=e}l.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(t)+", expected "+i.pretty(e)+")")}},isSignature:function(e,t){var n=this.reader.index;this.reader.setIndex(e);var r=this.reader.readString(4)===t;return this.reader.setIndex(n),r},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=a.uint8array?"uint8array":"array",n=i.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(n)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,n,r=this.zip64EndOfCentralSize-44;0<r;)e=this.reader.readInt(2),t=this.reader.readInt(4),n=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:n}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(e=new o({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,s.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(e);var t=e;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var r=t-n;if(0<r)this.isSignature(t,s.CENTRAL_FILE_HEADER)||(this.reader.zero=r);else if(r<0)throw new Error("Corrupted zip: missing "+Math.abs(r)+" bytes.")},prepareReader:function(e){this.reader=r(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=l},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,n){"use strict";var r=e("./reader/readerFor"),i=e("./utils"),s=e("./compressedObject"),o=e("./crc32"),a=e("./utf8"),l=e("./compressions"),c=e("./support");function u(e,t){this.options=e,this.loadOptions=t}u.prototype={isEncrypted:function(){return!(1&~this.bitFlag)},useUTF8:function(){return!(2048&~this.bitFlag)},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in l)if(Object.prototype.hasOwnProperty.call(l,t)&&l[t].magic===e)return l[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<i;)t=e.readInt(2),n=e.readInt(2),r=e.readData(n),this.extraFields[t]={id:t,length:n,value:r};e.setIndex(i)},handleUTF8:function(){var e=c.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var n=i.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(n)}var r=this.findExtraFieldUnicodeComment();if(null!==r)this.fileCommentStr=r;else{var s=i.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(s)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=r(e.value);return 1!==t.readInt(1)||o(this.fileName)!==t.readInt(4)?null:a.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=r(e.value);return 1!==t.readInt(1)||o(this.fileComment)!==t.readInt(4)?null:a.utf8decode(t.readData(e.length-5))}return null}},t.exports=u},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,n){"use strict";function r(e,t,n){this.name=e,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=t,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}}var i=e("./stream/StreamHelper"),s=e("./stream/DataWorker"),o=e("./utf8"),a=e("./compressedObject"),l=e("./stream/GenericWorker");r.prototype={internalStream:function(e){var t=null,n="string";try{if(!e)throw new Error("No output type specified.");var r="string"===(n=e.toLowerCase())||"text"===n;"binarystring"!==n&&"text"!==n||(n="string"),t=this._decompressWorker();var s=!this._dataBinary;s&&!r&&(t=t.pipe(new o.Utf8EncodeWorker)),!s&&r&&(t=t.pipe(new o.Utf8DecodeWorker))}catch(e){(t=new l("error")).error(e)}return new i(t,n,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof a&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new o.Utf8EncodeWorker)),a.createWorkerFrom(n,e,t)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof l?this._data:new s(this._data)}};for(var c=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],u=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},d=0;d<c.length;d++)r.prototype[c[d]]=u;t.exports=r},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,n){(function(e){"use strict";var n,r,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var s=0,o=new i(u),a=e.document.createTextNode("");o.observe(a,{characterData:!0}),n=function(){a.data=s=++s%2}}else if(e.setImmediate||void 0===e.MessageChannel)n="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){u(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(u,0)};else{var l=new e.MessageChannel;l.port1.onmessage=u,n=function(){l.port2.postMessage(0)}}var c=[];function u(){var e,t;r=!0;for(var n=c.length;n;){for(t=c,c=[],e=-1;++e<n;)t[e]();n=c.length}r=!1}t.exports=function(e){1!==c.push(e)||r||n()}}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(e,t,n){"use strict";var r=e("immediate");function i(){}var s={},o=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==i&&p(this,e)}function u(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function d(e,t,n){r((function(){var r;try{r=t(n)}catch(r){return s.reject(e,r)}r===e?s.reject(e,new TypeError("Cannot resolve promise with itself")):s.resolve(e,r)}))}function h(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function p(e,t){var n=!1;function r(t){n||(n=!0,s.reject(e,t))}function i(t){n||(n=!0,s.resolve(e,t))}var o=m((function(){t(i,r)}));"error"===o.status&&r(o.value)}function m(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}(t.exports=c).prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){throw n}))}))},c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===o)return this;var n=new this.constructor(i);return this.state!==l?d(n,this.state===a?e:t,this.outcome):this.queue.push(new u(n,e,t)),n},u.prototype.callFulfilled=function(e){s.resolve(this.promise,e)},u.prototype.otherCallFulfilled=function(e){d(this.promise,this.onFulfilled,e)},u.prototype.callRejected=function(e){s.reject(this.promise,e)},u.prototype.otherCallRejected=function(e){d(this.promise,this.onRejected,e)},s.resolve=function(e,t){var n=m(h,t);if("error"===n.status)return s.reject(e,n.value);var r=n.value;if(r)p(e,r);else{e.state=a,e.outcome=t;for(var i=-1,o=e.queue.length;++i<o;)e.queue[i].callFulfilled(t)}return e},s.reject=function(e,t){e.state=o,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:s.resolve(new this(i),e)},c.reject=function(e){var t=new this(i);return s.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var o=new Array(n),a=0,l=-1,c=new this(i);++l<n;)u(e[l],l);return c;function u(e,i){t.resolve(e).then((function(e){o[i]=e,++a!==n||r||(r=!0,s.resolve(c,o))}),(function(e){r||(r=!0,s.reject(c,e))}))}},c.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var o,a=-1,l=new this(i);++a<n;)o=e[a],t.resolve(o).then((function(e){r||(r=!0,s.resolve(l,e))}),(function(e){r||(r=!0,s.reject(l,e))}));return l}},{immediate:36}],38:[function(e,t,n){"use strict";var r={};(0,e("./lib/utils/common").assign)(r,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=r},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,n){"use strict";var r=e("./zlib/deflate"),i=e("./utils/common"),s=e("./utils/strings"),o=e("./zlib/messages"),a=e("./zlib/zstream"),l=Object.prototype.toString,c=0,u=-1,d=0,h=8;function p(e){if(!(this instanceof p))return new p(e);this.options=i.assign({level:u,method:h,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:""},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var n=r.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==c)throw new Error(o[n]);if(t.header&&r.deflateSetHeader(this.strm,t.header),t.dictionary){var m;if(m="string"==typeof t.dictionary?s.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(n=r.deflateSetDictionary(this.strm,m))!==c)throw new Error(o[n]);this._dict_set=!0}}function m(e,t){var n=new p(t);if(n.push(e,!0),n.err)throw n.msg||o[n.err];return n.result}p.prototype.push=function(e,t){var n,o,a=this.strm,u=this.options.chunkSize;if(this.ended)return!1;o=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=s.string2buf(e):"[object ArrayBuffer]"===l.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new i.Buf8(u),a.next_out=0,a.avail_out=u),1!==(n=r.deflate(a,o))&&n!==c)return this.onEnd(n),!(this.ended=!0);0!==a.avail_out&&(0!==a.avail_in||4!==o&&2!==o)||("string"===this.options.to?this.onData(s.buf2binstring(i.shrinkBuf(a.output,a.next_out))):this.onData(i.shrinkBuf(a.output,a.next_out)))}while((0<a.avail_in||0===a.avail_out)&&1!==n);return 4===o?(n=r.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===c):2!==o||(this.onEnd(c),!(a.avail_out=0))},p.prototype.onData=function(e){this.chunks.push(e)},p.prototype.onEnd=function(e){e===c&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Deflate=p,n.deflate=m,n.deflateRaw=function(e,t){return(t=t||{}).raw=!0,m(e,t)},n.gzip=function(e,t){return(t=t||{}).gzip=!0,m(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,n){"use strict";var r=e("./zlib/inflate"),i=e("./utils/common"),s=e("./utils/strings"),o=e("./zlib/constants"),a=e("./zlib/messages"),l=e("./zlib/zstream"),c=e("./zlib/gzheader"),u=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&!(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=r.inflateInit2(this.strm,t.windowBits);if(n!==o.Z_OK)throw new Error(a[n]);if(this.header=new c,r.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=s.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=r.inflateSetDictionary(this.strm,t.dictionary))!==o.Z_OK))throw new Error(a[n])}function h(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}d.prototype.push=function(e,t){var n,a,l,c,d,h=this.strm,p=this.options.chunkSize,m=this.options.dictionary,f=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?o.Z_FINISH:o.Z_NO_FLUSH,"string"==typeof e?h.input=s.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new i.Buf8(p),h.next_out=0,h.avail_out=p),(n=r.inflate(h,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&m&&(n=r.inflateSetDictionary(this.strm,m)),n===o.Z_BUF_ERROR&&!0===f&&(n=o.Z_OK,f=!1),n!==o.Z_STREAM_END&&n!==o.Z_OK)return this.onEnd(n),!(this.ended=!0);h.next_out&&(0!==h.avail_out&&n!==o.Z_STREAM_END&&(0!==h.avail_in||a!==o.Z_FINISH&&a!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(l=s.utf8border(h.output,h.next_out),c=h.next_out-l,d=s.buf2string(h.output,l),h.next_out=c,h.avail_out=p-c,c&&i.arraySet(h.output,h.output,l,c,0),this.onData(d)):this.onData(i.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(f=!0)}while((0<h.avail_in||0===h.avail_out)&&n!==o.Z_STREAM_END);return n===o.Z_STREAM_END&&(a=o.Z_FINISH),a===o.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===o.Z_OK):a!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),!(h.avail_out=0))},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Inflate=d,n.inflate=h,n.inflateRaw=function(e,t){return(t=t||{}).raw=!0,h(e,t)},n.ungzip=h},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;n.assign=function(e){for(var t,n,r=Array.prototype.slice.call(arguments,1);r.length;){var i=r.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var s in i)t=i,n=s,Object.prototype.hasOwnProperty.call(t,n)&&(e[s]=i[s])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var s=0;s<r;s++)e[i+s]=t[n+s]},flattenChunks:function(e){var t,n,r,i,s,o;for(t=r=0,n=e.length;t<n;t++)r+=e[t].length;for(o=new Uint8Array(r),t=i=0,n=e.length;t<n;t++)s=e[t],o.set(s,i),i+=s.length;return o}},s={arraySet:function(e,t,n,r,i){for(var s=0;s<r;s++)e[i+s]=t[n+s]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,i)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,s))},n.setTyped(r)},{}],42:[function(e,t,n){"use strict";var r=e("./common"),i=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){s=!1}for(var o=new r.Buf8(256),a=0;a<256;a++)o[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function l(e,t){if(t<65534&&(e.subarray&&s||!e.subarray&&i))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n="",o=0;o<t;o++)n+=String.fromCharCode(e[o]);return n}o[254]=o[254]=1,n.string2buf=function(e){var t,n,i,s,o,a=e.length,l=0;for(s=0;s<a;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(i=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(i-56320),s++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(l),s=o=0;o<l;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(i=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(i-56320),s++),n<128?t[o++]=n:(n<2048?t[o++]=192|n>>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n<i;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,r,i,s,a=t||e.length,c=new Array(2*a);for(n=r=0;n<a;)if((i=e[n++])<128)c[r++]=i;else if(4<(s=o[i]))c[r++]=65533,n+=s-1;else{for(i&=2===s?31:3===s?15:7;1<s&&n<a;)i=i<<6|63&e[n++],s--;1<s?c[r++]=65533:i<65536?c[r++]=i:(i-=65536,c[r++]=55296|i>>10&1023,c[r++]=56320|1023&i)}return l(c,r)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+o[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){for(var i=65535&e,s=e>>>16&65535,o=0;0!==n;){for(n-=o=2e3<n?2e3:n;s=s+(i=i+t[r++]|0)|0,--o;);i%=65521,s%=65521}return i|s<<16}},{}],44:[function(e,t,n){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,t,n){"use strict";var r=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var s=r,o=i+n;e^=-1;for(var a=i;a<o;a++)e=e>>>8^s[255&(e^t[a])];return~e}},{}],46:[function(e,t,n){"use strict";var r,i=e("../utils/common"),s=e("./trees"),o=e("./adler32"),a=e("./crc32"),l=e("./messages"),c=0,u=4,d=0,h=-2,p=-1,m=4,f=2,g=8,y=9,b=286,v=30,S=19,w=2*b+1,k=15,T=3,x=258,E=x+T+1,A=42,C=113,I=1,O=2,M=3,N=4;function R(e,t){return e.msg=l[t],t}function D(e){return(e<<1)-(4<e?9:0)}function P(e){for(var t=e.length;0<=--t;)e[t]=0}function L(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function B(e,t){s._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,L(e.strm)}function z(e,t){e.pending_buf[e.pending++]=t}function U(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function j(e,t){var n,r,i=e.max_chain_length,s=e.strstart,o=e.prev_length,a=e.nice_match,l=e.strstart>e.w_size-E?e.strstart-(e.w_size-E):0,c=e.window,u=e.w_mask,d=e.prev,h=e.strstart+x,p=c[s+o-1],m=c[s+o];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(c[(n=t)+o]===m&&c[n+o-1]===p&&c[n]===c[s]&&c[++n]===c[s+1]){s+=2,n++;do{}while(c[++s]===c[++n]&&c[++s]===c[++n]&&c[++s]===c[++n]&&c[++s]===c[++n]&&c[++s]===c[++n]&&c[++s]===c[++n]&&c[++s]===c[++n]&&c[++s]===c[++n]&&s<h);if(r=x-(h-s),s=h-x,o<r){if(e.match_start=t,a<=(o=r))break;p=c[s+o-1],m=c[s+o]}}}while((t=d[t&u])>l&&0!=--i);return o<=e.lookahead?o:e.lookahead}function F(e){var t,n,r,s,l,c,u,d,h,p,m=e.w_size;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-E)){for(i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;r=e.head[--t],e.head[t]=m<=r?r-m:0,--n;);for(t=n=m;r=e.prev[--t],e.prev[t]=m<=r?r-m:0,--n;);s+=m}if(0===e.strm.avail_in)break;if(c=e.strm,u=e.window,d=e.strstart+e.lookahead,p=void 0,(h=s)<(p=c.avail_in)&&(p=h),n=0===p?0:(c.avail_in-=p,i.arraySet(u,c.input,c.next_in,p,d),1===c.state.wrap?c.adler=o(c.adler,u,p,d):2===c.state.wrap&&(c.adler=a(c.adler,u,p,d)),c.next_in+=p,c.total_in+=p,p),e.lookahead+=n,e.lookahead+e.insert>=T)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+T-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<T)););}while(e.lookahead<E&&0!==e.strm.avail_in)}function W(e,t){for(var n,r;;){if(e.lookahead<E){if(F(e),e.lookahead<E&&t===c)return I;if(0===e.lookahead)break}if(n=0,e.lookahead>=T&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+T-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-E&&(e.match_length=j(e,n)),e.match_length>=T)if(r=s._tr_tally(e,e.strstart-e.match_start,e.match_length-T),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=T){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+T-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(B(e,!1),0===e.strm.avail_out))return I}return e.insert=e.strstart<T-1?e.strstart:T-1,t===u?(B(e,!0),0===e.strm.avail_out?M:N):e.last_lit&&(B(e,!1),0===e.strm.avail_out)?I:O}function V(e,t){for(var n,r,i;;){if(e.lookahead<E){if(F(e),e.lookahead<E&&t===c)return I;if(0===e.lookahead)break}if(n=0,e.lookahead>=T&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+T-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=T-1,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-E&&(e.match_length=j(e,n),e.match_length<=5&&(1===e.strategy||e.match_length===T&&4096<e.strstart-e.match_start)&&(e.match_length=T-1)),e.prev_length>=T&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-T,r=s._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-T),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+T-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=T-1,e.strstart++,r&&(B(e,!1),0===e.strm.avail_out))return I}else if(e.match_available){if((r=s._tr_tally(e,0,e.window[e.strstart-1]))&&B(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return I}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=s._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<T-1?e.strstart:T-1,t===u?(B(e,!0),0===e.strm.avail_out?M:N):e.last_lit&&(B(e,!1),0===e.strm.avail_out)?I:O}function G(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function q(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=g,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*w),this.dyn_dtree=new i.Buf16(2*(2*v+1)),this.bl_tree=new i.Buf16(2*(2*S+1)),P(this.dyn_ltree),P(this.dyn_dtree),P(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(k+1),this.heap=new i.Buf16(2*b+1),P(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*b+1),P(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Y(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=f,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?A:C,e.adler=2===t.wrap?0:1,t.last_flush=c,s._tr_init(t),d):R(e,h)}function H(e){var t=Y(e);return t===d&&function(e){e.window_size=2*e.w_size,P(e.head),e.max_lazy_match=r[e.level].max_lazy,e.good_match=r[e.level].good_length,e.nice_match=r[e.level].nice_length,e.max_chain_length=r[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=T-1,e.match_available=0,e.ins_h=0}(e.state),t}function _(e,t,n,r,s,o){if(!e)return h;var a=1;if(t===p&&(t=6),r<0?(a=0,r=-r):15<r&&(a=2,r-=16),s<1||y<s||n!==g||r<8||15<r||t<0||9<t||o<0||m<o)return R(e,h);8===r&&(r=9);var l=new q;return(e.state=l).strm=e,l.wrap=a,l.gzhead=null,l.w_bits=r,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=s+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+T-1)/T),l.window=new i.Buf8(2*l.w_size),l.head=new i.Buf16(l.hash_size),l.prev=new i.Buf16(l.w_size),l.lit_bufsize=1<<s+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new i.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=o,l.method=n,H(e)}r=[new G(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(F(e),0===e.lookahead&&t===c)return I;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,B(e,!1),0===e.strm.avail_out))return I;if(e.strstart-e.block_start>=e.w_size-E&&(B(e,!1),0===e.strm.avail_out))return I}return e.insert=0,t===u?(B(e,!0),0===e.strm.avail_out?M:N):(e.strstart>e.block_start&&(B(e,!1),e.strm.avail_out),I)})),new G(4,4,8,4,W),new G(4,5,16,8,W),new G(4,6,32,32,W),new G(4,4,16,16,V),new G(8,16,32,32,V),new G(8,16,128,128,V),new G(8,32,128,256,V),new G(32,128,258,1024,V),new G(32,258,258,4096,V)],n.deflateInit=function(e,t){return _(e,t,g,15,8,0)},n.deflateInit2=_,n.deflateReset=H,n.deflateResetKeep=Y,n.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?h:(e.state.gzhead=t,d):h},n.deflate=function(e,t){var n,i,o,l;if(!e||!e.state||5<t||t<0)return e?R(e,h):h;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||666===i.status&&t!==u)return R(e,0===e.avail_out?-5:h);if(i.strm=e,n=i.last_flush,i.last_flush=t,i.status===A)if(2===i.wrap)e.adler=0,z(i,31),z(i,139),z(i,8),i.gzhead?(z(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),z(i,255&i.gzhead.time),z(i,i.gzhead.time>>8&255),z(i,i.gzhead.time>>16&255),z(i,i.gzhead.time>>24&255),z(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),z(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(z(i,255&i.gzhead.extra.length),z(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=a(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(z(i,0),z(i,0),z(i,0),z(i,0),z(i,0),z(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),z(i,3),i.status=C);else{var p=g+(i.w_bits-8<<4)<<8;p|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(p|=32),p+=31-p%31,i.status=C,U(i,p),0!==i.strstart&&(U(i,e.adler>>>16),U(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=a(e.adler,i.pending_buf,i.pending-o,o)),L(e),o=i.pending,i.pending!==i.pending_buf_size));)z(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=a(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=a(e.adler,i.pending_buf,i.pending-o,o)),L(e),o=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,z(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>o&&(e.adler=a(e.adler,i.pending_buf,i.pending-o,o)),0===l&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=a(e.adler,i.pending_buf,i.pending-o,o)),L(e),o=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,z(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>o&&(e.adler=a(e.adler,i.pending_buf,i.pending-o,o)),0===l&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&L(e),i.pending+2<=i.pending_buf_size&&(z(i,255&e.adler),z(i,e.adler>>8&255),e.adler=0,i.status=C)):i.status=C),0!==i.pending){if(L(e),0===e.avail_out)return i.last_flush=-1,d}else if(0===e.avail_in&&D(t)<=D(n)&&t!==u)return R(e,-5);if(666===i.status&&0!==e.avail_in)return R(e,-5);if(0!==e.avail_in||0!==i.lookahead||t!==c&&666!==i.status){var m=2===i.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(F(e),0===e.lookahead)){if(t===c)return I;break}if(e.match_length=0,n=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(B(e,!1),0===e.strm.avail_out))return I}return e.insert=0,t===u?(B(e,!0),0===e.strm.avail_out?M:N):e.last_lit&&(B(e,!1),0===e.strm.avail_out)?I:O}(i,t):3===i.strategy?function(e,t){for(var n,r,i,o,a=e.window;;){if(e.lookahead<=x){if(F(e),e.lookahead<=x&&t===c)return I;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=T&&0<e.strstart&&(r=a[i=e.strstart-1])===a[++i]&&r===a[++i]&&r===a[++i]){o=e.strstart+x;do{}while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o);e.match_length=x-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=T?(n=s._tr_tally(e,1,e.match_length-T),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(B(e,!1),0===e.strm.avail_out))return I}return e.insert=0,t===u?(B(e,!0),0===e.strm.avail_out?M:N):e.last_lit&&(B(e,!1),0===e.strm.avail_out)?I:O}(i,t):r[i.level].func(i,t);if(m!==M&&m!==N||(i.status=666),m===I||m===M)return 0===e.avail_out&&(i.last_flush=-1),d;if(m===O&&(1===t?s._tr_align(i):5!==t&&(s._tr_stored_block(i,0,0,!1),3===t&&(P(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),L(e),0===e.avail_out))return i.last_flush=-1,d}return t!==u?d:i.wrap<=0?1:(2===i.wrap?(z(i,255&e.adler),z(i,e.adler>>8&255),z(i,e.adler>>16&255),z(i,e.adler>>24&255),z(i,255&e.total_in),z(i,e.total_in>>8&255),z(i,e.total_in>>16&255),z(i,e.total_in>>24&255)):(U(i,e.adler>>>16),U(i,65535&e.adler)),L(e),0<i.wrap&&(i.wrap=-i.wrap),0!==i.pending?d:1)},n.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==A&&69!==t&&73!==t&&91!==t&&103!==t&&t!==C&&666!==t?R(e,h):(e.state=null,t===C?R(e,-3):d):h},n.deflateSetDictionary=function(e,t){var n,r,s,a,l,c,u,p,m=t.length;if(!e||!e.state)return h;if(2===(a=(n=e.state).wrap)||1===a&&n.status!==A||n.lookahead)return h;for(1===a&&(e.adler=o(e.adler,t,m,0)),n.wrap=0,m>=n.w_size&&(0===a&&(P(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,t,m-n.w_size,n.w_size,0),t=p,m=n.w_size),l=e.avail_in,c=e.next_in,u=e.input,e.avail_in=m,e.next_in=0,e.input=t,F(n);n.lookahead>=T;){for(r=n.strstart,s=n.lookahead-(T-1);n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+T-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++,--s;);n.strstart=r,n.lookahead=T-1,F(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=T-1,n.match_available=0,e.next_in=c,e.input=u,e.avail_in=l,n.wrap=a,d},n.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,n){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(e,t,n){"use strict";t.exports=function(e,t){var n,r,i,s,o,a,l,c,u,d,h,p,m,f,g,y,b,v,S,w,k,T,x,E,A;n=e.state,r=e.next_in,E=e.input,i=r+(e.avail_in-5),s=e.next_out,A=e.output,o=s-(t-e.avail_out),a=s+(e.avail_out-257),l=n.dmax,c=n.wsize,u=n.whave,d=n.wnext,h=n.window,p=n.hold,m=n.bits,f=n.lencode,g=n.distcode,y=(1<<n.lenbits)-1,b=(1<<n.distbits)-1;e:do{m<15&&(p+=E[r++]<<m,m+=8,p+=E[r++]<<m,m+=8),v=f[p&y];t:for(;;){if(p>>>=S=v>>>24,m-=S,0==(S=v>>>16&255))A[s++]=65535&v;else{if(!(16&S)){if(!(64&S)){v=f[(65535&v)+(p&(1<<S)-1)];continue t}if(32&S){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}w=65535&v,(S&=15)&&(m<S&&(p+=E[r++]<<m,m+=8),w+=p&(1<<S)-1,p>>>=S,m-=S),m<15&&(p+=E[r++]<<m,m+=8,p+=E[r++]<<m,m+=8),v=g[p&b];n:for(;;){if(p>>>=S=v>>>24,m-=S,!(16&(S=v>>>16&255))){if(!(64&S)){v=g[(65535&v)+(p&(1<<S)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(k=65535&v,m<(S&=15)&&(p+=E[r++]<<m,(m+=8)<S&&(p+=E[r++]<<m,m+=8)),l<(k+=p&(1<<S)-1)){e.msg="invalid distance too far back",n.mode=30;break e}if(p>>>=S,m-=S,(S=s-o)<k){if(u<(S=k-S)&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(x=h,(T=0)===d){if(T+=c-S,S<w){for(w-=S;A[s++]=h[T++],--S;);T=s-k,x=A}}else if(d<S){if(T+=c+d-S,(S-=d)<w){for(w-=S;A[s++]=h[T++],--S;);if(T=0,d<w){for(w-=S=d;A[s++]=h[T++],--S;);T=s-k,x=A}}}else if(T+=d-S,S<w){for(w-=S;A[s++]=h[T++],--S;);T=s-k,x=A}for(;2<w;)A[s++]=x[T++],A[s++]=x[T++],A[s++]=x[T++],w-=3;w&&(A[s++]=x[T++],1<w&&(A[s++]=x[T++]))}else{for(T=s-k;A[s++]=A[T++],A[s++]=A[T++],A[s++]=A[T++],2<(w-=3););w&&(A[s++]=A[T++],1<w&&(A[s++]=A[T++]))}break}}break}}while(r<i&&s<a);r-=w=m>>3,p&=(1<<(m-=w<<3))-1,e.next_in=r,e.next_out=s,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=s<a?a-s+257:257-(s-a),n.hold=p,n.bits=m}},{}],49:[function(e,t,n){"use strict";var r=e("../utils/common"),i=e("./adler32"),s=e("./crc32"),o=e("./inffast"),a=e("./inftrees"),l=1,c=2,u=0,d=-2,h=1,p=852,m=592;function f(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function y(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=h,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(p),t.distcode=t.distdyn=new r.Buf32(m),t.sane=1,t.back=-1,u):d}function b(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,y(e)):d}function v(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?d:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,b(e))):d}function S(e,t){var n,r;return e?(r=new g,(e.state=r).window=null,(n=v(e,t))!==u&&(e.state=null),n):d}var w,k,T=!0;function x(e){if(T){var t;for(w=new r.Buf32(512),k=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(l,e.lens,0,288,w,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(c,e.lens,0,32,k,0,e.work,{bits:5}),T=!1}e.lencode=w,e.lenbits=9,e.distcode=k,e.distbits=5}function E(e,t,n,i){var s,o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new r.Buf8(o.wsize)),i>=o.wsize?(r.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(s=o.wsize-o.wnext)&&(s=i),r.arraySet(o.window,t,n-i,s,o.wnext),(i-=s)?(r.arraySet(o.window,t,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=s,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=s))),0}n.inflateReset=b,n.inflateReset2=v,n.inflateResetKeep=y,n.inflateInit=function(e){return S(e,15)},n.inflateInit2=S,n.inflate=function(e,t){var n,p,m,g,y,b,v,S,w,k,T,A,C,I,O,M,N,R,D,P,L,B,z,U,j=0,F=new r.Buf8(4),W=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return d;12===(n=e.state).mode&&(n.mode=13),y=e.next_out,m=e.output,v=e.avail_out,g=e.next_in,p=e.input,b=e.avail_in,S=n.hold,w=n.bits,k=b,T=v,B=u;e:for(;;)switch(n.mode){case h:if(0===n.wrap){n.mode=13;break}for(;w<16;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}if(2&n.wrap&&35615===S){F[n.check=0]=255&S,F[1]=S>>>8&255,n.check=s(n.check,F,2,0),w=S=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&S)<<8)+(S>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&S)){e.msg="unknown compression method",n.mode=30;break}if(w-=4,L=8+(15&(S>>>=4)),0===n.wbits)n.wbits=L;else if(L>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<<L,e.adler=n.check=1,n.mode=512&S?10:12,w=S=0;break;case 2:for(;w<16;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}if(n.flags=S,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=S>>8&1),512&n.flags&&(F[0]=255&S,F[1]=S>>>8&255,n.check=s(n.check,F,2,0)),w=S=0,n.mode=3;case 3:for(;w<32;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}n.head&&(n.head.time=S),512&n.flags&&(F[0]=255&S,F[1]=S>>>8&255,F[2]=S>>>16&255,F[3]=S>>>24&255,n.check=s(n.check,F,4,0)),w=S=0,n.mode=4;case 4:for(;w<16;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}n.head&&(n.head.xflags=255&S,n.head.os=S>>8),512&n.flags&&(F[0]=255&S,F[1]=S>>>8&255,n.check=s(n.check,F,2,0)),w=S=0,n.mode=5;case 5:if(1024&n.flags){for(;w<16;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}n.length=S,n.head&&(n.head.extra_len=S),512&n.flags&&(F[0]=255&S,F[1]=S>>>8&255,n.check=s(n.check,F,2,0)),w=S=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(b<(A=n.length)&&(A=b),A&&(n.head&&(L=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,p,g,A,L)),512&n.flags&&(n.check=s(n.check,p,A,g)),b-=A,g+=A,n.length-=A),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===b)break e;for(A=0;L=p[g+A++],n.head&&L&&n.length<65536&&(n.head.name+=String.fromCharCode(L)),L&&A<b;);if(512&n.flags&&(n.check=s(n.check,p,A,g)),b-=A,g+=A,L)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===b)break e;for(A=0;L=p[g+A++],n.head&&L&&n.length<65536&&(n.head.comment+=String.fromCharCode(L)),L&&A<b;);if(512&n.flags&&(n.check=s(n.check,p,A,g)),b-=A,g+=A,L)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;w<16;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}if(S!==(65535&n.check)){e.msg="header crc mismatch",n.mode=30;break}w=S=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;w<32;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}e.adler=n.check=f(S),w=S=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=y,e.avail_out=v,e.next_in=g,e.avail_in=b,n.hold=S,n.bits=w,2;e.adler=n.check=1,n.mode=12;case 12:if(5===t||6===t)break e;case 13:if(n.last){S>>>=7&w,w-=7&w,n.mode=27;break}for(;w<3;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}switch(n.last=1&S,w-=1,3&(S>>>=1)){case 0:n.mode=14;break;case 1:if(x(n),n.mode=20,6!==t)break;S>>>=2,w-=2;break e;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}S>>>=2,w-=2;break;case 14:for(S>>>=7&w,w-=7&w;w<32;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}if((65535&S)!=(S>>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&S,w=S=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(A=n.length){if(b<A&&(A=b),v<A&&(A=v),0===A)break e;r.arraySet(m,p,g,A,y),b-=A,g+=A,v-=A,y+=A,n.length-=A;break}n.mode=12;break;case 17:for(;w<14;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}if(n.nlen=257+(31&S),S>>>=5,w-=5,n.ndist=1+(31&S),S>>>=5,w-=5,n.ncode=4+(15&S),S>>>=4,w-=4,286<n.nlen||30<n.ndist){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;w<3;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}n.lens[W[n.have++]]=7&S,S>>>=3,w-=3}for(;n.have<19;)n.lens[W[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,z={bits:n.lenbits},B=a(0,n.lens,0,19,n.lencode,0,n.work,z),n.lenbits=z.bits,B){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;M=(j=n.lencode[S&(1<<n.lenbits)-1])>>>16&255,N=65535&j,!((O=j>>>24)<=w);){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}if(N<16)S>>>=O,w-=O,n.lens[n.have++]=N;else{if(16===N){for(U=O+2;w<U;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}if(S>>>=O,w-=O,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}L=n.lens[n.have-1],A=3+(3&S),S>>>=2,w-=2}else if(17===N){for(U=O+3;w<U;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}w-=O,L=0,A=3+(7&(S>>>=O)),S>>>=3,w-=3}else{for(U=O+7;w<U;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}w-=O,L=0,A=11+(127&(S>>>=O)),S>>>=7,w-=7}if(n.have+A>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;A--;)n.lens[n.have++]=L}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,z={bits:n.lenbits},B=a(l,n.lens,0,n.nlen,n.lencode,0,n.work,z),n.lenbits=z.bits,B){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,z={bits:n.distbits},B=a(c,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,z),n.distbits=z.bits,B){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(6<=b&&258<=v){e.next_out=y,e.avail_out=v,e.next_in=g,e.avail_in=b,n.hold=S,n.bits=w,o(e,T),y=e.next_out,m=e.output,v=e.avail_out,g=e.next_in,p=e.input,b=e.avail_in,S=n.hold,w=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;M=(j=n.lencode[S&(1<<n.lenbits)-1])>>>16&255,N=65535&j,!((O=j>>>24)<=w);){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}if(M&&!(240&M)){for(R=O,D=M,P=N;M=(j=n.lencode[P+((S&(1<<R+D)-1)>>R)])>>>16&255,N=65535&j,!(R+(O=j>>>24)<=w);){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}S>>>=R,w-=R,n.back+=R}if(S>>>=O,w-=O,n.back+=O,n.length=N,0===M){n.mode=26;break}if(32&M){n.back=-1,n.mode=12;break}if(64&M){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&M,n.mode=22;case 22:if(n.extra){for(U=n.extra;w<U;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}n.length+=S&(1<<n.extra)-1,S>>>=n.extra,w-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;M=(j=n.distcode[S&(1<<n.distbits)-1])>>>16&255,N=65535&j,!((O=j>>>24)<=w);){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}if(!(240&M)){for(R=O,D=M,P=N;M=(j=n.distcode[P+((S&(1<<R+D)-1)>>R)])>>>16&255,N=65535&j,!(R+(O=j>>>24)<=w);){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}S>>>=R,w-=R,n.back+=R}if(S>>>=O,w-=O,n.back+=O,64&M){e.msg="invalid distance code",n.mode=30;break}n.offset=N,n.extra=15&M,n.mode=24;case 24:if(n.extra){for(U=n.extra;w<U;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}n.offset+=S&(1<<n.extra)-1,S>>>=n.extra,w-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===v)break e;if(A=T-v,n.offset>A){if((A=n.offset-A)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}C=A>n.wnext?(A-=n.wnext,n.wsize-A):n.wnext-A,A>n.length&&(A=n.length),I=n.window}else I=m,C=y-n.offset,A=n.length;for(v<A&&(A=v),v-=A,n.length-=A;m[y++]=I[C++],--A;);0===n.length&&(n.mode=21);break;case 26:if(0===v)break e;m[y++]=n.length,v--,n.mode=21;break;case 27:if(n.wrap){for(;w<32;){if(0===b)break e;b--,S|=p[g++]<<w,w+=8}if(T-=v,e.total_out+=T,n.total+=T,T&&(e.adler=n.check=n.flags?s(n.check,m,T,y-T):i(n.check,m,T,y-T)),T=v,(n.flags?S:f(S))!==n.check){e.msg="incorrect data check",n.mode=30;break}w=S=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;w<32;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}if(S!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=30;break}w=S=0}n.mode=29;case 29:B=1;break e;case 30:B=-3;break e;case 31:return-4;default:return d}return e.next_out=y,e.avail_out=v,e.next_in=g,e.avail_in=b,n.hold=S,n.bits=w,(n.wsize||T!==e.avail_out&&n.mode<30&&(n.mode<27||4!==t))&&E(e,e.output,e.next_out,T-e.avail_out)?(n.mode=31,-4):(k-=e.avail_in,T-=e.avail_out,e.total_in+=k,e.total_out+=T,n.total+=T,n.wrap&&T&&(e.adler=n.check=n.flags?s(n.check,m,T,e.next_out-T):i(n.check,m,T,e.next_out-T)),e.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0==k&&0===T||4===t)&&B===u&&(B=-5),B)},n.inflateEnd=function(e){if(!e||!e.state)return d;var t=e.state;return t.window&&(t.window=null),e.state=null,u},n.inflateGetHeader=function(e,t){var n;return e&&e.state&&2&(n=e.state).wrap?((n.head=t).done=!1,u):d},n.inflateSetDictionary=function(e,t){var n,r=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?d:11===n.mode&&i(1,t,r,0)!==n.check?-3:E(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,u):d},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,n){"use strict";var r=e("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],s=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],o=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,n,l,c,u,d,h){var p,m,f,g,y,b,v,S,w,k=h.bits,T=0,x=0,E=0,A=0,C=0,I=0,O=0,M=0,N=0,R=0,D=null,P=0,L=new r.Buf16(16),B=new r.Buf16(16),z=null,U=0;for(T=0;T<=15;T++)L[T]=0;for(x=0;x<l;x++)L[t[n+x]]++;for(C=k,A=15;1<=A&&0===L[A];A--);if(A<C&&(C=A),0===A)return c[u++]=20971520,c[u++]=20971520,h.bits=1,0;for(E=1;E<A&&0===L[E];E++);for(C<E&&(C=E),T=M=1;T<=15;T++)if(M<<=1,(M-=L[T])<0)return-1;if(0<M&&(0===e||1!==A))return-1;for(B[1]=0,T=1;T<15;T++)B[T+1]=B[T]+L[T];for(x=0;x<l;x++)0!==t[n+x]&&(d[B[t[n+x]]++]=x);if(b=0===e?(D=z=d,19):1===e?(D=i,P-=257,z=s,U-=257,256):(D=o,z=a,-1),T=E,y=u,O=x=R=0,f=-1,g=(N=1<<(I=C))-1,1===e&&852<N||2===e&&592<N)return 1;for(;;){for(v=T-O,w=d[x]<b?(S=0,d[x]):d[x]>b?(S=z[U+d[x]],D[P+d[x]]):(S=96,0),p=1<<T-O,E=m=1<<I;c[y+(R>>O)+(m-=p)]=v<<24|S<<16|w,0!==m;);for(p=1<<T-1;R&p;)p>>=1;if(0!==p?(R&=p-1,R+=p):R=0,x++,0==--L[T]){if(T===A)break;T=t[n+d[x]]}if(C<T&&(R&g)!==f){for(0===O&&(O=C),y+=E,M=1<<(I=T-O);I+O<A&&!((M-=L[I+O])<=0);)I++,M<<=1;if(N+=1<<I,1===e&&852<N||2===e&&592<N)return 1;c[f=R&g]=C<<24|I<<16|y-u}}return 0!==R&&(c[y+R]=T-O<<24|64<<16),h.bits=C,0}},{"../utils/common":41}],51:[function(e,t,n){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(e,t,n){"use strict";var r=e("../utils/common"),i=0,s=1;function o(e){for(var t=e.length;0<=--t;)e[t]=0}var a=0,l=29,c=256,u=c+1+l,d=30,h=19,p=2*u+1,m=15,f=16,g=7,y=256,b=16,v=17,S=18,w=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],k=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],x=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],E=new Array(2*(u+2));o(E);var A=new Array(2*d);o(A);var C=new Array(512);o(C);var I=new Array(256);o(I);var O=new Array(l);o(O);var M,N,R,D=new Array(d);function P(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function L(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function B(e){return e<256?C[e]:C[256+(e>>>7)]}function z(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function U(e,t,n){e.bi_valid>f-n?(e.bi_buf|=t<<e.bi_valid&65535,z(e,e.bi_buf),e.bi_buf=t>>f-e.bi_valid,e.bi_valid+=n-f):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function j(e,t,n){U(e,n[2*t],n[2*t+1])}function F(e,t){for(var n=0;n|=1&e,e>>>=1,n<<=1,0<--t;);return n>>>1}function W(e,t,n){var r,i,s=new Array(m+1),o=0;for(r=1;r<=m;r++)s[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var a=e[2*i+1];0!==a&&(e[2*i]=F(s[a]++,a))}}function V(e){var t;for(t=0;t<u;t++)e.dyn_ltree[2*t]=0;for(t=0;t<d;t++)e.dyn_dtree[2*t]=0;for(t=0;t<h;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*y]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function G(e){8<e.bi_valid?z(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function q(e,t,n,r){var i=2*t,s=2*n;return e[i]<e[s]||e[i]===e[s]&&r[t]<=r[n]}function Y(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&q(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!q(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function H(e,t,n){var r,i,s,o,a=0;if(0!==e.last_lit)for(;r=e.pending_buf[e.d_buf+2*a]<<8|e.pending_buf[e.d_buf+2*a+1],i=e.pending_buf[e.l_buf+a],a++,0===r?j(e,i,t):(j(e,(s=I[i])+c+1,t),0!==(o=w[s])&&U(e,i-=O[s],o),j(e,s=B(--r),n),0!==(o=k[s])&&U(e,r-=D[s],o)),a<e.last_lit;);j(e,y,t)}function _(e,t){var n,r,i,s=t.dyn_tree,o=t.stat_desc.static_tree,a=t.stat_desc.has_stree,l=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=p,n=0;n<l;n++)0!==s[2*n]?(e.heap[++e.heap_len]=c=n,e.depth[n]=0):s[2*n+1]=0;for(;e.heap_len<2;)s[2*(i=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[i]=0,e.opt_len--,a&&(e.static_len-=o[2*i+1]);for(t.max_code=c,n=e.heap_len>>1;1<=n;n--)Y(e,s,n);for(i=l;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Y(e,s,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,s[2*i]=s[2*n]+s[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,s[2*n+1]=s[2*r+1]=i,e.heap[1]=i++,Y(e,s,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,s,o,a,l=t.dyn_tree,c=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,g=t.stat_desc.max_length,y=0;for(s=0;s<=m;s++)e.bl_count[s]=0;for(l[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<p;n++)g<(s=l[2*l[2*(r=e.heap[n])+1]+1]+1)&&(s=g,y++),l[2*r+1]=s,c<r||(e.bl_count[s]++,o=0,f<=r&&(o=h[r-f]),a=l[2*r],e.opt_len+=a*(s+o),d&&(e.static_len+=a*(u[2*r+1]+o)));if(0!==y){do{for(s=g-1;0===e.bl_count[s];)s--;e.bl_count[s]--,e.bl_count[s+1]+=2,e.bl_count[g]--,y-=2}while(0<y);for(s=g;0!==s;s--)for(r=e.bl_count[s];0!==r;)c<(i=e.heap[--n])||(l[2*i+1]!==s&&(e.opt_len+=(s-l[2*i+1])*l[2*i],l[2*i+1]=s),r--)}}(e,t),W(s,c,e.bl_count)}function K(e,t,n){var r,i,s=-1,o=t[1],a=0,l=7,c=4;for(0===o&&(l=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=o,o=t[2*(r+1)+1],++a<l&&i===o||(a<c?e.bl_tree[2*i]+=a:0!==i?(i!==s&&e.bl_tree[2*i]++,e.bl_tree[2*b]++):a<=10?e.bl_tree[2*v]++:e.bl_tree[2*S]++,s=i,c=(a=0)===o?(l=138,3):i===o?(l=6,3):(l=7,4))}function Q(e,t,n){var r,i,s=-1,o=t[1],a=0,l=7,c=4;for(0===o&&(l=138,c=3),r=0;r<=n;r++)if(i=o,o=t[2*(r+1)+1],!(++a<l&&i===o)){if(a<c)for(;j(e,i,e.bl_tree),0!=--a;);else 0!==i?(i!==s&&(j(e,i,e.bl_tree),a--),j(e,b,e.bl_tree),U(e,a-3,2)):a<=10?(j(e,v,e.bl_tree),U(e,a-3,3)):(j(e,S,e.bl_tree),U(e,a-11,7));s=i,c=(a=0)===o?(l=138,3):i===o?(l=6,3):(l=7,4)}}o(D);var X=!1;function Z(e,t,n,i){U(e,(a<<1)+(i?1:0),3),function(e,t,n,i){G(e),i&&(z(e,n),z(e,~n)),r.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n,!0)}n._tr_init=function(e){X||(function(){var e,t,n,r,i,s=new Array(m+1);for(r=n=0;r<l-1;r++)for(O[r]=n,e=0;e<1<<w[r];e++)I[n++]=r;for(I[n-1]=r,r=i=0;r<16;r++)for(D[r]=i,e=0;e<1<<k[r];e++)C[i++]=r;for(i>>=7;r<d;r++)for(D[r]=i<<7,e=0;e<1<<k[r]-7;e++)C[256+i++]=r;for(t=0;t<=m;t++)s[t]=0;for(e=0;e<=143;)E[2*e+1]=8,e++,s[8]++;for(;e<=255;)E[2*e+1]=9,e++,s[9]++;for(;e<=279;)E[2*e+1]=7,e++,s[7]++;for(;e<=287;)E[2*e+1]=8,e++,s[8]++;for(W(E,u+1,s),e=0;e<d;e++)A[2*e+1]=5,A[2*e]=F(e,5);M=new P(E,w,c+1,u,m),N=new P(A,k,0,d,m),R=new P(new Array(0),T,0,h,g)}(),X=!0),e.l_desc=new L(e.dyn_ltree,M),e.d_desc=new L(e.dyn_dtree,N),e.bl_desc=new L(e.bl_tree,R),e.bi_buf=0,e.bi_valid=0,V(e)},n._tr_stored_block=Z,n._tr_flush_block=function(e,t,n,r){var o,a,l=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return i;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return s;for(t=32;t<c;t++)if(0!==e.dyn_ltree[2*t])return s;return i}(e)),_(e,e.l_desc),_(e,e.d_desc),l=function(e){var t;for(K(e,e.dyn_ltree,e.l_desc.max_code),K(e,e.dyn_dtree,e.d_desc.max_code),_(e,e.bl_desc),t=h-1;3<=t&&0===e.bl_tree[2*x[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),o=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=o&&(o=a)):o=a=n+5,n+4<=o&&-1!==t?Z(e,t,n,r):4===e.strategy||a===o?(U(e,2+(r?1:0),3),H(e,E,A)):(U(e,4+(r?1:0),3),function(e,t,n,r){var i;for(U(e,t-257,5),U(e,n-1,5),U(e,r-4,4),i=0;i<r;i++)U(e,e.bl_tree[2*x[i]+1],3);Q(e,e.dyn_ltree,t-1),Q(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1),H(e,e.dyn_ltree,e.dyn_dtree)),V(e),r&&G(e)},n._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(I[n]+c+1)]++,e.dyn_dtree[2*B(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){U(e,2,3),j(e,y,E),function(e){16===e.bi_valid?(z(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){!function(e,t){"use strict";if(!e.setImmediate){var n,r,s,o,a=1,l={},c=!1,u=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,n="[object process]"==={}.toString.call(e.process)?function(e){i.nextTick((function(){p(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(o="setImmediate$"+Math.random()+"$",e.addEventListener?e.addEventListener("message",m,!1):e.attachEvent("onmessage",m),function(t){e.postMessage(o+t,"*")}):e.MessageChannel?((s=new MessageChannel).port1.onmessage=function(e){p(e.data)},function(e){s.port2.postMessage(e)}):u&&"onreadystatechange"in u.createElement("script")?(r=u.documentElement,function(e){var t=u.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(p,0,e)},d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var i={callback:e,args:t};return l[a]=i,n(a),a++},d.clearImmediate=h}function h(e){delete l[e]}function p(e){if(c)setTimeout(p,0,e);else{var n=l[e];if(n){c=!0;try{!function(e){var n=e.callback,r=e.args;switch(r.length){case 0:n();break;case 1:n(r[0]);break;case 2:n(r[0],r[1]);break;case 3:n(r[0],r[1],r[2]);break;default:n.apply(t,r)}}(n)}finally{h(e),c=!1}}}}function m(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&p(+t.data.slice(o.length))}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10)}).call(this,n(18).Buffer,n(123).setImmediate,n(9),n(41))},function(e,t){class n{static get RGB_BLACK(){return{r:0,g:0,b:0}}static get RGB_WHITE(){return{r:255,g:255,b:255}}static decimalToHex(e){e<0&&(e+=16777216);let t=Number(e).toString(16);return t="#".concat("000000".substr(0,6-t.length)).concat(t),t}static decimalToRgb(e){const t=e>>24&255;return{r:e>>16&255,g:e>>8&255,b:255&e,a:t>0?t:255}}static hexToRgb(e){e.startsWith("#")&&(e=e.substring(1));const t=parseInt(e,16);if(isNaN(t))return null;if(6===e.length)return{r:t>>16&255,g:t>>8&255,b:255&t};if(3===e.length){const e=t>>8&15,n=t>>4&15,r=15&t;return{r:e<<4|e,g:n<<4|n,b:r<<4|r}}return null}static rgbToHex(e){return n.decimalToHex(n.rgbToDecimal(e))}static rgbToDecimal(e){return(e.r<<16)+(e.g<<8)+e.b}static hexToDecimal(e){return n.rgbToDecimal(n.hexToRgb(e))}static hsvToRgb(e){let t=e.h%360;t<0&&(t+=360);const n=Math.max(0,Math.min(e.s,1)),r=Math.max(0,Math.min(e.v,1)),i=Math.floor(t/60),s=t/60-i,o=r*(1-n),a=r*(1-n*s),l=r*(1-n*(1-s));let c,u,d;switch(i){default:case 0:c=r,u=l,d=o;break;case 1:c=a,u=r,d=o;break;case 2:c=o,u=r,d=l;break;case 3:c=o,u=a,d=r;break;case 4:c=l,u=o,d=r;break;case 5:c=r,u=o,d=a}return{r:Math.floor(255*c),g:Math.floor(255*u),b:Math.floor(255*d)}}static rgbToHsv(e){const t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(Math.min(t,n),r),s=Math.max(Math.max(t,n),r);let o=0,a=0;if(i!==s){o=60*((t===i?3:n===i?5:1)-(t===i?n-r:n===i?r-t:t-n)/(s-i))%360,a=(s-i)/s}return{h:o,s:a,v:s}}static mixRgb(e,t,n){if(n<=0)return e;if(n>=1)return t;const r=1-n;return{r:r*e.r+n*t.r,g:r*e.g+n*t.g,b:r*e.b+n*t.b}}}e.exports=n},function(e,t,n){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return o(e)?e:_(e)}function r(e){return a(e)?e:K(e)}function i(e){return l(e)?e:Q(e)}function s(e){return o(e)&&!c(e)?e:X(e)}function o(e){return!(!e||!e[d])}function a(e){return!(!e||!e[h])}function l(e){return!(!e||!e[p])}function c(e){return a(e)||l(e)}function u(e){return!(!e||!e[m])}t(r,n),t(i,n),t(s,n),n.isIterable=o,n.isKeyed=a,n.isIndexed=l,n.isAssociative=c,n.isOrdered=u,n.Keyed=r,n.Indexed=i,n.Set=s;var d="@@__IMMUTABLE_ITERABLE__@@",h="@@__IMMUTABLE_KEYED__@@",p="@@__IMMUTABLE_INDEXED__@@",m="@@__IMMUTABLE_ORDERED__@@",f="delete",g=5,y=1<<g,b=y-1,v={},S={value:!1},w={value:!1};function k(e){return e.value=!1,e}function T(e){e&&(e.value=!0)}function x(){}function E(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i<n;i++)r[i]=e[i+t];return r}function A(e){return void 0===e.size&&(e.size=e.__iterate(I)),e.size}function C(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?A(e)+t:t}function I(){return!0}function O(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function M(e,t){return R(e,t,0)}function N(e,t){return R(e,t,t)}function R(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var D=0,P=1,L=2,B="function"==typeof Symbol&&Symbol.iterator,z="@@iterator",U=B||z;function j(e){this.next=e}function F(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function W(){return{value:void 0,done:!0}}function V(e){return!!Y(e)}function G(e){return e&&"function"==typeof e.next}function q(e){var t=Y(e);return t&&t.call(e)}function Y(e){var t=e&&(B&&e[B]||e[z]);if("function"==typeof t)return t}function H(e){return e&&"number"==typeof e.length}function _(e){return null==e?oe():o(e)?e.toSeq():ce(e)}function K(e){return null==e?oe().toKeyedSeq():o(e)?a(e)?e.toSeq():e.fromEntrySeq():ae(e)}function Q(e){return null==e?oe():o(e)?a(e)?e.entrySeq():e.toIndexedSeq():le(e)}function X(e){return(null==e?oe():o(e)?a(e)?e.entrySeq():e:le(e)).toSetSeq()}j.prototype.toString=function(){return"[Iterator]"},j.KEYS=D,j.VALUES=P,j.ENTRIES=L,j.prototype.inspect=j.prototype.toSource=function(){return this.toString()},j.prototype[U]=function(){return this},t(_,n),_.of=function(){return _(arguments)},_.prototype.toSeq=function(){return this},_.prototype.toString=function(){return this.__toString("Seq {","}")},_.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},_.prototype.__iterate=function(e,t){return de(this,e,t,!0)},_.prototype.__iterator=function(e,t){return he(this,e,t,!0)},t(K,_),K.prototype.toKeyedSeq=function(){return this},t(Q,_),Q.of=function(){return Q(arguments)},Q.prototype.toIndexedSeq=function(){return this},Q.prototype.toString=function(){return this.__toString("Seq [","]")},Q.prototype.__iterate=function(e,t){return de(this,e,t,!1)},Q.prototype.__iterator=function(e,t){return he(this,e,t,!1)},t(X,_),X.of=function(){return X(arguments)},X.prototype.toSetSeq=function(){return this},_.isSeq=se,_.Keyed=K,_.Set=X,_.Indexed=Q;var Z,J,$,ee="@@__IMMUTABLE_SEQ__@@";function te(e){this._array=e,this.size=e.length}function ne(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function re(e){this._iterable=e,this.size=e.length||e.size}function ie(e){this._iterator=e,this._iteratorCache=[]}function se(e){return!(!e||!e[ee])}function oe(){return Z||(Z=new te([]))}function ae(e){var t=Array.isArray(e)?new te(e).fromEntrySeq():G(e)?new ie(e).fromEntrySeq():V(e)?new re(e).fromEntrySeq():"object"==typeof e?new ne(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function le(e){var t=ue(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ce(e){var t=ue(e)||"object"==typeof e&&new ne(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function ue(e){return H(e)?new te(e):G(e)?new ie(e):V(e)?new re(e):void 0}function de(e,t,n,r){var i=e._cache;if(i){for(var s=i.length-1,o=0;o<=s;o++){var a=i[n?s-o:o];if(!1===t(a[1],r?a[0]:o,e))return o+1}return o}return e.__iterateUncached(t,n)}function he(e,t,n,r){var i=e._cache;if(i){var s=i.length-1,o=0;return new j((function(){var e=i[n?s-o:o];return o++>s?W():F(t,r?e[0]:o-1,e[1])}))}return e.__iteratorUncached(t,n)}function pe(e,t){return t?me(t,e,"",{"":e}):fe(e)}function me(e,t,n,r){return Array.isArray(t)?e.call(r,n,Q(t).map((function(n,r){return me(e,n,r,t)}))):ge(t)?e.call(r,n,K(t).map((function(n,r){return me(e,n,r,t)}))):t}function fe(e){return Array.isArray(e)?Q(e).map(fe).toList():ge(e)?K(e).map(fe).toMap():e}function ge(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ye(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function be(e,t){if(e===t)return!0;if(!o(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||a(e)!==a(t)||l(e)!==l(t)||u(e)!==u(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!c(e);if(u(e)){var r=e.entries();return t.every((function(e,t){var i=r.next().value;return i&&ye(i[1],e)&&(n||ye(i[0],t))}))&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var s=e;e=t,t=s}var d=!0,h=t.__iterate((function(t,r){if(n?!e.has(t):i?!ye(t,e.get(r,v)):!ye(e.get(r,v),t))return d=!1,!1}));return d&&e.size===h}function ve(e,t){if(!(this instanceof ve))return new ve(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(J)return J;J=this}}function Se(e,t){if(!e)throw new Error(t)}function we(e,t,n){if(!(this instanceof we))return new we(e,t,n);if(Se(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if($)return $;$=this}}function ke(){throw TypeError("Abstract")}function Te(){}function xe(){}function Ee(){}_.prototype[ee]=!0,t(te,Q),te.prototype.get=function(e,t){return this.has(e)?this._array[C(this,e)]:t},te.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length-1,i=0;i<=r;i++)if(!1===e(n[t?r-i:i],i,this))return i+1;return i},te.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,i=0;return new j((function(){return i>r?W():F(e,i,n[t?r-i++:i++])}))},t(ne,K),ne.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},ne.prototype.has=function(e){return this._object.hasOwnProperty(e)},ne.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length-1,s=0;s<=i;s++){var o=r[t?i-s:s];if(!1===e(n[o],o,this))return s+1}return s},ne.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length-1,s=0;return new j((function(){var o=r[t?i-s:s];return s++>i?W():F(e,o,n[o])}))},ne.prototype[m]=!0,t(re,Q),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=q(this._iterable),r=0;if(G(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},re.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=q(this._iterable);if(!G(n))return new j(W);var r=0;return new j((function(){var t=n.next();return t.done?t:F(e,r++,t.value)}))},t(ie,Q),ie.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,i=this._iteratorCache,s=0;s<i.length;)if(!1===e(i[s],s++,this))return s;for(;!(n=r.next()).done;){var o=n.value;if(i[s]=o,!1===e(o,s++,this))break}return s},ie.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterator,r=this._iteratorCache,i=0;return new j((function(){if(i>=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return F(e,i,r[i++])}))},t(ve,Q),ve.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},ve.prototype.get=function(e,t){return this.has(e)?this._value:t},ve.prototype.includes=function(e){return ye(this._value,e)},ve.prototype.slice=function(e,t){var n=this.size;return O(e,t,n)?this:new ve(this._value,N(t,n)-M(e,n))},ve.prototype.reverse=function(){return this},ve.prototype.indexOf=function(e){return ye(this._value,e)?0:-1},ve.prototype.lastIndexOf=function(e){return ye(this._value,e)?this.size:-1},ve.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(!1===e(this._value,n,this))return n+1;return n},ve.prototype.__iterator=function(e,t){var n=this,r=0;return new j((function(){return r<n.size?F(e,r++,n._value):W()}))},ve.prototype.equals=function(e){return e instanceof ve?ye(this._value,e._value):be(e)},t(we,Q),we.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},we.prototype.get=function(e,t){return this.has(e)?this._start+C(this,e)*this._step:t},we.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},we.prototype.slice=function(e,t){return O(e,t,this.size)?this:(e=M(e,this.size),(t=N(t,this.size))<=e?new we(0,0):new we(this.get(e,this._end),this.get(t,this._end),this._step))},we.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},we.prototype.lastIndexOf=function(e){return this.indexOf(e)},we.prototype.__iterate=function(e,t){for(var n=this.size-1,r=this._step,i=t?this._start+n*r:this._start,s=0;s<=n;s++){if(!1===e(i,s,this))return s+1;i+=t?-r:r}return s},we.prototype.__iterator=function(e,t){var n=this.size-1,r=this._step,i=t?this._start+n*r:this._start,s=0;return new j((function(){var o=i;return i+=t?-r:r,s>n?W():F(e,s++,o)}))},we.prototype.equals=function(e){return e instanceof we?this._start===e._start&&this._end===e._end&&this._step===e._step:be(this,e)},t(ke,n),t(Te,ke),t(xe,ke),t(Ee,ke),ke.Keyed=Te,ke.Indexed=xe,ke.Set=Ee;var Ae="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function Ce(e){return e>>>1&1073741824|3221225471&e}function Ie(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return Ce(n)}if("string"===t)return e.length>je?Oe(e):Me(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return Ne(e);if("function"==typeof e.toString)return Me(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function Oe(e){var t=Ve[e];return void 0===t&&(t=Me(e),We===Fe&&(We=0,Ve={}),We++,Ve[e]=t),t}function Me(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Ce(t)}function Ne(e){var t;if(Be&&void 0!==(t=Le.get(e)))return t;if(void 0!==(t=e[Ue]))return t;if(!De){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Ue]))return t;if(void 0!==(t=Pe(e)))return t}if(t=++ze,1073741824&ze&&(ze=0),Be)Le.set(e,t);else{if(void 0!==Re&&!1===Re(e))throw new Error("Non-extensible objects are not allowed as keys.");if(De)Object.defineProperty(e,Ue,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Ue]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Ue]=t}}return t}var Re=Object.isExtensible,De=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function Pe(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}var Le,Be="function"==typeof WeakMap;Be&&(Le=new WeakMap);var ze=0,Ue="__immutablehash__";"function"==typeof Symbol&&(Ue=Symbol(Ue));var je=16,Fe=255,We=0,Ve={};function Ge(e){Se(e!==1/0,"Cannot perform this action with an infinite size.")}function qe(e){return null==e?it():Ye(e)&&!u(e)?e:it().withMutations((function(t){var n=r(e);Ge(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function Ye(e){return!(!e||!e[_e])}t(qe,Te),qe.of=function(){var t=e.call(arguments,0);return it().withMutations((function(e){for(var n=0;n<t.length;n+=2){if(n+1>=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}}))},qe.prototype.toString=function(){return this.__toString("Map {","}")},qe.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},qe.prototype.set=function(e,t){return st(this,e,t)},qe.prototype.setIn=function(e,t){return this.updateIn(e,v,(function(){return t}))},qe.prototype.remove=function(e){return st(this,e,v)},qe.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return v}))},qe.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},qe.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=gt(this,kn(e),t,n);return r===v?void 0:r},qe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):it()},qe.prototype.merge=function(){return ht(this,void 0,arguments)},qe.prototype.mergeWith=function(t){return ht(this,t,e.call(arguments,1))},qe.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,it(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]}))},qe.prototype.mergeDeep=function(){return ht(this,pt,arguments)},qe.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return ht(this,mt(t),n)},qe.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,it(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]}))},qe.prototype.sort=function(e){return Vt(dn(this,e))},qe.prototype.sortBy=function(e,t){return Vt(dn(this,t,e))},qe.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},qe.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new x)},qe.prototype.asImmutable=function(){return this.__ensureOwner()},qe.prototype.wasAltered=function(){return this.__altered},qe.prototype.__iterator=function(e,t){return new et(this,e,t)},qe.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},qe.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?rt(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},qe.isMap=Ye;var He,_e="@@__IMMUTABLE_MAP__@@",Ke=qe.prototype;function Qe(e,t){this.ownerID=e,this.entries=t}function Xe(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Ze(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Je(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function $e(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function et(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&nt(e._root)}function tt(e,t){return F(e,t[0],t[1])}function nt(e,t){return{node:e,index:0,__prev:t}}function rt(e,t,n,r){var i=Object.create(Ke);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function it(){return He||(He=rt(0))}function st(e,t,n){var r,i;if(e._root){var s=k(S),o=k(w);if(r=ot(e._root,e.__ownerID,0,void 0,t,n,s,o),!o.value)return e;i=e.size+(s.value?n===v?-1:1:0)}else{if(n===v)return e;i=1,r=new Qe(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?rt(i,r):it()}function ot(e,t,n,r,i,s,o,a){return e?e.update(t,n,r,i,s,o,a):s===v?e:(T(a),T(o),new $e(t,r,[i,s]))}function at(e){return e.constructor===$e||e.constructor===Je}function lt(e,t,n,r,i){if(e.keyHash===r)return new Je(t,r,[e.entry,i]);var s,o=(0===n?e.keyHash:e.keyHash>>>n)&b,a=(0===n?r:r>>>n)&b;return new Xe(t,1<<o|1<<a,o===a?[lt(e,t,n+g,r,i)]:(s=new $e(t,r,i),o<a?[e,s]:[s,e]))}function ct(e,t,n,r){e||(e=new x);for(var i=new $e(e,Ie(n),[n,r]),s=0;s<t.length;s++){var o=t[s];i=i.update(e,0,void 0,o[0],o[1])}return i}function ut(e,t,n,r){for(var i=0,s=0,o=new Array(n),a=0,l=1,c=t.length;a<c;a++,l<<=1){var u=t[a];void 0!==u&&a!==r&&(i|=l,o[s++]=u)}return new Xe(e,i,o)}function dt(e,t,n,r,i){for(var s=0,o=new Array(y),a=0;0!==n;a++,n>>>=1)o[a]=1&n?t[s++]:void 0;return o[r]=i,new Ze(e,s+1,o)}function ht(e,t,n){for(var i=[],s=0;s<n.length;s++){var a=n[s],l=r(a);o(a)||(l=l.map((function(e){return pe(e)}))),i.push(l)}return ft(e,t,i)}function pt(e,t,n){return e&&e.mergeDeep&&o(t)?e.mergeDeep(t):ye(e,t)?e:t}function mt(e){return function(t,n,r){if(t&&t.mergeDeepWith&&o(n))return t.mergeDeepWith(e,n);var i=e(t,n,r);return ye(t,i)?t:i}}function ft(e,t,n){return 0===(n=n.filter((function(e){return 0!==e.size}))).length?e:0!==e.size||e.__ownerID||1!==n.length?e.withMutations((function(e){for(var r=t?function(n,r){e.update(r,v,(function(e){return e===v?n:t(e,n,r)}))}:function(t,n){e.set(n,t)},i=0;i<n.length;i++)n[i].forEach(r)})):e.constructor(n[0])}function gt(e,t,n,r){var i=e===v,s=t.next();if(s.done){var o=i?n:e,a=r(o);return a===o?e:a}Se(i||e&&e.set,"invalid keyPath");var l=s.value,c=i?v:e.get(l,v),u=gt(c,t,n,r);return u===c?e:u===v?e.remove(l):(i?it():e).set(l,u)}function yt(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function bt(e,t,n,r){var i=r?e:E(e);return i[t]=n,i}function vt(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var s=new Array(i),o=0,a=0;a<i;a++)a===t?(s[a]=n,o=-1):s[a]=e[a+o];return s}function St(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),s=0,o=0;o<r;o++)o===t&&(s=1),i[o]=e[o+s];return i}Ke[_e]=!0,Ke[f]=Ke.remove,Ke.removeIn=Ke.deleteIn,Qe.prototype.get=function(e,t,n,r){for(var i=this.entries,s=0,o=i.length;s<o;s++)if(ye(n,i[s][0]))return i[s][1];return r},Qe.prototype.update=function(e,t,n,r,i,s,o){for(var a=i===v,l=this.entries,c=0,u=l.length;c<u&&!ye(r,l[c][0]);c++);var d=c<u;if(d?l[c][1]===i:a)return this;if(T(o),(a||!d)&&T(s),!a||1!==l.length){if(!d&&!a&&l.length>=wt)return ct(e,l,r,i);var h=e&&e===this.ownerID,p=h?l:E(l);return d?a?c===u-1?p.pop():p[c]=p.pop():p[c]=[r,i]:p.push([r,i]),h?(this.entries=p,this):new Qe(e,p)}},Xe.prototype.get=function(e,t,n,r){void 0===t&&(t=Ie(n));var i=1<<((0===e?t:t>>>e)&b),s=this.bitmap;return s&i?this.nodes[yt(s&i-1)].get(e+g,t,n,r):r},Xe.prototype.update=function(e,t,n,r,i,s,o){void 0===n&&(n=Ie(r));var a=(0===t?n:n>>>t)&b,l=1<<a,c=this.bitmap,u=!!(c&l);if(!u&&i===v)return this;var d=yt(c&l-1),h=this.nodes,p=u?h[d]:void 0,m=ot(p,e,t+g,n,r,i,s,o);if(m===p)return this;if(!u&&m&&h.length>=kt)return dt(e,h,c,a,m);if(u&&!m&&2===h.length&&at(h[1^d]))return h[1^d];if(u&&m&&1===h.length&&at(m))return m;var f=e&&e===this.ownerID,y=u?m?c:c^l:c|l,S=u?m?bt(h,d,m,f):St(h,d,f):vt(h,d,m,f);return f?(this.bitmap=y,this.nodes=S,this):new Xe(e,y,S)},Ze.prototype.get=function(e,t,n,r){void 0===t&&(t=Ie(n));var i=(0===e?t:t>>>e)&b,s=this.nodes[i];return s?s.get(e+g,t,n,r):r},Ze.prototype.update=function(e,t,n,r,i,s,o){void 0===n&&(n=Ie(r));var a=(0===t?n:n>>>t)&b,l=i===v,c=this.nodes,u=c[a];if(l&&!u)return this;var d=ot(u,e,t+g,n,r,i,s,o);if(d===u)return this;var h=this.count;if(u){if(!d&&--h<Tt)return ut(e,c,h,a)}else h++;var p=e&&e===this.ownerID,m=bt(c,a,d,p);return p?(this.count=h,this.nodes=m,this):new Ze(e,h,m)},Je.prototype.get=function(e,t,n,r){for(var i=this.entries,s=0,o=i.length;s<o;s++)if(ye(n,i[s][0]))return i[s][1];return r},Je.prototype.update=function(e,t,n,r,i,s,o){void 0===n&&(n=Ie(r));var a=i===v;if(n!==this.keyHash)return a?this:(T(o),T(s),lt(this,e,t,n,[r,i]));for(var l=this.entries,c=0,u=l.length;c<u&&!ye(r,l[c][0]);c++);var d=c<u;if(d?l[c][1]===i:a)return this;if(T(o),(a||!d)&&T(s),a&&2===u)return new $e(e,this.keyHash,l[1^c]);var h=e&&e===this.ownerID,p=h?l:E(l);return d?a?c===u-1?p.pop():p[c]=p.pop():p[c]=[r,i]:p.push([r,i]),h?(this.entries=p,this):new Je(e,this.keyHash,p)},$e.prototype.get=function(e,t,n,r){return ye(n,this.entry[0])?this.entry[1]:r},$e.prototype.update=function(e,t,n,r,i,s,o){var a=i===v,l=ye(r,this.entry[0]);return(l?i===this.entry[1]:a)?this:(T(o),a?void T(s):l?e&&e===this.ownerID?(this.entry[1]=i,this):new $e(e,this.keyHash,[r,i]):(T(s),lt(this,e,t,Ie(r),[r,i])))},Qe.prototype.iterate=Je.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===e(n[t?i-r:r]))return!1},Xe.prototype.iterate=Ze.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var s=n[t?i-r:r];if(s&&!1===s.iterate(e,t))return!1}},$e.prototype.iterate=function(e,t){return e(this.entry)},t(et,j),et.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,i=t.index++;if(r.entry){if(0===i)return tt(e,r.entry)}else if(r.entries){if(i<=(n=r.entries.length-1))return tt(e,r.entries[this._reverse?n-i:i])}else if(i<=(n=r.nodes.length-1)){var s=r.nodes[this._reverse?n-i:i];if(s){if(s.entry)return tt(e,s.entry);t=this._stack=nt(s,t)}continue}t=this._stack=this._stack.__prev}return W()};var wt=y/4,kt=y/2,Tt=y/4;function xt(e){var t=Pt();if(null==e)return t;if(Et(e))return e;var n=i(e),r=n.size;return 0===r?t:(Ge(r),r>0&&r<y?Dt(0,r,g,null,new It(n.toArray())):t.withMutations((function(e){e.setSize(r),n.forEach((function(t,n){return e.set(n,t)}))})))}function Et(e){return!(!e||!e[At])}t(xt,xe),xt.of=function(){return this(arguments)},xt.prototype.toString=function(){return this.__toString("List [","]")},xt.prototype.get=function(e,t){if((e=C(this,e))>=0&&e<this.size){var n=Ut(this,e+=this._origin);return n&&n.array[e&b]}return t},xt.prototype.set=function(e,t){return Lt(this,e,t)},xt.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},xt.prototype.insert=function(e,t){return this.splice(e,0,t)},xt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=g,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Pt()},xt.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){jt(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])}))},xt.prototype.pop=function(){return jt(this,0,-1)},xt.prototype.unshift=function(){var e=arguments;return this.withMutations((function(t){jt(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])}))},xt.prototype.shift=function(){return jt(this,1)},xt.prototype.merge=function(){return Ft(this,void 0,arguments)},xt.prototype.mergeWith=function(t){return Ft(this,t,e.call(arguments,1))},xt.prototype.mergeDeep=function(){return Ft(this,pt,arguments)},xt.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return Ft(this,mt(t),n)},xt.prototype.setSize=function(e){return jt(this,0,e)},xt.prototype.slice=function(e,t){var n=this.size;return O(e,t,n)?this:jt(this,M(e,n),N(t,n))},xt.prototype.__iterator=function(e,t){var n=0,r=Rt(this,t);return new j((function(){var t=r();return t===Nt?W():F(e,n++,t)}))},xt.prototype.__iterate=function(e,t){for(var n,r=0,i=Rt(this,t);(n=i())!==Nt&&!1!==e(n,r++,this););return r},xt.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Dt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},xt.isList=Et;var At="@@__IMMUTABLE_LIST__@@",Ct=xt.prototype;function It(e,t){this.array=e,this.ownerID=t}Ct[At]=!0,Ct[f]=Ct.remove,Ct.setIn=Ke.setIn,Ct.deleteIn=Ct.removeIn=Ke.removeIn,Ct.update=Ke.update,Ct.updateIn=Ke.updateIn,Ct.mergeIn=Ke.mergeIn,Ct.mergeDeepIn=Ke.mergeDeepIn,Ct.withMutations=Ke.withMutations,Ct.asMutable=Ke.asMutable,Ct.asImmutable=Ke.asImmutable,Ct.wasAltered=Ke.wasAltered,It.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&b;if(r>=this.array.length)return new It([],e);var i,s=0===r;if(t>0){var o=this.array[r];if((i=o&&o.removeBefore(e,t-g,n))===o&&s)return this}if(s&&!i)return this;var a=zt(this,e);if(!s)for(var l=0;l<r;l++)a.array[l]=void 0;return i&&(a.array[r]=i),a},It.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,i=n-1>>>t&b;if(i>=this.array.length)return this;if(t>0){var s=this.array[i];if((r=s&&s.removeAfter(e,t-g,n))===s&&i===this.array.length-1)return this}var o=zt(this,e);return o.array.splice(i+1),r&&(o.array[i]=r),o};var Ot,Mt,Nt={};function Rt(e,t){var n=e._origin,r=e._capacity,i=Wt(r),s=e._tail;return o(e._root,e._level,0);function o(e,t,n){return 0===t?a(e,n):l(e,t,n)}function a(e,o){var a=o===i?s&&s.array:e&&e.array,l=o>n?0:n-o,c=r-o;return c>y&&(c=y),function(){if(l===c)return Nt;var e=t?--c:l++;return a&&a[e]}}function l(e,i,s){var a,l=e&&e.array,c=s>n?0:n-s>>i,u=1+(r-s>>i);return u>y&&(u=y),function(){for(;;){if(a){var e=a();if(e!==Nt)return e;a=null}if(c===u)return Nt;var n=t?--u:c++;a=o(l&&l[n],i-g,s+(n<<i))}}}}function Dt(e,t,n,r,i,s,o){var a=Object.create(Ct);return a.size=t-e,a._origin=e,a._capacity=t,a._level=n,a._root=r,a._tail=i,a.__ownerID=s,a.__hash=o,a.__altered=!1,a}function Pt(){return Ot||(Ot=Dt(0,0,g))}function Lt(e,t,n){if((t=C(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations((function(e){t<0?jt(e,t).set(0,n):jt(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,i=e._root,s=k(w);return t>=Wt(e._capacity)?r=Bt(r,e.__ownerID,0,t,n,s):i=Bt(i,e.__ownerID,e._level,t,n,s),s.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Dt(e._origin,e._capacity,e._level,i,r):e}function Bt(e,t,n,r,i,s){var o,a=r>>>n&b,l=e&&a<e.array.length;if(!l&&void 0===i)return e;if(n>0){var c=e&&e.array[a],u=Bt(c,t,n-g,r,i,s);return u===c?e:((o=zt(e,t)).array[a]=u,o)}return l&&e.array[a]===i?e:(T(s),o=zt(e,t),void 0===i&&a===o.array.length-1?o.array.pop():o.array[a]=i,o)}function zt(e,t){return t&&e&&t===e.ownerID?e:new It(e?e.array.slice():[],t)}function Ut(e,t){if(t>=Wt(e._capacity))return e._tail;if(t<1<<e._level+g){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&b],r-=g;return n}}function jt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new x,i=e._origin,s=e._capacity,o=i+t,a=void 0===n?s:n<0?s+n:i+n;if(o===i&&a===s)return e;if(o>=a)return e.clear();for(var l=e._level,c=e._root,u=0;o+u<0;)c=new It(c&&c.array.length?[void 0,c]:[],r),u+=1<<(l+=g);u&&(o+=u,i+=u,a+=u,s+=u);for(var d=Wt(s),h=Wt(a);h>=1<<l+g;)c=new It(c&&c.array.length?[c]:[],r),l+=g;var p=e._tail,m=h<d?Ut(e,a-1):h>d?new It([],r):p;if(p&&h>d&&o<s&&p.array.length){for(var f=c=zt(c,r),y=l;y>g;y-=g){var v=d>>>y&b;f=f.array[v]=zt(f.array[v],r)}f.array[d>>>g&b]=p}if(a<s&&(m=m&&m.removeAfter(r,0,a)),o>=h)o-=h,a-=h,l=g,c=null,m=m&&m.removeBefore(r,0,o);else if(o>i||h<d){for(u=0;c;){var S=o>>>l&b;if(S!==h>>>l&b)break;S&&(u+=(1<<l)*S),l-=g,c=c.array[S]}c&&o>i&&(c=c.removeBefore(r,l,o-u)),c&&h<d&&(c=c.removeAfter(r,l,h-u)),u&&(o-=u,a-=u)}return e.__ownerID?(e.size=a-o,e._origin=o,e._capacity=a,e._level=l,e._root=c,e._tail=m,e.__hash=void 0,e.__altered=!0,e):Dt(o,a,l,c,m)}function Ft(e,t,n){for(var r=[],s=0,a=0;a<n.length;a++){var l=n[a],c=i(l);c.size>s&&(s=c.size),o(l)||(c=c.map((function(e){return pe(e)}))),r.push(c)}return s>e.size&&(e=e.setSize(s)),ft(e,t,r)}function Wt(e){return e<y?0:e-1>>>g<<g}function Vt(e){return null==e?Yt():Gt(e)?e:Yt().withMutations((function(t){var n=r(e);Ge(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function Gt(e){return Ye(e)&&u(e)}function qt(e,t,n,r){var i=Object.create(Vt.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i}function Yt(){return Mt||(Mt=qt(it(),Pt()))}function Ht(e,t,n){var r,i,s=e._map,o=e._list,a=s.get(t),l=void 0!==a;if(n===v){if(!l)return e;o.size>=y&&o.size>=2*s.size?(r=(i=o.filter((function(e,t){return void 0!==e&&a!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=s.remove(t),i=a===o.size-1?o.pop():o.set(a,void 0))}else if(l){if(n===o.get(a)[1])return e;r=s,i=o.set(a,[t,n])}else r=s.set(t,o.size),i=o.set(o.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):qt(r,i)}function _t(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Kt(e){this._iter=e,this.size=e.size}function Qt(e){this._iter=e,this.size=e.size}function Xt(e){this._iter=e,this.size=e.size}function Zt(e){var t=vn(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Sn,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(t===L){var r=e.__iterator(t,n);return new j((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(t===P?D:P,n)},t}function Jt(e,t,n){var r=vn(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var s=e.get(r,v);return s===v?i:t.call(n,s,r,e)},r.__iterateUncached=function(r,i){var s=this;return e.__iterate((function(e,i,o){return!1!==r(t.call(n,e,i,o),i,s)}),i)},r.__iteratorUncached=function(r,i){var s=e.__iterator(L,i);return new j((function(){var i=s.next();if(i.done)return i;var o=i.value,a=o[0];return F(r,a,t.call(n,o[1],a,e),i)}))},r}function $t(e,t){var n=vn(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Zt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=Sn,n.__iterate=function(t,n){var r=this;return e.__iterate((function(e,n){return t(e,n,r)}),!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function en(e,t,n,r){var i=vn(e);return r&&(i.has=function(r){var i=e.get(r,v);return i!==v&&!!t.call(n,i,r,e)},i.get=function(r,i){var s=e.get(r,v);return s!==v&&t.call(n,s,r,e)?s:i}),i.__iterateUncached=function(i,s){var o=this,a=0;return e.__iterate((function(e,s,l){if(t.call(n,e,s,l))return a++,i(e,r?s:a-1,o)}),s),a},i.__iteratorUncached=function(i,s){var o=e.__iterator(L,s),a=0;return new j((function(){for(;;){var s=o.next();if(s.done)return s;var l=s.value,c=l[0],u=l[1];if(t.call(n,u,c,e))return F(i,r?c:a++,u,s)}}))},i}function tn(e,t,n){var r=qe().asMutable();return e.__iterate((function(i,s){r.update(t.call(n,i,s,e),0,(function(e){return e+1}))})),r.asImmutable()}function nn(e,t,n){var r=a(e),i=(u(e)?Vt():qe()).asMutable();e.__iterate((function(s,o){i.update(t.call(n,s,o,e),(function(e){return(e=e||[]).push(r?[o,s]:s),e}))}));var s=bn(e);return i.map((function(t){return fn(e,s(t))}))}function rn(e,t,n,r){var i=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=i:n|=0),O(t,n,i))return e;var s=M(t,i),o=N(n,i);if(s!=s||o!=o)return rn(e.toSeq().cacheResult(),t,n,r);var a,l=o-s;l==l&&(a=l<0?0:l);var c=vn(e);return c.size=0===a?a:e.size&&a||void 0,!r&&se(e)&&a>=0&&(c.get=function(t,n){return(t=C(this,t))>=0&&t<a?e.get(t+s,n):n}),c.__iterateUncached=function(t,n){var i=this;if(0===a)return 0;if(n)return this.cacheResult().__iterate(t,n);var o=0,l=!0,c=0;return e.__iterate((function(e,n){if(!l||!(l=o++<s))return c++,!1!==t(e,r?n:c-1,i)&&c!==a})),c},c.__iteratorUncached=function(t,n){if(0!==a&&n)return this.cacheResult().__iterator(t,n);var i=0!==a&&e.__iterator(t,n),o=0,l=0;return new j((function(){for(;o++<s;)i.next();if(++l>a)return W();var e=i.next();return r||t===P?e:F(t,l-1,t===D?void 0:e.value[1],e)}))},c}function sn(e,t,n){var r=vn(e);return r.__iterateUncached=function(r,i){var s=this;if(i)return this.cacheResult().__iterate(r,i);var o=0;return e.__iterate((function(e,i,a){return t.call(n,e,i,a)&&++o&&r(e,i,s)})),o},r.__iteratorUncached=function(r,i){var s=this;if(i)return this.cacheResult().__iterator(r,i);var o=e.__iterator(L,i),a=!0;return new j((function(){if(!a)return W();var e=o.next();if(e.done)return e;var i=e.value,l=i[0],c=i[1];return t.call(n,c,l,s)?r===L?e:F(r,l,c,e):(a=!1,W())}))},r}function on(e,t,n,r){var i=vn(e);return i.__iterateUncached=function(i,s){var o=this;if(s)return this.cacheResult().__iterate(i,s);var a=!0,l=0;return e.__iterate((function(e,s,c){if(!a||!(a=t.call(n,e,s,c)))return l++,i(e,r?s:l-1,o)})),l},i.__iteratorUncached=function(i,s){var o=this;if(s)return this.cacheResult().__iterator(i,s);var a=e.__iterator(L,s),l=!0,c=0;return new j((function(){var e,s,u;do{if((e=a.next()).done)return r||i===P?e:F(i,c++,i===D?void 0:e.value[1],e);var d=e.value;s=d[0],u=d[1],l&&(l=t.call(n,u,s,o))}while(l);return i===L?e:F(i,s,u,e)}))},i}function an(e,t){var n=a(e),i=[e].concat(t).map((function(e){return o(e)?n&&(e=r(e)):e=n?ae(e):le(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===i.length)return e;if(1===i.length){var s=i[0];if(s===e||n&&a(s)||l(e)&&l(s))return s}var c=new te(i);return n?c=c.toKeyedSeq():l(e)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=i.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),c}function ln(e,t,n){var r=vn(e);return r.__iterateUncached=function(r,i){var s=0,a=!1;function l(e,c){var u=this;e.__iterate((function(e,i){return(!t||c<t)&&o(e)?l(e,c+1):!1===r(e,n?i:s++,u)&&(a=!0),!a}),i)}return l(e,0),s},r.__iteratorUncached=function(r,i){var s=e.__iterator(r,i),a=[],l=0;return new j((function(){for(;s;){var e=s.next();if(!1===e.done){var c=e.value;if(r===L&&(c=c[1]),t&&!(a.length<t)||!o(c))return n?e:F(r,l++,c,e);a.push(s),s=c.__iterator(r,i)}else s=a.pop()}return W()}))},r}function cn(e,t,n){var r=bn(e);return e.toSeq().map((function(i,s){return r(t.call(n,i,s,e))})).flatten(!0)}function un(e,t){var n=vn(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var i=this,s=0;return e.__iterate((function(e,r){return(!s||!1!==n(t,s++,i))&&!1!==n(e,s++,i)}),r),s},n.__iteratorUncached=function(n,r){var i,s=e.__iterator(P,r),o=0;return new j((function(){return(!i||o%2)&&(i=s.next()).done?i:o%2?F(n,o++,t):F(n,o++,i.value,i)}))},n}function dn(e,t,n){t||(t=wn);var r=a(e),i=0,s=e.toSeq().map((function(t,r){return[r,t,i++,n?n(t,r,e):t]})).toArray();return s.sort((function(e,n){return t(e[3],n[3])||e[2]-n[2]})).forEach(r?function(e,t){s[t].length=2}:function(e,t){s[t]=e[1]}),r?K(s):l(e)?Q(s):X(s)}function hn(e,t,n){if(t||(t=wn),n){var r=e.toSeq().map((function(t,r){return[t,n(t,r,e)]})).reduce((function(e,n){return pn(t,e[1],n[1])?n:e}));return r&&r[0]}return e.reduce((function(e,n){return pn(t,e,n)?n:e}))}function pn(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function mn(e,t,r){var i=vn(e);return i.size=new te(r).map((function(e){return e.size})).min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(P,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var s=r.map((function(e){return e=n(e),q(i?e.reverse():e)})),o=0,a=!1;return new j((function(){var n;return a||(n=s.map((function(e){return e.next()})),a=n.some((function(e){return e.done}))),a?W():F(e,o++,t.apply(null,n.map((function(e){return e.value}))))}))},i}function fn(e,t){return se(e)?t:e.constructor(t)}function gn(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function yn(e){return Ge(e.size),A(e)}function bn(e){return a(e)?r:l(e)?i:s}function vn(e){return Object.create((a(e)?K:l(e)?Q:X).prototype)}function Sn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):_.prototype.cacheResult.call(this)}function wn(e,t){return e>t?1:e<t?-1:0}function kn(e){var t=q(e);if(!t){if(!H(e))throw new TypeError("Expected iterable or array-like: "+e);t=q(n(e))}return t}function Tn(e,t){var n,r=function(s){if(s instanceof r)return s;if(!(this instanceof r))return new r(s);if(!n){n=!0;var o=Object.keys(e);Cn(i,o),i.size=o.length,i._name=t,i._keys=o,i._defaultValues=e}this._map=qe(s)},i=r.prototype=Object.create(xn);return i.constructor=r,r}t(Vt,qe),Vt.of=function(){return this(arguments)},Vt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Vt.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Vt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Yt()},Vt.prototype.set=function(e,t){return Ht(this,e,t)},Vt.prototype.remove=function(e){return Ht(this,e,v)},Vt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Vt.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate((function(t){return t&&e(t[1],t[0],n)}),t)},Vt.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Vt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?qt(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Vt.isOrderedMap=Gt,Vt.prototype[m]=!0,Vt.prototype[f]=Vt.prototype.remove,t(_t,K),_t.prototype.get=function(e,t){return this._iter.get(e,t)},_t.prototype.has=function(e){return this._iter.has(e)},_t.prototype.valueSeq=function(){return this._iter.valueSeq()},_t.prototype.reverse=function(){var e=this,t=$t(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},_t.prototype.map=function(e,t){var n=this,r=Jt(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},_t.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?yn(this):0,function(i){return e(i,t?--n:n++,r)}),t)},_t.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(P,t),r=t?yn(this):0;return new j((function(){var i=n.next();return i.done?i:F(e,t?--r:r++,i.value,i)}))},_t.prototype[m]=!0,t(Kt,Q),Kt.prototype.includes=function(e){return this._iter.includes(e)},Kt.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate((function(t){return e(t,r++,n)}),t)},Kt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(P,t),r=0;return new j((function(){var t=n.next();return t.done?t:F(e,r++,t.value,t)}))},t(Qt,X),Qt.prototype.has=function(e){return this._iter.includes(e)},Qt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){return e(t,t,n)}),t)},Qt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(P,t);return new j((function(){var t=n.next();return t.done?t:F(e,t.value,t.value,t)}))},t(Xt,K),Xt.prototype.entrySeq=function(){return this._iter.toSeq()},Xt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){if(t){gn(t);var r=o(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}}),t)},Xt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(P,t);return new j((function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){gn(r);var i=o(r);return F(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}}))},Kt.prototype.cacheResult=_t.prototype.cacheResult=Qt.prototype.cacheResult=Xt.prototype.cacheResult=Sn,t(Tn,Te),Tn.prototype.toString=function(){return this.__toString(An(this)+" {","}")},Tn.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Tn.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},Tn.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=En(this,it()))},Tn.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+An(this));if(this._map&&!this._map.has(e)&&t===this._defaultValues[e])return this;var n=this._map&&this._map.set(e,t);return this.__ownerID||n===this._map?this:En(this,n)},Tn.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:En(this,t)},Tn.prototype.wasAltered=function(){return this._map.wasAltered()},Tn.prototype.__iterator=function(e,t){var n=this;return r(this._defaultValues).map((function(e,t){return n.get(t)})).__iterator(e,t)},Tn.prototype.__iterate=function(e,t){var n=this;return r(this._defaultValues).map((function(e,t){return n.get(t)})).__iterate(e,t)},Tn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?En(this,t,e):(this.__ownerID=e,this._map=t,this)};var xn=Tn.prototype;function En(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._map=t,r.__ownerID=n,r}function An(e){return e._name||e.constructor.name||"Record"}function Cn(e,t){try{t.forEach(In.bind(void 0,e))}catch(e){}}function In(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){Se(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}function On(e){return null==e?Bn():Mn(e)&&!u(e)?e:Bn().withMutations((function(t){var n=s(e);Ge(n.size),n.forEach((function(e){return t.add(e)}))}))}function Mn(e){return!(!e||!e[Rn])}xn[f]=xn.remove,xn.deleteIn=xn.removeIn=Ke.removeIn,xn.merge=Ke.merge,xn.mergeWith=Ke.mergeWith,xn.mergeIn=Ke.mergeIn,xn.mergeDeep=Ke.mergeDeep,xn.mergeDeepWith=Ke.mergeDeepWith,xn.mergeDeepIn=Ke.mergeDeepIn,xn.setIn=Ke.setIn,xn.update=Ke.update,xn.updateIn=Ke.updateIn,xn.withMutations=Ke.withMutations,xn.asMutable=Ke.asMutable,xn.asImmutable=Ke.asImmutable,t(On,Ee),On.of=function(){return this(arguments)},On.fromKeys=function(e){return this(r(e).keySeq())},On.prototype.toString=function(){return this.__toString("Set {","}")},On.prototype.has=function(e){return this._map.has(e)},On.prototype.add=function(e){return Pn(this,this._map.set(e,!0))},On.prototype.remove=function(e){return Pn(this,this._map.remove(e))},On.prototype.clear=function(){return Pn(this,this._map.clear())},On.prototype.union=function(){var t=e.call(arguments,0);return 0===(t=t.filter((function(e){return 0!==e.size}))).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(e){for(var n=0;n<t.length;n++)s(t[n]).forEach((function(t){return e.add(t)}))})):this.constructor(t[0])},On.prototype.intersect=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return s(e)}));var n=this;return this.withMutations((function(e){n.forEach((function(n){t.every((function(e){return e.includes(n)}))||e.remove(n)}))}))},On.prototype.subtract=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return s(e)}));var n=this;return this.withMutations((function(e){n.forEach((function(n){t.some((function(e){return e.includes(n)}))&&e.remove(n)}))}))},On.prototype.merge=function(){return this.union.apply(this,arguments)},On.prototype.mergeWith=function(t){var n=e.call(arguments,1);return this.union.apply(this,n)},On.prototype.sort=function(e){return zn(dn(this,e))},On.prototype.sortBy=function(e,t){return zn(dn(this,t,e))},On.prototype.wasAltered=function(){return this._map.wasAltered()},On.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate((function(t,r){return e(r,r,n)}),t)},On.prototype.__iterator=function(e,t){return this._map.map((function(e,t){return t})).__iterator(e,t)},On.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):(this.__ownerID=e,this._map=t,this)},On.isSet=Mn;var Nn,Rn="@@__IMMUTABLE_SET__@@",Dn=On.prototype;function Pn(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function Ln(e,t){var n=Object.create(Dn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Bn(){return Nn||(Nn=Ln(it()))}function zn(e){return null==e?Vn():Un(e)?e:Vn().withMutations((function(t){var n=s(e);Ge(n.size),n.forEach((function(e){return t.add(e)}))}))}function Un(e){return Mn(e)&&u(e)}Dn[Rn]=!0,Dn[f]=Dn.remove,Dn.mergeDeep=Dn.merge,Dn.mergeDeepWith=Dn.mergeWith,Dn.withMutations=Ke.withMutations,Dn.asMutable=Ke.asMutable,Dn.asImmutable=Ke.asImmutable,Dn.__empty=Bn,Dn.__make=Ln,t(zn,On),zn.of=function(){return this(arguments)},zn.fromKeys=function(e){return this(r(e).keySeq())},zn.prototype.toString=function(){return this.__toString("OrderedSet {","}")},zn.isOrderedSet=Un;var jn,Fn=zn.prototype;function Wn(e,t){var n=Object.create(Fn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Vn(){return jn||(jn=Wn(Yt()))}function Gn(e){return null==e?Qn():qn(e)?e:Qn().unshiftAll(e)}function qn(e){return!(!e||!e[Hn])}Fn[m]=!0,Fn.__empty=Vn,Fn.__make=Wn,t(Gn,xe),Gn.of=function(){return this(arguments)},Gn.prototype.toString=function(){return this.__toString("Stack [","]")},Gn.prototype.get=function(e,t){var n=this._head;for(e=C(this,e);n&&e--;)n=n.next;return n?n.value:t},Gn.prototype.peek=function(){return this._head&&this._head.value},Gn.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Kn(e,t)},Gn.prototype.pushAll=function(e){if(0===(e=i(e)).size)return this;Ge(e.size);var t=this.size,n=this._head;return e.reverse().forEach((function(e){t++,n={value:e,next:n}})),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Kn(t,n)},Gn.prototype.pop=function(){return this.slice(1)},Gn.prototype.unshift=function(){return this.push.apply(this,arguments)},Gn.prototype.unshiftAll=function(e){return this.pushAll(e)},Gn.prototype.shift=function(){return this.pop.apply(this,arguments)},Gn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Qn()},Gn.prototype.slice=function(e,t){if(O(e,t,this.size))return this;var n=M(e,this.size);if(N(t,this.size)!==this.size)return xe.prototype.slice.call(this,e,t);for(var r=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=r,this._head=i,this.__hash=void 0,this.__altered=!0,this):Kn(r,i)},Gn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Kn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Gn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},Gn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new j((function(){if(r){var t=r.value;return r=r.next,F(e,n++,t)}return W()}))},Gn.isStack=qn;var Yn,Hn="@@__IMMUTABLE_STACK__@@",_n=Gn.prototype;function Kn(e,t,n,r){var i=Object.create(_n);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Qn(){return Yn||(Yn=Kn(0))}function Xn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}_n[Hn]=!0,_n.withMutations=Ke.withMutations,_n.asMutable=Ke.asMutable,_n.asImmutable=Ke.asImmutable,_n.wasAltered=Ke.wasAltered,n.Iterator=j,Xn(n,{toArray:function(){Ge(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,n){e[n]=t})),e},toIndexedSeq:function(){return new Kt(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new _t(this,!0)},toMap:function(){return qe(this.toKeyedSeq())},toObject:function(){Ge(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e},toOrderedMap:function(){return Vt(this.toKeyedSeq())},toOrderedSet:function(){return zn(a(this)?this.valueSeq():this)},toSet:function(){return On(a(this)?this.valueSeq():this)},toSetSeq:function(){return new Qt(this)},toSeq:function(){return l(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Gn(a(this)?this.valueSeq():this)},toList:function(){return xt(a(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return fn(this,an(this,e.call(arguments,0)))},includes:function(e){return this.some((function(t){return ye(t,e)}))},entries:function(){return this.__iterator(L)},every:function(e,t){Ge(this.size);var n=!0;return this.__iterate((function(r,i,s){if(!e.call(t,r,i,s))return n=!1,!1})),n},filter:function(e,t){return fn(this,en(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return Ge(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Ge(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(D)},map:function(e,t){return fn(this,Jt(this,e,t))},reduce:function(e,t,n){var r,i;return Ge(this.size),arguments.length<2?i=!0:r=t,this.__iterate((function(t,s,o){i?(i=!1,r=t):r=e.call(n,r,t,s,o)})),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return fn(this,$t(this,!0))},slice:function(e,t){return fn(this,rn(this,e,t,!0))},some:function(e,t){return!this.every(tr(e),t)},sort:function(e){return fn(this,dn(this,e))},values:function(){return this.__iterator(P)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return A(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return tn(this,e,t)},equals:function(e){return be(this,e)},entrySeq:function(){var e=this;if(e._cache)return new te(e._cache);var t=e.toSeq().map(er).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(tr(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate((function(n,i,s){if(e.call(t,n,i,s))return r=[i,n],!1})),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(I)},flatMap:function(e,t){return fn(this,cn(this,e,t))},flatten:function(e){return fn(this,ln(this,e,!0))},fromEntrySeq:function(){return new Xt(this)},get:function(e,t){return this.find((function(t,n){return ye(n,e)}),void 0,t)},getIn:function(e,t){for(var n,r=this,i=kn(e);!(n=i.next()).done;){var s=n.value;if((r=r&&r.get?r.get(s,v):v)===v)return t}return r},groupBy:function(e,t){return nn(this,e,t)},has:function(e){return this.get(e,v)!==v},hasIn:function(e){return this.getIn(e,v)!==v},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keyOf:function(e){return this.findKey((function(t){return ye(t,e)}))},keySeq:function(){return this.toSeq().map($n).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return hn(this,e)},maxBy:function(e,t){return hn(this,t,e)},min:function(e){return hn(this,e?nr(e):sr)},minBy:function(e,t){return hn(this,t?nr(t):sr,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return fn(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return fn(this,on(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(tr(e),t)},sortBy:function(e,t){return fn(this,dn(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return fn(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return fn(this,sn(this,e,t))},takeUntil:function(e,t){return this.takeWhile(tr(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=or(this))}});var Zn=n.prototype;Zn[d]=!0,Zn[U]=Zn.values,Zn.__toJS=Zn.toArray,Zn.__toStringMapper=rr,Zn.inspect=Zn.toSource=function(){return this.toString()},Zn.chain=Zn.flatMap,Zn.contains=Zn.includes,Xn(r,{flip:function(){return fn(this,Zt(this))},mapEntries:function(e,t){var n=this,r=0;return fn(this,this.toSeq().map((function(i,s){return e.call(t,[s,i],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return fn(this,this.toSeq().flip().map((function(r,i){return e.call(t,r,i,n)})).flip())}});var Jn=r.prototype;function $n(e,t){return t}function er(e,t){return[t,e]}function tr(e){return function(){return!e.apply(this,arguments)}}function nr(e){return function(){return-e.apply(this,arguments)}}function rr(e){return"string"==typeof e?JSON.stringify(e):String(e)}function ir(){return E(arguments)}function sr(e,t){return e<t?1:e>t?-1:0}function or(e){if(e.size===1/0)return 0;var t=u(e),n=a(e),r=t?1:0;return ar(e.__iterate(n?t?function(e,t){r=31*r+lr(Ie(e),Ie(t))|0}:function(e,t){r=r+lr(Ie(e),Ie(t))|0}:t?function(e){r=31*r+Ie(e)|0}:function(e){r=r+Ie(e)|0}),r)}function ar(e,t){return t=Ae(t,3432918353),t=Ae(t<<15|t>>>-15,461845907),t=Ae(t<<13|t>>>-13,5),t=Ae((t=t+3864292196^e)^t>>>16,2246822507),t=Ce((t=Ae(t^t>>>13,3266489909))^t>>>16)}function lr(e,t){return e^t+2654435769+(e<<6)+(e>>2)}return Jn[h]=!0,Jn[U]=Zn.entries,Jn.__toJS=Zn.toObject,Jn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+rr(e)},Xn(i,{toKeyedSeq:function(){return new _t(this,!1)},filter:function(e,t){return fn(this,en(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return fn(this,$t(this,!1))},slice:function(e,t){return fn(this,rn(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=M(e,e<0?this.count():this.size);var r=this.slice(0,e);return fn(this,1===n?r:r.concat(E(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return fn(this,ln(this,e,!1))},get:function(e,t){return(e=C(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=C(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return fn(this,un(this,e))},interleave:function(){var e=[this].concat(E(arguments)),t=mn(this.toSeq(),Q.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),fn(this,n)},keySeq:function(){return we(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(e,t){return fn(this,on(this,e,t,!1))},zip:function(){return fn(this,mn(this,ir,[this].concat(E(arguments))))},zipWith:function(e){var t=E(arguments);return t[0]=this,fn(this,mn(this,e,t))}}),i.prototype[p]=!0,i.prototype[m]=!0,Xn(s,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),s.prototype.has=Zn.includes,s.prototype.contains=s.prototype.includes,Xn(K,r.prototype),Xn(Q,i.prototype),Xn(X,s.prototype),Xn(Te,r.prototype),Xn(xe,i.prototype),Xn(Ee,s.prototype),{Iterable:n,Seq:_,Collection:ke,Map:qe,OrderedMap:Vt,List:xt,Stack:Gn,Set:On,OrderedSet:zn,Record:Tn,Range:we,Repeat:ve,is:ye,fromJS:pe}}()},function(e,t,n){const r=n(1),i=[];class s{constructor(e){this.isLoop=!1,this.warpMode=e,this.justReported=null,this.reporting="",this.reported=null,this.waitingReporter=null,this.params=null,this.executionContext=null,this.op=null}reset(){return this.isLoop=!1,this.warpMode=!1,this.justReported=null,this.reported=null,this.waitingReporter=null,this.params=null,this.executionContext=null,this.op=null,this}reuse(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.warpMode;return this.reset(),this.warpMode=Boolean(e),this}static create(e){const t=i.pop();return void 0!==t?(t.warpMode=Boolean(e),t):new s(e)}static release(e){void 0!==e&&i.push(e.reset())}}class o{constructor(e){this.topBlock=e,this.stack=[],this.stackFrames=[],this.status=0,this.isKilled=!1,this.target=null,this.blockContainer=null,this.requestScriptGlowInFrame=!1,this.blockGlowInFrame=null,this.warpTimer=null,this.justReported=null,this.triedToCompile=!1,this.isCompiled=!1,this.timer=null,this.generator=null,this.procedures=null,this.executableHat=!1}static get STATUS_RUNNING(){return 0}static get STATUS_PROMISE_WAIT(){return 1}static get STATUS_YIELD(){return 2}static get STATUS_YIELD_TICK(){return 3}static get STATUS_DONE(){return 4}static getIdFromTargetAndBlock(e,t){return"".concat(e.id,"&").concat(t)}getId(){return o.getIdFromTargetAndBlock(this.target,this.topBlock)}pushStack(e){if(this.stack.push(e),this.stack.length>this.stackFrames.length){const e=this.stackFrames[this.stackFrames.length-1];this.stackFrames.push(s.create(void 0!==e&&e.warpMode))}}reuseStackForNextBlock(e){this.stack[this.stack.length-1]=e,this.stackFrames[this.stackFrames.length-1].reuse()}popStack(){return s.release(this.stackFrames.pop()),this.stack.pop()}stopThisScript(){let e=this.peekStack();for(;null!==e;){const t=this.target.blocks.getBlock(e);if(this.peekStackFrame().waitingReporter)break;if(void 0!==t&&"procedures_call"===t.opcode){this.goToNextBlock();break}this.popStack(),e=this.peekStack()}0===this.stack.length&&(this.requestScriptGlowInFrame=!1,this.status=o.STATUS_DONE)}peekStack(){return this.stack.length>0?this.stack[this.stack.length-1]:null}peekStackFrame(){return this.stackFrames.length>0?this.stackFrames[this.stackFrames.length-1]:null}peekParentStackFrame(){return this.stackFrames.length>1?this.stackFrames[this.stackFrames.length-2]:null}pushReportedValue(e){this.justReported=void 0===e?null:e}initParams(){const e=this.peekStackFrame();null===e.params&&(e.params={})}pushParam(e,t){this.peekStackFrame().params[e]=t}getParam(e){for(let t=this.stackFrames.length-1;t>=0;t--){const n=this.stackFrames[t];if(null!==n.params)return Object.prototype.hasOwnProperty.call(n.params,e)?n.params[e]:null}return null}getAllparams(){return this.peekStackFrame().params}atStackTop(){return this.peekStack()===this.topBlock}goToNextBlock(){const e=this.target.blocks.getNextBlock(this.peekStack());this.reuseStackForNextBlock(e)}isRecursiveCall(e){let t=5;for(let n=this.stackFrames.length-1-1;n>=0;n--){const r=this.target.blocks.getBlock(this.stackFrames[n].op.id);if("procedures_call"===r.opcode&&r.mutation.proccode===e)return!0;if(--t<0)return!1}return!1}tryCompile(){if(!this.blockContainer)return;const e=n(208);this.triedToCompile=!0;const t=!this.stackClick,i=this.topBlock,s=this.blockContainer.getBlock(i)?this.blockContainer:this.target.runtime.flyoutBlocks,o=t&&s.getCachedCompileResult(i);if(o&&!o.success)return;let a;if(o)a=o.value;else try{a=e(this),t&&s.cacheCompileResult(i,a)}catch(e){return r.error("cannot compile script",this.target.getName(),e),t&&s.cacheCompileError(i,e),void this.target.runtime.emitCompileError(this.target,e)}this.procedures={};for(const e of Object.keys(a.procedures))this.procedures[e]=a.procedures[e](this);this.generator=a.startingFunction(this)(),this.executableHat=a.executableHat,this.blockContainer.forceNoGlow||(this.blockGlowInFrame=this.topBlock,this.requestScriptGlowInFrame=!0),this.isCompiled=!0}}o._StackFrame=s,e.exports=o},function(e,t,n){var r=n(91),i=r.isDigit,s=r.isHexDigit,o=r.isUppercaseLetter,a=r.isName,l=r.isWhiteSpace,c=r.isValidEscape;function u(e,t){return t<e.length?e.charCodeAt(t):0}function d(e,t,n){return 13===n&&10===u(e,t+1)?2:1}function h(e,t,n){var r=e.charCodeAt(t);return o(r)&&(r|=32),r===n}function p(e,t){for(;t<e.length&&i(e.charCodeAt(t));t++);return t}function m(e,t){if(s(u(e,(t+=2)-1))){for(var n=Math.min(e.length,t+5);t<n&&s(u(e,t));t++);var r=u(e,t);l(r)&&(t+=d(e,t,r))}return t}e.exports={consumeEscaped:m,consumeName:function(e,t){for(;t<e.length;t++){var n=e.charCodeAt(t);if(!a(n)){if(!c(n,u(e,t+1)))break;t=m(e,t)-1}}return t},consumeNumber:function(e,t){var n=e.charCodeAt(t);if(43!==n&&45!==n||(n=e.charCodeAt(t+=1)),i(n)&&(t=p(e,t+1),n=e.charCodeAt(t)),46===n&&i(e.charCodeAt(t+1))&&(n=e.charCodeAt(t+=2),t=p(e,t)),h(e,t,101)){var r=0;45!==(n=e.charCodeAt(t+1))&&43!==n||(r=1,n=e.charCodeAt(t+2)),i(n)&&(t=p(e,t+1+r+1))}return t},consumeBadUrlRemnants:function(e,t){for(;t<e.length;t++){var n=e.charCodeAt(t);if(41===n){t++;break}c(n,u(e,t+1))&&(t=m(e,t))}return t},cmpChar:h,cmpStr:function(e,t,n,r){if(n-t!==r.length)return!1;if(t<0||n>e.length)return!1;for(var i=t;i<n;i++){var s=e.charCodeAt(i),a=r.charCodeAt(i-t);if(o(s)&&(s|=32),s!==a)return!1}return!0},getNewlineLength:d,findWhiteSpaceStart:function(e,t){for(;t>=0&&l(e.charCodeAt(t));t--);return t+1},findWhiteSpaceEnd:function(e,t){for(;t<e.length&&l(e.charCodeAt(t));t++);return t}}},function(e,t,n){const r=n(45),i=n(16),s=n(53),o=n(10),a=n(52),l=n(46),c=n(13),u=n(1),d=n(8),h=n(5),p=n(7),m=n(83),f=n(374),{loadCostume:g}=n(34),{loadSound:y}=n(33),{deserializeCostume:b,deserializeSound:v}=n(104),S=Object.prototype.hasOwnProperty,w=["argument","colour","control","data","event","looks","math","motion","operator","procedures","sensing","sound"],k=12,T=13,x={math_number:[4,"NUM"],math_positive_number:[5,"NUM"],math_whole_number:[6,"NUM"],math_integer:[7,"NUM"],math_angle:[8,"NUM"],colour_picker:[9,"COLOUR"],text:[10,"TEXT"],event_broadcast_menu:[11,"BROADCAST_OPTION"],data_variable:[k,"VARIABLE"],data_listcontents:[T,"LIST"]},E=8e3,A=function(e){const t=function(e){if(S.call(x,e.opcode)){const t=x[e.opcode],n=t[0],r=t[1],i=e.fields[r],s=[n,i.value];return"event_broadcast_menu"===e.opcode?s.push(i.id):"data_variable"!==e.opcode&&"data_listcontents"!==e.opcode||(s.push(i.id),e.topLevel&&(s.push(e.x?Math.round(e.x):0),s.push(e.y?Math.round(e.y):0))),s}return null}(e);if(t)return t;const n=Object.create(null);return n.opcode=e.opcode,n.next=e.next,n.parent=e.parent,n.inputs=function(e){const t=Object.create(null);for(const n in e)S.call(e,n)&&(e[n].block===e[n].shadow?t[n]=[1,e[n].block]:null===e[n].shadow?t[n]=[2,e[n].block]:t[n]=[3,e[n].block,e[n].shadow]);return t}(e.inputs),n.fields=function(e){const t=Object.create(null);for(const n in e)S.call(e,n)&&(t[n]=[e[n].value],Object.prototype.hasOwnProperty.call(e[n],"id")&&t[n].push(e[n].id));return t}(e.fields),n.shadow=e.shadow,e.topLevel?(n.topLevel=!0,n.x=e.x?Math.round(e.x):0,n.y=e.y?Math.round(e.y):0):n.topLevel=!1,e.mutation&&(n.mutation=e.mutation),e.comment&&(n.comment=e.comment),n},C=function(e,t){const n=e.inputs;for(const e in n){const r=n[e];for(let e=1;e<r.length;e++){if(!r[e])continue;const n=r[e],i=t[n];Array.isArray(i)&&(r[e]=i,delete t[n])}}return e},I=function(e){const t=e.indexOf("_"),n=e.substring(0,t).replace(/[^\w-]/g,"-");if(-1===w.indexOf(n)&&""!==n)return n},O=(e,t)=>{if(!t.extensionManager)return null;const n=t.extensionManager.getExtensionURLs(),r={};for(const t of e){const e=n[t];"string"==typeof e&&(r[t]=e)}return 0===Object.keys(r).length?null:r},M=function(e){const t=Object.create(null),n=new Set;for(const r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;t[r]=A(e[r]);const i=I(e[r].opcode);i&&n.add(i)}for(const e in t){const n=t[e];t[e]=C(n,t)}for(const e in t){const n=t[e];Array.isArray(n)&&[k,T].indexOf(n[0])<0&&(u.warn("Found an unexpected top level primitive with block ID: ".concat(e,"; deleting it from serialized blocks.")),delete t[e])}return[t,Array.from(n)]},N=function(e){const t=Object.create(null);t.name=e.name;const n=e.broken||e;return t.bitmapResolution=n.bitmapResolution,t.dataFormat=n.dataFormat.toLowerCase(),t.assetId=n.assetId,t.md5ext=n.md5,t.rotationCenterX=n.rotationCenterX,t.rotationCenterY=n.rotationCenterY,t},R=function(e){const t=Object.create(null);t.name=e.name;const n=e.broken||e;return t.assetId=n.assetId,t.dataFormat=n.dataFormat.toLowerCase(),t.format=n.format,t.rate=n.rate,t.sampleCount=n.sampleCount,t.md5ext=n.md5,t},D=e=>"number"==typeof e||"string"==typeof e||"boolean"==typeof e,P=e=>{if(Array.isArray(e)){let t=null;for(let n=0;n<e.length;n++)D(e[n])||(t||(t=e.slice()),t[n]="".concat(t[n]));return t||e}return D(e)?e:"".concat(e)},L=function(e,t){const n=Object.create(null);let r=[];n.isStage=e.isStage,n.name=n.isStage?"Stage":e.name;const i=function(e){const t=Object.create(null);t.variables=Object.create(null),t.lists=Object.create(null),t.broadcasts=Object.create(null);for(const n in e){const r=e[n];r.type!==o.BROADCAST_MESSAGE_TYPE?r.type!==o.LIST_TYPE?(t.variables[n]=[r.name,P(r.value)],r.isCloud&&t.variables[n].push(!0)):t.lists[n]=[r.name,P(r.value)]:t.broadcasts[n]=r.value}return t}(e.variables);return n.variables=i.variables,n.lists=i.lists,n.broadcasts=i.broadcasts,[n.blocks,r]=M(e.blocks),n.comments=function(e){const t=Object.create(null);for(const n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;const r=e[n],i=Object.create(null);i.blockId=r.blockId,i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height,i.minimized=r.minimized,r.text.length>E?(i.text=r.text.substring(0,E),i.extraText=r.text.substring(E)):i.text=r.text,t[n]=i}return t}(e.comments),(e.currentCostume<0||e.currentCostume>=e.costumes.length)&&(u.warn("currentCostume property for target ".concat(e.name," is out of range")),e.currentCostume=h.clamp(e.currentCostume,0,e.costumes.length-1)),n.currentCostume=e.currentCostume,n.costumes=e.costumes.map(N),n.sounds=e.sounds.map(R),Object.prototype.hasOwnProperty.call(e,"volume")&&(n.volume=e.volume),Object.prototype.hasOwnProperty.call(e,"layerOrder")&&(n.layerOrder=e.layerOrder),n.isStage?(Object.prototype.hasOwnProperty.call(e,"tempo")&&(n.tempo=e.tempo),Object.prototype.hasOwnProperty.call(e,"videoTransparency")&&(n.videoTransparency=e.videoTransparency),Object.prototype.hasOwnProperty.call(e,"videoState")&&(n.videoState=e.videoState),Object.prototype.hasOwnProperty.call(e,"textToSpeechLanguage")&&(n.textToSpeechLanguage=e.textToSpeechLanguage)):(n.visible=e.visible,n.x=e.x,n.y=e.y,n.size=e.size,n.direction=e.direction,n.draggable=e.draggable,n.rotationStyle=e.rotationStyle),r.forEach((e=>{t.add(e)})),n},B=(e,t)=>{const n={};let r=!0;for(const[i,s]of Object.entries(e))t.has(i)&&null!=s&&(r=!1,n[i]=e[i]);return r?null:n},z=function(e,t,n,r){if(!Array.isArray(e))return e;const i=Object.create(null),s=d();switch(i.id=s,i.next=null,i.parent=t,i.shadow=n,i.inputs=Object.create(null),e[0]){case 4:i.opcode="math_number",i.fields={NUM:{name:"NUM",value:e[1]}},i.topLevel=!1;break;case 5:i.opcode="math_positive_number",i.fields={NUM:{name:"NUM",value:e[1]}},i.topLevel=!1;break;case 6:i.opcode="math_whole_number",i.fields={NUM:{name:"NUM",value:e[1]}},i.topLevel=!1;break;case 7:i.opcode="math_integer",i.fields={NUM:{name:"NUM",value:e[1]}},i.topLevel=!1;break;case 8:i.opcode="math_angle",i.fields={NUM:{name:"NUM",value:e[1]}},i.topLevel=!1;break;case 9:i.opcode="colour_picker",i.fields={COLOUR:{name:"COLOUR",value:e[1]}},i.topLevel=!1;break;case 10:i.opcode="text",i.fields={TEXT:{name:"TEXT",value:e[1]}},i.topLevel=!1;break;case 11:i.opcode="event_broadcast_menu",i.fields={BROADCAST_OPTION:{name:"BROADCAST_OPTION",value:e[1],id:e[2],variableType:o.BROADCAST_MESSAGE_TYPE}},i.topLevel=!1;break;case k:i.opcode="data_variable",i.fields={VARIABLE:{name:"VARIABLE",value:e[1],id:e[2],variableType:o.SCALAR_TYPE}},e.length>3&&(i.topLevel=!0,i.x=e[3],i.y=e[4]);break;case T:i.opcode="data_listcontents",i.fields={LIST:{name:"LIST",value:e[1],id:e[2],variableType:o.LIST_TYPE}},e.length>3&&(i.topLevel=!0,i.x=e[3],i.y=e[4]);break;default:return u.error("Found unknown primitive type during deserialization: ".concat(JSON.stringify(e))),null}return r[s]=i,s},U=function(e,t,n){const r={};for(const i in e){if(!S.call(e,i))continue;const s=e[i];if(!Array.isArray(s))continue;let o=null,a=null;const l=s[0];1===l?o=a=z(s[1],t,!0,n):2===l?o=z(s[1],t,!1,n):(o=z(s[1],t,!1,n),a=z(s[2],t,!0,n)),r[i]={name:i,block:o,shadow:a}}return r},j=function(e){const t={};for(const n in e){if(!S.call(e,n))continue;const r=e[n];Array.isArray(r)&&(t[n]={name:n,value:r[0]},r.length>1&&(t[n].id=r[1]),"BROADCAST_OPTION"===n?t[n].variableType=o.BROADCAST_MESSAGE_TYPE:"VARIABLE"===n?t[n].variableType=o.SCALAR_TYPE:"LIST"===n&&(t[n].variableType=o.LIST_TYPE))}return t},F=function(e){for(const t in e){if(!Object.prototype.hasOwnProperty.call(e,t))continue;const n=e[t];Array.isArray(n)?(delete e[t],z(n,null,!1,e)):(n.id=t,n.inputs=U(n.inputs,t,e),n.fields=j(n.fields))}return e};e.exports={serialize:function(e,t){let{allowOptimization:n=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Object.create(null),i=new Set,s=t?[e.getTargetById(t)]:e.targets.filter((e=>e.isOriginal)),o=function(e){const t=e.map((e=>e.getLayerOrder()));return h.reducedSortOrdering(t)}(s),a=s.map((e=>e.toJSON()));e.renderer&&!t&&a.forEach(((e,t)=>{e.layerOrder=o[t]}));const l=a.map((e=>L(e,i))).map(((e,t)=>{const n=s[t],r=B(n.extensionStorage,i);return r&&(e.extensionStorage=r),e})),c=e.fontManager.serializeJSON();if(t){const t=l[0];i.size&&(t.extensions=Array.from(i));const n=O(i,e);return n&&(t.extensionURLs=n),c&&(t.customFonts=c),l[0]}const u=B(e.extensionStorage,i);u&&(r.extensionStorage=u),r.targets=l,r.monitors=function(e,t,n){const r=(t.stageWidth-480)/2,i=(t.stageHeight-360)/2;return e.valueSeq().filter((e=>{const t=I(e.opcode);return!t||!!e.visible&&(n.add(t),!0)})).map((e=>{const t={id:e.id,mode:e.mode,opcode:e.opcode,params:e.params,spriteName:e.spriteName,value:Array.isArray(e.value)?[]:0,width:e.width,height:e.height,x:e.x-r,y:e.y-i,visible:e.visible};return"list"!==e.mode&&(t.sliderMin=e.sliderMin,t.sliderMax=e.sliderMax,t.isDiscrete=e.isDiscrete),t})).toArray()}(e.getMonitorState(),e,i),r.extensions=Array.from(i);const d=O(i,e);d&&(r.extensionURLs=d),c&&(r.customFonts=c);const p=Object.create(null);return p.semver="3.0.0",p.vm="0.2.0",e.origin&&(p.origin=e.origin),p.agent="",p.platform=Object.assign({},e.platform),r.meta=p,n&&f(r),r},deserialize:async function(e,t,n,d){await((e,t)=>{if(!e.meta||!e.meta.platform)return;if(e.meta.platform.name===t.platform.name)return;let n=t.listenerCount(r.PLATFORM_MISMATCH);return 0!==n?new Promise((i=>{t.emit(r.PLATFORM_MISMATCH,e.meta.platform,(()=>{n--,0===n&&i()}))})):void 0})(e,t);const f={extensionIDs:new Set,extensionURLs:new Map};if(e.meta&&e.meta.origin?t.origin=e.meta.origin:t.origin=null,e.extensionURLs)for(const[t,n]of Object.entries(e.extensionURLs))f.extensionURLs.set(t,n);let S;S=e.customFonts?t.fontManager.deserialize(e.customFonts,n,d):Promise.resolve();const w=((d?[e]:e.targets)||[]).map(((e,t)=>Object.assign(e,{targetPaneOrder:t}))).sort(((e,t)=>e.layerOrder-t.layerOrder)),k=e.monitors||[];return S.then((()=>w.map((e=>function(e,t,n){if(!Object.prototype.hasOwnProperty.call(e,"name"))return Promise.resolve(null);const r={costumePromises:null,soundPromises:null,soundBank:t.audioEngine&&t.audioEngine.createBank()};return r.costumePromises=(e.costumes||[]).map((e=>{const r={asset:e.asset,assetId:e.assetId,skinId:null,name:e.name,bitmapResolution:e.bitmapResolution,rotationCenterX:e.rotationCenterX,rotationCenterY:e.rotationCenterY},i=e.dataFormat||e.assetType&&e.assetType.runtimeFormat||"png",s=Object.prototype.hasOwnProperty.call(e,"md5ext")?e.md5ext:"".concat(e.assetId,".").concat(i);return r.md5=s,r.dataFormat=i,t.wrapAssetRequest((()=>b(r,t,n).then((()=>g(s,r,t)))))})),r.soundPromises=(e.sounds||[]).map((e=>{const i={assetId:e.assetId,format:e.format,rate:e.rate,sampleCount:e.sampleCount,name:e.name,md5:e.md5ext,dataFormat:e.dataFormat,data:null};return t.wrapAssetRequest((()=>v(i,t,n).then((()=>y(i,t,r.soundBank)))))})),r}(e,t,n))))).then((e=>Promise.resolve(e))).then((e=>Promise.all(w.map(((n,r)=>function(e,t,n,r,l){if(!Object.prototype.hasOwnProperty.call(e,"name"))return Promise.resolve(null);const u=new i(t),d=new s(u,t);if(Object.prototype.hasOwnProperty.call(e,"name")&&(d.name=e.name),Object.prototype.hasOwnProperty.call(e,"blocks")){F(e.blocks);for(const t in e.blocks){if(!Object.prototype.hasOwnProperty.call(e.blocks,t))continue;const r=e.blocks[t];u.createBlock(r);const i=I(r.opcode);i&&n.extensionIDs.add(i)}}const{costumePromises:p}=l,{soundBank:m,soundPromises:f}=l,g=d.createClone(e.isStage?c.BACKGROUND_LAYER:c.SPRITE_LAYER);if(Object.prototype.hasOwnProperty.call(e,"tempo")&&(g.tempo=e.tempo),Object.prototype.hasOwnProperty.call(e,"volume")&&(g.volume=e.volume),Object.prototype.hasOwnProperty.call(e,"videoTransparency")&&(g.videoTransparency=e.videoTransparency),Object.prototype.hasOwnProperty.call(e,"videoState")&&(g.videoState=e.videoState),Object.prototype.hasOwnProperty.call(e,"textToSpeechLanguage")&&(g.textToSpeechLanguage=e.textToSpeechLanguage),Object.prototype.hasOwnProperty.call(e,"variables"))for(const n in e.variables){const r=e.variables[n],i=3===r.length&&r[2]&&e.isStage&&t.canAddCloudVariable(),s=new o(n,r[0],o.SCALAR_TYPE,i);i&&t.addCloudVariable(),s.value=r[1],g.variables[s.id]=s}if(Object.prototype.hasOwnProperty.call(e,"lists"))for(const t in e.lists){const n=e.lists[t],r=new o(t,n[0],o.LIST_TYPE,!1);r.value=n[1],g.variables[r.id]=r}if(Object.prototype.hasOwnProperty.call(e,"broadcasts"))for(const t in e.broadcasts){const n=e.broadcasts[t],r=new o(t,n,o.BROADCAST_MESSAGE_TYPE,!1);g.variables[r.id]=r}if(Object.prototype.hasOwnProperty.call(e,"comments"))for(const t in e.comments){const n=e.comments[t],r=new a(t,n.text+("string"==typeof n.extraText?n.extraText:""),n.x,n.y,n.width,n.height,n.minimized);n.blockId&&(r.blockId=n.blockId),g.comments[r.id]=r}return Object.prototype.hasOwnProperty.call(e,"x")&&(g.x=e.x),Object.prototype.hasOwnProperty.call(e,"y")&&(g.y=e.y),Object.prototype.hasOwnProperty.call(e,"direction")&&(g.direction=h.wrapClamp(e.direction,-179,180)),Object.prototype.hasOwnProperty.call(e,"size")&&(g.size=e.size),Object.prototype.hasOwnProperty.call(e,"visible")&&(g.visible=e.visible),Object.prototype.hasOwnProperty.call(e,"currentCostume")&&(g.currentCostume=h.clamp(e.currentCostume,0,e.costumes.length-1)),Object.prototype.hasOwnProperty.call(e,"rotationStyle")&&(g.rotationStyle=e.rotationStyle),Object.prototype.hasOwnProperty.call(e,"isStage")&&(g.isStage=e.isStage),Object.prototype.hasOwnProperty.call(e,"targetPaneOrder")&&(g.targetPaneOrder=e.targetPaneOrder),Object.prototype.hasOwnProperty.call(e,"draggable")&&(g.draggable=e.draggable),Object.prototype.hasOwnProperty.call(e,"extensionStorage")&&(g.extensionStorage=e.extensionStorage),Promise.all(p).then((e=>{d.costumes=e})),Promise.all(f).then((e=>{d.sounds=e,d.soundBank=m||null})),Promise.all(p.concat(f)).then((()=>g))}(n,t,f,0,e[r])))))).then((e=>e.map(((e,t)=>(e.layerOrder=t,e))).sort(((e,t)=>e.targetPaneOrder-t.targetPaneOrder)).map((e=>(delete e.targetPaneOrder,e))))).then((e=>function(e){const t=m.getAllVarRefsForTargets(e,!0);e.forEach((e=>{Object.keys(e.variables).forEach((t=>{const n=p.replaceUnsafeChars(t);n!==t&&(e.variables[t].id=n,e.variables[n]=e.variables[t],delete e.variables[t])}))}));for(const e in t){const n=p.replaceUnsafeChars(e);e!==n&&m.updateVariableIdentifiers(t[e],n)}return e}(e))).then((n=>(k.map((e=>function(e,t,n,r){const i=(t.stageWidth-480)/2,s=(t.stageHeight-360)/2;if(e.x+=i,e.y+=s,e.x=h.clamp(e.x,0,t.stageWidth),e.y=h.clamp(e.y,0,t.stageHeight),e.spriteName){const t=n.filter((t=>t.sprite.name===e.spriteName));t&&t.length>0?e.targetId=t[0].id:u.warn("Tried to deserialize sprite specific monitor ".concat(e.opcode," but could not find sprite ").concat(e.spriteName,"."))}const a=t.monitorBlockInfo[e.opcode];if("data_listcontents"===e.opcode){const t=e.targetId?n.find((t=>t.id===e.targetId)):n.find((e=>e.isStage));t&&Object.prototype.hasOwnProperty.call(t.variables,e.id)&&(e.params.LIST=t.variables[e.id].name)}const c={};for(const t in e.params){const n={name:t,value:e.params[t]};c[t]=n}"data_variable"!==e.opcode&&"data_listcontents"!==e.opcode&&a&&a.isSpriteSpecific?e.id=a.getId(e.targetId,c):e.id=p.replaceUnsafeChars(e.id);const d=t.monitorBlocks._blocks[e.id];if(d)d.isMonitored=e.visible,d.targetId=e.targetId;else{const n={id:e.id,opcode:e.opcode,inputs:{},fields:c,topLevel:!0,next:null,parent:null,shadow:!1,x:0,y:0,isMonitored:e.visible,targetId:e.targetId};if("data_variable"===e.opcode){const t=n.fields.VARIABLE;t.id=e.id,t.variableType=o.SCALAR_TYPE}else if("data_listcontents"===e.opcode){const t=n.fields.LIST;t.id=e.id,t.variableType=o.LIST_TYPE}t.monitorBlocks.createBlock(n);const i=I(n.opcode);i&&r.extensionIDs.add(i)}t.requestAddMonitor(l(e))}(e,t,n,f))),Object.prototype.hasOwnProperty.call(e,"extensionStorage")&&(t.extensionStorage=e.extensionStorage),n))).then((e=>({targets:e,extensions:f})))},deserializeBlocks:F,serializeBlocks:M,deserializeStandaloneBlocks:e=>{if((e=JSON.parse(JSON.stringify(e))).extensionURLs){const t=new Map;for(const[n,r]of Object.entries(e.extensionURLs))t.set(n,r);return{blocks:e.blocks,extensionURLs:t}}return{blocks:e,extensionURLs:new Map}},serializeStandaloneBlocks:(e,t)=>{const n=new Set;for(const t of e){const e=I(t.opcode);e&&n.add(e)}const r=O(n,t);return r?{blocks:e,extensionURLs:r}:e},getExtensionIdForOpcode:I}},function(e,t,n){const r=n(11),i=n(38),s=n(383);e.exports=class{constructor(e,t){this._renderer=t,this._id=e,this._rotationCenter=r.v3.create(0,0),this._texture=null,this._uniforms={u_skinSize:[0,0],u_skin:null},this._silhouette=new s,this.private=!1}dispose(){this._id=i.ID_NONE}get id(){return this._id}get rotationCenter(){return this._rotationCenter}get size(){return[0,0]}useNearest(e,t){return!0}calculateRotationCenter(){return[this.size[0]/2,this.size[1]/2]}getTexture(e){return this._emptyImageTexture}getFenceBounds(e,t){return e.getAABB(t)}getUniforms(e){return this._uniforms.u_skin=this.getTexture(e),this._uniforms.u_skinSize=this.size,this._uniforms}emitWasAltered(){this._renderer.skinWasAltered(this)}updateSilhouette(){this._silhouette.unlazy()}_setTexture(e){const t=this._renderer.gl;t.bindTexture(t.TEXTURE_2D,this._texture),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),this._silhouette.update(e)}setEmptyImageData(){if(this._texture=null,!this._emptyImageData){this._emptyImageData=new ImageData(1,1);const e=this._renderer.gl,t={auto:!0,wrap:e.CLAMP_TO_EDGE,src:this._emptyImageData};this._emptyImageTexture=r.createTexture(e,t)}this._rotationCenter[0]=0,this._rotationCenter[1]=0,this._silhouette.update(this._emptyImageData),this.emitWasAltered()}isTouchingNearest(e){return this._silhouette.isTouchingNearest(e)}isTouchingLinear(e){return this._silhouette.isTouchingLinear(e)}}},function(e,t,n){const r=n(11);class i{constructor(e){this._gl=e,this._shaderCache={};for(const e in i.DRAW_MODE)Object.prototype.hasOwnProperty.call(i.DRAW_MODE,e)&&(this._shaderCache[e]=[])}getShader(e,t){const n=this._shaderCache[e];e===i.DRAW_MODE.silhouette&&(t&=~(i.EFFECT_INFO.color.mask|i.EFFECT_INFO.brightness.mask));let r=n[t];return r||(r=n[t]=this._buildShader(e,t)),r}_buildShader(e,t){const s=i.EFFECTS.length,o=["#define DRAW_MODE_".concat(e)];for(let e=0;e<s;++e)t&1<<e&&o.push("#define ENABLE_".concat(i.EFFECTS[e]));const a="".concat(o.join("\n"),"\n"),l=a+n(386),c=a+n(387);return r.createProgramInfo(this._gl,[l,c])}}i.EFFECT_INFO={color:{uniformName:"u_color",mask:1,converter:e=>e/200%1,shapeChanges:!1},fisheye:{uniformName:"u_fisheye",mask:2,converter:e=>Math.max(0,(e+100)/100),shapeChanges:!0},whirl:{uniformName:"u_whirl",mask:4,converter:e=>-e*Math.PI/180,shapeChanges:!0},pixelate:{uniformName:"u_pixelate",mask:8,converter:e=>Math.abs(e)/10,shapeChanges:!0},mosaic:{uniformName:"u_mosaic",mask:16,converter:e=>(e=Math.round((Math.abs(e)+10)/10),Math.max(1,Math.min(e,512))),shapeChanges:!0},brightness:{uniformName:"u_brightness",mask:32,converter:e=>Math.max(-100,Math.min(e,100))/100,shapeChanges:!1},ghost:{uniformName:"u_ghost",mask:64,converter:e=>1-Math.max(0,Math.min(e,100))/100,shapeChanges:!1}},i.EFFECTS=Object.keys(i.EFFECT_INFO),i.DRAW_MODE={default:"default",straightAlpha:"straightAlpha",silhouette:"silhouette",colorMask:"colorMask",line:"line",background:"background"},e.exports=i},function(e,t){const n="undefined"==typeof document,r=n?"[0m":"",i=n?"[90m":"",s=`${n?"[34m":""}debug${r}`,o=`${n?"[36m":""}info${r}`,a=`${n?"[33m":""}warn${r}`,l=`${n?"[31m":""}error${r}`,c=(e="")=>{const t=t=>c(e?`${e} ${t}`:t),n=e?[`${i}${e}${r}`]:[];return t.debug=t.log=console.debug.bind(console,...n,s),t.info=console.log.bind(console,...n,o),t.warn=t.warning=console.warn.bind(console,...n,a),t.error=console.error.bind(console,...n,l),t};c.enable=c.disable=()=>{},e.exports=c},function(e,t,n){const r=n(70);e.exports=class extends r{constructor(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;super(),this._socket=e.getScratchLinkSocket("BLE"),this._socket.setOnOpen(this.requestPeripheral.bind(this)),this._socket.setOnClose(this.handleDisconnectError.bind(this)),this._socket.setOnError(this._handleRequestError.bind(this)),this._socket.setHandleMessage(this._handleMessage.bind(this)),this._sendMessage=this._socket.sendMessage.bind(this._socket),this._availablePeripherals={},this._connectCallback=r,this._connected=!1,this._characteristicDidChangeCallback=null,this._resetCallback=i,this._discoverTimeoutID=null,this._extensionId=t,this._peripheralOptions=n,this._runtime=e,this._socket.open()}requestPeripheral(){this._availablePeripherals={},this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID),this._discoverTimeoutID=window.setTimeout(this._handleDiscoverTimeout.bind(this),15e3),this.sendRemoteRequest("discover",this._peripheralOptions).catch((e=>{this._handleRequestError(e)}))}connectPeripheral(e){this.sendRemoteRequest("connect",{peripheralId:e}).then((()=>{this._connected=!0,this._runtime.emit(this._runtime.constructor.PERIPHERAL_CONNECTED),this._connectCallback()})).catch((e=>{this._handleRequestError(e)}))}disconnect(){this._connected&&(this._connected=!1),this._socket.isOpen()&&this._socket.close(),this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID),this._runtime.emit(this._runtime.constructor.PERIPHERAL_DISCONNECTED)}isConnected(){return this._connected}startNotifications(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r={serviceId:e,characteristicId:t};return this._characteristicDidChangeCallback=n,this.sendRemoteRequest("startNotifications",r).catch((e=>{this.handleDisconnectError(e)}))}read(e,t){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const r={serviceId:e,characteristicId:t};return arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&(r.startNotifications=!0),n&&(this._characteristicDidChangeCallback=n),this.sendRemoteRequest("read",r).catch((e=>{this.handleDisconnectError(e)}))}write(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;const s={serviceId:e,characteristicId:t,message:n};return r&&(s.encoding=r),null!==i&&(s.withResponse=i),this.sendRemoteRequest("write",s).catch((e=>{this.handleDisconnectError(e)}))}didReceiveCall(e,t){switch(e){case"didDiscoverPeripheral":this._availablePeripherals[t.peripheralId]=t,this._runtime.emit(this._runtime.constructor.PERIPHERAL_LIST_UPDATE,this._availablePeripherals),this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID);break;case"userDidPickPeripheral":this._availablePeripherals[t.peripheralId]=t,this._runtime.emit(this._runtime.constructor.USER_PICKED_PERIPHERAL,this._availablePeripherals),this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID);break;case"userDidNotPickPeripheral":this._runtime.emit(this._runtime.constructor.PERIPHERAL_SCAN_TIMEOUT),this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID);break;case"characteristicDidChange":this._characteristicDidChangeCallback&&this._characteristicDidChangeCallback(t.message);break;case"ping":return 42}}handleDisconnectError(){this._connected&&(this.disconnect(),this._resetCallback&&this._resetCallback(),this._runtime.emit(this._runtime.constructor.PERIPHERAL_CONNECTION_LOST_ERROR,{message:"Scratch lost connection to",extensionId:this._extensionId}))}_handleRequestError(){this._runtime.emit(this._runtime.constructor.PERIPHERAL_REQUEST_ERROR,{message:"Scratch lost connection to",extensionId:this._extensionId})}_handleDiscoverTimeout(){this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID),this._runtime.emit(this._runtime.constructor.PERIPHERAL_SCAN_TIMEOUT)}}},function(e,t,n){const r=n(1);e.exports=function(e){if("string"!=typeof e){if(!Array.isArray(e))return r.error("Unexpected input recieved in replaceUnsafeChars"),e;e=String(e)}return e.replace(/[<>&'"]/g,(e=>{switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";case"'":return"&apos;";case'"':return"&quot;"}}))}},function(e,t,n){const r=n(7),i=n(1),s=function(e,t,n,r){return e.assetId=t.assetId,n.audioEngine?n.audioEngine.decodeSoundPlayer(Object.assign({},e,{data:t.data})).then((t=>{e.soundId=t.id;const i=t.buffer;return e.rate=i.sampleRate,e.sampleCount=i.length,null!==r&&r.addSoundPlayer(t),n.isPackaged&&(e.asset=null),e})):(i.warn("No audio engine present; cannot load sound asset: ",e.md5),Promise.resolve(e))},o=function(e,t,n){const r=e.asset,i=e.assetId,o=e.sampleCount,a=e.rate,l=e.format,c=e.dataFormat;return e.assetId=t.storage.defaultAssetId.Sound,e.asset=t.storage.get(e.assetId),e.md5="".concat(e.assetId,".").concat(e.asset.dataFormat),s(e,e.asset,t,n).then((e=>(e.broken={},e.broken.assetId=i,e.broken.md5="".concat(i,".").concat(c),e.broken.asset=r,e.broken.sampleCount=o,e.broken.rate=a,e.broken.format=l,e.broken.dataFormat=c,e)))};e.exports={loadSound:function(e,t,n){if(!t.storage)return i.warn("No storage module present; cannot load sound asset: ",e.md5),Promise.resolve(e);const a=r.splitFirst(e.md5,"."),l=a[0],c=a[1].toLowerCase();return e.dataFormat=c,(e.asset&&Promise.resolve(e.asset)||t.storage.load(t.storage.AssetType.Sound,l,c)).then((r=>(e.asset=r,r?s(e,r,t,n):(i.warn("Failed to find sound data: ",e.md5),o(e,t,n))))).catch((r=>(i.warn("Failed to load sound: ".concat(e.md5," with error: ").concat(r)),o(e,t,n))))},loadSoundFromAsset:s}},function(e,t,n){const r=n(7),i=n(1),s=n(82),{loadSvgString:o,serializeSvgToString:a}=n(35),{parseVectorMetadata:l}=n(101),c=function(e,t,n,r){return new Promise((i=>{let s=e.asset.decodeText();if(void 0===n){const t=l(s);t&&(n=t,e.rotationCenterX=n[0],e.rotationCenterY=n[1])}if(r&&2===r){const n=a(o(s,!0));if(s!==n){s=n;const r=t.storage;e.asset.encodeTextData(n,r.DataFormat.SVG,!0),e.assetId=e.asset.assetId,e.md5="".concat(e.assetId,".").concat(e.dataFormat)}}e.skinId=t.renderer.createSVGSkin(s,n),e.size=t.renderer.getSkinSize(e.skinId),n||(n=t.renderer.getSkinRotationCenter(e.skinId),e.rotationCenterX=n[0],e.rotationCenterY=n[1],e.bitmapResolution=1),t.isPackaged&&(e.asset=null),i(e)}))},u=new class{constructor(){this.pool=[],this.clearSoon=null}clear(){this.clearSoon||(this.clearSoon=new Promise((e=>setTimeout(e,1e3))).then((()=>{this.pool.length=0,this.clearSoon=null})))}create(){return this.pool.pop()||document.createElement("canvas")}release(e){this.clear(),this.pool.push(e)}},d=e=>new Promise(((t,n)=>{const r=new Image;r.onload=function(){t(r),r.onload=null,r.onerror=null},r.onerror=function(){n(new Error("Costume load failed. Asset could not be read.")),r.onload=null,r.onerror=null},r.src=e})),h=new s((async e=>{let t;for(let n=0;n<3;n++)try{if("function"==typeof createImageBitmap){const t=await createImageBitmap(new Blob([e.data.buffer],{type:e.assetType.contentType}));if(!t)throw new Error("createImageBitmap resolved with ".concat(t));return t}return await d(e.encodeDataURI())}catch(e){t||(t=e),i.warn(e),await new Promise((e=>setTimeout(e,2e3*Math.random())))}throw t}),25),p=function(e,t,n){return function(e,t,n){return e&&e.asset?t.v2BitmapAdapter?Promise.all([e.asset,e.textLayerAsset].map((e=>e?h.do(e):null))).then((r=>{let[i,s]=r;if(!i)throw new Error("Loading bitmap costume base failed.");const o=1===e.bitmapResolution?2:1;let a,l;if(s){l=u.create(),l.width=i.width,l.height=i.height;const e=l.getContext("2d");e.drawImage(i,0,0),e.drawImage(s,0,0),a=l}else a=i;return 1!==o&&(a=t.v2BitmapAdapter.resize(a,a.width*o,a.height*o),l&&u.release(l)),a.reusable=!1,n&&(n[0]=n[0]*o,n[1]=n[1]*o,e.rotationCenterX=n[0],e.rotationCenterY=n[1]),e.bitmapResolution=2,delete e.textLayerMD5,delete e.textLayerAsset,{image:a,rotationCenter:n,assetMatchesBase:1===o&&!s}})).finally((()=>{delete e.textLayerMD5,delete e.textLayerAsset})):Promise.reject("No V2 Bitmap adapter present."):Promise.reject("Costume load failed. Assets were missing.")}(e,t,n).then((n=>(n.assetMatchesBase||function(n){if(!t.v2BitmapAdapter)return Promise.reject("No V2 Bitmap adapter present.");const r=t.storage;e.asset=r.createAsset(r.AssetType.ImageBitmap,r.DataFormat.PNG,t.v2BitmapAdapter.convertDataURIToBinary(n),null,!0),e.dataFormat=r.DataFormat.PNG,e.assetId=e.asset.assetId,e.md5="".concat(e.assetId,".").concat(e.dataFormat)}((e=>{if(e instanceof HTMLCanvasElement)return e.toDataURL();const t=u.create();t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0);const n=t.toDataURL();return u.release(t),n})(n.image)),n))).then((n=>{let r,{image:i,rotationCenter:s}=n;s&&(r=[s[0]/2,s[1]/2]),e.skinId=t.renderer.createBitmapSkin(i,e.bitmapResolution,r);const o=t.renderer.getSkinSize(e.skinId);return e.size=[2*o[0],2*o[1]],s||(s=t.renderer.getSkinRotationCenter(e.skinId),e.rotationCenterX=2*s[0],e.rotationCenterY=2*s[1],e.bitmapResolution=2),t.isPackaged&&(e.asset=null),e}))},m=function(e,t){const n=e.asset,r=e.assetId,i=e.rotationCenterX,s=e.rotationCenterY,o=e.bitmapResolution,a=e.dataFormat,l=t.storage.AssetType,u=e.dataFormat===l.ImageVector.runtimeFormat;e.assetId=u?t.storage.defaultAssetId.ImageVector:t.storage.defaultAssetId.ImageBitmap,e.asset=t.storage.get(e.assetId),e.md5="".concat(e.assetId,".").concat(e.asset.dataFormat);return(u?c(e,t):p(e,t)).then((e=>(e.broken={},e.broken.assetId=r,e.broken.md5="".concat(r,".").concat(a),e.broken.asset=n,e.broken.dataFormat=a,e.broken.rotationCenterX=i,e.broken.rotationCenterY=s,e.broken.bitmapResolution=o,e)))},f=function(e,t,n){e.assetId=e.asset.assetId;if(!t.renderer)return i.warn("No rendering module present; cannot load costume: ",e.name),Promise.resolve(e);const r=t.storage.AssetType;let s;return"number"!=typeof e.rotationCenterX||isNaN(e.rotationCenterX)||"number"!=typeof e.rotationCenterY||isNaN(e.rotationCenterY)||(s=[e.rotationCenterX,e.rotationCenterY]),e.asset.assetType.runtimeFormat===r.ImageVector.runtimeFormat?c(e,t,s,n).catch((n=>(i.warn("Error loading vector image: ".concat(n)),m(e,t)))):p(e,t,s).catch((n=>(i.warn("Error loading bitmap image: ".concat(n)),m(e,t))))};e.exports={loadCostume:function(e,t,n,s){const o=r.splitFirst(e,"."),a=o[0],l=o[1].toLowerCase();if(t.dataFormat=l,t.asset)return f(t,n,s);if(!n.storage)return i.warn("No storage module present; cannot load costume asset: ",e),Promise.resolve(t);if(!n.storage.defaultAssetId)return i.warn("No default assets found"),Promise.resolve(t);const c=n.storage.AssetType,u="svg"===l?c.ImageVector:c.ImageBitmap,d=n.storage.load(u,a,l);let h;return h=t.textLayerMD5?n.storage.load(c.ImageBitmap,t.textLayerMD5,"png"):Promise.resolve(null),Promise.all([d,h]).then((e=>e[0]?(t.asset=e[0],e[1]&&(t.textLayerAsset=e[1]),f(t,n,s)):m(t,n))).catch((e=>(i.warn("Error loading costume: ",e),m(t,n))))},loadCostumeFromAsset:f}},function(e,t,n){const r=n(253),i=n(265),s=n(89),o=n(84),a=n(267),l=n(88),c=n(54),u=n(86);e.exports={BitmapAdapter:i,convertFonts:u,inlineSvgFonts:s,loadSvgString:o,sanitizeSvg:a,serializeSvgToString:l,SvgElement:c,SVGRenderer:r}},function(e,t,n){var r=n(37),i=r.TYPE,s=r.NAME,o=n(26).cmpStr,a=i.EOF,l=i.WhiteSpace,c=i.Comment,u=16777215,d=24,h=function(){this.offsetAndType=null,this.balance=null,this.reset()};h.prototype={reset:function(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset},lookupType:function(e){return(e+=this.tokenIndex)<this.tokenCount?this.offsetAndType[e]>>d:a},lookupOffset:function(e){return(e+=this.tokenIndex)<this.tokenCount?this.offsetAndType[e-1]&u:this.source.length},lookupValue:function(e,t){return(e+=this.tokenIndex)<this.tokenCount&&o(this.source,this.offsetAndType[e-1]&u,this.offsetAndType[e]&u,t)},getTokenStart:function(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&u:this.offsetAndType[this.tokenCount]&u:this.firstCharOffset},getRawLength:function(e,t){var n,r=e,i=this.offsetAndType[Math.max(r-1,0)]&u;e:for(;r<this.tokenCount&&!((n=this.balance[r])<e);r++)switch(t(this.offsetAndType[r]>>d,this.source,i)){case 1:break e;case 2:r++;break e;default:this.balance[n]===r&&(r=n),i=this.offsetAndType[r]&u}return r-this.tokenIndex},isBalanceEdge:function(e){return this.balance[this.tokenIndex]<e},isDelim:function(e,t){return t?this.lookupType(t)===i.Delim&&this.source.charCodeAt(this.lookupOffset(t))===e:this.tokenType===i.Delim&&this.source.charCodeAt(this.tokenStart)===e},getTokenValue:function(){return this.source.substring(this.tokenStart,this.tokenEnd)},getTokenLength:function(){return this.tokenEnd-this.tokenStart},substrToCursor:function(e){return this.source.substring(e,this.tokenStart)},skipWS:function(){for(var e=this.tokenIndex,t=0;e<this.tokenCount&&this.offsetAndType[e]>>d===l;e++,t++);t>0&&this.skip(t)},skipSC:function(){for(;this.tokenType===l||this.tokenType===c;)this.next()},skip:function(e){var t=this.tokenIndex+e;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.offsetAndType[t-1]&u,t=this.offsetAndType[t],this.tokenType=t>>d,this.tokenEnd=t&u):(this.tokenIndex=this.tokenCount,this.next())},next:function(){var e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>d,this.tokenEnd=e&u):(this.tokenIndex=this.tokenCount,this.eof=!0,this.tokenType=a,this.tokenStart=this.tokenEnd=this.source.length)},forEachToken(e){for(var t=0,n=this.firstCharOffset;t<this.tokenCount;t++){var r=n,i=this.offsetAndType[t],s=i&u;n=s,e(i>>d,r,s,t)}},dump(){var e=new Array(this.tokenCount);return this.forEachToken(((t,n,r,i)=>{e[i]={idx:i,type:s[t],chunk:this.source.substring(n,r),balance:this.balance[i]}})),e}},e.exports=h},function(e,t){var n={EOF:0,Ident:1,Function:2,AtKeyword:3,Hash:4,String:5,BadString:6,Url:7,BadUrl:8,Delim:9,Number:10,Percentage:11,Dimension:12,WhiteSpace:13,CDO:14,CDC:15,Colon:16,Semicolon:17,Comma:18,LeftSquareBracket:19,RightSquareBracket:20,LeftParenthesis:21,RightParenthesis:22,LeftCurlyBracket:23,RightCurlyBracket:24,Comment:25},r=Object.keys(n).reduce((function(e,t){return e[n[t]]=t,e}),{});e.exports={TYPE:n,NAME:r}},function(e,t){e.exports={ID_NONE:-1,Events:{UseHighQualityRenderChanged:"UseHighQualityRenderChanged",AllowPrivateSkinAccessChanged:"AllowPrivateSkinAccessChanged",NativeSizeChanged:"NativeSizeChanged"}}},function(e,t,n){const r=n(30);r.enable(),e.exports=r("scratch-audioengine")},function(module,exports,__webpack_require__){(function(process,global){var __WEBPACK_AMD_DEFINE_RESULT__;(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self,NODE_JS=!root.JS_MD5_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_MD5_NO_COMMON_JS&&"object"==typeof module&&module.exports,AMD=__webpack_require__(373),ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[128,32768,8388608,-2147483648],SHIFT=[0,8,16,24],OUTPUT_TYPES=["hex","array","digest","buffer","arrayBuffer","base64"],BASE64_ENCODE_CHAR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),blocks=[],buffer8;if(ARRAY_BUFFER){var buffer=new ArrayBuffer(68);buffer8=new Uint8Array(buffer),blocks=new Uint32Array(buffer)}!root.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!ARRAY_BUFFER||!root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e){return function(t){return new Md5(!0).update(t)[e]()}},createMethod=function(){var e=createOutputMethod("hex");NODE_JS&&(e=nodeWrap(e)),e.create=function(){return new Md5},e.update=function(t){return e.create().update(t)};for(var t=0;t<OUTPUT_TYPES.length;++t){var n=OUTPUT_TYPES[t];e[n]=createOutputMethod(n)}return e},nodeWrap=function(method){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),nodeMethod=function(e){if("string"==typeof e)return crypto.createHash("md5").update(e,"utf8").digest("hex");if(null==e)throw ERROR;return e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),Array.isArray(e)||ArrayBuffer.isView(e)||e.constructor===Buffer?crypto.createHash("md5").update(new Buffer(e)).digest("hex"):method(e)};return nodeMethod};function Md5(e){if(e)blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks,this.buffer8=buffer8;else if(ARRAY_BUFFER){var t=new ArrayBuffer(68);this.buffer8=new Uint8Array(t),this.blocks=new Uint32Array(t)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}Md5.prototype.update=function(e){if(!this.finalized){var t,n=typeof e;if("string"!==n){if("object"!==n)throw ERROR;if(null===e)throw ERROR;if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||ARRAY_BUFFER&&ArrayBuffer.isView(e)))throw ERROR;t=!0}for(var r,i,s=0,o=e.length,a=this.blocks,l=this.buffer8;s<o;){if(this.hashed&&(this.hashed=!1,a[0]=a[16],a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),t)if(ARRAY_BUFFER)for(i=this.start;s<o&&i<64;++s)l[i++]=e[s];else for(i=this.start;s<o&&i<64;++s)a[i>>2]|=e[s]<<SHIFT[3&i++];else if(ARRAY_BUFFER)for(i=this.start;s<o&&i<64;++s)(r=e.charCodeAt(s))<128?l[i++]=r:r<2048?(l[i++]=192|r>>6,l[i++]=128|63&r):r<55296||r>=57344?(l[i++]=224|r>>12,l[i++]=128|r>>6&63,l[i++]=128|63&r):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++s)),l[i++]=240|r>>18,l[i++]=128|r>>12&63,l[i++]=128|r>>6&63,l[i++]=128|63&r);else for(i=this.start;s<o&&i<64;++s)(r=e.charCodeAt(s))<128?a[i>>2]|=r<<SHIFT[3&i++]:r<2048?(a[i>>2]|=(192|r>>6)<<SHIFT[3&i++],a[i>>2]|=(128|63&r)<<SHIFT[3&i++]):r<55296||r>=57344?(a[i>>2]|=(224|r>>12)<<SHIFT[3&i++],a[i>>2]|=(128|r>>6&63)<<SHIFT[3&i++],a[i>>2]|=(128|63&r)<<SHIFT[3&i++]):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++s)),a[i>>2]|=(240|r>>18)<<SHIFT[3&i++],a[i>>2]|=(128|r>>12&63)<<SHIFT[3&i++],a[i>>2]|=(128|r>>6&63)<<SHIFT[3&i++],a[i>>2]|=(128|63&r)<<SHIFT[3&i++]);this.lastByteIndex=i,this.bytes+=i-this.start,i>=64?(this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[t>>2]|=EXTRA[3&t],t>=56&&(this.hashed||this.hash(),e[0]=e[16],e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.bytes<<3,e[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var e,t,n,r,i,s,o=this.blocks;this.first?t=((t=((e=((e=o[0]-680876937)<<7|e>>>25)-271733879|0)^(n=((n=(-271733879^(r=((r=(-1732584194^2004318071&e)+o[1]-117830708)<<12|r>>>20)+e|0)&(-271733879^e))+o[2]-1126478375)<<17|n>>>15)+r|0)&(r^e))+o[3]-1316259209)<<22|t>>>10)+n|0:(e=this.h0,t=this.h1,n=this.h2,t=((t+=((e=((e+=((r=this.h3)^t&(n^r))+o[0]-680876936)<<7|e>>>25)+t|0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+o[1]-389564586)<<12|r>>>20)+e|0)&(e^t))+o[2]+606105819)<<17|n>>>15)+r|0)&(r^e))+o[3]-1044525330)<<22|t>>>10)+n|0),t=((t+=((e=((e+=(r^t&(n^r))+o[4]-176418897)<<7|e>>>25)+t|0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+o[5]+1200080426)<<12|r>>>20)+e|0)&(e^t))+o[6]-1473231341)<<17|n>>>15)+r|0)&(r^e))+o[7]-45705983)<<22|t>>>10)+n|0,t=((t+=((e=((e+=(r^t&(n^r))+o[8]+1770035416)<<7|e>>>25)+t|0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+o[9]-1958414417)<<12|r>>>20)+e|0)&(e^t))+o[10]-42063)<<17|n>>>15)+r|0)&(r^e))+o[11]-1990404162)<<22|t>>>10)+n|0,t=((t+=((e=((e+=(r^t&(n^r))+o[12]+1804603682)<<7|e>>>25)+t|0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+o[13]-40341101)<<12|r>>>20)+e|0)&(e^t))+o[14]-1502002290)<<17|n>>>15)+r|0)&(r^e))+o[15]+1236535329)<<22|t>>>10)+n|0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+o[1]-165796510)<<5|e>>>27)+t|0)^t))+o[6]-1069501632)<<9|r>>>23)+e|0)^e&((n=((n+=(e^t&(r^e))+o[11]+643717713)<<14|n>>>18)+r|0)^r))+o[0]-373897302)<<20|t>>>12)+n|0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+o[5]-701558691)<<5|e>>>27)+t|0)^t))+o[10]+38016083)<<9|r>>>23)+e|0)^e&((n=((n+=(e^t&(r^e))+o[15]-660478335)<<14|n>>>18)+r|0)^r))+o[4]-405537848)<<20|t>>>12)+n|0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+o[9]+568446438)<<5|e>>>27)+t|0)^t))+o[14]-1019803690)<<9|r>>>23)+e|0)^e&((n=((n+=(e^t&(r^e))+o[3]-187363961)<<14|n>>>18)+r|0)^r))+o[8]+1163531501)<<20|t>>>12)+n|0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+o[13]-1444681467)<<5|e>>>27)+t|0)^t))+o[2]-51403784)<<9|r>>>23)+e|0)^e&((n=((n+=(e^t&(r^e))+o[7]+1735328473)<<14|n>>>18)+r|0)^r))+o[12]-1926607734)<<20|t>>>12)+n|0,t=((t+=((s=(r=((r+=((i=t^n)^(e=((e+=(i^r)+o[5]-378558)<<4|e>>>28)+t|0))+o[8]-2022574463)<<11|r>>>21)+e|0)^e)^(n=((n+=(s^t)+o[11]+1839030562)<<16|n>>>16)+r|0))+o[14]-35309556)<<23|t>>>9)+n|0,t=((t+=((s=(r=((r+=((i=t^n)^(e=((e+=(i^r)+o[1]-1530992060)<<4|e>>>28)+t|0))+o[4]+1272893353)<<11|r>>>21)+e|0)^e)^(n=((n+=(s^t)+o[7]-155497632)<<16|n>>>16)+r|0))+o[10]-1094730640)<<23|t>>>9)+n|0,t=((t+=((s=(r=((r+=((i=t^n)^(e=((e+=(i^r)+o[13]+681279174)<<4|e>>>28)+t|0))+o[0]-358537222)<<11|r>>>21)+e|0)^e)^(n=((n+=(s^t)+o[3]-722521979)<<16|n>>>16)+r|0))+o[6]+76029189)<<23|t>>>9)+n|0,t=((t+=((s=(r=((r+=((i=t^n)^(e=((e+=(i^r)+o[9]-640364487)<<4|e>>>28)+t|0))+o[12]-421815835)<<11|r>>>21)+e|0)^e)^(n=((n+=(s^t)+o[15]+530742520)<<16|n>>>16)+r|0))+o[2]-995338651)<<23|t>>>9)+n|0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+o[0]-198630844)<<6|e>>>26)+t|0)|~n))+o[7]+1126891415)<<10|r>>>22)+e|0)^((n=((n+=(e^(r|~t))+o[14]-1416354905)<<15|n>>>17)+r|0)|~e))+o[5]-57434055)<<21|t>>>11)+n|0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+o[12]+1700485571)<<6|e>>>26)+t|0)|~n))+o[3]-1894986606)<<10|r>>>22)+e|0)^((n=((n+=(e^(r|~t))+o[10]-1051523)<<15|n>>>17)+r|0)|~e))+o[1]-2054922799)<<21|t>>>11)+n|0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+o[8]+1873313359)<<6|e>>>26)+t|0)|~n))+o[15]-30611744)<<10|r>>>22)+e|0)^((n=((n+=(e^(r|~t))+o[6]-1560198380)<<15|n>>>17)+r|0)|~e))+o[13]+1309151649)<<21|t>>>11)+n|0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+o[4]-145523070)<<6|e>>>26)+t|0)|~n))+o[11]-1120210379)<<10|r>>>22)+e|0)^((n=((n+=(e^(r|~t))+o[2]+718787259)<<15|n>>>17)+r|0)|~e))+o[9]-343485551)<<21|t>>>11)+n|0,this.first?(this.h0=e+1732584193|0,this.h1=t-271733879|0,this.h2=n-1732584194|0,this.h3=r+271733878|0,this.first=!1):(this.h0=this.h0+e|0,this.h1=this.h1+t|0,this.h2=this.h2+n|0,this.h3=this.h3+r|0)},Md5.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3;return HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3;return[255&e,e>>8&255,e>>16&255,e>>24&255,255&t,t>>8&255,t>>16&255,t>>24&255,255&n,n>>8&255,n>>16&255,n>>24&255,255&r,r>>8&255,r>>16&255,r>>24&255]},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(16),t=new Uint32Array(e);return t[0]=this.h0,t[1]=this.h1,t[2]=this.h2,t[3]=this.h3,e},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var e,t,n,r="",i=this.array(),s=0;s<15;)e=i[s++],t=i[s++],n=i[s++],r+=BASE64_ENCODE_CHAR[e>>>2]+BASE64_ENCODE_CHAR[63&(e<<4|t>>>4)]+BASE64_ENCODE_CHAR[63&(t<<2|n>>>6)]+BASE64_ENCODE_CHAR[63&n];return e=i[s],r+=BASE64_ENCODE_CHAR[e>>>2]+BASE64_ENCODE_CHAR[e<<4&63]+"=="};var exports=createMethod();COMMON_JS?module.exports=exports:(root.md5=exports,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()}).call(this,__webpack_require__(41),__webpack_require__(9))},function(e,t){var n,r,i=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(e){n=s}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var l,c=[],u=!1,d=-1;function h(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&p())}function p(){if(!u){var e=a(h);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function f(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new m(e,t)),1!==c.length||u||a(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=f,i.addListener=f,i.once=f,i.off=f,i.removeListener=f,i.removeAllListeners=f,i.emit=f,i.prependListener=f,i.prependOnceListener=f,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t){e.exports={SPRITE:"sprite",STAGE:"stage"}},function(e,t,n){const r=n(14);e.exports=class{constructor(e){this._maxTokens=e,this._refillInterval=1e3/e,this._count=this._maxTokens,this._timer=new r,this._timer.start(),this._lastUpdateTime=this._timer.timeElapsed()}okayToSend(){const e=this._timer.timeElapsed(),t=e-this._lastUpdateTime,n=Math.floor(t/this._refillInterval);return n>0&&(this._lastUpdateTime=e),this._count=Math.min(this._maxTokens,this._count+n),this._count>0&&(this._count--,!0)}}},function(e,t,n){(function(t){let n=t.fetch;e.exports={fetchWithTimeout:(e,t,r)=>{let i=null;const s=window.AbortController?new window.AbortController:null,o=s?s.signal:null;return Promise.race([n(e,Object.assign({signal:o},t)).then((e=>(clearTimeout(i),e)),(e=>{throw clearTimeout(i),e})),new Promise(((e,t)=>{i=setTimeout((()=>{s&&s.abort(),t(new Error("Fetch timed out after ".concat(r," ms")))}),r)}))])},setFetch:e=>{n=e}}}).call(this,n(9))},function(e,t,n){function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){var r;return(t="symbol"==typeof(r=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const s=n(19),{OrderedMap:o}=n(24),a=n(72),l=n(415),c=n(4),u=n(16),d=n(76),h=n(3),p=n(206),m=n(207),f=n(50),g=n(49),y=n(213),b=n(42),v=n(25),S=n(1),w=n(66),k=n(13),T=n(10),x=n(32),E=n(214),A=n(215),C=n(44),I=n(217),O=n(218),M=n(219),N=n(220),R=n(221),D=n(222),P=n(223),L=n(80),B=n(7),z=n(8),U={scratch3_control:n(224),scratch3_event:n(225),scratch3_looks:n(226),scratch3_motion:n(227),scratch3_operators:n(228),scratch3_sound:n(229),scratch3_sensing:n(230),scratch3_data:n(231),scratch3_procedures:n(232)},j=n(233),F=n(234),W=["#0FBD8C","#0DA57A","#0B8E69"],V=" // _twconfig_",G=(()=>{const e={};return e[c.ANGLE]={shadow:{type:"math_angle",fieldName:"NUM"}},e[c.COLOR]={shadow:{type:"colour_picker",fieldName:"COLOUR"}},e[c.NUMBER]={shadow:{type:"math_number",fieldName:"NUM"}},e[c.STRING]={shadow:{type:"text",fieldName:"TEXT"}},e[c.BOOLEAN]={check:"Boolean"},e[c.MATRIX]={shadow:{type:"matrix",fieldName:"MATRIX"}},e[c.NOTE]={shadow:{type:"note",fieldName:"NOTE"}},e[c.IMAGE]={fieldType:"field_image"},e[c.COSTUME]={shadow:{type:"looks_costume",fieldName:"COSTUME"}},e[c.SOUND]={shadow:{type:"sound_sounds_menu",fieldName:"SOUND_MENU"}},e})(),q=e=>{let t=0;return{canAddCloudVariable:()=>t<e.limit,addCloudVariable:()=>{t++},removeCloudVariable:()=>{t--},hasCloudVariables:()=>t>0,getNumberOfCloudVariables:()=>t}};let Y=-1,H=-1,_=-1;class K extends s{constructor(){super(),this.targets=[],this.executableTargets=[],this.threads=[],this.threadMap=new Map,this.sequencer=new m(this),this.flyoutBlocks=new u(this,!0),this.monitorBlocks=new u(this,!0),this._editingTarget=null,this._primitives={},this._blockInfo=[],this._hats={},this._flowing={},this._scriptGlowsPreviousFrame=[],this._nonMonitorThreadCount=0,this._lastStepDoneThreads=null,this._cloneCounter=0,this._refreshTargets=!1,this.monitorBlockInfo={},this._monitorState=o({}),this._prevMonitorState=o({}),this.turboMode=!1,this.frameLoop=new F(this),this.currentStepTime=1e3/30,this.updateCurrentMSecs(),this.redrawRequested=!1,this._registerBlockPackages(),this.ioDevices={clock:new O(this),cloud:new M(this),keyboard:new N(this),mouse:new R(this),mouseWheel:new D(this),userData:new P,video:new L(this)},this.peripheralExtensions={},this.profiler=null,this.cloudOptions={limit:10};const e=q(this.cloudOptions);this.hasCloudData=e.hasCloudVariables,this.canAddCloudVariable=e.canAddCloudVariable,this.getNumberOfCloudVariables=e.getNumberOfCloudVariables,this.addCloudVariable=this._initializeAddCloudVariable(e),this.removeCloudVariable=this._initializeRemoveCloudVariable(e),this.origin=null,this.platform=Object.assign({},I),this._initScratchLink(),this.resetRunId(),this._stageTarget=null,this.addonBlocks={},this.stageWidth=K.STAGE_WIDTH,this.stageHeight=K.STAGE_HEIGHT,this.runtimeOptions={maxClones:K.MAX_CLONES,miscLimits:!0,fencing:!0},this.compilerOptions={enabled:!0,warpTimer:!1},this.debug=!1,this._lastStepTime=Date.now(),this.interpolationEnabled=!1,this._defaultStoredSettings=this._generateAllProjectOptions(),this.isPackaged=!1,this.externalCommunicationMethods={cloudVariables:!1,customExtensions:!1},this.on(K.HAS_CLOUD_DATA_UPDATE,(e=>{this.setExternalCommunicationMethod("cloudVariables",e)})),this.enforcePrivacy=!0,this.extensionButtons=new Map,this.fontManager=new A(this),this.extensionStorage={},this.totalAssetRequests=0,this.finishedAssetRequests=0}static get STAGE_WIDTH(){return 480}static get STAGE_HEIGHT(){return 360}static get SCRIPT_GLOW_ON(){return"SCRIPT_GLOW_ON"}static get SCRIPT_GLOW_OFF(){return"SCRIPT_GLOW_OFF"}static get BLOCK_GLOW_ON(){return"BLOCK_GLOW_ON"}static get BLOCK_GLOW_OFF(){return"BLOCK_GLOW_OFF"}static get HAS_CLOUD_DATA_UPDATE(){return"HAS_CLOUD_DATA_UPDATE"}static get TURBO_MODE_ON(){return"TURBO_MODE_ON"}static get TURBO_MODE_OFF(){return"TURBO_MODE_OFF"}static get RUNTIME_OPTIONS_CHANGED(){return"RUNTIME_OPTIONS_CHANGED"}static get COMPILER_OPTIONS_CHANGED(){return"COMPILER_OPTIONS_CHANGED"}static get FRAMERATE_CHANGED(){return"FRAMERATE_CHANGED"}static get INTERPOLATION_CHANGED(){return"INTERPOLATION_CHANGED"}static get STAGE_SIZE_CHANGED(){return"STAGE_SIZE_CHANGED"}static get COMPILE_ERROR(){return"COMPILE_ERROR"}static get BEFORE_EXECUTE(){return"BEFORE_EXECUTE"}static get AFTER_EXECUTE(){return"AFTER_EXECUTE"}static get ASSET_PROGRESS(){return"ASSET_PROGRESS"}static get PROJECT_START(){return"PROJECT_START"}static get PROJECT_RUN_START(){return"PROJECT_RUN_START"}static get PROJECT_RUN_STOP(){return"PROJECT_RUN_STOP"}static get PROJECT_STOP_ALL(){return"PROJECT_STOP_ALL"}static get STOP_FOR_TARGET(){return"STOP_FOR_TARGET"}static get VISUAL_REPORT(){return"VISUAL_REPORT"}static get PROJECT_LOADED(){return"PROJECT_LOADED"}static get PROJECT_CHANGED(){return"PROJECT_CHANGED"}static get TOOLBOX_EXTENSIONS_NEED_UPDATE(){return"TOOLBOX_EXTENSIONS_NEED_UPDATE"}static get TARGETS_UPDATE(){return"TARGETS_UPDATE"}static get MONITORS_UPDATE(){return"MONITORS_UPDATE"}static get BLOCK_DRAG_UPDATE(){return"BLOCK_DRAG_UPDATE"}static get BLOCK_DRAG_END(){return"BLOCK_DRAG_END"}static get EXTENSION_ADDED(){return"EXTENSION_ADDED"}static get EXTENSION_FIELD_ADDED(){return"EXTENSION_FIELD_ADDED"}static get PERIPHERAL_LIST_UPDATE(){return"PERIPHERAL_LIST_UPDATE"}static get USER_PICKED_PERIPHERAL(){return"USER_PICKED_PERIPHERAL"}static get PERIPHERAL_CONNECTED(){return"PERIPHERAL_CONNECTED"}static get PERIPHERAL_DISCONNECTED(){return"PERIPHERAL_DISCONNECTED"}static get PERIPHERAL_REQUEST_ERROR(){return"PERIPHERAL_REQUEST_ERROR"}static get PERIPHERAL_CONNECTION_LOST_ERROR(){return"PERIPHERAL_CONNECTION_LOST_ERROR"}static get PERIPHERAL_SCAN_TIMEOUT(){return"PERIPHERAL_SCAN_TIMEOUT"}static get MIC_LISTENING(){return"MIC_LISTENING"}static get BLOCKSINFO_UPDATE(){return"BLOCKSINFO_UPDATE"}static get RUNTIME_STARTED(){return"RUNTIME_STARTED"}static get RUNTIME_STOPPED(){return"RUNTIME_STOPPED"}static get RUNTIME_DISPOSED(){return"RUNTIME_DISPOSED"}static get BLOCKS_NEED_UPDATE(){return"BLOCKS_NEED_UPDATE"}static get PLATFORM_MISMATCH(){return"PLATFORM_MISMATCH"}static get THREAD_STEP_INTERVAL(){return 1e3/60}static get THREAD_STEP_INTERVAL_COMPATIBILITY(){return 1e3/30}static get MAX_CLONES(){return 300}_initializeAddCloudVariable(e){return()=>{const t=this.hasCloudData();e.addCloudVariable(),!t&&this.hasCloudData()&&this.emit(K.HAS_CLOUD_DATA_UPDATE,!0)}}_initializeRemoveCloudVariable(e){return()=>{const t=this.hasCloudData();e.removeCloudVariable(),t&&!this.hasCloudData()&&this.emit(K.HAS_CLOUD_DATA_UPDATE,!1)}}_registerBlockPackages(){for(const e in U)if(Object.prototype.hasOwnProperty.call(U,e)){const t=new U[e](this);if(t.getPrimitives){const e=t.getPrimitives();for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(this._primitives[n]=e[n].bind(t))}if(t.getHats){const e=t.getHats();for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this._hats[t]=e[t])}t.getMonitored&&(this.monitorBlockInfo=Object.assign({},this.monitorBlockInfo,t.getMonitored())),this.compilerRegisterExtension(e,t)}}compilerRegisterExtension(e,t){this["ext_".concat(e)]=t}getMonitorState(){return this._monitorState}_makeExtensionMenuId(e,t){return"".concat(t,"_menu_").concat(e)}makeMessageContextForTarget(e){const t={};(e=e||this.getEditingTarget()||this.getTargetForStage())&&(t.targetType=e.isStage?b.STAGE:b.SPRITE)}_registerExtensionPrimitives(e){const t={id:e.id,name:w(e.name),showStatusButton:e.showStatusButton,blockIconURI:e.blockIconURI,menuIconURI:e.menuIconURI};e.color1?(t.color1=e.color1,t.color2=e.color2,t.color3=e.color3):(t.color1=W[0],t.color2=W[1],t.color3=W[2]),this._blockInfo.push(t),this._fillExtensionCategory(t,e);for(const n in t.customFieldTypes)if(Object.prototype.hasOwnProperty.call(e.customFieldTypes,n)){const e=t.customFieldTypes[n];this.emit(K.EXTENSION_FIELD_ADDED,{name:"field_".concat(e.extendedName),implementation:e.fieldImplementation})}this.emit(K.EXTENSION_ADDED,t)}_refreshExtensionPrimitives(e){const t=this._blockInfo.find((t=>t.id===e.id));t&&(t.name=w(e.name),this._fillExtensionCategory(t,e),this.emit(K.BLOCKSINFO_UPDATE,t))}_fillExtensionCategory(e,t){e.blocks=[],e.customFieldTypes={},e.menus=[],e.menuInfo={};for(const n in t.menus)if(Object.prototype.hasOwnProperty.call(t.menus,n)){const r=t.menus[n],i=this._buildMenuForScratchBlocks(n,r,e);e.menus.push(i),e.menuInfo[n]=r}for(const n in t.customFieldTypes)if(Object.prototype.hasOwnProperty.call(t.customFieldTypes,n)){const r=t.customFieldTypes[n],i=this._buildCustomFieldInfo(n,r,t.id,e);e.customFieldTypes[n]=i}if(t.docsURI){const n={info:{},xml:"<button "+'text="'.concat(x(w({id:"tw.blocks.openDocs",default:"Open Documentation",description:"Button that opens site with more documentation about an extension"})),'" ')+'callbackKey="OPEN_EXTENSION_DOCS" '+'callbackData="'.concat(x(t.docsURI),'"></button>')};e.blocks.push(n)}for(const n of t.blocks)try{const t=this._convertForScratchBlocks(n,e);if(e.blocks.push(t),t.json){const e=t.json.type;n.blockType!==h.EVENT&&(this._primitives[e]=t.info.func),n.blockType===h.EVENT||n.blockType===h.HAT?this._hats[e]={edgeActivated:n.isEdgeActivated,restartExistingThreads:n.shouldRestartExistingThreads}:n.blockType===h.CONDITIONAL?this._flowing[e]={conditional:!0,loop:!1}:n.blockType===h.LOOP&&(this._flowing[e]={conditional:!1,loop:!0})}}catch(e){S.error("Error parsing block: ",{block:n,error:e})}}_convertMenuItems(e){if("function"!=typeof e){const t=this.makeMessageContextForTarget();return e.map((e=>{const n=w(e,t);switch(typeof n){case"string":return[n,n];case"object":return[w(e.text,t),e.value];default:throw new Error("Can't interpret menu item: ".concat(JSON.stringify(e)))}}))}return e}_buildMenuForScratchBlocks(e,t,n){const r=this._makeExtensionMenuId(e,n.id),i=this._convertMenuItems(t.items);return{json:{message0:"%1",type:r,inputsInline:!0,output:"String",colour:n.color1,colourSecondary:n.color2,colourTertiary:n.color3,outputShape:t.acceptReporters?y.OUTPUT_SHAPE_ROUND:y.OUTPUT_SHAPE_SQUARE,args0:[{type:"field_dropdown",name:e,options:i}]}}}_buildCustomFieldInfo(e,t,n,r){const i="".concat(n,"_").concat(e);return{fieldName:e,extendedName:i,argumentTypeInfo:{shadow:{type:i,fieldName:"field_".concat(i)}},scratchBlocksDefinition:this._buildCustomFieldTypeForScratchBlocks(i,t.output,t.outputShape,r),fieldImplementation:t.implementation}}_buildCustomFieldTypeForScratchBlocks(e,t,n,r){return{json:{type:e,message0:"%1",inputsInline:!0,output:t,colour:r.color1,colourSecondary:r.color2,colourTertiary:r.color3,outputShape:n,args0:[{name:"field_".concat(e),type:"field_".concat(e)}]}}}_convertForScratchBlocks(e,t){return"---"===e?this._convertSeparatorForScratchBlocks(e):e.blockType===h.LABEL?this._convertLabelForScratchBlocks(e):e.blockType===h.BUTTON?this._convertButtonForScratchBlocks(e,t):e.blockType===h.XML?this._convertXmlForScratchBlocks(e):this._convertBlockForScratchBlocks(e,t)}_convertBlockForScratchBlocks(e,t){var n,r,i;const s="".concat(t.id,"_").concat(e.opcode),o={type:s,inputsInline:!0,category:t.name,extensions:[],colour:null!==(n=e.color1)&&void 0!==n?n:t.color1,colourSecondary:null!==(r=e.color2)&&void 0!==r?r:t.color2,colourTertiary:null!==(i=e.color3)&&void 0!==i?i:t.color3},a={argsMap:{},blockJSON:o,categoryInfo:t,blockInfo:e,inputList:[]},l=e.blockIconURI||t.blockIconURI;if(o.extensions.push("from_extension"),o.colour===W[0]&&o.colourSecondary===W[1]&&o.colourTertiary===W[2]&&o.extensions.push("default_extension_colors"),l){o.extensions.push("scratch_extension"),o.message0="%1 %2";const e={type:"field_image",src:l,width:40,height:40},t={type:"field_vertical_separator"};o.args0=[e,t]}switch(e.blockType){case h.COMMAND:o.outputShape=y.OUTPUT_SHAPE_SQUARE,o.previousStatement=null,e.isTerminal||(o.nextStatement=null);break;case h.REPORTER:o.output=e.allowDropAnywhere?null:"String",o.outputShape=y.OUTPUT_SHAPE_ROUND;break;case h.BOOLEAN:o.output="Boolean",o.outputShape=y.OUTPUT_SHAPE_HEXAGONAL;break;case h.HAT:case h.EVENT:Object.prototype.hasOwnProperty.call(e,"isEdgeActivated")||(e.isEdgeActivated=!0),o.outputShape=y.OUTPUT_SHAPE_SQUARE,o.nextStatement=null;break;case h.CONDITIONAL:case h.LOOP:e.branchCount=e.branchCount||1,o.outputShape=y.OUTPUT_SHAPE_SQUARE,o.previousStatement=null,e.isTerminal||(o.nextStatement=null)}const c=Array.isArray(e.text)?e.text:[e.text];let u=0,d=0,p=0;const m=this._convertPlaceholders.bind(this,a),f=this.makeMessageContextForTarget();for(;u<c.length||d<e.branchCount;){if(u<c.length){a.outLineNum=p;const e=w(c[u],f).replace(/\[(.+?)]/g,m);o["message".concat(p)]?o["message".concat(p)]+=e:o["message".concat(p)]=e,++u,++p}d<e.branchCount&&(o["message".concat(p)]="%1",o["args".concat(p)]=[{type:"input_statement",name:"SUBSTACK".concat(d>0?d+1:"")}],++d,++p)}if(e.blockType===h.REPORTER||e.blockType===h.BOOLEAN)e.disableMonitor||0!==a.inputList.length||(o.checkboxInFlyout=!0);else if(e.branchIconURI||e.blockType===h.LOOP&&!Object.prototype.hasOwnProperty.call(e,"branchIconURI")){var g;o["lastDummyAlign".concat(p)]="RIGHT",o["message".concat(p)]="%1",o["args".concat(p)]=[{type:"field_image",src:null!==(g=e.branchIconURI)&&void 0!==g?g:"media://repeat.svg",width:24,height:24,alt:"*",flip_rtl:!0}],++p}const b=e.isDynamic?'<mutation blockInfo="'.concat(x(JSON.stringify(e)),'"/>'):"",v=a.inputList.join(""),S='<block type="'.concat(x(s),'">').concat(b).concat(v,"</block>");if(e.extensions)for(const t of e.extensions)o.extensions.includes(t)||o.extensions.push(t);return{info:a.blockInfo,json:a.blockJSON,xml:S}}_convertSeparatorForScratchBlocks(e){return{info:e,xml:'<sep gap="36"/>'}}_convertLabelForScratchBlocks(e){return{info:e,xml:'<label text="'.concat(x(e.text),'"></label>')}}_convertButtonForScratchBlocks(e,t){const n=this.makeMessageContextForTarget(),r=w(e.text,n);if(["MAKE_A_LIST","MAKE_A_PROCEDURE","MAKE_A_VARIABLE"].includes(e.func))return{info:e,xml:'<button text="'.concat(x(r),'" callbackKey="').concat(x(e.func),'"></button>')};const i="".concat(t.id,"_").concat(e.func);return this.extensionButtons.set(i,e.callFunc),{info:e,xml:'<button text="'.concat(x(r),'"')+' callbackKey="EXTENSION_CALLBACK"'+' callbackData="'.concat(x(i),'"></button>')}}_convertXmlForScratchBlocks(e){return{info:e,xml:e.xml}}handleExtensionButtonPress(e){this.extensionButtons.get(e)()}_constructInlineImageJson(e){return e.dataURI||S.warn("Missing data URI in extension block with argument type IMAGE"),{type:"field_image",src:e.dataURI||"",width:24,height:24,flip_rtl:e.flipRTL||!1}}_convertPlaceholders(e,t,n){const r=e.blockInfo.arguments[n]||{};let i,s=G[r.type]||{};if(!G[r.type]&&e.categoryInfo.customFieldTypes[r.type]&&(s=e.categoryInfo.customFieldTypes[r.type].argumentTypeInfo),"field_image"===s.fieldType)i=this._constructInlineImageJson(r);else{i={type:"input_value",name:n};const t=void 0===r.defaultValue?null:w(r.defaultValue,this.makeMessageContextForTarget()).toString();let o,a,l;if(s.check&&(i.check=s.check),r.menu){const t=e.categoryInfo.menuInfo[r.menu];t.acceptReporters?(o=n,a=this._makeExtensionMenuId(r.menu,e.categoryInfo.id),l=r.menu):(i.type="field_dropdown",i.options=this._convertMenuItems(t.items),o=null,a=null,l=n)}else o=n,a=s.shadow&&s.shadow.type||null,l=s.shadow&&s.shadow.fieldName||null;o&&e.inputList.push('<value name="'.concat(x(n),'">')),a&&e.inputList.push('<shadow type="'.concat(x(a),'">')),null!==t&&l&&e.inputList.push('<field name="'.concat(x(l),'">').concat(x(t),"</field>")),a&&e.inputList.push("</shadow>"),o&&e.inputList.push("</value>")}const o="args".concat(e.outLineNum),a=e.blockJSON[o]=e.blockJSON[o]||[];i&&a.push(i);const l=a.length;return e.argsMap[n]=l,"%".concat(l)}getBlocksXML(e){return this._blockInfo.map((t=>{const{name:n,color1:r,color2:i}=t,s=t.blocks.filter((t=>{let n=!0;return e&&t.info.filter&&(n=t.info.filter.includes(e.isStage?b.STAGE:b.SPRITE)),n&&!t.info.hideFromPalette})),o='colour="'.concat(x(r),'" secondaryColour="').concat(x(i),'"');let a="";t.menuIconURI?a=t.menuIconURI:t.blockIconURI&&(a=t.blockIconURI);const l=a?'iconURI="'.concat(x(a),'"'):"";let c="";t.showStatusButton&&(c='showStatusButton="true"');let u='<category name="'.concat(x(n),'"');return u+=' id="'.concat(x(t.id),'"'),u+=" ".concat(c),u+=" ".concat(o),u+=" ".concat(l,">"),u+=s.map((e=>e.xml)).join(""),u+="</category>",{id:t.id,xml:u}}))}getBlocksJSON(){return this._blockInfo.reduce(((e,t)=>e.concat(t.blocks.map((e=>e.json)))),[])}_initScratchLink(){if("undefined"!=typeof self&&"undefined"!=typeof document&&document.getElementById&&self.origin&&"null"!==self.origin&&self.navigator&&self.navigator.userAgent&&!self.navigator.userAgent.includes("Node.js")&&!self.navigator.userAgent.includes("jsdom")){if(!document.getElementById("scratch-link-extension-script")){const e=document.createElement("script");e.id="scratch-link-extension-script",document.body.appendChild(e),self.postMessage("inject-scratch-link-script",self.origin)}}}getScratchLinkSocket(e){return(this._linkSocketFactory||this._defaultScratchLinkSocketFactory)(e)}configureScratchLinkSocketFactory(e){this._linkSocketFactory=e}_defaultScratchLinkSocketFactory(e){const t=self.Scratch,n=t&&t.ScratchLinkSafariSocket;return n&&n.isSafariHelperCompatible()?new n(e):new E(e)}registerPeripheralExtension(e,t){this.peripheralExtensions[e]=t}scanForPeripheral(e){this.peripheralExtensions[e]&&this.peripheralExtensions[e].scan()}connectPeripheral(e,t){this.peripheralExtensions[e]&&this.peripheralExtensions[e].connect(t)}disconnectPeripheral(e){this.peripheralExtensions[e]&&this.peripheralExtensions[e].disconnect()}getPeripheralIsConnected(e){let t=!1;return this.peripheralExtensions[e]&&(t=this.peripheralExtensions[e].isConnected()),t}emitMicListening(e){this.emit(K.MIC_LISTENING,e)}getOpcodeFunction(e){return this._primitives[e]}getIsHat(e){return Object.prototype.hasOwnProperty.call(this._hats,e)}getIsEdgeActivatedHat(e){return Object.prototype.hasOwnProperty.call(this._hats,e)&&this._hats[e].edgeActivated}attachAudioEngine(e){this.audioEngine=e}attachRenderer(e){this.renderer=e,this.renderer.setLayerGroupOrdering(k.LAYER_GROUPS),this.renderer.offscreenTouching=!this.runtimeOptions.fencing,this.updatePrivacy()}attachV2BitmapAdapter(e){this.v2BitmapAdapter=e}attachStorage(e){if(this.storage=e,this.isPackaged){const t=e.createAsset;let n=0;e.createAsset=function(e,r,i,s,o){return s||(s=(++n).toString()),t.call(this,e,r,i,s,!1)}}C.setFetch(e.scratchFetch.scratchFetch),this.resetRunId()}_pushThread(e,t,n){const r=new v(e);return r.target=t,r.stackClick=Boolean(n&&n.stackClick),r.updateMonitor=Boolean(n&&n.updateMonitor),r.blockContainer=r.updateMonitor?this.monitorBlocks:t.blocks,r.pushStack(e),this.threads.push(r),r.stackClick||r.updateMonitor||this.threadMap.set(r.getId(),r),n&&n.updateMonitor||!this.compilerOptions.enabled||r.tryCompile(),r}_stopThread(e){e.isKilled=!0,this.sequencer.retireThread(e)}_restartThread(e){const t=new v(e.topBlock);t.target=e.target,t.stackClick=e.stackClick,t.updateMonitor=e.updateMonitor,t.blockContainer=e.blockContainer,t.pushStack(e.topBlock),e.triedToCompile&&this.compilerOptions.enabled&&t.tryCompile(),t.stackClick||t.updateMonitor||this.threadMap.set(t.getId(),t);const n=this.threads.indexOf(e);return n>-1?(this.threads[n]=t,t):(this.threads.push(e),e)}emitCompileError(e,t){this.emit(K.COMPILE_ERROR,e,t)}isActiveThread(e){return e.stack.length>0&&e.status!==v.STATUS_DONE&&this.threads.indexOf(e)>-1}isWaitingThread(e){return e.status===v.STATUS_PROMISE_WAIT||e.status===v.STATUS_YIELD_TICK||!this.isActiveThread(e)}toggleScript(e,t){t=Object.assign({target:this._editingTarget,stackClick:!1},t);for(let n=0;n<this.threads.length;n++)if(this.threads[n].topBlock===e&&this.threads[n].status!==v.STATUS_DONE){const r=t.target.blocks,i=r.getOpcode(r.getBlock(e));if(this.getIsEdgeActivatedHat(i)&&this.threads[n].stackClick!==t.stackClick)continue;return void this._stopThread(this.threads[n])}this._pushThread(e,t.target,t)}addMonitorScript(e,t){t||(t=this._editingTarget);for(let t=0;t<this.threads.length;t++)if(this.threads[t].topBlock===e&&this.threads[t].status!==v.STATUS_DONE&&this.threads[t].updateMonitor)return;this._pushThread(e,t,{updateMonitor:!0})}allScriptsDo(e,t){let n=this.executableTargets;t&&(n=[t]);for(let t=n.length-1;t>=0;t--){const r=n[t],i=r.blocks.getScripts();for(let t=0;t<i.length;t++){e(i[t],r)}}}allScriptsByOpcodeDo(e,t,n){let r=this.executableTargets;n&&(r=[n]);for(let n=r.length-1;n>=0;n--){const i=r[n],s=d.getScripts(i.blocks,e);for(let e=0;e<s.length;e++)t(s[e],i)}}startHats(e,t,n){if(!Object.prototype.hasOwnProperty.call(this._hats,e))return;const r=[],i=this._hats[e];for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e]=t[e].toUpperCase());const s=this.threads.length;return this.allScriptsByOpcodeDo(e,((e,n)=>{const{blockId:o,fieldsOfInputs:a}=e;for(const e in t)if(a[e].value!==t[e])return;if(i.restartExistingThreads){const e=this.threadMap.get(v.getIdFromTargetAndBlock(n,o));if(e)return void r.push(this._restartThread(e))}else for(let e=0;e<s;e++)if(this.threads[e].target===n&&this.threads[e].topBlock===o&&!this.threads[e].stackClick&&this.threads[e].status!==v.STATUS_DONE)return;r.push(this._pushThread(o,n))}),n),r.forEach((e=>{e.isCompiled?e.executableHat&&(g.saveGlobalState(),g(e),g.restoreGlobalState()):(f(this.sequencer,e),e.goToNextBlock())})),r}dispose(){this.stopAll(),this.targets.forEach((e=>{e.isOriginal&&e.deleteMonitors()})),this.targets.map(this.disposeTarget,this),this.extensionStorage={};const e=o({});e.equals(this._monitorState)||(this._monitorState=e,this.emit(K.MONITORS_UPDATE,this._monitorState)),this.emit(K.RUNTIME_DISPOSED),this.ioDevices.clock.resetProjectTimer(),this.fontManager.clear(),this.hasCloudData()&&this.emit(K.HAS_CLOUD_DATA_UPDATE,!1),this.ioDevices.cloud.clear();const t=q(this.cloudOptions);this.hasCloudData=t.hasCloudVariables,this.canAddCloudVariable=t.canAddCloudVariable,this.getNumberOfCloudVariables=t.getNumberOfCloudVariables,this.addCloudVariable=this._initializeAddCloudVariable(t),this.removeCloudVariable=this._initializeRemoveCloudVariable(t),this.resetProgress()}addTarget(e){this.targets.push(e),this.executableTargets.push(e),e.isStage&&!this._stageTarget&&(this._stageTarget=e)}moveExecutable(e,t){const n=this.executableTargets.indexOf(e);this.executableTargets.splice(n,1);let r=n+t;return r>this.executableTargets.length&&(r=this.executableTargets.length),r<=0&&(r=this.executableTargets.length>0&&this.executableTargets[0].isStage?1:0),this.executableTargets.splice(r,0,e),r}setExecutablePosition(e,t){const n=this.executableTargets.indexOf(e);return this.moveExecutable(e,t-n)}removeExecutable(e){const t=this.executableTargets.indexOf(e);t>-1&&this.executableTargets.splice(t,1)}disposeTarget(e){this.targets=this.targets.filter((t=>e!==t||(t.dispose(),!1))),this._stageTarget===e&&(this._stageTarget=null)}stopForTarget(e,t){this.emit(K.STOP_FOR_TARGET,e,t);for(let n=0;n<this.threads.length;n++)this.threads[n]!==t&&this.threads[n].target===e&&this._stopThread(this.threads[n])}resetRunId(){if(!this.storage)return;const e=l.v1();this.storage.scratchFetch.setMetadata(this.storage.scratchFetch.RequestMetadata.RunId,e)}greenFlag(){this.stopAll(),this.emit(K.PROJECT_START),this.updateCurrentMSecs(),this.ioDevices.clock.resetProjectTimer(),this.targets.forEach((e=>e.clearEdgeActivatedValues()));for(let e=0;e<this.targets.length;e++)this.targets[e].onGreenFlag();this.startHats("event_whenflagclicked")}stopAll(){this.emit(K.PROJECT_STOP_ALL);const e=[];for(let t=0;t<this.targets.length;t++)this.targets[t].onStopAll(),Object.prototype.hasOwnProperty.call(this.targets[t],"isOriginal")&&!this.targets[t].isOriginal?this.targets[t].dispose():e.push(this.targets[t]);this.targets=e,null!==this.sequencer.activeThread&&this._stopThread(this.sequencer.activeThread),this.threads=[],this.threadMap.clear(),this.resetRunId()}_renderInterpolatedPositions(){const e=this._lastStepTime,t=Date.now()-e,n=Math.min(1,Math.max(0,t/this.currentStepTime));j.interpolate(this,n),this.renderer&&this.renderer.draw()}updateThreadMap(){this.threadMap.clear();for(const e of this.threads)e.stackClick||e.updateMonitor||this.threadMap.set(e.getId(),e)}_step(){this.interpolationEnabled&&j.setupInitialState(this),null!==this.profiler&&(-1===Y&&(Y=this.profiler.idByName("Runtime._step")),this.profiler.start(Y)),this.threads=this.threads.filter((e=>!e.isKilled)),this.updateThreadMap();for(const e in this._hats){if(!Object.prototype.hasOwnProperty.call(this._hats,e))continue;this._hats[e].edgeActivated&&this.startHats(e)}this.redrawRequested=!1,this._pushMonitors(),null!==this.profiler&&(-1===H&&(H=this.profiler.idByName("Sequencer.stepThreads")),this.profiler.start(H)),this.emit(K.BEFORE_EXECUTE);const e=this.sequencer.stepThreads();null!==this.profiler&&this.profiler.stop(),this.emit(K.AFTER_EXECUTE),this._updateGlows(e),this._emitProjectRunStatus(this.threads.length+e.length-this._getMonitorThreadCount([...this.threads,...e])),this._lastStepDoneThreads=e,this.renderer&&(null!==this.profiler&&(-1===_&&(_=this.profiler.idByName("RenderWebGL.draw")),this.profiler.start(_)),document.hidden||this.frameLoop._interpolationAnimation||this.renderer.draw(),null!==this.profiler&&this.profiler.stop()),this._refreshTargets&&(this.emit(K.TARGETS_UPDATE,!1),this._refreshTargets=!1),this._prevMonitorState.equals(this._monitorState)||(this.emit(K.MONITORS_UPDATE,this._monitorState),this._prevMonitorState=this._monitorState),null!==this.profiler&&(this.profiler.stop(),this.profiler.reportFrames()),this.interpolationEnabled&&(this._lastStepTime=Date.now())}_getMonitorThreadCount(e){let t=0;return e.forEach((e=>{e.updateMonitor&&t++})),t}_pushMonitors(){this.monitorBlocks.runAllMonitored(this)}setEditingTarget(e){const t=this._editingTarget;this._editingTarget=e,this._scriptGlowsPreviousFrame=[],this._updateGlows(),t!==this._editingTarget&&this.requestToolboxExtensionsUpdate()}setCompatibilityMode(e){e?this.setFramerate(30):this.setFramerate(60)}setFramerate(e){e>250&&(e=250),e<0&&(e=1),this.frameLoop.setFramerate(e),this.emit(K.FRAMERATE_CHANGED,e)}setInterpolation(e){this.interpolationEnabled=e,this.frameLoop.setInterpolation(this.interpolationEnabled),this.emit(K.INTERPOLATION_CHANGED,e)}setRuntimeOptions(e){this.runtimeOptions=Object.assign({},this.runtimeOptions,e),this.emit(K.RUNTIME_OPTIONS_CHANGED,this.runtimeOptions),this.renderer&&(this.renderer.offscreenTouching=!this.runtimeOptions.fencing)}setCompilerOptions(e){this.compilerOptions=Object.assign({},this.compilerOptions,e),this.resetAllCaches(),this.emit(K.COMPILER_OPTIONS_CHANGED,this.compilerOptions)}setStageSize(e,t){if(e=Math.round(Math.max(1,e)),t=Math.round(Math.max(1,t)),this.stageWidth!==e||this.stageHeight!==t){const n=e-this.stageWidth,r=t-this.stageHeight;if(this._monitorState.size>0){const e=n/2,t=r/2;for(const n of this._monitorState.valueSeq()){const r=n.set("x",n.get("x")+e).set("y",n.get("y")+t);this.requestUpdateMonitor(r)}this.emit(K.MONITORS_UPDATE,this._monitorState)}this.stageWidth=e,this.stageHeight=t,this.renderer&&this.renderer.setStageSize(-e/2,e/2,-t/2,t/2)}this.emit(K.STAGE_SIZE_CHANGED,e,t)}setInEditor(e){}convertToPackagedRuntime(){if(this.storage)throw new Error("convertToPackagedRuntime must be called before attachStorage");this.isPackaged=!0}resetAllCaches(){for(const e of this.targets)e.isOriginal&&e.blocks.resetCache();this.flyoutBlocks.resetCache(),this.monitorBlocks.resetCache()}addAddonBlock(e){const t=e.procedureCode,n=e.arguments||[],s=n,o=n.map(((e,t)=>"arg".concat(t))),a=n.map((()=>""));if(this.addonBlocks[t]=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({namesIdsDefaults:[s,o,a]},e),!e.hidden){const n="a-b";let r=this._blockInfo.find((e=>e.id===n));if(!r){const e='<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48"><path d="M14.92 1.053A13.835 13.835 0 0 0 1.052 14.919v18.162a13.835 13.835 0 0 0 13.866 13.866h18.162a13.835 13.835 0 0 0 13.866-13.866V14.919A13.835 13.835 0 0 0 33.081 1.053zm16.6 12.746L41.72 24 31.52 34.201l-3.276-3.275L35.17 24l-6.926-6.926Zm-15.116.073 3.278 3.278L12.83 24l6.926 6.926L16.48 34.2 6.28 24Z" style="fill:#29beb8;fill-opacity:1;stroke:none;stroke-width:1.51371;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"/></svg>';r={id:n,name:w({id:"tw.blocks.addons",default:"Addons",description:"Name of the addon block category in the extension list"}),color1:"#29beb8",color2:"#3aa8a4",color3:"#3aa8a4",menuIconURI:"data:image/svg+xml;,".concat(encodeURIComponent(e)),blocks:[],customFieldTypes:{},menus:[]},this._blockInfo.unshift(r)}r.blocks.push({info:{},xml:'<block type="procedures_call" gap="16"><mutation generateshadows="true" warp="false"'+' proccode="'.concat(x(t),'"')+' argumentnames="'.concat(x(JSON.stringify(s)),'"')+' argumentids="'.concat(x(JSON.stringify(o)),'"')+' argumentdefaults="'.concat(x(JSON.stringify(a)),'"')+"".concat(e.return?' return="'.concat(x(e.return.toString()),'"'):"")+"></mutation></block>"})}this.resetAllCaches()}getAddonBlock(e){return Object.prototype.hasOwnProperty.call(this.addonBlocks,e)?this.addonBlocks[e]:null}findProjectOptionsComment(){const e=this.getTargetForStage().comments;for(const t of Object.values(e))if(t.text.includes(V))return t;return null}parseProjectOptions(){const e=this.findProjectOptionsComment();if(!e)return;const t=e.text.split("\n").find((e=>e.endsWith(V)));if(!t)return void S.warn("Config comment does not contain valid line");const n=t.substr(0,t.length-14);let r;try{if(r=a.parse(n),!r||"object"!=typeof r)throw new Error("Invalid object")}catch(e){return void S.warn("Config comment has invalid JSON",e)}"number"==typeof r.framerate&&this.setFramerate(r.framerate),r.turbo&&(this.turboMode=!0,this.emit(K.TURBO_MODE_ON)),r.interpolation&&this.setInterpolation(!0),r.runtimeOptions&&this.setRuntimeOptions(r.runtimeOptions),r.hq&&this.renderer&&this.renderer.setUseHighQualityRender(!0);const i=+r.width||this.stageWidth,s=+r.height||this.stageHeight;i===this.stageWidth&&s===this.stageHeight||this.setStageSize(i,s)}_generateAllProjectOptions(){return{framerate:this.frameLoop.framerate,runtimeOptions:this.runtimeOptions,interpolation:this.interpolationEnabled,turbo:this.turboMode,hq:!!this.renderer&&this.renderer.useHighQualityRender,width:this.stageWidth,height:this.stageHeight}}generateDifferingProjectOptions(){const e=(t,n)=>{const r={};for(const i of Object.keys(n)){const s=n[i],o=t[i];if("object"==typeof s&&s){const t=e(o,s);Object.keys(t).length>0&&(r[i]=t)}else s!==o&&(r[i]=s)}return r};return e(this._defaultStoredSettings,this._generateAllProjectOptions())}storeProjectOptions(){const e=this.generateDifferingProjectOptions(),t="Configuration for https://turbowarp.org/\nYou can move, resize, and minimize this comment, but don't edit it by hand. This comment can be deleted to remove the stored settings.\n".concat(a.stringify(e)).concat(V),n=this.findProjectOptionsComment();if(n)n.text=t;else{this.getTargetForStage().createComment(z(),null,t,50,50,350,170,!1)}this.emitProjectChanged()}precompile(){this.allScriptsDo(((e,t)=>{const n=t.blocks.getBlock(e);if(this.getIsHat(n.opcode)){const n=new v(e);n.target=t,n.blockContainer=t.blocks,n.tryCompile()}}))}enableDebug(){this.resetAllCaches(),this.debug=!0}_updateGlows(e){const t=[];t.push(...this.threads),e&&t.push(...e);const n=[],r=[];for(let e=0;e<t.length;e++){const r=t[e],i=r.target;if(i===this._editingTarget){const e=r.blockGlowInFrame;if(r.requestScriptGlowInFrame||r.stackClick){let t=i.blocks.getTopLevelScript(e);t||(t=this.flyoutBlocks.getTopLevelScript(e)),t&&n.push(t)}}}for(let e=0;e<this._scriptGlowsPreviousFrame.length;e++){const t=this._scriptGlowsPreviousFrame[e];n.indexOf(t)<0?this.glowScript(t,!1):r.push(t)}for(let e=0;e<n.length;e++){const t=n[e];this._scriptGlowsPreviousFrame.indexOf(t)<0&&(this.glowScript(t,!0),r.push(t))}this._scriptGlowsPreviousFrame=r}_emitProjectRunStatus(e){0===this._nonMonitorThreadCount&&e>0&&this.emit(K.PROJECT_RUN_START),this._nonMonitorThreadCount>0&&0===e&&this.emit(K.PROJECT_RUN_STOP),this._nonMonitorThreadCount=e}quietGlow(e){const t=this._scriptGlowsPreviousFrame.indexOf(e);t>-1&&this._scriptGlowsPreviousFrame.splice(t,1)}glowBlock(e,t){t?this.emit(K.BLOCK_GLOW_ON,{id:e}):this.emit(K.BLOCK_GLOW_OFF,{id:e})}glowScript(e,t){t?this.emit(K.SCRIPT_GLOW_ON,{id:e}):this.emit(K.SCRIPT_GLOW_OFF,{id:e})}emitBlockDragUpdate(e){this.emit(K.BLOCK_DRAG_UPDATE,e)}emitBlockEndDrag(e,t){this.emit(K.BLOCK_DRAG_END,e,t)}visualReport(e,t){this.emit(K.VISUAL_REPORT,{id:e,value:String(t)})}requestAddMonitor(e){const t=e.get("id");this.requestUpdateMonitor(e)||(this._monitorState=this._monitorState.set(t,e))}requestUpdateMonitor(e){const t=e.get("id");return!!this._monitorState.has(t)&&(this._monitorState=this._monitorState.set(t,this._monitorState.get(t).mergeWith(((e,t)=>null==t?e:t),e)),!0)}requestRemoveMonitor(e){this._monitorState=this._monitorState.delete(e)}requestHideMonitor(e){return this.requestUpdateMonitor(new Map([["id",e],["visible",!1]]))}requestShowMonitor(e){return this.requestUpdateMonitor(new Map([["id",e],["visible",!0]]))}requestRemoveMonitorByTargetId(e){this._monitorState=this._monitorState.filterNot((t=>t.targetId===e))}getTargetById(e){for(let t=0;t<this.targets.length;t++){const n=this.targets[t];if(n.id===e)return n}}getSpriteTargetByName(e){for(let t=0;t<this.targets.length;t++){const n=this.targets[t];if(!n.isStage&&(n.sprite&&n.sprite.name===e))return n}}getTargetByDrawableId(e){for(let t=0;t<this.targets.length;t++){const n=this.targets[t];if(n.drawableID===e)return n}}changeCloneCounter(e){this._cloneCounter+=e}clonesAvailable(){return this._cloneCounter<this.runtimeOptions.maxClones}handleProjectLoaded(){this.emit(K.PROJECT_LOADED),this.resetRunId()}emitProjectChanged(){this.emit(K.PROJECT_CHANGED)}fireTargetWasCreated(e,t){this.emit("targetWasCreated",e,t)}fireTargetWasRemoved(e){this.emit("targetWasRemoved",e)}getTargetForStage(){if(this._stageTarget)return this._stageTarget;for(let e=0;e<this.targets.length;e++){const t=this.targets[e];if(t.isStage)return this._stageTarget=t,t}}getEditingTarget(){return this._editingTarget}getAllVarNamesOfType(e){let t=[];for(const n of this.targets){const r=n.getAllVariableNamesInScopeByType(e,!0);t=t.concat(r)}return t}getLabelForOpcode(e){const[t,n]=B.splitFirst(e,"_");if(!t||!n)return;const r=this._blockInfo.find((e=>e.id===t));if(!r)return;const i=r.blocks.find((e=>e.info.opcode===n));return i?{category:"extension",label:"".concat(r.name,": ").concat(i.info.text)}:void 0}createNewGlobalVariable(e,t,n){const r="string"==typeof n?n:T.SCALAR_TYPE,i=this.getAllVarNamesOfType(r),s=B.unusedName(e,i),o=new T(t||z(),s,r);return this.getTargetForStage().variables[o.id]=o,o}requestRedraw(){this.redrawRequested=!0}requestTargetsUpdate(e){e.isOriginal&&(this._refreshTargets=!0)}requestBlocksUpdate(){this.emit(K.BLOCKS_NEED_UPDATE)}requestToolboxExtensionsUpdate(){this.emit(K.TOOLBOX_EXTENSIONS_NEED_UPDATE)}start(){this.frameLoop.running||(this.frameLoop.start(),this.emit(K.RUNTIME_STARTED))}stop(){this.quit()}quit(){this.frameLoop.running&&(this.frameLoop.stop(),this.emit(K.RUNTIME_STOPPED))}enableProfiling(e){p.available()&&(this.profiler=new p(e))}disableProfiling(){this.profiler=null}updateCurrentMSecs(){this.currentMSecs=Date.now()}updatePrivacy(){const e=this.enforcePrivacy&&Object.values(this.externalCommunicationMethods).some((e=>e));this.renderer&&this.renderer.setPrivateSkinAccess&&this.renderer.setPrivateSkinAccess(!e)}setEnforcePrivacy(e){this.enforcePrivacy=e,this.updatePrivacy()}setExternalCommunicationMethod(e,t){if(!Object.prototype.hasOwnProperty.call(this.externalCommunicationMethods,e))throw new Error("Unknown method: ".concat(e));this.externalCommunicationMethods[e]=t,this.updatePrivacy()}emitAssetProgress(){this.emit(K.ASSET_PROGRESS,this.finishedAssetRequests,this.totalAssetRequests)}resetProgress(){this.finishedAssetRequests=0,this.totalAssetRequests=0,this.emitAssetProgress()}wrapAssetRequest(e){this.totalAssetRequests++,this.emitAssetProgress();return e().then((e=>(this.finishedAssetRequests++,this.emitAssetProgress(),e)),(e=>{throw this.finishedAssetRequests++,this.emitAssetProgress(),e}))}}e.exports=K},function(e,t,n){const{Record:r}=n(24),i=r({id:null,spriteName:null,targetId:null,opcode:null,value:null,params:null,mode:"default",sliderMin:0,sliderMax:100,isDiscrete:!0,x:null,y:null,width:0,height:0,visible:!0});e.exports=i},function(e,t){e.exports=function(e,t){let n="";for(const e in t){let r=t[e].value;"CURRENTMENU"===e&&(r=r.toLowerCase()),n+="_".concat(r)}return"".concat(e).concat(n)}},function(e,t,n){const r=n(2),i=n(7),s=n(3),o=n(10),a=n(1),{IntermediateScript:l,IntermediateRepresentation:c}=n(77),u=n(209),d="",h="list",p=(e,t)=>({scope:e,id:t.id,name:t.name,isCloud:t.isCloud}),m=e=>e.substring(1);class f{constructor(e){this.thread=e,this.target=e.target,this.blocks=e.blockContainer,this.runtime=this.target.runtime,this.stage=this.runtime.getTargetForStage(),this.script=new l,this.script.warpTimer=this.target.runtime.compilerOptions.warpTimer,this.variableCache={},this.usesTimer=!1}setProcedureVariant(e){const t=m(e);this.script.procedureVariant=e,this.script.procedureCode=t,this.script.isProcedure=!0,this.script.yields=!1;const n=this.blocks.getProcedureParamNamesIdsAndDefaults(t);if(null===n)throw new Error("IR: cannot find procedure: ".concat(e));const[r,i,s]=n;this.script.arguments=r}enableWarp(){this.script.isWarp=!0}getBlockById(e){return this.blocks.getBlock(e)||this.blocks.runtime.flyoutBlocks.getBlock(e)}getBlockInfo(e){const[t,n]=i.splitFirst(e,"_");if(!t||!n)return null;const r=this.runtime._blockInfo.find((e=>e.id===t));if(!r)return null;const s=r.blocks.find((e=>e.info.opcode===n));return s||null}descendInputOfBlock(e,t){const n=e.inputs[t];if(!n)return a.warn("IR: ".concat(e.opcode,": missing input ").concat(t),e),{kind:"constant",value:0};const r=n.block,i=this.getBlockById(r);return i?this.descendInput(i):(a.warn("IR: ".concat(e.opcode,": could not find input ").concat(t," with ID ").concat(r)),{kind:"constant",value:0})}descendInput(e){switch(e.opcode){case"colour_picker":return{kind:"constant",value:e.fields.COLOUR.value};case"math_angle":case"math_integer":case"math_number":case"math_positive_number":case"math_whole_number":return{kind:"constant",value:e.fields.NUM.value};case"text":return{kind:"constant",value:e.fields.TEXT.value};case"argument_reporter_string_number":{const t=e.fields.VALUE.value,n=this.script.arguments.lastIndexOf(t);return-1===n&&"last key pressed"===t.toLowerCase()?{kind:"tw.lastKeyPressed"}:-1===n?{kind:"constant",value:0}:{kind:"args.stringNumber",index:n}}case"argument_reporter_boolean":{const t=e.fields.VALUE.value,n=this.script.arguments.lastIndexOf(t);return-1===n?"is compiled?"===t.toLowerCase()||"is turbowarp?"===t.toLowerCase()?{kind:"constant",value:!0}:{kind:"constant",value:0}:{kind:"args.boolean",index:n}}case"control_get_counter":return{kind:"counter.get"};case"data_variable":return{kind:"var.get",variable:this.descendVariable(e,"VARIABLE",d)};case"data_itemoflist":return{kind:"list.get",list:this.descendVariable(e,"LIST",h),index:this.descendInputOfBlock(e,"INDEX")};case"data_lengthoflist":return{kind:"list.length",list:this.descendVariable(e,"LIST",h)};case"data_listcontainsitem":return{kind:"list.contains",list:this.descendVariable(e,"LIST",h),item:this.descendInputOfBlock(e,"ITEM")};case"data_itemnumoflist":return{kind:"list.indexOf",list:this.descendVariable(e,"LIST",h),item:this.descendInputOfBlock(e,"ITEM")};case"data_listcontents":return{kind:"list.contents",list:this.descendVariable(e,"LIST",h)};case"event_broadcast_menu":{const t=e.fields.BROADCAST_OPTION,n=this.target.lookupBroadcastMsg(t.id,t.value);return{kind:"constant",value:n?n.name:""}}case"looks_backdropnumbername":return"number"===e.fields.NUMBER_NAME.value?{kind:"looks.backdropNumber"}:{kind:"looks.backdropName"};case"looks_costumenumbername":return"number"===e.fields.NUMBER_NAME.value?{kind:"looks.costumeNumber"}:{kind:"looks.costumeName"};case"looks_size":return{kind:"looks.size"};case"motion_direction":return{kind:"motion.direction"};case"motion_xposition":return{kind:"motion.x"};case"motion_yposition":return{kind:"motion.y"};case"operator_add":return{kind:"op.add",left:this.descendInputOfBlock(e,"NUM1"),right:this.descendInputOfBlock(e,"NUM2")};case"operator_and":return{kind:"op.and",left:this.descendInputOfBlock(e,"OPERAND1"),right:this.descendInputOfBlock(e,"OPERAND2")};case"operator_contains":return{kind:"op.contains",string:this.descendInputOfBlock(e,"STRING1"),contains:this.descendInputOfBlock(e,"STRING2")};case"operator_divide":return{kind:"op.divide",left:this.descendInputOfBlock(e,"NUM1"),right:this.descendInputOfBlock(e,"NUM2")};case"operator_equals":return{kind:"op.equals",left:this.descendInputOfBlock(e,"OPERAND1"),right:this.descendInputOfBlock(e,"OPERAND2")};case"operator_gt":return{kind:"op.greater",left:this.descendInputOfBlock(e,"OPERAND1"),right:this.descendInputOfBlock(e,"OPERAND2")};case"operator_join":return{kind:"op.join",left:this.descendInputOfBlock(e,"STRING1"),right:this.descendInputOfBlock(e,"STRING2")};case"operator_length":return{kind:"op.length",string:this.descendInputOfBlock(e,"STRING")};case"operator_letter_of":return{kind:"op.letterOf",letter:this.descendInputOfBlock(e,"LETTER"),string:this.descendInputOfBlock(e,"STRING")};case"operator_lt":return{kind:"op.less",left:this.descendInputOfBlock(e,"OPERAND1"),right:this.descendInputOfBlock(e,"OPERAND2")};case"operator_mathop":{const t=this.descendInputOfBlock(e,"NUM");switch(e.fields.OPERATOR.value.toLowerCase()){case"abs":return{kind:"op.abs",value:t};case"floor":return{kind:"op.floor",value:t};case"ceiling":return{kind:"op.ceiling",value:t};case"sqrt":return{kind:"op.sqrt",value:t};case"sin":return{kind:"op.sin",value:t};case"cos":return{kind:"op.cos",value:t};case"tan":return{kind:"op.tan",value:t};case"asin":return{kind:"op.asin",value:t};case"acos":return{kind:"op.acos",value:t};case"atan":return{kind:"op.atan",value:t};case"ln":return{kind:"op.ln",value:t};case"log":return{kind:"op.log",value:t};case"e ^":return{kind:"op.e^",value:t};case"10 ^":return{kind:"op.10^",value:t};default:return{kind:"constant",value:0}}}case"operator_mod":return{kind:"op.mod",left:this.descendInputOfBlock(e,"NUM1"),right:this.descendInputOfBlock(e,"NUM2")};case"operator_multiply":return{kind:"op.multiply",left:this.descendInputOfBlock(e,"NUM1"),right:this.descendInputOfBlock(e,"NUM2")};case"operator_not":return{kind:"op.not",operand:this.descendInputOfBlock(e,"OPERAND")};case"operator_or":return{kind:"op.or",left:this.descendInputOfBlock(e,"OPERAND1"),right:this.descendInputOfBlock(e,"OPERAND2")};case"operator_random":{const t=this.descendInputOfBlock(e,"FROM"),n=this.descendInputOfBlock(e,"TO");if("constant"===t.kind&&"constant"===n.kind){const e=t.value,i=n.value,s=r.toNumber(e),o=r.toNumber(i);return s===o?{kind:"constant",value:s}:r.isInt(e)&&r.isInt(i)?{kind:"op.random",low:s<=o?t:n,high:s<=o?n:t,useInts:!0,useFloats:!1}:{kind:"op.random",low:s<=o?t:n,high:s<=o?n:t,useInts:!1,useFloats:!0}}if("constant"===t.kind){if(!r.isInt(r.toNumber(t.value)))return{kind:"op.random",low:t,high:n,useInts:!1,useFloats:!0}}else if("constant"===n.kind&&!r.isInt(r.toNumber(n.value)))return{kind:"op.random",low:t,high:n,useInts:!1,useFloats:!0};return{kind:"op.random",low:t,high:n,useInts:!1,useFloats:!1}}case"operator_round":return{kind:"op.round",value:this.descendInputOfBlock(e,"NUM")};case"operator_subtract":return{kind:"op.subtract",left:this.descendInputOfBlock(e,"NUM1"),right:this.descendInputOfBlock(e,"NUM2")};case"procedures_call":return this.descendProcedure(e);case"sensing_answer":return{kind:"sensing.answer"};case"sensing_coloristouchingcolor":return{kind:"sensing.colorTouchingColor",target:this.descendInputOfBlock(e,"COLOR2"),mask:this.descendInputOfBlock(e,"COLOR")};case"sensing_current":switch(e.fields.CURRENTMENU.value.toLowerCase()){case"year":return{kind:"sensing.year"};case"month":return{kind:"sensing.month"};case"date":return{kind:"sensing.date"};case"dayofweek":return{kind:"sensing.dayofweek"};case"hour":return{kind:"sensing.hour"};case"minute":return{kind:"sensing.minute"};case"second":return{kind:"sensing.second"}}return{kind:"constant",value:0};case"sensing_dayssince2000":return{kind:"sensing.daysSince2000"};case"sensing_distanceto":return{kind:"sensing.distance",target:this.descendInputOfBlock(e,"DISTANCETOMENU")};case"sensing_keypressed":return{kind:"keyboard.pressed",key:this.descendInputOfBlock(e,"KEY_OPTION")};case"sensing_mousedown":return{kind:"mouse.down"};case"sensing_mousex":return{kind:"mouse.x"};case"sensing_mousey":return{kind:"mouse.y"};case"sensing_of":return{kind:"sensing.of",property:e.fields.PROPERTY.value,object:this.descendInputOfBlock(e,"OBJECT")};case"sensing_timer":return this.usesTimer=!0,{kind:"timer.get"};case"sensing_touchingcolor":return{kind:"sensing.touchingColor",color:this.descendInputOfBlock(e,"COLOR")};case"sensing_touchingobject":return{kind:"sensing.touching",object:this.descendInputOfBlock(e,"TOUCHINGOBJECTMENU")};case"sensing_username":return{kind:"sensing.username"};case"sound_sounds_menu":return{kind:"constant",value:e.fields.SOUND_MENU.value};case"tw_getLastKeyPressed":return{kind:"tw.lastKeyPressed"};default:{if(this.runtime.getOpcodeFunction(e.opcode)){if(u.inputs.includes(e.opcode))return this.descendCompatLayer(e);const t=this.getBlockInfo(e.opcode);if(t){const n=t.info.blockType;if(n===s.REPORTER||n===s.BOOLEAN)return this.descendCompatLayer(e)}}const t=Object.keys(e.inputs),n=Object.keys(e.fields);if(0===t.length&&1===n.length)return{kind:"constant",value:e.fields[n[0]].value};throw a.warn("IR: Unknown input: ".concat(e.opcode),e),new Error("IR: Unknown input: ".concat(e.opcode))}}}descendStackedBlock(e){switch(e.opcode){case"control_all_at_once":return{kind:"control.if",condition:{kind:"constant",value:!0},whenTrue:this.descendSubstack(e,"SUBSTACK"),whenFalse:[]};case"control_clear_counter":return{kind:"counter.clear"};case"control_create_clone_of":return{kind:"control.createClone",target:this.descendInputOfBlock(e,"CLONE_OPTION")};case"control_delete_this_clone":return this.script.yields=!0,{kind:"control.deleteClone"};case"control_forever":return this.analyzeLoop(),{kind:"control.while",condition:{kind:"constant",value:!0},do:this.descendSubstack(e,"SUBSTACK")};case"control_for_each":return this.analyzeLoop(),{kind:"control.for",variable:this.descendVariable(e,"VARIABLE",d),count:this.descendInputOfBlock(e,"VALUE"),do:this.descendSubstack(e,"SUBSTACK")};case"control_if":return{kind:"control.if",condition:this.descendInputOfBlock(e,"CONDITION"),whenTrue:this.descendSubstack(e,"SUBSTACK"),whenFalse:[]};case"control_if_else":return{kind:"control.if",condition:this.descendInputOfBlock(e,"CONDITION"),whenTrue:this.descendSubstack(e,"SUBSTACK"),whenFalse:this.descendSubstack(e,"SUBSTACK2")};case"control_incr_counter":return{kind:"counter.increment"};case"control_repeat":return this.analyzeLoop(),{kind:"control.repeat",times:this.descendInputOfBlock(e,"TIMES"),do:this.descendSubstack(e,"SUBSTACK")};case"control_repeat_until":{this.analyzeLoop(),this.usesTimer=!1;const t=this.descendInputOfBlock(e,"CONDITION"),n=this.usesTimer;return n&&(this.script.yields=!0),{kind:"control.while",condition:{kind:"op.not",operand:t},do:this.descendSubstack(e,"SUBSTACK"),warpTimer:n}}case"control_stop":{const t=e.fields.STOP_OPTION.value;return"all"===t?(this.script.yields=!0,{kind:"control.stopAll"}):"other scripts in sprite"===t||"other scripts in stage"===t?{kind:"control.stopOthers"}:"this script"===t?{kind:"control.stopScript"}:{kind:"noop"}}case"control_wait":return this.script.yields=!0,{kind:"control.wait",seconds:this.descendInputOfBlock(e,"DURATION")};case"control_wait_until":return this.script.yields=!0,{kind:"control.waitUntil",condition:this.descendInputOfBlock(e,"CONDITION")};case"control_while":return this.analyzeLoop(),{kind:"control.while",condition:this.descendInputOfBlock(e,"CONDITION"),do:this.descendSubstack(e,"SUBSTACK"),warpTimer:!1};case"data_addtolist":return{kind:"list.add",list:this.descendVariable(e,"LIST",h),item:this.descendInputOfBlock(e,"ITEM")};case"data_changevariableby":{const t=this.descendVariable(e,"VARIABLE",d);return{kind:"var.set",variable:t,value:{kind:"op.add",left:{kind:"var.get",variable:t},right:this.descendInputOfBlock(e,"VALUE")}}}case"data_deletealloflist":return{kind:"list.deleteAll",list:this.descendVariable(e,"LIST",h)};case"data_deleteoflist":{const t=this.descendInputOfBlock(e,"INDEX");return"constant"===t.kind&&"all"===t.value?{kind:"list.deleteAll",list:this.descendVariable(e,"LIST",h)}:{kind:"list.delete",list:this.descendVariable(e,"LIST",h),index:t}}case"data_hidelist":return{kind:"list.hide",list:this.descendVariable(e,"LIST",h)};case"data_hidevariable":return{kind:"var.hide",variable:this.descendVariable(e,"VARIABLE",d)};case"data_insertatlist":return{kind:"list.insert",list:this.descendVariable(e,"LIST",h),index:this.descendInputOfBlock(e,"INDEX"),item:this.descendInputOfBlock(e,"ITEM")};case"data_replaceitemoflist":return{kind:"list.replace",list:this.descendVariable(e,"LIST",h),index:this.descendInputOfBlock(e,"INDEX"),item:this.descendInputOfBlock(e,"ITEM")};case"data_setvariableto":return{kind:"var.set",variable:this.descendVariable(e,"VARIABLE",d),value:this.descendInputOfBlock(e,"VALUE")};case"data_showlist":return{kind:"list.show",list:this.descendVariable(e,"LIST",h)};case"data_showvariable":return{kind:"var.show",variable:this.descendVariable(e,"VARIABLE",d)};case"event_broadcast":return{kind:"event.broadcast",broadcast:this.descendInputOfBlock(e,"BROADCAST_INPUT")};case"event_broadcastandwait":return this.script.yields=!0,{kind:"event.broadcastAndWait",broadcast:this.descendInputOfBlock(e,"BROADCAST_INPUT")};case"looks_changeeffectby":return{kind:"looks.changeEffect",effect:e.fields.EFFECT.value.toLowerCase(),value:this.descendInputOfBlock(e,"CHANGE")};case"looks_changesizeby":return{kind:"looks.changeSize",size:this.descendInputOfBlock(e,"CHANGE")};case"looks_cleargraphiceffects":return{kind:"looks.clearEffects"};case"looks_goforwardbackwardlayers":return"forward"===e.fields.FORWARD_BACKWARD.value?{kind:"looks.forwardLayers",layers:this.descendInputOfBlock(e,"NUM")}:{kind:"looks.backwardLayers",layers:this.descendInputOfBlock(e,"NUM")};case"looks_gotofrontback":return"front"===e.fields.FRONT_BACK.value?{kind:"looks.goToFront"}:{kind:"looks.goToBack"};case"looks_hide":return{kind:"looks.hide"};case"looks_nextbackdrop":return{kind:"looks.nextBackdrop"};case"looks_nextcostume":return{kind:"looks.nextCostume"};case"looks_seteffectto":return{kind:"looks.setEffect",effect:e.fields.EFFECT.value.toLowerCase(),value:this.descendInputOfBlock(e,"VALUE")};case"looks_setsizeto":return{kind:"looks.setSize",size:this.descendInputOfBlock(e,"SIZE")};case"looks_show":return{kind:"looks.show"};case"looks_switchbackdropto":return{kind:"looks.switchBackdrop",backdrop:this.descendInputOfBlock(e,"BACKDROP")};case"looks_switchcostumeto":return{kind:"looks.switchCostume",costume:this.descendInputOfBlock(e,"COSTUME")};case"motion_changexby":return{kind:"motion.changeX",dx:this.descendInputOfBlock(e,"DX")};case"motion_changeyby":return{kind:"motion.changeY",dy:this.descendInputOfBlock(e,"DY")};case"motion_gotoxy":return{kind:"motion.setXY",x:this.descendInputOfBlock(e,"X"),y:this.descendInputOfBlock(e,"Y")};case"motion_ifonedgebounce":return{kind:"motion.ifOnEdgeBounce"};case"motion_movesteps":return{kind:"motion.step",steps:this.descendInputOfBlock(e,"STEPS")};case"motion_pointindirection":return{kind:"motion.setDirection",direction:this.descendInputOfBlock(e,"DIRECTION")};case"motion_setrotationstyle":return{kind:"motion.setRotationStyle",style:e.fields.STYLE.value};case"motion_setx":return{kind:"motion.setX",x:this.descendInputOfBlock(e,"X")};case"motion_sety":return{kind:"motion.setY",y:this.descendInputOfBlock(e,"Y")};case"motion_turnleft":return{kind:"motion.setDirection",direction:{kind:"op.subtract",left:{kind:"motion.direction"},right:this.descendInputOfBlock(e,"DEGREES")}};case"motion_turnright":return{kind:"motion.setDirection",direction:{kind:"op.add",left:{kind:"motion.direction"},right:this.descendInputOfBlock(e,"DEGREES")}};case"pen_clear":return{kind:"pen.clear"};case"pen_changePenColorParamBy":return{kind:"pen.changeParam",param:this.descendInputOfBlock(e,"COLOR_PARAM"),value:this.descendInputOfBlock(e,"VALUE")};case"pen_changePenHueBy":return{kind:"pen.legacyChangeHue",hue:this.descendInputOfBlock(e,"HUE")};case"pen_changePenShadeBy":return{kind:"pen.legacyChangeShade",shade:this.descendInputOfBlock(e,"SHADE")};case"pen_penDown":return{kind:"pen.down"};case"pen_penUp":return{kind:"pen.up"};case"pen_setPenColorParamTo":return{kind:"pen.setParam",param:this.descendInputOfBlock(e,"COLOR_PARAM"),value:this.descendInputOfBlock(e,"VALUE")};case"pen_setPenColorToColor":return{kind:"pen.setColor",color:this.descendInputOfBlock(e,"COLOR")};case"pen_setPenHueToNumber":return{kind:"pen.legacySetHue",hue:this.descendInputOfBlock(e,"HUE")};case"pen_setPenShadeToNumber":return{kind:"pen.legacySetShade",shade:this.descendInputOfBlock(e,"SHADE")};case"pen_setPenSizeTo":return{kind:"pen.setSize",size:this.descendInputOfBlock(e,"SIZE")};case"pen_changePenSizeBy":return{kind:"pen.changeSize",size:this.descendInputOfBlock(e,"SIZE")};case"pen_stamp":return{kind:"pen.stamp"};case"procedures_call":{const t=e.mutation.proccode;if(e.mutation.return){const t=this.descendVisualReport(e);if(t)return t}return"tw:debugger;"===t?{kind:"tw.debugger"}:this.descendProcedure(e)}case"procedures_return":return{kind:"procedures.return",value:this.descendInputOfBlock(e,"VALUE")};case"sensing_resettimer":return{kind:"timer.reset"};default:{if(this.runtime.getOpcodeFunction(e.opcode)){if(u.stacked.includes(e.opcode))return this.descendCompatLayer(e);const t=this.getBlockInfo(e.opcode);if(t){const n=t.info.blockType;if(n===s.COMMAND||n===s.CONDITIONAL||n===s.LOOP)return this.descendCompatLayer(e)}}const t=this.descendVisualReport(e);if(t)return t;throw a.warn("IR: Unknown stacked block: ".concat(e.opcode),e),new Error("IR: Unknown stacked block: ".concat(e.opcode))}}}descendSubstack(e,t){const n=e.inputs[t];if(!n)return[];const r=n.block;return this.walkStack(r)}walkStack(e){const t=[];let n=e;for(;null!==n;){const e=this.getBlockById(n);if(!e)break;const r=this.descendStackedBlock(e);t.push(r),n=e.next}return t}descendVariable(e,t,n){const r=e.fields[t],i=r.id;if(Object.prototype.hasOwnProperty.call(this.variableCache,i))return this.variableCache[i];const s=this._descendVariable(i,r.value,n);return this.variableCache[i]=s,s}_descendVariable(e,t,n){const r=this.target,i=this.stage;if(Object.prototype.hasOwnProperty.call(r.variables,e))return p("target",r.variables[e]);if(!r.isStage&&i&&Object.prototype.hasOwnProperty.call(i.variables,e))return p("stage",i.variables[e]);for(const e in r.variables)if(Object.prototype.hasOwnProperty.call(r.variables,e)){const i=r.variables[e];if(i.name===t&&i.type===n)return p("target",i)}if(!r.isStage&&i)for(const e in i.variables)if(Object.prototype.hasOwnProperty.call(i.variables,e)){const r=i.variables[e];if(r.name===t&&r.type===n)return p("stage",r)}const s=new o(e,t,n,!1);if(r.variables[e]=s,r.sprite)for(const i of r.sprite.clones)Object.prototype.hasOwnProperty.call(i.variables,e)||(i.variables[e]=new o(e,t,n,!1));return p("target",s)}descendProcedure(e){const t=e.mutation.proccode,n=this.blocks.getProcedureParamNamesIdsAndDefaults(t);if(null===n)return{kind:"noop"};const[r,i,s]=n;if(this.runtime.getAddonBlock(t)){this.script.yields=!0;const n={};for(let t=0;t<i.length;t++){let o;o=e.inputs[i[t]]&&e.inputs[i[t]].block?this.descendInputOfBlock(e,i[t]):{kind:"constant",value:s[t]},n[r[t]]=o}return{kind:"addons.call",code:t,arguments:n,blockId:e.id}}const o=this.blocks.getProcedureDefinition(t),a=this.blocks.getBlock(o);if(!a)return{kind:"noop"};const l=this.blocks.getBlock(a.inputs.custom_block.block);let c=this.script.isWarp;if(!c&&l&&l.mutation){const e=l.mutation.warp;"boolean"==typeof e?c=e:"string"==typeof e&&(c=JSON.parse(e))}const u=(d=t,c?"W".concat(d):"Z".concat(d));var d;this.script.dependedProcedures.includes(u)||this.script.dependedProcedures.push(u),this.script.isWarp||t===this.script.procedureCode&&(this.script.yields=!0);const h=[];for(let t=0;t<i.length;t++){let n;n=e.inputs[i[t]]&&e.inputs[i[t]].block?this.descendInputOfBlock(e,i[t]):{kind:"constant",value:s[t]},h.push(n)}return{kind:"procedures.call",code:t,variant:u,arguments:h}}descendCompatLayer(e){this.script.yields=!0;const t={};for(const n of Object.keys(e.inputs))n.startsWith("SUBSTACK")||(t[n]=this.descendInputOfBlock(e,n));const n={};for(const t of Object.keys(e.fields))n[t]=e.fields[t].value;const r=this.getBlockInfo(e.opcode),i=r&&r.info&&r.info.blockType||s.COMMAND,o={};if(i===s.CONDITIONAL||i===s.LOOP)for(const t in e.inputs){if(!t.startsWith("SUBSTACK"))continue;const n="SUBSTACK"===t?1:+t.substring(8);isNaN(n)||(o[n]=this.descendSubstack(e,t))}return{kind:"compat",id:e.id,opcode:e.opcode,blockType:i,inputs:t,fields:n,substacks:o}}analyzeLoop(){this.script.isWarp&&!this.script.warpTimer||(this.script.yields=!0)}readTopBlockComment(e){const t=this.target.comments[e];if(!t)return;const n=t.text;for(const e of n.split("\n")){if(!/^tw\b/.test(e))continue;const t=e.split(" ");for(const e of t)switch(e){case"nocompile":throw new Error("Script explicitly disables compilation");case"stuck":this.script.warpTimer=!0}break}}descendVisualReport(e){if(!this.thread.stackClick||e.next)return null;try{return{kind:"visualReport",input:this.descendInput(e)}}catch(e){return null}}walkHat(e){const t=e.next,n=e.opcode,r=this.runtime._hats[n];if(this.thread.stackClick){return this.runtime.getOpcodeFunction(n)?[this.descendCompatLayer(e),...this.walkStack(t)]:this.walkStack(t)}if(r.edgeActivated)return this.script.yields=!0,this.script.executableHat=!0,[{kind:"hat.edge",id:e.id,condition:this.descendCompatLayer(e)},...this.walkStack(t)];return this.runtime.getOpcodeFunction(n)?(this.script.yields=!0,this.script.executableHat=!0,[{kind:"hat.predicate",condition:this.descendCompatLayer(e)},...this.walkStack(t)]):this.walkStack(t)}generate(e){this.blocks.populateProcedureCache(),this.script.topBlockId=e;const t=this.getBlockById(e);if(!t){if(this.script.isProcedure)return this.script;throw new Error("Cannot find top block")}t.comment&&this.readTopBlockComment(t.comment);if(!!this.runtime._hats[t.opcode])this.script.stack=this.walkHat(t);else{let n;n="procedures_definition"===t.opcode?t.next:e,n&&(this.script.stack=this.walkStack(n))}return this.script}}e.exports={ScriptTreeGenerator:f,IRGenerator:class{constructor(e){this.thread=e,this.blocks=e.blockContainer,this.proceduresToCompile=new Map,this.compilingProcedures=new Map,this.procedures={},this.analyzedProcedures=[]}addProcedureDependencies(e){for(const t of e){if(Object.prototype.hasOwnProperty.call(this.procedures,t))continue;if(this.compilingProcedures.has(t))continue;if(this.proceduresToCompile.has(t))continue;const e=m(t),n=this.blocks.getProcedureDefinition(e);this.proceduresToCompile.set(t,n)}}generateScriptTree(e,t){const n=e.generate(t);return this.addProcedureDependencies(n.dependedProcedures),n}analyzeScript(e){let t=!1;for(const n of e.dependedProcedures){const r=this.procedures[n];this.analyzedProcedures.includes(n)||(this.analyzedProcedures.push(n),this.analyzeScript(r)&&(t=!0),this.analyzedProcedures.pop()),r.yields&&!e.yields&&(e.yields=!0,t=!0)}return t}generate(){const e=this.generateScriptTree(new f(this.thread),this.thread.topBlock),t=this.blocks._cache.compiledProcedures;for(;this.proceduresToCompile.size>0;){this.compilingProcedures=this.proceduresToCompile,this.proceduresToCompile=new Map;for(const[e,n]of this.compilingProcedures.entries())if(t[e]){const n=t[e];this.procedures[e]=n,this.addProcedureDependencies(n.dependedProcedures)}else{const r="W"===e.charAt(0),i=new f(this.thread);i.setProcedureVariant(e),r&&i.enableWarp();const s=this.generateScriptTree(i,n);this.procedures[e]=s,t[e]=s}}for(;this.analyzeScript(e););const n=new c;return n.entry=e,n.procedures=this.procedures,n}}}},function(e,t,n){const r={Timer:n(14),Cast:n(2),log:n(1),blockUtility:n(211),thread:null};let i="";const s={};i+="let stuckCounter = 0;\nconst isStuck = () => {\n    // The real time is not checked on every call for performance.\n    stuckCounter++;\n    if (stuckCounter === 100) {\n        stuckCounter = 0;\n        return globalState.thread.target.runtime.sequencer.timer.timeElapsed() > 500;\n    }\n    return false;\n};",s.startHats="const startHats = (requestedHat, optMatchFields) => {\n    const thread = globalState.thread;\n    const threads = thread.target.runtime.startHats(requestedHat, optMatchFields);\n    return threads;\n}",s.waitThreads="const waitThreads = function*(threads) {\n    const thread = globalState.thread;\n    const runtime = thread.target.runtime;\n\n    while (true) {\n        // determine whether any threads are running\n        let anyRunning = false;\n        for (let i = 0; i < threads.length; i++) {\n            if (runtime.threads.indexOf(threads[i]) !== -1) {\n                anyRunning = true;\n                break;\n            }\n        }\n        if (!anyRunning) {\n            // all threads are finished, can resume\n            return;\n        }\n\n        let allWaiting = true;\n        for (let i = 0; i < threads.length; i++) {\n            if (!runtime.isWaitingThread(threads[i])) {\n                allWaiting = false;\n                break;\n            }\n        }\n        if (allWaiting) {\n            thread.status = 3; // STATUS_YIELD_TICK\n        }\n\n        yield;\n    }\n}",s.executeInCompatibilityLayer="let hasResumedFromPromise = false;\nconst waitPromise = function*(promise) {\n    const thread = globalState.thread;\n    let returnValue;\n\n    // enter STATUS_PROMISE_WAIT and yield\n    // this will stop script execution until the promise handlers reset the thread status\n    // because promise handlers might execute immediately, configure thread.status here\n    thread.status = 1; // STATUS_PROMISE_WAIT\n\n    promise\n        .then(value => {\n            returnValue = value;\n            thread.status = 0; // STATUS_RUNNING\n        }, error => {\n            globalState.log.warn('Promise rejected in compiled script:', error);\n            returnValue = '' + error;\n            thread.status = 0; // STATUS_RUNNING\n        });\n\n    yield;\n\n    return returnValue;\n};\nconst isPromise = value => (\n    // see engine/execute.js\n    value !== null &&\n    typeof value === 'object' &&\n    typeof value.then === 'function'\n);\nconst executeInCompatibilityLayer = function*(inputs, blockFunction, isWarp, useFlags, blockId, branchInfo) {\n    const thread = globalState.thread;\n    const blockUtility = globalState.blockUtility;\n    const stackFrame = branchInfo ? branchInfo.stackFrame : {};\n\n    const finish = (returnValue) => {\n        if (branchInfo) {\n            if (typeof returnValue === 'undefined' && blockUtility._startedBranch) {\n                branchInfo.isLoop = blockUtility._startedBranch[1];\n                return blockUtility._startedBranch[0];\n            }\n            branchInfo.isLoop = branchInfo.defaultIsLoop;\n            return returnValue;\n        }\n        return returnValue;\n    };\n\n    const executeBlock = () => {\n        blockUtility.init(thread, blockId, stackFrame);\n        return blockFunction(inputs, blockUtility);\n    };\n\n    let returnValue = executeBlock();\n    if (isPromise(returnValue)) {\n        returnValue = finish(yield* waitPromise(returnValue));\n        if (useFlags) hasResumedFromPromise = true;\n        return returnValue;\n    }\n\n    if (thread.status === 1 /* STATUS_PROMISE_WAIT */ || thread.status === 4 /* STATUS_DONE */) {\n        // Something external is forcing us to stop\n        yield;\n        // Make up a return value because whatever is forcing us to stop can't specify one\n        return '';\n    }\n\n    while (thread.status === 2 /* STATUS_YIELD */ || thread.status === 3 /* STATUS_YIELD_TICK */) {\n        // Yielded threads will run next iteration.\n        if (thread.status === 2 /* STATUS_YIELD */) {\n            thread.status = 0; // STATUS_RUNNING\n            // Yield back to the event loop when stuck or not in warp mode.\n            if (!isWarp || isStuck()) {\n                yield;\n            }\n        } else {\n            // status is STATUS_YIELD_TICK, always yield to the event loop\n            yield;\n        }\n\n        returnValue = executeBlock();\n        if (isPromise(returnValue)) {\n            returnValue = finish(yield* waitPromise(returnValue));\n            if (useFlags) hasResumedFromPromise = true;\n            return returnValue;\n        }\n\n        if (thread.status === 1 /* STATUS_PROMISE_WAIT */ || thread.status === 4 /* STATUS_DONE */) {\n            yield;\n            return finish('');\n        }\n    }\n\n    return finish(returnValue);\n}",s.createBranchInfo="const createBranchInfo = (isLoop) => ({\n    defaultIsLoop: isLoop,\n    isLoop: false,\n    branch: 0,\n    stackFrame: {}\n});",s.retire="const retire = () => {\n    const thread = globalState.thread;\n    thread.target.runtime.sequencer.retireThread(thread);\n}",s.toBoolean="const toBoolean = value => {\n    if (typeof value === 'boolean') {\n        return value;\n    }\n    if (typeof value === 'string') {\n        if (value === '' || value === '0' || value.toLowerCase() === 'false') {\n            return false;\n        }\n        return true;\n    }\n    return !!value;\n}",s.limitPrecision="const limitPrecision = value => {\n    const rounded = Math.round(value);\n    const delta = value - rounded;\n    return (Math.abs(delta) < 1e-9) ? rounded : value;\n}",i+="const isNotActuallyZero = val => {\n    if (typeof val !== 'string') return false;\n    for (let i = 0; i < val.length; i++) {\n        const code = val.charCodeAt(i);\n        if (code === 48 || code === 9) {\n            return false;\n        }\n    }\n    return true;\n};",i+="const compareEqualSlow = (v1, v2) => {\n    const n1 = +v1;\n    if (isNaN(n1) || (n1 === 0 && isNotActuallyZero(v1))) return ('' + v1).toLowerCase() === ('' + v2).toLowerCase();\n    const n2 = +v2;\n    if (isNaN(n2) || (n2 === 0 && isNotActuallyZero(v2))) return ('' + v1).toLowerCase() === ('' + v2).toLowerCase();\n    return n1 === n2;\n};\nconst compareEqual = (v1, v2) => (typeof v1 === 'number' && typeof v2 === 'number' && !isNaN(v1) && !isNaN(v2) || v1 === v2) ? v1 === v2 : compareEqualSlow(v1, v2);",s.compareGreaterThan="const compareGreaterThanSlow = (v1, v2) => {\n    let n1 = +v1;\n    let n2 = +v2;\n    if (n1 === 0 && isNotActuallyZero(v1)) {\n        n1 = NaN;\n    } else if (n2 === 0 && isNotActuallyZero(v2)) {\n        n2 = NaN;\n    }\n    if (isNaN(n1) || isNaN(n2)) {\n        const s1 = ('' + v1).toLowerCase();\n        const s2 = ('' + v2).toLowerCase();\n        return s1 > s2;\n    }\n    return n1 > n2;\n};\nconst compareGreaterThan = (v1, v2) => typeof v1 === 'number' && typeof v2 === 'number' && !isNaN(v1) ? v1 > v2 : compareGreaterThanSlow(v1, v2)",s.compareLessThan="const compareLessThanSlow = (v1, v2) => {\n    let n1 = +v1;\n    let n2 = +v2;\n    if (n1 === 0 && isNotActuallyZero(v1)) {\n        n1 = NaN;\n    } else if (n2 === 0 && isNotActuallyZero(v2)) {\n        n2 = NaN;\n    }\n    if (isNaN(n1) || isNaN(n2)) {\n        const s1 = ('' + v1).toLowerCase();\n        const s2 = ('' + v2).toLowerCase();\n        return s1 < s2;\n    }\n    return n1 < n2;\n};\nconst compareLessThan = (v1, v2) => typeof v1 === 'number' && typeof v2 === 'number' && !isNaN(v2) ? v1 < v2 : compareLessThanSlow(v1, v2)",s.randomInt="const randomInt = (low, high) => low + Math.floor(Math.random() * ((high + 1) - low))",s.randomFloat="const randomFloat = (low, high) => (Math.random() * (high - low)) + low",s.timer="const timer = () => {\n    const t = new globalState.Timer({\n        now: () => globalState.thread.target.runtime.currentMSecs\n    });\n    t.start();\n    return t;\n}",s.daysSince2000="const daysSince2000 = () => (Date.now() - 946684800000) / (24 * 60 * 60 * 1000)",s.distance="const distance = menu => {\n    const thread = globalState.thread;\n    if (thread.target.isStage) return 10000;\n\n    let targetX = 0;\n    let targetY = 0;\n    if (menu === '_mouse_') {\n        targetX = thread.target.runtime.ioDevices.mouse.getScratchX();\n        targetY = thread.target.runtime.ioDevices.mouse.getScratchY();\n    } else {\n        const distTarget = thread.target.runtime.getSpriteTargetByName(menu);\n        if (!distTarget) return 10000;\n        targetX = distTarget.x;\n        targetY = distTarget.y;\n    }\n\n    const dx = thread.target.x - targetX;\n    const dy = thread.target.y - targetY;\n    return Math.sqrt((dx * dx) + (dy * dy));\n}",i+="const listIndexSlow = (index, length) => {\n    if (index === 'last') {\n        return length - 1;\n    } else if (index === 'random' || index === 'any') {\n        if (length > 0) {\n            return (Math.random() * length) | 0;\n        }\n        return -1;\n    }\n    index = (+index || 0) | 0;\n    if (index < 1 || index > length) {\n        return -1;\n    }\n    return index - 1;\n};\nconst listIndex = (index, length) => {\n    if (typeof index !== 'number') {\n      return listIndexSlow(index, length);\n    }\n    index = index | 0;\n    return index < 1 || index > length ? -1 : index - 1;\n};",s.listGet="const listGet = (list, idx) => {\n    const index = listIndex(idx, list.length);\n    if (index === -1) {\n        return '';\n    }\n    return list[index];\n}",s.listReplace="const listReplace = (list, idx, value) => {\n    const index = listIndex(idx, list.value.length);\n    if (index === -1) {\n        return;\n    }\n    list.value[index] = value;\n    list._monitorUpToDate = false;\n}",s.listInsert="const listInsert = (list, idx, value) => {\n    const index = listIndex(idx, list.value.length + 1);\n    if (index === -1) {\n        return;\n    }\n    list.value.splice(index, 0, value);\n    list._monitorUpToDate = false;\n}",s.listDelete="const listDelete = (list, idx) => {\n    if (idx === 'all') {\n        list.value = [];\n        return;\n    }\n    const index = listIndex(idx, list.value.length);\n    if (index === -1) {\n        return;\n    }\n    list.value.splice(index, 1);\n    list._monitorUpToDate = false;\n}",s.listContains="const listContains = (list, item) => {\n    // TODO: evaluate whether indexOf is worthwhile here\n    if (list.value.indexOf(item) !== -1) {\n        return true;\n    }\n    for (let i = 0; i < list.value.length; i++) {\n        if (compareEqual(list.value[i], item)) {\n            return true;\n        }\n    }\n    return false;\n}",s.listIndexOf="const listIndexOf = (list, item) => {\n    for (let i = 0; i < list.value.length; i++) {\n        if (compareEqual(list.value[i], item)) {\n            return i + 1;\n        }\n    }\n    return 0;\n}",s.listContents="const listContents = list => {\n    for (let i = 0; i < list.value.length; i++) {\n        const listItem = list.value[i];\n        // this is an intentional break from what scratch 3 does to address our automatic string -> number conversions\n        // it fixes more than it breaks\n        if ((listItem + '').length !== 1) {\n            return list.value.join(' ');\n        }\n    }\n    return list.value.join('');\n}",s.colorToList="const colorToList = color => globalState.Cast.toRgbColorList(color)",s.mod="const mod = (n, modulus) => {\n    let result = n % modulus;\n    if (result / modulus < 0) result += modulus;\n    return result;\n}",s.tan="const tan = (angle) => {\n    switch (angle % 360) {\n    case -270: case 90: return Infinity;\n    case -90: case 270: return -Infinity;\n    }\n    return Math.round(Math.tan((Math.PI * angle) / 180) * 1e10) / 1e10;\n}",s.yieldThenCall="const yieldThenCall = function* (callback, ...args) {\n    yield;\n    return callback(...args);\n}",s.yieldThenCallGenerator="const yieldThenCallGenerator = function* (callback, ...args) {\n    yield;\n    return yield* callback(...args);\n}";const o=e=>{r.thread=e,e.generator.next()},a=[];o.scopedEval=e=>{const t=(e=>{let t="let stuckCounter = 0;\nconst isStuck = () => {\n    // The real time is not checked on every call for performance.\n    stuckCounter++;\n    if (stuckCounter === 100) {\n        stuckCounter = 0;\n        return globalState.thread.target.runtime.sequencer.timer.timeElapsed() > 500;\n    }\n    return false;\n};const isNotActuallyZero = val => {\n    if (typeof val !== 'string') return false;\n    for (let i = 0; i < val.length; i++) {\n        const code = val.charCodeAt(i);\n        if (code === 48 || code === 9) {\n            return false;\n        }\n    }\n    return true;\n};const compareEqualSlow = (v1, v2) => {\n    const n1 = +v1;\n    if (isNaN(n1) || (n1 === 0 && isNotActuallyZero(v1))) return ('' + v1).toLowerCase() === ('' + v2).toLowerCase();\n    const n2 = +v2;\n    if (isNaN(n2) || (n2 === 0 && isNotActuallyZero(v2))) return ('' + v1).toLowerCase() === ('' + v2).toLowerCase();\n    return n1 === n2;\n};\nconst compareEqual = (v1, v2) => (typeof v1 === 'number' && typeof v2 === 'number' && !isNaN(v1) && !isNaN(v2) || v1 === v2) ? v1 === v2 : compareEqualSlow(v1, v2);const listIndexSlow = (index, length) => {\n    if (index === 'last') {\n        return length - 1;\n    } else if (index === 'random' || index === 'any') {\n        if (length > 0) {\n            return (Math.random() * length) | 0;\n        }\n        return -1;\n    }\n    index = (+index || 0) | 0;\n    if (index < 1 || index > length) {\n        return -1;\n    }\n    return index - 1;\n};\nconst listIndex = (index, length) => {\n    if (typeof index !== 'number') {\n      return listIndexSlow(index, length);\n    }\n    index = index | 0;\n    return index < 1 || index > length ? -1 : index - 1;\n};";for(const n of Object.keys(s))e.includes(n)&&(t+="".concat(s[n],";"));return t+="return ".concat(e),t})(e);try{return new Function("globalState",t)(r)}catch(e){throw r.log.error("was unable to compile script",t),e}},o.runtimeFunctions=s,o.saveGlobalState=()=>{a.push(r.thread)},o.restoreGlobalState=()=>{r.thread=a.pop()},e.exports=o},function(e,t,n){const r=n(79),i=n(75),s=n(1),o=n(25),{Map:a}=n(24),l=n(2),c=new r;let u=-1;const d=function(e,t,n,r,i){const s=r.id,c=r.opcode,u=r._isHat,d=r._isConditional,h=r._isLoop;if(n.pushReportedValue(e),u)if(n.stackClick)n.status=o.STATUS_RUNNING;else if(t.runtime.getIsEdgeActivatedHat(c)){const r=n.target.hasEdgeActivatedValue(s),i=n.target.updateEdgeActivatedValue(s,e);(r?!i&&e:e)?n.status=o.STATUS_RUNNING:t.retireThread(n)}else e?n.status=o.STATUS_RUNNING:t.retireThread(n);else if((d||h)&&void 0!==e)t.stepToBranch(n,l.toNumber(e),h);else{if(i&&void 0!==e&&n.atStackTop()&&(n.stackClick&&t.runtime.visualReport(s,e),n.updateMonitor)){const n=t.runtime.monitorBlocks.getBlock(s).targetId;if(n&&!t.runtime.getTargetById(n))return;t.runtime.requestUpdateMonitor(a({id:s,spriteName:n?t.runtime.getTargetById(n).getName():null,value:e}))}n.status=o.STATUS_RUNNING}},h=(e,t,n,r,i)=>{if(d(e,t,n,r,i),i&&(!r._isHat||n.stackClick)){let e,t;do{const r=n.popStack();if(null===r)return;if(t=n.target.blocks.getNextBlock(r),null!==t)break;e=n.peekStackFrame()}while(null!==e&&!e.isLoop);n.pushStack(t)}},p=(e,t,n,r,i)=>{n.status===o.STATUS_RUNNING&&(n.status=o.STATUS_PROMISE_WAIT),e.then((e=>{h(e,t,n,r,i)}),(e=>{s.warn("Primitive rejected promise: ",e),h("".concat(e),t,n,r,i)}))};class m{constructor(e,t){this.id=t.id,this.opcode=t.opcode,this.fields=t.fields,this.inputs=t.inputs,this.mutation=t.mutation,this._profiler=null,this._profilerFrame=null,this._isHat=!1,this._blockFunction=null,this._definedBlockFunction=!1,this._isShadowBlock=!1,this._shadowValue=null,this._fields=Object.assign({},this.fields),this._inputs=Object.assign({},this.inputs),this._argValues={mutation:this.mutation},this._parentKey=null,this._parentValues=null,this._ops=[];const{runtime:n}=c.sequencer,{opcode:r,fields:s,inputs:o}=this;this._isHat=n.getIsHat(r),this._blockFunction=n.getOpcodeFunction(r),this._definedBlockFunction=void 0!==this._blockFunction;const a=n._flowing[r];this._isConditional=!(!a||!a.conditional),this._isLoop=!(!a||!a.loop);const l=Object.keys(s);this._isShadowBlock=!this._definedBlockFunction&&1===l.length&&0===Object.keys(o).length,this._shadowValue=this._isShadowBlock&&s[l[0]].value;for(const e in s)this._argValues[e]="VARIABLE"===e||"LIST"===e||"BROADCAST_OPTION"===e?{id:s[e].id,name:s[e].value}:s[e].value;if(delete this._inputs.custom_block,"BROADCAST_INPUT"in this._inputs){this._argValues.BROADCAST_OPTION={id:null,name:null};const t=this._inputs.BROADCAST_INPUT;if(t.block===t.shadow){const n=e.getBlock(t.shadow).fields.BROADCAST_OPTION;this._argValues.BROADCAST_OPTION.id=n.id,this._argValues.BROADCAST_OPTION.name=n.value,delete this._inputs.BROADCAST_INPUT}}for(const t in this._inputs){const n=this._inputs[t];if(n.block){const r=i.getCached(e,n.block,m);if(r._isHat)continue;this._ops.push(...r._ops),r._parentKey=t,r._parentValues=this._argValues,r._isShadowBlock&&(this._argValues[t]=r._shadowValue)}}this._definedBlockFunction&&this._ops.push(this)}}e.exports=function(e,t){const n=e.runtime;c.sequencer=e,c.thread=t;const r=t.peekStack(),s=t.peekStackFrame();let a=t.blockContainer,h=i.getCached(a,r,m);if(null===h&&(a=n.flyoutBlocks,h=i.getCached(a,r,m),null===h))return void e.retireThread(t);const f=h._ops,g=f.length;let y=0;if(null!==s.reported){const e=s.reported;for(;y<e.length;y++){const{opCached:t,inputValue:n}=e[y],r=f.find((e=>e.id===t));if(r){const e=r._parentKey,t=r._parentValues;"BROADCAST_INPUT"===e?(t.BROADCAST_OPTION.id=null,t.BROADCAST_OPTION.name=l.toString(n)):t[e]=n}}if(e.length>0){const t=e.reverse().find((e=>f.find((t=>t.id===e.opCached))));y=t?f.findIndex((e=>e.id===t.opCached))+1:0}if(null!==t.justReported&&f[y]&&f[y].id===s.reporting){const e=f[y],n=t.justReported;t.justReported=null;const r=e._parentKey,i=e._parentValues;"BROADCAST_INPUT"===r?(i.BROADCAST_OPTION.id=null,i.BROADCAST_OPTION.name=l.toString(n)):i[r]=n,y+=1}s.reporting=null,s.reported=null,s.waitingReporter=!1}const b=y;for(;y<g;y++){const n=y===g-1,r=f[y];s.op=r;const i=r._blockFunction,u=r._argValues;a.forceNoGlow||(t.requestScriptGlowInFrame=!0);const h=i(u,c),m=null!==(v=h)&&"object"==typeof v&&"function"==typeof v.then;if(m||s.waitingReporter){m&&p(h,e,t,r,n),t.justReported=null,s.reporting=f[y].id,s.reported=f.slice(0,y).map((e=>{const t=e._parentKey,n=e._parentValues;return"BROADCAST_INPUT"===t?{opCached:e.id,inputValue:n[t].BROADCAST_OPTION.name}:{opCached:e.id,inputValue:n[t]}}));break}if(t.status===o.STATUS_RUNNING)if(n)d(h,e,t,r,n);else{const e=r._parentKey,t=r._parentValues;"BROADCAST_INPUT"===e?(t.BROADCAST_OPTION.id=null,t.BROADCAST_OPTION.name=l.toString(h)):t[e]=h}else if(t.status===o.STATUS_DONE)break}var v;if(null!==n.profiler){h._profiler!==n.profiler&&function(e,t){t._profiler=e,-1===u&&(u=e.idByName("blockFunction"));const n=t._ops;for(let t=0;t<n.length;t++)n[t]._profilerFrame=e.frame(u,n[t].opcode)}(n.profiler,h);const e=Math.min(y+1,g);for(let t=b;t<e;t++)f[t]._profilerFrame.count+=1}}},function(e,t,n){const r=n(5),i=n(7),s=n(2),o=n(12),a=n(252),l=n(13);class c extends a{constructor(e,t){super(t,e.blocks),this.sprite=e,this.renderer=null,this.runtime&&(this.renderer=this.runtime.renderer),this.drawableID=null,this.dragging=!1,this.effects={color:0,fisheye:0,whirl:0,pixelate:0,mosaic:0,brightness:0,ghost:0},this.isOriginal=!0,this.isStage=!1,this.x=0,this.y=0,this.direction=90,this.draggable=!1,this.visible=!0,this.size=100,this.currentCostume=0,this.rotationStyle=c.ROTATION_STYLE_ALL_AROUND,this.volume=100,this.tempo=60,this.videoTransparency=50,this.videoState=c.VIDEO_STATE.ON,this.textToSpeechLanguage=null,this.onTargetMoved=null,this.onTargetVisualChange=null,this.interpolationData=null}initDrawable(e){this.renderer&&(this.drawableID=this.renderer.createDrawable(e)),this.isOriginal||this.runtime.startHats("control_start_as_clone",null,this)}get audioPlayer(){console.warn("get audioPlayer deprecated, please update to use .sprite.soundBank methods"),console.warn(new Error("stack for debug").stack);const e=this.sprite.soundBank,t={playSound:t=>e.play(this,t)};return Object.defineProperty(this,"audioPlayer",{configurable:!1,enumerable:!0,writable:!1,value:t}),t}initAudio(){}static get ROTATION_STYLE_ALL_AROUND(){return"all around"}static get ROTATION_STYLE_LEFT_RIGHT(){return"left-right"}static get ROTATION_STYLE_NONE(){return"don't rotate"}static get VIDEO_STATE(){return{OFF:"off",ON:"on",ON_FLIPPED:"on-flipped"}}emitVisualChange(){this.onTargetVisualChange&&this.onTargetVisualChange(this)}setXY(e,t,n){if(this.isStage)return;if(this.dragging&&!n)return;const r=this.x,i=this.y;if(this.renderer){const n=this.runtime.runtimeOptions.fencing?this.renderer.getFencedPositionOfDrawable(this.drawableID,[e,t]):[e,t];this.x=n[0],this.y=n[1],this.renderer.updateDrawablePosition(this.drawableID,n),this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())}else this.x=e,this.y=t;this.onTargetMoved&&this.onTargetMoved(this,r,i,n),this.runtime.requestTargetsUpdate(this)}_getRenderedDirectionAndScale(){let e=this.direction,t=[this.size,this.size];if(this.rotationStyle===c.ROTATION_STYLE_NONE)e=90;else if(this.rotationStyle===c.ROTATION_STYLE_LEFT_RIGHT){e=90;t=[(this.direction<0?-1:1)*this.size,this.size]}return{direction:e,scale:t}}setDirection(e){if(!this.isStage&&isFinite(e)){if(this.direction=r.wrapClamp(e,-179,180),this.renderer){const{direction:e,scale:t}=this._getRenderedDirectionAndScale();this.renderer.updateDrawableDirectionScale(this.drawableID,e,t),this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())}this.runtime.requestTargetsUpdate(this)}}setDraggable(e){this.isStage||(this.draggable=!!e,this.runtime.requestTargetsUpdate(this))}setVisible(e){this.isStage||(this.visible=!!e,this.renderer&&(this.renderer.updateDrawableVisible(this.drawableID,this.visible),this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())),this.runtime.requestTargetsUpdate(this))}setSize(e){if(!this.isStage){if(this.renderer){const t=this.renderer.getCurrentSkinSize(this.drawableID),n=t[0],i=t[1],s=this.runtime.runtimeOptions.fencing,o=s?Math.min(1,Math.max(5/n,5/i)):0,a=s?Math.min(1.5*this.runtime.stageWidth/n,1.5*this.runtime.stageHeight/i):1/0;this.size=100*r.clamp(e/100,o,a);const{direction:l,scale:c}=this._getRenderedDirectionAndScale();this.renderer.updateDrawableDirectionScale(this.drawableID,l,c),this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())}else this.size=e;this.runtime.requestTargetsUpdate(this)}}setEffect(e,t){Object.prototype.hasOwnProperty.call(this.effects,e)&&(this.effects[e]=t,this.renderer&&(this.renderer.updateDrawableEffect(this.drawableID,e,t),this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())))}clearEffects(){for(const e in this.effects)Object.prototype.hasOwnProperty.call(this.effects,e)&&(this.effects[e]=0);if(this.renderer){for(const e in this.effects)Object.prototype.hasOwnProperty.call(this.effects,e)&&this.renderer.updateDrawableEffect(this.drawableID,e,0);this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())}}setCostume(e){if((e=Math.round(e))!==1/0&&e!==-1/0&&e||(e=0),this.currentCostume=r.wrapClamp(e,0,this.sprite.costumes.length-1),this.renderer){const e=this.sprite.costumes[this.currentCostume];this.renderer.updateDrawableSkinId(this.drawableID,e.skinId),this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())}this.runtime.requestTargetsUpdate(this)}addCostume(e,t){"number"!=typeof t||isNaN(t)?this.sprite.addCostumeAt(e,this.sprite.costumes.length):this.sprite.addCostumeAt(e,t)}renameCostume(e,t){const n=this.sprite.costumes.filter(((t,n)=>e!==n)).map((e=>e.name)),r=this.getCostumes()[e].name,s=i.unusedName(t,n);if(this.getCostumes()[e].name=s,this.isStage){const e=this.runtime.targets;for(let t=0;t<e.length;t++){e[t].blocks.updateAssetName(r,s,"backdrop")}}else this.blocks.updateAssetName(r,s,"costume")}deleteCostume(e){const t=this.sprite.costumes.length;if(1===t)return null;if(e<0||e>=t)return null;const n=this.sprite.deleteCostumeAt(e);return e===this.currentCostume&&e===t-1?this.setCostume(e-1):e<this.currentCostume?this.setCostume(this.currentCostume-1):this.setCostume(this.currentCostume),this.runtime.requestTargetsUpdate(this),n}addSound(e,t){const n=this.sprite.sounds.map((e=>e.name));e.name=i.unusedName(e.name,n),"number"!=typeof t||isNaN(t)?this.sprite.sounds.push(e):this.sprite.sounds.splice(t,0,e)}renameSound(e,t){const n=this.sprite.sounds.filter(((t,n)=>e!==n)).map((e=>e.name)),r=this.sprite.sounds[e].name,s=i.unusedName(t,n);this.sprite.sounds[e].name=s,this.blocks.updateAssetName(r,s,"sound")}deleteSound(e){if(e<0||e>=this.sprite.sounds.length)return null;const t=this.sprite.sounds.splice(e,1)[0];return this.runtime.requestTargetsUpdate(this),t}setRotationStyle(e){if(e===c.ROTATION_STYLE_NONE?this.rotationStyle=c.ROTATION_STYLE_NONE:e===c.ROTATION_STYLE_ALL_AROUND?this.rotationStyle=c.ROTATION_STYLE_ALL_AROUND:e===c.ROTATION_STYLE_LEFT_RIGHT&&(this.rotationStyle=c.ROTATION_STYLE_LEFT_RIGHT),this.renderer){const{direction:e,scale:t}=this._getRenderedDirectionAndScale();this.renderer.updateDrawableDirectionScale(this.drawableID,e,t),this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())}this.runtime.requestTargetsUpdate(this)}getCostumeIndexByName(e){const t=this.getCostumes();for(let n=0;n<t.length;n++)if(t[n].name===e)return n;return-1}getCurrentCostume(){return this.getCostumes()[this.currentCostume]}getCostumes(){return this.sprite.costumes}reorderCostume(e,t){if((t=r.clamp(t,0,this.sprite.costumes.length-1))===(e=r.clamp(e,0,this.sprite.costumes.length-1)))return!1;const n=this.getCurrentCostume(),i=this.sprite.costumes[e];return this.sprite.deleteCostumeAt(e),this.addCostume(i,t),this.currentCostume=this.getCostumeIndexByName(n.name),!0}reorderSound(e,t){if((t=r.clamp(t,0,this.sprite.sounds.length-1))===(e=r.clamp(e,0,this.sprite.sounds.length-1)))return!1;const n=this.sprite.sounds[e];return this.deleteSound(e),this.addSound(n,t),!0}getSounds(){return this.sprite.sounds}updateAllDrawableProperties(){if(this.renderer){const{direction:e,scale:t}=this._getRenderedDirectionAndScale();this.renderer.updateDrawablePosition(this.drawableID,[this.x,this.y]),this.renderer.updateDrawableDirectionScale(this.drawableID,e,t),this.renderer.updateDrawableVisible(this.drawableID,this.visible);const n=this.getCostumes()[this.currentCostume];this.renderer.updateDrawableSkinId(this.drawableID,n.skinId);for(const e in this.effects)Object.prototype.hasOwnProperty.call(this.effects,e)&&this.renderer.updateDrawableEffect(this.drawableID,e,this.effects[e]);this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())}this.runtime.requestTargetsUpdate(this)}getName(){return this.sprite.name}isSprite(){return!this.isStage&&this.isOriginal}getBounds(){return this.renderer?this.runtime.renderer.getBounds(this.drawableID):null}getBoundsForBubble(){return this.renderer?this.runtime.renderer.getBoundsForBubble(this.drawableID):null}isTouchingObject(e){if("_mouse_"===e){if(!this.runtime.ioDevices.mouse)return!1;const e=this.runtime.ioDevices.mouse.getClientX(),t=this.runtime.ioDevices.mouse.getClientY();return this.isTouchingPoint(e,t)}return"_edge_"===e?this.isTouchingEdge():this.isTouchingSprite(e)}isTouchingPoint(e,t){return!!this.renderer&&this.renderer.drawableTouching(this.drawableID,e,t)}isTouchingEdge(){if(this.renderer){const e=this.runtime.stageWidth,t=this.runtime.stageHeight,n=this.getBounds();if(n.left<-e/2||n.right>e/2||n.top>t/2||n.bottom<-t/2)return!0}return!1}isTouchingSprite(e){e=s.toString(e);const t=this.runtime.getSpriteTargetByName(e);if(!t||!this.renderer)return!1;const n=t.sprite.clones.filter((e=>!e.dragging)).map((e=>e.drawableID));return this.renderer.isTouchingDrawables(this.drawableID,n)}isTouchingColor(e){return!!this.renderer&&this.renderer.isTouchingColor(this.drawableID,e)}colorIsTouchingColor(e,t){return!!this.renderer&&this.renderer.isTouchingColor(this.drawableID,e,t)}getLayerOrder(){return this.renderer?this.renderer.getDrawableOrder(this.drawableID):null}goToFront(){this.renderer&&this.renderer.setDrawableOrder(this.drawableID,1/0,l.SPRITE_LAYER),this.runtime.setExecutablePosition(this,1/0)}goToBack(){this.renderer&&this.renderer.setDrawableOrder(this.drawableID,-1/0,l.SPRITE_LAYER,!1),this.runtime.setExecutablePosition(this,-1/0)}goForwardLayers(e){this.renderer&&this.renderer.setDrawableOrder(this.drawableID,e,l.SPRITE_LAYER,!0),this.runtime.moveExecutable(this,e)}goBackwardLayers(e){this.renderer&&this.renderer.setDrawableOrder(this.drawableID,-e,l.SPRITE_LAYER,!0),this.runtime.moveExecutable(this,-e)}goBehindOther(e){if(this.renderer){const t=this.renderer.setDrawableOrder(e.drawableID,0,l.SPRITE_LAYER,!0);this.renderer.setDrawableOrder(this.drawableID,t,l.SPRITE_LAYER)}const t=this.runtime.executableTargets.indexOf(e);this.runtime.setExecutablePosition(this,t)}keepInFence(e,t,n){let r=n;r||(r={left:-this.runtime.stageWidth/2,right:this.runtime.stageWidth/2,top:this.runtime.stageHeight/2,bottom:-this.runtime.stageHeight/2});const i=this.getBounds();if(!i)return;i.left+=e-this.x,i.right+=e-this.x,i.top+=t-this.y,i.bottom+=t-this.y;let s=0,o=0;return i.left<r.left&&(s+=r.left-i.left),i.right>r.right&&(s+=r.right-i.right),i.top>r.top&&(o+=r.top-i.top),i.bottom<r.bottom&&(o+=r.bottom-i.bottom),[e+s,t+o]}makeClone(){if(!this.runtime.clonesAvailable()||this.isStage)return null;this.runtime.changeCloneCounter(1);const e=this.sprite.createClone();return e.x=this.x,e.y=this.y,e.direction=this.direction,e.draggable=this.draggable,e.visible=this.visible,e.size=this.size,e.currentCostume=this.currentCostume,e.rotationStyle=this.rotationStyle,e.effects=o.simple(this.effects),e.variables=this.duplicateVariables(),e._edgeActivatedHatValues=o.simple(this._edgeActivatedHatValues),e.initDrawable(l.SPRITE_LAYER),e.updateAllDrawableProperties(),e}duplicate(){return this.sprite.duplicate().then((e=>{const t=e.createClone();return t.x=400*(Math.random()-.5)/2,t.y=300*(Math.random()-.5)/2,t.direction=this.direction,t.draggable=this.draggable,t.visible=this.visible,t.size=this.size,t.currentCostume=this.currentCostume,t.rotationStyle=this.rotationStyle,t.effects=JSON.parse(JSON.stringify(this.effects)),t.variables=this.duplicateVariables(t.blocks),t.updateAllDrawableProperties(),t}))}onGreenFlag(){this.clearEffects()}onStopAll(){this.clearEffects()}postSpriteInfo(e){const t=Object.prototype.hasOwnProperty.call(e,"force")?e.force:null,n=Object.prototype.hasOwnProperty.call(e,"x"),r=Object.prototype.hasOwnProperty.call(e,"y");(n||r)&&this.setXY(n?e.x:this.x,r?e.y:this.y,t),Object.prototype.hasOwnProperty.call(e,"direction")&&this.setDirection(e.direction),Object.prototype.hasOwnProperty.call(e,"draggable")&&this.setDraggable(e.draggable),Object.prototype.hasOwnProperty.call(e,"rotationStyle")&&this.setRotationStyle(e.rotationStyle),Object.prototype.hasOwnProperty.call(e,"visible")&&this.setVisible(e.visible),Object.prototype.hasOwnProperty.call(e,"size")&&this.setSize(e.size)}startDrag(){this.dragging=!0}stopDrag(){this.dragging=!1}toJSON(){const e=this.getCostumes();return{id:this.id,name:this.getName(),isStage:this.isStage,x:this.x,y:this.y,size:this.size,direction:this.direction,draggable:this.draggable,currentCostume:this.currentCostume,costume:e[this.currentCostume],costumeCount:e.length,visible:this.visible,rotationStyle:this.rotationStyle,comments:this.comments,blocks:this.blocks._blocks,variables:this.variables,costumes:e,sounds:this.getSounds(),textToSpeechLanguage:this.textToSpeechLanguage,tempo:this.tempo,volume:this.volume,videoTransparency:this.videoTransparency,videoState:this.videoState}}dispose(){this.isOriginal||this.runtime.changeCloneCounter(-1),this.runtime.stopForTarget(this),this.runtime.removeExecutable(this),this.sprite.removeClone(this),this.renderer&&null!==this.drawableID&&(this.renderer.destroyDrawable(this.drawableID,this.isStage?l.BACKGROUND_LAYER:l.SPRITE_LAYER),this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw()))}}e.exports=c},function(e,t,n){const r=n(8),i=n(32);class s{constructor(e,t,n,i,o,a,l){this.id=e||r(),this.text=t,this.x=n,this.y=i,this.width=Math.max(Number(o),s.MIN_WIDTH),this.height=Math.max(Number(a),s.MIN_HEIGHT),this.minimized=l||!1,this.blockId=null}toXML(){return'<comment id="'.concat(this.id,'" x="').concat(this.x,'" y="').concat(this.y,'" w="').concat(this.width,'" h="').concat(this.height,'" pinned="').concat(null!==this.blockId,'" minimized="').concat(this.minimized,'">').concat(i(this.text),"</comment>")}static get MIN_WIDTH(){return 20}static get MIN_HEIGHT(){return 20}static get DEFAULT_WIDTH(){return 100}static get DEFAULT_HEIGHT(){return 100}}e.exports=s},function(e,t,n){const r=n(51),i=n(16),{loadSoundFromAsset:s}=n(33),{loadCostumeFromAsset:o}=n(34),a=n(102),l=n(7),c=n(13);class u{constructor(e,t){this.runtime=t,e||(e=new i(t)),this.blocks=e,this.name="",this.costumes_=[],this.sounds=[],this.clones=[],this.soundBank=null,this.runtime&&this.runtime.audioEngine&&(this.soundBank=this.runtime.audioEngine.createBank())}set costumes(e){this.costumes_=[];for(const t of e)this.addCostumeAt(t,this.costumes_.length)}get costumes(){return this.costumes_}addCostumeAt(e,t){e.name||(e.name="");const n=this.costumes_.map((e=>e.name));e.name=l.unusedName(e.name,n),this.costumes_.splice(t,0,e)}deleteCostumeAt(e){return this.costumes.splice(e,1)[0]}createClone(e){const t=new r(this,this.runtime);if(t.isOriginal=0===this.clones.length,this.clones.push(t),t.initAudio(),t.isOriginal){const n="string"==typeof e?e:c.SPRITE_LAYER;t.initDrawable(n),this.runtime.fireTargetWasCreated(t)}else this.runtime.fireTargetWasCreated(t,this.clones[0]);return t}removeClone(e){this.runtime.fireTargetWasRemoved(e);const t=this.clones.indexOf(e);t>=0&&this.clones.splice(t,1)}duplicate(){const e=new u(null,this.runtime),t=this.blocks._blocks,n=Object.keys(t).map((e=>t[e])),r=JSON.parse(JSON.stringify(n));a(r),r.forEach((t=>{e.blocks.createBlock(t)}));const i=this.runtime.targets.map((e=>e.sprite.name));e.name=l.unusedName(this.name,i);const c=[];return e.costumes=this.costumes_.map((e=>{const t=Object.assign({},e);return c.push(o(t,this.runtime)),t})),e.sounds=this.sounds.map((t=>{const n=Object.assign({},t),r=t.asset;return c.push(s(n,r,this.runtime,e.soundBank)),n})),Promise.all(c).then((()=>e))}dispose(){this.soundBank&&this.soundBank.dispose()}}e.exports=u},function(e,t){class n{static get svg(){return"http://www.w3.org/2000/svg"}static get xmlns(){return"http://www.w3.org/2000/xmlns"}static get xlink(){return"http://www.w3.org/1999/xlink"}static attributeNamespace(){return{href:n.xlink,xlink:n.xmlns,xmlns:`${n.xmlns}/`,"xmlns:xlink":`${n.xmlns}/`}}static create(e,t,r){return n.set(document.createElementNS(n.svg,e),t,r)}static get(e,t){const r=n.attributeNamespace[t],i=r?e.getAttributeNS(r,t):e.getAttribute(t);return"null"===i?null:i}static set(e,t,r){for(const i in t){let s=t[i];const o=n.attributeNamespace[i];"number"==typeof s&&r&&(s=r.number(s)),o?e.setAttributeNS(o,i,s):e.setAttribute(i,s)}return e}}e.exports=n},function(e,t){e.exports=function(e,t){var n=Object.create(SyntaxError.prototype),r=new Error;return n.name=e,n.message=t,Object.defineProperty(n,"stack",{get:function(){return(r.stack||"").replace(/^(.+\n){1,3}/,e+": "+t+"\n")}}),n}},function(e,t){function n(e){return e}function r(e,t,n,i){var s,o;switch(e.type){case"Group":s=function(e,t,n,i){var s=" "===e.combinator||i?e.combinator:" "+e.combinator+" ",o=e.terms.map((function(e){return r(e,t,n,i)})).join(s);return(e.explicit||n)&&(o=(i||","===o[0]?"[":"[ ")+o+(i?"]":" ]")),o}(e,t,n,i)+(e.disallowEmpty?"!":"");break;case"Multiplier":return r(e.term,t,n,i)+t(0===(o=e).min&&0===o.max?"*":0===o.min&&1===o.max?"?":1===o.min&&0===o.max?o.comma?"#":"+":1===o.min&&1===o.max?"":(o.comma?"#":"")+(o.min===o.max?"{"+o.min+"}":"{"+o.min+","+(0!==o.max?o.max:"")+"}"),e);case"Type":s="<"+e.name+(e.opts?t(function(e){if("Range"===e.type)return" ["+(null===e.min?"-∞":e.min)+","+(null===e.max?"∞":e.max)+"]";throw new Error("Unknown node type `"+e.type+"`")}(e.opts),e.opts):"")+">";break;case"Property":s="<'"+e.name+"'>";break;case"Keyword":s=e.name;break;case"AtKeyword":s="@"+e.name;break;case"Function":s=e.name+"(";break;case"String":case"Token":s=e.value;break;case"Comma":s=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(s,e)}e.exports=function(e,t){var i=n,s=!1,o=!1;return"function"==typeof t?i=t:t&&(s=Boolean(t.forceBraces),o=Boolean(t.compact),"function"==typeof t.decorate&&(i=t.decorate)),r(e,i,s,o)}},function(e,t){var n=Object.prototype.hasOwnProperty,r=Object.create(null),i=Object.create(null),s=45;function o(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===s&&e.charCodeAt(t+1)===s}function a(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===s&&e.charCodeAt(t+1)!==s){var n=e.indexOf("-",t+2);if(-1!==n)return e.substring(t,n+1)}return""}e.exports={keyword:function(e){if(n.call(r,e))return r[e];var t=e.toLowerCase();if(n.call(r,t))return r[e]=r[t];var i=o(t,0),s=i?"":a(t,0);return r[e]=Object.freeze({basename:t.substr(s.length),name:t,vendor:s,prefix:s,custom:i})},property:function(e){if(n.call(i,e))return i[e];var t=e,r=e[0];"/"===r?r="/"===e[1]?"//":"/":"_"!==r&&"*"!==r&&"$"!==r&&"#"!==r&&"+"!==r&&"&"!==r&&(r="");var s=o(t,r.length);if(!s&&(t=t.toLowerCase(),n.call(i,t)))return i[e]=i[t];var l=s?"":a(t,r.length),c=t.substr(0,r.length+l.length);return i[e]=Object.freeze({basename:t.substr(c.length),name:t.substr(r.length),hack:r,vendor:l,prefix:c,custom:s})},isCustomProperty:o,vendorPrefix:a}},function(e,t,n){var r=n(275),i=9,s=10,o=12,a=13,l=32,c=33,u=35,d=38,h=39,p=40,m=41,f=42,g=43,y=44,b=45,v=60,S=62,w=63,k=64,T=91,x=93,E=123,A=124,C=125,I=8734,O=function(e){for(var t="function"==typeof Uint32Array?new Uint32Array(128):new Array(128),n=0;n<128;n++)t[n]=e(String.fromCharCode(n))?1:0;return t}((function(e){return/[a-zA-Z0-9\-]/.test(e)})),M={" ":1,"&&":2,"||":3,"|":4};function N(e){return e.substringToPos(e.findWsEnd(e.pos))}function R(e){for(var t=e.pos;t<e.str.length;t++){var n=e.str.charCodeAt(t);if(n>=128||0===O[n])break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function D(e){for(var t=e.pos;t<e.str.length;t++){var n=e.str.charCodeAt(t);if(n<48||n>57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function P(e){var t=e.str.indexOf("'",e.pos+1);return-1===t&&(e.pos=e.str.length,e.error("Expect an apostrophe")),e.substringToPos(t+1)}function L(e){var t,n=null;return e.eat(E),t=D(e),e.charCode()===y?(e.pos++,e.charCode()!==C&&(n=D(e))):n=t,e.eat(C),{min:Number(t),max:n?Number(n):0}}function B(e,t){var n=function(e){var t=null,n=!1;switch(e.charCode()){case f:e.pos++,t={min:0,max:0};break;case g:e.pos++,t={min:1,max:0};break;case w:e.pos++,t={min:0,max:1};break;case u:e.pos++,n=!0,t=e.charCode()===E?L(e):{min:1,max:0};break;case E:t=L(e);break;default:return null}return{type:"Multiplier",comma:n,min:t.min,max:t.max,term:null}}(e);return null!==n?(n.term=t,n):t}function z(e){var t=e.peek();return""===t?null:{type:"Token",value:t}}function U(e){var t,n=null;return e.eat(v),t=R(e),e.charCode()===p&&e.nextCharCode()===m&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===T&&(N(e),n=function(e){var t=null,n=null,r=1;return e.eat(T),e.charCode()===b&&(e.peek(),r=-1),-1==r&&e.charCode()===I?e.peek():t=r*Number(D(e)),N(e),e.eat(y),N(e),e.charCode()===I?e.peek():(r=1,e.charCode()===b&&(e.peek(),r=-1),n=r*Number(D(e))),e.eat(x),null===t&&null===n?null:{type:"Range",min:t,max:n}}(e)),e.eat(S),B(e,{type:"Type",name:t,opts:n})}function j(e,t){function n(e,t){return{type:"Group",terms:e,combinator:t,disallowEmpty:!1,explicit:!1}}for(t=Object.keys(t).sort((function(e,t){return M[e]-M[t]}));t.length>0;){for(var r=t.shift(),i=0,s=0;i<e.length;i++){var o=e[i];"Combinator"===o.type&&(o.value===r?(-1===s&&(s=i-1),e.splice(i,1),i--):(-1!==s&&i-s>1&&(e.splice(s,i-s,n(e.slice(s,i),r)),i=s+1),s=-1))}-1!==s&&t.length&&e.splice(s,i-s,n(e.slice(s,i),r))}return r}function F(e){for(var t,n=[],r={},i=null,s=e.pos;t=W(e);)"Spaces"!==t.type&&("Combinator"===t.type?(null!==i&&"Combinator"!==i.type||(e.pos=s,e.error("Unexpected combinator")),r[t.value]=!0):null!==i&&"Combinator"!==i.type&&(r[" "]=!0,n.push({type:"Combinator",value:" "})),n.push(t),i=t,s=e.pos);return null!==i&&"Combinator"===i.type&&(e.pos-=s,e.error("Unexpected combinator")),{type:"Group",terms:n,combinator:j(n,r)||" ",disallowEmpty:!1,explicit:!1}}function W(e){var t=e.charCode();if(t<128&&1===O[t])return function(e){var t;return t=R(e),e.charCode()===p?(e.pos++,{type:"Function",name:t}):B(e,{type:"Keyword",name:t})}(e);switch(t){case x:break;case T:return B(e,function(e){var t;return e.eat(T),t=F(e),e.eat(x),t.explicit=!0,e.charCode()===c&&(e.pos++,t.disallowEmpty=!0),t}(e));case v:return e.nextCharCode()===h?function(e){var t;return e.eat(v),e.eat(h),t=R(e),e.eat(h),e.eat(S),B(e,{type:"Property",name:t})}(e):U(e);case A:return{type:"Combinator",value:e.substringToPos(e.nextCharCode()===A?e.pos+2:e.pos+1)};case d:return e.pos++,e.eat(d),{type:"Combinator",value:"&&"};case y:return e.pos++,{type:"Comma"};case h:return B(e,{type:"String",value:P(e)});case l:case i:case s:case a:case o:return{type:"Spaces",value:N(e)};case k:return(t=e.nextCharCode())<128&&1===O[t]?(e.pos++,{type:"AtKeyword",name:R(e)}):z(e);case f:case g:case w:case u:case c:break;case E:if((t=e.nextCharCode())<48||t>57)return z(e);break;default:return z(e)}}function V(e){var t=new r(e),n=F(t);return t.pos!==e.length&&t.error("Unexpected input"),1===n.terms.length&&"Group"===n.terms[0].type&&(n=n.terms[0]),n}V("[a&&<b>#|<'c'>*||e() f{2} /,(% g#{1,2} h{2,})]!"),e.exports=V},function(e,t){t.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function i(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function s(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function o(e){var n=e,r=i(e);if(r){if(!r.path)return e;n=r.path}for(var o,a=t.isAbsolute(n),l=n.split(/\/+/),c=0,u=l.length-1;u>=0;u--)"."===(o=l[u])?l.splice(u,1):".."===o?c++:c>0&&(""===o?(l.splice(u+1,c),c=0):(l.splice(u,2),c--));return""===(n=l.join("/"))&&(n=a?"/":"."),r?(r.path=n,s(r)):n}function a(e,t){""===e&&(e="."),""===t&&(t=".");var n=i(t),a=i(e);if(a&&(e=a.path||"/"),n&&!n.scheme)return a&&(n.scheme=a.scheme),s(n);if(n||t.match(r))return t;if(a&&!a.host&&!a.path)return a.host=t,s(a);var l="/"===t.charAt(0)?t:o(e.replace(/\/+$/,"")+"/"+t);return a?(a.path=l,s(a)):l}t.urlParse=i,t.urlGenerate=s,t.normalize=o,t.join=a,t.isAbsolute=function(e){return"/"===e.charAt(0)||n.test(e)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var l=!("__proto__"in Object.create(null));function c(e){return e}function u(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function d(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}t.toSetString=l?c:function(e){return u(e)?"$"+e:e},t.fromSetString=l?c:function(e){return u(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,n){var r=d(e.source,t.source);return 0!==r||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)||n||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=e.generatedLine-t.generatedLine)?r:d(e.name,t.name)},t.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r||0!==(r=e.generatedColumn-t.generatedColumn)||n||0!==(r=d(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:d(e.name,t.name)},t.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=d(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:d(e.name,t.name)},t.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},t.computeSourceURL=function(e,t,n){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),n){var r=i(n);if(!r)throw new Error("sourceMapURL could not be parsed");if(r.path){var l=r.path.lastIndexOf("/");l>=0&&(r.path=r.path.substring(0,l+1))}t=a(s(r),t)}return o(t)}},function(e,t,n){e.exports={AnPlusB:n(302),Atrule:n(303),AtrulePrelude:n(304),AttributeSelector:n(305),Block:n(306),Brackets:n(307),CDC:n(308),CDO:n(309),ClassSelector:n(310),Combinator:n(311),Comment:n(312),Declaration:n(313),DeclarationList:n(314),Dimension:n(315),Function:n(316),Hash:n(317),Identifier:n(318),IdSelector:n(319),MediaFeature:n(320),MediaQuery:n(321),MediaQueryList:n(322),Nth:n(323),Number:n(324),Operator:n(325),Parentheses:n(326),Percentage:n(327),PseudoClassSelector:n(328),PseudoElementSelector:n(329),Ratio:n(330),Raw:n(17),Rule:n(331),Selector:n(332),SelectorList:n(333),String:n(334),StyleSheet:n(335),TypeSelector:n(336),UnicodeRange:n(337),Url:n(338),Value:n(339),WhiteSpace:n(340)}},function(e,t){e.exports=class{constructor(e,t,n){this.audioEngine=e,this.audioPlayer=t,this.lastEffect=n,this.value=this.DEFAULT_VALUE,this.initialized=!1,this.inputNode=null,this.outputNode=null,this.target=null}get name(){throw new Error("".concat(this.constructor.name,".name is not implemented"))}get DEFAULT_VALUE(){return 0}get _isPatch(){return this.initialized&&(this.value!==this.DEFAULT_VALUE||null===this.audioPlayer)}getInputNode(){return this._isPatch?this.inputNode:this.target.getInputNode()}initialize(){throw new Error("".concat(this.constructor.name,".initialize is not implemented."))}_set(){throw new Error("".concat(this.constructor.name,"._set is not implemented."))}set(e){this.initialized||this.initialize();const t=this._isPatch;t&&(this._lastPatch=this.audioEngine.currentTime),e!==this.value&&this._set(e),this._isPatch!==t&&null!==this.target&&this.connect(this.target)}update(){}clear(){this.set(this.DEFAULT_VALUE)}connect(e){if(null===e)throw new Error("target may not be null");const t=e=>{if(e)return e===this||t(e.target)};if(t(e))throw new Error("Effect cannot connect to itself");this.target=e,null!==this.outputNode&&this.outputNode.disconnect(),(this._isPatch||this._lastPatch+this.audioEngine.DECAY_DURATION<this.audioEngine.currentTime)&&this.outputNode.connect(e.getInputNode()),null===this.lastEffect?null!==this.audioPlayer&&this.audioPlayer.connect(this):this.lastEffect.connect(this)}dispose(){this.inputNode=null,this.outputNode=null,this.target=null,this.initialized=!1}}},function(e,t,n){"use strict";var r=n(116),i=n.n(r),s=n(117),o=n.n(s),a=n(118),l=i()((function(e){return e[1]})),c=o()(a.a);l.push([e.i,'.sc-root {\n  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;\n  width: 100%;\n  height: 100%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  position: relative;\n  --sc-accent-color: #ff4c4c;\n  --sc-accent-color-transparent: #ff4c4c59;\n}\n.sc-layers {\n  position: relative;\n}\n.sc-layers > * {\n  position: absolute;\n}\n.sc-scaled-overlays-outer {\n  overflow: hidden;\n  width: 100%;\n  height: 100%;\n  pointer-events: none;\n}\n.sc-scaled-overlays-inner {\n  transform-origin: top left;\n}\n.sc-root * {\n  box-sizing: border-box;\n}\n.sc-canvas {\n  width: 100%;\n  height: 100%;\n}\n\n.sc-question-root {\n  bottom: 0;\n  width: 100%;\n  color: black;\n  pointer-events: all;\n}\n.sc-question-inner {\n  margin: 0.5rem;\n  border: 1px solid hsla(0, 0%, 0%, 0.15);\n  border-radius: 0.5rem;\n  border-width: 2px;\n  padding: 1rem;\n  background: white;\n}\n.sc-question-text {\n  font-size: 12px;\n  padding-bottom: 8px;\n  font-weight: bold;\n}\n.sc-question-input-outer {\n  position: relative;\n}\n.sc-question-input {\n  width: 100%;\n  height: 2rem;\n  padding: 0 12px;\n  font-size: 10px;\n  border-width: 1px;\n  border-style: solid;\n  border-color: hsla(0, 0%, 0%, 0.15);\n  border-radius: 2rem;\n  outline: none;\n  transition: 0.25s ease-out;\n  box-shadow: none;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  color: inherit;\n}\n.sc-question-input:focus {\n  border-color: var(--sc-accent-color);\n  box-shadow: 0px 0px 0px 3px var(--sc-accent-color-transparent);\n}\n.sc-question-input:hover {\n  border-color: var(--sc-accent-color);\n}\n.sc-question-submit-button {\n  top: 4px;\n  right: 4px;\n  width: 24px;\n  height: 24px;\n  position: absolute;\n  outline: none;\n  border: none;\n  padding: 2px;\n  margin: 0;\n  border-radius: 100%;\n  background: none;\n  cursor: pointer;\n  color: white;\n  background-color: var(--sc-accent-color);\n  background-image: url('+c+');\n  overflow: hidden;\n}\n.sc-question-submit-button:focus {\n  outline: 2px solid black;\n}\n.sc-question-submit-button-image {\n  width: 100%;\n  height: 100%;\n}\n\n.sc-monitor-overlay {\n\n}\n.sc-monitor-root {\n  position: absolute;\n  top: 0;\n  left: 0;\n  background: hsla(215, 100%, 95%, 1);\n  color: #575e75;\n  border: 1px solid hsla(0, 0%, 0%, 0.15);\n  border-radius: 4px;\n  font-size: 12px;\n  overflow: hidden;\n  user-select: none;\n  -webkit-user-select: none;\n  display: flex;\n  flex-direction: column;\n  pointer-events: all;\n}\n.sc-monitor-inner {\n  display: flex;\n  flex-direction: column;\n  padding: 3px;\n}\n.sc-monitor-row {\n  display: flex;\n  flex-direction: row;\n}\n.sc-monitor-label {\n  font-weight: bold;\n  text-align: center;\n  margin: 0 5px;\n  white-space: nowrap;\n}\n.sc-monitor-slider {\n  margin: 0;\n  width: 100%;\n}\n.sc-monitor-value {\n  min-width: 40px;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  text-align: center;\n  color: white;\n  margin: 0 5px;\n  border-radius: 4px;\n  padding: 0 2px;\n  white-space: pre-wrap;\n  background-color: #0fbd8c;\n}\n.sc-monitor-root[data-opcode^="motion_"] .sc-monitor-value-color {\n  background-color: #4c97ff;\n}\n.sc-monitor-root[data-opcode^="sensing_"] .sc-monitor-value-color {\n  background-color: #5cb1d6;\n}\n.sc-monitor-root[data-opcode^="data_"] .sc-monitor-value-color {\n  background-color: #ff8c1a;\n}\n.sc-monitor-root[data-opcode^="looks_"] .sc-monitor-value-color {\n  background-color: #9966ff;\n}\n.sc-monitor-root[data-opcode^="sound_"] .sc-monitor-value-color {\n  background-color: #cf63cf;\n}\n.sc-monitor-large-value {\n  min-height: 1.4rem;\n  min-width: 3rem;\n  padding: 0.1rem 0.25rem;\n  text-align: center;\n  color: white;\n  font-size: 1rem;\n  white-space: pre-wrap;\n}\n\n.sc-monitor-list-label {\n  background-color: white;\n  text-align: center;\n  font-weight: bold;\n  border-bottom: 1px solid hsla(0, 0%, 0%, 0.15);\n  padding: 3px;\n}\n.sc-monitor-list-footer {\n  display: flex;\n  background-color: white;\n  text-align: center;\n  font-weight: bold;\n  padding: 3px;\n}\n.sc-monitor-list-footer-text {\n  text-align: center;\n  flex-grow: 1;\n}\n.sc-monitor-row-delete, .sc-monitor-list-add {\n  font-weight: bold;\n  background: none;\n  border: none;\n  outline: none;\n  font-family: inherit;\n  color: inherit;\n  cursor: pointer;\n  margin: 0;\n  padding: 0;\n}\n.sc-monitor-rows-outer {\n  flex-grow: 1;\n}\n.sc-monitor-rows-inner {\n  height: 100%;\n  overflow-y: auto;\n  overflow-x: hidden;\n  position: relative;\n}\n.sc-monitor-rows-endpoint {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 1px;\n  height: 1px;\n  pointer-events: none;\n}\n\n.sc-monitor-row-root {\n  position: absolute;\n  top: 0;\n  left: 0;\n  display: flex;\n  justify-content: space-around;\n  align-items: center;\n  padding: 2px;\n  width: 100%;\n}\n.sc-monitor-row-index {\n  font-weight: bold;\n  color: hsla(225, 15%, 40%, 1);\n  margin: 0 3px;\n}\n.sc-monitor-row-value-outer {\n  display: flex;\n  align-items: center;\n  min-width: 40px;\n  height: 22px;\n  border: 1px solid hsla(0, 0%, 0%, 0.15);\n  background-color: #fc662c;\n  color: white;\n  margin: 0 3px;\n  border-radius: calc(0.5rem / 2);\n  flex-grow: 1;\n}\n.sc-monitor-row-value-editing .sc-monitor-row-value-outer {\n  background-color: #e25c28;\n}\n.sc-monitor-row-value-inner {\n  padding: 3px 5px;\n  width: 100%;\n  color: inherit;\n  background: none;\n  border: none;\n  font: inherit;\n  outline: none;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  user-select: text;\n  -webkit-user-select: text;\n  white-space: pre;\n}\n.sc-monitor-row-value-editing .sc-monitor-row-value-inner {\n  padding-right: 0;\n}\n.sc-monitor-row-delete {\n  display: none;\n  font-size: 150%;\n  padding: 0 2px;\n}\n.sc-monitor-row-value-editing .sc-monitor-row-delete {\n  display: block;\n}\n.sc-monitor-empty {\n  text-align: center;\n  padding: 5px;\n}\n\n.sc-controls-bar {\n  transform: translateY(-100%);\n  display: flex;\n  width: 100%;\n  justify-content: space-between;\n  flex-wrap: nowrap;\n}\n.sc-controls-bar > * {\n  display: flex;\n  align-items: center;\n  flex-wrap: nowrap;\n}\n\n.sc-context-menu {\n  position: absolute;\n  color: black;\n  box-shadow: 0px 0px 5px 1px hsla(0, 0%, 0%, 0.25);\n  min-width: 130px;\n  opacity: 0;\n  transition: .2s opacity;\n}\n.sc-context-menu-item {\n  display: block;\n  width: 100%;\n  background-color: white;\n  border: none;\n  border-radius: 0;\n  cursor: pointer;\n  text-align: left;\n  font-family: inherit;\n  font-size: 0.85em;\n  padding: 8px 12px;\n  margin: 0;\n  transition: .1s background-color, .1s color;\n}\n.sc-context-menu-item:focus {\n  outline: 2px solid black;\n}\n.sc-context-menu-item:hover,\n.sc-context-menu-item:active {\n  color: white;\n  background-color: var(--sc-accent-color);\n}\n.sc-context-menu-item:first-child {\n  border-radius: 4px 4px 0 0;\n}\n.sc-context-menu-item:last-child {\n  border-radius: 0 0 4px 4px;\n}\n\n.sc-dropping {\n  background-color: var(--sc-accent-color-transparent);\n}\n',""]),l.locals={root:"sc-root",layers:"sc-layers","scaled-overlays-outer":"sc-scaled-overlays-outer",scaledOverlaysOuter:"sc-scaled-overlays-outer","scaled-overlays-inner":"sc-scaled-overlays-inner",scaledOverlaysInner:"sc-scaled-overlays-inner",canvas:"sc-canvas","question-root":"sc-question-root",questionRoot:"sc-question-root","question-inner":"sc-question-inner",questionInner:"sc-question-inner","question-text":"sc-question-text",questionText:"sc-question-text","question-input-outer":"sc-question-input-outer",questionInputOuter:"sc-question-input-outer","question-input":"sc-question-input",questionInput:"sc-question-input","question-submit-button":"sc-question-submit-button",questionSubmitButton:"sc-question-submit-button","question-submit-button-image":"sc-question-submit-button-image",questionSubmitButtonImage:"sc-question-submit-button-image","monitor-overlay":"sc-monitor-overlay",monitorOverlay:"sc-monitor-overlay","monitor-root":"sc-monitor-root",monitorRoot:"sc-monitor-root","monitor-inner":"sc-monitor-inner",monitorInner:"sc-monitor-inner","monitor-row":"sc-monitor-row",monitorRow:"sc-monitor-row","monitor-label":"sc-monitor-label",monitorLabel:"sc-monitor-label","monitor-slider":"sc-monitor-slider",monitorSlider:"sc-monitor-slider","monitor-value":"sc-monitor-value",monitorValue:"sc-monitor-value","monitor-value-color":"sc-monitor-value-color",monitorValueColor:"sc-monitor-value-color","monitor-large-value":"sc-monitor-large-value",monitorLargeValue:"sc-monitor-large-value","monitor-list-label":"sc-monitor-list-label",monitorListLabel:"sc-monitor-list-label","monitor-list-footer":"sc-monitor-list-footer",monitorListFooter:"sc-monitor-list-footer","monitor-list-footer-text":"sc-monitor-list-footer-text",monitorListFooterText:"sc-monitor-list-footer-text","monitor-row-delete":"sc-monitor-row-delete",monitorRowDelete:"sc-monitor-row-delete","monitor-list-add":"sc-monitor-list-add",monitorListAdd:"sc-monitor-list-add","monitor-rows-outer":"sc-monitor-rows-outer",monitorRowsOuter:"sc-monitor-rows-outer","monitor-rows-inner":"sc-monitor-rows-inner",monitorRowsInner:"sc-monitor-rows-inner","monitor-rows-endpoint":"sc-monitor-rows-endpoint",monitorRowsEndpoint:"sc-monitor-rows-endpoint","monitor-row-root":"sc-monitor-row-root",monitorRowRoot:"sc-monitor-row-root","monitor-row-index":"sc-monitor-row-index",monitorRowIndex:"sc-monitor-row-index","monitor-row-value-outer":"sc-monitor-row-value-outer",monitorRowValueOuter:"sc-monitor-row-value-outer","monitor-row-value-editing":"sc-monitor-row-value-editing",monitorRowValueEditing:"sc-monitor-row-value-editing","monitor-row-value-inner":"sc-monitor-row-value-inner",monitorRowValueInner:"sc-monitor-row-value-inner","monitor-empty":"sc-monitor-empty",monitorEmpty:"sc-monitor-empty","controls-bar":"sc-controls-bar",controlsBar:"sc-controls-bar","context-menu":"sc-context-menu",contextMenu:"sc-context-menu","context-menu-item":"sc-context-menu-item",contextMenuItem:"sc-context-menu-item",dropping:"sc-dropping"},t.a=l},function(e,t,n){const r=n(125);e.exports=r},function(e,t,n){"use strict";(function(e){!function(e){function t(){}function n(){}var r=String.fromCharCode,i={}.toString,s=i.call(e.SharedArrayBuffer),o=i(),a=e.Uint8Array,l=a||Array,c=a?ArrayBuffer:l,u=c.isView||function(e){return e&&"length"in e},d=i.call(c.prototype);c=n.prototype;var h=e.TextEncoder,p=new(a?Uint16Array:l)(32);t.prototype.decode=function(e){if(!u(e)){var t=i.call(e);if(t!==d&&t!==s&&t!==o)throw TypeError("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");e=a?new l(e):e||[]}for(var n,c,h,m=t="",f=0,g=0|e.length,y=g-32|0,b=0,v=0,S=0,w=-1;f<g;){for(n=f<=y?32:g-f|0;S<n;f=f+1|0,S=S+1|0){switch((c=255&e[f])>>4){case 15:if(2!=(h=255&e[f=f+1|0])>>6||247<c){f=f-1|0;break}b=(7&c)<<6|63&h,v=5,c=256;case 14:b<<=6,b|=(15&c)<<6|63&(h=255&e[f=f+1|0]),v=2==h>>6?v+4|0:24,c=c+256&768;case 13:case 12:b<<=6,b|=(31&c)<<6|63&(h=255&e[f=f+1|0]),v=v+7|0,f<g&&2==h>>6&&b>>v&&1114112>b?(c=b,0<=(b=b-65536|0)&&(w=55296+(b>>10)|0,c=56320+(1023&b)|0,31>S?(p[S]=w,S=S+1|0,w=-1):(h=w,w=c,c=h))):(f=f-(c>>=8)-1|0,c=65533),b=v=0,n=f<=y?32:g-f|0;default:p[S]=c;continue;case 11:case 10:case 9:case 8:}p[S]=65533}if(m+=r(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],p[9],p[10],p[11],p[12],p[13],p[14],p[15],p[16],p[17],p[18],p[19],p[20],p[21],p[22],p[23],p[24],p[25],p[26],p[27],p[28],p[29],p[30],p[31]),32>S&&(m=m.slice(0,S-32|0)),f<g){if(p[0]=w,S=~w>>>31,w=-1,m.length<t.length)continue}else-1!==w&&(m+=r(w));t+=m,m=""}return t},c.encode=function(e){var t,n=0|(e=void 0===e?"":""+e).length,r=new l(8+(n<<1)|0),i=0,s=!a;for(t=0;t<n;t=t+1|0,i=i+1|0){var o=0|e.charCodeAt(t);if(127>=o)r[i]=o;else{if(2047>=o)r[i]=192|o>>6;else{e:{if(55296<=o)if(56319>=o){var c=0|e.charCodeAt(t=t+1|0);if(56320<=c&&57343>=c){if(65535<(o=(o<<10)+c-56613888|0)){r[i]=240|o>>18,r[i=i+1|0]=128|o>>12&63,r[i=i+1|0]=128|o>>6&63,r[i=i+1|0]=128|63&o;continue}break e}o=65533}else 57343>=o&&(o=65533);!s&&t<<1<i&&t<<1<(i-7|0)&&(s=!0,(c=new l(3*n)).set(r),r=c)}r[i]=224|o>>12,r[i=i+1|0]=128|o>>6&63}r[i=i+1|0]=128|63&o}}return a?r.subarray(0,i):r.slice(0,i)},h||(e.TextDecoder=t,e.TextEncoder=n)}(""+void 0==typeof e?""+void 0==typeof self?this:self:e)}).call(this,n(9))},function(e,t,n){const r=n(126),i=n(1);e.exports=new class extends r{constructor(){super(),this.services={},this.workerClass="undefined"==typeof Worker?null:Worker,this.workers=[]}callSync(e,t){const{provider:n,isRemote:r}=this._getServiceProvider(e);if(n){if(r)throw new Error("Cannot use 'callSync' on remote provider for service ".concat(e,"."));for(var i=arguments.length,s=new Array(i>2?i-2:0),o=2;o<i;o++)s[o-2]=arguments[o];return n[t].apply(n,s)}throw new Error("Provider not found for service: ".concat(e))}setServiceSync(e,t){Object.prototype.hasOwnProperty.call(this.services,e)&&i.warn("Central dispatch replacing existing service provider for ".concat(e)),this.services[e]=t}setService(e,t){try{return this.setServiceSync(e,t),Promise.resolve()}catch(e){return Promise.reject(e)}}addWorker(e){-1===this.workers.indexOf(e)?(this.workers.push(e),e.onmessage=this._onMessage.bind(this,e),this._remoteCall(e,"dispatch","handshake").catch((e=>{i.error("Could not handshake with worker: ".concat(e))}))):i.warn("Central dispatch ignoring attempt to add duplicate worker")}_getServiceProvider(e){const t=this.services[e];return t&&{provider:t,isRemote:Boolean(this.workerClass&&t instanceof this.workerClass||t.isRemote)}}_onDispatchMessage(e,t){let n;if("setService"===t.method)n=this.setService(t.args[0],e);else i.error("Central dispatch received message for unknown method: ".concat(t.method));return n}}},function(e,t,n){const r=n(6);e.exports=function(e,t,n){return e&&e.id&&e.default?r(e,t,n):e}},function(e,t){var n="long",r="short",i="narrow",s="numeric",o="2-digit";e.exports={number:{decimal:{style:"decimal"},integer:{style:"decimal",maximumFractionDigits:0},currency:{style:"currency",currency:"USD"},percent:{style:"percent"},default:{style:"decimal"}},date:{short:{month:s,day:s,year:o},medium:{month:r,day:s,year:s},long:{month:n,day:s,year:s},full:{month:n,day:s,year:s,weekday:n},default:{month:r,day:s,year:s}},time:{short:{hour:s,minute:s},medium:{hour:s,minute:s,second:s},long:{hour:s,minute:s,second:s,timeZoneName:r},full:{hour:s,minute:s,second:s,timeZoneName:r},default:{hour:s,minute:s,second:s}},duration:{default:{hours:{minimumIntegerDigits:1,maximumFractionDigits:0},minutes:{minimumIntegerDigits:2,maximumFractionDigits:0},seconds:{minimumIntegerDigits:2,maximumFractionDigits:3}}},parseNumberPattern:function(e){if(e){var t={},n=e.match(/\b[A-Z]{3}\b/i),r=e.replace(/[^¤]/g,"").length;if(!r&&n&&(r=1),r?(t.style="currency",t.currencyDisplay=1===r?"symbol":2===r?"code":"name",t.currency=n?n[0].toUpperCase():"USD"):e.indexOf("%")>=0&&(t.style="percent"),!/[@#0]/.test(e))return t.style?t:void 0;if(t.useGrouping=e.indexOf(",")>=0,/E\+?[@#0]+/i.test(e)||e.indexOf("@")>=0){var i=e.replace(/E\+?[@#0]+|[^@#0]/gi,"");t.minimumSignificantDigits=Math.min(Math.max(i.replace(/[^@0]/g,"").length,1),21),t.maximumSignificantDigits=Math.min(Math.max(i.length,1),21)}else{for(var s=e.replace(/[^#0.]/g,"").split("."),o=s[0],a=o.length-1;"0"===o[a];)--a;t.minimumIntegerDigits=Math.min(Math.max(o.length-1-a,1),21);var l=s[1]||"";for(a=0;"0"===l[a];)++a;for(t.minimumFractionDigits=Math.min(Math.max(a,0),20);"#"===l[a];)++a;t.maximumFractionDigits=Math.min(Math.max(a,0),20)}return t}},parseDatePattern:function(e){if(e){for(var t={},a=0;a<e.length;){for(var l=e[a],c=1;e[++a]===l;)++c;switch(l){case"G":t.era=5===c?i:4===c?n:r;break;case"y":case"Y":t.year=2===c?o:s;break;case"M":case"L":c=Math.min(Math.max(c-1,0),4),t.month=[s,o,r,n,i][c];break;case"E":case"e":case"c":t.weekday=5===c?i:4===c?n:r;break;case"d":case"D":t.day=2===c?o:s;break;case"h":case"K":t.hour12=!0,t.hour=2===c?o:s;break;case"H":case"k":t.hour12=!1,t.hour=2===c?o:s;break;case"m":t.minute=2===c?o:s;break;case"s":case"S":t.second=2===c?o:s;break;case"z":case"Z":case"v":case"V":t.timeZoneName=1===c?r:n}}return Object.keys(t).length?t:void 0}}}},function(e,t){e.exports=function(e,t){if("string"==typeof e&&t[e])return e;for(var n=[].concat(e||[]),r=0,i=n.length;r<i;++r)for(var s=n[r].split("-");s.length;){var o=s.join("-");if(t[o])return o;s.pop()}}},function(e,t,n){"use strict";var r="zero",i="one",s="two",o="few",a="many",l="other",c=[function(e){return 1===+e?i:l},function(e){var t=+e;return 0<=t&&t<=1?i:l},function(e){return 0===Math.floor(Math.abs(+e))||1===+e?i:l},function(e){var t=+e;return 0===t?r:1===t?i:2===t?s:3<=t%100&&t%100<=10?o:11<=t%100&&t%100<=99?a:l},function(e){var t=Math.floor(Math.abs(+e)),n=(e+".").split(".")[1].length;return 1===t&&0===n?i:l},function(e){var t=+e;return t%10==1&&t%100!=11?i:2<=t%10&&t%10<=4&&(t%100<12||14<t%100)?o:t%10==0||5<=t%10&&t%10<=9||11<=t%100&&t%100<=14?a:l},function(e){var t=+e;return t%10==1&&t%100!=11&&t%100!=71&&t%100!=91?i:t%10==2&&t%100!=12&&t%100!=72&&t%100!=92?s:(3<=t%10&&t%10<=4||t%10==9)&&(t%100<10||19<t%100)&&(t%100<70||79<t%100)&&(t%100<90||99<t%100)?o:0!==t&&t%1e6==0?a:l},function(e){var t=Math.floor(Math.abs(+e)),n=(e+".").split(".")[1].length,r=+(e+".").split(".")[1];return 0===n&&t%10==1&&t%100!=11||r%10==1&&r%100!=11?i:0===n&&2<=t%10&&t%10<=4&&(t%100<12||14<t%100)||2<=r%10&&r%10<=4&&(r%100<12||14<r%100)?o:l},function(e){var t=Math.floor(Math.abs(+e)),n=(e+".").split(".")[1].length;return 1===t&&0===n?i:2<=t&&t<=4&&0===n?o:0!==n?a:l},function(e){var t=+e;return 0===t?r:1===t?i:2===t?s:3===t?o:6===t?a:l},function(e){var t=Math.floor(Math.abs(+e)),n=+(""+e).replace(/^[^.]*.?|0+$/g,"");return 1===+e||0!==n&&(0===t||1===t)?i:l},function(e){var t=Math.floor(Math.abs(+e)),n=(e+".").split(".")[1].length,r=+(e+".").split(".")[1];return 0===n&&t%100==1||r%100==1?i:0===n&&t%100==2||r%100==2?s:0===n&&3<=t%100&&t%100<=4||3<=r%100&&r%100<=4?o:l},function(e){var t=Math.floor(Math.abs(+e));return 0===t||1===t?i:l},function(e){var t=Math.floor(Math.abs(+e)),n=(e+".").split(".")[1].length,r=+(e+".").split(".")[1];return 0===n&&(1===t||2===t||3===t)||0===n&&t%10!=4&&t%10!=6&&t%10!=9||0!==n&&r%10!=4&&r%10!=6&&r%10!=9?i:l},function(e){var t=+e;return 1===t?i:2===t?s:3<=t&&t<=6?o:7<=t&&t<=10?a:l},function(e){var t=+e;return 1===t||11===t?i:2===t||12===t?s:3<=t&&t<=10||13<=t&&t<=19?o:l},function(e){var t=Math.floor(Math.abs(+e)),n=(e+".").split(".")[1].length;return 0===n&&t%10==1?i:0===n&&t%10==2?s:0!==n||t%100!=0&&t%100!=20&&t%100!=40&&t%100!=60&&t%100!=80?0!==n?a:l:o},function(e){var t=Math.floor(Math.abs(+e)),n=(e+".").split(".")[1].length,r=+e;return 1===t&&0===n?i:2===t&&0===n?s:0===n&&(r<0||10<r)&&r%10==0?a:l},function(e){var t=Math.floor(Math.abs(+e)),n=+(""+e).replace(/^[^.]*.?|0+$/g,"");return 0===n&&t%10==1&&t%100!=11||0!==n?i:l},function(e){var t=+e;return 1===t?i:2===t?s:l},function(e){var t=+e;return 0===t?r:1===t?i:l},function(e){var t=Math.floor(Math.abs(+e)),n=+e;return 0===n?r:0!==t&&1!==t||0===n?l:i},function(e){var t=+(e+".").split(".")[1],n=+e;return n%10==1&&(n%100<11||19<n%100)?i:2<=n%10&&n%10<=9&&(n%100<11||19<n%100)?o:0!==t?a:l},function(e){var t=(e+".").split(".")[1].length,n=+(e+".").split(".")[1],s=+e;return s%10==0||11<=s%100&&s%100<=19||2===t&&11<=n%100&&n%100<=19?r:s%10==1&&s%100!=11||2===t&&n%10==1&&n%100!=11||2!==t&&n%10==1?i:l},function(e){var t=Math.floor(Math.abs(+e)),n=(e+".").split(".")[1].length,r=+(e+".").split(".")[1];return 0===n&&t%10==1&&t%100!=11||r%10==1&&r%100!=11?i:l},function(e){var t=Math.floor(Math.abs(+e)),n=(e+".").split(".")[1].length,r=+e;return 1===t&&0===n?i:0!==n||0===r||1!==r&&1<=r%100&&r%100<=19?o:l},function(e){var t=+e;return 1===t?i:0===t||2<=t%100&&t%100<=10?o:11<=t%100&&t%100<=19?a:l},function(e){var t=Math.floor(Math.abs(+e)),n=(e+".").split(".")[1].length;return 1===t&&0===n?i:0===n&&2<=t%10&&t%10<=4&&(t%100<12||14<t%100)?o:0===n&&1!==t&&0<=t%10&&t%10<=1||0===n&&5<=t%10&&t%10<=9||0===n&&12<=t%100&&t%100<=14?a:l},function(e){var t=Math.floor(Math.abs(+e));return 0<=t&&t<=1?i:l},function(e){var t=Math.floor(Math.abs(+e)),n=(e+".").split(".")[1].length;return 0===n&&t%10==1&&t%100!=11?i:0===n&&2<=t%10&&t%10<=4&&(t%100<12||14<t%100)?o:0===n&&t%10==0||0===n&&5<=t%10&&t%10<=9||0===n&&11<=t%100&&t%100<=14?a:l},function(e){var t=+e;return 0===Math.floor(Math.abs(+e))||1===t?i:2<=t&&t<=10?o:l},function(e){var t=Math.floor(Math.abs(+e)),n=+(e+".").split(".")[1],r=+e;return 0===r||1===r||0===t&&1===n?i:l},function(e){var t=Math.floor(Math.abs(+e)),n=(e+".").split(".")[1].length;return 0===n&&t%100==1?i:0===n&&t%100==2?s:0===n&&3<=t%100&&t%100<=4||0!==n?o:l},function(e){var t=+e;return 0<=t&&t<=1||11<=t&&t<=99?i:l},function(e){var t=+e;return 1===t||5===t||7===t||8===t||9===t||10===t?i:2===t||3===t?s:4===t?o:6===t?a:l},function(e){var t=Math.floor(Math.abs(+e));return t%10==1||t%10==2||t%10==5||t%10==7||t%10==8||t%100==20||t%100==50||t%100==70||t%100==80?i:t%10==3||t%10==4||t%1e3==100||t%1e3==200||t%1e3==300||t%1e3==400||t%1e3==500||t%1e3==600||t%1e3==700||t%1e3==800||t%1e3==900?o:0===t||t%10==6||t%100==40||t%100==60||t%100==90?a:l},function(e){var t=+e;return t%10!=2&&t%10!=3||t%100==12||t%100==13?l:o},function(e){var t=+e;return 1===t||3===t?i:2===t?s:4===t?o:l},function(e){var t=+e;return 0===t||7===t||8===t||9===t?r:1===t?i:2===t?s:3===t||4===t?o:5===t||6===t?a:l},function(e){var t=+e;return t%10==1&&t%100!=11?i:t%10==2&&t%100!=12?s:t%10==3&&t%100!=13?o:l},function(e){var t=+e;return 1===t||11===t?i:2===t||12===t?s:3===t||13===t?o:l},function(e){var t=+e;return 1===t?i:2===t||3===t?s:4===t?o:6===t?a:l},function(e){var t=+e;return 1===t||5===t?i:l},function(e){var t=+e;return 11===t||8===t||80===t||800===t?a:l},function(e){var t=Math.floor(Math.abs(+e));return 1===t?i:0===t||2<=t%100&&t%100<=20||t%100==40||t%100==60||t%100==80?a:l},function(e){var t=+e;return t%10==6||t%10==9||t%10==0&&0!==t?a:l},function(e){var t=Math.floor(Math.abs(+e));return t%10==1&&t%100!=11?i:t%10==2&&t%100!=12?s:t%10!=7&&t%10!=8||t%100==17||t%100==18?l:a},function(e){var t=+e;return 1===t?i:2===t||3===t?s:4===t?o:l},function(e){var t=+e;return 1<=t&&t<=4?i:l},function(e){var t=+e;return 1===t||5===t||7<=t&&t<=9?i:2===t||3===t?s:4===t?o:6===t?a:l},function(e){var t=+e;return 1===t?i:t%10==4&&t%100!=14?a:l},function(e){var t=+e;return t%10!=1&&t%10!=2||t%100==11||t%100==12?l:i},function(e){var t=+e;return t%10==6||t%10==9||10===t?o:l},function(e){var t=+e;return t%10==3&&t%100!=13?o:l}];e.exports={af:{cardinal:c[0]},ak:{cardinal:c[1]},am:{cardinal:c[2]},ar:{cardinal:c[3]},ars:{cardinal:c[3]},as:{cardinal:c[2],ordinal:c[34]},asa:{cardinal:c[0]},ast:{cardinal:c[4]},az:{cardinal:c[0],ordinal:c[35]},be:{cardinal:c[5],ordinal:c[36]},bem:{cardinal:c[0]},bez:{cardinal:c[0]},bg:{cardinal:c[0]},bh:{cardinal:c[1]},bn:{cardinal:c[2],ordinal:c[34]},br:{cardinal:c[6]},brx:{cardinal:c[0]},bs:{cardinal:c[7]},ca:{cardinal:c[4],ordinal:c[37]},ce:{cardinal:c[0]},cgg:{cardinal:c[0]},chr:{cardinal:c[0]},ckb:{cardinal:c[0]},cs:{cardinal:c[8]},cy:{cardinal:c[9],ordinal:c[38]},da:{cardinal:c[10]},de:{cardinal:c[4]},dsb:{cardinal:c[11]},dv:{cardinal:c[0]},ee:{cardinal:c[0]},el:{cardinal:c[0]},en:{cardinal:c[4],ordinal:c[39]},eo:{cardinal:c[0]},es:{cardinal:c[0]},et:{cardinal:c[4]},eu:{cardinal:c[0]},fa:{cardinal:c[2]},ff:{cardinal:c[12]},fi:{cardinal:c[4]},fil:{cardinal:c[13],ordinal:c[0]},fo:{cardinal:c[0]},fr:{cardinal:c[12],ordinal:c[0]},fur:{cardinal:c[0]},fy:{cardinal:c[4]},ga:{cardinal:c[14],ordinal:c[0]},gd:{cardinal:c[15],ordinal:c[40]},gl:{cardinal:c[4]},gsw:{cardinal:c[0]},gu:{cardinal:c[2],ordinal:c[41]},guw:{cardinal:c[1]},gv:{cardinal:c[16]},ha:{cardinal:c[0]},haw:{cardinal:c[0]},he:{cardinal:c[17]},hi:{cardinal:c[2],ordinal:c[41]},hr:{cardinal:c[7]},hsb:{cardinal:c[11]},hu:{cardinal:c[0],ordinal:c[42]},hy:{cardinal:c[12],ordinal:c[0]},ia:{cardinal:c[4]},io:{cardinal:c[4]},is:{cardinal:c[18]},it:{cardinal:c[4],ordinal:c[43]},iu:{cardinal:c[19]},iw:{cardinal:c[17]},jgo:{cardinal:c[0]},ji:{cardinal:c[4]},jmc:{cardinal:c[0]},ka:{cardinal:c[0],ordinal:c[44]},kab:{cardinal:c[12]},kaj:{cardinal:c[0]},kcg:{cardinal:c[0]},kk:{cardinal:c[0],ordinal:c[45]},kkj:{cardinal:c[0]},kl:{cardinal:c[0]},kn:{cardinal:c[2]},ks:{cardinal:c[0]},ksb:{cardinal:c[0]},ksh:{cardinal:c[20]},ku:{cardinal:c[0]},kw:{cardinal:c[19]},ky:{cardinal:c[0]},lag:{cardinal:c[21]},lb:{cardinal:c[0]},lg:{cardinal:c[0]},ln:{cardinal:c[1]},lt:{cardinal:c[22]},lv:{cardinal:c[23]},mas:{cardinal:c[0]},mg:{cardinal:c[1]},mgo:{cardinal:c[0]},mk:{cardinal:c[24],ordinal:c[46]},ml:{cardinal:c[0]},mn:{cardinal:c[0]},mo:{cardinal:c[25],ordinal:c[0]},mr:{cardinal:c[2],ordinal:c[47]},mt:{cardinal:c[26]},nah:{cardinal:c[0]},naq:{cardinal:c[19]},nb:{cardinal:c[0]},nd:{cardinal:c[0]},ne:{cardinal:c[0],ordinal:c[48]},nl:{cardinal:c[4]},nn:{cardinal:c[0]},nnh:{cardinal:c[0]},no:{cardinal:c[0]},nr:{cardinal:c[0]},nso:{cardinal:c[1]},ny:{cardinal:c[0]},nyn:{cardinal:c[0]},om:{cardinal:c[0]},or:{cardinal:c[0],ordinal:c[49]},os:{cardinal:c[0]},pa:{cardinal:c[1]},pap:{cardinal:c[0]},pl:{cardinal:c[27]},prg:{cardinal:c[23]},ps:{cardinal:c[0]},pt:{cardinal:c[28]},"pt-PT":{cardinal:c[4]},rm:{cardinal:c[0]},ro:{cardinal:c[25],ordinal:c[0]},rof:{cardinal:c[0]},ru:{cardinal:c[29]},rwk:{cardinal:c[0]},saq:{cardinal:c[0]},sc:{cardinal:c[4],ordinal:c[43]},scn:{cardinal:c[4],ordinal:c[43]},sd:{cardinal:c[0]},sdh:{cardinal:c[0]},se:{cardinal:c[19]},seh:{cardinal:c[0]},sh:{cardinal:c[7]},shi:{cardinal:c[30]},si:{cardinal:c[31]},sk:{cardinal:c[8]},sl:{cardinal:c[32]},sma:{cardinal:c[19]},smi:{cardinal:c[19]},smj:{cardinal:c[19]},smn:{cardinal:c[19]},sms:{cardinal:c[19]},sn:{cardinal:c[0]},so:{cardinal:c[0]},sq:{cardinal:c[0],ordinal:c[50]},sr:{cardinal:c[7]},ss:{cardinal:c[0]},ssy:{cardinal:c[0]},st:{cardinal:c[0]},sv:{cardinal:c[4],ordinal:c[51]},sw:{cardinal:c[4]},syr:{cardinal:c[0]},ta:{cardinal:c[0]},te:{cardinal:c[0]},teo:{cardinal:c[0]},ti:{cardinal:c[1]},tig:{cardinal:c[0]},tk:{cardinal:c[0],ordinal:c[52]},tl:{cardinal:c[13],ordinal:c[0]},tn:{cardinal:c[0]},tr:{cardinal:c[0]},ts:{cardinal:c[0]},tzm:{cardinal:c[33]},ug:{cardinal:c[0]},uk:{cardinal:c[29],ordinal:c[53]},ur:{cardinal:c[4]},uz:{cardinal:c[0]},ve:{cardinal:c[0]},vo:{cardinal:c[0]},vun:{cardinal:c[0]},wa:{cardinal:c[1]},wae:{cardinal:c[0]},xh:{cardinal:c[0]},xog:{cardinal:c[0]},yi:{cardinal:c[4]},zu:{cardinal:c[2]},lo:{ordinal:c[0]},ms:{ordinal:c[0]},vi:{ordinal:c[0]}}},function(e,t){e.exports=class{constructor(){this._requestID=0,this._openRequests={}}sendRemoteRequest(e,t){const n=this._requestID++,r=new Promise(((e,t)=>{this._openRequests[n]={resolve:e,reject:t}}));return this._sendRequest(e,t,n),r}sendRemoteNotification(e,t){this._sendRequest(e,t)}didReceiveCall(){throw new Error("Must override didReceiveCall")}_sendMessage(){throw new Error("Must override _sendMessage")}_sendRequest(e,t,n){const r={jsonrpc:"2.0",method:e,params:t};null!==n&&(r.id=n),this._sendMessage(r)}_handleMessage(e){if("2.0"!==e.jsonrpc)throw new Error("Bad or missing JSON-RPC version in message: ".concat(e));Object.prototype.hasOwnProperty.call(e,"method")?this._handleRequest(e):this._handleResponse(e)}_sendResponse(e,t,n){const r={jsonrpc:"2.0",id:e};n?r.error=n:r.result=t||null,this._sendMessage(r)}_handleResponse(e){const{result:t,error:n,id:r}=e,i=this._openRequests[r];delete this._openRequests[r],i&&(n?i.reject(n):i.resolve(t))}_handleRequest(e){const{method:t,params:n,id:r}=e,i=this.didReceiveCall(t,n);null!=r&&Promise.resolve(i).then((e=>{this._sendResponse(r,e)}),(e=>{this._sendResponse(r,null,e)}))}}},function(e){e.exports=JSON.parse('{"menuMap":{"cs":[{"code":"cs","name":"čeština"}],"da":[{"code":"da","name":"Dansk"}],"gl":[{"code":"gl","name":"galego"}],"sl":[{"code":"sl","name":"slovenščina"}],"fr":[{"code":"fr","name":"Français"}],"hu":[{"code":"hu","name":"magyar"}],"uk":[{"code":"uk","name":"українська"}],"zh-tw":[{"code":"zh-tw","name":"中文(繁體)"}],"pt":[{"code":"pt","name":"Portuguese"}],"pt-br":[{"code":"pt","name":"Português"}],"tr":[{"code":"tr","name":"Türkçe"}],"ga":[{"code":"ga","name":"Gaeilge"}],"th":[{"code":"th","name":"ภาษาไทย"}],"ja":[{"code":"ja","name":"日本語"}],"ja-hira":[{"code":"ja","name":"日本語"}],"nl":[{"code":"nl","name":"Nederlands"}],"gd":[{"code":"gd","name":"Gàidhlig"}],"nb":[{"code":"nb","name":"norsk"}],"de":[{"code":"de","name":"Deutsch"}],"he":[{"code":"he","name":"עברית"}],"sk":[{"code":"sk","name":"slovenčina"}],"zu":[{"code":"zu","name":"isiZulu"}],"ru":[{"code":"ru","name":"русский"}],"pl":[{"code":"pl","name":"polski"}],"am":[{"code":"am","name":"አማርኛ"}],"az":[{"code":"az","name":"Azərbaycan dili"}],"hr":[{"code":"hr","name":"hrvatski"}],"fa":[{"code":"fa","name":"فارسی"}],"mi":[{"code":"mi","name":"Māori"}],"el":[{"code":"el","name":"Ελληνικά"}],"is":[{"code":"is","name":"íslenska"}],"fi":[{"code":"fi","name":"suomi"}],"eu":[{"code":"eu","name":"euskara"}],"ca":[{"code":"ca","name":"català"}],"lv":[{"code":"lv","name":"latviešu"}],"id":[{"code":"id","name":"Indonesia"}],"es":[{"code":"es","name":"español"}],"es-419":[{"code":"es","name":"español"}],"et":[{"code":"et","name":"eesti"}],"cy":[{"code":"cy","name":"Cymraeg"}],"zh-cn":[{"code":"zh-cn","name":"中文(简体)"}],"bg":[{"code":"bg","name":"български"}],"ar":[{"code":"ar","name":"العربية"}],"en":[{"code":"en","name":"English"}],"sr":[{"code":"sr","name":"српски"}],"sv":[{"code":"sv","name":"svenska"}],"ro":[{"code":"ro","name":"Română"}],"lt":[{"code":"lt","name":"lietuvių"}],"ko":[{"code":"ko","name":"한국어"}],"it":[{"code":"it","name":"Italiano"}],"vi":[{"code":"vi","name":"Tiếng Việt"}]},"nameMap":{"albánština":"sq","amharština":"am","angličtina":"en","arabština":"ar","arménština":"hy","ázerbájdžánština":"az","barmština":"my","baskičtina":"eu","běloruština":"be","bulharština":"bg","čeština":"cs","čínština (tradiční)":"zh-tw","čínština (zjednodušená)":"zh-cn","dánština":"da","esperanto":"eo","estonština":"et","finština":"fi","francouzština":"fr","galicijština":"gl","haitská kreolština":"ht","hebrejština":"he","hindština":"hi","holandština":"nl","chorvatština":"hr","indonéština":"id","irština":"ga","islandština":"is","italština":"it","japonština":"ja","kannadština":"kn","katalánština":"ca","korejština":"ko","kurdština":"ku","latina":"la","litevština":"lt","lotyština":"lv","maďarština":"hu","makedonština":"mk","malajálamština":"ml","malajština":"ms","maltština":"mt","maorština":"mi","marátština":"mr","mongolština":"mn","němčina":"de","norština":"nb","perština":"fa","polština":"pl","portugalština":"pt","rumunština":"ro","ruština":"ru","řečtina":"el","skotská gaelština":"gd","slovenština":"sk","slovinština":"sl","srbština":"sr","španělština":"es","švédština":"sv","telužština":"te","thajština":"th","turečtina":"tr","ukrajinština":"uk","uzbečtina":"uz","velština":"cy","vietnamština":"vi","zulu":"zu","albansk":"sq","amharisk":"am","arabisk":"ar","armensk":"hy","aserbajdsjansk":"az","baskisk":"eu","bulgarsk":"bg","burmesisk":"my","dansk":"da","engelsk":"en","estisk":"et","finsk":"fi","fransk":"fr","galicisk":"gl","græsk":"el","haitisk kreolsk":"ht","hebraisk":"he","hindi":"hi","hollandsk":"nl","hviderussisk":"be","indonesisk":"id","irsk":"ga","islandsk":"is","italiensk":"it","japansk":"ja","kannada":"kn","katalansk":"ca","kinesisk (forenklet)":"zh-cn","kinesisk (traditionelt)":"zh-tw","koreansk":"ko","kroatisk":"hr","kurdisk":"ku","latin":"la","lettisk":"lv","litauisk":"lt","makedonsk":"mk","malajisk":"ms","malayalam":"ml","maltesisk":"mt","maori":"mi","marathi":"mr","mongolsk":"mn","norsk":"nb","persisk":"fa","polsk":"pl","portugisisk":"pt","rumænsk":"ro","russisk":"ru","serbisk":"sr","skotsk gælisk":"gd","slovakisk":"sk","slovensk":"sl","spansk":"es","svensk":"sv","telugu":"te","thailandsk":"th","tjekkisk":"cs","tyrkisk":"tr","tysk":"de","ukrainsk":"uk","ungarsk":"hu","usbekisk":"uz","vietnamesisk":"vi","walisisk":"cy","acerbaixano":"az","albanés":"sq","alemán":"de","amárico":"am","árabe":"ar","armenio":"hy","bielorruso":"be","birmano":"my","búlgaro":"bg","canarés":"kn","catalán":"ca","checo":"cs","chinés (simplificado)":"zh-cn","chinés (tradicional)":"zh-tw","coreano":"ko","crioulo haitiano":"ht","croata":"hr","curdo":"ku","dinamarqués":"da","eslovaco":"sk","esloveno":"sl","español":"es","estoniano":"et","éuscaro":"eu","finés":"fi","francés":"fr","gaélico escocés":"gd","galego":"gl","galés":"cy","grego":"el","hebreo":"he","húngaro":"hu","indonesio":"id","inglés":"en","irlandés":"ga","islandés":"is","italiano":"it","latín":"la","letón":"lv","lituano":"lt","macedonio":"mk","malabar":"ml","malaio":"ms","maltés":"mt","maorí":"mi","mongol":"mn","neerlandés":"nl","noruegués":"nb","persa":"fa","polaco":"pl","portugués":"pt","romanés":"ro","ruso":"ru","serbio":"sr","sueco":"sv","tailandés":"th","telugú":"te","turco":"tr","ucraíno":"uk","usbeco":"uz","vietnamita":"vi","xaponés":"ja","zulú":"zu","albanščina":"sq","amharščina":"am","angleščina":"en","arabščina":"ar","armenščina":"hy","azerbajdžanščina":"az","baskovščina":"eu","beloruščina":"be","bolgarščina":"bg","burmanščina":"my","češčina":"cs","danščina":"da","estonščina":"et","finščina":"fi","francoščina":"fr","galicijščina":"gl","grščina":"el","haitijska kreolščina":"ht","hebrejščina":"he","hindijščina":"hi","hrvaščina":"hr","indonezijščina":"id","irščina":"ga","islandščina":"is","italijanščina":"it","japonščina":"ja","kanareščina":"kn","katalonščina":"ca","kitajščina (poenostavljena)":"zh-cn","kitajščina (tradicionalna)":"zh-tw","korejščina":"ko","kurdščina":"ku","latinščina":"la","latvijščina":"lv","litovščina":"lt","madžarščina":"hu","makedonščina":"mk","malajalščina":"ml","malajščina":"ms","malteščina":"mt","maorščina":"mi","maratščina":"mr","mongolščina":"mn","nemščina":"de","nizozemščina":"nl","norveščina":"nb","perzijščina":"fa","poljščina":"pl","portugalščina":"pt","romunščina":"ro","ruščina":"ru","slovaščina":"sk","slovenščina":"sl","srbščina":"sr","škotska gelščina":"gd","španščina":"es","švedščina":"sv","tajščina":"th","teluščina":"te","turščina":"tr","ukrajinščina":"uk","uzbeščina":"uz","valižanščina":"cy","vietnamščina":"vi","zulujščina":"zu","albanais":"sq","allemand":"de","amharique":"am","anglais":"en","arabe":"ar","arménien":"hy","azéri":"az","basque":"eu","biélorusse":"be","birman":"my","bulgare":"bg","catalan":"ca","chinois (simplifié)":"zh-cn","chinois (traditionnel)":"zh-tw","coréen":"ko","créole haïtien":"ht","croate":"hr","danois":"da","espagnol":"es","espéranto":"eo","estonien":"et","finnois":"fi","français":"fr","gaélique (écosse)":"gd","galicien":"gl","gallois":"cy","grec":"el","hébreu":"he","hongrois":"hu","indonésien":"id","irlandais":"ga","islandais":"is","italien":"it","japonais":"ja","kurde":"ku","letton":"lv","lituanien":"lt","macédonien":"mk","malaisien":"ms","maltais":"mt","néerlandais":"nl","norvégien":"nb","ouzbek":"uz","persan":"fa","polonais":"pl","portugais":"pt","roumain":"ro","russe":"ru","serbe":"sr","slovaque":"sk","slovène":"sl","suédois":"sv","tchèque":"cs","thaï":"th","turc":"tr","ukrainien":"uk","vietnamien":"vi","zoulou":"zu","albán":"sq","amhara":"am","angol":"en","arab":"ar","azeri":"az","baszk":"eu","belorusz":"be","bolgár":"bg","burmai":"my","cseh":"cs","dán":"da","eszperantó":"eo","észt":"et","finn":"fi","francia":"fr","galíciai":"gl","görög":"el","haiti kreol":"ht","héber":"he","holland":"nl","horvát":"hr","indonéz":"id","ír":"ga","izlandi":"is","japán":"ja","katalán":"ca","kínai (egyszerűsített)":"zh-cn","kínai (hagyományos)":"zh-tw","koreai":"ko","kurd":"ku","lengyel":"pl","lett":"lv","litván":"lt","macedón":"mk","magyar":"hu","maláj":"ms","malajálam":"ml","máltai":"mt","maráthi":"mr","német":"de","norvég":"nb","olasz":"it","orosz":"ru","örmény":"hy","perzsa":"fa","portugál":"pt","román":"ro","skót-gael":"gd","spanyol":"es","svéd":"sv","szerb":"sr","szlovák":"sk","szlovén":"sl","thai":"th","török":"tr","ukrán":"uk","üzbég":"uz","vietnami":"vi","walesi":"cy","азербайджанська":"az","албанська":"sq","амхарська":"am","англійська":"en","арабська":"ar","баскська":"eu","білоруська":"be","бірманська":"my","болгарська":"bg","в’єтнамська":"vi","валлійська":"cy","вірменська":"hy","гаїтянська креольська":"ht","гінді":"hi","грецька":"el","ґалісійська":"gl","данська":"da","есперанто":"eo","естонська":"et","зулу":"zu","іврит":"he","індонезійська":"id","ірландська":"ga","ісландська":"is","іспанська":"es","італійська":"it","каннада":"kn","каталанська":"ca","китайська (спрощена)":"zh-cn","китайська (традиційна)":"zh-tw","корейська":"ko","курдська":"ku","латинська":"la","латиська":"lv","литовська":"lt","македонська":"mk","малайська":"ms","малаялам":"ml","мальтійська":"mt","маорі":"mi","маратхі":"mr","монгольська":"mn","нідерландська":"nl","німецька":"de","норвезька":"nb","перська":"fa","польська":"pl","португальська":"pt","російська":"ru","румунська":"ro","сербська":"sr","словацька":"sk","словенська":"sl","тайська":"th","телуґу":"te","турецька":"tr","угорська":"hu","узбецька":"uz","українська":"uk","фінська":"fi","французька":"fr","хорватська":"hr","чеська":"cs","шведська":"sv","шотландська (ґельська)":"gd","японська":"ja","土耳其文":"tr","中文(繁體)":"zh-tw","中文(簡體)":"zh-cn","丹麥文":"da","巴斯克文":"eu","日文":"ja","毛利文":"mi","世界語":"eo","加里西亞文":"gl","加泰羅尼亞文":"ca","卡納達文":"kn","白俄羅斯文":"be","立陶宛文":"lt","冰島文":"is","匈牙利文":"hu","印尼文":"id","印度文":"hi","西班牙文":"es","克羅埃西亞文":"hr","希伯來文":"he","希臘文":"el","亞美尼亞文":"hy","亞塞拜然文":"az","拉丁文":"la","拉脫維亞文":"lv","法文":"fr","波斯文":"fa","波蘭文":"pl","芬蘭文":"fi","阿姆哈拉文":"am","阿拉伯文":"ar","阿爾巴尼亞文":"sq","俄文":"ru","保加利亞文":"bg","南非祖魯文":"zu","威爾斯文":"cy","英文":"en","庫德文":"ku","挪威文":"nb","泰文":"th","泰盧固文":"te","海地克里奧文":"ht","烏克蘭文":"uk","烏茲別克文":"uz","馬耳他文":"mt","馬來文":"ms","馬其頓文":"mk","馬拉地文":"mr","馬拉雅拉姆文":"ml","捷克文":"cs","荷蘭文":"nl","斯洛伐克文":"sk","斯洛維尼亞文":"sl","越南文":"vi","塞爾維亞文":"sr","愛沙尼亞文":"et","愛爾蘭文":"ga","瑞典文":"sv","義大利文":"it","葡萄牙文":"pt","蒙古文":"mn","德文":"de","緬甸文":"my","韓文":"ko","羅馬尼亞文":"ro","蘇格蘭的蓋爾文":"gd","अझरबैजानी":"az","अम्हारिक":"am","अरबी":"ar","अर्मेनियन":"hy","अल्बानियन":"sq","आइसलँडिक":"is","आयरिश":"ga","इंग्रजी":"en","इंडोनेशियन":"id","इटालियन":"it","उझ्बेक":"uz","एस्टोनियन":"et","एस्परँटो":"eo","कन्नड":"kn","कुर्दिश (कुर्मांजी)":"ku","कॅटलान":"ca","कोरियन":"ko","क्रोएशियन":"hr","गॅलिशियन":"gl","ग्रीक":"el","चीनी (पारंपारिक)":"zh-tw","चीनी (सरलीकृत)":"zh-cn","जपानी":"ja","जर्मन":"de","झुलु":"zu","झेक":"cs","डच":"nl","डॅनिश":"da","तुर्की":"tr","तेलगू":"te","थाई":"th","नॉर्वेजियन":"nb","पोर्तुगीज":"pt","पोलिश":"pl","फारसी":"fa","फिन्निश":"fi","फ्रेंच":"fr","बल्गेरियन":"bg","बास्क":"eu","बेलारुशियन":"be","मंगोलियन":"mn","मराठी":"mr","मलय":"ms","मल्याळम":"ml","माओरी":"mi","माल्टीज":"mt","मॅसेडोनियन":"mk","म्यानमार (बर्मीज)":"my","युक्रेनियन":"uk","रशियन":"ru","रोमानियन":"ro","लाट्वियन":"lv","लिथुआनियन":"lt","लॅटिन":"la","वेल्श":"cy","व्हिएतनामी":"vi","सर्बियन":"sr","स्कॉट्स गेलिक":"gd","स्पॅनिश":"es","स्लोव्हाक":"sk","स्लोव्हेनियन":"sl","स्वीडिश":"sv","हंगेरियन":"hu","हिन्दी":"hi","हिब्रू":"he","हैतीयन क्रेओल":"ht","albanian":"sq","amharic":"am","arabic":"ar","armenian":"hy","azerbaijani":"az","belarusian":"be","bulgarian":"bg","chinese (simplified)":"zh-cn","chinese (traditional)":"zh-tw","croatian":"hr","czech":"cs","danish":"da","dutch":"nl","english":"en","estonian":"et","finnish":"fi","french":"fr","galician":"gl","german":"de","greek":"el","haitian creole":"ht","hebrew":"he","hungarian":"hu","icelandic":"is","indonesian":"id","irish":"ga","italian":"it","japanese":"ja","korean":"ko","kurdish (kurmanji)":"ku","latvian":"lv","lithuanian":"lt","macedonian":"mk","malay":"ms","maltese":"mt","mongolian":"mn","myanmar (burmese)":"my","norwegian":"nb","persian":"fa","polish":"pl","portuguese":"pt","romanian":"ro","russian":"ru","scots gaelic":"gd","serbian":"sr","slovak":"sk","slovenian":"sl","spanish":"es","swedish":"sv","turkish":"tr","ukrainian":"uk","uzbek":"uz","vietnamese":"vi","welsh":"cy","albanês":"sq","alemão":"de","armênio":"hy","azerbaijano":"az","basco":"eu","bielo-russo":"be","birmanês":"my","canarês":"kn","catalão":"ca","chinês (simplificado)":"zh-cn","chinês (tradicional)":"zh-tw","dinamarquês":"da","espanhol":"es","finlandês":"fi","francês":"fr","gaélico escocês":"gd","galês":"cy","hebraico":"he","holandês":"nl","indonésio":"id","inglês":"en","irlandês":"ga","islandês":"is","japonês":"ja","latim":"la","letão":"lv","macedônio":"mk","malaiala":"ml","maltês":"mt","marata":"mr","norueguês":"nb","polonês":"pl","português":"pt","romeno":"ro","russo":"ru","sérvio":"sr","tailandês":"th","tcheco":"cs","telugo":"te","ucraniano":"uk","uzbeque":"uz","almanca":"de","arapça":"ar","arnavutça":"sq","azerice":"az","baskça":"eu","belarusça":"be","bulgarca":"bg","burmaca":"my","çekçe":"cs","çince (basitleştirilmiş)":"zh-cn","çince (geleneksel)":"zh-tw","danca":"da","endonezya dili":"id","ermenice":"hy","esperantoca":"eo","estonyaca":"et","farsça":"fa","felemenkçe":"nl","fince":"fi","fransızca":"fr","galce":"cy","galiçyaca":"gl","habeşçe":"am","haiti creole dili":"ht","hırvatça":"hr","hintçe":"hi","i̇branice":"he","i̇ngilizce":"en","i̇rlandaca":"ga","i̇spanyolca":"es","i̇sveççe":"sv","i̇talyanca":"it","i̇zlandaca":"is","japonca":"ja","katalanca":"ca","korece":"ko","kuzey i̇skoç dili":"gd","kürtçe":"ku","latince":"la","lehçe":"pl","letonca":"lv","litvanca":"lt","macarca":"hu","makedonca":"mk","malezya dili":"ms","malta dili":"mt","maori dili":"mi","moğolca":"mn","norveççe":"nb","özbekçe":"uz","portekizce":"pt","romence":"ro","rusça":"ru","sırpça":"sr","slovakça":"sk","slovence":"sl","tay dili":"th","telugu dili":"te","türkçe":"tr","ukraynaca":"uk","vietnamca":"vi","yunanca":"el","airméinis":"hy","albáinis":"sq","amárais":"am","araibis":"ar","asarbaiseáinis":"az","bascais":"eu","bealarúisis":"be","béarla":"en","breatnais":"cy","bulgáiris":"bg","cannadais":"kn","catalóinis":"ca","coirdis (curmainsis)":"ku","cóiréis":"ko","criól háítí":"ht","cróitis":"hr","danmhairgis":"da","eabhrais":"he","eastóinis":"et","fionlainnis":"fi","fraincis":"fr","gaeilge":"ga","gaeilge na halban":"gd","gailísis":"gl","gearmáinis":"de","gréigis":"el","hiondúis":"hi","indinéisis":"id","iodáilis":"it","ioruais":"nb","íoslainnis":"is","laidin":"la","laitvis":"lv","liotuáinis":"lt","macadóinis":"mk","maenmar (burmais)":"my","mailéalaimis":"ml","malaeis":"ms","máltais":"mt","maorais":"mi","maraitis":"mr","mongóilis":"mn","ollainnis":"nl","peirsis":"fa","polainnis":"pl","portaingéilis":"pt","rómáinis":"ro","rúisis":"ru","seapáinis":"ja","seicis":"cs","seirbis":"sr","sínis (simplithe)":"zh-cn","sínis (traidisiúnta)":"zh-tw","slóivéinis":"sl","slóvaicis":"sk","spáinnis":"es","sualainnis":"sv","súlúis":"zu","téalainnis":"th","teileagúis":"te","tuircis":"tr","úcráinis":"uk","úisbéiceastáinis":"uz","ungáiris":"hu","vítneaimis":"vi","ภาษากรีก":"el","ภาษากันนาดา":"kn","ภาษากาลิเชียน":"gl","ภาษาเกลิกในสก็อต":"gd","ภาษาเกาหลี":"ko","ภาษาคาตาลัน":"ca","ภาษาเคิร์ด":"ku","ภาษาโครเอเชีย":"hr","ภาษาจีน (ดั้งเดิม)":"zh-tw","ภาษาจีน (แบบย่อ)":"zh-cn","ภาษาเช็ก":"cs","ภาษาซูลู":"zu","ภาษาเซอร์เบียน":"sr","ภาษาญี่ปุ่น":"ja","ภาษาดัตช์":"nl","ภาษาเดนมาร์ก":"da","ภาษาตุรกี":"tr","ภาษาเตลูกู":"te","ภาษาไทย":"th","ภาษานอร์เวย์":"nb","ภาษาบัลกาเรีย":"bg","ภาษาบาสก์":"eu","ภาษาเบลารูเชียน":"be","ภาษาเปอร์เซีย":"fa","ภาษาโปรตุเกส":"pt","ภาษาโปแลนด์":"pl","ภาษาฝรั่งเศส":"fr","ภาษาฟินแลนด์":"fi","ภาษามองโกเลีย":"mn","ภาษามัลทีส":"mt","ภาษามาซีโดเนีย":"mk","ภาษามาราฐี":"mr","ภาษามาลายาลัม":"ml","ภาษามาเลย์":"ms","ภาษาเมารี":"mi","ภาษาเมียนมา (พม่า)":"my","ภาษายูเครน":"uk","ภาษาเยอรมัน":"de","ภาษารัสเซีย":"ru","ภาษาโรมาเนีย":"ro","ภาษาละติน":"la","ภาษาลัทเวีย":"lv","ภาษาลิทัวเนีย":"lt","ภาษาเวลส์":"cy","ภาษาเวียดนาม":"vi","ภาษาสเปน":"es","ภาษาสโลวัก":"sk","ภาษาสโลเวเนีย":"sl","ภาษาสวีเดน":"sv","ภาษาอังกฤษ":"en","ภาษาอัมฮาริก":"am","ภาษาอัลบาเนีย":"sq","ภาษาอาร์เซอร์ไบจัน":"az","ภาษาอาร์เมเนีย":"hy","ภาษาอาหรับ":"ar","ภาษาอิตาลี":"it","ภาษาอินโดนีเซีย":"id","ภาษาอุสเบกิสถาน":"uz","ภาษาเอสโทเนีย":"et","ภาษาเอสเปอแรนโต":"eo","ภาษาไอซ์แลนดิก":"is","ภาษาไอริช":"ga","ภาษาฮังการี":"hu","ภาษาฮินดี":"hi","ภาษาฮิบรู":"he","ภาษาเฮติครีโอล":"ht","アイスランド語":"is","アイルランド語":"ga","アゼルバイジャン語":"az","アムハラ語":"am","アラビア語":"ar","アルバニア語":"sq","アルメニア語":"hy","イタリア語":"it","インドネシア語":"id","ウェールズ語":"cy","ウクライナ語":"uk","ウズベク語":"uz","エストニア語":"et","エスペラント語":"eo","オランダ語":"nl","カタルーニャ語":"ca","ガリシア語":"gl","カンナダ語":"kn","ギリシャ語":"el","クルド語":"ku","クロアチア語":"hr","スウェーデン語":"sv","ズールー語":"zu","スコットランド ゲール語":"gd","スペイン語":"es","スロバキア語":"sk","スロベニア語":"sl","セルビア語":"sr","タイ語":"th","チェコ語":"cs","テルグ語":"te","デンマーク語":"da","ドイツ語":"de","トルコ語":"tr","ノルウェー語":"nb","ハイチ語":"ht","バスク語":"eu","ハンガリー語":"hu","ヒンディー語":"hi","フィンランド語":"fi","フランス語":"fr","ブルガリア語":"bg","ベトナム語":"vi","ヘブライ語":"he","ベラルーシ語":"be","ペルシャ語":"fa","ポーランド語":"pl","ポルトガル語":"pt","マオリ語":"mi","マケドニア語":"mk","マラーティー語":"mr","マラヤーラム語":"ml","マルタ語":"mt","マレー語":"ms","ミャンマー語":"my","モンゴル語":"mn","ラテン語":"la","ラトビア語":"lv","リトアニア語":"lt","ルーマニア語":"ro","ロシア語":"ru","英語":"en","韓国語":"ko","中国語(簡体)":"zh-cn","中国語(繁体)":"zh-tw","日本語":"ja","albanees":"sq","amharisch":"am","arabisch":"ar","armeens":"hy","azerbeidzjaans":"az","baskisch":"eu","birmaans":"my","bulgaars":"bg","catalaans":"ca","chinees (traditioneel)":"zh-tw","chinees (vereenvoudigd)":"zh-cn","deens":"da","duits":"de","engels":"en","ests":"et","fins":"fi","frans":"fr","galicisch":"gl","grieks":"el","haïtiaans creools":"ht","hebreeuws":"he","hongaars":"hu","iers":"ga","ijslands":"is","indonesisch":"id","italiaans":"it","japans":"ja","koerdisch":"ku","koreaans":"ko","kroatisch":"hr","latijn":"la","lets":"lv","litouws":"lt","macedonisch":"mk","maleis":"ms","maltees":"mt","mongools":"mn","nederlands":"nl","noors":"nb","oekraïens":"uk","oezbeeks":"uz","perzisch":"fa","pools":"pl","portugees":"pt","roemeens":"ro","russisch":"ru","schots keltisch":"gd","servisch":"sr","slovaaks":"sk","sloveens":"sl","spaans":"es","tsjechisch":"cs","turks":"tr","vietnamees":"vi","wels":"cy","wit-russisch":"be","zoeloe":"zu","zweeds":"sv","airmeinis":"hy","albàinis":"sq","amtharais":"am","arabais":"ar","asarbaideànais":"az","basgais":"eu","bealaruisis":"be","beurla":"en","bhiet-namais":"vi","bulgarais":"bg","cànan nan tàidh":"th","catalanais":"ca","coirèanais":"ko","crìtheol haidhti":"ht","cròthaisis":"hr","cuimris":"cy","cùrdais (kurmanji)":"ku","duitsis":"nl","eabhra":"he","eadailtis":"it","eastoinis":"et","fionnlannais":"fi","fraingis":"fr","gàidhlig":"gd","gailìsis":"gl","gearmailtis":"de","grèigis":"el","hindis":"hi","innd-innsis":"id","innis-tìlis":"is","laideann":"la","laitbheis":"lv","liotuainis":"lt","malaidhis":"ms","māori":"mi","masadonais":"mk","miànmar (burmais)":"my","mongolais":"mn","nirribhis":"nb","pòlainnis":"pl","portagailis":"pt","romàinis":"ro","ruisis":"ru","seacais":"cs","seapanais":"ja","sèirbis":"sr","sìonais (seann-nòsach)":"zh-tw","sìonais (sìmplichte)":"zh-cn","slòbhacais":"sk","slòbhainis":"sl","spàinntis":"es","suainis":"sv","turcais":"tr","ucràinis":"uk","ungairis":"hu","usbagais":"uz","farsi":"fa","galisisk":"gl","gresk":"el","hviterussisk":"be","kinesisk (tradisjonell)":"zh-tw","kreol (haiti)":"ht","latvisk":"lv","malayisk":"ms","nederlandsk":"nl","rumensk":"ro","tsjekkisk":"cs","albanisch":"sq","armenisch":"hy","aserbaidschanisch":"az","birmanisch":"my","bulgarisch":"bg","chinesisch (traditionell)":"zh-tw","chinesisch (vereinfacht)":"zh-cn","dänisch":"da","deutsch":"de","englisch":"en","estnisch":"et","finnisch":"fi","französisch":"fr","galizisch":"gl","griechisch":"el","haitianisch":"ht","hebräisch":"he","irisch":"ga","isländisch":"is","italienisch":"it","japanisch":"ja","katalanisch":"ca","koreanisch":"ko","kurdisch (kurmandschi)":"ku","lateinisch":"la","lettisch":"lv","litauisch":"lt","malaysisch":"ms","maltesisch":"mt","mazedonisch":"mk","mongolisch":"mn","niederländisch":"nl","norwegisch":"nb","persisch":"fa","polnisch":"pl","portugiesisch":"pt","rumänisch":"ro","schottisch-gälisch":"gd","schwedisch":"sv","serbisch":"sr","slowakisch":"sk","slowenisch":"sl","spanisch":"es","thailändisch":"th","tschechisch":"cs","türkisch":"tr","ukrainisch":"uk","ungarisch":"hu","usbekisch":"uz","vietnamesisch":"vi","walisisch":"cy","weißrussisch":"be","ကနာဒါ":"kn","ကာ့ဒ် (ကာမန်ဂျီ)":"ku","ကိုရီးယား":"ko","ကက်တလန်":"ca","ခရိုအေးရှား":"hr","ချက်":"cs","ဂရိ":"el","ဂယ်လိရှ":"gl","ဂျပန်":"ja","ဂျာမန်":"de","စကော့ ဂေးလစ်":"gd","စပိန်":"es","ဆလိုဗေးနီးယား":"sl","ဆလိုဗက်":"sk","ဆားဘီးယား":"sr","ဆွီဒင်":"sv","ဇူးလူး":"zu","တရုတ် (ရိုးရာ)":"zh-tw","တရုတ် (အလွယ်)":"zh-cn","တူ​ရ​ကီ":"tr","တယ်လူဂူ":"te","ထိုင်း":"th","ဒတ်ချ်":"nl","ဒိန်းမတ်":"da","နော်ဝေ":"nb","ပါရှန်":"fa","ပေါ်တူဂီ":"pt","ပိုလန်":"pl","ပြင်သစ်":"fr","ဖင်လန်":"fi","ဗီယက်နမ်":"vi","ဘာ့စ်":"eu","ဘူဂေးရီးယား":"bg","ဘယ်လာရုစ်":"be","မလေယာလမ်":"ml","မလေး":"ms","မာရာသီ":"mr","မော်ရီ":"mi","မော်လတာ":"mt","မက်ဆီဒိုးနီးယား":"mk","မြန်မာ (မြန်မာ)":"my","မွန်ဂိုလီးယား":"mn","ယူ​က​ရိန်း​":"uk","ရုရှား":"ru","ရိုမေးနီးယား":"ro","လက်တင်":"la","လစ်သူယေးနီးယား":"lt","လတ်ဗီယာ":"lv","ဝေလ":"cy","ဟီဘရူး":"he","ဟေတီ ခရီအိုး":"ht","ဟင်ဒီ":"hi","ဟန်ဂေရီ":"hu","အဇာဘိုင်ဂျန်":"az","အာမေးနီးယား":"hy","အာရေဗျ":"ar","အီတလီ":"it","ဥဇဘက်":"uz","အက်စတိုးနီးယား":"et","အက်စ်ပဲရန်တို":"eo","အိုက်စလန်":"is","အင်္ဂလိပ်":"en","အင်ဒိုနီးရှား":"id","အိုင်းရစ်ရှ်":"ga","အမ်ဟဲရစ်ခ်":"am","အယ်လ်ဘေးနီးယား":"sq","אוזבקית":"uz","אוקראינית":"uk","אזרית":"az","איטלקית":"it","אינדונזית":"id","איסלנדית":"is","אירית":"ga","אלבנית":"sq","אמהרית":"am","אנגלית":"en","אסטונית":"et","אספרנטו":"eo","ארמנית":"hy","באסקית":"eu","בולגרית":"bg","בורמזית":"my","בלארוסית":"be","גליציאנית":"gl","גרמנית":"de","דנית":"da","הולנדית":"nl","הונגרית":"hu","הינדי":"hi","וולשית":"cy","וייטנאמית":"vi","זולו":"zu","טורקית":"tr","טלוגו":"te","יוונית":"el","יפנית":"ja","כורדית":"ku","לטווית":"lv","לטינית":"la","ליטאית":"lt","מאורית":"mi","מאלאיאלם":"ml","מאלזית":"ms","מאראתי":"mr","מונגולית":"mn","מלטית":"mt","מקדונית":"mk","נורווגית":"nb","סינית (מסורתית)":"zh-tw","סינית (פשוטה)":"zh-cn","סלובנית":"sl","סלובקית":"sk","ספרדית":"es","סקוטית גאלית":"gd","סרבית":"sr","עברית":"he","ערבית":"ar","פולנית":"pl","פורטוגזית":"pt","פינית":"fi","פרסית":"fa","צ\'כית":"cs","צרפתית":"fr","קאנאדה":"kn","קוריאנית":"ko","קטלאנית":"ca","קרואטית":"hr","קריאולית האיטית":"ht","רומנית":"ro","רוסית":"ru","שוודית":"sv","תאילנדית":"th","азербејџански":"az","албански":"sq","амхарски":"am","англиски":"en","арапски":"ar","баскиски":"eu","белоруски":"be","бугарски":"bg","бурмански":"my","велшки":"cy","виетнамски":"vi","галициски":"gl","германски":"de","грчки":"el","дански":"da","ерменски":"hy","естонски":"et","индонезиски":"id","ирски":"ga","исландски":"is","италијански":"it","јапонски":"ja","канада":"kn","каталонски":"ca","кинески (поедноставен)":"zh-cn","кинески (традиционален)":"zh-tw","корејски":"ko","курдски":"ku","латвиски":"lv","латински":"la","литвански":"lt","македонски":"mk","малајалам":"ml","малајски":"ms","малтешки":"mt","маорски":"mi","маратхи":"mr","монголски":"mn","норвешки":"nb","персиски":"fa","полски":"pl","португалски":"pt","романски":"ro","руски":"ru","словачки":"sk","словенечки":"sl","српски":"sr","тајландски":"th","телугу":"te","турски":"tr","узбечки":"uz","украински":"uk","унгарски":"hu","фински":"fi","француски":"fr","хаитски креолски":"ht","хебрејски":"he","хиндиски":"hi","холандски":"nl","хрватски":"hr","чешки":"cs","шведски":"sv","шкотски галски":"gd","шпански":"es","ಅಜರ್ಬೈಜಾನಿ":"az","ಅಮಹಾರಿಕ್":"am","ಅರಬ್ಬಿ":"ar","ಆರ್ಮೇನಿಯನ್":"hy","ಆಲ್ಬೇನಿಯನ್":"sq","ಇಂಗ್ಲಿಷ್‌‌":"en","ಇಂಡೋನೇಷಿಯನ್":"id","ಇಟಾಲಿಯನ್":"it","ಉಜ್ಬೆಕ್":"uz","ಎಸ್ಟೋನಿಯನ್":"et","ಎಸ್ಪೆರಾಂಟೋ":"eo","ಐರಿಷ್":"ga","ಐಸ್‌ಲ್ಯಾಂಡಿಕ್‌":"is","ಕನ್ನಡ":"kn","ಕುರ್ದಿಶ್":"ku","ಕೊರಿಯನ್":"ko","ಕ್ಯಾಟಲನ್":"ca","ಕ್ರೊಯೇಷಿಯನ್":"hr","ಗ್ಯಾಲೀಷಿಯನ್":"gl","ಗ್ರೀಕ್":"el","ಚೀನಿ (ಸರಳೀಕೃತ)":"zh-cn","ಚೀನಿ (ಸಾಂಪ್ರದಾಯಿಕ)":"zh-tw","ಜಪಾನಿ":"ja","ಜರ್ಮನ್":"de","ಜುಲು":"zu","ಝೆಕ್‌":"cs","ಟರ್ಕಿಷ್":"tr","ಡಚ್":"nl","ಡ್ಯಾನಿಷ್":"da","ತೆಲುಗು":"te","ಥಾಯ್":"th","ನಾರ್ವೇಜಿಯನ್‌":"nb","ಪೋರ್ಚುಗೀಸ್":"pt","ಪೋಲಿಷ್":"pl","ಫಾರ್ಸಿ":"fa","ಫಿನ್ನಿಷ್":"fi","ಫ್ರೆಂಚ್":"fr","ಬರ್ಮೀಸ್":"my","ಬಲ್ಗೇರಿಯನ್":"bg","ಬಾಸ್ಕ್":"eu","ಬೆಲರೂಸಿಯನ್":"be","ಮಂಗೋಲಿಯನ್":"mn","ಮರಾಠಿ":"mr","ಮಲಯ":"ms","ಮಲಯಾಳಂ":"ml","ಮಾಲ್ಟೀಸ್":"mt","ಮಾವೋರಿ":"mi","ಮ್ಯಾಸೆಡೋನಿಯನ್":"mk","ಯುಕ್ರೇನಿಯನ್":"uk","ರಷಿಯನ್":"ru","ರೊಮೇನಿಯನ್":"ro","ಲಿಥುವೇನಿಯನ್":"lt","ಲ್ಯಾಟಿನ್":"la","ಲ್ಯಾಟ್ವಿಯನ್‌":"lv","ವಿಯೆಟ್ನಾಮಿ":"vi","ವೆಲ್ಶ್":"cy","ಸರ್ಬಿಯನ್":"sr","ಸ್ಕಾಟ್ಸ್ ಗ್ಯಾಲಿಕ್":"gd","ಸ್ಪ್ಯಾನಿಷ್":"es","ಸ್ಲೊವಾಕ್":"sk","ಸ್ಲೊವೆನಿಯನ್":"sl","ಸ್ವೀಡಿಷ್":"sv","ಹಂಗೇರಿಯನ್":"hu","ಹಯಥಿಯನ್‌ ಕ್ರಿಯೋಲ್‌":"ht","ಹಿಂದಿ":"hi","ಹೀಬ್ರೂ":"he","അമാറിക്":"am","അർമേനിയൻ":"hy","അൽബേനിയൻ":"sq","അസർബൈജാനി":"az","അറബിക്":"ar","ഇന്തോനേഷ്യൻ":"id","ഇംഗ്ലീഷ്":"en","ഇറ്റാലിയൻ":"it","ഉക്രേനിയൻ":"uk","ഉസ്ബെക്ക്":"uz","എസ്‌പെരന്തോ":"eo","എസ്റ്റോണിയൻ":"et","ഐസ്‌ലാൻഡിക്":"is","ഐറിഷ്":"ga","കന്നട":"kn","കാറ്റലൻ":"ca","കുർദ്ദിഷ്":"ku","കൊറിയൻ":"ko","ക്രൊയേഷ്യൻ":"hr","ഗലീഷ്യൻ":"gl","ഗ്രീക്ക്":"el","ചെക്ക്":"cs","ചൈനീസ് (പരമ്പരാഗതം)":"zh-tw","ചൈനീസ് (ലഘൂകരിച്ചത്)":"zh-cn","ജർമ്മൻ":"de","ജാപ്പനീസ്‌":"ja","ടർക്കിഷ്":"tr","ഡച്ച്":"nl","ഡാനിഷ്":"da","തായ്":"th","തെലുങ്ക്":"te","നോർവീജിയൻ":"nb","പേർഷ്യൻ":"fa","പോർച്ചുഗീസ്":"pt","പോളിഷ്":"pl","ഫിന്നിഷ്":"fi","ഫ്രെഞ്ച്":"fr","ബർമീസ്":"my","ബൾഗേറിയൻ":"bg","ബാസ്ക്":"eu","ബെലാറുഷ്യൻ":"be","മംഗോളിയൻ":"mn","മലയാളം":"ml","മലയ്":"ms","മറാഠി":"mr","മാസഡോണിയൻ":"mk","മാൾട്ടീസ്":"mt","മൗറി":"mi","ലാറ്റിൻ":"la","ലാറ്റ്‌വിയൻ":"lv","ലിത്വേനിയൻ":"lt","വിയറ്റ്നാമീസ്":"vi","വെൽഷ്":"cy","സുളു":"zu","സെർബിയൻ":"sr","സ്കോട്ട്സ് ഗ്യാലിക്":"gd","സ്പാനിഷ്":"es","സ്ലോവാക്":"sk","സ്ലോവേനിയൻ":"sl","സ്വീഡിഷ്":"sv","ഹംഗേറിയൻ":"hu","ഹിന്ദി":"hi","ഹീബ്രു":"he","ഹെയ്തിയൻ ക്രയോൾ":"ht","റഷ്യൻ":"ru","റൊമേനിയൻ":"ro","albánčina":"sq","amharčina":"am","arabčina":"ar","arménčina":"hy","azerbajdžančina":"az","barmčina":"my","bieloruština":"be","bulharčina":"bg","čínština (tradičná)":"zh-tw","dánčina":"da","estónčina":"et","fínčina":"fi","francúzština":"fr","galícijčina":"gl","gréčtina":"el","haitská kreolčina":"ht","hebrejčina":"he","hindčina":"hi","holandčina":"nl","chorvátčina":"hr","indonézština":"id","írčina":"ga","islandčina":"is","japončina":"ja","kannadčina":"kn","katalánčina":"ca","kórejčina":"ko","kurdčina":"ku","latinčina":"la","litovčina":"lt","macedónčina":"mk","maďarčina":"hu","malajámčina":"ml","malajčina":"ms","maltčina":"mt","maorijčina":"mi","maratčina":"mr","mongolčina":"mn","nemčina":"de","nórčina":"nb","perzština":"fa","poľština":"pl","portugalčina":"pt","rumunčina":"ro","slovenčina":"sk","slovinčina":"sl","srbčina":"sr","škótska gaelčina":"gd","španielčina":"es","švédčina":"sv","taliančina":"it","telugčina":"te","thajčina":"th","ukrajinčina":"uk","vietnamčina":"vi","waleština":"cy","zuluština":"zu","isi-albania":"sq","isi-amharic":"am","isi-arabic":"ar","isi-armenian":"hy","isi-azerbaijani":"az","isi-basque":"eu","isi-belarusian":"be","isi-bulgarian":"bg","isi-burmese":"my","isi-catalan":"ca","isi-chinese (simplified)":"zh-cn","isi-chinese (traditional)":"zh-tw","isi-croatian":"hr","isi-czech":"cs","isi-danish":"da","isi-dutch":"nl","isi-english":"en","isi-esperanto":"eo","isi-estonian":"et","isi-finnish":"fi","isi-french":"fr","isi-galician":"gl","isi-german":"de","isi-greek":"el","isi-haitian creole":"ht","isi-hangarian":"hu","isi-hebrew":"he","isi-hindi":"hi","isi-icelandic":"is","isi-indonesian":"id","isi-irish":"ga","isi-italian":"it","isi-japanese":"ja","isi-kannada":"kn","isi-korean":"ko","isi-kurdish":"ku","isi-latin":"la","isi-latvian":"lv","isi-lithuanian":"lt","isi-macedonian":"mk","isi-malay":"ms","isi-malayalam":"ml","isi-maltese":"mt","isi-maori":"mi","isi-marathi":"mr","isi-mongolian":"mn","isi-norwegian":"nb","isi-persian":"fa","isi-polish":"pl","isi-portuguese":"pt","isi-romanian":"ro","isi-russian":"ru","isi-scots gaelic":"gd","isi-serbian":"sr","isi-slovak":"sk","isi-slovenian":"sl","isi-spanish":"es","isi-swedish":"sv","isi-telugu":"te","isi-thai":"th","isi-turkish":"tr","isi-ukrainian":"uk","isi-uzbek":"uz","isi-vietnamese":"vi","isi-welsh":"cy","isizulu":"zu","albania":"sq","armenia":"hy","azerbaijan":"az","belanda":"nl","belarus":"be","bulgaria":"bg","cina (mudah)":"zh-cn","cina (tradisional)":"zh-tw","croatia":"hr","denmark":"da","estonia":"et","finland":"fi","gaelic scotland":"gd","galicia":"gl","hungary":"hu","ibrani":"he","iceland":"is","indonesia":"id","inggeris":"en","ireland":"ga","itali":"it","jepun":"ja","jerman":"de","korea":"ko","kreol haiti":"ht","kurdistan":"ku","latvia":"lv","lithuania":"lt","macedonia":"mk","malta":"mt","melayu":"ms","mongolia":"mn","myanmar":"my","norway":"nb","parsi":"fa","perancis":"fr","poland":"pl","portugis":"pt","romania":"ro","rusia":"ru","sepanyol":"es","serbia":"sr","slovenia":"sl","sweden":"sv","turki":"tr","ukraine":"uk","vietnam":"vi","wales":"cy","азербайджанский":"az","албанский":"sq","амхарский":"am","английский":"en","арабский":"ar","армянский":"hy","баскский":"eu","белорусский":"be","бирманский":"my","болгарский":"bg","валлийский":"cy","венгерский":"hu","вьетнамский":"vi","галисийский":"gl","греческий":"el","датский":"da","иврит":"he","индонезийский":"id","ирландский":"ga","исландский":"is","испанский":"es","итальянский":"it","каталанский":"ca","китайский (традиционный)":"zh-tw","китайский (упрощенный)":"zh-cn","корейский":"ko","креольский (гаити)":"ht","курманджи":"ku","латинский":"la","латышский":"lv","литовский":"lt","македонский":"mk","малайский":"ms","мальтийский":"mt","маори":"mi","монгольский":"mn","немецкий":"de","нидерландский":"nl","норвежский":"nb","персидский":"fa","польский":"pl","португальский":"pt","румынский":"ro","русский":"ru","сербский":"sr","словацкий":"sk","словенский":"sl","тайский":"th","турецкий":"tr","узбекский":"uz","украинский":"uk","финский":"fi","французский":"fr","хинди":"hi","хорватский":"hr","чешский":"cs","шведский":"sv","шотландский (гэльский)":"gd","эсперанто":"eo","эстонский":"et","японский":"ja","albański":"sq","amharski":"am","angielski":"en","arabski":"ar","azerski":"az","baskijski":"eu","białoruski":"be","birmański":"my","bułgarski":"bg","chiński (tradycyjny)":"zh-tw","chiński (uproszczony)":"zh-cn","chorwacki":"hr","czeski":"cs","duński":"da","estoński":"et","fiński":"fi","francuski":"fr","galicyjski":"gl","grecki":"el","hebrajski":"he","hiszpański":"es","indonezyjski":"id","irlandzki":"ga","islandzki":"is","japoński":"ja","kataloński":"ca","koreański":"ko","kreolski (haiti)":"ht","kurdyjski":"ku","litewski":"lt","łaciński":"la","łotewski":"lv","macedoński":"mk","malajalam":"ml","malajski":"ms","maltański":"mt","mongolski":"mn","niderlandzki":"nl","niemiecki":"de","norweski":"nb","ormiański":"hy","perski":"fa","polski":"pl","portugalski":"pt","rosyjski":"ru","rumuński":"ro","serbski":"sr","słowacki":"sk","słoweński":"sl","szkocki gaelicki":"gd","szwedzki":"sv","tajski":"th","turecki":"tr","ukraiński":"uk","uzbecki":"uz","walijski":"cy","węgierski":"hu","wietnamski":"vi","włoski":"it","азербайджанская":"az","албанская":"sq","амхарская":"am","англійская":"en","арабская":"ar","армянская":"hy","балгарская":"bg","баскская":"eu","беларуская":"be","в\'етнамская":"vi","валійская":"cy","венгерская":"hu","гаіцянская крэольская":"ht","галандская":"nl","галісійская":"gl","грэчаская":"el","дацкая":"da","інданезійская":"id","ірландская":"ga","ісландская":"is","іспанская":"es","італьянская":"it","іўрыт":"he","карэйская":"ko","каталонская":"ca","кітайская (спрошчаная)":"zh-cn","кітайская (традыцыйная)":"zh-tw","курдская (курманджы)":"ku","латышская":"lv","лацінская":"la","літоўская":"lt","м\'янманская (бірманская)":"my","маары":"mi","македонская":"mk","малайская":"ms","мальтыйская":"mt","мангольская":"mn","нарвежская":"nb","нямецкая":"de","партугальская":"pt","персідская":"fa","польская":"pl","румынская":"ro","руская":"ru","сербская":"sr","славацкая":"sk","славенская":"sl","тайская":"th","турэцкая":"tr","тэлугу":"te","узбекская":"uz","украінская":"uk","фінская":"fi","французская":"fr","харвацкая":"hr","хіндзі":"hi","чэшская":"cs","шатландская гэльская":"gd","шведская":"sv","эсперанта":"eo","эстонская":"et","японская":"ja","amarikisht":"am","anglisht":"en","arabisht":"ar","armenisht":"hy","azerisht":"az","baskisht":"eu","birmanisht":"my","bjellorusisht":"be","bullgarisht":"bg","çekisht":"cs","danisht":"da","estonisht":"et","finlandisht":"fi","frëngjisht":"fr","galicianisht":"gl","galishte skoceze":"gd","greqisht":"el","gjermanisht":"de","hebraisht":"he","hindisht":"hi","holandisht":"nl","hungarisht":"hu","indonezisht":"id","irlandisht":"ga","islandisht":"is","italisht":"it","japonisht":"ja","kanada":"kn","katalonisht":"ca","kinezisht (e thjeshtuar)":"zh-cn","kinezisht (tradicionale)":"zh-tw","koreanisht":"ko","kreolishte haitiane":"ht","kroatisht":"hr","latinisht":"la","letonisht":"lv","lituanisht":"lt","malajalamisht":"ml","malajzisht":"ms","malteze":"mt","maorisht":"mi","maqedonisht":"mk","maratisht":"mr","mongolisht":"mn","norvegjisht":"nb","persisht":"fa","polonisht":"pl","portugalisht":"pt","rumanisht":"ro","rusisht":"ru","serbisht":"sr","sllovakisht":"sk","sllovenisht":"sl","spanjisht":"es","suedisht":"sv","shqip":"sq","tajlandisht":"th","telugisht":"te","turqisht":"tr","uellsisht":"cy","ukrainisht":"uk","uzbekisht":"uz","vietnamisht":"vi","ሀንጋሪኛ":"hu","ህንድኛ":"hi","ሊትዌንኛ":"lt","ላቲንኛ":"la","ላትቪያኛ":"lv","ማላያላምኛ":"ml","ማላይኛ":"ms","ማልቲስኛ":"mt","ማራቲኛ":"mr","ማዮሪኛ":"mi","ሜቄዶኒያኛ":"mk","ሞንጎሊያኛ":"mn","ራሽያኛ":"ru","ሮማኒያንኛ":"ro","ሰርቢያኛ":"sr","ስሎቫክኛ":"sk","ስሎቬንያኛ":"sl","ስዊድንኛ":"sv","ስፓኒሽኛ":"es","በርማኛ":"my","ቡልጋሪያኛ":"bg","ባስክኛ":"eu","ቤላሩስኛ":"be","ቪትናምኛ":"vi","ቱርክኛ":"tr","ታይኛ":"th","ቴሉጉኛ":"te","ቻይንኛ   (ቀላሉ)":"zh-cn","ቻይንኛ  (ባሕላዊው)":"zh-tw","ቼክኛ":"cs","ኖርዌጅያንኛ":"nb","አልባንያኛ":"sq","አማርኛ":"am","አርመኒያኛ":"hy","አዜርባይጃንኛ":"az","አይሪሽ":"ga","አይስላንድኛ":"is","ኡዝቤክኛ":"uz","ኤስቶኒያኛ":"et","ኤስፐራንቶ":"eo","እንዶኔዢያኛ":"id","እንግሊዝኛ":"en","ኩርድሽኛ":"ku","ካታላንኛ":"ca","ካናዳኛ":"kn","ክሮኤሽያኛ":"hr","ኮሪያኛ":"ko","ዌልሽ":"cy","ዐረብኛ":"ar","ዕብራይስጥ":"he","ዙሉኛ":"zu","የሃይቲ ክረኦሌኛ":"ht","የስኮት ጌልክኛ":"gd","ዩክሬንኛ":"uk","ደችኛ":"nl","ዴንሽኛ":"da","ጀርመንኛ":"de","ጃፓንኛ":"ja","ጋሊሺያኛ":"gl","ግሪክኛ":"el","ጣሊያንኛ":"it","ፈረንሳይኛ":"fr","ፊኒሽኛ":"fi","ፐርሺያኛ":"fa","ፖሊሽኛ":"pl","ፖርቱጋሊኛ":"pt","alban":"sq","alman":"de","amarikcə":"am","azərbaycan dili":"az","bask":"eu","belarusca":"be","bolqar":"bg","çex":"cs","çin (ən\'ənəvi)":"zh-tw","çin (sadələşdirilmiş)":"zh-cn","danimarka":"da","erməni":"hy","eston":"et","ərəb":"ar","fars dili":"fa","fin":"fi","fransız":"fr","haiti kreol dili":"ht","hind":"hi","xorvat":"hr","ispan":"es","i̇ndoneziya":"id","i̇ngilis":"en","i̇rland":"ga","i̇sland":"is","i̇sveç":"sv","i̇talyan":"it","i̇vrit":"he","katalan":"ca","koreya":"ko","kürd dili (kurmanci)":"ku","qalisian":"gl","latın":"la","latış":"lv","litva":"lt","macar":"hu","makedoniya":"mk","maoricə":"mi","monqolca":"mn","myanma (birma) dili":"my","norveç":"nb","özbək":"uz","polyak":"pl","portuqal":"pt","rumın":"ro","rus":"ru","serb":"sr","sloven":"sl","şotland (kelt)":"gd","tayca":"th","teluqu":"te","türk":"tr","uels":"cy","ukrayna":"uk","vyetnam":"vi","yapon":"ja","yunan":"el","zulu dili":"zu","albaniż":"sq","amħari":"am","armen":"hy","ażerbajġani":"az","belarussu":"be","bulgaru":"bg","ċek":"cs","ċiniż (semplifikat)":"zh-cn","ċiniż (tradizzjonali)":"zh-tw","creole haiti":"ht","daniż":"da","ebrajk":"he","estonjan":"et","finlandiż":"fi","franċiż":"fr","ġappuniż":"ja","ġermaniż":"de","gaelic tal-iskoċċiżi":"gd","galizjan":"gl","grieg":"el","għarbi":"ar","ħindi":"hi","indoneżjan":"id","ingliż":"en","irlandiż":"ga","islandiż":"is","kroat":"hr","kurd (kurmanji)":"ku","latvjan":"lv","litwen":"lt","maċedonjan":"mk","malasjan":"ms","malti":"mt","marati":"mr","mjanmar (burma)":"my","mongoljan":"mn","norveġiż":"nb","olandiż":"nl","persjan":"fa","pollakk":"pl","portugiż":"pt","rumen":"ro","russu":"ru","slovakk":"sk","spanjol":"es","svediż":"sv","tajlandiż":"th","taljan":"it","tork":"tr","ukren":"uk","ungeriż":"hu","użbek":"uz","vjetnamiż":"vi","żulu":"zu","albanski":"sq","amharik":"am","arapski":"ar","armenijski":"hy","azerbajdžanski":"az","bjeloruski":"be","bugarski":"bg","burmanski":"my","češki":"cs","danski":"da","engleski":"en","estonski":"et","finski":"fi","galski":"gl","grčki":"el","haićansko-kreolski":"ht","hebrejski":"he","hindu":"hi","hrvatski":"hr","indonezijski":"id","irski":"ga","islandski":"is","japanski":"ja","katalonski":"ca","kineski (pojednost.)":"zh-cn","kineski (tradicionalni)":"zh-tw","korejski":"ko","kurdski":"ku","latinski":"la","latvijski/letonski":"lv","litvanski":"lt","mađarski":"hu","makedonski":"mk","malezijski":"ms","malteški":"mt","nizozemski":"nl","norveški":"nb","njemački":"de","perzijski":"fa","poljski":"pl","rumunjski":"ro","ruski":"ru","slovački":"sk","slovenski":"sl","srpski":"sr","škotski keltski":"gd","španjolski":"es","švedski":"sv","tajlandski":"th","talijanski":"it","turski":"tr","ukrajinski":"uk","uzbekistanski":"uz","velški":"cy","vijetnamski":"vi","آذرباﻳﺠﺎﻧﻰ":"az","آلبانیایی":"sq","آلمانی":"de","ارمنی":"hy","ازبکی":"uz","اسپانیایی":"es","اسپرانتو":"eo","استونيايی":"et","اسلواکی":"sk","اسلونیایی":"sl","اکراينی":"uk","امهری":"am","اندونزيايی":"id","انگلیسی":"en","ایتالیایی":"it","ایرلندی":"ga","ايسلندی":"is","باسکی":"eu","برمه‌ای":"my","بلاروسی":"be","بلغاری":"bg","پرتغالی":"pt","تايلندی":"th","ترکی استانبولی":"tr","تلوگو":"te","چک":"cs","چینی (ساده‌شده)":"zh-cn","چینی (سنتی)":"zh-tw","دانمارکی":"da","روسی":"ru","رومانيايی":"ro","زولو":"zu","ژاپنی":"ja","سوئدی":"sv","صربی":"sr","عبری":"he","عربی":"ar","فارسی":"fa","فرانسوی":"fr","فنلاندی":"fi","کاتالان":"ca","کانارا":"kn","کرئول هائیتی":"ht","کردی":"ku","کرواتی":"hr","کره‌ای":"ko","گالیسی":"gl","گاليک اسکاتلندی":"gd","لاتين":"la","لتونيايی":"lv","لهستانی":"pl","ليتوانيايی":"lt","مائوری":"mi","مالایالمی":"ml","مالايی":"ms","مالتی":"mt","مجاری":"hu","مراتی":"mr","مغولی":"mn","مقدونيه‌ای":"mk","نروژی":"nb","ولزی":"cy","ويتنامی":"vi","هلندی":"nl","هندی":"hi","يونانی":"el","ahepaitani":"az","airihi":"ga","amariki":"am","amēniana":"hy","arapeinia":"sq","arapi":"ar","eperānato":"eo","etōnia":"et","haina (onamata)":"zh-tw","hainamana (kua whakamāmātia)":"zh-cn","hanekeria":"hu","hapanihi":"ja","herepia":"sr","hinerangi":"fi","hīni":"hi","hiperu":"he","horowākia":"sk","horowinia":"sl","huitene":"sv","huru":"zu","ingarihi":"en","initonīhia":"id","itāriana":"it","kanata":"kn","karihia":"gl","katarāna":"ca","kereore haiti":"ht","kiriki":"el","kōreana":"ko","koroātiana":"hr","korukoru":"tr","kūrihi":"ku","makerōnia":"mk","māratihi":"mt","marei":"ms","mareiarama":"ml","mongōriana":"mn","nōwei":"nb","pākihi":"eu","pāniora":"es","pēma (purumīhi)":"my","peraruhia":"be","perēhia":"fa","pōrana":"pl","potukīhi":"pt","purukāriana":"bg","rātini":"la","rāwhiana":"lv","rituānia":"lt","romānia":"ro","rūhia":"ru","tai":"th","tati":"nl","tenemāka":"da","teruku":"te","tiamana":"de","tieke":"cs","tiorangi":"is","tuauri kotarangi":"gd","uhipeke":"uz","ūkareiana":"uk","wēra":"cy","whitināmu":"vi","wīwī":"fr","αγγλικά":"en","αζερμπαϊτζανικά":"az","αλβανικά":"sq","αμχαρικά":"am","αραβικά":"ar","αρμενικά":"hy","βασκικά":"eu","βιετναμεζικά":"vi","βιρμανικά":"my","βουλγαρικά":"bg","γαελικά σκοτίας":"gd","γαλικιακά":"gl","γαλλικά":"fr","γερμανικά":"de","δανικά":"da","εβραϊκά":"he","ελληνικά":"el","εσθονικά":"et","εσπεράντο":"eo","ζουλού":"zu","ιαπωνικά":"ja","ινδονησιακά":"id","ιρλανδικά":"ga","ισλανδικά":"is","ισπανικά":"es","ιταλικά":"it","κανάντα":"kn","καταλανικά":"ca","κινέζικα (απλοποιημένα)":"zh-cn","κινέζικα (παραδοσιακά)":"zh-tw","κορεατικά":"ko","κουρδικά":"ku","κρεόλ αϊτής":"ht","κροατικά":"hr","λατινικά":"la","λετονικά":"lv","λευκορωσικά":"be","λιθουανικά":"lt","μαλαγιάλαμ":"ml","μαλέι":"ms","μαλτεζικά":"mt","μαορί":"mi","μαραθικά":"mr","μογγολικά":"mn","νορβηγικά":"nb","ολλανδικά":"nl","ουαλικά":"cy","ουγγρικά":"hu","ουζμπεκικά":"uz","ουκρανικά":"uk","περσικά":"fa","πολωνικά":"pl","πορτογαλικά":"pt","ρουμανικά":"ro","ρωσικά":"ru","σερβικά":"sr","σλαβομακεδονικά":"mk","σλοβακικά":"sk","σλοβενικά":"sl","σουηδικά":"sv","ταϊλανδεζικά":"th","τελούγκου":"te","τούρκικα":"tr","τσεχικά":"cs","φινλανδικά":"fi","χίντι":"hi","amxar":"am","arman":"hy","bolgar":"bg","dat":"da","fors":"fa","fransuz":"fr","gaiti-kreol":"ht","galisiy":"gl","golland":"nl","grek":"el","ibroniy":"he","indonez":"id","ingliz":"en","irland":"ga","island":"is","italyan":"it","koreys":"ko","kurd (kurmonji)":"ku","latish":"lv","lotin":"la","makedon":"mk","maltiy":"mt","maratxi":"mr","mo‘g‘ul":"mn","nemis":"de","norveg":"nb","ozarbayjon":"az","portugal":"pt","rumin":"ro","tay":"th","turk":"tr","ukrain":"uk","valliy":"cy","venger":"hu","xitoy (an’anaviy)":"zh-tw","xitoy (soddalashgan)":"zh-cn","o‘zbek":"uz","shotland-gel":"gd","shved":"sv","chex":"cs","albanska":"sq","amharísku":"am","arabíska":"ar","armenska":"hy","aserska":"az","baskneska":"eu","búlgarska":"bg","búrmíska":"my","danska":"da","eistneska":"et","enska":"en","esperantó":"eo","finnska":"fi","franska":"fr","galisíska":"gl","gríska":"el","haítískt kreólamál":"ht","hebreska":"he","hindí":"hi","hollenska":"nl","hvítrússneska":"be","indónesíska":"id","írska":"ga","íslenska":"is","ítalska":"it","japanska":"ja","katalónska":"ca","kínverska (einfölduð)":"zh-cn","kínverska (hefðbundin)":"zh-tw","kóreska":"ko","króatíska":"hr","kúrdíska":"ku","latína":"la","lettneska":"lv","litháíska":"lt","makedónska":"mk","malajíska":"ms","maltneska":"mt","maoríska":"mi","maratí":"mr","mongólska":"mn","norska":"nb","persneska":"fa","portúgalska":"pt","pólska":"pl","rúmenska":"ro","rússneska":"ru","serbneska":"sr","skosk-gelíska":"gd","slóvakíska":"sk","slóvenska":"sl","spænska":"es","súlú":"zu","sænska":"sv","taílenska":"th","tékkneska":"cs","tyrkneska":"tr","ungverska":"hu","úkraínska":"uk","úsbekíska":"uz","velska":"cy","víetnamska":"vi","þýska":"de","ադրբեջաներեն":"az","ալբաներեն":"sq","ամհարերեն":"am","անգլերեն":"en","արաբերեն":"ar","բասկերեն":"eu","բելառուսերեն":"be","բիրմաներեն":"my","բուլղարերեն":"bg","գալիսերեն":"gl","գերմաներեն":"de","դանիերեն":"da","եբրայերեն":"he","զուլուսերեն":"zu","էսպերանտո":"eo","էստոներեն":"et","թայերեն":"th","թուրքերեն":"tr","ինդոնեզերեն":"id","իռլանդերեն":"ga","իսլանդերեն":"is","իսպաներեն":"es","իտալերեն":"it","լատիներեն":"la","լատվիերեն":"lv","լեհերեն":"pl","լիտվերեն":"lt","խորվաթերեն":"hr","կաննադա":"kn","կատալաներեն":"ca","կելտական շոտլանդերեն":"gd","կորեերեն":"ko","կրեոլերեն (հայիթի)":"ht","հայերեն":"hy","հինդի":"hi","հոլանդերեն":"nl","հունարեն":"el","հունգարերեն":"hu","ճապոներեն":"ja","մալայալամ":"ml","մալայերեն":"ms","մալթերեն":"mt","մակեդոներեն":"mk","մաորի":"mi","մարաթի":"mr","մոնղոլերեն":"mn","նորվեգերեն":"nb","շվեդերեն":"sv","ուզբեկերեն":"uz","ուկրաիներեն":"uk","չեխերեն":"cs","չինարեն (ավանդական)":"zh-tw","չինարեն (պարզեցված)":"zh-cn","պարսկերեն":"fa","պորտուգալերեն":"pt","ռումիներեն":"ro","ռուսերեն":"ru","սերբերեն":"sr","սլովակերեն":"sk","սլովեներեն":"sl","վալերեն":"cy","վիետնամերեն":"vi","տելուգու":"te","քրդերեն (քուրմանջի)":"ku","ֆիններեն":"fi","ֆրանսերեն":"fr","arabia":"ar","baski":"eu","burma":"my","englanti":"en","espanja":"es","haitinkreoli":"ht","heprea":"he","hollanti":"nl","iiri":"ga","islanti":"is","italia":"it","japani":"ja","katalaani":"ca","kiina (perinteinen)":"zh-tw","kiina (yksinkert.)":"zh-cn","kreikka":"el","kroatia":"hr","kurdi":"ku","kymri":"cy","liettua":"lt","makedonia":"mk","malaiji":"ms","norja":"nb","persia":"fa","portugali":"pt","puola":"pl","ranska":"fr","ruotsi":"sv","saksa":"de","skottigaeli":"gd","slovakia":"sk","suomi":"fi","tanska":"da","tsekki":"cs","turkki":"tr","ukraina":"uk","unkari":"hu","uzbekki":"uz","valkovenäjä":"be","venäjä":"ru","viro":"et","albaniera":"sq","alemana":"de","amharera":"am","arabiera":"ar","armeniera":"hy","azerbaijanera":"az","bielorrusiera":"be","birmaniera":"my","bulgariera":"bg","daniera":"da","errumaniera":"ro","errusiera":"ru","eskoziako gaelera":"gd","eslovakiera":"sk","esloveniera":"sl","esperantoa":"eo","estoniera":"et","euskara":"eu","frantsesa":"fr","gaelera":"cy","galiziera":"gl","gaztelania":"es","greziera":"el","hebreera":"he","hindia":"hi","hungariera":"hu","indonesiera":"id","ingelesa":"en","irlandera":"ga","islandiera":"is","italiera":"it","japoniera":"ja","katalana":"ca","koreera":"ko","kreolera (haiti)":"ht","kroaziera":"hr","kurduera":"ku","letoniera":"lv","lituaniera":"lt","malabarera":"ml","malaysiera":"ms","maltera":"mt","maoriera":"mi","marathera":"mr","mazedoniera":"mk","mongoliera":"mn","nederlandera":"nl","norvegiera":"nb","persiera":"fa","poloniera":"pl","portugesa":"pt","serbiera":"sr","suediera":"sv","suomiera":"fi","telugua":"te","thaiera":"th","turkiera":"tr","txekiera":"cs","txinera (soildua)":"zh-cn","txinera (tradizionala)":"zh-tw","ukrainera":"uk","uzbekera":"uz","vietnamera":"vi","zuluera":"zu","albanès":"sq","alemany":"de","amhàric":"am","anglès":"en","àrab":"ar","armeni":"hy","àzeri":"az","basc":"eu","bielorús":"be","birmà":"my","búlgar":"bg","castellà":"es","català":"ca","coreà":"ko","crioll d\'haití":"ht","croat":"hr","danès":"da","eslovac":"sk","eslovè":"sl","estonià":"et","finès":"fi","francès":"fr","gaèlic escocès":"gd","gallec":"gl","gal·lès":"cy","hebreu":"he","hongarès":"hu","indonesi":"id","irlandès":"ga","islandès":"is","italià":"it","japonès":"ja","letó":"lv","lituà":"lt","llatí":"la","macedònic":"mk","malai":"ms","malaiàlam":"ml","maltès":"mt","neerlandès":"nl","noruec":"nb","polonès":"pl","portuguès":"pt","romanès":"ro","serbi":"sr","suec":"sv","txec":"cs","ucraïnès":"uk","xinès (simplificat)":"zh-cn","xinès (tradicional)":"zh-tw","albāņu":"sq","amharu":"am","angļu":"en","arābu":"ar","armēņu":"hy","azerbaidžāņu":"az","baltkrievu":"be","basku":"eu","birmiešu":"my","bulgāru":"bg","čehu":"cs","dāņu":"da","ebreju (ivrits)":"he","franču":"fr","galisiešu":"gl","grieķu":"el","holandiešu":"nl","horvātu":"hr","igauņu":"et","indonēziešu":"id","īru":"ga","īslandiešu":"is","itāļu":"it","japāņu":"ja","katalāņu":"ca","korejiešu":"ko","kreolu (haiti)":"ht","krievu":"ru","kurdu":"ku","ķīniešu (tradicionālā)":"zh-tw","ķīniešu (vienkāršotā)":"zh-cn","latīņu":"la","latviešu":"lv","lietuviešu":"lt","maķedoniešu":"mk","malajalamiešu":"ml","malajiešu":"ms","maltiešu":"mt","maratu":"mr","mongoļu":"mn","norvēģu":"nb","persiešu":"fa","poļu":"pl","portugāļu":"pt","rumāņu":"ro","serbu":"sr","skotu gēlu":"gd","slovāku":"sk","slovēņu":"sl","somu":"fi","spāņu":"es","taju":"th","turku":"tr","ukraiņu":"uk","ungāru":"hu","uzbeku":"uz","vācu":"de","velsiešu":"cy","vjetnamiešu":"vi","zviedru":"sv","belarussia":"be","cek":"cs","china (aks. sederhana)":"zh-cn","china (aks. tradisional)":"zh-tw","finlandia":"fi","gaelig":"ga","gaelik skotlandia":"gd","galisia":"gl","inggris":"en","islan":"is","jepang":"ja","katala":"ca","lituania":"lt","polandia":"pl","prancis":"fr","rumania":"ro","swensk":"sv","yunani":"el","అజర్‌బైజాని":"az","అర్మేనియన్":"hy","అల్బేనియన్":"sq","ఆంగ్లము":"en","ఆమ్హారిక్":"am","ఆరబిక్":"ar","ఇండొనేసియన్":"id","ఇటాలియన్":"it","ఉజ్బెక్":"uz","ఎస్పెరాంటో":"eo","ఏస్టోనియన్":"et","ఐరిష్":"ga","ఐస్ లాండిక్":"is","కన్నడ":"kn","కర్డిష్":"ku","కొరియన్":"ko","క్యాటలాన్":"ca","క్రొయేషియన్":"hr","గాలిసియన్":"gl","గ్రీక్":"el","చెక్":"cs","చైనీస్ (సరళమైన)":"zh-cn","చైనీస్ (సామ్ప్రదాయమైన)":"zh-tw","జపనీస్":"ja","జర్మన్":"de","జులు":"zu","టర్కిష్":"tr","డచ్":"nl","డానిష్":"da","తెలుగు":"te","థాయ్":"th","నార్విజియన్":"nb","పర్షియన్":"fa","పోర్చుగీస్":"pt","పోలిష్":"pl","ఫిన్నిష్":"fi","ఫ్రెంచ్":"fr","బర్మీస్":"my","బల్గేరియన్":"bg","బాస్క్":"eu","బెలారుషియన్":"be","మంగోలియన్":"mn","మయోరి":"mi","మరాఠీ":"mr","మలయాళం":"ml","మాలై":"ms","మాల్టీస్":"mt","మాసిడోనియన్":"mk","యుక్రేనియన్":"uk","రష్యన్":"ru","రొమేనియన్":"ro","లాటిన్":"la","లాట్వియన్":"lv","లిథువేనియన్":"lt","వియత్నామీస్":"vi","వెల్ష్":"cy","సెర్బియన్":"sr","స్కాట్స్ గేలిక్":"gd","స్పానిష్":"es","స్లోవక్":"sk","స్లోవేనియన్":"sl","స్వీడిష్":"sv","హంగేరియన్":"hu","హిందీ":"hi","హీబ్రూ":"he","హైయేటియన్ క్రియోల్":"ht","amhárico":"am","azerí":"az","chino (simplificado)":"zh-cn","chino (tradicional)":"zh-tw","criollo haitiano":"ht","danés":"da","estonio":"et","euskera":"eu","finlandés":"fi","gallego":"gl","griego":"el","japonés":"ja","kurdo":"ku","malayo":"ms","noruego":"nb","rumano":"ro","uzbeco":"uz","albaania":"sq","amhaari":"am","araabia":"ar","armeenia":"hy","aserbaidžaani":"az","birma":"my","bulgaaria":"bg","eesti":"et","galeegi":"gl","haitikreooli":"ht","heebrea":"he","hispaania":"es","hollandi":"nl","horvaadi":"hr","indoneesia":"id","inglise":"en","islandi":"is","itaalia":"it","jaapani":"ja","kreeka":"el","ladina":"la","leedu":"lt","lihtsustatud hiina":"zh-cn","läti":"lv","makedoonia":"mk","malajalaami":"ml","maoori":"mi","mongoli":"mn","norra":"nb","poola":"pl","prantsuse":"fr","pärsia":"fa","rootsi":"sv","rumeenia":"ro","slovaki":"sk","sloveeni":"sl","soome":"fi","suulu":"zu","šoti":"gd","taani":"da","traditsiooniline hiina":"zh-tw","tšehhi":"cs","türgi":"tr","uelsi":"cy","ungari":"hu","usbeki":"uz","valgevene":"be","vene":"ru","albanyen":"sq","amenyen":"hy","anglè":"en","azèbajani":"az","belarisyen":"be","bilgaryen":"bg","chinwa (senp)":"zh-cn","chinwa (tradisyonèl)":"zh-tw","danwa":"da","ebre":"he","endonezyen":"id","endou":"hi","estonyen":"et","fenlandè":"fi","franse":"fr","gaelik ekosè":"gd","galisyen":"gl","grèk":"el","ikrenyen":"uk","ilandè":"ga","islandè":"is","italyen":"it","izbèk":"uz","japonè":"ja","koreyen":"ko","kreyòl ayisyen":"ht","kurde (kurmandji)":"ku","kwoasyen":"hr","laten":"la","letonyen":"lv","lityanyen":"lt","malè":"ms","malt":"mt","masedonyen":"mk","mongolyen":"mn","myanma (burmese)":"my","nòvejyen":"nb","olandè, neyèlandè":"nl","onngaryen":"hu","panyòl":"es","pèsyen":"fa","polonè":"pl","pòtigè":"pt","ris":"ru","romanyen":"ro","sèb":"sr","slovenyen":"sl","syedwa":"sv","tuk":"tr","tyèk":"cs","vyetnamyen":"vi","albaneg":"sq","almaeneg":"de","arabeg":"ar","armeneg":"hy","aserbaijaneg":"az","basgeg":"eu","belarwseg":"be","bwlgaraidd":"bg","catalaneg":"ca","creol haiti":"ht","croateg":"hr","cymraeg":"cy","cyrdeg (kurmandji)":"ku","daneg":"da","eidaleg":"it","estoneg":"et","fietnameg":"vi","ffineg":"fi","fflemeg":"nl","ffrangeg":"fr","gaeleg yr alban":"gd","galisaidd":"gl","groeg":"el","gwyddeleg":"ga","hebraeg":"he","hwngareg":"hu","iaith corea":"ko","indonesieg":"id","islandeg":"is","iwcraineg":"uk","japaneg":"ja","latfieg":"lv","lithwaneg":"lt","lladin":"la","macedoneg":"mk","malteseg":"mt","mongoleg":"mn","myanmar (byrma)":"my","norwyeg":"nb","perseg":"fa","portiwgaleg":"pt","pwyleg":"pl","rwmaneg":"ro","rwsieg":"ru","saesneg":"en","sbaeneg":"es","serbeg":"sr","slofac":"sk","slofenia":"sl","swedeg":"sv","swlw":"zu","tsieceg":"cs","tsieineeg (traddodiadol)":"zh-tw","tsieineeg (wedi symleiddio)":"zh-cn","twrceg":"tr","usbec":"uz","अंग्रेज़ी":"en","अज़रबैजानी":"az","अल्बेनियन":"sq","आइसलैंडिक":"is","आर्मेनियन":"hy","इटैलियन":"it","उज़्बेक":"uz","एस्तोनियन":"et","एस्पेरांटो":"eo","ऐम्हेरिक":"am","कन्नड़":"kn","कुर्दिश (करमंजी)":"ku","कैटेलन":"ca","गैलिशियन":"gl","चीनी (परंपरागत)":"zh-tw","चेक":"cs","जापानी":"ja","ज़ुलु":"zu","डैनिश":"da","तुर्क":"tr","तेलुगु":"te","पुर्तगाली":"pt","फ़िनिश":"fi","फ़्रेंच":"fr","बर्मी":"my","बुल्गारियन":"bg","बेलारूसीयन":"be","बैस्क":"eu","मलयालम":"ml","माऔरी":"mi","माल्टी":"mt","मेसीडोनियन":"mk","यूक्रेनियन":"uk","रूसी":"ru","रोमेनियन":"ro","लातवियन":"lv","लैटिन":"la","वियतनामी":"vi","सर्बियाई":"sr","स्पैनिश":"es","स्लोवाक":"sk","स्लोवेनियन":"sl","हंगरियन":"hu","हीब्रू":"he","हैतियन क्रिओल":"ht","阿尔巴尼亚语":"sq","阿拉伯语":"ar","阿姆哈拉语":"am","阿塞拜疆语":"az","爱尔兰语":"ga","爱沙尼亚语":"et","巴斯克语":"eu","白俄罗斯语":"be","保加利亚语":"bg","冰岛语":"is","波兰语":"pl","波斯语":"fa","丹麦语":"da","德语":"de","俄语":"ru","法语":"fr","芬兰语":"fi","海地克里奥尔语":"ht","韩语":"ko","荷兰语":"nl","加利西亚语":"gl","加泰罗尼亚语":"ca","捷克语":"cs","卡纳达语":"kn","克罗地亚语":"hr","库尔德语":"ku","拉丁语":"la","拉脱维亚语":"lv","立陶宛语":"lt","罗马尼亚语":"ro","马耳他语":"mt","马拉地语":"mr","马拉雅拉姆语":"ml","马来语":"ms","马其顿语":"mk","毛利语":"mi","蒙古语":"mn","缅甸语":"my","南非祖鲁语":"zu","挪威语":"nb","葡萄牙语":"pt","日语":"ja","瑞典语":"sv","塞尔维亚语":"sr","世界语":"eo","斯洛伐克语":"sk","斯洛文尼亚语":"sl","苏格兰盖尔语":"gd","泰卢固语":"te","泰语":"th","土耳其语":"tr","威尔士语":"cy","乌克兰语":"uk","乌兹别克语":"uz","西班牙语":"es","希伯来语":"he","希腊语":"el","匈牙利语":"hu","亚美尼亚语":"hy","意大利语":"it","印地语":"hi","印尼语":"id","英语":"en","越南语":"vi","中文(繁体)":"zh-tw","中文(简体)":"zh-cn","азербайджански":"az","английски":"en","арабски":"ar","арменски":"hy","баски":"eu","беларуски":"be","бирмански":"my","български":"bg","галисийски":"gl","гръцки":"el","датски":"da","индонезийски":"id","ирландски":"ga","испански":"es","италиански":"it","китайски (опростен)":"zh-cn","китайски (традиционен)":"zh-tw","корейски":"ko","кюрдски":"ku","латвийски":"lv","литовски":"lt","малайски":"ms","малтийски":"mt","немски":"de","нидерландски":"nl","норвежки":"nb","персийски":"fa","румънски":"ro","словашки":"sk","словенски":"sl","сръбски":"sr","тайландски":"th","уелски":"cy","узбекски":"uz","финландски":"fi","френски":"fr","хаитянски креолски":"ht","хърватски":"hr","шотландски келтски":"gd","японски":"ja","الآيسلندية":"is","الأذرية":"az","الارمنية":"hy","الإسبانية":"es","الاسبرانتو":"eo","الإستونية":"et","الاسكتلندية الغالية":"gd","الألبانية":"sq","الألمانية":"de","الأمهرية":"am","الإنجليزية":"en","الإندونيسية":"id","الأوزبكية":"uz","الأوكرانية":"uk","الأيرلندية":"ga","الإيطالية":"it","الباسكية":"eu","البرتغالية":"pt","البلغارية":"bg","البورمية":"my","البولندية":"pl","البيلاروسية":"be","التايلاندية":"th","التركية":"tr","التشيكية":"cs","التيلوجو":"te","الجاليكية":"gl","الدانماركية":"da","الروسية":"ru","الرومانية":"ro","الزولوية":"zu","السلوفاكية":"sk","السلوفينية":"sl","السويدية":"sv","الصربية":"sr","الصينية (التقليدية)":"zh-tw","الصينية (المبسطة)":"zh-cn","العبرية":"he","العربية":"ar","الفارسية":"fa","الفرنسية":"fr","الفنلندية":"fi","الفيتنامية":"vi","القطلونية":"ca","الكانادا":"kn","الكردية":"ku","الكرواتية":"hr","الكورية":"ko","اللاتفية":"lv","اللاتينية":"la","اللغة الكريولية الهايتية":"ht","الليتوانية":"lt","المالايالامية":"ml","المالطيّة":"mt","الماورية":"mi","المقدونية":"mk","الملايو":"ms","المنغولية":"mn","المهراتية":"mr","النرويجية":"nb","الهندية":"hi","الهنغارية":"hu","الهولندية":"nl","الويلزية":"cy","اليابانية":"ja","اليونانية":"el","баскијски":"eu","вијетнамски":"vi","галски":"gl","енглески":"en","индонежански":"id","јапански":"ja","јерменски":"hy","кинески (поједностављени)":"zh-cn","кинески (традиционални)":"zh-tw","креолски (хаити)":"ht","летонски":"lv","мађарски":"hu","марати":"mr","немачки":"de","персијски":"fa","пољски":"pl","румунски":"ro","словеначки":"sl","тајски":"th","украјински":"uk","азербайжан":"az","албани":"sq","амхарик":"am","англи":"en","араб":"ar","армени":"hy","баск":"eu","беларусь":"be","бирм":"my","болгар":"bg","вьетнам":"vi","гаити креол":"ht","галик":"gl","гаэл":"gd","герман":"de","голланд":"nl","грек":"el","дани":"da","индонези":"id","ирланд":"ga","исланд":"is","испани":"es","итали":"it","каталан":"ca","кипр":"he","курд":"ku","латви":"lv","латин":"la","литва":"lt","македон":"mk","малай":"ms","малайлам":"ml","малти":"mt","монгол":"mn","норвеги":"nb","орос":"ru","перс":"fa","польш":"pl","португаль":"pt","румын":"ro","серби":"sr","словак":"sk","словени":"sl","солонгос":"ko","тай":"th","турк":"tr","тэлүгү":"te","узбек":"uz","украин":"uk","унгар":"hu","уэльс":"cy","финлянд":"fi","франц":"fr","хорват":"hr","хятад (ердийн)":"zh-cn","хятад (уламжлалт)":"zh-tw","чех":"cs","швед":"sv","эстони":"et","япон":"ja","amhariska":"am","arabiska":"ar","armeniska":"hy","azerbajdzjanska":"az","baskiska":"eu","bulgariska":"bg","burmesiska":"my","engelska":"en","estniska":"et","finska":"fi","gaeliska":"gd","galiciska":"gl","grekiska":"el","haitiska":"ht","hebreiska":"he","indonesiska":"id","irländska":"ga","isländska":"is","italienska":"it","kanaresiska":"kn","katalanska":"ca","kinesiska (förenklad)":"zh-cn","kinesiska (traditionell)":"zh-tw","koreanska":"ko","kroatiska":"hr","kurdiska":"ku","lettiska":"lv","litauiska":"lt","makedonska":"mk","malaysiska":"ms","maltesiska":"mt","mongoliska":"mn","nederländska":"nl","persiska":"fa","polska":"pl","portugisiska":"pt","rumänska":"ro","ryska":"ru","serbiska":"sr","slovakiska":"sk","slovenska":"sl","spanska":"es","svenska":"sv","thailändska":"th","tjeckiska":"cs","turkiska":"tr","tyska":"de","ukrainska":"uk","ungerska":"hu","uzbekiska":"uz","vietnamesiska":"vi","vitryska":"be","walesiska":"cy","albaneză":"sq","amharică":"am","arabă":"ar","armeană":"hy","azerbaidjană":"az","bască":"eu","bielorusă":"be","birmană":"my","bulgară":"bg","catalană":"ca","cehă":"cs","chineză (simplificată)":"zh-cn","chineză (tradițională)":"zh-tw","coreeană":"ko","creolă haitiană":"ht","croată":"hr","daneză":"da","ebraică":"he","engleză":"en","estonă":"et","finlandeză":"fi","franceză":"fr","galeză":"cy","galica scoțiană":"gd","galiciană":"gl","germană":"de","greacă":"el","indoneziană":"id","irlandeză":"ga","islandeză":"is","italiană":"it","japoneză":"ja","kurdă":"ku","latină":"la","letonă":"lv","lituaniană":"lt","macedoneană":"mk","maghiară":"hu","malaeză":"ms","malteză":"mt","mongolă":"mn","neerlandeză":"nl","norvegiană":"nb","persană":"fa","poloneză":"pl","portugheză":"pt","română":"ro","rusă":"ru","sârbă":"sr","slovacă":"sk","slovenă":"sl","spaniolă":"es","suedeză":"sv","thailandeză":"th","turcă":"tr","ucraineană":"uk","uzbecă":"uz","vietnameză":"vi","airių":"ga","albanų":"sq","amharų":"am","anglų":"en","arabų":"ar","armėnų":"hy","azerbaidžaniečių":"az","baltarusių":"be","baskų":"eu","birmiečių":"my","bulgarų":"bg","čekų":"cs","danų":"da","estų":"et","galisų":"gl","graikų":"el","haičio kreolų":"ht","hebrajų":"he","indoneziečių":"id","islandų":"is","ispanų":"es","italų":"it","japonų":"ja","kanadų":"kn","kataloniečių":"ca","kinų (supaprastinta)":"zh-cn","kinų (tradicinė)":"zh-tw","korėjiečių":"ko","kroatų":"hr","kurdų":"ku","latvių":"lv","lenkų":"pl","lietuvių":"lt","lotynų":"la","makedoniečių":"mk","malajalių":"ml","malajiečių":"ms","maltiečių":"mt","maorių":"mi","maratų":"mr","mongolų":"mn","norvegų":"nb","olandų":"nl","persų":"fa","portugalų":"pt","prancūzų":"fr","rumunų":"ro","rusų":"ru","serbų":"sr","slovakų":"sk","slovėnų":"sl","suomių":"fi","škotų (gėlų)":"gd","švedų":"sv","tajų":"th","telugų":"te","turkų":"tr","ukrainiečių":"uk","uzbekų":"uz","valų":"cy","vengrų":"hu","vietnamiečių":"vi","vokiečių":"de","zulusų":"zu","갈리시아어":"gl","그리스어":"el","네덜란드어":"nl","노르웨이어":"nb","덴마크어":"da","독일어":"de","라트비아어":"lv","라틴어":"la","러시아어":"ru","루마니아어":"ro","리투아니아어":"lt","마라티어":"mr","마오리어":"mi","마케도니아어":"mk","말라얄람어":"ml","말레이어":"ms","몰타어":"mt","몽골어":"mn","미얀마어 (버마어)":"my","바스크어":"eu","베트남어":"vi","벨라루스어":"be","불가리아어":"bg","세르비아어":"sr","스웨덴어":"sv","스코틀랜드 게일어":"gd","스페인어":"es","슬로바키아어":"sk","슬로베니아어":"sl","아랍어":"ar","아르메니아어":"hy","아이슬란드어":"is","아이티 크리올어":"ht","아일랜드어":"ga","아제르바이잔어":"az","알바니아어":"sq","암하라어":"am","에스토니아어":"et","에스페란토어":"eo","영어":"en","우즈베크어":"uz","우크라이나어":"uk","웨일즈어":"cy","이탈리아어":"it","인도네시아어":"id","일본어":"ja","줄루어":"zu","중국어(간체)":"zh-cn","중국어(번체)":"zh-tw","체코어":"cs","카탈로니아어":"ca","칸나다어":"kn","쿠르드어":"ku","크로아티아어":"hr","태국어":"th","터키어":"tr","텔루구어":"te","페르시아어":"fa","포르투갈어":"pt","폴란드어":"pl","프랑스어":"fr","핀란드어":"fi","한국어":"ko","헝가리어":"hu","히브리어":"he","힌디어":"hi","albanese":"sq","amarico":"am","arabo":"ar","armeno":"hy","azero":"az","bielorusso":"be","bulgaro":"bg","catalano":"ca","ceco":"cs","cinese (semplificato)":"zh-cn","cinese (tradizionale)":"zh-tw","creolo haitiano":"ht","croato":"hr","curdo (kurmanji)":"ku","danese":"da","ebraico":"he","estone":"et","finlandese":"fi","francese":"fr","gaelico scozzese":"gd","galiziano":"gl","gallese":"cy","giapponese":"ja","greco":"el","indonesiano":"id","inglese":"en","irlandese":"ga","islandese":"is","latino":"la","lettone":"lv","macedone":"mk","malese":"ms","mongolo":"mn","norvegese":"nb","olandese":"nl","persiano":"fa","polacco":"pl","portoghese":"pt","rumeno":"ro","serbo":"sr","slovacco":"sk","sloveno":"sl","spagnolo":"es","svedese":"sv","tailandese":"th","tedesco":"de","ucraino":"uk","ungherese":"hu","quốc tế ngữ":"eo","tiếng ả rập":"ar","tiếng albania":"sq","tiếng amharic":"am","tiếng anh":"en","tiếng armenia":"hy","tiếng azerbaijan":"az","tiếng ba lan":"pl","tiếng ba tư":"fa","tiếng basque":"eu","tiếng belarus":"be","tiếng bồ đào nha":"pt","tiếng bulgaria":"bg","tiếng catalan":"ca","tiếng creole ở haiti":"ht","tiếng croatia":"hr","tiếng do thái":"he","tiếng đan mạch":"da","tiếng đức":"de","tiếng estonia":"et","tiếng gael scotland":"gd","tiếng galicia":"gl","tiếng hà lan":"nl","tiếng hàn":"ko","tiếng hindi":"hi","tiếng hungary":"hu","tiếng hy lạp":"el","tiếng iceland":"is","tiếng indonesia":"id","tiếng ireland":"ga","tiếng kannada":"kn","tiếng kurd":"ku","tiếng latinh":"la","tiếng latvia":"lv","tiếng litva":"lt","tiếng mã lai":"ms","tiếng macedonia":"mk","tiếng malayalam":"ml","tiếng malta":"mt","tiếng maori":"mi","tiếng marathi":"mr","tiếng mông cổ":"mn","tiếng myanmar":"my","tiếng na uy":"nb","tiếng nga":"ru","tiếng nhật":"ja","tiếng pháp":"fr","tiếng phần lan":"fi","tiếng rumani":"ro","tiếng séc":"cs","tiếng serbia":"sr","tiếng slovak":"sk","tiếng slovenia":"sl","tiếng tây ban nha":"es","tiếng telugu":"te","tiếng thái":"th","tiếng thổ nhĩ kỳ":"tr","tiếng thụy điển":"sv","tiếng trung (giản thể)":"zh-cn","tiếng trung (phồn thể)":"zh-tw","tiếng ukraina":"uk","tiếng uzbek":"uz","tiếng việt":"vi","tiếng xứ wales":"cy","tiếng ý":"it","tiếng zulu":"zu","にほんご":"ja"},"scratchToGoogleMap":{"zh-cn":"zh","nb":"no","he":"iw","es-419":"es","pt-br":"pt","ja-hira":"ja"},"previouslySupported":["ab","ms","be","eo","hy","hi","kn","ht","ku","la","mk","ml","mt","mr","mn","my","nn","sq","te","uz"]}')},function(e,t,n){"use strict";n.r(t),n.d(t,"_parse",(function(){return r})),n.d(t,"parse",(function(){return i})),n.d(t,"stringify",(function(){return s}));const r=e=>{let t=0;const n=n=>{const{line:r,column:i}=(()=>{let n=0,r=0;for(let i=0;i<t;i++)"\n"===e[i]?(n++,r=0):r++;return{line:n+1,column:r+1}})();throw new SyntaxError(`${n} (Line ${r} Column ${i})`)},r=t=>(t>=e.length&&n("Unexpected end of input"),e[t]),i=()=>r(t),s=()=>{t++},o=e=>{i()!==e&&n(`Expected '${e}' but found '${i()}'`),s()},a=(n=1,i=1)=>{if(t+i+n>e.length)return"";if(1===n)return r(t+i);let s="";for(let e=0;e<n;e++)s+=r(t+i+e);return s},l=()=>{for(;;)if(/\s/.test(i()))s();else{const e=a(2,0);if("//"===e)for(s(),s();"\n"!==i();)s();else{if("/*"!==e)break;for(s(),s();"*/"!==a(2,0);)s();s(),s()}}},c=()=>{l();switch(i()){case'"':return h();case"{":return m();case"[":return p();case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"-":return d();default:return u()}},u=()=>{if("null"===a(4,0)){for(let e=0;e<4;e++)s();return null}if("true"===a(4,0)){for(let e=0;e<4;e++)s();return!0}if("false"===a(5,0)){for(let e=0;e<5;e++)s();return!1}if("Infinity"===a(8,0)){for(let e=0;e<8;e++)s();return 1/0}if("NaN"===a(3,0)){for(let e=0;e<3;e++)s();return NaN}n(`Unexpected character '${i()}'`)},d=()=>{if("-Infinity"===a(9,0)){for(let e=0;e<9;e++)s();return-1/0}let e="";for(;e+=i(),/[\d.e+-]/i.test(a());)s();s();const t=+e;return Number.isNaN(t)&&n(`Not a number: ${e}`),t},h=()=>{o('"');let e="";for(;;){const t=i();if('"'===t)break;if("\\"===t)switch(s(),i()){case'"':e+='"';break;case"/":e+="/";break;case"\\":e+="\\";break;case"b":e+="\b";break;case"f":e+="\f";break;case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"u":{let t="";for(let e=0;e<4;e++){s();const e=i();/[0-9a-f]/i.test(e)||n(`Invalid hex code: ${e}`),t+=e}const r=Number.parseInt(t,16);e+=String.fromCharCode(r);break}default:n(`Invalid escape code: \\${i()}`)}else e+=t;s()}return o('"'),e},p=()=>{o("["),l();const e=[];for(;l(),"]"!==i();){const t=c();if(e.push(t),l(),","!==i())break;s()}return o("]"),e},m=()=>{o("{"),l();const e={};for(;l(),"}"!==i();){const t=h();l(),o(":");const n=c();if(e[t]=n,l(),","!==i())break;s()}return o("}"),e};return c()},i=e=>{try{return JSON.parse(e)}catch(t){try{return r(e)}catch(e){throw t}}},s=e=>{if("string"==typeof e)return JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return e.toString();if(null==e||"symbol"==typeof e)return"null";if(Array.isArray(e))return`[${e.map((e=>s(e))).join(",")}]`;if("object"==typeof e){let t="{",n=!0;const r=Object.keys(e);for(let i=0;i<r.length;i++){const o=r[i],a=e[o];void 0!==a&&(n||(t+=","),t+=`${JSON.stringify(o)}:${s(a)}`,n=!1)}return t+="}",t}if("bigint"==typeof e)throw new TypeError("Can not stringify bigint");throw new TypeError(`Can not stringify: ${e}`)}},function(e,t,n){const r=n(74),i=n(205),s=function e(t){const n=Object.create(null);n.tagName=t.name,n.children=[];for(const e in t.attribs)"xmlns"!==e&&(n[e]=i(t.attribs[e]),"blockinfo"===e&&(n.blockInfo=JSON.parse(n.blockinfo),delete n.blockinfo));for(let r=0;r<t.children.length;r++)n.children.push(e(t.children[r]));return n};e.exports=function(e){let t;return t="object"==typeof e?e:r.parseDOM(e)[0],s(t)}},function(e,t){e.exports={}},function(e,t,n){t.getCached=function(){throw new Error("blocks.js has not initialized BlocksExecuteCache")},n(16)},function(e,t,n){t.getScripts=function(){throw new Error("blocks.js has not initialized BlocksRuntimeCache")},t._RuntimeScriptCache=class{constructor(e,t){this.container=e,this.blockId=t;const n=e.getBlock(t),r=e.getFields(n);if(this.fieldsOfInputs=Object.assign({},r),0===Object.keys(r).length){const t=e.getInputs(n);for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;const r=t[n].block,i=e.getBlock(r),s=e.getFields(i);Object.assign(this.fieldsOfInputs,s)}}for(const e in this.fieldsOfInputs){const t=this.fieldsOfInputs[e]=Object.assign({},this.fieldsOfInputs[e]);t.value.toUpperCase&&(t.value=t.value.toUpperCase())}}},n(16)},function(e,t){e.exports={IntermediateScript:class{constructor(){this.topBlockId=null,this.stack=null,this.isProcedure=!1,this.procedureVariant="",this.procedureCode="",this.arguments=[],this.isWarp=!1,this.yields=!0,this.warpTimer=!1,this.dependedProcedures=[],this.cachedCompileResult=null,this.executableHat=!1}},IntermediateRepresentation:class{constructor(){this.entry=null,this.procedures={}}}}},function(e,t,n){const r=n(1),i=n(2),s=n(3),o=n(210),a=n(49),l=n(212),{IntermediateScript:c,IntermediateRepresentation:u}=n(77),d=e=>("string"!=typeof e&&(r.warn("sanitize got unexpected type: ".concat(typeof e)),e=""+e),JSON.stringify(e).slice(1,-1)),h="runtime.ext_pen",p="".concat(h,"._getPenState(target)"),m=new o("factory"),f=new o("fun"),g=new o("gen");class y{constructor(e,t){if("number"!=typeof t)throw new Error("type is invalid");this.source=e,this.type=t}asNumber(){return 1===this.type?this.source:5===this.type?"(".concat(this.source," || 0)"):"(+".concat(this.source," || 0)")}asNumberOrNaN(){return 1===this.type||5===this.type?this.source:"(+".concat(this.source,")")}asString(){return 2===this.type?this.source:'("" + '.concat(this.source,")")}asBoolean(){return 3===this.type?this.source:"toBoolean(".concat(this.source,")")}asColor(){return this.asUnknown()}asUnknown(){return this.source}asSafe(){return this.asUnknown()}isAlwaysNumber(){return 1===this.type}isAlwaysNumberOrNaN(){return 1===this.type||5===this.type}isNeverNumber(){return!1}}class b{constructor(e,t){this.constantValue=e,this.safe=t}asNumber(){const e=+this.constantValue;return e?e.toString():Object.is(e,-0)?"-0":"0"}asNumberOrNaN(){return this.asNumber()}asString(){return'"'.concat(d(""+this.constantValue),'"')}asBoolean(){return i.toBoolean(this.constantValue).toString()}asColor(){if(/^#[0-9a-f]{6,8}$/i.test(this.constantValue)){const e=this.constantValue.substr(1);return Number.parseInt(e,16).toString()}return this.asUnknown()}asUnknown(){if("number"==typeof this.constantValue)return this.constantValue;return(+this.constantValue).toString()===this.constantValue?this.constantValue:this.asString()}asSafe(){return this.safe?this.asUnknown():this.asString()}isAlwaysNumber(){const e=+this.constantValue;return!Number.isNaN(e)&&(0!==e||""!==this.constantValue.toString().trim())}isAlwaysNumberOrNaN(){return this.isAlwaysNumber()}isNeverNumber(){return Number.isNaN(+this.constantValue)}}class v{constructor(e){this.source=e,this.type=4,this._value=null}setInput(e){if(e instanceof v){if(!e._value)return this.type=4,void(this._value=null);e=e._value}this._value=e,this.type=e instanceof y?e.type:4}asNumber(){return 1===this.type?this.source:5===this.type?"(".concat(this.source," || 0)"):"(+".concat(this.source," || 0)")}asNumberOrNaN(){return 1===this.type||5===this.type?this.source:"(+".concat(this.source,")")}asString(){return 2===this.type?this.source:'("" + '.concat(this.source,")")}asBoolean(){return 3===this.type?this.source:"toBoolean(".concat(this.source,")")}asColor(){return this.asUnknown()}asUnknown(){return this.source}asSafe(){return this.asUnknown()}isAlwaysNumber(){return!!this._value&&this._value.isAlwaysNumber()}isAlwaysNumberOrNaN(){return!!this._value&&this._value.isAlwaysNumberOrNaN()}isNeverNumber(){return!!this._value&&this._value.isNeverNumber()}}const S=e=>{const t=+e.constantValue;return!!t&&t.toString()===e.constantValue.toString()};class w{constructor(e){this.isLoop=e,this.isLastBlock=!1}}class k{constructor(e,t,n){this.script=e,this.ir=t,this.target=n,this.source="",this.variableInputs={},this.isWarp=e.isWarp,this.isProcedure=e.isProcedure,this.warpTimer=e.warpTimer,this.frames=[],this.currentFrame=null,this.namesOfCostumesAndSounds=(e=>{const t=new Set;for(const n of e.targets)if(n.isOriginal){const e=n.sprite;for(const n of e.costumes)t.add(n.name);for(const n of e.sounds)t.add(n.name)}return t})(n.runtime),this.localVariables=new o("a"),this._setupVariablesPool=new o("b"),this._setupVariables={},this.descendedIntoModulo=!1,this.isInHat=!1,this.debug=this.target.runtime.debug}pushFrame(e){this.frames.push(e),this.currentFrame=e}popFrame(){this.frames.pop(),this.currentFrame=this.frames[this.frames.length-1]}isLastBlockInLoop(){for(let e=this.frames.length-1;e>=0;e--){const t=this.frames[e];if(!t.isLastBlock)return!1;if(t.isLoop)return!0}return!1}descendInput(e){switch(e.kind){case"addons.call":return new y("(".concat(this.descendAddonCall(e),")"),4);case"args.boolean":return new y("toBoolean(p".concat(e.index,")"),3);case"args.stringNumber":return new y("p".concat(e.index),4);case"compat":return new y("(".concat(this.generateCompatibilityLayerCall(e,!1),")"),4);case"constant":return this.safeConstantInput(e.value);case"counter.get":return new y("runtime.ext_scratch3_control._counter",1);case"keyboard.pressed":return new y("runtime.ioDevices.keyboard.getKeyIsDown(".concat(this.descendInput(e.key).asSafe(),")"),3);case"list.contains":return new y("listContains(".concat(this.referenceVariable(e.list),", ").concat(this.descendInput(e.item).asUnknown(),")"),3);case"list.contents":return new y("listContents(".concat(this.referenceVariable(e.list),")"),2);case"list.get":{const t=this.descendInput(e.index);if(l.supportsNullishCoalescing){if(t.isAlwaysNumberOrNaN())return new y("(".concat(this.referenceVariable(e.list),".value[(").concat(t.asNumber(),' | 0) - 1] ?? "")'),4);if(t instanceof b&&"last"===t.constantValue)return new y("(".concat(this.referenceVariable(e.list),".value[").concat(this.referenceVariable(e.list),'.value.length - 1] ?? "")'),4)}return new y("listGet(".concat(this.referenceVariable(e.list),".value, ").concat(t.asUnknown(),")"),4)}case"list.indexOf":return new y("listIndexOf(".concat(this.referenceVariable(e.list),", ").concat(this.descendInput(e.item).asUnknown(),")"),1);case"list.length":return new y("".concat(this.referenceVariable(e.list),".value.length"),1);case"looks.size":return new y("Math.round(target.size)",1);case"looks.backdropName":return new y("stage.getCostumes()[stage.currentCostume].name",2);case"looks.backdropNumber":return new y("(stage.currentCostume + 1)",1);case"looks.costumeName":return new y("target.getCostumes()[target.currentCostume].name",2);case"looks.costumeNumber":return new y("(target.currentCostume + 1)",1);case"motion.direction":return new y("target.direction",1);case"motion.x":return new y("limitPrecision(target.x)",1);case"motion.y":return new y("limitPrecision(target.y)",1);case"mouse.down":return new y("runtime.ioDevices.mouse.getIsDown()",3);case"mouse.x":return new y("runtime.ioDevices.mouse.getScratchX()",1);case"mouse.y":return new y("runtime.ioDevices.mouse.getScratchY()",1);case"noop":return new y('""',2);case"op.abs":return new y("Math.abs(".concat(this.descendInput(e.value).asNumber(),")"),1);case"op.acos":return new y("((Math.acos(".concat(this.descendInput(e.value).asNumber(),") * 180) / Math.PI)"),5);case"op.add":return new y("(".concat(this.descendInput(e.left).asNumber()," + ").concat(this.descendInput(e.right).asNumber(),")"),5);case"op.and":return new y("(".concat(this.descendInput(e.left).asBoolean()," && ").concat(this.descendInput(e.right).asBoolean(),")"),3);case"op.asin":return new y("((Math.asin(".concat(this.descendInput(e.value).asNumber(),") * 180) / Math.PI)"),5);case"op.atan":return new y("((Math.atan(".concat(this.descendInput(e.value).asNumber(),") * 180) / Math.PI)"),1);case"op.ceiling":return new y("Math.ceil(".concat(this.descendInput(e.value).asNumber(),")"),1);case"op.contains":return new y("(".concat(this.descendInput(e.string).asString(),".toLowerCase().indexOf(").concat(this.descendInput(e.contains).asString(),".toLowerCase()) !== -1)"),3);case"op.cos":return new y("(Math.round(Math.cos((Math.PI * ".concat(this.descendInput(e.value).asNumber(),") / 180) * 1e10) / 1e10)"),5);case"op.divide":return new y("(".concat(this.descendInput(e.left).asNumber()," / ").concat(this.descendInput(e.right).asNumber(),")"),5);case"op.equals":{const t=this.descendInput(e.left),n=this.descendInput(e.right);if(t.isNeverNumber()||n.isNeverNumber())return new y("(".concat(t.asString(),".toLowerCase() === ").concat(n.asString(),".toLowerCase())"),3);const r=t.isAlwaysNumber(),i=n.isAlwaysNumber();return r&&i||(r&&t instanceof b&&S(t)||i&&n instanceof b&&S(n))?new y("(".concat(t.asNumber()," === ").concat(n.asNumber(),")"),3):new y("compareEqual(".concat(t.asUnknown(),", ").concat(n.asUnknown(),")"),3)}case"op.e^":return new y("Math.exp(".concat(this.descendInput(e.value).asNumber(),")"),1);case"op.floor":return new y("Math.floor(".concat(this.descendInput(e.value).asNumber(),")"),1);case"op.greater":{const t=this.descendInput(e.left),n=this.descendInput(e.right);return t.isAlwaysNumber()&&n.isAlwaysNumberOrNaN()?new y("(".concat(t.asNumber()," > ").concat(n.asNumberOrNaN(),")"),3):t.isAlwaysNumberOrNaN()&&n.isAlwaysNumber()?new y("!(".concat(t.asNumberOrNaN()," <= ").concat(n.asNumber(),")"),3):t.isNeverNumber()||n.isNeverNumber()?new y("(".concat(t.asString(),".toLowerCase() > ").concat(n.asString(),".toLowerCase())"),3):new y("compareGreaterThan(".concat(t.asUnknown(),", ").concat(n.asUnknown(),")"),3)}case"op.join":return new y("(".concat(this.descendInput(e.left).asString()," + ").concat(this.descendInput(e.right).asString(),")"),2);case"op.length":return new y("".concat(this.descendInput(e.string).asString(),".length"),1);case"op.less":{const t=this.descendInput(e.left),n=this.descendInput(e.right);return t.isAlwaysNumberOrNaN()&&n.isAlwaysNumber()?new y("(".concat(t.asNumberOrNaN()," < ").concat(n.asNumber(),")"),3):t.isAlwaysNumber()&&n.isAlwaysNumberOrNaN()?new y("!(".concat(t.asNumber()," >= ").concat(n.asNumberOrNaN(),")"),3):t.isNeverNumber()||n.isNeverNumber()?new y("(".concat(t.asString(),".toLowerCase() < ").concat(n.asString(),".toLowerCase())"),3):new y("compareLessThan(".concat(t.asUnknown(),", ").concat(n.asUnknown(),")"),3)}case"op.letterOf":return new y("((".concat(this.descendInput(e.string).asString(),")[(").concat(this.descendInput(e.letter).asNumber(),' | 0) - 1] || "")'),2);case"op.ln":return new y("Math.log(".concat(this.descendInput(e.value).asNumber(),")"),5);case"op.log":return new y("(Math.log(".concat(this.descendInput(e.value).asNumber(),") / Math.LN10)"),5);case"op.mod":return this.descendedIntoModulo=!0,new y("mod(".concat(this.descendInput(e.left).asNumber(),", ").concat(this.descendInput(e.right).asNumber(),")"),5);case"op.multiply":return new y("(".concat(this.descendInput(e.left).asNumber()," * ").concat(this.descendInput(e.right).asNumber(),")"),5);case"op.not":return new y("!".concat(this.descendInput(e.operand).asBoolean()),3);case"op.or":return new y("(".concat(this.descendInput(e.left).asBoolean()," || ").concat(this.descendInput(e.right).asBoolean(),")"),3);case"op.random":return e.useInts?new y("randomInt(".concat(this.descendInput(e.low).asNumber(),", ").concat(this.descendInput(e.high).asNumber(),")"),1):e.useFloats?new y("randomFloat(".concat(this.descendInput(e.low).asNumber(),", ").concat(this.descendInput(e.high).asNumber(),")"),5):new y("runtime.ext_scratch3_operators._random(".concat(this.descendInput(e.low).asUnknown(),", ").concat(this.descendInput(e.high).asUnknown(),")"),5);case"op.round":return new y("Math.round(".concat(this.descendInput(e.value).asNumber(),")"),1);case"op.sin":return new y("(Math.round(Math.sin((Math.PI * ".concat(this.descendInput(e.value).asNumber(),") / 180) * 1e10) / 1e10)"),5);case"op.sqrt":return new y("Math.sqrt(".concat(this.descendInput(e.value).asNumber(),")"),5);case"op.subtract":return new y("(".concat(this.descendInput(e.left).asNumber()," - ").concat(this.descendInput(e.right).asNumber(),")"),5);case"op.tan":return new y("tan(".concat(this.descendInput(e.value).asNumber(),")"),5);case"op.10^":return new y("(10 ** ".concat(this.descendInput(e.value).asNumber(),")"),1);case"procedures.call":{const t=e.code,n=e.variant,r=this.ir.procedures[n];if(null===r.stack)return new y('""',2);const i='thread.procedures["'.concat(d(n),'"]'),s=[];for(const t of e.arguments)s.push(this.descendInput(t).asSafe());const o=s.join(","),a=!this.isWarp&&t===this.script.procedureCode,l=this.isInHat;if(a||l){const e=r.yields?"yieldThenCallGenerator":"yieldThenCall";return new y("(yield* ".concat(e,"(").concat(i,", ").concat(o,"))"),4)}return r.yields?new y("(yield* ".concat(i,"(").concat(o,"))"),4):new y("".concat(i,"(").concat(o,")"),4)}case"sensing.answer":return new y("runtime.ext_scratch3_sensing._answer",2);case"sensing.colorTouchingColor":return new y("target.colorIsTouchingColor(colorToList(".concat(this.descendInput(e.target).asColor(),"), colorToList(").concat(this.descendInput(e.mask).asColor(),"))"),3);case"sensing.date":return new y("(new Date().getDate())",1);case"sensing.dayofweek":return new y("(new Date().getDay() + 1)",1);case"sensing.daysSince2000":return new y("daysSince2000()",1);case"sensing.distance":return new y("distance(".concat(this.descendInput(e.target).asString(),")"),1);case"sensing.hour":return new y("(new Date().getHours())",1);case"sensing.minute":return new y("(new Date().getMinutes())",1);case"sensing.month":return new y("(new Date().getMonth() + 1)",1);case"sensing.of":{const t=this.descendInput(e.object).asString(),n=e.property;if("constant"===e.object.kind){const r="_stage_"===e.object.value,i=r?"stage":this.evaluateOnce("runtime.getSpriteTargetByName(".concat(t,")"));if("volume"===n)return new y("(".concat(i," ? ").concat(i,".volume : 0)"),1);if(r)switch(n){case"background #":case"backdrop #":return new y("(".concat(i,".currentCostume + 1)"),1);case"backdrop name":return new y("".concat(i,".getCostumes()[").concat(i,".currentCostume].name"),2)}else switch(n){case"x position":return new y("(".concat(i," ? ").concat(i,".x : 0)"),1);case"y position":return new y("(".concat(i," ? ").concat(i,".y : 0)"),1);case"direction":return new y("(".concat(i," ? ").concat(i,".direction : 0)"),1);case"costume #":return new y("(".concat(i," ? ").concat(i,".currentCostume + 1 : 0)"),1);case"costume name":return new y("(".concat(i," ? ").concat(i,".getCostumes()[").concat(i,".currentCostume].name : 0)"),4);case"size":return new y("(".concat(i," ? ").concat(i,".size : 0)"),1)}const s=this.evaluateOnce("".concat(i," && ").concat(i,'.lookupVariableByNameAndType("').concat(d(n),'", "", true)'));return new y("(".concat(s," ? ").concat(s,".value : 0)"),4)}return new y("runtime.ext_scratch3_sensing.getAttributeOf({OBJECT: ".concat(t,', PROPERTY: "').concat(d(n),'" })'),4)}case"sensing.second":return new y("(new Date().getSeconds())",1);case"sensing.touching":return new y("target.isTouchingObject(".concat(this.descendInput(e.object).asUnknown(),")"),3);case"sensing.touchingColor":return new y("target.isTouchingColor(colorToList(".concat(this.descendInput(e.color).asColor(),"))"),3);case"sensing.username":return new y("runtime.ioDevices.userData.getUsername()",2);case"sensing.year":return new y("(new Date().getFullYear())",1);case"timer.get":return new y("runtime.ioDevices.clock.projectTimer()",1);case"tw.lastKeyPressed":return new y("runtime.ioDevices.keyboard.getLastKeyPressed()",2);case"var.get":return this.descendVariable(e.variable);default:throw r.warn("JS: Unknown input: ".concat(e.kind),e),new Error("JS: Unknown input: ".concat(e.kind))}}descendStackedBlock(e){switch(e.kind){case"addons.call":this.source+="".concat(this.descendAddonCall(e),";\n");break;case"compat":{const t=this.isLastBlockInLoop(),n=e.blockType;if(n===s.COMMAND||n===s.HAT)this.source+="".concat(this.generateCompatibilityLayerCall(e,t),";\n");else{if(n!==s.CONDITIONAL&&n!==s.LOOP)throw new Error("Unknown block type: ".concat(n));{const t=this.localVariables.next();this.source+="const ".concat(t," = createBranchInfo(").concat(n===s.LOOP,");\n"),this.source+="while (".concat(t,".branch = +(").concat(this.generateCompatibilityLayerCall(e,!1,t),")) {\n"),this.source+="switch (".concat(t,".branch) {\n");for(const t in e.substacks)this.source+="case ".concat(+t,": {\n"),this.descendStack(e.substacks[t],new w(!1)),this.source+="break;\n",this.source+="}\n";this.source+="}\n",this.source+="if (!".concat(t,".isLoop) break;\n"),this.yieldLoop(),this.source+="}\n"}}t&&(this.source+="if (hasResumedFromPromise) {hasResumedFromPromise = false;continue;}\n");break}case"control.createClone":this.source+="runtime.ext_scratch3_control._createClone(".concat(this.descendInput(e.target).asString(),", target);\n");break;case"control.deleteClone":this.source+="if (!target.isOriginal) {\n",this.source+="  runtime.disposeTarget(target);\n",this.source+="  runtime.stopForTarget(target);\n",this.retire(),this.source+="}\n";break;case"control.for":{this.resetVariableInputs();const t=this.localVariables.next();this.source+="var ".concat(t," = 0; "),this.source+="while (".concat(t," < ").concat(this.descendInput(e.count).asNumber(),") { "),this.source+="".concat(t,"++; "),this.source+="".concat(this.referenceVariable(e.variable),".value = ").concat(t,";\n"),this.descendStack(e.do,new w(!0)),this.yieldLoop(),this.source+="}\n";break}case"control.if":this.source+="if (".concat(this.descendInput(e.condition).asBoolean(),") {\n"),this.descendStack(e.whenTrue,new w(!1)),e.whenFalse.length&&(this.source+="} else {\n",this.descendStack(e.whenFalse,new w(!1))),this.source+="}\n";break;case"control.repeat":{const t=this.localVariables.next();this.source+="for (var ".concat(t," = ").concat(this.descendInput(e.times).asNumber(),"; ").concat(t," >= 0.5; ").concat(t,"--) {\n"),this.descendStack(e.do,new w(!0)),this.yieldLoop(),this.source+="}\n";break}case"control.stopAll":this.source+="runtime.stopAll();\n",this.retire();break;case"control.stopOthers":this.source+="runtime.stopForTarget(target, thread);\n";break;case"control.stopScript":this.stopScript();break;case"control.wait":{const t=this.localVariables.next();this.source+="thread.timer = timer();\n",this.source+="var ".concat(t," = Math.max(0, 1000 * ").concat(this.descendInput(e.seconds).asNumber(),");\n"),this.requestRedraw(),this.yieldNotWarp(),this.source+="while (thread.timer.timeElapsed() < ".concat(t,") {\n"),this.yieldStuckOrNotWarp(),this.source+="}\n",this.source+="thread.timer = null;\n";break}case"control.waitUntil":this.resetVariableInputs(),this.source+="while (!".concat(this.descendInput(e.condition).asBoolean(),") {\n"),this.yieldStuckOrNotWarp(),this.source+="}\n";break;case"control.while":this.resetVariableInputs(),this.source+="while (".concat(this.descendInput(e.condition).asBoolean(),") {\n"),this.descendStack(e.do,new w(!0)),e.warpTimer?this.yieldStuckOrNotWarp():this.yieldLoop(),this.source+="}\n";break;case"counter.clear":this.source+="runtime.ext_scratch3_control._counter = 0;\n";break;case"counter.increment":this.source+="runtime.ext_scratch3_control._counter++;\n";break;case"hat.edge":this.isInHat=!0,this.source+="{\n",this.source+="const resolvedValue = ".concat(this.descendInput(e.condition).asBoolean(),";\n"),this.source+='const id = "'.concat(d(e.id),'";\n'),this.source+="const hasOldEdgeValue = target.hasEdgeActivatedValue(id);\n",this.source+="const oldEdgeValue = target.updateEdgeActivatedValue(id, resolvedValue);\n",this.source+="const edgeWasActivated = hasOldEdgeValue ? (!oldEdgeValue && resolvedValue) : resolvedValue;\n",this.source+="if (!edgeWasActivated) {\n",this.retire(),this.source+="}\n",this.source+="yield;\n",this.source+="}\n",this.isInHat=!1;break;case"hat.predicate":this.isInHat=!0,this.source+="if (!".concat(this.descendInput(e.condition).asBoolean(),") {\n"),this.retire(),this.source+="}\n",this.source+="yield;\n",this.isInHat=!1;break;case"event.broadcast":this.source+='startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: '.concat(this.descendInput(e.broadcast).asString()," });\n"),this.resetVariableInputs();break;case"event.broadcastAndWait":this.source+='yield* waitThreads(startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: '.concat(this.descendInput(e.broadcast).asString()," }));\n"),this.yielded();break;case"list.add":{const t=this.referenceVariable(e.list);this.source+="".concat(t,".value.push(").concat(this.descendInput(e.item).asSafe(),");\n"),this.source+="".concat(t,"._monitorUpToDate = false;\n");break}case"list.delete":{const t=this.referenceVariable(e.list),n=this.descendInput(e.index);if(n instanceof b){if("last"===n.constantValue){this.source+="".concat(t,".value.pop();\n"),this.source+="".concat(t,"._monitorUpToDate = false;\n");break}if(1==+n.constantValue){this.source+="".concat(t,".value.shift();\n"),this.source+="".concat(t,"._monitorUpToDate = false;\n");break}}this.source+="listDelete(".concat(t,", ").concat(n.asUnknown(),");\n");break}case"list.deleteAll":this.source+="".concat(this.referenceVariable(e.list),".value = [];\n");break;case"list.hide":this.source+='runtime.monitorBlocks.changeBlock({ id: "'.concat(d(e.list.id),'", element: "checkbox", value: false }, runtime);\n');break;case"list.insert":{const t=this.referenceVariable(e.list),n=this.descendInput(e.index),r=this.descendInput(e.item);if(n instanceof b&&1==+n.constantValue){this.source+="".concat(t,".value.unshift(").concat(r.asSafe(),");\n"),this.source+="".concat(t,"._monitorUpToDate = false;\n");break}this.source+="listInsert(".concat(t,", ").concat(n.asUnknown(),", ").concat(r.asSafe(),");\n");break}case"list.replace":this.source+="listReplace(".concat(this.referenceVariable(e.list),", ").concat(this.descendInput(e.index).asUnknown(),", ").concat(this.descendInput(e.item).asSafe(),");\n");break;case"list.show":this.source+='runtime.monitorBlocks.changeBlock({ id: "'.concat(d(e.list.id),'", element: "checkbox", value: true }, runtime);\n');break;case"looks.backwardLayers":this.target.isStage||(this.source+="target.goBackwardLayers(".concat(this.descendInput(e.layers).asNumber(),");\n"));break;case"looks.clearEffects":this.source+="target.clearEffects();\n";break;case"looks.changeEffect":Object.prototype.hasOwnProperty.call(this.target.effects,e.effect)&&(this.source+='target.setEffect("'.concat(d(e.effect),'", runtime.ext_scratch3_looks.clampEffect("').concat(d(e.effect),'", ').concat(this.descendInput(e.value).asNumber(),' + target.effects["').concat(d(e.effect),'"]));\n'));break;case"looks.changeSize":this.source+="target.setSize(target.size + ".concat(this.descendInput(e.size).asNumber(),");\n");break;case"looks.forwardLayers":this.target.isStage||(this.source+="target.goForwardLayers(".concat(this.descendInput(e.layers).asNumber(),");\n"));break;case"looks.goToBack":this.target.isStage||(this.source+="target.goToBack();\n");break;case"looks.goToFront":this.target.isStage||(this.source+="target.goToFront();\n");break;case"looks.hide":this.source+="target.setVisible(false);\n",this.source+="runtime.ext_scratch3_looks._renderBubble(target);\n";break;case"looks.nextBackdrop":this.source+="runtime.ext_scratch3_looks._setBackdrop(stage, stage.currentCostume + 1, true);\n";break;case"looks.nextCostume":this.source+="target.setCostume(target.currentCostume + 1);\n";break;case"looks.setEffect":Object.prototype.hasOwnProperty.call(this.target.effects,e.effect)&&(this.source+='target.setEffect("'.concat(d(e.effect),'", runtime.ext_scratch3_looks.clampEffect("').concat(d(e.effect),'", ').concat(this.descendInput(e.value).asNumber(),"));\n"));break;case"looks.setSize":this.source+="target.setSize(".concat(this.descendInput(e.size).asNumber(),");\n");break;case"looks.show":this.source+="target.setVisible(true);\n",this.source+="runtime.ext_scratch3_looks._renderBubble(target);\n";break;case"looks.switchBackdrop":this.source+="runtime.ext_scratch3_looks._setBackdrop(stage, ".concat(this.descendInput(e.backdrop).asSafe(),");\n");break;case"looks.switchCostume":this.source+="runtime.ext_scratch3_looks._setCostume(target, ".concat(this.descendInput(e.costume).asSafe(),");\n");break;case"motion.changeX":this.source+="target.setXY(target.x + ".concat(this.descendInput(e.dx).asNumber(),", target.y);\n");break;case"motion.changeY":this.source+="target.setXY(target.x, target.y + ".concat(this.descendInput(e.dy).asNumber(),");\n");break;case"motion.ifOnEdgeBounce":this.source+="runtime.ext_scratch3_motion._ifOnEdgeBounce(target);\n";break;case"motion.setDirection":this.source+="target.setDirection(".concat(this.descendInput(e.direction).asNumber(),");\n");break;case"motion.setRotationStyle":this.source+='target.setRotationStyle("'.concat(d(e.style),'");\n');break;case"motion.setX":case"motion.setY":case"motion.setXY":{this.descendedIntoModulo=!1;const t="x"in e?this.descendInput(e.x).asNumber():"target.x",n="y"in e?this.descendInput(e.y).asNumber():"target.y";this.source+="target.setXY(".concat(t,", ").concat(n,");\n"),this.descendedIntoModulo&&(this.source+="if (target.interpolationData) target.interpolationData = null;\n");break}case"motion.step":this.source+="runtime.ext_scratch3_motion._moveSteps(".concat(this.descendInput(e.steps).asNumber(),", target);\n");break;case"noop":break;case"pen.clear":this.source+="".concat(h,".clear();\n");break;case"pen.down":this.source+="".concat(h,"._penDown(target);\n");break;case"pen.changeParam":this.source+="".concat(h,"._setOrChangeColorParam(").concat(this.descendInput(e.param).asString(),", ").concat(this.descendInput(e.value).asNumber(),", ").concat(p,", true);\n");break;case"pen.changeSize":this.source+="".concat(h,"._changePenSizeBy(").concat(this.descendInput(e.size).asNumber(),", target);\n");break;case"pen.legacyChangeHue":this.source+="".concat(h,"._changePenHueBy(").concat(this.descendInput(e.hue).asNumber(),", target);\n");break;case"pen.legacyChangeShade":this.source+="".concat(h,"._changePenShadeBy(").concat(this.descendInput(e.shade).asNumber(),", target);\n");break;case"pen.legacySetHue":this.source+="".concat(h,"._setPenHueToNumber(").concat(this.descendInput(e.hue).asNumber(),", target);\n");break;case"pen.legacySetShade":this.source+="".concat(h,"._setPenShadeToNumber(").concat(this.descendInput(e.shade).asNumber(),", target);\n");break;case"pen.setColor":this.source+="".concat(h,"._setPenColorToColor(").concat(this.descendInput(e.color).asColor(),", target);\n");break;case"pen.setParam":this.source+="".concat(h,"._setOrChangeColorParam(").concat(this.descendInput(e.param).asString(),", ").concat(this.descendInput(e.value).asNumber(),", ").concat(p,", false);\n");break;case"pen.setSize":this.source+="".concat(h,"._setPenSizeTo(").concat(this.descendInput(e.size).asNumber(),", target);\n");break;case"pen.stamp":this.source+="".concat(h,"._stamp(target);\n");break;case"pen.up":this.source+="".concat(h,"._penUp(target);\n");break;case"procedures.call":{const t=e.code,n=e.variant,r=this.ir.procedures[n];if(null===r.stack)break;!this.isWarp&&t===this.script.procedureCode&&this.yieldNotWarp(),r.yields&&(this.source+="yield* "),this.source+='thread.procedures["'.concat(d(n),'"](');const i=[];for(const t of e.arguments)i.push(this.descendInput(t).asSafe());this.source+=i.join(","),this.source+=");\n",this.resetVariableInputs();break}case"procedures.return":this.stopScriptAndReturn(this.descendInput(e.value).asSafe());break;case"timer.reset":this.source+="runtime.ioDevices.clock.resetProjectTimer();\n";break;case"tw.debugger":this.source+="debugger;\n";break;case"var.hide":this.source+='runtime.monitorBlocks.changeBlock({ id: "'.concat(d(e.variable.id),'", element: "checkbox", value: false }, runtime);\n');break;case"var.set":{const t=this.descendVariable(e.variable),n=this.descendInput(e.value);t.setInput(n),this.source+="".concat(t.source," = ").concat(n.asSafe(),";\n"),e.variable.isCloud&&(this.source+='runtime.ioDevices.cloud.requestUpdateVariable("'.concat(d(e.variable.name),'", ').concat(t.source,");\n"));break}case"var.show":this.source+='runtime.monitorBlocks.changeBlock({ id: "'.concat(d(e.variable.id),'", element: "checkbox", value: true }, runtime);\n');break;case"visualReport":{const t=this.localVariables.next();this.source+="const ".concat(t," = ").concat(this.descendInput(e.input).asUnknown(),";"),this.source+="if (".concat(t,' !== undefined) runtime.visualReport("').concat(d(this.script.topBlockId),'", ').concat(t,");\n");break}default:throw r.warn("JS: Unknown stacked block: ".concat(e.kind),e),new Error("JS: Unknown stacked block: ".concat(e.kind))}}descendInputRecord(e){let t="{";for(const n of Object.keys(e)){const r=e[n];t+='"'.concat(d(n),'":').concat(this.descendInput(r).asSafe(),",")}return t+="}",t}resetVariableInputs(){this.variableInputs={}}descendStack(e,t){this.resetVariableInputs(),this.pushFrame(t);for(let n=0;n<e.length;n++)t.isLastBlock=n===e.length-1,this.descendStackedBlock(e[n]);this.resetVariableInputs(),this.popFrame()}descendVariable(e){if(Object.prototype.hasOwnProperty.call(this.variableInputs,e.id))return this.variableInputs[e.id];const t=new v("".concat(this.referenceVariable(e),".value"));return this.variableInputs[e.id]=t,t}referenceVariable(e){return"target"===e.scope?this.evaluateOnce('target.variables["'.concat(d(e.id),'"]')):this.evaluateOnce('stage.variables["'.concat(d(e.id),'"]'))}descendAddonCall(e){const t=this.descendInputRecord(e.arguments),n='runtime.getAddonBlock("'.concat(d(e.code),'").callback'),r='"'.concat(d(e.blockId),'"');return"yield* executeInCompatibilityLayer(".concat(t,", ").concat(n,", ").concat(this.isWarp,", false, ").concat(r,")")}evaluateOnce(e){if(Object.prototype.hasOwnProperty.call(this._setupVariables,e))return this._setupVariables[e];const t=this._setupVariablesPool.next();return this._setupVariables[e]=t,t}retire(){this.isProcedure?this.source+="retire(); yield;\n":this.source+="retire(); return;\n"}stopScript(){this.isProcedure?this.source+='return "";\n':this.retire()}stopScriptAndReturn(e){this.isProcedure?this.source+="return ".concat(e,";\n"):this.retire()}yieldLoop(){this.warpTimer?this.yieldStuckOrNotWarp():this.yieldNotWarp()}yieldNotWarp(){this.isWarp||(this.source+="yield;\n",this.yielded())}yieldStuckOrNotWarp(){this.isWarp?this.source+="if (isStuck()) yield;\n":this.source+="yield;\n",this.yielded()}yielded(){if(!this.script.yields)throw new Error("Script yielded but is not marked as yielding.");this.resetVariableInputs()}requestRedraw(){this.source+="runtime.requestRedraw();\n"}safeConstantInput(e){const t="string"==typeof e&&this.namesOfCostumesAndSounds.has(e);return new b(e,!t)}generateCompatibilityLayerCall(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=e.opcode;let i="yield* executeInCompatibilityLayer({";for(const t of Object.keys(e.inputs)){const n=e.inputs[t],r=this.descendInput(n).asSafe();i+='"'.concat(d(t),'":').concat(r,",")}for(const t of Object.keys(e.fields)){const n=e.fields[t];i+='"'.concat(d(t),'":"').concat(d(n),'",')}const s=this.evaluateOnce('runtime.getOpcodeFunction("'.concat(d(r),'")'));return i+="}, ".concat(s,", ").concat(this.isWarp,", ").concat(t,', "').concat(d(e.id),'", ').concat(n,")"),i}getScriptFactoryName(){return m.next()}getScriptName(e){let t=e?g.next():f.next();if(this.isProcedure){const e=this.script.procedureCode.replace(/%[\w]/g,"").replace(/[^a-zA-Z0-9]/g,"_").substring(0,20);t+="_".concat(e)}return t}createScriptFactory(){let e="";e+="(function ".concat(this.getScriptFactoryName(),"(thread) { "),e+="const target = thread.target; ",e+="const runtime = target.runtime; ",e+="const stage = runtime.getTargetForStage();\n";for(const t of Object.keys(this._setupVariables)){const n=this._setupVariables[t];e+="const ".concat(n," = ").concat(t,";\n")}if(e+="return ",this.script.yields?e+="function* ":e+="function ",e+=this.getScriptName(this.script.yields),e+=" (",this.script.arguments.length){const t=[];for(let e=0;e<this.script.arguments.length;e++)t.push("p".concat(e));e+=t.join(",")}return e+=") {\n",e+=this.source,e+="}; })",e}compile(){this.script.stack&&this.descendStack(this.script.stack,new w(!1)),this.stopScript();const e=this.createScriptFactory(),t=a.scopedEval(e);return this.debug&&r.info("JS: ".concat(this.target.getName(),": compiled ").concat(this.script.procedureCode||"script"),e),k.testingApparatus&&k.testingApparatus.report(this,e),t}}k.unstable_exports={TYPE_NUMBER:1,TYPE_STRING:2,TYPE_BOOLEAN:3,TYPE_UNKNOWN:4,TYPE_NUMBER_NAN:5,factoryNameVariablePool:m,functionNameVariablePool:f,generatorNameVariablePool:g,VariablePool:o,PEN_EXT:h,PEN_STATE:p,TypedInput:y,ConstantInput:b,VariableInput:v,Frame:w,sanitize:d},k.testingApparatus=null,e.exports=k},function(e,t,n){const r=n(25),i=n(14);e.exports=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.sequencer=e,this.thread=t,this._nowObj={now:()=>this.sequencer.runtime.currentMSecs}}get target(){return this.thread.target}get runtime(){return this.sequencer.runtime}get nowObj(){return this.runtime?this._nowObj:null}get stackFrame(){const e=this.thread.peekStackFrame();return null===e.executionContext&&(e.executionContext={}),e.executionContext}stackTimerFinished(){return!(this.stackFrame.timer.timeElapsed()<this.stackFrame.duration)}stackTimerNeedsInit(){return!this.stackFrame.timer}startStackTimer(e){this.nowObj?this.stackFrame.timer=new i(this.nowObj):this.stackFrame.timer=new i,this.stackFrame.timer.start(),this.stackFrame.duration=e}yield(){this.thread.status=r.STATUS_YIELD}yieldTick(){this.thread.status=r.STATUS_YIELD_TICK}startBranch(e,t){this.sequencer.stepToBranch(this.thread,e,t)}stopAll(){this.sequencer.runtime.stopAll()}stopOtherTargetThreads(){this.sequencer.runtime.stopForTarget(this.thread.target,this.thread)}stopThisScript(){this.thread.stopThisScript()}startProcedure(e){this.sequencer.stepToProcedure(this.thread,e)}getProcedureParamNamesAndIds(e){return this.thread.target.blocks.getProcedureParamNamesAndIds(e)}getProcedureParamNamesIdsAndDefaults(e){return this.thread.target.blocks.getProcedureParamNamesIdsAndDefaults(e)}initParams(){this.thread.initParams()}pushParam(e,t){this.thread.pushParam(e,t)}getParam(e){return this.thread.getParam(e)}startHats(e,t,n){const r=this.thread,i=this.sequencer,s=this.sequencer.runtime.startHats(e,t,n);return this.thread=r,this.sequencer=i,s}ioQuery(e,t,n){if(this.sequencer.runtime.ioDevices[e]&&this.sequencer.runtime.ioDevices[e][t]){const r=this.sequencer.runtime.ioDevices[e];return r[t].apply(r,n)}}}},function(e,t,n){const r=n(13);class i{constructor(e){this.runtime=e,this.provider=null,this._skinId=-1,this._drawable=-1,this._ghost=0,this._forceTransparentPreview=!1}static get FORMAT_IMAGE_DATA(){return"image-data"}static get FORMAT_CANVAS(){return"canvas"}static get DIMENSIONS(){return[480,360]}static get ORDER(){return 1}setProvider(e){this.provider=e}enableVideo(){return this.provider?this.provider.enableVideo().then((()=>this._setupPreview())):null}disableVideo(){if(this._disablePreview(),!this.provider)return null;this.provider.disableVideo()}getFrame(e){let{dimensions:t=i.DIMENSIONS,mirror:n=this.mirror,format:r=i.FORMAT_IMAGE_DATA,cacheTimeout:s=this._frameCacheTimeout}=e;return this.provider?this.provider.getFrame({dimensions:t,mirror:n,format:r,cacheTimeout:s}):null}setPreviewGhost(e){this._ghost=e,-1!==this._drawable&&this.runtime.renderer.updateDrawableEffect(this._drawable,"ghost",this._forceTransparentPreview?100:e)}_disablePreview(){-1!==this._skinId&&(this.runtime.renderer.updateBitmapSkin(this._skinId,new ImageData(...i.DIMENSIONS),1),this.runtime.renderer.updateDrawableVisible(this._drawable,!1)),this._renderPreviewFrame=null}_setupPreview(){const{renderer:e}=this.runtime;e&&(-1===this._skinId&&-1===this._drawable&&(this._skinId=e.createBitmapSkin(new ImageData(...i.DIMENSIONS),1),this._drawable=e.createDrawable(r.VIDEO_LAYER),e.updateDrawableSkinId(this._drawable,this._skinId),e.markSkinAsPrivate&&e.markSkinAsPrivate(this._skinId)),this._renderPreviewFrame||(e.updateDrawableEffect(this._drawable,"ghost",this._forceTransparentPreview?100:this._ghost),e.updateDrawableVisible(this._drawable,!0),this._renderPreviewFrame=()=>{if(clearTimeout(this._renderPreviewTimeout),!this._renderPreviewFrame)return;this._renderPreviewTimeout=setTimeout(this._renderPreviewFrame,this.runtime.currentStepTime);const t=this.getFrame({format:i.FORMAT_IMAGE_DATA,cacheTimeout:this.runtime.currentStepTime});t?(e.updateBitmapSkin(this._skinId,t,1),this.runtime.requestRedraw()):e.updateBitmapSkin(this._skinId,new ImageData(...i.DIMENSIONS),1)},this._renderPreviewFrame()))}get videoReady(){return!!this.provider&&this.provider.videoReady}postData(e){let{forceTransparentPreview:t}=e;this._forceTransparentPreview=t,this.setPreviewGhost(this._ghost)}}e.exports=i},function(e,t){e.exports={generateExtensionId:e=>{const t=e.replace(/[^a-z0-9]/gi,"").toLowerCase();return"sbx".concat(t)},argumentIndexToId:e=>e.toString()}},function(e,t){e.exports=class{constructor(e,t){this.callback=e,this.maxConcurrent=t,this._current=0,this._queue=[]}do(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Promise(((e,n)=>{this._queue.push([e,n,t]),this._startNext()}))}_startNext(){if(this._current>=this.maxConcurrent||0===this._queue.length)return;this._current++;const[e,t,n]=this._queue.shift();this.callback.apply(null,n).then((t=>{e(t),this._current--,this._startNext()})).catch((e=>{t(e),this._current--,this._startNext()}))}}},function(e,t){class n{static _mergeVarRefObjects(e,t){for(const n in t)e[n]?e[n]=e[n].concat(t[n]):e[n]=t[n];return e}static getAllVarRefsForTargets(e,t){return e.map((e=>e.blocks.getAllVariableAndListReferences(null,t))).reduce(n._mergeVarRefObjects,{})}static updateVariableIdentifiers(e,t,n){e.map((e=>(e.referencingField.id=t,n&&(e.referencingField.value=n),e)))}}e.exports=n},function(e,t,n){const r=n(85),i=n(54),s=n(86),o=n(87),a=n(254),l=(e,t)=>{const n=[],r=e=>{e.localName!==t&&void 0!==t||!e.getAttribute||n.push(e);for(let t=0;t<e.childNodes.length;t++)r(e.childNodes[t])};return r(e),n},c=e=>{const t=document.createElement("span"),n=e.outerHTML,i=r.sanitize(n,{USE_PROFILES:{svg:!0},FORBID_TAGS:["a","audio","canvas","video"],ADD_DATA_URI_TAGS:["image"]});let s,o;try{t.innerHTML=i,document.body.appendChild(t),s=t.children[0].getBBox()}finally{document.body.removeChild(t)}o=0===s.width||0===s.height?0:(e=>{let t=0;const n=e=>{e.getAttribute&&(e.getAttribute("stroke")&&(t=Math.max(t,1)),e.getAttribute("stroke-width")&&(t=Math.max(t,Number(e.getAttribute("stroke-width"))||0)));for(let t=0;t<e.childNodes.length;t++)n(e.childNodes[t])};return n(e),t})(e)/2;const a=s.width+2*o,l=s.height+2*o,c=s.x-o,u=s.y-o;e.setAttribute("width",a),e.setAttribute("height",l),e.setAttribute("viewBox",`${c} ${u} ${a} ${l}`)},u=(e,t)=>{t&&(e=>{const t=l(e,"linearGradient");for(const e of t)e.getAttribute("x2")||e.setAttribute("x2","0")})(e),a(e,window),(e=>{const t=l(e,"image"),n="image-rendering: optimizespeed; image-rendering: pixelated;";for(const e of t)e.getAttribute("style")?e.setAttribute("style",`${n} ${e.getAttribute("style")}`):e.setAttribute("style",n)})(e),t?((e=>{const t=[],n=e=>{"text"===e.localName&&t.push(e);for(let t=0;t<e.childNodes.length;t++)n(e.childNodes[t])};n(e),s(e);for(const n of t){n.removeAttribute("x"),n.removeAttribute("y"),n.setAttribute("alignment-baseline","text-before-edge"),n.setAttribute("xml:space","preserve"),n.getAttribute("font-size")||n.setAttribute("font-size","18");let t=n.textContent;const r=parseFloat(n.getAttribute("font-size")),s=2;let o=0,a=1.2;if("Handwriting"===n.getAttribute("font-family")?(a=2,o=-11*r/22):"Scratch"===n.getAttribute("font-family")?(a=.89,o=-3*r/22):"Curly"===n.getAttribute("font-family")?(a=1.38,o=-6*r/22):"Marker"===n.getAttribute("font-family")?(a=1.45,o=-6*r/22):"Sans Serif"===n.getAttribute("font-family")?(a=1.13,o=-3*r/22):"Serif"===n.getAttribute("font-family")&&(a=1.25,o=-4*r/22),0===n.transform.baseVal.numberOfItems){const t=e.createSVGTransform();n.transform.baseVal.appendItem(t)}const l=n.transform.baseVal.getItem(0).matrix;if(l.e+=l.a*s+l.c*o,l.f+=l.b*s+l.d*o,t&&0===n.childElementCount){n.textContent="";const e=t.split("\n");t="";for(const t of e){const e=i.create("tspan");e.setAttribute("x","0"),e.setAttribute("style","white-space: pre"),e.setAttribute("dy",`${a}em`),e.textContent=t||" ",n.appendChild(e)}}}})(e),c(e),(e=>{const t=l(e);for(const e of t){if(!e.style)continue;const t=e.style.stroke||e.getAttribute("stroke");t&&t.match(/^url\(#.*\)$/)&&(e.style["stroke-linejoin"]="round",e.style["stroke-linecap"]="round")}})(e)):e.getAttribute("viewBox")?e.getAttribute("width")&&e.getAttribute("height")||(e.setAttribute("width",e.viewBox.baseVal.width),e.setAttribute("height",e.viewBox.baseVal.height)):c(e)};e.exports=(e,t)=>{const n=new DOMParser;e=o(e);const r=n.parseFromString(e,"text/xml");if(r.childNodes.length<1||"svg"!==r.documentElement.localName)throw new Error("Document does not appear to be SVG.");const i=r.documentElement;return u(i,t),i}},function(e,t,n){e.exports=function(){"use strict";function e(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var t=Object.hasOwnProperty,n=Object.setPrototypeOf,r=Object.isFrozen,i=Object.getPrototypeOf,s=Object.getOwnPropertyDescriptor,o=Object.freeze,a=Object.seal,l=Object.create,c="undefined"!=typeof Reflect&&Reflect,u=c.apply,d=c.construct;u||(u=function(e,t,n){return e.apply(t,n)}),o||(o=function(e){return e}),a||(a=function(e){return e}),d||(d=function(t,n){return new(Function.prototype.bind.apply(t,[null].concat(e(n))))});var h=k(Array.prototype.forEach),p=k(Array.prototype.pop),m=k(Array.prototype.push),f=k(String.prototype.toLowerCase),g=k(String.prototype.match),y=k(String.prototype.replace),b=k(String.prototype.indexOf),v=k(String.prototype.trim),S=k(RegExp.prototype.test),w=T(TypeError);function k(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return u(e,t,r)}}function T(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return d(e,n)}}function x(e,t){n&&n(e,null);for(var i=t.length;i--;){var s=t[i];if("string"==typeof s){var o=f(s);o!==s&&(r(t)||(t[i]=o),s=o)}e[s]=!0}return e}function E(e){var n=l(null),r=void 0;for(r in e)u(t,e,[r])&&(n[r]=e[r]);return n}function A(e,t){for(;null!==e;){var n=s(e,t);if(n){if(n.get)return k(n.get);if("function"==typeof n.value)return k(n.value)}e=i(e)}function r(e){return console.warn("fallback value for",e),null}return r}var C=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),I=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),O=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),M=o(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),N=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),R=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),D=o(["#text"]),P=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns"]),L=o(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),B=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),z=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),U=a(/\{\{[\s\S]*|[\s\S]*\}\}/gm),j=a(/<%[\s\S]*|[\s\S]*%>/gm),F=a(/^data-[\-\w.\u00B7-\uFFFF]/),W=a(/^aria-[\-\w]+$/),V=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=a(/^(?:\w+script|data):/i),q=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function H(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var _=function(){return"undefined"==typeof window?null:window},K=function(e,t){if("object"!==(void 0===e?"undefined":Y(e))||"function"!=typeof e.createPolicy)return null;var n=null,r="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(r)&&(n=t.currentScript.getAttribute(r));var i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function Q(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_(),t=function(e){return Q(e)};if(t.version="2.2.7",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;var n=e.document,r=e.document,i=e.DocumentFragment,s=e.HTMLTemplateElement,a=e.Node,l=e.Element,c=e.NodeFilter,u=e.NamedNodeMap,d=void 0===u?e.NamedNodeMap||e.MozNamedAttrMap:u,k=e.Text,T=e.Comment,X=e.DOMParser,Z=e.trustedTypes,J=l.prototype,$=A(J,"cloneNode"),ee=A(J,"nextSibling"),te=A(J,"childNodes"),ne=A(J,"parentNode");if("function"==typeof s){var re=r.createElement("template");re.content&&re.content.ownerDocument&&(r=re.content.ownerDocument)}var ie=K(Z,n),se=ie&&ze?ie.createHTML(""):"",oe=r,ae=oe.implementation,le=oe.createNodeIterator,ce=oe.getElementsByTagName,ue=oe.createDocumentFragment,de=n.importNode,he={};try{he=E(r).documentMode?r.documentMode:{}}catch(e){}var pe={};t.isSupported="function"==typeof ne&&ae&&void 0!==ae.createHTMLDocument&&9!==he;var me=U,fe=j,ge=F,ye=W,be=G,ve=q,Se=V,we=null,ke=x({},[].concat(H(C),H(I),H(O),H(N),H(D))),Te=null,xe=x({},[].concat(H(P),H(L),H(B),H(z))),Ee=null,Ae=null,Ce=!0,Ie=!0,Oe=!1,Me=!1,Ne=!1,Re=!1,De=!1,Pe=!1,Le=!1,Be=!0,ze=!1,Ue=!0,je=!0,Fe=!1,We={},Ve=x({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ge=null,qe=x({},["audio","video","img","source","image","track"]),Ye=null,He=x({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),_e=null,Ke=r.createElement("form"),Qe=function(e){_e&&_e===e||(e&&"object"===(void 0===e?"undefined":Y(e))||(e={}),e=E(e),we="ALLOWED_TAGS"in e?x({},e.ALLOWED_TAGS):ke,Te="ALLOWED_ATTR"in e?x({},e.ALLOWED_ATTR):xe,Ye="ADD_URI_SAFE_ATTR"in e?x(E(He),e.ADD_URI_SAFE_ATTR):He,Ge="ADD_DATA_URI_TAGS"in e?x(E(qe),e.ADD_DATA_URI_TAGS):qe,Ee="FORBID_TAGS"in e?x({},e.FORBID_TAGS):{},Ae="FORBID_ATTR"in e?x({},e.FORBID_ATTR):{},We="USE_PROFILES"in e&&e.USE_PROFILES,Ce=!1!==e.ALLOW_ARIA_ATTR,Ie=!1!==e.ALLOW_DATA_ATTR,Oe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=e.SAFE_FOR_TEMPLATES||!1,Ne=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,Le=e.RETURN_DOM_FRAGMENT||!1,Be=!1!==e.RETURN_DOM_IMPORT,ze=e.RETURN_TRUSTED_TYPE||!1,De=e.FORCE_BODY||!1,Ue=!1!==e.SANITIZE_DOM,je=!1!==e.KEEP_CONTENT,Fe=e.IN_PLACE||!1,Se=e.ALLOWED_URI_REGEXP||Se,Me&&(Ie=!1),Le&&(Pe=!0),We&&(we=x({},[].concat(H(D))),Te=[],!0===We.html&&(x(we,C),x(Te,P)),!0===We.svg&&(x(we,I),x(Te,L),x(Te,z)),!0===We.svgFilters&&(x(we,O),x(Te,L),x(Te,z)),!0===We.mathMl&&(x(we,N),x(Te,B),x(Te,z))),e.ADD_TAGS&&(we===ke&&(we=E(we)),x(we,e.ADD_TAGS)),e.ADD_ATTR&&(Te===xe&&(Te=E(Te)),x(Te,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&x(Ye,e.ADD_URI_SAFE_ATTR),je&&(we["#text"]=!0),Ne&&x(we,["html","head","body"]),we.table&&(x(we,["tbody"]),delete Ee.tbody),o&&o(e),_e=e)},Xe=x({},["mi","mo","mn","ms","mtext"]),Ze=x({},["foreignobject","desc","title","annotation-xml"]),Je=x({},I);x(Je,O),x(Je,M);var $e=x({},N);x($e,R);var et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml",rt=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:nt,tagName:"template"});var n=f(e.tagName),r=f(t.tagName);if(e.namespaceURI===tt)return t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===r||Xe[r]):Boolean(Je[n]);if(e.namespaceURI===et)return t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&Ze[r]:Boolean($e[n]);if(e.namespaceURI===nt){if(t.namespaceURI===tt&&!Ze[r])return!1;if(t.namespaceURI===et&&!Xe[r])return!1;var i=x({},["title","style","font","a","script"]);return!$e[n]&&(i[n]||!Je[n])}return!1},it=function(e){m(t.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=se}catch(t){e.remove()}}},st=function(e,n){try{m(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch(e){m(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),"is"===e&&!Te[e])if(Pe||Le)try{it(n)}catch(e){}else try{n.setAttribute(e,"")}catch(e){}},ot=function(e){var t=void 0,n=void 0;if(De)e="<remove></remove>"+e;else{var i=g(e,/^[\r\n\t ]+/);n=i&&i[0]}var s=ie?ie.createHTML(e):e;try{t=(new X).parseFromString(s,"text/html")}catch(e){}if(!t||!t.documentElement){var o=(t=ae.createHTMLDocument("")).body;o.parentNode.removeChild(o.parentNode.firstElementChild),o.outerHTML=s}return e&&n&&t.body.insertBefore(r.createTextNode(n),t.body.childNodes[0]||null),ce.call(t,Ne?"html":"body")[0]},at=function(e){return le.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,(function(){return c.FILTER_ACCEPT}),!1)},lt=function(e){return!(e instanceof k||e instanceof T||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof d&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},ct=function(e){return"object"===(void 0===a?"undefined":Y(a))?e instanceof a:e&&"object"===(void 0===e?"undefined":Y(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ut=function(e,n,r){pe[e]&&h(pe[e],(function(e){e.call(t,n,r,_e)}))},dt=function(e){var n=void 0;if(ut("beforeSanitizeElements",e,null),lt(e))return it(e),!0;if(g(e.nodeName,/[\u0080-\uFFFF]/))return it(e),!0;var r=f(e.nodeName);if(ut("uponSanitizeElement",e,{tagName:r,allowedTags:we}),!ct(e.firstElementChild)&&(!ct(e.content)||!ct(e.content.firstElementChild))&&S(/<[/\w]/g,e.innerHTML)&&S(/<[/\w]/g,e.textContent))return it(e),!0;if(!we[r]||Ee[r]){if(je&&!Ve[r]){var i=ne(e),s=te(e);if(s&&i)for(var o=s.length-1;o>=0;--o)i.insertBefore($(s[o],!0),ee(e))}return it(e),!0}return e instanceof l&&!rt(e)?(it(e),!0):"noscript"!==r&&"noembed"!==r||!S(/<\/no(script|embed)/i,e.innerHTML)?(Me&&3===e.nodeType&&(n=e.textContent,n=y(n,me," "),n=y(n,fe," "),e.textContent!==n&&(m(t.removed,{element:e.cloneNode()}),e.textContent=n)),ut("afterSanitizeElements",e,null),!1):(it(e),!0)},ht=function(e,t,n){if(Ue&&("id"===t||"name"===t)&&(n in r||n in Ke))return!1;if(Ie&&S(ge,t));else if(Ce&&S(ye,t));else{if(!Te[t]||Ae[t])return!1;if(Ye[t]);else if(S(Se,y(n,ve,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==b(n,"data:")||!Ge[e])if(Oe&&!S(be,y(n,ve,"")));else if(n)return!1}return!0},pt=function(e){var n=void 0,r=void 0,i=void 0,s=void 0;ut("beforeSanitizeAttributes",e,null);var o=e.attributes;if(o){var a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Te};for(s=o.length;s--;){var l=n=o[s],c=l.name,u=l.namespaceURI;if(r=v(n.value),i=f(c),a.attrName=i,a.attrValue=r,a.keepAttr=!0,a.forceKeepAttr=void 0,ut("uponSanitizeAttribute",e,a),r=a.attrValue,!a.forceKeepAttr&&(st(c,e),a.keepAttr))if(S(/\/>/i,r))st(c,e);else{Me&&(r=y(r,me," "),r=y(r,fe," "));var d=e.nodeName.toLowerCase();if(ht(d,i,r))try{u?e.setAttributeNS(u,c,r):e.setAttribute(c,r),p(t.removed)}catch(e){}}}ut("afterSanitizeAttributes",e,null)}},mt=function e(t){var n=void 0,r=at(t);for(ut("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ut("uponSanitizeShadowNode",n,null),dt(n)||(n.content instanceof i&&e(n.content),pt(n));ut("afterSanitizeShadowDOM",t,null)};return t.sanitize=function(r,s){var o=void 0,l=void 0,c=void 0,u=void 0,d=void 0;if(r||(r="\x3c!--\x3e"),"string"!=typeof r&&!ct(r)){if("function"!=typeof r.toString)throw w("toString is not a function");if("string"!=typeof(r=r.toString()))throw w("dirty is not a string, aborting")}if(!t.isSupported){if("object"===Y(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof r)return e.toStaticHTML(r);if(ct(r))return e.toStaticHTML(r.outerHTML)}return r}if(Re||Qe(s),t.removed=[],"string"==typeof r&&(Fe=!1),Fe);else if(r instanceof a)1===(l=(o=ot("\x3c!----\x3e")).ownerDocument.importNode(r,!0)).nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?o=l:o.appendChild(l);else{if(!Pe&&!Me&&!Ne&&-1===r.indexOf("<"))return ie&&ze?ie.createHTML(r):r;if(!(o=ot(r)))return Pe?null:se}o&&De&&it(o.firstChild);for(var h=at(Fe?r:o);c=h.nextNode();)3===c.nodeType&&c===u||dt(c)||(c.content instanceof i&&mt(c.content),pt(c),u=c);if(u=null,Fe)return r;if(Pe){if(Le)for(d=ue.call(o.ownerDocument);o.firstChild;)d.appendChild(o.firstChild);else d=o;return Be&&(d=de.call(n,d,!0)),d}var p=Ne?o.outerHTML:o.innerHTML;return Me&&(p=y(p,me," "),p=y(p,fe," ")),ie&&ze?ie.createHTML(p):p},t.setConfig=function(e){Qe(e),Re=!0},t.clearConfig=function(){_e=null,Re=!1},t.isValidAttribute=function(e,t,n){_e||Qe({});var r=f(e),i=f(t);return ht(r,i,n)},t.addHook=function(e,t){"function"==typeof t&&(pe[e]=pe[e]||[],m(pe[e],t))},t.removeHook=function(e){pe[e]&&p(pe[e])},t.removeHooks=function(e){pe[e]&&(pe[e]=[])},t.removeAllHooks=function(){pe={}},t}return Q()}()},function(e,t){e.exports=function(e){const t=[],n=e=>{"text"===e.localName&&t.push(e);for(let t=0;t<e.childNodes.length;t++)n(e.childNodes[t])};n(e);for(const e of t)e.getAttribute("font-family")&&"Helvetica"!==e.getAttribute("font-family")?"Mystery"===e.getAttribute("font-family")?e.setAttribute("font-family","Curly"):"Gloria"===e.getAttribute("font-family")?e.setAttribute("font-family","Handwriting"):"Donegal"===e.getAttribute("font-family")&&e.setAttribute("font-family","Serif"):e.setAttribute("font-family","Sans Serif")}},function(e,t){e.exports=function(e){const t=e.match(/<svg [^>]*>/);t&&-1===t[0].indexOf("xmlns=")&&(e=e.replace("<svg ",'<svg xmlns="http://www.w3.org/2000/svg" ')),t&&-1!==t[0].indexOf("&ns_")&&-1===e.indexOf("<!DOCTYPE")&&(e=e.replace(t[0],t[0].replace(/&ns_[^;]+;/g,"http://ns.adobe.com/Extensibility/1.0/"))),e.includes("data:img/png")&&(e=e.replace(/(<image[^>]+?xlink:href=["'])data:img\/png/g,((e,t)=>`${t}data:image/png`)));const n=/(<[^>]+?xmlns:(?!xml=)[^ ]+=)"http:\/\/www.w3.org\/XML\/1998\/namespace"/g;return null!==e.match(n)&&(e=e.replace(n,((e,t)=>`${t}"http://dummy.namespace"`))),e=(e=(e=e.replace(/<(\/?)\s*svg:/g,"<$1")).replace(/<metadata>[\s\S]*<\/metadata>/,"<metadata></metadata>")).replace(/<script[\s\S]*>[\s\S]*<\/script>/,"<script><\/script>")}},function(e,t,n){const r=n(89);e.exports=(e,t)=>{let n=(new XMLSerializer).serializeToString(e);return t&&(n=r(n,t)),n}},function(e,t,n){const r=n(257);e.exports=function(e,t={}){if("string"!=typeof e)throw new Error("SVG to be inlined is not a string");const n={};if(t&&"object"==typeof t)for(const[e,r]of Object.entries(t))n[(i=e,i.replace(/[<>&'"]/g,(e=>{switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";case"'":return"&apos;";case'"':return"&quot;"}})))]=r;var i;try{Object.assign(n,r())}catch(e){}const s=new Set,o=/font-family="([^"]*)"/g;let a=o.exec(e);for(;a;)s.add(a[1]),a=o.exec(e);if(s.size>0){let t="<defs><style>";for(const e of s)Object.prototype.hasOwnProperty.call(n,e)&&(t+=`${n[e]}`);return t+="</style></defs>",e=e.replace(/<svg[^>]*>/,`$&${t}`)}return e}},function(e,t,n){var r=n(55),i="    ";function s(e,t){function n(e,t){return r.slice(e,t).map((function(t,n){for(var r=String(e+n+1);r.length<c;)r=" "+r;return r+" |"+t})).join("\n")}var r=e.source.split(/\r\n?|\n|\f/),s=e.line,o=e.column,a=Math.max(1,s-t)-1,l=Math.min(s+t,r.length+1),c=Math.max(4,String(l).length)+1,u=0;(o+=3*(r[s-1].substr(0,o-1).match(/\t/g)||[]).length)>100&&(u=o-60+3,o=58);for(var d=a;d<=l;d++)d>=0&&d<r.length&&(r[d]=r[d].replace(/\t/g,i),r[d]=(u>0&&r[d].length>u?"…":"")+r[d].substr(u,98)+(r[d].length>u+100-1?"…":""));return[n(a,s),new Array(o+c+2).join("-")+"^",n(s,l)].filter(Boolean).join("\n")}e.exports=function(e,t,n,i,o){var a=r("SyntaxError",e);return a.source=t,a.offset=n,a.line=i,a.column=o,a.sourceFragment=function(e){return s(a,isNaN(e)?0:e)},Object.defineProperty(a,"formattedMessage",{get:function(){return"Parse error: "+a.message+"\n"+s(a,2)}}),a.parseError={offset:n,line:i,column:o},a}},function(e,t){var n=0;function r(e){return e>=48&&e<=57}function i(e){return e>=65&&e<=90}function s(e){return e>=97&&e<=122}function o(e){return i(e)||s(e)}function a(e){return e>=128}function l(e){return o(e)||a(e)||95===e}function c(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e}function u(e){return 10===e||13===e||12===e}function d(e){return u(e)||32===e||9===e}function h(e,t){return 92===e&&(!u(t)&&t!==n)}var p=new Array(128);f.Eof=128,f.WhiteSpace=130,f.Digit=131,f.NameStart=132,f.NonPrintable=133;for(var m=0;m<p.length;m++)switch(!0){case d(m):p[m]=f.WhiteSpace;break;case r(m):p[m]=f.Digit;break;case l(m):p[m]=f.NameStart;break;case c(m):p[m]=f.NonPrintable;break;default:p[m]=m||f.Eof}function f(e){return e<128?p[e]:f.NameStart}e.exports={isDigit:r,isHexDigit:function(e){return r(e)||e>=65&&e<=70||e>=97&&e<=102},isUppercaseLetter:i,isLowercaseLetter:s,isLetter:o,isNonAscii:a,isNameStart:l,isName:function(e){return l(e)||r(e)||45===e},isNonPrintable:c,isNewline:u,isWhiteSpace:d,isValidEscape:h,isIdentifierStart:function(e,t,n){return 45===e?l(t)||45===t||h(t,n):!!l(e)||92===e&&h(e,t)},isNumberStart:function(e,t,n){return 43===e||45===e?r(t)?2:46===t&&r(n)?3:0:46===e?r(t)?2:0:r(e)?1:0},isBOM:function(e){return 65279===e||65534===e?1:0},charCodeCategory:f}},function(e,t,n){const r=n(55),i=n(56),s={offset:0,line:1,column:1};function o(e,t){const n=e&&e.loc&&e.loc[t];return n?"line"in n?a(n):n:null}function a({offset:e,line:t,column:n},r){const i={offset:e,line:t,column:n};if(r){const e=r.split(/\n|\r\n?|\f/);i.offset+=r.length,i.line+=e.length-1,i.column=1===e.length?i.column+r.length:e.pop().length+1}return i}e.exports={SyntaxReferenceError:function(e,t){const n=r("SyntaxReferenceError",e+(t?" `"+t+"`":""));return n.reference=t,n},SyntaxMatchError:function(e,t,n,l){const c=r("SyntaxMatchError",e),{css:u,mismatchOffset:d,mismatchLength:h,start:p,end:m}=function(e,t){const n=e.tokens,r=e.longestMatch,i=r<n.length&&n[r].node||null,l=i!==t?i:null;let c,u,d=0,h=0,p=0,m="";for(let e=0;e<n.length;e++){const t=n[e].value;e===r&&(h=t.length,d=m.length),null!==l&&n[e].node===l&&(e<=r?p++:p=0),m+=t}return r===n.length||p>1?(c=o(l||t,"end")||a(s,m),u=a(c)):(c=o(l,"start")||a(o(t,"start")||s,m.slice(0,d)),u=o(l,"end")||a(c,m.substr(d,h))),{css:m,mismatchOffset:d,mismatchLength:h,start:c,end:u}}(l,n);return c.rawMessage=e,c.syntax=t?i(t):"<generic>",c.css=u,c.mismatchOffset=d,c.mismatchLength=h,c.message=e+"\n  syntax: "+c.syntax+"\n   value: "+(u||"<empty string>")+"\n  --------"+new Array(c.mismatchOffset+1).join("-")+"^",Object.assign(c,p),c.loc={source:n&&n.loc&&n.loc.source||"<unknown>",start:p,end:m},c}}},function(e,t){var n="undefined"!=typeof Uint32Array?Uint32Array:Array;e.exports=function(e,t){return null===e||e.length<t?new n(Math.max(t+1024,16384)):e}},function(e,t,n){var r=n(55);e.exports=function(e,t,n){var i=r("SyntaxError",e);return i.input=t,i.offset=n,i.rawMessage=e,i.message=i.rawMessage+"\n  "+i.input+"\n--"+new Array((i.offset||i.input.length)+1).join("-")+"^",i}},function(e,t){var n=function(){};function r(e){return"function"==typeof e?e:n}e.exports=function(e,t,i){var s=n,o=n;if("function"==typeof t?s=t:t&&(s=r(t.enter),o=r(t.leave)),s===n&&o===n)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");!function e(t){switch(s.call(i,t),t.type){case"Group":t.terms.forEach(e);break;case"Multiplier":e(t.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+t.type)}o.call(i,t)}(e)}},function(e,t,n){var r=n(58),i={type:"Match"},s={type:"Mismatch"},o={type:"DisallowEmpty"},a=40,l=41;function c(e,t,n){return t===i&&n===s||e===i&&t===i&&n===i?e:("If"===e.type&&e.else===s&&t===i&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:n})}function u(e){return e.length>2&&e.charCodeAt(e.length-2)===a&&e.charCodeAt(e.length-1)===l}function d(e){return"Keyword"===e.type||"AtKeyword"===e.type||"Function"===e.type||"Type"===e.type&&u(e.name)}function h(e,t,n){switch(e){case" ":for(var r=i,o=t.length-1;o>=0;o--){r=c(p=t[o],r,s)}return r;case"|":r=s;var a=null;for(o=t.length-1;o>=0;o--){if(d(p=t[o])&&(null===a&&o>0&&d(t[o-1])&&(r=c({type:"Enum",map:a=Object.create(null)},i,r)),null!==a)){var l=(u(p.name)?p.name.slice(0,-1):p.name).toLowerCase();if(l in a==!1){a[l]=p;continue}}a=null,r=c(p,i,r)}return r;case"&&":if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};for(r=s,o=t.length-1;o>=0;o--){var p=t[o];m=t.length>1?h(e,t.filter((function(e){return e!==p})),!1):i,r=c(p,m,r)}return r;case"||":if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};for(r=n?i:s,o=t.length-1;o>=0;o--){var m;p=t[o];m=t.length>1?h(e,t.filter((function(e){return e!==p})),!0):i,r=c(p,m,r)}return r}}function p(e){if("function"==typeof e)return{type:"Generic",fn:e};switch(e.type){case"Group":var t=h(e.combinator,e.terms.map(p),!1);return e.disallowEmpty&&(t=c(t,o,s)),t;case"Multiplier":return function(e){var t=i,n=p(e.term);if(0===e.max)n=c(n,o,s),(t=c(n,null,s)).then=c(i,i,t),e.comma&&(t.then.else=c({type:"Comma",syntax:e},t,s));else for(var r=e.min||1;r<=e.max;r++)e.comma&&t!==i&&(t=c({type:"Comma",syntax:e},t,s)),t=c(n,c(i,i,t),s);if(0===e.min)t=c(i,i,t);else for(r=0;r<e.min-1;r++)e.comma&&t!==i&&(t=c({type:"Comma",syntax:e},t,s)),t=c(n,t,s);return t}(e);case"Type":case"Property":return{type:e.type,name:e.name,syntax:e};case"Keyword":return{type:e.type,name:e.name.toLowerCase(),syntax:e};case"AtKeyword":return{type:e.type,name:"@"+e.name.toLowerCase(),syntax:e};case"Function":return{type:e.type,name:e.name.toLowerCase()+"(",syntax:e};case"String":return 3===e.value.length?{type:"Token",value:e.value.charAt(1),syntax:e}:{type:e.type,value:e.value.substr(1,e.value.length-2).replace(/\\'/g,"'"),syntax:e};case"Token":return{type:e.type,value:e.value,syntax:e};case"Comma":return{type:e.type,syntax:e};default:throw new Error("Unknown node type:",e.type)}}e.exports={MATCH:i,MISMATCH:s,DISALLOW_EMPTY:o,buildMatchGraph:function(e,t){return"string"==typeof e&&(e=r(e)),{type:"MatchGraph",match:p(e),syntax:t||null,source:e}}}},function(e,t,n){var r=n(0).cmpChar,i=n(0).cmpStr,s=n(0).TYPE,o=s.Ident,a=s.String,l=s.Number,c=s.Function,u=s.Url,d=s.Hash,h=s.Dimension,p=s.Percentage,m=s.LeftParenthesis,f=s.LeftSquareBracket,g=s.Comma,y=s.Delim;e.exports=function(e){switch(this.scanner.tokenType){case d:return this.Hash();case g:return e.space=null,e.ignoreWSAfter=!0,this.Operator();case m:return this.Parentheses(this.readSequence,e.recognizer);case f:return this.Brackets(this.readSequence,e.recognizer);case a:return this.String();case h:return this.Dimension();case p:return this.Percentage();case l:return this.Number();case c:return i(this.scanner.source,this.scanner.tokenStart,this.scanner.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,e.recognizer);case u:return this.Url();case o:return r(this.scanner.source,this.scanner.tokenStart,117)&&r(this.scanner.source,this.scanner.tokenStart+1,43)?this.UnicodeRange():this.Identifier();case y:var t=this.scanner.source.charCodeAt(this.scanner.tokenStart);if(47===t||42===t||43===t||45===t)return this.Operator();35===t&&this.error("Hex or identifier is expected",this.scanner.tokenStart+1)}}},function(e,t){e.exports={parse:function(){return this.createSingleNodeList(this.SelectorList())}}},function(e,t){e.exports={parse:function(){return this.createSingleNodeList(this.Nth(true))}}},function(e,t){e.exports={parse:function(){return this.createSingleNodeList(this.Nth(false))}}},function(e,t,n){let r,i;"undefined"==typeof TextEncoder?(r=n(21).TextEncoder,i=n(21).TextDecoder):(r=TextEncoder,i=TextDecoder);const s="<!".concat("-".repeat(2)),o="".concat("-".repeat(2),">"),a=new RegExp("".concat(s,"rotationCenter:(-?[\\d\\.]+):(-?[\\d\\.]+)").concat(o,"$"));e.exports={parseVectorMetadata:e=>{const t=e.match(a);if(!t)return null;const n=+t[1],r=+t[2];return Number.isNaN(n)||Number.isNaN(r)?null:[n,r]},exportCostume:e=>{const t=e.asset.data;if("svg"!==e.dataFormat)return t;let n=(new i).decode(t);n=n.replace(a,"");const l=e.rotationCenterX,c=e.rotationCenterY;return n+="".concat(s,"rotationCenter:").concat(l,":").concat(c).concat(o),(new r).encode(n)}}},function(e,t,n){const r=n(8);e.exports=e=>{const t={};for(let n=0;n<e.length;n++){const i=r(),s=e[n].id;e[n].id=t[s]=i}for(let n=0;n<e.length;n++){for(const r in e[n].inputs){const i=e[n].inputs[r];i.block=t[i.block],i.shadow=t[i.shadow]}e[n].parent&&(e[n].parent=t[e[n].parent]),e[n].next&&(e[n].next=t[e[n].next])}}},function(e,t,n){const r=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return new Promise(((t,r)=>{e(...n,((e,n)=>{e?r("string"==typeof e?new Error(e):e):t(n)}))}))};var i=r(n(369)),s=r(n(371)),o=r(n(372));e.exports=function(e,t,n){i(e,t).then((function(e){return s(e[0]).then(o.bind(null,t)).then((function(t){return[t,e[1]]}))})).then(n.bind(null,null),n)}},function(e,t,n){const r=n(22),i=n(1);e.exports={deserializeSound:function(e,t,n,s){const o=s||e.md5,a=t.storage;if(!a)return i.warn("No storage module present; cannot load sound asset: ",o),Promise.resolve(null);if(!n)return Promise.resolve(null);let l=n.file(o);if(!l){const e=new RegExp("^([^/]*/)?".concat(o,"$"));l=n.file(e)[0]}if(!l)return i.error("Could not find sound file associated with the ".concat(e.name," sound.")),Promise.resolve(null);if(!r.support.uint8array)return i.error("JSZip uint8array is not supported in this browser."),Promise.resolve(null);const c="mp3"===e.dataFormat.toLowerCase()?a.DataFormat.MP3:a.DataFormat.WAV;return l.async("uint8array").then((e=>a.createAsset(a.AssetType.Sound,c,e,null,!0))).then((t=>{e.asset=t,e.assetId=t.assetId,e.md5="".concat(t.assetId,".").concat(t.dataFormat)}))},deserializeCostume:function(e,t,n,s,o){const a=t.storage,l=e.assetId,c=s||"".concat(l,".").concat(e.dataFormat);if(!a)return i.warn("No storage module present; cannot load costume asset: ",c),Promise.resolve(null);if(e.asset)return Promise.resolve(a.createAsset(e.asset.assetType,e.asset.dataFormat,new Uint8Array(Object.keys(e.asset.data).map((t=>e.asset.data[t]))),null,!0)).then((t=>{e.asset=t,e.assetId=t.assetId,e.md5="".concat(t.assetId,".").concat(t.dataFormat)}));if(!n)return Promise.resolve(null);let u=n.file(c);if(!u){const e=new RegExp("^([^/]*/)?".concat(c,"$"));u=n.file(e)[0]}if(!u)return i.error("Could not find costume file associated with the ".concat(e.name," costume.")),Promise.resolve(null);let d=null;const h=e.dataFormat.toLowerCase();if("svg"===h?d=a.AssetType.ImageVector:["png","bmp","jpeg","jpg","gif"].indexOf(h)>=0?d=a.AssetType.ImageBitmap:i.error("Unexpected file format for costume: ".concat(h)),!r.support.uint8array)return i.error("JSZip uint8array is not supported in this browser."),Promise.resolve(null);let p;if(e.textLayerMD5){const t=n.file(o);if(!t)return i.error("Could not find text layer file associated with the ".concat(e.name," costume.")),Promise.resolve(null);p=t.async("uint8array").then((t=>a.createAsset(a.AssetType.ImageBitmap,"png",t,e.textLayerMD5))).then((t=>{e.textLayerAsset=t}))}else p=Promise.resolve(null);return Promise.all([p,u.async("uint8array").then((e=>a.createAsset(d,h,e,null,!0))).then((t=>{e.asset=t,e.assetId=t.assetId,e.md5="".concat(t.assetId,".").concat(t.dataFormat)}))])}}},function(e,t,n){const r=n(16),i=n(51),s=n(53),o=n(23),a=n(1),l=n(8),c=n(7),u=n(5),d=n(375),h=n(52),p=n(10),m=n(46),f=n(13),g=n(81),{loadCostume:y}=n(34),{loadSound:b}=n(33),{deserializeCostume:v,deserializeSound:S}=n(104),w=["argument","control","data","event","looks","math","motion","operator","procedures","sensing","sound"],k=/\u001f|\./,T=e=>{const[t,n]=e.split(k),r=g.generateExtensionId(t);return"".concat(r,"_").concat(n)},x=function(e){const t=[{}];let n=0;const r=e.split(/(?=[^\\]%[nbs])/);for(let e=0;e<r.length;e++){const i=r[e].trim();if("%"===i.substring(0,1)){const e=i.substring(1,2),r={type:"input",inputName:"input"+n++};"n"===e?r.inputOp="math_number":"s"===e?r.inputOp="text":"b"===e&&(r.inputOp="boolean"),t.push(r)}}return t},E=function(e){return x(e).map((e=>e.inputName)).filter((e=>e))},A=function e(t){let n=[];for(let r=0;r<t.length;r++){const i=t[r];n.push(i),i.children&&(n=n.concat(e(i.children))),delete i.children}return n},C=function(e,t,n,r,i,s,o){const a=[];let l=null;for(let c=0;c<e.length;c++){const u=e[c],d=L(u,t,n,r,i,s,o),h=d[0];o=d[1],h&&(l&&(h.parent=l.id,l.next=h.id),l=h,a.push(h))}return[a,o]},I=function(){let e={};const t=(e,t,n)=>"".concat(e,"-").concat(c.replaceUnsafeChars(t),"-").concat(n);return function(n,r){return r&&(e={}),function(i,s){return r?(e["".concat(i,"-").concat(s)]=t(n,i,s),e["".concat(i,"-").concat(s)]):e["".concat(i,"-").concat(s)]?e["".concat(i,"-").concat(s)]:t(n,i,s)}}}(),O=function(){let e={};const t=[],n=l();return function(r){return r&&(e={}),{broadcastMsgMapUpdater:function(r,i){return""===(r=r.toLowerCase())&&(r=n),e[r]="broadcastMsgId-".concat(c.replaceUnsafeChars(r)),t.push(i),e[r]},globalBroadcastMsgs:e,allBroadcastFields:t,emptyMsgName:n}}}(),M=(e,t,n,r)=>{if(!d[e.cmd])return void a.warn("Could not find monitor block with opcode: ".concat(e.cmd));const i=d[e.cmd].opcode,s=i.indexOf("_"),o=i.substring(0,s);if("videoSensing"===o)return;if(-1===w.indexOf(o)&&""!==o&&!r.extensionIDs.has(o)&&!e.visible)return;let l=null;if(!Object.prototype.hasOwnProperty.call(e,"target"))for(let t=0;t<n.length;t++){const r=n[t];Object.keys(r.variables).filter((t=>{const n=r.variables[t];return n.type===p.LIST_TYPE&&n.name===e.listName})).length>0&&(l=r,e.target=r.getName())}if(l=l||n.filter((t=>t.getName()===e.target))[0],!l)throw new Error("Cannot create monitor for target that cannot be found by name");const c=I(l.id,!1),[u,h]=L([e.cmd,e.param],null,c,r,{},null,null);"getVar:"===e.cmd?u.id=c(e.param,p.SCALAR_TYPE):"contentsOfList:"===e.cmd?u.id=c(e.param,p.LIST_TYPE):Object.prototype.hasOwnProperty.call(t.monitorBlockInfo,u.opcode)?u.id=t.monitorBlockInfo[u.opcode].getId(l.id,u.fields):u.id=u.opcode,u.targetId=l.isStage?null:l.id,u.isMonitored=e.visible;const f=t.monitorBlocks._blocks[u.id];if(f)f.isMonitored=e.visible,f.targetId=u.targetId;else{const e=A([u]);for(let n=0;n<e.length;n++)t.monitorBlocks.createBlock(e[n])}switch(e.mode){case 1:e.mode="default";break;case 2:e.mode="large";break;case 3:e.mode="slider"}t.requestAddMonitor(m({id:u.id,targetId:u.targetId,spriteName:u.targetId?e.target:null,opcode:u.opcode,params:t.monitorBlocks._getBlockParams(u),value:"",mode:e.mode,sliderMin:e.sliderMin,sliderMax:e.sliderMax,isDiscrete:e.isDiscrete,x:e.x,y:e.y,width:e.width,height:e.height,visible:e.visible}))},N=function e(t,n,r,i){if(!Object.prototype.hasOwnProperty.call(t,"objName"))return null;const s={costumePromises:[],soundPromises:[],soundBank:n.audioEngine&&n.audioEngine.createBank(),children:[]},o=s.costumePromises;if(Object.prototype.hasOwnProperty.call(t,"costumes"))for(let e=0;e<t.costumes.length;e++){const s=t.costumes[e],a=s.bitmapResolution||1,l={name:s.costumeName,bitmapResolution:a,rotationCenterX:r?240*a:s.rotationCenterX,rotationCenterY:r?180*a:s.rotationCenterY,md5:s.baseLayerMD5,skinId:null},u=s.baseLayerMD5,d=c.splitFirst(u,"."),h=d[0];let p;2===d.length&&d[1]?p=d[1]:(p="png",l.md5="".concat(l.md5,".").concat(p)),l.dataFormat=p,l.assetId=h,s.textLayerMD5&&(l.textLayerMD5=c.splitFirst(s.textLayerMD5,".")[0]);const m="".concat(s.baseLayerID,".").concat(p),f=s.textLayerID?"".concat(s.textLayerID,".png"):null;o.push(n.wrapAssetRequest((()=>v(l,n,i,m,f).then((()=>y(l.md5,l,n,2))))))}const{soundBank:a,soundPromises:l}=s;if(Object.prototype.hasOwnProperty.call(t,"sounds"))for(let e=0;e<t.sounds.length;e++){const r=t.sounds[e],s={name:r.soundName,format:r.format,rate:r.rate,sampleCount:r.sampleCount,md5:r.md5,data:null},o=r.md5,u=c.splitFirst(o,"."),d=u[0],h=u[1].toLowerCase();s.dataFormat=h,s.assetId=d;const p="".concat(r.soundID,".").concat(h);l.push(n.wrapAssetRequest((()=>S(s,n,i,p).then((()=>b(s,n,a))))))}const u=s.children;if(t.children)for(let r=0;r<t.children.length;r++)u.push(e(t.children[r],n,!1,i));return s},R=function e(t,n,o,a,l,c){if(!Object.prototype.hasOwnProperty.call(t,"objName"))return Object.prototype.hasOwnProperty.call(t,"listName")&&(t.cmd="contentsOfList:",t.param=t.listName,t.mode="list"),t.deferredMonitor=!0,Promise.resolve(t);const d=new r(n),m=new s(d,n);if(Object.prototype.hasOwnProperty.call(t,"objName")){if(a&&"Stage"!==t.objName){for(const e of t.children)Object.prototype.hasOwnProperty.call(e,"objName")||e.target!==t.objName||(e.target="Stage");t.objName="Stage"}m.name=t.objName}const y=c.costumePromises,{soundBank:b,soundPromises:v}=c,S=m.createClone(a?f.BACKGROUND_LAYER:f.SPRITE_LAYER),w=I(S.id,a),k=O(a),T=k.broadcastMsgMapUpdater;if(Object.prototype.hasOwnProperty.call(t,"variables"))for(let e=0;e<t.variables.length;e++){const r=t.variables[e],i=r.isPersistent&&a&&n.canAddCloudVariable(),s=new p(w(r.name,p.SCALAR_TYPE),r.name,p.SCALAR_TYPE,i);i&&n.addCloudVariable(),s.value=r.value,S.variables[s.id]=s}const x={};if(Object.prototype.hasOwnProperty.call(t,"scriptComments")){t.scriptComments.map((e=>{const[t,n,r,i,s,o,a]=e,l=e[5]>=0,c=new h(null,a,l?null:1.5*t,l?null:2.2*n,1.5*r,2.2*i,!s);return l&&(c.blockId=o,Object.prototype.hasOwnProperty.call(x,o)?x[o].push(c):x[o]=[c]),c})).forEach((e=>{S.comments[e.id]=e}))}Object.prototype.hasOwnProperty.call(t,"scripts")&&function(e,t,n,r,i,s){let o=0;for(let a=0;a<e.length;a++){const l=e[a],c=l[0],u=l[1],d=l[2],h={},[p,m]=C(d,n,r,i,h,s,o);o=m,p[0]&&(p[0].x=1.5*c,p[0].y=2.2*u,p[0].topLevel=!0,p[0].parent=null);const f=A(p);for(let e=0;e<f.length;e++)t.createBlock(f[e])}}(t.scripts,d,T,w,o,x);for(const e in x){x[e].forEach((e=>{"number"==typeof e.blockId&&(e.blockId=null)}))}if(d.updateTargetSpecificBlocks(a),Object.prototype.hasOwnProperty.call(t,"lists"))for(let e=0;e<t.lists.length;e++){const n=t.lists[e],r=new p(w(n.listName,p.LIST_TYPE),n.listName,p.LIST_TYPE,!1);r.value=n.contents,S.variables[r.id]=r}Object.prototype.hasOwnProperty.call(t,"scratchX")&&(S.x=t.scratchX),Object.prototype.hasOwnProperty.call(t,"scratchY")&&(S.y=t.scratchY),Object.prototype.hasOwnProperty.call(t,"direction")&&(S.direction=u.wrapClamp(t.direction,-179,180)),Object.prototype.hasOwnProperty.call(t,"isDraggable")&&(S.draggable=t.isDraggable),Object.prototype.hasOwnProperty.call(t,"scale")&&(S.size=100*t.scale),Object.prototype.hasOwnProperty.call(t,"visible")&&(S.visible=t.visible),Object.prototype.hasOwnProperty.call(t,"currentCostumeIndex")&&(S.currentCostume=u.clamp(Math.floor(t.currentCostumeIndex),0,t.costumes.length-1)),Object.prototype.hasOwnProperty.call(t,"rotationStyle")&&("none"===t.rotationStyle?S.rotationStyle=i.ROTATION_STYLE_NONE:"leftRight"===t.rotationStyle?S.rotationStyle=i.ROTATION_STYLE_LEFT_RIGHT:"normal"===t.rotationStyle&&(S.rotationStyle=i.ROTATION_STYLE_ALL_AROUND)),Object.prototype.hasOwnProperty.call(t,"tempoBPM")&&(S.tempo=t.tempoBPM),Object.prototype.hasOwnProperty.call(t,"videoAlpha")&&(S.videoTransparency=100-100*t.videoAlpha),Object.prototype.hasOwnProperty.call(t,"info")&&Object.prototype.hasOwnProperty.call(t.info,"videoOn")&&(t.info.videoOn?S.videoState=i.VIDEO_STATE.ON:S.videoState=i.VIDEO_STATE.OFF),Object.prototype.hasOwnProperty.call(t,"indexInLibrary")&&(S.targetPaneOrder=t.indexInLibrary),S.isStage=a,Promise.all(y).then((e=>{m.costumes=e})),Promise.all(v).then((e=>{m.sounds=e,m.soundBank=b||null}));const E=[];if(t.children)for(let r=0;r<t.children.length;r++)E.push(e(t.children[r],n,o,!1,l,c.children[r]));if(a){const e=t.info&&t.info.savedExtensions;if(Array.isArray(e))for(const t of e){const e=g.generateExtensionId(t.extensionName),n=t.javascriptURL;o.extensionURLs.set(e,n)}}return Promise.all(y.concat(v)).then((()=>Promise.all(E).then((e=>{if(S.isStage){const e=k.globalBroadcastMsgs,t=k.allBroadcastFields,n=k.emptyMsgName;if(e[n]){let r=1;for(;e["message".concat(r)];)r+=1;const i="message".concat(r);e[i]=e[n],delete e[n];for(let e=0;e<t.length;e++)""===t[e].value&&(t[e].value=i)}for(const t in e){const n=e[t],r=new p(n,t,p.BROADCAST_MESSAGE_TYPE,!1);S.variables[r.id]=r}}let t=[S];const r=[];for(let n=0;n<e.length;n++)e[n]&&(e[n].deferredMonitor?r.push(e[n]):t=t.concat(e[n]));for(let e=0;e<r.length;e++)M(r[e],n,t,o);return t}))))},D=function(e){const t=e.map(((e,t)=>(e.layerOrder=t,e))).sort(((e,t)=>e.targetPaneOrder-t.targetPaneOrder));return t.forEach((e=>{delete e.targetPaneOrder})),t},P=function(e){const t=e[0],n=t&&d[t];return n?"function"==typeof n?n(e):n:t&&(e=>k.test(e))(t)?(e=>{const t=e[0],n=e.length-1,r=[];for(let e=0;e<n;e++)r.push({type:"input",inputOp:"text",inputName:g.argumentIndexToId(e)});return{opcode:T(t),argMap:r}})(e):(a.warn("Couldn't find SB2 block: ".concat(t)),null)},L=function e(t,n,r,i,s,c,u){const d=c&&"number"==typeof u&&!isNaN(u)?c[u]:null,h=P(t);if(!h)return d&&d.forEach((e=>{e.blockId=null,e.x=e.y=0})),[null,u+1];const m=t[0],f=h.opcode.indexOf("_"),g=h.opcode.substring(0,f);-1===w.indexOf(g)&&""!==g&&i.extensionIDs.add(g);const y={id:l(),opcode:h.opcode,inputs:{},fields:{},next:null,shadow:!1,children:[]};d&&(y.comment=d[d.length-1].id,d.forEach((e=>{e.id===y.comment?e.blockId=y.id:(e.blockId=null,e.x=e.y=0)}))),u++;const b=s.expectedArg;"call"===m&&(h.argMap=x(t[1]));for(let d=0;d<h.argMap.length;d++){const m=h.argMap[d],f=t[d+1];let g=!1;if("input"===m.type){const t=l();if(y.inputs[m.inputName]={name:m.inputName,block:null,shadow:null},"object"==typeof f&&f){let t;if(s.expectedArg=m,"object"==typeof f[0]&&f[0])[t,u]=C(f,n,r,i,s,c,u);else{const o=e(f,n,r,i,s,c,u);t=o[0]?[o[0]]:[],u=o[1]}if(s.expectedArg=b,t.length>0){let e=null;for(let n=0;n<t.length;n++)t[n].parent=0===n?y.id:e,e=t[n].id;y.inputs[m.inputName].block=t[0].id,y.children=y.children.concat(t)}g=!0}if(!m.inputOp){a.warn("Unknown input operation for input ".concat(m.inputName," of opcode ").concat(y.opcode,"."));continue}if("boolean"===m.inputOp||"substack"===m.inputOp)continue;let d=f,h=m.inputName;"math_number"===m.inputOp||"math_whole_number"===m.inputOp||"math_positive_number"===m.inputOp||"math_integer"===m.inputOp||"math_angle"===m.inputOp?(h="NUM",g&&(d=10)):"text"===m.inputOp?(h="TEXT",g&&(d="")):"colour_picker"===m.inputOp?(d=o.decimalToHex(f),h="COLOUR",g&&(d="#990000")):"event_broadcast_menu"===m.inputOp?(h="BROADCAST_OPTION",g&&(d="")):"sensing_of_object_menu"===m.inputOp?(g||"Stage"===d)&&(d="_stage_"):"note"===m.inputOp?g&&(d=60):"music.menu.DRUM"===m.inputOp||"music.menu.INSTRUMENT"===m.inputOp?g&&(d=1):"videoSensing.menu.ATTRIBUTE"===m.inputOp?g&&(d="motion"):"videoSensing.menu.SUBJECT"===m.inputOp?g&&(d="this sprite"):"videoSensing.menu.VIDEO_STATE"===m.inputOp?g&&(d="on"):g&&(d="");const p={};if(p[h]={name:h,value:d},"event_broadcast_menu"===m.inputOp){const e=n(d,p[h]);p[h].id=e,p[h].variableType=m.variableType}y.children.push({id:t,opcode:m.inputOp,inputs:{},fields:p,next:null,topLevel:!1,parent:y.id,shadow:!0}),y.inputs[m.inputName].shadow=t,y.inputs[m.inputName].block||(y.inputs[m.inputName].block=t)}else if("field"===m.type){if(y.fields[m.fieldName]={name:m.fieldName,value:f},"CURRENTMENU"===m.fieldName&&(y.fields[m.fieldName].value=f.toUpperCase(),"day of week"===f&&(y.fields[m.fieldName].value="DAYOFWEEK")),"VARIABLE"===m.fieldName)y.fields[m.fieldName].id=r(f,p.SCALAR_TYPE);else if("LIST"===m.fieldName)y.fields[m.fieldName].id=r(f,p.LIST_TYPE);else if("BROADCAST_OPTION"===m.fieldName){const e=n(f,y.fields[m.fieldName]);y.fields[m.fieldName].id=e}const e=m.variableType;"string"==typeof e&&(y.fields[m.fieldName].variableType=e)}}switch(m){case"comeToFront":y.fields.FRONT_BACK={name:"FRONT_BACK",value:"front"};break;case"goBackByLayers:":y.fields.FORWARD_BACKWARD={name:"FORWARD_BACKWARD",value:"backward"};break;case"backgroundIndex":case"costumeIndex":y.fields.NUMBER_NAME={name:"NUMBER_NAME",value:"number"};break;case"sceneName":case"costumeName":y.fields.NUMBER_NAME={name:"NUMBER_NAME",value:"name"}}if("stopScripts"===m)"other scripts in sprite"!==t[1]&&"other scripts in stage"!==t[1]||(y.mutation={tagName:"mutation",hasnext:"true",children:[]});else if("procDef"===m){const e=t.slice(1),n=l(),r="custom_block";y.inputs[r]={name:r,block:n,shadow:n},y.children=[{id:n,opcode:"procedures_prototype",inputs:{},fields:{},next:null,shadow:!0,children:[],mutation:{tagName:"mutation",proccode:e[0],argumentnames:JSON.stringify(e[1]),argumentids:JSON.stringify(E(e[0])),argumentdefaults:JSON.stringify(e[2]),warp:e[3],children:[]}}]}else if("call"===m)y.mutation={tagName:"mutation",children:[],proccode:t[1],argumentids:JSON.stringify(E(t[1]))};else if("getParam"===m){let e=t[2];switch(b&&"boolean"===b.inputOp&&"b"!==e&&(e="b"),e){case"r":y.opcode="argument_reporter_string_number";break;case"b":y.opcode="argument_reporter_boolean"}}return[y,u]};e.exports={deserialize:function(e,t,n,r){const i={extensionIDs:new Set,extensionURLs:new Map};return Promise.resolve(N(e,t,!n,r)).then((e=>Promise.resolve(e))).then((s=>R(e,t,i,!n,r,s))).then(D).then((e=>({targets:e,extensions:i})))}}},function(e,t,n){const r=n(377);e.exports=r},function(e,t){class n{constructor(){this.left=-1/0,this.right=1/0,this.bottom=-1/0,this.top=1/0}initFromBounds(e,t,n,r){this.left=e,this.right=t,this.bottom=n,this.top=r}initFromPointsAABB(e){this.left=1/0,this.right=-1/0,this.top=-1/0,this.bottom=1/0;for(let t=0;t<e.length;t++){const n=e[t][0],r=e[t][1];n<this.left&&(this.left=n),n>this.right&&(this.right=n),r>this.top&&(this.top=r),r<this.bottom&&(this.bottom=r)}}initFromModelMatrix(e){const t=e[12],n=e[13],r=Math.abs(.5*e[0])+Math.abs(.5*e[4]),i=Math.abs(.5*e[1])+Math.abs(.5*e[5]);this.left=-r+t,this.right=r+t,this.top=i+n,this.bottom=-i+n}intersects(e){return this.left<=e.right&&e.left<=this.right&&this.top>=e.bottom&&e.top>=this.bottom}contains(e){return e.left>this.left&&e.right<this.right&&e.top<this.top&&e.bottom>this.bottom}clamp(e,t,n,r){this.left=Math.max(this.left,e),this.right=Math.min(this.right,t),this.bottom=Math.max(this.bottom,n),this.top=Math.min(this.top,r),this.left=Math.min(this.left,t),this.right=Math.max(this.right,e),this.bottom=Math.min(this.bottom,r),this.top=Math.max(this.top,n)}snapToInt(){this.left=Math.floor(this.left),this.right=Math.ceil(this.right),this.bottom=Math.floor(this.bottom),this.top=Math.ceil(this.top)}static intersect(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n;return r.left=Math.max(e.left,t.left),r.right=Math.min(e.right,t.right),r.top=Math.min(e.top,t.top),r.bottom=Math.max(e.bottom,t.bottom),r}static union(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n;return r.left=Math.min(e.left,t.left),r.right=Math.max(e.right,t.right),r.top=Math.max(e.top,t.top),r.bottom=Math.min(e.bottom,t.bottom),r}get width(){return Math.abs(this.left-this.right)}get height(){return Math.abs(this.top-this.bottom)}}e.exports=n},function(e,t,n){const r=n(11),{rgbToHsv:i,hsvToRgb:s}=n(388),o=n(29),a=.5,l=.5,c=[0,0,0];e.exports=class{static transformColor(e,t,n){if(0===t[3])return t;let r=e.enabledEffects;"number"==typeof n&&(r&=n);const a=e.getUniforms(),l=!!(r&o.EFFECT_INFO.color.mask),u=!!(r&o.EFFECT_INFO.brightness.mask);if(l||u){const e=t[3]/255;if(t[0]/=e,t[1]/=e,t[2]/=e,l){const e=i(t,c),n=.055,r=.09;e[2]<n?(e[0]=0,e[1]=1,e[2]=n):e[1]<r&&(e[0]=0,e[1]=r),e[0]=a.u_color+e[0]+1,s(e,t)}if(u){const e=255*a.u_brightness;t[0]+=e,t[1]+=e,t[2]+=e}t[0]*=e,t[1]*=e,t[2]*=e}return r&o.EFFECT_INFO.ghost.mask&&(t[0]*=a.u_ghost,t[1]*=a.u_ghost,t[2]*=a.u_ghost,t[3]*=a.u_ghost),t}static transformPoint(e,t,n){r.v3.copy(t,n);const i=e.enabledEffects,s=e.getUniforms();if(i&o.EFFECT_INFO.mosaic.mask&&(n[0]=s.u_mosaic*n[0]%1,n[1]=s.u_mosaic*n[1]%1),i&o.EFFECT_INFO.pixelate.mask){const t=e.skin.getUniforms(),r=t.u_skinSize[0]/s.u_pixelate,i=t.u_skinSize[1]/s.u_pixelate;n[0]=(Math.floor(n[0]*r)+a)/r,n[1]=(Math.floor(n[1]*i)+l)/i}if(i&o.EFFECT_INFO.whirl.mask){const e=.5,t=n[0]-a,r=n[1]-l,i=Math.sqrt(Math.pow(t,2)+Math.pow(r,2)),o=Math.max(1-i/e,0),c=s.u_whirl*o*o,u=Math.sin(c),d=Math.cos(c),h=d,p=-u,m=u,f=d;n[0]=h*t+m*r+a,n[1]=p*t+f*r+l}if(i&o.EFFECT_INFO.fisheye.mask){const e=(n[0]-a)/a,t=(n[1]-l)/l,r=Math.sqrt(e*e+t*t),i=Math.pow(Math.min(r,1),s.u_fisheye)*Math.max(1,r),o=e/r,c=t/r;n[0]=a+i*o*a,n[1]=l+i*c*l}return n}}},function(e,t,n){const r=n(30);r.enable(),e.exports=r("scratch-render")},function(e,t){e.exports=class{constructor(e){this._ctx=e,this._cache={}}beginMeasurementSession(){}endMeasurementSession(){}measureText(e){return this._cache[e]||(this._cache[e]=this._ctx.measureText(e).width),this._cache[e]}}},function(e,t,n){var r,i;i=n(394),r=function(){function e(e){var t,n,r;(t="function"==typeof e.readUInt32BE&&"function"==typeof e.slice)||e instanceof Uint8Array?(t?(this.highStart=e.readUInt32BE(0),this.errorValue=e.readUInt32BE(4),n=e.readUInt32BE(8),e=e.slice(12)):(r=new DataView(e.buffer),this.highStart=r.getUint32(0),this.errorValue=r.getUint32(4),n=r.getUint32(8),e=e.subarray(12)),e=i(e,new Uint8Array(n)),e=i(e,new Uint8Array(n)),this.data=new Uint32Array(e.buffer)):(this.data=e.data,this.highStart=e.highStart,this.errorValue=e.errorValue)}return 11,5,6,32,64,63,2,32,31,2048,32,2080,2080,32,2112,4,e.prototype.get=function(e){var t;return e<0||e>1114111?this.errorValue:e<55296||e>56319&&e<=65535?(t=(this.data[e>>5]<<2)+(31&e),this.data[t]):e<=65535?(t=(this.data[2048+(e-55296>>5)]<<2)+(31&e),this.data[t]):e<this.highStart?(t=this.data[2080+(e>>11)],t=((t=this.data[t+(e>>5&63)])<<2)+(31&e),this.data[t]):this.data[this.data.length-4]},e}(),e.exports=r},function(module,exports,__webpack_require__){var factory;window,factory=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="./src/index.js")}({"./node_modules/@babel/runtime/helpers/objectWithoutProperties.js":function(e,t,n){var r=n("./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js");e.exports=function(e,t){if(null==e)return{};var n,i,s=r(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js":function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(i[n]=e[n]);return i},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/arraybuffer-loader/lib/to-array-buffer.js":function(e,t,n){"use strict";(function(t){e.exports=function(e){for(var n="undefined"!=typeof window&&"function"==typeof window.atob?window.atob(e):t.from(e,"base64").toString("binary"),r=new Uint8Array(n.length),i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r.buffer}}).call(this,n("./node_modules/node-libs-browser/node_modules/buffer/index.js").Buffer)},"./node_modules/base64-js/index.js":function(e,t,n){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){for(var t,n=l(e),r=n[0],o=n[1],a=new s(function(e,t,n){return 3*(t+n)/4-n}(0,r,o)),c=0,u=o>0?r-4:r,d=0;d<u;d+=4)t=i[e.charCodeAt(d)]<<18|i[e.charCodeAt(d+1)]<<12|i[e.charCodeAt(d+2)]<<6|i[e.charCodeAt(d+3)],a[c++]=t>>16&255,a[c++]=t>>8&255,a[c++]=255&t;return 2===o&&(t=i[e.charCodeAt(d)]<<2|i[e.charCodeAt(d+1)]>>4,a[c++]=255&t),1===o&&(t=i[e.charCodeAt(d)]<<10|i[e.charCodeAt(d+1)]<<4|i[e.charCodeAt(d+2)]>>2,a[c++]=t>>8&255,a[c++]=255&t),a},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,s=[],o=16383,a=0,l=n-i;a<l;a+=o)s.push(c(e,a,a+o>l?l:a+o));return 1===i?(t=e[n-1],s.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],s.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),s.join("")};for(var r=[],i=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],i[o.charCodeAt(a)]=a;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){for(var i,s,o=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(r[(s=i)>>18&63]+r[s>>12&63]+r[s>>6&63]+r[63&s]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},"./node_modules/cross-fetch/dist/browser-ponyfill.js":function(e,t){var n="undefined"!=typeof self?self:this,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),s="FormData"in e,o="ArrayBuffer"in e;if(o)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function c(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function u(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function m(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function f(e){var t=new FileReader,n=m(t);return t.readAsArrayBuffer(e),n}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:s&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(f)}),this.text=function(){var e,t,n,r=p(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=m(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s&&(this.formData=function(){return this.text().then(S)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(e,t){e=c(e),t=u(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},h.prototype.delete=function(e){delete this.map[c(e)]},h.prototype.get=function(e){return e=c(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(c(e))},h.prototype.set=function(e,t){this.map[c(e)]=u(t)},h.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),d(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),d(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),d(e)},r&&(h.prototype[Symbol.iterator]=h.prototype.entries);var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function v(e,t){var n,r,i=(t=t||{}).body;if(e instanceof v){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new h(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),b.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function S(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},y.call(v.prototype),y.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var k=[301,302,303,307,308];w.redirect=function(e,t){if(-1===k.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function T(e,n){return new Promise((function(r,s){var o=new v(e,n);if(o.signal&&o.signal.aborted)return s(new t.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function l(){a.abort()}a.onload=function(){var e,t,n={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};n.url="responseURL"in a?a.responseURL:n.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;r(new w(i,n))},a.onerror=function(){s(new TypeError("Network request failed"))},a.ontimeout=function(){s(new TypeError("Network request failed"))},a.onabort=function(){s(new t.DOMException("Aborted","AbortError"))},a.open(o.method,o.url,!0),"include"===o.credentials?a.withCredentials=!0:"omit"===o.credentials&&(a.withCredentials=!1),"responseType"in a&&i&&(a.responseType="blob"),o.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",l),a.onreadystatechange=function(){4===a.readyState&&o.signal.removeEventListener("abort",l)}),a.send(void 0===o._bodyInit?null:o._bodyInit)}))}T.polyfill=!0,e.fetch||(e.fetch=T,e.Headers=h,e.Request=v,e.Response=w),t.Headers=h,t.Request=v,t.Response=w,t.fetch=T,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t},"./node_modules/fastestsmallesttextencoderdecoder/EncoderDecoderTogether.min.js":function(e,t,n){"use strict";(function(e){!function(e){function t(){}function n(){}var r=String.fromCharCode,i={}.toString,s=i.call(e.SharedArrayBuffer),o=i(),a=e.Uint8Array,l=a||Array,c=a?ArrayBuffer:l,u=c.isView||function(e){return e&&"length"in e},d=i.call(c.prototype);c=n.prototype;var h=e.TextEncoder,p=new(a?Uint16Array:l)(32);t.prototype.decode=function(e){if(!u(e)){var t=i.call(e);if(t!==d&&t!==s&&t!==o)throw TypeError("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");e=a?new l(e):e||[]}for(var n,c,h,m=t="",f=0,g=0|e.length,y=g-32|0,b=0,v=0,S=0,w=-1;f<g;){for(n=f<=y?32:g-f|0;S<n;f=f+1|0,S=S+1|0){switch((c=255&e[f])>>4){case 15:if(2!=(h=255&e[f=f+1|0])>>6||247<c){f=f-1|0;break}b=(7&c)<<6|63&h,v=5,c=256;case 14:b<<=6,b|=(15&c)<<6|63&(h=255&e[f=f+1|0]),v=2==h>>6?v+4|0:24,c=c+256&768;case 13:case 12:b<<=6,b|=(31&c)<<6|63&(h=255&e[f=f+1|0]),v=v+7|0,f<g&&2==h>>6&&b>>v&&1114112>b?(c=b,0<=(b=b-65536|0)&&(w=55296+(b>>10)|0,c=56320+(1023&b)|0,31>S?(p[S]=w,S=S+1|0,w=-1):(h=w,w=c,c=h))):(f=f-(c>>=8)-1|0,c=65533),b=v=0,n=f<=y?32:g-f|0;default:p[S]=c;continue;case 11:case 10:case 9:case 8:}p[S]=65533}if(m+=r(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],p[9],p[10],p[11],p[12],p[13],p[14],p[15],p[16],p[17],p[18],p[19],p[20],p[21],p[22],p[23],p[24],p[25],p[26],p[27],p[28],p[29],p[30],p[31]),32>S&&(m=m.slice(0,S-32|0)),f<g){if(p[0]=w,S=~w>>>31,w=-1,m.length<t.length)continue}else-1!==w&&(m+=r(w));t+=m,m=""}return t},c.encode=function(e){var t,n=0|(e=void 0===e?"":""+e).length,r=new l(8+(n<<1)|0),i=0,s=!a;for(t=0;t<n;t=t+1|0,i=i+1|0){var o=0|e.charCodeAt(t);if(127>=o)r[i]=o;else{if(2047>=o)r[i]=192|o>>6;else{e:{if(55296<=o)if(56319>=o){var c=0|e.charCodeAt(t=t+1|0);if(56320<=c&&57343>=c){if(65535<(o=(o<<10)+c-56613888|0)){r[i]=240|o>>18,r[i=i+1|0]=128|o>>12&63,r[i=i+1|0]=128|o>>6&63,r[i=i+1|0]=128|63&o;continue}break e}o=65533}else 57343>=o&&(o=65533);!s&&t<<1<i&&t<<1<(i-7|0)&&(s=!0,(c=new l(3*n)).set(r),r=c)}r[i]=224|o>>12,r[i=i+1|0]=128|o>>6&63}r[i=i+1|0]=128|63&o}}return a?r.subarray(0,i):r.slice(0,i)},h||(e.TextDecoder=t,e.TextEncoder=n)}(""+void 0==typeof e?""+void 0==typeof self?this:self:e)}).call(this,n("./node_modules/webpack/buildin/global.js"))},"./node_modules/ieee754/index.js":function(e,t){t.read=function(e,t,n,r,i){var s,o,a=8*i-r-1,l=(1<<a)-1,c=l>>1,u=-7,d=n?i-1:0,h=n?-1:1,p=e[t+d];for(d+=h,s=p&(1<<-u)-1,p>>=-u,u+=a;u>0;s=256*s+e[t+d],d+=h,u-=8);for(o=s&(1<<-u)-1,s>>=-u,u+=r;u>0;o=256*o+e[t+d],d+=h,u-=8);if(0===s)s=1-c;else{if(s===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,r),s-=c}return(p?-1:1)*o*Math.pow(2,s-r)},t.write=function(e,t,n,r,i,s){var o,a,l,c=8*s-i-1,u=(1<<c)-1,d=u>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:s-1,m=r?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=u?(a=0,o=u):o+d>=1?(a=(t*l-1)*Math.pow(2,i),o+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[n+p]=255&a,p+=m,a/=256,i-=8);for(o=o<<i|a,c+=i;c>0;e[n+p]=255&o,p+=m,o/=256,c-=8);e[n+p-m]|=128*f}},"./node_modules/js-md5/src/md5.js":function(module,exports,__webpack_require__){(function(process,global){var __WEBPACK_AMD_DEFINE_RESULT__;(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self,NODE_JS=!root.JS_MD5_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_MD5_NO_COMMON_JS&&"object"==typeof module&&module.exports,AMD=__webpack_require__("./node_modules/webpack/buildin/amd-options.js"),ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[128,32768,8388608,-2147483648],SHIFT=[0,8,16,24],OUTPUT_TYPES=["hex","array","digest","buffer","arrayBuffer","base64"],BASE64_ENCODE_CHAR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),blocks=[],buffer8;if(ARRAY_BUFFER){var buffer=new ArrayBuffer(68);buffer8=new Uint8Array(buffer),blocks=new Uint32Array(buffer)}!root.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!ARRAY_BUFFER||!root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e){return function(t){return new Md5(!0).update(t)[e]()}},createMethod=function(){var e=createOutputMethod("hex");NODE_JS&&(e=nodeWrap(e)),e.create=function(){return new Md5},e.update=function(t){return e.create().update(t)};for(var t=0;t<OUTPUT_TYPES.length;++t){var n=OUTPUT_TYPES[t];e[n]=createOutputMethod(n)}return e},nodeWrap=function(method){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),nodeMethod=function(e){if("string"==typeof e)return crypto.createHash("md5").update(e,"utf8").digest("hex");if(null==e)throw ERROR;return e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),Array.isArray(e)||ArrayBuffer.isView(e)||e.constructor===Buffer?crypto.createHash("md5").update(new Buffer(e)).digest("hex"):method(e)};return nodeMethod};function Md5(e){if(e)blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks,this.buffer8=buffer8;else if(ARRAY_BUFFER){var t=new ArrayBuffer(68);this.buffer8=new Uint8Array(t),this.blocks=new Uint32Array(t)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}Md5.prototype.update=function(e){if(!this.finalized){var t,n=typeof e;if("string"!==n){if("object"!==n)throw ERROR;if(null===e)throw ERROR;if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||ARRAY_BUFFER&&ArrayBuffer.isView(e)))throw ERROR;t=!0}for(var r,i,s=0,o=e.length,a=this.blocks,l=this.buffer8;s<o;){if(this.hashed&&(this.hashed=!1,a[0]=a[16],a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),t)if(ARRAY_BUFFER)for(i=this.start;s<o&&i<64;++s)l[i++]=e[s];else for(i=this.start;s<o&&i<64;++s)a[i>>2]|=e[s]<<SHIFT[3&i++];else if(ARRAY_BUFFER)for(i=this.start;s<o&&i<64;++s)(r=e.charCodeAt(s))<128?l[i++]=r:r<2048?(l[i++]=192|r>>6,l[i++]=128|63&r):r<55296||r>=57344?(l[i++]=224|r>>12,l[i++]=128|r>>6&63,l[i++]=128|63&r):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++s)),l[i++]=240|r>>18,l[i++]=128|r>>12&63,l[i++]=128|r>>6&63,l[i++]=128|63&r);else for(i=this.start;s<o&&i<64;++s)(r=e.charCodeAt(s))<128?a[i>>2]|=r<<SHIFT[3&i++]:r<2048?(a[i>>2]|=(192|r>>6)<<SHIFT[3&i++],a[i>>2]|=(128|63&r)<<SHIFT[3&i++]):r<55296||r>=57344?(a[i>>2]|=(224|r>>12)<<SHIFT[3&i++],a[i>>2]|=(128|r>>6&63)<<SHIFT[3&i++],a[i>>2]|=(128|63&r)<<SHIFT[3&i++]):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++s)),a[i>>2]|=(240|r>>18)<<SHIFT[3&i++],a[i>>2]|=(128|r>>12&63)<<SHIFT[3&i++],a[i>>2]|=(128|r>>6&63)<<SHIFT[3&i++],a[i>>2]|=(128|63&r)<<SHIFT[3&i++]);this.lastByteIndex=i,this.bytes+=i-this.start,i>=64?(this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[t>>2]|=EXTRA[3&t],t>=56&&(this.hashed||this.hash(),e[0]=e[16],e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.bytes<<3,e[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var e,t,n,r,i,s,o=this.blocks;this.first?t=((t=((e=((e=o[0]-680876937)<<7|e>>>25)-271733879|0)^(n=((n=(-271733879^(r=((r=(-1732584194^2004318071&e)+o[1]-117830708)<<12|r>>>20)+e|0)&(-271733879^e))+o[2]-1126478375)<<17|n>>>15)+r|0)&(r^e))+o[3]-1316259209)<<22|t>>>10)+n|0:(e=this.h0,t=this.h1,n=this.h2,t=((t+=((e=((e+=((r=this.h3)^t&(n^r))+o[0]-680876936)<<7|e>>>25)+t|0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+o[1]-389564586)<<12|r>>>20)+e|0)&(e^t))+o[2]+606105819)<<17|n>>>15)+r|0)&(r^e))+o[3]-1044525330)<<22|t>>>10)+n|0),t=((t+=((e=((e+=(r^t&(n^r))+o[4]-176418897)<<7|e>>>25)+t|0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+o[5]+1200080426)<<12|r>>>20)+e|0)&(e^t))+o[6]-1473231341)<<17|n>>>15)+r|0)&(r^e))+o[7]-45705983)<<22|t>>>10)+n|0,t=((t+=((e=((e+=(r^t&(n^r))+o[8]+1770035416)<<7|e>>>25)+t|0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+o[9]-1958414417)<<12|r>>>20)+e|0)&(e^t))+o[10]-42063)<<17|n>>>15)+r|0)&(r^e))+o[11]-1990404162)<<22|t>>>10)+n|0,t=((t+=((e=((e+=(r^t&(n^r))+o[12]+1804603682)<<7|e>>>25)+t|0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+o[13]-40341101)<<12|r>>>20)+e|0)&(e^t))+o[14]-1502002290)<<17|n>>>15)+r|0)&(r^e))+o[15]+1236535329)<<22|t>>>10)+n|0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+o[1]-165796510)<<5|e>>>27)+t|0)^t))+o[6]-1069501632)<<9|r>>>23)+e|0)^e&((n=((n+=(e^t&(r^e))+o[11]+643717713)<<14|n>>>18)+r|0)^r))+o[0]-373897302)<<20|t>>>12)+n|0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+o[5]-701558691)<<5|e>>>27)+t|0)^t))+o[10]+38016083)<<9|r>>>23)+e|0)^e&((n=((n+=(e^t&(r^e))+o[15]-660478335)<<14|n>>>18)+r|0)^r))+o[4]-405537848)<<20|t>>>12)+n|0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+o[9]+568446438)<<5|e>>>27)+t|0)^t))+o[14]-1019803690)<<9|r>>>23)+e|0)^e&((n=((n+=(e^t&(r^e))+o[3]-187363961)<<14|n>>>18)+r|0)^r))+o[8]+1163531501)<<20|t>>>12)+n|0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+o[13]-1444681467)<<5|e>>>27)+t|0)^t))+o[2]-51403784)<<9|r>>>23)+e|0)^e&((n=((n+=(e^t&(r^e))+o[7]+1735328473)<<14|n>>>18)+r|0)^r))+o[12]-1926607734)<<20|t>>>12)+n|0,t=((t+=((s=(r=((r+=((i=t^n)^(e=((e+=(i^r)+o[5]-378558)<<4|e>>>28)+t|0))+o[8]-2022574463)<<11|r>>>21)+e|0)^e)^(n=((n+=(s^t)+o[11]+1839030562)<<16|n>>>16)+r|0))+o[14]-35309556)<<23|t>>>9)+n|0,t=((t+=((s=(r=((r+=((i=t^n)^(e=((e+=(i^r)+o[1]-1530992060)<<4|e>>>28)+t|0))+o[4]+1272893353)<<11|r>>>21)+e|0)^e)^(n=((n+=(s^t)+o[7]-155497632)<<16|n>>>16)+r|0))+o[10]-1094730640)<<23|t>>>9)+n|0,t=((t+=((s=(r=((r+=((i=t^n)^(e=((e+=(i^r)+o[13]+681279174)<<4|e>>>28)+t|0))+o[0]-358537222)<<11|r>>>21)+e|0)^e)^(n=((n+=(s^t)+o[3]-722521979)<<16|n>>>16)+r|0))+o[6]+76029189)<<23|t>>>9)+n|0,t=((t+=((s=(r=((r+=((i=t^n)^(e=((e+=(i^r)+o[9]-640364487)<<4|e>>>28)+t|0))+o[12]-421815835)<<11|r>>>21)+e|0)^e)^(n=((n+=(s^t)+o[15]+530742520)<<16|n>>>16)+r|0))+o[2]-995338651)<<23|t>>>9)+n|0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+o[0]-198630844)<<6|e>>>26)+t|0)|~n))+o[7]+1126891415)<<10|r>>>22)+e|0)^((n=((n+=(e^(r|~t))+o[14]-1416354905)<<15|n>>>17)+r|0)|~e))+o[5]-57434055)<<21|t>>>11)+n|0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+o[12]+1700485571)<<6|e>>>26)+t|0)|~n))+o[3]-1894986606)<<10|r>>>22)+e|0)^((n=((n+=(e^(r|~t))+o[10]-1051523)<<15|n>>>17)+r|0)|~e))+o[1]-2054922799)<<21|t>>>11)+n|0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+o[8]+1873313359)<<6|e>>>26)+t|0)|~n))+o[15]-30611744)<<10|r>>>22)+e|0)^((n=((n+=(e^(r|~t))+o[6]-1560198380)<<15|n>>>17)+r|0)|~e))+o[13]+1309151649)<<21|t>>>11)+n|0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+o[4]-145523070)<<6|e>>>26)+t|0)|~n))+o[11]-1120210379)<<10|r>>>22)+e|0)^((n=((n+=(e^(r|~t))+o[2]+718787259)<<15|n>>>17)+r|0)|~e))+o[9]-343485551)<<21|t>>>11)+n|0,this.first?(this.h0=e+1732584193|0,this.h1=t-271733879|0,this.h2=n-1732584194|0,this.h3=r+271733878|0,this.first=!1):(this.h0=this.h0+e|0,this.h1=this.h1+t|0,this.h2=this.h2+n|0,this.h3=this.h3+r|0)},Md5.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3;return HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3;return[255&e,e>>8&255,e>>16&255,e>>24&255,255&t,t>>8&255,t>>16&255,t>>24&255,255&n,n>>8&255,n>>16&255,n>>24&255,255&r,r>>8&255,r>>16&255,r>>24&255]},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(16),t=new Uint32Array(e);return t[0]=this.h0,t[1]=this.h1,t[2]=this.h2,t[3]=this.h3,e},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var e,t,n,r="",i=this.array(),s=0;s<15;)e=i[s++],t=i[s++],n=i[s++],r+=BASE64_ENCODE_CHAR[e>>>2]+BASE64_ENCODE_CHAR[63&(e<<4|t>>>4)]+BASE64_ENCODE_CHAR[63&(t<<2|n>>>6)]+BASE64_ENCODE_CHAR[63&n];return e=i[s],r+=BASE64_ENCODE_CHAR[e>>>2]+BASE64_ENCODE_CHAR[e<<4&63]+"=="};var exports=createMethod();COMMON_JS?module.exports=exports:(root.md5=exports,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()}).call(this,__webpack_require__("./node_modules/process/browser.js"),__webpack_require__("./node_modules/webpack/buildin/global.js"))},"./node_modules/node-libs-browser/node_modules/buffer/index.js":function(e,t,n){"use strict";(function(e){var r=n("./node_modules/base64-js/index.js"),i=n("./node_modules/ieee754/index.js"),s=n("./node_modules/node-libs-browser/node_modules/isarray/index.js");function o(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(o()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=h(e,t),e}(e,t,n,r):"string"==typeof t?function(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|m(t,n),i=(e=a(e,r)).write(t,n);return i!==r&&(e=e.slice(0,i)),e}(e,t,n):function(e,t){if(l.isBuffer(t)){var n=0|p(t.length);return 0===(e=a(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?a(e,0):h(e,t);if("Buffer"===t.type&&s(t.data))return h(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(u(t),e=a(e,t<0?0:0|p(t)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|p(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function m(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function f(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return M(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return I(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return E(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){var s,o=1,a=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,a/=2,l/=2,n/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var u=-1;for(s=n;s<a;s++)if(c(e,s)===c(t,-1===u?0:s-u)){if(-1===u&&(u=s),s-u+1===l)return u*o}else-1!==u&&(s-=s-u),u=-1}else for(n+l>a&&(n=a-l),s=n;s>=0;s--){for(var d=!0,h=0;h<l;h++)if(c(e,s+h)!==c(t,h)){d=!1;break}if(d)return s}return-1}function v(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");r>s/2&&(r=s/2);for(var o=0;o<r;++o){var a=parseInt(t.substr(2*o,2),16);if(isNaN(a))return o;e[n+o]=a}return o}function S(e,t,n,r){return V(F(t,e.length-n),e,n,r)}function w(e,t,n,r){return V(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function k(e,t,n,r){return w(e,t,n,r)}function T(e,t,n,r){return V(W(t),e,n,r)}function x(e,t,n,r){return V(function(e,t){for(var n,r,i,s=[],o=0;o<e.length&&!((t-=2)<0);++o)r=(n=e.charCodeAt(o))>>8,i=n%256,s.push(i),s.push(r);return s}(t,e.length-n),e,n,r)}function E(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var s,o,a,l,c=e[i],u=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(s=e[i+1]))&&(l=(31&c)<<6|63&s)>127&&(u=l);break;case 3:s=e[i+1],o=e[i+2],128==(192&s)&&128==(192&o)&&(l=(15&c)<<12|(63&s)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:s=e[i+1],o=e[i+2],a=e[i+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&(l=(15&c)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=d}return function(e){var t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=C));return n}(r)}t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=o(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,n){return c(null,e,t,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,n){return function(e,t,n,r){return u(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}(null,e,t,n)},l.allocUnsafe=function(e){return d(null,e)},l.allocUnsafeSlow=function(e){return d(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,s=Math.min(n,r);i<s;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!s(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=l.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!l.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},l.byteLength=m,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?A(this,0,e):f.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},l.prototype.compare=function(e,t,n,r,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var s=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),a=Math.min(s,o),c=this.slice(r,i),u=e.slice(t,n),d=0;d<a;++d)if(c[d]!==u[d]){s=c[d],o=u[d];break}return s<o?-1:o<s?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},l.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return S(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return k(this,e,t,n);case"base64":return T(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function I(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function O(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function M(e,t,n){var r,i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var s="",o=t;o<n;++o)s+=(r=e[o])<16?"0"+r.toString(16):r.toString(16);return s}function N(e,t,n){for(var r=e.slice(t,n),i="",s=0;s<r.length;s+=2)i+=String.fromCharCode(r[s]+256*r[s+1]);return i}function R(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,i,s){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function P(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,s=Math.min(e.length-n,2);i<s;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function L(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,s=Math.min(e.length-n,4);i<s;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function B(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function z(e,t,n,r,s){return s||B(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,s){return s||B(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=l.prototype;else{var i=t-e;n=new l(i,void 0);for(var s=0;s<i;++s)n[s]=this[s+e]}return n},l.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],i=1,s=0;++s<t&&(i*=256);)r+=this[e+s]*i;return r},l.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],i=1,s=0;++s<t&&(i*=256);)r+=this[e+s]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=t,i=1,s=this[e+--r];r>0&&(i*=256);)s+=this[e+--r]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},l.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||D(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,s=0;for(this[t]=255&e;++s<n&&(i*=256);)this[t+s]=e/i&255;return t+n},l.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||D(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s<n&&(o*=256);)e<0&&0===a&&0!==this[t+s-1]&&(a=1),this[t+s]=(e/o|0)-a&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var s=n-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o|0)-a&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return z(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return z(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,s=r-n;if(this===e&&n<t&&t<r)for(i=s-1;i>=0;--i)e[i+t]=this[i+n];else if(s<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i<s;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+s),t);return s},l.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var s;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(s=t;s<n;++s)this[s]=e;else{var o=l.isBuffer(e)?e:F(new l(e,r).toString()),a=o.length;for(s=0;s<n-t;++s)this[s+t]=o[s%a]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function F(e,t){var n;t=t||1/0;for(var r=e.length,i=null,s=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function W(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n("./node_modules/webpack/buildin/global.js"))},"./node_modules/node-libs-browser/node_modules/isarray/index.js":function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},"./node_modules/process/browser.js":function(e,t){var n,r,i=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(e){n=s}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var l,c=[],u=!1,d=-1;function h(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&p())}function p(){if(!u){var e=a(h);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function f(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new m(e,t)),1!==c.length||u||a(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=f,i.addListener=f,i.once=f,i.off=f,i.removeListener=f,i.removeAllListeners=f,i.emit=f,i.prependListener=f,i.prependOnceListener=f,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},"./node_modules/webpack/buildin/amd-options.js":function(e,t){(function(t){e.exports=t}).call(this,{})},"./node_modules/webpack/buildin/global.js":function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},'./node_modules/worker-loader/dist/cjs.js?{"inline":true,"fallback":true}!./src/FetchWorkerTool.worker.js':function(e,t,n){e.exports=function(){return n("./node_modules/worker-loader/dist/workers/InlineWorker.js")("/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = \"./node_modules/babel-loader/lib/index.js?!./src/FetchWorkerTool.worker.js\");\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ \"./node_modules/babel-loader/lib/index.js?!./src/FetchWorkerTool.worker.js\":\n/*!*******************************************************************************!*\\\n  !*** ./node_modules/babel-loader/lib??ref--4!./src/FetchWorkerTool.worker.js ***!\n  \\*******************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* eslint-env worker */\n\nconst isNullResponse = __webpack_require__(/*! ./isNullResponse */ \"./src/isNullResponse.js\");\nconst saferFetch = __webpack_require__(/*! ./safer-fetch */ \"./src/safer-fetch.js\");\nconst complete = [];\nlet timeoutId = null;\nconst checkCompleted = () => {\n  if (timeoutId) return;\n  timeoutId = setTimeout(() => {\n    timeoutId = null;\n    if (complete.length) {\n      // Send our chunk of completed requests and instruct postMessage to\n      // transfer the buffers instead of copying them.\n      postMessage(complete.slice(),\n      // Instruct postMessage that these buffers in the sent message\n      // should use their Transferable trait. After the postMessage\n      // call the \"buffers\" will still be in complete if you looked,\n      // but they will all be length 0 as the data they reference has\n      // been sent to the window. This lets us send a lot of data\n      // without the normal postMessage behaviour of making a copy of\n      // all of the data for the window.\n      complete.map(response => response.buffer).filter(Boolean));\n      complete.length = 0;\n    }\n  });\n};\n\n/**\n * Receive a job from the parent and fetch the requested data.\n * @param {object} options.job A job id, url, and options descriptor to perform.\n */\nconst onMessage = _ref => {\n  let {\n    data: job\n  } = _ref;\n  saferFetch(job.url, job.options).then(result => {\n    if (result.ok) return result.arrayBuffer();\n    if (isNullResponse(result)) return null;\n    return Promise.reject(result.status);\n  }).then(buffer => complete.push({\n    id: job.id,\n    buffer\n  })).catch(error => complete.push({\n    id: job.id,\n    error: error && error.message || \"Failed request: \".concat(job.url)\n  })).then(checkCompleted);\n};\n\n// crossFetch means \"fetch\" is now always supported\npostMessage({\n  support: {\n    fetch: true\n  }\n});\nself.addEventListener('message', onMessage);\n\n/***/ }),\n\n/***/ \"./node_modules/cross-fetch/dist/browser-ponyfill.js\":\n/*!***********************************************************!*\\\n  !*** ./node_modules/cross-fetch/dist/browser-ponyfill.js ***!\n  \\***********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nvar global = typeof self !== 'undefined' ? self : this;\nvar __self__ = (function () {\nfunction F() {\nthis.fetch = false;\nthis.DOMException = global.DOMException\n}\nF.prototype = global;\nreturn new F();\n})();\n(function(self) {\n\nvar irrelevant = (function (exports) {\n\n  var support = {\n    searchParams: 'URLSearchParams' in self,\n    iterable: 'Symbol' in self && 'iterator' in Symbol,\n    blob:\n      'FileReader' in self &&\n      'Blob' in self &&\n      (function() {\n        try {\n          new Blob();\n          return true\n        } catch (e) {\n          return false\n        }\n      })(),\n    formData: 'FormData' in self,\n    arrayBuffer: 'ArrayBuffer' in self\n  };\n\n  function isDataView(obj) {\n    return obj && DataView.prototype.isPrototypeOf(obj)\n  }\n\n  if (support.arrayBuffer) {\n    var viewClasses = [\n      '[object Int8Array]',\n      '[object Uint8Array]',\n      '[object Uint8ClampedArray]',\n      '[object Int16Array]',\n      '[object Uint16Array]',\n      '[object Int32Array]',\n      '[object Uint32Array]',\n      '[object Float32Array]',\n      '[object Float64Array]'\n    ];\n\n    var isArrayBufferView =\n      ArrayBuffer.isView ||\n      function(obj) {\n        return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n      };\n  }\n\n  function normalizeName(name) {\n    if (typeof name !== 'string') {\n      name = String(name);\n    }\n    if (/[^a-z0-9\\-#$%&'*+.^_`|~]/i.test(name)) {\n      throw new TypeError('Invalid character in header field name')\n    }\n    return name.toLowerCase()\n  }\n\n  function normalizeValue(value) {\n    if (typeof value !== 'string') {\n      value = String(value);\n    }\n    return value\n  }\n\n  // Build a destructive iterator for the value list\n  function iteratorFor(items) {\n    var iterator = {\n      next: function() {\n        var value = items.shift();\n        return {done: value === undefined, value: value}\n      }\n    };\n\n    if (support.iterable) {\n      iterator[Symbol.iterator] = function() {\n        return iterator\n      };\n    }\n\n    return iterator\n  }\n\n  function Headers(headers) {\n    this.map = {};\n\n    if (headers instanceof Headers) {\n      headers.forEach(function(value, name) {\n        this.append(name, value);\n      }, this);\n    } else if (Array.isArray(headers)) {\n      headers.forEach(function(header) {\n        this.append(header[0], header[1]);\n      }, this);\n    } else if (headers) {\n      Object.getOwnPropertyNames(headers).forEach(function(name) {\n        this.append(name, headers[name]);\n      }, this);\n    }\n  }\n\n  Headers.prototype.append = function(name, value) {\n    name = normalizeName(name);\n    value = normalizeValue(value);\n    var oldValue = this.map[name];\n    this.map[name] = oldValue ? oldValue + ', ' + value : value;\n  };\n\n  Headers.prototype['delete'] = function(name) {\n    delete this.map[normalizeName(name)];\n  };\n\n  Headers.prototype.get = function(name) {\n    name = normalizeName(name);\n    return this.has(name) ? this.map[name] : null\n  };\n\n  Headers.prototype.has = function(name) {\n    return this.map.hasOwnProperty(normalizeName(name))\n  };\n\n  Headers.prototype.set = function(name, value) {\n    this.map[normalizeName(name)] = normalizeValue(value);\n  };\n\n  Headers.prototype.forEach = function(callback, thisArg) {\n    for (var name in this.map) {\n      if (this.map.hasOwnProperty(name)) {\n        callback.call(thisArg, this.map[name], name, this);\n      }\n    }\n  };\n\n  Headers.prototype.keys = function() {\n    var items = [];\n    this.forEach(function(value, name) {\n      items.push(name);\n    });\n    return iteratorFor(items)\n  };\n\n  Headers.prototype.values = function() {\n    var items = [];\n    this.forEach(function(value) {\n      items.push(value);\n    });\n    return iteratorFor(items)\n  };\n\n  Headers.prototype.entries = function() {\n    var items = [];\n    this.forEach(function(value, name) {\n      items.push([name, value]);\n    });\n    return iteratorFor(items)\n  };\n\n  if (support.iterable) {\n    Headers.prototype[Symbol.iterator] = Headers.prototype.entries;\n  }\n\n  function consumed(body) {\n    if (body.bodyUsed) {\n      return Promise.reject(new TypeError('Already read'))\n    }\n    body.bodyUsed = true;\n  }\n\n  function fileReaderReady(reader) {\n    return new Promise(function(resolve, reject) {\n      reader.onload = function() {\n        resolve(reader.result);\n      };\n      reader.onerror = function() {\n        reject(reader.error);\n      };\n    })\n  }\n\n  function readBlobAsArrayBuffer(blob) {\n    var reader = new FileReader();\n    var promise = fileReaderReady(reader);\n    reader.readAsArrayBuffer(blob);\n    return promise\n  }\n\n  function readBlobAsText(blob) {\n    var reader = new FileReader();\n    var promise = fileReaderReady(reader);\n    reader.readAsText(blob);\n    return promise\n  }\n\n  function readArrayBufferAsText(buf) {\n    var view = new Uint8Array(buf);\n    var chars = new Array(view.length);\n\n    for (var i = 0; i < view.length; i++) {\n      chars[i] = String.fromCharCode(view[i]);\n    }\n    return chars.join('')\n  }\n\n  function bufferClone(buf) {\n    if (buf.slice) {\n      return buf.slice(0)\n    } else {\n      var view = new Uint8Array(buf.byteLength);\n      view.set(new Uint8Array(buf));\n      return view.buffer\n    }\n  }\n\n  function Body() {\n    this.bodyUsed = false;\n\n    this._initBody = function(body) {\n      this._bodyInit = body;\n      if (!body) {\n        this._bodyText = '';\n      } else if (typeof body === 'string') {\n        this._bodyText = body;\n      } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n        this._bodyBlob = body;\n      } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n        this._bodyFormData = body;\n      } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n        this._bodyText = body.toString();\n      } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n        this._bodyArrayBuffer = bufferClone(body.buffer);\n        // IE 10-11 can't handle a DataView body.\n        this._bodyInit = new Blob([this._bodyArrayBuffer]);\n      } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n        this._bodyArrayBuffer = bufferClone(body);\n      } else {\n        this._bodyText = body = Object.prototype.toString.call(body);\n      }\n\n      if (!this.headers.get('content-type')) {\n        if (typeof body === 'string') {\n          this.headers.set('content-type', 'text/plain;charset=UTF-8');\n        } else if (this._bodyBlob && this._bodyBlob.type) {\n          this.headers.set('content-type', this._bodyBlob.type);\n        } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n          this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n        }\n      }\n    };\n\n    if (support.blob) {\n      this.blob = function() {\n        var rejected = consumed(this);\n        if (rejected) {\n          return rejected\n        }\n\n        if (this._bodyBlob) {\n          return Promise.resolve(this._bodyBlob)\n        } else if (this._bodyArrayBuffer) {\n          return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n        } else if (this._bodyFormData) {\n          throw new Error('could not read FormData body as blob')\n        } else {\n          return Promise.resolve(new Blob([this._bodyText]))\n        }\n      };\n\n      this.arrayBuffer = function() {\n        if (this._bodyArrayBuffer) {\n          return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n        } else {\n          return this.blob().then(readBlobAsArrayBuffer)\n        }\n      };\n    }\n\n    this.text = function() {\n      var rejected = consumed(this);\n      if (rejected) {\n        return rejected\n      }\n\n      if (this._bodyBlob) {\n        return readBlobAsText(this._bodyBlob)\n      } else if (this._bodyArrayBuffer) {\n        return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n      } else if (this._bodyFormData) {\n        throw new Error('could not read FormData body as text')\n      } else {\n        return Promise.resolve(this._bodyText)\n      }\n    };\n\n    if (support.formData) {\n      this.formData = function() {\n        return this.text().then(decode)\n      };\n    }\n\n    this.json = function() {\n      return this.text().then(JSON.parse)\n    };\n\n    return this\n  }\n\n  // HTTP methods whose capitalization should be normalized\n  var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];\n\n  function normalizeMethod(method) {\n    var upcased = method.toUpperCase();\n    return methods.indexOf(upcased) > -1 ? upcased : method\n  }\n\n  function Request(input, options) {\n    options = options || {};\n    var body = options.body;\n\n    if (input instanceof Request) {\n      if (input.bodyUsed) {\n        throw new TypeError('Already read')\n      }\n      this.url = input.url;\n      this.credentials = input.credentials;\n      if (!options.headers) {\n        this.headers = new Headers(input.headers);\n      }\n      this.method = input.method;\n      this.mode = input.mode;\n      this.signal = input.signal;\n      if (!body && input._bodyInit != null) {\n        body = input._bodyInit;\n        input.bodyUsed = true;\n      }\n    } else {\n      this.url = String(input);\n    }\n\n    this.credentials = options.credentials || this.credentials || 'same-origin';\n    if (options.headers || !this.headers) {\n      this.headers = new Headers(options.headers);\n    }\n    this.method = normalizeMethod(options.method || this.method || 'GET');\n    this.mode = options.mode || this.mode || null;\n    this.signal = options.signal || this.signal;\n    this.referrer = null;\n\n    if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n      throw new TypeError('Body not allowed for GET or HEAD requests')\n    }\n    this._initBody(body);\n  }\n\n  Request.prototype.clone = function() {\n    return new Request(this, {body: this._bodyInit})\n  };\n\n  function decode(body) {\n    var form = new FormData();\n    body\n      .trim()\n      .split('&')\n      .forEach(function(bytes) {\n        if (bytes) {\n          var split = bytes.split('=');\n          var name = split.shift().replace(/\\+/g, ' ');\n          var value = split.join('=').replace(/\\+/g, ' ');\n          form.append(decodeURIComponent(name), decodeURIComponent(value));\n        }\n      });\n    return form\n  }\n\n  function parseHeaders(rawHeaders) {\n    var headers = new Headers();\n    // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n    // https://tools.ietf.org/html/rfc7230#section-3.2\n    var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ');\n    preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n      var parts = line.split(':');\n      var key = parts.shift().trim();\n      if (key) {\n        var value = parts.join(':').trim();\n        headers.append(key, value);\n      }\n    });\n    return headers\n  }\n\n  Body.call(Request.prototype);\n\n  function Response(bodyInit, options) {\n    if (!options) {\n      options = {};\n    }\n\n    this.type = 'default';\n    this.status = options.status === undefined ? 200 : options.status;\n    this.ok = this.status >= 200 && this.status < 300;\n    this.statusText = 'statusText' in options ? options.statusText : 'OK';\n    this.headers = new Headers(options.headers);\n    this.url = options.url || '';\n    this._initBody(bodyInit);\n  }\n\n  Body.call(Response.prototype);\n\n  Response.prototype.clone = function() {\n    return new Response(this._bodyInit, {\n      status: this.status,\n      statusText: this.statusText,\n      headers: new Headers(this.headers),\n      url: this.url\n    })\n  };\n\n  Response.error = function() {\n    var response = new Response(null, {status: 0, statusText: ''});\n    response.type = 'error';\n    return response\n  };\n\n  var redirectStatuses = [301, 302, 303, 307, 308];\n\n  Response.redirect = function(url, status) {\n    if (redirectStatuses.indexOf(status) === -1) {\n      throw new RangeError('Invalid status code')\n    }\n\n    return new Response(null, {status: status, headers: {location: url}})\n  };\n\n  exports.DOMException = self.DOMException;\n  try {\n    new exports.DOMException();\n  } catch (err) {\n    exports.DOMException = function(message, name) {\n      this.message = message;\n      this.name = name;\n      var error = Error(message);\n      this.stack = error.stack;\n    };\n    exports.DOMException.prototype = Object.create(Error.prototype);\n    exports.DOMException.prototype.constructor = exports.DOMException;\n  }\n\n  function fetch(input, init) {\n    return new Promise(function(resolve, reject) {\n      var request = new Request(input, init);\n\n      if (request.signal && request.signal.aborted) {\n        return reject(new exports.DOMException('Aborted', 'AbortError'))\n      }\n\n      var xhr = new XMLHttpRequest();\n\n      function abortXhr() {\n        xhr.abort();\n      }\n\n      xhr.onload = function() {\n        var options = {\n          status: xhr.status,\n          statusText: xhr.statusText,\n          headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n        };\n        options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');\n        var body = 'response' in xhr ? xhr.response : xhr.responseText;\n        resolve(new Response(body, options));\n      };\n\n      xhr.onerror = function() {\n        reject(new TypeError('Network request failed'));\n      };\n\n      xhr.ontimeout = function() {\n        reject(new TypeError('Network request failed'));\n      };\n\n      xhr.onabort = function() {\n        reject(new exports.DOMException('Aborted', 'AbortError'));\n      };\n\n      xhr.open(request.method, request.url, true);\n\n      if (request.credentials === 'include') {\n        xhr.withCredentials = true;\n      } else if (request.credentials === 'omit') {\n        xhr.withCredentials = false;\n      }\n\n      if ('responseType' in xhr && support.blob) {\n        xhr.responseType = 'blob';\n      }\n\n      request.headers.forEach(function(value, name) {\n        xhr.setRequestHeader(name, value);\n      });\n\n      if (request.signal) {\n        request.signal.addEventListener('abort', abortXhr);\n\n        xhr.onreadystatechange = function() {\n          // DONE (success or failure)\n          if (xhr.readyState === 4) {\n            request.signal.removeEventListener('abort', abortXhr);\n          }\n        };\n      }\n\n      xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);\n    })\n  }\n\n  fetch.polyfill = true;\n\n  if (!self.fetch) {\n    self.fetch = fetch;\n    self.Headers = Headers;\n    self.Request = Request;\n    self.Response = Response;\n  }\n\n  exports.Headers = Headers;\n  exports.Request = Request;\n  exports.Response = Response;\n  exports.fetch = fetch;\n\n  Object.defineProperty(exports, '__esModule', { value: true });\n\n  return exports;\n\n})({});\n})(__self__);\n__self__.fetch.ponyfill = true;\n// Remove \"polyfill\" property added by whatwg-fetch\ndelete __self__.fetch.polyfill;\n// Choose between native implementation (global) or custom implementation (__self__)\n// var ctx = global.fetch ? global : __self__;\nvar ctx = __self__; // this line disable service worker support temporarily\nexports = ctx.fetch // To enable: import fetch from 'cross-fetch'\nexports.default = ctx.fetch // For TypeScript consumers without esModuleInterop.\nexports.fetch = ctx.fetch // To enable: import {fetch} from 'cross-fetch'\nexports.Headers = ctx.Headers\nexports.Request = ctx.Request\nexports.Response = ctx.Response\nmodule.exports = exports\n\n\n/***/ }),\n\n/***/ \"./src/isNullResponse.js\":\n/*!*******************************!*\\\n  !*** ./src/isNullResponse.js ***!\n  \\*******************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/**\n * @param {Response} response the response from fetch()\n * @returns {boolean} true if the response is a \"null response\" where we successfully talked to the\n * source, but the source has no data for us.\n */\nconst isNullResponse = response =>\n// can't access, eg. due to expired/missing project token\nresponse.status === 403 ||\n// assets does not exist\n// assets.scratch.mit.edu also returns 503 for missing assets\nresponse.status === 404 || response.status === 503;\nmodule.exports = isNullResponse;\n\n/***/ }),\n\n/***/ \"./src/safer-fetch.js\":\n/*!****************************!*\\\n  !*** ./src/safer-fetch.js ***!\n  \\****************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* eslint-disable no-use-before-define */\n\nconst {\n  scratchFetch\n} = __webpack_require__(/*! ./scratchFetch */ \"./src/scratchFetch.js\");\n\n// This throttles and retries scratchFetch() to mitigate the effect of random network errors and\n// random browser errors (especially in Chrome)\n\nlet currentFetches = 0;\nconst queue = [];\nconst sleep = ms => new Promise(resolve => setTimeout(resolve, ms));\nconst startNextFetch = _ref => {\n  let [resolve, url, options] = _ref;\n  let firstError;\n  let failedAttempts = 0;\n\n  /**\n   * @param {Response} result From fetch()\n   */\n  const done = result => {\n    // In macOS WKWebView, requests to file:// URLs return status: 0 and ok: false when they succeed, so we'll\n    // mess with the object so everyone that uses this realizes it succeeded.\n    // If the requests failed (because the file didn't exist) then fetch() rejects instead.\n    if (result.status === 0) {\n      Object.defineProperty(result, 'ok', {\n        value: true\n      });\n      Object.defineProperty(result, 'status', {\n        value: 200\n      });\n    }\n    currentFetches--;\n    checkStartNextFetch();\n    resolve(result);\n  };\n  const attemptToFetch = () => scratchFetch(url, options).then(done).catch(error => {\n    // If fetch() errors, it means there was a network error of some sort.\n    // This is worth retrying, especially as some browser will randomly fail requests\n    // if we send too many at once (as we do).\n\n    console.warn(\"Attempt to fetch \".concat(url, \" failed\"), error);\n    if (!firstError) {\n      firstError = error;\n    }\n    if (failedAttempts < 2) {\n      failedAttempts++;\n      sleep((failedAttempts + Math.random() - 1) * 5000).then(attemptToFetch);\n      return;\n    }\n    done(Promise.reject(firstError));\n  });\n  attemptToFetch();\n};\nconst checkStartNextFetch = () => {\n  if (currentFetches < 100 && queue.length > 0) {\n    currentFetches++;\n    startNextFetch(queue.shift());\n  }\n};\nconst saferFetch = (url, options) => new Promise(resolve => {\n  queue.push([resolve, url, options]);\n  checkStartNextFetch();\n});\nmodule.exports = saferFetch;\n\n/***/ }),\n\n/***/ \"./src/scratchFetch.js\":\n/*!*****************************!*\\\n  !*** ./src/scratchFetch.js ***!\n  \\*****************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nconst crossFetch = __webpack_require__(/*! cross-fetch */ \"./node_modules/cross-fetch/dist/browser-ponyfill.js\");\n\n/**\n * Metadata header names\n * @enum {string} The enum value is the name of the associated header.\n * @readonly\n */\nconst RequestMetadata = {\n  /** The ID of the project associated with this request */\n  ProjectId: 'X-Project-ID',\n  /** The ID of the project run associated with this request */\n  RunId: 'X-Run-ID'\n};\n\n/**\n * Metadata headers for requests\n * @type {Headers}\n */\nconst metadata = new crossFetch.Headers();\n\n/**\n * Check if there is any metadata to apply.\n * @returns {boolean} true if `metadata` has contents, or false if it is empty.\n */\nconst hasMetadata = () => {\n  /* global self */\n  const searchParams = typeof self !== 'undefined' && self && self.location && self.location.search && self.location.search.split(/[?&]/) || [];\n  if (!searchParams.includes('scratchMetadata=1')) {\n    // for now, disable this feature unless scratchMetadata=1\n    // TODO: remove this check once we're sure the feature works correctly in production\n    return false;\n  }\n  for (const _ of metadata) {\n    return true;\n  }\n  return false;\n};\n\n/**\n * Non-destructively merge any metadata state (if any) with the provided options object (if any).\n * If there is metadata state but no options object is provided, make a new object.\n * If there is no metadata state, return the provided options parameter without modification.\n * If there is metadata and an options object is provided, modify a copy and return it.\n * Headers in the provided options object may override headers generated from metadata state.\n * @param {RequestInit} [options] The initial request options. May be null or undefined.\n * @returns {RequestInit|undefined} the provided options parameter without modification, or a new options object.\n */\nconst applyMetadata = options => {\n  if (hasMetadata()) {\n    const augmentedOptions = Object.assign({}, options);\n    augmentedOptions.headers = new crossFetch.Headers(metadata);\n    if (options && options.headers) {\n      // the Fetch spec says options.headers could be:\n      // \"A Headers object, an object literal, or an array of two-item arrays to set request's headers.\"\n      // turn it into a Headers object to be sure of how to interact with it\n      const overrideHeaders = options.headers instanceof crossFetch.Headers ? options.headers : new crossFetch.Headers(options.headers);\n      for (const [name, value] of overrideHeaders.entries()) {\n        augmentedOptions.headers.set(name, value);\n      }\n    }\n    return augmentedOptions;\n  }\n  return options;\n};\n\n/**\n * Make a network request.\n * This is a wrapper for the global fetch method, adding some Scratch-specific functionality.\n * @param {RequestInfo|URL} resource The resource to fetch.\n * @param {RequestInit} options Optional object containing custom settings for this request.\n * @see {@link https://developer.mozilla.org/docs/Web/API/fetch} for more about the fetch API.\n * @returns {Promise<Response>} A promise for the response to the request.\n */\nconst scratchFetch = (resource, options) => {\n  const augmentedOptions = applyMetadata(options);\n  return crossFetch.fetch(resource, augmentedOptions);\n};\n\n/**\n * Set the value of a named request metadata item.\n * Setting the value to `null` or `undefined` will NOT remove the item.\n * Use `unsetMetadata` for that.\n * @param {RequestMetadata} name The name of the metadata item to set.\n * @param {any} value The value to set (will be converted to a string).\n */\nconst setMetadata = (name, value) => {\n  metadata.set(name, value);\n};\n\n/**\n * Remove a named request metadata item.\n * @param {RequestMetadata} name The name of the metadata item to remove.\n */\nconst unsetMetadata = name => {\n  metadata.delete(name);\n};\nmodule.exports = {\n  default: scratchFetch,\n  Headers: crossFetch.Headers,\n  RequestMetadata,\n  applyMetadata,\n  scratchFetch,\n  setMetadata,\n  unsetMetadata\n};\nif (true) {\n  /**\n   * Retrieve a named request metadata item.\n   * Only for use in tests.\n   * @param {RequestMetadata} name The name of the metadata item to retrieve.\n   * @returns {any} value The value of the metadata item, or `undefined` if it was not found.\n   */\n  const getMetadata = name => metadata.get(name);\n  module.exports.getMetadata = getMetadata;\n}\n\n/***/ })\n\n/******/ });\n//# sourceMappingURL=4a88156e88c04ad26c62.worker.js.map",n.p+"4a88156e88c04ad26c62.worker.js")}},"./node_modules/worker-loader/dist/workers/InlineWorker.js":function(e,t,n){"use strict";var r=window.URL||window.webkitURL;e.exports=function(e,t){try{try{var n;try{(n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder)).append(e),n=n.getBlob()}catch(t){n=new Blob([e])}return new Worker(r.createObjectURL(n))}catch(t){return new Worker("data:application/javascript,"+encodeURIComponent(e))}}catch(e){if(!t)throw Error("Inline worker is not supported");return new Worker(t)}}},"./src/Asset.js":function(e,t,n){"undefined"!=typeof TextDecoder&&"undefined"!=typeof TextEncoder||n("./node_modules/fastestsmallesttextencoderdecoder/EncoderDecoderTogether.min.js");const r=n("./node_modules/js-md5/src/md5.js");let i=null;const s={},o={},a="function"==typeof FinalizationRegistry?new FinalizationRegistry((e=>{const t=o[e];1===t?(delete o[e],delete s[e]):o[e]=t-1})):null,l=a?e=>{const t=e.assetId,n=o[t]||0;o[t]=n+1,a.register(e,t)}:()=>{};e.exports=class{constructor(e,t,n,r,i){this.assetType=e,this.assetId=t,this.setData(r,n||e.runtimeFormat,i),this.dependencies=[],l(this)}setData(e,t,n){if(e&&!t)throw new Error("Data provided without specifying its format");this.dataFormat=t,this.data=e,n&&(this.assetId=r(e)),this.clean=!n}decodeText(){return(new TextDecoder).decode(this.data)}encodeTextData(e,t,n){const r=new TextEncoder;this.setData(r.encode(e),t,n)}encodeDataURI(e){return e=e||this.assetType.contentType,"data:".concat(e,";base64,").concat(((e,t)=>{if(!Object.prototype.hasOwnProperty.call(s,e))if("undefined"==typeof btoa){const r=n("./node_modules/base64-js/index.js");s[e]=r.fromByteArray(t)}else{if(null===i){i=new Array(256);for(let e=0;e<256;e++)i[e]=String.fromCharCode(e)}const{length:n}=t;let r="";for(let e=0,s=0;e<n;e=s){s=Math.min(s+32766,n);let o="";for(let n=e;n<s;n+=1)o+=i[t[n]];r+=btoa(o)}s[e]=r}return s[e]})(this.assetId,this.data))}}},"./src/AssetType.js":function(e,t,n){const r=n("./src/DataFormat.js"),i={ImageBitmap:{contentType:"image/png",name:"ImageBitmap",runtimeFormat:r.PNG,immutable:!0},ImageVector:{contentType:"image/svg+xml",name:"ImageVector",runtimeFormat:r.SVG,immutable:!0},Project:{contentType:"application/json",name:"Project",runtimeFormat:r.JSON,immutable:!1},Sound:{contentType:"audio/x-wav",name:"Sound",runtimeFormat:r.WAV,immutable:!0},Sprite:{contentType:"application/json",name:"Sprite",runtimeFormat:r.JSON,immutable:!0},Font:{contentType:"font/ttf",name:"Font",runtimeFormat:r.TTF,immutable:!0}};e.exports=i},"./src/BuiltinHelper.js":function(e,t,n){(function(t){const r=n("./node_modules/js-md5/src/md5.js"),i=n("./src/Asset.js"),s=n("./src/AssetType.js"),o=n("./src/DataFormat.js"),a=n("./src/Helper.js"),l=[{type:s.ImageBitmap,format:o.PNG,id:null,data:t.from(n("./src/builtins/defaultBitmap.png"))},{type:s.Sound,format:o.WAV,id:null,data:t.from(n("./src/builtins/defaultSound.wav"))},{type:s.ImageVector,format:o.SVG,id:null,data:t.from(n("./src/builtins/defaultVector.svg"))}],c=l.concat([]);e.exports=class extends a{constructor(e){super(e),this.assets={},c.forEach((e=>{e.id=this._store(e.type,e.format,e.data,e.id)}))}registerDefaultAssets(){const e=l.length;for(let t=0;t<e;++t){const e=l[t];this.parent.setDefaultAssetId(e.type,e.id)}}get(e){let t=null;if(Object.prototype.hasOwnProperty.call(this.assets,e)){const n=this.assets[e];t=new i(n.type,n.id,n.format,n.data)}return t}cache(e,t,n,r){return this.store(e,t,n,r)}store(e,t,n,r){return this._store(e,t,n,r)}_store(e,t,n,i){if(!t)throw new Error("Data cached without specifying its format");if(""!==i&&null!=i){if(Object.prototype.hasOwnProperty.call(this.assets,i)&&e.immutable)return i}else{if(!e.immutable)throw new Error("Tried to cache data without an id");i=r(n)}return this.assets[i]={type:e,format:t,id:i,data:n},i}load(e,t){return this.get(t)?Promise.resolve(this.get(t)):null}}}).call(this,n("./node_modules/node-libs-browser/node_modules/buffer/index.js").Buffer)},"./src/DataFormat.js":function(e,t){e.exports={JPG:"jpg",JSON:"json",MP3:"mp3",PNG:"png",SB2:"sb2",SB3:"sb3",SVG:"svg",WAV:"wav",TTF:"ttf",OTF:"otf",WOFF:"woff",WOFF2:"woff2"}},"./src/FetchTool.js":function(e,t,n){var r=n("./node_modules/@babel/runtime/helpers/objectWithoutProperties.js");const i=["url"],s=["url","withCredentials"],{scratchFetch:o}=n("./src/scratchFetch.js"),a=n("./src/safer-fetch.js"),l=n("./src/isNullResponse.js");e.exports=class{get isGetSupported(){return!0}get(e){let{url:t}=e,n=r(e,i);return a(t,Object.assign({method:"GET"},n)).then((e=>e.ok?e.arrayBuffer().then((e=>new Uint8Array(e))):l(e)?null:Promise.reject(e.status)))}get isSendSupported(){return!0}send(e){let{url:t,withCredentials:n=!1}=e,i=r(e,s);return o(t,Object.assign({credentials:n?"include":"omit"},i)).then((e=>e.ok?e.text():Promise.reject(e.status)))}}},"./src/FetchWorkerTool.js":function(e,t,n){var r=n("./node_modules/@babel/runtime/helpers/objectWithoutProperties.js");const i=["url"],{Headers:s,applyMetadata:o}=n("./src/scratchFetch.js");class a{constructor(){this._workerSupport={fetch:"undefined"!=typeof fetch},this._supportError=null,this.worker=null,this.jobs={};try{if(this.isGetSupported){const e=new(n('./node_modules/worker-loader/dist/cjs.js?{"inline":true,"fallback":true}!./src/FetchWorkerTool.worker.js'));e.addEventListener("message",(e=>{let{data:t}=e;if(t.support)this._workerSupport=t.support;else for(const e of t)this.jobs[e.id]&&(e.error?this.jobs[e.id].reject(e.error):this.jobs[e.id].resolve(e.buffer),delete this.jobs[e.id])})),this.worker=e}}catch(e){this._supportError=e}}get isGetSupported(){return"undefined"!=typeof Worker&&this._workerSupport.fetch&&!this._supportError}get(e){let{url:t}=e,n=r(e,i);return new Promise(((e,r)=>{const i=Math.random().toString(16).substring(2),a=o(Object.assign({method:"GET"},n));a&&a.headers instanceof s&&(a.headers=Array.from(a.headers.entries())),this.worker.postMessage({id:i,url:t,options:a}),this.jobs[i]={id:i,resolve:e,reject:r}})).then((e=>e?new Uint8Array(e):null))}get isSendSupported(){return!1}send(){throw new Error("Not implemented.")}static get instance(){return this._instance||(this._instance=new a),this._instance}}e.exports=class{constructor(){this.inner=a.instance}get isGetSupported(){return this.inner.isGetSupported}get(e){return this.inner.get(e)}get isSendSupported(){return!1}send(){throw new Error("Not implemented.")}}},"./src/Helper.js":function(e,t){e.exports=class{constructor(e){this.parent=e}load(e,t,n){return Promise.reject(new Error("No asset of type ".concat(e," for ID ").concat(t," with format ").concat(n)))}}},"./src/ProxyTool.js":function(e,t,n){const r=n("./src/FetchWorkerTool.js"),i=n("./src/FetchTool.js");class s{constructor(){let e;e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.TOOL_FILTER.ALL)===s.TOOL_FILTER.READY?[new i]:[new r,new i],this.tools=e}get isGetSupported(){return this.tools.some((e=>e.isGetSupported))}get(e){let t=0;const n=r=>{const i=this.tools[t++];if(!i)throw r;return i.isGetSupported?i.get(e).catch(n):n(r)};return n()}get isSendSupported(){return this.tools.some((e=>e.isSendSupported))}send(e){let t=0;const n=r=>{const i=this.tools[t++];if(!i)throw r;return i.isSendSupported?i.send(e).catch(n):n(r)};return n()}}s.TOOL_FILTER={ALL:"all",READY:"ready"},e.exports=s},"./src/ScratchStorage.js":function(e,t,n){const r=n("./src/BuiltinHelper.js"),i=n("./src/WebHelper.js"),s=n("./src/Asset.js"),o=n("./src/AssetType.js"),a=n("./src/DataFormat.js"),l=n("./src/scratchFetch.js");e.exports=class{constructor(){this.defaultAssetId={},this.builtinHelper=new r(this),this.webHelper=new i(this),this.builtinHelper.registerDefaultAssets(this),this._helpers=[{helper:this.builtinHelper,priority:100},{helper:this.webHelper,priority:-100}]}get Asset(){return s}get AssetType(){return o}get DataFormat(){return a}get scratchFetch(){return l}static get Asset(){return s}static get AssetType(){return o}addHelper(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._helpers.push({helper:e,priority:t}),this._helpers.sort(((e,t)=>t.priority-e.priority))}get(e){return this.builtinHelper.get(e)}cache(e,t,n,r){return this.builtinHelper._store(e,t,n,r)}createAsset(e,t,n,r,i){if(!t)throw new Error("Tried to create asset without a dataFormat");return new s(e,r,t,n,i)}addWebStore(e,t,n,r){this.webHelper.addStore(e,t,n,r)}addWebSource(e,t){this.addWebStore(e,t)}getDefaultAssetId(e){if(Object.prototype.hasOwnProperty.call(this.defaultAssetId,e.name))return this.defaultAssetId[e.name]}setDefaultAssetId(e,t){this.defaultAssetId[e.name]=t}load(e,t,n){const r=this._helpers.map((e=>e.helper)),i=[];n=n||e.runtimeFormat;let s,o=0;const a=l=>{if(l&&i.push(l),s=r[o++],s){const r=s.load(e,t,n);return null===r?a():r.catch(a)}return i.length>0?Promise.reject(i):Promise.resolve(null)};return a()}store(e,t,n,r){return t=t||e.runtimeFormat,new Promise(((i,s)=>this.webHelper.store(e,t,n,r).then((r=>(this.builtinHelper._store(e,t,n,r.id),i(r)))).catch((e=>s(e)))))}}},"./src/WebHelper.js":function(e,t,n){const r=n("./src/Asset.js"),i=n("./src/Helper.js"),s=n("./src/ProxyTool.js"),o=e=>"string"==typeof e?{url:e}:e;e.exports=class extends i{constructor(e){super(e),this.stores=[],this.assetTool=new s,this.projectTool=new s(s.TOOL_FILTER.READY)}addSource(e,t){this.addStore(e,t)}addStore(e,t,n,r){this.stores.push({types:e.map((e=>e.name)),get:t,create:n,update:r})}load(e,t,n){const i=[],s=this.stores.slice().filter((t=>t.types.indexOf(e.name)>=0)),a=new r(e,t,n);let l=this.assetTool;"Project"===e.name&&(l=this.projectTool);let c=0;const u=e=>{e&&i.push(e);const t=s[c++],r=t&&t.get;if(r){const e=o(r(a));return!1===e?u():l.get(e).then((e=>e?(a.setData(e,n),a):u())).catch(u)}return i.length>0?Promise.reject(i):Promise.resolve(null)};return u()}store(e,t,n,i){const s=new r(e,i,t),a=""===i||null==i,l=this.stores.filter((t=>-1!==t.types.indexOf(e.name)&&(a&&t.create||t.update)))[0],c=a?"post":"put";if(!l)return Promise.reject(new Error("No appropriate stores"));let u=this.assetTool;"Project"===e.name&&(u=this.projectTool);const d=o(a?l.create(s):l.update(s)),h=Object.assign({body:n,method:c},d);return u.send(h).then((e=>{if("string"==typeof e)try{e=JSON.parse(e)}catch(t){return e}return Object.assign({id:e["content-name"]||i},e)}))}}},"./src/builtins/defaultBitmap.png":function(e,t,n){e.exports=n("./node_modules/arraybuffer-loader/lib/to-array-buffer.js")("iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAAAAADmVT4XAAADZElEQVR42u3a70vbQBgH8O/7vOibvsmbFUEEWUGGUhQ25nDuhSKIUFDxlYi0SAd94atRmFiHCH2x4W8iiNtwowXRgd1QipJYY3N/1F4kTQ6XLKS9yyHcvWyO8MnT5y53Tw5EcIMESIAESIAESIAESIAEPFVAq/6l8G4oAQCp4aniwbUVJ6BVzafwqKXy1VZMgNb+CHzbyK4ZB+Bi0nnk0VyhsDiSoAmvvnMHmGUVAF6UG+0ffsxRhsRHky/AyCsAUpumX0wAAIs6T4CxDADDtcdZsal6gjmdH8AsAEC6+s8Fa48SFExeAKusAEju+V367AmUCi9ANQ0AU3pwcOw2cMEH0FwAAKz5X228pRLR5AI4TgIAtIDL24oLUE94AB6W7LsH/cONN14Ilh44AOqD9s2LQR1KHiB9zgGgOSGeuA3ocPrME1Q4ANaceyePAzrcjHmAZYs9IBeW4/fzHiAwTCwAgTle9ACZK44ALDT9e6x7gL4aT0BQCHb4AqgA5/1TTOMLoJ7vZSMM0H/GHnCeDnu+CrU8vGYPcN5FADBYD0vCaYPDy+i0p337GSMsS1Z4vA3t9QgAZTt0IuIxFRPSKicAQHlvhk3FXF5GhBByMa8qo/sBO6BarwuYbYrYnFKDYEvE7phKgcxvEQBqnvhgiQCUOgoAO4C3JOS3L/hv23UXxVldBECfcueAqpAa0WGy/QeULREAY6aTXRFDgBuA13+ElOncAERMAGaA9hBQD4gQQHsIRE1AZoD2xrgQS5nOZyHgFKmWDSIG4GRAVidiAE4GRB6AzAB2AKIPQFaA5myHA5AV4ESNugZhC7BLR50lIBPAebrzBGQCKAFQNSIMcDvRTQIwAHxNApM3RBygGK0uyhxwOwGsPAgEnPWj5ycRCNiJtBHlAChGKQVwANzPY+CXSMDNWISiLA9AfRA5IhJQ68UnoQAt+AtOPIBKhJosF8B6UM0yLkAxQk2WCyDX9SiUh1gkQAIkoCuAvjGuquMbuijAtwG7MPL8yBICOHSPk3W8Ne8KcEUdmBi6FADYos+QleIH0N/ogOxd7AD6uAS6WRU8WcBdlgZMG/EnYUlwEpLLoQ4PjzGbiA5UsRMRsbQ+5ziDJmYqJuR6NaMomdXuFuZyPSABEiABEiABEiABEiAc8Bd6VyvCEKGqcQAAAABJRU5ErkJggg==")},"./src/builtins/defaultSound.wav":function(e,t,n){e.exports=n("./node_modules/arraybuffer-loader/lib/to-array-buffer.js")("UklGRiYAAABXQVZFZm10IBAAAAABAAEAIlYAAESsAAACABAAZGF0YQIAAAAAAA==")},"./src/builtins/defaultVector.svg":function(e,t,n){e.exports=n("./node_modules/arraybuffer-loader/lib/to-array-buffer.js")("PD94bWwgdmVyc2lvbj0iMS4wIj8+Cjxzdmcgd2lkdGg9IjEyOCIgaGVpZ2h0PSIxMjgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiA8Zz4KICA8cmVjdCBmaWxsPSIjQ0NDIiBoZWlnaHQ9IjEyOCIgd2lkdGg9IjEyOCIvPgogIDx0ZXh0IGZpbGw9ImJsYWNrIiB5PSIxMDciIHg9IjM1LjUiIGZvbnQtc2l6ZT0iMTI4Ij4/PC90ZXh0PgogPC9nPgo8L3N2Zz4K")},"./src/index.js":function(e,t,n){const r=n("./src/ScratchStorage.js");e.exports=r},"./src/isNullResponse.js":function(e,t){e.exports=e=>403===e.status||404===e.status||503===e.status},"./src/safer-fetch.js":function(e,t,n){const{scratchFetch:r}=n("./src/scratchFetch.js");let i=0;const s=[],o=e=>{let t,[n,s,o]=e,l=0;const c=e=>{0===e.status&&(Object.defineProperty(e,"ok",{value:!0}),Object.defineProperty(e,"status",{value:200})),i--,a(),n(e)},u=()=>r(s,o).then(c).catch((e=>{if(console.warn("Attempt to fetch ".concat(s," failed"),e),t||(t=e),l<2)return l++,void(n=5e3*(l+Math.random()-1),new Promise((e=>setTimeout(e,n)))).then(u);var n;c(Promise.reject(t))}));u()},a=()=>{i<100&&s.length>0&&(i++,o(s.shift()))};e.exports=(e,t)=>new Promise((n=>{s.push([n,e,t]),a()}))},"./src/scratchFetch.js":function(e,t,n){const r=n("./node_modules/cross-fetch/dist/browser-ponyfill.js"),i=new r.Headers,s=e=>{if((()=>{if(!("undefined"!=typeof self&&self&&self.location&&self.location.search&&self.location.search.split(/[?&]/)||[]).includes("scratchMetadata=1"))return!1;for(const e of i)return!0;return!1})()){const t=Object.assign({},e);if(t.headers=new r.Headers(i),e&&e.headers){const n=e.headers instanceof r.Headers?e.headers:new r.Headers(e.headers);for(const[e,r]of n.entries())t.headers.set(e,r)}return t}return e},o=(e,t)=>{const n=s(t);return r.fetch(e,n)};e.exports={default:o,Headers:r.Headers,RequestMetadata:{ProjectId:"X-Project-ID",RunId:"X-Run-ID"},applyMetadata:s,scratchFetch:o,setMetadata:(e,t)=>{i.set(e,t)},unsetMetadata:e=>{i.delete(e)}};{const t=e=>i.get(e);e.exports.getMetadata=t}}})},module.exports=factory()},function(e,t,n){const r=n(401);e.exports=r},function(e,t,n){const r=n(61);e.exports=class extends r{get DEFAULT_VALUE(){return 100}get name(){return"volume"}initialize(){this.inputNode=this.audioEngine.audioContext.createGain(),this.outputNode=this.inputNode,this.initialized=!0}_set(e){this.value=e;const{gain:t}=this.outputNode,{currentTime:n,DECAY_DURATION:r}=this.audioEngine;t.linearRampToValueAtTime(e/100,n+r)}dispose(){this.initialized&&(this.outputNode.disconnect(),this.inputNode=null,this.outputNode=null,this.target=null,this.initialized=!1)}}},function(e,t,n){"use strict";var r,i=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},s=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),o=[];function a(e){for(var t=-1,n=0;n<o.length;n++)if(o[n].identifier===e){t=n;break}return t}function l(e,t){for(var n={},r=[],i=0;i<e.length;i++){var s=e[i],l=t.base?s[0]+t.base:s[0],c=n[l]||0,u="".concat(l," ").concat(c);n[l]=c+1;var d=a(u),h={css:s[1],media:s[2],sourceMap:s[3]};-1!==d?(o[d].references++,o[d].updater(h)):o.push({identifier:u,updater:g(h,t),references:1}),r.push(u)}return r}function c(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var i=n.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var o=s(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var u,d=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function h(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=d(t,i);else{var s=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(s,o[t]):e.appendChild(s)}}function p(e,t,n){var r=n.css,i=n.media,s=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var m=null,f=0;function g(e,t){var n,r,i;if(t.singleton){var s=f++;n=m||(m=c(t)),r=h.bind(null,n,s,!1),i=h.bind(null,n,s,!0)}else n=c(t),r=p.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=i());var n=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=a(n[r]);o[i].references--}for(var s=l(e,t),c=0;c<n.length;c++){var u=a(n[c]);0===o[u].references&&(o[u].updater(),o.splice(u,1))}n=s}}}},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var s=0;s<this.length;s++){var o=this[s][0];null!=o&&(i[o]=!0)}for(var a=0;a<e.length;a++){var l=[].concat(e[a]);r&&i[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},function(e,t,n){"use strict";e.exports=function(e,t){return t||(t={}),"string"!=typeof(e=e&&e.__esModule?e.default:e)?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e)}},function(e,t,n){"use strict";t.a="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIwLjc3MzU5NSA1LjcyODA1MTlhMS4zMDc3Nzc0IDEuMzA3Nzc3NCAwIDAgMC0xLjg1NzA0MyAwTDkuMTczNjEwNSAxNS40ODQwNzFsLTQuMDkzMzQzMi00LjEwNjQyYTEuMzM2NDQ2OCAxLjMzNjQ0NjggMCAxIDAtMS44NTcwNDM5IDEuOTIyNDMybDUuMDIxODY1MSA1LjAyMTg2NmExLjMwNzc3NzQgMS4zMDc3Nzc0IDAgMCAwIDEuODU3MDQ0NSAwTDIwLjc3MzU5NSA3LjY1MDQ4NDdhMS4zMDc3Nzc0IDEuMzA3Nzc3NCAwIDAgMCAwLTEuOTIyNDMyOHoiIGZpbGw9IiNmZmYiLz48L3N2Zz4="},function(e){e.exports=JSON.parse('{"var-x":"x position","var-y":"y position","var-direction":"direction","var-username":"username","var-costume-number":"costume number","var-costume-name":"costume name","var-backdrop-number":"backdrop number","var-backdrop-name":"backdrop name","var-size":"size","var-answer":"answer","var-mousedown":"mouse down?","var-mousex":"mouse x","var-mousey":"mouse y","var-loudness":"loudness","var-timer":"timer","var-dayssince2000":"days since 2000","var-volume":"volume","var-year":"year","var-month":"month","var-date":"date","var-day-of-week":"day of week","var-hour":"hour","var-minute":"minute","var-second":"second","list-empty":"(empty)","list-length":"length {n}","list-import":"import","list-export":"export"}')},function(e,t,n){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){for(var t,n=l(e),r=n[0],o=n[1],a=new s(function(e,t,n){return 3*(t+n)/4-n}(0,r,o)),c=0,u=o>0?r-4:r,d=0;d<u;d+=4)t=i[e.charCodeAt(d)]<<18|i[e.charCodeAt(d+1)]<<12|i[e.charCodeAt(d+2)]<<6|i[e.charCodeAt(d+3)],a[c++]=t>>16&255,a[c++]=t>>8&255,a[c++]=255&t;2===o&&(t=i[e.charCodeAt(d)]<<2|i[e.charCodeAt(d+1)]>>4,a[c++]=255&t);1===o&&(t=i[e.charCodeAt(d)]<<10|i[e.charCodeAt(d+1)]<<4|i[e.charCodeAt(d+2)]>>2,a[c++]=t>>8&255,a[c++]=255&t);return a},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,s=[],o=16383,a=0,l=n-i;a<l;a+=o)s.push(c(e,a,a+o>l?l:a+o));1===i?(t=e[n-1],s.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],s.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return s.join("")};for(var r=[],i=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],i[o.charCodeAt(a)]=a;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){for(var i,s,o=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(r[(s=i)>>18&63]+r[s>>12&63]+r[s>>6&63]+r[63&s]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var s,o,a=8*i-r-1,l=(1<<a)-1,c=l>>1,u=-7,d=n?i-1:0,h=n?-1:1,p=e[t+d];for(d+=h,s=p&(1<<-u)-1,p>>=-u,u+=a;u>0;s=256*s+e[t+d],d+=h,u-=8);for(o=s&(1<<-u)-1,s>>=-u,u+=r;u>0;o=256*o+e[t+d],d+=h,u-=8);if(0===s)s=1-c;else{if(s===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,r),s-=c}return(p?-1:1)*o*Math.pow(2,s-r)},t.write=function(e,t,n,r,i,s){var o,a,l,c=8*s-i-1,u=(1<<c)-1,d=u>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:s-1,m=r?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=u?(a=0,o=u):o+d>=1?(a=(t*l-1)*Math.pow(2,i),o+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[n+p]=255&a,p+=m,a/=256,i-=8);for(o=o<<i|a,c+=i;c>0;e[n+p]=255&o,p+=m,o/=256,c-=8);e[n+p-m]|=128*f}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function s(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new s(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new s(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},s.prototype.unref=s.prototype.ref=function(){},s.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(124),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(9))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i,s,o,a,l=1,c={},u=!1,d=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){m(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((s=new MessageChannel).port1.onmessage=function(e){m(e.data)},r=function(e){s.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){m(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(m,0,e)}:(o="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&m(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),r=function(t){e.postMessage(o+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return c[l]=i,r(l),l++},h.clearImmediate=p}function p(e){delete c[e]}function m(e){if(u)setTimeout(m,0,e);else{var t=c[e];if(t){u=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}(t)}finally{p(e),u=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(9),n(41))},function(e,t,n){let r;r="undefined"==typeof TextEncoder?n(21).TextEncoder:TextEncoder;const i=n(19),s=n(22),o=n(18).Buffer,a=n(65),l=n(127),c=n(1),u=n(5),d=n(45),h=n(51),p=n(53),m=n(7),f=n(6),g=n(10),y=n(102),{loadCostume:b}=n(34),{loadSound:v}=n(33),{serializeSounds:S,serializeCostumes:w}=n(367);n(368);const{exportCostume:k}=n(101),T=n(15),x=["_mouse_","_stage_","_edge_","_myself_","_random_"],E=[];f.setup({missingTranslation:"ignore"});e.exports=class extends i{constructor(){super(),this.runtime=new d,a.setService("runtime",(e=>{const t={};return t._refreshExtensionPrimitives=e._refreshExtensionPrimitives.bind(e),t._registerExtensionPrimitives=e._registerExtensionPrimitives.bind(e),t})(this.runtime)).catch((e=>{c.error("Failed to register runtime service: ".concat(JSON.stringify(e)))})),this.editingTarget=null,this._dragTarget=null,this.runtime.on(d.SCRIPT_GLOW_ON,(e=>{this.emit(d.SCRIPT_GLOW_ON,e)})),this.runtime.on(d.SCRIPT_GLOW_OFF,(e=>{this.emit(d.SCRIPT_GLOW_OFF,e)})),this.runtime.on(d.BLOCK_GLOW_ON,(e=>{this.emit(d.BLOCK_GLOW_ON,e)})),this.runtime.on(d.BLOCK_GLOW_OFF,(e=>{this.emit(d.BLOCK_GLOW_OFF,e)})),this.runtime.on(d.PROJECT_START,(()=>{this.emit(d.PROJECT_START)})),this.runtime.on(d.PROJECT_RUN_START,(()=>{this.emit(d.PROJECT_RUN_START)})),this.runtime.on(d.PROJECT_RUN_STOP,(()=>{this.emit(d.PROJECT_RUN_STOP)})),this.runtime.on(d.PROJECT_CHANGED,(()=>{this.emit(d.PROJECT_CHANGED)})),this.runtime.on(d.VISUAL_REPORT,(e=>{this.emit(d.VISUAL_REPORT,e)})),this.runtime.on(d.TARGETS_UPDATE,(e=>{this.emitTargetsUpdate(e)})),this.runtime.on(d.MONITORS_UPDATE,(e=>{this.emit(d.MONITORS_UPDATE,e)})),this.runtime.on(d.BLOCK_DRAG_UPDATE,(e=>{this.emit(d.BLOCK_DRAG_UPDATE,e)})),this.runtime.on(d.BLOCK_DRAG_END,((e,t)=>{this.emit(d.BLOCK_DRAG_END,e,t)})),this.runtime.on(d.EXTENSION_ADDED,(e=>{this.emit(d.EXTENSION_ADDED,e)})),this.runtime.on(d.EXTENSION_FIELD_ADDED,((e,t)=>{this.emit(d.EXTENSION_FIELD_ADDED,e,t)})),this.runtime.on(d.BLOCKSINFO_UPDATE,(e=>{this.emit(d.BLOCKSINFO_UPDATE,e)})),this.runtime.on(d.BLOCKS_NEED_UPDATE,(()=>{this.emitWorkspaceUpdate()})),this.runtime.on(d.TOOLBOX_EXTENSIONS_NEED_UPDATE,(()=>{this.extensionManager.refreshBlocks()})),this.runtime.on(d.PERIPHERAL_LIST_UPDATE,(e=>{this.emit(d.PERIPHERAL_LIST_UPDATE,e)})),this.runtime.on(d.USER_PICKED_PERIPHERAL,(e=>{this.emit(d.USER_PICKED_PERIPHERAL,e)})),this.runtime.on(d.PERIPHERAL_CONNECTED,(()=>this.emit(d.PERIPHERAL_CONNECTED))),this.runtime.on(d.PERIPHERAL_REQUEST_ERROR,(()=>this.emit(d.PERIPHERAL_REQUEST_ERROR))),this.runtime.on(d.PERIPHERAL_DISCONNECTED,(()=>this.emit(d.PERIPHERAL_DISCONNECTED))),this.runtime.on(d.PERIPHERAL_CONNECTION_LOST_ERROR,(e=>this.emit(d.PERIPHERAL_CONNECTION_LOST_ERROR,e))),this.runtime.on(d.PERIPHERAL_SCAN_TIMEOUT,(()=>this.emit(d.PERIPHERAL_SCAN_TIMEOUT))),this.runtime.on(d.MIC_LISTENING,(e=>{this.emit(d.MIC_LISTENING,e)})),this.runtime.on(d.RUNTIME_STARTED,(()=>{this.emit(d.RUNTIME_STARTED)})),this.runtime.on(d.RUNTIME_STOPPED,(()=>{this.emit(d.RUNTIME_STOPPED)})),this.runtime.on(d.HAS_CLOUD_DATA_UPDATE,(e=>{this.emit(d.HAS_CLOUD_DATA_UPDATE,e)})),this.runtime.on(d.RUNTIME_OPTIONS_CHANGED,(e=>{this.emit(d.RUNTIME_OPTIONS_CHANGED,e)})),this.runtime.on(d.COMPILER_OPTIONS_CHANGED,(e=>{this.emit(d.COMPILER_OPTIONS_CHANGED,e)})),this.runtime.on(d.FRAMERATE_CHANGED,(e=>{this.emit(d.FRAMERATE_CHANGED,e)})),this.runtime.on(d.INTERPOLATION_CHANGED,(e=>{this.emit(d.INTERPOLATION_CHANGED,e)})),this.runtime.on(d.STAGE_SIZE_CHANGED,((e,t)=>{this.emit(d.STAGE_SIZE_CHANGED,e,t)})),this.runtime.on(d.COMPILE_ERROR,((e,t)=>{this.emit(d.COMPILE_ERROR,e,t)})),this.runtime.on(d.ASSET_PROGRESS,((e,t)=>{this.emit(d.ASSET_PROGRESS,e,t)})),this.runtime.on(d.TURBO_MODE_OFF,(()=>{this.emit(d.TURBO_MODE_OFF)})),this.runtime.on(d.TURBO_MODE_ON,(()=>{this.emit(d.TURBO_MODE_ON)})),this.extensionManager=new l(this),this.securityManager=this.extensionManager.securityManager,this.runtime.extensionManager=this.extensionManager;for(const e of E)this.extensionManager.loadExtensionIdSync(e);this.blockListener=this.blockListener.bind(this),this.flyoutBlockListener=this.flyoutBlockListener.bind(this),this.monitorBlockListener=this.monitorBlockListener.bind(this),this.variableListener=this.variableListener.bind(this),this.exports={Sprite:p,RenderedTarget:h,JSZip:s,i_will_not_ask_for_help_when_these_break:()=>(console.warn("You are using unsupported APIs. WHEN your code breaks, do not expect help."),{JSGenerator:n(78),IRGenerator:n(48).IRGenerator,ScriptTreeGenerator:n(48).ScriptTreeGenerator,Thread:n(25),execute:n(50)})}}start(){this.runtime.start()}stop(){this.quit()}quit(){this.runtime.quit()}greenFlag(){this.runtime.greenFlag()}setTurboMode(e){this.runtime.turboMode=!!e,this.runtime.turboMode?this.emit(d.TURBO_MODE_ON):this.emit(d.TURBO_MODE_OFF)}setCompatibilityMode(e){this.runtime.setCompatibilityMode(!!e)}setFramerate(e){this.runtime.setFramerate(e)}setInterpolation(e){this.runtime.setInterpolation(e)}setRuntimeOptions(e){this.runtime.setRuntimeOptions(e)}setCompilerOptions(e){this.runtime.setCompilerOptions(e)}setStageSize(e,t){this.runtime.setStageSize(e,t)}setInEditor(e){this.runtime.setInEditor(e)}convertToPackagedRuntime(){this.runtime.convertToPackagedRuntime()}addAddonBlock(e){this.runtime.addAddonBlock(e)}getAddonBlock(e){return this.runtime.getAddonBlock(e)}storeProjectOptions(){this.runtime.storeProjectOptions(),this.editingTarget.isStage&&this.emitWorkspaceUpdate()}enableDebug(){return this.runtime.enableDebug(),"enabled debug mode"}handleExtensionButtonPress(e){this.runtime.handleExtensionButtonPress(e)}stopAll(){this.runtime.stopAll()}clear(){this.runtime.dispose(),this.editingTarget=null,this.emitTargetsUpdate(!1)}getPlaygroundData(){const e=this,t=this.runtime.threads.filter((t=>t.target===e.editingTarget)),n=JSON.stringify(t,((e,t)=>{if("target"!==e&&"blockContainer"!==e)return t}),2);this.emit("playgroundData",{blocks:this.editingTarget.blocks,threads:n})}postIOData(e,t){this.runtime.ioDevices[e]&&this.runtime.ioDevices[e].postData(t)}setVideoProvider(e){this.runtime.ioDevices.video.setProvider(e)}setCloudProvider(e){this.runtime.ioDevices.cloud.setProvider(e)}scanForPeripheral(e){this.runtime.scanForPeripheral(e)}connectPeripheral(e,t){this.runtime.connectPeripheral(e,t)}disconnectPeripheral(e){this.runtime.disconnectPeripheral(e)}getPeripheralIsConnected(e){return this.runtime.getPeripheralIsConnected(e)}loadProject(e){"object"!=typeof e||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||(e=JSON.stringify(e));return new Promise(((t,r)=>{n(103)(e,!1,((e,n)=>{if(e)return r(e);t(n)}))})).catch((t=>{const{SB1File:r,ValidationError:i}=n(413);try{const t=new r(e),n=t.json;return n.projectVersion=2,Promise.resolve([n,t.zip])}catch(e){if(!(e instanceof i||"".concat(e).includes("Non-ascii character in FixedAsciiString")))return Promise.reject(e)}return Promise.reject(t)})).then((e=>this.deserializeProject(e[0],e[1]))).then((()=>this.runtime.handleProjectLoaded())).catch((e=>Object.prototype.hasOwnProperty.call(e,"validationError")?Promise.reject(JSON.stringify(e)):Promise.reject(e)))}downloadProjectId(e){const t=this.runtime.storage;if(!t)return void c.error("No storage module present; cannot load project: ",e);const n=this;t.load(t.AssetType.Project,e).then((t=>t?n.loadProject(t.data):(c.error("Failed to fetch project with id: ".concat(e)),null)))}_saveProjectZip(){const e=this.toJSON(),t=new s;return t.file("project.json",e),this._addFileDescsToZip(this.serializeAssets(),t),t}saveProjectSb3(e){return this._saveProjectZip().generateAsync({type:e||"blob",mimeType:"application/x.scratch.sb3",compression:"DEFLATE"})}saveProjectSb3Stream(e){return this._saveProjectZip().generateInternalStream({type:e||"arraybuffer",mimeType:"application/x.scratch.sb3",compression:"DEFLATE"})}saveProjectSb3DontZip(){const e=this.toJSON(),t={"project.json":(new r).encode(e)};for(const e of this.serializeAssets())t[e.fileName]=e.fileContent;return t}get assets(){return[...this.runtime.targets.reduce(((e,t)=>e.concat(t.sprite.sounds.map((e=>e.asset))).concat(t.sprite.costumes.map((e=>e.asset)))),[]),...this.runtime.fontManager.serializeAssets()]}serializeAssets(e){return[...w(this.runtime,e),...S(this.runtime,e),...this.runtime.fontManager.serializeAssets().map((e=>({fileName:"".concat(e.assetId,".").concat(e.dataFormat),fileContent:e.data})))]}_addFileDescsToZip(e,t){for(let n=0;n<e.length;n++){const r=e[n];t.file(r.fileName,r.fileContent)}}exportSprite(e,t){const n=this.toJSON(e),r=new s;return r.file("sprite.json",n),this._addFileDescsToZip(this.serializeAssets(e),r),r.generateAsync({type:"string"==typeof t?t:"blob",mimeType:"application/x.scratch.sprite3",compression:"DEFLATE",compressionOptions:{level:6}})}toJSON(e,t){const r=n(27);return m.stringify(r.serialize(this.runtime,e,t))}fromJSON(e){return c.warn("fromJSON is now just a wrapper around loadProject, please use that function instead."),this.loadProject(e)}deserializeProject(e,t){this.clear(),"undefined"!=typeof performance&&performance.mark("scratch-vm-deserialize-start");const r=this.runtime;return function(){const i=e.projectVersion;if(2===i){return n(105).deserialize(e,r,!1,t)}if(3===i){return n(27).deserialize(e,r,t)}return Promise.reject("Unable to verify Scratch Project version.")}().then((e=>{let{targets:t,extensions:n}=e;if("undefined"!=typeof performance){performance.mark("scratch-vm-deserialize-end");try{performance.measure("scratch-vm-deserialize","scratch-vm-deserialize-start","scratch-vm-deserialize-end")}catch(e){c.error(e)}}return this.installTargets(t,n,!0)}))}async _loadExtensions(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map;const r=n(376),i=[];for(const n of e)if(this.extensionManager.isExtensionLoaded(n));else if(this.extensionManager.isBuiltinExtension(n))this.extensionManager.loadExtensionIdSync(n);else{const e=t.get(n)||r.get(n);if(!e)throw new Error("Unknown extension: ".concat(n));if(!await this.securityManager.canLoadExtensionFromProject(e))throw new Error("Permission to load extension denied: ".concat(n));i.push(this.extensionManager.loadExtensionURL(e))}return Promise.all(i)}async installTargets(e,t,n){return await this.extensionManager.allAsyncExtensionsLoaded(),e=e.filter((e=>!!e)),this._loadExtensions(t.extensionIDs,t.extensionURLs).then((()=>{e.forEach((e=>{this.runtime.addTarget(e),e.updateAllDrawableProperties(),e.isSprite()&&this.renameSprite(e.id,e.getName())})),this.runtime.executableTargets.sort(((e,t)=>e.layerOrder-t.layerOrder)),e.forEach((e=>{delete e.layerOrder})),n&&e.length>1?this.editingTarget=e[1]:this.editingTarget=e[0],n||this.editingTarget.fixUpVariableReferences(),n&&this.runtime.parseProjectOptions(),this.emitTargetsUpdate(!1),this.emitWorkspaceUpdate(),this.runtime.setEditingTarget(this.editingTarget),this.runtime.ioDevices.cloud.setStage(this.runtime.getTargetForStage())}))}addSprite(e){const t="Sprite Upload Error:";"object"!=typeof e||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||(e=JSON.stringify(e));return new Promise(((t,r)=>{n(103)(e,!0,((e,n)=>{if(e)return r(e);t(n)}))})).then((e=>{const n=e[0].projectVersion;return 2===n?this._addSprite2(e[0],e[1]):3===n?this._addSprite3(e[0],e[1]):Promise.reject("".concat(t," Unable to verify sprite version."))})).then((()=>this.runtime.emitProjectChanged())).catch((e=>Object.prototype.hasOwnProperty.call(e,"validationError")?Promise.reject(JSON.stringify(e)):Promise.reject("".concat(t," ").concat(e))))}_addSprite2(e,t){return n(105).deserialize(e,this.runtime,!0,t).then((e=>{let{targets:t,extensions:n}=e;return this.installTargets(t,n,!1)}))}_addSprite3(e,t){return n(27).deserialize(e,this.runtime,t,!0).then((e=>{let{targets:t,extensions:n}=e;return this.installTargets(t,n,!1)}))}addCostume(e,t,n,r){const i=n?this.runtime.getTargetById(n):this.editingTarget;return i?b(e,t,this.runtime,r).then((()=>{i.addCostume(t),i.setCostume(i.getCostumes().length-1),this.runtime.emitProjectChanged()})):Promise.reject()}addCostumeFromLibrary(e,t){return this.editingTarget?this.addCostume(e,t,this.editingTarget.id,2):Promise.reject()}duplicateCostume(e){const t=this.editingTarget.getCostumes()[e],n=Object.assign({},t),r="".concat(n.assetId,".").concat(n.dataFormat);return b(r,n,this.runtime).then((()=>{this.editingTarget.addCostume(n,e+1),this.editingTarget.setCostume(e+1),this.emitTargetsUpdate()}))}duplicateSound(e){const t=this.editingTarget.getSounds()[e],n=Object.assign({},t);return v(n,this.runtime,this.editingTarget.sprite.soundBank).then((()=>{this.editingTarget.addSound(n,e+1),this.emitTargetsUpdate()}))}renameCostume(e,t){this.editingTarget.renameCostume(e,t),this.emitTargetsUpdate()}deleteCostume(e){const t=this.editingTarget.deleteCostume(e);if(t){const e=this.editingTarget;return this.runtime.emitProjectChanged(),()=>{e.addCostume(t),this.emitTargetsUpdate()}}return null}addSound(e,t){const n=t?this.runtime.getTargetById(t):this.editingTarget;return n?v(e,this.runtime,n.sprite.soundBank).then((()=>{n.addSound(e),this.emitTargetsUpdate()})):Promise.reject(new Error("No target with ID: ".concat(t)))}renameSound(e,t){this.editingTarget.renameSound(e,t),this.emitTargetsUpdate()}getSoundBuffer(e){const t=this.editingTarget.sprite.sounds[e].soundId;return t&&this.runtime&&this.runtime.audioEngine?this.editingTarget.sprite.soundBank.getSoundPlayer(t).buffer:null}updateSoundBuffer(e,t,n){const r=this.editingTarget.sprite.sounds[e];r&&r.broken&&delete r.broken;const i=r?r.soundId:null;if(i&&this.runtime&&this.runtime.audioEngine&&(this.editingTarget.sprite.soundBank.getSoundPlayer(i).buffer=t),n){r.format="";const e=this.runtime.storage;r.asset=e.createAsset(e.AssetType.Sound,e.DataFormat.WAV,n,null,!0),r.assetId=r.asset.assetId,r.dataFormat=e.DataFormat.WAV,r.md5="".concat(r.assetId,".").concat(r.dataFormat),r.sampleCount=t.length,r.rate=t.sampleRate}this.emitTargetsUpdate()}deleteSound(e){const t=this.editingTarget,n=this.editingTarget.deleteSound(e);if(n){this.runtime.emitProjectChanged();return()=>{t.addSound(n),this.emitTargetsUpdate()}}return null}getCostume(e){const t=this.editingTarget.getCostumes()[e].asset;if(!t||!this.runtime||!this.runtime.storage)return null;const n=t.dataFormat;return n===this.runtime.storage.DataFormat.SVG?t.decodeText():n===this.runtime.storage.DataFormat.PNG||n===this.runtime.storage.DataFormat.JPG?t.encodeDataURI():(c.error("Unhandled format: ".concat(t.dataFormat)),null)}getExportedCostume(e){return k(e)}getExportedCostumeBase64(e){const t=this.getExportedCostume(e);return T.uint8ArrayToBase64(t)}updateBitmap(e,t,n,r,i){return this._updateBitmap(this.editingTarget.getCostumes()[e],t,n,r,i)}_updateBitmap(e,t,n,r,i){if(!(e&&this.runtime&&this.runtime.renderer))return;e&&e.broken&&delete e.broken,e.rotationCenterX=n,e.rotationCenterY=r;const s=0===t.sourceWidth?0:t.width,a=0===t.sourceHeight?0:t.height,l=document.createElement("canvas");l.width=s,l.height=a;l.getContext("2d").putImageData(t,0,0),this.runtime.renderer.updateBitmapSkin(e.skinId,l,i,[n/i,r/i]),l.toBlob((t=>{const n=new FileReader;n.addEventListener("loadend",(()=>{const t=this.runtime.storage;e.dataFormat=t.DataFormat.PNG,e.bitmapResolution=i,e.size=[s,a],e.asset=t.createAsset(t.AssetType.ImageBitmap,e.dataFormat,o.from(n.result),null,!0),e.assetId=e.asset.assetId,e.md5="".concat(e.assetId,".").concat(e.dataFormat),this.emitTargetsUpdate()})),t&&n.readAsArrayBuffer(t)}))}updateSvg(e,t,n,r){return this._updateSvg(this.editingTarget.getCostumes()[e],t,n,r)}_updateSvg(e,t,n,i){e&&e.broken&&delete e.broken,e&&this.runtime&&this.runtime.renderer&&(e.rotationCenterX=n,e.rotationCenterY=i,this.runtime.renderer.updateSVGSkin(e.skinId,t,[n,i]),e.size=this.runtime.renderer.getSkinSize(e.skinId));const s=this.runtime.storage;e.dataFormat=s.DataFormat.SVG,e.bitmapResolution=1,e.asset=s.createAsset(s.AssetType.ImageVector,e.dataFormat,(new r).encode(t),null,!0),e.assetId=e.asset.assetId,e.md5="".concat(e.assetId,".").concat(e.dataFormat),this.emitTargetsUpdate()}addBackdrop(e,t){return b(e,t,this.runtime).then((()=>{const e=this.runtime.getTargetForStage();e.addCostume(t),e.setCostume(e.getCostumes().length-1),this.runtime.emitProjectChanged()}))}renameSprite(e,t){const n=this.runtime.getTargetById(e);if(!n)throw new Error("No target with the provided id.");{if(!n.isSprite())throw new Error("Cannot rename non-sprite targets.");const e=n.sprite;if(!e)throw new Error("No sprite associated with this target.");if(t&&-1===x.indexOf(t)){const r=this.runtime.targets.filter((e=>e.isSprite()&&e.id!==n.id)).map((e=>e.sprite.name)),i=e.name,s=m.unusedName(t,r);if(e.name=s,i===s)return;const o=this.runtime.targets;for(let e=0;e<o.length;e++){o[e].blocks.updateAssetName(i,t,"sprite")}s!==i&&this.emitTargetsUpdate()}}}deleteSprite(e){const t=this.runtime.getTargetById(e);if(t){const n=this.runtime.targets.map((e=>e.id)).indexOf(t.id);if(!t.isSprite())throw new Error("Cannot delete non-sprite targets.");const r=t.sprite;if(!r)throw new Error("No sprite associated with this target.");const i=this.exportSprite(e,"uint8array"),s=()=>i.then((e=>this.addSprite(e)));t.deleteMonitors();const o=this.editingTarget;for(let e=0;e<r.clones.length;e++){const t=r.clones[e];if(this.runtime.stopForTarget(r.clones[e]),this.runtime.disposeTarget(r.clones[e]),t===o){const e=Math.min(this.runtime.targets.length-1,n);this.runtime.targets.length>0?this.setEditingTarget(this.runtime.targets[e].id):this.editingTarget=null}}return this.emitTargetsUpdate(),s}throw new Error("No target with the provided id.")}duplicateSprite(e){const t=this.runtime.getTargetById(e);if(!t)throw new Error("No target with the provided id.");if(!t.isSprite())throw new Error("Cannot duplicate non-sprite targets.");if(!t.sprite)throw new Error("No sprite associated with this target.");return t.duplicate().then((e=>{this.runtime.addTarget(e),e.goBehindOther(t),this.setEditingTarget(e.id)}))}attachAudioEngine(e){this.runtime.attachAudioEngine(e)}attachRenderer(e){this.runtime.attachRenderer(e)}get renderer(){return this.runtime&&this.runtime.renderer}attachV2SVGAdapter(){}attachV2BitmapAdapter(e){this.runtime.attachV2BitmapAdapter(e)}attachStorage(e){this.runtime.attachStorage(e)}setLocale(e,t){return e!==f.setup().locale&&f.setup({locale:e,translations:{[e]:t}}),this.emit("LOCALE_CHANGED",e),this.extensionManager.refreshBlocks()}getLocale(){return f.setup().locale}blockListener(e){this.editingTarget&&this.editingTarget.blocks.blocklyListen(e)}flyoutBlockListener(e){this.runtime.flyoutBlocks.blocklyListen(e)}monitorBlockListener(e){-1!==["create","change"].indexOf(e.type)&&this.runtime.monitorBlocks.blocklyListen(e)}variableListener(e){-1!==["var_create","var_rename","var_delete"].indexOf(e.type)&&this.runtime.getTargetForStage().blocks.blocklyListen(e)}clearFlyoutBlocks(){this.runtime.flyoutBlocks.deleteAllBlocks()}setEditingTarget(e){if(this.editingTarget&&e===this.editingTarget.id)return;const t=this.runtime.getTargetById(e);t&&(this.editingTarget=t,this.emitTargetsUpdate(!1),this.emitWorkspaceUpdate(),this.runtime.setEditingTarget(t))}exportStandaloneBlocks(e){return n(27).serializeStandaloneBlocks(e,this.runtime)}shareBlocksToTarget(e,t,r){const i=n(27),{blocks:s,extensionURLs:o}=i.deserializeStandaloneBlocks(e);y(s);const a=this.runtime.getTargetById(t);if(r){this.runtime.getTargetById(r).resolveVariableSharingConflictsWithTarget(s,a)}const l=new Set(s.map((e=>i.getExtensionIdForOpcode(e.opcode))).filter((e=>!!e)).filter((e=>!this.extensionManager.isExtensionLoaded(e))));return this._loadExtensions(l,o).then((()=>{s.forEach((e=>{a.blocks.createBlock(e)})),a.blocks.updateTargetSpecificBlocks(a.isStage)}))}shareCostumeToTarget(e,t){const n=this.editingTarget.getCostumes()[e],r=Object.assign({},n),i="".concat(r.assetId,".").concat(r.dataFormat);return b(i,r,this.runtime).then((()=>{const e=this.runtime.getTargetById(t);e&&(e.addCostume(r),e.setCostume(e.getCostumes().length-1))}))}shareSoundToTarget(e,t){const n=this.editingTarget.getSounds()[e],r=Object.assign({},n),i=this.runtime.getTargetById(t);return v(r,this.runtime,i.sprite.soundBank).then((()=>{i&&(i.addSound(r),this.emitTargetsUpdate())}))}refreshWorkspace(){this.editingTarget&&(this.emitWorkspaceUpdate(),this.runtime.setEditingTarget(this.editingTarget),this.emitTargetsUpdate(!1))}emitTargetsUpdate(e){let t;void 0===e&&(e=!0);const n=()=>(t||(t=this.runtime.targets.filter((e=>!Object.prototype.hasOwnProperty.call(e,"isOriginal")||e.isOriginal)).map((e=>e.toJSON()))),t);this.emit("targetsUpdate",{get targetList(){return n()},editingTarget:this.editingTarget?this.editingTarget.id:null}),e&&this.runtime.emitProjectChanged()}emitWorkspaceUpdate(){const e=this.runtime.getTargetForStage().variables;let t=[];for(const n in e)e[n].type===g.BROADCAST_MESSAGE_TYPE&&t.push(n);for(let e=0;e<this.runtime.targets.length;e++){const n=this.runtime.targets[e].blocks._blocks;for(const e in n)if(n[e].fields.BROADCAST_OPTION){const r=n[e].fields.BROADCAST_OPTION.id,i=t.indexOf(r);-1!==i&&(t=t.slice(0,i).concat(t.slice(i+1)))}}for(let e=0;e<t.length;e++){const n=t[e];delete this.runtime.getTargetForStage().variables[n]}const n=Object.assign({},this.runtime.getTargetForStage().variables),r=this.editingTarget.isStage?Object.create(null):Object.assign({},this.editingTarget.variables),i=Object.keys(n).map((e=>n[e])),s=Object.keys(r).map((e=>r[e])),o=Object.keys(this.editingTarget.comments).map((e=>this.editingTarget.comments[e])).filter((e=>null===e.blockId)),a='<xml xmlns="http://www.w3.org/1999/xhtml">\n                            <variables>\n                                '.concat(i.map((e=>e.toXML())).join(),"\n                                ").concat(s.map((e=>e.toXML(!0))).join(),"\n                            </variables>\n                            ").concat(o.map((e=>e.toXML())).join(),"\n                            ").concat(this.editingTarget.blocks.toXML(this.editingTarget.comments),"\n                        </xml>");this.emit("workspaceUpdate",{xml:a})}getTargetIdForDrawableId(e){const t=this.runtime.getTargetByDrawableId(e);return t&&Object.prototype.hasOwnProperty.call(t,"id")&&Object.prototype.hasOwnProperty.call(t,"isStage")&&!t.isStage?t.id:null}reorderTarget(e,t){let n=this.runtime.targets;if((e=u.clamp(e,0,n.length-1))===(t=u.clamp(t,0,n.length-1)))return!1;const r=n[e];return n=n.slice(0,e).concat(n.slice(e+1)),n.splice(t,0,r),this.runtime.targets=n,this.emitTargetsUpdate(),!0}reorderCostume(e,t,n){const r=this.runtime.getTargetById(e);if(r){const e=r.reorderCostume(t,n);return e&&this.runtime.emitProjectChanged(),e}return!1}reorderSound(e,t,n){const r=this.runtime.getTargetById(e);if(r){const e=r.reorderSound(t,n);return e&&this.runtime.emitProjectChanged(),e}return!1}startDrag(e){const t=this.runtime.getTargetById(e);t&&(this._dragTarget=t,t.startDrag())}stopDrag(e){const t=this.runtime.getTargetById(e);t&&(this._dragTarget=null,t.stopDrag(),this.setEditingTarget(t.sprite&&t.sprite.clones[0]?t.sprite.clones[0].id:t.id))}postSpriteInfo(e){this._dragTarget?this._dragTarget.postSpriteInfo(e):this.editingTarget.postSpriteInfo(e),this.runtime.emitProjectChanged()}setVariableValue(e,t,n){const r=this.runtime.getTargetById(e);if(r){const e=r.lookupVariableById(t);if(e)return e.value=n,e.isCloud&&this.runtime.ioDevices.cloud.requestUpdateVariable(e.name,e.value),!0}return!1}getVariableValue(e,t){const n=this.runtime.getTargetById(e);if(n){const e=n.lookupVariableById(t);if(e)return e.value}return null}configureScratchLinkSocketFactory(e){this.runtime.configureScratchLinkSocketFactory(e)}}},function(e,t,n){const r=n(1);e.exports=class{constructor(){this.callbacks=[],this.nextResponseId=0}call(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return this.transferCall(e,t,null,...r)}transferCall(e,t,n){try{const{provider:o,isRemote:a}=this._getServiceProvider(e);if(o){for(var r=arguments.length,i=new Array(r>3?r-3:0),s=3;s<r;s++)i[s-3]=arguments[s];if(a)return this._remoteTransferCall(o,e,t,n,...i);const l=o[t].apply(o,i);return Promise.resolve(l)}return Promise.reject(new Error("Service not found: ".concat(e)))}catch(e){return Promise.reject(e)}}_isRemoteService(e){return this._getServiceProvider(e).isRemote}_remoteCall(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),s=3;s<r;s++)i[s-3]=arguments[s];return this._remoteTransferCall(e,t,n,null,...i)}_remoteTransferCall(e,t,n,r){for(var i=arguments.length,s=new Array(i>4?i-4:0),o=4;o<i;o++)s[o-4]=arguments[o];return new Promise(((i,o)=>{const a=this._storeCallbacks(i,o);s.length>0&&"function"==typeof s[s.length-1].func&&(s.pop(),s.pop()),r?e.postMessage({service:t,method:n,responseId:a,args:s},r):e.postMessage({service:t,method:n,responseId:a,args:s})}))}_storeCallbacks(e,t){const n=this.nextResponseId++;return this.callbacks[n]=[e,t],n}_deliverResponse(e,t){try{const[n,r]=this.callbacks[e];delete this.callbacks[e],t.error?r(t.error):n(t.result)}catch(e){r.error("Dispatch callback failed: ".concat(e))}}_onMessage(e,t){const n=t.data;let i;n.args=n.args||[],n.service?i="dispatch"===n.service?this._onDispatchMessage(e,n):this.call(n.service,n.method,...n.args):void 0===n.responseId?r.error("Dispatch caught malformed message from a worker: ".concat(JSON.stringify(t))):this._deliverResponse(n.responseId,n),i&&(void 0===n.responseId?r.error("Dispatch message missing required response ID: ".concat(JSON.stringify(t))):i.then((t=>e.postMessage({responseId:n.responseId,result:t})),(t=>e.postMessage({responseId:n.responseId,error:"".concat(t)}))))}_getServiceProvider(e){throw new Error("Could not get provider for ".concat(e,": _getServiceProvider not implemented"))}_onDispatchMessage(e,t){throw new Error("Unimplemented dispatch message handler cannot handle ".concat(t.method," method"))}}},function(e,t,n){const r=n(65),i=n(1),s=n(66),o=n(3),a=n(130),l={coreExample:()=>n(131),pen:()=>n(132),wedo2:()=>n(133),music:()=>n(137),microbit:()=>n(200),text2speech:()=>n(201),translate:()=>n(202),videoSensing:()=>n(203),ev3:()=>n(237),makeymakey:()=>n(239),boost:()=>n(240),gdxfor:()=>n(241),tw:()=>n(244)};e.exports=class{constructor(e){this.nextExtensionWorker=0,this.pendingExtensions=[],this.pendingWorkers=[],this.workerURLs=[],this._loadedExtensions=new Map,this.securityManager=new a,this.vm=e,this.runtime=e.runtime,this.loadingAsyncExtensions=0,this.asyncExtensionsLoadedCallbacks=[],this.builtinExtensions=Object.assign({},l),r.setService("extensions",(e=>{const t={};return t.registerExtensionServiceSync=e.registerExtensionServiceSync.bind(e),t.allocateWorker=e.allocateWorker.bind(e),t.onWorkerInit=e.onWorkerInit.bind(e),t.registerExtensionService=e.registerExtensionService.bind(e),t})(this)).catch((e=>{i.error("ExtensionManager was unable to register extension service: ".concat(JSON.stringify(e)))}))}isExtensionLoaded(e){return this._loadedExtensions.has(e)}isBuiltinExtension(e){return Object.prototype.hasOwnProperty.call(this.builtinExtensions,e)}loadExtensionIdSync(e){if(!this.isBuiltinExtension(e))return void i.warn("Could not find extension ".concat(e," in the built in extensions."));if(this.isExtensionLoaded(e)){const t="Rejecting attempt to load a second extension with ID ".concat(e);return void i.warn(t)}const t=new(this.builtinExtensions[e]())(this.runtime),n=this._registerInternalExtension(t);this._loadedExtensions.set(e,n),this.runtime.compilerRegisterExtension(e,t)}addBuiltinExtension(e,t){this.builtinExtensions[e]=()=>t}_isValidExtensionURL(e){try{const t=new URL(e);return"https:"===t.protocol||"http:"===t.protocol||"data:"===t.protocol||"file:"===t.protocol}catch(e){return!1}}async loadExtensionURL(e){if(this.isBuiltinExtension(e))return void this.loadExtensionIdSync(e);if(this.isExtensionURLLoaded(e))return;if(!this._isValidExtensionURL(e))throw new Error("Invalid extension URL: ".concat(e));this.runtime.setExternalCommunicationMethod("customExtensions",!0),this.loadingAsyncExtensions++;const t=await this.securityManager.getSandboxMode(e),i=await this.securityManager.rewriteExtensionURL(e);if("unsandboxed"===t){const{load:t}=n(245),s=await t(i,this.vm).catch((e=>this._failedLoadingExtensionScript(e))),o=this.nextExtensionWorker++;this.workerURLs[o]=e;for(const e of s){const t=e.getInfo(),n="unsandboxed.".concat(o,".").concat(t.id);r.setServiceSync(n,e),r.callSync("extensions","registerExtensionServiceSync",n),this._loadedExtensions.set(t.id,n)}return void this._finishedLoadingExtensionScript()}let s;if("worker"===t)s=n(250);else{if("iframe"!==t)throw new Error("Invalid sandbox mode: ".concat(t));s=(await n.e(1).then(n.t.bind(null,416,7))).default}return new Promise(((e,t)=>{this.pendingExtensions.push({extensionURL:i,resolve:e,reject:t}),r.addWorker(new s)})).catch((e=>this._failedLoadingExtensionScript(e)))}allAsyncExtensionsLoaded(){if(0!==this.loadingAsyncExtensions)return new Promise(((e,t)=>{this.asyncExtensionsLoadedCallbacks.push({resolve:e,reject:t})}))}refreshBlocks(){const e=Array.from(this._loadedExtensions.values()).map((e=>r.call(e,"getInfo").then((t=>{t=this._prepareExtensionInfo(e,t),r.call("runtime","_refreshExtensionPrimitives",t)})).catch((e=>{i.error("Failed to refresh built-in extension primitives",e)}))));return Promise.all(e)}allocateWorker(){const e=this.nextExtensionWorker++,t=this.pendingExtensions.shift();return this.pendingWorkers[e]=t,this.workerURLs[e]=t.extensionURL,[e,t.extensionURL]}registerExtensionServiceSync(e){const t=r.callSync(e,"getInfo");this._registerExtensionInfo(e,t)}registerExtensionService(e){r.call(e,"getInfo").then((t=>{this._loadedExtensions.set(t.id,e),this._registerExtensionInfo(e,t),this._finishedLoadingExtensionScript()}))}_finishedLoadingExtensionScript(){this.loadingAsyncExtensions--,0===this.loadingAsyncExtensions&&(this.asyncExtensionsLoadedCallbacks.forEach((e=>e.resolve())),this.asyncExtensionsLoadedCallbacks=[])}_failedLoadingExtensionScript(e){throw this.loadingAsyncExtensions--,this.asyncExtensionsLoadedCallbacks.forEach((t=>t.reject(e))),this.asyncExtensionsLoadedCallbacks=[],e}onWorkerInit(e,t){const n=this.pendingWorkers[e];delete this.pendingWorkers[e],t?n.reject(t):n.resolve()}_registerInternalExtension(e){const t=e.getInfo(),n=this.nextExtensionWorker++,i="extension_".concat(n,"_").concat(t.id);return r.setServiceSync(i,e),r.callSync("extensions","registerExtensionServiceSync",i),i}_registerExtensionInfo(e,t){t=this._prepareExtensionInfo(e,t),r.call("runtime","_registerExtensionPrimitives",t).catch((t=>{i.error("Failed to register primitives for extension on service ".concat(e,":"),t)}))}_prepareExtensionInfo(e,t){if(t=Object.assign({},t),!/^[a-z0-9]+$/i.test(t.id))throw new Error("Invalid extension id");return t.name=t.name||t.id,t.blocks=t.blocks||[],t.targetTypes=t.targetTypes||[],t.blocks=t.blocks.reduce(((t,n)=>{try{let r;if("---"===n)r="---";else r=this._prepareBlockInfo(e,n);t.push(r)}catch(e){i.error("Error processing block: ".concat(e.message,", Block:\n").concat(JSON.stringify(n)))}return t}),[]),t.menus=t.menus||{},t.menus=this._prepareMenuInfo(e,t.menus),t}_prepareMenuInfo(e,t){const n=Object.getOwnPropertyNames(t);for(let i=0;i<n.length;i++){const s=n[i];let o=t[s];if(o.items||(o={items:o},t[s]=o),"string"==typeof o.items){const t=o.items,n=r.services[e];o.items=this._getExtensionMenuItems.bind(this,n,t)}}return t}_getExtensionMenuItems(e,t){const n=this.runtime.getEditingTarget()||this.runtime.getTargetForStage(),r=n?n.id:null,i=this.runtime.makeMessageContextForTarget(n),o=e[t].call(e,r).map((e=>{switch(typeof(e=s(e,i))){case"object":return[s(e.text,i),e.value];case"string":return[e,e];default:return e}}));if(!o||o.length<1)throw new Error("Extension menu returned no items: ".concat(t));return o}_prepareBlockInfo(e,t){if(t.blockType===o.XML)return(t=Object.assign({},t)).xml=String(t.xml)||"",t;switch((t=Object.assign({},{blockType:o.COMMAND,terminal:!1,blockAllThreads:!1,arguments:{}},t)).text=t.text||t.opcode,t.blockType){case o.EVENT:t.func&&i.warn('Ignoring function "'.concat(t.func,'" for event block ').concat(t.opcode));break;case o.BUTTON:t.opcode&&i.warn('Ignoring opcode "'.concat(t.opcode,'" for button with text: ').concat(t.text)),t.callFunc=()=>{r.call(e,t.func)};break;case o.LABEL:t.opcode&&i.warn('Ignoring opcode "'.concat(t.opcode,'" for label: ').concat(t.text));break;default:{if(!t.opcode)throw new Error("Missing opcode for block");const n=t.func||t.opcode,s=t.isDynamic?e=>e&&e.mutation&&e.mutation.blockInfo:()=>t,o=(()=>{if(r._isRemoteService(e))return(t,i,s)=>r.call(e,n,t,i,s).then((e=>"number"==typeof e||"string"==typeof e||"boolean"==typeof e?e:"".concat(e)));const t=r.services[e];return t[n]||i.warn("Could not find extension block function called ".concat(n)),(e,r,i)=>t[n](e,r,i)})();t.func=(e,t)=>{const n=s(e);return o(e,t,n)};break}}return t}getExtensionURLs(){const e={};for(const[t,n]of this._loadedExtensions.entries()){if(Object.prototype.hasOwnProperty.call(this.builtinExtensions,t))continue;const r=+n.split(".")[1],i=this.workerURLs[r];"string"==typeof i&&(e[t]=i)}return e}isExtensionURLLoaded(e){return Object.values(this.workerURLs).includes(e)}}},function(e,t,n){"use strict";var r="{",i="}",s=",",o="#",a="<",l=">",c="</",u="/>",d="'",h="offset:",p=["number","date","time","ordinal","duration","spellout"],m=["plural","select","selectordinal"];function f(e,t){var n=e.pattern,r=n.length,s=[],o=e.index,a=g(e,t);for(a&&s.push(a),a&&e.tokens&&e.tokens.push(["text",n.slice(o,e.index)]);e.index<r;){if(n[e.index]===i){if(!t)throw E(e);break}if(t&&e.tagsType&&n.slice(e.index,e.index+c.length)===c)break;s.push(v(e)),o=e.index,(a=g(e,t))&&s.push(a),a&&e.tokens&&e.tokens.push(["text",n.slice(o,e.index)])}return s}function g(e,t){for(var n=e.pattern,s=n.length,l="plural"===t||"selectordinal"===t,c=!!e.tagsType,u="{style}"===t,h="";e.index<s;){var p=n[e.index];if(p===r||p===i||l&&p===o||c&&p===a||u&&y(p.charCodeAt(0)))break;if(p===d)if((p=n[++e.index])===d)h+=p,++e.index;else if(p===r||p===i||l&&p===o||c&&p===a||u)for(h+=p;++e.index<s;)if((p=n[e.index])===d&&n[e.index+1]===d)h+=d,++e.index;else{if(p===d){++e.index;break}h+=p}else h+=d;else h+=p,++e.index}return h}function y(e){return e>=9&&e<=13||32===e||133===e||160===e||6158===e||e>=8192&&e<=8205||8232===e||8233===e||8239===e||8287===e||8288===e||12288===e||65279===e}function b(e){for(var t=e.pattern,n=t.length,r=e.index;e.index<n&&y(t.charCodeAt(e.index));)++e.index;r<e.index&&e.tokens&&e.tokens.push(["space",e.pattern.slice(r,e.index)])}function v(e){var t=e.pattern;if(t[e.index]===o)return e.tokens&&e.tokens.push(["syntax",o]),++e.index,[o];var n=function(e){var t=e.tagsType;if(!t||e.pattern[e.index]!==a)return;if(e.pattern.slice(e.index,e.index+c.length)===c)throw E(e,null,"closing tag without matching opening tag");e.tokens&&e.tokens.push(["syntax",a]);++e.index;var n=S(e,!0);if(!n)throw E(e,"placeholder id");e.tokens&&e.tokens.push(["id",n]);if(b(e),e.pattern.slice(e.index,e.index+u.length)===u)return e.tokens&&e.tokens.push(["syntax",u]),e.index+=u.length,[n,t];if(e.pattern[e.index]!==l)throw E(e,l);e.tokens&&e.tokens.push(["syntax",l]);++e.index;var r=f(e,t),i=e.index;if(e.pattern.slice(e.index,e.index+c.length)!==c)throw E(e,c+n+l);e.tokens&&e.tokens.push(["syntax",c]);e.index+=c.length;var s=S(e,!0);s&&e.tokens&&e.tokens.push(["id",s]);if(n!==s)throw e.index=i,E(e,c+n+l,c+s+l);if(b(e),e.pattern[e.index]!==l)throw E(e,l);e.tokens&&e.tokens.push(["syntax",l]);return++e.index,[n,t,{children:r}]}(e);if(n)return n;if(t[e.index]!==r)throw E(e,r);e.tokens&&e.tokens.push(["syntax",r]),++e.index,b(e);var d=S(e);if(!d)throw E(e,"placeholder id");e.tokens&&e.tokens.push(["id",d]),b(e);var m=t[e.index];if(m===i)return e.tokens&&e.tokens.push(["syntax",i]),++e.index,[d];if(m!==s)throw E(e,s+" or "+i);e.tokens&&e.tokens.push(["syntax",s]),++e.index,b(e);var g,y=S(e);if(!y)throw E(e,"placeholder type");if(e.tokens&&e.tokens.push(["type",y]),b(e),(m=t[e.index])===i){if(e.tokens&&e.tokens.push(["syntax",i]),"plural"===y||"selectordinal"===y||"select"===y)throw E(e,y+" sub-messages");return++e.index,[d,y]}if(m!==s)throw E(e,s+" or "+i);if(e.tokens&&e.tokens.push(["syntax",s]),++e.index,b(e),"plural"===y||"selectordinal"===y){var v=function(e){var t=e.pattern,n=t.length,r=0;if(t.slice(e.index,e.index+h.length)===h){e.tokens&&e.tokens.push(["offset","offset"],["syntax",":"]),e.index+=h.length,b(e);for(var i=e.index;e.index<n&&k(t.charCodeAt(e.index));)++e.index;if(i===e.index)throw E(e,"offset number");e.tokens&&e.tokens.push(["number",t.slice(i,e.index)]),r=+t.slice(i,e.index)}return r}(e);b(e),g=[d,y,v,T(e,y)]}else if("select"===y)g=[d,y,T(e,y)];else if(p.indexOf(y)>=0)g=[d,y,w(e)];else{var x=e.index,A=w(e);b(e),t[e.index]===r&&(e.index=x,A=T(e,y)),g=[d,y,A]}if(b(e),t[e.index]!==i)throw E(e,i);return e.tokens&&e.tokens.push(["syntax",i]),++e.index,g}function S(e,t){for(var n=e.pattern,c=n.length,u="";e.index<c;){var h=n[e.index];if(h===r||h===i||h===s||h===o||h===d||y(h.charCodeAt(0))||t&&(h===a||h===l||"/"===h))break;u+=h,++e.index}return u}function w(e){var t=e.index,n=g(e,"{style}");if(!n)throw E(e,"placeholder style name");return e.tokens&&e.tokens.push(["style",e.pattern.slice(t,e.index)]),n}function k(e){return e>=48&&e<=57}function T(e,t){for(var n=e.pattern,r=n.length,s={};e.index<r&&n[e.index]!==i;){var o=S(e);if(!o)throw E(e,"sub-message selector");e.tokens&&e.tokens.push(["selector",o]),b(e),s[o]=x(e,t),b(e)}if(!s.other&&m.indexOf(t)>=0)throw E(e,null,null,'"other" sub-message must be specified in '+t);return s}function x(e,t){if(e.pattern[e.index]!==r)throw E(e,r+" to start sub-message");e.tokens&&e.tokens.push(["syntax",r]),++e.index;var n=f(e,t);if(e.pattern[e.index]!==i)throw E(e,i+" to end sub-message");return e.tokens&&e.tokens.push(["syntax",i]),++e.index,n}function E(e,t,n,r){var i=e.pattern,s=i.slice(0,e.index).split(/\r?\n/),o=e.index,a=s.length,l=s.slice(-1)[0].length;return n=n||(e.index>=i.length?"end of message pattern":S(e)||i[e.index]),r||(r=function(e,t){return e?"Expected "+e+" but found "+t:"Unexpected "+t+" found"}(t,n)),new A(r+=" in "+i.replace(/\r?\n/g,"\n"),t,n,o,a,l)}function A(e,t,n,r,i,s){Error.call(this,e),this.name="SyntaxError",this.message=e,this.expected=t,this.found=n,this.offset=r,this.line=i,this.column=s}t=e.exports=function(e,t){return f({pattern:String(e),index:0,tagsType:t&&t.tagsType||null,tokens:t&&t.tokens||null},"")},A.prototype=Object.create(Error.prototype),t.SyntaxError=A},function(e,t,n){"use strict";var r=n(67),i=n(68),s=n(69);function o(e,t,n,r,i){var s=e.map((function(e){return function(e,t,n,r,i){if("string"==typeof e){var s=e;return function(){return s}}var l,c=e[0],u=e[1];if(t&&"#"===e[0]){c=t[0];var d=t[2],p=(r.number||h.number)([c,"number"],n);return function(e){return p(a(c,e)-d,e)}}"plural"===u||"selectordinal"===u?(l={},Object.keys(e[3]).forEach((function(t){l[t]=o(e[3][t],e,n,r,i)})),e=[e[0],e[1],e[2],l]):e[2]&&"object"==typeof e[2]&&(l={},Object.keys(e[2]).forEach((function(t){l[t]=o(e[2][t],e,n,r,i)})),e=[e[0],e[1],l]);var m=u&&(r[u]||h[u]);if(m){var f=m(e,n);return function(e){return f(a(c,e),e)}}return i?function(e){return String(a(c,e))}:function(e){return a(c,e)}}(e,t,n,r,i)}));return i?1===s.length?s[0]:function(e){for(var t="",n=0;n<s.length;++n)t+=s[n](e);return t}:function(e){return s.reduce((function(t,n){return t.concat(n(e))}),[])}}function a(e,t){if(t&&e in t)return t[e];for(var n=e.split("."),r=t,i=0,s=n.length;r&&i<s;++i)r=r[n[i]];return r}function l(e,t){var n=e[2],i=r.number[n]||r.parseNumberPattern(n)||r.number.default;return new Intl.NumberFormat(t,i).format}function c(e,t){var n=e[1],i=e[2],s=r[n][i]||r.parseDatePattern(i)||r[n].default;return new Intl.DateTimeFormat(t,s).format}function u(e,t){var n,r="selectordinal"===e[1]?"ordinal":"cardinal",o=e[2],a=e[3];if(Intl.PluralRules&&Intl.PluralRules.supportedLocalesOf(t).length>0)n=new Intl.PluralRules(t,{type:r});else{var l=i(t,s),c=l&&s[l][r]||d;n={select:c}}return function(e,t){return(a["="+ +e]||a[n.select(e-o)]||a.other)(t)}}function d(){return"other"}(t=e.exports=function(e,t,n){return o(e,null,t||"en",n||{},!0)}).toParts=function(e,t,n){return o(e,null,t||"en",n||{},!1)};var h={number:l,ordinal:l,spellout:l,duration:function(e,t){var n=e[2],i=r.duration[n]||r.duration.default,s=new Intl.NumberFormat(t,i.seconds).format,o=new Intl.NumberFormat(t,i.minutes).format,a=new Intl.NumberFormat(t,i.hours).format,l=/^fi$|^fi-|^da/.test(String(t))?".":":";return function(e,t){if(e=+e,!isFinite(e))return s(e);var n=~~(e/60/60),r=~~(e/60%60),i=(n?a(Math.abs(n))+l:"")+o(Math.abs(r))+l+s(Math.abs(e%60));return e<0?a(-1).replace(a(1),i):i}},date:c,time:c,plural:u,selectordinal:u,select:function(e,t){var n=e[2];return function(e,t){return(n[e]||n.other)(t)}}};t.types=h},function(e,t){e.exports=class{getSandboxMode(e){return Promise.resolve("worker")}canLoadExtensionFromProject(e){return Promise.resolve(!1)}rewriteExtensionURL(e){return Promise.resolve(e)}canFetch(e){return Promise.resolve(!0)}canOpenWindow(e){return Promise.resolve(!0)}canRedirect(e){return Promise.resolve(!0)}canRecordAudio(){return Promise.resolve(!0)}canRecordVideo(){return Promise.resolve(!0)}canReadClipboard(){return Promise.resolve(!0)}canNotify(){return Promise.resolve(!0)}canGeolocate(){return Promise.resolve(!0)}canEmbed(e){return Promise.resolve(!0)}}},function(e,t,n){const r=n(3),i=n(4);e.exports=class{constructor(e){this.runtime=e}getInfo(){return{id:"coreExample",name:"CoreEx",blocks:[{func:"MAKE_A_VARIABLE",blockType:r.BUTTON,text:"make a variable (CoreEx)"},{opcode:"exampleOpcode",blockType:r.REPORTER,text:"example block"},{opcode:"exampleWithInlineImage",blockType:r.COMMAND,text:"block with image [CLOCKWISE] inline",arguments:{CLOCKWISE:{type:i.IMAGE,dataURI:'data:image/svg+xml,%3Csvg id="rotate-counter-clockwise" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%233d79cc;%7D.cls-2%7Bfill:%23fff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3Erotate-counter-clockwise%3C/title%3E%3Cpath class="cls-1" d="M22.68,12.2a1.6,1.6,0,0,1-1.27.63H13.72a1.59,1.59,0,0,1-1.16-2.58l1.12-1.41a4.82,4.82,0,0,0-3.14-.77,4.31,4.31,0,0,0-2,.8,4.25,4.25,0,0,0-1.34,1.73,5.06,5.06,0,0,0,.54,4.62A5.58,5.58,0,0,0,12,17.74h0a2.26,2.26,0,0,1-.16,4.52A10.25,10.25,0,0,1,3.74,18,10.14,10.14,0,0,1,2.25,8.78,9.7,9.7,0,0,1,5.08,4.64,9.92,9.92,0,0,1,9.66,2.5a10.66,10.66,0,0,1,7.72,1.68l1.08-1.35a1.57,1.57,0,0,1,1.24-.6,1.6,1.6,0,0,1,1.54,1.21l1.7,7.37A1.57,1.57,0,0,1,22.68,12.2Z"/%3E%3Cpath class="cls-2" d="M21.38,11.83H13.77a.59.59,0,0,1-.43-1l1.75-2.19a5.9,5.9,0,0,0-4.7-1.58,5.07,5.07,0,0,0-4.11,3.17A6,6,0,0,0,7,15.77a6.51,6.51,0,0,0,5,2.92,1.31,1.31,0,0,1-.08,2.62,9.3,9.3,0,0,1-7.35-3.82A9.16,9.16,0,0,1,3.17,9.12,8.51,8.51,0,0,1,5.71,5.4,8.76,8.76,0,0,1,9.82,3.48a9.71,9.71,0,0,1,7.75,2.07l1.67-2.1a.59.59,0,0,1,1,.21L22,11.08A.59.59,0,0,1,21.38,11.83Z"/%3E%3C/svg%3E'}}}]}}exampleOpcode(){const e=this.runtime.getTargetForStage();return e?e.getName():"no stage yet"}exampleWithInlineImage(){}}},function(e,t,n){const r=n(4),i=n(3),s=n(42),o=n(2),a=n(12),l=n(23),c=n(6),u=n(5),d=n(1),h=n(13),p="color",m="saturation",f="brightness",g="transparency";class y{constructor(e){this.runtime=e,this._penDrawableId=-1,this._penSkinId=-1,this._onTargetCreated=this._onTargetCreated.bind(this),this._onTargetMoved=this._onTargetMoved.bind(this),e.on("targetWasCreated",this._onTargetCreated),e.on("RUNTIME_DISPOSED",this.clear.bind(this))}static get DEFAULT_PEN_STATE(){return{penDown:!1,color:66.66,saturation:100,brightness:100,transparency:0,_shade:50,penAttributes:{color4f:[0,0,1,1],diameter:1}}}static get PEN_SIZE_RANGE(){return{min:1,max:1200}}static get STATE_KEY(){return"Scratch.pen"}_clampPenSize(e){return this.runtime.renderer&&this.runtime.renderer.useHighQualityRender||!this.runtime.runtimeOptions.miscLimits?Math.max(0,e):u.clamp(e,y.PEN_SIZE_RANGE.min,y.PEN_SIZE_RANGE.max)}_getPenLayerID(){return this._penSkinId<0&&this.runtime.renderer&&(this._penSkinId=this.runtime.renderer.createPenSkin(),this._penDrawableId=this.runtime.renderer.createDrawable(h.PEN_LAYER),this.runtime.renderer.updateDrawableSkinId(this._penDrawableId,this._penSkinId)),this._penSkinId}_getPenState(e){let t=e._customState["Scratch.pen"];return t||(t=a.simple(y.DEFAULT_PEN_STATE),e.setCustomState(y.STATE_KEY,t)),t}_onTargetCreated(e,t){if(t){const n=t.getCustomState(y.STATE_KEY);n&&(e.setCustomState(y.STATE_KEY,a.simple(n)),n.penDown&&(e.onTargetMoved=this._onTargetMoved))}}_onTargetMoved(e,t,n,r){if(!r){const r=this._getPenLayerID();if(r>=0){const i=this._getPenState(e);this.runtime.renderer.penLine(r,i.penAttributes,t,n,e.x,e.y),this.runtime.requestRedraw()}}}_wrapColor(e){return u.wrapClamp(e,0,100)}_initColorParam(){return[{text:c({id:"pen.colorMenu.color",default:"color",description:"label for color element in color picker for pen extension"}),value:p},{text:c({id:"pen.colorMenu.saturation",default:"saturation",description:"label for saturation element in color picker for pen extension"}),value:m},{text:c({id:"pen.colorMenu.brightness",default:"brightness",description:"label for brightness element in color picker for pen extension"}),value:f},{text:c({id:"pen.colorMenu.transparency",default:"transparency",description:"label for transparency element in color picker for pen extension"}),value:g}]}_clampColorParam(e){return u.clamp(e,0,100)}_alphaToTransparency(e){return 100*(1-e)}_transparencyToAlpha(e){return 1-e/100}getInfo(){return{id:"pen",name:c({id:"pen.categoryName",default:"Pen",description:"Label for the pen extension category"}),blockIconURI:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+cGVuLWljb248L3RpdGxlPjxnIHN0cm9rZT0iIzU3NUU3NSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxwYXRoIGQ9Ik04Ljc1MyAzNC42MDJsLTQuMjUgMS43OCAxLjc4My00LjIzN2MxLjIxOC0yLjg5MiAyLjkwNy01LjQyMyA1LjAzLTcuNTM4TDMxLjA2NiA0LjkzYy44NDYtLjg0MiAyLjY1LS40MSA0LjAzMi45NjcgMS4zOCAxLjM3NSAxLjgxNiAzLjE3My45NyA0LjAxNUwxNi4zMTggMjkuNTljLTIuMTIzIDIuMTE2LTQuNjY0IDMuOC03LjU2NSA1LjAxMiIgZmlsbD0iI0ZGRiIvPjxwYXRoIGQ9Ik0yOS40MSA2LjExcy00LjQ1LTIuMzc4LTguMjAyIDUuNzcyYy0xLjczNCAzLjc2Ni00LjM1IDEuNTQ2LTQuMzUgMS41NDYiLz48cGF0aCBkPSJNMzYuNDIgOC44MjVjMCAuNDYzLS4xNC44NzMtLjQzMiAxLjE2NGwtOS4zMzUgOS4zYy4yODItLjI5LjQxLS42NjguNDEtMS4xMiAwLS44NzQtLjUwNy0xLjk2My0xLjQwNi0yLjg2OC0xLjM2Mi0xLjM1OC0zLjE0Ny0xLjgtNC4wMDItLjk5TDMwLjk5IDUuMDFjLjg0NC0uODQgMi42NS0uNDEgNC4wMzUuOTYuODk4LjkwNCAxLjM5NiAxLjk4MiAxLjM5NiAyLjg1NU0xMC41MTUgMzMuNzc0Yy0uNTczLjMwMi0xLjE1Ny41Ny0xLjc2NC44M0w0LjUgMzYuMzgybDEuNzg2LTQuMjM1Yy4yNTgtLjYwNC41My0xLjE4Ni44MzMtMS43NTcuNjkuMTgzIDEuNDQ4LjYyNSAyLjEwOCAxLjI4Mi42Ni42NTggMS4xMDIgMS40MTIgMS4yODcgMi4xMDIiIGZpbGw9IiM0Qzk3RkYiLz48cGF0aCBkPSJNMzYuNDk4IDguNzQ4YzAgLjQ2NC0uMTQuODc0LS40MzMgMS4xNjVsLTE5Ljc0MiAxOS42OGMtMi4xMyAyLjExLTQuNjczIDMuNzkzLTcuNTcyIDUuMDFMNC41IDM2LjM4bC45NzQtMi4zMTYgMS45MjUtLjgwOGMyLjg5OC0xLjIxOCA1LjQ0LTIuOSA3LjU3LTUuMDFsMTkuNzQzLTE5LjY4Yy4yOTItLjI5Mi40MzItLjcwMi40MzItMS4xNjUgMC0uNjQ2LS4yNy0xLjQtLjc4LTIuMTIyLjI1LjE3Mi41LjM3Ny43MzcuNjE0Ljg5OC45MDUgMS4zOTYgMS45ODMgMS4zOTYgMi44NTYiIGZpbGw9IiM1NzVFNzUiIG9wYWNpdHk9Ii4xNSIvPjxwYXRoIGQ9Ik0xOC40NSAxMi44M2MwIC41LS40MDQuOTA1LS45MDQuOTA1cy0uOTA1LS40MDUtLjkwNS0uOTA0YzAtLjUuNDA3LS45MDMuOTA2LS45MDMuNSAwIC45MDQuNDA0LjkwNC45MDR6IiBmaWxsPSIjNTc1RTc1Ii8+PC9nPjwvc3ZnPg==",blocks:[{blockType:i.LABEL,text:c({id:"tw.pen.stageSelected",default:"Stage selected: less pen blocks",description:"Label that appears in the Pen category when the stage is selected"}),filter:[s.STAGE]},{opcode:"clear",blockType:i.COMMAND,text:c({id:"pen.clear",default:"erase all",description:"erase all pen trails and stamps"})},{opcode:"stamp",blockType:i.COMMAND,text:c({id:"pen.stamp",default:"stamp",description:"render current costume on the background"}),filter:[s.SPRITE]},{opcode:"penDown",blockType:i.COMMAND,text:c({id:"pen.penDown",default:"pen down",description:"start leaving a trail when the sprite moves"}),filter:[s.SPRITE]},{opcode:"penUp",blockType:i.COMMAND,text:c({id:"pen.penUp",default:"pen up",description:"stop leaving a trail behind the sprite"}),filter:[s.SPRITE]},{opcode:"setPenColorToColor",blockType:i.COMMAND,text:c({id:"pen.setColor",default:"set pen color to [COLOR]",description:"set the pen color to a particular (RGB) value"}),arguments:{COLOR:{type:r.COLOR}},filter:[s.SPRITE]},{opcode:"changePenColorParamBy",blockType:i.COMMAND,text:c({id:"pen.changeColorParam",default:"change pen [COLOR_PARAM] by [VALUE]",description:"change the state of a pen color parameter"}),arguments:{COLOR_PARAM:{type:r.STRING,menu:"colorParam",defaultValue:p},VALUE:{type:r.NUMBER,defaultValue:10}},filter:[s.SPRITE]},{opcode:"setPenColorParamTo",blockType:i.COMMAND,text:c({id:"pen.setColorParam",default:"set pen [COLOR_PARAM] to [VALUE]",description:"set the state for a pen color parameter e.g. saturation"}),arguments:{COLOR_PARAM:{type:r.STRING,menu:"colorParam",defaultValue:p},VALUE:{type:r.NUMBER,defaultValue:50}},filter:[s.SPRITE]},{opcode:"changePenSizeBy",blockType:i.COMMAND,text:c({id:"pen.changeSize",default:"change pen size by [SIZE]",description:"change the diameter of the trail left by a sprite"}),arguments:{SIZE:{type:r.NUMBER,defaultValue:1}},filter:[s.SPRITE]},{opcode:"setPenSizeTo",blockType:i.COMMAND,text:c({id:"pen.setSize",default:"set pen size to [SIZE]",description:"set the diameter of a trail left by a sprite"}),arguments:{SIZE:{type:r.NUMBER,defaultValue:1}},filter:[s.SPRITE]},{opcode:"setPenShadeToNumber",blockType:i.COMMAND,text:c({id:"pen.setShade",default:"set pen shade to [SHADE]",description:"legacy pen blocks - set pen shade"}),arguments:{SHADE:{type:r.NUMBER,defaultValue:1}},hideFromPalette:!0},{opcode:"changePenShadeBy",blockType:i.COMMAND,text:c({id:"pen.changeShade",default:"change pen shade by [SHADE]",description:"legacy pen blocks - change pen shade"}),arguments:{SHADE:{type:r.NUMBER,defaultValue:1}},hideFromPalette:!0},{opcode:"setPenHueToNumber",blockType:i.COMMAND,text:c({id:"pen.setHue",default:"set pen color to [HUE]",description:"legacy pen blocks - set pen color to number"}),arguments:{HUE:{type:r.NUMBER,defaultValue:1}},hideFromPalette:!0},{opcode:"changePenHueBy",blockType:i.COMMAND,text:c({id:"pen.changeHue",default:"change pen color by [HUE]",description:"legacy pen blocks - change pen color"}),arguments:{HUE:{type:r.NUMBER,defaultValue:1}},hideFromPalette:!0}],menus:{colorParam:{acceptReporters:!0,items:this._initColorParam()}}}}clear(){const e=this._getPenLayerID();e>=0&&(this.runtime.renderer.penClear(e),this.runtime.requestRedraw())}stamp(e,t){this._stamp(t.target)}_stamp(e){const t=this._getPenLayerID();t>=0&&(this.runtime.renderer.penStamp(t,e.drawableID),this.runtime.requestRedraw())}penDown(e,t){this._penDown(t.target)}_penDown(e){const t=this._getPenState(e);t.penDown||(t.penDown=!0,e.onTargetMoved=this._onTargetMoved);const n=this._getPenLayerID();n>=0&&(this.runtime.renderer.penPoint(n,t.penAttributes,e.x,e.y),this.runtime.requestRedraw())}penUp(e,t){this._penUp(t.target)}_penUp(e){const t=this._getPenState(e);t.penDown&&(t.penDown=!1,e.onTargetMoved=null)}setPenColorToColor(e,t){this._setPenColorToColor(e.COLOR,t.target)}_setPenColorToColor(e,t){const n=this._getPenState(t),r=o.toRgbColorObject(e),i=l.rgbToHsv(r);n.color=i.h/360*100,n.saturation=100*i.s,n.brightness=100*i.v,Object.prototype.hasOwnProperty.call(r,"a")?n.transparency=100*(1-r.a/255):n.transparency=0,n._shade=n.brightness/2,this._updatePenColor(n)}_updatePenColor(e){const t=l.hsvToRgb({h:360*e.color/100,s:e.saturation/100,v:e.brightness/100});e.penAttributes.color4f[0]=t.r/255,e.penAttributes.color4f[1]=t.g/255,e.penAttributes.color4f[2]=t.b/255,e.penAttributes.color4f[3]=this._transparencyToAlpha(e.transparency)}_setOrChangeColorParam(e,t,n,r){switch(e){case p:n.color=this._wrapColor(t+(r?n.color:0));break;case m:n.saturation=this._clampColorParam(t+(r?n.saturation:0));break;case f:n.brightness=this._clampColorParam(t+(r?n.brightness:0));break;case g:n.transparency=this._clampColorParam(t+(r?n.transparency:0));break;default:d.warn("Tried to set or change unknown color parameter: ".concat(e))}this._updatePenColor(n)}changePenColorParamBy(e,t){const n=this._getPenState(t.target);this._setOrChangeColorParam(e.COLOR_PARAM,o.toNumber(e.VALUE),n,!0)}setPenColorParamTo(e,t){const n=this._getPenState(t.target);this._setOrChangeColorParam(e.COLOR_PARAM,o.toNumber(e.VALUE),n,!1)}changePenSizeBy(e,t){this._changePenSizeBy(o.toNumber(e.SIZE),t.target)}_changePenSizeBy(e,t){const n=this._getPenState(t).penAttributes;n.diameter=this._clampPenSize(n.diameter+e)}setPenSizeTo(e,t){this._setPenSizeTo(o.toNumber(e.SIZE),t.target)}_setPenSizeTo(e,t){this._getPenState(t).penAttributes.diameter=this._clampPenSize(e)}setPenHueToNumber(e,t){this._setPenHueToNumber(o.toNumber(e.HUE),t.target)}_setPenHueToNumber(e,t){const n=this._getPenState(t),r=e/2;this._setOrChangeColorParam(p,r,n,!1),this._setOrChangeColorParam(g,0,n,!1),this._legacyUpdatePenColor(n)}changePenHueBy(e,t){this._changePenHueBy(o.toNumber(e.HUE),t.target)}_changePenHueBy(e,t){const n=this._getPenState(t),r=e/2;this._setOrChangeColorParam(p,r,n,!0),this._legacyUpdatePenColor(n)}setPenShadeToNumber(e,t){this._setPenShadeToNumber(o.toNumber(e.SHADE),t.target)}_setPenShadeToNumber(e,t){const n=this._getPenState(t);let r=o.toNumber(e);r%=200,r<0&&(r+=200),n._shade=r,this._legacyUpdatePenColor(n)}changePenShadeBy(e,t){this._changePenShadeBy(e.SHADE,t.target)}_changePenShadeBy(e,t){const n=this._getPenState(t),r=o.toNumber(e);this._setPenShadeToNumber(n._shade+r,t)}_legacyUpdatePenColor(e){let t=l.hsvToRgb({h:360*e.color/100,s:1,v:1});const n=e._shade>100?200-e._shade:e._shade;t=n<50?l.mixRgb(l.RGB_BLACK,t,(10+n)/60):l.mixRgb(t,l.RGB_WHITE,(n-50)/60);const r=l.rgbToHsv(t);e.color=100*r.h/360,e.saturation=100*r.s,e.brightness=100*r.v,this._updatePenColor(e)}}e.exports=y},function(e,t,n){const r=n(4),i=n(3),s=n(2),o=n(6),a=n(23),l=n(31),c=n(15),u=n(5),d=n(43),h=n(1),p="00001523-1212-efde-1523-785feabcd123",m="00004f0e-1212-efde-1523-785feabcd123",f="00001527-1212-efde-1523-785feabcd123",g="00001528-1212-efde-1523-785feabcd123",y="00001560-1212-efde-1523-785feabcd123",b="00001563-1212-efde-1523-785feabcd123",v="00001565-1212-efde-1523-785feabcd123",S=100,w=1,k=23,T=34,x=35,E=6,A=5,C=1,I=2,O=3,M=4,N={TILT:0,DISTANCE:0,LED:1},R={TILT:0,DISTANCE:1,LED:0};class D{constructor(e,t){this._parent=e,this._index=t,this._direction=1,this._power=100,this._isOn=!1,this._pendingTimeoutId=null,this._pendingTimeoutStartTime=null,this._pendingTimeoutDelay=null,this.startBraking=this.startBraking.bind(this),this.turnOff=this.turnOff.bind(this)}static get BRAKE_TIME_MS(){return 1e3}get direction(){return this._direction}set direction(e){this._direction=e<0?-1:1}get power(){return this._power}set power(e){const t=Math.max(0,Math.min(e,100));if(0===t)this._power=0;else{const e=100/t;this._power=30+70/e}}get isOn(){return this._isOn}get pendingTimeoutStartTime(){return this._pendingTimeoutStartTime}get pendingTimeoutDelay(){return this._pendingTimeoutDelay}turnOn(){const e=this._parent.generateOutputCommand(this._index+1,C,[this._power*this._direction]);this._parent.send(v,e),this._isOn=!0,this._clearTimeout()}turnOnFor(e){0!==this._power&&(e=Math.max(0,e),this.turnOn(),this._setNewTimeout(this.startBraking,e))}startBraking(){if(0===this._power)return;const e=this._parent.generateOutputCommand(this._index+1,C,[127]);this._parent.send(v,e),this._isOn=!1,this._setNewTimeout(this.turnOff,D.BRAKE_TIME_MS)}turnOff(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(0===this._power)return;const t=this._parent.generateOutputCommand(this._index+1,C,[0]);this._parent.send(v,t,e),this._isOn=!1}_clearTimeout(){null!==this._pendingTimeoutId&&(clearTimeout(this._pendingTimeoutId),this._pendingTimeoutId=null,this._pendingTimeoutStartTime=null,this._pendingTimeoutDelay=null)}_setNewTimeout(e,t){this._clearTimeout();const n=setTimeout((()=>{this._pendingTimeoutId===n&&(this._pendingTimeoutId=null,this._pendingTimeoutStartTime=null,this._pendingTimeoutDelay=null),e()}),t);this._pendingTimeoutId=n,this._pendingTimeoutStartTime=Date.now(),this._pendingTimeoutDelay=t}}class P{constructor(e,t){this._runtime=e,this._runtime.on("PROJECT_STOP_ALL",this.stopAll.bind(this)),this._extensionId=t,this._ports=["none","none"],this._motors=[null,null],this._sensors={tiltX:0,tiltY:0,distance:0},this._ble=null,this._runtime.registerPeripheralExtension(t,this),this._rateLimiter=new d(20),this._batteryLevelIntervalId=null,this.reset=this.reset.bind(this),this._onConnect=this._onConnect.bind(this),this._onMessage=this._onMessage.bind(this),this._checkBatteryLevel=this._checkBatteryLevel.bind(this)}get tiltX(){return this._sensors.tiltX}get tiltY(){return this._sensors.tiltY}get distance(){return this._sensors.distance}motor(e){return this._motors[e]}stopAllMotors(){this._motors.forEach((e=>{e&&e.turnOff(!1)}))}setLED(e){const t=[e>>16&255,e>>8&255,255&e],n=this.generateOutputCommand(E,M,t);return this.send(v,n)}setLEDMode(){const e=this.generateInputCommand(E,k,N.LED,0,R.LED,!1);return this.send(b,e)}stopLED(){const e=this.generateOutputCommand(E,M,[0,0,0]);return this.send(v,e)}playTone(e,t){const n=this.generateOutputCommand(A,I,[e,e>>8,t,t>>8]);return this.send(v,n)}stopTone(){const e=this.generateOutputCommand(A,O);return this.send(v,e,!1)}stopAll(){this.isConnected()&&(this.stopTone(),this.stopAllMotors())}scan(){this._ble&&this._ble.disconnect(),this._ble=new l(this._runtime,this._extensionId,{filters:[{services:[p]}],optionalServices:[m]},this._onConnect,this.reset)}connect(e){this._ble&&this._ble.connectPeripheral(e)}disconnect(){this._ble&&this._ble.disconnect(),this.reset()}reset(){this._ports=["none","none"],this._motors=[null,null],this._sensors={tiltX:0,tiltY:0,distance:0},this._batteryLevelIntervalId&&(window.clearInterval(this._batteryLevelIntervalId),this._batteryLevelIntervalId=null)}isConnected(){let e=!1;return this._ble&&(e=this._ble.isConnected()),e}send(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.isConnected()?n&&!this._rateLimiter.okayToSend()?Promise.resolve():this._ble.write(m,e,c.uint8ArrayToBase64(t),"base64"):Promise.resolve()}generateOutputCommand(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=[e,t];return n&&(r=r.concat(n.length).concat(n)),r}generateInputCommand(e,t,n,r,i,s){return[1,2,e,t,n,r,0,0,0,i,s?1:0]}_onConnect(){this.setLEDMode(),this.setLED(255),this._ble.startNotifications(p,f,this._onMessage),this._batteryLevelIntervalId=window.setInterval(this._checkBatteryLevel,5e3)}_onMessage(e){const t=c.base64ToUint8Array(e);switch(t[0]){case 1:case 2:{const e=t[0];0===t[1]?this._clearPort(e):this._registerSensorOrMotor(e,t[3]);break}default:{const e=t[1],n=this._ports[e-1];n===x&&(this._sensors.distance=t[2]),n===T&&(this._sensors.tiltX=t[2],this._sensors.tiltY=t[3]);break}}}_checkBatteryLevel(){this._ble.read(p,g,!1)}_registerSensorOrMotor(e,t){if(this._ports[e-1]=t,t===w)this._motors[e-1]=new D(this,e-1);else{const n=t===x?"DISTANCE":"TILT",r=this.generateInputCommand(e,t,N[n],1,R[n],!0);this.send(b,r),this._ble.startNotifications(m,y,this._onMessage)}}_clearPort(e){const t=this._ports[e-1];t===T&&(this._sensors.tiltX=this._sensors.tiltY=0),t===x&&(this._sensors.distance=0),this._ports[e-1]="none",this._motors[e-1]=null}}const L="motor",B="motor A",z="motor B",U="all motors",j="this way",F="that way",W="reverse",V="up",G="down",q="left",Y="right",H="any";class _{static get EXTENSION_ID(){return"wedo2"}static get TILT_THRESHOLD(){return 15}constructor(e){this.runtime=e,this._peripheral=new P(this.runtime,_.EXTENSION_ID)}getInfo(){return{id:_.EXTENSION_ID,name:"WeDo 2.0",blockIconURI:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAABYlAAAWJQFJUiTwAAAF8klEQVR4Ae2cbWxTVRjH/7ctbVc2tyEMNpWBk0VIkLcEjSAQgglTE5HEaKqJi1E/mbCP/dJA0kQbvzgTQ0Ki2T7V6AeYGoEPLJmGKPiyzZDwEpYJCHSbQIcbdLvres1zOa13Xbvdu2eTDp9fst329Lnn5XfPPfece7tphmFAmDkuccdDBDIRgUxEIBMRyEQEMhGBTEQgExHIRAQyEYFMRCATEchEBDIRgUxEIBMRyEQEMhGBTEQgExHIxMPNIByNVQBoBUDb7kgo2KTS9wBoUmFNkVCwW6U3A1gP4JJKHwxHY/S+WcW2RkLBVhV7AMAOAIMAGlWstbyOSCh4QMU2Uoy1PBVL+a7IqZu1vOZIKNg20/azBarGvKxebw9HY22RULADwBFLTBcATQnZl4lVEimN4ssteXQrQfstebQpmW1q30xshyqvxRLbofYnYW9ZYgeV8C5LLOWlzbTxM3ouHI7GPgSwWx3Z0syBSBku6IYnlTbM+uQenJQaMnKHDaqAFnDrcCFbl3G1defEjas0a4N/Vz10OybyvapfrSX1sjpo+WIz0ME7QL3djgtHPTAcjb2mepw/b2ZaGh5NL5RnofR8R99dIC5fHusK5JsrCUpm7TSx21XvbcwTNwnbAsPR2GcA3qaG+H0LsHlDPZ7fca/ujZ+cRW9/Em5vCXzlNVhQUjFpf/3OTSRvXkKJz43Xt1bh1S1LUeq/5+njQ9/iVmLIfL1ieRU2b1iFtavztXNu6TrTi8PfnYI67WdPoOp5przV9Y8iuHdb9rOW9uumPI+vDIElddBckztPOqVn5X36Xj1WVQeynx1sOWbK83jc2PviM/dFXIYNax9H55leXLoyYHsfWwI14JCRRx7x5ckBU1oheYQ+1G9u39lVM0Hej7+cR7w/Yb7e9+5LqChfaLvixcK088BwNNZkAOV02ubK6+odwt3RcfOULSSPGEveG48bNj08If3kqXPmdtO6unkpDzYn0u/TLxrzcumJJ80Ut79sygzoFF6/siw75mUYupOEpmnY0/A0pw33FTsCa+hX5oJhZXgkZb5zub2O20CnL7EwkPeCPm+wI7CEBvi5wuOZ36tJW7X3uGXJXAgxk8P4eNpRPEvgskqfuR0Z/BNGejxvDM3/5gs0pboWv+motqybCc+tqUCzz43kaBJ/X+2eMjZ3ClNsjIzo5ioknXZ2b4AlkKYltLJoaY9jOJm/B0KJbtg4c4F/XOmH3+dF9dLKbBo1OD6QQGV56YQ55ODtO0jcHkZ1VSX8/n9nB9S7RkZ1rFy+NG8ZR9s70TeQQKDEh7vJUdt1Y9/OopXFB2/WcbMpyOexE9mlFS21aLlHMmKHfzBl0QT/hV2bzM9oLXv0xG8YGR0zpdLEn6RT2k+/XjDzoLX2G3u3TZBLUyral/Z5qCyAK1f/sl2/or+IWNel1Eji3MWrpjyCZHWqdNrSe6ieSHFERl4mP+q5GehgHGvvRGal5XI5uzU47f3A/R99YTgdF2wXrmkolr9ToZ5NvTjT4yOhoC2T057CJM/r9WDxoqmXa07R9THcuDVcMO8bt4ag6ynULKvkFjWBTLl0ugZKvNlyqLeSQKfYGgOpgXt2b5zVhlzrS+Dr451YvKg0b95txztxvS8xZ+VuXFuLJ5+oNgV+9c3PuHDxGs6cu+w4v//9RJo6x5bN9UgbBo4cPY1U6j+cSD8orFvzGFYuX4KxsRQGbth6FCICc9m5dY05HtN46AQRqPB5PWjY+ZT5RnMwkxGBFh5ZVmle9Z3MrGbjwfqccrC1vajrV7QCaVCfS6qrJj96nQlFK5CujPRT7MgYyEQEMhGBTGwJpAW4kJ9pBbo0zbx70X7y7AOv8HxP3LyB4YTpb2cZBt2iqL3QEwf9zDbX+waLca439QMeC7a+YBmOxugLiM/OTt2yaOoMoO+H6LOcNwf6xusrthsh/7mIh1yFmYhAJiKQiQhkIgKZiEAmIpCJCGQiApmIQCYikIkIZCICmYhAJiKQiQhkIgKZiEAmIpCJCGQiAjkA+AeOwQKMcWZqHgAAAABJRU5ErkJggg==",showStatusButton:!0,blocks:[{opcode:"motorOnFor",text:o({id:"wedo2.motorOnFor",default:"turn [MOTOR_ID] on for [DURATION] seconds",description:"turn a motor on for some time"}),blockType:i.COMMAND,arguments:{MOTOR_ID:{type:r.STRING,menu:"MOTOR_ID",defaultValue:L},DURATION:{type:r.NUMBER,defaultValue:1}}},{opcode:"motorOn",text:o({id:"wedo2.motorOn",default:"turn [MOTOR_ID] on",description:"turn a motor on indefinitely"}),blockType:i.COMMAND,arguments:{MOTOR_ID:{type:r.STRING,menu:"MOTOR_ID",defaultValue:L}}},{opcode:"motorOff",text:o({id:"wedo2.motorOff",default:"turn [MOTOR_ID] off",description:"turn a motor off"}),blockType:i.COMMAND,arguments:{MOTOR_ID:{type:r.STRING,menu:"MOTOR_ID",defaultValue:L}}},{opcode:"startMotorPower",text:o({id:"wedo2.startMotorPower",default:"set [MOTOR_ID] power to [POWER]",description:"set the motor's power and turn it on"}),blockType:i.COMMAND,arguments:{MOTOR_ID:{type:r.STRING,menu:"MOTOR_ID",defaultValue:L},POWER:{type:r.NUMBER,defaultValue:100}}},{opcode:"setMotorDirection",text:o({id:"wedo2.setMotorDirection",default:"set [MOTOR_ID] direction to [MOTOR_DIRECTION]",description:"set the motor's turn direction"}),blockType:i.COMMAND,arguments:{MOTOR_ID:{type:r.STRING,menu:"MOTOR_ID",defaultValue:L},MOTOR_DIRECTION:{type:r.STRING,menu:"MOTOR_DIRECTION",defaultValue:j}}},{opcode:"setLightHue",text:o({id:"wedo2.setLightHue",default:"set light color to [HUE]",description:"set the LED color"}),blockType:i.COMMAND,arguments:{HUE:{type:r.NUMBER,defaultValue:50}}},{opcode:"playNoteFor",text:o({id:"wedo2.playNoteFor",default:"play note [NOTE] for [DURATION] seconds",description:"play a certain note for some time"}),blockType:i.COMMAND,arguments:{NOTE:{type:r.NUMBER,defaultValue:60},DURATION:{type:r.NUMBER,defaultValue:.5}},hideFromPalette:!0},{opcode:"whenDistance",text:o({id:"wedo2.whenDistance",default:"when distance [OP] [REFERENCE]",description:"check for when distance is < or > than reference"}),blockType:i.HAT,arguments:{OP:{type:r.STRING,menu:"OP",defaultValue:"<"},REFERENCE:{type:r.NUMBER,defaultValue:50}}},{opcode:"whenTilted",text:o({id:"wedo2.whenTilted",default:"when tilted [TILT_DIRECTION_ANY]",description:"check when tilted in a certain direction"}),func:"isTilted",blockType:i.HAT,arguments:{TILT_DIRECTION_ANY:{type:r.STRING,menu:"TILT_DIRECTION_ANY",defaultValue:H}}},{opcode:"getDistance",text:o({id:"wedo2.getDistance",default:"distance",description:"the value returned by the distance sensor"}),blockType:i.REPORTER},{opcode:"isTilted",text:o({id:"wedo2.isTilted",default:"tilted [TILT_DIRECTION_ANY]?",description:"whether the tilt sensor is tilted"}),blockType:i.BOOLEAN,arguments:{TILT_DIRECTION_ANY:{type:r.STRING,menu:"TILT_DIRECTION_ANY",defaultValue:H}}},{opcode:"getTiltAngle",text:o({id:"wedo2.getTiltAngle",default:"tilt angle [TILT_DIRECTION]",description:"the angle returned by the tilt sensor"}),blockType:i.REPORTER,arguments:{TILT_DIRECTION:{type:r.STRING,menu:"TILT_DIRECTION",defaultValue:V}}}],menus:{MOTOR_ID:{acceptReporters:!0,items:[{text:o({id:"wedo2.motorId.default",default:"motor",description:"label for motor element in motor menu for LEGO WeDo 2 extension"}),value:L},{text:o({id:"wedo2.motorId.a",default:"motor A",description:"label for motor A element in motor menu for LEGO WeDo 2 extension"}),value:B},{text:o({id:"wedo2.motorId.b",default:"motor B",description:"label for motor B element in motor menu for LEGO WeDo 2 extension"}),value:z},{text:o({id:"wedo2.motorId.all",default:"all motors",description:"label for all motors element in motor menu for LEGO WeDo 2 extension"}),value:U}]},MOTOR_DIRECTION:{acceptReporters:!0,items:[{text:o({id:"wedo2.motorDirection.forward",default:"this way",description:"label for forward element in motor direction menu for LEGO WeDo 2 extension"}),value:j},{text:o({id:"wedo2.motorDirection.backward",default:"that way",description:"label for backward element in motor direction menu for LEGO WeDo 2 extension"}),value:F},{text:o({id:"wedo2.motorDirection.reverse",default:"reverse",description:"label for reverse element in motor direction menu for LEGO WeDo 2 extension"}),value:W}]},TILT_DIRECTION:{acceptReporters:!0,items:[{text:o({id:"wedo2.tiltDirection.up",default:"up",description:"label for up element in tilt direction menu for LEGO WeDo 2 extension"}),value:V},{text:o({id:"wedo2.tiltDirection.down",default:"down",description:"label for down element in tilt direction menu for LEGO WeDo 2 extension"}),value:G},{text:o({id:"wedo2.tiltDirection.left",default:"left",description:"label for left element in tilt direction menu for LEGO WeDo 2 extension"}),value:q},{text:o({id:"wedo2.tiltDirection.right",default:"right",description:"label for right element in tilt direction menu for LEGO WeDo 2 extension"}),value:Y}]},TILT_DIRECTION_ANY:{acceptReporters:!0,items:[{text:o({id:"wedo2.tiltDirection.up",default:"up"}),value:V},{text:o({id:"wedo2.tiltDirection.down",default:"down"}),value:G},{text:o({id:"wedo2.tiltDirection.left",default:"left"}),value:q},{text:o({id:"wedo2.tiltDirection.right",default:"right"}),value:Y},{text:o({id:"wedo2.tiltDirection.any",default:"any",description:"label for any element in tilt direction menu for LEGO WeDo 2 extension"}),value:H}]},OP:{acceptReporters:!0,items:["<",">"]}}}}motorOnFor(e){let t=1e3*s.toNumber(e.DURATION);return t=u.clamp(t,0,15e3),new Promise((n=>{this._forEachMotor(e.MOTOR_ID,(e=>{const n=this._peripheral.motor(e);n&&n.turnOnFor(t)})),setTimeout(n,t)}))}motorOn(e){return this._forEachMotor(e.MOTOR_ID,(e=>{const t=this._peripheral.motor(e);t&&t.turnOn()})),new Promise((e=>{window.setTimeout((()=>{e()}),S)}))}motorOff(e){return this._forEachMotor(e.MOTOR_ID,(e=>{const t=this._peripheral.motor(e);t&&t.turnOff()})),new Promise((e=>{window.setTimeout((()=>{e()}),S)}))}startMotorPower(e){return this._forEachMotor(e.MOTOR_ID,(t=>{const n=this._peripheral.motor(t);n&&(n.power=u.clamp(s.toNumber(e.POWER),0,100),n.turnOn())})),new Promise((e=>{window.setTimeout((()=>{e()}),S)}))}setMotorDirection(e){return this._forEachMotor(e.MOTOR_ID,(t=>{const n=this._peripheral.motor(t);if(n){switch(e.MOTOR_DIRECTION){case j:n.direction=1;break;case F:n.direction=-1;break;case W:n.direction=-n.direction;break;default:h.warn("Unknown motor direction in setMotorDirection: ".concat(e.DIRECTION))}n.isOn&&(n.pendingTimeoutDelay?n.turnOnFor(n.pendingTimeoutStartTime+n.pendingTimeoutDelay-Date.now()):n.turnOn())}})),new Promise((e=>{window.setTimeout((()=>{e()}),S)}))}setLightHue(e){let t=s.toNumber(e.HUE);t=u.wrapClamp(t,0,100);const n=360*t/100,r=a.hsvToRgb({h:n,s:1,v:1}),i=a.rgbToDecimal(r);return this._peripheral.setLED(i),new Promise((e=>{window.setTimeout((()=>{e()}),S)}))}playNoteFor(e){let t=1e3*s.toNumber(e.DURATION);t=u.clamp(t,0,3e3);const n=u.clamp(s.toNumber(e.NOTE),25,125);if(0!==t)return new Promise((e=>{const r=this._noteToTone(n);this._peripheral.playTone(r,t),setTimeout(e,t)}))}whenDistance(e){switch(e.OP){case"<":return this._peripheral.distance<s.toNumber(e.REFERENCE);case">":return this._peripheral.distance>s.toNumber(e.REFERENCE);default:return h.warn("Unknown comparison operator in whenDistance: ".concat(e.OP)),!1}}whenTilted(e){return this._isTilted(e.TILT_DIRECTION_ANY)}getDistance(){return this._peripheral.distance}isTilted(e){return this._isTilted(e.TILT_DIRECTION_ANY)}getTiltAngle(e){return this._getTiltAngle(e.TILT_DIRECTION)}_isTilted(e){return e===H?this._getTiltAngle(V)>=_.TILT_THRESHOLD||this._getTiltAngle(G)>=_.TILT_THRESHOLD||this._getTiltAngle(q)>=_.TILT_THRESHOLD||this._getTiltAngle(Y)>=_.TILT_THRESHOLD:this._getTiltAngle(e)>=_.TILT_THRESHOLD}_getTiltAngle(e){switch(e){case V:return this._peripheral.tiltY>45?256-this._peripheral.tiltY:-this._peripheral.tiltY;case G:return this._peripheral.tiltY>45?this._peripheral.tiltY-256:this._peripheral.tiltY;case q:return this._peripheral.tiltX>45?256-this._peripheral.tiltX:-this._peripheral.tiltX;case Y:return this._peripheral.tiltX>45?this._peripheral.tiltX-256:this._peripheral.tiltX;default:h.warn("Unknown tilt direction in _getTiltAngle: ".concat(e))}}_forEachMotor(e,t){let n;switch(e){case B:n=[0];break;case z:n=[1];break;case U:case L:n=[0,1];break;default:h.warn("Invalid motor ID: ".concat(e)),n=[]}for(const e of n)t(e)}_noteToTone(e){return 440*Math.pow(2,(e-69)/12)}}e.exports=_},function(e,t,n){(function(e,t){!function(n){"use strict";var r,i="function"==typeof(r=n.atob)?r:"function"==typeof e?function(t){return new e(t,"base64").toString("binary")}:"object"==typeof n.base64js?function(e){var t=n.base64js.b64ToByteArray(e);return Array.prototype.map.call(t,(function(e){return String.fromCharCode(e)})).join("")}:function(){throw new Error("You're probably in an old browser or an iOS webworker. It might help to include beatgammit's base64-js.")};n.atob=i,t&&t.exports&&(t.exports=i)}(window)}).call(this,n(18).Buffer,n(135)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){(function(t){!function(){"use strict";e.exports=function(e){return(e instanceof t?e:t.from(e.toString(),"binary")).toString("base64")}}()}).call(this,n(18).Buffer)},function(e,t,n){const r=n(4),i=n(3),s=n(12),o=n(2),a=n(6),l=n(5),c=n(14);let u={};try{u=n(138)}catch(e){}class d{constructor(e){this.runtime=e,this._concurrencyCounter=0,this._drumPlayers=[],this._instrumentPlayerArrays=[],this._instrumentPlayerNoteArrays=[],this._bufferSources=[],this._loadAllSounds(),this._onTargetCreated=this._onTargetCreated.bind(this),this.runtime.on("targetWasCreated",this._onTargetCreated),this._playNoteForPicker=this._playNoteForPicker.bind(this),this.runtime.on("PLAY_NOTE",this._playNoteForPicker)}_loadAllSounds(){const e=[];this.DRUM_INFO.forEach(((t,n)=>{const r="drums/".concat(t.fileName),i=this._storeSound(r,n,this._drumPlayers);e.push(i)})),this.INSTRUMENT_INFO.forEach(((t,n)=>{this._instrumentPlayerArrays[n]=[],this._instrumentPlayerNoteArrays[n]=[],t.samples.forEach(((r,i)=>{const s="instruments/".concat(t.dirName,"/").concat(r),o=this._storeSound(s,i,this._instrumentPlayerArrays[n]);e.push(o)}))})),Promise.all(e).then((()=>{}))}_storeSound(e,t,n){const r="".concat(e,".mp3");if(!u[r])return;const i=u[r];return fetch(i).then((e=>e.arrayBuffer())).then((e=>this._decodeSound(e))).then((e=>{n[t]=e}))}_decodeSound(e){const t=this.runtime.audioEngine;return t?t.decodeSoundPlayer({data:{buffer:e}}):Promise.reject(new Error("No Audio Context Detected"))}_buildMenu(e){return e.map(((e,t)=>{const n={};return n.text=e.name,n.value=String(t+1),n}))}get DRUM_INFO(){return[{name:a({id:"music.drumSnare",default:"(1) Snare Drum",description:"Sound of snare drum as used in a standard drum kit"}),fileName:"1-snare"},{name:a({id:"music.drumBass",default:"(2) Bass Drum",description:"Sound of bass drum as used in a standard drum kit"}),fileName:"2-bass-drum"},{name:a({id:"music.drumSideStick",default:"(3) Side Stick",description:"Sound of a drum stick hitting the side of a drum (usually the snare)"}),fileName:"3-side-stick"},{name:a({id:"music.drumCrashCymbal",default:"(4) Crash Cymbal",description:"Sound of a drum stick hitting a crash cymbal"}),fileName:"4-crash-cymbal"},{name:a({id:"music.drumOpenHiHat",default:"(5) Open Hi-Hat",description:"Sound of a drum stick hitting a hi-hat while open"}),fileName:"5-open-hi-hat"},{name:a({id:"music.drumClosedHiHat",default:"(6) Closed Hi-Hat",description:"Sound of a drum stick hitting a hi-hat while closed"}),fileName:"6-closed-hi-hat"},{name:a({id:"music.drumTambourine",default:"(7) Tambourine",description:"Sound of a tambourine being struck"}),fileName:"7-tambourine"},{name:a({id:"music.drumHandClap",default:"(8) Hand Clap",description:"Sound of two hands clapping together"}),fileName:"8-hand-clap"},{name:a({id:"music.drumClaves",default:"(9) Claves",description:"Sound of claves being struck together"}),fileName:"9-claves"},{name:a({id:"music.drumWoodBlock",default:"(10) Wood Block",description:"Sound of a wood block being struck"}),fileName:"10-wood-block"},{name:a({id:"music.drumCowbell",default:"(11) Cowbell",description:"Sound of a cowbell being struck"}),fileName:"11-cowbell"},{name:a({id:"music.drumTriangle",default:"(12) Triangle",description:"Sound of a triangle (instrument) being struck"}),fileName:"12-triangle"},{name:a({id:"music.drumBongo",default:"(13) Bongo",description:"Sound of a bongo being struck"}),fileName:"13-bongo"},{name:a({id:"music.drumConga",default:"(14) Conga",description:"Sound of a conga being struck"}),fileName:"14-conga"},{name:a({id:"music.drumCabasa",default:"(15) Cabasa",description:"Sound of a cabasa being shaken"}),fileName:"15-cabasa"},{name:a({id:"music.drumGuiro",default:"(16) Guiro",description:"Sound of a guiro being played"}),fileName:"16-guiro"},{name:a({id:"music.drumVibraslap",default:"(17) Vibraslap",description:"Sound of a Vibraslap being played"}),fileName:"17-vibraslap"},{name:a({id:"music.drumCuica",default:"(18) Cuica",description:"Sound of a cuica being played"}),fileName:"18-cuica"}]}get INSTRUMENT_INFO(){return[{name:a({id:"music.instrumentPiano",default:"(1) Piano",description:"Sound of a piano"}),dirName:"1-piano",releaseTime:.5,samples:[24,36,48,60,72,84,96,108]},{name:a({id:"music.instrumentElectricPiano",default:"(2) Electric Piano",description:"Sound of an electric piano"}),dirName:"2-electric-piano",releaseTime:.5,samples:[60]},{name:a({id:"music.instrumentOrgan",default:"(3) Organ",description:"Sound of an organ"}),dirName:"3-organ",releaseTime:.5,samples:[60]},{name:a({id:"music.instrumentGuitar",default:"(4) Guitar",description:"Sound of an accoustic guitar"}),dirName:"4-guitar",releaseTime:.5,samples:[60]},{name:a({id:"music.instrumentElectricGuitar",default:"(5) Electric Guitar",description:"Sound of an electric guitar"}),dirName:"5-electric-guitar",releaseTime:.5,samples:[60]},{name:a({id:"music.instrumentBass",default:"(6) Bass",description:"Sound of an accoustic upright bass"}),dirName:"6-bass",releaseTime:.25,samples:[36,48]},{name:a({id:"music.instrumentPizzicato",default:"(7) Pizzicato",description:"Sound of a string instrument (e.g. violin) being plucked"}),dirName:"7-pizzicato",releaseTime:.25,samples:[60]},{name:a({id:"music.instrumentCello",default:"(8) Cello",description:"Sound of a cello being played with a bow"}),dirName:"8-cello",releaseTime:.1,samples:[36,48,60]},{name:a({id:"music.instrumentTrombone",default:"(9) Trombone",description:"Sound of a trombone being played"}),dirName:"9-trombone",samples:[36,48,60]},{name:a({id:"music.instrumentClarinet",default:"(10) Clarinet",description:"Sound of a clarinet being played"}),dirName:"10-clarinet",samples:[48,60]},{name:a({id:"music.instrumentSaxophone",default:"(11) Saxophone",description:"Sound of a saxophone being played"}),dirName:"11-saxophone",samples:[36,60,84]},{name:a({id:"music.instrumentFlute",default:"(12) Flute",description:"Sound of a flute being played"}),dirName:"12-flute",samples:[60,72]},{name:a({id:"music.instrumentWoodenFlute",default:"(13) Wooden Flute",description:"Sound of a wooden flute being played"}),dirName:"13-wooden-flute",samples:[60,72]},{name:a({id:"music.instrumentBassoon",default:"(14) Bassoon",description:"Sound of a bassoon being played"}),dirName:"14-bassoon",samples:[36,48,60]},{name:a({id:"music.instrumentChoir",default:"(15) Choir",description:"Sound of a choir singing"}),dirName:"15-choir",releaseTime:.25,samples:[48,60,72]},{name:a({id:"music.instrumentVibraphone",default:"(16) Vibraphone",description:"Sound of a vibraphone being struck"}),dirName:"16-vibraphone",releaseTime:.5,samples:[60,72]},{name:a({id:"music.instrumentMusicBox",default:"(17) Music Box",description:"Sound of a music box playing"}),dirName:"17-music-box",releaseTime:.25,samples:[60]},{name:a({id:"music.instrumentSteelDrum",default:"(18) Steel Drum",description:"Sound of a steel drum being struck"}),dirName:"18-steel-drum",releaseTime:.5,samples:[60]},{name:a({id:"music.instrumentMarimba",default:"(19) Marimba",description:"Sound of a marimba being struck"}),dirName:"19-marimba",samples:[60]},{name:a({id:"music.instrumentSynthLead",default:"(20) Synth Lead",description:'Sound of a "lead" synthesizer being played'}),dirName:"20-synth-lead",releaseTime:.1,samples:[60]},{name:a({id:"music.instrumentSynthPad",default:"(21) Synth Pad",description:'Sound of a "pad" synthesizer being played'}),dirName:"21-synth-pad",releaseTime:.25,samples:[60]}]}get MIDI_INSTRUMENTS(){return[1,1,1,1,2,2,4,4,17,17,17,16,19,16,17,17,3,3,3,3,3,3,3,3,4,4,5,5,5,5,5,5,6,6,6,6,6,6,6,6,8,8,8,8,8,7,8,19,8,8,8,8,15,15,15,19,9,9,9,9,9,9,9,9,11,11,11,11,14,14,14,10,12,12,13,13,13,13,12,12,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,4,4,4,4,17,14,8,10,17,17,18,19,1,1,1,1,21,21,21,21,21,21,21,21]}get MIDI_DRUMS(){return[[1,-4],[1,0],[2,0],[0,0],[7,0],[0,2],[1,-6,4],[5,0],[1,-3,3.2],[5,0],[1,0,3],[4,-8],[1,4,3],[1,7,2.7],[3,-8],[1,10,2.7],[4,-2],[3,-11],[4,2],[6,0],[3,0,3.5],[10,0],[3,-8,3.5],[16,-6],[4,2],[12,2],[12,0],[13,0,.2],[13,0,2],[13,-5,2],[12,12],[12,5],[10,19],[10,12],[14,0],[14,0],[17,12],[17,5],[15,0],[15,0],[8,0],[9,0],[9,-4],[17,-5],[17,0],[11,-6,1],[11,-6,3]]}static get STATE_KEY(){return"Scratch.music"}static get DEFAULT_MUSIC_STATE(){return{currentInstrument:0}}static get MIDI_NOTE_RANGE(){return{min:0,max:130}}static get BEAT_RANGE(){return{min:0,max:100}}static get TEMPO_RANGE(){return{min:20,max:500}}static get CONCURRENCY_LIMIT(){return 30}_getMusicState(e){let t=e.getCustomState(d.STATE_KEY);return t||(t=s.simple(d.DEFAULT_MUSIC_STATE),e.setCustomState(d.STATE_KEY,t)),t}_onTargetCreated(e,t){if(t){const n=t.getCustomState(d.STATE_KEY);n&&e.setCustomState(d.STATE_KEY,s.simple(n))}}getInfo(){return{id:"music",name:a({id:"music.categoryName",default:"Music",description:"Label for the Music extension category"}),menuIconURI:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE2LjA5IDEyLjkzN2MuMjI4IDEuMTQxLS44MzMgMi4wNjMtMi4zNzMgMi4wNjMtMS41MzUgMC0yLjk2Mi0uOTIyLTMuMTg2LTIuMDYzLS4yMy0xLjE0Mi44MzMtMi4wNjggMi4zNzItMi4wNjguMzIzIDAgLjY0MS4wNDIuOTQ1LjExN2EzLjUgMy41IDAgMCAxIC40NjguMTUxYy40MzUtLjAxLS4wNTItMS4xNDctLjkxNy02LjExNC0xLjA2Ny02LjE1MiAxLjUzLS45MzUgNC4zODQtMS4zNzcgMi44NTQtLjQ0Mi4wMzggMi40MS0xLjgyNSAxLjkyMi0xLjg2Mi0uNDkzLTIuMzI1LTMuNTc3LjEzMiA3LjM3ek03LjQ2IDguNTYzYy0xLjg2Mi0uNDkzLTIuMzI1LTMuNTc2LjEzIDcuMzdDNy44MTYgMTcuMDczIDYuNzU0IDE4IDUuMjIgMThjLTEuNTM1IDAtMi45NjEtLjkyNi0zLjE5LTIuMDY4LS4yMjQtMS4xNDIuODM3LTIuMDY3IDIuMzc1LTIuMDY3LjUwMSAwIC45ODcuMDk4IDEuNDI3LjI3Mi40MTItLjAyOC0uMDc0LTEuMTg5LS45My02LjExNEMzLjgzNCAxLjg3IDYuNDMgNy4wODcgOS4yODIgNi42NDZjMi44NTQtLjQ0Ny4wMzggMi40MS0xLjgyMyAxLjkxN3oiIGZpbGw9IiM1NzVFNzUiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==",blockIconURI:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PHRpdGxlPm11c2ljLWJsb2NrLWljb248L3RpdGxlPjxkZWZzPjxwYXRoIGQ9Ik0zMi4xOCAyNS44NzRDMzIuNjM2IDI4LjE1NyAzMC41MTIgMzAgMjcuNDMzIDMwYy0zLjA3IDAtNS45MjMtMS44NDMtNi4zNzItNC4xMjYtLjQ1OC0yLjI4NSAxLjY2NS00LjEzNiA0Ljc0My00LjEzNi42NDcgMCAxLjI4My4wODQgMS44OS4yMzQuMzM4LjA4Ni42MzcuMTguOTM4LjMwMi44Ny0uMDItLjEwNC0yLjI5NC0xLjgzNS0xMi4yMy0yLjEzNC0xMi4zMDIgMy4wNi0xLjg3IDguNzY4LTIuNzUyIDUuNzA4LS44ODUuMDc2IDQuODItMy42NSAzLjg0NC0zLjcyNC0uOTg3LTQuNjUtNy4xNTMuMjYzIDE0LjczOHptLTE2Ljk5OCA1Ljk5QzE1LjYzIDM0LjE0OCAxMy41MDcgMzYgMTAuNDQgMzZjLTMuMDcgMC01LjkyMi0xLjg1Mi02LjM4LTQuMTM2LS40NDgtMi4yODQgMS42NzQtNC4xMzUgNC43NS00LjEzNSAxLjAwMyAwIDEuOTc1LjE5NiAyLjg1NS41NDMuODIyLS4wNTUtLjE1LTIuMzc3LTEuODYyLTEyLjIyOC0yLjEzMy0xMi4zMDMgMy4wNi0xLjg3IDguNzY0LTIuNzUzIDUuNzA2LS44OTQuMDc2IDQuODItMy42NDggMy44MzQtMy43MjQtLjk4Ny00LjY1LTcuMTUyLjI2MiAxNC43Mzh6IiBpZD0iYSIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjx1c2UgZmlsbD0iI0ZGRiIgeGxpbms6aHJlZj0iI2EiLz48cGF0aCBzdHJva2Utb3BhY2l0eT0iLjEiIHN0cm9rZT0iIzAwMCIgZD0iTTI4LjQ1NiAyMS42NzVjLS4wMS0uMzEyLS4wODctLjgyNS0uMjU2LTEuNzAyLS4wOTYtLjQ5NS0uNjEyLTMuMDIyLS43NTMtMy43My0uMzk1LTEuOTgtLjc2LTMuOTItMS4xNDItNi4xMTMtLjczMi00LjIyMy0uNjkzLTYuMDUuMzQ0LTYuNTI3LjUtLjIzIDEuMDYtLjA4IDEuODQuMzUuNDE0LjIyNyAyLjE4MiAxLjM2NSAyLjA3IDEuMjk2IDEuOTk0IDEuMjQyIDMuNDY0IDEuNzc0IDQuOTMgMS41NDggMS41MjYtLjIzNyAyLjUwNC0uMDYgMi44NzYuNjE4LjM0OC42MzUuMDE1IDEuNDE2LS43MyAyLjE4LTEuNDcyIDEuNTE2LTMuOTc1IDIuNTE0LTUuODQ4IDIuMDIzLS44MjItLjIyLTEuMjM4LS40NjUtMi4zOC0xLjI2N2wtLjA5NS0uMDY2Yy4wNDcuNTkzLjI2NCAxLjc0LjcxNyAzLjgwMy4yOTQgMS4zMzYgMi4wOCA5LjE4NyAyLjYzNyAxMS42NzRsLjAwMi4wMTJjLjUyOCAyLjYzNy0xLjg3MyA0LjcyNC01LjIzNiA0LjcyNC0zLjI5IDAtNi4zNjMtMS45ODgtNi44NjItNC41MjgtLjUzLTIuNjQgMS44NzMtNC43MzQgNS4yMzMtNC43MzQuNjcyIDAgMS4zNDcuMDg1IDIuMDE0LjI1LjIyNy4wNTcuNDM2LjExOC42MzYuMTg3em0tMTYuOTk2IDUuOTljLS4wMS0uMzE4LS4wOS0uODM4LS4yNjYtMS43MzctLjA5LS40Ni0uNTk1LTIuOTM3LS43NTMtMy43MjctLjM5LTEuOTYtLjc1LTMuODktMS4xMy02LjA3LS43MzItNC4yMjMtLjY5Mi02LjA1LjM0NC02LjUyNi41MDItLjIzIDEuMDYtLjA4MiAxLjg0LjM1LjQxNS4yMjcgMi4xODIgMS4zNjQgMi4wNyAxLjI5NSAxLjk5MyAxLjI0MiAzLjQ2MiAxLjc3NCA0LjkyNiAxLjU0OCAxLjUyNS0uMjQgMi41MDQtLjA2NCAyLjg3Ni42MTQuMzQ4LjYzNS4wMTUgMS40MTUtLjcyOCAyLjE4LTEuNDc0IDEuNTE3LTMuOTc3IDIuNTEzLTUuODQ3IDIuMDE3LS44Mi0uMjItMS4yMzYtLjQ2NC0yLjM3OC0xLjI2N2wtLjA5NS0uMDY1Yy4wNDcuNTkzLjI2NCAxLjc0LjcxNyAzLjgwMi4yOTQgMS4zMzcgMi4wNzggOS4xOSAyLjYzNiAxMS42NzVsLjAwMy4wMTNjLjUxNyAyLjYzOC0xLjg4NCA0LjczMi01LjIzNCA0LjczMi0zLjI4NyAwLTYuMzYtMS45OTMtNi44Ny00LjU0LS41Mi0yLjY0IDEuODg0LTQuNzMgNS4yNC00LjczLjkwNSAwIDEuODAzLjE1IDIuNjUuNDM2eiIvPjwvZz48L3N2Zz4=",blocks:[{opcode:"playDrumForBeats",blockType:i.COMMAND,text:a({id:"music.playDrumForBeats",default:"play drum [DRUM] for [BEATS] beats",description:"play drum sample for a number of beats"}),arguments:{DRUM:{type:r.NUMBER,menu:"DRUM",defaultValue:1},BEATS:{type:r.NUMBER,defaultValue:.25}}},{opcode:"midiPlayDrumForBeats",blockType:i.COMMAND,text:a({id:"music.midiPlayDrumForBeats",default:"play drum [DRUM] for [BEATS] beats",description:"play drum sample for a number of beats according to a mapping of MIDI codes"}),arguments:{DRUM:{type:r.NUMBER,menu:"DRUM",defaultValue:1},BEATS:{type:r.NUMBER,defaultValue:.25}},hideFromPalette:!0},{opcode:"restForBeats",blockType:i.COMMAND,text:a({id:"music.restForBeats",default:"rest for [BEATS] beats",description:"rest (play no sound) for a number of beats"}),arguments:{BEATS:{type:r.NUMBER,defaultValue:.25}}},{opcode:"playNoteForBeats",blockType:i.COMMAND,text:a({id:"music.playNoteForBeats",default:"play note [NOTE] for [BEATS] beats",description:"play a note for a number of beats"}),arguments:{NOTE:{type:r.NOTE,defaultValue:60},BEATS:{type:r.NUMBER,defaultValue:.25}}},{opcode:"setInstrument",blockType:i.COMMAND,text:a({id:"music.setInstrument",default:"set instrument to [INSTRUMENT]",description:"set the instrument (e.g. piano, guitar, trombone) for notes played"}),arguments:{INSTRUMENT:{type:r.NUMBER,menu:"INSTRUMENT",defaultValue:1}}},{opcode:"midiSetInstrument",blockType:i.COMMAND,text:a({id:"music.midiSetInstrument",default:"set instrument to [INSTRUMENT]",description:"set the instrument for notes played according to a mapping of MIDI codes"}),arguments:{INSTRUMENT:{type:r.NUMBER,defaultValue:1}},hideFromPalette:!0},{opcode:"setTempo",blockType:i.COMMAND,text:a({id:"music.setTempo",default:"set tempo to [TEMPO]",description:"set tempo (speed) for notes, drums, and rests played"}),arguments:{TEMPO:{type:r.NUMBER,defaultValue:60}}},{opcode:"changeTempo",blockType:i.COMMAND,text:a({id:"music.changeTempo",default:"change tempo by [TEMPO]",description:"change tempo (speed) for notes, drums, and rests played"}),arguments:{TEMPO:{type:r.NUMBER,defaultValue:20}}},{opcode:"getTempo",text:a({id:"music.getTempo",default:"tempo",description:"get the current tempo (speed) for notes, drums, and rests played"}),blockType:i.REPORTER}],menus:{DRUM:{acceptReporters:!0,items:this._buildMenu(this.DRUM_INFO)},INSTRUMENT:{acceptReporters:!0,items:this._buildMenu(this.INSTRUMENT_INFO)}}}}_isConcurrencyLimited(){return this.runtime.runtimeOptions.miscLimits&&this._concurrencyCounter>d.CONCURRENCY_LIMIT}playDrumForBeats(e,t){this._playDrumForBeats(e.DRUM,e.BEATS,t)}midiPlayDrumForBeats(e,t){let n=o.toNumber(e.DRUM);n=Math.round(n);const r=this.MIDI_DRUMS[n-35];n=r?r[0]:2,n+=1,this._playDrumForBeats(n,e.BEATS,t)}_playDrumForBeats(e,t,n){this._stackTimerNeedsInit(n)?(e=o.toNumber(e),e=Math.round(e),e-=1,e=l.wrapClamp(e,0,this.DRUM_INFO.length-1),t=o.toNumber(t),t=this._clampBeats(t),this._playDrumNum(n,e),this._startStackTimer(n,this._beatsToSec(t))):this._checkStackTimer(n)}_playDrumNum(e,t){if(null===e.runtime.audioEngine)return;if(null===e.target.sprite.soundBank)return;if(this._isConcurrencyLimited())return;const n=this._drumPlayers[t];if(void 0===n)return;n.isPlaying&&!n.isStarting&&n.take();const r=e.runtime.audioEngine,i=r.audioContext.createGain();i.gain.setValueAtTime(e.target.volume/100,r.currentTime),i.connect(r.getInputNode()),this._concurrencyCounter++,n.once("stop",(()=>{this._concurrencyCounter--})),n.play(),n.connect({getInputNode:()=>i})}restForBeats(e,t){if(this._stackTimerNeedsInit(t)){let n=o.toNumber(e.BEATS);n=this._clampBeats(n),this._startStackTimer(t,this._beatsToSec(n))}else this._checkStackTimer(t)}playNoteForBeats(e,t){if(this._stackTimerNeedsInit(t)){let n=o.toNumber(e.NOTE);n=l.clamp(n,d.MIDI_NOTE_RANGE.min,d.MIDI_NOTE_RANGE.max);let r=o.toNumber(e.BEATS);if(r=this._clampBeats(r),0===r)return;const i=this._beatsToSec(r);this._playNote(t,n,i),this._startStackTimer(t,i)}else this._checkStackTimer(t)}_playNoteForPicker(e,t){if(t!==this.getInfo().name)return;const n={runtime:this.runtime,target:this.runtime.getEditingTarget()};this._playNote(n,e,.25)}_playNote(e,t,n){if(null===e.runtime.audioEngine)return;if(null===e.target.sprite.soundBank)return;if(this._isConcurrencyLimited())return;const r=this._getMusicState(e.target).currentInstrument,i=this.INSTRUMENT_INFO[r].samples,s=this._selectSampleIndexForNote(t,i);if(void 0===this._instrumentPlayerArrays[r])return;if(void 0===this._instrumentPlayerArrays[r][s])return;const o=e.runtime.audioEngine;this._instrumentPlayerNoteArrays[r][t]||(this._instrumentPlayerNoteArrays[r][t]=this._instrumentPlayerArrays[r][s].take());const a=this._instrumentPlayerNoteArrays[r][t];a.isPlaying&&!a.isStarting&&a.take();const l=i[s],c=this._ratioForPitchInterval(t-l),u=o.audioContext,d=u.createGain();d.gain.setValueAtTime(e.target.volume/100,o.currentTime);const h=u.createGain();d.connect(h),h.connect(o.getInputNode());let p=this.INSTRUMENT_INFO[r].releaseTime;void 0===p&&(p=.01);const m=u.currentTime+n,f=m+p;h.gain.setValueAtTime(1,m),h.gain.linearRampToValueAtTime(1e-4,f),this._concurrencyCounter++,a.once("stop",(()=>{this._concurrencyCounter--})),a.play(),a.connect({getInputNode:()=>d}),a.outputNode.playbackRate.value=c,a.outputNode.stop(f)}_selectSampleIndexForNote(e,t){for(let n=t.length-1;n>=0;n--)if(e>=t[n])return n;return 0}_ratioForPitchInterval(e){return Math.pow(2,e/12)}_clampBeats(e){return l.clamp(e,d.BEAT_RANGE.min,d.BEAT_RANGE.max)}_beatsToSec(e){return 60/this.getTempo()*e}_stackTimerNeedsInit(e){return!e.stackFrame.timer}_startStackTimer(e,t){e.stackFrame.timer=new c,e.stackFrame.timer.start(),e.stackFrame.duration=t,e.yield()}_checkStackTimer(e){e.stackFrame.timer.timeElapsed()<1e3*e.stackFrame.duration&&e.yield()}setInstrument(e,t){this._setInstrument(e.INSTRUMENT,t,!1)}midiSetInstrument(e,t){this._setInstrument(e.INSTRUMENT,t,!0)}_setInstrument(e,t,n){const r=this._getMusicState(t.target);e=o.toNumber(e),e=Math.round(e),e-=1,n&&(e=(this.MIDI_INSTRUMENTS[e]||0)-1),e=l.wrapClamp(e,0,this.INSTRUMENT_INFO.length-1),r.currentInstrument=e}setTempo(e){const t=o.toNumber(e.TEMPO);this._updateTempo(t)}changeTempo(e){const t=o.toNumber(e.TEMPO)+this.getTempo();this._updateTempo(t)}_updateTempo(e){e=l.clamp(e,d.TEMPO_RANGE.min,d.TEMPO_RANGE.max);const t=this.runtime.getTargetForStage();t&&(t.tempo=e)}getTempo(){const e=this.runtime.getTargetForStage();return e?e.tempo:60}}e.exports=d},function(e,t,n){e.exports={"drums/1-snare.mp3":n(139),"drums/2-bass-drum.mp3":n(140),"drums/3-side-stick.mp3":n(141),"drums/4-crash-cymbal.mp3":n(142),"drums/5-open-hi-hat.mp3":n(143),"drums/6-closed-hi-hat.mp3":n(144),"drums/7-tambourine.mp3":n(145),"drums/8-hand-clap.mp3":n(146),"drums/9-claves.mp3":n(147),"drums/10-wood-block.mp3":n(148),"drums/11-cowbell.mp3":n(149),"drums/12-triangle.mp3":n(150),"drums/13-bongo.mp3":n(151),"drums/14-conga.mp3":n(152),"drums/15-cabasa.mp3":n(153),"drums/16-guiro.mp3":n(154),"drums/17-vibraslap.mp3":n(155),"drums/18-cuica.mp3":n(156),"instruments/1-piano/24.mp3":n(157),"instruments/1-piano/36.mp3":n(158),"instruments/1-piano/48.mp3":n(159),"instruments/1-piano/60.mp3":n(160),"instruments/1-piano/72.mp3":n(161),"instruments/1-piano/84.mp3":n(162),"instruments/1-piano/96.mp3":n(163),"instruments/1-piano/108.mp3":n(164),"instruments/2-electric-piano/60.mp3":n(165),"instruments/3-organ/60.mp3":n(166),"instruments/4-guitar/60.mp3":n(167),"instruments/5-electric-guitar/60.mp3":n(168),"instruments/6-bass/36.mp3":n(169),"instruments/6-bass/48.mp3":n(170),"instruments/7-pizzicato/60.mp3":n(171),"instruments/8-cello/36.mp3":n(172),"instruments/8-cello/48.mp3":n(173),"instruments/8-cello/60.mp3":n(174),"instruments/9-trombone/36.mp3":n(175),"instruments/9-trombone/48.mp3":n(176),"instruments/9-trombone/60.mp3":n(177),"instruments/10-clarinet/48.mp3":n(178),"instruments/10-clarinet/60.mp3":n(179),"instruments/11-saxophone/36.mp3":n(180),"instruments/11-saxophone/60.mp3":n(181),"instruments/11-saxophone/84.mp3":n(182),"instruments/12-flute/60.mp3":n(183),"instruments/12-flute/72.mp3":n(184),"instruments/13-wooden-flute/60.mp3":n(185),"instruments/13-wooden-flute/72.mp3":n(186),"instruments/14-bassoon/36.mp3":n(187),"instruments/14-bassoon/48.mp3":n(188),"instruments/14-bassoon/60.mp3":n(189),"instruments/15-choir/48.mp3":n(190),"instruments/15-choir/60.mp3":n(191),"instruments/15-choir/72.mp3":n(192),"instruments/16-vibraphone/60.mp3":n(193),"instruments/16-vibraphone/72.mp3":n(194),"instruments/17-music-box/60.mp3":n(195),"instruments/18-steel-drum/60.mp3":n(196),"instruments/19-marimba/60.mp3":n(197),"instruments/20-synth-lead/60.mp3":n(198),"instruments/21-synth-pad/60.mp3":n(199)}},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t){e.exports=null},function(e,t,n){const r=n(4),i=n(3),s=n(1),o=n(2),a=n(6),l=n(31),c=n(15),u=129,d=130,h="micro:bit extension stopped receiving data",p=61445,m="5261da01-fa7e-42ab-850b-7c80220097cc",f="5261da02-fa7e-42ab-850b-7c80220097cc";class g{constructor(e,t){this._runtime=e,this._ble=null,this._runtime.registerPeripheralExtension(t,this),this._extensionId=t,this._sensors={tiltX:0,tiltY:0,buttonA:0,buttonB:0,touchPins:[0,0,0],gestureState:0,ledMatrixState:new Uint8Array(5)},this._gestures={moving:!1,move:{active:!1,timeout:!1},shake:{active:!1,timeout:!1},jump:{active:!1,timeout:!1}},this._timeoutID=null,this._busy=!1,this._busyTimeoutID=null,this.reset=this.reset.bind(this),this._onConnect=this._onConnect.bind(this),this._onMessage=this._onMessage.bind(this)}displayText(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return this.send(u,t)}displayMatrix(e){return this.send(d,e)}get tiltX(){return this._sensors.tiltX}get tiltY(){return this._sensors.tiltY}get buttonA(){return this._sensors.buttonA}get buttonB(){return this._sensors.buttonB}get gestureState(){return this._sensors.gestureState}get ledMatrixState(){return this._sensors.ledMatrixState}scan(){this._ble&&this._ble.disconnect(),this._ble=new l(this._runtime,this._extensionId,{filters:[{services:[p]}]},this._onConnect,this.reset)}connect(e){this._ble&&this._ble.connectPeripheral(e)}disconnect(){this._ble&&this._ble.disconnect(),this.reset()}reset(){this._timeoutID&&(window.clearTimeout(this._timeoutID),this._timeoutID=null)}isConnected(){let e=!1;return this._ble&&(e=this._ble.isConnected()),e}send(e,t){if(!this.isConnected())return;if(this._busy)return;this._busy=!0,this._busyTimeoutID=window.setTimeout((()=>{this._busy=!1}),5e3);const n=new Uint8Array(t.length+1);n[0]=e;for(let e=0;e<t.length;e++)n[e+1]=t[e];const r=c.uint8ArrayToBase64(n);this._ble.write(p,f,r,"base64",!0).then((()=>{this._busy=!1,window.clearTimeout(this._busyTimeoutID)}))}_onConnect(){this._ble.read(p,m,!0,this._onMessage),this._timeoutID=window.setTimeout((()=>this._ble.handleDisconnectError(h)),4500)}_onMessage(e){const t=c.base64ToUint8Array(e);this._sensors.tiltX=t[1]|t[0]<<8,this._sensors.tiltX>32768&&(this._sensors.tiltX-=65536),this._sensors.tiltY=t[3]|t[2]<<8,this._sensors.tiltY>32768&&(this._sensors.tiltY-=65536),this._sensors.buttonA=t[4],this._sensors.buttonB=t[5],this._sensors.touchPins[0]=t[6],this._sensors.touchPins[1]=t[7],this._sensors.touchPins[2]=t[8],this._sensors.gestureState=t[9],window.clearTimeout(this._timeoutID),this._timeoutID=window.setTimeout((()=>this._ble.handleDisconnectError(h)),4500)}_checkPinState(e){return this._sensors.touchPins[e]}}const y="front",b="back",v="left",S="right",w="any",k="moved",T="shaken",x="jumped",E="A",A="B",C="any",I="on",O="off";class M{static get EXTENSION_NAME(){return"micro:bit"}static get EXTENSION_ID(){return"microbit"}static get TILT_THRESHOLD(){return 15}get BUTTONS_MENU(){return[{text:"A",value:E},{text:"B",value:A},{text:a({id:"microbit.buttonsMenu.any",default:"any",description:'label for "any" element in button picker for micro:bit extension'}),value:C}]}get GESTURES_MENU(){return[{text:a({id:"microbit.gesturesMenu.moved",default:"moved",description:"label for moved gesture in gesture picker for micro:bit extension"}),value:k},{text:a({id:"microbit.gesturesMenu.shaken",default:"shaken",description:"label for shaken gesture in gesture picker for micro:bit extension"}),value:T},{text:a({id:"microbit.gesturesMenu.jumped",default:"jumped",description:"label for jumped gesture in gesture picker for micro:bit extension"}),value:x}]}get PIN_STATE_MENU(){return[{text:a({id:"microbit.pinStateMenu.on",default:"on",description:"label for on element in pin state picker for micro:bit extension"}),value:I},{text:a({id:"microbit.pinStateMenu.off",default:"off",description:"label for off element in pin state picker for micro:bit extension"}),value:O}]}get TILT_DIRECTION_MENU(){return[{text:a({id:"microbit.tiltDirectionMenu.front",default:"front",description:"label for front element in tilt direction picker for micro:bit extension"}),value:y},{text:a({id:"microbit.tiltDirectionMenu.back",default:"back",description:"label for back element in tilt direction picker for micro:bit extension"}),value:b},{text:a({id:"microbit.tiltDirectionMenu.left",default:"left",description:"label for left element in tilt direction picker for micro:bit extension"}),value:v},{text:a({id:"microbit.tiltDirectionMenu.right",default:"right",description:"label for right element in tilt direction picker for micro:bit extension"}),value:S}]}get TILT_DIRECTION_ANY_MENU(){return[...this.TILT_DIRECTION_MENU,{text:a({id:"microbit.tiltDirectionMenu.any",default:"any",description:"label for any direction element in tilt direction picker for micro:bit extension"}),value:w}]}constructor(e){this.runtime=e,this._peripheral=new g(this.runtime,M.EXTENSION_ID)}getInfo(){return{id:M.EXTENSION_ID,name:M.EXTENSION_NAME,blockIconURI:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAABYlAAAWJQFJUiTwAAAKcElEQVR42u2cfXAU9RnHv7u3L3d7l9yR5PIGXO7MkQKaYiCUWqJhFGvRMk4JZXSc8aXVaSmiYlthVHQEW99FxiIdrVY6teiMdoa+ICqhIqgQAsjwMgYDOQKXl7uY17u9293b3f5x5JKYe8+FJGSfvzbP/n77e/azz+95nt9v90KoqgpN0hdSQ6AB1ABqADWAmmgANYAaQA2gJhpADeBEE2q8GPLaWzu/CslyiY4k9dOn5uijtXGd7+jWkaReVpT3Hrhv6d0awEFC07rgD+ZeYYnXprhwigUAvjj0zbjxQCLebozT7iDzK1ZUWCru2K7L//6MVC8ue45Blz8n6rlQ815QtuohOlXiEdy/AUqPa6y59Mkh6Q1345GNja6m7pHEQKNl3t0704EXat4L6fSOmOeEI1vHKzwAyNJR9MPFpRUPOu0ONm2A0xatWaTLm5WfDrzvAppA8AbiG03fC8CQNkDKZK2YrPAuRrhpifJERsuYywveJc7CqcIDMAyeLm82dEXzw39I/qjXkpr3QuW9lxfAdOABGAKPslWDnbsy7Jl8BxTeM3SqmO0gaA5U6c3jymup0YSn9JyLee67wpTfBQAQjmyF3HFqiJcRtDECjy5dAmbmcgQPvjjxl3Lx4IVjnD/5cE1zkWtyP34VBGcdKLJnLgc9cznk1kMXFdzEn8KJ4KUqqsSHvcxWDf7j1UM8UPr6/YgHhhX8xAaYaXgAIB7fBnbuSrBzV8aNgarEQ/z6/YkLcDTg9V9XlXjQtuqoU1TpcUHlvZDOfDiuyh5qPMCLrJ1bDw3EuUtx81N/BH3pjQBJQ2HMF5V6iKfeRchVm9kkMtrwxmSdobeA9daBde8GwVlBcFYofS1Jw0vaAy9HeJHQwBUPzIBvGxDc92Rmp/BowJs10wkAONfsBs8HAAAltqngOAO8HZ3o6OiMqcvLy4E1Lwc8H8C5ZndMXdLJa/qNacNLCDBw/O8nFUNWxp/64+tWAwBefe1tHKg7CgC4/9d3ori4EHv3HcDrb26PqVt2602ovvaHaGlpw+8ffSamLqXYmya8jG8mpFy6iGLkWLh4HAwG4+r6j4VBfaPpLgU8IMGO9MLqW2pYQ9aQokuR5dgXIwCC1CUcNMj3hpdvLAdSF54EYpCHooRA0Swomo2pC0kCQpIAkqTA6LmYupgxL0X7m78+aG10NXVkpIwxsAwWXncDCESHLkohfPbpbiT6ZFPPZQ9fC0e58Wi6wTDj6UbT/rQAyiERS2pW4Kc3LQDLRO8miCEAKj7d83FcTxyLJJJJ+9MCqKoq9HomMrgkSThxsgEcZ8AMpwMkSYJlKDA0DVUFiHGWRDJp/4jXwqIo4uFHnkZXdw8AYGbZFXhs3WqQJDkhkkim7E8KoMlkxKbnn8DBunrwUli3e8/+yOAA0HjmHDq7upGXm5PUoDUr7hmWRB5Zt3FYwoime+vtd/H6G9uGJIxouniSyP6H7v8FystnY80jGzIA0MihsMAKu20aTp3JzFb6WCWRuDUvHwByw8cOhw2FBVaYjNzIAba1e3Hfb9aiq7MTNStuBwAsvr4KO3d9GnmKztIS5EyxTJiVSDT7p04tipx/9MnnYc7ORlu7NzMxsK3di5AkDHgGw2DTC+uHBeGJshJJZL/fxyMQEDKbRAiCQDAoQhBDYBkKNE2j4uqrhpUBoiSBIMZfEhkN+1NeiWSqEB2rlUg69md0JRIQRHy86z8jXsqNVRLJlP0jqgNJXXgAgjbCcONmCHUvQ+44NWG2s/rtH5Mt/ciToo0wLH4JBGO6LLazRiJk2vBYy4gHHw/bWSN+LZBKEhkMjzn/CaSiKgQOvJDyFB7L7axUJWNJZDA8IhQA1boPin7KZbMSGfUYyFx9b3hXg/cCsoBA2Z0AoYOaxlcC4+mdyCUDKBzanLFBJ3USyaRMuiSSKZmUSSSTMimTCABUlblRU9kAZ0E39p+eii21c+EL0jHbOwu6sfaWgyjND//U4oP6MmzZnfi79XT7mfQSNi7bh0JzOLG19XBY/89r49pYVebGqhuOosDsh1+gsWV3BXYdd2Q+BlaVuXFv9bHgkSbzk+vfcVRyjHhi47J9cftsXLYf7T36Ix8cLHlo6ydlv6qpPI2qssRZcuOy/Wjp4k5s+2zG+offKqtcUt6kJtNv7S0H0RtkvEufXTB/6bML5je2Wy7UVDbEbF9o9mPDsv2oP5v75vbPS26rP5u3fdXiozDppcwDrKlswOlWy9E//DX09Mt/azh8zzNM1RybF86C7pheVGD240CDeX3NWtfml94Rt+0+Mf3Lm8qbEnpfgdmPs+3G9+564vTT//pM/GrHYduWRP0AYOEMN/5S61xT92Vtfd2XtfWb/vu91fHALyxzw9tnkB/cTD5w+2Ou9375HHtfa7exM5mxRpKFaafdQQKgAcDERs98/foLHrXdaXfoABi8vczhWO2/28/TRR5z2h00gKymNl1ton79oigq6bQ7dE67Q+ew9mb1h4FYYwVESgLAXLSRa+3mWpIdK+UYuPiq89f8+XfT/+ftZQ4vLm9ZmUyfdcsv1M2fWfRaUCK8i8vdK1u6ktuAWPWTsztm24o/cnnYHUsrWzd1+fVJ9XtqxbG3XzFdNcPTawjcueibpxK1t+X26f/9R8a953jub4typOvm2b1XnvUmv8JKWMZcaZffX3XDERRP8cGaFRjWxtPLoZvXY4oxgPBNEsgxBhCUKEzL6Ru+JydS8Ak0giKFgESDJFQoKmCgQzAwIfQEWETzmoBIwd2VNaStu8uEHGO4Buz06zHHFv0dRkefAZ1+PQx0KNK2eIoPLCUj2zDc275qzgcBFWv+cf3IyxgTK2KOzQufEM5kfpGF12eGPSf8DXN+No/87HDWiwYYALw+M6ym8AscAxO++X7xCTRM7EDQzht0Da8v/NWo1dQDAxNCocUXs+303IGHdaptOmYXnh/SLlZbV+fwnwJm6UXEm/ojqgM/PFmJQ81OPHfrtqT7bN23BE8seTflYLvz5DwYGQHLKz5Puo/XZ8aLtT+D1dSDuxbsGQIymmz48DbwIguOESJOcce8XaO3oVpZ8k3Em5KVVAAMFnuOB9as1MbimCBunn04vBmR40ls29Wfgxf1KMn1gBdY+MXUCvK4ANvPndpLzrLzALjBN2VPwrDBksgLYkn1jBMp90nVY2++8vAw3RlPeLNYVZSPAEgjKWP6ZCn4lF+gMdnE08spQb73RQB9aXtgo6tJcNodf8rWz3L//Br340UW3sExEkXrFFKSSUVHqkRfkJZ8QSZk5gS6hw9H+GyDQAclSs41BVmSUIn+toAKIUTJskKoQUknCxKlkISKb/sM0NMyyVAhXW+AlYosfgOgQlUJVadTSUWBKoQoudvPioPbenq5oIUTaRUqenhWKi3oyVIUqKpKREoLggDhF6hQb4CV9LRM9rctMPN6glChp2SdTqeSskwoAECSKnG61fzFR/XsGu+FhmONriYl7TImsjoYKJyZSeB8CoBQo6spqU8TCO1fgE7gDVUNoCYaQA2gBlADqAHURAOoAdQAagA10QCOgfwfNp/hXbfBMCAAAAAASUVORK5CYII=",showStatusButton:!0,blocks:[{opcode:"whenButtonPressed",text:a({id:"microbit.whenButtonPressed",default:"when [BTN] button pressed",description:"when the selected button on the micro:bit is pressed"}),blockType:i.HAT,arguments:{BTN:{type:r.STRING,menu:"buttons",defaultValue:E}}},{opcode:"isButtonPressed",text:a({id:"microbit.isButtonPressed",default:"[BTN] button pressed?",description:"is the selected button on the micro:bit pressed?"}),blockType:i.BOOLEAN,arguments:{BTN:{type:r.STRING,menu:"buttons",defaultValue:E}}},"---",{opcode:"whenGesture",text:a({id:"microbit.whenGesture",default:"when [GESTURE]",description:"when the selected gesture is detected by the micro:bit"}),blockType:i.HAT,arguments:{GESTURE:{type:r.STRING,menu:"gestures",defaultValue:k}}},"---",{opcode:"displaySymbol",text:a({id:"microbit.displaySymbol",default:"display [MATRIX]",description:"display a pattern on the micro:bit display"}),blockType:i.COMMAND,arguments:{MATRIX:{type:r.MATRIX,defaultValue:"0101010101100010101000100"}}},{opcode:"displayText",text:a({id:"microbit.displayText",default:"display text [TEXT]",description:"display text on the micro:bit display"}),blockType:i.COMMAND,arguments:{TEXT:{type:r.STRING,defaultValue:a({id:"microbit.defaultTextToDisplay",default:"Hello!",description:'default text to display.\n                                IMPORTANT - the micro:bit only supports letters a-z, A-Z.\n                                Please substitute a default word in your language\n                                that can be written with those characters,\n                                substitute non-accented characters or leave it as "Hello!".\n                                Check the micro:bit site documentation for details'})}}},{opcode:"displayClear",text:a({id:"microbit.clearDisplay",default:"clear display",description:"display nothing on the micro:bit display"}),blockType:i.COMMAND},"---",{opcode:"whenTilted",text:a({id:"microbit.whenTilted",default:"when tilted [DIRECTION]",description:"when the micro:bit is tilted in a direction"}),blockType:i.HAT,arguments:{DIRECTION:{type:r.STRING,menu:"tiltDirectionAny",defaultValue:w}}},{opcode:"isTilted",text:a({id:"microbit.isTilted",default:"tilted [DIRECTION]?",description:"is the micro:bit is tilted in a direction?"}),blockType:i.BOOLEAN,arguments:{DIRECTION:{type:r.STRING,menu:"tiltDirectionAny",defaultValue:w}}},{opcode:"getTiltAngle",text:a({id:"microbit.tiltAngle",default:"tilt angle [DIRECTION]",description:"how much the micro:bit is tilted in a direction"}),blockType:i.REPORTER,arguments:{DIRECTION:{type:r.STRING,menu:"tiltDirection",defaultValue:y}}},"---",{opcode:"whenPinConnected",text:a({id:"microbit.whenPinConnected",default:"when pin [PIN] connected",description:"when the pin detects a connection to Earth/Ground"}),blockType:i.HAT,arguments:{PIN:{type:r.STRING,menu:"touchPins",defaultValue:"0"}}}],menus:{buttons:{acceptReporters:!0,items:this.BUTTONS_MENU},gestures:{acceptReporters:!0,items:this.GESTURES_MENU},pinState:{acceptReporters:!0,items:this.PIN_STATE_MENU},tiltDirection:{acceptReporters:!0,items:this.TILT_DIRECTION_MENU},tiltDirectionAny:{acceptReporters:!0,items:this.TILT_DIRECTION_ANY_MENU},touchPins:{acceptReporters:!0,items:["0","1","2"]}}}}whenButtonPressed(e){return"any"===e.BTN?this._peripheral.buttonA|this._peripheral.buttonB:"A"===e.BTN?this._peripheral.buttonA:"B"===e.BTN&&this._peripheral.buttonB}isButtonPressed(e){return"any"===e.BTN?!!(this._peripheral.buttonA|this._peripheral.buttonB):"A"===e.BTN?0!==this._peripheral.buttonA:"B"===e.BTN&&0!==this._peripheral.buttonB}whenGesture(e){const t=o.toString(e.GESTURE);return"moved"===t?this._peripheral.gestureState>>2&1:"shaken"===t?1&this._peripheral.gestureState:"jumped"===t&&this._peripheral.gestureState>>1&1}displaySymbol(e){const t=o.toString(e.MATRIX).replace(/\s/g,"").split("").reduce(((e,t,n)=>"0"===t?e:e+Math.pow(2,n)),0);return null!==t&&(this._peripheral.ledMatrixState[0]=31&t,this._peripheral.ledMatrixState[1]=t>>5&31,this._peripheral.ledMatrixState[2]=t>>10&31,this._peripheral.ledMatrixState[3]=t>>15&31,this._peripheral.ledMatrixState[4]=t>>20&31,this._peripheral.displayMatrix(this._peripheral.ledMatrixState)),new Promise((e=>{setTimeout((()=>{e()}),100)}))}displayText(e){const t=String(e.TEXT).substring(0,19);t.length>0&&this._peripheral.displayText(t);const n=120*(6*t.length+6);return new Promise((e=>{setTimeout((()=>{e()}),n)}))}displayClear(){for(let e=0;e<5;e++)this._peripheral.ledMatrixState[e]=0;return this._peripheral.displayMatrix(this._peripheral.ledMatrixState),new Promise((e=>{setTimeout((()=>{e()}),100)}))}whenTilted(e){return this._isTilted(e.DIRECTION)}isTilted(e){return this._isTilted(e.DIRECTION)}getTiltAngle(e){return this._getTiltAngle(e.DIRECTION)}_isTilted(e){return e===w?Math.abs(this._peripheral.tiltX/10)>=M.TILT_THRESHOLD||Math.abs(this._peripheral.tiltY/10)>=M.TILT_THRESHOLD:this._getTiltAngle(e)>=M.TILT_THRESHOLD}_getTiltAngle(e){switch(e){case y:return Math.round(this._peripheral.tiltY/-10);case b:return Math.round(this._peripheral.tiltY/10);case v:return Math.round(this._peripheral.tiltX/-10);case S:return Math.round(this._peripheral.tiltX/10);default:s.warn("Unknown tilt direction in _getTiltAngle: ".concat(e))}}whenPinConnected(e){const t=parseInt(e.PIN,10);if(!isNaN(t))return!(t<0||t>2)&&this._peripheral._checkPinState(t)}}e.exports=M},function(e,t,n){const r=n(6),i=n(71),s=n(4),o=n(3),a=n(2),l=n(5),c=n(12),u=n(1),{fetchWithTimeout:d}=n(44),h="ALTO",p="TENOR",m="SQUEAK",f="GIANT",g="KITTEN",y="ar",b="zh-cn",v="da",S="nl",w="en",k="fr",T="de",x="hi",E="is",A="it",C="ja",I="ko",O="nb",M="pl",N="pt-br",R="pt",D="ro",P="ru",L="es",B="es-419",z="sv",U="tr",j="cy";class F{constructor(e){this.runtime=e,this._soundPlayers=new Map,this._stopAllSpeech=this._stopAllSpeech.bind(this),this.runtime&&this.runtime.on("PROJECT_STOP_ALL",this._stopAllSpeech),this._onTargetCreated=this._onTargetCreated.bind(this),this.runtime&&e.on("targetWasCreated",this._onTargetCreated),this._supportedLocales=this._getSupportedLocales()}get VOICE_INFO(){return{[h]:{name:r({id:"text2speech.alto",default:"alto",description:"Name for a voice with ambiguous gender."}),gender:"female",playbackRate:1},[p]:{name:r({id:"text2speech.tenor",default:"tenor",description:"Name for a voice with ambiguous gender."}),gender:"male",playbackRate:1},[m]:{name:r({id:"text2speech.squeak",default:"squeak",description:"Name for a funny voice with a high pitch."}),gender:"female",playbackRate:1.19},[f]:{name:r({id:"text2speech.giant",default:"giant",description:"Name for a funny voice with a low pitch."}),gender:"male",playbackRate:.84},[g]:{name:r({id:"text2speech.kitten",default:"kitten",description:"A baby cat."}),gender:"female",playbackRate:1.41}}}get LANGUAGE_INFO(){return{[y]:{name:"Arabic",locales:["ar"],speechSynthLocale:"arb",singleGender:!0},[b]:{name:"Chinese (Mandarin)",locales:["zh-cn","zh-tw"],speechSynthLocale:"cmn-CN",singleGender:!0},[v]:{name:"Danish",locales:["da"],speechSynthLocale:"da-DK"},[S]:{name:"Dutch",locales:["nl"],speechSynthLocale:"nl-NL"},[w]:{name:"English",locales:["en"],speechSynthLocale:"en-US"},[k]:{name:"French",locales:["fr"],speechSynthLocale:"fr-FR"},[T]:{name:"German",locales:["de"],speechSynthLocale:"de-DE"},[x]:{name:"Hindi",locales:["hi"],speechSynthLocale:"hi-IN",singleGender:!0},[E]:{name:"Icelandic",locales:["is"],speechSynthLocale:"is-IS"},[A]:{name:"Italian",locales:["it"],speechSynthLocale:"it-IT"},[C]:{name:"Japanese",locales:["ja","ja-hira"],speechSynthLocale:"ja-JP"},[I]:{name:"Korean",locales:["ko"],speechSynthLocale:"ko-KR",singleGender:!0},[O]:{name:"Norwegian",locales:["nb","nn"],speechSynthLocale:"nb-NO",singleGender:!0},[M]:{name:"Polish",locales:["pl"],speechSynthLocale:"pl-PL"},[N]:{name:"Portuguese (Brazilian)",locales:["pt-br"],speechSynthLocale:"pt-BR"},[R]:{name:"Portuguese (European)",locales:["pt"],speechSynthLocale:"pt-PT"},[D]:{name:"Romanian",locales:["ro"],speechSynthLocale:"ro-RO",singleGender:!0},[P]:{name:"Russian",locales:["ru"],speechSynthLocale:"ru-RU"},[L]:{name:"Spanish (European)",locales:["es"],speechSynthLocale:"es-ES"},[B]:{name:"Spanish (Latin American)",locales:["es-419"],speechSynthLocale:"es-US"},[z]:{name:"Swedish",locales:["sv"],speechSynthLocale:"sv-SE",singleGender:!0},[U]:{name:"Turkish",locales:["tr"],speechSynthLocale:"tr-TR",singleGender:!0},[j]:{name:"Welsh",locales:["cy"],speechSynthLocale:"cy-GB",singleGender:!0}}}static get STATE_KEY(){return"Scratch.text2speech"}static get DEFAULT_TEXT2SPEECH_STATE(){return{voiceId:h}}get DEFAULT_LANGUAGE(){return"en"}_getState(e){let t=e.getCustomState(F.STATE_KEY);return t||(t=c.simple(F.DEFAULT_TEXT2SPEECH_STATE),e.setCustomState(F.STATE_KEY,t)),t}_onTargetCreated(e,t){if(t){const n=t.getCustomState(F.STATE_KEY);n&&e.setCustomState(F.STATE_KEY,c.simple(n))}}getInfo(){let e="hello";return this.isSupportedLanguage(this.getEditorLanguage())&&(e=r({id:"text2speech.defaultTextToSpeak",default:"hello",description:"hello: the default text to speak"})),{id:"text2speech",name:r({id:"text2speech.categoryName",default:"Text to Speech",description:"Name of the Text to Speech extension."}),blockIconURI:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNDBweCIgaGVpZ2h0PSI0MHB4IiB2aWV3Qm94PSIwIDAgNDAgNDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjIgKDY3MTQ1KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5FeHRlbnNpb25zL1NvZnR3YXJlL1RleHQtdG8tU3BlZWNoLUJsb2NrPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGcgaWQ9IkV4dGVuc2lvbnMvU29mdHdhcmUvVGV4dC10by1TcGVlY2gtQmxvY2siIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZS1vcGFjaXR5PSIwLjE1Ij4KICAgICAgICA8ZyBpZD0idGV4dDJzcGVlY2giIHRyYW5zZm9ybT0idHJhbnNsYXRlKDQuMDAwMDAwLCA0LjAwMDAwMCkiIGZpbGwtcnVsZT0ibm9uemVybyIgc3Ryb2tlPSIjMDAwMDAwIj4KICAgICAgICAgICAgPHBhdGggZD0iTTExLjUsMTcuNjY5MzQzNSBDMTEuNSwxNi42NTM5MjY5IDEwLjAwNjAxNDUsMTYuMDg0NDI3NCA5LjExMjU2MDI0LDE2Ljg4ODMgTDYuNDEyNTYwMjQsMTkuMDUwNzE0IEM1LjM5MzQ2NzU1LDE5Ljg2Njg5OTQgNC4wNzQ5NzM1MSwyMC4zMzE3NTc1IDIuNywyMC4zMzE3NTc1IEwyLjMsMjAuMzMxNzU3NSBDMS4yNjUxOTIzMywyMC4zMzE3NTc1IDAuNSwyMS4wMjEyMDAzIDAuNSwyMS45MDQwNzEgTDAuNSwyNi4xMzg3OTg2IEMwLjUsMjcuMDIxNjY5MyAxLjI2NTE5MjMzLDI3LjcxMTExMiAyLjMsMjcuNzExMTEyIEwyLjcsMjcuNzExMTEyIEM0LjE1NzU1NjgyLDI3LjcxMTExMiA1LjQ1MzcyMzIyLDI4LjEzMzUyNzEgNi41MTk3MjA5OCwyOC45OTggTDkuMTE4NDAyOTMsMzEuMTU5MzIxNiBDMTAuMDI2MTg1NSwzMS45MDkwNzkzIDExLjUsMzEuMzQ3MjY4OSAxMS41LDMwLjI4MzQyNTUgTDExLjUsMTcuNjY5MzQzNSBaIiBpZD0ic3BlYWtlciIgZmlsbD0iIzRENEQ0RCI+PC9wYXRoPgogICAgICAgICAgICA8cGF0aCBkPSJNMjEuNjQzNjA2NiwxNi41IEMxOS45NzcwMDk5LDE4LjQzNzAyMzQgMTcuMTA1MDI3NSwxOS45Mjg1NzE0IDE1LjY2NjY2NjcsMTkuOTI4NTcxNCBDMTUuNTEyNjM5NywxOS45Mjg1NzE0IDE1LjMxNjYyOTIsMTkuODk1OTAzIDE1LjEwOTcyNjUsMTkuNzkyNDUxNyBDMTQuNzM3NjAzOSwxOS42MDYzOTA0IDE0LjUsMTkuMjQ5OTg0NiAxNC41LDE4Ljc2MTkwNDggQzE0LjUsMTguNjU2ODA0MSAxNC41MTcwNTU1LDE4LjU1NDUwNzYgMTQuNTQ5NDQ2NywxOC40NTQwODQ0IEMxNC42MjU3NTQ1LDE4LjIxNzUwNjMgMTUuMTczNTcyMSwxNy40Njc1MzEgMTUuMjc3MjA3MSwxNy4yODA5ODgxIEMxNS41NDYzNTI2LDE2Ljc5NjUyNjEgMTUuNzM5MDI1LDE2LjIwNjM1NjEgMTUuODQzMjg5MSwxNS40MTYwMDM0IEMxMy4xODk3MDA1LDEzLjkyNjgzNjkgMTEuNSwxMS4xMTM5NjY4IDExLjUsOCBDMTEuNSwzLjMwNTU3OTYzIDE1LjMwNTU3OTYsLTAuNSAyMCwtMC41IEwyNCwtMC41IEMyOC42OTQ0MjA0LC0wLjUgMzIuNSwzLjMwNTU3OTYzIDMyLjUsOCBDMzIuNSwxMi42OTQ0MjA0IDI4LjY5NDQyMDQsMTYuNSAyNCwxNi41IEwyMS42NDM2MDY2LDE2LjUgWiIgaWQ9InNwZWVjaCIgZmlsbD0iI0ZGRkZGRiI+PC9wYXRoPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+",menuIconURI:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjIgKDY3MTQ1KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5FeHRlbnNpb25zL1NvZnR3YXJlL1RleHQtdG8tU3BlZWNoLU1lbnU8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZyBpZD0iRXh0ZW5zaW9ucy9Tb2Z0d2FyZS9UZXh0LXRvLVNwZWVjaC1NZW51IiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0idGV4dDJzcGVlY2giIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuMDAwMDAwLCAyLjAwMDAwMCkiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik01Ljc1LDguODM0NjcxNzMgQzUuNzUsOC4zMjY5NjM0NCA1LjAwMzAwNzI3LDguMDQyMjEzNzEgNC41NTYyODAxMiw4LjQ0NDE0OTk5IEwzLjIwNjI4MDEyLDkuNTI1MzU3MDIgQzIuNjk2NzMzNzgsOS45MzM0NDk2OCAyLjAzNzQ4Njc1LDEwLjE2NTg3ODggMS4zNSwxMC4xNjU4Nzg4IEwxLjE1LDEwLjE2NTg3ODggQzAuNjMyNTk2MTY1LDEwLjE2NTg3ODggMC4yNSwxMC41MTA2MDAyIDAuMjUsMTAuOTUyMDM1NSBMMC4yNSwxMy4wNjkzOTkzIEMwLjI1LDEzLjUxMDgzNDYgMC42MzI1OTYxNjUsMTMuODU1NTU2IDEuMTUsMTMuODU1NTU2IEwxLjM1LDEzLjg1NTU1NiBDMi4wNzg3Nzg0MSwxMy44NTU1NTYgMi43MjY4NjE2MSwxNC4wNjY3NjM2IDMuMjU5ODYwNDksMTQuNDk5IEw0LjU1OTIwMTQ3LDE1LjU3OTY2MDggQzUuMDEzMDkyNzYsMTUuOTU0NTM5NiA1Ljc1LDE1LjY3MzYzNDQgNS43NSwxNS4xNDE3MTI4IEw1Ljc1LDguODM0NjcxNzMgWiIgaWQ9InNwZWFrZXIiIHN0cm9rZS1vcGFjaXR5PSIwLjE1IiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS13aWR0aD0iMC41IiBmaWxsPSIjNEQ0RDREIj48L3BhdGg+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMC43MDQ4MzEzLDggQzkuNzkwNjc0NjgsOS4xMzExNDg0NyA4LjMwNjYxODQsOS43MTQyODU3MSA3LjgzMzMzMzMzLDkuNzE0Mjg1NzEgQzcuODMzMzMzMzMsOS43MTQyODU3MSA3LjUsOS43MTQyODU3MSA3LjUsOS4zODA5NTIzOCBDNy41LDkuMDg1MjI2ODQgOC4wNjIyMDE2OCw4LjkwMTk0MTY0IDguMTg5MDYwNjcsNy41Njc1NDA1OCBDNi44ODk5Njk5MSw2LjkwNjc5MDA1IDYsNS41NTczMjY4MyA2LDQgQzYsMS43OTA4NjEgNy43OTA4NjEsNC4wNTgxMjI1MWUtMTYgMTAsMCBMMTIsMCBDMTQuMjA5MTM5LC00LjA1ODEyMjUxZS0xNiAxNiwxLjc5MDg2MSAxNiw0IEMxNiw2LjIwOTEzOSAxNC4yMDkxMzksOCAxMiw4IEwxMC43MDQ4MzEzLDggWiIgaWQ9InNwZWVjaCIgZmlsbD0iIzBFQkQ4QyI+PC9wYXRoPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+",blocks:[{opcode:"speakAndWait",text:r({id:"text2speech.speakAndWaitBlock",default:"speak [WORDS]",description:"Speak some words."}),blockType:o.COMMAND,arguments:{WORDS:{type:s.STRING,defaultValue:e}}},{opcode:"setVoice",text:r({id:"text2speech.setVoiceBlock",default:"set voice to [VOICE]",description:"Set the voice for speech synthesis."}),blockType:o.COMMAND,arguments:{VOICE:{type:s.STRING,menu:"voices",defaultValue:h}}},{opcode:"setLanguage",text:r({id:"text2speech.setLanguageBlock",default:"set language to [LANGUAGE]",description:"Set the language for speech synthesis."}),blockType:o.COMMAND,arguments:{LANGUAGE:{type:s.STRING,menu:"languages",defaultValue:this.getCurrentLanguage()}}}],menus:{voices:{acceptReporters:!0,items:this.getVoiceMenu()},languages:{acceptReporters:!0,items:this.getLanguageMenu()}}}}getEditorLanguage(){return(r.setup().locale||navigator.language||navigator.userLanguage||this.DEFAULT_LANGUAGE).toLowerCase()}getCurrentLanguage(){const e=this.runtime.getTargetForStage();return e?(e.textToSpeechLanguage||this.setCurrentLanguage(this.getEditorLanguage()),e.textToSpeechLanguage):this.DEFAULT_LANGUAGE}setCurrentLanguage(e){const t=this.runtime.getTargetForStage();if(!t)return;this.isSupportedLanguage(e)&&(t.textToSpeechLanguage=this._getExtensionLocaleForSupportedLocale(e));const n=i.nameMap[e.toLowerCase()];n&&this.isSupportedLanguage(n)&&(t.textToSpeechLanguage=this._getExtensionLocaleForSupportedLocale(n)),t.textToSpeechLanguage||(t.textToSpeechLanguage=this.DEFAULT_LANGUAGE)}_getExtensionLocaleForSupportedLocale(e){for(const t in this.LANGUAGE_INFO)if(this.LANGUAGE_INFO[t].locales.includes(e))return t;u.error("cannot find extension locale for locale ".concat(e))}_getSpeechSynthLocale(){let e=this.LANGUAGE_INFO[this.DEFAULT_LANGUAGE].speechSynthLocale;return this.LANGUAGE_INFO[this.getCurrentLanguage()]&&(e=this.LANGUAGE_INFO[this.getCurrentLanguage()].speechSynthLocale),e}_getSupportedLocales(){return Object.keys(this.LANGUAGE_INFO).reduce(((e,t)=>e.concat(this.LANGUAGE_INFO[t].locales)),[])}isSupportedLanguage(e){return this._supportedLocales.includes(e)}getVoiceMenu(){return Object.keys(this.VOICE_INFO).map((e=>({text:this.VOICE_INFO[e].name,value:e})))}getLanguageMenu(){const e=this.getEditorLanguage(),t={};let n=i.menuMap[e];if(n){let r=[];i.spokenLanguages&&(r=i.spokenLanguages[e],n=n.concat(r)),n.forEach((e=>{t[e.code]=e.name}))}return Object.keys(this.LANGUAGE_INFO).map((e=>{let n=this.LANGUAGE_INFO[e].name;const r=t[e];return r&&(n=r),n=n.charAt(0).toUpperCase()+n.slice(1),{text:n,value:e}}))}setVoice(e,t){const n=this._getState(t.target);let r=e.VOICE,i=parseInt(r,10);isNaN(i)||(i-=1,i=l.wrapClamp(i,0,Object.keys(this.VOICE_INFO).length-1),r=Object.keys(this.VOICE_INFO)[i]),Object.keys(this.VOICE_INFO).includes(r)&&(n.voiceId=r)}setLanguage(e){this.setCurrentLanguage(e.LANGUAGE)}_stopAllSpeech(){this._soundPlayers.forEach((e=>{e.stop()}))}speakAndWait(e,t){let n=a.toString(e.WORDS),r=this._getSpeechSynthLocale();const i=this._getState(t.target);let s=this.VOICE_INFO[i.voiceId].gender,o=this.VOICE_INFO[i.voiceId].playbackRate;this.LANGUAGE_INFO[this.getCurrentLanguage()].singleGender&&(s="female",i.voiceId===p&&(o=.89),i.voiceId===f&&(o=.79)),i.voiceId===g&&(n=n.replace(/\S+/g,"meow"),r=this.LANGUAGE_INFO[this.DEFAULT_LANGUAGE].speechSynthLocale);let l="".concat("https://synthesis-service.scratch.mit.edu","/synth");return l+="?locale=".concat(r),l+="&gender=".concat(s),l+="&text=".concat(encodeURIComponent(n.substring(0,128))),d(l,{},1e4).then((e=>{if(200!==e.status)throw new Error("HTTP ".concat(e.status," error reaching translation service"));return e.arrayBuffer()})).then((e=>{const t={data:{buffer:e}};return this.runtime.audioEngine.decodeSoundPlayer(t)})).then((e=>{this._soundPlayers.set(e.id,e),e.setPlaybackRate(o);const t=this.runtime.audioEngine.createEffectChain();return t.set("volume",250),e.connect(t),e.play(),new Promise((t=>{e.on("stop",(()=>{this._soundPlayers.delete(e.id),t()}))}))})).catch((e=>{u.warn(e)}))}}e.exports=F},function(e,t,n){const r=n(4),i=n(3),s=n(2),o=n(1),{fetchWithTimeout:a}=n(44),l=n(71),c=n(6);e.exports=class{constructor(){this._viewerLanguageCode=this.getViewerLanguageCode(),this._supportedLanguages=[],this._randomLanguageCode="en",this._translateResult="",this._lastLangTranslated="",this._lastTextTranslated=""}static get STATE_KEY(){return"Scratch.translate"}getInfo(){return this._supportedLanguages=this._getSupportedLanguages(this.getViewerLanguageCode()),this._randomLanguageCode=this._supportedLanguages[Math.floor(Math.random()*this._supportedLanguages.length)].value,{id:"translate",name:c({id:"translate.categoryName",default:"Translate",description:"Name of extension that adds translate blocks"}),blockIconURI:"data:image/png;base64, ",menuIconURI:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAABYlAAAWJQFJUiTwAAAGAklEQVRYhe1YbUxTVxh+rh02o0KtkOEgKA4U4yeRWCdgxDoxCnH6h22iqSz76aasZlnijzkTBlvS4TJ/LGaJsmiyESe4hAVJvMJGxwQhLKECcRWkpWNZERs6Ctb2Lm97C/fe3n6Jyfzhk5y09z3nPPe57znnPe85DMdxeJ6x6LlW90LgM8BLchR1dXUZeXl5b3Ect+ppXsEwzHBfX98PVVVVY0GbmjW2AdgpaFYP4JxTZ+iLyCVdJFeuXNmdn59fn56enrFkyRIsWhSfk30+H1wuF+x2+1hPT4++oqLiJi/wEoA8AJslXSqdOsOlmARWV1dnlpeXd2ZnZ2fEK0xOqMViGWtoaNh++vRpa9CuZo1ZAJokQlc5dYYROR6RCq1WW56WlhZV3H0H8O9sZIHEQVzEKbTzQooBPBCYz4TlET4oFIosGtZoOHUN+Ph61GYgLuIU2tSscSmAYwAeCcx6NWs8o2aNxVKOkEUi9R55qv428Ng7b3viA/6eAs7dmrctVgD6bYBKGZ6LB4mrk7F/whcmokApfh8BWu6G2mc8ADsktuWmAbtzozGiLUJdu9QQVSC98JUkYNgBfPsboH4Z+GhPoK62FZiaAU7sCrTZmB5VHM3BPjVrrARwUVL1B4CD0vYxLVV68YFNQIICcLrn7SROtTjwEbGIE4iksFIpEVfs1BkeSdvGFUsObAz8Gm8CNTcC/49q42EIEbkLwKfhxCGWIRZC/zrQ/ifgcAWMK5YB+zc8nUBeZFuUORmfQIp/PsHGM/04YMta5oPT6cTs7Cw8Ho+oj9vtzmloaCgPZQtApVI96ejo6K2trR3lOM4nrRftJCzLfq3T6Y7LCfvuNtDL7wepfKgkTz6ZdeHdzePYlq30xz2lUintHhH0UbQ12my2+oKCguMcx7mE7aOHmWHgsxvzzzQP3ysMxMfzt2bxKmNHyZblSE5OjktYEImJidBoNFCr1frOzs5khmHe4Thubp8SCVQoFBwNUUJCwpyNwsfyZGBDOvB2fuCZQAH56KYJKJUpTy1OCOJYvXr1ocbGxjIAPwarRKvYZrNdn5iYEHV8LRW4cBj4oHheXBDT09PPRFwQxKXRaIQpmVjgkSNHfrFardcmJydjIqSMRehtOfzjmMTZmm/8hf5HAnF5vV7RVicSyHGcR6vVHh4YGPjKYrFMkTelq5JAH0B1MzMzUT+iu6cfdwfv+wv9jxchgZomaEFBwcmcnJxVY2NjXQqFQlQ/Pj6O/v7+s2az+U2Hw9Ec7X3tHXfm/v/c2hG3wLCruLm5+VBGRoY2mJGQJ0nc4ODgqZKSkjqKWSzL7olEPjJqx4PRv5CaqvE/OxyTflvWitj3xbBbnUql2kRxjYTRcA4MDHR1d3frguJiIW//NeC9/SVF2LplvcgWK8J6sKWl5UuVSrXO4/HYHj58+FNZWVkLx3HT8Rz0u3vN/t8Ho3aRaH3FgYULrKmpodT8jeBzvDcQ3T1m/5D6RXX0zNmn3TP+uq356xcmkE/NTwLoc+oMTXGpA3CnN7Bi99Hw5s8PL4mlulgFys5BXlwbn4I3qlnjsXgFBr22f+8OrFub7S/79u4Q1cWCEA8KxAmPhRfVrBFy51cK1nJnj+/rvwix0eqVswu5pJDzoPTMKhSZJzQolUoLZSLPCsRFnEI6OYE7I7xPdGYoKiq6YLVaByllWiiIg7iIM5rAYBouBB2yq5w6g+iATWGnqampZGhoqItiJSUP4YrcR9CQUh31JQ7iIk5hm7AXmPxdip5/dNIUCnduYBgm8fLly9tzc3NLwzlSqVTuW7NmzVphQkubwL179+xdXV3HKisrTVJxiJKwnuGHVM2XNjVrPCh3h8IT3+SLLKqrq+tKS0uvrly5UksJKvjsJSkpKd3r9TrkxCGSBxHwIoWXc7zAIOiIOOLUGULOsNHAMIzSZDJ9npmZeSIlJcWfTdPQm0ym8zqd7n257hGPnXxYyePv8py8mVb40ji1+UGZUmFh4Yetra1bzGbzteHh4SlKQNxu961wff7XS3Sau/w0c4VLQF7c8i8IAP4DcHKth/4Ur7MAAAAASUVORK5CYII=",blocks:[{opcode:"getTranslate",text:c({id:"translate.translateBlock",default:"translate [WORDS] to [LANGUAGE]",description:"translate some text to a different language"}),blockType:i.REPORTER,arguments:{WORDS:{type:r.STRING,defaultValue:c({id:"translate.defaultTextToTranslate",default:"hello",description:"hello: the default text to translate"})},LANGUAGE:{type:r.STRING,menu:"languages",defaultValue:this._randomLanguageCode}}},{opcode:"getViewerLanguage",text:c({id:"translate.viewerLanguage",default:"language",description:"the languge of the project viewer"}),blockType:i.REPORTER,arguments:{}}],menus:{languages:{acceptReporters:!0,items:this._supportedLanguages}}}}_getSupportedLanguages(e){return l.menuMap[e].map((e=>({text:e.name,value:e.code})))}getViewerLanguage(){this._viewerLanguageCode=this.getViewerLanguageCode();const e=l.menuMap[this._viewerLanguageCode];let t=e.find((e=>e.code===this._viewerLanguageCode));if(!t&&l.scratchToGoogleMap[this._viewerLanguageCode]){const n=l.scratchToGoogleMap[this._viewerLanguageCode];t=e.find((e=>e.code===n))}let n=this._viewerLanguageCode;return t&&(n=t.name),n}getViewerLanguageCode(){const e=[c.setup().locale].concat(navigator.languages),t=Object.keys(l.menuMap);return(e.reduce(((e,n)=>e||(t.indexOf(n.toLowerCase())>-1?n:e)),"")||"en").toLowerCase()}getLanguageCodeFromArg(e){const t=s.toString(e).toLowerCase();return Object.prototype.hasOwnProperty.call(l.menuMap,t)?t:Object.prototype.hasOwnProperty.call(l.nameMap,t)?l.nameMap[t]:-1!==l.previouslySupported.indexOf(t)?t:"en"}getTranslate(e){if(/^\d+$/.test(e.WORDS))return Promise.resolve(e.WORDS);if(this._lastTextTranslated===e.WORDS&&this._lastLangTranslated===e.LANGUAGE)return this._translateResult;const t=this.getLanguageCodeFromArg(e.LANGUAGE);let n="".concat("https://trampoline.turbowarp.org/translate/","translate?language=");n+=t,n+="&text=",n+=encodeURIComponent(e.WORDS);const r=this;return a(n,{},1e4).then((e=>e.text())).then((t=>{const n=JSON.parse(t).result;return r._translateResult=n,r._lastTextTranslated=e.WORDS,r._lastLangTranslated=e.LANGUAGE,n})).catch((t=>(o.warn("error fetching translate result! ".concat(t)),e.WORDS)))}}},function(e,t,n){const r=n(45),i=n(4),s=n(3),o=n(12),a=n(2),l=n(6),c=n(80),u=n(235),d={MOTION:"motion",DIRECTION:"direction"},h={STAGE:"Stage",SPRITE:"this sprite"},p={OFF:"off",ON:"on",ON_FLIPPED:"on-flipped"};class m{constructor(e){this.runtime=e,this.detect=new u,this._lastUpdate=null,this.firstInstall=!0,this.runtime.ioDevices&&(this.runtime.on(r.PROJECT_LOADED,this.updateVideoDisplay.bind(this)),this.runtime.on(r.PROJECT_RUN_START,this.reset.bind(this)),this._loop())}static get INTERVAL(){return 33}static get DIMENSIONS(){return[480,360]}static get STATE_KEY(){return"Scratch.videoSensing"}static get DEFAULT_MOTION_STATE(){return{motionFrameNumber:0,motionAmount:0,motionDirection:0}}get globalVideoTransparency(){const e=this.runtime.getTargetForStage();return e?e.videoTransparency:50}set globalVideoTransparency(e){const t=this.runtime.getTargetForStage();t&&(t.videoTransparency=e)}get globalVideoState(){const e=this.runtime.getTargetForStage();return e?e.videoState:p.OFF}set globalVideoState(e){const t=this.runtime.getTargetForStage();t&&(t.videoState=e)}updateVideoDisplay(){this.setVideoTransparency({TRANSPARENCY:this.globalVideoTransparency}),this.videoToggle({VIDEO_STATE:this.globalVideoState})}reset(){this.detect.reset();const e=this.runtime.targets;for(let t=0;t<e.length;t++){const n=e[t].getCustomState(m.STATE_KEY);n&&(n.motionAmount=0,n.motionDirection=0)}}_loop(){const e=Math.max(this.runtime.currentStepTime,m.INTERVAL);this._loopInterval=setTimeout(this._loop.bind(this),e);const t=Date.now();null===this._lastUpdate&&(this._lastUpdate=t);if(t-this._lastUpdate>m.INTERVAL){const e=this.runtime.ioDevices.video.getFrame({format:c.FORMAT_IMAGE_DATA,dimensions:m.DIMENSIONS});e&&(this._lastUpdate=t,this.detect.addFrame(e.data))}}_stopLoop(){clearTimeout(this._loopInterval)}_buildMenu(e){return e.map(((e,t)=>{const n={};return n.text=e.name,n.value=e.value||String(t+1),n}))}_getMotionState(e){let t=e.getCustomState(m.STATE_KEY);return t||(t=o.simple(m.DEFAULT_MOTION_STATE),e.setCustomState(m.STATE_KEY,t)),t}static get SensingAttribute(){return d}get ATTRIBUTE_INFO(){return[{name:l({id:"videoSensing.motion",default:"motion",description:'Attribute for the "video [ATTRIBUTE] on [SUBJECT]" block'}),value:d.MOTION},{name:l({id:"videoSensing.direction",default:"direction",description:'Attribute for the "video [ATTRIBUTE] on [SUBJECT]" block'}),value:d.DIRECTION}]}static get SensingSubject(){return h}get SUBJECT_INFO(){return[{name:l({id:"videoSensing.sprite",default:"sprite",description:'Subject for the "video [ATTRIBUTE] on [SUBJECT]" block'}),value:h.SPRITE},{name:l({id:"videoSensing.stage",default:"stage",description:'Subject for the "video [ATTRIBUTE] on [SUBJECT]" block'}),value:h.STAGE}]}static get VideoState(){return p}get VIDEO_STATE_INFO(){return[{name:l({id:"videoSensing.off",default:"off",description:'Option for the "turn video [STATE]" block'}),value:p.OFF},{name:l({id:"videoSensing.on",default:"on",description:'Option for the "turn video [STATE]" block'}),value:p.ON},{name:l({id:"videoSensing.onFlipped",default:"on flipped",description:'Option for the "turn video [STATE]" block that causes the video to be flipped horizontally (reversed as in a mirror)'}),value:p.ON_FLIPPED}]}getInfo(){return this.firstInstall&&(this.globalVideoState=p.ON,this.globalVideoTransparency=50,this.updateVideoDisplay(),this.firstInstall=!1),{id:"videoSensing",name:l({id:"videoSensing.categoryName",default:"Video Sensing",description:"Label for the video sensing extension category"}),blockIconURI:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNDBweCIgaGVpZ2h0PSI0MHB4IiB2aWV3Qm94PSIwIDAgNDAgNDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjIgKDY3MTQ1KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5FeHRlbnNpb25zL1NvZnR3YXJlL1ZpZGVvLVNlbnNpbmctQmxvY2s8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZyBpZD0iRXh0ZW5zaW9ucy9Tb2Z0d2FyZS9WaWRlby1TZW5zaW5nLUJsb2NrIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2Utb3BhY2l0eT0iMC4xNSI+CiAgICAgICAgPGcgaWQ9InZpZGVvLW1vdGlvbiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC4wMDAwMDAsIDEwLjAwMDAwMCkiIGZpbGwtcnVsZT0ibm9uemVybyIgc3Ryb2tlPSIjMDAwMDAwIj4KICAgICAgICAgICAgPGNpcmNsZSBpZD0iT3ZhbC1Db3B5IiBmaWxsPSIjRkZGRkZGIiBvcGFjaXR5PSIwLjI1IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGN4PSIzMiIgY3k9IjE2IiByPSI0LjUiPjwvY2lyY2xlPgogICAgICAgICAgICA8Y2lyY2xlIGlkPSJPdmFsLUNvcHkiIGZpbGw9IiNGRkZGRkYiIG9wYWNpdHk9IjAuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjeD0iMzIiIGN5PSIxMiIgcj0iNC41Ij48L2NpcmNsZT4KICAgICAgICAgICAgPGNpcmNsZSBpZD0iT3ZhbC1Db3B5IiBmaWxsPSIjRkZGRkZGIiBvcGFjaXR5PSIwLjc1IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGN4PSIzMiIgY3k9IjgiIHI9IjQuNSI+PC9jaXJjbGU+CiAgICAgICAgICAgIDxjaXJjbGUgaWQ9Ik92YWwiIGZpbGw9IiNGRkZGRkYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgY3g9IjMyIiBjeT0iNCIgcj0iNC41Ij48L2NpcmNsZT4KICAgICAgICAgICAgPHBhdGggZD0iTTIyLjY3MTk0NzcsNC40MTk1NzY0OSBMMTYuNSw4LjQxOTkxMjk4IEwxNi41LDYuMSBDMTYuNSw0LjA4OTc2NDU0IDE0LjkzNzE4MDYsMi41IDEzLDIuNSBMNC4xLDIuNSBDMi4wNzYxNDIzNywyLjUgMC41LDQuMDc2MTQyMzcgMC41LDYuMSBMMC41LDE0IEMwLjUsMTUuOTI3Mzk4NyAyLjA4NDQ5ODM5LDE3LjUxMTg5NzEgNC4xLDE3LjYgTDEzLDE3LjYgQzE0LjkwMTY2MDIsMTcuNiAxNi41LDE1Ljk0NjU0NSAxNi41LDE0IEwxNi41LDExLjcxNjkwNDggTDIyLjc1NzI0NzksMTUuNDcxMjUzNSBMMjIuODUzNTUzNCwxNS41NDY0NDY2IEMyMi44NzM3ODg2LDE1LjU2NjY4MTggMjIuOTUxNTMxLDE1LjYgMjMsMTUuNiBDMjMuMjY2OTg2NSwxNS42IDIzLjUsMTUuMzgyNTIwNyAyMy41LDE1LjEgTDIzLjUsNC44IEMyMy41LDQuODM2NzY1MzggMjMuNDQzODA1OCw0LjcwNTY0NTYzIDIzLjM3MTI1MzUsNC41NTcyNDc4OCBDMjMuMjI1OTA1Niw0LjMxNTAwMTM5IDIyLjk0MTU5MzcsNC4yNTgxMzg5OSAyMi42NzE5NDc3LDQuNDE5NTc2NDkgWiIgaWQ9InZpZGVvXzM3XyIgZmlsbD0iIzRENEQ0RCI+PC9wYXRoPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+",menuIconURI:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjIgKDY3MTQ1KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5FeHRlbnNpb25zL1NvZnR3YXJlL1ZpZGVvLVNlbnNpbmctTWVudTwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxnIGlkPSJFeHRlbnNpb25zL1NvZnR3YXJlL1ZpZGVvLVNlbnNpbmctTWVudSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9InZpZGVvLW1vdGlvbiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC4wMDAwMDAsIDUuMDAwMDAwKSIgZmlsbC1ydWxlPSJub256ZXJvIj4KICAgICAgICAgICAgPGNpcmNsZSBpZD0iT3ZhbC1Db3B5IiBmaWxsPSIjMEVCRDhDIiBvcGFjaXR5PSIwLjI1IiBjeD0iMTYiIGN5PSI4IiByPSIyIj48L2NpcmNsZT4KICAgICAgICAgICAgPGNpcmNsZSBpZD0iT3ZhbC1Db3B5IiBmaWxsPSIjMEVCRDhDIiBvcGFjaXR5PSIwLjUiIGN4PSIxNiIgY3k9IjYiIHI9IjIiPjwvY2lyY2xlPgogICAgICAgICAgICA8Y2lyY2xlIGlkPSJPdmFsLUNvcHkiIGZpbGw9IiMwRUJEOEMiIG9wYWNpdHk9IjAuNzUiIGN4PSIxNiIgY3k9IjQiIHI9IjIiPjwvY2lyY2xlPgogICAgICAgICAgICA8Y2lyY2xlIGlkPSJPdmFsIiBmaWxsPSIjMEVCRDhDIiBjeD0iMTYiIGN5PSIyIiByPSIyIj48L2NpcmNsZT4KICAgICAgICAgICAgPHBhdGggZD0iTTExLjMzNTk3MzksMi4yMDk3ODgyNSBMOC4yNSw0LjIwOTk1NjQ5IEw4LjI1LDMuMDUgQzguMjUsMi4wNDQ4ODIyNyA3LjQ2ODU5MDMxLDEuMjUgNi41LDEuMjUgTDIuMDUsMS4yNSBDMS4wMzgwNzExOSwxLjI1IDAuMjUsMi4wMzgwNzExOSAwLjI1LDMuMDUgTDAuMjUsNyBDMC4yNSw3Ljk2MzY5OTM3IDEuMDQyMjQ5MTksOC43NTU5NDg1NiAyLjA1LDguOCBMNi41LDguOCBDNy40NTA4MzAwOSw4LjggOC4yNSw3Ljk3MzI3MjUgOC4yNSw3IEw4LjI1LDUuODU4NDUyNDEgTDguNjI4NjIzOTQsNi4wODU2MjY3NyBMMTEuNDI2Nzc2Nyw3Ljc3MzIyMzMgQzExLjQzNjg5NDMsNy43ODMzNDA5MSAxMS40NzU3NjU1LDcuOCAxMS41LDcuOCBDMTEuNjMzNDkzMiw3LjggMTEuNzUsNy42OTEyNjAzNCAxMS43NSw3LjU1IEwxMS43NSwyLjQgQzExLjc1LDIuNDE4MzgyNjkgMTEuNzIxOTAyOSwyLjM1MjgyMjgyIDExLjY4NTYyNjgsMi4yNzg2MjM5NCBDMTEuNjEyOTUyOCwyLjE1NzUwMDY5IDExLjQ3MDc5NjgsMi4xMjkwNjk1IDExLjMzNTk3MzksMi4yMDk3ODgyNSBaIiBpZD0idmlkZW9fMzdfIiBzdHJva2Utb3BhY2l0eT0iMC4xNSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2Utd2lkdGg9IjAuNSIgZmlsbD0iIzRENEQ0RCI+PC9wYXRoPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+",blocks:[{opcode:"whenMotionGreaterThan",text:l({id:"videoSensing.whenMotionGreaterThan",default:"when video motion > [REFERENCE]",description:"Event that triggers when the amount of motion is greater than [REFERENCE]"}),blockType:s.HAT,arguments:{REFERENCE:{type:i.NUMBER,defaultValue:10}}},{opcode:"videoOn",blockType:s.REPORTER,text:l({id:"videoSensing.videoOn",default:"video [ATTRIBUTE] on [SUBJECT]",description:"Reporter that returns the amount of [ATTRIBUTE] for the selected [SUBJECT]"}),arguments:{ATTRIBUTE:{type:i.NUMBER,menu:"ATTRIBUTE",defaultValue:d.MOTION},SUBJECT:{type:i.NUMBER,menu:"SUBJECT",defaultValue:h.SPRITE}}},{opcode:"videoToggle",text:l({id:"videoSensing.videoToggle",default:"turn video [VIDEO_STATE]",description:"Controls display of the video preview layer"}),arguments:{VIDEO_STATE:{type:i.NUMBER,menu:"VIDEO_STATE",defaultValue:p.ON}}},{opcode:"setVideoTransparency",text:l({id:"videoSensing.setVideoTransparency",default:"set video transparency to [TRANSPARENCY]",description:"Controls transparency of the video preview layer"}),arguments:{TRANSPARENCY:{type:i.NUMBER,defaultValue:50}}}],menus:{ATTRIBUTE:{acceptReporters:!0,items:this._buildMenu(this.ATTRIBUTE_INFO)},SUBJECT:{acceptReporters:!0,items:this._buildMenu(this.SUBJECT_INFO)},VIDEO_STATE:{acceptReporters:!0,items:this._buildMenu(this.VIDEO_STATE_INFO)}}}}_analyzeLocalMotion(e){const t=this.runtime.renderer._allDrawables[e.drawableID],n=this._getMotionState(e);return this.detect.getLocalMotion(t,n),n}videoOn(e,t){this.detect.analyzeFrame();let n=this.detect;return e.SUBJECT===h.SPRITE&&(n=this._analyzeLocalMotion(t.target)),e.ATTRIBUTE===d.MOTION?n.motionAmount:n.motionDirection}whenMotionGreaterThan(e,t){this.detect.analyzeFrame();return this._analyzeLocalMotion(t.target).motionAmount>Number(e.REFERENCE)}videoToggle(e){const t=e.VIDEO_STATE;this.globalVideoState=t,t===p.OFF?this.runtime.ioDevices.video.disableVideo():(this.runtime.ioDevices.video.enableVideo(),this.runtime.ioDevices.video.mirror=t===p.ON)}setVideoTransparency(e){const t=a.toNumber(e.TRANSPARENCY);this.globalVideoTransparency=t,this.runtime.ioDevices.video.setPreviewGhost(t)}}e.exports=m},function(e,t,n){const r=n(73),i=n(74),s=n(8),o=function e(t,n,i,o){t.attribs.id||(t.attribs.id=s());const a={id:t.attribs.id,opcode:t.attribs.type,inputs:{},fields:{},next:null,topLevel:i,parent:o,shadow:"shadow"===t.name,x:t.attribs.x,y:t.attribs.y};n[a.id]=a;for(let i=0;i<t.children.length;i++){const s=t.children[i];let o=null,l=null;for(let e=0;e<s.children.length;e++){const t=s.children[e];if(!t.name)continue;const n=t.name.toLowerCase();"block"===n?o=t:"shadow"===n&&(l=t)}switch(!o&&l&&(o=l),s.name.toLowerCase()){case"field":{const e=s.attribs.name,t=s.attribs.id;let n="";n=s.children.length>0&&s.children[0].data?s.children[0].data:"",a.fields[e]={name:e,id:t,value:n};const r=s.attribs.variabletype;"string"==typeof r&&(a.fields[e].variableType=r);break}case"comment":a.comment=s.attribs.id;break;case"value":case"statement":{e(o,n,!1,a.id),l&&o!==l&&e(l,n,!1,a.id);const t=s.attribs.name;a.inputs[t]={name:t,block:o.attribs.id,shadow:l?l.attribs.id:null};break}case"next":if(!o||!o.attribs)continue;e(o,n,!1,a.id),a.next=o.attribs.id;break;case"mutation":a.mutation=r(s)}}};e.exports=function(e){if("object"==typeof e&&"object"==typeof e.xml)return function(e){const t={};for(let n=0;n<e.length;n++){const r=e[n];if(!r.name||!r.attribs)continue;const i=r.name.toLowerCase();"block"!==i&&"shadow"!==i||o(r,t,!0,null)}const n=[];for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.push(t[e]);return n}(i.parseDOM(e.xml.outerHTML,{decodeEntities:!0}))}},function(e,t){var n={amp:"&",apos:"'",lt:"<",gt:">",quot:'"',nbsp:" "},r=/&([a-z]+);/gi;e.exports=function(e){return e.replace(r,(function(e,t){return t=t.toLowerCase(),n.hasOwnProperty(t)?n[t]:e}))}},function(e,t){let n=0;const r={},i="object"==typeof window&&window.performance;class s{constructor(e){this.id=-1,this.totalTime=0,this.selfTime=0,this.arg=null,this.depth=e,this.count=0}}class o{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};this.records=[],this.increments=[],this.counters=[],this.nullFrame=new s(-1),this._stack=[new s(0)],this.onFrame=e,this.START=0,this.STOP=1}start(e,t){this.records.push(0,e,t,i.now())}stop(){this.records.push(1,i.now())}increment(e){this.increments[e]||(this.increments[e]=new s(-1),this.increments[e].id=e),this.increments[e].count+=1}frame(e,t){for(let n=0;n<this.counters.length;n++)if(this.counters[n].id===e&&this.counters[n].arg===t)return this.counters[n];const n=new s(-1);return n.id=e,n.arg=t,this.counters.push(n),n}reportFrames(){const e=this._stack;let t=1;for(let n=0;n<this.records.length;)if(0===this.records[n]){t>=e.length&&e.push(new s(t));const r=e[t++];r.id=this.records[n+1],r.arg=this.records[n+2],r.totalTime=this.records[n+3],r.selfTime=0,n+=4}else{if(1!==this.records[n])throw this.records.length=0,new Error("Unable to decode Profiler records.");{const r=this.records[n+1],i=e[--t];i.totalTime=r-i.totalTime,i.selfTime+=i.totalTime,e[t-1].selfTime-=i.totalTime,i.count=1,this.onFrame(i),n+=2}}for(let e=0;e<this.increments.length;e++)this.increments[e]&&this.increments[e].count>0&&(this.onFrame(this.increments[e]),this.increments[e].count=0);for(let e=0;e<this.counters.length;e++)this.counters[e].count>0&&(this.onFrame(this.counters[e]),this.counters[e].count=0);this.records.length=0}idByName(e){return o.idByName(e)}nameById(e){return o.nameById(e)}static idByName(e){return"number"!=typeof r[e]&&(r[e]=n++),r[e]}static nameById(e){for(const t in r)if(r[t]===e)return t;return null}static available(){return"object"==typeof window&&void 0!==window.performance}}o.START=0,o.STOP=1,e.exports=o},function(e,t,n){const r=n(14),i=n(25),s=n(50),o=n(49);let a=-1,l=-1,c=-1;class u{constructor(e){this.timer=new r,this.runtime=e,this.activeThread=null}static get WARP_TIME(){return 500}stepThreads(){const e=.75*this.runtime.currentStepTime;this.runtime.updateCurrentMSecs(),this.timer.start();let t=1/0,n=!1;const r=[];for(;this.runtime.threads.length>0&&t>0&&this.timer.timeElapsed()<e&&(this.runtime.turboMode||!this.runtime.redrawRequested);){null!==this.runtime.profiler&&(-1===l&&(l=this.runtime.profiler.idByName("Sequencer.stepThreads#inner")),this.runtime.profiler.start(l)),t=0;let e=!1;const s=this.runtime.threads;for(let r=0;r<s.length;r++){const o=this.activeThread=s[r];0!==o.stack.length&&o.status!==i.STATUS_DONE?(o.status!==i.STATUS_YIELD_TICK||n||(o.status=i.STATUS_RUNNING),o.status!==i.STATUS_RUNNING&&o.status!==i.STATUS_YIELD||(null!==this.runtime.profiler&&(-1===a&&(a=this.runtime.profiler.idByName("Sequencer.stepThread")),this.runtime.profiler.increment(a)),this.stepThread(o),o.warpTimer=null),o.status===i.STATUS_RUNNING&&t++,0!==o.stack.length&&o.status!==i.STATUS_DONE||(e=!0)):e=!0}if(n=!0,null!==this.runtime.profiler&&this.runtime.profiler.stop(),e){let e=0;for(let t=0;t<this.runtime.threads.length;t++){const n=this.runtime.threads[t];0!==n.stack.length&&n.status!==i.STATUS_DONE?(this.runtime.threads[e]=n,e++):(this.runtime.threadMap.delete(n.getId()),r.push(n))}this.runtime.threads.length=e}}return this.activeThread=null,r}stepThread(e){if(e.isCompiled)return void o(e);let t=e.peekStack();if(t||(e.popStack(),0!==e.stack.length))for(;t=e.peekStack();){let n=e.peekStackFrame().warpMode;if(n&&!e.warpTimer&&(e.warpTimer=new r,e.warpTimer.start()),null!==this.runtime.profiler&&(-1===c&&(c=this.runtime.profiler.idByName("execute")),this.runtime.profiler.increment(c)),null===e.target?this.retireThread(e):s(this,e),e.blockGlowInFrame=t,e.status===i.STATUS_YIELD){if(e.status=i.STATUS_RUNNING,n&&e.warpTimer.timeElapsed()<=u.WARP_TIME)continue;return}if(e.status===i.STATUS_PROMISE_WAIT)return;if(e.status===i.STATUS_YIELD_TICK)return;if(e.status===i.STATUS_DONE)return;for(e.peekStack()!==t||e.peekStackFrame().waitingReporter||e.goToNextBlock();!e.peekStack();){if(e.popStack(),0===e.stack.length)return void(e.status=i.STATUS_DONE);const t=e.peekStackFrame();if(n=t.warpMode,t.isLoop){if(!n||e.warpTimer.timeElapsed()>u.WARP_TIME)return}else t.waitingReporter||e.goToNextBlock()}}else e.status=i.STATUS_DONE}stepToBranch(e,t,n){t||(t=1);const r=e.peekStack(),i=e.target.blocks.getBranch(r,t);e.peekStackFrame().isLoop=n,i?e.pushStack(i):e.pushStack(null)}stepToProcedure(e,t){const n=e.target.blocks.getProcedureDefinition(t);if(!n)return;const r=e.isRecursiveCall(t);if(e.pushStack(n),e.peekStackFrame().warpMode&&e.warpTimer.timeElapsed()>u.WARP_TIME)e.status=i.STATUS_YIELD;else{const t=e.target.blocks.getBlock(n),s=e.target.blocks.getBlock(t.inputs.custom_block.block);let o=!1;if(s&&s.mutation){const e=s.mutation.warp;"boolean"==typeof e?o=e:"string"==typeof e&&(o=JSON.parse(e))}o?e.peekStackFrame().warpMode=!0:r&&(e.status=i.STATUS_YIELD)}}retireThread(e){e.stack=[],e.stackFrame=[],e.requestScriptGlowInFrame=!1,e.status=i.STATUS_DONE,e.isCompiled&&(e.procedures=null,e.generator=null)}}e.exports=u},function(e,t,n){const{IRGenerator:r}=n(48),i=n(78);e.exports=e=>{const t=new r(e).generate(),n={},s=e.target,o=e=>{if(e.cachedCompileResult)return e.cachedCompileResult;const n=new i(e,t,s).compile();return e.cachedCompileResult=n,n},a=o(t.entry);for(const e of Object.keys(t.procedures)){const r=o(t.procedures[e]);n[e]=r}return{startingFunction:a,procedures:n,executableHat:t.entry.executableHat}}},function(e,t){e.exports={stacked:["looks_changestretchby","looks_hideallsprites","looks_say","looks_sayforsecs","looks_setstretchto","looks_switchbackdroptoandwait","looks_think","looks_thinkforsecs","motion_align_scene","motion_glidesecstoxy","motion_glideto","motion_goto","motion_pointtowards","motion_scroll_right","motion_scroll_up","sensing_askandwait","sensing_setdragmode","sound_changeeffectby","sound_changevolumeby","sound_cleareffects","sound_play","sound_playuntildone","sound_seteffectto","sound_setvolumeto","sound_stopallsounds"],inputs:["motion_xscroll","motion_yscroll","sensing_loud","sensing_loudness","sensing_userid","sound_volume"]}},function(e,t){e.exports=class{constructor(e){if(0===e.trim().length)throw new Error("prefix cannot be empty");this.prefix=e,this.count=0}next(){return"".concat(this.prefix).concat(this.count++)}}},function(e,t,n){const r=n(79);e.exports=new class extends r{constructor(){super(),this._stackFrame={},this._startedBranch=null}get stackFrame(){return this._stackFrame}startBranch(e,t){this._startedBranch=[e,t]}startProcedure(){throw new Error("startProcedure is not supported by this BlockUtility")}initParams(){throw new Error("initParams is not supported by this BlockUtility")}pushParam(){throw new Error("pushParam is not supported by this BlockUtility")}getParam(){throw new Error("getParam is not supported by this BlockUtility")}init(e,t,n){this.thread=e,this.sequencer=e.target.runtime.sequencer,this._stackFrame=n,this._startedBranch=null,e.stack[0]=t}}},function(e,t){e.exports={supportsNullishCoalescing:(()=>{try{new Function("undefined ?? 3");return!0}catch(e){return!1}})()}},function(e,t){e.exports={OUTPUT_SHAPE_HEXAGONAL:1,OUTPUT_SHAPE_ROUND:2,OUTPUT_SHAPE_SQUARE:3}},function(e,t){e.exports=class{constructor(e){this._type=e,this._onOpen=null,this._onClose=null,this._onError=null,this._handleMessage=null,this._ws=null}open(){if(!(this._onOpen&&this._onClose&&this._onError&&this._handleMessage))throw new Error("Must set open, close, message and error handlers before calling open on the socket");let e;switch(this._type){case"BLE":e="scratch/ble";break;case"BT":e="scratch/bt";break;default:throw new Error("Unknown ScratchLink socket Type: ".concat(this._type))}const t=(e,t)=>{t.onopen=t.onerror=null,t.close(),this._ws=e,this._ws.onopen=this._onOpen,this._ws.onclose=this._onClose,this._ws.onerror=this._onError,this._ws.onmessage=this._onMessage.bind(this)},n=new WebSocket("ws://127.0.0.1:20111/".concat(e)),r=new WebSocket("wss://device-manager.scratch.mit.edu:20110/".concat(e)),i=setTimeout((()=>{t(n,r),this._ws.onerror(new Event("timeout"))}),15e3);let s,o;n.onopen=e=>{clearTimeout(i),t(n,r),this._ws.onopen(e)},r.onopen=e=>{clearTimeout(i),t(r,n),this._ws.onopen(e)};const a=()=>{s&&o&&(clearTimeout(i),t(n,r),this._ws.onerror(s))};n.onerror=e=>{s=e,a()},r.onerror=e=>{o=e,a()}}close(){this._ws.close(),this._ws=null}sendMessage(e){const t=JSON.stringify(e);this._ws.send(t)}setOnOpen(e){this._onOpen=e}setOnClose(e){this._onClose=e}setOnError(e){this._onError=e}setHandleMessage(e){this._handleMessage=e}isOpen(){return this._ws&&this._ws.readyState===this._ws.OPEN}_onMessage(e){const t=JSON.parse(e.data);this._handleMessage(t)}}},function(e,t,n){const r=n(19),i=n(216),s=n(7),o=n(1);e.exports=class extends r{constructor(e){super(),this.runtime=e,this.fonts=[]}isValidFamily(e){return/^[-\w ]+$/.test(e)}hasFont(e){return!!this.fonts.find((t=>t.family===e))}getSafeName(e){return e=e.replace(/[^-\w ]/g,""),s.unusedName(e,this.fonts.map((e=>e.family)))}changed(){this.emit("change")}addSystemFont(e,t){if(!this.isValidFamily(e))throw new Error("Invalid family");this.fonts.push({system:!0,family:e,fallback:t}),this.changed()}addCustomFont(e,t,n){if(!this.isValidFamily(e))throw new Error("Invalid family");this.fonts.push({system:!1,family:e,fallback:t,asset:n}),this.updateRenderer(),this.changed()}getFonts(){return this.fonts.map((e=>({system:e.system,name:e.family,family:'"'.concat(e.family,'", ').concat(e.fallback),data:e.asset?e.asset.data:null,format:e.asset?e.asset.dataFormat:null})))}deleteFont(e){const[t]=this.fonts.splice(e,1);t.system||this.updateRenderer(),this.changed()}clear(){const e=this.fonts.some((e=>!e.system));this.fonts=[],e&&this.updateRenderer(),this.changed()}updateRenderer(){if(!this.runtime.renderer||!this.runtime.renderer.setCustomFonts)return;const e={};for(const t of this.fonts)if(!t.system){const n=t.asset.encodeDataURI(),r='@font-face { font-family: "'.concat(t.family,'"; src: url("').concat(n,'"); }');e['"'.concat(t.family,'", ').concat(t.fallback)]=r}this.runtime.renderer.setCustomFonts(e)}serializeJSON(){return 0===this.fonts.length?null:this.fonts.map((e=>{const t={system:e.system,family:e.family,fallback:e.fallback};if(!e.system){const n=e.asset;t.md5ext="".concat(n.assetId,".").concat(n.dataFormat)}return t}))}serializeAssets(){return this.fonts.filter((e=>!e.system)).map((e=>e.asset))}async deserialize(e,t,n){if(n||this.clear(),Array.isArray(e))for(const n of e)if(n&&"object"==typeof n)try{const e=n.system,r=n.family,s=n.fallback;if("boolean"!=typeof e||"string"!=typeof r||"string"!=typeof s||this.hasFont(r))continue;if(e)this.addSystemFont(r,s);else{const e=n.md5ext;if("string"!=typeof e)continue;const o=await i.getByMd5ext(this.runtime,t,this.runtime.storage.AssetType.Font,e);this.addCustomFont(r,s,o)}}catch(e){o.error("could not add font",e)}}}},function(e,t,n){const r=n(7);e.exports=class{static getByMd5ext(e,t,n,i){const s=r.splitFirst(i,"."),o=s[0],a=s[1].toLowerCase();if(t){let r=t.file(i);if(!r){const e=new RegExp("^([^/]*/)?".concat(i,"$"));r=t.file(e)[0]}if(r)return e.wrapAssetRequest((()=>r.async("uint8array").then((t=>e.storage.createAsset(n,a,t,o,!1)))))}return e.wrapAssetRequest((()=>e.storage.load(n,o,a)))}}},function(e,t){e.exports={name:"TurboWarp",url:"https://turbowarp.org/"}},function(e,t,n){const r=n(14);e.exports=class{constructor(e){this._projectTimer=new r({now:()=>e.currentMSecs}),this._projectTimer.start(),this._pausedTime=null,this._paused=!1,this.runtime=e}projectTimer(){return this._paused?this._pausedTime/1e3:this._projectTimer.timeElapsed()/1e3}pause(){this._paused=!0,this._pausedTime=this._projectTimer.timeElapsed()}resume(){this._paused=!1;const e=this._projectTimer.timeElapsed()-this._pausedTime;this._projectTimer.startTime+=e}resetProjectTimer(){this._projectTimer.start()}}},function(e,t,n){const r=n(10),i=n(1);e.exports=class{constructor(e){this.provider=null,this.runtime=e,this.stage=null}setProvider(e){this.provider=e}setStage(e){this.stage=e}postData(e){e.varUpdate&&this.updateCloudVariable(e.varUpdate)}requestCreateVariable(e){this.runtime.canAddCloudVariable()&&this.provider&&this.provider.createVariable(e.name,e.value)}requestUpdateVariable(e,t){this.provider&&this.provider.updateVariable(e,t)}requestRenameVariable(e,t){this.provider&&this.provider.renameVariable(e,t)}requestDeleteVariable(e){this.provider&&this.provider.deleteVariable(e)}updateCloudVariable(e){const t=e.name,n=this.stage.lookupVariableByNameAndType(t,r.SCALAR_TYPE);n&&n.isCloud?n.value=e.value:i.warn("Received an update for a cloud variable that does not exist: ".concat(t))}clear(){this.provider&&(this.provider.requestCloseConnection(),this.provider=null,this.stage=null)}}},function(e,t,n){const r=n(2),i={SPACE:"space",LEFT:"left arrow",UP:"up arrow",RIGHT:"right arrow",DOWN:"down arrow",ENTER:"enter",BACKSPACE:"backspace",DELETE:"delete",SHIFT:"shift",CAPS_LOCK:"caps lock",SCROLL_LOCK:"scroll lock",CONTROL:"control",ESCAPE:"escape",INSERT:"insert",HOME:"home",END:"end",PAGE_UP:"page up",PAGE_DOWN:"page down"},s=new Set(Object.values(i));e.exports=class{constructor(e){this._keysPressed=[],this.runtime=e,this.lastKeyPressed="",this._numeralKeyCodesToStringKey=new Map}_keyStringToScratchKey(e){switch(e=r.toString(e)){case" ":return i.SPACE;case"ArrowLeft":case"Left":return i.LEFT;case"ArrowUp":case"Up":return i.UP;case"Right":case"ArrowRight":return i.RIGHT;case"Down":case"ArrowDown":return i.DOWN;case"Enter":return i.ENTER;case"Backspace":return i.BACKSPACE;case"Delete":return i.DELETE;case"Shift":return i.SHIFT;case"CapsLock":return i.CAPS_LOCK;case"ScrollLock":return i.SCROLL_LOCK;case"Control":return i.CONTROL;case"Escape":return i.ESCAPE;case"Insert":return i.INSERT;case"Home":return i.HOME;case"End":return i.END;case"PageUp":return i.PAGE_UP;case"PageDown":return i.PAGE_DOWN}return e.length>1?"":e}_keyArgToScratchKey(e){if("number"==typeof e){if(e>=48&&e<=90)return String.fromCharCode(e);switch(e){case 32:return i.SPACE;case 37:return i.LEFT;case 38:return i.UP;case 39:return i.RIGHT;case 40:return i.DOWN}}return(e=r.toString(e)).length>1&&s.has(e)?e:(e.length>1&&(e=e[0])," "===e?i.SPACE:"\r"===e?i.ENTER:""===e?i.ESCAPE:e.toUpperCase())}postData(e){if(!e.key)return;const t=this._keyStringToScratchKey(e.key),n=1===t.length?t.toUpperCase():t;if(""===n)return;const r=this._keysPressed.indexOf(n);if(e.isDown?(this.lastKeyPressed=t,this.runtime.emit("KEY_PRESSED",n),r<0&&this._keysPressed.push(n)):r>-1&&this._keysPressed.splice(r,1),Object.prototype.hasOwnProperty.call(e,"keyCode")){const t=e.keyCode;if(this._numeralKeyCodesToStringKey.has(t)){const e=this._numeralKeyCodesToStringKey.get(t);if(e!==n){const t=this._keysPressed.indexOf(e);-1!==t&&this._keysPressed.splice(t,1)}}this._numeralKeyCodesToStringKey.set(t,n)}}getKeyIsDown(e){if("any"===e)return this._keysPressed.length>0;const t=this._keyArgToScratchKey(e);return this._keysPressed.indexOf(t)>-1}getLastKeyPressed(){return this.lastKeyPressed}}},function(e,t,n){const r=n(5),i=e=>Math.round(1e3*e)/1e3;e.exports=class{constructor(e){this._clientX=0,this._clientY=0,this._scratchX=0,this._scratchY=0,this._buttons=new Set,this.usesRightClickDown=!1,this._isDown=!1,this.runtime=e}_activateClickHats(e){this.runtime.startHats("event_whenthisspriteclicked",null,e),this.runtime.startHats("event_whenstageclicked",null,e)}_pickTarget(e,t){if(this.runtime.renderer){const n=this.runtime.renderer.pick(e,t);for(let e=0;e<this.runtime.targets.length;e++){const t=this.runtime.targets[e];if(Object.prototype.hasOwnProperty.call(t,"drawableID")&&t.drawableID===n)return t}}return this.runtime.getTargetForStage()}postData(e){if("number"==typeof e.x&&(this._clientX=e.x,this._scratchX=r.clamp(this.runtime.stageWidth*(e.x/e.canvasWidth-.5),-this.runtime.stageWidth/2,this.runtime.stageWidth/2)),"number"==typeof e.y&&(this._clientY=e.y,this._scratchY=r.clamp(-this.runtime.stageHeight*(e.y/e.canvasHeight-.5),-this.runtime.stageHeight/2,this.runtime.stageHeight/2)),void 0!==e.isDown){const t=void 0===e.button?0:e.button;e.isDown?this._buttons.add(t):this._buttons.delete(t);const n=this._isDown;if(this._isDown=e.isDown,n===this._isDown)return;if(e.wasDragged)return;if(!(e.x>0&&e.x<e.canvasWidth&&e.y>0&&e.y<e.canvasHeight))return;const r=this._pickTarget(e.x,e.y),i=!n&&this._isDown,s=n&&!this._isDown;(r.draggable&&s||!r.draggable&&i)&&this._activateClickHats(r)}}getClientX(){return this._clientX}getClientY(){return this._clientY}getScratchX(){return this.runtime.runtimeOptions.miscLimits?Math.round(this._scratchX):i(this._scratchX)}getScratchY(){return this.runtime.runtimeOptions.miscLimits?Math.round(this._scratchY):i(this._scratchY)}getIsDown(){return this._isDown}getButtonIsDown(e){return 2===e&&(this.usesRightClickDown=!0),this._buttons.has(e)}}},function(e,t){e.exports=class{constructor(e){this.runtime=e}postData(e){const t={};if(e.deltaY<0)t.KEY_OPTION="up arrow";else{if(!(e.deltaY>0))return;t.KEY_OPTION="down arrow"}this.runtime.startHats("event_whenkeypressed",t)}}},function(e,t){e.exports=class{constructor(){this._username=""}postData(e){this._username=e.username}getUsername(){return this._username}}},function(e,t,n){const r=n(2);e.exports=class{constructor(e){this.runtime=e,this._counter=0,this.runtime.on("RUNTIME_DISPOSED",this.clearCounter.bind(this))}getPrimitives(){return{control_repeat:this.repeat,control_repeat_until:this.repeatUntil,control_while:this.repeatWhile,control_for_each:this.forEach,control_forever:this.forever,control_wait:this.wait,control_wait_until:this.waitUntil,control_if:this.if,control_if_else:this.ifElse,control_stop:this.stop,control_create_clone_of:this.createClone,control_delete_this_clone:this.deleteClone,control_get_counter:this.getCounter,control_incr_counter:this.incrCounter,control_clear_counter:this.clearCounter,control_all_at_once:this.allAtOnce}}getHats(){return{control_start_as_clone:{restartExistingThreads:!1}}}repeat(e,t){const n=Math.round(r.toNumber(e.TIMES));void 0===t.stackFrame.loopCounter&&(t.stackFrame.loopCounter=n),t.stackFrame.loopCounter--,t.stackFrame.loopCounter>=0&&t.startBranch(1,!0)}repeatUntil(e,t){r.toBoolean(e.CONDITION)||t.startBranch(1,!0)}repeatWhile(e,t){r.toBoolean(e.CONDITION)&&t.startBranch(1,!0)}forEach(e,t){const n=t.target.lookupOrCreateVariable(e.VARIABLE.id,e.VARIABLE.name);void 0===t.stackFrame.index&&(t.stackFrame.index=0),t.stackFrame.index<Number(e.VALUE)&&(t.stackFrame.index++,n.value=t.stackFrame.index,t.startBranch(1,!0))}waitUntil(e,t){r.toBoolean(e.CONDITION)||t.yield()}forever(e,t){t.startBranch(1,!0)}wait(e,t){if(t.stackTimerNeedsInit()){const n=Math.max(0,1e3*r.toNumber(e.DURATION));t.startStackTimer(n),this.runtime.requestRedraw(),t.yield()}else t.stackTimerFinished()||t.yield()}if(e,t){r.toBoolean(e.CONDITION)&&t.startBranch(1,!1)}ifElse(e,t){r.toBoolean(e.CONDITION)?t.startBranch(1,!1):t.startBranch(2,!1)}stop(e,t){const n=e.STOP_OPTION;"all"===n?t.stopAll():"other scripts in sprite"===n||"other scripts in stage"===n?t.stopOtherTargetThreads():"this script"===n&&t.stopThisScript()}createClone(e,t){this._createClone(r.toString(e.CLONE_OPTION),t.target)}_createClone(e,t){let n;if(n="_myself_"===e?t:this.runtime.getSpriteTargetByName(e),!n)return;const r=n.makeClone();r&&(this.runtime.addTarget(r),r.goBehindOther(n))}deleteClone(e,t){t.target.isOriginal||(this.runtime.disposeTarget(t.target),this.runtime.stopForTarget(t.target))}getCounter(){return this._counter}clearCounter(){this._counter=0}incrCounter(){this._counter++}allAtOnce(e,t){t.startBranch(1,!1)}}},function(e,t,n){const r=n(2);e.exports=class{constructor(e){this.runtime=e,this.runtime.on("KEY_PRESSED",(e=>{this.runtime.startHats("event_whenkeypressed",{KEY_OPTION:e}),this.runtime.startHats("event_whenkeypressed",{KEY_OPTION:"any"})}))}getPrimitives(){return{event_whentouchingobject:this.touchingObject,event_broadcast:this.broadcast,event_broadcastandwait:this.broadcastAndWait,event_whengreaterthan:this.hatGreaterThanPredicate}}getHats(){return{event_whenflagclicked:{restartExistingThreads:!0},event_whenkeypressed:{restartExistingThreads:!1},event_whenthisspriteclicked:{restartExistingThreads:!0},event_whentouchingobject:{restartExistingThreads:!1,edgeActivated:!0},event_whenstageclicked:{restartExistingThreads:!0},event_whenbackdropswitchesto:{restartExistingThreads:!0},event_whengreaterthan:{restartExistingThreads:!1,edgeActivated:!0},event_whenbroadcastreceived:{restartExistingThreads:!0}}}touchingObject(e,t){return t.target.isTouchingObject(e.TOUCHINGOBJECTMENU)}hatGreaterThanPredicate(e,t){const n=r.toString(e.WHENGREATERTHANMENU).toLowerCase(),i=r.toNumber(e.VALUE);switch(n){case"timer":return t.ioQuery("clock","projectTimer")>i;case"loudness":return this.runtime.audioEngine&&this.runtime.audioEngine.getLoudness()>i}return!1}broadcast(e,t){const n=t.runtime.getTargetForStage().lookupBroadcastMsg(e.BROADCAST_OPTION.id,e.BROADCAST_OPTION.name);if(n){const e=n.name;t.startHats("event_whenbroadcastreceived",{BROADCAST_OPTION:e})}}broadcastAndWait(e,t){if(t.stackFrame.broadcastVar||(t.stackFrame.broadcastVar=t.runtime.getTargetForStage().lookupBroadcastMsg(e.BROADCAST_OPTION.id,e.BROADCAST_OPTION.name)),t.stackFrame.broadcastVar){const e=t.stackFrame.broadcastVar.name;if(!t.stackFrame.startedThreads&&(t.stackFrame.startedThreads=t.startHats("event_whenbroadcastreceived",{BROADCAST_OPTION:e}),0===t.stackFrame.startedThreads.length))return;const n=this;t.stackFrame.startedThreads.some((e=>-1!==n.runtime.threads.indexOf(e)))&&(t.stackFrame.startedThreads.every((e=>n.runtime.isWaitingThread(e)))?t.yieldTick():t.yield())}}}},function(e,t,n){const r=n(2),i=n(12),s=n(8),o=n(13),a=n(47),l=n(5);class c{constructor(e){this.runtime=e,this._onTargetChanged=this._onTargetChanged.bind(this),this._onResetBubbles=this._onResetBubbles.bind(this),this._onTargetWillExit=this._onTargetWillExit.bind(this),this._updateBubble=this._updateBubble.bind(this),this.runtime.on("PROJECT_STOP_ALL",this._onResetBubbles),this.runtime.on("targetWasRemoved",this._onTargetWillExit),this.runtime.on(c.SAY_OR_THINK,this._updateBubble)}static get DEFAULT_BUBBLE_STATE(){return{drawableId:null,onSpriteRight:!0,skinId:null,text:"",type:"say",usageId:null}}static get STATE_KEY(){return"Scratch.looks"}static get SAY_OR_THINK(){return"SAY"}static get SAY_BUBBLE_LIMIT(){return 330}static get EFFECT_GHOST_LIMIT(){return{min:0,max:100}}static get EFFECT_BRIGHTNESS_LIMIT(){return{min:-100,max:100}}_getBubbleState(e){let t=e.getCustomState(c.STATE_KEY);return t||(t=i.simple(c.DEFAULT_BUBBLE_STATE),e.setCustomState(c.STATE_KEY,t)),t}_onTargetChanged(e){this._getBubbleState(e).drawableId&&this._positionBubble(e)}_onTargetWillExit(e){const t=this._getBubbleState(e);t.drawableId&&t.skinId&&(this.runtime.renderer.destroyDrawable(t.drawableId,o.SPRITE_LAYER),this.runtime.renderer.destroySkin(t.skinId),t.drawableId=null,t.skinId=null,this.runtime.requestRedraw()),e.onTargetVisualChange=null}_onResetBubbles(){for(let e=0;e<this.runtime.targets.length;e++){this._getBubbleState(this.runtime.targets[e]).text="",this._onTargetWillExit(this.runtime.targets[e])}clearTimeout(this._bubbleTimeout)}_positionBubble(e){if(!e.visible)return;const t=this._getBubbleState(e),[n,r]=this.runtime.renderer.getCurrentSkinSize(t.drawableId);let i;try{i=e.getBoundsForBubble()}catch(t){i={left:e.x,right:e.x,top:e.y,bottom:e.y}}const s=this.runtime.renderer.getNativeSize(),o={left:-s[0]/2,right:s[0]/2,top:s[1]/2,bottom:-s[1]/2};t.onSpriteRight&&n+i.right>o.right&&i.left-n>o.left?(t.onSpriteRight=!1,this._renderBubble(e)):!t.onSpriteRight&&i.left-n<o.left&&n+i.right<o.right?(t.onSpriteRight=!0,this._renderBubble(e)):(this.runtime.renderer.updateDrawablePosition(t.drawableId,[t.onSpriteRight?Math.max(o.left,Math.min(o.right-n,i.right)):Math.min(o.right-n,Math.max(o.left,i.left-n)),Math.min(o.top,i.bottom+r)]),this.runtime.requestRedraw())}_renderBubble(e){if(!this.runtime.renderer)return;const t=this._getBubbleState(e),{type:n,text:r,onSpriteRight:i}=t;e.visible&&""!==r?(t.skinId?this.runtime.renderer.updateTextSkin(t.skinId,n,r,i,[0,0]):(e.onTargetVisualChange=this._onTargetChanged,t.drawableId=this.runtime.renderer.createDrawable(o.SPRITE_LAYER),t.skinId=this.runtime.renderer.createTextSkin(n,r,t.onSpriteRight,[0,0]),this.runtime.renderer.updateDrawableSkinId(t.drawableId,t.skinId)),this._positionBubble(e)):this._onTargetWillExit(e)}_formatBubbleText(e){return""===e?e:("number"==typeof e&&Math.abs(e)>=.01&&e%1!=0&&(e=e.toFixed(2)),e=String(e).substr(0,c.SAY_BUBBLE_LIMIT))}_updateBubble(e,t,n){const r=this._getBubbleState(e);r.type=t,r.text=this._formatBubbleText(n),r.usageId=s(),this._renderBubble(e)}getPrimitives(){return{looks_say:this.say,looks_sayforsecs:this.sayforsecs,looks_think:this.think,looks_thinkforsecs:this.thinkforsecs,looks_show:this.show,looks_hide:this.hide,looks_hideallsprites:()=>{},looks_switchcostumeto:this.switchCostume,looks_switchbackdropto:this.switchBackdrop,looks_switchbackdroptoandwait:this.switchBackdropAndWait,looks_nextcostume:this.nextCostume,looks_nextbackdrop:this.nextBackdrop,looks_changeeffectby:this.changeEffect,looks_seteffectto:this.setEffect,looks_cleargraphiceffects:this.clearEffects,looks_changesizeby:this.changeSize,looks_setsizeto:this.setSize,looks_changestretchby:()=>{},looks_setstretchto:()=>{},looks_gotofrontback:this.goToFrontBack,looks_goforwardbackwardlayers:this.goForwardBackwardLayers,looks_size:this.getSize,looks_costumenumbername:this.getCostumeNumberName,looks_backdropnumbername:this.getBackdropNumberName}}getMonitored(){return{looks_size:{isSpriteSpecific:!0,getId:e=>"".concat(e,"_size")},looks_costumenumbername:{isSpriteSpecific:!0,getId:(e,t)=>a("".concat(e,"_costumenumbername"),t)},looks_backdropnumbername:{getId:(e,t)=>a("backdropnumbername",t)}}}say(e,t){const n=e.MESSAGE;this._say(n,t.target)}_say(e,t){this.runtime.emit(c.SAY_OR_THINK,t,"say",e)}sayforsecs(e,t){this.say(e,t);const n=t.target,r=this._getBubbleState(n).usageId;return new Promise((t=>{this._bubbleTimeout=setTimeout((()=>{this._bubbleTimeout=null,this._getBubbleState(n).usageId===r&&this._updateBubble(n,"say",""),t()}),1e3*e.SECS)}))}think(e,t){this.runtime.emit(c.SAY_OR_THINK,t.target,"think",e.MESSAGE)}thinkforsecs(e,t){this.think(e,t);const n=t.target,r=this._getBubbleState(n).usageId;return new Promise((t=>{this._bubbleTimeout=setTimeout((()=>{this._bubbleTimeout=null,this._getBubbleState(n).usageId===r&&this._updateBubble(n,"think",""),t()}),1e3*e.SECS)}))}show(e,t){t.target.setVisible(!0),this._renderBubble(t.target)}hide(e,t){t.target.setVisible(!1),this._renderBubble(t.target)}_setCostume(e,t,n){if("number"==typeof t)e.setCostume(n?t:t-1);else{const i=e.getCostumeIndexByName(t.toString());-1!==i?e.setCostume(i):"next costume"===t?e.setCostume(e.currentCostume+1):"previous costume"===t?e.setCostume(e.currentCostume-1):isNaN(t)||r.isWhiteSpace(t)||e.setCostume(n?Number(t):Number(t)-1)}return[]}_setBackdrop(e,t,n){if("number"==typeof t)e.setCostume(n?t:t-1);else{const i=e.getCostumeIndexByName(t.toString());if(-1!==i)e.setCostume(i);else if("next backdrop"===t)e.setCostume(e.currentCostume+1);else if("previous backdrop"===t)e.setCostume(e.currentCostume-1);else if("random backdrop"===t){const t=e.getCostumes().length;if(t>1){const n=0,r=t-1,i=e.currentCostume,s=l.inclusiveRandIntWithout(n,r,i);e.setCostume(s)}}else isNaN(t)||r.isWhiteSpace(t)||e.setCostume(n?Number(t):Number(t)-1)}const i=e.getCostumes()[e.currentCostume].name;return this.runtime.startHats("event_whenbackdropswitchesto",{BACKDROP:i})}switchCostume(e,t){this._setCostume(t.target,e.COSTUME)}nextCostume(e,t){this._setCostume(t.target,t.target.currentCostume+1,!0)}switchBackdrop(e){this._setBackdrop(this.runtime.getTargetForStage(),e.BACKDROP)}switchBackdropAndWait(e,t){if(!t.stackFrame.startedThreads&&(t.stackFrame.startedThreads=this._setBackdrop(this.runtime.getTargetForStage(),e.BACKDROP),0===t.stackFrame.startedThreads.length))return;const n=this;t.stackFrame.startedThreads.some((e=>-1!==n.runtime.threads.indexOf(e)))&&(t.stackFrame.startedThreads.every((e=>n.runtime.isWaitingThread(e)))?t.yieldTick():t.yield())}nextBackdrop(){const e=this.runtime.getTargetForStage();this._setBackdrop(e,e.currentCostume+1,!0)}clampEffect(e,t){let n=t;switch(e){case"ghost":n=l.clamp(t,c.EFFECT_GHOST_LIMIT.min,c.EFFECT_GHOST_LIMIT.max);break;case"brightness":n=l.clamp(t,c.EFFECT_BRIGHTNESS_LIMIT.min,c.EFFECT_BRIGHTNESS_LIMIT.max)}return n}changeEffect(e,t){const n=r.toString(e.EFFECT).toLowerCase(),i=r.toNumber(e.CHANGE);if(!Object.prototype.hasOwnProperty.call(t.target.effects,n))return;let s=i+t.target.effects[n];s=this.clampEffect(n,s),t.target.setEffect(n,s)}setEffect(e,t){const n=r.toString(e.EFFECT).toLowerCase();let i=r.toNumber(e.VALUE);i=this.clampEffect(n,i),t.target.setEffect(n,i)}clearEffects(e,t){t.target.clearEffects()}changeSize(e,t){const n=r.toNumber(e.CHANGE);t.target.setSize(t.target.size+n)}setSize(e,t){const n=r.toNumber(e.SIZE);t.target.setSize(n)}goToFrontBack(e,t){t.target.isStage||("front"===e.FRONT_BACK?t.target.goToFront():t.target.goToBack())}goForwardBackwardLayers(e,t){t.target.isStage||("forward"===e.FORWARD_BACKWARD?t.target.goForwardLayers(r.toNumber(e.NUM)):t.target.goBackwardLayers(r.toNumber(e.NUM)))}getSize(e,t){return Math.round(t.target.size)}getBackdropNumberName(e){const t=this.runtime.getTargetForStage();return"number"===e.NUMBER_NAME?t.currentCostume+1:t.getCostumes()[t.currentCostume].name}getCostumeNumberName(e,t){return"number"===e.NUMBER_NAME?t.target.currentCostume+1:t.target.getCostumes()[t.target.currentCostume].name}}e.exports=c},function(e,t,n){const r=n(2),i=n(5),s=n(14);e.exports=class{constructor(e){this.runtime=e}getPrimitives(){return{motion_movesteps:this.moveSteps,motion_gotoxy:this.goToXY,motion_goto:this.goTo,motion_turnright:this.turnRight,motion_turnleft:this.turnLeft,motion_pointindirection:this.pointInDirection,motion_pointtowards:this.pointTowards,motion_glidesecstoxy:this.glide,motion_glideto:this.glideTo,motion_ifonedgebounce:this.ifOnEdgeBounce,motion_setrotationstyle:this.setRotationStyle,motion_changexby:this.changeX,motion_setx:this.setX,motion_changeyby:this.changeY,motion_sety:this.setY,motion_xposition:this.getX,motion_yposition:this.getY,motion_direction:this.getDirection,motion_scroll_right:()=>{},motion_scroll_up:()=>{},motion_align_scene:()=>{},motion_xscroll:()=>{},motion_yscroll:()=>{}}}getMonitored(){return{motion_xposition:{isSpriteSpecific:!0,getId:e=>"".concat(e,"_xposition")},motion_yposition:{isSpriteSpecific:!0,getId:e=>"".concat(e,"_yposition")},motion_direction:{isSpriteSpecific:!0,getId:e=>"".concat(e,"_direction")}}}moveSteps(e,t){const n=r.toNumber(e.STEPS);this._moveSteps(n,t.target)}_moveSteps(e,t){const n=i.degToRad(90-t.direction),r=e*Math.cos(n),s=e*Math.sin(n);t.setXY(t.x+r,t.y+s)}goToXY(e,t){const n=r.toNumber(e.X),i=r.toNumber(e.Y);t.target.setXY(n,i)}getTargetXY(e,t){let n=0,i=0;if("_mouse_"===e)n=t.ioQuery("mouse","getScratchX"),i=t.ioQuery("mouse","getScratchY");else if("_random_"===e){const e=this.runtime.stageWidth,t=this.runtime.stageHeight;n=Math.round(e*(Math.random()-.5)),i=Math.round(t*(Math.random()-.5))}else{e=r.toString(e);const t=this.runtime.getSpriteTargetByName(e);if(!t)return;n=t.x,i=t.y}return[n,i]}goTo(e,t){const n=this.getTargetXY(e.TO,t);n&&t.target.setXY(n[0],n[1])}turnRight(e,t){const n=r.toNumber(e.DEGREES);t.target.setDirection(t.target.direction+n)}turnLeft(e,t){const n=r.toNumber(e.DEGREES);t.target.setDirection(t.target.direction-n)}pointInDirection(e,t){const n=r.toNumber(e.DIRECTION);t.target.setDirection(n)}pointTowards(e,t){let n=0,s=0;if("_mouse_"===e.TOWARDS)n=t.ioQuery("mouse","getScratchX"),s=t.ioQuery("mouse","getScratchY");else{if("_random_"===e.TOWARDS)return void t.target.setDirection(Math.round(360*Math.random())-180);{e.TOWARDS=r.toString(e.TOWARDS);const t=this.runtime.getSpriteTargetByName(e.TOWARDS);if(!t)return;n=t.x,s=t.y}}const o=n-t.target.x,a=s-t.target.y,l=90-i.radToDeg(Math.atan2(a,o));t.target.setDirection(l)}glide(e,t){if(t.stackFrame.timer){const e=t.stackFrame.timer.timeElapsed();if(e<1e3*t.stackFrame.duration){const n=e/(1e3*t.stackFrame.duration),r=n*(t.stackFrame.endX-t.stackFrame.startX),i=n*(t.stackFrame.endY-t.stackFrame.startY);t.target.setXY(t.stackFrame.startX+r,t.stackFrame.startY+i),t.yield()}else t.target.setXY(t.stackFrame.endX,t.stackFrame.endY)}else{if(t.stackFrame.timer=new s,t.stackFrame.timer.start(),t.stackFrame.duration=r.toNumber(e.SECS),t.stackFrame.startX=t.target.x,t.stackFrame.startY=t.target.y,t.stackFrame.endX=r.toNumber(e.X),t.stackFrame.endY=r.toNumber(e.Y),t.stackFrame.duration<=0)return void t.target.setXY(t.stackFrame.endX,t.stackFrame.endY);t.yield()}}glideTo(e,t){const n=this.getTargetXY(e.TO,t);n&&this.glide({SECS:e.SECS,X:n[0],Y:n[1]},t)}ifOnEdgeBounce(e,t){this._ifOnEdgeBounce(t.target)}_ifOnEdgeBounce(e){const t=e.getBounds();if(!t)return;const n=this.runtime.stageWidth,r=this.runtime.stageHeight,s=Math.max(0,n/2+t.left),o=Math.max(0,r/2-t.top),a=Math.max(0,n/2-t.right),l=Math.max(0,r/2+t.bottom);let c="",u=1/0;if(s<u&&(u=s,c="left"),o<u&&(u=o,c="top"),a<u&&(u=a,c="right"),l<u&&(u=l,c="bottom"),u>0)return;const d=i.degToRad(90-e.direction);let h=Math.cos(d),p=-Math.sin(d);"left"===c?h=Math.max(.2,Math.abs(h)):"top"===c?p=Math.max(.2,Math.abs(p)):"right"===c?h=0-Math.max(.2,Math.abs(h)):"bottom"===c&&(p=0-Math.max(.2,Math.abs(p)));const m=i.radToDeg(Math.atan2(p,h))+90;e.setDirection(m);const f=e.keepInFence(e.x,e.y);e.setXY(f[0],f[1])}setRotationStyle(e,t){t.target.setRotationStyle(e.STYLE)}changeX(e,t){const n=r.toNumber(e.DX);t.target.setXY(t.target.x+n,t.target.y)}setX(e,t){const n=r.toNumber(e.X);t.target.setXY(n,t.target.y)}changeY(e,t){const n=r.toNumber(e.DY);t.target.setXY(t.target.x,t.target.y+n)}setY(e,t){const n=r.toNumber(e.Y);t.target.setXY(t.target.x,n)}getX(e,t){return this.limitPrecision(t.target.x)}getY(e,t){return this.limitPrecision(t.target.y)}getDirection(e,t){return t.target.direction}limitPrecision(e){const t=Math.round(e),n=e-t;return Math.abs(n)<1e-9?t:e}}},function(e,t,n){const r=n(2),i=n(5);e.exports=class{constructor(e){this.runtime=e}getPrimitives(){return{operator_add:this.add,operator_subtract:this.subtract,operator_multiply:this.multiply,operator_divide:this.divide,operator_lt:this.lt,operator_equals:this.equals,operator_gt:this.gt,operator_and:this.and,operator_or:this.or,operator_not:this.not,operator_random:this.random,operator_join:this.join,operator_letter_of:this.letterOf,operator_length:this.length,operator_contains:this.contains,operator_mod:this.mod,operator_round:this.round,operator_mathop:this.mathop}}add(e){return r.toNumber(e.NUM1)+r.toNumber(e.NUM2)}subtract(e){return r.toNumber(e.NUM1)-r.toNumber(e.NUM2)}multiply(e){return r.toNumber(e.NUM1)*r.toNumber(e.NUM2)}divide(e){return r.toNumber(e.NUM1)/r.toNumber(e.NUM2)}lt(e){return r.compare(e.OPERAND1,e.OPERAND2)<0}equals(e){return 0===r.compare(e.OPERAND1,e.OPERAND2)}gt(e){return r.compare(e.OPERAND1,e.OPERAND2)>0}and(e){return r.toBoolean(e.OPERAND1)&&r.toBoolean(e.OPERAND2)}or(e){return r.toBoolean(e.OPERAND1)||r.toBoolean(e.OPERAND2)}not(e){return!r.toBoolean(e.OPERAND)}random(e){return this._random(e.FROM,e.TO)}_random(e,t){const n=r.toNumber(e),i=r.toNumber(t),s=n<=i?n:i,o=n<=i?i:n;return s===o?s:r.isInt(e)&&r.isInt(t)?s+Math.floor(Math.random()*(o+1-s)):Math.random()*(o-s)+s}join(e){return r.toString(e.STRING1)+r.toString(e.STRING2)}letterOf(e){const t=r.toNumber(e.LETTER)-1,n=r.toString(e.STRING);return t<0||t>=n.length?"":n.charAt(t)}length(e){return r.toString(e.STRING).length}contains(e){const t=function(e){return r.toString(e).toLowerCase()};return t(e.STRING1).includes(t(e.STRING2))}mod(e){const t=r.toNumber(e.NUM1),n=r.toNumber(e.NUM2);let i=t%n;return i/n<0&&(i+=n),i}round(e){return Math.round(r.toNumber(e.NUM))}mathop(e){const t=r.toString(e.OPERATOR).toLowerCase(),n=r.toNumber(e.NUM);switch(t){case"abs":return Math.abs(n);case"floor":return Math.floor(n);case"ceiling":return Math.ceil(n);case"sqrt":return Math.sqrt(n);case"sin":return Math.round(1e10*Math.sin(Math.PI*n/180))/1e10;case"cos":return Math.round(1e10*Math.cos(Math.PI*n/180))/1e10;case"tan":return i.tan(n);case"asin":return 180*Math.asin(n)/Math.PI;case"acos":return 180*Math.acos(n)/Math.PI;case"atan":return 180*Math.atan(n)/Math.PI;case"ln":return Math.log(n);case"log":return Math.log(n)/Math.LN10;case"e ^":return Math.exp(n);case"10 ^":return Math.pow(10,n)}return 0}}},function(e,t,n){const r=n(5),i=n(2),s=n(12),o=!0;class a{constructor(e){this.runtime=e,this.waitingSounds={},this.stopAllSounds=this.stopAllSounds.bind(this),this._stopWaitingSoundsForTarget=this._stopWaitingSoundsForTarget.bind(this),this._clearEffectsForAllTargets=this._clearEffectsForAllTargets.bind(this),this.runtime&&(this.runtime.on("PROJECT_STOP_ALL",this.stopAllSounds),this.runtime.on("PROJECT_STOP_ALL",this._clearEffectsForAllTargets),this.runtime.on("STOP_FOR_TARGET",this._stopWaitingSoundsForTarget),this.runtime.on("PROJECT_START",this._clearEffectsForAllTargets)),this._onTargetCreated=this._onTargetCreated.bind(this),this.runtime&&e.on("targetWasCreated",this._onTargetCreated)}static get STATE_KEY(){return"Scratch.sound"}static get DEFAULT_SOUND_STATE(){return{effects:{pitch:0,pan:0}}}static get MIDI_NOTE_RANGE(){return{min:36,max:96}}static get BEAT_RANGE(){return{min:0,max:100}}static get TEMPO_RANGE(){return{min:20,max:500}}static get EFFECT_RANGE(){return{pitch:{min:-360,max:360},pan:{min:-100,max:100}}}static get LARGER_EFFECT_RANGE(){return{pitch:{min:-1e3,max:1e3},pan:{min:-100,max:100}}}_getSoundState(e){let t=e.getCustomState(a.STATE_KEY);return t||(t=s.simple(a.DEFAULT_SOUND_STATE),e.setCustomState(a.STATE_KEY,t),e.soundEffects=t.effects),t}_onTargetCreated(e,t){if(t){const n=t.getCustomState(a.STATE_KEY);n&&e&&(e.setCustomState(a.STATE_KEY,s.simple(n)),this._syncEffectsForTarget(e))}}getPrimitives(){return{sound_play:this.playSound,sound_playuntildone:this.playSoundAndWait,sound_stopallsounds:this.stopAllSounds,sound_seteffectto:this.setEffect,sound_changeeffectby:this.changeEffect,sound_cleareffects:this.clearEffects,sound_sounds_menu:this.soundsMenu,sound_beats_menu:this.beatsMenu,sound_effects_menu:this.effectsMenu,sound_setvolumeto:this.setVolume,sound_changevolumeby:this.changeVolume,sound_volume:this.getVolume}}getMonitored(){return{sound_volume:{isSpriteSpecific:!0,getId:e=>"".concat(e,"_volume")}}}playSound(e,t){this._playSound(e,t)}playSoundAndWait(e,t){return this._playSound(e,t,o)}_playSound(e,t,n){const r=this._getSoundIndex(e.SOUND_MENU,t);if(r>=0){const{target:e}=t,{sprite:i}=e,{soundId:s}=i.sounds[r];if(i.soundBank)return n===o?this._addWaitingSound(e.id,s):this._removeWaitingSound(e.id,s),i.soundBank.playSound(e,s)}}_addWaitingSound(e,t){this.waitingSounds[e]||(this.waitingSounds[e]=new Set),this.waitingSounds[e].add(t)}_removeWaitingSound(e,t){this.waitingSounds[e]&&this.waitingSounds[e].delete(t)}_getSoundIndex(e,t){const n=t.target.sprite.sounds.length;if(0===n)return-1;const i=this.getSoundIndexByName(e,t);if(-1!==i)return i;const s=parseInt(e,10);return isNaN(s)?-1:r.wrapClamp(s-1,0,n-1)}getSoundIndexByName(e,t){const n=t.target.sprite.sounds;for(let t=0;t<n.length;t++)if(n[t].name===e)return t;return-1}stopAllSounds(){if(null===this.runtime.targets)return;const e=this.runtime.targets;for(let t=0;t<e.length;t++)this._stopAllSoundsForTarget(e[t])}_stopAllSoundsForTarget(e){e.sprite.soundBank&&(e.sprite.soundBank.stopAllSounds(e),this.waitingSounds[e.id]&&this.waitingSounds[e.id].clear())}_stopWaitingSoundsForTarget(e){if(e.sprite.soundBank&&this.waitingSounds[e.id]){for(const t of this.waitingSounds[e.id].values())e.sprite.soundBank.stop(e,t);this.waitingSounds[e.id].clear()}}setEffect(e,t){return this._updateEffect(e,t,!1)}changeEffect(e,t){return this._updateEffect(e,t,!0)}_updateEffect(e,t,n){const s=i.toString(e.EFFECT).toLowerCase(),o=i.toNumber(e.VALUE),l=this._getSoundState(t.target);if(!Object.prototype.hasOwnProperty.call(l.effects,s))return;n?l.effects[s]+=o:l.effects[s]=o;const c=this.runtime.runtimeOptions.miscLimits,{min:u,max:d}=c?a.EFFECT_RANGE[s]:a.LARGER_EFFECT_RANGE[s];if(l.effects[s]=r.clamp(l.effects[s],u,d),this._syncEffectsForTarget(t.target),c)return Promise.resolve();this.runtime.requestRedraw()}_syncEffectsForTarget(e){e&&e.sprite.soundBank&&(e.soundEffects=this._getSoundState(e).effects,e.sprite.soundBank.setEffects(e))}clearEffects(e,t){this._clearEffectsForTarget(t.target)}_clearEffectsForTarget(e){const t=this._getSoundState(e);for(const e in t.effects)Object.prototype.hasOwnProperty.call(t.effects,e)&&(t.effects[e]=0);this._syncEffectsForTarget(e)}_clearEffectsForAllTargets(){if(null===this.runtime.targets)return;const e=this.runtime.targets;for(let t=0;t<e.length;t++)this._clearEffectsForTarget(e[t])}setVolume(e,t){const n=i.toNumber(e.VOLUME);return this._updateVolume(n,t)}changeVolume(e,t){const n=i.toNumber(e.VOLUME)+t.target.volume;return this._updateVolume(n,t)}_updateVolume(e,t){if(e=r.clamp(e,0,100),t.target.volume=e,this._syncEffectsForTarget(t.target),this.runtime.runtimeOptions.miscLimits)return Promise.resolve();this.runtime.requestRedraw()}getVolume(e,t){return t.target.volume}soundsMenu(e){return e.SOUND_MENU}beatsMenu(e){return e.BEATS}effectsMenu(e){return e.EFFECT}}e.exports=a},function(e,t,n){const r=n(2),i=n(14),s=n(47);e.exports=class{constructor(e){this.runtime=e,this._answer="",this._timer=new i,this._cachedLoudness=-1,this._cachedLoudnessTimestamp=0,this._questionList=[],this.runtime.on("ANSWER",this._onAnswer.bind(this)),this.runtime.on("PROJECT_START",this._resetAnswer.bind(this)),this.runtime.on("PROJECT_STOP_ALL",this._clearAllQuestions.bind(this)),this.runtime.on("STOP_FOR_TARGET",this._clearTargetQuestions.bind(this)),this.runtime.on("RUNTIME_DISPOSED",this._resetAnswer.bind(this))}getPrimitives(){return{sensing_touchingobject:this.touchingObject,sensing_touchingcolor:this.touchingColor,sensing_coloristouchingcolor:this.colorTouchingColor,sensing_distanceto:this.distanceTo,sensing_timer:this.getTimer,sensing_resettimer:this.resetTimer,sensing_of:this.getAttributeOf,sensing_mousex:this.getMouseX,sensing_mousey:this.getMouseY,sensing_setdragmode:this.setDragMode,sensing_mousedown:this.getMouseDown,sensing_keypressed:this.getKeyPressed,sensing_current:this.current,sensing_dayssince2000:this.daysSince2000,sensing_loudness:this.getLoudness,sensing_loud:this.isLoud,sensing_askandwait:this.askAndWait,sensing_answer:this.getAnswer,sensing_username:this.getUsername,sensing_userid:()=>{}}}getMonitored(){return{sensing_answer:{getId:()=>"answer"},sensing_mousedown:{getId:()=>"mousedown"},sensing_mousex:{getId:()=>"mousex"},sensing_mousey:{getId:()=>"mousey"},sensing_loudness:{getId:()=>"loudness"},sensing_timer:{getId:()=>"timer"},sensing_dayssince2000:{getId:()=>"dayssince2000"},sensing_current:{getId:(e,t)=>s("current",t)}}}_onAnswer(e){this._answer=e;const t=this._questionList.shift();if(t){const[e,n,r,i,s]=t;i&&!s&&this.runtime.emit("SAY",r,"say",""),n(),this._askNextQuestion()}}_resetAnswer(){this._answer=""}_enqueueAsk(e,t,n,r,i){this._questionList.push([e,t,n,r,i])}_askNextQuestion(){if(this._questionList.length>0){const[e,t,n,r,i]=this._questionList[0];r&&!i?(this.runtime.emit("SAY",n,"say",e),this.runtime.emit("QUESTION","")):this.runtime.emit("QUESTION",e)}}_clearAllQuestions(){this._questionList=[],this.runtime.emit("QUESTION",null)}_clearTargetQuestions(e){const t=this._questionList.length>0&&this._questionList[0][2]===e;this._questionList=this._questionList.filter((t=>t[2]!==e)),t&&(this.runtime.emit("SAY",e,"say",""),this._questionList.length>0?this._askNextQuestion():this.runtime.emit("QUESTION",null))}askAndWait(e,t){const n=t.target;return new Promise((t=>{const r=this._questionList.length>0;this._enqueueAsk(String(e.QUESTION),t,n,n.visible,n.isStage),r||this._askNextQuestion()}))}getAnswer(){return this._answer}touchingObject(e,t){return t.target.isTouchingObject(e.TOUCHINGOBJECTMENU)}touchingColor(e,t){const n=r.toRgbColorList(e.COLOR);return t.target.isTouchingColor(n)}colorTouchingColor(e,t){const n=r.toRgbColorList(e.COLOR),i=r.toRgbColorList(e.COLOR2);return t.target.colorIsTouchingColor(i,n)}distanceTo(e,t){if(t.target.isStage)return 1e4;let n=0,i=0;if("_mouse_"===e.DISTANCETOMENU)n=t.ioQuery("mouse","getScratchX"),i=t.ioQuery("mouse","getScratchY");else{e.DISTANCETOMENU=r.toString(e.DISTANCETOMENU);const t=this.runtime.getSpriteTargetByName(e.DISTANCETOMENU);if(!t)return 1e4;n=t.x,i=t.y}const s=t.target.x-n,o=t.target.y-i;return Math.sqrt(s*s+o*o)}setDragMode(e,t){t.target.setDraggable("draggable"===e.DRAG_MODE)}getTimer(e,t){return t.ioQuery("clock","projectTimer")}resetTimer(e,t){t.ioQuery("clock","resetProjectTimer")}getMouseX(e,t){return t.ioQuery("mouse","getScratchX")}getMouseY(e,t){return t.ioQuery("mouse","getScratchY")}getMouseDown(e,t){return t.ioQuery("mouse","getIsDown")}current(e){const t=r.toString(e.CURRENTMENU).toLowerCase(),n=new Date;switch(t){case"year":return n.getFullYear();case"month":return n.getMonth()+1;case"date":return n.getDate();case"dayofweek":return n.getDay()+1;case"hour":return n.getHours();case"minute":return n.getMinutes();case"second":return n.getSeconds()}return 0}getKeyPressed(e,t){return t.ioQuery("keyboard","getKeyIsDown",[e.KEY_OPTION])}daysSince2000(){const e=new Date(2e3,0,1),t=new Date,n=t.getTimezoneOffset()-e.getTimezoneOffset();let r=t.valueOf()-e.valueOf();return r+=60*(t.getTimezoneOffset()-n)*1e3,r/864e5}getLoudness(){if(void 0===this.runtime.audioEngine)return-1;if(null===this.runtime.currentStepTime)return-1;return this._timer.time()-this._cachedLoudnessTimestamp<this.runtime.currentStepTime||(this._cachedLoudnessTimestamp=this._timer.time(),this._cachedLoudness=this.runtime.audioEngine.getLoudness()),this._cachedLoudness}isLoud(){return this.getLoudness()>10}getAttributeOf(e){let t;if("_stage_"===e.OBJECT?t=this.runtime.getTargetForStage():(e.OBJECT=r.toString(e.OBJECT),t=this.runtime.getSpriteTargetByName(e.OBJECT)),!t)return 0;if(t.isStage)switch(e.PROPERTY){case"background #":case"backdrop #":return t.currentCostume+1;case"backdrop name":return t.getCostumes()[t.currentCostume].name;case"volume":return t.volume}else switch(e.PROPERTY){case"x position":return t.x;case"y position":return t.y;case"direction":return t.direction;case"costume #":return t.currentCostume+1;case"costume name":return t.getCostumes()[t.currentCostume].name;case"size":return t.size;case"volume":return t.volume}const n=e.PROPERTY,i=t.lookupVariableByNameAndType(n,"",!0);return i?i.value:0}getUsername(e,t){return t.ioQuery("userData","getUsername")}}},function(e,t,n){const r=n(2);e.exports=class{constructor(e){this.runtime=e}getPrimitives(){return{data_variable:this.getVariable,data_setvariableto:this.setVariableTo,data_changevariableby:this.changeVariableBy,data_hidevariable:this.hideVariable,data_showvariable:this.showVariable,data_listcontents:this.getListContents,data_addtolist:this.addToList,data_deleteoflist:this.deleteOfList,data_deletealloflist:this.deleteAllOfList,data_insertatlist:this.insertAtList,data_replaceitemoflist:this.replaceItemOfList,data_itemoflist:this.getItemOfList,data_itemnumoflist:this.getItemNumOfList,data_lengthoflist:this.lengthOfList,data_listcontainsitem:this.listContainsItem,data_hidelist:this.hideList,data_showlist:this.showList}}getVariable(e,t){return t.target.lookupOrCreateVariable(e.VARIABLE.id,e.VARIABLE.name).value}setVariableTo(e,t){const n=t.target.lookupOrCreateVariable(e.VARIABLE.id,e.VARIABLE.name);n.value=e.VALUE,n.isCloud&&t.ioQuery("cloud","requestUpdateVariable",[n.name,e.VALUE])}changeVariableBy(e,t){const n=t.target.lookupOrCreateVariable(e.VARIABLE.id,e.VARIABLE.name),i=r.toNumber(n.value)+r.toNumber(e.VALUE);n.value=i,n.isCloud&&t.ioQuery("cloud","requestUpdateVariable",[n.name,i])}changeMonitorVisibility(e,t){this.runtime.monitorBlocks.changeBlock({id:e,element:"checkbox",value:t},this.runtime)}showVariable(e){this.changeMonitorVisibility(e.VARIABLE.id,!0)}hideVariable(e){this.changeMonitorVisibility(e.VARIABLE.id,!1)}showList(e){this.changeMonitorVisibility(e.LIST.id,!0)}hideList(e){this.changeMonitorVisibility(e.LIST.id,!1)}getListContents(e,t){const n=t.target.lookupOrCreateList(e.LIST.id,e.LIST.name);if(t.thread.updateMonitor)return n._monitorUpToDate?n.value:(n._monitorUpToDate=!0,n.value.slice());let r=!0;for(let e=0;e<n.value.length;e++){const t=n.value[e];if("string"!=typeof t||1!==t.length){r=!1;break}}return r?n.value.join(""):n.value.join(" ")}addToList(e,t){const n=t.target.lookupOrCreateList(e.LIST.id,e.LIST.name);n.value.push(e.ITEM),n._monitorUpToDate=!1}deleteOfList(e,t){const n=t.target.lookupOrCreateList(e.LIST.id,e.LIST.name),i=r.toListIndex(e.INDEX,n.value.length,!0);i!==r.LIST_INVALID&&(i!==r.LIST_ALL?(n.value.splice(i-1,1),n._monitorUpToDate=!1):n.value=[])}deleteAllOfList(e,t){t.target.lookupOrCreateList(e.LIST.id,e.LIST.name).value=[]}insertAtList(e,t){const n=e.ITEM,i=t.target.lookupOrCreateList(e.LIST.id,e.LIST.name),s=r.toListIndex(e.INDEX,i.value.length+1,!1);s!==r.LIST_INVALID&&(i.value.splice(s-1,0,n),i._monitorUpToDate=!1)}replaceItemOfList(e,t){const n=e.ITEM,i=t.target.lookupOrCreateList(e.LIST.id,e.LIST.name),s=r.toListIndex(e.INDEX,i.value.length,!1);s!==r.LIST_INVALID&&(i.value[s-1]=n,i._monitorUpToDate=!1)}getItemOfList(e,t){const n=t.target.lookupOrCreateList(e.LIST.id,e.LIST.name),i=r.toListIndex(e.INDEX,n.value.length,!1);return i===r.LIST_INVALID?"":n.value[i-1]}getItemNumOfList(e,t){const n=e.ITEM,i=t.target.lookupOrCreateList(e.LIST.id,e.LIST.name);for(let e=0;e<i.value.length;e++)if(0===r.compare(i.value[e],n))return e+1;return 0}lengthOfList(e,t){return t.target.lookupOrCreateList(e.LIST.id,e.LIST.name).value.length}listContainsItem(e,t){const n=e.ITEM,i=t.target.lookupOrCreateList(e.LIST.id,e.LIST.name);if(i.value.indexOf(n)>=0)return!0;for(let e=0;e<i.value.length;e++)if(0===r.compare(i.value[e],n))return!0;return!1}}},function(e,t){e.exports=class{constructor(e){this.runtime=e}getPrimitives(){return{procedures_definition:this.definition,procedures_call:this.call,procedures_return:this.return,argument_reporter_string_number:this.argumentReporterStringNumber,argument_reporter_boolean:this.argumentReporterBoolean}}definition(){}call(e,t){const n=t.stackFrame,r=!!e.mutation.return;if(n.executed){if(r){const e=n.returnValue;return t.thread.peekStackFrame().params=null,delete n.returnValue,delete n.executed,e}return}const i=e.mutation.proccode,s=t.getProcedureParamNamesIdsAndDefaults(i);if(null===s)return r?"":void 0;const[o,a,l]=s;t.initParams();for(let n=0;n<a.length;n++)Object.prototype.hasOwnProperty.call(e,a[n])?t.pushParam(o[n],e[a[n]]):t.pushParam(o[n],l[n]);const c=t.runtime.getAddonBlock(i);if(c){const e=c.callback(t.thread.getAllparams(),t);return 1===t.thread.status&&(n.executed=!0),e}n.executed=!0,r&&(t.thread.peekStackFrame().waitingReporter=!0,n.returnValue=""),t.startProcedure(i)}return(e,t){t.stopThisScript(),t.thread.peekStackFrame()&&(t.stackFrame.returnValue=e.VALUE)}argumentReporterStringNumber(e,t){const n=t.getParam(e.VALUE);return null===n?"last key pressed"===String(e.VALUE).toLowerCase()?t.ioQuery("keyboard","getLastKeyPressed"):0:n}argumentReporterBoolean(e,t){const n=t.getParam(e.VALUE);if(null===n){const n=String(e.VALUE).toLowerCase();return!(!t.target.runtime.compilerOptions.enabled||"is compiled?"!==n)||("is turbowarp?"===n||0)}return n}}},function(e,t){e.exports={setupInitialState:e=>{const t=e.renderer;for(const n of e.targets){const e=n._getRenderedDirectionAndScale();if(t&&n.interpolationData){const r=n.drawableID;t.updateDrawablePosition(r,[n.x,n.y]),t.updateDrawableDirectionScale(r,e.direction,e.scale),t.updateDrawableEffect(r,"ghost",n.effects.ghost)}n.visible&&!n.isStage?n.interpolationData={x:n.x,y:n.y,direction:e.direction,scale:e.scale,costume:n.currentCostume,ghost:n.effects.ghost}:n.interpolationData=null}},interpolate:(e,t)=>{const n=e.renderer;if(n)for(const r of e.targets){const e=r.interpolationData;if(!e)continue;if(!r.visible)continue;const i=r.drawableID,s=r.x-e.x,o=r.y-e.y,a=Math.abs(s),l=Math.abs(o);if(a>.1||l>.1){const r=n._allDrawables[i].getAABB(),c=Math.min(240,Math.max(50,1.5*(r.width+r.height)));if(Math.sqrt(a**2+l**2)<c){const r=e.x+s*t,a=e.y+o*t;n.updateDrawablePosition(i,[r,a])}}const c=r.effects.ghost-e.ghost,u=Math.abs(c);if(u>0&&u<25){const e=r.effects.ghost+c*t;n.updateDrawableEffect(i,"ghost",e)}if(e.costume===r.currentCostume){let{direction:s,scale:o}=r._getRenderedDirectionAndScale(),a=!1;if(s!==e.direction&&(s%90!=0||e.direction%90!=0)){const n=s*Math.PI/180,r=e.direction*Math.PI/180;s=180*Math.atan2(Math.sin(n)*t+Math.sin(r)*(1-t),Math.cos(n)*t+Math.cos(r)*(1-t))/Math.PI,a=!0}const l=e.scale;if((o[0]!==l[0]||o[1]!==l[1])&&Math.sign(o[0])===Math.sign(l[0])&&Math.sign(o[1])===Math.sign(l[1])){const e=o[0]-l[0],n=o[1]-l[1],r=Math.abs(e),i=Math.abs(n);r<100&&i<100&&(o[0]=l[0]+e*t,o[1]=l[1]+n*t,a=!0)}a&&n.updateDrawableDirectionScale(i,s,o)}}}}},function(e,t){const n="function"==typeof requestAnimationFrame?requestAnimationFrame:e=>setTimeout(e,1e3/60),r="function"==typeof requestAnimationFrame?cancelAnimationFrame:clearTimeout,i=e=>{let t;const i=()=>{t=n(i),e()};return t=n(i),{cancel:()=>r(t)}};e.exports=class{constructor(e){this.runtime=e,this.running=!1,this.setFramerate(30),this.setInterpolation(!1),this.stepCallback=this.stepCallback.bind(this),this.interpolationCallback=this.interpolationCallback.bind(this),this._stepInterval=null,this._interpolationAnimation=null,this._stepAnimation=null}setFramerate(e){this.framerate=e,this._restart()}setInterpolation(e){this.interpolation=e,this._restart()}stepCallback(){this.runtime._step()}interpolationCallback(){this.runtime._renderInterpolatedPositions()}_restart(){this.running&&(this.stop(),this.start())}start(){this.running=!0,0===this.framerate?(this._stepAnimation=i(this.stepCallback),this.runtime.currentStepTime=1e3/60):(this.interpolation&&(this._interpolationAnimation=i(this.interpolationCallback)),this._stepInterval=setInterval(this.stepCallback,1e3/this.framerate),this.runtime.currentStepTime=1e3/this.framerate)}stop(){this.running=!1,clearInterval(this._stepInterval),this._interpolationAnimation&&this._interpolationAnimation.cancel(),this._stepAnimation&&this._stepAnimation.cancel(),this._interpolationAnimation=null,this._stepAnimation=null}}},function(e,t,n){const{motionVector:r,scratchAtan2:i}=n(236),s=480,o=10/3;e.exports=class{constructor(){this.frameNumber=0,this.lastAnalyzedFrame=0,this.motionAmount=0,this.motionDirection=0,this.curr=null,this.prev=null,this._arrays=new ArrayBuffer(345600),this._curr=new Uint8ClampedArray(this._arrays,0,172800),this._prev=new Uint8ClampedArray(this._arrays,172800,172800)}reset(){this.frameNumber=0,this.lastAnalyzedFrame=0,this.motionAmount=this.motionDirection=0,this.prev=this.curr=null}addFrame(e){this.frameNumber++,this.prev=this.curr,this.curr=new Uint32Array(e.buffer.slice(0));const t=this._prev;this._prev=this._curr,this._curr=t;for(let e=0;e<this.curr.length;e++)this._curr[e]=255&this.curr[e]}analyzeFrame(){if(!this.curr||!this.prev)return void(this.motionAmount=this.motionDirection=-1);if(this.lastAnalyzedFrame===this.frameNumber)return;this.lastAnalyzedFrame=this.frameNumber;const{_curr:e,_prev:t}=this,n=17;let o=0,a=0,l=0;for(let i=9;i<351;i+=n)for(let c=9;c<471;c+=n){let u=0,d=0,h=0,p=0,m=0,f=(i-8)*s+c-8,g=f+n;const y=(i+8)*s+c+8;for(;f<=y;f+=463,g+=s)for(;f<=g;f+=1){const n=t[f]-e[f],r=e[f-1]-e[f+1],i=e[f-s]-e[f+s];u+=r*r,d+=r*i,h+=i*i,m+=r*n,p+=i*n}const{u:b,v:v}=r(u,d,h,m,p);-17<b&&b<n&&-17<v&&v<n&&(o+=b,a+=v,l++)}o/=l,a/=l,this.motionAmount=Math.round(100*Math.hypot(o,a)),this.motionAmount>10&&(this.motionDirection=i(a,o))}getLocalMotion(e,t){if(this.curr&&this.prev){if(t.motionFrameNumber!==this.frameNumber){const{_prev:n,_curr:a}=this;e.updateCPURenderAttributes();const l=e.getFastBounds(),c=Math.max(Math.floor(l.left+240),1),u=Math.min(Math.floor(l.right+240),479),d=Math.max(Math.floor(180-l.top),1),h=Math.min(Math.floor(180-l.bottom),359);let p=0,m=0,f=0,g=0,y=0,b=0;const v=[0,0,0];for(let t=d;t<h;t++)for(let r=c;r<u;r++)if(v[0]=r-240,v[1]=180-t,e.isTouching(v)){const e=t*s+r,i=n[e]-a[e],o=a[e-1]-a[e+1],l=a[e-s]-a[e+s];p+=o*o,m+=o*l,f+=l*l,y+=o*i,g+=l*i,b++}let{u:S,v:w}=r(p,m,f,y,g),k=0;b&&(k=b,b/=256,S/=b,w/=b),t.motionAmount=Math.round(.02*k*Math.hypot(S,w)),t.motionAmount>100&&(t.motionAmount=100),t.motionAmount>o&&(t.motionDirection=i(w,S)),t.motionFrameNumber=this.frameNumber}}else t.motionAmount=t.motionDirection=-1}}},function(e,t){const n=180/Math.PI,r={u:0,v:0},i=function(e){return(e+270)%360-180};e.exports={motionVector:function(e,t,n,i,s){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:r;const a=t*t-e*n;if(a){const r=-(s*t-i*n),l=-(t*i-e*s),c=8/a;o.u=r*c,o.v=l*c}else{const r=(t+e)*(t+e)+(n+t)*(n+t);if(r){const a=-(s+i)*(8/r);o.u=(t+e)*a,o.v=(n+t)*a}else o.u=0,o.v=0}return o},scratchDegrees:i,scratchAtan2:function(e,t){return i(Math.atan2(e,t)*n)}}},function(e,t,n){const r=n(4),i=n(3),s=n(2),o=n(6),a=n(8),l=n(238),c=n(15),u=n(5),d=n(43),h=n(1),p=129,m=130,f=131,g=225,y=32,b=96,v=0,S=128,w=2,k=175,T=163,x=179,E=148,A=1,C=0,I=152,O=157,M=0,N=0,R=1,D=50,P=0,L=32,B={29:"color",30:"ultrasonic",32:"gyro",16:"touch",8:"mediumMotor",7:"largeMotor",126:"none",125:"none"},z={touch:0,color:1,ultrasonic:1,none:0},U={touch:"button",color:"brightness",ultrasonic:"distance"};class j{constructor(e,t,n){this._parent=e,this._index=t,this._type=n,this._direction=1,this._power=50,this._position=0,this._commandID=null,this._coastDelay=1e3}get type(){return this._type}set type(e){this._type=e}get direction(){return this._direction}set direction(e){this._direction=e<0?-1:1}get power(){return this._power}set power(e){this._power=e}get position(){return this._position}set position(e){let t=e[0]+256*e[1]+256*e[2]*256+256*e[3]*256*256;t>2147483647&&(t-=4294967296),this._position=t}turnOnFor(e){if(0===this._power)return;const t=this._portMask(this._index);let n=e,r=this._power*this._direction;const i=D;let s=[];s[0]=k,r<0&&(r*=-1,n*=-1);const o=n<0?256-r:r;n=Math.abs(n);let a=i,l=i,c=n-2*i;c<0&&(a=Math.floor(n/2),c=0,l=n-a);const u=this._runValues(c);s=s.concat([M,t,p,255&o,p,a]).concat(u.concat([p,l,R]));const d=this._parent.generateCommand(S,s);this._parent.send(d),this.coastAfter(e)}coastAfter(e){if(0===this._power)return;const t=a();this._commandID=t,setTimeout((()=>{this._commandID===t&&(this.coast(),this._commandID=null)}),e+this._coastDelay)}coast(){if(0===this._power)return;const e=this._parent.generateCommand(S,[T,M,this._portMask(this._index),N]);this._parent.send(e,!1)}_runValues(e){return e<32767?[m,255&e,e>>8&255]:[f,255&e,e>>8&255,e>>16&255,e>>24&255]}_portMask(e){return Math.pow(2,e)}}class F{constructor(e,t){this._runtime=e,this._runtime.on("PROJECT_STOP_ALL",this.stopAll.bind(this)),this._extensionId=t,this._sensorPorts=[],this._motorPorts=[],this._sensors={distance:0,brightness:0,buttons:[0,0,0,0]},this._motors=[null,null,null,null],this._pollingInterval=150,this._pollingIntervalID=null,this._pollingCounter=0,this._bt=null,this._runtime.registerPeripheralExtension(t,this),this._rateLimiter=new d(40),this.reset=this.reset.bind(this),this._onConnect=this._onConnect.bind(this),this._onMessage=this._onMessage.bind(this),this._pollValues=this._pollValues.bind(this)}get distance(){let e=this._sensors.distance>100?100:this._sensors.distance;return e=e<0?0:e,e=Math.round(100*e)/100,e}get brightness(){return this._sensors.brightness}motor(e){return this._motors[e]}isButtonPressed(e){return 1===this._sensors.buttons[e]}beep(e,t){const n=this.generateCommand(S,[E,A,p,2,m,e,e>>8,m,t,t>>8]);this.send(n)}stopAll(){this.stopAllMotors(),this.stopSound()}stopSound(){const e=this.generateCommand(S,[E,C]);this.send(e,!1)}stopAllMotors(){this._motors.forEach((e=>{e&&e.coast()}))}scan(){this._bt&&this._bt.disconnect(),this._bt=new l(this._runtime,this._extensionId,{majorDeviceClass:8,minorDeviceClass:1},this._onConnect,this.reset,this._onMessage)}connect(e){this._bt&&this._bt.connectPeripheral(e,"1234")}disconnect(){this._bt&&this._bt.disconnect(),this.reset()}reset(){this._sensorPorts=[],this._motorPorts=[],this._sensors={distance:0,brightness:0,buttons:[0,0,0,0]},this._motors=[null,null,null,null],this._pollingIntervalID&&(window.clearInterval(this._pollingIntervalID),this._pollingIntervalID=null)}isConnected(){let e=!1;return this._bt&&(e=this._bt.isConnected()),e}send(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.isConnected()?t&&!this._rateLimiter.okayToSend()?Promise.resolve():this._bt.sendMessage({message:c.uint8ArrayToBase64(e),encoding:"base64"}):Promise.resolve()}generateCommand(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=[];r[2]=0,r[3]=0,r[4]=e,r[5]=255&n,r[6]=n>>8&&255,r=r.concat(t);const i=r.length-2;return r[0]=255&i,r[1]=i>>8&&255,r}_onConnect(){this._pollingIntervalID=window.setInterval(this._pollValues,this._pollingInterval)}_pollValues(){if(!this.isConnected())return void window.clearInterval(this._pollingIntervalID);const e=[];let t=0,n=0;if(this._pollingCounter%20==0)e[0]=I,e[1]=p,e[2]=L,e[3]=b,e[4]=g,e[5]=y,t=33,this._updateDevices=!0;else{let r=0;for(let t=0;t<4;t++)"none"!==this._sensorPorts[t]&&(e[r+0]=O,e[r+1]=M,e[r+2]=t,e[r+3]=P,e[r+4]=z[this._sensorPorts[t]],e[r+5]=g,e[r+6]=4*n,r+=7),n++;for(let t=0;t<4;t++)e[r+0]=x,e[r+1]=M,e[r+2]=t,e[r+3]=g,e[r+4]=4*n,r+=5,n++;t=4*n}const r=this.generateCommand(v,e,t);this.send(r),this._pollingCounter++}_onMessage(e){const t=e.message,n=c.base64ToUint8Array(t);if(n[4]===w)if(this._updateDevices){for(let e=0;e<4;e++){const t=B[n[e+5]];this._sensorPorts[e]=t||"none"}for(let e=0;e<4;e++){const t=B[n[e+21]];this._motorPorts[e]=t||"none"}for(let e=0;e<4;e++){const t=this._motorPorts[e];"none"===t||this._motors[e]||(this._motors[e]=new j(this,e,t)),"none"===t&&this._motors[e]&&(this._motors[e]=null)}this._updateDevices=!1}else if(!this._sensorPorts.includes(void 0)&&!this._motorPorts.includes(void 0)){let e=5;for(let t=0;t<4;t++){const r=new Uint8Array([n[e],n[e+1],n[e+2],n[e+3]]).buffer,i=new DataView(r).getFloat32(0,!0);"button"===U[this._sensorPorts[t]]?this._sensors.buttons[t]=i||0:U[this._sensorPorts[t]]&&(this._sensors[U[this._sensorPorts[t]]]=i||0),e+=4}for(let t=0;t<4;t++){const r=[n[e],n[e+1],n[e+2],n[e+3]];this._motors[t]&&(this._motors[t].position=r),e+=4}}}}const W=["A","B","C","D"],V=["1","2","3","4"];class G{static get EXTENSION_ID(){return"ev3"}constructor(e){this.runtime=e,this._peripheral=new F(this.runtime,G.EXTENSION_ID),this._playNoteForPicker=this._playNoteForPicker.bind(this),this.runtime.on("PLAY_NOTE",this._playNoteForPicker)}getInfo(){return{id:G.EXTENSION_ID,name:"LEGO EV3",blockIconURI:"data:image/svg+xml;base64, ",showStatusButton:!0,blocks:[{opcode:"motorTurnClockwise",text:o({id:"ev3.motorTurnClockwise",default:"motor [PORT] turn this way for [TIME] seconds",description:"turn a motor clockwise for some time"}),blockType:i.COMMAND,arguments:{PORT:{type:r.STRING,menu:"motorPorts",defaultValue:0},TIME:{type:r.NUMBER,defaultValue:1}}},{opcode:"motorTurnCounterClockwise",text:o({id:"ev3.motorTurnCounterClockwise",default:"motor [PORT] turn that way for [TIME] seconds",description:"turn a motor counter-clockwise for some time"}),blockType:i.COMMAND,arguments:{PORT:{type:r.STRING,menu:"motorPorts",defaultValue:0},TIME:{type:r.NUMBER,defaultValue:1}}},{opcode:"motorSetPower",text:o({id:"ev3.motorSetPower",default:"motor [PORT] set power [POWER] %",description:"set a motor's power to some value"}),blockType:i.COMMAND,arguments:{PORT:{type:r.STRING,menu:"motorPorts",defaultValue:0},POWER:{type:r.NUMBER,defaultValue:100}}},{opcode:"getMotorPosition",text:o({id:"ev3.getMotorPosition",default:"motor [PORT] position",description:"get the measured degrees a motor has turned"}),blockType:i.REPORTER,arguments:{PORT:{type:r.STRING,menu:"motorPorts",defaultValue:0}}},{opcode:"whenButtonPressed",text:o({id:"ev3.whenButtonPressed",default:"when button [PORT] pressed",description:"when a button connected to a port is pressed"}),blockType:i.HAT,arguments:{PORT:{type:r.STRING,menu:"sensorPorts",defaultValue:0}}},{opcode:"whenDistanceLessThan",text:o({id:"ev3.whenDistanceLessThan",default:"when distance < [DISTANCE]",description:"when the value measured by the distance sensor is less than some value"}),blockType:i.HAT,arguments:{DISTANCE:{type:r.NUMBER,defaultValue:5}}},{opcode:"whenBrightnessLessThan",text:o({id:"ev3.whenBrightnessLessThan",default:"when brightness < [DISTANCE]",description:"when value measured by brightness sensor is less than some value"}),blockType:i.HAT,arguments:{DISTANCE:{type:r.NUMBER,defaultValue:50}}},{opcode:"buttonPressed",text:o({id:"ev3.buttonPressed",default:"button [PORT] pressed?",description:"is a button on some port pressed?"}),blockType:i.BOOLEAN,arguments:{PORT:{type:r.STRING,menu:"sensorPorts",defaultValue:0}}},{opcode:"getDistance",text:o({id:"ev3.getDistance",default:"distance",description:"gets measured distance"}),blockType:i.REPORTER},{opcode:"getBrightness",text:o({id:"ev3.getBrightness",default:"brightness",description:"gets measured brightness"}),blockType:i.REPORTER},{opcode:"beep",text:o({id:"ev3.beepNote",default:"beep note [NOTE] for [TIME] secs",description:"play some note on EV3 for some time"}),blockType:i.COMMAND,arguments:{NOTE:{type:r.NOTE,defaultValue:60},TIME:{type:r.NUMBER,defaultValue:.5}}}],menus:{motorPorts:{acceptReporters:!0,items:this._formatMenu(W)},sensorPorts:{acceptReporters:!0,items:this._formatMenu(V)}}}}motorTurnClockwise(e){const t=s.toNumber(e.PORT);let n=1e3*s.toNumber(e.TIME);return n=u.clamp(n,0,15e3),new Promise((e=>{this._forEachMotor(t,(e=>{const t=this._peripheral.motor(e);t&&(t.direction=1,t.turnOnFor(n))})),setTimeout(e,n)}))}motorTurnCounterClockwise(e){const t=s.toNumber(e.PORT);let n=1e3*s.toNumber(e.TIME);return n=u.clamp(n,0,15e3),new Promise((e=>{this._forEachMotor(t,(e=>{const t=this._peripheral.motor(e);t&&(t.direction=-1,t.turnOnFor(n))})),setTimeout(e,n)}))}motorSetPower(e){const t=s.toNumber(e.PORT),n=u.clamp(s.toNumber(e.POWER),0,100);this._forEachMotor(t,(e=>{const t=this._peripheral.motor(e);t&&(t.power=n)}))}getMotorPosition(e){const t=s.toNumber(e.PORT);if(![0,1,2,3].includes(t))return;const n=this._peripheral.motor(t);let r=0;return n&&(r=u.wrapClamp(n.position,0,360)),r}whenButtonPressed(e){const t=s.toNumber(e.PORT);if([0,1,2,3].includes(t))return this._peripheral.isButtonPressed(t)}whenDistanceLessThan(e){const t=u.clamp(s.toNumber(e.DISTANCE),0,100);return this._peripheral.distance<t}whenBrightnessLessThan(e){const t=u.clamp(s.toNumber(e.DISTANCE),0,100);return this._peripheral.brightness<t}buttonPressed(e){const t=s.toNumber(e.PORT);if([0,1,2,3].includes(t))return this._peripheral.isButtonPressed(t)}getDistance(){return this._peripheral.distance}getBrightness(){return this._peripheral.brightness}_playNoteForPicker(e,t){t===this.getInfo().name&&this.beep({NOTE:e,TIME:.25})}beep(e){const t=u.clamp(s.toNumber(e.NOTE),47,99);let n=1e3*s.toNumber(e.TIME);if(n=u.clamp(n,0,3e3),0!==n)return new Promise((e=>{const r=440*Math.pow(2,(t-69+12)/12);this._peripheral.beep(r,n),setTimeout(e,n)}))}_forEachMotor(e,t){let n;switch(e){case 0:n=[0];break;case 1:n=[1];break;case 2:n=[2];break;case 3:n=[3];break;default:h.warn("Invalid motor ID: ".concat(e)),n=[]}for(const e of n)t(e)}_formatMenu(e){const t=[];for(let n=0;n<e.length;n++){const r={};r.text=e[n],r.value=n.toString(),t.push(r)}return t}}e.exports=G},function(e,t,n){const r=n(70);e.exports=class extends r{constructor(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s=arguments.length>5?arguments[5]:void 0;super(),this._socket=e.getScratchLinkSocket("BT"),this._socket.setOnOpen(this.requestPeripheral.bind(this)),this._socket.setOnError(this._handleRequestError.bind(this)),this._socket.setOnClose(this.handleDisconnectError.bind(this)),this._socket.setHandleMessage(this._handleMessage.bind(this)),this._sendMessage=this._socket.sendMessage.bind(this._socket),this._availablePeripherals={},this._connectCallback=r,this._connected=!1,this._characteristicDidChangeCallback=null,this._resetCallback=i,this._discoverTimeoutID=null,this._extensionId=t,this._peripheralOptions=n,this._messageCallback=s,this._runtime=e,this._socket.open()}requestPeripheral(){this._availablePeripherals={},this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID),this._discoverTimeoutID=window.setTimeout(this._handleDiscoverTimeout.bind(this),15e3),this.sendRemoteRequest("discover",this._peripheralOptions).catch((e=>this._handleRequestError(e)))}connectPeripheral(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n={peripheralId:e};t&&(n.pin=t),this.sendRemoteRequest("connect",n).then((()=>{this._connected=!0,this._runtime.emit(this._runtime.constructor.PERIPHERAL_CONNECTED),this._connectCallback()})).catch((e=>{this._handleRequestError(e)}))}disconnect(){this._connected&&(this._connected=!1),this._socket.isOpen()&&this._socket.close(),this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID),this._runtime.emit(this._runtime.constructor.PERIPHERAL_DISCONNECTED)}isConnected(){return this._connected}sendMessage(e){return this.sendRemoteRequest("send",e).catch((e=>{this.handleDisconnectError(e)}))}didReceiveCall(e,t){switch(e){case"didDiscoverPeripheral":this._availablePeripherals[t.peripheralId]=t,this._runtime.emit(this._runtime.constructor.PERIPHERAL_LIST_UPDATE,this._availablePeripherals),this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID);break;case"userDidPickPeripheral":this._availablePeripherals[t.peripheralId]=t,this._runtime.emit(this._runtime.constructor.USER_PICKED_PERIPHERAL,this._availablePeripherals),this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID);break;case"userDidNotPickPeripheral":this._runtime.emit(this._runtime.constructor.PERIPHERAL_SCAN_TIMEOUT),this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID);break;case"didReceiveMessage":this._messageCallback(t);break;default:return"nah"}}handleDisconnectError(){this._connected&&(this.disconnect(),this._resetCallback&&this._resetCallback(),this._runtime.emit(this._runtime.constructor.PERIPHERAL_CONNECTION_LOST_ERROR,{message:"Scratch lost connection to",extensionId:this._extensionId}))}_handleRequestError(){this._runtime.emit(this._runtime.constructor.PERIPHERAL_REQUEST_ERROR,{message:"Scratch lost connection to",extensionId:this._extensionId})}_handleDiscoverTimeout(){this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID),this._runtime.emit(this._runtime.constructor.PERIPHERAL_SCAN_TIMEOUT)}}},function(e,t,n){const r=n(6),i=n(4),s=n(3),o=n(2),a="SPACE",l="LEFT",c="RIGHT",u="UP",d="DOWN",h={[a]:"space",[l]:"left arrow",[u]:"up arrow",[c]:"right arrow",[d]:"down arrow"};e.exports=class{constructor(e){this.runtime=e,this.frameToggle=!1,setInterval((()=>{this.frameToggle=!this.frameToggle}),this.runtime.currentStepTime),this.keyPressed=this.keyPressed.bind(this),this.runtime.on("KEY_PRESSED",this.keyPressed),this._clearkeyPressBuffer=this._clearkeyPressBuffer.bind(this),this.runtime.on("PROJECT_STOP_ALL",this._clearkeyPressBuffer),this.sequences={},this.keyPressBuffer=[]}get KEY_TEXT_SHORT(){return{[a]:r({id:"makeymakey.spaceKey",default:"space",description:"The space key on a computer keyboard."}),[l]:r({id:"makeymakey.leftArrowShort",default:"left",description:"Short name for the left arrow key on a computer keyboard."}),[u]:r({id:"makeymakey.upArrowShort",default:"up",description:"Short name for the up arrow key on a computer keyboard."}),[c]:r({id:"makeymakey.rightArrowShort",default:"right",description:"Short name for the right arrow key on a computer keyboard."}),[d]:r({id:"makeymakey.downArrowShort",default:"down",description:"Short name for the down arrow key on a computer keyboard."})}}get DEFAULT_SEQUENCES(){return["".concat(l," ").concat(u," ").concat(c),"".concat(c," ").concat(u," ").concat(l),"".concat(l," ").concat(c),"".concat(c," ").concat(l),"".concat(u," ").concat(d),"".concat(d," ").concat(u),"".concat(u," ").concat(c," ").concat(d," ").concat(l),"".concat(u," ").concat(l," ").concat(d," ").concat(c),"".concat(u," ").concat(u," ").concat(d," ").concat(d," ")+"".concat(l," ").concat(c," ").concat(l," ").concat(c)]}getInfo(){return{id:"makeymakey",name:"Makey Makey",blockIconURI:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHN0eWxlPi5zdDJ7ZmlsbDpyZWR9LnN0M3tmaWxsOiNlMGUwZTB9LnN0NHtmaWxsOm5vbmU7c3Ryb2tlOiM2NjY7c3Ryb2tlLXdpZHRoOi41O3N0cm9rZS1taXRlcmxpbWl0OjEwfTwvc3R5bGU+PHBhdGggZD0iTTM1IDI4SDVhMSAxIDAgMCAxLTEtMVYxMmMwLS42LjQtMSAxLTFoMzBjLjUgMCAxIC40IDEgMXYxNWMwIC41LS41IDEtMSAxeiIgZmlsbD0iI2ZmZiIgaWQ9IkxheWVyXzYiLz48ZyBpZD0iTGF5ZXJfNCI+PHBhdGggY2xhc3M9InN0MiIgZD0iTTQgMjVoMzJ2Mi43SDR6TTEzIDI0aC0yLjJhMSAxIDAgMCAxLTEtMXYtOS43YzAtLjYuNC0xIDEtMUgxM2MuNiAwIDEgLjQgMSAxVjIzYzAgLjYtLjUgMS0xIDF6Ii8+PHBhdGggY2xhc3M9InN0MiIgZD0iTTYuMSAxOS4zdi0yLjJjMC0uNS40LTEgMS0xaDkuN2MuNSAwIDEgLjUgMSAxdjIuMmMwIC41LS41IDEtMSAxSDcuMWExIDEgMCAwIDEtMS0xeiIvPjxjaXJjbGUgY2xhc3M9InN0MiIgY3g9IjIyLjgiIGN5PSIxOC4yIiByPSIzLjQiLz48Y2lyY2xlIGNsYXNzPSJzdDIiIGN4PSIzMC42IiBjeT0iMTguMiIgcj0iMy40Ii8+PHBhdGggY2xhc3M9InN0MiIgZD0iTTQuMiAyN2gzMS45di43SDQuMnoiLz48L2c+PGcgaWQ9IkxheWVyXzUiPjxjaXJjbGUgY2xhc3M9InN0MyIgY3g9IjIyLjgiIGN5PSIxOC4yIiByPSIyLjMiLz48Y2lyY2xlIGNsYXNzPSJzdDMiIGN4PSIzMC42IiBjeT0iMTguMiIgcj0iMi4zIi8+PHBhdGggY2xhc3M9InN0MyIgZD0iTTEyLjUgMjIuOWgtMS4yYy0uMyAwLS41LS4yLS41LS41VjE0YzAtLjMuMi0uNS41LS41aDEuMmMuMyAwIC41LjIuNS41djguNGMwIC4zLS4yLjUtLjUuNXoiLz48cGF0aCBjbGFzcz0ic3QzIiBkPSJNNy4yIDE4Ljd2LTEuMmMwLS4zLjItLjUuNS0uNWg4LjRjLjMgMCAuNS4yLjUuNXYxLjJjMCAuMy0uMi41LS41LjVINy43Yy0uMyAwLS41LS4yLS41LS41ek00IDI2aDMydjJINHoiLz48L2c+PGcgaWQ9IkxheWVyXzMiPjxwYXRoIGNsYXNzPSJzdDQiIGQ9Ik0zNS4yIDI3LjlINC44YTEgMSAwIDAgMS0xLTFWMTIuMWMwLS42LjUtMSAxLTFoMzAuNWMuNSAwIDEgLjQgMSAxVjI3YTEgMSAwIDAgMS0xLjEuOXoiLz48cGF0aCBjbGFzcz0ic3Q0IiBkPSJNMzUuMiAyNy45SDQuOGExIDEgMCAwIDEtMS0xVjEyLjFjMC0uNi41LTEgMS0xaDMwLjVjLjUgMCAxIC40IDEgMVYyN2ExIDEgMCAwIDEtMS4xLjl6Ii8+PC9nPjwvc3ZnPg==",blocks:[{opcode:"whenMakeyKeyPressed",text:r({id:"makeymakey.whenKeyPressed",default:"when [KEY] key pressed",description:"when a keyboard key is pressed"}),blockType:s.HAT,arguments:{KEY:{type:i.STRING,menu:"KEY",defaultValue:a}}},{opcode:"whenCodePressed",text:r({id:"makeymakey.whenKeysPressedInOrder",default:"when [SEQUENCE] pressed in order",description:"when a sequence of keyboard keys is pressed in a specific order"}),blockType:s.HAT,arguments:{SEQUENCE:{type:i.STRING,menu:"SEQUENCE",defaultValue:this.DEFAULT_SEQUENCES[0]}}}],menus:{KEY:{acceptReporters:!0,items:[{text:r({id:"makeymakey.spaceKey",default:"space",description:"The space key on a computer keyboard."}),value:a},{text:r({id:"makeymakey.upArrow",default:"up arrow",description:"The up arrow key on a computer keyboard."}),value:u},{text:r({id:"makeymakey.downArrow",default:"down arrow",description:"The down arrow key on a computer keyboard."}),value:d},{text:r({id:"makeymakey.rightArrow",default:"right arrow",description:"The right arrow key on a computer keyboard."}),value:c},{text:r({id:"makeymakey.leftArrow",default:"left arrow",description:"The left arrow key on a computer keyboard."}),value:l},{text:"w",value:"w"},{text:"a",value:"a"},{text:"s",value:"s"},{text:"d",value:"d"},{text:"f",value:"f"},{text:"g",value:"g"}]},SEQUENCE:{acceptReporters:!0,items:this.buildSequenceMenu(this.DEFAULT_SEQUENCES)}}}}buildSequenceMenu(e){return e.map((e=>this.getMenuItemForSequenceString(e)))}getMenuItemForSequenceString(e){let t=e.split(" ");return t=t.map((e=>this.KEY_TEXT_SHORT[e])),{text:t.join(" "),value:e}}whenMakeyKeyPressed(e,t){let n=e.KEY;h[e.KEY]&&(n=h[e.KEY]);return t.ioQuery("keyboard","getKeyIsDown",[n])&&this.frameToggle}keyPressed(e){e=(e=e.split(" ")[0]).toUpperCase(),this.keyPressBuffer.push(e),this.keyPressBuffer.length>100&&this.keyPressBuffer.shift();for(const e in this.sequences){const t=this.sequences[e].array;if(this.keyPressBuffer.length<t.length)continue;let n=!1;const r=this.keyPressBuffer.slice(-1*t.length);for(let e=0;e<t.length;e++)t[e]!==r[e]&&(n=!0);n||(this.sequences[e].completed=!0,setTimeout((()=>{this.sequences[e].completed=!1}),100))}}_clearkeyPressBuffer(){this.keyPressBuffer=[]}addSequence(e,t){Object.prototype.hasOwnProperty.call(this.sequences,e)||(this.sequences[e]={array:t,completed:!1})}whenCodePressed(e){const t=o.toString(e.SEQUENCE).toUpperCase(),n=t.split(" ");if(!(n.length<2))return this.addSequence(t,n),this.sequences[t].completed}}},function(e,t,n){const r=n(4),i=n(3),s=n(2),o=n(6),a=n(23),l=n(31),c=n(15),u=n(5),d=n(43),h=n(1),p="00001623-1212-efde-1623-785feabcd123",m="00001624-1212-efde-1623-785feabcd123",f=100,g=20,y=20,b=21,v=23,S=37,w=38,k=39,T=40,x=1,E=2,A=4,C={A:55,B:56,C:1,D:2},I={A:0,B:1,C:2,D:3};let O=I;const M="any",N="none",R="red",D="blue",P="green",L="yellow",B="white",z="black",U={[N]:255,[R]:9,[D]:3,[P]:5,[L]:7,[B]:10,[z]:0},j={HUB_PROPERTIES:1,HUB_ACTIONS:2,HUB_ALERTS:3,HUB_ATTACHED_IO:4,ERROR:5,PORT_INPUT_FORMAT_SETUP_SINGLE:65,PORT_INPUT_FORMAT_SETUP_COMBINED:66,PORT_INFORMATION:67,PORT_MODEINFORMATION:68,PORT_VALUE:69,PORT_VALUE_COMBINED:70,PORT_INPUT_FORMAT:71,PORT_INPUT_FORMAT_COMBINED:72,OUTPUT:129,PORT_FEEDBACK:130},F=3,W=5,V=1,G=7,q=11,Y=81,H=16,_=1,K=0,Q=127,X=0,Z=1,J=0,$=0,ee=1,te=0,ne=2,re=0,ie=0,se=1,oe=2,ae=3,le=function(e){const t=new ArrayBuffer(4),n=new DataView(t);return n.setInt32(0,e),[n.getInt8(3),n.getInt8(2),n.getInt8(1),n.getInt8(0)]},ce=function(e){const t=Uint8Array.from(e);return new DataView(t.buffer).getInt32(0,!0)};class ue{constructor(e,t){this._parent=e,this._index=t,this._direction=1,this._power=50,this._position=0,this._status=ie,this._pendingDurationTimeoutId=null,this._pendingDurationTimeoutStartTime=null,this._pendingDurationTimeoutDelay=null,this._pendingRotationDestination=null,this._pendingRotationPromise=null,this.turnOff=this.turnOff.bind(this)}get direction(){return this._direction}set direction(e){this._direction=e<0?-1:1}get power(){return this._power}set power(e){this._power=0===e?0:u.scale(e,1,100,10,100)}get position(){return this._position}set position(e){this._position=e}get status(){return this._status}set status(e){this._clearRotationState(),this._clearDurationTimeout(),this._status=e}get pendingDurationTimeoutStartTime(){return this._pendingDurationTimeoutStartTime}get pendingDurationTimeoutDelay(){return this._pendingDurationTimeoutDelay}get pendingRotationDestination(){return this._pendingRotationDestination}get pendingRotationPromise(){return this._pendingRotationPromise}set pendingRotationPromise(e){this._pendingRotationPromise=e}_turnOn(){const e=this._parent.generateOutputCommand(this._index,H,G,[this.power*this.direction,u.clamp(this.power+10,0,100),X]);this._parent.send(m,e)}turnOnForever(){this.status=se,this._turnOn()}turnOnFor(e){e=Math.max(0,e),this.status=oe,this._turnOn(),this._setNewDurationTimeout(this.turnOff,e)}turnOnForDegrees(e,t){e=Math.max(0,e);const n=this._parent.generateOutputCommand(this._index,H^_,q,[...le(e),this.power*this.direction*t,u.clamp(this.power+10,0,100),Q,X]);this.status=ae,this._pendingRotationDestination=this.position+e*this.direction*t,this._parent.send(m,n)}turnOff(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=this._parent.generateOutputCommand(this._index,H,V,[K]);this.status=ie,this._parent.send(m,t,e)}_clearDurationTimeout(){null!==this._pendingDurationTimeoutId&&(clearTimeout(this._pendingDurationTimeoutId),this._pendingDurationTimeoutId=null,this._pendingDurationTimeoutStartTime=null,this._pendingDurationTimeoutDelay=null)}_setNewDurationTimeout(e,t){this._clearDurationTimeout();const n=setTimeout((()=>{this._pendingDurationTimeoutId===n&&(this._pendingDurationTimeoutId=null,this._pendingDurationTimeoutStartTime=null,this._pendingDurationTimeoutDelay=null),e()}),t);this._pendingDurationTimeoutId=n,this._pendingDurationTimeoutStartTime=Date.now(),this._pendingDurationTimeoutDelay=t}_clearRotationState(){null!==this._pendingRotationPromise&&(this._pendingRotationPromise(),this._pendingRotationPromise=null),this._pendingRotationDestination=null}}class de{constructor(e,t){this._runtime=e,this._runtime.on("PROJECT_STOP_ALL",this.stopAll.bind(this)),this._extensionId=t,this._ports=[],this._motors=[],this._sensors={tiltX:0,tiltY:0,color:N,previousColor:N},this._colorSamples=[],this._ble=null,this._runtime.registerPeripheralExtension(t,this),this._rateLimiter=new d(g),this._pingDeviceId=null,this.reset=this.reset.bind(this),this._onConnect=this._onConnect.bind(this),this._onMessage=this._onMessage.bind(this),this._pingDevice=this._pingDevice.bind(this)}get tiltX(){return this._sensors.tiltX}get tiltY(){return this._sensors.tiltY}get color(){return this._sensors.color}get previousColor(){return this._sensors.previousColor}boostColorForIndex(e){return Object.keys(U).find((t=>U[t]===e))||N}motor(e){return this._motors[e]}stopAllMotors(){this._motors.forEach((e=>{e&&e.turnOff(!1)}))}setLED(e){const t=[e>>16&255,e>>8&255,255&e],n=this.generateOutputCommand(this._ports.indexOf(v),H^_,Y,[ee,...t]);return this.send(m,n)}setLEDMode(){const e=this.generateInputCommand(this._ports.indexOf(v),ee,0,!1);return this.send(m,e)}stopAll(){this.isConnected()&&this.stopAllMotors()}scan(){this._ble&&this._ble.disconnect(),this._ble=new l(this._runtime,this._extensionId,{filters:[{services:[p],manufacturerData:{919:{dataPrefix:[0,64],mask:[0,255]}}}],optionalServices:[]},this._onConnect,this.reset)}connect(e){this._ble&&this._ble.connectPeripheral(e)}disconnect(){this._ble&&this._ble.disconnect(),this.reset()}reset(){this._ports=[],this._motors=[],this._sensors={tiltX:0,tiltY:0,color:N,previousColor:N},this._pingDeviceId&&(window.clearInterval(this._pingDeviceId),this._pingDeviceId=null)}isConnected(){let e=!1;return this._ble&&(e=this._ble.isConnected()),e}send(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.isConnected()?n&&!this._rateLimiter.okayToSend()?Promise.resolve():this._ble.write(p,e,c.uint8ArrayToBase64(t),"base64"):Promise.resolve()}generateOutputCommand(e,t,n,r){const i=[0,j.OUTPUT,e,t,n,...r];return i.unshift(i.length+1),i}generateInputCommand(e,t,n,r){const i=[0,j.PORT_INPUT_FORMAT_SETUP_SINGLE,e,t].concat(le(n)).concat([r]);return i.unshift(i.length+1),i}_onConnect(){this._ble.startNotifications(p,m,this._onMessage),this._pingDeviceId=window.setInterval(this._pingDevice,5e3),setTimeout((()=>{const e=[0,j.HUB_PROPERTIES,F,W];e.unshift(e.length+1),this.send(m,e,!1)}),500)}_onMessage(e){const t=c.base64ToUint8Array(e),n=t[2],r=t[3];switch(n){case j.HUB_PROPERTIES:switch(t[3]){case F:{const e=ce([36,2,0,16]);ce(t.slice(5,t.length))<e?(O=C,h.info("Move Hub firmware older than version 1.0.00.0224 detected. Using old port mapping.")):O=I;break}}break;case j.HUB_ATTACHED_IO:{const e=t[4],n=t[5];switch(e){case Z:this._registerSensorOrMotor(r,n);break;case J:this._clearPort(r)}break}case j.PORT_VALUE:{const e=this._ports[r];switch(e){case T:this._sensors.tiltX=t[4],this._sensors.tiltY=t[5];break;case S:this._colorSamples.unshift(t[4]),this._colorSamples.length>5?(this._colorSamples.pop(),this._colorSamples.every(((e,t,n)=>e===n[0]))?(this._sensors.previousColor=this._sensors.color,this._sensors.color=this.boostColorForIndex(this._colorSamples[0])):this._sensors.color=N):this._sensors.color=N;break;case w:case k:this.motor(r).position=ce(t.slice(4,8));break;case b:case y:case v:break;default:h.warn("Unknown sensor value! Type: ".concat(e))}break}case j.PORT_FEEDBACK:{const e=t[4],n=this.motor(r);if(n){!(e&x)&&e&(E^A)&&n.status===ae&&(n.status=ie)}break}case j.ERROR:h.warn("Error reported by hub: ".concat(t))}}_pingDevice(){this._ble.read(p,m,!1)}_registerSensorOrMotor(e,t){this._ports[e]=t,t!==k&&t!==w||(this._motors[e]=new ue(this,e));let n=null,r=1;switch(t){case k:case w:n=ne;break;case S:n=te,r=0;break;case v:n=ee,this.setLEDMode(),this.setLED(255);break;case T:n=$;break;default:n=re}const i=this.generateInputCommand(e,n,r,!0);this.send(m,i)}_clearPort(e){const t=this._ports[e];t===T&&(this._sensors.tiltX=this._sensors.tiltY=0),t===S&&(this._sensors.color=N),this._ports[e]="none",this._motors[e]=null}}const he="A",pe="B",me="C",fe="D",ge="AB",ye="ABCD",be="this way",ve="that way",Se="reverse",we="up",ke="down",Te="left",xe="right",Ee="any";class Ae{static get EXTENSION_ID(){return"boost"}static get TILT_THRESHOLD(){return 15}constructor(e){this.runtime=e,this._peripheral=new de(this.runtime,Ae.EXTENSION_ID)}getInfo(){return{id:Ae.EXTENSION_ID,name:"BOOST",blockIconURI:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACpQTFRF////fIel5ufolZ62/2YavsPS+YZOkJmy9/j53+Hk6+zs6N/b6dfO////tDhMHAAAAA50Uk5T/////////////////wBFwNzIAAAA6ElEQVR42uzX2w6DIBAEUGDVtlr//3dLaLwgiwUd2z7MJPJg5EQWiGhGcAxBggQJEiT436CIfqXJPTn3MKNYYMSDFpoAmp24OaYgvwKnFgL2zvVTCwHrMoMi+nUQLFthaNCCa0iwclLkDgYVsQp0mzxuqXgK1MRzoCLWgkPXNN2wI/q6Kvt7u/cX0HtejN8x2sXpnpb8J8D3b0Keuhh3X975M+i0xNVbg3s1TIasgK21bQyGO+s2PykaGMYbge8KrNrssvkOWDXkErB8UuBHETjoYLkKBA8ZfuDkbwVBggQJEiR4MC8BBgDTtMZLx2nFCQAAAABJRU5ErkJggg==",showStatusButton:!0,blocks:[{opcode:"motorOnFor",text:o({id:"boost.motorOnFor",default:"turn motor [MOTOR_ID] for [DURATION] seconds",description:"turn a motor on for some time"}),blockType:i.COMMAND,arguments:{MOTOR_ID:{type:r.STRING,menu:"MOTOR_ID",defaultValue:he},DURATION:{type:r.NUMBER,defaultValue:1}}},{opcode:"motorOnForRotation",text:o({id:"boost.motorOnForRotation",default:"turn motor [MOTOR_ID] for [ROTATION] rotations",description:"turn a motor on for rotation"}),blockType:i.COMMAND,arguments:{MOTOR_ID:{type:r.STRING,menu:"MOTOR_ID",defaultValue:he},ROTATION:{type:r.NUMBER,defaultValue:1}}},{opcode:"motorOn",text:o({id:"boost.motorOn",default:"turn motor [MOTOR_ID] on",description:"turn a motor on indefinitely"}),blockType:i.COMMAND,arguments:{MOTOR_ID:{type:r.STRING,menu:"MOTOR_ID",defaultValue:he}}},{opcode:"motorOff",text:o({id:"boost.motorOff",default:"turn motor [MOTOR_ID] off",description:"turn a motor off"}),blockType:i.COMMAND,arguments:{MOTOR_ID:{type:r.STRING,menu:"MOTOR_ID",defaultValue:he}}},{opcode:"setMotorPower",text:o({id:"boost.setMotorPower",default:"set motor [MOTOR_ID] speed to [POWER] %",description:"set the motor's speed without turning it on"}),blockType:i.COMMAND,arguments:{MOTOR_ID:{type:r.STRING,menu:"MOTOR_ID",defaultValue:ye},POWER:{type:r.NUMBER,defaultValue:100}}},{opcode:"setMotorDirection",text:o({id:"boost.setMotorDirection",default:"set motor [MOTOR_ID] direction [MOTOR_DIRECTION]",description:"set the motor's turn direction without turning it on"}),blockType:i.COMMAND,arguments:{MOTOR_ID:{type:r.STRING,menu:"MOTOR_ID",defaultValue:he},MOTOR_DIRECTION:{type:r.STRING,menu:"MOTOR_DIRECTION",defaultValue:be}}},{opcode:"getMotorPosition",text:o({id:"boost.getMotorPosition",default:"motor [MOTOR_REPORTER_ID] position",description:"the position returned by the motor"}),blockType:i.REPORTER,arguments:{MOTOR_REPORTER_ID:{type:r.STRING,menu:"MOTOR_REPORTER_ID",defaultValue:he}}},{opcode:"whenColor",text:o({id:"boost.whenColor",default:"when [COLOR] brick seen",description:"check for when color"}),blockType:i.HAT,arguments:{COLOR:{type:r.STRING,menu:"COLOR",defaultValue:M}}},{opcode:"seeingColor",text:o({id:"boost.seeingColor",default:"seeing [COLOR] brick?",description:"is the color sensor seeing a certain color?"}),blockType:i.BOOLEAN,arguments:{COLOR:{type:r.STRING,menu:"COLOR",defaultValue:M}}},{opcode:"whenTilted",text:o({id:"boost.whenTilted",default:"when tilted [TILT_DIRECTION_ANY]",description:"check when tilted in a certain direction"}),func:"isTilted",blockType:i.HAT,arguments:{TILT_DIRECTION_ANY:{type:r.STRING,menu:"TILT_DIRECTION_ANY",defaultValue:Ee}}},{opcode:"getTiltAngle",text:o({id:"boost.getTiltAngle",default:"tilt angle [TILT_DIRECTION]",description:"the angle returned by the tilt sensor"}),blockType:i.REPORTER,arguments:{TILT_DIRECTION:{type:r.STRING,menu:"TILT_DIRECTION",defaultValue:we}}},{opcode:"setLightHue",text:o({id:"boost.setLightHue",default:"set light color to [HUE]",description:"set the LED color"}),blockType:i.COMMAND,arguments:{HUE:{type:r.NUMBER,defaultValue:50}}}],menus:{MOTOR_ID:{acceptReporters:!0,items:[{text:"A",value:he},{text:"B",value:pe},{text:"C",value:me},{text:"D",value:fe},{text:"AB",value:ge},{text:"ABCD",value:ye}]},MOTOR_REPORTER_ID:{acceptReporters:!0,items:[{text:"A",value:he},{text:"B",value:pe},{text:"C",value:me},{text:"D",value:fe}]},MOTOR_DIRECTION:{acceptReporters:!0,items:[{text:o({id:"boost.motorDirection.forward",default:"this way",description:"label for forward element in motor direction menu for LEGO Boost extension"}),value:be},{text:o({id:"boost.motorDirection.backward",default:"that way",description:"label for backward element in motor direction menu for LEGO Boost extension"}),value:ve},{text:o({id:"boost.motorDirection.reverse",default:"reverse",description:"label for reverse element in motor direction menu for LEGO Boost extension"}),value:Se}]},TILT_DIRECTION:{acceptReporters:!0,items:[{text:o({id:"boost.tiltDirection.up",default:"up",description:"label for up element in tilt direction menu for LEGO Boost extension"}),value:we},{text:o({id:"boost.tiltDirection.down",default:"down",description:"label for down element in tilt direction menu for LEGO Boost extension"}),value:ke},{text:o({id:"boost.tiltDirection.left",default:"left",description:"label for left element in tilt direction menu for LEGO Boost extension"}),value:Te},{text:o({id:"boost.tiltDirection.right",default:"right",description:"label for right element in tilt direction menu for LEGO Boost extension"}),value:xe}]},TILT_DIRECTION_ANY:{acceptReporters:!0,items:[{text:o({id:"boost.tiltDirection.up",default:"up"}),value:we},{text:o({id:"boost.tiltDirection.down",default:"down"}),value:ke},{text:o({id:"boost.tiltDirection.left",default:"left"}),value:Te},{text:o({id:"boost.tiltDirection.right",default:"right"}),value:xe},{text:o({id:"boost.tiltDirection.any",default:"any",description:"label for any element in tilt direction menu for LEGO Boost extension"}),value:Ee}]},COLOR:{acceptReporters:!0,items:[{text:o({id:"boost.color.red",default:"red",description:"the color red"}),value:R},{text:o({id:"boost.color.blue",default:"blue",description:"the color blue"}),value:D},{text:o({id:"boost.color.green",default:"green",description:"the color green"}),value:P},{text:o({id:"boost.color.yellow",default:"yellow",description:"the color yellow"}),value:L},{text:o({id:"boost.color.white",default:"white",desription:"the color white"}),value:B},{text:o({id:"boost.color.black",default:"black",description:"the color black"}),value:z},{text:o({id:"boost.color.any",default:"any color",description:"any color"}),value:M}]}}}}motorOnFor(e){let t=1e3*s.toNumber(e.DURATION);return t=u.clamp(t,0,15e3),new Promise((n=>{this._forEachMotor(e.MOTOR_ID,(e=>{const n=this._peripheral.motor(e);n&&n.turnOnFor(t)})),setTimeout(n,t)}))}motorOnForRotation(e){let t=360*s.toNumber(e.ROTATION);const n=Math.sign(t);t=Math.abs(u.clamp(t,-36e4,36e4));const r=[];this._forEachMotor(e.MOTOR_ID,(e=>{r.push(e)}));const i=r.map((e=>{const r=this._peripheral.motor(e);return r?0===r.power?Promise.resolve():new Promise((e=>{r.turnOnForDegrees(t,n),r.pendingRotationPromise=e})):null}));return Promise.all(i).then((()=>{}))}motorOn(e){return this._forEachMotor(e.MOTOR_ID,(e=>{const t=this._peripheral.motor(e);t&&t.turnOnForever()})),new Promise((e=>{window.setTimeout((()=>{e()}),f)}))}motorOff(e){return this._forEachMotor(e.MOTOR_ID,(e=>{const t=this._peripheral.motor(e);t&&t.turnOff()})),new Promise((e=>{window.setTimeout((()=>{e()}),f)}))}setMotorPower(e){return this._forEachMotor(e.MOTOR_ID,(t=>{const n=this._peripheral.motor(t);if(n)switch(n.power=u.clamp(s.toNumber(e.POWER),0,100),n.status){case se:n.turnOnForever();break;case oe:n.turnOnFor(n.pendingDurationTimeoutStartTime+n.pendingDurationTimeoutDelay-Date.now())}})),new Promise((e=>{window.setTimeout((()=>{e()}),f)}))}setMotorDirection(e){return this._forEachMotor(e.MOTOR_ID,(t=>{const n=this._peripheral.motor(t);if(n){switch(e.MOTOR_DIRECTION){case be:n.direction=1;break;case ve:n.direction=-1;break;case Se:n.direction=-n.direction;break;default:h.warn("Unknown motor direction in setMotorDirection: ".concat(e.DIRECTION))}if(n)switch(n.status){case se:n.turnOnForever();break;case oe:n.turnOnFor(n.pendingDurationTimeoutStartTime+n.pendingDurationTimeoutDelay-Date.now())}}})),new Promise((e=>{window.setTimeout((()=>{e()}),f)}))}getMotorPosition(e){let t=null;switch(e.MOTOR_REPORTER_ID){case he:t=O.A;break;case pe:t=O.B;break;case me:t=O.C;break;case fe:t=O.D;break;default:return h.warn("Asked for a motor position that doesnt exist!"),!1}if(null!==t&&this._peripheral.motor(t)){let e=this._peripheral.motor(t).position;return t===O.A&&(e*=-1),u.wrapClamp(e,0,360)}return 0}_forEachMotor(e,t){let n;switch(e){case he:n=[O.A];break;case pe:n=[O.B];break;case me:n=[O.C];break;case fe:n=[O.D];break;case ge:n=[O.A,O.B];break;case ye:n=[O.A,O.B,O.C,O.D];break;default:h.warn("Invalid motor ID: ".concat(e)),n=[]}for(const e of n)t(e)}whenTilted(e){return this._isTilted(e.TILT_DIRECTION_ANY)}isTilted(e){return this._isTilted(e.TILT_DIRECTION_ANY)}getTiltAngle(e){return this._getTiltAngle(e.TILT_DIRECTION)}_isTilted(e){return e===Ee?Math.abs(this._peripheral.tiltX)>=Ae.TILT_THRESHOLD||Math.abs(this._peripheral.tiltY)>=Ae.TILT_THRESHOLD:this._getTiltAngle(e)>=Ae.TILT_THRESHOLD}_getTiltAngle(e){switch(e){case we:return this._peripheral.tiltY>90?256-this._peripheral.tiltY:-this._peripheral.tiltY;case ke:return this._peripheral.tiltY>90?this._peripheral.tiltY-256:this._peripheral.tiltY;case Te:return this._peripheral.tiltX>90?this._peripheral.tiltX-256:this._peripheral.tiltX;case xe:return this._peripheral.tiltX>90?256-this._peripheral.tiltX:-this._peripheral.tiltX;default:h.warn("Unknown tilt direction in _getTiltAngle: ".concat(e))}}whenColor(e){return e.COLOR===M?this._peripheral.color!==N&&this._peripheral.color!==this._peripheral.previousColor:e.COLOR===this._peripheral.color}seeingColor(e){return e.COLOR===M?this._peripheral.color!==N:e.COLOR===this._peripheral.color}setLightHue(e){let t=s.toNumber(e.HUE);t=u.wrapClamp(t,0,100);const n=360*t/100,r=a.hsvToRgb({h:n,s:1,v:1}),i=a.rgbToDecimal(r);return this._peripheral._led=t,this._peripheral.setLED(i),new Promise((e=>{window.setTimeout((()=>{e()}),f)}))}}e.exports=Ae},function(e,t,n){const r=n(4),i=n(3),s=n(1),o=n(6),a=n(5),l=n(31),c=n(242),u=n(243),d={service:"d91714ef-28b9-4f91-ba16-f0d9a604f112",commandChar:"f4bf14a6-c7d5-4b6d-8aa8-df1a7c83adcb",responseChar:"b41e6675-a329-40e0-aa01-44d2f444babe"},h="Force and Acceleration extension stopped receiving data",p=1,m=2,f=3,g=4,y=5,b=6,v=7;class S{constructor(e,t){this._runtime=e,this._ble=null,this._device=null,this._runtime.registerPeripheralExtension(t,this),this._extensionId=t,this._sensors={force:0,accelerationX:0,accelerationY:0,accelerationZ:0,spinSpeedX:0,spinSpeedY:0,spinSpeedZ:0},this._timeoutID=null,this.reset=this.reset.bind(this),this._onConnect=this._onConnect.bind(this)}scan(){this._ble&&this._ble.disconnect(),this._ble=new l(this._runtime,this._extensionId,{filters:[{namePrefix:"GDX-FOR"}],optionalServices:[d.service]},this._onConnect,this.reset)}connect(e){this._ble&&this._ble.connectPeripheral(e)}disconnect(){this._ble&&this._ble.disconnect(),this.reset()}reset(){this._sensors={force:0,accelerationX:0,accelerationY:0,accelerationZ:0,spinSpeedX:0,spinSpeedY:0,spinSpeedZ:0},this._timeoutID&&(window.clearInterval(this._timeoutID),this._timeoutID=null)}isConnected(){let e=!1;return this._ble&&(e=this._ble.isConnected()),e}_onConnect(){const e=new u(this._ble,d);c.createDevice(e,{open:!0,startMeasurements:!1}).then((e=>{this._device=e,this._device.keepValues=!1,this._device.sensors.forEach((e=>{e.setEnabled(!0)})),this._device.on("measurements-started",(()=>{this._device.sensors.filter((e=>e.enabled)).forEach((e=>{e.on("value-changed",(e=>{this._onSensorValueChanged(e)}))})),this._timeoutID=window.setInterval((()=>this._ble.handleDisconnectError(h)),4500)})),this._device.start(80)}))}_onSensorValueChanged(e){switch(e.number){case p:this._sensors.force=a.clamp(2*e.value,-100,100);break;case m:this._sensors.accelerationX=e.value;break;case f:this._sensors.accelerationY=e.value;break;case g:this._sensors.accelerationZ=e.value;break;case y:this._sensors.spinSpeedX=this._spinSpeedFromGyro(e.value);break;case b:this._sensors.spinSpeedY=this._spinSpeedFromGyro(e.value);break;case v:this._sensors.spinSpeedZ=this._spinSpeedFromGyro(e.value)}window.clearInterval(this._timeoutID),this._timeoutID=window.setInterval((()=>this._ble.handleDisconnectError(h)),4500)}_spinSpeedFromGyro(e){const t=1e3/this._runtime.currentStepTime;return e=a.radToDeg(e),e/=t,e*=-1}getForce(){return this._sensors.force}getTiltFrontBack(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.getAccelerationX(),n=this.getAccelerationY(),r=this.getAccelerationZ();let i=n*n+r*r;return i=Math.sqrt(i),i<.35?i=t<0?90:-90:(i=t/i,i=Math.atan(i),i=-1*a.radToDeg(i)),e&&(i*=-1),i}getTiltLeftRight(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.getAccelerationX(),n=this.getAccelerationY(),r=this.getAccelerationZ();let i=t*t+r*r;return i=Math.sqrt(i),i<.35?i=n<0?90:-90:(i=n/i,i=Math.atan(i),i=-1*a.radToDeg(i)),e&&(i*=-1),i}getAccelerationX(){return this._sensors.accelerationX}getAccelerationY(){return this._sensors.accelerationY}getAccelerationZ(){return this._sensors.accelerationZ}getSpinSpeedX(){return this._sensors.spinSpeedX}getSpinSpeedY(){return this._sensors.spinSpeedY}getSpinSpeedZ(){return this._sensors.spinSpeedZ}}const w="pushed",k="pulled",T="shaken",x="started falling",E="turned face up",A="turned face down",C="front",I="back",O="left",M="right",N="any",R="x",D="y",P="z";class L{static get EXTENSION_NAME(){return"Force and Acceleration"}static get EXTENSION_ID(){return"gdxfor"}get AXIS_MENU(){return[{text:"x",value:R},{text:"y",value:D},{text:"z",value:P}]}get TILT_MENU(){return[{text:o({id:"gdxfor.tiltDirectionMenu.front",default:"front",description:"label for front element in tilt direction picker for gdxfor extension"}),value:C},{text:o({id:"gdxfor.tiltDirectionMenu.back",default:"back",description:"label for back element in tilt direction picker for gdxfor extension"}),value:I},{text:o({id:"gdxfor.tiltDirectionMenu.left",default:"left",description:"label for left element in tilt direction picker for gdxfor extension"}),value:O},{text:o({id:"gdxfor.tiltDirectionMenu.right",default:"right",description:"label for right element in tilt direction picker for gdxfor extension"}),value:M}]}get TILT_MENU_ANY(){return[...this.TILT_MENU,{text:o({id:"gdxfor.tiltDirectionMenu.any",default:"any",description:"label for any direction element in tilt direction picker for gdxfor extension"}),value:N}]}get PUSH_PULL_MENU(){return[{text:o({id:"gdxfor.pushed",default:"pushed",description:"the force sensor was pushed inward"}),value:w},{text:o({id:"gdxfor.pulled",default:"pulled",description:"the force sensor was pulled outward"}),value:k}]}get GESTURE_MENU(){return[{text:o({id:"gdxfor.shaken",default:"shaken",description:"the sensor was shaken"}),value:T},{text:o({id:"gdxfor.startedFalling",default:"started falling",description:"the sensor started free falling"}),value:x},{text:o({id:"gdxfor.turnedFaceUp",default:"turned face up",description:"the sensor was turned to face up"}),value:E},{text:o({id:"gdxfor.turnedFaceDown",default:"turned face down",description:"the sensor was turned to face down"}),value:A}]}constructor(e){this.runtime=e,this._peripheral=new S(this.runtime,L.EXTENSION_ID)}getInfo(){return{id:L.EXTENSION_ID,name:L.EXTENSION_NAME,blockIconURI:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAABGdBTUEAALGPC/xhBQAACCNJREFUeAHtnGtsFFUUgM+dfXbbbbcWaKHSFgrlkWgkJCb6A4kmJfiHIBYBpcFfRg1GEkmEVAvhFYw/TExMxGoICAECiZEIIUQCiiT4gh+KILRQCi2ENIV2t/ue6zl3u2Upu4XuzO4csCe587iPmXO/OWfunTszV4ABWfflQU+0p+9bTcLzEmS5gUPlvagAcVMXcMpnK1u+evW8QLYKaNkWpHKxnt6dQsqFjxo80p10Jt1vx7t30n62Ys+2IJUTUpDlqUNomgYutwsjhZFD5r6slBAOhUHX9YTe6D1GTmrIAhFeBZ2c4JFCpBiggmwlBR7pTGLUewxZYBIUWV7yqgb7g8lotuukt5ihqyELHCSEbusk931ExMxbjSkWSNxEyr3vysxZLFHWnDuT0CtFV6OKmmOBRrV4hMubZoGmMZA6lHTfgsLeHnBEIiCxUY86XRDw+sBfOgZ0m820U5lxIFYAncF+GNvVDo5QaLBu1ClyYTyF4tvd8lZltQgXFA6mW73BxoVt0ShUXG2VCp4QQdDEFqez4Bm7p7gaO0of422r3x4Ji/KrbdIexu4SE2FjgWO6OkCLx6gt6gxOiNV92tiY+ni1Ye1nu7dpQfk35ikru9EBN6unsEDIwgLJPQv8dwCfT3WPt+iFIfAUqM3vL7vpjmuz0KX1gkAfOMN33dxKkjwA9vsTDIS8uubdBZcyAWlqWtohQbRSuru/L1O2vMazAGiLxRKVFqDgDEdAaHCN0kU8Ply2vKWxABhzJZ5ipC6qHlRzfJxVz99S49GdYQEw7PYkuAmokZJ6fumlQUqiNpVSQ56i9JnyHMsCYMRdADGHk0ZyHM1b976XicH0rXtWYR57FPNSGQ7CAiCBCJQ8oXhI0FdmBiPfVnl9ZZmz5DmFDcA+HwIUOEYMcjL2+e57PbBp04HxONI4ifIEKC8TYQMwhs+7IU+hwBFOYQvB5qF8grbwJnRfQXnIhbkIG4AExF+ScE00w0X3AZLwisrDyH1JH1YAA8UlIG029FRZsu6TPfVJiIltWYIjMTLgLUlGs1izeRYmGtS383t9wnu7G2J6fH/Tln2LNUdExGLxvZSOQ1qCS/+P9CFhBZAUuj12PHgCvRJHZ7w4EnhYjya6hXGHQ2Jaxj4ilbVC2AFEUNBVXSdKb3WC29+rmISKiqFn7ARBadyEHUACFHM64VZlDTdWafVh1Yik1ZB5JEsLJGaVtosw37ld4TscWQHX4+oRWO1zWrAEWCR6oMnTCEXijmI1234MVvsPgV+WcmKndGHpwlNtZwbhkZYEkuI4CkuAXfpk0HGAPym0TXEchaUL39Br4JvQeljk+lwxOxBeCRQ3UrFHI+AMBsEV6gcnhlwIS4BU0RORV1V42EqnwnLgSyo3AsM3eA9bPOt8bAEOV6NUWGRZ9FYvHSx6R0pfYgkMmk2DCH1+Z7KwB5gKazjLGgpLgUOAuRZWALnDSncxLAOYCmskbqjhe02h5d6y0sFKF5cXgI8LrLwB9PTeGew6POwNnptlpYOVLi4nFjjuWts957rnBk8tomoZ+bjhPcqOcCcnAG34EaTqOjxmsNKxzQnAkX5wronsOry6zIn66ThljLNcg+W1a2Gi55+MCg6XcKl3NuxrbxouS87TLAcY1V0QV5+8jLyuEekeeSGTS1gOcM/lZpOrlN/DsRzOyi8CY2fLuwUum/wR1BT+ZUzrDKUv9D4LB9rXZEjNTfRjZYFS5r86ebfA3W0bcmMKFh01/5fMoorm6rSjAA2SNc2F8dvmQVWCgdy8fxg8gcEN0pWez80QUyyQFAqn/N9mhmK5PAYN7adecCPnMsUCCZ7U8ari4IGb87wJeKFDA/MlmHXBDVkgTR1CV4/gaThKzBoeKYpuSzqSrqSzEiFuJDayWxqyQJp3RUhYSKfWUSEz5iDIrhrZl8I5b37JvrTBT3wdpd43cOqT/WiJhq6ikQpkW5a8BxuS/X219uXZHoPKmdMUGdEgpWzTll3Kr95Z8VJK7N3NL7b/qHY2rnmdjd6G7oF3q/b/3RoFaPDajwIcBWiQgMHioxZoEKChfqDBc2csnmxtM2ZglMDKArFvduhBbLDv9sOD8oymA0xBCHVtl6+c7ey6Ibdt+3ox7WOoxMCmD4i68PrZkBQaEDUe1tnVqSyyfl79+vr6evz1C2jKogkYWEEc0JnViiZRqKuoqJiZtEJcn0GIsykewzhW2jJVZjzBamxsfK79ase/5MoXL106TnEDwfq36qgIF6HGjKyqFsNkDGMwUNxEDEmIHQTxyNGjH1AchvumBcC4vAuXVpiA+TDYMFDXiiZFoN+SrmMI7tixo/v3337diNtQUzNpPq1RChIra5ccAFKDUEwYLra2fnXu3PmtA0gojqbaVUNl23ft+pPiPW73U7RGYdGH5QCQYCg93C73075S34I5c+ZQa0s/B1Njou51tVVVatJAXcrED3Q4EI5plgsHgAQiSiRCoRD9ECeam9fPo32UJzFQYwJLlix9mdZ9fb1naY2iyiQ2rVtyAEi199Pi5M8/tdB62vRpzceOH3+toaHBh61w2clTp96sqq5ehUnxw0eO7KA8KKpMYtO6JZcOKTUeNRhsp0+ffmtilYI1VLf4+Qvn1784d+5ezEfW144hMR05blglpDgHSbqxt6Wl5Y8ZM6afKq8oL7LZHd54PH7H7w+cOPj9dx8uXbLk+ICynbhm4cJDr7LVMKmhoP5dphaWoFGrHMTAQrgBJCjkFdQHpPntqCUmiWCge14PBsvdFnUYlP8AMAKfKIKmYukAAAAASUVORK5CYII=",menuIconURI:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABGdBTUEAALGPC/xhBQAAA9dJREFUWAnNmE2IFEcUgF/9dE/v7LoaM9kkK4JBRA0EFBIPRm85hBAvEXHXwyo5eFE87GFcReMkObgJiQnkkJzEg9n8HIJixKNe1IMKihgiCbviwV11V3d0d3pmuqsqr5ppcEnb3TNVggVFVVe9eu+r97qqq4tASqp8/fsboQgmU0TMugi571K29bPy9ovPU8Sf16HbpQj3EkYFBcJcr5Am2nZfs94AIWVfqMQeHNwhICUBZ4ypUIA/X2sbIm2AW8AJK0lkEP6TJpfqwXgg4QxmF/fB7Gtvxk1G5ZKHU1CqTgPJoSUXYJYeohSUJu+qrqdVUGh2/pVX4VFffx77WaqBZkrkEFj271+qWH0sXcU3FBzyQe/Mg7B//LbKMTRTxNiDbsMHHjTJlyM7HEJIBHXs2KXFj+oTNSdoQOCYLS5jD9IwBMm5H8NplwwPb/QV4yEIcycaAza9IuA76B38fuz1OF5RXUkmHCdu6rg0BpSMgV/sAe7DdzGFrvvdi0D3mSZjQA0wt7REQsY+iWF0XbfFzyal8SLRxuteD+Du4h4Z/flbqaBHibAQtZmQtcZaAZSMwtTylaR/4vaw1ju5YhWG10pwwAqghmp2FeHO2+t11WqyM80W0m7vAOhsM1kD7CGz8L57Jsq6bitZC/GcWgLf1H6KuHT92cTDAFy/BgXMXm0OCpgV50Bo9kK3BqiBboabQMMU/WoL5im4jToeq/AIgXsiRx5KKCjcwPEsiAv/BQMu9EwyDHXd/3kqCOSzDk6t5/YglQKKeJwq+PNRmJI8kwSTaj1HZy5AhSHqnXkIvU9mMUwEw4Q5wTM57LUtkg8QPw/cdcBJ+PhvKJ0Gj80nGq6JXrg6/XFiX97GXIBpyqTieKpKViOl+WEhWXMaUavvvdIZ8Giy5+Lh3bwKm/t+Be3JazMfxc1tldY26rastiHcsQevTG9pw0znovkAcRWHzSDKnZtaOJLSfMFLB5RqtRBS4LbCurqLCy0YPkU3C0IIPEimMqR2ei7ZX2+KQdRi/WahNT/GmfOD4Vyzhx/66pcjp85dUvcmp6J8+txldXh07PPskdkS+V6EbD0vTOKlB0x9B/O6BS8ULly9PgE6x4kDPR/XX5pyYKj8xcCucsUmkNUQE0JvKKm2VioVK5HRE7UKOHbi6B94RzP+93jtpC0vWgXUF0hr3ipuw8uadwd3jXxoA9IK4Pah8t6BneV9GgjD28Svw1mlxFobgFbeFTz13cKbth93fDryp2CEq0a4hTA+aAPQ/ESJFDdvXLzzzrqNjlTqOP6uDeFf0uhvJ0ZP2QD8D6ZzU6u8YIbBAAAAAElFTkSuQmCC",showStatusButton:!0,blocks:[{opcode:"whenGesture",text:o({id:"gdxfor.whenGesture",default:"when [GESTURE]",description:"when the sensor detects a gesture"}),blockType:i.HAT,arguments:{GESTURE:{type:r.STRING,menu:"gestureOptions",defaultValue:T}}},{opcode:"whenForcePushedOrPulled",text:o({id:"gdxfor.whenForcePushedOrPulled",default:"when force sensor [PUSH_PULL]",description:"when the force sensor is pushed or pulled"}),blockType:i.HAT,arguments:{PUSH_PULL:{type:r.STRING,menu:"pushPullOptions",defaultValue:w}}},{opcode:"getForce",text:o({id:"gdxfor.getForce",default:"force",description:"gets force"}),blockType:i.REPORTER},"---",{opcode:"whenTilted",text:o({id:"gdxfor.whenTilted",default:"when tilted [TILT]",description:"when the sensor detects tilt"}),blockType:i.HAT,arguments:{TILT:{type:r.STRING,menu:"tiltAnyOptions",defaultValue:N}}},{opcode:"isTilted",text:o({id:"gdxfor.isTilted",default:"tilted [TILT]?",description:"is the device tilted?"}),blockType:i.BOOLEAN,arguments:{TILT:{type:r.STRING,menu:"tiltAnyOptions",defaultValue:N}}},{opcode:"getTilt",text:o({id:"gdxfor.getTilt",default:"tilt angle [TILT]",description:"gets tilt"}),blockType:i.REPORTER,arguments:{TILT:{type:r.STRING,menu:"tiltOptions",defaultValue:C}}},"---",{opcode:"isFreeFalling",text:o({id:"gdxfor.isFreeFalling",default:"falling?",description:"is the device in free fall?"}),blockType:i.BOOLEAN},{opcode:"getSpinSpeed",text:o({id:"gdxfor.getSpin",default:"spin speed [DIRECTION]",description:"gets spin speed"}),blockType:i.REPORTER,arguments:{DIRECTION:{type:r.STRING,menu:"axisOptions",defaultValue:P}}},{opcode:"getAcceleration",text:o({id:"gdxfor.getAcceleration",default:"acceleration [DIRECTION]",description:"gets acceleration"}),blockType:i.REPORTER,arguments:{DIRECTION:{type:r.STRING,menu:"axisOptions",defaultValue:R}}}],menus:{pushPullOptions:{acceptReporters:!0,items:this.PUSH_PULL_MENU},gestureOptions:{acceptReporters:!0,items:this.GESTURE_MENU},axisOptions:{acceptReporters:!0,items:this.AXIS_MENU},tiltOptions:{acceptReporters:!0,items:this.TILT_MENU},tiltAnyOptions:{acceptReporters:!0,items:this.TILT_MENU_ANY}}}}whenForcePushedOrPulled(e){switch(e.PUSH_PULL){case w:return this._peripheral.getForce()<-5;case k:return this._peripheral.getForce()>5;default:return s.warn("unknown push/pull value in whenForcePushedOrPulled: ".concat(e.PUSH_PULL)),!1}}getForce(){return Math.round(this._peripheral.getForce())}whenGesture(e){switch(e.GESTURE){case T:return this.gestureMagnitude()>30;case x:return this.isFreeFalling();case E:return this._isFacing(E);case A:return this._isFacing(A);default:return s.warn("unknown gesture value in whenGesture: ".concat(e.GESTURE)),!1}}_isFacing(e){void 0===this._facingUp&&(this._facingUp=!1),void 0===this._facingDown&&(this._facingDown=!1);let t=9;switch((this._facingUp||this._facingDown)&&(t-=5),this._facingUp=this._peripheral.getAccelerationZ()>t,this._facingDown=this._peripheral.getAccelerationZ()<-1*t,e){case E:return this._facingUp;case A:return this._facingDown;default:return!1}}whenTilted(e){return this._isTilted(e.TILT)}isTilted(e){return this._isTilted(e.TILT)}getTilt(e){return this._getTiltAngle(e.TILT)}_isTilted(e){return e===N?this._getTiltAngle(C)>15||this._getTiltAngle(I)>15||this._getTiltAngle(O)>15||this._getTiltAngle(M)>15:this._getTiltAngle(e)>15}_getTiltAngle(e){if(!this._peripheral.isConnected())return 0;switch(e){case C:return Math.round(this._peripheral.getTiltFrontBack(!0));case I:return Math.round(this._peripheral.getTiltFrontBack(!1));case O:return Math.round(this._peripheral.getTiltLeftRight(!0));case M:return Math.round(this._peripheral.getTiltLeftRight(!1));default:s.warn("Unknown direction in getTilt: ".concat(e))}}getSpinSpeed(e){switch(e.DIRECTION){case R:return Math.round(this._peripheral.getSpinSpeedX());case D:return Math.round(this._peripheral.getSpinSpeedY());case P:return Math.round(this._peripheral.getSpinSpeedZ());default:s.warn("Unknown direction in getSpinSpeed: ".concat(e.DIRECTION))}}getAcceleration(e){switch(e.DIRECTION){case R:return Math.round(this._peripheral.getAccelerationX());case D:return Math.round(this._peripheral.getAccelerationY());case P:return Math.round(this._peripheral.getAccelerationZ());default:s.warn("Unknown direction in getAcceleration: ".concat(e.DIRECTION))}}magnitude(e,t,n){return Math.sqrt(e*e+t*t+n*n)}accelMagnitude(){return this.magnitude(this._peripheral.getAccelerationX(),this._peripheral.getAccelerationY(),this._peripheral.getAccelerationZ())}gestureMagnitude(){return this.accelMagnitude()-9.8}spinMagnitude(){return this.magnitude(this._peripheral.getSpinSpeedX(),this._peripheral.getSpinSpeedY(),this._peripheral.getSpinSpeedZ())}isFreeFalling(){if(!this._peripheral.isConnected())return!1;return this.accelMagnitude()<.5+.3*this.spinMagnitude()}}e.exports=L},function(e,t,n){e.exports=function(){"use strict";function t(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function r(e){return function(){var n=this,r=arguments;return new Promise((function(i,s){var o=e.apply(n,r);function a(e){t(o,i,s,a,l,"next",e)}function l(e){t(o,i,s,a,l,"throw",e)}a(void 0)}))}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}!function(t){var n,r=Object.prototype,i=r.hasOwnProperty,s="function"==typeof Symbol?Symbol:{},o=s.iterator||"@@iterator",a=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag",c="object"==typeof e,u=t.regeneratorRuntime;if(u)c&&(e.exports=u);else{(u=t.regeneratorRuntime=c?e.exports:{}).wrap=S;var d="suspendedStart",h="suspendedYield",p="executing",m="completed",f={},g={};g[o]=function(){return this};var y=Object.getPrototypeOf,b=y&&y(y(N([])));b&&b!==r&&i.call(b,o)&&(g=b);var v=x.prototype=k.prototype=Object.create(g);T.prototype=v.constructor=x,x.constructor=T,x[l]=T.displayName="GeneratorFunction",u.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===T||"GeneratorFunction"===(t.displayName||t.name))},u.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,l in e||(e[l]="GeneratorFunction")),e.prototype=Object.create(v),e},u.awrap=function(e){return{__await:e}},E(A.prototype),A.prototype[a]=function(){return this},u.AsyncIterator=A,u.async=function(e,t,n,r){var i=new A(S(e,t,n,r));return u.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},E(v),v[l]="Generator",v[o]=function(){return this},v.toString=function(){return"[object Generator]"},u.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},u.values=N,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,i){return a.type="throw",a.arg=e,t.next=r,i&&(t.method="next",t.arg=n),!!i}for(var s=this.tryEntries.length-1;s>=0;--s){var o=this.tryEntries[s],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var l=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(l&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var s=r;break}}s&&("break"===e||"continue"===e)&&s.tryLoc<=t&&t<=s.finallyLoc&&(s=null);var o=s?s.completion:{};return o.type=e,o.arg=t,s?(this.method="next",this.next=s.finallyLoc,f):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;O(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:N(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),f}}}function S(e,t,n,r){var i=t&&t.prototype instanceof k?t:k,s=Object.create(i.prototype),o=new M(r||[]);return s._invoke=function(e,t,n){var r=d;return function(i,s){if(r===p)throw new Error("Generator is already running");if(r===m){if("throw"===i)throw s;return R()}for(n.method=i,n.arg=s;;){var o=n.delegate;if(o){var a=C(o,n);if(a){if(a===f)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var l=w(e,t,n);if("normal"===l.type){if(r=n.done?m:h,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=m,n.method="throw",n.arg=l.arg)}}}(e,n,o),s}function w(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function k(){}function T(){}function x(){}function E(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function A(e){var t;this._invoke=function(n,r){function s(){return new Promise((function(t,s){!function t(n,r,s,o){var a=w(e[n],e,r);if("throw"!==a.type){var l=a.arg,c=l.value;return c&&"object"==typeof c&&i.call(c,"__await")?Promise.resolve(c.__await).then((function(e){t("next",e,s,o)}),(function(e){t("throw",e,s,o)})):Promise.resolve(c).then((function(e){l.value=e,s(l)}),(function(e){return t("throw",e,s,o)}))}o(a.arg)}(n,r,t,s)}))}return t=t?t.then(s,s):s()}}function C(e,t){var r=e.iterator[t.method];if(r===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,C(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var i=w(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,f;var s=i.arg;return s?s.done?(t[e.resultName]=s.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,f):s:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function N(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,s=function t(){for(;++r<e.length;)if(i.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=n,t.done=!0,t};return s.next=s}}return{next:R}}function R(){return{value:n,done:!0}}}(function(){return this||"object"==typeof self&&self}()||Function("return this")());var d=new Uint8Array([88,0,0,0]),h=new Uint8Array([26,165,74,6,73,7,72,8,71,9,70,10,69,11,68,12,67,13,66,14,65]),p=new Uint8Array([24,255,1,0,0,0,0,0,0,0,0,0,0,0,0]),m=new Uint8Array([25,255,0,255,255,255,255]),f=new Uint8Array([27,255,0,0,0,0,0,0,0,0,0]),g={HEADER:d,INIT:h,DISCONNECT:new Uint8Array([84]),START_MEASUREMENTS:p,STOP_MEASUREMENTS:m,SET_MEASUREMENT_PERIOD:f,GET_INFO:new Uint8Array([85]),GET_STATUS:new Uint8Array([16]),GET_SENSOR_IDS:new Uint8Array([81]),GET_SENSOR_INFO:new Uint8Array([80,0]),GET_DEFAULT_SENSORS_MASK:new Uint8Array([86])},y=6,b=7,v=10,S=8,w=9,k=11,T=12,x=13,E=14,A=32,C=function(e){return 0!==e},I=function(){function e(){i(this,e),this._listenerMap=new Map}return o(e,[{key:"on",value:function(e,t){this._listenerMap.has(e)||this._listenerMap.set(e,[]),this._listenerMap.get(e).push(t)}},{key:"off",value:function(e,t){var n=this._listenerMap.get(e);if(n&&n.length){var r=n.reduce((function(e,n,r){return"function"==typeof n&&n===t?e=r:e}),-1);if(r>-1)return n.splice(r,1),this._listenerMap.set(e,n),!0}return!1}},{key:"unbind",value:function(){this._listenerMap.clear()}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=this._listenerMap.get(e);return!(!i||!i.length||(i.forEach((function(e){e.apply(void 0,n)})),0))}}]),e}(),O=function(){},M=function(){};function N(e){return Array.from(new Uint8Array(e)).map((function(e){return e.toString(16).padStart(2,"0")})).join(" ")}var R,D=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this.type=t.type,this.mode=t.mode,this.minValue=t.minValue,this.maxValue=t.maxValue,this.uncertainty=t.uncertainty,this.minPeriod=t.minPeriod,this.maxPeriod=t.maxPeriod,this.typicalPeriod=t.typicalPeriod,this.granularity=t.granularity},P=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this.number=t.number,this.name=t.name,this.unit=t.unit,this.id=t.id,this.mutalExclusionMask=t.mutalExclusionMask,this.measurementInfo=t.measurementInfo},L=function(e){function t(e){var n;return i(this,t),(n=u(this,l(t).call(this))).number=e.number,n.name=e.name,n.unit=e.unit,n.specs=e,n.enabled=!1,n.values=[],n.value=null,n}return a(t,I),o(t,[{key:"clear",value:function(){this.value=null,this.values=[]}},{key:"setValue",value:function(e,t){this.value=e,t&&this.values.push(this.value),this.emit("value-changed",this)}},{key:"setEnabled",value:function(e){this.enabled!==e&&(this.enabled=e,this.emit("state-changed",this))}}]),t}(),B=function(e){function t(e){var r;if(i(this,t),r=u(this,l(t).call(this)),"undefined"==typeof TextDecoder){var s=n(21);R=s.TextDecoder}else R=TextDecoder;return r.device=e,r.sensors=[],r.opened=!1,r.rollingCounter=0,r.collecting=!1,r.measurementPeriod=10,r.response=null,r.remainingResponseLength=0,r.defaultSensorsMask=0,r.keepValues=!0,r.minMeasurementPeriod=10,r.serialNumber="",r.orderCode="",r.name="",r}return a(t,I),o(t,[{key:"getBatteryLevel",value:function(){var e=r(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getStatus();case 2:return t=e.sent,e.abrupt("return",t.battery);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getChargingState",value:function(){var e=r(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getStatus();case 2:return t=e.sent,e.abrupt("return",t.chargingStatus);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"open",value:function(){var e=r(regeneratorRuntime.mark((function e(){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]&&n[0],e.prev=1,e.next=4,this._connect();case 4:return e.next=6,this._init();case 6:return e.next=8,this._getStatus();case 8:return e.next=10,this._getDeviceInfo();case 10:return e.next=12,this._getDefaultSensorsMask();case 12:return e.next=14,this._getAvailableSensors();case 14:this._onOpened(),t&&this.start(),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(1),console.error(e.t0);case 21:case"end":return e.stop()}}),e,this,[[1,18]])})));return function(){return e.apply(this,arguments)}}()},{key:"close",value:function(){var e=r(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._stopMeasurements();case 2:return e.next=4,this._sendCommand(g.DISCONNECT);case 4:return e.abrupt("return",this._disconnect());case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"enableDefaultSensors",value:function(){for(var e=1,t=0;t<32;++t){if((this.defaultSensorsMask&e)===e){var n=this.getSensor(t);n&&n.setEnabled(!0)}e<<=1}}},{key:"start",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.sensors.filter((function(e){return e.enabled}));0===t.length&&(this.enableDefaultSensors(),t=this.sensors.filter((function(e){return e.enabled}))),t.forEach((function(e){return e.clear()})),e&&(this.measurementPeriod=e),this._startMeasurements()}},{key:"stop",value:function(){this._stopMeasurements()}},{key:"getSensor",value:function(e){return this.sensors.find((function(t){return t.number===e}))}},{key:"_connect",value:function(){var e=r(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.device.setup({onClosed:function(){return t._onClosed()},onResponse:function(e){return t._handleResponse(e)}}));case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_disconnect",value:function(){var e=r(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.device.close());case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_init",value:function(){return this.collecting=!1,this.rollingCounter=255,this.writeQueue=[],this._sendCommand(g.INIT)}},{key:"_handleResponse",value:function(e){if(O("command notified: ".concat(N(e.buffer))),this.remainingResponseLegnth>0){if(this.remainingResponseLegnth-=e.buffer.byteLength,this.response=new DataView((t=this.response.buffer,n=e.buffer.slice(0),(r=new Uint8Array(t.byteLength+n.byteLength)).set(new Uint8Array(t),0),r.set(new Uint8Array(n),t.byteLength),r.buffer)),this.remainingResponseLegnth>0)return}else this.response=e;var t,n,r,i=this.response.getUint8(1);if(i>this.response.buffer.byteLength)this.remainingResponseLegnth=i-this.response.buffer.byteLength;else if(O("handle command: ".concat(N(this.response.buffer))),this.response.getUint8(0)===A)this._processMeasurements(this.response);else{var s=this.response.getUint8(4),o=this.response.getUint8(5),a=new DataView(this.response.buffer,6);this._resolveWriteCommand(s,o,a),this.remainingResponseLegnth=0,this.response=null}}},{key:"_getSensorsWithMask",value:function(e){for(var t=[],n=1,r=0;r<32;++r){if((e&n)===n){var i=this.getSensor(r);i&&(t.push(i),O("available: [".concat(e,"] ").concat(t[t.length-1].number)))}n<<=1}return t}},{key:"_processMeasurements",value:function(e){var t=[],n=!0,r=0,i=0,s=e.getUint8(4);switch(s){case y:t=this._getSensorsWithMask(e.getUint16(5,!0)),r=e.getUint8(7,!0),i=9;break;case b:t=this._getSensorsWithMask(e.getUint32(5,!0)),r=e.getUint8(9,!0),i=11;break;case v:case S:t[0]=this.getSensor(e.getUint8(6)),r=e.getUint8(7,!0),i=8;break;case k:case w:t[0]=this.getSensor(e.getUint8(6)),r=e.getUint8(7,!0),i=8,n=!1;break;case T:case x:case E:O("Purposely Ignoring packet type: ".concat(s));break;default:O("Unknown packet type: ".concat(s))}for(var o=0;o<r;++o)for(var a=0;a<t.length;++a)n?t[a].setValue(e.getFloat32(i,!0),this.keepValues):t[a].setValue(e.getInt32(i,!0),this.keepValues),i+=4}},{key:"_resolveWriteCommand",value:function(e,t,n){var r=this.writeQueue.find((function(n){return n.command===e&&n.rollingCounter===t}));r&&(r.resolve(n),this.writeQueue=this.writeQueue.filter((function(e){return e!==r})))}},{key:"_onOpened",value:function(){O("opened"),this.opened=!0,this.emit("device-opened")}},{key:"_onClosed",value:function(){O("closed"),this.opened=!1,this.emit("device-closed")}},{key:"_decRollingCounter",value:function(){return this.rollingCounter-=1,this.rollingCounter}},{key:"_calculateChecksum",value:function(e){for(var t=e[1],n=-1*e[3],r=0;r<t;++r)n+=e[r],n&=255;return n<0||n>255?(O("Checksum failed!"),0):n}},{key:"_sendCommand",value:function(e){var t=new Uint8Array(g.HEADER.byteLength+e.byteLength);return t.set(new Uint8Array(g.HEADER),0),t.set(new Uint8Array(e),g.HEADER.byteLength),t[1]=t.length,t[2]=this._decRollingCounter(),t[3]=this._calculateChecksum(t),this._queueWriteCommand(t,0,t.length)}},{key:"_writeCommand",value:function(){var e=r(regeneratorRuntime.mark((function e(t,n,r){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r>0)){e.next=12;break}return e.prev=1,r>20?(i=t.subarray(n,n+20),r-=20,n+=20):(i=t.subarray(n,n+r),r=0),e.next=5,this.device.writeCommand(i);case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),O("Write Failure: ".concat(e.t0));case 10:e.next=0;break;case 12:case"end":return e.stop()}}),e,this,[[1,7]])})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_queueWriteCommand",value:function(e,t,n){var r=this;O("command queued: ".concat(N(e)));var i=new Promise((function(t,n){r.writeQueue.push({command:e[4],rollingCounter:e[2],resolve:t,reject:n}),setTimeout((function(){r.writeQueue=r.writeQueue.filter((function(t){return t.command===e[4]&&t.rollingCounter!==e[2]})),n(new Error("write command timed out after 5s. Command: ".concat(e[4].toString(16)," Rolling Counter: ").concat(e[2].toString(16))))}),1e4)}));return this._writeCommand(e,t,n),i}},{key:"_getStatus",value:function(){var e=r(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._sendCommand(g.GET_STATUS);case 2:return t=e.sent,n={masterFirmwareVersion:"".concat(t.getUint8(2),".").concat(t.getUint8(3)),bleFirmwareVersion:"".concat(t.getUint8(6),".").concat(t.getUint8(9)),battery:t.getUint8(10),chargingStatus:"".concat(t.getUint8(11))},e.abrupt("return",n);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_getAvailableSensors",value:function(){var e=r(regeneratorRuntime.mark((function e(){var t,n,r=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._sendCommand(g.GET_SENSOR_IDS).then((function(e){r.availableSensors=e.getUint32(0,!0),O("Get Available Sensors Returned ".concat(r.availableSensors))}));case 2:t=1,n=0;case 4:if(!(n<31)){e.next=12;break}if((this.availableSensors&t)!==t){e.next=8;break}return e.next=8,this._getSensorInfo(n);case 8:t<<=1;case 9:++n,e.next=4;break;case 12:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_getDefaultSensorsMask",value:function(){var e=this;return this._sendCommand(g.GET_DEFAULT_SENSORS_MASK).then((function(t){e.defaultSensorsMask=t.getUint32(0,!0),O("Default Sensors:"),M(e)}))}},{key:"_getDeviceInfo",value:function(){var e=this;return this._sendCommand(g.GET_INFO).then((function(t){var n=new R("utf-8");e.orderCode=n.decode(new Uint8Array(t.buffer,6,16).filter(C)),e.serialNumber=n.decode(new Uint8Array(t.buffer,22,16).filter(C)),e.name=n.decode(new Uint8Array(t.buffer,38,32).filter(C)),O("Device Info:"),M(e)}))}},{key:"_getSensorInfo",value:function(){var e=r(regeneratorRuntime.mark((function e(t){var n,r=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=new Uint8Array(g.GET_SENSOR_INFO))[1]=t,e.abrupt("return",this._sendCommand(n).then((function(e){var t=e.getUint32(2,!0);if(t>0){var n=new R("utf-8"),i=new D({type:e.getUint8(6),mode:e.getUint8(7),minValue:e.getFloat64(108,!0),maxValue:e.getFloat64(116,!0),uncertainty:e.getFloat64(100,!0),minPeriod:e.getUint32(124,!0)/1e3,maxPeriod:((e.getUint32(132,!0)<<32)+e.getUint32(128,!0))/1e3,typicalPeriod:e.getUint32(136,!0)/1e3,granularity:e.getUint32(140,!0)/1e3}),s=new P({number:e.getUint8(0),name:n.decode(new Uint8Array(e.buffer,14,60).filter(C)),unit:n.decode(new Uint8Array(e.buffer,74,32).filter(C)),mutalExclusiveMask:e.getUint32(144,!0),measurementInfo:i,sensorId:t}),o=new L(s);O("Get Sensor Info Returned"),M(o),r.sensors.push(o),o.on("state-changed",(function(){O("Sensor Restart: ".concat(o.number)),o.enabled&&(r.measurementPeriod=o.specs.measurementInfo.typicalPeriod,r.sensors.forEach((function(e){if(o.number!==e.number&&e.enabled){var t=1<<e.number;(t&o.specs.mutalExclusiveMask)===t?e.enabled=!1:e.specs.measurementInfo.typicalPeriod>r.measurementPeriod&&(r.measurementPeriod=e.specs.measurementInfo.typicalPeriod)}}))),r._restartMeasurements()}))}})));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_restartMeasurements",value:function(){var e=r(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.collecting,!this.collecting){e.next=10;break}return e.prev=2,e.next=5,this._stopMeasurements();case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(2),console.error(e.t0);case 10:if(this.collecting||!t){e.next=19;break}return e.prev=11,e.next=14,this._startMeasurements();case 14:e.next=19;break;case 16:e.prev=16,e.t1=e.catch(11),console.error(e.t1);case 19:case"end":return e.stop()}}),e,this,[[2,7],[11,16]])})));return function(){return e.apply(this,arguments)}}()},{key:"_setMeasurementPeriod",value:function(e){var t=new Uint8Array(g.SET_MEASUREMENT_PERIOD),n=1e3*this.minMeasurementPeriod;return e<n&&(e=n),O("MeasurementPeriod: ".concat(e)),t[3]=255&e,t[4]=e>>8&255,t[5]=e>>16&255,t[6]=e>>24&255,this._sendCommand(t)}},{key:"_getEnabledChannelMask",value:function(){var e=0;return this.sensors.filter((function(e){return e.enabled})).forEach((function(t){e+=1<<t.number})),e}},{key:"_startMeasurements",value:function(){var e=this;return this._setMeasurementPeriod(1e3*this.measurementPeriod).then((function(){var t=e._getEnabledChannelMask();O("ChannelMask: ".concat(t));var n=new Uint8Array(g.START_MEASUREMENTS);return n[3]=255&t,n[4]=t>>8&255,n[5]=t>>16&255,n[6]=t>>24&255,e._sendCommand(n).then((function(t){0===t.getUint8(0)&&(e.collecting=!0,e.emit("measurements-started"))}))}))}},{key:"_stopMeasurements",value:function(){var e=this;return this._sendCommand(g.STOP_MEASUREMENTS).then((function(t){0===t.getUint8(0)&&(e.collecting=!1,e.emit("measurements-stopped"))}))}}]),t}(),z=function(){function e(t){i(this,e),this.webBluetoothNativeDevice=t,this.deviceCommand=null,this.deviceResponse=null}return o(e,[{key:"writeCommand",value:function(){var e=r(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.deviceCommand.writeValue(t));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setup",value:function(){var e=r(regeneratorRuntime.mark((function e(t){var n,r,i,s,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.onClosed,r=t.onResponse,this.webBluetoothNativeDevice.addEventListener("gattserverdisconnected",n),e.prev=2,e.next=5,this.webBluetoothNativeDevice.gatt.connect();case 5:return i=e.sent,e.next=8,i.getPrimaryService("d91714ef-28b9-4f91-ba16-f0d9a604f112");case 8:return s=e.sent,e.next=11,s.getCharacteristics();case 11:e.sent.forEach((function(e){switch(e.uuid){case"f4bf14a6-c7d5-4b6d-8aa8-df1a7c83adcb":o.deviceCommand=e;break;case"b41e6675-a329-40e0-aa01-44d2f444babe":o.deviceResponse=e,o.deviceResponse.addEventListener("characteristicvaluechanged",(function(e){var t=e.target.value;r(t)})),o.deviceResponse.startNotifications();break;default:O("No case found for ".concat(e.uuid))}})),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(2),console.error(e.t0);case 18:if(this.deviceCommand&&this.deviceResponse){e.next=20;break}throw new Error("Expected command and response characteristics not found.");case 20:case"end":return e.stop()}}),e,this,[[2,15]])})));return function(t){return e.apply(this,arguments)}}()},{key:"close",value:function(){var e=r(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.webBluetoothNativeDevice.gatt.disconnect());case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"godirectAdapter",get:function(){return!0}}]),e}(),U={createDevice:function(){var e=r(regeneratorRuntime.mark((function e(t){var n,r,i,s,o,a,l,c=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=c.length>1&&void 0!==c[1]?c[1]:{},r=n.open,i=void 0===r||r,s=n.startMeasurements,o=void 0===s||s,(a=t).godirectAdapter||(a=new z(t)),l=new B(a),!i){e.next=14;break}return e.prev=5,e.next=8,l.open(o);case 8:e.next=14;break;case 10:throw e.prev=10,e.t0=e.catch(5),console.error(e.t0),e.t0;case 14:return e.abrupt("return",l);case 15:case"end":return e.stop()}}),e,this,[[5,10]])})));return function(t){return e.apply(this,arguments)}}(),selectDevice:function(){var e=r(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(navigator.bluetooth){e.next=2;break}return e.abrupt("return",Promise.reject(new Error("No Web Bluetooth support.")));case 2:return e.next=4,navigator.bluetooth.requestDevice({filters:[{namePrefix:"GDX"}],optionalServices:["d91714ef-28b9-4f91-ba16-f0d9a604f112"]});case 4:return t=e.sent,e.abrupt("return",U.createDevice(t));case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()};return U}()},function(e,t,n){const r=n(15);e.exports=class{constructor(e,t){let{service:n,commandChar:r,responseChar:i}=t;this.socket=e,this._service=n,this._commandChar=r,this._responseChar=i,this._onResponse=this._onResponse.bind(this),this._deviceOnResponse=null}get godirectAdapter(){return!0}writeCommand(e){const t=r.uint8ArrayToBase64(e);return this.socket.write(this._service,this._commandChar,t,"base64")}setup(e){let{onResponse:t}=e;return this._deviceOnResponse=t,this.socket.startNotifications(this._service,this._responseChar,this._onResponse)}_onResponse(e){const t=r.base64ToUint8Array(e),n=new DataView(t.buffer);return this._deviceOnResponse(n)}}},function(e,t,n){const r=n(6),i=n(3),s=n(4),o=n(2),a="data:image/svg+xml;base64,".concat(btoa('<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32"><path fill="none" stroke="#fff" stroke-width="11.51815371" d="M24.457 7.707a18.41 18.41 0 0 0-.365 2.31c-.02.224 0 .507.06.852.061.405.092.689.092.851 0 .527-.345.79-1.034.79-.446 0-.74-.131-.881-.395-.02-.446-.01-1.054.03-1.824.04-.912.061-1.52.061-1.824-.02 0-.05-.02-.091-.06a98.522 98.522 0 0 0-5.32.364c-.04.264-.04.588 0 .973l.122 1.094c-.081.629-.122 1.56-.122 2.797.061.527.091 2.786.091 6.779v2.219c0 .344.051.587.152.73h1.885c.77-.102 1.155.222 1.155.972 0 .446-.213.76-.638.942-.264.102-.73.122-1.399.061-.405-.04-.881-.05-1.428-.03-.75.101-1.662.182-2.736.243-1.094.06-1.763-.091-2.006-.456-.162-.243-.162-.496 0-.76.283-.446 1.023-.669 2.219-.669.628 0 .942-.172.942-.516 0-.183-.01-.355-.03-.517 0-.507.01-.953.03-1.338.06-1.094.06-2.634 0-4.62-.081-2.878-.05-5.462.091-7.752l-.09-.09c-.63.04-1.805.03-3.527-.031-.081 0-.7.04-1.854.121.283 1.946.446 3.334.486 4.165l-.06.82c-.021.305-.274.457-.76.457-.386 0-.71-.73-.973-2.19-.122-.87-.244-1.752-.365-2.644 0-.142-.071-.385-.213-.73-.122-.364-.39-.97-.39-1.152 0-.641.593-.489 1.363-.61.06 0 .162.01.304.03.142.02.243.03.304.03H17.1a57.098 57.098 0 0 0 5.411-.486c.122-.06.304-.121.547-.182.426-.04.79.06 1.095.304.304.223.405.547.304.972z"/><path fill="none" stroke="#ff4c4c" stroke-width="5.75909785" d="M24.333 7.71q-.244 1.065-.365 2.311-.03.335.06.851.092.608.092.851 0 .79-1.034.79-.669 0-.881-.394-.03-.67.03-1.824.06-1.368.06-1.824-.03 0-.09-.061-2.827.122-5.32.365-.06.395 0 .973l.122 1.094q-.122.942-.122 2.796.091.79.091 6.78v2.218q0 .517.152.73h1.885q1.155-.152 1.155.973 0 .668-.638.942-.396.152-1.399.06-.608-.06-1.428-.03-1.125.152-2.736.243-1.642.092-2.006-.456-.244-.364 0-.76.425-.668 2.219-.668.942 0 .942-.517 0-.274-.03-.517 0-.76.03-1.337.091-1.642 0-4.62-.122-4.317.091-7.752l-.091-.091q-.942.06-3.526-.03-.122 0-1.854.12.425 2.919.486 4.165l-.06.821q-.031.456-.76.456-.578 0-.974-2.189-.182-1.307-.364-2.644 0-.213-.213-.73-.182-.547-.182-.82 0-.76 1.155-.943.09 0 .304.03.212.03.304.03h7.538q2.797-.12 5.411-.485.182-.092.547-.183.639-.06 1.095.304.456.335.304.973z"/><path fill="#fff" d="M24.31 7.714q-.243 1.064-.365 2.31-.03.335.061.852.091.608.091.85 0 .791-1.033.791-.67 0-.882-.395-.03-.669.03-1.824.061-1.368.061-1.824-.03 0-.09-.06-2.828.121-5.32.364-.061.396 0 .973l.121 1.094q-.121.943-.121 2.797.09.79.09 6.779v2.219q0 .517.153.73h1.884q1.156-.153 1.156.972 0 .669-.639.942-.395.152-1.398.061-.608-.06-1.429-.03-1.125.152-2.736.243-1.641.091-2.006-.456-.243-.365 0-.76.426-.669 2.22-.669.941 0 .941-.516 0-.274-.03-.517 0-.76.03-1.338.092-1.641 0-4.62-.121-4.317.092-7.752l-.092-.09q-.942.06-3.526-.031-.121 0-1.854.121.426 2.919.486 4.165l-.06.82q-.03.457-.76.457-.578 0-.973-2.19-.182-1.306-.365-2.644 0-.212-.213-.73-.182-.546-.182-.82 0-.76 1.155-.942.091 0 .304.03t.304.03h7.539q2.796-.121 5.41-.486.183-.091.548-.182.638-.061 1.094.304.456.334.304.972z"/></svg>'));e.exports=class{constructor(e){this.runtime=e}getInfo(){return{id:"tw",name:"TurboWarp",color1:"#ff4c4c",color2:"#e64444",color3:"#c73a3a",docsURI:"https://docs.turbowarp.org/blocks",menuIconURI:a,blockIconURI:a,blocks:[{opcode:"getLastKeyPressed",text:r({id:"tw.blocks.lastKeyPressed",default:"last key pressed",description:"Block that returns the last key that was pressed"}),blockType:i.REPORTER},{opcode:"getButtonIsDown",text:r({id:"tw.blocks.buttonIsDown",default:"[MOUSE_BUTTON] mouse button down?",description:"Block that returns whether a specific mouse button is down"}),blockType:i.BOOLEAN,arguments:{MOUSE_BUTTON:{type:s.NUMBER,menu:"mouseButton",defaultValue:"0"}}}],menus:{mouseButton:{items:[{text:r({id:"tw.blocks.mouseButton.primary",default:"(0) primary",description:"Dropdown item to select primary (usually left) mouse button"}),value:"0"},{text:r({id:"tw.blocks.mouseButton.middle",default:"(1) middle",description:"Dropdown item to select middle mouse button"}),value:"1"},{text:r({id:"tw.blocks.mouseButton.secondary",default:"(2) secondary",description:"Dropdown item to select secondary (usually right) mouse button"}),value:"2"}],acceptReporters:!0}}}}getLastKeyPressed(e,t){return t.ioQuery("keyboard","getLastKeyPressed")}getButtonIsDown(e,t){const n=o.toNumber(e.MOUSE_BUTTON);return t.ioQuery("mouse","getButtonIsDown",[n])}}},function(e,t,n){(function(t){const r=n(246),i=n(247),s=n(82),o=n(248),a=n(249),l=e=>{try{return new URL(e,location.href)}catch(e){return null}},c=e=>new Promise((n=>{const s=[],c=Object.assign({},t.Scratch||{},r);c.extensions={unsandboxed:!0,register:e=>{s.push(e),n(s)}},c.vm=e,c.renderer=e.runtime.renderer,c.canFetch=async t=>{const n=l(t);return!!n&&("blob:"===n.protocol||"data:"===n.protocol||e.securityManager.canFetch(n.href))},c.canOpenWindow=async t=>{const n=l(t);return!!n&&("javascript:"!==n.protocol&&e.securityManager.canOpenWindow(n.href))},c.canRedirect=async t=>{const n=l(t);return!!n&&("javascript:"!==n.protocol&&e.securityManager.canRedirect(n.href))},c.canRecordAudio=async()=>e.securityManager.canRecordAudio(),c.canRecordVideo=async()=>e.securityManager.canRecordVideo(),c.canReadClipboard=async()=>e.securityManager.canReadClipboard(),c.canNotify=async()=>e.securityManager.canNotify(),c.canGeolocate=async()=>e.securityManager.canGeolocate(),c.canEmbed=async t=>{const n=l(t);return!!n&&e.securityManager.canEmbed(n.href)},c.fetch=async(e,t)=>{const n=e instanceof Request?e.url:e,r=a(e);if(r)return r;if(!await c.canFetch(n))throw new Error("Permission to fetch ".concat(n," rejected."));return fetch(e,t)},c.openWindow=async(e,t)=>{if(!await c.canOpenWindow(e))throw new Error("Permission to open tab ".concat(e," rejected."));const n="noreferrer";return t=t?"".concat(n,",").concat(t):n,window.open(e,"_blank",t)},c.redirect=async e=>{if(!await c.canRedirect(e))throw new Error("Permission to redirect to ".concat(e," rejected."));location.href=e},c.translate=o(e),t.Scratch=c,t.ScratchExtensions=i(c),e.emit("CREATE_UNSANDBOXED_EXTENSION_API",c)})),u=new s(((e,n)=>new Promise(((t,r)=>{c(n).then(t);const i=document.createElement("script");i.onerror=()=>{r(new Error("Error in unsandboxed script ".concat(e,". Check the console for more information.")))},i.src=e,document.body.appendChild(i)})).then((e=>(t.Scratch.extensions.register=()=>{throw new Error("Too late to register new extensions.")},e)))),1);e.exports={setupUnsandboxedExtensionAPI:c,load:(e,t)=>u.do(e,t)}}).call(this,n(9))},function(e,t,n){const r={ArgumentType:n(4),BlockType:n(3),TargetType:n(42),Cast:n(2)};e.exports=r},function(e,t,n){const r=n(4),i=n(3),{argumentIndexToId:s,generateExtensionId:o}=n(81),a=e=>{if(""===e||" "===e||"w"===e)return{type:i.COMMAND,async:"w"===e};if("r"===e||"R"===e)return{type:i.REPORTER,async:"R"===e};if("b"===e)return{type:i.BOOLEAN,async:!1};if("h"===e)return{type:i.HAT,async:!1};throw new Error("Unknown ScratchX block type: ".concat(e))},l=(e,t)=>{const n={},i="string"==typeof(s=t)||"number"==typeof s||"boolean"==typeof s;var s;if(i&&"b"!==e&&(n.defaultValue=t),"s"===e)n.type=r.STRING,i||(n.defaultValue="");else if("n"===e)n.type=r.NUMBER,i||(n.defaultValue=0);else if("m"===e[0]){n.type=r.STRING;const t=e.split(/\.|:/)[1];n.menu=t}else{if("b"!==e)throw new Error("Unknown ScratchX argument type: ".concat(e));n.type=r.BOOLEAN}return n},c=(e,t,n)=>r=>{const i=[];for(let e=0;e<t;e++)i.push(r[s(e)]);return n?new Promise((t=>{e(...i,t)})):e(...i)},u=new Map;e.exports=e=>({register:(t,n,r)=>{const i=((e,t,n)=>{const r={id:o(e),name:t.displayName||e,blocks:[],color1:"#4a4a5e",color2:"#31323f",color3:"#191a21"},i={getInfo:()=>r,_getStatus:n._getStatus};t.url&&(r.docsURI=t.url);for(const e of t.blocks){if(1===e.length){r.blocks.push("---");continue}const t=e[0],o=e[1],u=e[2],d=e.slice(3);let h="";const p=[],m=o.split(/%([\w.:]+)/g);for(let e=0;e<m.length;e++){const t=m[e];if(e%2==1){l(t);const n=Math.floor(e/2).toString(),r=d[n],i=s(n);p[i]=l(t,r),h+="[".concat(i,"]")}else h+=t}const f=a(t),g={opcode:u,blockType:f.type,text:h,arguments:p};r.blocks.push(g);const y=n[u],b=p.length;i[u]=c(y,b,f.async)}const u=t.menus;if(u){const e={};for(const t of Object.keys(u)||{}){const n={items:u[t]};e[t]=n}r.menus=e}return i})(t,n,r);u.set(t,i),e.extensions.register(i)},getStatus:e=>{const t=u.get(e);return t?t._getStatus():{status:0,msg:"does not exist"}}})},function(e,t,n){const r=n(6);e.exports=e=>{const t=r.namespace(),n=(e,n)=>{if(e&&"object"==typeof e);else{if("string"!=typeof e)throw new Error("unsupported data type in translate()");e={default:e}}return t(e,n)},i=e=>"_".concat(e),s=()=>e?e.getLocale():"undefined"!=typeof navigator?navigator.language:"en";let o={};return n.setup=e=>{e&&(o=e),t.setup({locale:s(),missingTranslation:"ignore",generateId:i,translations:o})},Object.defineProperty(n,"language",{configurable:!0,enumerable:!0,get:()=>s()}),n.setup({}),e&&e.on("LOCALE_CHANGED",(()=>{n.setup(null)})),n}},function(e,t,n){const r=n(15);e.exports=e=>{try{const t=e.match(/^data:([/-\w\d]*);base64,/i);if(t){const n=t[1].toLowerCase(),i=e.substring(t[0].length),s=r.base64ToUint8Array(i);return new Response(s,{headers:{"content-type":n,"content-length":s.byteLength}})}}catch(e){}return null}},function(e,t,n){e.exports=function(){return n(251)('!function(n){var e={};function t(r){if(e[r])return e[r].exports;var a=e[r]={i:r,l:!1,exports:{}};return n[r].call(a.exports,a,a.exports,t),a.l=!0,a.exports}t.m=n,t.c=e,t.d=function(n,e,r){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:r})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var a in n)t.d(r,a,function(e){return n[e]}.bind(null,a));return r},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=7)}([function(n,e,t){const r=t(17);r.enable(),n.exports=r("vm")},function(n,e){n.exports={ANGLE:"angle",BOOLEAN:"Boolean",COLOR:"color",NUMBER:"number",STRING:"string",MATRIX:"matrix",NOTE:"note",IMAGE:"image",COSTUME:"costume",SOUND:"sound"}},function(n,e){n.exports={BOOLEAN:"Boolean",BUTTON:"button",LABEL:"label",COMMAND:"command",CONDITIONAL:"conditional",EVENT:"event",HAT:"hat",LOOP:"loop",REPORTER:"reporter",XML:"xml"}},function(n,e){n.exports={isWorker:!0,centralDispatchService:self}},function(n,e){var t="long",r="short",a="narrow",i="numeric",o="2-digit";n.exports={number:{decimal:{style:"decimal"},integer:{style:"decimal",maximumFractionDigits:0},currency:{style:"currency",currency:"USD"},percent:{style:"percent"},default:{style:"decimal"}},date:{short:{month:i,day:i,year:o},medium:{month:r,day:i,year:i},long:{month:t,day:i,year:i},full:{month:t,day:i,year:i,weekday:t},default:{month:r,day:i,year:i}},time:{short:{hour:i,minute:i},medium:{hour:i,minute:i,second:i},long:{hour:i,minute:i,second:i,timeZoneName:r},full:{hour:i,minute:i,second:i,timeZoneName:r},default:{hour:i,minute:i,second:i}},duration:{default:{hours:{minimumIntegerDigits:1,maximumFractionDigits:0},minutes:{minimumIntegerDigits:2,maximumFractionDigits:0},seconds:{minimumIntegerDigits:2,maximumFractionDigits:3}}},parseNumberPattern:function(n){if(n){var e={},t=n.match(/\\b[A-Z]{3}\\b/i),r=n.replace(/[^¤]/g,"").length;if(!r&&t&&(r=1),r?(e.style="currency",e.currencyDisplay=1===r?"symbol":2===r?"code":"name",e.currency=t?t[0].toUpperCase():"USD"):n.indexOf("%")>=0&&(e.style="percent"),!/[@#0]/.test(n))return e.style?e:void 0;if(e.useGrouping=n.indexOf(",")>=0,/E\\+?[@#0]+/i.test(n)||n.indexOf("@")>=0){var a=n.replace(/E\\+?[@#0]+|[^@#0]/gi,"");e.minimumSignificantDigits=Math.min(Math.max(a.replace(/[^@0]/g,"").length,1),21),e.maximumSignificantDigits=Math.min(Math.max(a.length,1),21)}else{for(var i=n.replace(/[^#0.]/g,"").split("."),o=i[0],s=o.length-1;"0"===o[s];)--s;e.minimumIntegerDigits=Math.min(Math.max(o.length-1-s,1),21);var c=i[1]||"";for(s=0;"0"===c[s];)++s;for(e.minimumFractionDigits=Math.min(Math.max(s,0),20);"#"===c[s];)++s;e.maximumFractionDigits=Math.min(Math.max(s,0),20)}return e}},parseDatePattern:function(n){if(n){for(var e={},s=0;s<n.length;){for(var c=n[s],l=1;n[++s]===c;)++l;switch(c){case"G":e.era=5===l?a:4===l?t:r;break;case"y":case"Y":e.year=2===l?o:i;break;case"M":case"L":l=Math.min(Math.max(l-1,0),4),e.month=[i,o,r,t,a][l];break;case"E":case"e":case"c":e.weekday=5===l?a:4===l?t:r;break;case"d":case"D":e.day=2===l?o:i;break;case"h":case"K":e.hour12=!0,e.hour=2===l?o:i;break;case"H":case"k":e.hour12=!1,e.hour=2===l?o:i;break;case"m":e.minute=2===l?o:i;break;case"s":case"S":e.second=2===l?o:i;break;case"z":case"Z":case"v":case"V":e.timeZoneName=1===l?r:t}}return Object.keys(e).length?e:void 0}}}},function(n,e){n.exports=function(n,e){if("string"==typeof n&&e[n])return n;for(var t=[].concat(n||[]),r=0,a=t.length;r<a;++r)for(var i=t[r].split("-");i.length;){var o=i.join("-");if(e[o])return o;i.pop()}}},function(n,e,t){"use strict";var r="zero",a="one",i="two",o="few",s="many",c="other",l=[function(n){return 1===+n?a:c},function(n){var e=+n;return 0<=e&&e<=1?a:c},function(n){return 0===Math.floor(Math.abs(+n))||1===+n?a:c},function(n){var e=+n;return 0===e?r:1===e?a:2===e?i:3<=e%100&&e%100<=10?o:11<=e%100&&e%100<=99?s:c},function(n){var e=Math.floor(Math.abs(+n)),t=(n+".").split(".")[1].length;return 1===e&&0===t?a:c},function(n){var e=+n;return e%10==1&&e%100!=11?a:2<=e%10&&e%10<=4&&(e%100<12||14<e%100)?o:e%10==0||5<=e%10&&e%10<=9||11<=e%100&&e%100<=14?s:c},function(n){var e=+n;return e%10==1&&e%100!=11&&e%100!=71&&e%100!=91?a:e%10==2&&e%100!=12&&e%100!=72&&e%100!=92?i:(3<=e%10&&e%10<=4||e%10==9)&&(e%100<10||19<e%100)&&(e%100<70||79<e%100)&&(e%100<90||99<e%100)?o:0!==e&&e%1e6==0?s:c},function(n){var e=Math.floor(Math.abs(+n)),t=(n+".").split(".")[1].length,r=+(n+".").split(".")[1];return 0===t&&e%10==1&&e%100!=11||r%10==1&&r%100!=11?a:0===t&&2<=e%10&&e%10<=4&&(e%100<12||14<e%100)||2<=r%10&&r%10<=4&&(r%100<12||14<r%100)?o:c},function(n){var e=Math.floor(Math.abs(+n)),t=(n+".").split(".")[1].length;return 1===e&&0===t?a:2<=e&&e<=4&&0===t?o:0!==t?s:c},function(n){var e=+n;return 0===e?r:1===e?a:2===e?i:3===e?o:6===e?s:c},function(n){var e=Math.floor(Math.abs(+n)),t=+(""+n).replace(/^[^.]*.?|0+$/g,"");return 1===+n||0!==t&&(0===e||1===e)?a:c},function(n){var e=Math.floor(Math.abs(+n)),t=(n+".").split(".")[1].length,r=+(n+".").split(".")[1];return 0===t&&e%100==1||r%100==1?a:0===t&&e%100==2||r%100==2?i:0===t&&3<=e%100&&e%100<=4||3<=r%100&&r%100<=4?o:c},function(n){var e=Math.floor(Math.abs(+n));return 0===e||1===e?a:c},function(n){var e=Math.floor(Math.abs(+n)),t=(n+".").split(".")[1].length,r=+(n+".").split(".")[1];return 0===t&&(1===e||2===e||3===e)||0===t&&e%10!=4&&e%10!=6&&e%10!=9||0!==t&&r%10!=4&&r%10!=6&&r%10!=9?a:c},function(n){var e=+n;return 1===e?a:2===e?i:3<=e&&e<=6?o:7<=e&&e<=10?s:c},function(n){var e=+n;return 1===e||11===e?a:2===e||12===e?i:3<=e&&e<=10||13<=e&&e<=19?o:c},function(n){var e=Math.floor(Math.abs(+n)),t=(n+".").split(".")[1].length;return 0===t&&e%10==1?a:0===t&&e%10==2?i:0!==t||e%100!=0&&e%100!=20&&e%100!=40&&e%100!=60&&e%100!=80?0!==t?s:c:o},function(n){var e=Math.floor(Math.abs(+n)),t=(n+".").split(".")[1].length,r=+n;return 1===e&&0===t?a:2===e&&0===t?i:0===t&&(r<0||10<r)&&r%10==0?s:c},function(n){var e=Math.floor(Math.abs(+n)),t=+(""+n).replace(/^[^.]*.?|0+$/g,"");return 0===t&&e%10==1&&e%100!=11||0!==t?a:c},function(n){var e=+n;return 1===e?a:2===e?i:c},function(n){var e=+n;return 0===e?r:1===e?a:c},function(n){var e=Math.floor(Math.abs(+n)),t=+n;return 0===t?r:0!==e&&1!==e||0===t?c:a},function(n){var e=+(n+".").split(".")[1],t=+n;return t%10==1&&(t%100<11||19<t%100)?a:2<=t%10&&t%10<=9&&(t%100<11||19<t%100)?o:0!==e?s:c},function(n){var e=(n+".").split(".")[1].length,t=+(n+".").split(".")[1],i=+n;return i%10==0||11<=i%100&&i%100<=19||2===e&&11<=t%100&&t%100<=19?r:i%10==1&&i%100!=11||2===e&&t%10==1&&t%100!=11||2!==e&&t%10==1?a:c},function(n){var e=Math.floor(Math.abs(+n)),t=(n+".").split(".")[1].length,r=+(n+".").split(".")[1];return 0===t&&e%10==1&&e%100!=11||r%10==1&&r%100!=11?a:c},function(n){var e=Math.floor(Math.abs(+n)),t=(n+".").split(".")[1].length,r=+n;return 1===e&&0===t?a:0!==t||0===r||1!==r&&1<=r%100&&r%100<=19?o:c},function(n){var e=+n;return 1===e?a:0===e||2<=e%100&&e%100<=10?o:11<=e%100&&e%100<=19?s:c},function(n){var e=Math.floor(Math.abs(+n)),t=(n+".").split(".")[1].length;return 1===e&&0===t?a:0===t&&2<=e%10&&e%10<=4&&(e%100<12||14<e%100)?o:0===t&&1!==e&&0<=e%10&&e%10<=1||0===t&&5<=e%10&&e%10<=9||0===t&&12<=e%100&&e%100<=14?s:c},function(n){var e=Math.floor(Math.abs(+n));return 0<=e&&e<=1?a:c},function(n){var e=Math.floor(Math.abs(+n)),t=(n+".").split(".")[1].length;return 0===t&&e%10==1&&e%100!=11?a:0===t&&2<=e%10&&e%10<=4&&(e%100<12||14<e%100)?o:0===t&&e%10==0||0===t&&5<=e%10&&e%10<=9||0===t&&11<=e%100&&e%100<=14?s:c},function(n){var e=+n;return 0===Math.floor(Math.abs(+n))||1===e?a:2<=e&&e<=10?o:c},function(n){var e=Math.floor(Math.abs(+n)),t=+(n+".").split(".")[1],r=+n;return 0===r||1===r||0===e&&1===t?a:c},function(n){var e=Math.floor(Math.abs(+n)),t=(n+".").split(".")[1].length;return 0===t&&e%100==1?a:0===t&&e%100==2?i:0===t&&3<=e%100&&e%100<=4||0!==t?o:c},function(n){var e=+n;return 0<=e&&e<=1||11<=e&&e<=99?a:c},function(n){var e=+n;return 1===e||5===e||7===e||8===e||9===e||10===e?a:2===e||3===e?i:4===e?o:6===e?s:c},function(n){var e=Math.floor(Math.abs(+n));return e%10==1||e%10==2||e%10==5||e%10==7||e%10==8||e%100==20||e%100==50||e%100==70||e%100==80?a:e%10==3||e%10==4||e%1e3==100||e%1e3==200||e%1e3==300||e%1e3==400||e%1e3==500||e%1e3==600||e%1e3==700||e%1e3==800||e%1e3==900?o:0===e||e%10==6||e%100==40||e%100==60||e%100==90?s:c},function(n){var e=+n;return e%10!=2&&e%10!=3||e%100==12||e%100==13?c:o},function(n){var e=+n;return 1===e||3===e?a:2===e?i:4===e?o:c},function(n){var e=+n;return 0===e||7===e||8===e||9===e?r:1===e?a:2===e?i:3===e||4===e?o:5===e||6===e?s:c},function(n){var e=+n;return e%10==1&&e%100!=11?a:e%10==2&&e%100!=12?i:e%10==3&&e%100!=13?o:c},function(n){var e=+n;return 1===e||11===e?a:2===e||12===e?i:3===e||13===e?o:c},function(n){var e=+n;return 1===e?a:2===e||3===e?i:4===e?o:6===e?s:c},function(n){var e=+n;return 1===e||5===e?a:c},function(n){var e=+n;return 11===e||8===e||80===e||800===e?s:c},function(n){var e=Math.floor(Math.abs(+n));return 1===e?a:0===e||2<=e%100&&e%100<=20||e%100==40||e%100==60||e%100==80?s:c},function(n){var e=+n;return e%10==6||e%10==9||e%10==0&&0!==e?s:c},function(n){var e=Math.floor(Math.abs(+n));return e%10==1&&e%100!=11?a:e%10==2&&e%100!=12?i:e%10!=7&&e%10!=8||e%100==17||e%100==18?c:s},function(n){var e=+n;return 1===e?a:2===e||3===e?i:4===e?o:c},function(n){var e=+n;return 1<=e&&e<=4?a:c},function(n){var e=+n;return 1===e||5===e||7<=e&&e<=9?a:2===e||3===e?i:4===e?o:6===e?s:c},function(n){var e=+n;return 1===e?a:e%10==4&&e%100!=14?s:c},function(n){var e=+n;return e%10!=1&&e%10!=2||e%100==11||e%100==12?c:a},function(n){var e=+n;return e%10==6||e%10==9||10===e?o:c},function(n){var e=+n;return e%10==3&&e%100!=13?o:c}];n.exports={af:{cardinal:l[0]},ak:{cardinal:l[1]},am:{cardinal:l[2]},ar:{cardinal:l[3]},ars:{cardinal:l[3]},as:{cardinal:l[2],ordinal:l[34]},asa:{cardinal:l[0]},ast:{cardinal:l[4]},az:{cardinal:l[0],ordinal:l[35]},be:{cardinal:l[5],ordinal:l[36]},bem:{cardinal:l[0]},bez:{cardinal:l[0]},bg:{cardinal:l[0]},bh:{cardinal:l[1]},bn:{cardinal:l[2],ordinal:l[34]},br:{cardinal:l[6]},brx:{cardinal:l[0]},bs:{cardinal:l[7]},ca:{cardinal:l[4],ordinal:l[37]},ce:{cardinal:l[0]},cgg:{cardinal:l[0]},chr:{cardinal:l[0]},ckb:{cardinal:l[0]},cs:{cardinal:l[8]},cy:{cardinal:l[9],ordinal:l[38]},da:{cardinal:l[10]},de:{cardinal:l[4]},dsb:{cardinal:l[11]},dv:{cardinal:l[0]},ee:{cardinal:l[0]},el:{cardinal:l[0]},en:{cardinal:l[4],ordinal:l[39]},eo:{cardinal:l[0]},es:{cardinal:l[0]},et:{cardinal:l[4]},eu:{cardinal:l[0]},fa:{cardinal:l[2]},ff:{cardinal:l[12]},fi:{cardinal:l[4]},fil:{cardinal:l[13],ordinal:l[0]},fo:{cardinal:l[0]},fr:{cardinal:l[12],ordinal:l[0]},fur:{cardinal:l[0]},fy:{cardinal:l[4]},ga:{cardinal:l[14],ordinal:l[0]},gd:{cardinal:l[15],ordinal:l[40]},gl:{cardinal:l[4]},gsw:{cardinal:l[0]},gu:{cardinal:l[2],ordinal:l[41]},guw:{cardinal:l[1]},gv:{cardinal:l[16]},ha:{cardinal:l[0]},haw:{cardinal:l[0]},he:{cardinal:l[17]},hi:{cardinal:l[2],ordinal:l[41]},hr:{cardinal:l[7]},hsb:{cardinal:l[11]},hu:{cardinal:l[0],ordinal:l[42]},hy:{cardinal:l[12],ordinal:l[0]},ia:{cardinal:l[4]},io:{cardinal:l[4]},is:{cardinal:l[18]},it:{cardinal:l[4],ordinal:l[43]},iu:{cardinal:l[19]},iw:{cardinal:l[17]},jgo:{cardinal:l[0]},ji:{cardinal:l[4]},jmc:{cardinal:l[0]},ka:{cardinal:l[0],ordinal:l[44]},kab:{cardinal:l[12]},kaj:{cardinal:l[0]},kcg:{cardinal:l[0]},kk:{cardinal:l[0],ordinal:l[45]},kkj:{cardinal:l[0]},kl:{cardinal:l[0]},kn:{cardinal:l[2]},ks:{cardinal:l[0]},ksb:{cardinal:l[0]},ksh:{cardinal:l[20]},ku:{cardinal:l[0]},kw:{cardinal:l[19]},ky:{cardinal:l[0]},lag:{cardinal:l[21]},lb:{cardinal:l[0]},lg:{cardinal:l[0]},ln:{cardinal:l[1]},lt:{cardinal:l[22]},lv:{cardinal:l[23]},mas:{cardinal:l[0]},mg:{cardinal:l[1]},mgo:{cardinal:l[0]},mk:{cardinal:l[24],ordinal:l[46]},ml:{cardinal:l[0]},mn:{cardinal:l[0]},mo:{cardinal:l[25],ordinal:l[0]},mr:{cardinal:l[2],ordinal:l[47]},mt:{cardinal:l[26]},nah:{cardinal:l[0]},naq:{cardinal:l[19]},nb:{cardinal:l[0]},nd:{cardinal:l[0]},ne:{cardinal:l[0],ordinal:l[48]},nl:{cardinal:l[4]},nn:{cardinal:l[0]},nnh:{cardinal:l[0]},no:{cardinal:l[0]},nr:{cardinal:l[0]},nso:{cardinal:l[1]},ny:{cardinal:l[0]},nyn:{cardinal:l[0]},om:{cardinal:l[0]},or:{cardinal:l[0],ordinal:l[49]},os:{cardinal:l[0]},pa:{cardinal:l[1]},pap:{cardinal:l[0]},pl:{cardinal:l[27]},prg:{cardinal:l[23]},ps:{cardinal:l[0]},pt:{cardinal:l[28]},"pt-PT":{cardinal:l[4]},rm:{cardinal:l[0]},ro:{cardinal:l[25],ordinal:l[0]},rof:{cardinal:l[0]},ru:{cardinal:l[29]},rwk:{cardinal:l[0]},saq:{cardinal:l[0]},sc:{cardinal:l[4],ordinal:l[43]},scn:{cardinal:l[4],ordinal:l[43]},sd:{cardinal:l[0]},sdh:{cardinal:l[0]},se:{cardinal:l[19]},seh:{cardinal:l[0]},sh:{cardinal:l[7]},shi:{cardinal:l[30]},si:{cardinal:l[31]},sk:{cardinal:l[8]},sl:{cardinal:l[32]},sma:{cardinal:l[19]},smi:{cardinal:l[19]},smj:{cardinal:l[19]},smn:{cardinal:l[19]},sms:{cardinal:l[19]},sn:{cardinal:l[0]},so:{cardinal:l[0]},sq:{cardinal:l[0],ordinal:l[50]},sr:{cardinal:l[7]},ss:{cardinal:l[0]},ssy:{cardinal:l[0]},st:{cardinal:l[0]},sv:{cardinal:l[4],ordinal:l[51]},sw:{cardinal:l[4]},syr:{cardinal:l[0]},ta:{cardinal:l[0]},te:{cardinal:l[0]},teo:{cardinal:l[0]},ti:{cardinal:l[1]},tig:{cardinal:l[0]},tk:{cardinal:l[0],ordinal:l[52]},tl:{cardinal:l[13],ordinal:l[0]},tn:{cardinal:l[0]},tr:{cardinal:l[0]},ts:{cardinal:l[0]},tzm:{cardinal:l[33]},ug:{cardinal:l[0]},uk:{cardinal:l[29],ordinal:l[53]},ur:{cardinal:l[4]},uz:{cardinal:l[0]},ve:{cardinal:l[0]},vo:{cardinal:l[0]},vun:{cardinal:l[0]},wa:{cardinal:l[1]},wae:{cardinal:l[0]},xh:{cardinal:l[0]},xog:{cardinal:l[0]},yi:{cardinal:l[4]},zu:{cardinal:l[2]},lo:{ordinal:l[0]},ms:{ordinal:l[0]},vi:{ordinal:l[0]}}},function(n,e,t){(function(n){const e=t(9),r=t(13),a=t(15),i=t(0),{isWorker:o}=t(3),s=t(18)(null);n.Scratch=n.Scratch||{},Object.assign(n.Scratch,e,{canFetch:()=>Promise.resolve(!0),fetch:function(n){function e(e,t){return n.apply(this,arguments)}return e.toString=function(){return n.toString()},e}(((n,e)=>fetch(n,e))),canOpenWindow:()=>Promise.resolve(!1),openWindow:()=>Promise.reject(new Error("Scratch.openWindow not supported in sandboxed extensions")),canRedirect:()=>Promise.resolve(!1),redirect:()=>Promise.reject(new Error("Scratch.redirect not supported in sandboxed extensions")),canRecordAudio:()=>Promise.resolve(!1),canRecordVideo:()=>Promise.resolve(!1),canReadClipboard:()=>Promise.resolve(!1),canNotify:()=>Promise.resolve(!1),canGeolocate:()=>Promise.resolve(!1),canEmbed:()=>Promise.resolve(!1),translate:s});const c=new class{constructor(){this.nextExtensionId=0,this.initialRegistrations=[],this.firstRegistrationPromise=new Promise((n=>{this.firstRegistrationCallback=n})),a.waitForConnection.then((()=>{a.call("extensions","allocateWorker").then((async n=>{const[e,t]=n;this.workerId=e;try{await(n=>{if(!o)return new Promise(((e,t)=>{const r=document.createElement("script");r.onload=()=>e(),r.onerror=()=>{t(new Error("Error in sandboxed script: ".concat(n,". Check the console for more information.")))},r.src=n,document.body.appendChild(r)}));importScripts(n)})(t),await this.firstRegistrationPromise;const n=this.initialRegistrations;this.initialRegistrations=null,Promise.all(n).then((()=>a.call("extensions","onWorkerInit",e)))}catch(n){i.error(n),a.call("extensions","onWorkerInit",e,"".concat(n))}}))})),this.extensions=[]}register(n){const e=this.nextExtensionId++;this.extensions.push(n);const t="extension.".concat(this.workerId,".").concat(e),r=a.setService(t,n).then((()=>a.call("extensions","registerExtensionService",t)));return this.initialRegistrations&&(this.firstRegistrationCallback(),this.initialRegistrations.push(r)),r}};n.Scratch.extensions={register:c.register.bind(c)},n.ScratchExtensions=r(n.Scratch)}).call(this,t(8))},function(n,e){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch(n){"object"==typeof window&&(t=window)}n.exports=t},function(n,e,t){const r={ArgumentType:t(1),BlockType:t(2),TargetType:t(10),Cast:t(11)};n.exports=r},function(n,e){n.exports={SPRITE:"sprite",STAGE:"stage"}},function(n,e,t){const r=t(12),a=n=>{if("string"!=typeof n)return!1;for(let e=0;e<n.length;e++){const t=n.charCodeAt(e);if(48===t||9===t)return!1}return!0};class i{static toNumber(n){if("number"==typeof n)return Number.isNaN(n)?0:n;const e=Number(n);return Number.isNaN(e)?0:e}static toBoolean(n){return"boolean"==typeof n?n:"string"==typeof n?""!==n&&"0"!==n&&"false"!==n.toLowerCase():Boolean(n)}static toString(n){return String(n)}static toRgbColorList(n){const e=i.toRgbColorObject(n);return[e.r,e.g,e.b]}static toRgbColorObject(n){let e;return"string"==typeof n&&"#"===n.substring(0,1)?(e=r.hexToRgb(n),e||(e={r:0,g:0,b:0,a:255})):e=r.decimalToRgb(i.toNumber(n)),e}static isWhiteSpace(n){return null===n||"string"==typeof n&&0===n.trim().length}static compare(n,e){let t=Number(n),r=Number(e);if(0===t&&a(n)?t=NaN:0===r&&a(e)&&(r=NaN),isNaN(t)||isNaN(r)){const t=String(n).toLowerCase(),r=String(e).toLowerCase();return t<r?-1:t>r?1:0}return t===1/0&&r===1/0||t===-1/0&&r===-1/0?0:t-r}static isInt(n){return"number"==typeof n?!!isNaN(n)||n===Math.floor(n):"boolean"==typeof n||"string"==typeof n&&n.indexOf(".")<0}static get LIST_INVALID(){return"INVALID"}static get LIST_ALL(){return"ALL"}static toListIndex(n,e,t){if("number"!=typeof n){if("all"===n)return t?i.LIST_ALL:i.LIST_INVALID;if("last"===n)return e>0?e:i.LIST_INVALID;if("random"===n||"any"===n)return e>0?1+Math.floor(Math.random()*e):i.LIST_INVALID}return(n=Math.floor(i.toNumber(n)))<1||n>e?i.LIST_INVALID:n}}n.exports=i},function(n,e){class t{static get RGB_BLACK(){return{r:0,g:0,b:0}}static get RGB_WHITE(){return{r:255,g:255,b:255}}static decimalToHex(n){n<0&&(n+=16777216);let e=Number(n).toString(16);return e="#".concat("000000".substr(0,6-e.length)).concat(e),e}static decimalToRgb(n){const e=n>>24&255;return{r:n>>16&255,g:n>>8&255,b:255&n,a:e>0?e:255}}static hexToRgb(n){n.startsWith("#")&&(n=n.substring(1));const e=parseInt(n,16);if(isNaN(e))return null;if(6===n.length)return{r:e>>16&255,g:e>>8&255,b:255&e};if(3===n.length){const n=e>>8&15,t=e>>4&15,r=15&e;return{r:n<<4|n,g:t<<4|t,b:r<<4|r}}return null}static rgbToHex(n){return t.decimalToHex(t.rgbToDecimal(n))}static rgbToDecimal(n){return(n.r<<16)+(n.g<<8)+n.b}static hexToDecimal(n){return t.rgbToDecimal(t.hexToRgb(n))}static hsvToRgb(n){let e=n.h%360;e<0&&(e+=360);const t=Math.max(0,Math.min(n.s,1)),r=Math.max(0,Math.min(n.v,1)),a=Math.floor(e/60),i=e/60-a,o=r*(1-t),s=r*(1-t*i),c=r*(1-t*(1-i));let l,u,d;switch(a){default:case 0:l=r,u=c,d=o;break;case 1:l=s,u=r,d=o;break;case 2:l=o,u=r,d=c;break;case 3:l=o,u=s,d=r;break;case 4:l=c,u=o,d=r;break;case 5:l=r,u=o,d=s}return{r:Math.floor(255*l),g:Math.floor(255*u),b:Math.floor(255*d)}}static rgbToHsv(n){const e=n.r/255,t=n.g/255,r=n.b/255,a=Math.min(Math.min(e,t),r),i=Math.max(Math.max(e,t),r);let o=0,s=0;if(a!==i){o=60*((e===a?3:t===a?5:1)-(e===a?t-r:t===a?r-e:e-t)/(i-a))%360,s=(i-a)/i}return{h:o,s:s,v:i}}static mixRgb(n,e,t){if(t<=0)return n;if(t>=1)return e;const r=1-t;return{r:r*n.r+t*e.r,g:r*n.g+t*e.g,b:r*n.b+t*e.b}}}n.exports=t},function(n,e,t){const r=t(1),a=t(2),{argumentIndexToId:i,generateExtensionId:o}=t(14),s=n=>{if(""===n||" "===n||"w"===n)return{type:a.COMMAND,async:"w"===n};if("r"===n||"R"===n)return{type:a.REPORTER,async:"R"===n};if("b"===n)return{type:a.BOOLEAN,async:!1};if("h"===n)return{type:a.HAT,async:!1};throw new Error("Unknown ScratchX block type: ".concat(n))},c=(n,e)=>{const t={},a="string"==typeof(i=e)||"number"==typeof i||"boolean"==typeof i;var i;if(a&&"b"!==n&&(t.defaultValue=e),"s"===n)t.type=r.STRING,a||(t.defaultValue="");else if("n"===n)t.type=r.NUMBER,a||(t.defaultValue=0);else if("m"===n[0]){t.type=r.STRING;const e=n.split(/\\.|:/)[1];t.menu=e}else{if("b"!==n)throw new Error("Unknown ScratchX argument type: ".concat(n));t.type=r.BOOLEAN}return t},l=(n,e,t)=>r=>{const a=[];for(let n=0;n<e;n++)a.push(r[i(n)]);return t?new Promise((e=>{n(...a,e)})):n(...a)},u=new Map;n.exports=n=>({register:(e,t,r)=>{const a=((n,e,t)=>{const r={id:o(n),name:e.displayName||n,blocks:[],color1:"#4a4a5e",color2:"#31323f",color3:"#191a21"},a={getInfo:()=>r,_getStatus:t._getStatus};e.url&&(r.docsURI=e.url);for(const n of e.blocks){if(1===n.length){r.blocks.push("---");continue}const e=n[0],o=n[1],u=n[2],d=n.slice(3);let f="";const h=[],m=o.split(/%([\\w.:]+)/g);for(let n=0;n<m.length;n++){const e=m[n];if(n%2==1){c(e);const t=Math.floor(n/2).toString(),r=d[t],a=i(t);h[a]=c(e,r),f+="[".concat(a,"]")}else f+=e}const p=s(e),g={opcode:u,blockType:p.type,text:f,arguments:h};r.blocks.push(g);const b=t[u],v=h.length;a[u]=l(b,v,p.async)}const u=e.menus;if(u){const n={};for(const e of Object.keys(u)||{}){const t={items:u[e]};n[e]=t}r.menus=n}return a})(e,t,r);u.set(e,a),n.extensions.register(a)},getStatus:n=>{const e=u.get(n);return e?e._getStatus():{status:0,msg:"does not exist"}}})},function(n,e){n.exports={generateExtensionId:n=>{const e=n.replace(/[^a-z0-9]/gi,"").toLowerCase();return"sbx".concat(e)},argumentIndexToId:n=>n.toString()}},function(n,e,t){const r=t(16),a=t(0),{centralDispatchService:i}=t(3);n.exports=new class extends r{constructor(){super(),this._connectionPromise=new Promise((n=>{this._onConnect=n})),this.services={},this._onMessage=this._onMessage.bind(this,i),"undefined"!=typeof self&&(self.onmessage=this._onMessage)}get waitForConnection(){return this._connectionPromise}setService(n,e){return Object.prototype.hasOwnProperty.call(this.services,n)&&a.warn("Worker dispatch replacing existing service provider for ".concat(n)),this.services[n]=e,this.waitForConnection.then((()=>this._remoteCall(i,"dispatch","setService",n)))}_getServiceProvider(n){const e=this.services[n];return{provider:e||i,isRemote:!e}}_onDispatchMessage(n,e){let t;switch(e.method){case"handshake":t=this._onConnect();break;case"terminate":setTimeout((()=>self.close()),0),t=Promise.resolve();break;default:a.error("Worker dispatch received message for unknown method: ".concat(e.method))}return t}}},function(n,e,t){const r=t(0);n.exports=class{constructor(){this.callbacks=[],this.nextResponseId=0}call(n,e){for(var t=arguments.length,r=new Array(t>2?t-2:0),a=2;a<t;a++)r[a-2]=arguments[a];return this.transferCall(n,e,null,...r)}transferCall(n,e,t){try{const{provider:o,isRemote:s}=this._getServiceProvider(n);if(o){for(var r=arguments.length,a=new Array(r>3?r-3:0),i=3;i<r;i++)a[i-3]=arguments[i];if(s)return this._remoteTransferCall(o,n,e,t,...a);const c=o[e].apply(o,a);return Promise.resolve(c)}return Promise.reject(new Error("Service not found: ".concat(n)))}catch(n){return Promise.reject(n)}}_isRemoteService(n){return this._getServiceProvider(n).isRemote}_remoteCall(n,e,t){for(var r=arguments.length,a=new Array(r>3?r-3:0),i=3;i<r;i++)a[i-3]=arguments[i];return this._remoteTransferCall(n,e,t,null,...a)}_remoteTransferCall(n,e,t,r){for(var a=arguments.length,i=new Array(a>4?a-4:0),o=4;o<a;o++)i[o-4]=arguments[o];return new Promise(((a,o)=>{const s=this._storeCallbacks(a,o);i.length>0&&"function"==typeof i[i.length-1].func&&(i.pop(),i.pop()),r?n.postMessage({service:e,method:t,responseId:s,args:i},r):n.postMessage({service:e,method:t,responseId:s,args:i})}))}_storeCallbacks(n,e){const t=this.nextResponseId++;return this.callbacks[t]=[n,e],t}_deliverResponse(n,e){try{const[t,r]=this.callbacks[n];delete this.callbacks[n],e.error?r(e.error):t(e.result)}catch(n){r.error("Dispatch callback failed: ".concat(n))}}_onMessage(n,e){const t=e.data;let a;t.args=t.args||[],t.service?a="dispatch"===t.service?this._onDispatchMessage(n,t):this.call(t.service,t.method,...t.args):void 0===t.responseId?r.error("Dispatch caught malformed message from a worker: ".concat(JSON.stringify(e))):this._deliverResponse(t.responseId,t),a&&(void 0===t.responseId?r.error("Dispatch message missing required response ID: ".concat(JSON.stringify(e))):a.then((e=>n.postMessage({responseId:t.responseId,result:e})),(e=>n.postMessage({responseId:t.responseId,error:"".concat(e)}))))}_getServiceProvider(n){throw new Error("Could not get provider for ".concat(n,": _getServiceProvider not implemented"))}_onDispatchMessage(n,e){throw new Error("Unimplemented dispatch message handler cannot handle ".concat(e.method," method"))}}},function(n,e){const t="undefined"==typeof document,r=t?"[0m":"",a=t?"[90m":"",i=`${t?"[34m":""}debug${r}`,o=`${t?"[36m":""}info${r}`,s=`${t?"[33m":""}warn${r}`,c=`${t?"[31m":""}error${r}`,l=(n="")=>{const e=e=>l(n?`${n} ${e}`:e),t=n?[`${a}${n}${r}`]:[];return e.debug=e.log=console.debug.bind(console,...t,i),e.info=console.log.bind(console,...t,o),e.warn=e.warning=console.warn.bind(console,...t,s),e.error=console.error.bind(console,...t,c),e};l.enable=l.disable=()=>{},n.exports=l},function(n,e,t){const r=t(19);n.exports=n=>{const e=r.namespace(),t=(n,t)=>{if(n&&"object"==typeof n);else{if("string"!=typeof n)throw new Error("unsupported data type in translate()");n={default:n}}return e(n,t)},a=n=>"_".concat(n),i=()=>n?n.getLocale():"undefined"!=typeof navigator?navigator.language:"en";let o={};return t.setup=n=>{n&&(o=n),e.setup({locale:i(),missingTranslation:"ignore",generateId:a,translations:o})},Object.defineProperty(t,"language",{configurable:!0,enumerable:!0,get:()=>i()}),t.setup({}),n&&n.on("LOCALE_CHANGED",(()=>{t.setup(null)})),t}},function(n,e,t){"use strict";var r=t(20),a=t(21),i=t(6),o=t(5),s=t(4);function c(n,e){return Object.keys(e).forEach((function(t){n[t]=e[t]})),n}n.exports=function n(){var e=c({},s),t="en",l={},u=function(n){return n},d=null,f="warning",h={};function m(n,e,i){var o="string"==typeof n?n:n.default,s=b(o,"object"==typeof n&&n.id||u(o),i||t);return(s.format||(s.format=a(r(s.message),i||t,h)))(e)}m.rich=function(n,e,i){var o="string"==typeof n?n:n.default,s=b(o,"object"==typeof n&&n.id||u(o),i||t);return(s.toParts||(s.toParts=a.toParts(r(s.message,{tagsType:p}),i||t,h)))(e)};var p="<>";function g(n,e){var t=n[2];return function(n,e){var r="object"==typeof t?function(n,e){return Object.keys(n).reduce((function(t,r){return t[r]=n[r](e),t}),{})}(t,e):t;return"function"==typeof n?n(r):n}}function b(n,e,t){var r=o(t,l)||"en",a=l[r]||(l[r]={}),i=a[e];if("string"==typeof i&&(i=a[e]={message:i}),!i){var s=\'Translation for "\'+e+\'" in "\'+r+\'" is missing\';if("warning"===f)"undefined"!=typeof console&&console.warn(s);else if("ignore"!==f)throw new Error(s);var c="function"==typeof d?d(n,e,r)||n:d||n;i=a[e]={message:c}}return i}function v(n,e,r,a,s){"object"==typeof r&&"object"!=typeof a&&(s=a,a=r,r=0);var c=o(s||t,i),l=c&&i[c][n]||x;return a["="+ +e]||a[l(e-r)]||a.other}function x(){return"other"}return h[p]=g,m.setup=function(n){return(n=n||{}).locale&&(t=n.locale),"translations"in n&&(l=n.translations||{}),n.generateId&&(u=n.generateId),"missingReplacement"in n&&(d=n.missingReplacement),n.missingTranslation&&(f=n.missingTranslation),n.formats&&(n.formats.number&&c(e.number,n.formats.number),n.formats.date&&c(e.date,n.formats.date),n.formats.time&&c(e.time,n.formats.time)),n.types&&((h=n.types)[p]=g),{locale:t,translations:l,generateId:u,missingReplacement:d,missingTranslation:f,formats:e,types:h}},m.number=function(n,r,a){var i=r&&e.number[r]||e.parseNumberPattern(r)||e.number.default;return new Intl.NumberFormat(a||t,i).format(n)},m.date=function(n,r,a){var i=r&&e.date[r]||e.parseDatePattern(r)||e.date.default;return new Intl.DateTimeFormat(a||t,i).format(n)},m.time=function(n,r,a){var i=r&&e.time[r]||e.parseDatePattern(r)||e.time.default;return new Intl.DateTimeFormat(a||t,i).format(n)},m.select=function(n,e){return e[n]||e.other},m.custom=function(n,e,t,r){return n[1]in h?h[n[1]](n,e)(t,r):t},m.plural=v.bind(null,"cardinal"),m.selectordinal=v.bind(null,"ordinal"),m.namespace=n,m}()},function(n,e,t){"use strict";var r="{",a="}",i=",",o="#",s="<",c=">",l="</",u="/>",d="\'",f="offset:",h=["number","date","time","ordinal","duration","spellout"],m=["plural","select","selectordinal"];function p(n,e){var t=n.pattern,r=t.length,i=[],o=n.index,s=g(n,e);for(s&&i.push(s),s&&n.tokens&&n.tokens.push(["text",t.slice(o,n.index)]);n.index<r;){if(t[n.index]===a){if(!e)throw S(n);break}if(e&&n.tagsType&&t.slice(n.index,n.index+l.length)===l)break;i.push(x(n)),o=n.index,(s=g(n,e))&&i.push(s),s&&n.tokens&&n.tokens.push(["text",t.slice(o,n.index)])}return i}function g(n,e){for(var t=n.pattern,i=t.length,c="plural"===e||"selectordinal"===e,l=!!n.tagsType,u="{style}"===e,f="";n.index<i;){var h=t[n.index];if(h===r||h===a||c&&h===o||l&&h===s||u&&b(h.charCodeAt(0)))break;if(h===d)if((h=t[++n.index])===d)f+=h,++n.index;else if(h===r||h===a||c&&h===o||l&&h===s||u)for(f+=h;++n.index<i;)if((h=t[n.index])===d&&t[n.index+1]===d)f+=d,++n.index;else{if(h===d){++n.index;break}f+=h}else f+=d;else f+=h,++n.index}return f}function b(n){return n>=9&&n<=13||32===n||133===n||160===n||6158===n||n>=8192&&n<=8205||8232===n||8233===n||8239===n||8287===n||8288===n||12288===n||65279===n}function v(n){for(var e=n.pattern,t=e.length,r=n.index;n.index<t&&b(e.charCodeAt(n.index));)++n.index;r<n.index&&n.tokens&&n.tokens.push(["space",n.pattern.slice(r,n.index)])}function x(n){var e=n.pattern;if(e[n.index]===o)return n.tokens&&n.tokens.push(["syntax",o]),++n.index,[o];var t=function(n){var e=n.tagsType;if(!e||n.pattern[n.index]!==s)return;if(n.pattern.slice(n.index,n.index+l.length)===l)throw S(n,null,"closing tag without matching opening tag");n.tokens&&n.tokens.push(["syntax",s]);++n.index;var t=y(n,!0);if(!t)throw S(n,"placeholder id");n.tokens&&n.tokens.push(["id",t]);if(v(n),n.pattern.slice(n.index,n.index+u.length)===u)return n.tokens&&n.tokens.push(["syntax",u]),n.index+=u.length,[t,e];if(n.pattern[n.index]!==c)throw S(n,c);n.tokens&&n.tokens.push(["syntax",c]);++n.index;var r=p(n,e),a=n.index;if(n.pattern.slice(n.index,n.index+l.length)!==l)throw S(n,l+t+c);n.tokens&&n.tokens.push(["syntax",l]);n.index+=l.length;var i=y(n,!0);i&&n.tokens&&n.tokens.push(["id",i]);if(t!==i)throw n.index=a,S(n,l+t+c,l+i+c);if(v(n),n.pattern[n.index]!==c)throw S(n,c);n.tokens&&n.tokens.push(["syntax",c]);return++n.index,[t,e,{children:r}]}(n);if(t)return t;if(e[n.index]!==r)throw S(n,r);n.tokens&&n.tokens.push(["syntax",r]),++n.index,v(n);var d=y(n);if(!d)throw S(n,"placeholder id");n.tokens&&n.tokens.push(["id",d]),v(n);var m=e[n.index];if(m===a)return n.tokens&&n.tokens.push(["syntax",a]),++n.index,[d];if(m!==i)throw S(n,i+" or "+a);n.tokens&&n.tokens.push(["syntax",i]),++n.index,v(n);var g,b=y(n);if(!b)throw S(n,"placeholder type");if(n.tokens&&n.tokens.push(["type",b]),v(n),(m=e[n.index])===a){if(n.tokens&&n.tokens.push(["syntax",a]),"plural"===b||"selectordinal"===b||"select"===b)throw S(n,b+" sub-messages");return++n.index,[d,b]}if(m!==i)throw S(n,i+" or "+a);if(n.tokens&&n.tokens.push(["syntax",i]),++n.index,v(n),"plural"===b||"selectordinal"===b){var x=function(n){var e=n.pattern,t=e.length,r=0;if(e.slice(n.index,n.index+f.length)===f){n.tokens&&n.tokens.push(["offset","offset"],["syntax",":"]),n.index+=f.length,v(n);for(var a=n.index;n.index<t&&w(e.charCodeAt(n.index));)++n.index;if(a===n.index)throw S(n,"offset number");n.tokens&&n.tokens.push(["number",e.slice(a,n.index)]),r=+e.slice(a,n.index)}return r}(n);v(n),g=[d,b,x,M(n,b)]}else if("select"===b)g=[d,b,M(n,b)];else if(h.indexOf(b)>=0)g=[d,b,k(n)];else{var I=n.index,T=k(n);v(n),e[n.index]===r&&(n.index=I,T=M(n,b)),g=[d,b,T]}if(v(n),e[n.index]!==a)throw S(n,a);return n.tokens&&n.tokens.push(["syntax",a]),++n.index,g}function y(n,e){for(var t=n.pattern,l=t.length,u="";n.index<l;){var f=t[n.index];if(f===r||f===a||f===i||f===o||f===d||b(f.charCodeAt(0))||e&&(f===s||f===c||"/"===f))break;u+=f,++n.index}return u}function k(n){var e=n.index,t=g(n,"{style}");if(!t)throw S(n,"placeholder style name");return n.tokens&&n.tokens.push(["style",n.pattern.slice(e,n.index)]),t}function w(n){return n>=48&&n<=57}function M(n,e){for(var t=n.pattern,r=t.length,i={};n.index<r&&t[n.index]!==a;){var o=y(n);if(!o)throw S(n,"sub-message selector");n.tokens&&n.tokens.push(["selector",o]),v(n),i[o]=I(n,e),v(n)}if(!i.other&&m.indexOf(e)>=0)throw S(n,null,null,\'"other" sub-message must be specified in \'+e);return i}function I(n,e){if(n.pattern[n.index]!==r)throw S(n,r+" to start sub-message");n.tokens&&n.tokens.push(["syntax",r]),++n.index;var t=p(n,e);if(n.pattern[n.index]!==a)throw S(n,a+" to end sub-message");return n.tokens&&n.tokens.push(["syntax",a]),++n.index,t}function S(n,e,t,r){var a=n.pattern,i=a.slice(0,n.index).split(/\\r?\\n/),o=n.index,s=i.length,c=i.slice(-1)[0].length;return t=t||(n.index>=a.length?"end of message pattern":y(n)||a[n.index]),r||(r=function(n,e){return n?"Expected "+n+" but found "+e:"Unexpected "+e+" found"}(e,t)),new T(r+=" in "+a.replace(/\\r?\\n/g,"\\n"),e,t,o,s,c)}function T(n,e,t,r,a,i){Error.call(this,n),this.name="SyntaxError",this.message=n,this.expected=e,this.found=t,this.offset=r,this.line=a,this.column=i}e=n.exports=function(n,e){return p({pattern:String(n),index:0,tagsType:e&&e.tagsType||null,tokens:e&&e.tokens||null},"")},T.prototype=Object.create(Error.prototype),e.SyntaxError=T},function(n,e,t){"use strict";var r=t(4),a=t(5),i=t(6);function o(n,e,t,r,a){var i=n.map((function(n){return function(n,e,t,r,a){if("string"==typeof n){var i=n;return function(){return i}}var c,l=n[0],u=n[1];if(e&&"#"===n[0]){l=e[0];var d=e[2],h=(r.number||f.number)([l,"number"],t);return function(n){return h(s(l,n)-d,n)}}"plural"===u||"selectordinal"===u?(c={},Object.keys(n[3]).forEach((function(e){c[e]=o(n[3][e],n,t,r,a)})),n=[n[0],n[1],n[2],c]):n[2]&&"object"==typeof n[2]&&(c={},Object.keys(n[2]).forEach((function(e){c[e]=o(n[2][e],n,t,r,a)})),n=[n[0],n[1],c]);var m=u&&(r[u]||f[u]);if(m){var p=m(n,t);return function(n){return p(s(l,n),n)}}return a?function(n){return String(s(l,n))}:function(n){return s(l,n)}}(n,e,t,r,a)}));return a?1===i.length?i[0]:function(n){for(var e="",t=0;t<i.length;++t)e+=i[t](n);return e}:function(n){return i.reduce((function(e,t){return e.concat(t(n))}),[])}}function s(n,e){if(e&&n in e)return e[n];for(var t=n.split("."),r=e,a=0,i=t.length;r&&a<i;++a)r=r[t[a]];return r}function c(n,e){var t=n[2],a=r.number[t]||r.parseNumberPattern(t)||r.number.default;return new Intl.NumberFormat(e,a).format}function l(n,e){var t=n[1],a=n[2],i=r[t][a]||r.parseDatePattern(a)||r[t].default;return new Intl.DateTimeFormat(e,i).format}function u(n,e){var t,r="selectordinal"===n[1]?"ordinal":"cardinal",o=n[2],s=n[3];if(Intl.PluralRules&&Intl.PluralRules.supportedLocalesOf(e).length>0)t=new Intl.PluralRules(e,{type:r});else{var c=a(e,i),l=c&&i[c][r]||d;t={select:l}}return function(n,e){return(s["="+ +n]||s[t.select(n-o)]||s.other)(e)}}function d(){return"other"}(e=n.exports=function(n,e,t){return o(n,null,e||"en",t||{},!0)}).toParts=function(n,e,t){return o(n,null,e||"en",t||{},!1)};var f={number:c,ordinal:c,spellout:c,duration:function(n,e){var t=n[2],a=r.duration[t]||r.duration.default,i=new Intl.NumberFormat(e,a.seconds).format,o=new Intl.NumberFormat(e,a.minutes).format,s=new Intl.NumberFormat(e,a.hours).format,c=/^fi$|^fi-|^da/.test(String(e))?".":":";return function(n,e){if(n=+n,!isFinite(n))return i(n);var t=~~(n/60/60),r=~~(n/60%60),a=(t?s(Math.abs(t))+c:"")+o(Math.abs(r))+c+i(Math.abs(n%60));return n<0?s(-1).replace(s(1),a):a}},date:l,time:l,plural:u,selectordinal:u,select:function(n,e){var t=n[2];return function(n,e){return(t[n]||t.other)(e)}}};e.types=f}]);',null)}},function(e,t,n){"use strict";var r=window.URL||window.webkitURL;e.exports=function(e,t){try{try{var n;try{(n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder)).append(e),n=n.getBlob()}catch(t){n=new Blob([e])}return new Worker(r.createObjectURL(n))}catch(t){return new Worker("data:application/javascript,"+encodeURIComponent(e))}}catch(e){if(!t)throw Error("Inline worker is not supported");return new Worker(t)}}},function(e,t,n){const r=n(19),i=n(16),s=n(10),o=n(52),a=n(8),{Map:l}=n(24),c=n(1),u=n(7),d=n(83);e.exports=class extends r{constructor(e,t){super(),t||(t=new i(e)),this.runtime=e,this.id=a(),this.blocks=t,this.variables={},this.comments={},this._customState={},this._edgeActivatedHatValues={},this.extensionStorage={}}onGreenFlag(){}getName(){return this.id}updateEdgeActivatedValue(e,t){const n=this._edgeActivatedHatValues[e];return this._edgeActivatedHatValues[e]=t,n}hasEdgeActivatedValue(e){return Object.prototype.hasOwnProperty.call(this._edgeActivatedHatValues,e)}clearEdgeActivatedValues(){this._edgeActivatedHatValues={}}lookupOrCreateVariable(e,t){let n=this.lookupVariableById(e);if(n)return n;if(n=this.lookupVariableByNameAndType(t,s.SCALAR_TYPE),n)return n;const r=new s(e,t,s.SCALAR_TYPE,!1);return this.variables[e]=r,r}lookupBroadcastMsg(e,t){let n;if(e?n=this.lookupVariableById(e):t?n=this.lookupBroadcastByInputValue(t):c.error("Cannot find broadcast message if neither id nor name are provided."),n)return t&&n.name.toLowerCase()!==t.toLowerCase()&&c.error("Found broadcast message with id: ".concat(e,", but")+"its name, ".concat(n.name," did not match expected name ").concat(t,".")),n.type!==s.BROADCAST_MESSAGE_TYPE&&c.error("Found variable with id: ".concat(e,", but its type ").concat(n.type)+"did not match expected type ".concat(s.BROADCAST_MESSAGE_TYPE)),n}lookupBroadcastByInputValue(e){const t=this.variables;for(const n in t)if(t[n].type===s.BROADCAST_MESSAGE_TYPE&&t[n].name.toLowerCase()===e.toLowerCase())return t[n]}lookupVariableById(e){if(Object.prototype.hasOwnProperty.call(this.variables,e))return this.variables[e];if(this.runtime&&!this.isStage){const t=this.runtime.getTargetForStage();if(t&&Object.prototype.hasOwnProperty.call(t.variables,e))return t.variables[e]}}lookupVariableByNameAndType(e,t,n){if("string"==typeof e){"string"!=typeof t&&(t=s.SCALAR_TYPE),n=n||!1;for(const n in this.variables){const r=this.variables[n];if(r.name===e&&r.type===t)return r}if(!n&&this.runtime&&!this.isStage){const n=this.runtime.getTargetForStage();if(n)for(const r in n.variables){const i=n.variables[r];if(i.name===e&&i.type===t)return i}}return null}}lookupOrCreateList(e,t){let n=this.lookupVariableById(e);if(n)return n;if(n=this.lookupVariableByNameAndType(t,s.LIST_TYPE),n)return n;const r=new s(e,t,s.LIST_TYPE,!1);return this.variables[e]=r,r}createVariable(e,t,n,r){if(!Object.prototype.hasOwnProperty.call(this.variables,e)){const i=new s(e,t,n,!1);r&&this.isStage&&this.runtime.canAddCloudVariable()&&(i.isCloud=!0,this.runtime.addCloudVariable(),this.runtime.ioDevices.cloud.requestCreateVariable(i)),this.variables[e]=i}}createComment(e,t,n,r,i,s,a,l){if(!Object.prototype.hasOwnProperty.call(this.comments,e)){const u=new o(e,n,r,i,s,a,l);if(t){u.blockId=t;const n=this.blocks.getBlock(t);n?n.comment=e:c.warn("Could not find block with id ".concat(t," associated with commentId: ").concat(e))}this.comments[e]=u}}renameVariable(e,t){if(Object.prototype.hasOwnProperty.call(this.variables,e)){const n=this.variables[e];if(n.id===e){const r=n.name;if(n.name=t,this.runtime){if(n.isCloud&&this.isStage&&this.runtime.ioDevices.cloud.requestRenameVariable(r,t),n.type===s.SCALAR_TYPE){let e=!1;this.runtime.targets.forEach((n=>{e=n.blocks.updateSensingOfReference(r,t,this.isStage?"_stage_":this.getName())||e})),e&&this.runtime.requestBlocksUpdate()}const i=this.runtime.monitorBlocks;i.changeBlock({id:e,element:"field",name:n.type===s.LIST_TYPE?"LIST":"VARIABLE",value:e},this.runtime);const o=i.getBlock(n.id);o&&this.runtime.requestUpdateMonitor(l({id:e,params:i._getBlockParams(o)}))}}}}deleteVariable(e){if(Object.prototype.hasOwnProperty.call(this.variables,e)){const t=this.variables[e].name,n=this.variables[e].isCloud;delete this.variables[e],this.runtime&&(n&&this.isStage&&(this.runtime.ioDevices.cloud.requestDeleteVariable(t),this.runtime.removeCloudVariable()),this.runtime.monitorBlocks.deleteBlock(e),this.runtime.requestRemoveMonitor(e))}}deleteMonitors(){let e;this.runtime.requestRemoveMonitorByTargetId(this.id),e=this.isStage?Object.keys(this.variables):Object.keys(this.runtime.monitorBlocks._blocks).filter((e=>this.runtime.monitorBlocks._blocks[e].targetId===this.id));for(const t of e)this.runtime.monitorBlocks.deleteBlock(t)}duplicateVariable(e,t){if(Object.prototype.hasOwnProperty.call(this.variables,e)){const n=this.variables[e],r=new s(t?e:null,n.name,n.type,n.isCloud);return r.type===s.LIST_TYPE?r.value=n.value.slice(0):r.value=n.value,r}return null}duplicateVariables(e){let t;return e&&(t=e.getAllVariableAndListReferences()),Object.keys(this.variables).reduce(((n,r)=>{const i=this.duplicateVariable(r,!e);if(n[i.id]=i,e&&t){const e=t[r];e&&this.mergeVariables(r,i.id,e)}return n}),{})}postSpriteInfo(){}getCustomState(e){return this._customState[e]}setCustomState(e,t){this._customState[e]=t}dispose(){this._customState={},this.runtime&&this.runtime.removeExecutable(this)}getAllVariableNamesInScopeByType(e,t){"string"!=typeof e&&(e=s.SCALAR_TYPE),t=t||!1;const n=Object.values(this.variables).filter((t=>t.type===e)).map((e=>e.name));if(t||this.isStage||!this.runtime)return n;const r=this.runtime.getTargetForStage().getAllVariableNamesInScopeByType(e);return n.concat(r)}mergeVariables(e,t,n,r){const i=n||this.blocks.getAllVariableAndListReferences()[e];d.updateVariableIdentifiers(i,t,r)}shareLocalVariableToStage(e,t){if(!this.runtime)return;const n=this.variables[e];if(!n)return void c.warn("Cannot share a local variable to the stage if it's not local.");const r=this.runtime.getTargetForStage(),i="StageVarFromLocal_".concat(e);let s=r.lookupVariableById(i);if(!s){const e=n.name,t=n.type,r="Stage: ".concat(e);s=this.runtime.createNewGlobalVariable(r,i,t)}this.mergeVariables(e,s.id,t,s.name)}shareLocalVariableToSprite(e,t,n){if(!this.runtime)return;if(this.isStage)return;const r=this.variables[e];if(!r)return void c.warn("Tried to call 'shareLocalVariableToSprite' with a non-local variable.");const i=r.name,o=r.type,a=t.lookupVariableByNameAndType(i,o);let l;if(a)l=a.id;else{const e=new s(null,i,o);l=e.id,t.variables[l]=e}this.mergeVariables(e,l,n)}resolveVariableSharingConflictsWithTarget(e,t){if(this.isStage)return;const n=this.blocks.getAllVariableAndListReferences(e);for(const e in n){if(!this.variables[e])continue;const r=n[e];t.isStage?this.shareLocalVariableToStage(e,r):this.shareLocalVariableToSprite(e,t,r)}}fixUpVariableReferences(){if(!this.runtime)return;if(this.isStage)return;const e=this.runtime.getTargetForStage();if(!e||!e.variables)return;const t=(t,n,r)=>{if(e.lookupVariableByNameAndType(n,r)){const e=u.unusedName("".concat(this.getName(),": ").concat(n),this.getAllVariableNamesInScopeByType(r));return this.renameVariable(t,e),e}return null},n=this.blocks.getAllVariableAndListReferences(),r=[];if(Object.keys(this.variables).length>0)for(const e in this.variables)Object.prototype.hasOwnProperty.call(this.variables,e)&&(n[e]||r.push(e));const i=Object.create(null),s=Object.create(null),o={},a=e=>{const t=o[e];return t||(o[e]=this.runtime.getAllVarNamesOfType(e),o[e])};for(const r in n){const o=n[r][0],l=o.referencingField.value,c=o.type;if(this.lookupVariableById(r)){if(Object.prototype.hasOwnProperty.call(this.variables,r)){const e=t(r,l,c);e&&n[r].map((t=>(t.referencingField.value=e,t)))}}else{const t=e.lookupVariableByNameAndType(l,c);if(t)i[r]||(i[r]=t.id);else{const t=a(c),n=u.unusedName(l,t);e.createVariable(r,n,c),s[r]||(s[r]=n)}}}for(const e in r){const n=r[e];t(n,this.variables[n].name,this.variables[n].type)}for(const e in i){const t=i[e],r=n[e];this.mergeVariables(e,t,r)}for(const e in s){const t=s[e];n[e].map((e=>(e.referencingField.value=t,e)))}}}},function(e,t,n){const r=n(84),i=n(88);e.exports=class{constructor(e){this._canvas=e||document.createElement("canvas"),this._context=this._canvas.getContext("2d"),this._measurements={x:0,y:0,width:0,height:0},this._cachedImage=null,this.loaded=!1}get canvas(){return this._canvas}get size(){return[this._measurements.width,this._measurements.height]}get viewOffset(){return[this._measurements.x,this._measurements.y]}loadString(e,t){this._cachedImage=null;const n=r(e,t);this._svgTag=n,this._measurements={width:n.viewBox.baseVal.width,height:n.viewBox.baseVal.height,x:n.viewBox.baseVal.x,y:n.viewBox.baseVal.y}}loadSVG(e,t,n){this.loadString(e,t),this._createSVGImage(n)}_createSVGImage(e){null===this._cachedImage&&(this._cachedImage=new Image);const t=this._cachedImage;t.onload=()=>{this.loaded=!0,e&&e()};const n=this.toString(!0);t.src=`data:image/svg+xml;utf8,${encodeURIComponent(n)}`,this.loaded=!1}toString(e){return i(this._svgTag,e)}draw(e){if(!this.loaded)throw new Error("SVG image has not finished loading");this._drawFromImage(e)}_drawFromImage(e){if(null===this._cachedImage)return;const t=Number.isFinite(e)?e:1,n=this._measurements;this._canvas.width=n.width*t,this._canvas.height=n.height*t,this._canvas.width<=0||this._canvas.height<=0||this._cachedImage.naturalWidth<=0||this._cachedImage.naturalHeight<=0||(this._context.clearRect(0,0,this._canvas.width,this._canvas.height),this._context.setTransform(t,0,0,t,0,0),this._context.drawImage(this._cachedImage,0,0))}}},function(e,t,n){const r=n(255),i=n(54),s=n(256),o=function(e){let t=r.identity();const n=e.attributes&&e.attributes.transform&&e.attributes.transform.value;if(!n)return t;const i=n.split(/\)\s*/g);for(const e of i){if(!e)break;const n=e.split(/\(\s*/),i=n[0].trim(),o=n[1].split(/[\s,]+/g);for(let e=0;e<o.length;e++)o[e]=parseFloat(o[e]);switch(i){case"matrix":t=r.compose(t,{a:o[0],b:o[1],c:o[2],d:o[3],e:o[4],f:o[5]});break;case"rotate":t=r.compose(t,r.rotateDEG(o[0],o[1]||0,o[2]||0));break;case"translate":t=r.compose(t,r.translate(o[0],o[1]||0));break;case"scale":t=r.compose(t,r.scale(o[0],o[1]||o[0]));break;case"skewX":t=r.compose(t,r.skewDEG(o[0],0));break;case"skewY":t=r.compose(t,r.skewDEG(0,o[0]));break;default:s.error(`Couldn't parse: ${i}`)}}return t},a=function(e){const t=e.a,n=e.b,r=e.c,i=e.d,s=t*i-n*r;if(0!==t||0!==n){const e=Math.sqrt(t*t+n*n);return{x:e,y:s/e}}if(0!==r||0!==i){const e=Math.sqrt(r*r+i*i);return{x:s/e,y:e}}return{x:0,y:0}},l=function(e,t,n,r){n=-n*Math.PI/180;const i=r.a,s=-r.c,o=-r.b,a=r.d,l=i*a-s*o;if(0===l)return null;const c=Math.sin(n),u=Math.cos(n),d=Math.sin(2*n),h=u*u/e/e+c*c/t/t,p=d/e/e-d/t/t,m=c*c/e/e+u*u/t/t,f=h*a*a-p*a*o+m*o*o,g=-2*h*s*a+p*i*a+p*s*o-2*m*i*o,y=h*s*s-p*i*s+m*i*i,b=Math.sqrt(2)*Math.sqrt((f+y-Math.sqrt(f*f+g*g-2*f*y+y*y))/(-g*g+4*f*y)),v=1/Math.sqrt(f+y-1/b/b);let S=(f-1/b/b)/(1/v/v-1/b/b);S<0&&Math.abs(S)<1e-8&&(S=0),S=Math.sqrt(S),Math.abs(1-S)<1e-8&&(S=1);let w=Math.asin(S);S=g/(1/b/b-1/v/v);const k=-w;return Math.abs(Math.sin(2*k)-S)<Math.abs(Math.sin(2*w)-S)&&(w=k),{radiusX:b*l,radiusY:v*l,rotation:180*-w/Math.PI}},c=["circle","ellipse","image","line","path","polygon","polyline","rect","text","use"],u=["a","defs","g","marker","glyph","missing-glyph","pattern","svg","switch","symbol"],d=function(e,t){return Math.sqrt((e*e+t*t)/2)},h=function(e,t,n,s){const o=function(e,t,r,s,o,a){let l,c=i.get(e,t);if(null===c?a?(l=a,/%\s*$/.test(l)&&(c=a,l=parseFloat(c))):l=s?null:r?"":0:l=r?c:parseFloat(c),/%\s*$/.test(c)){return l/100*(o?1:n[/x|^width/.test(t)?"width":"height"])}return l},l=function(e,t,n,r,i,s,a){return t=o(e,t||"x",!1,r,i,s),n=o(e,n||"y",!1,r,i,a),!r||null!==t&&null!==n?{x:t,y:n}:null};let c=t.getElementsByTagName("defs");0===c.length?(c=i.create("defs"),t.appendChild(c)):c=c[0];const u=t.getElementById(e);if(!u)return;const h="radialgradient"===u.tagName.toLowerCase(),p=t.getElementById(e).cloneNode(!0);let m=r.toString(s);m=m.substring(8,m.length-1);const f=`${e}-${m}`;if(p.setAttribute("id",f),t.getElementById(f))return`url(#${f})`;const g="userSpaceOnUse"!==o(p,"gradientUnits",!0);let y,b,v,S;if(h)y=l(p,"cx","cy",!1,g,"50%","50%"),v=o(p,"r",!1,!1,g,"50%"),S=l(p,"fx","fy",!0,g);else if(y=l(p,"x1","y1",!1,g),b=l(p,"x2","y2",!1,g,"1"),y.x===b.x&&y.y===b.y){const e=p.getElementsByTagName("stop");return e.length&&e[e.length-1].attributes&&e[e.length-1].attributes["stop-color"]?e[e.length-1].attributes["stop-color"].value:null}if(g){const e=r.compose(r.translate(n.x,n.y),r.scale(n.width,n.height));y=r.applyToPoint(e,y),b&&(b=r.applyToPoint(e,b)),v&&(v=d(n.width,n.height)*v),S&&(S=r.applyToPoint(e,S))}if(h){y=r.applyToPoint(s,y);const e=a(s);v=d(e.x,e.y)*v,S&&(S=r.applyToPoint(s,S))}else{const e=(e,t)=>e.x*t.x+e.y*t.y,t=(e,t)=>({x:e*t.x,y:e*t.y}),n=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),i=(e,t)=>({x:e.x-t.x,y:e.y-t.y});let o=Math.abs(y.x-b.x)<1e-8?n(y,{x:1,y:(y.x-b.x)/(b.y-y.y)}):n(y,{x:(b.y-y.y)/(y.x-b.x),y:1});o=r.applyToPoint(s,o),y=r.applyToPoint(s,y),b=r.applyToPoint(s,b);const a=i(o,y),l=i(b,y),c=Math.abs(a.x)<1e-8?{x:1,y:-a.x/a.y}:{x:-a.y/a.x,y:1},u=t(e(l,c)/e(c,c),c);b={x:y.x+u.x,y:y.y+u.y}}return h?(p.setAttribute("cx",Number(y.x.toFixed(4))),p.setAttribute("cy",Number(y.y.toFixed(4))),p.setAttribute("r",Number(v.toFixed(4))),S&&(p.setAttribute("fx",Number(S.x.toFixed(4))),p.setAttribute("fy",Number(S.y.toFixed(4))))):(p.setAttribute("x1",Number(y.x.toFixed(4))),p.setAttribute("y1",Number(y.y.toFixed(4))),p.setAttribute("x2",Number(b.x.toFixed(4))),p.setAttribute("y2",Number(b.y.toFixed(4)))),p.setAttribute("gradientUnits","userSpaceOnUse"),c.appendChild(p),`url(#${f})`},p=(e,t)=>{const n=e&&e.match(/\((?:["'#]*)([^"')]+)/),r=n&&n[1];return r&&t?r.replace(`${t.location.href.split("#")[0]}#`,""):r},m=Object.create(null);e.exports=function(e,t,n){const s=r.identity(),f=(s,g,y,b,v)=>{if(function(e){return e.tagName&&u.includes(e.tagName.toLowerCase())}(s)){s.attributes["stroke-width"]&&(y=s.attributes["stroke-width"].value),s.attributes&&(s.attributes.fill&&(b=s.attributes.fill.value),s.attributes.stroke&&(v=s.attributes.stroke.value));for(let e=0;e<s.childNodes.length;e++)f(s.childNodes[e],r.compose(g,o(s)),y,b,v);s.removeAttribute("transform"),s.removeAttribute("stroke-width"),s.removeAttribute("fill"),s.removeAttribute("stroke")}else if(function(e,t){return!!e.attributes&&(t=e.attributes["stroke-width"]?Number(e.attributes["stroke-width"].value):Number(t))&&e.tagName&&"path"===e.tagName.toLowerCase()&&e.attributes.d&&e.attributes.d.value}(s,y)){if(s.attributes["stroke-width"]&&(y=s.attributes["stroke-width"].value),s.attributes.fill&&(b=s.attributes.fill.value),s.attributes.stroke&&(v=s.attributes.stroke.value),g=r.compose(g,o(s)),r.toString(g)===r.toString(r.identity()))return s.removeAttribute("transform"),s.setAttribute("stroke-width",y),b&&s.setAttribute("fill",b),void(v&&s.setAttribute("stroke",v));const c=p(b,t),u=p(v,t);if(c||u){const r=n||((e,t)=>{const n=e.attributes.d.value;if(Object.prototype.hasOwnProperty.call(m,n))return m[n];const r=t.document,s=r.createElement("span");try{r.body.appendChild(s);const e=r.createElementNS(i.svg,"svg"),t=r.createElementNS(i.svg,"path");t.setAttribute("d",n),e.appendChild(t),s.appendChild(e);const o=e.getBBox();return m[n]=o,o}finally{r.body.removeChild(s)}})(s,t);if(c){const t=h(c,e,r,g);t&&(b=t)}if(u){const t=h(u,e,r,g);t&&(v=t)}}s.setAttribute("d",function(e,t){if(!t||r.toString(t)===r.toString(r.identity()))return e;const n=e&&e.match(/[mlhvcsqtaz][^mlhvcsqtaz]*/gi);let i,s,o,c=!1,u={x:0,y:0},d={x:0,y:0},h="";const p=function(e,t){let n=+i[e];return c&&(n+=u[t]),n},m=function(e){return{x:p(e,"x"),y:p(e+1,"y")}},f=function(e){return Math.round(1e4*e)/1e4},g=function(e){const n=r.applyToPoint(t,e);return`${f(n.x)} ${f(n.y)} `};for(let e=0,r=n&&n.length;e<r;e++){const r=n[e],y=r[0],b=y.toLowerCase();i=r.match(/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g);const v=i&&i.length;switch(c=y===b,"z"!==s||/[mz]/.test(b)||(h+=`M ${u.x} ${u.y} `),b){case"m":case"l":{let e="m"===b;for(let t=0;t<v;t+=2)h+=e?"M ":"L ",u=m(t),h+=g(u),e&&(d=u,e=!1);o=u;break}case"h":case"v":{const e="h"===b?"x":"y";u={x:u.x,y:u.y};for(let t=0;t<v;t++)u[e]=p(t,e),h+=`L ${g(u)}`;o=u;break}case"c":for(let e=0;e<v;e+=6){const t=m(e);o=m(e+2),u=m(e+4),h+=`C ${g(t)}${g(o)}${g(u)}`}break;case"s":for(let e=0;e<v;e+=4){const t=/[cs]/.test(s)?{x:2*u.x-o.x,y:2*u.y-o.y}:u;o=m(e),u=m(e+2),h+=`C ${g(t)}${g(o)}${g(u)}`,s=b}break;case"q":for(let e=0;e<v;e+=4)o=m(e),u=m(e+2),h+=`Q ${g(o)}${g(u)}`;break;case"t":for(let e=0;e<v;e+=2)o=/[qt]/.test(s)?{x:2*u.x-o.x,y:2*u.y-o.y}:u,u=m(e),h+=`Q ${g(o)}${g(u)}`,s=b;break;case"a":for(let e=0;e<v;e+=7){u=m(e+5);const n=+i[e],r=+i[e+1],s=+i[e+2],o=+i[e+3];let c=+i[e+4];const d=l(n,r,s,t),p=a(t);d?((p.x>0&&p.y<0||p.x<0&&p.y>0)&&(c^=1),h+=`A ${f(Math.abs(d.radiusX))} ${f(Math.abs(d.radiusY))} ${f(d.rotation)} ${o} ${c} ${g(u)}`):h+=`L ${g(u)}`}break;case"z":h+="Z ",u=d}s=b}return h}(s.attributes.d.value,g)),s.removeAttribute("transform");const f=a(g);s.setAttribute("stroke-width",d(f.x,f.y)*y),b&&s.setAttribute("fill",b),v&&s.setAttribute("stroke",v)}else(function(e){return e.tagName&&c.includes(e.tagName.toLowerCase())})(s)&&(y&&!s.attributes["stroke-width"]&&s.setAttribute("stroke-width",y),b&&!s.attributes.fill&&s.setAttribute("fill",b),v&&!s.attributes.stroke&&s.setAttribute("stroke",v),g=r.compose(g,o(s)),r.toString(g)===r.toString(r.identity())?s.removeAttribute("transform"):s.setAttribute("transform",r.toString(g)))};f(e,s,1)}},function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";function r(e,t){return Array.isArray(t)?[e.a*t[0]+e.c*t[1]+e.e,e.b*t[0]+e.d*t[1]+e.f]:{x:e.a*t.x+e.c*t.y+e.e,y:e.b*t.x+e.d*t.y+e.f}}function i(e,t){return t.map((function(t){return r(e,t)}))}function s(e){return{a:parseFloat(e.a),b:parseFloat(e.b),c:parseFloat(e.c),d:parseFloat(e.d),e:parseFloat(e.e),f:parseFloat(e.f)}}n.r(t);var o=/^matrix\(\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*\)$/i;function a(e){var t=e.match(o);if(null===t||t.length<7)throw new Error("'"+e+"' is not a matrix");return{a:parseFloat(t[1]),b:parseFloat(t[2]),c:parseFloat(t[3]),d:parseFloat(t[4]),e:parseFloat(t[5]),f:parseFloat(t[6])}}function l(){return{a:1,c:0,e:0,b:0,d:1,f:0}}function c(e){var t=e.a,n=e.b,r=e.c,i=e.d,s=e.e,o=e.f,a=t*i-n*r;return{a:i/a,b:n/-a,c:r/-a,d:t/a,e:(i*s-r*o)/-a,f:(n*s-t*o)/a}}var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d=function(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)},h=function(e){return null!=e&&"object"===(void 0===e?"undefined":u(e))};function p(e){return h(e)&&e.hasOwnProperty("a")&&d(e.a)&&e.hasOwnProperty("b")&&d(e.b)&&e.hasOwnProperty("c")&&d(e.c)&&e.hasOwnProperty("d")&&d(e.d)&&e.hasOwnProperty("e")&&d(e.e)&&e.hasOwnProperty("f")&&d(e.f)}function m(e){return void 0===e}function f(e){return{a:1,c:0,e:e,b:0,d:1,f:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0}}function g(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=function(e,t){return{a:e.a*t.a+e.c*t.b,c:e.a*t.c+e.c*t.d,e:e.a*t.e+e.c*t.f+e.e,b:e.b*t.a+e.d*t.b,d:e.b*t.c+e.d*t.d,f:e.b*t.e+e.d*t.f+e.f}};switch((t=Array.isArray(t[0])?t[0]:t).length){case 0:throw new Error("no matrices provided");case 1:return t[0];case 2:return r(t[0],t[1]);default:var i=function(e){return Array.isArray(e)?e:Array.from(e)}(t),s=i[0],o=i[1],a=i.slice(2),l=r(s,o);return g.apply(void 0,[l].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(a)))}}function y(){return g.apply(void 0,arguments)}var b=Math.cos,v=Math.sin,S=Math.PI;function w(e,t,n){var r=b(e),i=v(e),s={a:r,c:-i,e:0,b:i,d:r,f:0};return m(t)||m(n)?s:g([f(t,n),s,f(-t,-n)])}function k(e){return w(e*S/180,arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0)}function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return m(t)&&(t=e),{a:e,c:0,e:0,b:0,d:t,f:0}}function x(e,t){return{a:1,c:e,e:0,b:t,d:1,f:0}}var E=Math.tan;function A(e,t){return{a:1,c:E(e),e:0,b:E(t),d:1,f:0}}function C(e,t){return A(e*Math.PI/180,t*Math.PI/180)}function I(e){return M(e)}function O(e){return M(e)}function M(e){return"matrix("+e.a+","+e.b+","+e.c+","+e.d+","+e.e+","+e.f+")"}n.d(t,"applyToPoint",(function(){return r})),n.d(t,"applyToPoints",(function(){return i})),n.d(t,"fromObject",(function(){return s})),n.d(t,"fromString",(function(){return a})),n.d(t,"identity",(function(){return l})),n.d(t,"inverse",(function(){return c})),n.d(t,"isAffineMatrix",(function(){return p})),n.d(t,"rotate",(function(){return w})),n.d(t,"rotateDEG",(function(){return k})),n.d(t,"scale",(function(){return T})),n.d(t,"shear",(function(){return x})),n.d(t,"skew",(function(){return A})),n.d(t,"skewDEG",(function(){return C})),n.d(t,"toCSS",(function(){return I})),n.d(t,"toSVG",(function(){return O})),n.d(t,"toString",(function(){return M})),n.d(t,"transform",(function(){return g})),n.d(t,"compose",(function(){return y})),n.d(t,"translate",(function(){return f}))}])},function(e,t,n){const r=n(30);r.enable(),e.exports=r("scratch-svg-render")},function(e,t,n){let r;e.exports=function(){if(r)return r;r={"Sans Serif":n(258),Serif:n(259),Handwriting:n(260),Marker:n(261),Curly:n(262),Pixel:n(263),Scratch:n(264)};for(const e in r){const t=r[e];r[e]="@font-face {"+'font-family: "'.concat(e,'";src: url("data:font/woff2;base64,').concat(t,'");}')}if(!document.getElementById("scratch-font-styles")){let e="";for(const t in r)e+=r[t];const t=document.createElement("style");t.id="scratch-font-styles",t.textContent=e,document.body.insertBefore(t,document.body.firstChild)}return r}},function(e,t){e.exports=" "},function(e,t){e.exports=" "},function(e,t){e.exports=" "},function(e,t){e.exports=" "},function(e,t){e.exports=" "},function(e,t){e.exports=" "},function(e,t){e.exports=" "},function(e,t,n){const r=n(266);e.exports=class{constructor(e,t){this._makeImage=e||(()=>new Image),this._makeCanvas=t||(()=>document.createElement("canvas")),this.stageWidth=480,this.stageHeight=360}setStageSize(e,t){this.stageWidth=e,this.stageHeight=t}resize(e,t,n){const r=this._makeCanvas();r.width=t,r.height=e.height;let i=r.getContext("2d");i.imageSmoothingEnabled=!1,i.drawImage(e,0,0,r.width,r.height);const s=this._makeCanvas();return s.width=t,s.height=n,i=s.getContext("2d"),i.imageSmoothingEnabled=!1,i.drawImage(r,0,0,s.width,s.height),s}convertResolution1Bitmap(e,t){const n=this._makeImage();n.src=e,n.onload=()=>{t(null,this.resize(n,2*n.width,2*n.height).toDataURL())},n.onerror=()=>{t("Image load failed")}}getResizedWidthHeight(e,t){const n=this.stageWidth,r=this.stageHeight;if(e<=n&&t<=r)return{width:2*e,height:2*t};if(e<=2*n&&t<=2*r)return{width:e,height:t};const i=e/t;return i>=n/r?{width:2*n,height:2*n/i}:{width:2*r*i,height:2*r}}importBitmap(e,t){let n=e;return e instanceof ArrayBuffer&&(n=this.convertBinaryToDataURI(e,t)),new Promise(((e,t)=>{const r=this._makeImage();r.src=n,r.onload=()=>{const t=this.getResizedWidthHeight(r.width,r.height);if(t.width===r.width&&t.height===r.height)e(this.convertDataURIToBinary(n));else{const n=this.resize(r,t.width,t.height).toDataURL();e(this.convertDataURIToBinary(n))}},r.onerror=()=>{t("Image load failed")}}))}convertDataURIToBinary(e){const t=";base64,",n=e.indexOf(t)+8,r=e.substring(n),i=window.atob(r),s=i.length,o=new Uint8Array(new ArrayBuffer(s));for(let e=0;e<s;e++)o[e]=i.charCodeAt(e);return o}convertBinaryToDataURI(e,t){return`data:${t};base64,${r.fromByteArray(new Uint8Array(e))}`}}},function(e,t,n){"use strict";t.byteLength=function(e){return 3*e.length/4-l(e)},t.toByteArray=function(e){var t,n,r,o,a,c=e.length;o=l(e),a=new s(3*c/4-o),n=o>0?c-4:c;var u=0;for(t=0;t<n;t+=4)r=i[e.charCodeAt(t)]<<18|i[e.charCodeAt(t+1)]<<12|i[e.charCodeAt(t+2)]<<6|i[e.charCodeAt(t+3)],a[u++]=r>>16&255,a[u++]=r>>8&255,a[u++]=255&r;2===o?(r=i[e.charCodeAt(t)]<<2|i[e.charCodeAt(t+1)]>>4,a[u++]=255&r):1===o&&(r=i[e.charCodeAt(t)]<<10|i[e.charCodeAt(t+1)]<<4|i[e.charCodeAt(t+2)]>>2,a[u++]=r>>8&255,a[u++]=255&r);return a},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,s="",o=[],a=16383,l=0,u=n-i;l<u;l+=a)o.push(c(e,l,l+a>u?u:l+a));1===i?(t=e[n-1],s+=r[t>>2],s+=r[t<<4&63],s+="=="):2===i&&(t=(e[n-2]<<8)+e[n-1],s+=r[t>>10],s+=r[t>>4&63],s+=r[t<<2&63],s+="=");return o.push(s),o.join("")};for(var r=[],i=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],i[o.charCodeAt(a)]=a;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function c(e,t,n){for(var i,s,o=[],a=t;a<n;a+=3)i=(e[a]<<16)+(e[a+1]<<8)+e[a+2],o.push(r[(s=i)>>18&63]+r[s>>12&63]+r[s>>6&63]+r[63&s]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t,n){const r=n(87),{generate:i,parse:s,walk:o}=n(268),a=n(85),l={};let c,u;if(a.isSupported&&(a.addHook("beforeSanitizeAttributes",(e=>{if(e&&e.href&&e.href.baseVal){const t=e.href.baseVal.replace(/\s/g,"");"data:"!==t.slice(0,5)&&"#"!==t.slice(0,1)&&(e.attributes.getNamedItem("xlink:href")&&(e.attributes.removeNamedItem("xlink:href"),delete e["xlink:href"]),e.attributes.getNamedItem("href")&&(e.attributes.removeNamedItem("href"),delete e.href))}return e})),a.addHook("uponSanitizeElement",((e,t)=>{if("style"===t.tagName){const t=s(e.textContent);let n=!1;o(t,((e,t,r)=>{"Atrule"===e.type&&"import"===e.name&&(r.remove(t),n=!0)})),n&&(e.textContent=i(t))}}))),"undefined"==typeof TextDecoder||"undefined"==typeof TextEncoder){const e=n(64);c=e.TextDecoder,u=e.TextEncoder}else c=TextDecoder,u=TextEncoder;l.sanitizeByteStream=function(e){const t=new c,n=new u,r=l.sanitizeSvgText(t.decode(e));return n.encode(r)};const d=`<!${"-".repeat(2)}`,h=`${"-".repeat(2)}>`,p=new RegExp(`${d}rotationCenter:(-?[\\d\\.]+):(-?[\\d\\.]+)${h}$`);l.sanitizeSvgText=function(e){let t=a.sanitize(e,{USE_PROFILES:{svg:!0}});t.indexOf("]&gt;")>=0&&(t=t.substring(5,t.length)),t=r(t);const n=e.match(p);return n&&(t+=n[0]),t},e.exports=l},function(e,t,n){e.exports=n(269)},function(e,t,n){e.exports=n(270).create(function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}(n(296),n(341),n(365))),e.exports.version=n(366).version},function(e,t,n){var r=n(20),i=n(90),s=n(36),o=n(271),a=n(281),l=n(0),c=n(282),u=n(285),d=n(292),h=n(293),p=n(294),m=n(57),f=n(295);function g(e){var t=c(e),n=h(e),y=u(e),b=d(n),v={List:r,SyntaxError:i,TokenStream:s,Lexer:o,vendorPrefix:m.vendorPrefix,keyword:m.keyword,property:m.property,isCustomProperty:m.isCustomProperty,definitionSyntax:a,lexer:null,createLexer:function(e){return new o(e,v,v.lexer.structure)},tokenize:l,parse:t,walk:n,generate:y,find:n.find,findLast:n.findLast,findAll:n.findAll,clone:p,fromPlainObject:b.fromPlainObject,toPlainObject:b.toPlainObject,createSyntax:function(e){return g(f({},e))},fork:function(t){var n=f({},e);return g("function"==typeof t?t(n,Object.assign):f(n,t))}};return v.lexer=new o({generic:!0,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},v),v}t.create=function(e){return g(f({},e))}},function(e,t,n){var r=n(92).SyntaxReferenceError,i=n(92).SyntaxMatchError,s=n(57),o=n(272),a=n(58),l=n(56),c=n(95),u=n(276),d=n(96).buildMatchGraph,h=n(277).matchAsTree,p=n(278),m=n(279),f=n(280).getStructureFromConfig,g=d("inherit | initial | unset"),y=d("inherit | initial | unset | <-ms-legacy-expression>");function b(e,t,n){var r={};for(var i in e)e[i].syntax&&(r[i]=n?e[i].syntax:l(e[i].syntax,{compact:t}));return r}function v(e,t,n){const r={};for(const[i,s]of Object.entries(e))r[i]={prelude:s.prelude&&(n?s.prelude.syntax:l(s.prelude.syntax,{compact:t})),descriptors:s.descriptors&&b(s.descriptors,t,n)};return r}function S(e,t,n){return{matched:e,iterations:n,error:t,getTrace:p.getTrace,isType:p.isType,isProperty:p.isProperty,isKeyword:p.isKeyword}}function w(e,t,n,r){var s,o=u(n,e.syntax);return function(e){for(var t=0;t<e.length;t++)if("var("===e[t].value.toLowerCase())return!0;return!1}(o)?S(null,new Error("Matching for a tree with var() is not supported")):(r&&(s=h(o,e.valueCommonSyntax,e)),r&&s.match||(s=h(o,t.match,e)).match?S(s.match,null,s.iterations):S(null,new i(s.reason,t.syntax,n,s),s.iterations))}var k=function(e,t,n){if(this.valueCommonSyntax=g,this.syntax=t,this.generic=!1,this.atrules={},this.properties={},this.types={},this.structure=n||f(e),e){if(e.types)for(var r in e.types)this.addType_(r,e.types[r]);if(e.generic)for(var r in this.generic=!0,o)this.addType_(r,o[r]);if(e.atrules)for(var r in e.atrules)this.addAtrule_(r,e.atrules[r]);if(e.properties)for(var r in e.properties)this.addProperty_(r,e.properties[r])}};k.prototype={structure:{},checkStructure:function(e){function t(e,t){r.push({node:e,message:t})}var n=this.structure,r=[];return this.syntax.walk(e,(function(e){n.hasOwnProperty(e.type)?n[e.type].check(e,t):t(e,"Unknown node type `"+e.type+"`")})),!!r.length&&r},createDescriptor:function(e,t,n,r=null){var i={type:t,name:n},s={type:t,name:n,parent:r,syntax:null,match:null};return"function"==typeof e?s.match=d(e,i):("string"==typeof e?Object.defineProperty(s,"syntax",{get:function(){return Object.defineProperty(s,"syntax",{value:a(e)}),s.syntax}}):s.syntax=e,Object.defineProperty(s,"match",{get:function(){return Object.defineProperty(s,"match",{value:d(s.syntax,i)}),s.match}})),s},addAtrule_:function(e,t){t&&(this.atrules[e]={type:"Atrule",name:e,prelude:t.prelude?this.createDescriptor(t.prelude,"AtrulePrelude",e):null,descriptors:t.descriptors?Object.keys(t.descriptors).reduce(((n,r)=>(n[r]=this.createDescriptor(t.descriptors[r],"AtruleDescriptor",r,e),n)),{}):null})},addProperty_:function(e,t){t&&(this.properties[e]=this.createDescriptor(t,"Property",e))},addType_:function(e,t){t&&(this.types[e]=this.createDescriptor(t,"Type",e),t===o["-ms-legacy-expression"]&&(this.valueCommonSyntax=y))},checkAtruleName:function(e){if(!this.getAtrule(e))return new r("Unknown at-rule","@"+e)},checkAtrulePrelude:function(e,t){let n=this.checkAtruleName(e);if(n)return n;var r=this.getAtrule(e);return!r.prelude&&t?new SyntaxError("At-rule `@"+e+"` should not contain a prelude"):r.prelude&&!t?new SyntaxError("At-rule `@"+e+"` should contain a prelude"):void 0},checkAtruleDescriptorName:function(e,t){let n=this.checkAtruleName(e);if(n)return n;var i=this.getAtrule(e),o=s.keyword(t);return i.descriptors?i.descriptors[o.name]||i.descriptors[o.basename]?void 0:new r("Unknown at-rule descriptor",t):new SyntaxError("At-rule `@"+e+"` has no known descriptors")},checkPropertyName:function(e){return s.property(e).custom?new Error("Lexer matching doesn't applicable for custom properties"):this.getProperty(e)?void 0:new r("Unknown property",e)},matchAtrulePrelude:function(e,t){var n=this.checkAtrulePrelude(e,t);return n?S(null,n):t?w(this,this.getAtrule(e).prelude,t,!1):S(null,null)},matchAtruleDescriptor:function(e,t,n){var r=this.checkAtruleDescriptorName(e,t);if(r)return S(null,r);var i=this.getAtrule(e),o=s.keyword(t);return w(this,i.descriptors[o.name]||i.descriptors[o.basename],n,!1)},matchDeclaration:function(e){return"Declaration"!==e.type?S(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)},matchProperty:function(e,t){var n=this.checkPropertyName(e);return n?S(null,n):w(this,this.getProperty(e),t,!0)},matchType:function(e,t){var n=this.getType(e);return n?w(this,n,t,!1):S(null,new r("Unknown type",e))},match:function(e,t){return"string"==typeof e||e&&e.type?("string"!=typeof e&&e.match||(e=this.createDescriptor(e,"Type","anonymous")),w(this,e,t,!1)):S(null,new r("Bad syntax"))},findValueFragments:function(e,t,n,r){return m.matchFragments(this,t,this.matchProperty(e,t),n,r)},findDeclarationValueFragments:function(e,t,n){return m.matchFragments(this,e.value,this.matchDeclaration(e),t,n)},findAllFragments:function(e,t,n){var r=[];return this.syntax.walk(e,{visit:"Declaration",enter:function(e){r.push.apply(r,this.findDeclarationValueFragments(e,t,n))}.bind(this)}),r},getAtrule:function(e,t=!0){var n=s.keyword(e);return(n.vendor&&t?this.atrules[n.name]||this.atrules[n.basename]:this.atrules[n.name])||null},getAtrulePrelude:function(e,t=!0){const n=this.getAtrule(e,t);return n&&n.prelude||null},getAtruleDescriptor:function(e,t){return this.atrules.hasOwnProperty(e)&&this.atrules.declarators&&this.atrules[e].declarators[t]||null},getProperty:function(e,t=!0){var n=s.property(e);return(n.vendor&&t?this.properties[n.name]||this.properties[n.basename]:this.properties[n.name])||null},getType:function(e){return this.types.hasOwnProperty(e)?this.types[e]:null},validate:function(){function e(r,i,s,o){if(s.hasOwnProperty(i))return s[i];s[i]=!1,null!==o.syntax&&c(o.syntax,(function(o){if("Type"===o.type||"Property"===o.type){var a="Type"===o.type?r.types:r.properties,l="Type"===o.type?t:n;a.hasOwnProperty(o.name)&&!e(r,o.name,l,a[o.name])||(s[i]=!0)}}),this)}var t={},n={};for(var r in this.types)e(this,r,t,this.types[r]);for(var r in this.properties)e(this,r,n,this.properties[r]);return t=Object.keys(t).filter((function(e){return t[e]})),n=Object.keys(n).filter((function(e){return n[e]})),t.length||n.length?{types:t,properties:n}:null},dump:function(e,t){return{generic:this.generic,types:b(this.types,!t,e),properties:b(this.properties,!t,e),atrules:v(this.atrules,!t,e)}},toString:function(){return JSON.stringify(this.dump())}},e.exports=k},function(e,t,n){var r,i=n(0),s=i.isIdentifierStart,o=i.isHexDigit,a=i.isDigit,l=i.cmpStr,c=i.consumeNumber,u=i.TYPE,d=n(273),h=n(274),p=["unset","initial","inherit"],m=["calc(","-moz-calc(","-webkit-calc("];function f(e,t){return t<e.length?e.charCodeAt(t):0}function g(e,t){return l(e,0,e.length,t)}function y(e,t){for(var n=0;n<t.length;n++)if(g(e,t[n]))return!0;return!1}function b(e,t){return t===e.length-2&&(92===e.charCodeAt(t)&&a(e.charCodeAt(t+1)))}function v(e,t,n){if(e&&"Range"===e.type){var r=Number(void 0!==n&&n!==t.length?t.substr(0,n):t);if(isNaN(r))return!0;if(null!==e.min&&r<e.min)return!0;if(null!==e.max&&r>e.max)return!0}return!1}function S(e,t){var n=e.index,r=0;do{if(r++,e.balance<=n)break}while(e=t(r));return r}function w(e){return function(t,n,r){return null===t?0:t.type===u.Function&&y(t.value,m)?S(t,n):e(t,n,r)}}function k(e){return function(t){return null===t||t.type!==e?0:1}}function T(e){return function(t,n,r){if(null===t||t.type!==u.Dimension)return 0;var i=c(t.value,0);if(null!==e){var s=t.value.indexOf("\\",i),o=-1!==s&&b(t.value,s)?t.value.substring(i,s):t.value.substr(i);if(!1===e.hasOwnProperty(o.toLowerCase()))return 0}return v(r,t.value,i)?0:1}}function x(e){return"function"!=typeof e&&(e=function(){return 0}),function(t,n,r){return null!==t&&t.type===u.Number&&0===Number(t.value)?1:e(t,n,r)}}e.exports={"ident-token":k(u.Ident),"function-token":k(u.Function),"at-keyword-token":k(u.AtKeyword),"hash-token":k(u.Hash),"string-token":k(u.String),"bad-string-token":k(u.BadString),"url-token":k(u.Url),"bad-url-token":k(u.BadUrl),"delim-token":k(u.Delim),"number-token":k(u.Number),"percentage-token":k(u.Percentage),"dimension-token":k(u.Dimension),"whitespace-token":k(u.WhiteSpace),"CDO-token":k(u.CDO),"CDC-token":k(u.CDC),"colon-token":k(u.Colon),"semicolon-token":k(u.Semicolon),"comma-token":k(u.Comma),"[-token":k(u.LeftSquareBracket),"]-token":k(u.RightSquareBracket),"(-token":k(u.LeftParenthesis),")-token":k(u.RightParenthesis),"{-token":k(u.LeftCurlyBracket),"}-token":k(u.RightCurlyBracket),string:k(u.String),ident:k(u.Ident),"custom-ident":function(e){if(null===e||e.type!==u.Ident)return 0;var t=e.value.toLowerCase();return y(t,p)||g(t,"default")?0:1},"custom-property-name":function(e){return null===e||e.type!==u.Ident||45!==f(e.value,0)||45!==f(e.value,1)?0:1},"hex-color":function(e){if(null===e||e.type!==u.Hash)return 0;var t=e.value.length;if(4!==t&&5!==t&&7!==t&&9!==t)return 0;for(var n=1;n<t;n++)if(!o(e.value.charCodeAt(n)))return 0;return 1},"id-selector":function(e){return null===e||e.type!==u.Hash?0:s(f(e.value,1),f(e.value,2),f(e.value,3))?1:0},"an-plus-b":d,urange:h,"declaration-value":function(e,t){if(!e)return 0;var n=0,r=0,i=e.index;e:do{switch(e.type){case u.BadString:case u.BadUrl:break e;case u.RightCurlyBracket:case u.RightParenthesis:case u.RightSquareBracket:if(e.balance>e.index||e.balance<i)break e;r--;break;case u.Semicolon:if(0===r)break e;break;case u.Delim:if("!"===e.value&&0===r)break e;break;case u.Function:case u.LeftParenthesis:case u.LeftSquareBracket:case u.LeftCurlyBracket:r++}if(n++,e.balance<=i)break}while(e=t(n));return n},"any-value":function(e,t){if(!e)return 0;var n=e.index,r=0;e:do{switch(e.type){case u.BadString:case u.BadUrl:break e;case u.RightCurlyBracket:case u.RightParenthesis:case u.RightSquareBracket:if(e.balance>e.index||e.balance<n)break e}if(r++,e.balance<=n)break}while(e=t(r));return r},dimension:w(T(null)),angle:w(T({deg:!0,grad:!0,rad:!0,turn:!0})),decibel:w(T({db:!0})),frequency:w(T({hz:!0,khz:!0})),flex:w(T({fr:!0})),length:w(x(T({px:!0,mm:!0,cm:!0,in:!0,pt:!0,pc:!0,q:!0,em:!0,ex:!0,ch:!0,rem:!0,vh:!0,vw:!0,vmin:!0,vmax:!0,vm:!0}))),resolution:w(T({dpi:!0,dpcm:!0,dppx:!0,x:!0})),semitones:w(T({st:!0})),time:w(T({s:!0,ms:!0})),percentage:w((function(e,t,n){return null===e||e.type!==u.Percentage||v(n,e.value,e.value.length-1)?0:1})),zero:x(),number:w((function(e,t,n){if(null===e)return 0;var r=c(e.value,0);return r===e.value.length||b(e.value,r)?v(n,e.value,r)?0:1:0})),integer:w((function(e,t,n){if(null===e||e.type!==u.Number)return 0;for(var r=43===e.value.charCodeAt(0)||45===e.value.charCodeAt(0)?1:0;r<e.value.length;r++)if(!a(e.value.charCodeAt(r)))return 0;return v(n,e.value,r)?0:1})),"-ms-legacy-expression":(r="expression",r+="(",function(e,t){return null!==e&&g(e.value,r)?S(e,t):0})}},function(e,t,n){var r=n(0).isDigit,i=n(0).cmpChar,s=n(0).TYPE,o=s.Delim,a=s.WhiteSpace,l=s.Comment,c=s.Ident,u=s.Number,d=s.Dimension,h=43,p=45,m=!0;function f(e,t){return null!==e&&e.type===o&&e.value.charCodeAt(0)===t}function g(e,t,n){for(;null!==e&&(e.type===a||e.type===l);)e=n(++t);return t}function y(e,t,n,i){if(!e)return 0;var s=e.value.charCodeAt(t);if(s===h||s===p){if(n)return 0;t++}for(;t<e.value.length;t++)if(!r(e.value.charCodeAt(t)))return 0;return i+1}function b(e,t,n){var r=!1,i=g(e,t,n);if(null===(e=n(i)))return t;if(e.type!==u){if(!f(e,h)&&!f(e,p))return t;if(r=!0,i=g(n(++i),i,n),null===(e=n(i))&&e.type!==u)return 0}if(!r){var s=e.value.charCodeAt(0);if(s!==h&&s!==p)return 0}return y(e,r?0:1,r,i)}e.exports=function(e,t){var n=0;if(!e)return 0;if(e.type===u)return y(e,0,false,n);if(e.type===c&&e.value.charCodeAt(0)===p){if(!i(e.value,1,110))return 0;switch(e.value.length){case 2:return b(t(++n),n,t);case 3:return e.value.charCodeAt(2)!==p?0:(n=g(t(++n),n,t),y(e=t(n),0,m,n));default:return e.value.charCodeAt(2)!==p?0:y(e,3,m,n)}}else if(e.type===c||f(e,h)&&t(n+1).type===c){if(e.type!==c&&(e=t(++n)),null===e||!i(e.value,0,110))return 0;switch(e.value.length){case 1:return b(t(++n),n,t);case 2:return e.value.charCodeAt(1)!==p?0:(n=g(t(++n),n,t),y(e=t(n),0,m,n));default:return e.value.charCodeAt(1)!==p?0:y(e,2,m,n)}}else if(e.type===d){for(var s=e.value.charCodeAt(0),o=s===h||s===p?1:0,a=o;a<e.value.length&&r(e.value.charCodeAt(a));a++);return a===o?0:i(e.value,a,110)?a+1===e.value.length?b(t(++n),n,t):e.value.charCodeAt(a+1)!==p?0:a+2===e.value.length?(n=g(t(++n),n,t),y(e=t(n),0,m,n)):y(e,a+2,m,n):0}return 0}},function(e,t,n){var r=n(0).isHexDigit,i=n(0).cmpChar,s=n(0).TYPE,o=s.Ident,a=s.Delim,l=s.Number,c=s.Dimension;function u(e,t){return null!==e&&e.type===a&&e.value.charCodeAt(0)===t}function d(e,t){return e.value.charCodeAt(0)===t}function h(e,t,n){for(var i=t,s=0;i<e.value.length;i++){var o=e.value.charCodeAt(i);if(45===o&&n&&0!==s)return h(e,t+s+1,!1)>0?6:0;if(!r(o))return 0;if(++s>6)return 0}return s}function p(e,t,n){if(!e)return 0;for(;u(n(t),63);){if(++e>6)return 0;t++}return t}e.exports=function(e,t){var n=0;if(null===e||e.type!==o||!i(e.value,0,117))return 0;if(null===(e=t(++n)))return 0;if(u(e,43))return null===(e=t(++n))?0:e.type===o?p(h(e,0,!0),++n,t):u(e,63)?p(1,++n,t):0;if(e.type===l){if(!d(e,43))return 0;var r=h(e,1,!0);return 0===r?0:null===(e=t(++n))?n:e.type===c||e.type===l?d(e,45)&&h(e,1,!1)?n+1:0:p(r,n,t)}return e.type===c&&d(e,43)?p(h(e,1,!0),++n,t):0}},function(e,t,n){var r=n(94),i=function(e){this.str=e,this.pos=0};i.prototype={charCodeAt:function(e){return e<this.str.length?this.str.charCodeAt(e):0},charCode:function(){return this.charCodeAt(this.pos)},nextCharCode:function(){return this.charCodeAt(this.pos+1)},nextNonWsCode:function(e){return this.charCodeAt(this.findWsEnd(e))},findWsEnd:function(e){for(;e<this.str.length;e++){var t=this.str.charCodeAt(e);if(13!==t&&10!==t&&12!==t&&32!==t&&9!==t)break}return e},substringToPos:function(e){return this.str.substring(this.pos,this.pos=e)},eat:function(e){this.charCode()!==e&&this.error("Expect `"+String.fromCharCode(e)+"`"),this.pos++},peek:function(){return this.pos<this.str.length?this.str.charAt(this.pos++):""},error:function(e){throw new r(e,this.str,this.pos)}},e.exports=i},function(e,t,n){var r=n(0),i=new(n(36)),s={decorator:function(e){var t=null,n={len:0,node:null},r=[n],i="";return{children:e.children,node:function(n){var r=t;t=n,e.node.call(this,n),t=r},chunk:function(e){i+=e,n.node!==t?r.push({len:e.length,node:t}):n.len+=e.length},result:function(){return o(i,r)}}}};function o(e,t){var n=[],s=0,o=0,a=t?t[o].node:null;for(r(e,i);!i.eof;){if(t)for(;o<t.length&&s+t[o].len<=i.tokenStart;)s+=t[o++].len,a=t[o].node;n.push({type:i.tokenType,value:i.getTokenValue(),index:i.tokenIndex,balance:i.balance[i.tokenIndex],node:a}),i.next()}return n}e.exports=function(e,t){return"string"==typeof e?o(e,null):t.generate(e,s)}},function(e,t,n){var r=Object.prototype.hasOwnProperty,i=n(96),s=i.MATCH,o=i.MISMATCH,a=i.DISALLOW_EMPTY,l=n(37).TYPE,c=0,u=1,d=2,h=3,p="Match",m="Mismatch",f="Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)",g=15e3,y=0;function b(e){for(var t=null,n=null,r=e;null!==r;)n=r.prev,r.prev=t,t=r,r=n;return t}function v(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r>=65&&r<=90&&(r|=32),r!==t.charCodeAt(n))return!1}return!0}function S(e){return null===e||(e.type===l.Comma||e.type===l.Function||e.type===l.LeftParenthesis||e.type===l.LeftSquareBracket||e.type===l.LeftCurlyBracket||function(e){return e.type===l.Delim&&"?"!==e.value}(e))}function w(e){return null===e||(e.type===l.RightParenthesis||e.type===l.RightSquareBracket||e.type===l.RightCurlyBracket||e.type===l.Delim)}function k(e,t,n){function i(){do{P++,D=P<e.length?e[P]:null}while(null!==D&&(D.type===l.WhiteSpace||D.type===l.Comment))}function b(t){var n=P+t;return n<e.length?e[n]:null}function k(e,t){return{nextState:e,matchStack:B,syntaxStack:C,thenStack:I,tokenIndex:P,prev:t}}function T(e){I={nextState:e,matchStack:B,syntaxStack:C,prev:I}}function x(e){O=k(e,O)}function E(){B={type:u,syntax:t.syntax,token:D,prev:B},i(),M=null,P>L&&(L=P)}function A(){B=B.type===d?B.prev:{type:h,syntax:C.syntax,token:B.token,prev:B},C=C.prev}var C=null,I=null,O=null,M=null,N=0,R=null,D=null,P=-1,L=0,B={type:c,syntax:null,token:null,prev:null};for(i();null===R&&++N<g;)switch(t.type){case"Match":if(null===I){if(null!==D&&(P!==e.length-1||"\\0"!==D.value&&"\\9"!==D.value)){t=o;break}R=p;break}if((t=I.nextState)===a){if(I.matchStack===B){t=o;break}t=s}for(;I.syntaxStack!==C;)A();I=I.prev;break;case"Mismatch":if(null!==M&&!1!==M)(null===O||P>O.tokenIndex)&&(O=M,M=!1);else if(null===O){R=m;break}t=O.nextState,I=O.thenStack,C=O.syntaxStack,B=O.matchStack,P=O.tokenIndex,D=P<e.length?e[P]:null,O=O.prev;break;case"MatchGraph":t=t.match;break;case"If":t.else!==o&&x(t.else),t.then!==s&&T(t.then),t=t.match;break;case"MatchOnce":t={type:"MatchOnceBuffer",syntax:t,index:0,mask:0};break;case"MatchOnceBuffer":var z=t.syntax.terms;if(t.index===z.length){if(0===t.mask||t.syntax.all){t=o;break}t=s;break}if(t.mask===(1<<z.length)-1){t=s;break}for(;t.index<z.length;t.index++){var U=1<<t.index;if(!(t.mask&U)){x(t),T({type:"AddMatchOnce",syntax:t.syntax,mask:t.mask|U}),t=z[t.index++];break}}break;case"AddMatchOnce":t={type:"MatchOnceBuffer",syntax:t.syntax,index:0,mask:t.mask};break;case"Enum":if(null!==D)if(-1!==(G=D.value.toLowerCase()).indexOf("\\")&&(G=G.replace(/\\[09].*$/,"")),r.call(t.map,G)){t=t.map[G];break}t=o;break;case"Generic":var j=null!==C?C.opts:null,F=P+Math.floor(t.fn(D,b,j));if(!isNaN(F)&&F>P){for(;P<F;)E();t=s}else t=o;break;case"Type":case"Property":var W="Type"===t.type?"types":"properties",V=r.call(n,W)?n[W][t.name]:null;if(!V||!V.match)throw new Error("Bad syntax reference: "+("Type"===t.type?"<"+t.name+">":"<'"+t.name+"'>"));if(!1!==M&&null!==D&&"Type"===t.type)if("custom-ident"===t.name&&D.type===l.Ident||"length"===t.name&&"0"===D.value){null===M&&(M=k(t,O)),t=o;break}C={syntax:t.syntax,opts:t.syntax.opts||null!==C&&C.opts||null,prev:C},B={type:d,syntax:t.syntax,token:B.token,prev:B},t=V.match;break;case"Keyword":var G=t.name;if(null!==D){var q=D.value;if(-1!==q.indexOf("\\")&&(q=q.replace(/\\[09].*$/,"")),v(q,G)){E(),t=s;break}}t=o;break;case"AtKeyword":case"Function":if(null!==D&&v(D.value,t.name)){E(),t=s;break}t=o;break;case"Token":if(null!==D&&D.value===t.value){E(),t=s;break}t=o;break;case"Comma":null!==D&&D.type===l.Comma?S(B.token)?t=o:(E(),t=w(D)?o:s):t=S(B.token)||w(D)?s:o;break;case"String":var Y="";for(F=P;F<e.length&&Y.length<t.value.length;F++)Y+=e[F].value;if(v(Y,t.value)){for(;P<F;)E();t=s}else t=o;break;default:throw new Error("Unknown node type: "+t.type)}switch(y+=N,R){case null:console.warn("[csstree-match] BREAK after "+g+" iterations"),R=f,B=null;break;case p:for(;null!==C;)A();break;default:B=null}return{tokens:e,reason:R,iterations:N,match:B,longestMatch:L}}e.exports={matchAsList:function(e,t,n){var r=k(e,t,n||{});if(null!==r.match){var i=b(r.match).prev;for(r.match=[];null!==i;){switch(i.type){case c:break;case d:case h:r.match.push({type:i.type,syntax:i.syntax});break;default:r.match.push({token:i.token.value,node:i.token.node})}i=i.prev}}return r},matchAsTree:function(e,t,n){var r=k(e,t,n||{});if(null===r.match)return r;var i=r.match,s=r.match={syntax:t.syntax||null,match:[]},o=[s];for(i=b(i).prev;null!==i;){switch(i.type){case d:s.match.push(s={syntax:i.syntax,match:[]}),o.push(s);break;case h:o.pop(),s=o[o.length-1];break;default:s.match.push({syntax:i.syntax||null,token:i.token.value,node:i.token.node})}i=i.prev}return r},getTotalIterationCount:function(){return y}}},function(e,t){function n(e){function t(e){return null!==e&&("Type"===e.type||"Property"===e.type||"Keyword"===e.type)}var n=null;return null!==this.matched&&function r(i){if(Array.isArray(i.match)){for(var s=0;s<i.match.length;s++)if(r(i.match[s]))return t(i.syntax)&&n.unshift(i.syntax),!0}else if(i.node===e)return n=t(i.syntax)?[i.syntax]:[],!0;return!1}(this.matched),n}function r(e,t,r){var i=n.call(e,t);return null!==i&&i.some(r)}e.exports={getTrace:n,isType:function(e,t){return r(this,e,(function(e){return"Type"===e.type&&e.name===t}))},isProperty:function(e,t){return r(this,e,(function(e){return"Property"===e.type&&e.name===t}))},isKeyword:function(e){return r(this,e,(function(e){return"Keyword"===e.type}))}}},function(e,t,n){var r=n(20);function i(e){return"node"in e?e.node:i(e.match[0])}function s(e){return"node"in e?e.node:s(e.match[e.match.length-1])}e.exports={matchFragments:function(e,t,n,o,a){var l=[];return null!==n.matched&&function n(c){if(null!==c.syntax&&c.syntax.type===o&&c.syntax.name===a){var u=i(c),d=s(c);e.syntax.walk(t,(function(e,t,n){if(e===u){var i=new r;do{if(i.appendData(t.data),t.data===d)break;t=t.next}while(null!==t);l.push({parent:n,nodes:i})}}))}Array.isArray(c.match)&&c.match.forEach(n)}(n.matched),l}}},function(e,t,n){var r=n(20),i=Object.prototype.hasOwnProperty;function s(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&e>=0}function o(e){return Boolean(e)&&s(e.offset)&&s(e.line)&&s(e.column)}function a(e,t){return function(n,s){if(!n||n.constructor!==Object)return s(n,"Type of node should be an Object");for(var a in n){var l=!0;if(!1!==i.call(n,a)){if("type"===a)n.type!==e&&s(n,"Wrong node type `"+n.type+"`, expected `"+e+"`");else if("loc"===a){if(null===n.loc)continue;if(n.loc&&n.loc.constructor===Object)if("string"!=typeof n.loc.source)a+=".source";else if(o(n.loc.start)){if(o(n.loc.end))continue;a+=".end"}else a+=".start";l=!1}else if(t.hasOwnProperty(a)){var c=0;for(l=!1;!l&&c<t[a].length;c++){var u=t[a][c];switch(u){case String:l="string"==typeof n[a];break;case Boolean:l="boolean"==typeof n[a];break;case null:l=null===n[a];break;default:"string"==typeof u?l=n[a]&&n[a].type===u:Array.isArray(u)&&(l=n[a]instanceof r)}}}else s(n,"Unknown field `"+a+"` for "+e+" node type");l||s(n,"Bad value for `"+e+"."+a+"`")}}for(var a in t)i.call(t,a)&&!1===i.call(n,a)&&s(n,"Field `"+e+"."+a+"` is missed")}}function l(e,t){var n=t.structure,r={type:String,loc:!0},s={type:'"'+e+'"'};for(var o in n)if(!1!==i.call(n,o)){for(var l=[],c=r[o]=Array.isArray(n[o])?n[o].slice():[n[o]],u=0;u<c.length;u++){var d=c[u];if(d===String||d===Boolean)l.push(d.name);else if(null===d)l.push("null");else if("string"==typeof d)l.push("<"+d+">");else{if(!Array.isArray(d))throw new Error("Wrong value `"+d+"` in `"+e+"."+o+"` structure definition");l.push("List")}}s[o]=l.join(" | ")}return{docs:s,check:a(e,r)}}e.exports={getStructureFromConfig:function(e){var t={};if(e.node)for(var n in e.node)if(i.call(e.node,n)){var r=e.node[n];if(!r.structure)throw new Error("Missed `structure` field in `"+n+"` node type definition");t[n]=l(n,r)}return t}}},function(e,t,n){e.exports={SyntaxError:n(94),parse:n(58),generate:n(56),walk:n(95)}},function(e,t,n){var r=n(283),i=n(90),s=n(36),o=n(20),a=n(0),l=n(37),{findWhiteSpaceStart:c,cmpStr:u}=n(26),d=n(284),h=function(){},p=l.TYPE,m=l.NAME,f=p.WhiteSpace,g=p.Comment,y=p.Ident,b=p.Function,v=p.Url,S=p.Hash,w=p.Percentage,k=p.Number;function T(e){return function(){return this[e]()}}e.exports=function(e){var t={scanner:new s,locationMap:new r,filename:"<unknown>",needPositions:!1,onParseError:h,onParseErrorThrow:!1,parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:d,createList:function(){return new o},createSingleNodeList:function(e){return(new o).appendData(e)},getFirstListNode:function(e){return e&&e.first()},getLastListNode:function(e){return e.last()},parseWithFallback:function(e,t){var n=this.scanner.tokenIndex;try{return e.call(this)}catch(e){if(this.onParseErrorThrow)throw e;var r=t.call(this,n);return this.onParseErrorThrow=!0,this.onParseError(e,r),this.onParseErrorThrow=!1,r}},lookupNonWSType:function(e){do{var t=this.scanner.lookupType(e++);if(t!==f)return t}while(0!==t);return 0},eat:function(e){if(this.scanner.tokenType!==e){var t=this.scanner.tokenStart,n=m[e]+" is expected";switch(e){case y:this.scanner.tokenType===b||this.scanner.tokenType===v?(t=this.scanner.tokenEnd-1,n="Identifier is expected but function found"):n="Identifier is expected";break;case S:this.scanner.isDelim(35)&&(this.scanner.next(),t++,n="Name is expected");break;case w:this.scanner.tokenType===k&&(t=this.scanner.tokenEnd,n="Percent sign is expected");break;default:this.scanner.source.charCodeAt(this.scanner.tokenStart)===e&&(t+=1)}this.error(n,t)}this.scanner.next()},consume:function(e){var t=this.scanner.getTokenValue();return this.eat(e),t},consumeFunctionName:function(){var e=this.scanner.source.substring(this.scanner.tokenStart,this.scanner.tokenEnd-1);return this.eat(b),e},getLocation:function(e,t){return this.needPositions?this.locationMap.getLocationRange(e,t,this.filename):null},getLocationFromList:function(e){if(this.needPositions){var t=this.getFirstListNode(e),n=this.getLastListNode(e);return this.locationMap.getLocationRange(null!==t?t.loc.start.offset-this.locationMap.startOffset:this.scanner.tokenStart,null!==n?n.loc.end.offset-this.locationMap.startOffset:this.scanner.tokenStart,this.filename)}return null},error:function(e,t){var n=void 0!==t&&t<this.scanner.source.length?this.locationMap.getLocation(t):this.scanner.eof?this.locationMap.getLocation(c(this.scanner.source,this.scanner.source.length-1)):this.locationMap.getLocation(this.scanner.tokenStart);throw new i(e||"Unexpected input",this.scanner.source,n.offset,n.line,n.column)}};for(var n in e=function(e){var t={context:{},scope:{},atrule:{},pseudo:{}};if(e.parseContext)for(var n in e.parseContext)switch(typeof e.parseContext[n]){case"function":t.context[n]=e.parseContext[n];break;case"string":t.context[n]=T(e.parseContext[n])}if(e.scope)for(var n in e.scope)t.scope[n]=e.scope[n];if(e.atrule)for(var n in e.atrule){var r=e.atrule[n];r.parse&&(t.atrule[n]=r.parse)}if(e.pseudo)for(var n in e.pseudo){var i=e.pseudo[n];i.parse&&(t.pseudo[n]=i.parse)}if(e.node)for(var n in e.node)t[n]=e.node[n].parse;return t}(e||{}))t[n]=e[n];return function(e,n){var r,i=(n=n||{}).context||"default",s=n.onComment;if(a(e,t.scanner),t.locationMap.setSource(e,n.offset,n.line,n.column),t.filename=n.filename||"<unknown>",t.needPositions=Boolean(n.positions),t.onParseError="function"==typeof n.onParseError?n.onParseError:h,t.onParseErrorThrow=!1,t.parseAtrulePrelude=!("parseAtrulePrelude"in n)||Boolean(n.parseAtrulePrelude),t.parseRulePrelude=!("parseRulePrelude"in n)||Boolean(n.parseRulePrelude),t.parseValue=!("parseValue"in n)||Boolean(n.parseValue),t.parseCustomProperty="parseCustomProperty"in n&&Boolean(n.parseCustomProperty),!t.context.hasOwnProperty(i))throw new Error("Unknown context `"+i+"`");return"function"==typeof s&&t.scanner.forEachToken(((n,r,i)=>{if(n===g){const n=t.getLocation(r,i),o=u(e,i-2,i,"*/")?e.slice(r+2,i-2):e.slice(r+2,i);s(o,n)}})),r=t.context[i].call(t,n),t.scanner.eof||t.error(),r}}},function(e,t,n){var r=n(93),i=n(0).isBOM;var s=function(){this.lines=null,this.columns=null,this.linesAndColumnsComputed=!1};s.prototype={setSource:function(e,t,n,r){this.source=e,this.startOffset=void 0===t?0:t,this.startLine=void 0===n?1:n,this.startColumn=void 0===r?1:r,this.linesAndColumnsComputed=!1},ensureLinesAndColumnsComputed:function(){this.linesAndColumnsComputed||(!function(e,t){for(var n=t.length,s=r(e.lines,n),o=e.startLine,a=r(e.columns,n),l=e.startColumn,c=t.length>0?i(t.charCodeAt(0)):0;c<n;c++){var u=t.charCodeAt(c);s[c]=o,a[c]=l++,10!==u&&13!==u&&12!==u||(13===u&&c+1<n&&10===t.charCodeAt(c+1)&&(s[++c]=o,a[c]=l),o++,l=1)}s[c]=o,a[c]=l,e.lines=s,e.columns=a}(this,this.source),this.linesAndColumnsComputed=!0)},getLocation:function(e,t){return this.ensureLinesAndColumnsComputed(),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}},getLocationRange:function(e,t,n){return this.ensureLinesAndColumnsComputed(),{source:n,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}},e.exports=s},function(e,t,n){var r=n(0).TYPE,i=r.WhiteSpace,s=r.Comment;e.exports=function(e){var t=this.createList(),n=null,r={recognizer:e,space:null,ignoreWS:!1,ignoreWSAfter:!1};for(this.scanner.skipSC();!this.scanner.eof;){switch(this.scanner.tokenType){case s:this.scanner.next();continue;case i:r.ignoreWS?this.scanner.next():r.space=this.WhiteSpace();continue}if(void 0===(n=e.getNode.call(this,r)))break;null!==r.space&&(t.push(r.space),r.space=null),t.push(n),r.ignoreWSAfter?(r.ignoreWSAfter=!1,r.ignoreWS=!0):r.ignoreWS=!1}return t}},function(e,t,n){var r=n(286),i=Object.prototype.hasOwnProperty;function s(e,t){var n=e.children,r=null;"function"!=typeof t?n.forEach(this.node,this):n.forEach((function(e){null!==r&&t.call(this,r),this.node(e),r=e}),this)}e.exports=function(e){function t(e){if(!i.call(n,e.type))throw new Error("Unknown node type: "+e.type);n[e.type].call(this,e)}var n={};if(e.node)for(var o in e.node)n[o]=e.node[o].generate;return function(e,n){var i="",o={children:s,node:t,chunk:function(e){i+=e},result:function(){return i}};return n&&("function"==typeof n.decorator&&(o=n.decorator(o)),n.sourceMap&&(o=r(o))),o.node(e),o.result()}}},function(e,t,n){var r=n(287).SourceMapGenerator,i={Atrule:!0,Selector:!0,Declaration:!0};e.exports=function(e){var t=new r,n=1,s=0,o={line:1,column:0},a={line:0,column:0},l=!1,c={line:1,column:0},u={generated:c},d=e.node;e.node=function(e){if(e.loc&&e.loc.start&&i.hasOwnProperty(e.type)){var r=e.loc.start.line,h=e.loc.start.column-1;a.line===r&&a.column===h||(a.line=r,a.column=h,o.line=n,o.column=s,l&&(l=!1,o.line===c.line&&o.column===c.column||t.addMapping(u)),l=!0,t.addMapping({source:e.loc.source,original:a,generated:o}))}d.call(this,e),l&&i.hasOwnProperty(e.type)&&(c.line=n,c.column=s)};var h=e.chunk;e.chunk=function(e){for(var t=0;t<e.length;t++)10===e.charCodeAt(t)?(n++,s=0):s++;h(e)};var p=e.result;return e.result=function(){return l&&t.addMapping(u),{css:p(),map:t}},e}},function(e,t,n){var r=n(288),i=n(59),s=n(290).ArraySet,o=n(291).MappingList;function a(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new s,this._names=new s,this._mappings=new o,this._sourcesContents=null}a.prototype._version=3,a.fromSourceMap=function(e){var t=e.sourceRoot,n=new a({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=i.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)})),e.sources.forEach((function(r){var s=r;null!==t&&(s=i.relative(t,r)),n._sources.has(s)||n._sources.add(s);var o=e.sourceContentFor(r);null!=o&&n.setSourceContent(r,o)})),n},a.prototype.addMapping=function(e){var t=i.getArg(e,"generated"),n=i.getArg(e,"original",null),r=i.getArg(e,"source",null),s=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,s),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=s&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:s})},a.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=i.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},a.prototype.applySourceMap=function(e,t,n){var r=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=e.file}var o=this._sourceRoot;null!=o&&(r=i.relative(o,r));var a=new s,l=new s;this._mappings.unsortedForEach((function(t){if(t.source===r&&null!=t.originalLine){var s=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=s.source&&(t.source=s.source,null!=n&&(t.source=i.join(n,t.source)),null!=o&&(t.source=i.relative(o,t.source)),t.originalLine=s.line,t.originalColumn=s.column,null!=s.name&&(t.name=s.name))}var c=t.source;null==c||a.has(c)||a.add(c);var u=t.name;null==u||l.has(u)||l.add(u)}),this),this._sources=a,this._names=l,e.sources.forEach((function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=i.join(n,t)),null!=o&&(t=i.relative(o,t)),this.setSourceContent(t,r))}),this)},a.prototype._validateMapping=function(e,t,n,r){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},a.prototype._serializeMappings=function(){for(var e,t,n,s,o=0,a=1,l=0,c=0,u=0,d=0,h="",p=this._mappings.toArray(),m=0,f=p.length;m<f;m++){if(e="",(t=p[m]).generatedLine!==a)for(o=0;t.generatedLine!==a;)e+=";",a++;else if(m>0){if(!i.compareByGeneratedPositionsInflated(t,p[m-1]))continue;e+=","}e+=r.encode(t.generatedColumn-o),o=t.generatedColumn,null!=t.source&&(s=this._sources.indexOf(t.source),e+=r.encode(s-d),d=s,e+=r.encode(t.originalLine-1-c),c=t.originalLine-1,e+=r.encode(t.originalColumn-l),l=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=r.encode(n-u),u=n)),h+=e}return h},a.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=i.relative(t,e));var n=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)},a.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},a.prototype.toString=function(){return JSON.stringify(this.toJSON())},t.SourceMapGenerator=a},function(e,t,n){var r=n(289);t.encode=function(e){var t,n="",i=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&i,(i>>>=5)>0&&(t|=32),n+=r.encode(t)}while(i>0);return n},t.decode=function(e,t,n){var i,s,o,a,l=e.length,c=0,u=0;do{if(t>=l)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(s=r.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));i=!!(32&s),c+=(s&=31)<<u,u+=5}while(i);n.value=(a=(o=c)>>1,1&~o?a:-a),n.rest=t}},function(e,t){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&e<n.length)return n[e];throw new TypeError("Must be between 0 and 63: "+e)},t.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}},function(e,t,n){var r=n(59),i=Object.prototype.hasOwnProperty,s="undefined"!=typeof Map;function o(){this._array=[],this._set=s?new Map:Object.create(null)}o.fromArray=function(e,t){for(var n=new o,r=0,i=e.length;r<i;r++)n.add(e[r],t);return n},o.prototype.size=function(){return s?this._set.size:Object.getOwnPropertyNames(this._set).length},o.prototype.add=function(e,t){var n=s?e:r.toSetString(e),o=s?this.has(e):i.call(this._set,n),a=this._array.length;o&&!t||this._array.push(e),o||(s?this._set.set(e,a):this._set[n]=a)},o.prototype.has=function(e){if(s)return this._set.has(e);var t=r.toSetString(e);return i.call(this._set,t)},o.prototype.indexOf=function(e){if(s){var t=this._set.get(e);if(t>=0)return t}else{var n=r.toSetString(e);if(i.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')},o.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},o.prototype.toArray=function(){return this._array.slice()},t.ArraySet=o},function(e,t,n){var r=n(59);function i(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}i.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},i.prototype.add=function(e){var t,n,i,s,o,a;t=this._last,n=e,i=t.generatedLine,s=n.generatedLine,o=t.generatedColumn,a=n.generatedColumn,s>i||s==i&&a>=o||r.compareByGeneratedPositionsInflated(t,n)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},i.prototype.toArray=function(){return this._sorted||(this._array.sort(r.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},t.MappingList=i},function(e,t,n){var r=n(20);e.exports=function(e){return{fromPlainObject:function(t){return e(t,{enter:function(e){e.children&&e.children instanceof r==!1&&(e.children=(new r).fromArray(e.children))}}),t},toPlainObject:function(t){return e(t,{leave:function(e){e.children&&e.children instanceof r&&(e.children=e.children.toArray())}}),t}}}},function(e,t){var n=Object.prototype.hasOwnProperty,r=function(){};function i(e){return"function"==typeof e?e:r}function s(e,t){return function(n,r,i){n.type===t&&e.call(this,n,r,i)}}function o(e,t){var r=t.structure,i=[];for(var s in r)if(!1!==n.call(r,s)){var o=r[s],a={name:s,type:!1,nullable:!1};Array.isArray(r[s])||(o=[r[s]]);for(var l=0;l<o.length;l++){var c=o[l];null===c?a.nullable=!0:"string"==typeof c?a.type="node":Array.isArray(c)&&(a.type="list")}a.type&&i.push(a)}return i.length?{context:t.walkContext,fields:i}:null}function a(e,t){var n=e.fields.slice(),r=e.context,i="string"==typeof r;return t&&n.reverse(),function(e,s,o,a){var l;i&&(l=s[r],s[r]=e);for(var c=0;c<n.length;c++){var u=n[c],d=e[u.name];if(!u.nullable||d)if("list"===u.type){if(t?d.reduceRight(a,!1):d.reduce(a,!1))return!0}else if(o(d))return!0}i&&(s[r]=l)}}function l(e){return{Atrule:{StyleSheet:e.StyleSheet,Atrule:e.Atrule,Rule:e.Rule,Block:e.Block},Rule:{StyleSheet:e.StyleSheet,Atrule:e.Atrule,Rule:e.Rule,Block:e.Block},Declaration:{StyleSheet:e.StyleSheet,Atrule:e.Atrule,Rule:e.Rule,Block:e.Block,DeclarationList:e.DeclarationList}}}e.exports=function(e){var t=function(e){var t={};for(var r in e.node)if(n.call(e.node,r)){var i=e.node[r];if(!i.structure)throw new Error("Missed `structure` field in `"+r+"` node type definition");t[r]=o(0,i)}return t}(e),c={},u={},d=Symbol("break-walk"),h=Symbol("skip-node");for(var p in t)n.call(t,p)&&null!==t[p]&&(c[p]=a(t[p],!1),u[p]=a(t[p],!0));var m=l(c),f=l(u),g=function(e,n){function o(e,t,n){var r=l.call(y,e,t,n);return r===d||r!==h&&(!(!g.hasOwnProperty(e.type)||!g[e.type](e,y,o,a))||p.call(y,e,t,n)===d)}var a=(e,t,n,r)=>e||o(t,n,r),l=r,p=r,g=c,y={break:d,skip:h,root:e,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if("function"==typeof n)l=n;else if(n&&(l=i(n.enter),p=i(n.leave),n.reverse&&(g=u),n.visit)){if(m.hasOwnProperty(n.visit))g=n.reverse?f[n.visit]:m[n.visit];else if(!t.hasOwnProperty(n.visit))throw new Error("Bad value `"+n.visit+"` for `visit` option (should be: "+Object.keys(t).join(", ")+")");l=s(l,n.visit),p=s(p,n.visit)}if(l===r&&p===r)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");o(e)};return g.break=d,g.skip=h,g.find=function(e,t){var n=null;return g(e,(function(e,r,i){if(t.call(this,e,r,i))return n=e,d})),n},g.findLast=function(e,t){var n=null;return g(e,{reverse:!0,enter:function(e,r,i){if(t.call(this,e,r,i))return n=e,d}}),n},g.findAll=function(e,t){var n=[];return g(e,(function(e,r,i){t.call(this,e,r,i)&&n.push(e)})),n},g}},function(e,t,n){var r=n(20);e.exports=function e(t){var n={};for(var i in t){var s=t[i];s&&(Array.isArray(s)||s instanceof r?s=s.map(e):s.constructor===Object&&(s=e(s))),n[i]=s}return n}},function(e,t){const n=Object.prototype.hasOwnProperty,r={generic:!0,types:a,atrules:{prelude:l,descriptors:l},properties:a,parseContext:function(e,t){return Object.assign(e,t)},scope:function e(t,r){for(const o in r)n.call(r,o)&&(i(t[o])?e(t[o],s(r[o])):t[o]=s(r[o]));return t},atrule:["parse"],pseudo:["parse"],node:["name","structure","parse","generate","walkContext"]};function i(e){return e&&e.constructor===Object}function s(e){return i(e)?Object.assign({},e):e}function o(e,t){return"string"==typeof t&&/^\s*\|/.test(t)?"string"==typeof e?e+t:t.replace(/^\s*\|\s*/,""):t||null}function a(e,t){if("string"==typeof t)return o(e,t);const r=Object.assign({},e);for(let i in t)n.call(t,i)&&(r[i]=o(n.call(e,i)?e[i]:void 0,t[i]));return r}function l(e,t){const n=a(e,t);return!i(n)||Object.keys(n).length?n:null}function c(e,t,r){for(const o in r)if(!1!==n.call(r,o))if(!0===r[o])o in t&&n.call(t,o)&&(e[o]=s(t[o]));else if(r[o])if("function"==typeof r[o]){const n=r[o];e[o]=n({},e[o]),e[o]=n(e[o]||{},t[o])}else if(i(r[o])){const n={};for(let t in e[o])n[t]=c({},e[o][t],r[o]);for(let e in t[o])n[e]=c(n[e]||{},t[o][e],r[o]);e[o]=n}else if(Array.isArray(r[o])){const i={},s=r[o].reduce((function(e,t){return e[t]=!0,e}),{});for(const[t,n]of Object.entries(e[o]||{}))i[t]={},n&&c(i[t],n,s);for(const e in t[o])n.call(t[o],e)&&(i[e]||(i[e]={}),t[o]&&t[o][e]&&c(i[e],t[o][e],s));e[o]=i}return e}e.exports=(e,t)=>c(e,t,r)},function(e,t,n){var r=n(297);e.exports={generic:!0,types:r.types,atrules:r.atrules,properties:r.properties,node:n(60)}},function(e,t,n){const r=n(298),i=n(299),s=n(300),o=n(301),a=/^\s*\|\s*/;function l(e,t){const n={};for(const t in e)n[t]=e[t].syntax||e[t];for(const r in t)r in e?t[r].syntax?n[r]=a.test(t[r].syntax)?n[r]+" "+t[r].syntax.trim():t[r].syntax:delete n[r]:t[r].syntax&&(n[r]=t[r].syntax.replace(a,""));return n}function c(e){const t={};for(const n in e)t[n]=e[n].syntax;return t}e.exports={types:l(s,o.syntaxes),atrules:function(e,t){const n={};for(const r in e){const i=t[r]&&t[r].descriptors||null;n[r]={prelude:r in t&&"prelude"in t[r]?t[r].prelude:e[r].prelude||null,descriptors:e[r].descriptors?l(e[r].descriptors,i||{}):i&&c(i)}}for(const r in t)hasOwnProperty.call(e,r)||(n[r]={prelude:t[r].prelude||null,descriptors:t[r].descriptors&&c(t[r].descriptors)});return n}(function(e){const t=Object.create(null);for(const n in e){const r=e[n];let i=null;if(r.descriptors){i=Object.create(null);for(const e in r.descriptors)i[e]=r.descriptors[e].syntax}t[n.substr(1)]={prelude:r.syntax.trim().match(/^@\S+\s+([^;\{]*)/)[1].trim()||null,descriptors:i}}return t}(r),o.atrules),properties:l(i,o.properties)}},function(e){e.exports=JSON.parse('{"@charset":{"syntax":"@charset \\"<charset>\\";","groups":["CSS Charsets"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/@charset"},"@counter-style":{"syntax":"@counter-style <counter-style-name> {\\n  [ system: <counter-system>; ] ||\\n  [ symbols: <counter-symbols>; ] ||\\n  [ additive-symbols: <additive-symbols>; ] ||\\n  [ negative: <negative-symbol>; ] ||\\n  [ prefix: <prefix>; ] ||\\n  [ suffix: <suffix>; ] ||\\n  [ range: <range>; ] ||\\n  [ pad: <padding>; ] ||\\n  [ speak-as: <speak-as>; ] ||\\n  [ fallback: <counter-style-name>; ]\\n}","interfaces":["CSSCounterStyleRule"],"groups":["CSS Counter Styles"],"descriptors":{"additive-symbols":{"syntax":"[ <integer> && <symbol> ]#","media":"all","initial":"n/a (required)","percentages":"no","computed":"asSpecified","order":"orderOfAppearance","status":"standard"},"fallback":{"syntax":"<counter-style-name>","media":"all","initial":"decimal","percentages":"no","computed":"asSpecified","order":"uniqueOrder","status":"standard"},"negative":{"syntax":"<symbol> <symbol>?","media":"all","initial":"\\"-\\" hyphen-minus","percentages":"no","computed":"asSpecified","order":"orderOfAppearance","status":"standard"},"pad":{"syntax":"<integer> && <symbol>","media":"all","initial":"0 \\"\\"","percentages":"no","computed":"asSpecified","order":"uniqueOrder","status":"standard"},"prefix":{"syntax":"<symbol>","media":"all","initial":"\\"\\"","percentages":"no","computed":"asSpecified","order":"uniqueOrder","status":"standard"},"range":{"syntax":"[ [ <integer> | infinite ]{2} ]# | auto","media":"all","initial":"auto","percentages":"no","computed":"asSpecified","order":"orderOfAppearance","status":"standard"},"speak-as":{"syntax":"auto | bullets | numbers | words | spell-out | <counter-style-name>","media":"all","initial":"auto","percentages":"no","computed":"asSpecified","order":"uniqueOrder","status":"standard"},"suffix":{"syntax":"<symbol>","media":"all","initial":"\\". \\"","percentages":"no","computed":"asSpecified","order":"uniqueOrder","status":"standard"},"symbols":{"syntax":"<symbol>+","media":"all","initial":"n/a (required)","percentages":"no","computed":"asSpecified","order":"orderOfAppearance","status":"standard"},"system":{"syntax":"cyclic | numeric | alphabetic | symbolic | additive | [ fixed <integer>? ] | [ extends <counter-style-name> ]","media":"all","initial":"symbolic","percentages":"no","computed":"asSpecified","order":"uniqueOrder","status":"standard"}},"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/@counter-style"},"@document":{"syntax":"@document [ <url> | url-prefix(<string>) | domain(<string>) | media-document(<string>) | regexp(<string>) ]# {\\n  <group-rule-body>\\n}","interfaces":["CSSGroupingRule","CSSConditionRule"],"groups":["CSS Conditional Rules"],"status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/@document"},"@font-face":{"syntax":"@font-face {\\n  [ font-family: <family-name>; ] ||\\n  [ src: <src>; ] ||\\n  [ unicode-range: <unicode-range>; ] ||\\n  [ font-variant: <font-variant>; ] ||\\n  [ font-feature-settings: <font-feature-settings>; ] ||\\n  [ font-variation-settings: <font-variation-settings>; ] ||\\n  [ font-stretch: <font-stretch>; ] ||\\n  [ font-weight: <font-weight>; ] ||\\n  [ font-style: <font-style>; ]\\n}","interfaces":["CSSFontFaceRule"],"groups":["CSS Fonts"],"descriptors":{"font-display":{"syntax":"[ auto | block | swap | fallback | optional ]","media":"visual","percentages":"no","initial":"auto","computed":"asSpecified","order":"uniqueOrder","status":"experimental"},"font-family":{"syntax":"<family-name>","media":"all","initial":"n/a (required)","percentages":"no","computed":"asSpecified","order":"uniqueOrder","status":"standard"},"font-feature-settings":{"syntax":"normal | <feature-tag-value>#","media":"all","initial":"normal","percentages":"no","computed":"asSpecified","order":"orderOfAppearance","status":"standard"},"font-variation-settings":{"syntax":"normal | [ <string> <number> ]#","media":"all","initial":"normal","percentages":"no","computed":"asSpecified","order":"orderOfAppearance","status":"standard"},"font-stretch":{"syntax":"<font-stretch-absolute>{1,2}","media":"all","initial":"normal","percentages":"no","computed":"asSpecified","order":"uniqueOrder","status":"standard"},"font-style":{"syntax":"normal | italic | oblique <angle>{0,2}","media":"all","initial":"normal","percentages":"no","computed":"asSpecified","order":"uniqueOrder","status":"standard"},"font-weight":{"syntax":"<font-weight-absolute>{1,2}","media":"all","initial":"normal","percentages":"no","computed":"asSpecified","order":"uniqueOrder","status":"standard"},"font-variant":{"syntax":"normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> || stylistic(<feature-value-name>) || historical-forms || styleset(<feature-value-name>#) || character-variant(<feature-value-name>#) || swash(<feature-value-name>) || ornaments(<feature-value-name>) || annotation(<feature-value-name>) || [ small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ] || <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero || <east-asian-variant-values> || <east-asian-width-values> || ruby ]","media":"all","initial":"normal","percentages":"no","computed":"asSpecified","order":"orderOfAppearance","status":"standard"},"src":{"syntax":"[ <url> [ format( <string># ) ]? | local( <family-name> ) ]#","media":"all","initial":"n/a (required)","percentages":"no","computed":"asSpecified","order":"orderOfAppearance","status":"standard"},"unicode-range":{"syntax":"<unicode-range>#","media":"all","initial":"U+0-10FFFF","percentages":"no","computed":"asSpecified","order":"orderOfAppearance","status":"standard"}},"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/@font-face"},"@font-feature-values":{"syntax":"@font-feature-values <family-name># {\\n  <feature-value-block-list>\\n}","interfaces":["CSSFontFeatureValuesRule"],"groups":["CSS Fonts"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/@font-feature-values"},"@import":{"syntax":"@import [ <string> | <url> ] [ <media-query-list> ]?;","groups":["Media Queries"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/@import"},"@keyframes":{"syntax":"@keyframes <keyframes-name> {\\n  <keyframe-block-list>\\n}","interfaces":["CSSKeyframeRule","CSSKeyframesRule"],"groups":["CSS Animations"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/@keyframes"},"@media":{"syntax":"@media <media-query-list> {\\n  <group-rule-body>\\n}","interfaces":["CSSGroupingRule","CSSConditionRule","CSSMediaRule","CSSCustomMediaRule"],"groups":["CSS Conditional Rules","Media Queries"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/@media"},"@namespace":{"syntax":"@namespace <namespace-prefix>? [ <string> | <url> ];","groups":["CSS Namespaces"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/@namespace"},"@page":{"syntax":"@page <page-selector-list> {\\n  <page-body>\\n}","interfaces":["CSSPageRule"],"groups":["CSS Pages"],"descriptors":{"bleed":{"syntax":"auto | <length>","media":["visual","paged"],"initial":"auto","percentages":"no","computed":"asSpecified","order":"uniqueOrder","status":"standard"},"marks":{"syntax":"none | [ crop || cross ]","media":["visual","paged"],"initial":"none","percentages":"no","computed":"asSpecified","order":"orderOfAppearance","status":"standard"},"size":{"syntax":"<length>{1,2} | auto | [ <page-size> || [ portrait | landscape ] ]","media":["visual","paged"],"initial":"auto","percentages":"no","computed":"asSpecifiedRelativeToAbsoluteLengths","order":"orderOfAppearance","status":"standard"}},"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/@page"},"@property":{"syntax":"@property <custom-property-name> {\\n  <declaration-list>\\n}","interfaces":["CSS","CSSPropertyRule"],"groups":["CSS Houdini"],"descriptors":{"syntax":{"syntax":"<string>","media":"all","percentages":"no","initial":"n/a (required)","computed":"asSpecified","order":"uniqueOrder","status":"experimental"},"inherits":{"syntax":"true | false","media":"all","percentages":"no","initial":"auto","computed":"asSpecified","order":"uniqueOrder","status":"experimental"},"initial-value":{"syntax":"<string>","media":"all","initial":"n/a (required)","percentages":"no","computed":"asSpecified","order":"uniqueOrder","status":"experimental"}},"status":"experimental","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/@property"},"@supports":{"syntax":"@supports <supports-condition> {\\n  <group-rule-body>\\n}","interfaces":["CSSGroupingRule","CSSConditionRule","CSSSupportsRule"],"groups":["CSS Conditional Rules"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/@supports"},"@viewport":{"syntax":"@viewport {\\n  <group-rule-body>\\n}","interfaces":["CSSViewportRule"],"groups":["CSS Device Adaptation"],"descriptors":{"height":{"syntax":"<viewport-length>{1,2}","media":["visual","continuous"],"initial":["min-height","max-height"],"percentages":["min-height","max-height"],"computed":["min-height","max-height"],"order":"orderOfAppearance","status":"standard"},"max-height":{"syntax":"<viewport-length>","media":["visual","continuous"],"initial":"auto","percentages":"referToHeightOfInitialViewport","computed":"lengthAbsolutePercentageAsSpecifiedOtherwiseAuto","order":"uniqueOrder","status":"standard"},"max-width":{"syntax":"<viewport-length>","media":["visual","continuous"],"initial":"auto","percentages":"referToWidthOfInitialViewport","computed":"lengthAbsolutePercentageAsSpecifiedOtherwiseAuto","order":"uniqueOrder","status":"standard"},"max-zoom":{"syntax":"auto | <number> | <percentage>","media":["visual","continuous"],"initial":"auto","percentages":"the zoom factor itself","computed":"autoNonNegativeOrPercentage","order":"uniqueOrder","status":"standard"},"min-height":{"syntax":"<viewport-length>","media":["visual","continuous"],"initial":"auto","percentages":"referToHeightOfInitialViewport","computed":"lengthAbsolutePercentageAsSpecifiedOtherwiseAuto","order":"uniqueOrder","status":"standard"},"min-width":{"syntax":"<viewport-length>","media":["visual","continuous"],"initial":"auto","percentages":"referToWidthOfInitialViewport","computed":"lengthAbsolutePercentageAsSpecifiedOtherwiseAuto","order":"uniqueOrder","status":"standard"},"min-zoom":{"syntax":"auto | <number> | <percentage>","media":["visual","continuous"],"initial":"auto","percentages":"the zoom factor itself","computed":"autoNonNegativeOrPercentage","order":"uniqueOrder","status":"standard"},"orientation":{"syntax":"auto | portrait | landscape","media":["visual","continuous"],"initial":"auto","percentages":"referToSizeOfBoundingBox","computed":"asSpecified","order":"uniqueOrder","status":"standard"},"user-zoom":{"syntax":"zoom | fixed","media":["visual","continuous"],"initial":"zoom","percentages":"referToSizeOfBoundingBox","computed":"asSpecified","order":"uniqueOrder","status":"standard"},"viewport-fit":{"syntax":"auto | contain | cover","media":["visual","continuous"],"initial":"auto","percentages":"no","computed":"asSpecified","order":"uniqueOrder","status":"standard"},"width":{"syntax":"<viewport-length>{1,2}","media":["visual","continuous"],"initial":["min-width","max-width"],"percentages":["min-width","max-width"],"computed":["min-width","max-width"],"order":"orderOfAppearance","status":"standard"},"zoom":{"syntax":"auto | <number> | <percentage>","media":["visual","continuous"],"initial":"auto","percentages":"the zoom factor itself","computed":"autoNonNegativeOrPercentage","order":"uniqueOrder","status":"standard"}},"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/@viewport"}}')},function(e){e.exports=JSON.parse('{"--*":{"syntax":"<declaration-value>","media":"all","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Variables"],"initial":"seeProse","appliesto":"allElements","computed":"asSpecifiedWithVarsSubstituted","order":"perGrammar","status":"experimental","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/--*"},"-ms-accelerator":{"syntax":"false | true","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"false","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-accelerator"},"-ms-block-progression":{"syntax":"tb | rl | bt | lr","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"tb","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-block-progression"},"-ms-content-zoom-chaining":{"syntax":"none | chained","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"none","appliesto":"nonReplacedBlockAndInlineBlockElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-chaining"},"-ms-content-zooming":{"syntax":"none | zoom","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"zoomForTheTopLevelNoneForTheRest","appliesto":"nonReplacedBlockAndInlineBlockElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-content-zooming"},"-ms-content-zoom-limit":{"syntax":"<\'-ms-content-zoom-limit-min\'> <\'-ms-content-zoom-limit-max\'>","media":"interactive","inherited":false,"animationType":"discrete","percentages":["-ms-content-zoom-limit-max","-ms-content-zoom-limit-min"],"groups":["Microsoft Extensions"],"initial":["-ms-content-zoom-limit-max","-ms-content-zoom-limit-min"],"appliesto":"nonReplacedBlockAndInlineBlockElements","computed":["-ms-content-zoom-limit-max","-ms-content-zoom-limit-min"],"order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-limit"},"-ms-content-zoom-limit-max":{"syntax":"<percentage>","media":"interactive","inherited":false,"animationType":"discrete","percentages":"maxZoomFactor","groups":["Microsoft Extensions"],"initial":"400%","appliesto":"nonReplacedBlockAndInlineBlockElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-limit-max"},"-ms-content-zoom-limit-min":{"syntax":"<percentage>","media":"interactive","inherited":false,"animationType":"discrete","percentages":"minZoomFactor","groups":["Microsoft Extensions"],"initial":"100%","appliesto":"nonReplacedBlockAndInlineBlockElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-limit-min"},"-ms-content-zoom-snap":{"syntax":"<\'-ms-content-zoom-snap-type\'> || <\'-ms-content-zoom-snap-points\'>","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":["-ms-content-zoom-snap-type","-ms-content-zoom-snap-points"],"appliesto":"nonReplacedBlockAndInlineBlockElements","computed":["-ms-content-zoom-snap-type","-ms-content-zoom-snap-points"],"order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-snap"},"-ms-content-zoom-snap-points":{"syntax":"snapInterval( <percentage>, <percentage> ) | snapList( <percentage># )","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"snapInterval(0%, 100%)","appliesto":"nonReplacedBlockAndInlineBlockElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-snap-points"},"-ms-content-zoom-snap-type":{"syntax":"none | proximity | mandatory","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"none","appliesto":"nonReplacedBlockAndInlineBlockElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-snap-type"},"-ms-filter":{"syntax":"<string>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"\\"\\"","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-filter"},"-ms-flow-from":{"syntax":"[ none | <custom-ident> ]#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"none","appliesto":"nonReplacedElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-flow-from"},"-ms-flow-into":{"syntax":"[ none | <custom-ident> ]#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"none","appliesto":"iframeElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-flow-into"},"-ms-grid-columns":{"syntax":"none | <track-list> | <auto-track-list>","media":"visual","inherited":false,"animationType":"simpleListOfLpcDifferenceLpc","percentages":"referToDimensionOfContentArea","groups":["CSS Grid Layout"],"initial":"none","appliesto":"gridContainers","computed":"asSpecifiedRelativeToAbsoluteLengths","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-grid-columns"},"-ms-grid-rows":{"syntax":"none | <track-list> | <auto-track-list>","media":"visual","inherited":false,"animationType":"simpleListOfLpcDifferenceLpc","percentages":"referToDimensionOfContentArea","groups":["CSS Grid Layout"],"initial":"none","appliesto":"gridContainers","computed":"asSpecifiedRelativeToAbsoluteLengths","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-grid-rows"},"-ms-high-contrast-adjust":{"syntax":"auto | none","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"auto","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-high-contrast-adjust"},"-ms-hyphenate-limit-chars":{"syntax":"auto | <integer>{1,3}","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"auto","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-hyphenate-limit-chars"},"-ms-hyphenate-limit-lines":{"syntax":"no-limit | <integer>","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"no-limit","appliesto":"blockContainerElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-hyphenate-limit-lines"},"-ms-hyphenate-limit-zone":{"syntax":"<percentage> | <length>","media":"visual","inherited":true,"animationType":"discrete","percentages":"referToLineBoxWidth","groups":["Microsoft Extensions"],"initial":"0","appliesto":"blockContainerElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-hyphenate-limit-zone"},"-ms-ime-align":{"syntax":"auto | after","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"auto","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-ime-align"},"-ms-overflow-style":{"syntax":"auto | none | scrollbar | -ms-autohiding-scrollbar","media":"interactive","inherited":true,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"auto","appliesto":"nonReplacedBlockAndInlineBlockElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-overflow-style"},"-ms-scrollbar-3dlight-color":{"syntax":"<color>","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"dependsOnUserAgent","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-3dlight-color"},"-ms-scrollbar-arrow-color":{"syntax":"<color>","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"ButtonText","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-arrow-color"},"-ms-scrollbar-base-color":{"syntax":"<color>","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"dependsOnUserAgent","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-base-color"},"-ms-scrollbar-darkshadow-color":{"syntax":"<color>","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"ThreeDDarkShadow","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-darkshadow-color"},"-ms-scrollbar-face-color":{"syntax":"<color>","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"ThreeDFace","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-face-color"},"-ms-scrollbar-highlight-color":{"syntax":"<color>","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"ThreeDHighlight","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-highlight-color"},"-ms-scrollbar-shadow-color":{"syntax":"<color>","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"ThreeDDarkShadow","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-shadow-color"},"-ms-scrollbar-track-color":{"syntax":"<color>","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"Scrollbar","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-track-color"},"-ms-scroll-chaining":{"syntax":"chained | none","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"chained","appliesto":"nonReplacedBlockAndInlineBlockElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-chaining"},"-ms-scroll-limit":{"syntax":"<\'-ms-scroll-limit-x-min\'> <\'-ms-scroll-limit-y-min\'> <\'-ms-scroll-limit-x-max\'> <\'-ms-scroll-limit-y-max\'>","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":["-ms-scroll-limit-x-min","-ms-scroll-limit-y-min","-ms-scroll-limit-x-max","-ms-scroll-limit-y-max"],"appliesto":"nonReplacedBlockAndInlineBlockElements","computed":["-ms-scroll-limit-x-min","-ms-scroll-limit-y-min","-ms-scroll-limit-x-max","-ms-scroll-limit-y-max"],"order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit"},"-ms-scroll-limit-x-max":{"syntax":"auto | <length>","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"auto","appliesto":"nonReplacedBlockAndInlineBlockElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit-x-max"},"-ms-scroll-limit-x-min":{"syntax":"<length>","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"0","appliesto":"nonReplacedBlockAndInlineBlockElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit-x-min"},"-ms-scroll-limit-y-max":{"syntax":"auto | <length>","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"auto","appliesto":"nonReplacedBlockAndInlineBlockElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit-y-max"},"-ms-scroll-limit-y-min":{"syntax":"<length>","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"0","appliesto":"nonReplacedBlockAndInlineBlockElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit-y-min"},"-ms-scroll-rails":{"syntax":"none | railed","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"railed","appliesto":"nonReplacedBlockAndInlineBlockElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-rails"},"-ms-scroll-snap-points-x":{"syntax":"snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"snapInterval(0px, 100%)","appliesto":"nonReplacedBlockAndInlineBlockElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-points-x"},"-ms-scroll-snap-points-y":{"syntax":"snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"snapInterval(0px, 100%)","appliesto":"nonReplacedBlockAndInlineBlockElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-points-y"},"-ms-scroll-snap-type":{"syntax":"none | proximity | mandatory","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"none","appliesto":"nonReplacedBlockAndInlineBlockElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-type"},"-ms-scroll-snap-x":{"syntax":"<\'-ms-scroll-snap-type\'> <\'-ms-scroll-snap-points-x\'>","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":["-ms-scroll-snap-type","-ms-scroll-snap-points-x"],"appliesto":"nonReplacedBlockAndInlineBlockElements","computed":["-ms-scroll-snap-type","-ms-scroll-snap-points-x"],"order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-x"},"-ms-scroll-snap-y":{"syntax":"<\'-ms-scroll-snap-type\'> <\'-ms-scroll-snap-points-y\'>","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":["-ms-scroll-snap-type","-ms-scroll-snap-points-y"],"appliesto":"nonReplacedBlockAndInlineBlockElements","computed":["-ms-scroll-snap-type","-ms-scroll-snap-points-y"],"order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-y"},"-ms-scroll-translation":{"syntax":"none | vertical-to-horizontal","media":"interactive","inherited":true,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-translation"},"-ms-text-autospace":{"syntax":"none | ideograph-alpha | ideograph-numeric | ideograph-parenthesis | ideograph-space","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-text-autospace"},"-ms-touch-select":{"syntax":"grippers | none","media":"interactive","inherited":true,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"grippers","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-touch-select"},"-ms-user-select":{"syntax":"none | element | text","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"text","appliesto":"nonReplacedElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-user-select"},"-ms-wrap-flow":{"syntax":"auto | both | start | end | maximum | clear","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"auto","appliesto":"blockLevelElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-wrap-flow"},"-ms-wrap-margin":{"syntax":"<length>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"0","appliesto":"exclusionElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-wrap-margin"},"-ms-wrap-through":{"syntax":"wrap | none","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Microsoft Extensions"],"initial":"wrap","appliesto":"blockLevelElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-ms-wrap-through"},"-moz-appearance":{"syntax":"none | button | button-arrow-down | button-arrow-next | button-arrow-previous | button-arrow-up | button-bevel | button-focus | caret | checkbox | checkbox-container | checkbox-label | checkmenuitem | dualbutton | groupbox | listbox | listitem | menuarrow | menubar | menucheckbox | menuimage | menuitem | menuitemtext | menulist | menulist-button | menulist-text | menulist-textfield | menupopup | menuradio | menuseparator | meterbar | meterchunk | progressbar | progressbar-vertical | progresschunk | progresschunk-vertical | radio | radio-container | radio-label | radiomenuitem | range | range-thumb | resizer | resizerpanel | scale-horizontal | scalethumbend | scalethumb-horizontal | scalethumbstart | scalethumbtick | scalethumb-vertical | scale-vertical | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | separator | sheet | spinner | spinner-downbutton | spinner-textfield | spinner-upbutton | splitter | statusbar | statusbarpanel | tab | tabpanel | tabpanels | tab-scroll-arrow-back | tab-scroll-arrow-forward | textfield | textfield-multiline | toolbar | toolbarbutton | toolbarbutton-dropdown | toolbargripper | toolbox | tooltip | treeheader | treeheadercell | treeheadersortarrow | treeitem | treeline | treetwisty | treetwistyopen | treeview | -moz-mac-unified-toolbar | -moz-win-borderless-glass | -moz-win-browsertabbar-toolbox | -moz-win-communicationstext | -moz-win-communications-toolbox | -moz-win-exclude-glass | -moz-win-glass | -moz-win-mediatext | -moz-win-media-toolbox | -moz-window-button-box | -moz-window-button-box-maximized | -moz-window-button-close | -moz-window-button-maximize | -moz-window-button-minimize | -moz-window-button-restore | -moz-window-frame-bottom | -moz-window-frame-left | -moz-window-frame-right | -moz-window-titlebar | -moz-window-titlebar-maximized","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions","WebKit Extensions"],"initial":"noneButOverriddenInUserAgentCSS","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/appearance"},"-moz-binding":{"syntax":"<url> | none","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions"],"initial":"none","appliesto":"allElementsExceptGeneratedContentOrPseudoElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-moz-binding"},"-moz-border-bottom-colors":{"syntax":"<color>+ | none","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-moz-border-bottom-colors"},"-moz-border-left-colors":{"syntax":"<color>+ | none","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-moz-border-left-colors"},"-moz-border-right-colors":{"syntax":"<color>+ | none","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-moz-border-right-colors"},"-moz-border-top-colors":{"syntax":"<color>+ | none","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-moz-border-top-colors"},"-moz-context-properties":{"syntax":"none | [ fill | fill-opacity | stroke | stroke-opacity ]#","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions"],"initial":"none","appliesto":"allElementsThatCanReferenceImages","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-moz-context-properties"},"-moz-float-edge":{"syntax":"border-box | content-box | margin-box | padding-box","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions"],"initial":"content-box","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-moz-float-edge"},"-moz-force-broken-image-icon":{"syntax":"<integer [0,1]>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions"],"initial":"0","appliesto":"images","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-moz-force-broken-image-icon"},"-moz-image-region":{"syntax":"<shape> | auto","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions"],"initial":"auto","appliesto":"xulImageElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-moz-image-region"},"-moz-orient":{"syntax":"inline | block | horizontal | vertical","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions"],"initial":"inline","appliesto":"anyElementEffectOnProgressAndMeter","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-moz-orient"},"-moz-outline-radius":{"syntax":"<outline-radius>{1,4} [ / <outline-radius>{1,4} ]?","media":"visual","inherited":false,"animationType":["-moz-outline-radius-topleft","-moz-outline-radius-topright","-moz-outline-radius-bottomright","-moz-outline-radius-bottomleft"],"percentages":["-moz-outline-radius-topleft","-moz-outline-radius-topright","-moz-outline-radius-bottomright","-moz-outline-radius-bottomleft"],"groups":["Mozilla Extensions"],"initial":["-moz-outline-radius-topleft","-moz-outline-radius-topright","-moz-outline-radius-bottomright","-moz-outline-radius-bottomleft"],"appliesto":"allElements","computed":["-moz-outline-radius-topleft","-moz-outline-radius-topright","-moz-outline-radius-bottomright","-moz-outline-radius-bottomleft"],"order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius"},"-moz-outline-radius-bottomleft":{"syntax":"<outline-radius>","media":"visual","inherited":false,"animationType":"lpc","percentages":"referToDimensionOfBorderBox","groups":["Mozilla Extensions"],"initial":"0","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-bottomleft"},"-moz-outline-radius-bottomright":{"syntax":"<outline-radius>","media":"visual","inherited":false,"animationType":"lpc","percentages":"referToDimensionOfBorderBox","groups":["Mozilla Extensions"],"initial":"0","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-bottomright"},"-moz-outline-radius-topleft":{"syntax":"<outline-radius>","media":"visual","inherited":false,"animationType":"lpc","percentages":"referToDimensionOfBorderBox","groups":["Mozilla Extensions"],"initial":"0","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-topleft"},"-moz-outline-radius-topright":{"syntax":"<outline-radius>","media":"visual","inherited":false,"animationType":"lpc","percentages":"referToDimensionOfBorderBox","groups":["Mozilla Extensions"],"initial":"0","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-topright"},"-moz-stack-sizing":{"syntax":"ignore | stretch-to-fit","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions"],"initial":"stretch-to-fit","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-moz-stack-sizing"},"-moz-text-blink":{"syntax":"none | blink","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-moz-text-blink"},"-moz-user-focus":{"syntax":"ignore | normal | select-after | select-before | select-menu | select-same | select-all | none","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-moz-user-focus"},"-moz-user-input":{"syntax":"auto | none | enabled | disabled","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions"],"initial":"auto","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-moz-user-input"},"-moz-user-modify":{"syntax":"read-only | read-write | write-only","media":"interactive","inherited":true,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions"],"initial":"read-only","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-moz-user-modify"},"-moz-window-dragging":{"syntax":"drag | no-drag","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions"],"initial":"drag","appliesto":"allElementsCreatingNativeWindows","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-moz-window-dragging"},"-moz-window-shadow":{"syntax":"default | menu | tooltip | sheet | none","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions"],"initial":"default","appliesto":"allElementsCreatingNativeWindows","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-moz-window-shadow"},"-webkit-appearance":{"syntax":"none | button | button-bevel | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | media-time-remaining-display | media-toggle-closed-captions-button | media-volume-slider | media-volume-slider-container | media-volume-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | -apple-pay-button","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["WebKit Extensions"],"initial":"noneButOverriddenInUserAgentCSS","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/appearance"},"-webkit-border-before":{"syntax":"<\'border-width\'> || <\'border-style\'> || <\'color\'>","media":"visual","inherited":true,"animationType":"discrete","percentages":["-webkit-border-before-width"],"groups":["WebKit Extensions"],"initial":["border-width","border-style","color"],"appliesto":"allElements","computed":["border-width","border-style","color"],"order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-webkit-border-before"},"-webkit-border-before-color":{"syntax":"<\'color\'>","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["WebKit Extensions"],"initial":"currentcolor","appliesto":"allElements","computed":"computedColor","order":"uniqueOrder","status":"nonstandard"},"-webkit-border-before-style":{"syntax":"<\'border-style\'>","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["WebKit Extensions"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard"},"-webkit-border-before-width":{"syntax":"<\'border-width\'>","media":"visual","inherited":true,"animationType":"discrete","percentages":"logicalWidthOfContainingBlock","groups":["WebKit Extensions"],"initial":"medium","appliesto":"allElements","computed":"absoluteLengthZeroIfBorderStyleNoneOrHidden","order":"uniqueOrder","status":"nonstandard"},"-webkit-box-reflect":{"syntax":"[ above | below | right | left ]? <length>? <image>?","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["WebKit Extensions"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-webkit-box-reflect"},"-webkit-line-clamp":{"syntax":"none | <integer>","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"no","groups":["WebKit Extensions","CSS Overflow"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-webkit-line-clamp"},"-webkit-mask":{"syntax":"[ <mask-reference> || <position> [ / <bg-size> ]? || <repeat-style> || [ <box> | border | padding | content | text ] || [ <box> | border | padding | content ] ]#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["WebKit Extensions"],"initial":["-webkit-mask-image","-webkit-mask-repeat","-webkit-mask-attachment","-webkit-mask-position","-webkit-mask-origin","-webkit-mask-clip"],"appliesto":"allElements","computed":["-webkit-mask-image","-webkit-mask-repeat","-webkit-mask-attachment","-webkit-mask-position","-webkit-mask-origin","-webkit-mask-clip"],"order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mask"},"-webkit-mask-attachment":{"syntax":"<attachment>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["WebKit Extensions"],"initial":"scroll","appliesto":"allElements","computed":"asSpecified","order":"orderOfAppearance","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-attachment"},"-webkit-mask-clip":{"syntax":"[ <box> | border | padding | content | text ]#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["WebKit Extensions"],"initial":"border","appliesto":"allElements","computed":"asSpecified","order":"orderOfAppearance","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mask-clip"},"-webkit-mask-composite":{"syntax":"<composite-style>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["WebKit Extensions"],"initial":"source-over","appliesto":"allElements","computed":"asSpecified","order":"orderOfAppearance","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-composite"},"-webkit-mask-image":{"syntax":"<mask-reference>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["WebKit Extensions"],"initial":"none","appliesto":"allElements","computed":"absoluteURIOrNone","order":"orderOfAppearance","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mask-image"},"-webkit-mask-origin":{"syntax":"[ <box> | border | padding | content ]#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["WebKit Extensions"],"initial":"padding","appliesto":"allElements","computed":"asSpecified","order":"orderOfAppearance","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mask-origin"},"-webkit-mask-position":{"syntax":"<position>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"referToSizeOfElement","groups":["WebKit Extensions"],"initial":"0% 0%","appliesto":"allElements","computed":"absoluteLengthOrPercentage","order":"orderOfAppearance","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mask-position"},"-webkit-mask-position-x":{"syntax":"[ <length-percentage> | left | center | right ]#","media":"visual","inherited":false,"animationType":"discrete","percentages":"referToSizeOfElement","groups":["WebKit Extensions"],"initial":"0%","appliesto":"allElements","computed":"absoluteLengthOrPercentage","order":"orderOfAppearance","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-position-x"},"-webkit-mask-position-y":{"syntax":"[ <length-percentage> | top | center | bottom ]#","media":"visual","inherited":false,"animationType":"discrete","percentages":"referToSizeOfElement","groups":["WebKit Extensions"],"initial":"0%","appliesto":"allElements","computed":"absoluteLengthOrPercentage","order":"orderOfAppearance","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-position-y"},"-webkit-mask-repeat":{"syntax":"<repeat-style>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["WebKit Extensions"],"initial":"repeat","appliesto":"allElements","computed":"asSpecified","order":"orderOfAppearance","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mask-repeat"},"-webkit-mask-repeat-x":{"syntax":"repeat | no-repeat | space | round","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["WebKit Extensions"],"initial":"repeat","appliesto":"allElements","computed":"asSpecified","order":"orderOfAppearance","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-repeat-x"},"-webkit-mask-repeat-y":{"syntax":"repeat | no-repeat | space | round","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["WebKit Extensions"],"initial":"repeat","appliesto":"allElements","computed":"absoluteLengthOrPercentage","order":"orderOfAppearance","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-repeat-y"},"-webkit-mask-size":{"syntax":"<bg-size>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"relativeToBackgroundPositioningArea","groups":["WebKit Extensions"],"initial":"auto auto","appliesto":"allElements","computed":"asSpecified","order":"orderOfAppearance","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mask-size"},"-webkit-overflow-scrolling":{"syntax":"auto | touch","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["WebKit Extensions"],"initial":"auto","appliesto":"scrollingBoxes","computed":"asSpecified","order":"orderOfAppearance","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-webkit-overflow-scrolling"},"-webkit-tap-highlight-color":{"syntax":"<color>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["WebKit Extensions"],"initial":"black","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-webkit-tap-highlight-color"},"-webkit-text-fill-color":{"syntax":"<color>","media":"visual","inherited":true,"animationType":"color","percentages":"no","groups":["WebKit Extensions"],"initial":"currentcolor","appliesto":"allElements","computed":"computedColor","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-webkit-text-fill-color"},"-webkit-text-stroke":{"syntax":"<length> || <color>","media":"visual","inherited":true,"animationType":["-webkit-text-stroke-width","-webkit-text-stroke-color"],"percentages":"no","groups":["WebKit Extensions"],"initial":["-webkit-text-stroke-width","-webkit-text-stroke-color"],"appliesto":"allElements","computed":["-webkit-text-stroke-width","-webkit-text-stroke-color"],"order":"canonicalOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke"},"-webkit-text-stroke-color":{"syntax":"<color>","media":"visual","inherited":true,"animationType":"color","percentages":"no","groups":["WebKit Extensions"],"initial":"currentcolor","appliesto":"allElements","computed":"computedColor","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-color"},"-webkit-text-stroke-width":{"syntax":"<length>","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["WebKit Extensions"],"initial":"0","appliesto":"allElements","computed":"absoluteLength","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-width"},"-webkit-touch-callout":{"syntax":"default | none","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["WebKit Extensions"],"initial":"default","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/-webkit-touch-callout"},"-webkit-user-modify":{"syntax":"read-only | read-write | read-write-plaintext-only","media":"interactive","inherited":true,"animationType":"discrete","percentages":"no","groups":["WebKit Extensions"],"initial":"read-only","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard"},"align-content":{"syntax":"normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Box Alignment"],"initial":"normal","appliesto":"multilineFlexContainers","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/align-content"},"align-items":{"syntax":"normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Box Alignment"],"initial":"normal","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/align-items"},"align-self":{"syntax":"auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Box Alignment"],"initial":"auto","appliesto":"flexItemsGridItemsAndAbsolutelyPositionedBoxes","computed":"autoOnAbsolutelyPositionedElementsValueOfAlignItemsOnParent","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/align-self"},"align-tracks":{"syntax":"[ normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position> ]#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Grid Layout"],"initial":"normal","appliesto":"gridContainersWithMasonryLayoutInTheirBlockAxis","computed":"asSpecified","order":"uniqueOrder","status":"experimental","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/align-tracks"},"all":{"syntax":"initial | inherit | unset | revert","media":"noPracticalMedia","inherited":false,"animationType":"eachOfShorthandPropertiesExceptUnicodeBiDiAndDirection","percentages":"no","groups":["CSS Miscellaneous"],"initial":"noPracticalInitialValue","appliesto":"allElements","computed":"asSpecifiedAppliesToEachProperty","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/all"},"animation":{"syntax":"<single-animation>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Animations"],"initial":["animation-name","animation-duration","animation-timing-function","animation-delay","animation-iteration-count","animation-direction","animation-fill-mode","animation-play-state"],"appliesto":"allElementsAndPseudos","computed":["animation-name","animation-duration","animation-timing-function","animation-delay","animation-direction","animation-iteration-count","animation-fill-mode","animation-play-state"],"order":"orderOfAppearance","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/animation"},"animation-delay":{"syntax":"<time>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Animations"],"initial":"0s","appliesto":"allElementsAndPseudos","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/animation-delay"},"animation-direction":{"syntax":"<single-animation-direction>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Animations"],"initial":"normal","appliesto":"allElementsAndPseudos","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/animation-direction"},"animation-duration":{"syntax":"<time>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Animations"],"initial":"0s","appliesto":"allElementsAndPseudos","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/animation-duration"},"animation-fill-mode":{"syntax":"<single-animation-fill-mode>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Animations"],"initial":"none","appliesto":"allElementsAndPseudos","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/animation-fill-mode"},"animation-iteration-count":{"syntax":"<single-animation-iteration-count>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Animations"],"initial":"1","appliesto":"allElementsAndPseudos","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/animation-iteration-count"},"animation-name":{"syntax":"[ none | <keyframes-name> ]#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Animations"],"initial":"none","appliesto":"allElementsAndPseudos","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/animation-name"},"animation-play-state":{"syntax":"<single-animation-play-state>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Animations"],"initial":"running","appliesto":"allElementsAndPseudos","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/animation-play-state"},"animation-timing-function":{"syntax":"<timing-function>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Animations"],"initial":"ease","appliesto":"allElementsAndPseudos","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/animation-timing-function"},"appearance":{"syntax":"none | auto | textfield | menulist-button | <compat-auto>","media":"all","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Basic User Interface"],"initial":"auto","appliesto":"allElements","computed":"asSpecified","order":"perGrammar","status":"experimental","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/appearance"},"aspect-ratio":{"syntax":"auto | <ratio>","media":"all","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Basic User Interface"],"initial":"auto","appliesto":"allElementsExceptInlineBoxesAndInternalRubyOrTableBoxes","computed":"asSpecified","order":"perGrammar","status":"experimental","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/aspect-ratio"},"azimuth":{"syntax":"<angle> | [ [ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards","media":"aural","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Speech"],"initial":"center","appliesto":"allElements","computed":"normalizedAngle","order":"orderOfAppearance","status":"obsolete","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/azimuth"},"backdrop-filter":{"syntax":"none | <filter-function-list>","media":"visual","inherited":false,"animationType":"filterList","percentages":"no","groups":["Filter Effects"],"initial":"none","appliesto":"allElementsSVGContainerElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/backdrop-filter"},"backface-visibility":{"syntax":"visible | hidden","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Transforms"],"initial":"visible","appliesto":"transformableElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/backface-visibility"},"background":{"syntax":"[ <bg-layer> , ]* <final-bg-layer>","media":"visual","inherited":false,"animationType":["background-color","background-image","background-clip","background-position","background-size","background-repeat","background-attachment"],"percentages":["background-position","background-size"],"groups":["CSS Backgrounds and Borders"],"initial":["background-image","background-position","background-size","background-repeat","background-origin","background-clip","background-attachment","background-color"],"appliesto":"allElements","computed":["background-image","background-position","background-size","background-repeat","background-origin","background-clip","background-attachment","background-color"],"order":"orderOfAppearance","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/background"},"background-attachment":{"syntax":"<attachment>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":"scroll","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/background-attachment"},"background-blend-mode":{"syntax":"<blend-mode>#","media":"none","inherited":false,"animationType":"discrete","percentages":"no","groups":["Compositing and Blending"],"initial":"normal","appliesto":"allElementsSVGContainerGraphicsAndGraphicsReferencingElements","computed":"asSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/background-blend-mode"},"background-clip":{"syntax":"<box>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":"border-box","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/background-clip"},"background-color":{"syntax":"<color>","media":"visual","inherited":false,"animationType":"color","percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":"transparent","appliesto":"allElements","computed":"computedColor","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/background-color"},"background-image":{"syntax":"<bg-image>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":"none","appliesto":"allElements","computed":"asSpecifiedURLsAbsolute","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/background-image"},"background-origin":{"syntax":"<box>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":"padding-box","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/background-origin"},"background-position":{"syntax":"<bg-position>#","media":"visual","inherited":false,"animationType":"repeatableListOfSimpleListOfLpc","percentages":"referToSizeOfBackgroundPositioningAreaMinusBackgroundImageSize","groups":["CSS Backgrounds and Borders"],"initial":"0% 0%","appliesto":"allElements","computed":"listEachItemTwoKeywordsOriginOffsets","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/background-position"},"background-position-x":{"syntax":"[ center | [ [ left | right | x-start | x-end ]? <length-percentage>? ]! ]#","media":"visual","inherited":false,"animationType":"discrete","percentages":"referToWidthOfBackgroundPositioningAreaMinusBackgroundImageHeight","groups":["CSS Backgrounds and Borders"],"initial":"left","appliesto":"allElements","computed":"listEachItemConsistingOfAbsoluteLengthPercentageAndOrigin","order":"uniqueOrder","status":"experimental","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/background-position-x"},"background-position-y":{"syntax":"[ center | [ [ top | bottom | y-start | y-end ]? <length-percentage>? ]! ]#","media":"visual","inherited":false,"animationType":"discrete","percentages":"referToHeightOfBackgroundPositioningAreaMinusBackgroundImageHeight","groups":["CSS Backgrounds and Borders"],"initial":"top","appliesto":"allElements","computed":"listEachItemConsistingOfAbsoluteLengthPercentageAndOrigin","order":"uniqueOrder","status":"experimental","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/background-position-y"},"background-repeat":{"syntax":"<repeat-style>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":"repeat","appliesto":"allElements","computed":"listEachItemHasTwoKeywordsOnePerDimension","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/background-repeat"},"background-size":{"syntax":"<bg-size>#","media":"visual","inherited":false,"animationType":"repeatableListOfSimpleListOfLpc","percentages":"relativeToBackgroundPositioningArea","groups":["CSS Backgrounds and Borders"],"initial":"auto auto","appliesto":"allElements","computed":"asSpecifiedRelativeToAbsoluteLengths","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/background-size"},"block-overflow":{"syntax":"clip | ellipsis | <string>","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Overflow"],"initial":"clip","appliesto":"blockContainers","computed":"asSpecified","order":"perGrammar","status":"experimental"},"block-size":{"syntax":"<\'width\'>","media":"visual","inherited":false,"animationType":"lpc","percentages":"blockSizeOfContainingBlock","groups":["CSS Logical Properties"],"initial":"auto","appliesto":"sameAsWidthAndHeight","computed":"sameAsWidthAndHeight","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/block-size"},"border":{"syntax":"<line-width> || <line-style> || <color>","media":"visual","inherited":false,"animationType":["border-color","border-style","border-width"],"percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":["border-width","border-style","border-color"],"appliesto":"allElements","computed":["border-width","border-style","border-color"],"order":"orderOfAppearance","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border"},"border-block":{"syntax":"<\'border-top-width\'> || <\'border-top-style\'> || <\'color\'>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Logical Properties"],"initial":["border-top-width","border-top-style","border-top-color"],"appliesto":"allElements","computed":["border-top-width","border-top-style","border-top-color"],"order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-block"},"border-block-color":{"syntax":"<\'border-top-color\'>{1,2}","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Logical Properties"],"initial":"currentcolor","appliesto":"allElements","computed":"computedColor","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-block-color"},"border-block-style":{"syntax":"<\'border-top-style\'>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Logical Properties"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-block-style"},"border-block-width":{"syntax":"<\'border-top-width\'>","media":"visual","inherited":false,"animationType":"discrete","percentages":"logicalWidthOfContainingBlock","groups":["CSS Logical Properties"],"initial":"medium","appliesto":"allElements","computed":"absoluteLengthZeroIfBorderStyleNoneOrHidden","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-block-width"},"border-block-end":{"syntax":"<\'border-top-width\'> || <\'border-top-style\'> || <\'color\'>","media":"visual","inherited":false,"animationType":["border-block-end-color","border-block-end-style","border-block-end-width"],"percentages":"no","groups":["CSS Logical Properties"],"initial":["border-top-width","border-top-style","border-top-color"],"appliesto":"allElements","computed":["border-top-width","border-top-style","border-top-color"],"order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-block-end"},"border-block-end-color":{"syntax":"<\'border-top-color\'>","media":"visual","inherited":false,"animationType":"color","percentages":"no","groups":["CSS Logical Properties"],"initial":"currentcolor","appliesto":"allElements","computed":"computedColor","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-block-end-color"},"border-block-end-style":{"syntax":"<\'border-top-style\'>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Logical Properties"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-block-end-style"},"border-block-end-width":{"syntax":"<\'border-top-width\'>","media":"visual","inherited":false,"animationType":"length","percentages":"logicalWidthOfContainingBlock","groups":["CSS Logical Properties"],"initial":"medium","appliesto":"allElements","computed":"absoluteLengthZeroIfBorderStyleNoneOrHidden","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-block-end-width"},"border-block-start":{"syntax":"<\'border-top-width\'> || <\'border-top-style\'> || <\'color\'>","media":"visual","inherited":false,"animationType":["border-block-start-color","border-block-start-style","border-block-start-width"],"percentages":"no","groups":["CSS Logical Properties"],"initial":["border-width","border-style","color"],"appliesto":"allElements","computed":["border-width","border-style","border-block-start-color"],"order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-block-start"},"border-block-start-color":{"syntax":"<\'border-top-color\'>","media":"visual","inherited":false,"animationType":"color","percentages":"no","groups":["CSS Logical Properties"],"initial":"currentcolor","appliesto":"allElements","computed":"computedColor","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-block-start-color"},"border-block-start-style":{"syntax":"<\'border-top-style\'>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Logical Properties"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-block-start-style"},"border-block-start-width":{"syntax":"<\'border-top-width\'>","media":"visual","inherited":false,"animationType":"length","percentages":"logicalWidthOfContainingBlock","groups":["CSS Logical Properties"],"initial":"medium","appliesto":"allElements","computed":"absoluteLengthZeroIfBorderStyleNoneOrHidden","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-block-start-width"},"border-bottom":{"syntax":"<line-width> || <line-style> || <color>","media":"visual","inherited":false,"animationType":["border-bottom-color","border-bottom-style","border-bottom-width"],"percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":["border-bottom-width","border-bottom-style","border-bottom-color"],"appliesto":"allElements","computed":["border-bottom-width","border-bottom-style","border-bottom-color"],"order":"orderOfAppearance","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-bottom"},"border-bottom-color":{"syntax":"<\'border-top-color\'>","media":"visual","inherited":false,"animationType":"color","percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":"currentcolor","appliesto":"allElements","computed":"computedColor","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-bottom-color"},"border-bottom-left-radius":{"syntax":"<length-percentage>{1,2}","media":"visual","inherited":false,"animationType":"lpc","percentages":"referToDimensionOfBorderBox","groups":["CSS Backgrounds and Borders"],"initial":"0","appliesto":"allElementsUAsNotRequiredWhenCollapse","computed":"twoAbsoluteLengthOrPercentages","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius"},"border-bottom-right-radius":{"syntax":"<length-percentage>{1,2}","media":"visual","inherited":false,"animationType":"lpc","percentages":"referToDimensionOfBorderBox","groups":["CSS Backgrounds and Borders"],"initial":"0","appliesto":"allElementsUAsNotRequiredWhenCollapse","computed":"twoAbsoluteLengthOrPercentages","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius"},"border-bottom-style":{"syntax":"<line-style>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-bottom-style"},"border-bottom-width":{"syntax":"<line-width>","media":"visual","inherited":false,"animationType":"length","percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":"medium","appliesto":"allElements","computed":"absoluteLengthOr0IfBorderBottomStyleNoneOrHidden","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-bottom-width"},"border-collapse":{"syntax":"collapse | separate","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Table"],"initial":"separate","appliesto":"tableElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-collapse"},"border-color":{"syntax":"<color>{1,4}","media":"visual","inherited":false,"animationType":["border-bottom-color","border-left-color","border-right-color","border-top-color"],"percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":["border-top-color","border-right-color","border-bottom-color","border-left-color"],"appliesto":"allElements","computed":["border-bottom-color","border-left-color","border-right-color","border-top-color"],"order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-color"},"border-end-end-radius":{"syntax":"<length-percentage>{1,2}","media":"visual","inherited":false,"animationType":"lpc","percentages":"referToDimensionOfBorderBox","groups":["CSS Logical Properties"],"initial":"0","appliesto":"allElementsUAsNotRequiredWhenCollapse","computed":"twoAbsoluteLengthOrPercentages","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius"},"border-end-start-radius":{"syntax":"<length-percentage>{1,2}","media":"visual","inherited":false,"animationType":"lpc","percentages":"referToDimensionOfBorderBox","groups":["CSS Logical Properties"],"initial":"0","appliesto":"allElementsUAsNotRequiredWhenCollapse","computed":"twoAbsoluteLengthOrPercentages","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius"},"border-image":{"syntax":"<\'border-image-source\'> || <\'border-image-slice\'> [ / <\'border-image-width\'> | / <\'border-image-width\'>? / <\'border-image-outset\'> ]? || <\'border-image-repeat\'>","media":"visual","inherited":false,"animationType":"discrete","percentages":["border-image-slice","border-image-width"],"groups":["CSS Backgrounds and Borders"],"initial":["border-image-source","border-image-slice","border-image-width","border-image-outset","border-image-repeat"],"appliesto":"allElementsExceptTableElementsWhenCollapse","computed":["border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width"],"order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-image"},"border-image-outset":{"syntax":"[ <length> | <number> ]{1,4}","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":"0","appliesto":"allElementsExceptTableElementsWhenCollapse","computed":"asSpecifiedRelativeToAbsoluteLengths","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-image-outset"},"border-image-repeat":{"syntax":"[ stretch | repeat | round | space ]{1,2}","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":"stretch","appliesto":"allElementsExceptTableElementsWhenCollapse","computed":"asSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-image-repeat"},"border-image-slice":{"syntax":"<number-percentage>{1,4} && fill?","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"referToSizeOfBorderImage","groups":["CSS Backgrounds and Borders"],"initial":"100%","appliesto":"allElementsExceptTableElementsWhenCollapse","computed":"oneToFourPercentagesOrAbsoluteLengthsPlusFill","order":"percentagesOrLengthsFollowedByFill","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-image-slice"},"border-image-source":{"syntax":"none | <image>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":"none","appliesto":"allElementsExceptTableElementsWhenCollapse","computed":"noneOrImageWithAbsoluteURI","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-image-source"},"border-image-width":{"syntax":"[ <length-percentage> | <number> | auto ]{1,4}","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"referToWidthOrHeightOfBorderImageArea","groups":["CSS Backgrounds and Borders"],"initial":"1","appliesto":"allElementsExceptTableElementsWhenCollapse","computed":"asSpecifiedRelativeToAbsoluteLengths","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-image-width"},"border-inline":{"syntax":"<\'border-top-width\'> || <\'border-top-style\'> || <\'color\'>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Logical Properties"],"initial":["border-top-width","border-top-style","border-top-color"],"appliesto":"allElements","computed":["border-top-width","border-top-style","border-top-color"],"order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-inline"},"border-inline-end":{"syntax":"<\'border-top-width\'> || <\'border-top-style\'> || <\'color\'>","media":"visual","inherited":false,"animationType":["border-inline-end-color","border-inline-end-style","border-inline-end-width"],"percentages":"no","groups":["CSS Logical Properties"],"initial":["border-width","border-style","color"],"appliesto":"allElements","computed":["border-width","border-style","border-inline-end-color"],"order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-inline-end"},"border-inline-color":{"syntax":"<\'border-top-color\'>{1,2}","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Logical Properties"],"initial":"currentcolor","appliesto":"allElements","computed":"computedColor","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-inline-color"},"border-inline-style":{"syntax":"<\'border-top-style\'>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Logical Properties"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-inline-style"},"border-inline-width":{"syntax":"<\'border-top-width\'>","media":"visual","inherited":false,"animationType":"discrete","percentages":"logicalWidthOfContainingBlock","groups":["CSS Logical Properties"],"initial":"medium","appliesto":"allElements","computed":"absoluteLengthZeroIfBorderStyleNoneOrHidden","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-inline-width"},"border-inline-end-color":{"syntax":"<\'border-top-color\'>","media":"visual","inherited":false,"animationType":"color","percentages":"no","groups":["CSS Logical Properties"],"initial":"currentcolor","appliesto":"allElements","computed":"computedColor","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color"},"border-inline-end-style":{"syntax":"<\'border-top-style\'>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Logical Properties"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style"},"border-inline-end-width":{"syntax":"<\'border-top-width\'>","media":"visual","inherited":false,"animationType":"length","percentages":"logicalWidthOfContainingBlock","groups":["CSS Logical Properties"],"initial":"medium","appliesto":"allElements","computed":"absoluteLengthZeroIfBorderStyleNoneOrHidden","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width"},"border-inline-start":{"syntax":"<\'border-top-width\'> || <\'border-top-style\'> || <\'color\'>","media":"visual","inherited":false,"animationType":["border-inline-start-color","border-inline-start-style","border-inline-start-width"],"percentages":"no","groups":["CSS Logical Properties"],"initial":["border-width","border-style","color"],"appliesto":"allElements","computed":["border-width","border-style","border-inline-start-color"],"order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-inline-start"},"border-inline-start-color":{"syntax":"<\'border-top-color\'>","media":"visual","inherited":false,"animationType":"color","percentages":"no","groups":["CSS Logical Properties"],"initial":"currentcolor","appliesto":"allElements","computed":"computedColor","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color"},"border-inline-start-style":{"syntax":"<\'border-top-style\'>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Logical Properties"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style"},"border-inline-start-width":{"syntax":"<\'border-top-width\'>","media":"visual","inherited":false,"animationType":"length","percentages":"logicalWidthOfContainingBlock","groups":["CSS Logical Properties"],"initial":"medium","appliesto":"allElements","computed":"absoluteLengthZeroIfBorderStyleNoneOrHidden","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width"},"border-left":{"syntax":"<line-width> || <line-style> || <color>","media":"visual","inherited":false,"animationType":["border-left-color","border-left-style","border-left-width"],"percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":["border-left-width","border-left-style","border-left-color"],"appliesto":"allElements","computed":["border-left-width","border-left-style","border-left-color"],"order":"orderOfAppearance","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-left"},"border-left-color":{"syntax":"<color>","media":"visual","inherited":false,"animationType":"color","percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":"currentcolor","appliesto":"allElements","computed":"computedColor","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-left-color"},"border-left-style":{"syntax":"<line-style>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-left-style"},"border-left-width":{"syntax":"<line-width>","media":"visual","inherited":false,"animationType":"length","percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":"medium","appliesto":"allElements","computed":"absoluteLengthOr0IfBorderLeftStyleNoneOrHidden","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-left-width"},"border-radius":{"syntax":"<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?","media":"visual","inherited":false,"animationType":["border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius"],"percentages":"referToDimensionOfBorderBox","groups":["CSS Backgrounds and Borders"],"initial":["border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius"],"appliesto":"allElementsUAsNotRequiredWhenCollapse","computed":["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius"],"order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-radius"},"border-right":{"syntax":"<line-width> || <line-style> || <color>","media":"visual","inherited":false,"animationType":["border-right-color","border-right-style","border-right-width"],"percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":["border-right-width","border-right-style","border-right-color"],"appliesto":"allElements","computed":["border-right-width","border-right-style","border-right-color"],"order":"orderOfAppearance","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-right"},"border-right-color":{"syntax":"<color>","media":"visual","inherited":false,"animationType":"color","percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":"currentcolor","appliesto":"allElements","computed":"computedColor","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-right-color"},"border-right-style":{"syntax":"<line-style>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-right-style"},"border-right-width":{"syntax":"<line-width>","media":"visual","inherited":false,"animationType":"length","percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":"medium","appliesto":"allElements","computed":"absoluteLengthOr0IfBorderRightStyleNoneOrHidden","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-right-width"},"border-spacing":{"syntax":"<length> <length>?","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Table"],"initial":"0","appliesto":"tableElements","computed":"twoAbsoluteLengths","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-spacing"},"border-start-end-radius":{"syntax":"<length-percentage>{1,2}","media":"visual","inherited":false,"animationType":"lpc","percentages":"referToDimensionOfBorderBox","groups":["CSS Logical Properties"],"initial":"0","appliesto":"allElementsUAsNotRequiredWhenCollapse","computed":"twoAbsoluteLengthOrPercentages","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius"},"border-start-start-radius":{"syntax":"<length-percentage>{1,2}","media":"visual","inherited":false,"animationType":"lpc","percentages":"referToDimensionOfBorderBox","groups":["CSS Logical Properties"],"initial":"0","appliesto":"allElementsUAsNotRequiredWhenCollapse","computed":"twoAbsoluteLengthOrPercentages","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius"},"border-style":{"syntax":"<line-style>{1,4}","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":["border-top-style","border-right-style","border-bottom-style","border-left-style"],"appliesto":"allElements","computed":["border-bottom-style","border-left-style","border-right-style","border-top-style"],"order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-style"},"border-top":{"syntax":"<line-width> || <line-style> || <color>","media":"visual","inherited":false,"animationType":["border-top-color","border-top-style","border-top-width"],"percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":["border-top-width","border-top-style","border-top-color"],"appliesto":"allElements","computed":["border-top-width","border-top-style","border-top-color"],"order":"orderOfAppearance","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-top"},"border-top-color":{"syntax":"<color>","media":"visual","inherited":false,"animationType":"color","percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":"currentcolor","appliesto":"allElements","computed":"computedColor","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-top-color"},"border-top-left-radius":{"syntax":"<length-percentage>{1,2}","media":"visual","inherited":false,"animationType":"lpc","percentages":"referToDimensionOfBorderBox","groups":["CSS Backgrounds and Borders"],"initial":"0","appliesto":"allElementsUAsNotRequiredWhenCollapse","computed":"twoAbsoluteLengthOrPercentages","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius"},"border-top-right-radius":{"syntax":"<length-percentage>{1,2}","media":"visual","inherited":false,"animationType":"lpc","percentages":"referToDimensionOfBorderBox","groups":["CSS Backgrounds and Borders"],"initial":"0","appliesto":"allElementsUAsNotRequiredWhenCollapse","computed":"twoAbsoluteLengthOrPercentages","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius"},"border-top-style":{"syntax":"<line-style>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-top-style"},"border-top-width":{"syntax":"<line-width>","media":"visual","inherited":false,"animationType":"length","percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":"medium","appliesto":"allElements","computed":"absoluteLengthOr0IfBorderTopStyleNoneOrHidden","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-top-width"},"border-width":{"syntax":"<line-width>{1,4}","media":"visual","inherited":false,"animationType":["border-bottom-width","border-left-width","border-right-width","border-top-width"],"percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":["border-top-width","border-right-width","border-bottom-width","border-left-width"],"appliesto":"allElements","computed":["border-bottom-width","border-left-width","border-right-width","border-top-width"],"order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/border-width"},"bottom":{"syntax":"<length> | <percentage> | auto","media":"visual","inherited":false,"animationType":"lpc","percentages":"referToContainingBlockHeight","groups":["CSS Positioning"],"initial":"auto","appliesto":"positionedElements","computed":"lengthAbsolutePercentageAsSpecifiedOtherwiseAuto","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/bottom"},"box-align":{"syntax":"start | center | end | baseline | stretch","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions","WebKit Extensions"],"initial":"stretch","appliesto":"elementsWithDisplayBoxOrInlineBox","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/box-align"},"box-decoration-break":{"syntax":"slice | clone","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Fragmentation"],"initial":"slice","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/box-decoration-break"},"box-direction":{"syntax":"normal | reverse | inherit","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions","WebKit Extensions"],"initial":"normal","appliesto":"elementsWithDisplayBoxOrInlineBox","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/box-direction"},"box-flex":{"syntax":"<number>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions","WebKit Extensions"],"initial":"0","appliesto":"directChildrenOfElementsWithDisplayMozBoxMozInlineBox","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/box-flex"},"box-flex-group":{"syntax":"<integer>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions","WebKit Extensions"],"initial":"1","appliesto":"inFlowChildrenOfBoxElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/box-flex-group"},"box-lines":{"syntax":"single | multiple","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions","WebKit Extensions"],"initial":"single","appliesto":"boxElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/box-lines"},"box-ordinal-group":{"syntax":"<integer>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions","WebKit Extensions"],"initial":"1","appliesto":"childrenOfBoxElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/box-ordinal-group"},"box-orient":{"syntax":"horizontal | vertical | inline-axis | block-axis | inherit","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions","WebKit Extensions"],"initial":"inlineAxisHorizontalInXUL","appliesto":"elementsWithDisplayBoxOrInlineBox","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/box-orient"},"box-pack":{"syntax":"start | center | end | justify","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions","WebKit Extensions"],"initial":"start","appliesto":"elementsWithDisplayMozBoxMozInlineBox","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/box-pack"},"box-shadow":{"syntax":"none | <shadow>#","media":"visual","inherited":false,"animationType":"shadowList","percentages":"no","groups":["CSS Backgrounds and Borders"],"initial":"none","appliesto":"allElements","computed":"absoluteLengthsSpecifiedColorAsSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/box-shadow"},"box-sizing":{"syntax":"content-box | border-box","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Basic User Interface"],"initial":"content-box","appliesto":"allElementsAcceptingWidthOrHeight","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/box-sizing"},"break-after":{"syntax":"auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Fragmentation"],"initial":"auto","appliesto":"blockLevelElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/break-after"},"break-before":{"syntax":"auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Fragmentation"],"initial":"auto","appliesto":"blockLevelElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/break-before"},"break-inside":{"syntax":"auto | avoid | avoid-page | avoid-column | avoid-region","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Fragmentation"],"initial":"auto","appliesto":"blockLevelElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/break-inside"},"caption-side":{"syntax":"top | bottom | block-start | block-end | inline-start | inline-end","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Table"],"initial":"top","appliesto":"tableCaptionElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/caption-side"},"caret-color":{"syntax":"auto | <color>","media":"interactive","inherited":true,"animationType":"color","percentages":"no","groups":["CSS Basic User Interface"],"initial":"auto","appliesto":"allElements","computed":"asAutoOrColor","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/caret-color"},"clear":{"syntax":"none | left | right | both | inline-start | inline-end","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Positioning"],"initial":"none","appliesto":"blockLevelElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/clear"},"clip":{"syntax":"<shape> | auto","media":"visual","inherited":false,"animationType":"rectangle","percentages":"no","groups":["CSS Masking"],"initial":"auto","appliesto":"absolutelyPositionedElements","computed":"autoOrRectangle","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/clip"},"clip-path":{"syntax":"<clip-source> | [ <basic-shape> || <geometry-box> ] | none","media":"visual","inherited":false,"animationType":"basicShapeOtherwiseNo","percentages":"referToReferenceBoxWhenSpecifiedOtherwiseBorderBox","groups":["CSS Masking"],"initial":"none","appliesto":"allElementsSVGContainerElements","computed":"asSpecifiedURLsAbsolute","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/clip-path"},"color":{"syntax":"<color>","media":"visual","inherited":true,"animationType":"color","percentages":"no","groups":["CSS Color"],"initial":"variesFromBrowserToBrowser","appliesto":"allElements","computed":"translucentValuesRGBAOtherwiseRGB","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/color"},"color-adjust":{"syntax":"economy | exact","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Color"],"initial":"economy","appliesto":"allElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/color-adjust"},"column-count":{"syntax":"<integer> | auto","media":"visual","inherited":false,"animationType":"integer","percentages":"no","groups":["CSS Columns"],"initial":"auto","appliesto":"blockContainersExceptTableWrappers","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/column-count"},"column-fill":{"syntax":"auto | balance | balance-all","media":"visualInContinuousMediaNoEffectInOverflowColumns","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Columns"],"initial":"balance","appliesto":"multicolElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/column-fill"},"column-gap":{"syntax":"normal | <length-percentage>","media":"visual","inherited":false,"animationType":"lpc","percentages":"referToDimensionOfContentArea","groups":["CSS Box Alignment"],"initial":"normal","appliesto":"multiColumnElementsFlexContainersGridContainers","computed":"asSpecifiedWithLengthsAbsoluteAndNormalComputingToZeroExceptMultiColumn","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/column-gap"},"column-rule":{"syntax":"<\'column-rule-width\'> || <\'column-rule-style\'> || <\'column-rule-color\'>","media":"visual","inherited":false,"animationType":["column-rule-color","column-rule-style","column-rule-width"],"percentages":"no","groups":["CSS Columns"],"initial":["column-rule-width","column-rule-style","column-rule-color"],"appliesto":"multicolElements","computed":["column-rule-color","column-rule-style","column-rule-width"],"order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/column-rule"},"column-rule-color":{"syntax":"<color>","media":"visual","inherited":false,"animationType":"color","percentages":"no","groups":["CSS Columns"],"initial":"currentcolor","appliesto":"multicolElements","computed":"computedColor","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/column-rule-color"},"column-rule-style":{"syntax":"<\'border-style\'>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Columns"],"initial":"none","appliesto":"multicolElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/column-rule-style"},"column-rule-width":{"syntax":"<\'border-width\'>","media":"visual","inherited":false,"animationType":"length","percentages":"no","groups":["CSS Columns"],"initial":"medium","appliesto":"multicolElements","computed":"absoluteLength0IfColumnRuleStyleNoneOrHidden","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/column-rule-width"},"column-span":{"syntax":"none | all","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Columns"],"initial":"none","appliesto":"inFlowBlockLevelElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/column-span"},"column-width":{"syntax":"<length> | auto","media":"visual","inherited":false,"animationType":"length","percentages":"no","groups":["CSS Columns"],"initial":"auto","appliesto":"blockContainersExceptTableWrappers","computed":"absoluteLengthZeroOrLarger","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/column-width"},"columns":{"syntax":"<\'column-width\'> || <\'column-count\'>","media":"visual","inherited":false,"animationType":["column-width","column-count"],"percentages":"no","groups":["CSS Columns"],"initial":["column-width","column-count"],"appliesto":"blockContainersExceptTableWrappers","computed":["column-width","column-count"],"order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/columns"},"contain":{"syntax":"none | strict | content | [ size || layout || style || paint ]","media":"all","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Containment"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/contain"},"content":{"syntax":"normal | none | [ <content-replacement> | <content-list> ] [/ <string> ]?","media":"all","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Generated Content"],"initial":"normal","appliesto":"beforeAndAfterPseudos","computed":"normalOnElementsForPseudosNoneAbsoluteURIStringOrAsSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/content"},"counter-increment":{"syntax":"[ <custom-ident> <integer>? ]+ | none","media":"all","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Counter Styles"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/counter-increment"},"counter-reset":{"syntax":"[ <custom-ident> <integer>? ]+ | none","media":"all","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Counter Styles"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/counter-reset"},"counter-set":{"syntax":"[ <custom-ident> <integer>? ]+ | none","media":"all","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Counter Styles"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/counter-set"},"cursor":{"syntax":"[ [ <url> [ <x> <y> ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing ] ]","media":["visual","interactive"],"inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Basic User Interface"],"initial":"auto","appliesto":"allElements","computed":"asSpecifiedURLsAbsolute","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/cursor"},"direction":{"syntax":"ltr | rtl","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Writing Modes"],"initial":"ltr","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/direction"},"display":{"syntax":"[ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy>","media":"all","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Display"],"initial":"inline","appliesto":"allElements","computed":"asSpecifiedExceptPositionedFloatingAndRootElementsKeywordMaybeDifferent","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/display"},"empty-cells":{"syntax":"show | hide","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Table"],"initial":"show","appliesto":"tableCellElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/empty-cells"},"filter":{"syntax":"none | <filter-function-list>","media":"visual","inherited":false,"animationType":"filterList","percentages":"no","groups":["Filter Effects"],"initial":"none","appliesto":"allElementsSVGContainerElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/filter"},"flex":{"syntax":"none | [ <\'flex-grow\'> <\'flex-shrink\'>? || <\'flex-basis\'> ]","media":"visual","inherited":false,"animationType":["flex-grow","flex-shrink","flex-basis"],"percentages":"no","groups":["CSS Flexible Box Layout"],"initial":["flex-grow","flex-shrink","flex-basis"],"appliesto":"flexItemsAndInFlowPseudos","computed":["flex-grow","flex-shrink","flex-basis"],"order":"orderOfAppearance","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/flex"},"flex-basis":{"syntax":"content | <\'width\'>","media":"visual","inherited":false,"animationType":"lpc","percentages":"referToFlexContainersInnerMainSize","groups":["CSS Flexible Box Layout"],"initial":"auto","appliesto":"flexItemsAndInFlowPseudos","computed":"asSpecifiedRelativeToAbsoluteLengths","order":"lengthOrPercentageBeforeKeywordIfBothPresent","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/flex-basis"},"flex-direction":{"syntax":"row | row-reverse | column | column-reverse","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Flexible Box Layout"],"initial":"row","appliesto":"flexContainers","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/flex-direction"},"flex-flow":{"syntax":"<\'flex-direction\'> || <\'flex-wrap\'>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Flexible Box Layout"],"initial":["flex-direction","flex-wrap"],"appliesto":"flexContainers","computed":["flex-direction","flex-wrap"],"order":"orderOfAppearance","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/flex-flow"},"flex-grow":{"syntax":"<number>","media":"visual","inherited":false,"animationType":"number","percentages":"no","groups":["CSS Flexible Box Layout"],"initial":"0","appliesto":"flexItemsAndInFlowPseudos","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/flex-grow"},"flex-shrink":{"syntax":"<number>","media":"visual","inherited":false,"animationType":"number","percentages":"no","groups":["CSS Flexible Box Layout"],"initial":"1","appliesto":"flexItemsAndInFlowPseudos","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/flex-shrink"},"flex-wrap":{"syntax":"nowrap | wrap | wrap-reverse","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Flexible Box Layout"],"initial":"nowrap","appliesto":"flexContainers","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/flex-wrap"},"float":{"syntax":"left | right | none | inline-start | inline-end","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Positioning"],"initial":"none","appliesto":"allElementsNoEffectIfDisplayNone","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/float"},"font":{"syntax":"[ [ <\'font-style\'> || <font-variant-css21> || <\'font-weight\'> || <\'font-stretch\'> ]? <\'font-size\'> [ / <\'line-height\'> ]? <\'font-family\'> ] | caption | icon | menu | message-box | small-caption | status-bar","media":"visual","inherited":true,"animationType":["font-style","font-variant","font-weight","font-stretch","font-size","line-height","font-family"],"percentages":["font-size","line-height"],"groups":["CSS Fonts"],"initial":["font-style","font-variant","font-weight","font-stretch","font-size","line-height","font-family"],"appliesto":"allElements","computed":["font-style","font-variant","font-weight","font-stretch","font-size","line-height","font-family"],"order":"orderOfAppearance","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/font"},"font-family":{"syntax":"[ <family-name> | <generic-family> ]#","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Fonts"],"initial":"dependsOnUserAgent","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/font-family"},"font-feature-settings":{"syntax":"normal | <feature-tag-value>#","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Fonts"],"initial":"normal","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/font-feature-settings"},"font-kerning":{"syntax":"auto | normal | none","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Fonts"],"initial":"auto","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/font-kerning"},"font-language-override":{"syntax":"normal | <string>","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Fonts"],"initial":"normal","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/font-language-override"},"font-optical-sizing":{"syntax":"auto | none","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Fonts"],"initial":"auto","appliesto":"allElements","computed":"asSpecified","order":"perGrammar","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/font-optical-sizing"},"font-variation-settings":{"syntax":"normal | [ <string> <number> ]#","media":"visual","inherited":true,"animationType":"transform","percentages":"no","groups":["CSS Fonts"],"initial":"normal","appliesto":"allElements","computed":"asSpecified","order":"perGrammar","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/font-variation-settings"},"font-size":{"syntax":"<absolute-size> | <relative-size> | <length-percentage>","media":"visual","inherited":true,"animationType":"length","percentages":"referToParentElementsFontSize","groups":["CSS Fonts"],"initial":"medium","appliesto":"allElements","computed":"asSpecifiedRelativeToAbsoluteLengths","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/font-size"},"font-size-adjust":{"syntax":"none | <number>","media":"visual","inherited":true,"animationType":"number","percentages":"no","groups":["CSS Fonts"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/font-size-adjust"},"font-smooth":{"syntax":"auto | never | always | <absolute-size> | <length>","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Fonts"],"initial":"auto","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/font-smooth"},"font-stretch":{"syntax":"<font-stretch-absolute>","media":"visual","inherited":true,"animationType":"fontStretch","percentages":"no","groups":["CSS Fonts"],"initial":"normal","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/font-stretch"},"font-style":{"syntax":"normal | italic | oblique <angle>?","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Fonts"],"initial":"normal","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/font-style"},"font-synthesis":{"syntax":"none | [ weight || style ]","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Fonts"],"initial":"weight style","appliesto":"allElements","computed":"asSpecified","order":"orderOfAppearance","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/font-synthesis"},"font-variant":{"syntax":"normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> || stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) || [ small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ] || <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero || <east-asian-variant-values> || <east-asian-width-values> || ruby ]","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Fonts"],"initial":"normal","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/font-variant"},"font-variant-alternates":{"syntax":"normal | [ stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) ]","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Fonts"],"initial":"normal","appliesto":"allElements","computed":"asSpecified","order":"orderOfAppearance","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/font-variant-alternates"},"font-variant-caps":{"syntax":"normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Fonts"],"initial":"normal","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/font-variant-caps"},"font-variant-east-asian":{"syntax":"normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ]","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Fonts"],"initial":"normal","appliesto":"allElements","computed":"asSpecified","order":"orderOfAppearance","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/font-variant-east-asian"},"font-variant-ligatures":{"syntax":"normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Fonts"],"initial":"normal","appliesto":"allElements","computed":"asSpecified","order":"orderOfAppearance","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/font-variant-ligatures"},"font-variant-numeric":{"syntax":"normal | [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ]","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Fonts"],"initial":"normal","appliesto":"allElements","computed":"asSpecified","order":"orderOfAppearance","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/font-variant-numeric"},"font-variant-position":{"syntax":"normal | sub | super","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Fonts"],"initial":"normal","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/font-variant-position"},"font-weight":{"syntax":"<font-weight-absolute> | bolder | lighter","media":"visual","inherited":true,"animationType":"fontWeight","percentages":"no","groups":["CSS Fonts"],"initial":"normal","appliesto":"allElements","computed":"keywordOrNumericalValueBolderLighterTransformedToRealValue","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/font-weight"},"gap":{"syntax":"<\'row-gap\'> <\'column-gap\'>?","media":"visual","inherited":false,"animationType":["row-gap","column-gap"],"percentages":"no","groups":["CSS Box Alignment"],"initial":["row-gap","column-gap"],"appliesto":"multiColumnElementsFlexContainersGridContainers","computed":["row-gap","column-gap"],"order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/gap"},"grid":{"syntax":"<\'grid-template\'> | <\'grid-template-rows\'> / [ auto-flow && dense? ] <\'grid-auto-columns\'>? | [ auto-flow && dense? ] <\'grid-auto-rows\'>? / <\'grid-template-columns\'>","media":"visual","inherited":false,"animationType":"discrete","percentages":["grid-template-rows","grid-template-columns","grid-auto-rows","grid-auto-columns"],"groups":["CSS Grid Layout"],"initial":["grid-template-rows","grid-template-columns","grid-template-areas","grid-auto-rows","grid-auto-columns","grid-auto-flow","grid-column-gap","grid-row-gap","column-gap","row-gap"],"appliesto":"gridContainers","computed":["grid-template-rows","grid-template-columns","grid-template-areas","grid-auto-rows","grid-auto-columns","grid-auto-flow","grid-column-gap","grid-row-gap","column-gap","row-gap"],"order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/grid"},"grid-area":{"syntax":"<grid-line> [ / <grid-line> ]{0,3}","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Grid Layout"],"initial":["grid-row-start","grid-column-start","grid-row-end","grid-column-end"],"appliesto":"gridItemsAndBoxesWithinGridContainer","computed":["grid-row-start","grid-column-start","grid-row-end","grid-column-end"],"order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/grid-area"},"grid-auto-columns":{"syntax":"<track-size>+","media":"visual","inherited":false,"animationType":"discrete","percentages":"referToDimensionOfContentArea","groups":["CSS Grid Layout"],"initial":"auto","appliesto":"gridContainers","computed":"percentageAsSpecifiedOrAbsoluteLength","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/grid-auto-columns"},"grid-auto-flow":{"syntax":"[ row | column ] || dense","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Grid Layout"],"initial":"row","appliesto":"gridContainers","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/grid-auto-flow"},"grid-auto-rows":{"syntax":"<track-size>+","media":"visual","inherited":false,"animationType":"discrete","percentages":"referToDimensionOfContentArea","groups":["CSS Grid Layout"],"initial":"auto","appliesto":"gridContainers","computed":"percentageAsSpecifiedOrAbsoluteLength","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/grid-auto-rows"},"grid-column":{"syntax":"<grid-line> [ / <grid-line> ]?","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Grid Layout"],"initial":["grid-column-start","grid-column-end"],"appliesto":"gridItemsAndBoxesWithinGridContainer","computed":["grid-column-start","grid-column-end"],"order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/grid-column"},"grid-column-end":{"syntax":"<grid-line>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Grid Layout"],"initial":"auto","appliesto":"gridItemsAndBoxesWithinGridContainer","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/grid-column-end"},"grid-column-gap":{"syntax":"<length-percentage>","media":"visual","inherited":false,"animationType":"length","percentages":"referToDimensionOfContentArea","groups":["CSS Grid Layout"],"initial":"0","appliesto":"gridContainers","computed":"percentageAsSpecifiedOrAbsoluteLength","order":"uniqueOrder","status":"obsolete","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/column-gap"},"grid-column-start":{"syntax":"<grid-line>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Grid Layout"],"initial":"auto","appliesto":"gridItemsAndBoxesWithinGridContainer","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/grid-column-start"},"grid-gap":{"syntax":"<\'grid-row-gap\'> <\'grid-column-gap\'>?","media":"visual","inherited":false,"animationType":["grid-row-gap","grid-column-gap"],"percentages":"no","groups":["CSS Grid Layout"],"initial":["grid-row-gap","grid-column-gap"],"appliesto":"gridContainers","computed":["grid-row-gap","grid-column-gap"],"order":"uniqueOrder","status":"obsolete","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/gap"},"grid-row":{"syntax":"<grid-line> [ / <grid-line> ]?","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Grid Layout"],"initial":["grid-row-start","grid-row-end"],"appliesto":"gridItemsAndBoxesWithinGridContainer","computed":["grid-row-start","grid-row-end"],"order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/grid-row"},"grid-row-end":{"syntax":"<grid-line>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Grid Layout"],"initial":"auto","appliesto":"gridItemsAndBoxesWithinGridContainer","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/grid-row-end"},"grid-row-gap":{"syntax":"<length-percentage>","media":"visual","inherited":false,"animationType":"length","percentages":"referToDimensionOfContentArea","groups":["CSS Grid Layout"],"initial":"0","appliesto":"gridContainers","computed":"percentageAsSpecifiedOrAbsoluteLength","order":"uniqueOrder","status":"obsolete","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/row-gap"},"grid-row-start":{"syntax":"<grid-line>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Grid Layout"],"initial":"auto","appliesto":"gridItemsAndBoxesWithinGridContainer","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/grid-row-start"},"grid-template":{"syntax":"none | [ <\'grid-template-rows\'> / <\'grid-template-columns\'> ] | [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?","media":"visual","inherited":false,"animationType":"discrete","percentages":["grid-template-columns","grid-template-rows"],"groups":["CSS Grid Layout"],"initial":["grid-template-columns","grid-template-rows","grid-template-areas"],"appliesto":"gridContainers","computed":["grid-template-columns","grid-template-rows","grid-template-areas"],"order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/grid-template"},"grid-template-areas":{"syntax":"none | <string>+","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Grid Layout"],"initial":"none","appliesto":"gridContainers","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/grid-template-areas"},"grid-template-columns":{"syntax":"none | <track-list> | <auto-track-list> | subgrid <line-name-list>?","media":"visual","inherited":false,"animationType":"simpleListOfLpcDifferenceLpc","percentages":"referToDimensionOfContentArea","groups":["CSS Grid Layout"],"initial":"none","appliesto":"gridContainers","computed":"asSpecifiedRelativeToAbsoluteLengths","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/grid-template-columns"},"grid-template-rows":{"syntax":"none | <track-list> | <auto-track-list> | subgrid <line-name-list>?","media":"visual","inherited":false,"animationType":"simpleListOfLpcDifferenceLpc","percentages":"referToDimensionOfContentArea","groups":["CSS Grid Layout"],"initial":"none","appliesto":"gridContainers","computed":"asSpecifiedRelativeToAbsoluteLengths","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/grid-template-rows"},"hanging-punctuation":{"syntax":"none | [ first || [ force-end | allow-end ] || last ]","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Text"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/hanging-punctuation"},"height":{"syntax":"auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)","media":"visual","inherited":false,"animationType":"lpc","percentages":"regardingHeightOfGeneratedBoxContainingBlockPercentagesRelativeToContainingBlock","groups":["CSS Box Model"],"initial":"auto","appliesto":"allElementsButNonReplacedAndTableColumns","computed":"percentageAutoOrAbsoluteLength","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/height"},"hyphens":{"syntax":"none | manual | auto","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Text"],"initial":"manual","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/hyphens"},"image-orientation":{"syntax":"from-image | <angle> | [ <angle>? flip ]","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Images"],"initial":"from-image","appliesto":"allElements","computed":"angleRoundedToNextQuarter","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/image-orientation"},"image-rendering":{"syntax":"auto | crisp-edges | pixelated","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Images"],"initial":"auto","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/image-rendering"},"image-resolution":{"syntax":"[ from-image || <resolution> ] && snap?","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Images"],"initial":"1dppx","appliesto":"allElements","computed":"asSpecifiedWithExceptionOfResolution","order":"uniqueOrder","status":"experimental"},"ime-mode":{"syntax":"auto | normal | active | inactive | disabled","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Basic User Interface"],"initial":"auto","appliesto":"textFields","computed":"asSpecified","order":"uniqueOrder","status":"obsolete","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/ime-mode"},"initial-letter":{"syntax":"normal | [ <number> <integer>? ]","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Inline"],"initial":"normal","appliesto":"firstLetterPseudoElementsAndInlineLevelFirstChildren","computed":"asSpecified","order":"uniqueOrder","status":"experimental","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/initial-letter"},"initial-letter-align":{"syntax":"[ auto | alphabetic | hanging | ideographic ]","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Inline"],"initial":"auto","appliesto":"firstLetterPseudoElementsAndInlineLevelFirstChildren","computed":"asSpecified","order":"uniqueOrder","status":"experimental","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/initial-letter-align"},"inline-size":{"syntax":"<\'width\'>","media":"visual","inherited":false,"animationType":"lpc","percentages":"inlineSizeOfContainingBlock","groups":["CSS Logical Properties"],"initial":"auto","appliesto":"sameAsWidthAndHeight","computed":"sameAsWidthAndHeight","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/inline-size"},"inset":{"syntax":"<\'top\'>{1,4}","media":"visual","inherited":false,"animationType":"lpc","percentages":"logicalHeightOfContainingBlock","groups":["CSS Logical Properties"],"initial":"auto","appliesto":"positionedElements","computed":"sameAsBoxOffsets","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/inset"},"inset-block":{"syntax":"<\'top\'>{1,2}","media":"visual","inherited":false,"animationType":"lpc","percentages":"logicalHeightOfContainingBlock","groups":["CSS Logical Properties"],"initial":"auto","appliesto":"positionedElements","computed":"sameAsBoxOffsets","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/inset-block"},"inset-block-end":{"syntax":"<\'top\'>","media":"visual","inherited":false,"animationType":"lpc","percentages":"logicalHeightOfContainingBlock","groups":["CSS Logical Properties"],"initial":"auto","appliesto":"positionedElements","computed":"sameAsBoxOffsets","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/inset-block-end"},"inset-block-start":{"syntax":"<\'top\'>","media":"visual","inherited":false,"animationType":"lpc","percentages":"logicalHeightOfContainingBlock","groups":["CSS Logical Properties"],"initial":"auto","appliesto":"positionedElements","computed":"sameAsBoxOffsets","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/inset-block-start"},"inset-inline":{"syntax":"<\'top\'>{1,2}","media":"visual","inherited":false,"animationType":"lpc","percentages":"logicalWidthOfContainingBlock","groups":["CSS Logical Properties"],"initial":"auto","appliesto":"positionedElements","computed":"sameAsBoxOffsets","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/inset-inline"},"inset-inline-end":{"syntax":"<\'top\'>","media":"visual","inherited":false,"animationType":"lpc","percentages":"logicalWidthOfContainingBlock","groups":["CSS Logical Properties"],"initial":"auto","appliesto":"positionedElements","computed":"sameAsBoxOffsets","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/inset-inline-end"},"inset-inline-start":{"syntax":"<\'top\'>","media":"visual","inherited":false,"animationType":"lpc","percentages":"logicalWidthOfContainingBlock","groups":["CSS Logical Properties"],"initial":"auto","appliesto":"positionedElements","computed":"sameAsBoxOffsets","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/inset-inline-start"},"isolation":{"syntax":"auto | isolate","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Compositing and Blending"],"initial":"auto","appliesto":"allElementsSVGContainerGraphicsAndGraphicsReferencingElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/isolation"},"justify-content":{"syntax":"normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ]","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Box Alignment"],"initial":"normal","appliesto":"flexContainers","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/justify-content"},"justify-items":{"syntax":"normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ] | legacy | legacy && [ left | right | center ]","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Box Alignment"],"initial":"legacy","appliesto":"allElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/justify-items"},"justify-self":{"syntax":"auto | normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ]","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Box Alignment"],"initial":"auto","appliesto":"blockLevelBoxesAndAbsolutelyPositionedBoxesAndGridItems","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/justify-self"},"justify-tracks":{"syntax":"[ normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ] ]#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Grid Layout"],"initial":"normal","appliesto":"gridContainersWithMasonryLayoutInTheirInlineAxis","computed":"asSpecified","order":"uniqueOrder","status":"experimental","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/justify-tracks"},"left":{"syntax":"<length> | <percentage> | auto","media":"visual","inherited":false,"animationType":"lpc","percentages":"referToWidthOfContainingBlock","groups":["CSS Positioning"],"initial":"auto","appliesto":"positionedElements","computed":"lengthAbsolutePercentageAsSpecifiedOtherwiseAuto","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/left"},"letter-spacing":{"syntax":"normal | <length>","media":"visual","inherited":true,"animationType":"length","percentages":"no","groups":["CSS Text"],"initial":"normal","appliesto":"allElements","computed":"optimumValueOfAbsoluteLengthOrNormal","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/letter-spacing"},"line-break":{"syntax":"auto | loose | normal | strict | anywhere","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Text"],"initial":"auto","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/line-break"},"line-clamp":{"syntax":"none | <integer>","media":"visual","inherited":false,"animationType":"integer","percentages":"no","groups":["CSS Overflow"],"initial":"none","appliesto":"blockContainersExceptMultiColumnContainers","computed":"asSpecified","order":"perGrammar","status":"experimental"},"line-height":{"syntax":"normal | <number> | <length> | <percentage>","media":"visual","inherited":true,"animationType":"numberOrLength","percentages":"referToElementFontSize","groups":["CSS Fonts"],"initial":"normal","appliesto":"allElements","computed":"absoluteLengthOrAsSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/line-height"},"line-height-step":{"syntax":"<length>","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Fonts"],"initial":"0","appliesto":"blockContainers","computed":"absoluteLength","order":"perGrammar","status":"experimental","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/line-height-step"},"list-style":{"syntax":"<\'list-style-type\'> || <\'list-style-position\'> || <\'list-style-image\'>","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Lists and Counters"],"initial":["list-style-type","list-style-position","list-style-image"],"appliesto":"listItems","computed":["list-style-image","list-style-position","list-style-type"],"order":"orderOfAppearance","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/list-style"},"list-style-image":{"syntax":"<url> | none","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Lists and Counters"],"initial":"none","appliesto":"listItems","computed":"noneOrImageWithAbsoluteURI","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/list-style-image"},"list-style-position":{"syntax":"inside | outside","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Lists and Counters"],"initial":"outside","appliesto":"listItems","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/list-style-position"},"list-style-type":{"syntax":"<counter-style> | <string> | none","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Lists and Counters"],"initial":"disc","appliesto":"listItems","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/list-style-type"},"margin":{"syntax":"[ <length> | <percentage> | auto ]{1,4}","media":"visual","inherited":false,"animationType":"length","percentages":"referToWidthOfContainingBlock","groups":["CSS Box Model"],"initial":["margin-bottom","margin-left","margin-right","margin-top"],"appliesto":"allElementsExceptTableDisplayTypes","computed":["margin-bottom","margin-left","margin-right","margin-top"],"order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/margin"},"margin-block":{"syntax":"<\'margin-left\'>{1,2}","media":"visual","inherited":false,"animationType":"discrete","percentages":"dependsOnLayoutModel","groups":["CSS Logical Properties"],"initial":"0","appliesto":"sameAsMargin","computed":"lengthAbsolutePercentageAsSpecifiedOtherwiseAuto","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/margin-block"},"margin-block-end":{"syntax":"<\'margin-left\'>","media":"visual","inherited":false,"animationType":"length","percentages":"dependsOnLayoutModel","groups":["CSS Logical Properties"],"initial":"0","appliesto":"sameAsMargin","computed":"lengthAbsolutePercentageAsSpecifiedOtherwiseAuto","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/margin-block-end"},"margin-block-start":{"syntax":"<\'margin-left\'>","media":"visual","inherited":false,"animationType":"length","percentages":"dependsOnLayoutModel","groups":["CSS Logical Properties"],"initial":"0","appliesto":"sameAsMargin","computed":"lengthAbsolutePercentageAsSpecifiedOtherwiseAuto","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/margin-block-start"},"margin-bottom":{"syntax":"<length> | <percentage> | auto","media":"visual","inherited":false,"animationType":"length","percentages":"referToWidthOfContainingBlock","groups":["CSS Box Model"],"initial":"0","appliesto":"allElementsExceptTableDisplayTypes","computed":"percentageAsSpecifiedOrAbsoluteLength","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/margin-bottom"},"margin-inline":{"syntax":"<\'margin-left\'>{1,2}","media":"visual","inherited":false,"animationType":"discrete","percentages":"dependsOnLayoutModel","groups":["CSS Logical Properties"],"initial":"0","appliesto":"sameAsMargin","computed":"lengthAbsolutePercentageAsSpecifiedOtherwiseAuto","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/margin-inline"},"margin-inline-end":{"syntax":"<\'margin-left\'>","media":"visual","inherited":false,"animationType":"length","percentages":"dependsOnLayoutModel","groups":["CSS Logical Properties"],"initial":"0","appliesto":"sameAsMargin","computed":"lengthAbsolutePercentageAsSpecifiedOtherwiseAuto","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/margin-inline-end"},"margin-inline-start":{"syntax":"<\'margin-left\'>","media":"visual","inherited":false,"animationType":"length","percentages":"dependsOnLayoutModel","groups":["CSS Logical Properties"],"initial":"0","appliesto":"sameAsMargin","computed":"lengthAbsolutePercentageAsSpecifiedOtherwiseAuto","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/margin-inline-start"},"margin-left":{"syntax":"<length> | <percentage> | auto","media":"visual","inherited":false,"animationType":"length","percentages":"referToWidthOfContainingBlock","groups":["CSS Box Model"],"initial":"0","appliesto":"allElementsExceptTableDisplayTypes","computed":"percentageAsSpecifiedOrAbsoluteLength","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/margin-left"},"margin-right":{"syntax":"<length> | <percentage> | auto","media":"visual","inherited":false,"animationType":"length","percentages":"referToWidthOfContainingBlock","groups":["CSS Box Model"],"initial":"0","appliesto":"allElementsExceptTableDisplayTypes","computed":"percentageAsSpecifiedOrAbsoluteLength","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/margin-right"},"margin-top":{"syntax":"<length> | <percentage> | auto","media":"visual","inherited":false,"animationType":"length","percentages":"referToWidthOfContainingBlock","groups":["CSS Box Model"],"initial":"0","appliesto":"allElementsExceptTableDisplayTypes","computed":"percentageAsSpecifiedOrAbsoluteLength","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/margin-top"},"margin-trim":{"syntax":"none | in-flow | all","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Box Model"],"initial":"none","appliesto":"blockContainersAndMultiColumnContainers","computed":"asSpecified","order":"perGrammar","alsoAppliesTo":["::first-letter","::first-line"],"status":"experimental","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/margin-trim"},"mask":{"syntax":"<mask-layer>#","media":"visual","inherited":false,"animationType":["mask-image","mask-mode","mask-repeat","mask-position","mask-clip","mask-origin","mask-size","mask-composite"],"percentages":["mask-position"],"groups":["CSS Masking"],"initial":["mask-image","mask-mode","mask-repeat","mask-position","mask-clip","mask-origin","mask-size","mask-composite"],"appliesto":"allElementsSVGContainerElements","computed":["mask-image","mask-mode","mask-repeat","mask-position","mask-clip","mask-origin","mask-size","mask-composite"],"order":"perGrammar","stacking":true,"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mask"},"mask-border":{"syntax":"<\'mask-border-source\'> || <\'mask-border-slice\'> [ / <\'mask-border-width\'>? [ / <\'mask-border-outset\'> ]? ]? || <\'mask-border-repeat\'> || <\'mask-border-mode\'>","media":"visual","inherited":false,"animationType":["mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width"],"percentages":["mask-border-slice","mask-border-width"],"groups":["CSS Masking"],"initial":["mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width"],"appliesto":"allElementsSVGContainerElements","computed":["mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width"],"order":"perGrammar","stacking":true,"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mask-border"},"mask-border-mode":{"syntax":"luminance | alpha","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Masking"],"initial":"alpha","appliesto":"allElementsSVGContainerElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mask-border-mode"},"mask-border-outset":{"syntax":"[ <length> | <number> ]{1,4}","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Masking"],"initial":"0","appliesto":"allElementsSVGContainerElements","computed":"asSpecifiedRelativeToAbsoluteLengths","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mask-border-outset"},"mask-border-repeat":{"syntax":"[ stretch | repeat | round | space ]{1,2}","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Masking"],"initial":"stretch","appliesto":"allElementsSVGContainerElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mask-border-repeat"},"mask-border-slice":{"syntax":"<number-percentage>{1,4} fill?","media":"visual","inherited":false,"animationType":"discrete","percentages":"referToSizeOfMaskBorderImage","groups":["CSS Masking"],"initial":"0","appliesto":"allElementsSVGContainerElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mask-border-slice"},"mask-border-source":{"syntax":"none | <image>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Masking"],"initial":"none","appliesto":"allElementsSVGContainerElements","computed":"asSpecifiedURLsAbsolute","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mask-border-source"},"mask-border-width":{"syntax":"[ <length-percentage> | <number> | auto ]{1,4}","media":"visual","inherited":false,"animationType":"discrete","percentages":"relativeToMaskBorderImageArea","groups":["CSS Masking"],"initial":"auto","appliesto":"allElementsSVGContainerElements","computed":"asSpecifiedRelativeToAbsoluteLengths","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mask-border-width"},"mask-clip":{"syntax":"[ <geometry-box> | no-clip ]#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Masking"],"initial":"border-box","appliesto":"allElementsSVGContainerElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mask-clip"},"mask-composite":{"syntax":"<compositing-operator>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Masking"],"initial":"add","appliesto":"allElementsSVGContainerElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mask-composite"},"mask-image":{"syntax":"<mask-reference>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Masking"],"initial":"none","appliesto":"allElementsSVGContainerElements","computed":"asSpecifiedURLsAbsolute","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mask-image"},"mask-mode":{"syntax":"<masking-mode>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Masking"],"initial":"match-source","appliesto":"allElementsSVGContainerElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mask-mode"},"mask-origin":{"syntax":"<geometry-box>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Masking"],"initial":"border-box","appliesto":"allElementsSVGContainerElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mask-origin"},"mask-position":{"syntax":"<position>#","media":"visual","inherited":false,"animationType":"repeatableListOfSimpleListOfLpc","percentages":"referToSizeOfMaskPaintingArea","groups":["CSS Masking"],"initial":"center","appliesto":"allElementsSVGContainerElements","computed":"consistsOfTwoKeywordsForOriginAndOffsets","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mask-position"},"mask-repeat":{"syntax":"<repeat-style>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Masking"],"initial":"no-repeat","appliesto":"allElementsSVGContainerElements","computed":"consistsOfTwoDimensionKeywords","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mask-repeat"},"mask-size":{"syntax":"<bg-size>#","media":"visual","inherited":false,"animationType":"repeatableListOfSimpleListOfLpc","percentages":"no","groups":["CSS Masking"],"initial":"auto","appliesto":"allElementsSVGContainerElements","computed":"asSpecifiedRelativeToAbsoluteLengths","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mask-size"},"mask-type":{"syntax":"luminance | alpha","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Masking"],"initial":"luminance","appliesto":"maskElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mask-type"},"masonry-auto-flow":{"syntax":"[ pack | next ] || [ definite-first | ordered ]","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Grid Layout"],"initial":"pack","appliesto":"gridContainersWithMasonryLayout","computed":"asSpecified","order":"uniqueOrder","status":"experimental","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/masonry-auto-flow"},"math-style":{"syntax":"normal | compact","media":"visual","inherited":true,"animationType":"notAnimatable","percentages":"no","groups":["MathML"],"initial":"normal","appliesto":"allElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/math-style"},"max-block-size":{"syntax":"<\'max-width\'>","media":"visual","inherited":false,"animationType":"lpc","percentages":"blockSizeOfContainingBlock","groups":["CSS Logical Properties"],"initial":"0","appliesto":"sameAsWidthAndHeight","computed":"sameAsMaxWidthAndMaxHeight","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/max-block-size"},"max-height":{"syntax":"none | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)","media":"visual","inherited":false,"animationType":"lpc","percentages":"regardingHeightOfGeneratedBoxContainingBlockPercentagesNone","groups":["CSS Box Model"],"initial":"none","appliesto":"allElementsButNonReplacedAndTableColumns","computed":"percentageAsSpecifiedAbsoluteLengthOrNone","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/max-height"},"max-inline-size":{"syntax":"<\'max-width\'>","media":"visual","inherited":false,"animationType":"lpc","percentages":"inlineSizeOfContainingBlock","groups":["CSS Logical Properties"],"initial":"0","appliesto":"sameAsWidthAndHeight","computed":"sameAsMaxWidthAndMaxHeight","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/max-inline-size"},"max-lines":{"syntax":"none | <integer>","media":"visual","inherited":false,"animationType":"integer","percentages":"no","groups":["CSS Overflow"],"initial":"none","appliesto":"blockContainersExceptMultiColumnContainers","computed":"asSpecified","order":"perGrammar","status":"experimental"},"max-width":{"syntax":"none | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)","media":"visual","inherited":false,"animationType":"lpc","percentages":"referToWidthOfContainingBlock","groups":["CSS Box Model"],"initial":"none","appliesto":"allElementsButNonReplacedAndTableRows","computed":"percentageAsSpecifiedAbsoluteLengthOrNone","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/max-width"},"min-block-size":{"syntax":"<\'min-width\'>","media":"visual","inherited":false,"animationType":"lpc","percentages":"blockSizeOfContainingBlock","groups":["CSS Logical Properties"],"initial":"0","appliesto":"sameAsWidthAndHeight","computed":"sameAsMinWidthAndMinHeight","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/min-block-size"},"min-height":{"syntax":"auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)","media":"visual","inherited":false,"animationType":"lpc","percentages":"regardingHeightOfGeneratedBoxContainingBlockPercentages0","groups":["CSS Box Model"],"initial":"auto","appliesto":"allElementsButNonReplacedAndTableColumns","computed":"percentageAsSpecifiedOrAbsoluteLength","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/min-height"},"min-inline-size":{"syntax":"<\'min-width\'>","media":"visual","inherited":false,"animationType":"lpc","percentages":"inlineSizeOfContainingBlock","groups":["CSS Logical Properties"],"initial":"0","appliesto":"sameAsWidthAndHeight","computed":"sameAsMinWidthAndMinHeight","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/min-inline-size"},"min-width":{"syntax":"auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)","media":"visual","inherited":false,"animationType":"lpc","percentages":"referToWidthOfContainingBlock","groups":["CSS Box Model"],"initial":"auto","appliesto":"allElementsButNonReplacedAndTableRows","computed":"percentageAsSpecifiedOrAbsoluteLength","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/min-width"},"mix-blend-mode":{"syntax":"<blend-mode>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Compositing and Blending"],"initial":"normal","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","stacking":true,"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode"},"object-fit":{"syntax":"fill | contain | cover | none | scale-down","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Images"],"initial":"fill","appliesto":"replacedElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/object-fit"},"object-position":{"syntax":"<position>","media":"visual","inherited":true,"animationType":"repeatableListOfSimpleListOfLpc","percentages":"referToWidthAndHeightOfElement","groups":["CSS Images"],"initial":"50% 50%","appliesto":"replacedElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/object-position"},"offset":{"syntax":"[ <\'offset-position\'>? [ <\'offset-path\'> [ <\'offset-distance\'> || <\'offset-rotate\'> ]? ]? ]! [ / <\'offset-anchor\'> ]?","media":"visual","inherited":false,"animationType":["offset-position","offset-path","offset-distance","offset-anchor","offset-rotate"],"percentages":["offset-position","offset-distance","offset-anchor"],"groups":["CSS Motion Path"],"initial":["offset-position","offset-path","offset-distance","offset-anchor","offset-rotate"],"appliesto":"transformableElements","computed":["offset-position","offset-path","offset-distance","offset-anchor","offset-rotate"],"order":"perGrammar","stacking":true,"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/offset"},"offset-anchor":{"syntax":"auto | <position>","media":"visual","inherited":false,"animationType":"position","percentages":"relativeToWidthAndHeight","groups":["CSS Motion Path"],"initial":"auto","appliesto":"transformableElements","computed":"forLengthAbsoluteValueOtherwisePercentage","order":"perGrammar","status":"standard"},"offset-distance":{"syntax":"<length-percentage>","media":"visual","inherited":false,"animationType":"lpc","percentages":"referToTotalPathLength","groups":["CSS Motion Path"],"initial":"0","appliesto":"transformableElements","computed":"forLengthAbsoluteValueOtherwisePercentage","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/offset-distance"},"offset-path":{"syntax":"none | ray( [ <angle> && <size> && contain? ] ) | <path()> | <url> | [ <basic-shape> || <geometry-box> ]","media":"visual","inherited":false,"animationType":"angleOrBasicShapeOrPath","percentages":"no","groups":["CSS Motion Path"],"initial":"none","appliesto":"transformableElements","computed":"asSpecified","order":"perGrammar","stacking":true,"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/offset-path"},"offset-position":{"syntax":"auto | <position>","media":"visual","inherited":false,"animationType":"position","percentages":"referToSizeOfContainingBlock","groups":["CSS Motion Path"],"initial":"auto","appliesto":"transformableElements","computed":"forLengthAbsoluteValueOtherwisePercentage","order":"perGrammar","status":"experimental"},"offset-rotate":{"syntax":"[ auto | reverse ] || <angle>","media":"visual","inherited":false,"animationType":"angleOrBasicShapeOrPath","percentages":"no","groups":["CSS Motion Path"],"initial":"auto","appliesto":"transformableElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/offset-rotate"},"opacity":{"syntax":"<alpha-value>","media":"visual","inherited":false,"animationType":"number","percentages":"no","groups":["CSS Color"],"initial":"1.0","appliesto":"allElements","computed":"specifiedValueClipped0To1","order":"uniqueOrder","alsoAppliesTo":["::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/opacity"},"order":{"syntax":"<integer>","media":"visual","inherited":false,"animationType":"integer","percentages":"no","groups":["CSS Flexible Box Layout"],"initial":"0","appliesto":"flexItemsGridItemsAbsolutelyPositionedContainerChildren","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/order"},"orphans":{"syntax":"<integer>","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Fragmentation"],"initial":"2","appliesto":"blockContainerElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/orphans"},"outline":{"syntax":"[ <\'outline-color\'> || <\'outline-style\'> || <\'outline-width\'> ]","media":["visual","interactive"],"inherited":false,"animationType":["outline-color","outline-width","outline-style"],"percentages":"no","groups":["CSS Basic User Interface"],"initial":["outline-color","outline-style","outline-width"],"appliesto":"allElements","computed":["outline-color","outline-width","outline-style"],"order":"orderOfAppearance","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/outline"},"outline-color":{"syntax":"<color> | invert","media":["visual","interactive"],"inherited":false,"animationType":"color","percentages":"no","groups":["CSS Basic User Interface"],"initial":"invertOrCurrentColor","appliesto":"allElements","computed":"invertForTranslucentColorRGBAOtherwiseRGB","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/outline-color"},"outline-offset":{"syntax":"<length>","media":["visual","interactive"],"inherited":false,"animationType":"length","percentages":"no","groups":["CSS Basic User Interface"],"initial":"0","appliesto":"allElements","computed":"asSpecifiedRelativeToAbsoluteLengths","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/outline-offset"},"outline-style":{"syntax":"auto | <\'border-style\'>","media":["visual","interactive"],"inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Basic User Interface"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/outline-style"},"outline-width":{"syntax":"<line-width>","media":["visual","interactive"],"inherited":false,"animationType":"length","percentages":"no","groups":["CSS Basic User Interface"],"initial":"medium","appliesto":"allElements","computed":"absoluteLength0ForNone","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/outline-width"},"overflow":{"syntax":"[ visible | hidden | clip | scroll | auto ]{1,2}","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Overflow"],"initial":"visible","appliesto":"blockContainersFlexContainersGridContainers","computed":["overflow-x","overflow-y"],"order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/overflow"},"overflow-anchor":{"syntax":"auto | none","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Scroll Anchoring"],"initial":"auto","appliesto":"allElements","computed":"asSpecified","order":"perGrammar","status":"standard"},"overflow-block":{"syntax":"visible | hidden | clip | scroll | auto","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Overflow"],"initial":"auto","appliesto":"blockContainersFlexContainersGridContainers","computed":"asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent","order":"perGrammar","status":"standard"},"overflow-clip-box":{"syntax":"padding-box | content-box","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Mozilla Extensions"],"initial":"padding-box","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Mozilla/CSS/overflow-clip-box"},"overflow-inline":{"syntax":"visible | hidden | clip | scroll | auto","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Overflow"],"initial":"auto","appliesto":"blockContainersFlexContainersGridContainers","computed":"asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent","order":"perGrammar","status":"standard"},"overflow-wrap":{"syntax":"normal | break-word | anywhere","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Text"],"initial":"normal","appliesto":"nonReplacedInlineElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/overflow-wrap"},"overflow-x":{"syntax":"visible | hidden | clip | scroll | auto","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Overflow"],"initial":"visible","appliesto":"blockContainersFlexContainersGridContainers","computed":"asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/overflow-x"},"overflow-y":{"syntax":"visible | hidden | clip | scroll | auto","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Overflow"],"initial":"visible","appliesto":"blockContainersFlexContainersGridContainers","computed":"asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/overflow-y"},"overscroll-behavior":{"syntax":"[ contain | none | auto ]{1,2}","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Box Model"],"initial":"auto","appliesto":"nonReplacedBlockAndInlineBlockElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior"},"overscroll-behavior-block":{"syntax":"contain | none | auto","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Box Model"],"initial":"auto","appliesto":"nonReplacedBlockAndInlineBlockElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block"},"overscroll-behavior-inline":{"syntax":"contain | none | auto","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Box Model"],"initial":"auto","appliesto":"nonReplacedBlockAndInlineBlockElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline"},"overscroll-behavior-x":{"syntax":"contain | none | auto","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Box Model"],"initial":"auto","appliesto":"nonReplacedBlockAndInlineBlockElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x"},"overscroll-behavior-y":{"syntax":"contain | none | auto","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Box Model"],"initial":"auto","appliesto":"nonReplacedBlockAndInlineBlockElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y"},"padding":{"syntax":"[ <length> | <percentage> ]{1,4}","media":"visual","inherited":false,"animationType":"length","percentages":"referToWidthOfContainingBlock","groups":["CSS Box Model"],"initial":["padding-bottom","padding-left","padding-right","padding-top"],"appliesto":"allElementsExceptInternalTableDisplayTypes","computed":["padding-bottom","padding-left","padding-right","padding-top"],"order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/padding"},"padding-block":{"syntax":"<\'padding-left\'>{1,2}","media":"visual","inherited":false,"animationType":"discrete","percentages":"logicalWidthOfContainingBlock","groups":["CSS Logical Properties"],"initial":"0","appliesto":"allElements","computed":"asLength","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/padding-block"},"padding-block-end":{"syntax":"<\'padding-left\'>","media":"visual","inherited":false,"animationType":"length","percentages":"logicalWidthOfContainingBlock","groups":["CSS Logical Properties"],"initial":"0","appliesto":"allElements","computed":"asLength","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/padding-block-end"},"padding-block-start":{"syntax":"<\'padding-left\'>","media":"visual","inherited":false,"animationType":"length","percentages":"logicalWidthOfContainingBlock","groups":["CSS Logical Properties"],"initial":"0","appliesto":"allElements","computed":"asLength","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/padding-block-start"},"padding-bottom":{"syntax":"<length> | <percentage>","media":"visual","inherited":false,"animationType":"length","percentages":"referToWidthOfContainingBlock","groups":["CSS Box Model"],"initial":"0","appliesto":"allElementsExceptInternalTableDisplayTypes","computed":"percentageAsSpecifiedOrAbsoluteLength","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/padding-bottom"},"padding-inline":{"syntax":"<\'padding-left\'>{1,2}","media":"visual","inherited":false,"animationType":"discrete","percentages":"logicalWidthOfContainingBlock","groups":["CSS Logical Properties"],"initial":"0","appliesto":"allElements","computed":"asLength","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/padding-inline"},"padding-inline-end":{"syntax":"<\'padding-left\'>","media":"visual","inherited":false,"animationType":"length","percentages":"logicalWidthOfContainingBlock","groups":["CSS Logical Properties"],"initial":"0","appliesto":"allElements","computed":"asLength","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/padding-inline-end"},"padding-inline-start":{"syntax":"<\'padding-left\'>","media":"visual","inherited":false,"animationType":"length","percentages":"logicalWidthOfContainingBlock","groups":["CSS Logical Properties"],"initial":"0","appliesto":"allElements","computed":"asLength","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/padding-inline-start"},"padding-left":{"syntax":"<length> | <percentage>","media":"visual","inherited":false,"animationType":"length","percentages":"referToWidthOfContainingBlock","groups":["CSS Box Model"],"initial":"0","appliesto":"allElementsExceptInternalTableDisplayTypes","computed":"percentageAsSpecifiedOrAbsoluteLength","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/padding-left"},"padding-right":{"syntax":"<length> | <percentage>","media":"visual","inherited":false,"animationType":"length","percentages":"referToWidthOfContainingBlock","groups":["CSS Box Model"],"initial":"0","appliesto":"allElementsExceptInternalTableDisplayTypes","computed":"percentageAsSpecifiedOrAbsoluteLength","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/padding-right"},"padding-top":{"syntax":"<length> | <percentage>","media":"visual","inherited":false,"animationType":"length","percentages":"referToWidthOfContainingBlock","groups":["CSS Box Model"],"initial":"0","appliesto":"allElementsExceptInternalTableDisplayTypes","computed":"percentageAsSpecifiedOrAbsoluteLength","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/padding-top"},"page-break-after":{"syntax":"auto | always | avoid | left | right | recto | verso","media":["visual","paged"],"inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Pages"],"initial":"auto","appliesto":"blockElementsInNormalFlow","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/page-break-after"},"page-break-before":{"syntax":"auto | always | avoid | left | right | recto | verso","media":["visual","paged"],"inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Pages"],"initial":"auto","appliesto":"blockElementsInNormalFlow","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/page-break-before"},"page-break-inside":{"syntax":"auto | avoid","media":["visual","paged"],"inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Pages"],"initial":"auto","appliesto":"blockElementsInNormalFlow","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/page-break-inside"},"paint-order":{"syntax":"normal | [ fill || stroke || markers ]","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Text"],"initial":"normal","appliesto":"textElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/paint-order"},"perspective":{"syntax":"none | <length>","media":"visual","inherited":false,"animationType":"length","percentages":"no","groups":["CSS Transforms"],"initial":"none","appliesto":"transformableElements","computed":"absoluteLengthOrNone","order":"uniqueOrder","stacking":true,"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/perspective"},"perspective-origin":{"syntax":"<position>","media":"visual","inherited":false,"animationType":"simpleListOfLpc","percentages":"referToSizeOfBoundingBox","groups":["CSS Transforms"],"initial":"50% 50%","appliesto":"transformableElements","computed":"forLengthAbsoluteValueOtherwisePercentage","order":"oneOrTwoValuesLengthAbsoluteKeywordsPercentages","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/perspective-origin"},"place-content":{"syntax":"<\'align-content\'> <\'justify-content\'>?","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Box Alignment"],"initial":"normal","appliesto":"multilineFlexContainers","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/place-content"},"place-items":{"syntax":"<\'align-items\'> <\'justify-items\'>?","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Box Alignment"],"initial":["align-items","justify-items"],"appliesto":"allElements","computed":["align-items","justify-items"],"order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/place-items"},"place-self":{"syntax":"<\'align-self\'> <\'justify-self\'>?","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Box Alignment"],"initial":["align-self","justify-self"],"appliesto":"blockLevelBoxesAndAbsolutelyPositionedBoxesAndGridItems","computed":["align-self","justify-self"],"order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/place-self"},"pointer-events":{"syntax":"auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["Pointer Events"],"initial":"auto","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/pointer-events"},"position":{"syntax":"static | relative | absolute | sticky | fixed","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Positioning"],"initial":"static","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","stacking":true,"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/position"},"quotes":{"syntax":"none | auto | [ <string> <string> ]+","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Generated Content"],"initial":"dependsOnUserAgent","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/quotes"},"resize":{"syntax":"none | both | horizontal | vertical | block | inline","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Basic User Interface"],"initial":"none","appliesto":"elementsWithOverflowNotVisibleAndReplacedElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/resize"},"right":{"syntax":"<length> | <percentage> | auto","media":"visual","inherited":false,"animationType":"lpc","percentages":"referToWidthOfContainingBlock","groups":["CSS Positioning"],"initial":"auto","appliesto":"positionedElements","computed":"lengthAbsolutePercentageAsSpecifiedOtherwiseAuto","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/right"},"rotate":{"syntax":"none | <angle> | [ x | y | z | <number>{3} ] && <angle>","media":"visual","inherited":false,"animationType":"transform","percentages":"no","groups":["CSS Transforms"],"initial":"none","appliesto":"transformableElements","computed":"asSpecified","order":"perGrammar","stacking":true,"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/rotate"},"row-gap":{"syntax":"normal | <length-percentage>","media":"visual","inherited":false,"animationType":"lpc","percentages":"referToDimensionOfContentArea","groups":["CSS Box Alignment"],"initial":"normal","appliesto":"multiColumnElementsFlexContainersGridContainers","computed":"asSpecifiedWithLengthsAbsoluteAndNormalComputingToZeroExceptMultiColumn","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/row-gap"},"ruby-align":{"syntax":"start | center | space-between | space-around","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Ruby"],"initial":"space-around","appliesto":"rubyBasesAnnotationsBaseAnnotationContainers","computed":"asSpecified","order":"uniqueOrder","status":"experimental","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/ruby-align"},"ruby-merge":{"syntax":"separate | collapse | auto","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Ruby"],"initial":"separate","appliesto":"rubyAnnotationsContainers","computed":"asSpecified","order":"uniqueOrder","status":"experimental"},"ruby-position":{"syntax":"over | under | inter-character","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Ruby"],"initial":"over","appliesto":"rubyAnnotationsContainers","computed":"asSpecified","order":"uniqueOrder","status":"experimental","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/ruby-position"},"scale":{"syntax":"none | <number>{1,3}","media":"visual","inherited":false,"animationType":"transform","percentages":"no","groups":["CSS Transforms"],"initial":"none","appliesto":"transformableElements","computed":"asSpecified","order":"perGrammar","stacking":true,"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scale"},"scrollbar-color":{"syntax":"auto | dark | light | <color>{2}","media":"visual","inherited":true,"animationType":"color","percentages":"no","groups":["CSS Scrollbars"],"initial":"auto","appliesto":"scrollingBoxes","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scrollbar-color"},"scrollbar-gutter":{"syntax":"auto | [ stable | always ] && both? && force?","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Overflow"],"initial":"auto","appliesto":"allElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scrollbar-gutter"},"scrollbar-width":{"syntax":"auto | thin | none","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Scrollbars"],"initial":"auto","appliesto":"scrollingBoxes","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scrollbar-width"},"scroll-behavior":{"syntax":"auto | smooth","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSSOM View"],"initial":"auto","appliesto":"scrollingBoxes","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-behavior"},"scroll-margin":{"syntax":"<length>{1,4}","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"no","groups":["CSS Scroll Snap"],"initial":"0","appliesto":"allElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-margin"},"scroll-margin-block":{"syntax":"<length>{1,2}","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"no","groups":["CSS Scroll Snap"],"initial":"0","appliesto":"allElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block"},"scroll-margin-block-start":{"syntax":"<length>","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"no","groups":["CSS Scroll Snap"],"initial":"0","appliesto":"allElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-start"},"scroll-margin-block-end":{"syntax":"<length>","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"no","groups":["CSS Scroll Snap"],"initial":"0","appliesto":"allElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-end"},"scroll-margin-bottom":{"syntax":"<length>","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"no","groups":["CSS Scroll Snap"],"initial":"0","appliesto":"allElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom"},"scroll-margin-inline":{"syntax":"<length>{1,2}","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"no","groups":["CSS Scroll Snap"],"initial":"0","appliesto":"allElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline"},"scroll-margin-inline-start":{"syntax":"<length>","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"no","groups":["CSS Scroll Snap"],"initial":"0","appliesto":"allElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-start"},"scroll-margin-inline-end":{"syntax":"<length>","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"no","groups":["CSS Scroll Snap"],"initial":"0","appliesto":"allElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-end"},"scroll-margin-left":{"syntax":"<length>","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"no","groups":["CSS Scroll Snap"],"initial":"0","appliesto":"allElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left"},"scroll-margin-right":{"syntax":"<length>","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"no","groups":["CSS Scroll Snap"],"initial":"0","appliesto":"allElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right"},"scroll-margin-top":{"syntax":"<length>","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"no","groups":["CSS Scroll Snap"],"initial":"0","appliesto":"allElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top"},"scroll-padding":{"syntax":"[ auto | <length-percentage> ]{1,4}","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"relativeToTheScrollContainersScrollport","groups":["CSS Scroll Snap"],"initial":"auto","appliesto":"scrollContainers","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-padding"},"scroll-padding-block":{"syntax":"[ auto | <length-percentage> ]{1,2}","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"relativeToTheScrollContainersScrollport","groups":["CSS Scroll Snap"],"initial":"auto","appliesto":"scrollContainers","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block"},"scroll-padding-block-start":{"syntax":"auto | <length-percentage>","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"relativeToTheScrollContainersScrollport","groups":["CSS Scroll Snap"],"initial":"auto","appliesto":"scrollContainers","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-start"},"scroll-padding-block-end":{"syntax":"auto | <length-percentage>","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"relativeToTheScrollContainersScrollport","groups":["CSS Scroll Snap"],"initial":"auto","appliesto":"scrollContainers","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-end"},"scroll-padding-bottom":{"syntax":"auto | <length-percentage>","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"relativeToTheScrollContainersScrollport","groups":["CSS Scroll Snap"],"initial":"auto","appliesto":"scrollContainers","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-padding-bottom"},"scroll-padding-inline":{"syntax":"[ auto | <length-percentage> ]{1,2}","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"relativeToTheScrollContainersScrollport","groups":["CSS Scroll Snap"],"initial":"auto","appliesto":"scrollContainers","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline"},"scroll-padding-inline-start":{"syntax":"auto | <length-percentage>","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"relativeToTheScrollContainersScrollport","groups":["CSS Scroll Snap"],"initial":"auto","appliesto":"scrollContainers","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-start"},"scroll-padding-inline-end":{"syntax":"auto | <length-percentage>","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"relativeToTheScrollContainersScrollport","groups":["CSS Scroll Snap"],"initial":"auto","appliesto":"scrollContainers","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-end"},"scroll-padding-left":{"syntax":"auto | <length-percentage>","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"relativeToTheScrollContainersScrollport","groups":["CSS Scroll Snap"],"initial":"auto","appliesto":"scrollContainers","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-padding-left"},"scroll-padding-right":{"syntax":"auto | <length-percentage>","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"relativeToTheScrollContainersScrollport","groups":["CSS Scroll Snap"],"initial":"auto","appliesto":"scrollContainers","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-padding-right"},"scroll-padding-top":{"syntax":"auto | <length-percentage>","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"relativeToTheScrollContainersScrollport","groups":["CSS Scroll Snap"],"initial":"auto","appliesto":"scrollContainers","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-padding-top"},"scroll-snap-align":{"syntax":"[ none | start | end | center ]{1,2}","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Scroll Snap"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align"},"scroll-snap-coordinate":{"syntax":"none | <position>#","media":"interactive","inherited":false,"animationType":"position","percentages":"referToBorderBox","groups":["CSS Scroll Snap"],"initial":"none","appliesto":"allElements","computed":"asSpecifiedRelativeToAbsoluteLengths","order":"uniqueOrder","status":"obsolete","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-snap-coordinate"},"scroll-snap-destination":{"syntax":"<position>","media":"interactive","inherited":false,"animationType":"position","percentages":"relativeToScrollContainerPaddingBoxAxis","groups":["CSS Scroll Snap"],"initial":"0px 0px","appliesto":"scrollContainers","computed":"asSpecifiedRelativeToAbsoluteLengths","order":"uniqueOrder","status":"obsolete","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-snap-destination"},"scroll-snap-points-x":{"syntax":"none | repeat( <length-percentage> )","media":"interactive","inherited":false,"animationType":"discrete","percentages":"relativeToScrollContainerPaddingBoxAxis","groups":["CSS Scroll Snap"],"initial":"none","appliesto":"scrollContainers","computed":"asSpecifiedRelativeToAbsoluteLengths","order":"uniqueOrder","status":"obsolete","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-snap-points-x"},"scroll-snap-points-y":{"syntax":"none | repeat( <length-percentage> )","media":"interactive","inherited":false,"animationType":"discrete","percentages":"relativeToScrollContainerPaddingBoxAxis","groups":["CSS Scroll Snap"],"initial":"none","appliesto":"scrollContainers","computed":"asSpecifiedRelativeToAbsoluteLengths","order":"uniqueOrder","status":"obsolete","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-snap-points-y"},"scroll-snap-stop":{"syntax":"normal | always","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Scroll Snap"],"initial":"normal","appliesto":"allElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop"},"scroll-snap-type":{"syntax":"none | [ x | y | block | inline | both ] [ mandatory | proximity ]?","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Scroll Snap"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type"},"scroll-snap-type-x":{"syntax":"none | mandatory | proximity","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Scroll Snap"],"initial":"none","appliesto":"scrollContainers","computed":"asSpecified","order":"uniqueOrder","status":"obsolete","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type-x"},"scroll-snap-type-y":{"syntax":"none | mandatory | proximity","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Scroll Snap"],"initial":"none","appliesto":"scrollContainers","computed":"asSpecified","order":"uniqueOrder","status":"obsolete","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type-y"},"shape-image-threshold":{"syntax":"<alpha-value>","media":"visual","inherited":false,"animationType":"number","percentages":"no","groups":["CSS Shapes"],"initial":"0.0","appliesto":"floats","computed":"specifiedValueNumberClipped0To1","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/shape-image-threshold"},"shape-margin":{"syntax":"<length-percentage>","media":"visual","inherited":false,"animationType":"lpc","percentages":"referToWidthOfContainingBlock","groups":["CSS Shapes"],"initial":"0","appliesto":"floats","computed":"asSpecifiedRelativeToAbsoluteLengths","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/shape-margin"},"shape-outside":{"syntax":"none | <shape-box> || <basic-shape> | <image>","media":"visual","inherited":false,"animationType":"basicShapeOtherwiseNo","percentages":"no","groups":["CSS Shapes"],"initial":"none","appliesto":"floats","computed":"asDefinedForBasicShapeWithAbsoluteURIOtherwiseAsSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/shape-outside"},"tab-size":{"syntax":"<integer> | <length>","media":"visual","inherited":true,"animationType":"length","percentages":"no","groups":["CSS Text"],"initial":"8","appliesto":"blockContainers","computed":"specifiedIntegerOrAbsoluteLength","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/tab-size"},"table-layout":{"syntax":"auto | fixed","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Table"],"initial":"auto","appliesto":"tableElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/table-layout"},"text-align":{"syntax":"start | end | left | right | center | justify | match-parent","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Text"],"initial":"startOrNamelessValueIfLTRRightIfRTL","appliesto":"blockContainers","computed":"asSpecifiedExceptMatchParent","order":"orderOfAppearance","alsoAppliesTo":["::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/text-align"},"text-align-last":{"syntax":"auto | start | end | left | right | center | justify","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Text"],"initial":"auto","appliesto":"blockContainers","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/text-align-last"},"text-combine-upright":{"syntax":"none | all | [ digits <integer>? ]","media":"visual","inherited":true,"animationType":"notAnimatable","percentages":"no","groups":["CSS Writing Modes"],"initial":"none","appliesto":"nonReplacedInlineElements","computed":"keywordPlusIntegerIfDigits","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/text-combine-upright"},"text-decoration":{"syntax":"<\'text-decoration-line\'> || <\'text-decoration-style\'> || <\'text-decoration-color\'> || <\'text-decoration-thickness\'>","media":"visual","inherited":false,"animationType":["text-decoration-color","text-decoration-style","text-decoration-line","text-decoration-thickness"],"percentages":"no","groups":["CSS Text Decoration"],"initial":["text-decoration-color","text-decoration-style","text-decoration-line"],"appliesto":"allElements","computed":["text-decoration-line","text-decoration-style","text-decoration-color","text-decoration-thickness"],"order":"orderOfAppearance","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/text-decoration"},"text-decoration-color":{"syntax":"<color>","media":"visual","inherited":false,"animationType":"color","percentages":"no","groups":["CSS Text Decoration"],"initial":"currentcolor","appliesto":"allElements","computed":"computedColor","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/text-decoration-color"},"text-decoration-line":{"syntax":"none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Text Decoration"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"orderOfAppearance","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/text-decoration-line"},"text-decoration-skip":{"syntax":"none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Text Decoration"],"initial":"objects","appliesto":"allElements","computed":"asSpecified","order":"orderOfAppearance","status":"experimental","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip"},"text-decoration-skip-ink":{"syntax":"auto | all | none","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Text Decoration"],"initial":"auto","appliesto":"allElements","computed":"asSpecified","order":"orderOfAppearance","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink"},"text-decoration-style":{"syntax":"solid | double | dotted | dashed | wavy","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Text Decoration"],"initial":"solid","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/text-decoration-style"},"text-decoration-thickness":{"syntax":"auto | from-font | <length> | <percentage> ","media":"visual","inherited":false,"animationType":"byComputedValueType","percentages":"referToElementFontSize","groups":["CSS Text Decoration"],"initial":"auto","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness"},"text-emphasis":{"syntax":"<\'text-emphasis-style\'> || <\'text-emphasis-color\'>","media":"visual","inherited":false,"animationType":["text-emphasis-color","text-emphasis-style"],"percentages":"no","groups":["CSS Text Decoration"],"initial":["text-emphasis-style","text-emphasis-color"],"appliesto":"allElements","computed":["text-emphasis-style","text-emphasis-color"],"order":"orderOfAppearance","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/text-emphasis"},"text-emphasis-color":{"syntax":"<color>","media":"visual","inherited":false,"animationType":"color","percentages":"no","groups":["CSS Text Decoration"],"initial":"currentcolor","appliesto":"allElements","computed":"computedColor","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color"},"text-emphasis-position":{"syntax":"[ over | under ] && [ right | left ]","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Text Decoration"],"initial":"over right","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position"},"text-emphasis-style":{"syntax":"none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Text Decoration"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style"},"text-indent":{"syntax":"<length-percentage> && hanging? && each-line?","media":"visual","inherited":true,"animationType":"lpc","percentages":"referToWidthOfContainingBlock","groups":["CSS Text"],"initial":"0","appliesto":"blockContainers","computed":"percentageOrAbsoluteLengthPlusKeywords","order":"lengthOrPercentageBeforeKeywords","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/text-indent"},"text-justify":{"syntax":"auto | inter-character | inter-word | none","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Text"],"initial":"auto","appliesto":"inlineLevelAndTableCellElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/text-justify"},"text-orientation":{"syntax":"mixed | upright | sideways","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Writing Modes"],"initial":"mixed","appliesto":"allElementsExceptTableRowGroupsRowsColumnGroupsAndColumns","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/text-orientation"},"text-overflow":{"syntax":"[ clip | ellipsis | <string> ]{1,2}","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Basic User Interface"],"initial":"clip","appliesto":"blockContainerElements","computed":"asSpecified","order":"uniqueOrder","alsoAppliesTo":["::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/text-overflow"},"text-rendering":{"syntax":"auto | optimizeSpeed | optimizeLegibility | geometricPrecision","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Miscellaneous"],"initial":"auto","appliesto":"textElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/text-rendering"},"text-shadow":{"syntax":"none | <shadow-t>#","media":"visual","inherited":true,"animationType":"shadowList","percentages":"no","groups":["CSS Text Decoration"],"initial":"none","appliesto":"allElements","computed":"colorPlusThreeAbsoluteLengths","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/text-shadow"},"text-size-adjust":{"syntax":"none | auto | <percentage>","media":"visual","inherited":true,"animationType":"discrete","percentages":"referToSizeOfFont","groups":["CSS Text"],"initial":"autoForSmartphoneBrowsersSupportingInflation","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"experimental","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/text-size-adjust"},"text-transform":{"syntax":"none | capitalize | uppercase | lowercase | full-width | full-size-kana","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Text"],"initial":"none","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/text-transform"},"text-underline-offset":{"syntax":"auto | <length> | <percentage> ","media":"visual","inherited":true,"animationType":"byComputedValueType","percentages":"referToElementFontSize","groups":["CSS Text Decoration"],"initial":"auto","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/text-underline-offset"},"text-underline-position":{"syntax":"auto | from-font | [ under || [ left | right ] ]","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Text Decoration"],"initial":"auto","appliesto":"allElements","computed":"asSpecified","order":"orderOfAppearance","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/text-underline-position"},"top":{"syntax":"<length> | <percentage> | auto","media":"visual","inherited":false,"animationType":"lpc","percentages":"referToContainingBlockHeight","groups":["CSS Positioning"],"initial":"auto","appliesto":"positionedElements","computed":"lengthAbsolutePercentageAsSpecifiedOtherwiseAuto","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/top"},"touch-action":{"syntax":"auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["Pointer Events"],"initial":"auto","appliesto":"allElementsExceptNonReplacedInlineElementsTableRowsColumnsRowColumnGroups","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/touch-action"},"transform":{"syntax":"none | <transform-list>","media":"visual","inherited":false,"animationType":"transform","percentages":"referToSizeOfBoundingBox","groups":["CSS Transforms"],"initial":"none","appliesto":"transformableElements","computed":"asSpecifiedRelativeToAbsoluteLengths","order":"uniqueOrder","stacking":true,"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/transform"},"transform-box":{"syntax":"content-box | border-box | fill-box | stroke-box | view-box","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Transforms"],"initial":"view-box","appliesto":"transformableElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/transform-box"},"transform-origin":{"syntax":"[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?","media":"visual","inherited":false,"animationType":"simpleListOfLpc","percentages":"referToSizeOfBoundingBox","groups":["CSS Transforms"],"initial":"50% 50% 0","appliesto":"transformableElements","computed":"forLengthAbsoluteValueOtherwisePercentage","order":"oneOrTwoValuesLengthAbsoluteKeywordsPercentages","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/transform-origin"},"transform-style":{"syntax":"flat | preserve-3d","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Transforms"],"initial":"flat","appliesto":"transformableElements","computed":"asSpecified","order":"uniqueOrder","stacking":true,"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/transform-style"},"transition":{"syntax":"<single-transition>#","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Transitions"],"initial":["transition-delay","transition-duration","transition-property","transition-timing-function"],"appliesto":"allElementsAndPseudos","computed":["transition-delay","transition-duration","transition-property","transition-timing-function"],"order":"orderOfAppearance","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/transition"},"transition-delay":{"syntax":"<time>#","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Transitions"],"initial":"0s","appliesto":"allElementsAndPseudos","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/transition-delay"},"transition-duration":{"syntax":"<time>#","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Transitions"],"initial":"0s","appliesto":"allElementsAndPseudos","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/transition-duration"},"transition-property":{"syntax":"none | <single-transition-property>#","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Transitions"],"initial":"all","appliesto":"allElementsAndPseudos","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/transition-property"},"transition-timing-function":{"syntax":"<timing-function>#","media":"interactive","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Transitions"],"initial":"ease","appliesto":"allElementsAndPseudos","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/transition-timing-function"},"translate":{"syntax":"none | <length-percentage> [ <length-percentage> <length>? ]?","media":"visual","inherited":false,"animationType":"transform","percentages":"referToSizeOfBoundingBox","groups":["CSS Transforms"],"initial":"none","appliesto":"transformableElements","computed":"asSpecifiedRelativeToAbsoluteLengths","order":"perGrammar","stacking":true,"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/translate"},"unicode-bidi":{"syntax":"normal | embed | isolate | bidi-override | isolate-override | plaintext","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Writing Modes"],"initial":"normal","appliesto":"allElementsSomeValuesNoEffectOnNonInlineElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/unicode-bidi"},"user-select":{"syntax":"auto | text | none | contain | all","media":"visual","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Basic User Interface"],"initial":"auto","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/user-select"},"vertical-align":{"syntax":"baseline | sub | super | text-top | text-bottom | middle | top | bottom | <percentage> | <length>","media":"visual","inherited":false,"animationType":"length","percentages":"referToLineHeight","groups":["CSS Table"],"initial":"baseline","appliesto":"inlineLevelAndTableCellElements","computed":"absoluteLengthOrKeyword","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/vertical-align"},"visibility":{"syntax":"visible | hidden | collapse","media":"visual","inherited":true,"animationType":"visibility","percentages":"no","groups":["CSS Box Model"],"initial":"visible","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/visibility"},"white-space":{"syntax":"normal | pre | nowrap | pre-wrap | pre-line | break-spaces","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Text"],"initial":"normal","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/white-space"},"widows":{"syntax":"<integer>","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Fragmentation"],"initial":"2","appliesto":"blockContainerElements","computed":"asSpecified","order":"perGrammar","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/widows"},"width":{"syntax":"auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)","media":"visual","inherited":false,"animationType":"lpc","percentages":"referToWidthOfContainingBlock","groups":["CSS Box Model"],"initial":"auto","appliesto":"allElementsButNonReplacedAndTableRows","computed":"percentageAutoOrAbsoluteLength","order":"lengthOrPercentageBeforeKeywordIfBothPresent","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/width"},"will-change":{"syntax":"auto | <animateable-feature>#","media":"all","inherited":false,"animationType":"discrete","percentages":"no","groups":["CSS Will Change"],"initial":"auto","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/will-change"},"word-break":{"syntax":"normal | break-all | keep-all | break-word","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Text"],"initial":"normal","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/word-break"},"word-spacing":{"syntax":"normal | <length-percentage>","media":"visual","inherited":true,"animationType":"length","percentages":"referToWidthOfAffectedGlyph","groups":["CSS Text"],"initial":"normal","appliesto":"allElements","computed":"optimumMinAndMaxValueOfAbsoluteLengthPercentageOrNormal","order":"uniqueOrder","alsoAppliesTo":["::first-letter","::first-line","::placeholder"],"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/word-spacing"},"word-wrap":{"syntax":"normal | break-word","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Text"],"initial":"normal","appliesto":"nonReplacedInlineElements","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/overflow-wrap"},"writing-mode":{"syntax":"horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr","media":"visual","inherited":true,"animationType":"discrete","percentages":"no","groups":["CSS Writing Modes"],"initial":"horizontal-tb","appliesto":"allElementsExceptTableRowColumnGroupsTableRowsColumns","computed":"asSpecified","order":"uniqueOrder","status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/writing-mode"},"z-index":{"syntax":"auto | <integer>","media":"visual","inherited":false,"animationType":"integer","percentages":"no","groups":["CSS Positioning"],"initial":"auto","appliesto":"positionedElements","computed":"asSpecified","order":"uniqueOrder","stacking":true,"status":"standard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/z-index"},"zoom":{"syntax":"normal | reset | <number> | <percentage>","media":"visual","inherited":false,"animationType":"integer","percentages":"no","groups":["Microsoft Extensions"],"initial":"normal","appliesto":"allElements","computed":"asSpecified","order":"uniqueOrder","status":"nonstandard","mdn_url":"https://developer.mozilla.org/docs/Web/CSS/zoom"}}')},function(e){e.exports=JSON.parse('{"absolute-size":{"syntax":"xx-small | x-small | small | medium | large | x-large | xx-large | xxx-large"},"alpha-value":{"syntax":"<number> | <percentage>"},"angle-percentage":{"syntax":"<angle> | <percentage>"},"angular-color-hint":{"syntax":"<angle-percentage>"},"angular-color-stop":{"syntax":"<color> && <color-stop-angle>?"},"angular-color-stop-list":{"syntax":"[ <angular-color-stop> [, <angular-color-hint>]? ]# , <angular-color-stop>"},"animateable-feature":{"syntax":"scroll-position | contents | <custom-ident>"},"attachment":{"syntax":"scroll | fixed | local"},"attr()":{"syntax":"attr( <attr-name> <type-or-unit>? [, <attr-fallback> ]? )"},"attr-matcher":{"syntax":"[ \'~\' | \'|\' | \'^\' | \'$\' | \'*\' ]? \'=\'"},"attr-modifier":{"syntax":"i | s"},"attribute-selector":{"syntax":"\'[\' <wq-name> \']\' | \'[\' <wq-name> <attr-matcher> [ <string-token> | <ident-token> ] <attr-modifier>? \']\'"},"auto-repeat":{"syntax":"repeat( [ auto-fill | auto-fit ] , [ <line-names>? <fixed-size> ]+ <line-names>? )"},"auto-track-list":{"syntax":"[ <line-names>? [ <fixed-size> | <fixed-repeat> ] ]* <line-names>? <auto-repeat>\\n[ <line-names>? [ <fixed-size> | <fixed-repeat> ] ]* <line-names>?"},"baseline-position":{"syntax":"[ first | last ]? baseline"},"basic-shape":{"syntax":"<inset()> | <circle()> | <ellipse()> | <polygon()> | <path()>"},"bg-image":{"syntax":"none | <image>"},"bg-layer":{"syntax":"<bg-image> || <bg-position> [ / <bg-size> ]? || <repeat-style> || <attachment> || <box> || <box>"},"bg-position":{"syntax":"[ [ left | center | right | top | bottom | <length-percentage> ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ] | [ center | [ left | right ] <length-percentage>? ] && [ center | [ top | bottom ] <length-percentage>? ] ]"},"bg-size":{"syntax":"[ <length-percentage> | auto ]{1,2} | cover | contain"},"blur()":{"syntax":"blur( <length> )"},"blend-mode":{"syntax":"normal | multiply | screen | overlay | darken | lighten | color-dodge | color-burn | hard-light | soft-light | difference | exclusion | hue | saturation | color | luminosity"},"box":{"syntax":"border-box | padding-box | content-box"},"brightness()":{"syntax":"brightness( <number-percentage> )"},"calc()":{"syntax":"calc( <calc-sum> )"},"calc-sum":{"syntax":"<calc-product> [ [ \'+\' | \'-\' ] <calc-product> ]*"},"calc-product":{"syntax":"<calc-value> [ \'*\' <calc-value> | \'/\' <number> ]*"},"calc-value":{"syntax":"<number> | <dimension> | <percentage> | ( <calc-sum> )"},"cf-final-image":{"syntax":"<image> | <color>"},"cf-mixing-image":{"syntax":"<percentage>? && <image>"},"circle()":{"syntax":"circle( [ <shape-radius> ]? [ at <position> ]? )"},"clamp()":{"syntax":"clamp( <calc-sum>#{3} )"},"class-selector":{"syntax":"\'.\' <ident-token>"},"clip-source":{"syntax":"<url>"},"color":{"syntax":"<rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>"},"color-stop":{"syntax":"<color-stop-length> | <color-stop-angle>"},"color-stop-angle":{"syntax":"<angle-percentage>{1,2}"},"color-stop-length":{"syntax":"<length-percentage>{1,2}"},"color-stop-list":{"syntax":"[ <linear-color-stop> [, <linear-color-hint>]? ]# , <linear-color-stop>"},"combinator":{"syntax":"\'>\' | \'+\' | \'~\' | [ \'||\' ]"},"common-lig-values":{"syntax":"[ common-ligatures | no-common-ligatures ]"},"compat-auto":{"syntax":"searchfield | textarea | push-button | slider-horizontal | checkbox | radio | square-button | menulist | listbox | meter | progress-bar | button"},"composite-style":{"syntax":"clear | copy | source-over | source-in | source-out | source-atop | destination-over | destination-in | destination-out | destination-atop | xor"},"compositing-operator":{"syntax":"add | subtract | intersect | exclude"},"compound-selector":{"syntax":"[ <type-selector>? <subclass-selector>* [ <pseudo-element-selector> <pseudo-class-selector>* ]* ]!"},"compound-selector-list":{"syntax":"<compound-selector>#"},"complex-selector":{"syntax":"<compound-selector> [ <combinator>? <compound-selector> ]*"},"complex-selector-list":{"syntax":"<complex-selector>#"},"conic-gradient()":{"syntax":"conic-gradient( [ from <angle> ]? [ at <position> ]?, <angular-color-stop-list> )"},"contextual-alt-values":{"syntax":"[ contextual | no-contextual ]"},"content-distribution":{"syntax":"space-between | space-around | space-evenly | stretch"},"content-list":{"syntax":"[ <string> | contents | <image> | <quote> | <target> | <leader()> ]+"},"content-position":{"syntax":"center | start | end | flex-start | flex-end"},"content-replacement":{"syntax":"<image>"},"contrast()":{"syntax":"contrast( [ <number-percentage> ] )"},"counter()":{"syntax":"counter( <custom-ident>, <counter-style>? )"},"counter-style":{"syntax":"<counter-style-name> | symbols()"},"counter-style-name":{"syntax":"<custom-ident>"},"counters()":{"syntax":"counters( <custom-ident>, <string>, <counter-style>? )"},"cross-fade()":{"syntax":"cross-fade( <cf-mixing-image> , <cf-final-image>? )"},"cubic-bezier-timing-function":{"syntax":"ease | ease-in | ease-out | ease-in-out | cubic-bezier(<number [0,1]>, <number>, <number [0,1]>, <number>)"},"deprecated-system-color":{"syntax":"ActiveBorder | ActiveCaption | AppWorkspace | Background | ButtonFace | ButtonHighlight | ButtonShadow | ButtonText | CaptionText | GrayText | Highlight | HighlightText | InactiveBorder | InactiveCaption | InactiveCaptionText | InfoBackground | InfoText | Menu | MenuText | Scrollbar | ThreeDDarkShadow | ThreeDFace | ThreeDHighlight | ThreeDLightShadow | ThreeDShadow | Window | WindowFrame | WindowText"},"discretionary-lig-values":{"syntax":"[ discretionary-ligatures | no-discretionary-ligatures ]"},"display-box":{"syntax":"contents | none"},"display-inside":{"syntax":"flow | flow-root | table | flex | grid | ruby"},"display-internal":{"syntax":"table-row-group | table-header-group | table-footer-group | table-row | table-cell | table-column-group | table-column | table-caption | ruby-base | ruby-text | ruby-base-container | ruby-text-container"},"display-legacy":{"syntax":"inline-block | inline-list-item | inline-table | inline-flex | inline-grid"},"display-listitem":{"syntax":"<display-outside>? && [ flow | flow-root ]? && list-item"},"display-outside":{"syntax":"block | inline | run-in"},"drop-shadow()":{"syntax":"drop-shadow( <length>{2,3} <color>? )"},"east-asian-variant-values":{"syntax":"[ jis78 | jis83 | jis90 | jis04 | simplified | traditional ]"},"east-asian-width-values":{"syntax":"[ full-width | proportional-width ]"},"element()":{"syntax":"element( <id-selector> )"},"ellipse()":{"syntax":"ellipse( [ <shape-radius>{2} ]? [ at <position> ]? )"},"ending-shape":{"syntax":"circle | ellipse"},"env()":{"syntax":"env( <custom-ident> , <declaration-value>? )"},"explicit-track-list":{"syntax":"[ <line-names>? <track-size> ]+ <line-names>?"},"family-name":{"syntax":"<string> | <custom-ident>+"},"feature-tag-value":{"syntax":"<string> [ <integer> | on | off ]?"},"feature-type":{"syntax":"@stylistic | @historical-forms | @styleset | @character-variant | @swash | @ornaments | @annotation"},"feature-value-block":{"syntax":"<feature-type> \'{\' <feature-value-declaration-list> \'}\'"},"feature-value-block-list":{"syntax":"<feature-value-block>+"},"feature-value-declaration":{"syntax":"<custom-ident>: <integer>+;"},"feature-value-declaration-list":{"syntax":"<feature-value-declaration>"},"feature-value-name":{"syntax":"<custom-ident>"},"fill-rule":{"syntax":"nonzero | evenodd"},"filter-function":{"syntax":"<blur()> | <brightness()> | <contrast()> | <drop-shadow()> | <grayscale()> | <hue-rotate()> | <invert()> | <opacity()> | <saturate()> | <sepia()>"},"filter-function-list":{"syntax":"[ <filter-function> | <url> ]+"},"final-bg-layer":{"syntax":"<\'background-color\'> || <bg-image> || <bg-position> [ / <bg-size> ]? || <repeat-style> || <attachment> || <box> || <box>"},"fit-content()":{"syntax":"fit-content( [ <length> | <percentage> ] )"},"fixed-breadth":{"syntax":"<length-percentage>"},"fixed-repeat":{"syntax":"repeat( [ <positive-integer> ] , [ <line-names>? <fixed-size> ]+ <line-names>? )"},"fixed-size":{"syntax":"<fixed-breadth> | minmax( <fixed-breadth> , <track-breadth> ) | minmax( <inflexible-breadth> , <fixed-breadth> )"},"font-stretch-absolute":{"syntax":"normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | <percentage>"},"font-variant-css21":{"syntax":"[ normal | small-caps ]"},"font-weight-absolute":{"syntax":"normal | bold | <number [1,1000]>"},"frequency-percentage":{"syntax":"<frequency> | <percentage>"},"general-enclosed":{"syntax":"[ <function-token> <any-value> ) ] | ( <ident> <any-value> )"},"generic-family":{"syntax":"serif | sans-serif | cursive | fantasy | monospace"},"generic-name":{"syntax":"serif | sans-serif | cursive | fantasy | monospace"},"geometry-box":{"syntax":"<shape-box> | fill-box | stroke-box | view-box"},"gradient":{"syntax":"<linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>"},"grayscale()":{"syntax":"grayscale( <number-percentage> )"},"grid-line":{"syntax":"auto | <custom-ident> | [ <integer> && <custom-ident>? ] | [ span && [ <integer> || <custom-ident> ] ]"},"historical-lig-values":{"syntax":"[ historical-ligatures | no-historical-ligatures ]"},"hsl()":{"syntax":"hsl( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsl( <hue>, <percentage>, <percentage>, <alpha-value>? )"},"hsla()":{"syntax":"hsla( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsla( <hue>, <percentage>, <percentage>, <alpha-value>? )"},"hue":{"syntax":"<number> | <angle>"},"hue-rotate()":{"syntax":"hue-rotate( <angle> )"},"id-selector":{"syntax":"<hash-token>"},"image":{"syntax":"<url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>"},"image()":{"syntax":"image( <image-tags>? [ <image-src>? , <color>? ]! )"},"image-set()":{"syntax":"image-set( <image-set-option># )"},"image-set-option":{"syntax":"[ <image> | <string> ] <resolution>"},"image-src":{"syntax":"<url> | <string>"},"image-tags":{"syntax":"ltr | rtl"},"inflexible-breadth":{"syntax":"<length> | <percentage> | min-content | max-content | auto"},"inset()":{"syntax":"inset( <length-percentage>{1,4} [ round <\'border-radius\'> ]? )"},"invert()":{"syntax":"invert( <number-percentage> )"},"keyframes-name":{"syntax":"<custom-ident> | <string>"},"keyframe-block":{"syntax":"<keyframe-selector># {\\n  <declaration-list>\\n}"},"keyframe-block-list":{"syntax":"<keyframe-block>+"},"keyframe-selector":{"syntax":"from | to | <percentage>"},"leader()":{"syntax":"leader( <leader-type> )"},"leader-type":{"syntax":"dotted | solid | space | <string>"},"length-percentage":{"syntax":"<length> | <percentage>"},"line-names":{"syntax":"\'[\' <custom-ident>* \']\'"},"line-name-list":{"syntax":"[ <line-names> | <name-repeat> ]+"},"line-style":{"syntax":"none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset"},"line-width":{"syntax":"<length> | thin | medium | thick"},"linear-color-hint":{"syntax":"<length-percentage>"},"linear-color-stop":{"syntax":"<color> <color-stop-length>?"},"linear-gradient()":{"syntax":"linear-gradient( [ <angle> | to <side-or-corner> ]? , <color-stop-list> )"},"mask-layer":{"syntax":"<mask-reference> || <position> [ / <bg-size> ]? || <repeat-style> || <geometry-box> || [ <geometry-box> | no-clip ] || <compositing-operator> || <masking-mode>"},"mask-position":{"syntax":"[ <length-percentage> | left | center | right ] [ <length-percentage> | top | center | bottom ]?"},"mask-reference":{"syntax":"none | <image> | <mask-source>"},"mask-source":{"syntax":"<url>"},"masking-mode":{"syntax":"alpha | luminance | match-source"},"matrix()":{"syntax":"matrix( <number>#{6} )"},"matrix3d()":{"syntax":"matrix3d( <number>#{16} )"},"max()":{"syntax":"max( <calc-sum># )"},"media-and":{"syntax":"<media-in-parens> [ and <media-in-parens> ]+"},"media-condition":{"syntax":"<media-not> | <media-and> | <media-or> | <media-in-parens>"},"media-condition-without-or":{"syntax":"<media-not> | <media-and> | <media-in-parens>"},"media-feature":{"syntax":"( [ <mf-plain> | <mf-boolean> | <mf-range> ] )"},"media-in-parens":{"syntax":"( <media-condition> ) | <media-feature> | <general-enclosed>"},"media-not":{"syntax":"not <media-in-parens>"},"media-or":{"syntax":"<media-in-parens> [ or <media-in-parens> ]+"},"media-query":{"syntax":"<media-condition> | [ not | only ]? <media-type> [ and <media-condition-without-or> ]?"},"media-query-list":{"syntax":"<media-query>#"},"media-type":{"syntax":"<ident>"},"mf-boolean":{"syntax":"<mf-name>"},"mf-name":{"syntax":"<ident>"},"mf-plain":{"syntax":"<mf-name> : <mf-value>"},"mf-range":{"syntax":"<mf-name> [ \'<\' | \'>\' ]? \'=\'? <mf-value>\\n| <mf-value> [ \'<\' | \'>\' ]? \'=\'? <mf-name>\\n| <mf-value> \'<\' \'=\'? <mf-name> \'<\' \'=\'? <mf-value>\\n| <mf-value> \'>\' \'=\'? <mf-name> \'>\' \'=\'? <mf-value>"},"mf-value":{"syntax":"<number> | <dimension> | <ident> | <ratio>"},"min()":{"syntax":"min( <calc-sum># )"},"minmax()":{"syntax":"minmax( [ <length> | <percentage> | min-content | max-content | auto ] , [ <length> | <percentage> | <flex> | min-content | max-content | auto ] )"},"named-color":{"syntax":"transparent | aliceblue | antiquewhite | aqua | aquamarine | azure | beige | bisque | black | blanchedalmond | blue | blueviolet | brown | burlywood | cadetblue | chartreuse | chocolate | coral | cornflowerblue | cornsilk | crimson | cyan | darkblue | darkcyan | darkgoldenrod | darkgray | darkgreen | darkgrey | darkkhaki | darkmagenta | darkolivegreen | darkorange | darkorchid | darkred | darksalmon | darkseagreen | darkslateblue | darkslategray | darkslategrey | darkturquoise | darkviolet | deeppink | deepskyblue | dimgray | dimgrey | dodgerblue | firebrick | floralwhite | forestgreen | fuchsia | gainsboro | ghostwhite | gold | goldenrod | gray | green | greenyellow | grey | honeydew | hotpink | indianred | indigo | ivory | khaki | lavender | lavenderblush | lawngreen | lemonchiffon | lightblue | lightcoral | lightcyan | lightgoldenrodyellow | lightgray | lightgreen | lightgrey | lightpink | lightsalmon | lightseagreen | lightskyblue | lightslategray | lightslategrey | lightsteelblue | lightyellow | lime | limegreen | linen | magenta | maroon | mediumaquamarine | mediumblue | mediumorchid | mediumpurple | mediumseagreen | mediumslateblue | mediumspringgreen | mediumturquoise | mediumvioletred | midnightblue | mintcream | mistyrose | moccasin | navajowhite | navy | oldlace | olive | olivedrab | orange | orangered | orchid | palegoldenrod | palegreen | paleturquoise | palevioletred | papayawhip | peachpuff | peru | pink | plum | powderblue | purple | rebeccapurple | red | rosybrown | royalblue | saddlebrown | salmon | sandybrown | seagreen | seashell | sienna | silver | skyblue | slateblue | slategray | slategrey | snow | springgreen | steelblue | tan | teal | thistle | tomato | turquoise | violet | wheat | white | whitesmoke | yellow | yellowgreen"},"namespace-prefix":{"syntax":"<ident>"},"ns-prefix":{"syntax":"[ <ident-token> | \'*\' ]? \'|\'"},"number-percentage":{"syntax":"<number> | <percentage>"},"numeric-figure-values":{"syntax":"[ lining-nums | oldstyle-nums ]"},"numeric-fraction-values":{"syntax":"[ diagonal-fractions | stacked-fractions ]"},"numeric-spacing-values":{"syntax":"[ proportional-nums | tabular-nums ]"},"nth":{"syntax":"<an-plus-b> | even | odd"},"opacity()":{"syntax":"opacity( [ <number-percentage> ] )"},"overflow-position":{"syntax":"unsafe | safe"},"outline-radius":{"syntax":"<length> | <percentage>"},"page-body":{"syntax":"<declaration>? [ ; <page-body> ]? | <page-margin-box> <page-body>"},"page-margin-box":{"syntax":"<page-margin-box-type> \'{\' <declaration-list> \'}\'"},"page-margin-box-type":{"syntax":"@top-left-corner | @top-left | @top-center | @top-right | @top-right-corner | @bottom-left-corner | @bottom-left | @bottom-center | @bottom-right | @bottom-right-corner | @left-top | @left-middle | @left-bottom | @right-top | @right-middle | @right-bottom"},"page-selector-list":{"syntax":"[ <page-selector># ]?"},"page-selector":{"syntax":"<pseudo-page>+ | <ident> <pseudo-page>*"},"path()":{"syntax":"path( [ <fill-rule>, ]? <string> )"},"paint()":{"syntax":"paint( <ident>, <declaration-value>? )"},"perspective()":{"syntax":"perspective( <length> )"},"polygon()":{"syntax":"polygon( <fill-rule>? , [ <length-percentage> <length-percentage> ]# )"},"position":{"syntax":"[ [ left | center | right ] || [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]? | [ [ left | right ] <length-percentage> ] && [ [ top | bottom ] <length-percentage> ] ]"},"pseudo-class-selector":{"syntax":"\':\' <ident-token> | \':\' <function-token> <any-value> \')\'"},"pseudo-element-selector":{"syntax":"\':\' <pseudo-class-selector>"},"pseudo-page":{"syntax":": [ left | right | first | blank ]"},"quote":{"syntax":"open-quote | close-quote | no-open-quote | no-close-quote"},"radial-gradient()":{"syntax":"radial-gradient( [ <ending-shape> || <size> ]? [ at <position> ]? , <color-stop-list> )"},"relative-selector":{"syntax":"<combinator>? <complex-selector>"},"relative-selector-list":{"syntax":"<relative-selector>#"},"relative-size":{"syntax":"larger | smaller"},"repeat-style":{"syntax":"repeat-x | repeat-y | [ repeat | space | round | no-repeat ]{1,2}"},"repeating-linear-gradient()":{"syntax":"repeating-linear-gradient( [ <angle> | to <side-or-corner> ]? , <color-stop-list> )"},"repeating-radial-gradient()":{"syntax":"repeating-radial-gradient( [ <ending-shape> || <size> ]? [ at <position> ]? , <color-stop-list> )"},"rgb()":{"syntax":"rgb( <percentage>{3} [ / <alpha-value> ]? ) | rgb( <number>{3} [ / <alpha-value> ]? ) | rgb( <percentage>#{3} , <alpha-value>? ) | rgb( <number>#{3} , <alpha-value>? )"},"rgba()":{"syntax":"rgba( <percentage>{3} [ / <alpha-value> ]? ) | rgba( <number>{3} [ / <alpha-value> ]? ) | rgba( <percentage>#{3} , <alpha-value>? ) | rgba( <number>#{3} , <alpha-value>? )"},"rotate()":{"syntax":"rotate( [ <angle> | <zero> ] )"},"rotate3d()":{"syntax":"rotate3d( <number> , <number> , <number> , [ <angle> | <zero> ] )"},"rotateX()":{"syntax":"rotateX( [ <angle> | <zero> ] )"},"rotateY()":{"syntax":"rotateY( [ <angle> | <zero> ] )"},"rotateZ()":{"syntax":"rotateZ( [ <angle> | <zero> ] )"},"saturate()":{"syntax":"saturate( <number-percentage> )"},"scale()":{"syntax":"scale( <number> , <number>? )"},"scale3d()":{"syntax":"scale3d( <number> , <number> , <number> )"},"scaleX()":{"syntax":"scaleX( <number> )"},"scaleY()":{"syntax":"scaleY( <number> )"},"scaleZ()":{"syntax":"scaleZ( <number> )"},"self-position":{"syntax":"center | start | end | self-start | self-end | flex-start | flex-end"},"shape-radius":{"syntax":"<length-percentage> | closest-side | farthest-side"},"skew()":{"syntax":"skew( [ <angle> | <zero> ] , [ <angle> | <zero> ]? )"},"skewX()":{"syntax":"skewX( [ <angle> | <zero> ] )"},"skewY()":{"syntax":"skewY( [ <angle> | <zero> ] )"},"sepia()":{"syntax":"sepia( <number-percentage> )"},"shadow":{"syntax":"inset? && <length>{2,4} && <color>?"},"shadow-t":{"syntax":"[ <length>{2,3} && <color>? ]"},"shape":{"syntax":"rect(<top>, <right>, <bottom>, <left>)"},"shape-box":{"syntax":"<box> | margin-box"},"side-or-corner":{"syntax":"[ left | right ] || [ top | bottom ]"},"single-animation":{"syntax":"<time> || <timing-function> || <time> || <single-animation-iteration-count> || <single-animation-direction> || <single-animation-fill-mode> || <single-animation-play-state> || [ none | <keyframes-name> ]"},"single-animation-direction":{"syntax":"normal | reverse | alternate | alternate-reverse"},"single-animation-fill-mode":{"syntax":"none | forwards | backwards | both"},"single-animation-iteration-count":{"syntax":"infinite | <number>"},"single-animation-play-state":{"syntax":"running | paused"},"single-transition":{"syntax":"[ none | <single-transition-property> ] || <time> || <timing-function> || <time>"},"single-transition-property":{"syntax":"all | <custom-ident>"},"size":{"syntax":"closest-side | farthest-side | closest-corner | farthest-corner | <length> | <length-percentage>{2}"},"step-position":{"syntax":"jump-start | jump-end | jump-none | jump-both | start | end"},"step-timing-function":{"syntax":"step-start | step-end | steps(<integer>[, <step-position>]?)"},"subclass-selector":{"syntax":"<id-selector> | <class-selector> | <attribute-selector> | <pseudo-class-selector>"},"supports-condition":{"syntax":"not <supports-in-parens> | <supports-in-parens> [ and <supports-in-parens> ]* | <supports-in-parens> [ or <supports-in-parens> ]*"},"supports-in-parens":{"syntax":"( <supports-condition> ) | <supports-feature> | <general-enclosed>"},"supports-feature":{"syntax":"<supports-decl> | <supports-selector-fn>"},"supports-decl":{"syntax":"( <declaration> )"},"supports-selector-fn":{"syntax":"selector( <complex-selector> )"},"symbol":{"syntax":"<string> | <image> | <custom-ident>"},"target":{"syntax":"<target-counter()> | <target-counters()> | <target-text()>"},"target-counter()":{"syntax":"target-counter( [ <string> | <url> ] , <custom-ident> , <counter-style>? )"},"target-counters()":{"syntax":"target-counters( [ <string> | <url> ] , <custom-ident> , <string> , <counter-style>? )"},"target-text()":{"syntax":"target-text( [ <string> | <url> ] , [ content | before | after | first-letter ]? )"},"time-percentage":{"syntax":"<time> | <percentage>"},"timing-function":{"syntax":"linear | <cubic-bezier-timing-function> | <step-timing-function>"},"track-breadth":{"syntax":"<length-percentage> | <flex> | min-content | max-content | auto"},"track-list":{"syntax":"[ <line-names>? [ <track-size> | <track-repeat> ] ]+ <line-names>?"},"track-repeat":{"syntax":"repeat( [ <positive-integer> ] , [ <line-names>? <track-size> ]+ <line-names>? )"},"track-size":{"syntax":"<track-breadth> | minmax( <inflexible-breadth> , <track-breadth> ) | fit-content( [ <length> | <percentage> ] )"},"transform-function":{"syntax":"<matrix()> | <translate()> | <translateX()> | <translateY()> | <scale()> | <scaleX()> | <scaleY()> | <rotate()> | <skew()> | <skewX()> | <skewY()> | <matrix3d()> | <translate3d()> | <translateZ()> | <scale3d()> | <scaleZ()> | <rotate3d()> | <rotateX()> | <rotateY()> | <rotateZ()> | <perspective()>"},"transform-list":{"syntax":"<transform-function>+"},"translate()":{"syntax":"translate( <length-percentage> , <length-percentage>? )"},"translate3d()":{"syntax":"translate3d( <length-percentage> , <length-percentage> , <length> )"},"translateX()":{"syntax":"translateX( <length-percentage> )"},"translateY()":{"syntax":"translateY( <length-percentage> )"},"translateZ()":{"syntax":"translateZ( <length> )"},"type-or-unit":{"syntax":"string | color | url | integer | number | length | angle | time | frequency | cap | ch | em | ex | ic | lh | rlh | rem | vb | vi | vw | vh | vmin | vmax | mm | Q | cm | in | pt | pc | px | deg | grad | rad | turn | ms | s | Hz | kHz | %"},"type-selector":{"syntax":"<wq-name> | <ns-prefix>? \'*\'"},"var()":{"syntax":"var( <custom-property-name> , <declaration-value>? )"},"viewport-length":{"syntax":"auto | <length-percentage>"},"wq-name":{"syntax":"<ns-prefix>? <ident-token>"}}')},function(e){e.exports=JSON.parse('{"atrules":{"charset":{"prelude":"<string>"},"font-face":{"descriptors":{"unicode-range":{"comment":"replaces <unicode-range>, an old production name","syntax":"<urange>#"}}}},"properties":{"-moz-background-clip":{"comment":"deprecated syntax in old Firefox, https://developer.mozilla.org/en/docs/Web/CSS/background-clip","syntax":"padding | border"},"-moz-border-radius-bottomleft":{"comment":"https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-left-radius","syntax":"<\'border-bottom-left-radius\'>"},"-moz-border-radius-bottomright":{"comment":"https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius","syntax":"<\'border-bottom-right-radius\'>"},"-moz-border-radius-topleft":{"comment":"https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-left-radius","syntax":"<\'border-top-left-radius\'>"},"-moz-border-radius-topright":{"comment":"https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius","syntax":"<\'border-bottom-right-radius\'>"},"-moz-control-character-visibility":{"comment":"firefox specific keywords, https://bugzilla.mozilla.org/show_bug.cgi?id=947588","syntax":"visible | hidden"},"-moz-osx-font-smoothing":{"comment":"misssed old syntax https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth","syntax":"auto | grayscale"},"-moz-user-select":{"comment":"https://developer.mozilla.org/en-US/docs/Web/CSS/user-select","syntax":"none | text | all | -moz-none"},"-ms-flex-align":{"comment":"misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-align","syntax":"start | end | center | baseline | stretch"},"-ms-flex-item-align":{"comment":"misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-align","syntax":"auto | start | end | center | baseline | stretch"},"-ms-flex-line-pack":{"comment":"misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-line-pack","syntax":"start | end | center | justify | distribute | stretch"},"-ms-flex-negative":{"comment":"misssed old syntax implemented in IE; TODO: find references for comfirmation","syntax":"<\'flex-shrink\'>"},"-ms-flex-pack":{"comment":"misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-pack","syntax":"start | end | center | justify | distribute"},"-ms-flex-order":{"comment":"misssed old syntax implemented in IE; https://msdn.microsoft.com/en-us/library/jj127303(v=vs.85).aspx","syntax":"<integer>"},"-ms-flex-positive":{"comment":"misssed old syntax implemented in IE; TODO: find references for comfirmation","syntax":"<\'flex-grow\'>"},"-ms-flex-preferred-size":{"comment":"misssed old syntax implemented in IE; TODO: find references for comfirmation","syntax":"<\'flex-basis\'>"},"-ms-interpolation-mode":{"comment":"https://msdn.microsoft.com/en-us/library/ff521095(v=vs.85).aspx","syntax":"nearest-neighbor | bicubic"},"-ms-grid-column-align":{"comment":"add this property first since it uses as fallback for flexbox, https://msdn.microsoft.com/en-us/library/windows/apps/hh466338.aspx","syntax":"start | end | center | stretch"},"-ms-grid-row-align":{"comment":"add this property first since it uses as fallback for flexbox, https://msdn.microsoft.com/en-us/library/windows/apps/hh466348.aspx","syntax":"start | end | center | stretch"},"-ms-hyphenate-limit-last":{"comment":"misssed old syntax implemented in IE; https://www.w3.org/TR/css-text-4/#hyphenate-line-limits","syntax":"none | always | column | page | spread"},"-webkit-appearance":{"comment":"webkit specific keywords","references":["http://css-infos.net/property/-webkit-appearance"],"syntax":"none | button | button-bevel | caps-lock-indicator | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | media-time-remaining-display | media-toggle-closed-captions-button | media-volume-slider | media-volume-slider-container | media-volume-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbargripper-horizontal | scrollbargripper-vertical | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | -apple-pay-button"},"-webkit-background-clip":{"comment":"https://developer.mozilla.org/en/docs/Web/CSS/background-clip","syntax":"[ <box> | border | padding | content | text ]#"},"-webkit-column-break-after":{"comment":"added, http://help.dottoro.com/lcrthhhv.php","syntax":"always | auto | avoid"},"-webkit-column-break-before":{"comment":"added, http://help.dottoro.com/lcxquvkf.php","syntax":"always | auto | avoid"},"-webkit-column-break-inside":{"comment":"added, http://help.dottoro.com/lclhnthl.php","syntax":"always | auto | avoid"},"-webkit-font-smoothing":{"comment":"https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth","syntax":"auto | none | antialiased | subpixel-antialiased"},"-webkit-mask-box-image":{"comment":"missed; https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-mask-box-image","syntax":"[ <url> | <gradient> | none ] [ <length-percentage>{4} <-webkit-mask-box-repeat>{2} ]?"},"-webkit-print-color-adjust":{"comment":"missed","references":["https://developer.mozilla.org/en/docs/Web/CSS/-webkit-print-color-adjust"],"syntax":"economy | exact"},"-webkit-text-security":{"comment":"missed; http://help.dottoro.com/lcbkewgt.php","syntax":"none | circle | disc | square"},"-webkit-user-drag":{"comment":"missed; http://help.dottoro.com/lcbixvwm.php","syntax":"none | element | auto"},"-webkit-user-select":{"comment":"auto is supported by old webkit, https://developer.mozilla.org/en-US/docs/Web/CSS/user-select","syntax":"auto | none | text | all"},"alignment-baseline":{"comment":"added SVG property","references":["https://www.w3.org/TR/SVG/text.html#AlignmentBaselineProperty"],"syntax":"auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical"},"baseline-shift":{"comment":"added SVG property","references":["https://www.w3.org/TR/SVG/text.html#BaselineShiftProperty"],"syntax":"baseline | sub | super | <svg-length>"},"behavior":{"comment":"added old IE property https://msdn.microsoft.com/en-us/library/ms530723(v=vs.85).aspx","syntax":"<url>+"},"clip-rule":{"comment":"added SVG property","references":["https://www.w3.org/TR/SVG/masking.html#ClipRuleProperty"],"syntax":"nonzero | evenodd"},"cue":{"comment":"https://www.w3.org/TR/css3-speech/#property-index","syntax":"<\'cue-before\'> <\'cue-after\'>?"},"cue-after":{"comment":"https://www.w3.org/TR/css3-speech/#property-index","syntax":"<url> <decibel>? | none"},"cue-before":{"comment":"https://www.w3.org/TR/css3-speech/#property-index","syntax":"<url> <decibel>? | none"},"cursor":{"comment":"added legacy keywords: hand, -webkit-grab. -webkit-grabbing, -webkit-zoom-in, -webkit-zoom-out, -moz-grab, -moz-grabbing, -moz-zoom-in, -moz-zoom-out","references":["https://www.sitepoint.com/css3-cursor-styles/"],"syntax":"[ [ <url> [ <x> <y> ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing | hand | -webkit-grab | -webkit-grabbing | -webkit-zoom-in | -webkit-zoom-out | -moz-grab | -moz-grabbing | -moz-zoom-in | -moz-zoom-out ] ]"},"display":{"comment":"extended with -ms-flexbox","syntax":"| <-non-standard-display>"},"position":{"comment":"extended with -webkit-sticky","syntax":"| -webkit-sticky"},"dominant-baseline":{"comment":"added SVG property","references":["https://www.w3.org/TR/SVG/text.html#DominantBaselineProperty"],"syntax":"auto | use-script | no-change | reset-size | ideographic | alphabetic | hanging | mathematical | central | middle | text-after-edge | text-before-edge"},"image-rendering":{"comment":"extended with <-non-standard-image-rendering>, added SVG keywords optimizeSpeed and optimizeQuality","references":["https://developer.mozilla.org/en/docs/Web/CSS/image-rendering","https://www.w3.org/TR/SVG/painting.html#ImageRenderingProperty"],"syntax":"| optimizeSpeed | optimizeQuality | <-non-standard-image-rendering>"},"fill":{"comment":"added SVG property","references":["https://www.w3.org/TR/SVG/painting.html#FillProperty"],"syntax":"<paint>"},"fill-opacity":{"comment":"added SVG property","references":["https://www.w3.org/TR/SVG/painting.html#FillProperty"],"syntax":"<number-zero-one>"},"fill-rule":{"comment":"added SVG property","references":["https://www.w3.org/TR/SVG/painting.html#FillProperty"],"syntax":"nonzero | evenodd"},"filter":{"comment":"extend with IE legacy syntaxes","syntax":"| <-ms-filter-function-list>"},"glyph-orientation-horizontal":{"comment":"added SVG property","references":["https://www.w3.org/TR/SVG/text.html#GlyphOrientationHorizontalProperty"],"syntax":"<angle>"},"glyph-orientation-vertical":{"comment":"added SVG property","references":["https://www.w3.org/TR/SVG/text.html#GlyphOrientationVerticalProperty"],"syntax":"<angle>"},"kerning":{"comment":"added SVG property","references":["https://www.w3.org/TR/SVG/text.html#KerningProperty"],"syntax":"auto | <svg-length>"},"letter-spacing":{"comment":"fix syntax <length> -> <length-percentage>","references":["https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/letter-spacing"],"syntax":"normal | <length-percentage>"},"marker":{"comment":"added SVG property","references":["https://www.w3.org/TR/SVG/painting.html#MarkerProperties"],"syntax":"none | <url>"},"marker-end":{"comment":"added SVG property","references":["https://www.w3.org/TR/SVG/painting.html#MarkerProperties"],"syntax":"none | <url>"},"marker-mid":{"comment":"added SVG property","references":["https://www.w3.org/TR/SVG/painting.html#MarkerProperties"],"syntax":"none | <url>"},"marker-start":{"comment":"added SVG property","references":["https://www.w3.org/TR/SVG/painting.html#MarkerProperties"],"syntax":"none | <url>"},"max-width":{"comment":"fix auto -> none (https://github.com/mdn/data/pull/431); extend by non-standard width keywords https://developer.mozilla.org/en-US/docs/Web/CSS/max-width","syntax":"none | <length-percentage> | min-content | max-content | fit-content(<length-percentage>) | <-non-standard-width>"},"width":{"comment":"per spec fit-content should be a function, however browsers are supporting it as a keyword (https://github.com/csstree/stylelint-validator/issues/29)","syntax":"| fit-content | -moz-fit-content | -webkit-fit-content"},"min-width":{"comment":"extend by non-standard width keywords https://developer.mozilla.org/en-US/docs/Web/CSS/width","syntax":"auto | <length-percentage> | min-content | max-content | fit-content(<length-percentage>) | <-non-standard-width>"},"overflow":{"comment":"extend by vendor keywords https://developer.mozilla.org/en-US/docs/Web/CSS/overflow","syntax":"| <-non-standard-overflow>"},"pause":{"comment":"https://www.w3.org/TR/css3-speech/#property-index","syntax":"<\'pause-before\'> <\'pause-after\'>?"},"pause-after":{"comment":"https://www.w3.org/TR/css3-speech/#property-index","syntax":"<time> | none | x-weak | weak | medium | strong | x-strong"},"pause-before":{"comment":"https://www.w3.org/TR/css3-speech/#property-index","syntax":"<time> | none | x-weak | weak | medium | strong | x-strong"},"rest":{"comment":"https://www.w3.org/TR/css3-speech/#property-index","syntax":"<\'rest-before\'> <\'rest-after\'>?"},"rest-after":{"comment":"https://www.w3.org/TR/css3-speech/#property-index","syntax":"<time> | none | x-weak | weak | medium | strong | x-strong"},"rest-before":{"comment":"https://www.w3.org/TR/css3-speech/#property-index","syntax":"<time> | none | x-weak | weak | medium | strong | x-strong"},"shape-rendering":{"comment":"added SVG property","references":["https://www.w3.org/TR/SVG/painting.html#ShapeRenderingPropert"],"syntax":"auto | optimizeSpeed | crispEdges | geometricPrecision"},"src":{"comment":"added @font-face\'s src property https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src","syntax":"[ <url> [ format( <string># ) ]? | local( <family-name> ) ]#"},"speak":{"comment":"https://www.w3.org/TR/css3-speech/#property-index","syntax":"auto | none | normal"},"speak-as":{"comment":"https://www.w3.org/TR/css3-speech/#property-index","syntax":"normal | spell-out || digits || [ literal-punctuation | no-punctuation ]"},"stroke":{"comment":"added SVG property","references":["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],"syntax":"<paint>"},"stroke-dasharray":{"comment":"added SVG property; a list of comma and/or white space separated <length>s and <percentage>s","references":["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],"syntax":"none | [ <svg-length>+ ]#"},"stroke-dashoffset":{"comment":"added SVG property","references":["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],"syntax":"<svg-length>"},"stroke-linecap":{"comment":"added SVG property","references":["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],"syntax":"butt | round | square"},"stroke-linejoin":{"comment":"added SVG property","references":["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],"syntax":"miter | round | bevel"},"stroke-miterlimit":{"comment":"added SVG property (<miterlimit> = <number-one-or-greater>) ","references":["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],"syntax":"<number-one-or-greater>"},"stroke-opacity":{"comment":"added SVG property","references":["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],"syntax":"<number-zero-one>"},"stroke-width":{"comment":"added SVG property","references":["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],"syntax":"<svg-length>"},"text-anchor":{"comment":"added SVG property","references":["https://www.w3.org/TR/SVG/text.html#TextAlignmentProperties"],"syntax":"start | middle | end"},"unicode-bidi":{"comment":"added prefixed keywords https://developer.mozilla.org/en-US/docs/Web/CSS/unicode-bidi","syntax":"| -moz-isolate | -moz-isolate-override | -moz-plaintext | -webkit-isolate | -webkit-isolate-override | -webkit-plaintext"},"unicode-range":{"comment":"added missed property https://developer.mozilla.org/en-US/docs/Web/CSS/%40font-face/unicode-range","syntax":"<urange>#"},"voice-balance":{"comment":"https://www.w3.org/TR/css3-speech/#property-index","syntax":"<number> | left | center | right | leftwards | rightwards"},"voice-duration":{"comment":"https://www.w3.org/TR/css3-speech/#property-index","syntax":"auto | <time>"},"voice-family":{"comment":"<name> -> <family-name>, https://www.w3.org/TR/css3-speech/#property-index","syntax":"[ [ <family-name> | <generic-voice> ] , ]* [ <family-name> | <generic-voice> ] | preserve"},"voice-pitch":{"comment":"https://www.w3.org/TR/css3-speech/#property-index","syntax":"<frequency> && absolute | [ [ x-low | low | medium | high | x-high ] || [ <frequency> | <semitones> | <percentage> ] ]"},"voice-range":{"comment":"https://www.w3.org/TR/css3-speech/#property-index","syntax":"<frequency> && absolute | [ [ x-low | low | medium | high | x-high ] || [ <frequency> | <semitones> | <percentage> ] ]"},"voice-rate":{"comment":"https://www.w3.org/TR/css3-speech/#property-index","syntax":"[ normal | x-slow | slow | medium | fast | x-fast ] || <percentage>"},"voice-stress":{"comment":"https://www.w3.org/TR/css3-speech/#property-index","syntax":"normal | strong | moderate | none | reduced"},"voice-volume":{"comment":"https://www.w3.org/TR/css3-speech/#property-index","syntax":"silent | [ [ x-soft | soft | medium | loud | x-loud ] || <decibel> ]"},"writing-mode":{"comment":"extend with SVG keywords","syntax":"| <svg-writing-mode>"}},"syntaxes":{"-legacy-gradient":{"comment":"added collection of legacy gradient syntaxes","syntax":"<-webkit-gradient()> | <-legacy-linear-gradient> | <-legacy-repeating-linear-gradient> | <-legacy-radial-gradient> | <-legacy-repeating-radial-gradient>"},"-legacy-linear-gradient":{"comment":"like standard syntax but w/o `to` keyword https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient","syntax":"-moz-linear-gradient( <-legacy-linear-gradient-arguments> ) | -webkit-linear-gradient( <-legacy-linear-gradient-arguments> ) | -o-linear-gradient( <-legacy-linear-gradient-arguments> )"},"-legacy-repeating-linear-gradient":{"comment":"like standard syntax but w/o `to` keyword https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient","syntax":"-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> ) | -webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> ) | -o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )"},"-legacy-linear-gradient-arguments":{"comment":"like standard syntax but w/o `to` keyword https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient","syntax":"[ <angle> | <side-or-corner> ]? , <color-stop-list>"},"-legacy-radial-gradient":{"comment":"deprecated syntax that implemented by some browsers https://www.w3.org/TR/2011/WD-css3-images-20110908/#radial-gradients","syntax":"-moz-radial-gradient( <-legacy-radial-gradient-arguments> ) | -webkit-radial-gradient( <-legacy-radial-gradient-arguments> ) | -o-radial-gradient( <-legacy-radial-gradient-arguments> )"},"-legacy-repeating-radial-gradient":{"comment":"deprecated syntax that implemented by some browsers https://www.w3.org/TR/2011/WD-css3-images-20110908/#radial-gradients","syntax":"-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> ) | -webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> ) | -o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )"},"-legacy-radial-gradient-arguments":{"comment":"deprecated syntax that implemented by some browsers https://www.w3.org/TR/2011/WD-css3-images-20110908/#radial-gradients","syntax":"[ <position> , ]? [ [ [ <-legacy-radial-gradient-shape> || <-legacy-radial-gradient-size> ] | [ <length> | <percentage> ]{2} ] , ]? <color-stop-list>"},"-legacy-radial-gradient-size":{"comment":"before a standard it contains 2 extra keywords (`contain` and `cover`) https://www.w3.org/TR/2011/WD-css3-images-20110908/#ltsize","syntax":"closest-side | closest-corner | farthest-side | farthest-corner | contain | cover"},"-legacy-radial-gradient-shape":{"comment":"define to double sure it doesn\'t extends in future https://www.w3.org/TR/2011/WD-css3-images-20110908/#ltshape","syntax":"circle | ellipse"},"-non-standard-font":{"comment":"non standard fonts","references":["https://webkit.org/blog/3709/using-the-system-font-in-web-content/"],"syntax":"-apple-system-body | -apple-system-headline | -apple-system-subheadline | -apple-system-caption1 | -apple-system-caption2 | -apple-system-footnote | -apple-system-short-body | -apple-system-short-headline | -apple-system-short-subheadline | -apple-system-short-caption1 | -apple-system-short-footnote | -apple-system-tall-body"},"-non-standard-color":{"comment":"non standard colors","references":["http://cssdot.ru/%D0%A1%D0%BF%D1%80%D0%B0%D0%B2%D0%BE%D1%87%D0%BD%D0%B8%D0%BA_CSS/color-i305.html","https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#Mozilla_Color_Preference_Extensions"],"syntax":"-moz-ButtonDefault | -moz-ButtonHoverFace | -moz-ButtonHoverText | -moz-CellHighlight | -moz-CellHighlightText | -moz-Combobox | -moz-ComboboxText | -moz-Dialog | -moz-DialogText | -moz-dragtargetzone | -moz-EvenTreeRow | -moz-Field | -moz-FieldText | -moz-html-CellHighlight | -moz-html-CellHighlightText | -moz-mac-accentdarkestshadow | -moz-mac-accentdarkshadow | -moz-mac-accentface | -moz-mac-accentlightesthighlight | -moz-mac-accentlightshadow | -moz-mac-accentregularhighlight | -moz-mac-accentregularshadow | -moz-mac-chrome-active | -moz-mac-chrome-inactive | -moz-mac-focusring | -moz-mac-menuselect | -moz-mac-menushadow | -moz-mac-menutextselect | -moz-MenuHover | -moz-MenuHoverText | -moz-MenuBarText | -moz-MenuBarHoverText | -moz-nativehyperlinktext | -moz-OddTreeRow | -moz-win-communicationstext | -moz-win-mediatext | -moz-activehyperlinktext | -moz-default-background-color | -moz-default-color | -moz-hyperlinktext | -moz-visitedhyperlinktext | -webkit-activelink | -webkit-focus-ring-color | -webkit-link | -webkit-text"},"-non-standard-image-rendering":{"comment":"non-standard keywords http://phrogz.net/tmp/canvas_image_zoom.html","syntax":"optimize-contrast | -moz-crisp-edges | -o-crisp-edges | -webkit-optimize-contrast"},"-non-standard-overflow":{"comment":"non-standard keywords https://developer.mozilla.org/en-US/docs/Web/CSS/overflow","syntax":"-moz-scrollbars-none | -moz-scrollbars-horizontal | -moz-scrollbars-vertical | -moz-hidden-unscrollable"},"-non-standard-width":{"comment":"non-standard keywords https://developer.mozilla.org/en-US/docs/Web/CSS/width","syntax":"fill-available | min-intrinsic | intrinsic | -moz-available | -moz-fit-content | -moz-min-content | -moz-max-content | -webkit-min-content | -webkit-max-content"},"-webkit-gradient()":{"comment":"first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/ - TODO: simplify when after match algorithm improvement ( [, point, radius | , point] -> [, radius]? , point )","syntax":"-webkit-gradient( <-webkit-gradient-type>, <-webkit-gradient-point> [, <-webkit-gradient-point> | , <-webkit-gradient-radius>, <-webkit-gradient-point> ] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )"},"-webkit-gradient-color-stop":{"comment":"first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/","syntax":"from( <color> ) | color-stop( [ <number-zero-one> | <percentage> ] , <color> ) | to( <color> )"},"-webkit-gradient-point":{"comment":"first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/","syntax":"[ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]"},"-webkit-gradient-radius":{"comment":"first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/","syntax":"<length> | <percentage>"},"-webkit-gradient-type":{"comment":"first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/","syntax":"linear | radial"},"-webkit-mask-box-repeat":{"comment":"missed; https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-mask-box-image","syntax":"repeat | stretch | round"},"-webkit-mask-clip-style":{"comment":"missed; there is no enough information about `-webkit-mask-clip` property, but looks like all those keywords are working","syntax":"border | border-box | padding | padding-box | content | content-box | text"},"-ms-filter-function-list":{"comment":"https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter","syntax":"<-ms-filter-function>+"},"-ms-filter-function":{"comment":"https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter","syntax":"<-ms-filter-function-progid> | <-ms-filter-function-legacy>"},"-ms-filter-function-progid":{"comment":"https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter","syntax":"\'progid:\' [ <ident-token> \'.\' ]* [ <ident-token> | <function-token> <any-value>? ) ]"},"-ms-filter-function-legacy":{"comment":"https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter","syntax":"<ident-token> | <function-token> <any-value>? )"},"-ms-filter":{"syntax":"<string>"},"age":{"comment":"https://www.w3.org/TR/css3-speech/#voice-family","syntax":"child | young | old"},"attr-name":{"syntax":"<wq-name>"},"attr-fallback":{"syntax":"<any-value>"},"border-radius":{"comment":"missed, https://drafts.csswg.org/css-backgrounds-3/#the-border-radius","syntax":"<length-percentage>{1,2}"},"bottom":{"comment":"missed; not sure we should add it, but no others except `shape` is using it so it\'s ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect","syntax":"<length> | auto"},"content-list":{"comment":"missed -> https://drafts.csswg.org/css-content/#typedef-content-list (document-url, <target> and leader() is omitted util stabilization)","syntax":"[ <string> | contents | <image> | <quote> | <target> | <leader()> | <attr()> | counter( <ident>, <\'list-style-type\'>? ) ]+"},"element()":{"comment":"https://drafts.csswg.org/css-gcpm/#element-syntax & https://drafts.csswg.org/css-images-4/#element-notation","syntax":"element( <custom-ident> , [ first | start | last | first-except ]? ) | element( <id-selector> )"},"generic-voice":{"comment":"https://www.w3.org/TR/css3-speech/#voice-family","syntax":"[ <age>? <gender> <integer>? ]"},"gender":{"comment":"https://www.w3.org/TR/css3-speech/#voice-family","syntax":"male | female | neutral"},"generic-family":{"comment":"added -apple-system","references":["https://webkit.org/blog/3709/using-the-system-font-in-web-content/"],"syntax":"| -apple-system"},"gradient":{"comment":"added legacy syntaxes support","syntax":"| <-legacy-gradient>"},"left":{"comment":"missed; not sure we should add it, but no others except `shape` is using it so it\'s ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect","syntax":"<length> | auto"},"mask-image":{"comment":"missed; https://drafts.fxtf.org/css-masking-1/#the-mask-image","syntax":"<mask-reference>#"},"name-repeat":{"comment":"missed, and looks like obsolete, keep it as is since other property syntaxes should be changed too; https://www.w3.org/TR/2015/WD-css-grid-1-20150917/#typedef-name-repeat","syntax":"repeat( [ <positive-integer> | auto-fill ], <line-names>+)"},"named-color":{"comment":"added non standard color names","syntax":"| <-non-standard-color>"},"paint":{"comment":"used by SVG https://www.w3.org/TR/SVG/painting.html#SpecifyingPaint","syntax":"none | <color> | <url> [ none | <color> ]? | context-fill | context-stroke"},"page-size":{"comment":"https://www.w3.org/TR/css-page-3/#typedef-page-size-page-size","syntax":"A5 | A4 | A3 | B5 | B4 | JIS-B5 | JIS-B4 | letter | legal | ledger"},"ratio":{"comment":"missed, https://drafts.csswg.org/mediaqueries-4/#typedef-ratio","syntax":"<integer> / <integer>"},"right":{"comment":"missed; not sure we should add it, but no others except `shape` is using it so it\'s ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect","syntax":"<length> | auto"},"shape":{"comment":"missed spaces in function body and add backwards compatible syntax","syntax":"rect( <top>, <right>, <bottom>, <left> ) | rect( <top> <right> <bottom> <left> )"},"svg-length":{"comment":"All coordinates and lengths in SVG can be specified with or without a unit identifier","references":["https://www.w3.org/TR/SVG11/coords.html#Units"],"syntax":"<percentage> | <length> | <number>"},"svg-writing-mode":{"comment":"SVG specific keywords (deprecated for CSS)","references":["https://developer.mozilla.org/en/docs/Web/CSS/writing-mode","https://www.w3.org/TR/SVG/text.html#WritingModeProperty"],"syntax":"lr-tb | rl-tb | tb-rl | lr | rl | tb"},"top":{"comment":"missed; not sure we should add it, but no others except `shape` is using it so it\'s ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect","syntax":"<length> | auto"},"track-group":{"comment":"used by old grid-columns and grid-rows syntax v0","syntax":"\'(\' [ <string>* <track-minmax> <string>* ]+ \')\' [ \'[\' <positive-integer> \']\' ]? | <track-minmax>"},"track-list-v0":{"comment":"used by old grid-columns and grid-rows syntax v0","syntax":"[ <string>* <track-group> <string>* ]+ | none"},"track-minmax":{"comment":"used by old grid-columns and grid-rows syntax v0","syntax":"minmax( <track-breadth> , <track-breadth> ) | auto | <track-breadth> | fit-content"},"x":{"comment":"missed; not sure we should add it, but no others except `cursor` is using it so it\'s ok for now; https://drafts.csswg.org/css-ui-3/#cursor","syntax":"<number>"},"y":{"comment":"missed; not sure we should add it, but no others except `cursor` is using so it\'s ok for now; https://drafts.csswg.org/css-ui-3/#cursor","syntax":"<number>"},"declaration":{"comment":"missed, restored by https://drafts.csswg.org/css-syntax","syntax":"<ident-token> : <declaration-value>? [ \'!\' important ]?"},"declaration-list":{"comment":"missed, restored by https://drafts.csswg.org/css-syntax","syntax":"[ <declaration>? \';\' ]* <declaration>?"},"url":{"comment":"https://drafts.csswg.org/css-values-4/#urls","syntax":"url( <string> <url-modifier>* ) | <url-token>"},"url-modifier":{"comment":"https://drafts.csswg.org/css-values-4/#typedef-url-modifier","syntax":"<ident> | <function-token> <any-value> )"},"number-zero-one":{"syntax":"<number [0,1]>"},"number-one-or-greater":{"syntax":"<number [1,∞]>"},"positive-integer":{"syntax":"<integer [0,∞]>"},"-non-standard-display":{"syntax":"-ms-inline-flexbox | -ms-grid | -ms-inline-grid | -webkit-flex | -webkit-inline-flex | -webkit-box | -webkit-inline-box | -moz-inline-stack | -moz-box | -moz-inline-box"}}}')},function(e,t,n){var r=n(0).cmpChar,i=n(0).isDigit,s=n(0).TYPE,o=s.WhiteSpace,a=s.Comment,l=s.Ident,c=s.Number,u=s.Dimension,d=43,h=45,p=110,m=!0;function f(e,t){var n=this.scanner.tokenStart+e,r=this.scanner.source.charCodeAt(n);for(r!==d&&r!==h||(t&&this.error("Number sign is not allowed"),n++);n<this.scanner.tokenEnd;n++)i(this.scanner.source.charCodeAt(n))||this.error("Integer is expected",n)}function g(e){return f.call(this,0,e)}function y(e,t){if(!r(this.scanner.source,this.scanner.tokenStart+e,t)){var n="";switch(t){case p:n="N is expected";break;case h:n="HyphenMinus is expected"}this.error(n,this.scanner.tokenStart+e)}}function b(){for(var e=0,t=0,n=this.scanner.tokenType;n===o||n===a;)n=this.scanner.lookupType(++e);if(n!==c){if(!this.scanner.isDelim(d,e)&&!this.scanner.isDelim(h,e))return null;t=this.scanner.isDelim(d,e)?d:h;do{n=this.scanner.lookupType(++e)}while(n===o||n===a);n!==c&&(this.scanner.skip(e),g.call(this,m))}return e>0&&this.scanner.skip(e),0===t&&(n=this.scanner.source.charCodeAt(this.scanner.tokenStart))!==d&&n!==h&&this.error("Number sign is expected"),g.call(this,0!==t),t===h?"-"+this.consume(c):this.consume(c)}e.exports={name:"AnPlusB",structure:{a:[String,null],b:[String,null]},parse:function(){var e=this.scanner.tokenStart,t=null,n=null;if(this.scanner.tokenType===c)g.call(this,false),n=this.consume(c);else if(this.scanner.tokenType===l&&r(this.scanner.source,this.scanner.tokenStart,h))switch(t="-1",y.call(this,1,p),this.scanner.getTokenLength()){case 2:this.scanner.next(),n=b.call(this);break;case 3:y.call(this,2,h),this.scanner.next(),this.scanner.skipSC(),g.call(this,m),n="-"+this.consume(c);break;default:y.call(this,2,h),f.call(this,3,m),this.scanner.next(),n=this.scanner.substrToCursor(e+2)}else if(this.scanner.tokenType===l||this.scanner.isDelim(d)&&this.scanner.lookupType(1)===l){var s=0;switch(t="1",this.scanner.isDelim(d)&&(s=1,this.scanner.next()),y.call(this,0,p),this.scanner.getTokenLength()){case 1:this.scanner.next(),n=b.call(this);break;case 2:y.call(this,1,h),this.scanner.next(),this.scanner.skipSC(),g.call(this,m),n="-"+this.consume(c);break;default:y.call(this,1,h),f.call(this,2,m),this.scanner.next(),n=this.scanner.substrToCursor(e+s+1)}}else if(this.scanner.tokenType===u){for(var o=this.scanner.source.charCodeAt(this.scanner.tokenStart),a=(s=o===d||o===h,this.scanner.tokenStart+s);a<this.scanner.tokenEnd&&i(this.scanner.source.charCodeAt(a));a++);a===this.scanner.tokenStart+s&&this.error("Integer is expected",this.scanner.tokenStart+s),y.call(this,a-this.scanner.tokenStart,p),t=this.scanner.source.substring(e,a),a+1===this.scanner.tokenEnd?(this.scanner.next(),n=b.call(this)):(y.call(this,a-this.scanner.tokenStart+1,h),a+2===this.scanner.tokenEnd?(this.scanner.next(),this.scanner.skipSC(),g.call(this,m),n="-"+this.consume(c)):(f.call(this,a-this.scanner.tokenStart+2,m),this.scanner.next(),n=this.scanner.substrToCursor(a+1)))}else this.error();return null!==t&&t.charCodeAt(0)===d&&(t=t.substr(1)),null!==n&&n.charCodeAt(0)===d&&(n=n.substr(1)),{type:"AnPlusB",loc:this.getLocation(e,this.scanner.tokenStart),a:t,b:n}},generate:function(e){var t=null!==e.a&&void 0!==e.a,n=null!==e.b&&void 0!==e.b;t?(this.chunk("+1"===e.a?"+n":"1"===e.a?"n":"-1"===e.a?"-n":e.a+"n"),n&&("-"===(n=String(e.b)).charAt(0)||"+"===n.charAt(0)?(this.chunk(n.charAt(0)),this.chunk(n.substr(1))):(this.chunk("+"),this.chunk(n)))):this.chunk(String(e.b))}}},function(e,t,n){var r=n(0).TYPE,i=n(17).mode,s=r.AtKeyword,o=r.Semicolon,a=r.LeftCurlyBracket,l=r.RightCurlyBracket;function c(e){return this.Raw(e,i.leftCurlyBracketOrSemicolon,!0)}function u(){for(var e,t=1;e=this.scanner.lookupType(t);t++){if(e===l)return!0;if(e===a||e===s)return!1}return!1}e.exports={name:"Atrule",structure:{name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]},parse:function(){var e,t,n=this.scanner.tokenStart,r=null,i=null;switch(this.eat(s),t=(e=this.scanner.substrToCursor(n+1)).toLowerCase(),this.scanner.skipSC(),!1===this.scanner.eof&&this.scanner.tokenType!==a&&this.scanner.tokenType!==o&&(this.parseAtrulePrelude?"AtrulePrelude"===(r=this.parseWithFallback(this.AtrulePrelude.bind(this,e),c)).type&&null===r.children.head&&(r=null):r=c.call(this,this.scanner.tokenIndex),this.scanner.skipSC()),this.scanner.tokenType){case o:this.scanner.next();break;case a:i=this.atrule.hasOwnProperty(t)&&"function"==typeof this.atrule[t].block?this.atrule[t].block.call(this):this.Block(u.call(this))}return{type:"Atrule",loc:this.getLocation(n,this.scanner.tokenStart),name:e,prelude:r,block:i}},generate:function(e){this.chunk("@"),this.chunk(e.name),null!==e.prelude&&(this.chunk(" "),this.node(e.prelude)),e.block?this.node(e.block):this.chunk(";")},walkContext:"atrule"}},function(e,t,n){var r=n(0).TYPE,i=r.Semicolon,s=r.LeftCurlyBracket;e.exports={name:"AtrulePrelude",structure:{children:[[]]},parse:function(e){var t=null;return null!==e&&(e=e.toLowerCase()),this.scanner.skipSC(),t=this.atrule.hasOwnProperty(e)&&"function"==typeof this.atrule[e].prelude?this.atrule[e].prelude.call(this):this.readSequence(this.scope.AtrulePrelude),this.scanner.skipSC(),!0!==this.scanner.eof&&this.scanner.tokenType!==s&&this.scanner.tokenType!==i&&this.error("Semicolon or block is expected"),null===t&&(t=this.createList()),{type:"AtrulePrelude",loc:this.getLocationFromList(t),children:t}},generate:function(e){this.children(e)},walkContext:"atrulePrelude"}},function(e,t,n){var r=n(0).TYPE,i=r.Ident,s=r.String,o=r.Colon,a=r.LeftSquareBracket,l=r.RightSquareBracket;function c(){this.scanner.eof&&this.error("Unexpected end of input");var e=this.scanner.tokenStart,t=!1,n=!0;return this.scanner.isDelim(42)?(t=!0,n=!1,this.scanner.next()):this.scanner.isDelim(124)||this.eat(i),this.scanner.isDelim(124)?61!==this.scanner.source.charCodeAt(this.scanner.tokenStart+1)?(this.scanner.next(),this.eat(i)):t&&this.error("Identifier is expected",this.scanner.tokenEnd):t&&this.error("Vertical line is expected"),n&&this.scanner.tokenType===o&&(this.scanner.next(),this.eat(i)),{type:"Identifier",loc:this.getLocation(e,this.scanner.tokenStart),name:this.scanner.substrToCursor(e)}}function u(){var e=this.scanner.tokenStart,t=this.scanner.source.charCodeAt(e);return 61!==t&&126!==t&&94!==t&&36!==t&&42!==t&&124!==t&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.scanner.next(),61!==t&&(this.scanner.isDelim(61)||this.error("Equal sign is expected"),this.scanner.next()),this.scanner.substrToCursor(e)}e.exports={name:"AttributeSelector",structure:{name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]},parse:function(){var e,t=this.scanner.tokenStart,n=null,r=null,o=null;return this.eat(a),this.scanner.skipSC(),e=c.call(this),this.scanner.skipSC(),this.scanner.tokenType!==l&&(this.scanner.tokenType!==i&&(n=u.call(this),this.scanner.skipSC(),r=this.scanner.tokenType===s?this.String():this.Identifier(),this.scanner.skipSC()),this.scanner.tokenType===i&&(o=this.scanner.getTokenValue(),this.scanner.next(),this.scanner.skipSC())),this.eat(l),{type:"AttributeSelector",loc:this.getLocation(t,this.scanner.tokenStart),name:e,matcher:n,value:r,flags:o}},generate:function(e){var t=" ";this.chunk("["),this.node(e.name),null!==e.matcher&&(this.chunk(e.matcher),null!==e.value&&(this.node(e.value),"String"===e.value.type&&(t=""))),null!==e.flags&&(this.chunk(t),this.chunk(e.flags)),this.chunk("]")}}},function(e,t,n){var r=n(0).TYPE,i=n(17).mode,s=r.WhiteSpace,o=r.Comment,a=r.Semicolon,l=r.AtKeyword,c=r.LeftCurlyBracket,u=r.RightCurlyBracket;function d(e){return this.Raw(e,null,!0)}function h(){return this.parseWithFallback(this.Rule,d)}function p(e){return this.Raw(e,i.semicolonIncluded,!0)}function m(){if(this.scanner.tokenType===a)return p.call(this,this.scanner.tokenIndex);var e=this.parseWithFallback(this.Declaration,p);return this.scanner.tokenType===a&&this.scanner.next(),e}e.exports={name:"Block",structure:{children:[["Atrule","Rule","Declaration"]]},parse:function(e){var t=e?m:h,n=this.scanner.tokenStart,r=this.createList();this.eat(c);e:for(;!this.scanner.eof;)switch(this.scanner.tokenType){case u:break e;case s:case o:this.scanner.next();break;case l:r.push(this.parseWithFallback(this.Atrule,d));break;default:r.push(t.call(this))}return this.scanner.eof||this.eat(u),{type:"Block",loc:this.getLocation(n,this.scanner.tokenStart),children:r}},generate:function(e){this.chunk("{"),this.children(e,(function(e){"Declaration"===e.type&&this.chunk(";")})),this.chunk("}")},walkContext:"block"}},function(e,t,n){var r=n(0).TYPE,i=r.LeftSquareBracket,s=r.RightSquareBracket;e.exports={name:"Brackets",structure:{children:[[]]},parse:function(e,t){var n,r=this.scanner.tokenStart;return this.eat(i),n=e.call(this,t),this.scanner.eof||this.eat(s),{type:"Brackets",loc:this.getLocation(r,this.scanner.tokenStart),children:n}},generate:function(e){this.chunk("["),this.children(e),this.chunk("]")}}},function(e,t,n){var r=n(0).TYPE.CDC;e.exports={name:"CDC",structure:[],parse:function(){var e=this.scanner.tokenStart;return this.eat(r),{type:"CDC",loc:this.getLocation(e,this.scanner.tokenStart)}},generate:function(){this.chunk("--\x3e")}}},function(e,t,n){var r=n(0).TYPE.CDO;e.exports={name:"CDO",structure:[],parse:function(){var e=this.scanner.tokenStart;return this.eat(r),{type:"CDO",loc:this.getLocation(e,this.scanner.tokenStart)}},generate:function(){this.chunk("\x3c!--")}}},function(e,t,n){var r=n(0).TYPE.Ident;e.exports={name:"ClassSelector",structure:{name:String},parse:function(){return this.scanner.isDelim(46)||this.error("Full stop is expected"),this.scanner.next(),{type:"ClassSelector",loc:this.getLocation(this.scanner.tokenStart-1,this.scanner.tokenEnd),name:this.consume(r)}},generate:function(e){this.chunk("."),this.chunk(e.name)}}},function(e,t,n){var r=n(0).TYPE.Ident;e.exports={name:"Combinator",structure:{name:String},parse:function(){var e=this.scanner.tokenStart;switch(this.scanner.source.charCodeAt(this.scanner.tokenStart)){case 62:case 43:case 126:this.scanner.next();break;case 47:this.scanner.next(),this.scanner.tokenType===r&&!1!==this.scanner.lookupValue(0,"deep")||this.error("Identifier `deep` is expected"),this.scanner.next(),this.scanner.isDelim(47)||this.error("Solidus is expected"),this.scanner.next();break;default:this.error("Combinator is expected")}return{type:"Combinator",loc:this.getLocation(e,this.scanner.tokenStart),name:this.scanner.substrToCursor(e)}},generate:function(e){this.chunk(e.name)}}},function(e,t,n){var r=n(0).TYPE.Comment;e.exports={name:"Comment",structure:{value:String},parse:function(){var e=this.scanner.tokenStart,t=this.scanner.tokenEnd;return this.eat(r),t-e+2>=2&&42===this.scanner.source.charCodeAt(t-2)&&47===this.scanner.source.charCodeAt(t-1)&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.source.substring(e+2,t)}},generate:function(e){this.chunk("/*"),this.chunk(e.value),this.chunk("*/")}}},function(e,t,n){var r=n(57).isCustomProperty,i=n(0).TYPE,s=n(17).mode,o=i.Ident,a=i.Hash,l=i.Colon,c=i.Semicolon,u=i.Delim,d=i.WhiteSpace;function h(e){return this.Raw(e,s.exclamationMarkOrSemicolon,!0)}function p(e){return this.Raw(e,s.exclamationMarkOrSemicolon,!1)}function m(){var e=this.scanner.tokenIndex,t=this.Value();return"Raw"!==t.type&&!1===this.scanner.eof&&this.scanner.tokenType!==c&&!1===this.scanner.isDelim(33)&&!1===this.scanner.isBalanceEdge(e)&&this.error(),t}function f(){var e=this.scanner.tokenStart;if(this.scanner.tokenType===u)switch(this.scanner.source.charCodeAt(this.scanner.tokenStart)){case 42:case 36:case 43:case 35:case 38:this.scanner.next();break;case 47:this.scanner.next(),this.scanner.isDelim(47)&&this.scanner.next()}return this.scanner.tokenType===a?this.eat(a):this.eat(o),this.scanner.substrToCursor(e)}function g(){this.eat(u),this.scanner.skipSC();var e=this.consume(o);return"important"===e||e}e.exports={name:"Declaration",structure:{important:[Boolean,String],property:String,value:["Value","Raw"]},parse:function(){var e,t=this.scanner.tokenStart,n=this.scanner.tokenIndex,i=f.call(this),s=r(i),o=s?this.parseCustomProperty:this.parseValue,a=s?p:h,u=!1;this.scanner.skipSC(),this.eat(l);const y=this.scanner.tokenIndex;if(s||this.scanner.skipSC(),e=o?this.parseWithFallback(m,a):a.call(this,this.scanner.tokenIndex),s&&"Value"===e.type&&e.children.isEmpty())for(let t=y-this.scanner.tokenIndex;t<=0;t++)if(this.scanner.lookupType(t)===d){e.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}return this.scanner.isDelim(33)&&(u=g.call(this),this.scanner.skipSC()),!1===this.scanner.eof&&this.scanner.tokenType!==c&&!1===this.scanner.isBalanceEdge(n)&&this.error(),{type:"Declaration",loc:this.getLocation(t,this.scanner.tokenStart),important:u,property:i,value:e}},generate:function(e){this.chunk(e.property),this.chunk(":"),this.node(e.value),e.important&&this.chunk(!0===e.important?"!important":"!"+e.important)},walkContext:"declaration"}},function(e,t,n){var r=n(0).TYPE,i=n(17).mode,s=r.WhiteSpace,o=r.Comment,a=r.Semicolon;function l(e){return this.Raw(e,i.semicolonIncluded,!0)}e.exports={name:"DeclarationList",structure:{children:[["Declaration"]]},parse:function(){for(var e=this.createList();!this.scanner.eof;)switch(this.scanner.tokenType){case s:case o:case a:this.scanner.next();break;default:e.push(this.parseWithFallback(this.Declaration,l))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}},generate:function(e){this.children(e,(function(e){"Declaration"===e.type&&this.chunk(";")}))}}},function(e,t,n){var r=n(26).consumeNumber,i=n(0).TYPE.Dimension;e.exports={name:"Dimension",structure:{value:String,unit:String},parse:function(){var e=this.scanner.tokenStart,t=r(this.scanner.source,e);return this.eat(i),{type:"Dimension",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.source.substring(e,t),unit:this.scanner.source.substring(t,this.scanner.tokenStart)}},generate:function(e){this.chunk(e.value),this.chunk(e.unit)}}},function(e,t,n){var r=n(0).TYPE.RightParenthesis;e.exports={name:"Function",structure:{name:String,children:[[]]},parse:function(e,t){var n,i=this.scanner.tokenStart,s=this.consumeFunctionName(),o=s.toLowerCase();return n=t.hasOwnProperty(o)?t[o].call(this,t):e.call(this,t),this.scanner.eof||this.eat(r),{type:"Function",loc:this.getLocation(i,this.scanner.tokenStart),name:s,children:n}},generate:function(e){this.chunk(e.name),this.chunk("("),this.children(e),this.chunk(")")},walkContext:"function"}},function(e,t,n){var r=n(0).TYPE.Hash;e.exports={name:"Hash",structure:{value:String},parse:function(){var e=this.scanner.tokenStart;return this.eat(r),{type:"Hash",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.substrToCursor(e+1)}},generate:function(e){this.chunk("#"),this.chunk(e.value)}}},function(e,t,n){var r=n(0).TYPE.Ident;e.exports={name:"Identifier",structure:{name:String},parse:function(){return{type:"Identifier",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),name:this.consume(r)}},generate:function(e){this.chunk(e.name)}}},function(e,t,n){var r=n(0).TYPE.Hash;e.exports={name:"IdSelector",structure:{name:String},parse:function(){var e=this.scanner.tokenStart;return this.eat(r),{type:"IdSelector",loc:this.getLocation(e,this.scanner.tokenStart),name:this.scanner.substrToCursor(e+1)}},generate:function(e){this.chunk("#"),this.chunk(e.name)}}},function(e,t,n){var r=n(0).TYPE,i=r.Ident,s=r.Number,o=r.Dimension,a=r.LeftParenthesis,l=r.RightParenthesis,c=r.Colon,u=r.Delim;e.exports={name:"MediaFeature",structure:{name:String,value:["Identifier","Number","Dimension","Ratio",null]},parse:function(){var e,t=this.scanner.tokenStart,n=null;if(this.eat(a),this.scanner.skipSC(),e=this.consume(i),this.scanner.skipSC(),this.scanner.tokenType!==l){switch(this.eat(c),this.scanner.skipSC(),this.scanner.tokenType){case s:n=this.lookupNonWSType(1)===u?this.Ratio():this.Number();break;case o:n=this.Dimension();break;case i:n=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.scanner.skipSC()}return this.eat(l),{type:"MediaFeature",loc:this.getLocation(t,this.scanner.tokenStart),name:e,value:n}},generate:function(e){this.chunk("("),this.chunk(e.name),null!==e.value&&(this.chunk(":"),this.node(e.value)),this.chunk(")")}}},function(e,t,n){var r=n(0).TYPE,i=r.WhiteSpace,s=r.Comment,o=r.Ident,a=r.LeftParenthesis;e.exports={name:"MediaQuery",structure:{children:[["Identifier","MediaFeature","WhiteSpace"]]},parse:function(){this.scanner.skipSC();var e=this.createList(),t=null,n=null;e:for(;!this.scanner.eof;){switch(this.scanner.tokenType){case s:this.scanner.next();continue;case i:n=this.WhiteSpace();continue;case o:t=this.Identifier();break;case a:t=this.MediaFeature();break;default:break e}null!==n&&(e.push(n),n=null),e.push(t)}return null===t&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(e),children:e}},generate:function(e){this.children(e)}}},function(e,t,n){var r=n(0).TYPE.Comma;e.exports={name:"MediaQueryList",structure:{children:[["MediaQuery"]]},parse:function(e){var t=this.createList();for(this.scanner.skipSC();!this.scanner.eof&&(t.push(this.MediaQuery(e)),this.scanner.tokenType===r);)this.scanner.next();return{type:"MediaQueryList",loc:this.getLocationFromList(t),children:t}},generate:function(e){this.children(e,(function(){this.chunk(",")}))}}},function(e,t){e.exports={name:"Nth",structure:{nth:["AnPlusB","Identifier"],selector:["SelectorList",null]},parse:function(e){this.scanner.skipSC();var t,n=this.scanner.tokenStart,r=n,i=null;return t=this.scanner.lookupValue(0,"odd")||this.scanner.lookupValue(0,"even")?this.Identifier():this.AnPlusB(),this.scanner.skipSC(),e&&this.scanner.lookupValue(0,"of")?(this.scanner.next(),i=this.SelectorList(),this.needPositions&&(r=this.getLastListNode(i.children).loc.end.offset)):this.needPositions&&(r=t.loc.end.offset),{type:"Nth",loc:this.getLocation(n,r),nth:t,selector:i}},generate:function(e){this.node(e.nth),null!==e.selector&&(this.chunk(" of "),this.node(e.selector))}}},function(e,t,n){var r=n(0).TYPE.Number;e.exports={name:"Number",structure:{value:String},parse:function(){return{type:"Number",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),value:this.consume(r)}},generate:function(e){this.chunk(e.value)}}},function(e,t){e.exports={name:"Operator",structure:{value:String},parse:function(){var e=this.scanner.tokenStart;return this.scanner.next(),{type:"Operator",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.substrToCursor(e)}},generate:function(e){this.chunk(e.value)}}},function(e,t,n){var r=n(0).TYPE,i=r.LeftParenthesis,s=r.RightParenthesis;e.exports={name:"Parentheses",structure:{children:[[]]},parse:function(e,t){var n,r=this.scanner.tokenStart;return this.eat(i),n=e.call(this,t),this.scanner.eof||this.eat(s),{type:"Parentheses",loc:this.getLocation(r,this.scanner.tokenStart),children:n}},generate:function(e){this.chunk("("),this.children(e),this.chunk(")")}}},function(e,t,n){var r=n(26).consumeNumber,i=n(0).TYPE.Percentage;e.exports={name:"Percentage",structure:{value:String},parse:function(){var e=this.scanner.tokenStart,t=r(this.scanner.source,e);return this.eat(i),{type:"Percentage",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.source.substring(e,t)}},generate:function(e){this.chunk(e.value),this.chunk("%")}}},function(e,t,n){var r=n(0).TYPE,i=r.Ident,s=r.Function,o=r.Colon,a=r.RightParenthesis;e.exports={name:"PseudoClassSelector",structure:{name:String,children:[["Raw"],null]},parse:function(){var e,t,n=this.scanner.tokenStart,r=null;return this.eat(o),this.scanner.tokenType===s?(t=(e=this.consumeFunctionName()).toLowerCase(),this.pseudo.hasOwnProperty(t)?(this.scanner.skipSC(),r=this.pseudo[t].call(this),this.scanner.skipSC()):(r=this.createList()).push(this.Raw(this.scanner.tokenIndex,null,!1)),this.eat(a)):e=this.consume(i),{type:"PseudoClassSelector",loc:this.getLocation(n,this.scanner.tokenStart),name:e,children:r}},generate:function(e){this.chunk(":"),this.chunk(e.name),null!==e.children&&(this.chunk("("),this.children(e),this.chunk(")"))},walkContext:"function"}},function(e,t,n){var r=n(0).TYPE,i=r.Ident,s=r.Function,o=r.Colon,a=r.RightParenthesis;e.exports={name:"PseudoElementSelector",structure:{name:String,children:[["Raw"],null]},parse:function(){var e,t,n=this.scanner.tokenStart,r=null;return this.eat(o),this.eat(o),this.scanner.tokenType===s?(t=(e=this.consumeFunctionName()).toLowerCase(),this.pseudo.hasOwnProperty(t)?(this.scanner.skipSC(),r=this.pseudo[t].call(this),this.scanner.skipSC()):(r=this.createList()).push(this.Raw(this.scanner.tokenIndex,null,!1)),this.eat(a)):e=this.consume(i),{type:"PseudoElementSelector",loc:this.getLocation(n,this.scanner.tokenStart),name:e,children:r}},generate:function(e){this.chunk("::"),this.chunk(e.name),null!==e.children&&(this.chunk("("),this.children(e),this.chunk(")"))},walkContext:"function"}},function(e,t,n){var r=n(0).isDigit,i=n(0).TYPE,s=i.Number,o=i.Delim;function a(){this.scanner.skipWS();for(var e=this.consume(s),t=0;t<e.length;t++){var n=e.charCodeAt(t);r(n)||46===n||this.error("Unsigned number is expected",this.scanner.tokenStart-e.length+t)}return 0===Number(e)&&this.error("Zero number is not allowed",this.scanner.tokenStart-e.length),e}e.exports={name:"Ratio",structure:{left:String,right:String},parse:function(){var e,t=this.scanner.tokenStart,n=a.call(this);return this.scanner.skipWS(),this.scanner.isDelim(47)||this.error("Solidus is expected"),this.eat(o),e=a.call(this),{type:"Ratio",loc:this.getLocation(t,this.scanner.tokenStart),left:n,right:e}},generate:function(e){this.chunk(e.left),this.chunk("/"),this.chunk(e.right)}}},function(e,t,n){var r=n(0).TYPE,i=n(17).mode,s=r.LeftCurlyBracket;function o(e){return this.Raw(e,i.leftCurlyBracket,!0)}function a(){var e=this.SelectorList();return"Raw"!==e.type&&!1===this.scanner.eof&&this.scanner.tokenType!==s&&this.error(),e}e.exports={name:"Rule",structure:{prelude:["SelectorList","Raw"],block:["Block"]},parse:function(){var e,t,n=this.scanner.tokenIndex,r=this.scanner.tokenStart;return e=this.parseRulePrelude?this.parseWithFallback(a,o):o.call(this,n),t=this.Block(!0),{type:"Rule",loc:this.getLocation(r,this.scanner.tokenStart),prelude:e,block:t}},generate:function(e){this.node(e.prelude),this.node(e.block)},walkContext:"rule"}},function(e,t){e.exports={name:"Selector",structure:{children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]},parse:function(){var e=this.readSequence(this.scope.Selector);return null===this.getFirstListNode(e)&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}},generate:function(e){this.children(e)}}},function(e,t,n){var r=n(0).TYPE.Comma;e.exports={name:"SelectorList",structure:{children:[["Selector","Raw"]]},parse:function(){for(var e=this.createList();!this.scanner.eof&&(e.push(this.Selector()),this.scanner.tokenType===r);)this.scanner.next();return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}},generate:function(e){this.children(e,(function(){this.chunk(",")}))},walkContext:"selector"}},function(e,t,n){var r=n(0).TYPE.String;e.exports={name:"String",structure:{value:String},parse:function(){return{type:"String",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),value:this.consume(r)}},generate:function(e){this.chunk(e.value)}}},function(e,t,n){var r=n(0).TYPE,i=r.WhiteSpace,s=r.Comment,o=r.AtKeyword,a=r.CDO,l=r.CDC;function c(e){return this.Raw(e,null,!1)}e.exports={name:"StyleSheet",structure:{children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]},parse:function(){for(var e,t=this.scanner.tokenStart,n=this.createList();!this.scanner.eof;){switch(this.scanner.tokenType){case i:this.scanner.next();continue;case s:if(33!==this.scanner.source.charCodeAt(this.scanner.tokenStart+2)){this.scanner.next();continue}e=this.Comment();break;case a:e=this.CDO();break;case l:e=this.CDC();break;case o:e=this.parseWithFallback(this.Atrule,c);break;default:e=this.parseWithFallback(this.Rule,c)}n.push(e)}return{type:"StyleSheet",loc:this.getLocation(t,this.scanner.tokenStart),children:n}},generate:function(e){this.children(e)},walkContext:"stylesheet"}},function(e,t,n){var r=n(0).TYPE.Ident;function i(){this.scanner.tokenType!==r&&!1===this.scanner.isDelim(42)&&this.error("Identifier or asterisk is expected"),this.scanner.next()}e.exports={name:"TypeSelector",structure:{name:String},parse:function(){var e=this.scanner.tokenStart;return this.scanner.isDelim(124)?(this.scanner.next(),i.call(this)):(i.call(this),this.scanner.isDelim(124)&&(this.scanner.next(),i.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.scanner.tokenStart),name:this.scanner.substrToCursor(e)}},generate:function(e){this.chunk(e.name)}}},function(e,t,n){var r=n(0).isHexDigit,i=n(0).cmpChar,s=n(0).TYPE,o=n(0).NAME,a=s.Ident,l=s.Number,c=s.Dimension,u=45,d=63;function h(e,t){for(var n=this.scanner.tokenStart+e,i=0;n<this.scanner.tokenEnd;n++){var s=this.scanner.source.charCodeAt(n);if(s===u&&t&&0!==i)return 0===h.call(this,e+i+1,!1)&&this.error(),-1;r(s)||this.error(t&&0!==i?"HyphenMinus"+(i<6?" or hex digit":"")+" is expected":i<6?"Hex digit is expected":"Unexpected input",n),++i>6&&this.error("Too many hex digits",n)}return this.scanner.next(),i}function p(e){for(var t=0;this.scanner.isDelim(d);)++t>e&&this.error("Too many question marks"),this.scanner.next()}function m(e){this.scanner.source.charCodeAt(this.scanner.tokenStart)!==e&&this.error(o[e]+" is expected")}function f(){var e=0;return this.scanner.isDelim(43)?(this.scanner.next(),this.scanner.tokenType===a?void((e=h.call(this,0,!0))>0&&p.call(this,6-e)):this.scanner.isDelim(d)?(this.scanner.next(),void p.call(this,5)):void this.error("Hex digit or question mark is expected")):this.scanner.tokenType===l?(m.call(this,43),e=h.call(this,1,!0),this.scanner.isDelim(d)?void p.call(this,6-e):this.scanner.tokenType===c||this.scanner.tokenType===l?(m.call(this,u),void h.call(this,1,!1)):void 0):this.scanner.tokenType===c?(m.call(this,43),void((e=h.call(this,1,!0))>0&&p.call(this,6-e))):void this.error()}e.exports={name:"UnicodeRange",structure:{value:String},parse:function(){var e=this.scanner.tokenStart;return i(this.scanner.source,e,117)||this.error("U is expected"),i(this.scanner.source,e+1,43)||this.error("Plus sign is expected"),this.scanner.next(),f.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.substrToCursor(e)}},generate:function(e){this.chunk(e.value)}}},function(e,t,n){var r=n(0).isWhiteSpace,i=n(0).cmpStr,s=n(0).TYPE,o=s.Function,a=s.Url,l=s.RightParenthesis;e.exports={name:"Url",structure:{value:["String","Raw"]},parse:function(){var e,t=this.scanner.tokenStart;switch(this.scanner.tokenType){case a:for(var n=t+4,s=this.scanner.tokenEnd-1;n<s&&r(this.scanner.source.charCodeAt(n));)n++;for(;n<s&&r(this.scanner.source.charCodeAt(s-1));)s--;e={type:"Raw",loc:this.getLocation(n,s),value:this.scanner.source.substring(n,s)},this.eat(a);break;case o:i(this.scanner.source,this.scanner.tokenStart,this.scanner.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(o),this.scanner.skipSC(),e=this.String(),this.scanner.skipSC(),this.eat(l);break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(t,this.scanner.tokenStart),value:e}},generate:function(e){this.chunk("url"),this.chunk("("),this.node(e.value),this.chunk(")")}}},function(e,t){e.exports={name:"Value",structure:{children:[[]]},parse:function(){var e=this.scanner.tokenStart,t=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(e,this.scanner.tokenStart),children:t}},generate:function(e){this.children(e)}}},function(e,t,n){var r=n(0).TYPE.WhiteSpace,i=Object.freeze({type:"WhiteSpace",loc:null,value:" "});e.exports={name:"WhiteSpace",structure:{value:String},parse:function(){return this.eat(r),i},generate:function(e){this.chunk(e.value)}}},function(e,t,n){e.exports={parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude:function(e){return this.AtrulePrelude(e.atrule?String(e.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",rule:"Rule",selectorList:"SelectorList",selector:"Selector",block:function(){return this.Block(!0)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},scope:n(342),atrule:n(348),pseudo:n(354),node:n(60)}},function(e,t,n){e.exports={AtrulePrelude:n(343),Selector:n(344),Value:n(345)}},function(e,t,n){e.exports={getNode:n(97)}},function(e,t,n){var r=n(0).TYPE,i=r.Delim,s=r.Ident,o=r.Dimension,a=r.Percentage,l=r.Number,c=r.Hash,u=r.Colon,d=r.LeftSquareBracket;e.exports={getNode:function(e){switch(this.scanner.tokenType){case d:return this.AttributeSelector();case c:return this.IdSelector();case u:return this.scanner.lookupType(1)===u?this.PseudoElementSelector():this.PseudoClassSelector();case s:return this.TypeSelector();case l:case a:return this.Percentage();case o:46===this.scanner.source.charCodeAt(this.scanner.tokenStart)&&this.error("Identifier is expected",this.scanner.tokenStart+1);break;case i:switch(this.scanner.source.charCodeAt(this.scanner.tokenStart)){case 43:case 62:case 126:return e.space=null,e.ignoreWSAfter=!0,this.Combinator();case 47:return this.Combinator();case 46:return this.ClassSelector();case 42:case 124:return this.TypeSelector();case 35:return this.IdSelector()}}}}},function(e,t,n){e.exports={getNode:n(97),expression:n(346),var:n(347)}},function(e,t){e.exports=function(){return this.createSingleNodeList(this.Raw(this.scanner.tokenIndex,null,!1))}},function(e,t,n){var r=n(0).TYPE,i=n(17).mode,s=r.Comma,o=r.WhiteSpace;e.exports=function(){var e=this.createList();if(this.scanner.skipSC(),e.push(this.Identifier()),this.scanner.skipSC(),this.scanner.tokenType===s){e.push(this.Operator());const t=this.scanner.tokenIndex,n=this.parseCustomProperty?this.Value(null):this.Raw(this.scanner.tokenIndex,i.exclamationMarkOrSemicolon,!1);if("Value"===n.type&&n.children.isEmpty())for(let e=t-this.scanner.tokenIndex;e<=0;e++)if(this.scanner.lookupType(e)===o){n.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}e.push(n)}return e}},function(e,t,n){e.exports={"font-face":n(349),import:n(350),media:n(351),page:n(352),supports:n(353)}},function(e,t){e.exports={parse:{prelude:null,block:function(){return this.Block(!0)}}}},function(e,t,n){var r=n(0).TYPE,i=r.String,s=r.Ident,o=r.Url,a=r.Function,l=r.LeftParenthesis;e.exports={parse:{prelude:function(){var e=this.createList();switch(this.scanner.skipSC(),this.scanner.tokenType){case i:e.push(this.String());break;case o:case a:e.push(this.Url());break;default:this.error("String or url() is expected")}return this.lookupNonWSType(0)!==s&&this.lookupNonWSType(0)!==l||(e.push(this.WhiteSpace()),e.push(this.MediaQueryList())),e},block:null}}},function(e,t){e.exports={parse:{prelude:function(){return this.createSingleNodeList(this.MediaQueryList())},block:function(){return this.Block(!1)}}}},function(e,t){e.exports={parse:{prelude:function(){return this.createSingleNodeList(this.SelectorList())},block:function(){return this.Block(!0)}}}},function(e,t,n){var r=n(0).TYPE,i=r.WhiteSpace,s=r.Comment,o=r.Ident,a=r.Function,l=r.Colon,c=r.LeftParenthesis;function u(){return this.createSingleNodeList(this.Raw(this.scanner.tokenIndex,null,!1))}function d(){return this.scanner.skipSC(),this.scanner.tokenType===o&&this.lookupNonWSType(1)===l?this.createSingleNodeList(this.Declaration()):h.call(this)}function h(){var e,t=this.createList(),n=null;this.scanner.skipSC();e:for(;!this.scanner.eof;){switch(this.scanner.tokenType){case i:n=this.WhiteSpace();continue;case s:this.scanner.next();continue;case a:e=this.Function(u,this.scope.AtrulePrelude);break;case o:e=this.Identifier();break;case c:e=this.Parentheses(d,this.scope.AtrulePrelude);break;default:break e}null!==n&&(t.push(n),n=null),t.push(e)}return t}e.exports={parse:{prelude:function(){var e=h.call(this);return null===this.getFirstListNode(e)&&this.error("Condition is expected"),e},block:function(){return this.Block(!1)}}}},function(e,t,n){e.exports={dir:n(355),has:n(356),lang:n(357),matches:n(358),not:n(359),"nth-child":n(360),"nth-last-child":n(361),"nth-last-of-type":n(362),"nth-of-type":n(363),slotted:n(364)}},function(e,t){e.exports={parse:function(){return this.createSingleNodeList(this.Identifier())}}},function(e,t){e.exports={parse:function(){return this.createSingleNodeList(this.SelectorList())}}},function(e,t){e.exports={parse:function(){return this.createSingleNodeList(this.Identifier())}}},function(e,t,n){e.exports=n(98)},function(e,t,n){e.exports=n(98)},function(e,t,n){e.exports=n(99)},function(e,t,n){e.exports=n(99)},function(e,t,n){e.exports=n(100)},function(e,t,n){e.exports=n(100)},function(e,t){e.exports={parse:function(){return this.createSingleNodeList(this.Selector())}}},function(e,t,n){e.exports={node:n(60)}},function(e){e.exports=JSON.parse('{"name":"css-tree","version":"1.1.3","description":"A tool set for CSS: fast detailed parser (CSS → AST), walker (AST traversal), generator (AST → CSS) and lexer (validation and matching) based on specs and browser implementations","author":"Roman Dvornov <rdvornov@gmail.com> (https://github.com/lahmatiy)","license":"MIT","repository":"csstree/csstree","keywords":["css","ast","tokenizer","parser","walker","lexer","generator","utils","syntax","validation"],"main":"lib/index.js","unpkg":"dist/csstree.min.js","jsdelivr":"dist/csstree.min.js","scripts":{"build":"rollup --config","lint":"eslint data lib scripts test && node scripts/review-syntax-patch --lint && node scripts/update-docs --lint","lint-and-test":"npm run lint && npm test","update:docs":"node scripts/update-docs","review:syntax-patch":"node scripts/review-syntax-patch","test":"mocha --reporter progress","coverage":"nyc npm test","travis":"nyc npm run lint-and-test && npm run coveralls","coveralls":"nyc report --reporter=text-lcov | coveralls","prepublishOnly":"npm run build","hydrogen":"node --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces --redirect-code-traces-to=code.asm --trace_hydrogen_file=code.cfg --print-opt-code bin/parse --stat -o /dev/null"},"dependencies":{"mdn-data":"2.0.14","source-map":"^0.6.1"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-json":"^4.0.2","@rollup/plugin-node-resolve":"^7.1.1","coveralls":"^3.0.9","eslint":"^6.8.0","json-to-ast":"^2.1.0","mocha":"^6.2.3","nyc":"^14.1.1","rollup":"^1.32.1","rollup-plugin-terser":"^5.3.0"},"engines":{"node":">=8.0.0"},"files":["data","dist","lib"]}')},function(e,t){const n=function(e,t,n){const r=n?[e.getTargetById(n)]:e.targets,i=[];for(let e=0;e<r.length;e++){const n=r[e].sprite[t];for(let e=0;e<n.length;e++){const t=n[e],r=t.broken?t.broken.asset:t.asset;r&&i.push({fileName:"".concat(r.assetId,".").concat(r.dataFormat),fileContent:r.data})}}return i};e.exports={serializeSounds:function(e,t){return n(e,"sounds",t)},serializeCostumes:function(e,t){return n(e,"costumes",t)}}},function(e,t){!function(e){"use strict";var t,n=e.Uint8Array,r=e.HTMLCanvasElement,i=r&&r.prototype,s=/\s*;\s*base64\s*(?:;|$)/i,o="toDataURL",a=function(e){for(var r,i,s=e.length,o=new n(s/4*3|0),a=0,l=0,c=[0,0],u=0,d=0;s--;)i=e.charCodeAt(a++),255!==(r=t[i-43])&&undefined!==r&&(c[1]=c[0],c[0]=i,d=d<<6|r,4===++u&&(o[l++]=d>>>16,61!==c[1]&&(o[l++]=d>>>8),61!==c[0]&&(o[l++]=d),u=0));return o};n&&(t=new n([62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,0,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51])),!r||i.toBlob&&i.toBlobHD||(i.toBlob||(i.toBlob=function(e,t){if(t||(t="image/png"),this.mozGetAsFile)e(this.mozGetAsFile("canvas",t));else if(this.msToBlob&&/^\s*image\/png\s*(?:$|;)/i.test(t))e(this.msToBlob());else{var r,i=Array.prototype.slice.call(arguments,1),l=this[o].apply(this,i),c=l.indexOf(","),u=l.substring(c+1),d=s.test(l.substring(0,c));Blob.fake?((r=new Blob).encoding=d?"base64":"URI",r.data=u,r.size=u.length):n&&(r=d?new Blob([a(u)],{type:t}):new Blob([decodeURIComponent(u)],{type:t})),e(r)}}),!i.toBlobHD&&i.toDataURLHD?i.toBlobHD=function(){o="toDataURLHD";var e=this.toBlob();return o="toDataURL",e}:i.toBlobHD=i.toBlob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this)},function(e,t,n){(function(t){var r=n(370);e.exports=function(e,n,i){if("string"==typeof e)return i(null,[e,null]);if(!t.isBuffer(e))try{e=new t(e)}catch(e){return i("Input must be a Buffer or a string.")}var s=e.slice(0,3).join(" "),o=!1,a=!1;return 0===s.indexOf("83 99 114")&&(o=!0),0===s.indexOf("80 75")&&(a=!0),a||o?o?i("Parser only supports Scratch 2.X and above"):void r(e,n,i):i(null,[e.toString("utf-8"),null])}}).call(this,n(18).Buffer)},function(e,t,n){var r=n(22);e.exports=function(e,t,n){var i="Failed to unzip and extract project.json, with error: ";return r.loadAsync(e).then((function(e){const r=t?e.file(/^([^/]*\/)?sprite\.json$/)[0]:e.file(/^([^/]*\/)?project\.json$/)[0];return r?r.async("string").then((function(t){return n(null,[t,e])})):n(i+"missing project or sprite json")})).catch((function(e){return n(i+e)}))}},function(e,t,n){const r=n(72);e.exports=function(e,t){var n;try{n=r.parse(e.replace(/(\\+)(b|u0008)/g,((e,t,n)=>t.length%2?e.replace("\\"+n,""):e)))}catch(e){return t(e.toString())}return t(null,n)}},function(e,t){e.exports=function(e,t,n){if("objName"in t)return t.projectVersion=2,n(null,t);if(e){if("name"in t)return t.projectVersion=3,n(null,t)}else if("targets"in t)return t.projectVersion=3,n(null,t);n(new Error("Could not parse as a valid SB2 or SB3 project."))}},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t){const n="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#%()*+,-./:;=?@[]^_`{|}~",r=e=>{let t="";for(;e>=0;)t=n[e%77]+t,e=Math.floor(e/77)-1;return t};class i{constructor(){this.generatedIds=new Map,this.references=new Map,this.skippedIds=new Set,this.skippedIds.add("of")}skip(e){this.skippedIds.add(e)}addReference(e){const t=this.references.get(e)||0;this.references.set(e,t+1)}generateNewIds(){const e=Array.from(this.references.entries());e.sort(((e,t)=>t[1]-e[1]));let t=0;for(const n of e){const e=n[0];let i=r(t);for(;this.skippedIds.has(i);)t++,i=r(t);this.generatedIds.set(e,i),t++}}getNewId(e){return this.generatedIds.has(e)?this.generatedIds.get(e):e}}e.exports=e=>{const t=new i;for(const n of e.targets){for(const e of Object.keys(n.variables))t.skip(e);for(const e of Object.keys(n.lists))t.skip(e);for(const e of Object.keys(n.broadcasts))t.skip(e);for(const e of Object.keys(n.blocks)){const r=n.blocks[e];if(t.addReference(e),!Array.isArray(r)){r.parent&&t.addReference(r.parent),r.next&&t.addReference(r.next),r.comment&&t.addReference(r.comment);for(const e of Object.values(r.inputs))for(let n=1;n<e.length;n++){const r=e[n];"string"==typeof r&&t.addReference(r)}}}for(const e of Object.keys(n.comments)){const r=n.comments[e];t.addReference(e),r.blockId&&t.addReference(r.blockId)}}t.generateNewIds();for(const n of e.targets){const e={},r={};for(const r of Object.keys(n.blocks)){const i=n.blocks[r];if(e[t.getNewId(r)]=i,!Array.isArray(i)){i.parent&&(i.parent=t.getNewId(i.parent)),i.next&&(i.next=t.getNewId(i.next)),i.comment&&(i.comment=t.getNewId(i.comment));for(const e of Object.values(i.inputs))for(let n=1;n<e.length;n++){const r=e[n];"string"==typeof r&&(e[n]=t.getNewId(r))}}}for(const e of Object.keys(n.comments)){const i=n.comments[e];r[t.getNewId(e)]=i,i.blockId&&(i.blockId=t.getNewId(i.blockId))}n.blocks=e,n.comments=r}}},function(e,t,n){const r=n(10),i={"forward:":{opcode:"motion_movesteps",argMap:[{type:"input",inputOp:"math_number",inputName:"STEPS"}]},"turnRight:":{opcode:"motion_turnright",argMap:[{type:"input",inputOp:"math_number",inputName:"DEGREES"}]},"turnLeft:":{opcode:"motion_turnleft",argMap:[{type:"input",inputOp:"math_number",inputName:"DEGREES"}]},"heading:":{opcode:"motion_pointindirection",argMap:[{type:"input",inputOp:"math_angle",inputName:"DIRECTION"}]},"pointTowards:":{opcode:"motion_pointtowards",argMap:[{type:"input",inputOp:"motion_pointtowards_menu",inputName:"TOWARDS"}]},"gotoX:y:":{opcode:"motion_gotoxy",argMap:[{type:"input",inputOp:"math_number",inputName:"X"},{type:"input",inputOp:"math_number",inputName:"Y"}]},"gotoSpriteOrMouse:":{opcode:"motion_goto",argMap:[{type:"input",inputOp:"motion_goto_menu",inputName:"TO"}]},"glideSecs:toX:y:elapsed:from:":{opcode:"motion_glidesecstoxy",argMap:[{type:"input",inputOp:"math_number",inputName:"SECS"},{type:"input",inputOp:"math_number",inputName:"X"},{type:"input",inputOp:"math_number",inputName:"Y"}]},"changeXposBy:":{opcode:"motion_changexby",argMap:[{type:"input",inputOp:"math_number",inputName:"DX"}]},"xpos:":{opcode:"motion_setx",argMap:[{type:"input",inputOp:"math_number",inputName:"X"}]},"changeYposBy:":{opcode:"motion_changeyby",argMap:[{type:"input",inputOp:"math_number",inputName:"DY"}]},"ypos:":{opcode:"motion_sety",argMap:[{type:"input",inputOp:"math_number",inputName:"Y"}]},bounceOffEdge:{opcode:"motion_ifonedgebounce",argMap:[]},setRotationStyle:{opcode:"motion_setrotationstyle",argMap:[{type:"field",fieldName:"STYLE"}]},xpos:{opcode:"motion_xposition",argMap:[]},ypos:{opcode:"motion_yposition",argMap:[]},heading:{opcode:"motion_direction",argMap:[]},scrollRight:{opcode:"motion_scroll_right",argMap:[{type:"input",inputOp:"math_number",inputName:"DISTANCE"}]},scrollUp:{opcode:"motion_scroll_up",argMap:[{type:"input",inputOp:"math_number",inputName:"DISTANCE"}]},scrollAlign:{opcode:"motion_align_scene",argMap:[{type:"field",fieldName:"ALIGNMENT"}]},xScroll:{opcode:"motion_xscroll",argMap:[]},yScroll:{opcode:"motion_yscroll",argMap:[]},"say:duration:elapsed:from:":{opcode:"looks_sayforsecs",argMap:[{type:"input",inputOp:"text",inputName:"MESSAGE"},{type:"input",inputOp:"math_number",inputName:"SECS"}]},"say:":{opcode:"looks_say",argMap:[{type:"input",inputOp:"text",inputName:"MESSAGE"}]},"think:duration:elapsed:from:":{opcode:"looks_thinkforsecs",argMap:[{type:"input",inputOp:"text",inputName:"MESSAGE"},{type:"input",inputOp:"math_number",inputName:"SECS"}]},"think:":{opcode:"looks_think",argMap:[{type:"input",inputOp:"text",inputName:"MESSAGE"}]},show:{opcode:"looks_show",argMap:[]},hide:{opcode:"looks_hide",argMap:[]},hideAll:{opcode:"looks_hideallsprites",argMap:[]},"lookLike:":{opcode:"looks_switchcostumeto",argMap:[{type:"input",inputOp:"looks_costume",inputName:"COSTUME"}]},nextCostume:{opcode:"looks_nextcostume",argMap:[]},startScene:{opcode:"looks_switchbackdropto",argMap:[{type:"input",inputOp:"looks_backdrops",inputName:"BACKDROP"}]},"changeGraphicEffect:by:":{opcode:"looks_changeeffectby",argMap:[{type:"field",fieldName:"EFFECT"},{type:"input",inputOp:"math_number",inputName:"CHANGE"}]},"setGraphicEffect:to:":{opcode:"looks_seteffectto",argMap:[{type:"field",fieldName:"EFFECT"},{type:"input",inputOp:"math_number",inputName:"VALUE"}]},filterReset:{opcode:"looks_cleargraphiceffects",argMap:[]},"changeSizeBy:":{opcode:"looks_changesizeby",argMap:[{type:"input",inputOp:"math_number",inputName:"CHANGE"}]},"setSizeTo:":{opcode:"looks_setsizeto",argMap:[{type:"input",inputOp:"math_number",inputName:"SIZE"}]},"changeStretchBy:":{opcode:"looks_changestretchby",argMap:[{type:"input",inputOp:"math_number",inputName:"CHANGE"}]},"setStretchTo:":{opcode:"looks_setstretchto",argMap:[{type:"input",inputOp:"math_number",inputName:"STRETCH"}]},comeToFront:{opcode:"looks_gotofrontback",argMap:[]},"goBackByLayers:":{opcode:"looks_goforwardbackwardlayers",argMap:[{type:"input",inputOp:"math_integer",inputName:"NUM"}]},costumeIndex:{opcode:"looks_costumenumbername",argMap:[]},costumeName:{opcode:"looks_costumenumbername",argMap:[]},sceneName:{opcode:"looks_backdropnumbername",argMap:[]},scale:{opcode:"looks_size",argMap:[]},startSceneAndWait:{opcode:"looks_switchbackdroptoandwait",argMap:[{type:"input",inputOp:"looks_backdrops",inputName:"BACKDROP"}]},nextScene:{opcode:"looks_nextbackdrop",argMap:[]},backgroundIndex:{opcode:"looks_backdropnumbername",argMap:[]},"playSound:":{opcode:"sound_play",argMap:[{type:"input",inputOp:"sound_sounds_menu",inputName:"SOUND_MENU"}]},doPlaySoundAndWait:{opcode:"sound_playuntildone",argMap:[{type:"input",inputOp:"sound_sounds_menu",inputName:"SOUND_MENU"}]},stopAllSounds:{opcode:"sound_stopallsounds",argMap:[]},playDrum:{opcode:"music_playDrumForBeats",argMap:[{type:"input",inputOp:"music_menu_DRUM",inputName:"DRUM"},{type:"input",inputOp:"math_number",inputName:"BEATS"}]},"drum:duration:elapsed:from:":{opcode:"music_midiPlayDrumForBeats",argMap:[{type:"input",inputOp:"math_number",inputName:"DRUM"},{type:"input",inputOp:"math_number",inputName:"BEATS"}]},"rest:elapsed:from:":{opcode:"music_restForBeats",argMap:[{type:"input",inputOp:"math_number",inputName:"BEATS"}]},"noteOn:duration:elapsed:from:":{opcode:"music_playNoteForBeats",argMap:[{type:"input",inputOp:"note",inputName:"NOTE"},{type:"input",inputOp:"math_number",inputName:"BEATS"}]},"instrument:":{opcode:"music_setInstrument",argMap:[{type:"input",inputOp:"music_menu_INSTRUMENT",inputName:"INSTRUMENT"}]},"midiInstrument:":{opcode:"music_midiSetInstrument",argMap:[{type:"input",inputOp:"math_number",inputName:"INSTRUMENT"}]},"changeVolumeBy:":{opcode:"sound_changevolumeby",argMap:[{type:"input",inputOp:"math_number",inputName:"VOLUME"}]},"setVolumeTo:":{opcode:"sound_setvolumeto",argMap:[{type:"input",inputOp:"math_number",inputName:"VOLUME"}]},volume:{opcode:"sound_volume",argMap:[]},"changeTempoBy:":{opcode:"music_changeTempo",argMap:[{type:"input",inputOp:"math_number",inputName:"TEMPO"}]},"setTempoTo:":{opcode:"music_setTempo",argMap:[{type:"input",inputOp:"math_number",inputName:"TEMPO"}]},tempo:{opcode:"music_getTempo",argMap:[]},clearPenTrails:{opcode:"pen_clear",argMap:[]},stampCostume:{opcode:"pen_stamp",argMap:[]},putPenDown:{opcode:"pen_penDown",argMap:[]},putPenUp:{opcode:"pen_penUp",argMap:[]},"penColor:":{opcode:"pen_setPenColorToColor",argMap:[{type:"input",inputOp:"colour_picker",inputName:"COLOR"}]},"changePenHueBy:":{opcode:"pen_changePenHueBy",argMap:[{type:"input",inputOp:"math_number",inputName:"HUE"}]},"setPenHueTo:":{opcode:"pen_setPenHueToNumber",argMap:[{type:"input",inputOp:"math_number",inputName:"HUE"}]},"changePenShadeBy:":{opcode:"pen_changePenShadeBy",argMap:[{type:"input",inputOp:"math_number",inputName:"SHADE"}]},"setPenShadeTo:":{opcode:"pen_setPenShadeToNumber",argMap:[{type:"input",inputOp:"math_number",inputName:"SHADE"}]},"changePenSizeBy:":{opcode:"pen_changePenSizeBy",argMap:[{type:"input",inputOp:"math_number",inputName:"SIZE"}]},"penSize:":{opcode:"pen_setPenSizeTo",argMap:[{type:"input",inputOp:"math_number",inputName:"SIZE"}]},senseVideoMotion:{opcode:"videoSensing_videoOn",argMap:[{type:"input",inputOp:"videoSensing_menu_ATTRIBUTE",inputName:"ATTRIBUTE"},{type:"input",inputOp:"videoSensing_menu_SUBJECT",inputName:"SUBJECT"}]},whenGreenFlag:{opcode:"event_whenflagclicked",argMap:[]},whenKeyPressed:{opcode:"event_whenkeypressed",argMap:[{type:"field",fieldName:"KEY_OPTION"}]},whenClicked:{opcode:"event_whenthisspriteclicked",argMap:[]},whenSceneStarts:{opcode:"event_whenbackdropswitchesto",argMap:[{type:"field",fieldName:"BACKDROP"}]},whenSensorGreaterThan:e=>{let[,t]=e;return"video motion"===t?{opcode:"videoSensing_whenMotionGreaterThan",argMap:[{},{type:"input",inputOp:"math_number",inputName:"REFERENCE"}]}:{opcode:"event_whengreaterthan",argMap:[{type:"field",fieldName:"WHENGREATERTHANMENU"},{type:"input",inputOp:"math_number",inputName:"VALUE"}]}},whenIReceive:{opcode:"event_whenbroadcastreceived",argMap:[{type:"field",fieldName:"BROADCAST_OPTION",variableType:r.BROADCAST_MESSAGE_TYPE}]},"broadcast:":{opcode:"event_broadcast",argMap:[{type:"input",inputOp:"event_broadcast_menu",inputName:"BROADCAST_INPUT",variableType:r.BROADCAST_MESSAGE_TYPE}]},doBroadcastAndWait:{opcode:"event_broadcastandwait",argMap:[{type:"input",inputOp:"event_broadcast_menu",inputName:"BROADCAST_INPUT",variableType:r.BROADCAST_MESSAGE_TYPE}]},"wait:elapsed:from:":{opcode:"control_wait",argMap:[{type:"input",inputOp:"math_positive_number",inputName:"DURATION"}]},doRepeat:{opcode:"control_repeat",argMap:[{type:"input",inputOp:"math_whole_number",inputName:"TIMES"},{type:"input",inputOp:"substack",inputName:"SUBSTACK"}]},doForever:{opcode:"control_forever",argMap:[{type:"input",inputOp:"substack",inputName:"SUBSTACK"}]},doIf:{opcode:"control_if",argMap:[{type:"input",inputOp:"boolean",inputName:"CONDITION"},{type:"input",inputOp:"substack",inputName:"SUBSTACK"}]},doIfElse:{opcode:"control_if_else",argMap:[{type:"input",inputOp:"boolean",inputName:"CONDITION"},{type:"input",inputOp:"substack",inputName:"SUBSTACK"},{type:"input",inputOp:"substack",inputName:"SUBSTACK2"}]},doWaitUntil:{opcode:"control_wait_until",argMap:[{type:"input",inputOp:"boolean",inputName:"CONDITION"}]},doUntil:{opcode:"control_repeat_until",argMap:[{type:"input",inputOp:"boolean",inputName:"CONDITION"},{type:"input",inputOp:"substack",inputName:"SUBSTACK"}]},doWhile:{opcode:"control_while",argMap:[{type:"input",inputOp:"boolean",inputName:"CONDITION"},{type:"input",inputOp:"substack",inputName:"SUBSTACK"}]},doForLoop:{opcode:"control_for_each",argMap:[{type:"field",fieldName:"VARIABLE"},{type:"input",inputOp:"text",inputName:"VALUE"},{type:"input",inputOp:"substack",inputName:"SUBSTACK"}]},stopScripts:{opcode:"control_stop",argMap:[{type:"field",fieldName:"STOP_OPTION"}]},whenCloned:{opcode:"control_start_as_clone",argMap:[]},createCloneOf:{opcode:"control_create_clone_of",argMap:[{type:"input",inputOp:"control_create_clone_of_menu",inputName:"CLONE_OPTION"}]},deleteClone:{opcode:"control_delete_this_clone",argMap:[]},COUNT:{opcode:"control_get_counter",argMap:[]},INCR_COUNT:{opcode:"control_incr_counter",argMap:[]},CLR_COUNT:{opcode:"control_clear_counter",argMap:[]},warpSpeed:{opcode:"control_all_at_once",argMap:[{type:"input",inputOp:"substack",inputName:"SUBSTACK"}]},"touching:":{opcode:"sensing_touchingobject",argMap:[{type:"input",inputOp:"sensing_touchingobjectmenu",inputName:"TOUCHINGOBJECTMENU"}]},"touchingColor:":{opcode:"sensing_touchingcolor",argMap:[{type:"input",inputOp:"colour_picker",inputName:"COLOR"}]},"color:sees:":{opcode:"sensing_coloristouchingcolor",argMap:[{type:"input",inputOp:"colour_picker",inputName:"COLOR"},{type:"input",inputOp:"colour_picker",inputName:"COLOR2"}]},"distanceTo:":{opcode:"sensing_distanceto",argMap:[{type:"input",inputOp:"sensing_distancetomenu",inputName:"DISTANCETOMENU"}]},doAsk:{opcode:"sensing_askandwait",argMap:[{type:"input",inputOp:"text",inputName:"QUESTION"}]},answer:{opcode:"sensing_answer",argMap:[]},"keyPressed:":{opcode:"sensing_keypressed",argMap:[{type:"input",inputOp:"sensing_keyoptions",inputName:"KEY_OPTION"}]},mousePressed:{opcode:"sensing_mousedown",argMap:[]},mouseX:{opcode:"sensing_mousex",argMap:[]},mouseY:{opcode:"sensing_mousey",argMap:[]},soundLevel:{opcode:"sensing_loudness",argMap:[]},isLoud:{opcode:"sensing_loud",argMap:[]},setVideoState:{opcode:"videoSensing_videoToggle",argMap:[{type:"input",inputOp:"videoSensing_menu_VIDEO_STATE",inputName:"VIDEO_STATE"}]},setVideoTransparency:{opcode:"videoSensing_setVideoTransparency",argMap:[{type:"input",inputOp:"math_number",inputName:"TRANSPARENCY"}]},timer:{opcode:"sensing_timer",argMap:[]},timerReset:{opcode:"sensing_resettimer",argMap:[]},"getAttribute:of:":{opcode:"sensing_of",argMap:[{type:"field",fieldName:"PROPERTY"},{type:"input",inputOp:"sensing_of_object_menu",inputName:"OBJECT"}]},timeAndDate:{opcode:"sensing_current",argMap:[{type:"field",fieldName:"CURRENTMENU"}]},timestamp:{opcode:"sensing_dayssince2000",argMap:[]},getUserName:{opcode:"sensing_username",argMap:[]},getUserId:{opcode:"sensing_userid",argMap:[]},"+":{opcode:"operator_add",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},"-":{opcode:"operator_subtract",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},"*":{opcode:"operator_multiply",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},"/":{opcode:"operator_divide",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},"randomFrom:to:":{opcode:"operator_random",argMap:[{type:"input",inputOp:"math_number",inputName:"FROM"},{type:"input",inputOp:"math_number",inputName:"TO"}]},"<":{opcode:"operator_lt",argMap:[{type:"input",inputOp:"text",inputName:"OPERAND1"},{type:"input",inputOp:"text",inputName:"OPERAND2"}]},"=":{opcode:"operator_equals",argMap:[{type:"input",inputOp:"text",inputName:"OPERAND1"},{type:"input",inputOp:"text",inputName:"OPERAND2"}]},">":{opcode:"operator_gt",argMap:[{type:"input",inputOp:"text",inputName:"OPERAND1"},{type:"input",inputOp:"text",inputName:"OPERAND2"}]},"&":{opcode:"operator_and",argMap:[{type:"input",inputOp:"boolean",inputName:"OPERAND1"},{type:"input",inputOp:"boolean",inputName:"OPERAND2"}]},"|":{opcode:"operator_or",argMap:[{type:"input",inputOp:"boolean",inputName:"OPERAND1"},{type:"input",inputOp:"boolean",inputName:"OPERAND2"}]},not:{opcode:"operator_not",argMap:[{type:"input",inputOp:"boolean",inputName:"OPERAND"}]},"concatenate:with:":{opcode:"operator_join",argMap:[{type:"input",inputOp:"text",inputName:"STRING1"},{type:"input",inputOp:"text",inputName:"STRING2"}]},"letter:of:":{opcode:"operator_letter_of",argMap:[{type:"input",inputOp:"math_whole_number",inputName:"LETTER"},{type:"input",inputOp:"text",inputName:"STRING"}]},"stringLength:":{opcode:"operator_length",argMap:[{type:"input",inputOp:"text",inputName:"STRING"}]},"%":{opcode:"operator_mod",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},rounded:{opcode:"operator_round",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM"}]},"computeFunction:of:":{opcode:"operator_mathop",argMap:[{type:"field",fieldName:"OPERATOR"},{type:"input",inputOp:"math_number",inputName:"NUM"}]},readVariable:{opcode:"data_variable",argMap:[{type:"field",fieldName:"VARIABLE",variableType:r.SCALAR_TYPE}]},"getVar:":{opcode:"data_variable",argMap:[{type:"field",fieldName:"VARIABLE",variableType:r.SCALAR_TYPE}]},"setVar:to:":{opcode:"data_setvariableto",argMap:[{type:"field",fieldName:"VARIABLE",variableType:r.SCALAR_TYPE},{type:"input",inputOp:"text",inputName:"VALUE"}]},"changeVar:by:":{opcode:"data_changevariableby",argMap:[{type:"field",fieldName:"VARIABLE",variableType:r.SCALAR_TYPE},{type:"input",inputOp:"math_number",inputName:"VALUE"}]},"showVariable:":{opcode:"data_showvariable",argMap:[{type:"field",fieldName:"VARIABLE",variableType:r.SCALAR_TYPE}]},"hideVariable:":{opcode:"data_hidevariable",argMap:[{type:"field",fieldName:"VARIABLE",variableType:r.SCALAR_TYPE}]},"contentsOfList:":{opcode:"data_listcontents",argMap:[{type:"field",fieldName:"LIST",variableType:r.LIST_TYPE}]},"append:toList:":{opcode:"data_addtolist",argMap:[{type:"input",inputOp:"text",inputName:"ITEM"},{type:"field",fieldName:"LIST",variableType:r.LIST_TYPE}]},"deleteLine:ofList:":{opcode:"data_deleteoflist",argMap:[{type:"input",inputOp:"math_integer",inputName:"INDEX"},{type:"field",fieldName:"LIST",variableType:r.LIST_TYPE}]},"insert:at:ofList:":{opcode:"data_insertatlist",argMap:[{type:"input",inputOp:"text",inputName:"ITEM"},{type:"input",inputOp:"math_integer",inputName:"INDEX"},{type:"field",fieldName:"LIST",variableType:r.LIST_TYPE}]},"setLine:ofList:to:":{opcode:"data_replaceitemoflist",argMap:[{type:"input",inputOp:"math_integer",inputName:"INDEX"},{type:"field",fieldName:"LIST",variableType:r.LIST_TYPE},{type:"input",inputOp:"text",inputName:"ITEM"}]},"getLine:ofList:":{opcode:"data_itemoflist",argMap:[{type:"input",inputOp:"math_integer",inputName:"INDEX"},{type:"field",fieldName:"LIST",variableType:r.LIST_TYPE}]},"lineCountOfList:":{opcode:"data_lengthoflist",argMap:[{type:"field",fieldName:"LIST",variableType:r.LIST_TYPE}]},"list:contains:":{opcode:"data_listcontainsitem",argMap:[{type:"field",fieldName:"LIST",variableType:r.LIST_TYPE},{type:"input",inputOp:"text",inputName:"ITEM"}]},"showList:":{opcode:"data_showlist",argMap:[{type:"field",fieldName:"LIST",variableType:r.LIST_TYPE}]},"hideList:":{opcode:"data_hidelist",argMap:[{type:"field",fieldName:"LIST",variableType:r.LIST_TYPE}]},procDef:{opcode:"procedures_definition",argMap:[]},getParam:{opcode:"argument_reporter_string_number",argMap:[{type:"field",fieldName:"VALUE"}]},call:{opcode:"procedures_call",argMap:[]}},s=function(e,t,n){i["".concat(e).concat("").concat(t)]=n,i["".concat(e,".").concat(t)]=n},o="LEGO WeDo 2.0";s(o,"motorOnFor",{opcode:"wedo2_motorOnFor",argMap:[{type:"input",inputOp:"wedo2_menu_MOTOR_ID",inputName:"MOTOR_ID"},{type:"input",inputOp:"math_number",inputName:"DURATION"}]}),s(o,"motorOn",{opcode:"wedo2_motorOn",argMap:[{type:"input",inputOp:"wedo2_menu_MOTOR_ID",inputName:"MOTOR_ID"}]}),s(o,"motorOff",{opcode:"wedo2_motorOff",argMap:[{type:"input",inputOp:"wedo2_menu_MOTOR_ID",inputName:"MOTOR_ID"}]}),s(o,"startMotorPower",{opcode:"wedo2_startMotorPower",argMap:[{type:"input",inputOp:"wedo2_menu_MOTOR_ID",inputName:"MOTOR_ID"},{type:"input",inputOp:"math_number",inputName:"POWER"}]}),s(o,"setMotorDirection",{opcode:"wedo2_setMotorDirection",argMap:[{type:"input",inputOp:"wedo2_menu_MOTOR_ID",inputName:"MOTOR_ID"},{type:"input",inputOp:"wedo2_menu_MOTOR_DIRECTION",inputName:"MOTOR_DIRECTION"}]}),s(o,"setLED",{opcode:"wedo2_setLightHue",argMap:[{type:"input",inputOp:"math_number",inputName:"HUE"}]}),s(o,"playNote",{opcode:"wedo2_playNoteFor",argMap:[{type:"input",inputOp:"math_number",inputName:"NOTE"},{type:"input",inputOp:"math_number",inputName:"DURATION"}]}),s(o,"whenDistance",{opcode:"wedo2_whenDistance",argMap:[{type:"input",inputOp:"wedo2_menu_OP",inputName:"OP"},{type:"input",inputOp:"math_number",inputName:"REFERENCE"}]}),s(o,"whenTilted",{opcode:"wedo2_whenTilted",argMap:[{type:"input",inputOp:"wedo2_menu_TILT_DIRECTION_ANY",inputName:"TILT_DIRECTION_ANY"}]}),s(o,"getDistance",{opcode:"wedo2_getDistance",argMap:[]}),s(o,"isTilted",{opcode:"wedo2_isTilted",argMap:[{type:"input",inputOp:"wedo2_menu_TILT_DIRECTION_ANY",inputName:"TILT_DIRECTION_ANY"}]}),s(o,"getTilt",{opcode:"wedo2_getTiltAngle",argMap:[{type:"input",inputOp:"wedo2_menu_TILT_DIRECTION",inputName:"TILT_DIRECTION"}]}),e.exports=i},function(e,t){const n=new Map;n.set("text","https://extensions.turbowarp.org/lab/text.js"),n.set("audiostr","https://extensions.turbowarp.org/turboloader/audiostream.js"),e.exports=n},function(e,t,n){const r=n(19),i=n(378),s=n(11),o=n(28),a=n(384),l=n(385),c=n(107),u=n(389),d=n(38),h=n(29),p=n(390),m=n(391),f=n(108),g=n(110),y=n(109),b=s.v3.create(),v=new c,S=new c,w=new Uint8ClampedArray(4),k=new Uint8ClampedArray(4),T=[3,3],x=(e,t,n)=>(248&e[0])==(248&t[n+0])&&(248&e[1])==(248&t[n+1])&&(240&e[2])==(240&t[n+2]);let E;let A;class C extends r{static isSupported(e){try{e=e||document.createElement("canvas");const t={alpha:!1,stencil:!0,antialias:!1};return!!(e.getContext("webgl",t)||e.getContext("experimental-webgl",t)||e.getContext("webgl2",t))}catch(e){return!1}}static _getContext(e){const t={alpha:!1,stencil:!0,antialias:!1,powerPreference:C.powerPreference};return s.getWebGLContext(e,t)||s.getContext(e,t)}constructor(e,t,r,i,f){super();const y=this._gl=C._getContext(e);if(!y)throw new Error("Could not get WebGL context: this browser or environment may not support WebGL.");this._useGpuMode=C.UseGpuModes.Automatic,this._allDrawables=[],this._allSkins=[],this._drawList=[],this._groupOrdering=[],this._layerGroups={},this._nextDrawableId=d.ID_NONE+1,this._nextSkinId=d.ID_NONE+1,this._projection=s.m4.identity(),this._shaderManager=new h(y),this._regionId=null,this._exitRegion=null,this._backgroundDrawRegionId={enter:()=>this._enterDrawBackground(),exit:()=>this._exitDrawBackground()},this._snapshotCallbacks=[],this._backgroundColor4f=[0,0,0,1],this._backgroundColor3b=new Uint8ClampedArray(3),this._penSkinId=null,this.useHighQualityRender=!1,this.offscreenTouching=!1,this.dirty=!0,this.overlayContainer=document.createElement("div"),this.overlayContainer.className="scratch-render-overlays",this._overlays=[],A||(A=document.createElement("style"),A.textContent=n(400),A.className="scratch-render-styles",document.head.appendChild(A)),this._createGeometry(),this.on(d.Events.NativeSizeChanged,this.onNativeSizeChanged),this.setBackgroundColor(1,1,1),this.setStageSize(t||-240,r||240,i||-180,f||180),this.resize(this._nativeSize[0],this._nativeSize[1]),y.disable(y.DEPTH_TEST),y.enable(y.BLEND),y.blendFunc(y.ONE,y.ONE_MINUS_SRC_ALPHA),this.allowPrivateSkinAccess=!0,this.maxTextureDimension=2048,this.customFonts={},this._customFontStyles=null,this.exports={twgl:s,Drawable:l,Skin:o,BitmapSkin:a,TextBubbleSkin:m,PenSkin:u,SVGSkin:p,CanvasMeasurementProvider:g,Rectangle:c}}setUseHighQualityRender(e){this.dirty=!0,this.useHighQualityRender=e,this.emit(d.Events.UseHighQualityRenderChanged,e),this._updateRenderQuality()}_updateRenderQuality(){if(null!==this._penSkinId){const e=this._allSkins[this._penSkinId];e&&(this.useHighQualityRender?e.setRenderQuality(this.canvas.width/this._nativeSize[0]):e.setRenderQuality(1))}for(const e of this._allDrawables)e&&e.setHighQuality(this.useHighQualityRender)}setPrivateSkinAccess(e){this.allowPrivateSkinAccess=e,this.emit(d.Events.AllowPrivateSkinAccessChanged,e)}setMaxTextureDimension(e){const t=this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE);this.maxTextureDimension=Math.min(e,t)}get gl(){return this._gl}get canvas(){return this._gl&&this._gl.canvas}resize(e,t){const{canvas:n}=this._gl,r=window.devicePixelRatio||1,i=e*r,s=t*r;n.width===i&&n.height===s||(n.width=i,n.height=s,this._updateRenderQuality(),this._updateOverlays(),this.dirty=!0,this.draw())}setBackgroundColor(e,t,n){this.dirty=!0,this._backgroundColor4f[0]=e,this._backgroundColor4f[1]=t,this._backgroundColor4f[2]=n,this._backgroundColor3b[0]=255*e,this._backgroundColor3b[1]=255*t,this._backgroundColor3b[2]=255*n}setDebugCanvas(e){this._debugCanvas=e}setUseGpuMode(e){this._useGpuMode=e}setStageSize(e,t,n,r){this._xLeft=e,this._xRight=t,this._yBottom=n,this._yTop=r,this._projection=s.m4.ortho(e,t,n,r,-1,1),this._setNativeSize(Math.abs(t-e),Math.abs(n-r))}getNativeSize(){return[this._nativeSize[0],this._nativeSize[1]]}_setNativeSize(e,t){this._nativeSize=[e,t],this._updateOverlays(),this.emit(d.Events.NativeSizeChanged,{newSize:this._nativeSize})}addOverlay(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"scale";const n=document.createElement("div");n.appendChild(e),this.overlayContainer.appendChild(n);const r={container:n,userElement:e,mode:t};return this._overlays.push(r),this._updateOverlays(),r}removeOverlay(e){const t=this._overlays.findIndex((t=>t.userElement===e));-1!==t&&(this._overlays[t].container.remove(),this._overlays.splice(t,1))}_updateOverlays(){const[e,t]=this._nativeSize,n=this.canvas.width/window.devicePixelRatio,r=this.canvas.height/window.devicePixelRatio;this.overlayContainer.style.width="".concat(n,"px"),this.overlayContainer.style.height="".concat(r,"px");for(const i of this._overlays){const s=i.container;if("scale"===i.mode||"scale-centered"===i.mode){const o=n/e,a=r/t;s.style.width="".concat(e,"px"),s.style.height="".concat(t,"px");const l="scale(".concat(o,", ").concat(a,")");if(s.style.transformOrigin="top left","scale"===i.mode)s.style.transform=l;else{const n="translate(".concat(e/2,"px, ").concat(t/2,"px)");s.style.transform="".concat(l," ").concat(n)}}else s.style.transform="",s.style.width="100%",s.style.height="100%"}}createBitmapSkin(e,t,n){const r=this._nextSkinId++,i=new a(r,this);return i.setBitmap(e,t,n),this._allSkins[r]=i,r}createSVGSkin(e,t){const n=this._nextSkinId++,r=new p(n,this);return r.setSVG(e,t),this._allSkins[n]=r,n}createPenSkin(){const e=this._nextSkinId++,t=new u(e,this);return this._allSkins[e]=t,this._penSkinId=e,this._updateRenderQuality(),e}createTextSkin(e,t,n){const r=this._nextSkinId++,i=new m(r,this);return i.setTextBubble(e,t,n),this._allSkins[r]=i,r}updateSVGSkin(e,t,n){if(this._allSkins[e]instanceof p)return void this._allSkins[e].setSVG(t,n);const r=new p(e,this);r.setSVG(t,n),this._reskin(e,r)}updateBitmapSkin(e,t,n,r){if(this._allSkins[e]instanceof a)return void this._allSkins[e].setBitmap(t,n,r);const i=new a(e,this);i.setBitmap(t,n,r),this._reskin(e,i)}_reskin(e,t){const n=this._allSkins[e];this._allSkins[e]=t;for(const e of this._allDrawables)e&&e.skin===n&&(e.skin=t);n.dispose()}updateTextSkin(e,t,n,r){if(this._allSkins[e]instanceof m)return void this._allSkins[e].setTextBubble(t,n,r);const i=new m(e,this);i.setTextBubble(t,n,r),this._reskin(e,i)}destroySkin(e){this._allSkins[e].dispose(),delete this._allSkins[e]}createDrawable(e){if(!e||!Object.prototype.hasOwnProperty.call(this._layerGroups,e))return void y.warn("Cannot create a drawable without a known layer group");const t=this._nextDrawableId++,n=new l(t,this);return this._allDrawables[t]=n,this._addToDrawList(t,e),n.setHighQuality(this.useHighQualityRender),n.skin=null,t}createTextWrapper(e){return new(E||(E=n(392)),E)(e)}markSkinAsPrivate(e){const t=this._allSkins[e];t&&(t.private=!0)}setLayerGroupOrdering(e){this._groupOrdering=e;for(let e=0;e<this._groupOrdering.length;e++)this._layerGroups[this._groupOrdering[e]]={groupIndex:e,drawListOffset:0}}_addToDrawList(e,t){const n=this._layerGroups[t],r=n.groupIndex,i=this._endIndexForKnownLayerGroup(n);this._drawList.splice(i,0,e),this._updateOffsets("add",r)}_updateOffsets(e,t){for(let n=t+1;n<this._groupOrdering.length;n++){const t=this._groupOrdering[n];"add"===e?this._layerGroups[t].drawListOffset++:"delete"===e&&this._layerGroups[t].drawListOffset--}}get _visibleDrawList(){return this._drawList.filter((e=>this._allDrawables[e]._visible))}_endIndexForKnownLayerGroup(e){const t=e.groupIndex;return t===this._groupOrdering.length-1?this._drawList.length:this._layerGroups[this._groupOrdering[t+1]].drawListOffset}destroyDrawable(e,t){if(!t||!Object.prototype.hasOwnProperty.call(this._layerGroups,t))return void y.warn("Cannot destroy drawable without known layer group.");this.dirty=!0;this._allDrawables[e].dispose(),delete this._allDrawables[e];const n=this._layerGroups[t],r=this._endIndexForKnownLayerGroup(n);let i=n.drawListOffset;for(;i<r&&this._drawList[i]!==e;)i++;i<r?(this._drawList.splice(i,1),this._updateOffsets("delete",n.groupIndex)):y.warn("Could not destroy drawable that could not be found in layer group.")}getDrawableOrder(e){return this._drawList.indexOf(e)}setDrawableOrder(e,t,n,r,i){if(!n||!Object.prototype.hasOwnProperty.call(this._layerGroups,n))return void y.warn("Cannot set the order of a drawable without a known layer group.");this.dirty=!0;const s=this._layerGroups[n],o=s.drawListOffset,a=this._endIndexForKnownLayerGroup(s);let l=o;for(;l<a&&this._drawList[l]!==e;)l++;if(l<a){if(0===t)return l;this._drawList.splice(l,1)[0];let n=t;r&&(n+=l);const s=(i||0)+o,c=s>=o&&s<a?s:o;return n=Math.max(n,c),n=Math.min(n,a),this._drawList.splice(n,0,e),n}return null}skinWasAltered(e){for(let t=0;t<this._allDrawables.length;t++){const n=this._allDrawables[t];n&&n._skin===e&&n._skinWasAltered()}}draw(){if(!this.dirty)return;this.dirty=!1,this._doExitDrawRegion();const e=this._gl;s.bindFramebufferInfo(e,null),e.viewport(0,0,e.canvas.width,e.canvas.height),e.clearColor(...this._backgroundColor4f),e.clear(e.COLOR_BUFFER_BIT);const t=this._snapshotCallbacks.length>0;if(this._drawThese(this._drawList,h.DRAW_MODE.default,this._projection,{framebufferWidth:e.canvas.width,framebufferHeight:e.canvas.height,skipPrivateSkins:t}),t){const t=e.canvas.toDataURL();this._snapshotCallbacks.forEach((e=>e(t))),this._snapshotCallbacks=[],this.dirty=!0}}getBounds(e){const t=this._allDrawables[e];if(t.needsConvexHullPoints()){const n=this._getConvexHullPointsForDrawable(e);t.setConvexHullPoints(n)}const n=t.getFastBounds();if(this._debugCanvas){const e=this._gl;this._debugCanvas.width=e.canvas.width,this._debugCanvas.height=e.canvas.height;const t=this._debugCanvas.getContext("2d");t.drawImage(e.canvas,0,0),t.strokeStyle="#FF0000";const r=window.devicePixelRatio;t.strokeRect(r*(n.left+this._nativeSize[0]/2),r*(-n.top+this._nativeSize[1]/2),r*(n.right-n.left),r*(-n.bottom+n.top))}return n}getBoundsForBubble(e){const t=this._allDrawables[e];if(t.needsConvexHullPoints()){const n=this._getConvexHullPointsForDrawable(e);t.setConvexHullPoints(n)}const n=t.getBoundsForBubble();if(this._debugCanvas){const e=this._gl;this._debugCanvas.width=e.canvas.width,this._debugCanvas.height=e.canvas.height;const t=this._debugCanvas.getContext("2d");t.drawImage(e.canvas,0,0),t.strokeStyle="#FF0000";const r=window.devicePixelRatio;t.strokeRect(r*(n.left+this._nativeSize[0]/2),r*(-n.top+this._nativeSize[1]/2),r*(n.right-n.left),r*(-n.bottom+n.top))}return n}getCurrentSkinSize(e){const t=this._allDrawables[e];return this.getSkinSize(t.skin.id)}getSkinSize(e){return this._allSkins[e].size}getSkinRotationCenter(e){return this._allSkins[e].calculateRotationCenter()}isTouchingColor(e,t,n){const r=this._candidatesTouching(e,this._visibleDrawList);let i;if(x(t,this._backgroundColor3b,0)){if(i=this._touchingBounds(e),null===i)return!1}else{if(0===r.length)return!1;i=this._candidatesBounds(r)}const s=this._getMaxPixelsForCPU(),o=this._debugCanvas&&this._debugCanvas.getContext("2d");o&&(this._debugCanvas.width=i.width,this._debugCanvas.height=i.height),i.width*i.height*(r.length+1)>=s&&this._isTouchingColorGpuStart(e,r.map((e=>{let{id:t}=e;return t})).reverse(),i,t,n);const a=this._allDrawables[e],c=b,u=w,d=Boolean(n);a.updateCPURenderAttributes();const p=~h.EFFECT_INFO.ghost.mask;for(let e=i.bottom;e<=i.top;e++){if(i.width*(e-i.bottom)*(r.length+1)>=s)return this._isTouchingColorGpuFin(i,t,e-i.bottom);for(let s=i.left;s<=i.right;s++)if(c[1]=e,c[0]=s,(d?(m=l.sampleColor4b(c,a,u,p),f=n,m[3]>0&&(252&m[0])==(252&f[0])&&(252&m[1])==(252&f[1])&&(252&m[2])==(252&f[2])):a.isTouching(c))&&(C.sampleColor3b(c,r,u),o&&(o.fillStyle="rgb(".concat(u[0],",").concat(u[1],",").concat(u[2],")"),o.fillRect(s-i.left,i.bottom-e,1,1)),x(u,t,0)))return!0}var m,f;return!1}_getMaxPixelsForCPU(){switch(this._useGpuMode){case C.UseGpuModes.ForceCPU:return 1/0;case C.UseGpuModes.ForceGPU:return 0;case C.UseGpuModes.Automatic:default:return 4e4}}_enterDrawBackground(){const e=this.gl,t=this._shaderManager.getShader(h.DRAW_MODE.background,0);e.disable(e.BLEND),e.useProgram(t.program),s.setBuffersAndAttributes(e,t,this._bufferInfo)}_exitDrawBackground(){const e=this.gl;e.enable(e.BLEND)}_isTouchingColorGpuStart(e,t,n,r,i){this._doExitDrawRegion();const o=this._gl;s.bindFramebufferInfo(o,this._queryBufferInfo),o.viewport(0,0,n.width,n.height);const a=s.m4.ortho(n.left,n.right,n.top,n.bottom,-1,1);let l;o.clearColor(0,0,0,0),o.clear(o.COLOR_BUFFER_BIT|o.STENCIL_BUFFER_BIT),i&&(l={u_colorMask:[i[0]/255,i[1]/255,i[2]/255],u_colorMaskTolerance:2/255});try{o.enable(o.STENCIL_TEST),o.stencilFunc(o.ALWAYS,1,1),o.stencilOp(o.KEEP,o.KEEP,o.REPLACE),o.colorMask(!1,!1,!1,!1),this._drawThese([e],i?h.DRAW_MODE.colorMask:h.DRAW_MODE.silhouette,a,{extraUniforms:l,ignoreVisibility:!0,effectMask:~h.EFFECT_INFO.ghost.mask}),o.stencilFunc(o.EQUAL,1,1),o.stencilOp(o.KEEP,o.KEEP,o.KEEP),o.colorMask(!0,!0,!0,!0),this.enterDrawRegion(this._backgroundDrawRegionId);const n={u_backgroundColor:this._backgroundColor4f},r=this._shaderManager.getShader(h.DRAW_MODE.background,0);s.setUniforms(r,n),s.drawBufferInfo(o,this._bufferInfo,o.TRIANGLES),this._drawThese(t,h.DRAW_MODE.default,a,{idFilterFunc:t=>t!==e})}finally{o.colorMask(!0,!0,!0,!0),o.disable(o.STENCIL_TEST),this._doExitDrawRegion()}}_isTouchingColorGpuFin(e,t,n){const r=this._gl,i=new Uint8Array(Math.floor(e.width*(e.height-n)*4));if(r.readPixels(0,0,e.width,e.height-n,r.RGBA,r.UNSIGNED_BYTE,i),this._debugCanvas){this._debugCanvas.width=e.width,this._debugCanvas.height=e.height;const t=this._debugCanvas.getContext("2d"),r=t.getImageData(0,0,e.width,e.height-n);r.data.set(i),t.putImageData(r,0,0)}for(let e=0;e<i.length;e+=4)if(0!==i[e+3]&&x(t,i,e))return!0;return!1}isTouchingDrawables(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._drawList;const n=this._candidatesTouching(e,t.filter((e=>this._allDrawables[e]._visible)));if(0===n.length||!this._allDrawables[e]._visible)return!1;const r=this._candidatesBounds(n),i=this._allDrawables[e],s=b;i.updateCPURenderAttributes();for(let e=r.left;e<=r.right;e++){s[0]=e;for(let e=r.bottom;e<=r.top;e++)if(s[1]=e,i.isTouching(s))for(let e=0;e<n.length;e++)if(n[e].drawable.isTouching(s))return!0}return!1}clientSpaceToScratchBounds(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const i=this._gl,s=this._nativeSize[0]/i.canvas.clientWidth,o=this._nativeSize[1]/i.canvas.clientHeight;n*=s,r*=o,n=Math.max(1,Math.min(Math.round(n),T[0])),r=Math.max(1,Math.min(Math.round(r),T[1]));const a=e*s-(n-1)/2,l=t*o+(r-1)/2,u=n%2?0:-.5,d=r%2?0:-.5,h=new c;return h.initFromBounds(Math.floor(this._xLeft+a+u),Math.floor(this._xLeft+a+u+n-1),Math.ceil(this._yTop-l+d),Math.ceil(this._yTop-l+d+r-1)),h}drawableTouching(e,t,n,r,i){const o=this._allDrawables[e];if(!o)return!1;const a=this.clientSpaceToScratchBounds(t,n,r,i),l=o.getFastBounds();if(l.snapToInt(),!l.intersects(a))return!1;o.updateCPURenderAttributes();const c=s.v3.create();for(c[1]=a.bottom;c[1]<=a.top;c[1]++)for(c[0]=a.left;c[0]<=a.right;c[0]++)if(o.isTouching(c))return!0;return!1}pick(e,t,n,r,i){const o=this.clientSpaceToScratchBounds(e,t,n,r);if(o.left===-1/0||o.bottom===-1/0)return!1;if(0===(i=(i||this._drawList).filter((e=>{const t=this._allDrawables[e];if(t.getVisible()&&0!==t.getUniforms().u_ghost){const e=t.getFastBounds();return!!o.intersects(e)&&(!(t.skin instanceof u)&&(t.updateCPURenderAttributes(),!0))}return!1}))).length)return!1;const a=[],l=s.v3.create(0,0,0);for(l[1]=o.bottom;l[1]<=o.top;l[1]++)for(l[0]=o.left;l[0]<=o.right;l[0]++)for(let e=i.length-1;e>=0;e--){const t=i[e];if(this._allDrawables[t].isTouching(l)){a[t]=(a[t]||0)+1;break}}a[d.ID_NONE]=0;let c=d.ID_NONE;for(const e in a)Object.prototype.hasOwnProperty.call(a,e)&&a[e]>a[c]&&(c=e);return Number(c)}extractDrawableScreenSpace(e){const t=this._allDrawables[e];if(!t)throw new Error("Could not extract drawable with ID ".concat(e,"; it does not exist"));this._doExitDrawRegion();const n=.5*this._nativeSize[0],r=.5*this._nativeSize[1],i=t.getFastBounds(),o=this.canvas,a=o.width/this._nativeSize[0],l=new c;l.initFromBounds((i.left+n)*a,(i.right+n)*a,(r-i.top)*a,(r-i.bottom)*a),l.snapToInt(),i.initFromBounds(l.left/a-n,l.right/a-n,r-l.top/a,r-l.bottom/a);const u=this._gl,d=u.getParameter(u.MAX_TEXTURE_SIZE),p=Math.min(2048,l.width,d),m=Math.min(2048,l.height,d),f=s.createFramebufferInfo(u,[{format:u.RGBA}],p,m);try{s.bindFramebufferInfo(u,f),u.viewport(0,0,p,m);const t=s.m4.ortho(i.left,i.right,i.top,i.bottom,-1,1);u.clearColor(0,0,0,0),u.clear(u.COLOR_BUFFER_BIT),this._drawThese([e],h.DRAW_MODE.straightAlpha,t,{effectMask:~h.EFFECT_INFO.ghost.mask,framebufferWidth:o.width,framebufferHeight:o.height});const n=new Uint8Array(Math.floor(p*m*4));u.readPixels(0,0,p,m,u.RGBA,u.UNSIGNED_BYTE,n);const r=new ImageData(new Uint8ClampedArray(n.buffer),p,m),a=o.getBoundingClientRect().width/o.width;return{imageData:r,x:l.left*a,y:l.bottom*a,width:l.width*a,height:l.height*a}}finally{u.deleteFramebuffer(f.framebuffer)}}extractColor(e,t,n){this._doExitDrawRegion();const r=Math.round(this._nativeSize[0]*(e/this._gl.canvas.clientWidth-.5)),i=Math.round(-this._nativeSize[1]*(t/this._gl.canvas.clientHeight-.5)),o=this._gl;s.bindFramebufferInfo(o,this._queryBufferInfo);const a=new c;a.initFromBounds(r-n,r+n,i-n,i+n);const l=r-a.left,u=a.top-i;o.viewport(0,0,a.width,a.height);const d=s.m4.ortho(a.left,a.right,a.top,a.bottom,-1,1);o.clearColor(...this._backgroundColor4f),o.clear(o.COLOR_BUFFER_BIT),this._drawThese(this._drawList,h.DRAW_MODE.default,d);const p=new Uint8Array(Math.floor(a.width*a.height*4));o.readPixels(0,0,a.width,a.height,o.RGBA,o.UNSIGNED_BYTE,p);const m=Math.floor(4*(u*a.width+l)),f={r:p[m],g:p[m+1],b:p[m+2],a:p[m+3]};if(this._debugCanvas){this._debugCanvas.width=a.width,this._debugCanvas.height=a.height;const e=this._debugCanvas.getContext("2d"),t=e.createImageData(a.width,a.height);t.data.set(p),e.putImageData(t,0,0),e.strokeStyle="black",e.fillStyle="rgba(".concat(f.r,", ").concat(f.g,", ").concat(f.b,", ").concat(f.a,")"),e.rect(l-4,u-4,8,8),e.fill(),e.stroke()}return{data:p,width:a.width,height:a.height,color:f}}_touchingBounds(e){const t=this._allDrawables[e];if(!t.skin||!t.skin.getTexture([100,100]))return null;const n=t.getFastBounds();return this.offscreenTouching||n.clamp(this._xLeft,this._xRight,this._yBottom,this._yTop),n.snapToInt(),0===n.width||0===n.height?null:n}_unsnappedTouchingBounds(e){const t=this._allDrawables[e];if(!t.skin||!t.skin.getTexture([100,100]))return null;const n=t.getFastBounds();return this.offscreenTouching||n.clamp(this._xLeft,this._xRight,this._yBottom,this._yTop),0===n.width||0===n.height?null:n}_candidatesTouching(e,t){const n=this._touchingBounds(e),r=[];if(null===n)return r;for(let i=t.length-1;i>=0;i--){const s=t[i];if(s!==e){const e=this._allDrawables[s];if(e.skin instanceof m)continue;if(e.skin&&e._visible){if(!this.allowPrivateSkinAccess&&e.skin.private)continue;e.updateCPURenderAttributes();const t=e.getFastBounds();t.snapToInt(),n.intersects(t)&&r.push({id:s,drawable:e,intersection:c.intersect(n,t)})}}}return r}_candidatesBounds(e){return e.reduce(((e,t)=>{let{intersection:n}=t;return e?c.union(e,n,v):n}),null)}updateDrawableSkinId(e,t){const n=this._allDrawables[e];n&&(n.skin=this._allSkins[t])}updateDrawablePosition(e,t){const n=this._allDrawables[e];n&&n.updatePosition(t)}updateDrawableDirection(e,t){const n=this._allDrawables[e];n&&n.updateDirection(t)}updateDrawableScale(e,t){const n=this._allDrawables[e];n&&n.updateScale(t)}updateDrawableDirectionScale(e,t,n){const r=this._allDrawables[e];r&&(r.updateDirection(t),r.updateScale(n))}updateDrawableVisible(e,t){const n=this._allDrawables[e];n&&n.updateVisible(t)}updateDrawableEffect(e,t,n){const r=this._allDrawables[e];r&&r.updateEffect(t,n)}updateDrawableProperties(e,t){const n=this._allDrawables[e];n&&("skinId"in t&&this.updateDrawableSkinId(e,t.skinId),n.updateProperties(t))}getFencedPositionOfDrawable(e,t){let n=t[0],r=t[1];const i=this._allDrawables[e];if(!i)return[n,r];const s=n-i._position[0],o=r-i._position[1],a=i._skin.getFenceBounds(i,S),l=Math.floor(Math.min(a.width,a.height)/2),c=this._xRight-Math.min(15,l);a.right+s<-c?n=Math.ceil(i._position[0]-(c+a.right)):a.left+s>c&&(n=Math.floor(i._position[0]+(c-a.left)));const u=this._yTop-Math.min(15,l);return a.top+o<-u?r=Math.ceil(i._position[1]-(u+a.top)):a.bottom+o>u&&(r=Math.floor(i._position[1]+(u-a.bottom))),[n,r]}penClear(e){this.dirty=!0;this._allSkins[e].clear()}penPoint(e,t,n,r){this.dirty=!0;this._allSkins[e].drawPoint(t,n,r)}penLine(e,t,n,r,i,s){this.dirty=!0;this._allSkins[e].drawLine(t,n,r,i,s)}penStamp(e,t){this.dirty=!0;if(!this._allDrawables[t])return;const n=this._unsnappedTouchingBounds(t);if(!n)return;this._doExitDrawRegion();const r=this._allSkins[e],i=this._gl;s.bindFramebufferInfo(i,r._framebuffer);const o=r.renderQuality;n.left*=o,n.right*=o,n.top*=o,n.bottom*=o,n.snapToInt(),i.viewport(.5*this._nativeSize[0]*o+n.left,.5*this._nativeSize[1]*o-n.top,n.width,n.height);const a=s.m4.ortho(n.left/o,n.right/o,n.top/o,n.bottom/o,-1,1);this._drawThese([t],h.DRAW_MODE.default,a,{ignoreVisibility:!0,framebufferWidth:this._nativeSize[0]*o,framebufferHeight:this._nativeSize[1]*o}),r._silhouetteDirty=!0}_createGeometry(){this._bufferInfo=s.createBufferInfoFromArrays(this._gl,{a_position:{numComponents:2,data:[-.5,-.5,.5,-.5,-.5,.5,-.5,.5,.5,-.5,.5,.5]},a_texCoord:{numComponents:2,data:[1,0,0,0,1,1,1,1,0,0,0,1]}})}onNativeSizeChanged(e){this.dirty=!0;const[t,n]=e.newSize,r=this._gl,i=[{format:r.RGBA},{format:r.DEPTH_STENCIL}];this._pickBufferInfo||(this._pickBufferInfo=s.createFramebufferInfo(r,i,T[0],T[1])),this._queryBufferInfo?s.resizeFramebufferInfo(r,this._queryBufferInfo,i,t,n):this._queryBufferInfo=s.createFramebufferInfo(r,i,t,n)}enterDrawRegion(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.enter,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.exit;this._regionId!==e&&(this._doExitDrawRegion(),this._regionId=e,t(),this._exitRegion=n)}_doExitDrawRegion(){null!==this._exitRegion&&this._exitRegion(),this._exitRegion=null,this._regionId=null}_drawThese(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=this._gl;let o=null;const a="framebufferWidth"in r&&"framebufferHeight"in r&&r.framebufferWidth!==this._nativeSize[0]&&r.framebufferHeight!==this._nativeSize[1],l=e.length;for(let c=0;c<l;++c){const l=e[c];if(r.filter&&!r.filter(l))continue;const u=this._allDrawables[l];if(!u.getVisible()&&!r.ignoreVisibility)continue;const d=a?[u.scale[0]*r.framebufferWidth/this._nativeSize[0],u.scale[1]*r.framebufferHeight/this._nativeSize[1]]:u.scale;if(!u.skin||!u.skin.getTexture(d))continue;if(r.skipPrivateSkins&&u.skin.private)continue;const h={};let p=u.enabledEffects;p&=Object.prototype.hasOwnProperty.call(r,"effectMask")?r.effectMask:p;const m=this._shaderManager.getShader(t,p);this._regionId!==m&&(this._doExitDrawRegion(),this._regionId=m,o=m,i.useProgram(o.program),s.setBuffersAndAttributes(i,o,this._bufferInfo),Object.assign(h,{u_projectionMatrix:n})),Object.assign(h,u.skin.getUniforms(d),u.getUniforms()),r.extraUniforms&&Object.assign(h,r.extraUniforms),h.u_skin&&s.setTextureParameters(i,h.u_skin,{minMag:u.skin.useNearest(d,u)?i.NEAREST:i.LINEAR}),s.setUniforms(o,h),s.drawBufferInfo(i,this._bufferInfo,i.TRIANGLES)}this._regionId=null}_getConvexHullPointsForDrawable(e){const t=this._allDrawables[e],[n,r]=t.skin.size;if(!t.getVisible()||0===n||0===r)return[];t.updateCPURenderAttributes();const o=function(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])},a=[],l=[];let c=-1,u=-1;const d=s.v3.create(),h=s.v3.create();let p;for(let e=0;e<r;e++){d[1]=e/r;let i=0;for(;i<n;i++)if(d[0]=i/n,f.transformPoint(t,d,h),t.skin.isTouchingLinear(h)){p=[i,e];break}if(!(i>=n)){for(;c>0&&!(o(a[c],a[c-1],p)>0);)--c;for(a[++c]=p,i=n-1;i>=0;i--)if(d[0]=i/n,f.transformPoint(t,d,h),t.skin.isTouchingLinear(h)){p=[i,e];break}for(;u>0&&!(o(l[u],l[u-1],p)<0);)--u;l[++u]=p}}const m=a;m.length=c+1;for(let e=u;e>=0;--e)m.push(l[e]);return i(m,1/0)}static sampleColor3b(e,t,n){(n=n||new Uint8ClampedArray(3)).fill(0);let r=1;for(let i=0;0!==r&&i<t.length;i++)l.sampleColor4b(e,t[i].drawable,k),n[0]+=k[0]*r,n[1]+=k[1]*r,n[2]+=k[2]*r,r*=1-k[3]/255;return n[0]+=255*r,n[1]+=255*r,n[2]+=255*r,n}requestSnapshot(e){this.dirty=!0,this._snapshotCallbacks.push(e)}setCustomFonts(e){this.customFonts=e;const t=Object.values(e).join("\n");if(t.length?(this._customFontStyles||(this._customFontStyles=document.createElement("style"),this._customFontStyles.className="renderer-custom-fonts",document.head.appendChild(this._customFontStyles)),this._customFontStyles.textContent=t):this._customFontStyles&&(this._customFontStyles.remove(),this._customFontStyles=null),"object"==typeof document&&"object"==typeof document.fonts&&"function"==typeof document.fonts.load){const t=Object.keys(e);for(const e of t)document.fonts.load("12px ".concat(e))}}}C.prototype.canHazPixels=C.prototype.extractDrawableScreenSpace,C.UseGpuModes={Automatic:"Automatic",ForceGPU:"ForceGPU",ForceCPU:"ForceCPU"},C.powerPreference="default",e.exports=C},function(e,t,n){"use strict";var r=n(379),i=n(380),s=n(381),o=n(382);function a(e,t){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function l(e,t,n){var r=[t[0]-e[0],t[1]-e[1]],i=[n[0]-e[0],n[1]-e[1]],s=a(e,t),o=a(e,n);return(r[0]*i[0]+r[1]*i[1])/Math.sqrt(s*o)}function c(e,t){for(var n=0;n<t.length-1;n++){var i=[t[n],t[n+1]];if(!(e[0][0]===i[0][0]&&e[0][1]===i[0][1]||e[0][0]===i[1][0]&&e[0][1]===i[1][1])&&r(e,i))return!0}return!1}function u(e){return[Math.min(e[0][0],e[1][0]),Math.min(e[0][1],e[1][1]),Math.max(e[0][0],e[1][0]),Math.max(e[0][1],e[1][1])]}function d(e,t,n){for(var r,i,s=null,o=p,a=p,u=0;u<t.length;u++)r=l(e[0],e[1],t[u]),i=l(e[1],e[0],t[u]),r>o&&i>a&&!c([e[0],t[u]],n)&&!c([e[1],t[u]],n)&&(o=r,a=i,s=t[u]);return s}function h(e,t,n,r,i){for(var s,o,l,c,p,m,f,g=!1,y=0;y<e.length-1;y++)if(o=(s=[e[y],e[y+1]])[0].join()+","+s[1].join(),!(a(s[0],s[1])<t||!0===i[o])){l=0,p=u(s);do{m=(p=r.extendBbox(p,l))[2]-p[0],f=p[3]-p[1],c=d(s,r.rangePoints(p),e),l++}while(null===c&&(n[0]>m||n[1]>f));m>=n[0]&&f>=n[1]&&(i[o]=!0),null!==c&&(e.splice(y+1,0,c),r.removePoint(c),g=!0)}return g?h(e,t,n,r,i):e}var p=Math.cos(90/(180/Math.PI)),m=.6;e.exports=function(e,t,n){var r,a,l,c,u,d,p,f=t||20;return e.length<4?e.slice():(p=function(e){return e.filter((function(e,t,n){var r=n[t-1];return 0===t||!(r[0]===e[0]&&r[1]===e[1])}))}(function(e){return e.sort((function(e,t){return e[0]==t[0]?e[1]-t[1]:e[0]-t[0]}))}(s.toXy(e,n))),c=function(e){for(var t=1/0,n=1/0,r=-1/0,i=-1/0,s=e.length-1;s>=0;s--)e[s][0]<t&&(t=e[s][0]),e[s][1]<n&&(n=e[s][1]),e[s][0]>r&&(r=e[s][0]),e[s][1]>i&&(i=e[s][1]);return[r-t,i-n]}(p),u=[c[0]*m,c[1]*m],r=o(p),l=p.filter((function(e){return r.indexOf(e)<0})),d=Math.ceil(1/(p.length/(c[0]*c[1]))),a=h(r,Math.pow(f,2),u,i(l,d),{}),s.fromXy(a,n))}},function(e,t){function n(e,t,n,r,i,s){var o=(s-t)*(n-e)-(r-t)*(i-e);return o>0||!(o<0)}e.exports=function(e,t){var r=e[0][0],i=e[0][1],s=e[1][0],o=e[1][1],a=t[0][0],l=t[0][1],c=t[1][0],u=t[1][1];return n(r,i,a,l,c,u)!==n(s,o,a,l,c,u)&&n(r,i,s,o,a,l)!==n(r,i,s,o,c,u)}},function(e,t){function n(e,t){this._cells=[],this._cellSize=t,e.forEach((function(e){var t=this.point2CellXY(e),n=t[0],r=t[1];void 0===this._cells[n]&&(this._cells[n]=[]),void 0===this._cells[n][r]&&(this._cells[n][r]=[]),this._cells[n][r].push(e)}),this)}n.prototype={cellPoints:function(e,t){return void 0!==this._cells[e]&&void 0!==this._cells[e][t]?this._cells[e][t]:[]},rangePoints:function(e){for(var t=this.point2CellXY([e[0],e[1]]),n=this.point2CellXY([e[2],e[3]]),r=[],i=t[0];i<=n[0];i++)for(var s=t[1];s<=n[1];s++)r=r.concat(this.cellPoints(i,s));return r},removePoint:function(e){for(var t,n=this.point2CellXY(e),r=this._cells[n[0]][n[1]],i=0;i<r.length;i++)if(r[i][0]===e[0]&&r[i][1]===e[1]){t=i;break}return r.splice(t,1),r},point2CellXY:function(e){return[parseInt(e[0]/this._cellSize),parseInt(e[1]/this._cellSize)]},extendBbox:function(e,t){return[e[0]-t*this._cellSize,e[1]-t*this._cellSize,e[2]+t*this._cellSize,e[3]+t*this._cellSize]}},e.exports=function(e,t){return new n(e,t)}},function(e,t){e.exports={toXy:function(e,t){return void 0===t?e.slice():e.map((function(e){return new Function("pt","return [pt"+t[0]+",pt"+t[1]+"];")(e)}))},fromXy:function(e,t){return void 0===t?e.slice():e.map((function(e){return new Function("pt","var o = {}; o"+t[0]+"= pt[0]; o"+t[1]+"= pt[1]; return o;")(e)}))}}},function(e,t){function n(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}e.exports=function(e){var t,r=function(e){for(var t=[],r=0;r<e.length;r++){for(;t.length>=2&&n(t[t.length-2],t[t.length-1],e[r])<=0;)t.pop();t.push(e[r])}return t.pop(),t}(e),i=function(e){for(var t=e.reverse(),r=[],i=0;i<t.length;i++){for(;r.length>=2&&n(r[r.length-2],r[r.length-1],t[i])<=0;)r.pop();r.push(t[i])}return r.pop(),r}(e);return(t=i.concat(r)).push(e[0]),t}},function(e,t){let n;const r=(e,t)=>t^(e^t)&e-t>>31,i=(e,t)=>e^(e^t)&e-t>>31,s=(e,t,n)=>{let{_width:r,_height:i,_colorData:s}=e;return t>=r||n>=i||t<0||n<0?0:s[4*(n*r+t)+3]},o=[new Uint8ClampedArray(4),new Uint8ClampedArray(4),new Uint8ClampedArray(4),new Uint8ClampedArray(4)],a=(e,t,n,s)=>{let{_width:o,_height:a,_colorData:l}=e;if(t=i(0,r(t,o-1)),n=i(0,r(n,a-1)),t>=o||n>=a||t<0||n<0)return s.fill(0);const c=4*(n*o+t),u=l[c+3]/255;return s[0]=l[c]*u,s[1]=l[c+1]*u,s[2]=l[c+2]*u,s[3]=l[c+3],s},l=(e,t,n,s)=>{let{_width:o,_height:a,_colorData:l}=e;t=i(0,r(t,o-1));const c=4*((n=i(0,r(n,a-1)))*o+t);return s[0]=l[c],s[1]=l[c+1],s[2]=l[c+2],s[3]=l[c+3],s};class c{constructor(){this._width=0,this._height=0,this._lazyData=null,this._colorData=null,this._getColor=a,this.colorAtNearest=this.colorAtLinear=(e,t)=>t.fill(0)}update(e){let t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e instanceof ImageData)t=e,this._width=e.width,this._height=e.height,this._lazyData=null,this._colorData=t.data;else{if(this._width=e.width,this._height=e.height,!this._width||!this._height)return;this._lazyData=e,this._colorData=null}this._getColor=n?l:a,delete this.colorAtNearest,delete this.colorAtLinear}unlazy(){if(!this._lazyData)return;const e=this._lazyData.width,t=this._lazyData.height;if(e&&t){const n=c._updateCanvas();n.width=e,n.height=t;const r=n.getContext("2d");r.clearRect(0,0,e,t),r.drawImage(this._lazyData,0,0,e,t);const i=r.getImageData(0,0,e,t);this._colorData=i.data}this._lazyData=null}colorAtNearest(e,t){return this._getColor(this,Math.floor(e[0]*(this._width-1)),Math.floor(e[1]*(this._height-1)),t)}colorAtLinear(e,t){const n=e[0]*(this._width-1),r=e[1]*(this._height-1),i=n%1,s=r%1,a=1-i,l=1-s,c=Math.floor(n),u=Math.floor(r),d=this._getColor(this,c,u,o[0]),h=this._getColor(this,c+1,u,o[1]),p=this._getColor(this,c,u+1,o[2]),m=this._getColor(this,c+1,u+1,o[3]);return t[0]=d[0]*a*l+p[0]*a*s+h[0]*i*l+m[0]*i*s,t[1]=d[1]*a*l+p[1]*a*s+h[1]*i*l+m[1]*i*s,t[2]=d[2]*a*l+p[2]*a*s+h[2]*i*l+m[2]*i*s,t[3]=d[3]*a*l+p[3]*a*s+h[3]*i*l+m[3]*i*s,t}isTouchingNearest(e){if(this._colorData)return s(this,Math.floor(e[0]*(this._width-1)),Math.floor(e[1]*(this._height-1)))>0}isTouchingLinear(e){if(!this._colorData)return;const t=Math.floor(e[0]*(this._width-1)),n=Math.floor(e[1]*(this._height-1));return s(this,t,n)>0||s(this,t+1,n)>0||s(this,t,n+1)>0||s(this,t+1,n+1)>0}static _updateCanvas(){return void 0===n&&(n=document.createElement("canvas")),n}}e.exports=c},function(e,t,n){const r=n(11),i=n(28);class s extends i{constructor(e,t){super(e,t),this._costumeResolution=1,this._textureSize=[0,0]}dispose(){this._texture&&(this._renderer.gl.deleteTexture(this._texture),this._texture=null),super.dispose()}get size(){return[this._textureSize[0]/this._costumeResolution,this._textureSize[1]/this._costumeResolution]}getTexture(e){return this._texture||super.getTexture()}setBitmap(e,t,n){if(!e.width||!e.height)return void super.setEmptyImageData();const i=this._renderer.gl;let o=e;if(e instanceof HTMLCanvasElement&&!1!==e.reusable){o=e.getContext("2d").getImageData(0,0,e.width,e.height)}if(null===this._texture){const e={auto:!1,wrap:i.CLAMP_TO_EDGE};this._texture=r.createTexture(i,e)}this._setTexture(o),this._costumeResolution=t||2,this._textureSize=s._getBitmapSize(e),void 0===n&&(n=this.calculateRotationCenter()),this._rotationCenter[0]=n[0],this._rotationCenter[1]=n[1],this.emitWasAltered()}static _getBitmapSize(e){return e instanceof HTMLImageElement?[e.naturalWidth||e.width,e.naturalHeight||e.height]:e instanceof HTMLVideoElement?[e.videoWidth||e.width,e.videoHeight||e.height]:[e.width,e.height]}}e.exports=s},function(e,t,n){const r=n(11),i=n(107),s=n(38),o=n(29),a=n(108),l=n(109),c=r.v3.create(),u=1e-6,d=(e,t)=>{const n=c,r=t[0],i=t[1],s=e._inverseMatrix,o=r*s[3]+i*s[7]+s[15];return n[0]=.5-(r*s[0]+i*s[4]+s[12])/o,n[1]=(r*s[1]+i*s[5]+s[13])/o+.5,Math.abs(n[0])<u&&(n[0]=0),Math.abs(n[1])<u&&(n[1]=0),0!==e.enabledEffects&&n[0]>=0&&n[0]<1&&n[1]>=0&&n[1]<1&&a.transformPoint(e,n,n),n};class h{constructor(e,t){this._id=e,this._renderer=t,this._uniforms={u_modelMatrix:r.m4.identity(),u_silhouetteColor:h.color4fFromID(this._id)};const n=o.EFFECTS.length;for(let e=0;e<n;++e){const t=o.EFFECTS[e],n=o.EFFECT_INFO[t],r=n.converter;this._uniforms[n.uniformName]=r(0)}this._position=r.v3.create(0,0),this._scale=r.v3.create(100,100),this._direction=90,this._transformDirty=!0,this._rotationMatrix=r.m4.identity(),this._rotationTransformDirty=!0,this._rotationAdjusted=r.v3.create(),this._rotationCenterDirty=!0,this._skinScale=r.v3.create(0,0,0),this._skinScaleDirty=!0,this._inverseMatrix=r.m4.identity(),this._inverseTransformDirty=!0,this._visible=!0,this.enabledEffects=0,this._convexHullPoints=null,this._convexHullDirty=!0,this._transformedHullPoints=null,this._transformedHullDirty=!0,this._skinWasAltered=this._skinWasAltered.bind(this),this.isTouching=this._isTouchingNever,this._highQuality=!1}setHighQuality(e){this._highQuality=e}dispose(){this.skin=null}setTransformDirty(){this._transformDirty=!0,this._inverseTransformDirty=!0,this._transformedHullDirty=!0}get id(){return this._id}get skin(){return this._skin}set skin(e){this._skin!==e&&(this._skin=e,this._skinWasAltered())}get scale(){return[this._scale[0],this._scale[1]]}getUniforms(){return this._transformDirty&&this._calculateTransform(),this._uniforms}getVisible(){return this._visible}updatePosition(e){this._position[0]===e[0]&&this._position[1]===e[1]||(this._highQuality?(this._position[0]=e[0],this._position[1]=e[1]):(this._position[0]=Math.round(e[0]),this._position[1]=Math.round(e[1])),this._renderer.dirty=!0,this.setTransformDirty())}updateDirection(e){this._direction!==e&&(this._direction=e,this._renderer.dirty=!0,this._rotationTransformDirty=!0,this.setTransformDirty())}updateScale(e){this._scale[0]===e[0]&&this._scale[1]===e[1]||(this._scale[0]=e[0],this._scale[1]=e[1],this._renderer.dirty=!0,this._rotationCenterDirty=!0,this._skinScaleDirty=!0,this.setTransformDirty())}updateVisible(e){this._visible!==e&&(this._visible=e,this._renderer.dirty=!0,this.setConvexHullDirty())}updateEffect(e,t){this._renderer.dirty=!0;const n=o.EFFECT_INFO[e];t?this.enabledEffects|=n.mask:this.enabledEffects&=~n.mask;const r=n.converter;this._uniforms[n.uniformName]=r(t),n.shapeChanges&&this.setConvexHullDirty()}updateProperties(e){"position"in e&&this.updatePosition(e.position),"direction"in e&&this.updateDirection(e.direction),"scale"in e&&this.updateScale(e.scale),"visible"in e&&this.updateVisible(e.visible);const t=o.EFFECTS.length;for(let n=0;n<t;++n){const t=o.EFFECTS[n];t in e&&this.updateEffect(t,e[t])}}_calculateTransform(){if(this._rotationTransformDirty){const e=(270-this._direction)*Math.PI/180,t=Math.cos(e),n=Math.sin(e);this._rotationMatrix[0]=t,this._rotationMatrix[1]=n,this._rotationMatrix[4]=-n,this._rotationMatrix[5]=t,this._rotationTransformDirty=!1}if(this._rotationCenterDirty&&null!==this.skin){const e=this.skin.rotationCenter,t=this.skin.size,n=e[0],r=e[1],i=t[0],s=t[1],o=this._scale[0],a=this._scale[1],l=this._rotationAdjusted;l[0]=(n-i/2)*o/100,l[1]=(r-s/2)*a/100*-1,this._rotationCenterDirty=!1}if(this._skinScaleDirty&&null!==this.skin){const e=this.skin.size,t=this._skinScale;t[0]=e[0]*this._scale[0]/100,t[1]=e[1]*this._scale[1]/100,this._skinScaleDirty=!1}const e=this._uniforms.u_modelMatrix,t=this._skinScale[0],n=this._skinScale[1],r=this._rotationMatrix[0],i=this._rotationMatrix[1],s=this._rotationMatrix[4],o=this._rotationMatrix[5],a=this._rotationAdjusted[0],l=this._rotationAdjusted[1],c=this._position[0],u=this._position[1];e[0]=t*r,e[1]=t*i,e[4]=n*s,e[5]=n*o,e[12]=r*a+s*l+c,e[13]=i*a+o*l+u,this._transformDirty=!1}needsConvexHullPoints(){return!this._convexHullPoints||this._convexHullDirty||0===this._convexHullPoints.length}setConvexHullDirty(){this._convexHullDirty=!0}setConvexHullPoints(e){this._convexHullPoints=e,this._convexHullDirty=!1,this._transformedHullPoints=[];for(let t=0;t<e.length;t++)this._transformedHullPoints.push(r.v3.create());this._transformedHullDirty=!0}_isTouchingNever(e){return!1}_isTouchingNearest(e){return this.skin.isTouchingNearest(d(this,e))}_isTouchingLinear(e){return this.skin.isTouchingLinear(d(this,e))}getBounds(e){if(this.needsConvexHullPoints())throw new Error("Needs updated convex hull points before bounds calculation.");this._transformDirty&&this._calculateTransform();const t=this._getTransformedHullPoints();return(e=e||new i).initFromPointsAABB(t),e}getBoundsForBubble(e){if(this.needsConvexHullPoints())throw new Error("Needs updated convex hull points before bubble bounds calculation.");this._transformDirty&&this._calculateTransform();const t=this._getTransformedHullPoints(),n=Math.max.apply(null,t.map((e=>e[1]))),r=t.filter((e=>e[1]>n-8));return(e=e||new i).initFromPointsAABB(r),e}getAABB(e){this._transformDirty&&this._calculateTransform();const t=this._uniforms.u_modelMatrix;return(e=e||new i).initFromModelMatrix(t),e}getFastBounds(e){return this.needsConvexHullPoints()?this.getAABB(e):this.getBounds(e)}_getTransformedHullPoints(){if(!this._transformedHullDirty)return this._transformedHullPoints;const e=r.m4.ortho(-1,1,-1,1,-1,1),t=this.skin.size,n=1/t[0]/2,i=1/t[1]/2,s=r.m4.multiply(this._uniforms.u_modelMatrix,e);for(let e=0;e<this._convexHullPoints.length;e++){const o=this._convexHullPoints[e],a=this._transformedHullPoints[e];a[0]=.5+-o[0]/t[0]-n,a[1]=o[1]/t[1]-.5+i,r.m4.transformPoint(s,a,a)}return this._transformedHullDirty=!1,this._transformedHullPoints}updateMatrix(){if(this._transformDirty&&this._calculateTransform(),this._inverseTransformDirty){const e=this._inverseMatrix;r.m4.copy(this._uniforms.u_modelMatrix,e),e[10]=1,r.m4.inverse(e,e),this._inverseTransformDirty=!1}}updateCPURenderAttributes(){this.updateMatrix(),this.skin?(this.skin.updateSilhouette(this._scale),this.skin.useNearest(this._scale,this)?this.isTouching=this._isTouchingNearest:this.isTouching=this._isTouchingLinear):(l.warn("Could not find skin for drawable with id: ".concat(this._id)),this.isTouching=this._isTouchingNever)}_skinWasAltered(){this._renderer.dirty=!0,this._rotationCenterDirty=!0,this._skinScaleDirty=!0,this.setConvexHullDirty(),this.setTransformDirty()}static color4fFromID(e){return[(255&(e-=s.ID_NONE))/255,(e>>8&255)/255,(e>>16&255)/255,1]}static color3bToID(e,t,n){let r;return r=255&e,r|=(255&t)<<8,r|=(255&n)<<16,r+s.ID_NONE}static sampleColor4b(e,t,n,r){const i=d(t,e);if(i[0]<0||i[1]<0||i[0]>1||i[1]>1)return n[0]=0,n[1]=0,n[2]=0,n[3]=0,n;const s=t.skin._silhouette.colorAtNearest(i,n);return 0===t.enabledEffects?s:a.transformColor(t,s,r)}}e.exports=h},function(e,t){e.exports="precision mediump float;\n\n#ifdef DRAW_MODE_line\nuniform vec2 u_stageSize;\nattribute vec2 a_lineThicknessAndLength;\nattribute vec4 a_penPoints;\nattribute vec4 a_lineColor;\n\nvarying vec4 v_lineColor;\nvarying float v_lineThickness;\nvarying float v_lineLength;\nvarying vec4 v_penPoints;\n\n// Add this to divisors to prevent division by 0, which results in NaNs propagating through calculations.\n// Smaller values can cause problems on some mobile devices.\nconst float epsilon = 1e-3;\n#endif\n\n#if !(defined(DRAW_MODE_line) || defined(DRAW_MODE_background))\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_modelMatrix;\nattribute vec2 a_texCoord;\n#endif\n\nattribute vec2 a_position;\n\nvarying vec2 v_texCoord;\n\nvoid main() {\n\t#ifdef DRAW_MODE_line\n\t// Calculate a rotated (\"tight\") bounding box around the two pen points.\n\t// Yes, we're doing this 6 times (once per vertex), but on actual GPU hardware,\n\t// it's still faster than doing it in JS combined with the cost of uniformMatrix4fv.\n\n\t// Expand line bounds by sqrt(2) / 2 each side-- this ensures that all antialiased pixels\n\t// fall within the quad, even at a 45-degree diagonal\n\tvec2 position = a_position;\n\tfloat expandedRadius = (a_lineThicknessAndLength.x * 0.5) + 1.4142135623730951;\n\n\t// The X coordinate increases along the length of the line. It's 0 at the center of the origin point\n\t// and is in pixel-space (so at n pixels along the line, its value is n).\n\tv_texCoord.x = mix(0.0, a_lineThicknessAndLength.y + (expandedRadius * 2.0), a_position.x) - expandedRadius;\n\t// The Y coordinate is perpendicular to the line. It's also in pixel-space.\n\tv_texCoord.y = ((a_position.y - 0.5) * expandedRadius) + 0.5;\n\n\tposition.x *= a_lineThicknessAndLength.y + (2.0 * expandedRadius);\n\tposition.y *= 2.0 * expandedRadius;\n\n\t// 1. Center around first pen point\n\tposition -= expandedRadius;\n\n\t// 2. Rotate quad to line angle\n\tvec2 pointDiff = a_penPoints.zw;\n\t// Ensure line has a nonzero length so it's rendered properly\n\t// As long as either component is nonzero, the line length will be nonzero\n\t// If the line is zero-length, give it a bit of horizontal length\n\tpointDiff.x = (abs(pointDiff.x) < epsilon && abs(pointDiff.y) < epsilon) ? epsilon : pointDiff.x;\n\t// The `normalized` vector holds rotational values equivalent to sine/cosine\n\t// We're applying the standard rotation matrix formula to the position to rotate the quad to the line angle\n\t// pointDiff can hold large values so we must divide by u_lineLength instead of calling GLSL's normalize function:\n\t// https://asawicki.info/news_1596_watch_out_for_reduced_precision_normalizelength_in_opengl_es\n\tvec2 normalized = pointDiff / max(a_lineThicknessAndLength.y, epsilon);\n\tposition = mat2(normalized.x, normalized.y, -normalized.y, normalized.x) * position;\n\n\t// 3. Translate quad\n\tposition += a_penPoints.xy;\n\n\t// 4. Apply view transform\n\tposition *= 2.0 / u_stageSize;\n\tgl_Position = vec4(position, 0, 1);\n\n\tv_lineColor = a_lineColor;\n\tv_lineThickness = a_lineThicknessAndLength.x;\n\tv_lineLength = a_lineThicknessAndLength.y;\n\tv_penPoints = a_penPoints;\n\t#elif defined(DRAW_MODE_background)\n\tgl_Position = vec4(a_position * 2.0, 0, 1);\n\t#else\n\tgl_Position = u_projectionMatrix * u_modelMatrix * vec4(a_position, 0, 1);\n\tv_texCoord = a_texCoord;\n\t#endif\n}\n"},function(e,t){e.exports='precision mediump float;\n\n#ifdef DRAW_MODE_silhouette\nuniform vec4 u_silhouetteColor;\n#else // DRAW_MODE_silhouette\n# ifdef ENABLE_color\nuniform float u_color;\n# endif // ENABLE_color\n# ifdef ENABLE_brightness\nuniform float u_brightness;\n# endif // ENABLE_brightness\n#endif // DRAW_MODE_silhouette\n\n#ifdef DRAW_MODE_colorMask\nuniform vec3 u_colorMask;\nuniform float u_colorMaskTolerance;\n#endif // DRAW_MODE_colorMask\n\n#ifdef ENABLE_fisheye\nuniform float u_fisheye;\n#endif // ENABLE_fisheye\n#ifdef ENABLE_whirl\nuniform float u_whirl;\n#endif // ENABLE_whirl\n#ifdef ENABLE_pixelate\nuniform float u_pixelate;\nuniform vec2 u_skinSize;\n#endif // ENABLE_pixelate\n#ifdef ENABLE_mosaic\nuniform float u_mosaic;\n#endif // ENABLE_mosaic\n#ifdef ENABLE_ghost\nuniform float u_ghost;\n#endif // ENABLE_ghost\n\n#ifdef DRAW_MODE_line\nvarying vec4 v_lineColor;\nvarying float v_lineThickness;\nvarying float v_lineLength;\n#endif // DRAW_MODE_line\n\n#ifdef DRAW_MODE_background\nuniform vec4 u_backgroundColor;\n#endif // DRAW_MODE_background\n\nuniform sampler2D u_skin;\n\n#ifndef DRAW_MODE_background\nvarying vec2 v_texCoord;\n#endif\n\n// Add this to divisors to prevent division by 0, which results in NaNs propagating through calculations.\n// Smaller values can cause problems on some mobile devices.\nconst float epsilon = 1e-3;\n\n#if !defined(DRAW_MODE_silhouette) && (defined(ENABLE_color))\n// Branchless color conversions based on code from:\n// http://www.chilliant.com/rgb2hsv.html by Ian Taylor\n// Based in part on work by Sam Hocevar and Emil Persson\n// See also: https://en.wikipedia.org/wiki/HSL_and_HSV#Formal_derivation\n\n\n// Convert an RGB color to Hue, Saturation, and Value.\n// All components of input and output are expected to be in the [0,1] range.\nvec3 convertRGB2HSV(vec3 rgb)\n{\n\t// Hue calculation has 3 cases, depending on which RGB component is largest, and one of those cases involves a "mod"\n\t// operation. In order to avoid that "mod" we split the M==R case in two: one for G<B and one for B>G. The B>G case\n\t// will be calculated in the negative and fed through abs() in the hue calculation at the end.\n\t// See also: https://en.wikipedia.org/wiki/HSL_and_HSV#Hue_and_chroma\n\tconst vec4 hueOffsets = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\n\n\t// temp1.xy = sort B & G (largest first)\n\t// temp1.z = the hue offset we\'ll use if it turns out that R is the largest component (M==R)\n\t// temp1.w = the hue offset we\'ll use if it turns out that R is not the largest component (M==G or M==B)\n\tvec4 temp1 = rgb.b > rgb.g ? vec4(rgb.bg, hueOffsets.wz) : vec4(rgb.gb, hueOffsets.xy);\n\n\t// temp2.x = the largest component of RGB ("M" / "Max")\n\t// temp2.yw = the smaller components of RGB, ordered for the hue calculation (not necessarily sorted by magnitude!)\n\t// temp2.z = the hue offset we\'ll use in the hue calculation\n\tvec4 temp2 = rgb.r > temp1.x ? vec4(rgb.r, temp1.yzx) : vec4(temp1.xyw, rgb.r);\n\n\t// m = the smallest component of RGB ("min")\n\tfloat m = min(temp2.y, temp2.w);\n\n\t// Chroma = M - m\n\tfloat C = temp2.x - m;\n\n\t// Value = M\n\tfloat V = temp2.x;\n\n\treturn vec3(\n\t\tabs(temp2.z + (temp2.w - temp2.y) / (6.0 * C + epsilon)), // Hue\n\t\tC / (temp2.x + epsilon), // Saturation\n\t\tV); // Value\n}\n\nvec3 convertHue2RGB(float hue)\n{\n\tfloat r = abs(hue * 6.0 - 3.0) - 1.0;\n\tfloat g = 2.0 - abs(hue * 6.0 - 2.0);\n\tfloat b = 2.0 - abs(hue * 6.0 - 4.0);\n\treturn clamp(vec3(r, g, b), 0.0, 1.0);\n}\n\nvec3 convertHSV2RGB(vec3 hsv)\n{\n\tvec3 rgb = convertHue2RGB(hsv.x);\n\tfloat c = hsv.z * hsv.y;\n\treturn rgb * c + hsv.z - c;\n}\n#endif // !defined(DRAW_MODE_silhouette) && (defined(ENABLE_color))\n\nconst vec2 kCenter = vec2(0.5, 0.5);\n\nvoid main()\n{\n\t#if !(defined(DRAW_MODE_line) || defined(DRAW_MODE_background))\n\tvec2 texcoord0 = v_texCoord;\n\n\t#ifdef ENABLE_mosaic\n\ttexcoord0 = fract(u_mosaic * texcoord0);\n\t#endif // ENABLE_mosaic\n\n\t#ifdef ENABLE_pixelate\n\t{\n\t\t// TODO: clean up "pixel" edges\n\t\tvec2 pixelTexelSize = u_skinSize / u_pixelate;\n\t\ttexcoord0 = (floor(texcoord0 * pixelTexelSize) + kCenter) / pixelTexelSize;\n\t}\n\t#endif // ENABLE_pixelate\n\n\t#ifdef ENABLE_whirl\n\t{\n\t\tconst float kRadius = 0.5;\n\t\tvec2 offset = texcoord0 - kCenter;\n\t\tfloat offsetMagnitude = length(offset);\n\t\tfloat whirlFactor = max(1.0 - (offsetMagnitude / kRadius), 0.0);\n\t\tfloat whirlActual = u_whirl * whirlFactor * whirlFactor;\n\t\tfloat sinWhirl = sin(whirlActual);\n\t\tfloat cosWhirl = cos(whirlActual);\n\t\tmat2 rotationMatrix = mat2(\n\t\t\tcosWhirl, -sinWhirl,\n\t\t\tsinWhirl, cosWhirl\n\t\t);\n\n\t\ttexcoord0 = rotationMatrix * offset + kCenter;\n\t}\n\t#endif // ENABLE_whirl\n\n\t#ifdef ENABLE_fisheye\n\t{\n\t\tvec2 vec = (texcoord0 - kCenter) / kCenter;\n\t\tfloat vecLength = length(vec);\n\t\tfloat r = pow(min(vecLength, 1.0), u_fisheye) * max(1.0, vecLength);\n\t\tvec2 unit = vec / vecLength;\n\n\t\ttexcoord0 = kCenter + r * unit * kCenter;\n\t}\n\t#endif // ENABLE_fisheye\n\n\tgl_FragColor = texture2D(u_skin, texcoord0);\n\n\t#if defined(ENABLE_color) || defined(ENABLE_brightness)\n\t// Divide premultiplied alpha values for proper color processing\n\t// Add epsilon to avoid dividing by 0 for fully transparent pixels\n\tgl_FragColor.rgb = clamp(gl_FragColor.rgb / (gl_FragColor.a + epsilon), 0.0, 1.0);\n\n\t#ifdef ENABLE_color\n\t{\n\t\tvec3 hsv = convertRGB2HSV(gl_FragColor.xyz);\n\n\t\t// this code forces grayscale values to be slightly saturated\n\t\t// so that some slight change of hue will be visible\n\t\tconst float minLightness = 0.11 / 2.0;\n\t\tconst float minSaturation = 0.09;\n\t\tif (hsv.z < minLightness) hsv = vec3(0.0, 1.0, minLightness);\n\t\telse if (hsv.y < minSaturation) hsv = vec3(0.0, minSaturation, hsv.z);\n\n\t\thsv.x = mod(hsv.x + u_color, 1.0);\n\t\tif (hsv.x < 0.0) hsv.x += 1.0;\n\n\t\tgl_FragColor.rgb = convertHSV2RGB(hsv);\n\t}\n\t#endif // ENABLE_color\n\n\t#ifdef ENABLE_brightness\n\tgl_FragColor.rgb = clamp(gl_FragColor.rgb + vec3(u_brightness), vec3(0), vec3(1));\n\t#endif // ENABLE_brightness\n\n\t// Re-multiply color values\n\tgl_FragColor.rgb *= gl_FragColor.a + epsilon;\n\n\t#endif // defined(ENABLE_color) || defined(ENABLE_brightness)\n\n\t#ifdef ENABLE_ghost\n\tgl_FragColor *= u_ghost;\n\t#endif // ENABLE_ghost\n\n\t#ifdef DRAW_MODE_silhouette\n\t// Discard fully transparent pixels for stencil test\n\tif (gl_FragColor.a == 0.0) {\n\t\tdiscard;\n\t}\n\t// switch to u_silhouetteColor only AFTER the alpha test\n\tgl_FragColor = u_silhouetteColor;\n\t#else // DRAW_MODE_silhouette\n\n\t#ifdef DRAW_MODE_colorMask\n\tvec3 maskDistance = abs(gl_FragColor.rgb - u_colorMask);\n\tvec3 colorMaskTolerance = vec3(u_colorMaskTolerance, u_colorMaskTolerance, u_colorMaskTolerance);\n\tif (any(greaterThan(maskDistance, colorMaskTolerance)))\n\t{\n\t\tdiscard;\n\t}\n\t#endif // DRAW_MODE_colorMask\n\t#endif // DRAW_MODE_silhouette\n\n\t#ifdef DRAW_MODE_straightAlpha\n\t// Un-premultiply alpha.\n\tgl_FragColor.rgb /= gl_FragColor.a + epsilon;\n\t#endif\n\n\t#endif // !(defined(DRAW_MODE_line) || defined(DRAW_MODE_background))\n\n\t#ifdef DRAW_MODE_line\n\t// Maaaaagic antialiased-line-with-round-caps shader.\n\n\t// "along-the-lineness". This increases parallel to the line.\n\t// It goes from negative before the start point, to 0.5 through the start to the end, then ramps up again\n\t// past the end point.\n\tfloat d = ((v_texCoord.x - clamp(v_texCoord.x, 0.0, v_lineLength)) * 0.5) + 0.5;\n\n\t// Distance from (0.5, 0.5) to (d, the perpendicular coordinate). When we\'re in the middle of the line,\n\t// d will be 0.5, so the distance will be 0 at points close to the line and will grow at points further from it.\n\t// For the "caps", d will ramp down/up, giving us rounding.\n\t// See https://www.youtube.com/watch?v=PMltMdi1Wzg for a rough outline of the technique used to round the lines.\n\tfloat line = distance(vec2(0.5), vec2(d, v_texCoord.y)) * 2.0;\n\t// Expand out the line by its thickness.\n\tline -= ((v_lineThickness - 1.0) * 0.5);\n\t// Because "distance to the center of the line" decreases the closer we get to the line, but we want more opacity\n\t// the closer we are to the line, invert it.\n\tgl_FragColor = v_lineColor * clamp(1.0 - line, 0.0, 1.0);\n\t#endif // DRAW_MODE_line\n\n\t#ifdef DRAW_MODE_background\n\tgl_FragColor = u_backgroundColor;\n\t#endif\n}\n'},function(e,t){e.exports={rgbToHsv:(e,t)=>{let[n,r,i]=e,s=0;n/=255,r/=255,i/=255;let o=0;r<i&&(o=r,r=i,i=o,s=-1),n<r&&(o=n,n=r,r=o,s=-2/6-s);const a=n-Math.min(r,i),l=Math.abs(s+(r-i)/(6*a+Number.EPSILON)),c=a/(n+Number.EPSILON),u=n;return t[0]=l,t[1]=c,t[2]=u,t},hsvToRgb:(e,t)=>{let[n,r,i]=e;if(0===r)return t[0]=t[1]=t[2]=255*i+.5,t;n%=1;const s=6*n|0,o=6*n-s,a=i*(1-r),l=i*(1-r*o),c=i*(1-r*(1-o));let u=0,d=0,h=0;switch(s){case 0:u=i,d=c,h=a;break;case 1:u=l,d=i,h=a;break;case 2:u=a,d=i,h=c;break;case 3:u=a,d=l,h=i;break;case 4:u=c,d=a,h=i;break;case 5:u=i,d=a,h=l}return t[0]=255*u+.5,t[1]=255*d+.5,t[2]=255*h+.5,t}}},function(e,t,n){const r=n(11),i=n(38),s=n(28),o=n(29),a={color4f:[0,0,1,1],diameter:1},l=[0,0,0,0],c=65520;e.exports=class extends s{constructor(e,t){super(e,t),this._size=null,this._framebuffer=null,this._silhouetteDirty=!1,this._silhouettePixels=null,this._silhouetteImageData=null,this._lineOnBufferDrawRegionId={enter:()=>this._enterDrawLineOnBuffer(),exit:()=>this._exitDrawLineOnBuffer()},this._usePenBufferDrawRegionId={enter:()=>this._enterUsePenBuffer(),exit:()=>this._exitUsePenBuffer()},this.renderQuality=1,this._nativeSize=t.getNativeSize(),this._resetAttributeIndexes(),this.a_lineColor=new Float32Array(c),this.a_lineThicknessAndLength=new Float32Array(32760),this.a_penPoints=new Float32Array(c),this.a_position=new Float32Array(32760);for(let e=0;e<this.a_position.length;e+=12)this.a_position[e+0]=1,this.a_position[e+1]=0,this.a_position[e+2]=0,this.a_position[e+3]=0,this.a_position[e+4]=1,this.a_position[e+5]=1,this.a_position[e+6]=1,this.a_position[e+7]=1,this.a_position[e+8]=0,this.a_position[e+9]=0,this.a_position[e+10]=0,this.a_position[e+11]=1;this._lineBufferInfo=r.createBufferInfoFromArrays(this._renderer.gl,{a_position:{numComponents:2,data:this.a_position},a_lineColor:{numComponents:4,drawType:this._renderer.gl.STREAM_DRAW,data:this.a_lineColor},a_lineThicknessAndLength:{numComponents:2,drawType:this._renderer.gl.STREAM_DRAW,data:this.a_lineThicknessAndLength},a_penPoints:{numComponents:4,drawType:this._renderer.gl.STREAM_DRAW,data:this.a_penPoints}});this._lineShader=this._renderer._shaderManager.getShader(o.DRAW_MODE.line,0),this._drawTextureShader=this._renderer._shaderManager.getShader(o.DRAW_MODE.default,0),this._drawTextureRegionId={enter:()=>this._enterDrawTexture(),exit:()=>this._exitDrawTexture()},this.onNativeSizeChanged=this.onNativeSizeChanged.bind(this),this._renderer.on(i.Events.NativeSizeChanged,this.onNativeSizeChanged),this._setCanvasSize(t.getNativeSize())}dispose(){this._renderer.removeListener(i.Events.NativeSizeChanged,this.onNativeSizeChanged),this._renderer.gl.deleteTexture(this._texture),this._texture=null,super.dispose()}get size(){return this._nativeSize}useNearest(e){return Math.max(e[0],e[1])>=100}getTexture(e){return this._texture}clear(){this._renderer.enterDrawRegion(this._usePenBufferDrawRegionId);const e=this._renderer.gl;e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),this._silhouetteDirty=!0}drawPoint(e,t,n){this.drawLine(e,t,n,t,n)}drawLine(e,t,n,r,i){const s=e.diameter||a.diameter,o=1===s||3===s?.5:0;this._drawLineOnBuffer(e,t+o,n+o,r+o,i+o),this._silhouetteDirty=!0}_enterDrawLineOnBuffer(){this._resetAttributeIndexes();const e=this._renderer.gl;r.bindFramebufferInfo(e,this._framebuffer),e.viewport(0,0,this._size[0],this._size[1]);const t=this._lineShader;e.useProgram(t.program),r.setBuffersAndAttributes(e,t,this._lineBufferInfo);const n={u_skin:this._texture,u_stageSize:this._size};r.setUniforms(t,n)}_exitDrawLineOnBuffer(){this.a_lineColorIndex&&this._flushLines();const e=this._renderer.gl;r.bindFramebufferInfo(e,null)}_enterUsePenBuffer(){r.bindFramebufferInfo(this._renderer.gl,this._framebuffer)}_exitUsePenBuffer(){r.bindFramebufferInfo(this._renderer.gl,null)}_enterDrawTexture(){this._enterUsePenBuffer();const e=this._renderer.gl;e.viewport(0,0,this._size[0],this._size[1]),e.useProgram(this._drawTextureShader.program),r.setBuffersAndAttributes(e,this._drawTextureShader,this._renderer._bufferInfo)}_exitDrawTexture(){this._exitUsePenBuffer()}_drawPenTexture(e){this._renderer.enterDrawRegion(this._drawTextureRegionId);const t=this._renderer.gl,n=this._size[0],i=this._size[1],s={u_skin:e,u_projectionMatrix:r.m4.ortho(n/2,n/-2,i/-2,i/2,-1,1,r.m4.identity()),u_modelMatrix:r.m4.scaling(r.v3.create(n,i,0),r.m4.identity())};r.setTextureParameters(t,e,{minMag:t.NEAREST}),r.setUniforms(this._drawTextureShader,s),r.drawBufferInfo(t,this._renderer._bufferInfo,t.TRIANGLES)}_drawLineOnBuffer(e,t,n,r,i){this._renderer.enterDrawRegion(this._lineOnBufferDrawRegionId),this.a_lineColorIndex+24>c&&this._flushLines();const s=e.color4f||a.color4f;l[0]=s[0]*s[3],l[1]=s[1]*s[3],l[2]=s[2]*s[3],l[3]=s[3],t*=this.renderQuality,n*=this.renderQuality;const o=(r*=this.renderQuality)-t,u=(i*=this.renderQuality)-n,d=Math.sqrt(o*o+u*u),h=(e.diameter||a.diameter)*this.renderQuality;for(let e=0;e<6;e++)this.a_lineColor[this.a_lineColorIndex]=l[0],this.a_lineColorIndex++,this.a_lineColor[this.a_lineColorIndex]=l[1],this.a_lineColorIndex++,this.a_lineColor[this.a_lineColorIndex]=l[2],this.a_lineColorIndex++,this.a_lineColor[this.a_lineColorIndex]=l[3],this.a_lineColorIndex++,this.a_lineThicknessAndLength[this.a_lineThicknessAndLengthIndex]=h,this.a_lineThicknessAndLengthIndex++,this.a_lineThicknessAndLength[this.a_lineThicknessAndLengthIndex]=d,this.a_lineThicknessAndLengthIndex++,this.a_penPoints[this.a_penPointsIndex]=t,this.a_penPointsIndex++,this.a_penPoints[this.a_penPointsIndex]=-n,this.a_penPointsIndex++,this.a_penPoints[this.a_penPointsIndex]=o,this.a_penPointsIndex++,this.a_penPoints[this.a_penPointsIndex]=-u,this.a_penPointsIndex++}_resetAttributeIndexes(){this.a_lineColorIndex=0,this.a_lineThicknessAndLengthIndex=0,this.a_penPointsIndex=0}_flushLines(){const e=this._renderer.gl,t=this._lineShader;this.a_lineColorIndex<1e3?(r.setAttribInfoBufferFromArray(e,this._lineBufferInfo.attribs.a_lineColor,new Float32Array(this.a_lineColor.buffer,0,this.a_lineColorIndex),0),r.setAttribInfoBufferFromArray(e,this._lineBufferInfo.attribs.a_penPoints,new Float32Array(this.a_penPoints.buffer,0,this.a_penPointsIndex),0),r.setAttribInfoBufferFromArray(e,this._lineBufferInfo.attribs.a_lineThicknessAndLength,new Float32Array(this.a_lineThicknessAndLength.buffer,0,this.a_lineThicknessAndLengthIndex),0)):(r.setAttribInfoBufferFromArray(e,this._lineBufferInfo.attribs.a_lineColor,this.a_lineColor),r.setAttribInfoBufferFromArray(e,this._lineBufferInfo.attribs.a_penPoints,this.a_penPoints),r.setAttribInfoBufferFromArray(e,this._lineBufferInfo.attribs.a_lineThicknessAndLength,this.a_lineThicknessAndLength)),r.setBuffersAndAttributes(e,t,this._lineBufferInfo),r.drawBufferInfo(e,this._lineBufferInfo,e.TRIANGLES,this.a_lineThicknessAndLengthIndex/2),this._resetAttributeIndexes(),this._silhouetteDirty=!0}onNativeSizeChanged(e){this._nativeSize=e.newSize,this._setCanvasSize([e.newSize[0]*this.renderQuality,e.newSize[1]*this.renderQuality]),this.emitWasAltered()}_setCanvasSize(e){const[t,n]=e;if(this._size&&this._size[0]===t&&this._size[1]===n)return;this._size=e,this._rotationCenter[0]=this._nativeSize[0]/2,this._rotationCenter[1]=this._nativeSize[1]/2;const i=this._renderer.gl,s=this._texture;this._texture=r.createTexture(i,{mag:i.NEAREST,min:i.NEAREST,wrap:i.CLAMP_TO_EDGE,width:t,height:n});const o=[{format:i.RGBA,attachment:this._texture}];this._framebuffer,this._framebuffer=r.createFramebufferInfo(i,o,t,n),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),s&&this._drawPenTexture(s),this._silhouettePixels=new Uint8Array(Math.floor(t*n*4)),this._silhouetteImageData=new ImageData(t,n),this._silhouetteDirty=!0}setRenderQuality(e){this.renderQuality!==e&&(this.renderQuality=e,this._setCanvasSize([Math.round(this._nativeSize[0]*e),Math.round(this._nativeSize[1]*e)]))}updateSilhouette(){if(this._silhouetteDirty){this._renderer.enterDrawRegion(this._usePenBufferDrawRegionId);const e=this._renderer.gl;e.readPixels(0,0,this._size[0],this._size[1],e.RGBA,e.UNSIGNED_BYTE,this._silhouettePixels),this._silhouetteImageData.data.set(this._silhouettePixels),this._silhouette.update(this._silhouetteImageData,!0),this._silhouetteDirty=!1}}}},function(e,t,n){const r=n(11),i=n(28),{loadSvgString:s,serializeSvgToString:o}=n(35),a=n(29);e.exports=class extends i{constructor(e,t){super(e,t),this._svgImage=document.createElement("img"),this._svgImageLoaded=!1,this._size=[0,0],this._canvas=document.createElement("canvas"),this._context=this._canvas.getContext("2d"),this._scaledMIPs=[],this._largestMIPScale=0,this._maxTextureScale=1}dispose(){this.resetMIPs(),super.dispose()}get size(){return[this._size[0],this._size[1]]}useNearest(e,t){return!(t.enabledEffects&(a.EFFECT_INFO.fisheye.mask|a.EFFECT_INFO.whirl.mask|a.EFFECT_INFO.pixelate.mask|a.EFFECT_INFO.mosaic.mask))&&(t._direction%90==0&&(Math.abs(e[0])>99&&Math.abs(e[0])<101&&Math.abs(e[1])>99&&Math.abs(e[1])<101))}createMIP(e){const t=this._largestMIPScale<e;t||this._silhouette.unlazy();const[n,i]=this._size;if(this._canvas.width=n*e,this._canvas.height=i*e,this._canvas.width<=0||this._canvas.height<=0||this._svgImage.naturalWidth<=0||this._svgImage.naturalHeight<=0)return super.getTexture();this._context.clearRect(0,0,this._canvas.width,this._canvas.height),this._context.setTransform(e,0,0,e,0,0),this._context.drawImage(this._svgImage,0,0);const s=this._canvas,o={auto:!1,wrap:this._renderer.gl.CLAMP_TO_EDGE,src:s,premultiplyAlpha:!0},a=r.createTexture(this._renderer.gl,o);return t&&(this._silhouette.update(s),this._largestMIPScale=e),a}updateSilhouette(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[100,100];this.getTexture(e),this._silhouette.unlazy()}getTexture(e){const t=e?Math.max(Math.abs(e[0]),Math.abs(e[1])):100,n=Math.min(t/100,this._maxTextureScale),r=Math.max(Math.ceil(Math.log2(n))+8,0),i=Math.pow(2,r-8);return this._svgImageLoaded&&!this._scaledMIPs[r]&&(this._scaledMIPs[r]=this.createMIP(i)),this._scaledMIPs[r]||super.getTexture()}resetMIPs(){this._scaledMIPs.forEach((e=>this._renderer.gl.deleteTexture(e))),this._scaledMIPs.length=0,this._largestMIPScale=0}setSVG(e,t){const n=s(e),r=o(n,this._renderer.customFonts);this._svgImageLoaded=!1;const{x:i,y:a,width:l,height:c}=n.viewBox.baseVal;this._size[0]=l,this._size[1]=c,this._svgImage.onload=()=>{if(0===l||0===c)return void super.setEmptyImageData();const e=Math.ceil(Math.max(l,c)),n=this._renderer.maxTextureDimension;let r=2;for(;e*r<=n;r*=2)this._maxTextureScale=r;this.resetMIPs(),void 0===t&&(t=this.calculateRotationCenter()),this._rotationCenter[0]=t[0]-i,this._rotationCenter[1]=t[1]-a,this._svgImageLoaded=!0,this.emitWasAltered()},this._svgImage.src="data:image/svg+xml;utf8,".concat(encodeURIComponent(r))}}},function(e,t,n){const r=n(11),i=n(110),s=n(28),o=170,a=50,l=4,c=10,u=16,d=12,h="Helvetica",p=14,m=.9,f=16,g={BUBBLE_FILL:"white",BUBBLE_STROKE:"rgba(0, 0, 0, 0.15)",TEXT_FILL:"#575E75"};e.exports=class extends s{constructor(e,t){super(e,t),this._canvas=document.createElement("canvas"),this._size=[0,0],this._renderedScale=0,this._lines=[],this._textAreaSize={width:0,height:0},this._bubbleType="",this._pointsLeft=!1,this._textDirty=!0,this._textureDirty=!0,this.measurementProvider=new i(this._canvas.getContext("2d")),this.textWrapper=t.createTextWrapper(this.measurementProvider),this._restyleCanvas()}dispose(){this._texture&&(this._renderer.gl.deleteTexture(this._texture),this._texture=null),this._canvas=null,super.dispose()}get size(){return this._textDirty&&this._reflowLines(),this._size}setTextBubble(e,t,n){this._text=t,this._bubbleType=e,this._pointsLeft=n,this._textDirty=!0,this._textureDirty=!0,this.emitWasAltered()}_restyleCanvas(){this._canvas.getContext("2d").font="".concat(p,"px ").concat(h,", sans-serif")}_reflowLines(){this._lines=this.textWrapper.wrapText(o,this._text);let e=0;for(const t of this._lines)e=Math.max(e,this.measurementProvider.measureText(t));const t=Math.max(e,a)+2*c,n=f*this._lines.length+2*c;this._textAreaSize.width=t,this._textAreaSize.height=n,this._size[0]=t+l,this._size[1]=n+l+d,this._textDirty=!1}_renderTextBubble(e){const t=this._canvas.getContext("2d");this._textDirty&&this._reflowLines();const n=this._textAreaSize.width,r=this._textAreaSize.height;this._canvas.width=Math.ceil(this._size[0]*e),this._canvas.height=Math.ceil(this._size[1]*e),this._restyleCanvas(),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,this._canvas.width,this._canvas.height),t.scale(e,e),t.translate(.5*l,.5*l),t.save(),this._pointsLeft&&(t.scale(-1,1),t.translate(-n,0)),t.beginPath(),t.moveTo(u,r),t.arcTo(0,r,0,r-u,u),t.arcTo(0,0,n,0,u),t.arcTo(n,0,n,r,u),t.arcTo(n,r,n-u,r,u),t.save(),t.translate(n-u,r),"say"===this._bubbleType?(t.bezierCurveTo(0,4,4,8,4,10),t.arcTo(4,12,2,12,2),t.bezierCurveTo(-1,12,-11,8,-16,0),t.closePath()):(t.arc(-16,0,4,0,Math.PI),t.closePath(),t.moveTo(-7,7.25),t.arc(-9.25,7.25,2.25,0,2*Math.PI),t.moveTo(0,9.5),t.arc(-1.5,9.5,1.5,0,2*Math.PI)),t.restore(),t.fillStyle=g.BUBBLE_FILL,t.strokeStyle=g.BUBBLE_STROKE,t.lineWidth=l,t.stroke(),t.fill(),t.restore(),t.fillStyle=g.TEXT_FILL,t.font="".concat(p,"px ").concat(h,", sans-serif");const i=this._lines;for(let e=0;e<i.length;e++){const n=i[e];t.fillText(n,c,c+f*e+m*p)}this._renderedScale=e}updateSilhouette(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[100,100];this.getTexture(e)}getTexture(e){const t=e?Math.max(Math.abs(e[0]),Math.abs(e[1])):100,n=Math.min(10,t/100);if(this._textureDirty||this._renderedScale!==n){this._renderTextBubble(n),this._textureDirty=!1;const e=this._canvas.getContext("2d").getImageData(0,0,this._canvas.width,this._canvas.height),t=this._renderer.gl;if(null===this._texture){const e={auto:!1,wrap:t.CLAMP_TO_EDGE};this._texture=r.createTexture(t,e)}this._setTexture(e)}return this._texture}}},function(e,t,n){const r=n(393),i=n(398);e.exports=class{constructor(e){this._measurementProvider=e,this._cache={}}wrapText(e,t){t=t.normalize();const n="".concat(e,"-").concat(t);if(this._cache[n])return this._cache[n];const s=this._measurementProvider.beginMeasurementSession(),o=new r(t);let a,l=0,c=null;const u=[];for(;a=o.nextBreak();){const n=t.slice(l,a.position).replace(/\n+$/,"");let r=(c||"").concat(n),s=this._measurementProvider.measureText(r);if(s>e){if(this._measurementProvider.measureText(n)>e){let t,o=0;for(;o!==(t=i.nextBreak(n,o));){const i=n.substring(o,t);r=(c||"").concat(i),s=this._measurementProvider.measureText(r),null===c||s<=e?c=r:(u.push(c),c=i),o=t}}else null!==c&&u.push(c),c=n}else c=r;a.required&&(null!==c&&u.push(c),c=null),l=a.position}return c=c||"",(c.length>0||0===u.length)&&u.push(c),this._cache[n]=u,this._measurementProvider.endMeasurementSession(s),u}}},function(e,t,n){(function(){var t,r,i,s,o,a,l,c,u,d,h,p,m,f,g,y,b,v,S,w,k,T,x,E,A,C,I;S=n(111),T=n(395),C=n(396),C.BK,u=C.CR,C.LF,C.NL,o=C.CB,i=C.BA,C.SP,w=C.WJ,v=C.SP,s=C.BK,p=C.LF,f=C.NL,t=C.AI,r=C.AL,y=C.SA,b=C.SG,k=C.XX,l=C.CJ,C.ID,g=C.NS,C.characterClasses,I=n(397),d=I.DI_BRK,h=I.IN_BRK,a=I.CI_BRK,c=I.CP_BRK,I.PR_BRK,A=I.pairTable,E=T.toByteArray(" "),x=new S(E),m=function(){var e,n,m;function S(e){this.string=e,this.pos=0,this.lastPos=0,this.curClass=null,this.nextClass=null}return S.prototype.nextCodePoint=function(){var e,t;return e=this.string.charCodeAt(this.pos++),t=this.string.charCodeAt(this.pos),55296<=e&&e<=56319&&56320<=t&&t<=57343?(this.pos++,1024*(e-55296)+(t-56320)+65536):e},n=function(e){switch(e){case t:case y:case b:case k:return r;case l:return g;default:return e}},m=function(e){switch(e){case p:case f:return s;case o:return i;case v:return w;default:return e}},S.prototype.nextCharClass=function(e){return null==e&&(e=!1),n(x.get(this.nextCodePoint()))},e=function(e,t){this.position=e,this.required=null!=t&&t},S.prototype.nextBreak=function(){var t,r,l;for(null==this.curClass&&(this.curClass=m(this.nextCharClass()));this.pos<this.string.length;){if(this.lastPos=this.pos,r=this.nextClass,this.nextClass=this.nextCharClass(),this.curClass===s||this.curClass===u&&this.nextClass!==p)return this.curClass=m(n(this.nextClass)),new e(this.lastPos,!0);if(null==(t=function(){switch(this.nextClass){case v:return this.curClass;case s:case p:case f:return s;case u:return u;case o:return i}}.call(this))){switch(l=!1,A[this.curClass][this.nextClass]){case d:l=!0;break;case h:l=r===v;break;case a:if(!(l=r===v))continue;break;case c:if(r!==v)continue}if(this.curClass=this.nextClass,l)return new e(this.lastPos)}else if(this.curClass=t,this.nextClass===o)return new e(this.lastPos)}if(this.pos>=this.string.length)return this.lastPos<this.string.length?(this.lastPos=this.string.length,new e(this.string.length)):null},S}(),e.exports=m}).call(this)},function(e,t){var n=0,r=-3;function i(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function s(e,t){this.source=e,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=t,this.destLen=0,this.ltree=new i,this.dtree=new i}var o=new i,a=new i,l=new Uint8Array(30),c=new Uint16Array(30),u=new Uint8Array(30),d=new Uint16Array(30),h=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),p=new i,m=new Uint8Array(320);function f(e,t,n,r){var i,s;for(i=0;i<n;++i)e[i]=0;for(i=0;i<30-n;++i)e[i+n]=i/n|0;for(s=r,i=0;i<30;++i)t[i]=s,s+=1<<e[i]}var g=new Uint16Array(16);function y(e,t,n,r){var i,s;for(i=0;i<16;++i)e.table[i]=0;for(i=0;i<r;++i)e.table[t[n+i]]++;for(e.table[0]=0,s=0,i=0;i<16;++i)g[i]=s,s+=e.table[i];for(i=0;i<r;++i)t[n+i]&&(e.trans[g[t[n+i]]++]=i)}function b(e){e.bitcount--||(e.tag=e.source[e.sourceIndex++],e.bitcount=7);var t=1&e.tag;return e.tag>>>=1,t}function v(e,t,n){if(!t)return n;for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var r=e.tag&65535>>>16-t;return e.tag>>>=t,e.bitcount-=t,r+n}function S(e,t){for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var n=0,r=0,i=0,s=e.tag;do{r=2*r+(1&s),s>>>=1,++i,n+=t.table[i],r-=t.table[i]}while(r>=0);return e.tag=s,e.bitcount-=i,t.trans[n+r]}function w(e,t,n){var r,i,s,o,a,l;for(r=v(e,5,257),i=v(e,5,1),s=v(e,4,4),o=0;o<19;++o)m[o]=0;for(o=0;o<s;++o){var c=v(e,3,0);m[h[o]]=c}for(y(p,m,0,19),a=0;a<r+i;){var u=S(e,p);switch(u){case 16:var d=m[a-1];for(l=v(e,2,3);l;--l)m[a++]=d;break;case 17:for(l=v(e,3,3);l;--l)m[a++]=0;break;case 18:for(l=v(e,7,11);l;--l)m[a++]=0;break;default:m[a++]=u}}y(t,m,0,r),y(n,m,r,i)}function k(e,t,r){for(;;){var i,s,o,a,h=S(e,t);if(256===h)return n;if(h<256)e.dest[e.destLen++]=h;else for(i=v(e,l[h-=257],c[h]),s=S(e,r),a=o=e.destLen-v(e,u[s],d[s]);a<o+i;++a)e.dest[e.destLen++]=e.dest[a]}}function T(e){for(var t,i;e.bitcount>8;)e.sourceIndex--,e.bitcount-=8;if((t=256*(t=e.source[e.sourceIndex+1])+e.source[e.sourceIndex])!==(65535&~(256*e.source[e.sourceIndex+3]+e.source[e.sourceIndex+2])))return r;for(e.sourceIndex+=4,i=t;i;--i)e.dest[e.destLen++]=e.source[e.sourceIndex++];return e.bitcount=0,n}!function(e,t){var n;for(n=0;n<7;++n)e.table[n]=0;for(e.table[7]=24,e.table[8]=152,e.table[9]=112,n=0;n<24;++n)e.trans[n]=256+n;for(n=0;n<144;++n)e.trans[24+n]=n;for(n=0;n<8;++n)e.trans[168+n]=280+n;for(n=0;n<112;++n)e.trans[176+n]=144+n;for(n=0;n<5;++n)t.table[n]=0;for(t.table[5]=32,n=0;n<32;++n)t.trans[n]=n}(o,a),f(l,c,4,3),f(u,d,2,1),l[28]=0,c[28]=258,e.exports=function(e,t){var i,l,c=new s(e,t);do{switch(i=b(c),v(c,2,0)){case 0:l=T(c);break;case 1:l=k(c,o,a);break;case 2:w(c,c.ltree,c.dtree),l=k(c,c.ltree,c.dtree);break;default:l=r}if(l!==n)throw new Error("Data error")}while(!i);return c.destLen<c.dest.length?"function"==typeof c.dest.slice?c.dest.slice(0,c.destLen):c.dest.subarray(0,c.destLen):c.dest}},function(e,t,n){!function(e){"use strict";var t="undefined"!=typeof Uint8Array?Uint8Array:Array,n="+".charCodeAt(0),r="/".charCodeAt(0),i="0".charCodeAt(0),s="a".charCodeAt(0),o="A".charCodeAt(0),a="-".charCodeAt(0),l="_".charCodeAt(0);function c(e){var t=e.charCodeAt(0);return t===n||t===a?62:t===r||t===l?63:t<i?-1:t<i+10?t-i+26+26:t<o+26?t-o:t<s+26?t-s+26:void 0}e.toByteArray=function(e){var n,r,i,s,o,a;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var l=e.length;o="="===e.charAt(l-2)?2:"="===e.charAt(l-1)?1:0,a=new t(3*e.length/4-o),i=o>0?e.length-4:e.length;var u=0;function d(e){a[u++]=e}for(n=0,r=0;n<i;n+=4,r+=3)d((16711680&(s=c(e.charAt(n))<<18|c(e.charAt(n+1))<<12|c(e.charAt(n+2))<<6|c(e.charAt(n+3))))>>16),d((65280&s)>>8),d(255&s);return 2===o?d(255&(s=c(e.charAt(n))<<2|c(e.charAt(n+1))>>4)):1===o&&(d((s=c(e.charAt(n))<<10|c(e.charAt(n+1))<<4|c(e.charAt(n+2))>>2)>>8&255),d(255&s)),a},e.fromByteArray=function(e){var t,n,r,i,s=e.length%3,o="";function a(e){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)}for(t=0,r=e.length-s;t<r;t+=3)n=(e[t]<<16)+(e[t+1]<<8)+e[t+2],o+=a((i=n)>>18&63)+a(i>>12&63)+a(i>>6&63)+a(63&i);switch(s){case 1:o+=a((n=e[e.length-1])>>2),o+=a(n<<4&63),o+="==";break;case 2:o+=a((n=(e[e.length-2]<<8)+e[e.length-1])>>10),o+=a(n>>4&63),o+=a(n<<2&63),o+="="}return o}}(t)},function(e,t){(function(){t.OP=0,t.CL=1,t.CP=2,t.QU=3,t.GL=4,t.NS=5,t.EX=6,t.SY=7,t.IS=8,t.PR=9,t.PO=10,t.NU=11,t.AL=12,t.HL=13,t.ID=14,t.IN=15,t.HY=16,t.BA=17,t.BB=18,t.B2=19,t.ZW=20,t.CM=21,t.WJ=22,t.H2=23,t.H3=24,t.JL=25,t.JV=26,t.JT=27,t.RI=28,t.AI=29,t.BK=30,t.CB=31,t.CJ=32,t.CR=33,t.LF=34,t.NL=35,t.SA=36,t.SG=37,t.SP=38,t.XX=39}).call(this)},function(e,t){(function(){t.DI_BRK=0,t.IN_BRK=1,t.CI_BRK=2,t.CP_BRK=3,t.PR_BRK=4,t.pairTable=[[4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,4,4,4,4,4,4,4],[0,4,4,1,1,4,4,4,4,1,1,0,0,0,0,0,1,1,0,0,4,2,4,0,0,0,0,0,0],[0,4,4,1,1,4,4,4,4,1,1,1,1,1,0,0,1,1,0,0,4,2,4,0,0,0,0,0,0],[4,4,4,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,2,4,1,1,1,1,1,1],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,2,4,1,1,1,1,1,1],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,0,1,1,0,0,4,2,4,0,0,0,0,0,0],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,0,1,1,0,0,4,2,4,0,0,0,0,0,0],[0,4,4,1,1,1,4,4,4,0,0,1,0,0,0,0,1,1,0,0,4,2,4,0,0,0,0,0,0],[0,4,4,1,1,1,4,4,4,0,0,1,1,1,0,0,1,1,0,0,4,2,4,0,0,0,0,0,0],[1,4,4,1,1,1,4,4,4,0,0,1,1,1,1,0,1,1,0,0,4,2,4,1,1,1,1,1,0],[1,4,4,1,1,1,4,4,4,0,0,1,1,1,0,0,1,1,0,0,4,2,4,0,0,0,0,0,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0],[1,4,4,1,1,1,4,4,4,0,0,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0],[1,4,4,1,1,1,4,4,4,0,0,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0],[0,4,4,1,0,1,4,4,4,0,0,1,0,0,0,0,1,1,0,0,4,2,4,0,0,0,0,0,0],[0,4,4,1,0,1,4,4,4,0,0,0,0,0,0,0,1,1,0,0,4,2,4,0,0,0,0,0,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,2,4,1,1,1,1,1,1],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,0,1,1,0,4,4,2,4,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0],[1,4,4,1,1,1,4,4,4,0,0,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,2,4,1,1,1,1,1,1],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,1,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,1,1,1,1,0,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,1,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,0,1,1,0,0,4,2,4,0,0,0,0,0,1]]}).call(this)},function(e,t,n){(function(e){(function(){var r,i,s,o,a,l,c,u,d,h,p,m,f,g,y,b;b=n(399),r=b.CR,a=b.LF,i=b.Control,s=b.Extend,u=b.Regional_Indicator,d=b.SpacingMark,o=b.L,m=b.V,h=b.T,l=b.LV,c=b.LVT,p=n(111),f=new p(e("AA4QAAAAAAAAAHbgAQgG9/ntmkuIXjUUxzN+r3k4bUWQVotSHVCsoov6qIoiToWKFYvMuLHVtlaoLqQilLrwtakuxFYoLmQQYWalRYpUKYJV0am4mMUooojgSEG7EC2CdiHq/3rzMcc0yT333jyu0xz4kdwkN+ckOXncfN9QS4jzwCqwBqwHt5O0uuFGsBlsAhOM8lvATkv+LrAb7AXPgRfBAfAqeJ2UmwZvgcPgKDgGjoNZMAe+AN+C5W0hLgAXtvN3KZci7UpwFVgHbgHjYAPYJJ8nwCTYCnaQ58dI+cfBHvn8DFgL9kl9LyP8LLOflJ8CM+Q5K39IPo/28vfeyd6X8fcR/5jYP4v4nHyeR/iNjC8gPAl+BU+T8qcRFx0hBsGKzn/74LreIrdKxsGkRO0zE48wy7lmZSfnYkmWdhnCtTK+oHnnWqUPbuyY679N5t2J8B4ZnyTltyK+Dezq5P62G+Femf+sDPdp6n8JaQcterN5NWXJ5/Ij+FnGR0n6BvCbZk4kwjGjjO8rGh9woedNoudtBz6VSCQSiUQikUgkEomET97t5Hdp/ecvGfcXH+CdWfLNu6onxGowh7SvZPp3CE+A63v5feBJxMcQPyXz/0D4N2h18+cRhEcQnt+1674I+Q+inofANrAd7AAPg529lJfyUl7KS3mu8+4G94H7e/H3rPWRid3+RGIpc0nBGbAuE63F39VV1mjS6Pn4VCv++jN9bs4JMM5gbFSIdaNnpj+ppE3j+QQYWybEA8vytP0IPwF/gpXLsQ+AhWH0xYgQPwwJMTjA46YRXrnVw4vxzYjvke8dzvQx60gkEonE0uQA9oU3wB04J7yH/fDDVv4/j+x/QqfJXv0RuEueJe7t5vkTCLeQ88V2zVkjq+tRpD/Rzf+39hTC55lnkhdQbr+l7EHkTZH8GcTnSf4hkpf9/+uI57NQFT6HTSsC6hMYg3no/FrTF983sH84FJ3xNlroteOfQWNTp+8vL/CZeeX5mgb62A2w6WaDXa/9D/6DeFTafqwBfXtFT4irwacObMnm50/dPPwF4e/grwa0kUsTxiMEnQbcY9ZlsDXwL4iyOIfEB5jvcEgST1L/u/PjkP7vctzaZzkuJZSepknsMaw67jQ0xZe61F2XyvZ5k/ecJq4voXzQ1oZWQRm1Dl1ZH0LtiiVN8pUmy9nQD77bppuTLqWl1O9Ch+9vv9Dfm12COrZqOrXRJv13TX6i00XHyISLNamp3/e6eWWab9xyoYSr1+XeUoWug7ZWFTonhLDPO9M8pOX7cVHwbhn7Yu1VantC61ZtMPWhaiMtX0YXp1wsf7X5p65sW/OslnXpV3XrN803WneXlC0zvj5EZ5sP/6yyXsQQ01rRVdJV/+XWXUZ/rPmp7gf9dNuZoKjOmOOZibqv6fY43fi6bp9pfoXyL1tZ0x5Fy6u+UcVOrm1FZxdOPS7OLi7sFaKaXt+2c/X71qELqbhcD4v8wgRnb6+rr459rqgr3H5T21tmza0r3LOnj/6oWkcmnP6pa7OPvve9dvmqm+PD1HdteyP3e7xsX/mcK7Y26tJV0bXfVI/vOa9bZ3wIbS9nraehKHiH248cn/KxtpX1bV3bQoptnGx+S9ND2xujn6jo+ku3Jvic16oO3djo7CsrnHWdM1dd9UPR/OFQ9rtKl2ZaQ4vaWWe9KGOzSV8dcenPZdvhUny1QZdW1ce4fuhSdGuYb/F1h8IV3/PPlR0+pOya6dofdPuDbt8oug9uis+YvguqjiHnnVDz1KbfR30637f1Y5U+1o2VrVxZMX37qvfcof1XJzFtCKG76plJCJ7fhTq/FJ0hqI/FFtMaGWOv69vjUsrePZTZQ331h8lm07dj1fpCn2Fi3EX09atn2L6Ynsv4AFfUernj4HucbGc8dU0w+aDL+4M6YmtLX0z3I7Ha4Fpn1bufKucck2/YfIhrP3dfci0h5puv9TfUPs21g8bbmvzQZ4tQfhNSiuZ4HVzp4rShTHt9icl2l31YVTqB6Eus81pd/U2xuwyxpYrNPsik1wCoDEZmyDMjCmXFZVtV8d12DqoMizP7zCeh9anyDw==","base64")),g=function(e,t){var n,r,i;return t=t||0,55296<=(n=e.charCodeAt(t))&&n<=56319?(r=n,56320<=(i=e.charCodeAt(t+1))&&i<=57343?1024*(r-55296)+(i-56320)+65536:r):56320<=n&&n<=57343?(i=n,55296<=(r=e.charCodeAt(t-1))&&r<=56319?1024*(r-55296)+(i-56320)+65536:i):n},y=function(e,t){return(e!==r||t!==a)&&(e===i||e===r||e===a||(t===i||t===r||t===a||(e!==o||t!==o&&t!==m&&t!==l&&t!==c)&&((e!==l&&e!==m||t!==m&&t!==h)&&((e!==c&&e!==h||t!==h)&&((e!==u||t!==u)&&(t!==s&&t!==d))))))},t.nextBreak=function(e,t){var n,r,i,s,o,a,l;if(null==t&&(t=0),t<0)return 0;if(t>=e.length-1)return e.length;for(i=f.get(g(e,t)),n=s=t+1,o=e.length;s<o;n=s+=1)if(!(55296<=(a=e.charCodeAt(n-1))&&a<=56319&&56320<=(l=e.charCodeAt(n))&&l<=57343)){if(r=f.get(g(e,n)),y(i,r))return n;i=r}return e.length},t.previousBreak=function(e,t){var n,r,i,s,o,a;if(null==t&&(t=e.length),t>e.length)return e.length;if(t<=1)return 0;for(t--,r=f.get(g(e,t)),n=s=t-1;s>=0;n=s+=-1)if(!(55296<=(o=e.charCodeAt(n))&&o<=56319&&56320<=(a=e.charCodeAt(n+1))&&a<=57343)){if(i=f.get(g(e,n)),y(i,r))return n+1;r=i}return 0},t.break=function(e){var n,r,i;for(i=[],r=0;(n=t.nextBreak(e,r))<e.length;)i.push(e.slice(r,n)),r=n;return r<e.length&&i.push(e.slice(r)),i},t.countBreaks=function(e){var n,r,i;for(r=0,i=0;(n=t.nextBreak(e,i))<e.length;)i=n,r++;return i<e.length&&r++,r}}).call(this)}).call(this,n(18).Buffer)},function(e){e.exports=JSON.parse('{"Other":0,"CR":1,"LF":2,"Control":3,"Extend":4,"Regional_Indicator":5,"SpacingMark":6,"L":7,"V":8,"T":9,"LV":10,"LVT":11}')},function(e,t){e.exports=".scratch-render-overlays {\n    position: absolute;\n    top: 0;\n    left: 0;\n    pointer-events: none;\n    overflow: hidden;\n}\n.scratch-render-overlays > * {\n    position: absolute;\n    top: 0;\n    left: 0;\n}\n"},function(e,t,n){const r=n(402),i=n(39),s=n(404),o=n(405),a=n(407),l=n(408),c=n(409),u=n(410),d=n(411),h=n(114),p=n(412);e.exports=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(()=>{const e=window.AudioContext||window.webkitAudioContext;if(!e)throw new Error("Browser does not support AudioContext");return new e})();this.audioContext=e,this.inputNode=this.audioContext.createGain(),this.inputNode.connect(this.audioContext.destination),this.audioBuffers={},this.loudness=null,this.effects=[u,d,h],r(this.audioContext)}get currentTime(){return this.audioContext.currentTime}get EFFECT_NAMES(){return{pitch:"pitch",pan:"pan"}}get DECAY_DURATION(){return.025}get DECAY_WAIT(){return.05}getInputNode(){return this.inputNode}_decodeSound(e){const t=e.data.buffer.slice(0),n=s();var r,a;return(r=this.audioContext,a=t,1===r.decodeAudioData.length?r.decodeAudioData(a):new Promise(((e,t)=>{r.decodeAudioData(a,(t=>e(t)),(e=>t(e)))}))).catch((()=>{if(0===e.data.length)return this._emptySound();const t=e.data.buffer.slice(0);return new o(this.audioContext).decode(t).catch((()=>this._emptySound()))})).then((e=>[n,e]),(e=>{i.warn("audio data could not be decoded",e)}))}_emptySound(){return this.audioContext.createBuffer(1,1,this.audioContext.sampleRate)}decodeSound(e){return this._decodeSound(e).then((e=>{let[t,n]=e;return this.audioBuffers[t]=n,t}))}decodeSoundPlayer(e){return this._decodeSound(e).then((e=>{let[t,n]=e;return new l(this,{id:t,buffer:n})}))}getLoudness(){return this.loudness||(this.loudness=new a(this.audioContext)),this.loudness.getLoudness()}createEffectChain(){const e=new c(this,this.effects);return e.connect(this),e}createBank(){return new p(this,this.createEffectChain())}}},function(e,t,n){const r=n(403);e.exports=function(e){if("undefined"!=typeof document)return r(e)}},function(e,t){const n=["mousedown","mouseup","keydown","keyup","touchstart","touchend"];e.exports=e=>{if("running"===e.state)return;const t=()=>{"running"===e.state&&(()=>{e.removeEventListener("statechange",t);for(const e of n)document.body.removeEventListener(e,r)})()};e.addEventListener("statechange",t);const r=()=>{e.resume()};for(const e of n)document.body.addEventListener(e,r)}},function(e,t){const n="!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";e.exports=function(){const e=n.length,t=[];for(let r=0;r<20;r++)t[r]=n.charAt(Math.random()*e);return t.join("")}},function(e,t,n){const r=n(406),i=n(39),s=[7,8,9,10,11,12,13,14,16,17,19,21,23,25,28,31,34,37,41,45,50,55,60,66,73,80,88,97,107,118,130,143,157,173,190,209,230,253,279,307,337,371,408,449,494,544,598,658,724,796,876,963,1060,1166,1282,1411,1552,1707,1878,2066,2272,2499,2749,3024,3327,3660,4026,4428,4871,5358,5894,6484,7132,7845,8630,9493,10442,11487,12635,13899,15289,16818,18500,20350,22385,24623,27086,29794,32767],o=[-1,-1,-1,-1,2,4,6,8,-1,-1,-1,-1,2,4,6,8];let a=null;e.exports=class{constructor(e){this.audioContext=e}static get STEP_TABLE(){return s}static get INDEX_TABLE(){return o}decode(e){return new Promise(((t,n)=>{const s=new r(e);"RIFF"!==s.readUint8String(4)&&(i.warn("incorrect adpcm wav header"),n(new Error("incorrect adpcm wav header")));const o=s.readInt32();o+8!==e.byteLength&&i.warn("adpcm wav length in header: ".concat(o," is incorrect"));"WAVE"!==s.readUint8String(4)&&(i.warn("incorrect adpcm wav header"),n(new Error("incorrect adpcm wav header")));const a=this.extractChunk("fmt ",s);this.encoding=a.readUint16(),this.channels=a.readUint16(),this.samplesPerSecond=a.readUint32(),this.bytesPerSecond=a.readUint32(),this.blockAlignment=a.readUint16(),this.bitsPerSample=a.readUint16(),a.position+=2,this.samplesPerBlock=a.readUint16(),this.adpcmBlockSize=(this.samplesPerBlock-1)/2+4;const l=this.extractChunk("data",s),c=this.numberOfSamples(l,this.adpcmBlockSize),u=this.audioContext.createBuffer(1,c,this.samplesPerSecond);this.imaDecompress(l,this.adpcmBlockSize,u.getChannelData(0)),t(u)}))}extractChunk(e,t){for(t.position=12;t.position<t.getLength()-8;){const n=t.readUint8String(4),r=t.readInt32();if(n===e){return t.extract(r)}t.position+=r}}numberOfSamples(e,t){if(!e)return 0;e.position=0;const n=e.getBytesAvailable();return(n/t|0)*(2*(t-4))+1+2*Math.max(n%t-4,0)+Math.min(n%t,1)}imaDecompress(e,t,n){let r,i,l,c=0,u=-1;if(!e)return;e.position=0;const d=n.length,h=2*(t-4),p=function(){if(null===a){const e=s.length,t=o.length;a=new Array(e*t).fill(0);let n=0;for(let r=0;r<e;r++)for(let e=0;e<t;e++){const t=s[r];let i=0;4&e&&(i+=t),2&e&&(i+=t>>1),1&e&&(i+=t>>2),i+=t>>3,a[n++]=8&e?-i:i}}return a}();let m=0;for(;m<d;){r=e.readInt16(),c=e.readUint8(),e.position++,c>88&&(c=88),n[m++]=r/32768;const t=Math.min(h,d-m),s=m;for(;m-s<t;)u=e.readUint8(),i=15&u,l=p[16*c+i],c+=o[i],c>88?c=88:c<0&&(c=0),r+=l,r>32767?r=32767:r<-32768&&(r=-32768),n[m++]=r/32768,i=u>>4&15,l=p[16*c+i],c+=o[i],c>88?c=88:c<0&&(c=0),r+=l,r>32767?r=32767:r<-32768&&(r=-32768),n[m++]=r/32768}}}},function(e,t){class n{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.byteLength,{_uint8View:r=new Uint8Array(e)}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.arrayBuffer=e,this.start=t,this.end=n,this._uint8View=r,this._position=t}extract(e){return new n(this.arrayBuffer,this._position,this._position+e,this)}getLength(){return this.end-this.start}getBytesAvailable(){return this.end-this._position}get position(){return this._position-this.start}set position(e){this._position=e+this.start}readUint8(){const e=this._uint8View[this._position];return this._position+=1,e}readUint8String(e){const t=this._uint8View;let n="";const r=this._position+e;for(let e=this._position;e<r;e++)n+=String.fromCharCode(t[e]);return this._position+=e,n}readInt16(){const e=new Int16Array(this.arrayBuffer,this._position,1)[0];return this._position+=2,e}readUint16(){const e=new Uint16Array(this.arrayBuffer,this._position,1)[0];return this._position+=2,e}readInt32(){let e;return e=this._position%4==0?new Int32Array(this.arrayBuffer,this._position,1)[0]:new Int32Array(this.arrayBuffer.slice(this._position,this._position+4))[0],this._position+=4,e}readUint32(){const e=new Uint32Array(this.arrayBuffer,this._position,1)[0];return this._position+=4,e}}e.exports=n},function(e,t,n){const r=n(39);e.exports=class{constructor(e){this.audioContext=e,this.connectingToMic=!1,this.mic=null}getLoudness(){if(this.mic||this.connectingToMic||(this.connectingToMic=!0,navigator.mediaDevices.getUserMedia({audio:!0}).then((e=>{this.audioStream=e,this.mic=this.audioContext.createMediaStreamSource(e),this.analyser=this.audioContext.createAnalyser(),this.mic.connect(this.analyser),this.micDataArray=new Float32Array(this.analyser.fftSize)})).catch((e=>{r.warn(e)}))),this.mic&&this.audioStream.active){this.analyser.getFloatTimeDomainData(this.micDataArray);let e=0;for(let t=0;t<this.micDataArray.length;t++)e+=Math.pow(this.micDataArray[t],2);let t=Math.sqrt(e/this.micDataArray.length);return this._lastValue&&(t=Math.max(t,.6*this._lastValue)),this._lastValue=t,t*=1.63,t=Math.sqrt(t),t=Math.round(100*t),t=Math.min(t,100),t}return-1}}},function(e,t,n){const{EventEmitter:r}=n(19),i=n(114),s="ended";class o extends r{constructor(e,t){let{id:n,buffer:r}=t;super(),this.id=n,this.audioEngine=e,this.buffer=r,this.outputNode=null,this.volumeEffect=null,this.target=null,this.initialized=!1,this.isPlaying=!1,this.startingUntil=0,this.playbackRate=1,this.handleEvent=this.handleEvent.bind(this)}get isStarting(){return this.isPlaying&&this.startingUntil>this.audioEngine.currentTime}handleEvent(e){e.type===s&&this.onEnded()}onEnded(){this.emit("stop"),this.isPlaying=!1}_createSource(){null!==this.outputNode&&(this.outputNode.removeEventListener(s,this.handleEvent),this.outputNode.disconnect()),this.outputNode=this.audioEngine.audioContext.createBufferSource(),this.outputNode.playbackRate.value=this.playbackRate,this.outputNode.buffer=this.buffer,this.outputNode.addEventListener(s,this.handleEvent),null!==this.target&&this.connect(this.target)}initialize(){this.initialized=!0,this._createSource()}connect(e){return e===this.volumeEffect?(this.outputNode.disconnect(),void this.outputNode.connect(this.volumeEffect.getInputNode())):(this.target=e,this.initialized?(null===this.volumeEffect?(this.outputNode.disconnect(),this.outputNode.connect(e.getInputNode())):this.volumeEffect.connect(e),this):void 0)}dispose(){this.initialized&&(this.stopImmediately(),null!==this.volumeEffect&&(this.volumeEffect.dispose(),this.volumeEffect=null),this.outputNode.disconnect(),this.outputNode=null,this.target=null,this.initialized=!1)}take(){this.outputNode&&this.outputNode.removeEventListener(s,this.handleEvent);const e=new o(this.audioEngine,this);return e.playbackRate=this.playbackRate,this.isPlaying&&(e.startingUntil=this.startingUntil,e.isPlaying=this.isPlaying,e.initialized=this.initialized,e.outputNode=this.outputNode,e.outputNode.addEventListener(s,e.handleEvent),e.volumeEffect=this.volumeEffect,e.volumeEffect&&(e.volumeEffect.audioPlayer=e),null!==this.target&&e.connect(this.target),this.emit("stop"),e.emit("play")),this.outputNode=null,this.volumeEffect=null,this.initialized=!1,this.startingUntil=0,this.isPlaying=!1,e}play(){if(this.isStarting)return this.emit("stop"),void this.emit("play");this.isPlaying&&this.stop(),this.initialized?this._createSource():this.initialize(),this.outputNode.start(),this.isPlaying=!0;const{currentTime:e,DECAY_DURATION:t}=this.audioEngine;this.startingUntil=e+t,this.emit("play")}stop(){if(!this.isPlaying)return;const e=this.take();e.volumeEffect=new i(e.audioEngine,e,null),e.volumeEffect.connect(e.target),e.finished().then((()=>e.dispose())),e.volumeEffect.set(0);const{currentTime:t,DECAY_DURATION:n}=this.audioEngine;e.outputNode.stop(t+n)}stopImmediately(){this.isPlaying&&(this.outputNode.stop(),this.isPlaying=!1,this.startingUntil=0,this.emit("stop"))}finished(){return new Promise((e=>{this.once("stop",e)}))}setPlaybackRate(e){this.playbackRate=e,this.initialized&&(this.outputNode.playbackRate.value=e)}}e.exports=o},function(e,t){class n{constructor(e,t){this.audioEngine=e,this.inputNode=this.audioEngine.audioContext.createGain(),this.effects=t;let n=null;this._effects=t.reverse().map((t=>{const r=new t(e,this,n);return this[r.name]=r,n=r,r})).reverse(),this.firstEffect=this._effects[0],this.lastEffect=this._effects[this._effects.length-1],this._soundPlayers=new Set}clone(){const e=new n(this.audioEngine,this.effects);return this.target&&e.connect(this.target),e}addSoundPlayer(e){this._soundPlayers.has(e)||(this._soundPlayers.add(e),this.update())}removeSoundPlayer(e){this._soundPlayers.remove(e)}getInputNode(){return this.inputNode}connect(e){const{firstEffect:t,lastEffect:n}=this;if(e===n)return this.inputNode.disconnect(),void this.inputNode.connect(n.getInputNode());e!==t&&(this.target=e,t.connect(e))}getSoundPlayers(){return[...this._soundPlayers]}setEffectsFromTarget(e){this._effects.forEach((t=>{"soundEffects"in e&&t.name in e.soundEffects?t.set(e.soundEffects[t.name]):t.name in e&&t.set(e[t.name])}))}set(e,t){e in this&&this[e].set(t)}update(){this._effects.forEach((e=>e.update()))}clear(){this._effects.forEach((e=>e.clear()))}dispose(){this._soundPlayers=null,this._effects.forEach((e=>e.dispose())),this._effects=null}}e.exports=n},function(e,t,n){const r=n(61);e.exports=class extends r{constructor(e,t,n){super(e,t,n),this.leftGain=null,this.rightGain=null,this.channelMerger=null}get name(){return"pan"}initialize(){const e=this.audioEngine.audioContext;this.inputNode=e.createGain(),this.leftGain=e.createGain(),this.rightGain=e.createGain(),this.channelMerger=e.createChannelMerger(2),this.outputNode=this.channelMerger,this.inputNode.connect(this.leftGain),this.inputNode.connect(this.rightGain),this.leftGain.connect(this.channelMerger,0,0),this.rightGain.connect(this.channelMerger,0,1),this.initialized=!0}_set(e){this.value=e;const t=(e+100)/200,n=Math.cos(t*Math.PI/2),r=Math.sin(t*Math.PI/2),{currentTime:i,DECAY_WAIT:s,DECAY_DURATION:o}=this.audioEngine;this.leftGain.gain.setTargetAtTime(n,i+s,o),this.rightGain.gain.setTargetAtTime(r,i+s,o)}dispose(){this.initialized&&(this.inputNode.disconnect(),this.leftGain.disconnect(),this.rightGain.disconnect(),this.channelMerger.disconnect(),this.inputNode=null,this.leftGain=null,this.rightGain=null,this.channelMerger=null,this.outputNode=null,this.target=null,this.initialized=!1)}}},function(e,t,n){const r=n(61);e.exports=class extends r{constructor(e,t,n){super(e,t,n),this.ratio=1}get name(){return"pitch"}get _isPatch(){return!1}getInputNode(){return this.target.getInputNode()}initialize(){this.initialized=!0}_set(e){this.value=e,this.ratio=this.getRatio(this.value),this.updatePlayers(this.audioPlayer.getSoundPlayers())}update(){this.updatePlayers(this.audioPlayer.getSoundPlayers())}getRatio(e){const t=e/10;return Math.pow(2,t/12)}updatePlayer(e){e.setPlaybackRate(this.ratio)}updatePlayers(e){if(e)for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.updatePlayer(e[t])}}},function(e,t,n){const r=n(39);e.exports=class{constructor(e,t){this.audioEngine=e,this.soundPlayers={},this.playerTargets=new Map,this.soundEffects=new Map,this.effectChainPrime=t}addSoundPlayer(e){this.soundPlayers[e.id]=e}getSoundPlayer(e){return this.soundPlayers[e]||r.error("SoundBank.getSoundPlayer(".concat(e,"): called missing sound in bank")),this.soundPlayers[e]}getSoundEffects(e){return this.soundEffects.has(e)||this.soundEffects.set(e,this.effectChainPrime.clone()),this.soundEffects.get(e)}playSound(e,t){const n=this.getSoundEffects(t),r=this.getSoundPlayer(t);return this.playerTargets.get(t)!==e&&r.stop(),this.playerTargets.set(t,e),n.addSoundPlayer(r),n.setEffectsFromTarget(e),r.connect(n),r.play(),r.finished()}setEffects(e){this.playerTargets.forEach(((t,n)=>{t===e&&this.getSoundEffects(n).setEffectsFromTarget(e)}))}stop(e,t){this.playerTargets.get(t)===e&&this.soundPlayers[t].stop()}stopAllSounds(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*";this.playerTargets.forEach(((t,n)=>{"*"!==e&&t!==e||this.getSoundPlayer(n).stop()}))}dispose(){this.playerTargets.clear(),this.soundEffects.forEach((e=>e.dispose())),this.soundEffects.clear();for(const e in this.soundPlayers)Object.prototype.hasOwnProperty.call(this.soundPlayers,e)&&this.soundPlayers[e].dispose();this.soundPlayers={}}}},function(e,t,n){"use strict";n.r(t),n.d(t,"SB1File",(function(){return st})),n.d(t,"AssertionError",(function(){return r})),n.d(t,"ValidationError",(function(){return i}));class r extends Error{}class i extends r{}const s=function(e,t){if(!e)throw new r(t)};s.validate=function(e,t){if(!e)throw new i(t)};class o{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.buffer=e,this.position=t,this.uint8a=new Uint8Array(this.buffer)}read(e){const t=e.read(this.uint8a,this.position);return 0===e.size?this.position+=e.sizeOf(this.uint8a,this.position):this.position+=e.size,t}readStruct(e){const t=new e(this.uint8a,this.position);return this.position+=e.size,t}resize(e){if(this.buffer.byteLength<e){const t=this.uint8a,n=Math.pow(2,Math.ceil(Math.log(e)/Math.log(2)));this.buffer=new ArrayBuffer(n),this.uint8a=new Uint8Array(this.buffer),this.uint8a.set(t)}}write(e,t){return 0===e.size?this.resize(this.position+e.writeSizeOf(t)):this.resize(this.position+e.size),e.write(this.uint8a,this.position,t),0===e.size?this.position+=e.writeSizeOf(this.uint8a,this.position):this.position+=e.size,t}writeStruct(e,t){this.resize(this.position+e.size);const n=Object.assign(new e(this.uint8a,this.position),t);return this.position+=e.size,n}writeBytes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length;s(e instanceof Uint8Array,"writeBytes must be passed an Uint8Array"),this.resize(this.position+(n-t));for(let r=t;r<n;r++)this.uint8a[this.position+r-t]=e[r];return this.position+=n-t,e}}class a{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;this.iter=e,this.maxPosition=t}[Symbol.iterator](){return this}next(){return this.iter.stream.position>=this.maxPosition?{value:null,done:!0}:this.iter.next()}}const l=()=>{throw new Error("Not implemented")},c=(()=>{const e=new Uint16Array(1),t=new Uint8Array(e.buffer);return e[0]=43707,187===t[0]})();class u{constructor(e){let{size:t=0,sizeOf:n=(()=>t),writeSizeOf:r=l,toBytes:i=new Uint8Array(1),read:s,write:o=l}=e;this.size=t,this.sizeOf=n,this.writeSizeOf=r,this.toBytes=i,this.bytes=new Uint8Array(i.buffer),this.read=s,this.write=o}asPropertyObject(e){const t=this;return{get(){return t.read(this.uint8a,e+this.offset)},set(n){return t.write(this.uint8a,e+this.offset,n)},enumerable:!0}}read(){return null}}const d=new u({size:1,read:(e,t)=>e[t],write:(e,t,n)=>(e[t]=n,n)}),h={size:2,read(e,t){return this.bytes[1]=e[t+0],this.bytes[0]=e[t+1],this.toBytes[0]},write(e,t,n){return this.toBytes[0]=n,e[t+0]=this.bytes[1],e[t+1]=this.bytes[0],n}},p={size:2,read(e,t){return this.bytes[0]=e[t+0],this.bytes[1]=e[t+1],this.toBytes[0]},write(e,t,n){return this.toBytes[0]=n,e[t+0]=this.bytes[0],e[t+1]=this.bytes[1],n}};let m;m=c?h:p;new u(Object.assign({},m,{toBytes:new Uint16Array(1)}));const f=new u(Object.assign({},m,{toBytes:new Int16Array(1)})),g={size:4,read(e,t){return this.bytes[3]=e[t+0],this.bytes[2]=e[t+1],this.bytes[1]=e[t+2],this.bytes[0]=e[t+3],this.toBytes[0]},write(e,t,n){return this.toBytes[0]=n,e[t+0]=this.bytes[3],e[t+1]=this.bytes[2],e[t+2]=this.bytes[1],e[t+3]=this.bytes[0],n}},y={size:4,read(e,t){return this.bytes[0]=e[t+0],this.bytes[1]=e[t+1],this.bytes[2]=e[t+2],this.bytes[3]=e[t+3],this.toBytes[0]},write(e,t,n){return this.toBytes[0]=n,e[t+0]=this.bytes[0],e[t+1]=this.bytes[1],e[t+2]=this.bytes[2],e[t+3]=this.bytes[3],n}};let b;b=c?g:y;const v=new u(Object.assign({},b,{toBytes:new Int32Array(1)})),S=new u(Object.assign({},b,{toBytes:new Uint32Array(1)}));let w;w=c?p:h;const k=new u(Object.assign({},w,{toBytes:new Uint16Array(1)}));let T;T=c?y:g;const x=new u(Object.assign({},T,{toBytes:new Uint32Array(1)}));let E;E=c?{size:8,read(e,t){return this.bytes[7]=e[t+0],this.bytes[6]=e[t+1],this.bytes[5]=e[t+2],this.bytes[4]=e[t+3],this.bytes[3]=e[t+4],this.bytes[2]=e[t+5],this.bytes[1]=e[t+6],this.bytes[0]=e[t+7],this.toBytes[0]}}:{size:8,read(e,t){return this.bytes[7]=e[t+0],this.bytes[6]=e[t+1],this.bytes[5]=e[t+2],this.bytes[4]=e[t+3],this.bytes[3]=e[t+4],this.bytes[2]=e[t+5],this.bytes[1]=e[t+6],this.bytes[0]=e[t+7],this.toBytes[0]}};const A=new u(Object.assign({},E,{toBytes:new Float64Array(1)}));class C extends u{constructor(e){super({size:e,read(t,n){let r="";for(let i=0;i<e;i++){const e=t[n+i];s(e<=127,"Non-ascii character in FixedAsciiString"),r+=String.fromCharCode(e)}return r},write(t,n,r){for(let i=0;i<e;i++){const e=r.charCodeAt(i);s(e<=127,"Non-ascii character in FixedAsciiString"),t[n+i]=e}return r}})}}var I=n(21);const O=10485760;let M;M=new u(c?{size:3,read:(e,t)=>e[t+0]<<16|e[t+1]<<8|e[t+2]}:{size:3,read:(e,t)=>e[t+2]<<16|e[t+1]<<8|e[t+0]});const N=new u({sizeOf(e,t){const n=f.read(e,t);return f.size+n},read(e,t){let n=0,r=0;const i=f.read(e,t);for(let s=0;s<i;s++)n+=r*d.read(e,t++),r*=256;return n}}),R=new u({sizeOf(e,t){const n=S.read(e,t);return S.size+n},read(e,t){const n=S.read(e,t);s(n<O,"asciiString too big"),t+=4;let r="";for(let i=0;i<n;i++)r+=String.fromCharCode(e[t++]);return r}}),D=new u({sizeOf:(e,t)=>S.size+S.read(e,t),read(e,t){const n=S.read(e,t);return s(n<O,"bytes too big"),t+=S.size,s(n<O,"uint8a array too big"),new Uint8Array(e.buffer,t,n)}}),P=new u({sizeOf:(e,t)=>S.size+2*S.read(e,t),read(e,t){const n=S.read(e,t);s(n<O,"sound too big"),t+=S.size;const r=2*n;return s(r<O,"uint8a array too big"),new Uint8Array(e.buffer,t,r)}}),L=new u({sizeOf:(e,t)=>S.size+S.read(e,t)*S.size,read(e,t){const n=S.read(e,t);s(n<O,"bitmap too big"),t+=S.size,s(n<O,"uint8a array too big");const r=new Uint32Array(n);for(let i=0;i<n;i++)r[i]=S.read(e,t),t+=S.size;return r}});let B;B="undefined"==typeof TextDecoder?new I.TextDecoder:new TextDecoder;const z=new u({sizeOf:(e,t)=>S.size+S.read(e,t),read(e,t){const n=S.read(e,t);return s(n<O,"utf8 too big"),t+=S.size,s(n<O,"uint8a array too big"),B.decode(new Uint8Array(e.buffer,t,n))}}),U=new u({size:4,read(e,t){const n=S.read(e,t);return(255<<24|(n>>22&255)<<16|(n>>12&255)<<8|n>>2&255)>>>0}}),j=new u({size:5,read(e,t){const n=S.read(e,t);return(d.read(e,t)<<24|(n>>22&255)<<16|(n>>12&255)<<8|n>>2&255)>>>0}}),F={NULL:1,TRUE:2,FALSE:3,SMALL_INT:4,SMALL_INT_16:5,LARGE_INT_POSITIVE:6,LARGE_INT_NEGATIVE:7,FLOATING:8,STRING:9,SYMBOL:10,BYTES:11,SOUND:12,BITMAP:13,UTF8:14,ARRAY:20,ORDERED_COLLECTION:21,SET:22,IDENTITY_SET:23,DICTIONARY:24,IDENTITY_DICTIONARY:25,COLOR:30,TRANSLUCENT_COLOR:31,POINT:32,RECTANGLE:33,FORM:34,SQUEAK:35,OBJECT_REF:99,MORPH:100,ALIGNMENT:104,STATIC_STRING:105,UPDATING_STRING:106,SAMPLED_SOUND:109,IMAGE_MORPH:110,SPRITE:124,STAGE:125,WATCHER:155,IMAGE_MEDIA:162,SOUND_MEDIA:164,MULTILINE_STRING:171,WATCHER_READOUT_FRAME:173,WATCHER_SLIDER:174,LIST_WATCHER:175},W=Object.entries(F).reduce(((e,t)=>{let[n,r]=t;return e[r]=n,e}),{});class V{constructor(e,t){this.classId=e,this.position=t}}const G=e=>"object"==typeof e&&e?e.valueOf():e;class q extends V{constructor(e,t,n){super(e,t),this.value=n}valueOf(){return this.value}toJSON(){return this.classId===F.TRANSLUCENT_COLOR||this.classId===F.COLOR?16777215&this.value:this.value}toString(){return this.value}}class Y extends V{constructor(e,t,n){super(e,t),this.size=n}}class H extends V{constructor(e,t,n){super(e,t),this.index=n}valueOf(){return"Ref(".concat(this.index,")")}}class _ extends Y{constructor(e,t,n,r){super(e,t,r),this.version=n}}class K{constructor(e){let{type:t=q,read:n,value:r=(n?e=>e.read(n):null)}=e;this.type=t,this.value=r}next(e,t,n){return{value:new this.type(t,n,this.value(e)),done:!1}}}const Q={[F.NULL]:{value:()=>null},[F.TRUE]:{value:()=>!0},[F.FALSE]:{value:()=>!1},[F.SMALL_INT]:{read:v},[F.SMALL_INT_16]:{read:f},[F.LARGE_INT_POSITIVE]:{read:N},[F.LARGE_INT_NEGATIVE]:{read:N},[F.FLOATING]:{read:A},[F.STRING]:{read:R},[F.SYMBOL]:{read:R},[F.BYTES]:{read:D},[F.SOUND]:{read:P},[F.BITMAP]:{read:L},[F.UTF8]:{read:z},[F.ARRAY]:{type:Y,read:v},[F.ORDERED_COLLECTION]:{type:Y,read:v},[F.SET]:{type:Y,read:v},[F.IDENTITY_SET]:{type:Y,read:v},[F.DICTIONARY]:{type:Y,value:e=>2*e.read(v)},[F.IDENTITY_DICTIONARY]:{type:Y,value:e=>2*e.read(v)},[F.COLOR]:{read:U},[F.TRANSLUCENT_COLOR]:{read:j},[F.POINT]:{type:Y,value:()=>2},[F.RECTANGLE]:{type:Y,value:()=>4},[F.FORM]:{type:Y,value:()=>5},[F.SQUEAK]:{type:Y,value:()=>6},[F.OBJECT_REF]:{type:H,read:M}},X=Array.from({length:256},((e,t)=>Q[t]?new K(Q[t]):null)),Z=new K({type:class extends Y{constructor(e,t){super(e,t,0)}},value:()=>null});class J{constructor(e,t){this.buffer=e,this.stream=new o(e,t)}[Symbol.iterator](){return this}next(){if(this.stream.position>=this.stream.uint8a.length)return{value:null,done:!0};const e=this.stream.position,t=this.stream.read(d),n=X[t];if(null!==n)return n.next(this.stream,t,e);if(t<F.OBJECT_REF)return Z.next(this.stream,t,e);const r=this.stream.read(d),i=this.stream.read(d);return{value:new _(t,e,r,i),done:!1}}}class ${constructor(e){let{classId:t,version:n,fields:r}=e;this.classId=t,this.version=n,this.fields=r}get FIELDS(){return[]}get RAW_FIELDS(){return this.fields}string(e){return String(this.fields[e])}number(e){return+this.fields[e]}boolean(e){return!!this.fields[e]}toString(){return this.constructor===$?"".concat(this.constructor.name," ").concat(this.classId," ").concat(W[this.classId]):this.constructor.name}static define(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$;class n extends t{get FIELDS(){return e}static get FIELDS(){return e}}return Object.keys(e).forEach((t=>{const r=e[t];Object.defineProperty(n.prototype,t.toLowerCase().replace(/_(\w)/g,(e=>{let[,t]=e;return t.toUpperCase()})),{get(){return this.fields[r]}})})),n}}class ee{constructor(){let e;this.bit=new Uint32Array(1),this.crc=0,this.c=0,this.table=[];for(let t=0;t<256;t++){e=t;for(let t=0;t<8;t++)e=1&e?3988292384^e>>>1:e>>>1;this.table[t]=e>>>0}}update(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=~this.crc>>>0;for(let i=0;i<n;i++)r=r>>>8^this.table[255&(r^e[t+i])];return this.crc=~r>>>0,this}get digest(){return this.crc}}const te=[0,4278190080,4294967295,4286611584,4294901760,4278255360,4278190335,4278255615,4294967040,4294902015,4280295456,4282400832,4284506208,4288651167,4290756543,4292861919,4278716424,4279242768,4279769112,4280821800,4281348144,4281874488,4282927176,4283453520,4283979864,4285032552,4285558896,4286085240,4287072135,4287598479,4288124823,4289177511,4289703855,4290230199,4291282887,4291809231,4292335575,4293388263,4293914607,4294440951,4278190080,4278203136,4278216192,4278229248,4278242304,4278255360,4278190131,4278203187,4278216243,4278229299,4278242355,4278255411,4278190182,4278203238,4278216294,4278229350,4278242406,4278255462,4278190233,4278203289,4278216345,4278229401,4278242457,4278255513,4278190284,4278203340,4278216396,4278229452,4278242508,4278255564,4278190335,4278203391,4278216447,4278229503,4278242559,4278255615,4281532416,4281545472,4281558528,4281571584,4281584640,4281597696,4281532467,4281545523,4281558579,4281571635,4281584691,4281597747,4281532518,4281545574,4281558630,4281571686,4281584742,4281597798,4281532569,4281545625,4281558681,4281571737,4281584793,4281597849,4281532620,4281545676,4281558732,4281571788,4281584844,4281597900,4281532671,4281545727,4281558783,4281571839,4281584895,4281597951,4284874752,4284887808,4284900864,4284913920,4284926976,4284940032,4284874803,4284887859,4284900915,4284913971,4284927027,4284940083,4284874854,4284887910,4284900966,4284914022,4284927078,4284940134,4284874905,4284887961,4284901017,4284914073,4284927129,4284940185,4284874956,4284888012,4284901068,4284914124,4284927180,4284940236,4284875007,4284888063,4284901119,4284914175,4284927231,4284940287,4288217088,4288230144,4288243200,4288256256,4288269312,4288282368,4288217139,4288230195,4288243251,4288256307,4288269363,4288282419,4288217190,4288230246,4288243302,4288256358,4288269414,4288282470,4288217241,4288230297,4288243353,4288256409,4288269465,4288282521,4288217292,4288230348,4288243404,4288256460,4288269516,4288282572,4288217343,4288230399,4288243455,4288256511,4288269567,4288282623,4291559424,4291572480,4291585536,4291598592,4291611648,4291624704,4291559475,4291572531,4291585587,4291598643,4291611699,4291624755,4291559526,4291572582,4291585638,4291598694,4291611750,4291624806,4291559577,4291572633,4291585689,4291598745,4291611801,4291624857,4291559628,4291572684,4291585740,4291598796,4291611852,4291624908,4291559679,4291572735,4291585791,4291598847,4291611903,4291624959,4294901760,4294914816,4294927872,4294940928,4294953984,4294967040,4294901811,4294914867,4294927923,4294940979,4294954035,4294967091,4294901862,4294914918,4294927974,4294941030,4294954086,4294967142,4294901913,4294914969,4294928025,4294941081,4294954137,4294967193,4294901964,4294915020,4294928076,4294941132,4294954188,4294967244,4294902015,4294915071,4294928127,4294941183,4294954239,4294967295],ne=[4294967295,4278190080],re=new u({sizeOf(e,t){const n=e[t];return n<=223?1:n<=254?2:5},read(e,t){const n=e[t];return n<=223?n:n<=254?256*(n-224)+e[t+1]:S.read(e,t+1)}});class ie{decode(e,t,n,r,i){const s=this.decodePixels(r,32===n);if(n<=8)return i||(i=1===n?ne:te),this.unpackPixels(s,e,t,n,i);if(16===n)return this.raster16To32(s,e,t);if(32===n)return s;throw new Error("Unhandled Squeak Image depth.")}decodePixels(e,t){let n;if(Array.isArray(e)||e instanceof Uint32Array){if(n=new Uint32Array(e),t)for(let e=0;e<n.length;e++)0!==n[e]&&(n[e]=4278190080|n[e]);return n}const r=new o(e.buffer,e.byteOffset),i=r.read(re);n=new Uint32Array(i);let s=0;for(;s<i;){const e=r.read(re),i=e>>2;let o;switch(3&e){case 0:s+=i;break;case 1:o=r.read(d),o|=o<<24|o<<16|o<<8,t&&0!==o&&(o|=4278190080);for(let e=0;e<i;e++)n[s++]=o;break;case 2:o=r.read(S),t&&0!==o&&(o|=4278190080);for(let e=0;e<i;e++)n[s++]=o;break;case 3:for(let e=0;e<i;e++)o=r.read(S),t&&0!==o&&(o|=4278190080),n[s++]=o}}return n}unpackPixels(e,t,n,r,i){const s=new Uint32Array(t*n),o=(1<<r)-1,a=32/r;let l=0,c=0;for(let u=0;u<n;u++){let n,u=-1;for(let d=0;d<t;d++)u<0&&(u=r*(a-1),n=e[c++]),s[l++]=i[n>>u&o],u-=r}return s}raster16To32(e,t,n){const r=new Uint32Array(2*e.length);let i,s,o,a=0,l=0;for(let c=0;c<n;c++){i=-1;for(let n=0;n<t;n++){if(i<0&&(i=16,s=e[a++]),o=s>>i&65535,0!==o){o=4278190080|(o>>7&248)<<16|(o>>2&248)<<8|o<<3&248}r[l++]=o,i-=16}}return r}buildCustomColormap(e,t,n){const r=new Uint32Array(1<<e);for(let e=0;e<t.length;e++)r[e]=n[t[e].index-1];return r}}const se=[7,8,9,10,11,12,13,14,16,17,19,21,23,25,28,31,34,37,41,45,50,55,60,66,73,80,88,97,107,118,130,143,157,173,190,209,230,253,279,307,337,371,408,449,494,544,598,658,724,796,876,963,1060,1166,1282,1411,1552,1707,1878,2066,2272,2499,2749,3024,3327,3660,4026,4428,4871,5358,5894,6484,7132,7845,8630,9493,10442,11487,12635,13899,15289,16818,18500,20350,22385,24623,27086,29794,32767],oe={2:[-1,2,-1,2],3:[-1,-1,2,4,-1,-1,2,4],4:[-1,-1,-1,-1,2,4,6,8,-1,-1,-1,-1,2,4,6,8],5:[-1,-1,-1,-1,-1,-1,-1,-1,1,2,4,6,8,10,13,16,-1,-1,-1,-1,-1,-1,-1,-1,1,2,4,6,8,10,13,16]};class ae{constructor(e){this.bitsPerSample=e,this.indexTable=oe[e],this.signMask=1<<e-1,this.valueMask=this.signMask-1,this.valueHighBit=this.signMask>>1,this.bitPosition=0,this.currentByte=0,this.stream=null,this.end=0}decode(e){this.bitPosition=0,this.currentByte=0,this.stream=new o(e.buffer,e.byteOffset),this.end=e.byteOffset+e.length;const t=Math.floor(8*e.length/this.bitsPerSample),n=new Int16Array(t);let r=0,i=0;for(let e=0;e<t;e++){const t=this.nextCode();s(t>=0,"Ran out of bits in Squeak Sound");let o=se[i],a=0;for(let e=this.valueHighBit;e>0;e>>=1)t&e&&(a+=o),o>>=1;a+=o,r+=t&this.signMask?-a:a,i+=this.indexTable[t],i<0&&(i=0),i>88&&(i=88),r>32767&&(r=32767),r<-32768&&(r=-32768),n[e]=r}return n}nextCode(){let e=this.bitsPerSample,t=e-this.bitPosition,n=t<0?this.currentByte>>-t:this.currentByte<<t;for(;t>0;){if(e-=this.bitPosition,!(this.end-this.stream.position>0))return this.currentByte=0,this.bitPosition=0,-1;this.currentByte=this.stream.read(d),this.bitPosition=8,t=e-this.bitPosition,n+=t<0?this.currentByte>>-t:this.currentByte<<t}return this.bitPosition-=e,this.currentByte=this.currentByte&255>>8-this.bitPosition,n}static samples(e,t){return 8*t.length/e}}class le{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Uint8Array(this.size),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.uint8a=e,this.offset=t}equals(e){for(const t in e)if(this[t]!==e[t])return!1;return!0}view(){const e=this.constructor.name,t={toString:()=>e};for(const e in this.shape)t[e]=this[e];return t}static initConstructor(e){return e.size=e.prototype.size,e}static extend(e){const t=class extends le{get shape(){return e}};let n=0;return Object.keys(e).forEach((r=>{if(Object.defineProperty(t.prototype,r,e[r].asPropertyObject(n)),0===e[r].size)throw new Error("Packet cannot be defined with variable sized members.");n+=e[r].size})),t.prototype.size=n,t.size=n,t}}class ce extends(le.extend({riff:new C(4),length:x,wave:new C(4)})){}le.initConstructor(ce);class ue extends(le.extend({chunkType:new C(4),length:x})){}le.initConstructor(ue);class de extends(le.extend({format:k,channels:k,sampleRate:x,bytesPerSec:x,blockAlignment:k,bitsPerSample:k})){}le.initConstructor(de);class he{encode(e){let{channels:t=1,sampleRate:n=22050}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),i=ce.size+ue.size+de.size+ue.size+r.length,s=new o(new ArrayBuffer(i));return s.writeStruct(ce,{riff:"RIFF",length:i-8,wave:"WAVE"}),s.writeStruct(ue,{chunkType:"fmt ",length:de.size}),s.writeStruct(de,{format:1,channels:t,sampleRate:n,bytesPerSec:2*n*t,blockAlignment:2*t,bitsPerSample:16}),s.writeStruct(ue,{chunkType:"data",length:i-s.position-ue.size}),s.writeBytes(r),s.uint8a}static encode(e,t){return(new he).encode(e,t)}static samples(e){const t=new ue(e,ce.size).length;return new ue(e,ce.size+ue.size+t).length/2}}var pe=n(40),me=n.n(pe);class fe extends($.define({X:0,Y:1})){}class ge extends($.define({X:0,Y:1,X2:2,Y2:3})){get width(){return this.x2-this.x}get height(){return this.y2-this.y}}class ye extends($.define({WIDTH:0,HEIGHT:1,DEPTH:2,BYTES:4,COLORMAP:5})){get decoded(){return this._decoded||(this._decoded=(e=>{for(let t=0;t<e.length;t+=4){const n=e[t+2],r=e[t+0];e[t+2]=r,e[t+0]=n}return e})(new Uint8Array((new ie).decode(this.width.value,this.height.value,this.depth.value,this.bytes.value,this.colormap&&this.colormap.map((e=>e.valueOf()))).buffer))),this._decoded}get extension(){return"uncompressed"}}class be extends($.define({STAGE_CONTENTS:2,OBJ_NAME:6,VARS:7,BLOCKS_BIN:8,IS_CLONE:9,MEDIA:10,CURRENT_COSTUME:11,ZOOM:12,H_PAN:13,V_PAN:14,OBSOLETE_SAVED_STATE:15,SPRITE_ORDER_IN_LIBRARY:16,VOLUME:17,TEMPO_BPM:18,SCENE_STATES:19,LISTS:20})){get spriteOrderInLibrary(){return this.fields[this.FIELDS.SPRITE_ORDER_IN_LIBRARY]||null}get tempoBPM(){return this.fields[this.FIELDS.TEMPO_BPM]||0}get lists(){return this.fields[this.FIELDS.LISTS]||[]}}class ve extends($.define({BOX:0,PARENT:1,COLOR:3,VISIBLE:4,OBJ_NAME:6,VARS:7,BLOCKS_BIN:8,IS_CLONE:9,MEDIA:10,CURRENT_COSTUME:11,VISIBILITY:12,SCALE_POINT:13,ROTATION_DEGREES:14,ROTATION_STYLE:15,VOLUME:16,TEMPO_BPM:17,DRAGGABLE:18,SCENE_STATES:19,LISTS:20})){get scratchX(){return this.box.x+this.currentCostume.rotationCenter.x-240}get scratchY(){return 180-(this.box.y+this.currentCostume.rotationCenter.y)}get visible(){return!(1&this.fields[this.FIELDS.VISIBLE])}get tempoBPM(){return this.fields[this.FIELDS.TEMPO_BPM]||0}get lists(){return this.fields[this.FIELDS.LISTS]||[]}}$.define({RECTANGLE:0,FONT:8,COLOR:9,LINES:11});class Se extends($.define({COSTUME_NAME:0,BITMAP:1,ROTATION_CENTER:2,TEXT_DETAILS:3,BASE_LAYER_DATA:4,OLD_COMPOSITE:5})){get image(){return this.oldComposite instanceof ye?this.oldComposite:this.baseLayerData.value?null:this.bitmap}get width(){return null===this.image?-1:this.image.width}get height(){return null===this.image?-1:this.image.height}get rawBytes(){return null===this.image?this.baseLayerData.value.slice():this.image.bytes.value}get decoded(){return null===this.image?this.baseLayerData.value.slice():this.image.decoded}get crc(){if(!this._crc){const e=(new ee).update(new Uint8Array(new Uint32Array([this.bitmap.width]).buffer)).update(new Uint8Array(new Uint32Array([this.bitmap.height]).buffer)).update(new Uint8Array(new Uint32Array([this.bitmap.depth]).buffer)).update(this.rawBytes);this._crc=e.digest}return this._crc}get extension(){return this.oldComposite instanceof ye?"uncompressed":this.baseLayerData.value?"jpg":"uncompressed"}toString(){return'ImageMediaData "'.concat(this.costumeName,'"')}}class we extends($.define({DATA:3,RATE:4})){}class ke extends($.define({NAME:0,UNCOMPRESSED:1,RATE:4,BITS_PER_SAMPLE:5,DATA:6})){get rate(){return 0!==this.uncompressed.data.value.length?this.uncompressed.rate:this.fields[this.FIELDS.RATE]}get rawBytes(){return this.data&&this.data.value?this.data.value:this.uncompressed.data.value}get decoded(){return this._decoded||(this.data&&this.data.value?this._decoded=new ae(this.bitsPerSample.value).decode(this.data.value):this._decoded=new Int16Array((e=>{const t=new Uint8Array(e);for(let n=0;n<t.length;n+=2)t[n]=e[n+1],t[n+1]=e[n];return t})(this.uncompressed.data.value.slice()).buffer)),this._decoded}get crc(){return this._crc||(this._crc=(new ee).update(new Uint32Array([this.rate])).update(this.rawBytes).digest),this._crc}get sampleCount(){return this.data&&this.data.value?ae.samples(this.bitsPerSample.value,this.data.value):this.uncompressed.data.value.length/2}get extension(){return"pcm"}get wavEncodedData(){return this._wavEncodedData||(this._wavEncodedData=new Uint8Array(he.encode(this.decoded,{sampleRate:this.rate&&this.rate.value}))),this._wavEncodedData}get md5(){return this._md5||(this._md5=me()(this.wavEncodedData)),this._md5}toString(){return'SoundMediaData "'.concat(this.name,'"')}}class Te extends($.define({BOX:0,HIDDEN_WHEN_NULL:1,LIST_NAME:8,CONTENTS:9,TARGET:10})){get x(){return null===G(this.hiddenWhenNull)?5:this.box.x+1}get y(){return null===G(this.hiddenWhenNull)?5:this.box.y+1}get width(){return this.box.width-2}get height(){return this.box.height-2}}class xe extends($.define({BOX:0,PARENT:1,FRAMES:2,COLOR:3,DIRECTION:8,ALIGNMENT:9})){}class Ee extends($.define({BOX:0,PARENT:1,COLOR:3})){}class Ae extends($.define({BOX:0,COLOR:3,VALUE:8})){}class Ce extends($.define({BOX:0,READOUT_FRAME:1,COLOR:3,FONT:6,VALUE:8,TARGET:10,CMD:11,PARAM:13})){}class Ie extends($.define({BOX:0})){}const Oe=1,Me=2,Ne=3;class Re extends($.define({BOX:0,TARGET:1,SHAPE:2,READOUT:14,READOUT_FRAME:15,SLIDER:16,ALIGNMENT:17,SLIDER_MIN:20,SLIDER_MAX:21})){get x(){return this.box.x}get y(){return this.box.y}get mode(){return null===G(this.slider)?this.readoutFrame.box.height<=14?Oe:Me:Ne}get isDiscrete(){return Math.floor(this.sliderMin)===this.sliderMin&&Math.floor(this.sliderMax)===this.sliderMax&&Math.floor(this.readout.value)===this.readout.value}}const De={[F.POINT]:fe,[F.RECTANGLE]:ge,[F.FORM]:ye,[F.SQUEAK]:ye,[F.SAMPLED_SOUND]:we,[F.SPRITE]:ve,[F.STAGE]:be,[F.IMAGE_MEDIA]:Se,[F.SOUND_MEDIA]:ke,[F.ALIGNMENT]:xe,[F.MORPH]:Ee,[F.WATCHER_READOUT_FRAME]:Ie,[F.STATIC_STRING]:Ae,[F.UPDATING_STRING]:Ce,[F.WATCHER]:Re,[F.LIST_WATCHER]:Te},Pe=Array.from({length:256},((e,t)=>De[t]||null));class Le{constructor(e){this.valueIterator=e}[Symbol.iterator](){return this}next(){const e=this.valueIterator.next();if(e.done)return e;const t=e.value,{classId:n}=t;let r=t;if(t instanceof Y){r=[];for(let e=0;e<t.size;e++)r.push(this.next().value)}if(null!==Pe[n]||t instanceof _){r=new(Pe[t.classId]||$)({classId:t.classId,version:t.version,fields:r})}return{value:r,done:!1}}}class Be{constructor(e){this.table=Array.from(e),this.fixed=this.fix(this.table)}fix(){const e=[];for(let t=0;t<this.table.length;t++)this.fixItem(this.table[t]),e.push(this.table[t]);return e}fixItem(e){if(void 0!==e.fields&&(e=e.fields),Array.isArray(e))for(let t=0;t<e.length;t++)e[t]=this.deref(e[t])}deref(e){return e instanceof H?this.table[e.index-1]:e}}class ze extends(le.extend({support8Bit:d,png:new C(3),dosLineEnding:new C(2),dosEndOfFile:new C(1),unixLineEnding:new C(1)})){static validate(){s(this.equals({support8Bit:137,png:"PNG",dosLineEnding:"\r\n",dosEndOfFile:"",unixLineEnding:"\n"}),"PNGSignature does not match the expected values")}}le.initConstructor(ze);class Ue extends(le.extend({length:S,chunkType:new C(4)})){}le.initConstructor(Ue);class je extends(le.extend({checksum:S})){}le.initConstructor(je);class Fe extends(le.extend({width:S,height:S,bitDepth:d,colorType:d,compressionMethod:d,filterMethod:d,interlaceMethod:d})){}le.initConstructor(Fe);class We extends(le.extend({method:d})){}le.initConstructor(We);class Ve{constructor(){this.adler=1}update(e,t,n){let r=65535&this.adler,i=this.adler>>>16;for(let s=0;s<n;s++)r=(r+e[t+s])%65521,i=(i+r)%65521;return this.adler=i<<16|r,this}get digest(){return this.adler}}const Ge=65535;class qe extends(le.extend({cmf:d,flag:d})){}le.initConstructor(qe);class Ye extends(le.extend({lastPacket:d,length:k,lengthCheck:k})){}le.initConstructor(Ye);class He extends(le.extend({checksum:x})){}le.initConstructor(He);class _e{constructor(e){this.stream=e}get uint8a(){return this.stream.uint8a}set uint8a(e){return this.stream.uint8a=e,this.stream.uint8a}get position(){return this.stream.position}set position(e){return this.stream.position=e,this.stream.position}writeStruct(e,t){return this.stream.writeStruct(e,t)}writeBytes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length;return this.stream.writeBytes(e,t,n)}}class Ke extends _e{constructor(e){super(e),this.stream.writeStruct(qe,{cmf:8,flag:29}),this.adler=new Ve,this.chunk=this.stream.writeStruct(Ye,{lastPacket:0,length:0,lengthCheck:65535})}get _deflateIndex(){return this.chunk.length}set _deflateIndex(e){return this.chunk.length=e,this.chunk.lengthCheck=65535^e,this.chunk.length}writeStruct(e,t){this.writeBytes(Object.assign(new e,t).uint8a)}writeBytes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=t;for(;n-r>0;){this._deflateIndex===Ge&&(this.chunk=this.stream.writeStruct(Ye,{lastPacket:0,length:0,lengthCheck:65535}));const t=Math.min(n-r,Ge-this._deflateIndex);this.stream.writeBytes(e,r,r+t),this._deflateIndex+=t,r+=t}this.adler.update(e,t,n-t)}finish(){this.chunk.lastPacket=1,this.stream.writeStruct(He,{checksum:this.adler.digest})}static estimateSize(e){const t=Math.ceil(e/Ge);return qe.size+t*Ye.size+He.size+e}}class Qe extends _e{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"IHDR";super(e),this.start=this.stream.writeStruct(Ue,{length:0,chunkType:t}),this.crc=new ee}finish(){const e=this.start.offset+this.start.size,t=this.position-e;this.start.length=t,this.crc.update(this.stream.uint8a,e-S.size,t+S.size),this.stream.writeStruct(je,{checksum:this.crc.digest})}static size(e){return Ue.size+e+je.size}}class Xe{encode(e,t,n){const r=4*e+We.size,i=r*t,s=ze.size+Qe.size(Fe.size)+Qe.size(Ke.estimateSize(i))+Qe.size(0),a=new o(new ArrayBuffer(s));a.writeStruct(ze,{support8Bit:137,png:"PNG",dosLineEnding:"\r\n",dosEndOfFile:"",unixLineEnding:"\n"});const l=new Qe(a,"IHDR");l.writeStruct(Fe,{width:e,height:t,bitDepth:8,colorType:6,compressionMethod:0,filterMethod:0,interlaceMethod:0}),l.finish();const c=new Qe(a,"IDAT"),u=new Ke(c);let d=0;for(;d<n.length;){u.writeStruct(We,{method:0});const e=Math.min(n.length-d,r-We.size);u.writeBytes(n,d,d+e),d+=e}u.finish(),c.finish();return new Qe(a,"IEND").finish(),a.buffer}static encode(e,t,n){return(new Xe).encode(e,t,n)}}class Ze{constructor(e){this.file=e}async(e){return s("uint8array"===e,"SB1FakeZipFile only supports uint8array"),Promise.resolve(this.file.bytes)}}class Je{constructor(e){this.files=e}file(e){if(e in this.files)return new Ze(this.files[e])}}const $e=e=>"uncompressed"===e.extension?new Uint8Array(Xe.encode(e.width,e.height,e.decoded)):e.decoded,et=e=>{const t=String(e[e.length-1]),n=e.length-1;return"mouse"===t?e[n]="_mouse_":"edge"===t?e[n]="_edge_":e[e.length-1]instanceof be&&(e[n]="_stage_"),e},tt={getParam:e=>{let[t,n,r,i]=e;return[t,n,r,i||"r"]},changeVariable:e=>[e[2],e[1],e[3]],EventHatMorph:e=>"Scratch-StartClicked"===String(e[1])?["whenGreenFlag"]:["whenIReceive",e[1]],MouseClickEventHatMorph:()=>["whenClicked"],KeyEventHatMorph:e=>["whenKeyPressed",e[1]],stopScripts:e=>"other scripts"===String(e[1])?[e[0],"other scripts in sprite"]:e,abs:e=>["computeFunction:of:","abs",e[1]],sqrt:e=>["computeFunction:of:","sqrt",e[1]],"\\\\":e=>["%",...e.slice(1)],doReturn:()=>["stopScripts","this script"],stopAll:()=>["stopScripts","all"],"showBackground:":e=>["startScene",e[1]],nextBackground:()=>["nextScene"],doForeverIf:e=>["doForever",[["doIf",e[1],e[2]]]],"getAttribute:of:":et,"gotoSpriteOrMouse:":et,"distanceTo:":et,"pointTowards:":et,"touching:":et},nt=e=>{const{info:t,stageData:n,images:r,sounds:i}=e,s=e=>{const t=[];for(let n=0;n<e.length;n+=2)t.push([e[n],e[n+1]]);return t},o=e=>{let[t,n]=e;return{name:t,value:n,isPersistent:!1}},a=e=>{let[,{listName:t,contents:n,x:r,y:i,width:s,height:o,hiddenWhenNull:a}]=e;return{listName:t,contents:n,isPersistent:!1,x:r,y:i,width:s,height:o,visible:null!==(l=a,"object"==typeof l&&l?l.valueOf():l)};var l},l=e=>{const t=i.findIndex((t=>t.crc===e.crc));return{soundName:e.name,soundID:t,md5:"".concat(e.md5,".wav"),sampleCount:e.sampleCount,rate:e.rate,format:""}},c=e=>{const t=r.findIndex((t=>t.crc===e.crc));return{costumeName:e.costumeName,baseLayerID:t,baseLayerMD5:"".concat(me()(e.rawBytes),".").concat((n=e,"uncompressed"===n.extension?"png":"jpg")),bitmapResolution:1,rotationCenterX:e.rotationCenter.x,rotationCenterY:e.rotationCenter.y};var n},u=e=>{let t=e.map(h);const n=tt[t[0]];return n&&(t=n(t)),t},d=e=>e.map(u),h=e=>e instanceof ve?e.objName:Array.isArray(e)?0===e.length||Array.isArray(e[0])?d(e):u(e):e,p=e=>[e[0].x,e[0].y,d(e[1])],m=e=>e instanceof ve?(e=>{const t=e.media.filter((e=>e instanceof Se)),r=e.media.filter((e=>e instanceof ke));return{objName:e.objName,variables:s(e.vars).map(o),lists:s(e.lists).map(a),scripts:e.blocksBin.map(p),costumes:t.map(c),currentCostumeIndex:t.findIndex((t=>t.crc===e.currentCostume.crc)),sounds:r.map(l),scratchX:e.scratchX,scratchY:e.scratchY,scale:e.scalePoint.x,direction:Math.round(1e6*e.rotationDegrees)/1e6-270,rotationStyle:e.rotationStyle,isDraggable:e.draggable,indexInLibrary:n.spriteOrderInLibrary.indexOf(e),visible:e.visible,spriteInfo:{}}})(e):null;return JSON.parse(JSON.stringify(Object.assign((e=>{const t=e.media.filter((e=>e instanceof Se)),n=e.media.filter((e=>e instanceof ke));return{objName:e.objName,variables:s(e.vars).map(o),lists:s(e.lists).map(a),scripts:e.blocksBin.map(p),costumes:t.map(c),currentCostumeIndex:t.findIndex((t=>t.crc===e.currentCostume.crc)),sounds:n.map(l),penLayerMD5:"5c81a336fab8be57adc039a8a2b33ca9.png",penLayerID:0,tempoBPM:e.tempoBPM,videoAlpha:.5,children:e.stageContents.map(m).filter(Boolean).reverse()}})(n),{info:(e=>{const t={};for(let n=0;n<e.length;n+=2)"thumbnail"!==String(e[n])&&(t[String(e[n])]=String(e[n+1]));return t})(t)})))};class rt extends(le.extend({version:new C(10),infoByteLength:S})){validate(){s.validate(this.equals({version:"ScratchV01"})||this.equals({version:"ScratchV02"}),"Invalid Scratch file signature.")}}le.initConstructor(rt);class it extends(le.extend({ObjS:new C(4),ObjSValue:d,Stch:new C(4),StchValue:d,numObjects:S})){validate(){s.validate(this.equals({ObjS:"ObjS",ObjSValue:1,Stch:"Stch",StchValue:1}),"Invalid Scratch file info packet header.")}}le.initConstructor(it);class st{constructor(e){this.buffer=e,this.stream=new o(e),this.signature=this.stream.readStruct(rt),this.signature.validate(),this.infoHeader=this.stream.readStruct(it),this.infoHeader.validate(),this.stream.position+=this.signature.infoByteLength-it.size,this.dataHeader=this.stream.readStruct(it),this.dataHeader.validate()}get json(){return nt({info:this.info(),stageData:this.data(),images:this.images(),sounds:this.sounds()})}get zip(){return(e=>{let{images:t,sounds:n}=e;const r={};let i=0;for(const e of t)r["".concat(i++,".").concat((s=e,"uncompressed"===s.extension?"png":"jpg"))]={bytes:$e(e)};var s,o;i=0;for(const e of n)r["".concat(i++,".wav")]={bytes:(o=e,o.wavEncodedData)};return new Je(r)})({images:this.images(),sounds:this.sounds()})}view(){return{signature:this.signature,infoHeader:this.infoHeader,dataHeader:this.dataHeader,toString:()=>"SB1File"}}infoRaw(){return new a(new J(this.buffer,this.infoHeader.offset+it.size),this.signature.infoByteLength+rt.size)}infoTable(){return new Le(this.infoRaw())}info(){return this._info||(this._info=new Be(this.infoTable()).table[0]),this._info}dataRaw(){return new a(new J(this.buffer,this.dataHeader.offset+it.size),this.stream.uint8a.length)}dataTable(){return new Le(this.dataRaw())}dataFixed(){return this._data||(this._data=new Be(this.dataTable()).table),this._data}data(){return this.dataFixed()[0]}images(){const e=new Set;return this.dataFixed().filter((t=>t instanceof Se&&(!e.has(t.crc)&&(e.add(t.crc),!0))))}sounds(){const e=new Set;return this.dataFixed().filter((t=>t instanceof ke&&(!e.has(t.crc)&&(e.add(t.crc),!0))))}}},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"Scaffolding",(function(){return V})),n.d(r,"Cloud",(function(){return k})),n.d(r,"VM",(function(){return a.a})),n.d(r,"Renderer",(function(){return c.a})),n.d(r,"Storage",(function(){return g})),n.d(r,"AudioEngine",(function(){return p.a})),n.d(r,"JSZip",(function(){return s.a}));var i=n(22),s=n.n(i),o=n(63),a=n.n(o),l=n(106),c=n.n(l),u=n(112),d=n.n(u),h=n(113),p=n.n(h),m=n(35);class f extends d.a{constructor(){super(),this._totalAssets=0,this._loadedAssets=0}_updateProgress(){this.onprogress&&this.onprogress(this._totalAssets,this._loadedAssets)}load(e,t,n){return e===this.AssetType.ImageBitmap||e===this.AssetType.ImageVector||e===this.AssetType.Sound||e===this.AssetType.Font?(this._totalAssets++,this._updateProgress(),super.load(e,t,n).then((e=>(this._loadedAssets++,this._updateProgress(),e)))):super.load(e,t,n)}}var g=f;class y{constructor(){this._events={}}addEventListener(e,t){this._events[e]||(this._events[e]=[]),this._events[e].push(t)}removeEventListener(e,t){const n=this._events[e];n&&(this._events[e]=n.filter((e=>e!==t)))}dispatchEvent(e){const t=this._events[e.type];if(t)for(const n of t)n(e)}}const b=[],v=e=>{let t;var n;return 0===b.length?(n={audio:!1,video:e},t=navigator.mediaDevices?navigator.mediaDevices.getUserMedia(n):Promise.reject(new Error("video is not supported in this context (insecure domain?)")),b.push(t)):b.length>0&&(t=b[0],b.push(!0)),t};class S{constructor(){this.mirror=!0,this._frameCacheTimeout=16,this._video=null,this._track=null,this._workspace=[]}static get FORMAT_IMAGE_DATA(){return"image-data"}static get FORMAT_CANVAS(){return"canvas"}static get DIMENSIONS(){return[480,360]}static get ORDER(){return 1}get video(){return this._video}enableVideo(){return this.enabled=!0,this._setupVideo()}disableVideo(){this.enabled=!1,this._singleSetup&&this._singleSetup.then(this._teardown.bind(this)).catch((e=>this.onError(e)))}_teardown(){if(!1===this.enabled){const e=(b.pop(),!(b.length>0));this._singleSetup=null,this._video=null,this._track&&e&&this._track.stop(),this._track=null}}getFrame(e){let{dimensions:t=S.DIMENSIONS,mirror:n=this.mirror,format:r=S.FORMAT_IMAGE_DATA,cacheTimeout:i=this._frameCacheTimeout}=e;if(!this.videoReady)return null;const[s,o]=t,a=this._getWorkspace({dimensions:t,mirror:Boolean(n)}),{videoWidth:l,videoHeight:c}=this._video,{canvas:u,context:d,lastUpdate:h,cacheData:p}=a,m=Date.now();h+i<m&&(n&&(d.scale(-1,1),d.translate(-1*s,0)),d.drawImage(this._video,0,0,l,c,0,0,s,o),d.setTransform(1,0,0,1,0,0),a.lastUpdate=m),p[r]||(p[r]={lastUpdate:0});const f=p[r];return f.lastUpdate+i<m&&(r===S.FORMAT_IMAGE_DATA?f.lastData=d.getImageData(0,0,s,o):r===S.FORMAT_CANVAS?(f.lastUpdate=1/0,f.lastData=u):(console.error("video io error - unimplemented format ".concat(r)),f.lastUpdate=1/0,f.lastData=null),f.lastUpdate=Math.max(a.lastUpdate,f.lastUpdate)),f.lastData}onError(e){console.error("Unhandled video io device error",e)}_setupVideo(){return this._singleSetup||(this._singleSetup=v({width:{min:480,ideal:640},height:{min:360,ideal:480}}).then((e=>{this._video=document.createElement("video");try{this._video.srcObject=e}catch(t){this._video.src=window.URL.createObjectURL(e)}return this._video.play(),this._track=e.getTracks()[0],this})).catch((e=>{this._singleSetup=null,this.onError(e)}))),this._singleSetup}get videoReady(){if(!this.enabled)return!1;if(!this._video)return!1;if(!this._track)return!1;const{videoWidth:e,videoHeight:t}=this._video;return"number"==typeof e&&"number"==typeof t&&(0!==e&&0!==t)}_getWorkspace(e){let{dimensions:t,mirror:n}=e,r=this._workspace.find((e=>e.dimensions.join("-")===t.join("-")&&e.mirror===n));return r||(r={dimensions:t,mirror:n,canvas:document.createElement("canvas"),lastUpdate:0,cacheData:{}},r.canvas.width=t[0],r.canvas.height=t[1],r.context=r.canvas.getContext("2d"),this._workspace.push(r)),r}}var w=S;var k={CloudManager:class{constructor(e){this.parent=e,this.providers=[],this.overrides=new Map}hasCloudData(){return this.parent.vm.runtime.hasCloudData()}projectReady(){if(this.hasCloudData())for(const e of this.providers)e.enable()}setVariable(e,t,n){this.overrides.has(t)&&this.overrides.get(t)!==e||this.parent.vm.postIOData("cloud",{varUpdate:{name:t,value:n}})}getUsername(){return this.parent._username}addProvider(e){e.manager=this,this.hasCloudData()&&e.enable(),this.providers.push(e)}requestCloseConnection(){}createVariable(e,t){}renameVariable(e,t){}deleteVariable(e){}addProviderOverride(e,t){if(t&&!this.providers.includes(t))throw new Error("Manager is not aware of this provider");this.overrides.set(e,t)}updateVariable(e,t){if(this.overrides.has(e)){const n=this.overrides.get(e);n&&n.handleUpdateVariable(e,t)}else for(const n of this.providers)n.handleUpdateVariable(e,t)}},WebSocketProvider:class{constructor(e,t){this.cloudHosts=Array.isArray(e)?e:[e],this.projectId=t,this.attemptedConnections=0,this.bufferedMessages=[],this.scheduledBufferedSend=null,this.reconnectTimeout=null,this.openConnection=this.openConnection.bind(this),this._scheduledSendBufferedMessages=this._scheduledSendBufferedMessages.bind(this)}enable(){this.openConnection()}setProjectId(e){this.projectId=e,this.closeAndReconnect()}openConnection(){this.projectId||console.warn("Project ID is empty. Cloud variable connection is unlikely to work."),this.currentCloudHost=this.cloudHosts[this.attemptedConnections%this.cloudHosts.length],this.attemptedConnections++,console.log("Connecting to ".concat(this.currentCloudHost," with ID ").concat(this.projectId,", username ").concat(this.manager.getUsername()));try{this.ws=new WebSocket(this.currentCloudHost)}catch(e){throw console.error(e),new Error("Cloud host ".concat(this.currentCloudHost," is invalid: ").concat(e))}this.ws.onerror=this.onerror.bind(this),this.ws.onmessage=this.onmessage.bind(this),this.ws.onopen=this.onopen.bind(this),this.ws.onclose=this.onclose.bind(this)}onerror(e){console.error("WebSocket error",e)}onmessage(e){for(const t of e.data.split("\n"))if(t){const e=JSON.parse(t);"set"===e.method&&this.manager.setVariable(this,e.name,e.value)}}onopen(){this.attemptedConnections=0,this.writeToServer({method:"handshake"}),this.sendBufferedMessages(),console.log("WebSocket connected")}onclose(e){if(e&&4002===e.code)return void console.log("Username is invalid; not reconnecting.");if(e&&4004===e.code)return void console.log("Project is blocked; not reconnecting.");const t=Math.random()*(Math.pow(2,Math.min(this.attemptedConnections+1,5))-1)*1e3;console.log("Connection lost; reconnecting in ".concat(Math.round(t),"ms")),this.reconnectTimeout=setTimeout(this.openConnection,t)}closeAndReconnect(){console.log("Closing connection and reconnecting."),this.ws&&(this.ws.onclose=null,this.ws.onerror=null,this.ws.close()),clearTimeout(this.reconnectTimeout);this.reconnectTimeout=setTimeout(this.openConnection,1e3/30)}canWriteToServer(){return this.ws&&this.ws.readyState===WebSocket.OPEN}scheduleBufferedSend(){this.scheduledBufferedSend||(this.scheduledBufferedSend=!0,Promise.resolve().then(this._scheduledSendBufferedMessages))}_scheduledSendBufferedMessages(){this.scheduledBufferedSend=!1,this.canWriteToServer()&&this.sendBufferedMessages()}sendBufferedMessages(){for(const e of this.bufferedMessages)this.writeToServer(e);this.bufferedMessages.length=0}bufferedWriteToServer(e){this.bufferedMessages.push(e),this.scheduleBufferedSend()}writeToServer(e){e.project_id=this.projectId,e.user=this.manager.getUsername(),this.ws.send(JSON.stringify(e))}handleUpdateVariable(e,t){for(const n of this.bufferedMessages)if(n.name===e)return void(n.value=t);this.bufferedWriteToServer({method:"set",name:e,value:t})}},LocalStorageProvider:class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"p4:cloudvariables";this.key=e,this.variables={},this.handleStorageEvent=this.handleStorageEvent.bind(this)}readFromLocalStorage(){let e;try{if(e=JSON.parse(localStorage.getItem(this.key)),!e||"object"!=typeof e)return}catch(e){return}this.variables=e;for(const e of Object.keys(this.variables))this.manager.setVariable(this,e,this.variables[e])}storeToLocalStorage(){try{localStorage.setItem(this.key,JSON.stringify(this.variables))}catch(e){}}handleStorageEvent(e){e.key===this.key&&e.storageArea===localStorage&&this.readFromLocalStorage()}enable(){this.readFromLocalStorage(),window.addEventListener("storage",this.handleStorageEvent)}handleUpdateVariable(e,t){this.variables[e]=t,this.storeToLocalStorage()}}},T=n(115),x=n.n(T),E=n(62),A={insert:e=>{var t=document.head||document.body||document.documentElement;t.insertBefore(e,t.firstChild)},singleton:!1},C=(x()(E.a,A),E.a.locals||{});const I=e=>new Promise(((t,n)=>{const r=new FileReader;r.onload=()=>t(r.result),r.onerror=()=>n(new Error("Cannot read as text: ".concat(r.error))),r.readAsText(e)}));var O=class{constructor(e,t){this.el=e,this.callback=t,this.el.addEventListener("dragover",this.ondragover.bind(this)),this.el.addEventListener("dragleave",this.ondragleave.bind(this)),this.el.addEventListener("drop",this.ondrop.bind(this))}ondragover(e){e.dataTransfer.types.includes("Files")&&(e.preventDefault(),e.dataTransfer.dropEffect="copy",this.el.classList.add(C.dropping))}ondragleave(e){e.preventDefault(),this.el.classList.remove(C.dropping)}ondrop(e){e.preventDefault(),this.el.classList.remove(C.dropping),e.dataTransfer.types.includes("Files")&&e.dataTransfer.files.length>0&&Promise.all(Array.from(e.dataTransfer.files).map(I)).then((e=>{this.callback(e)}))}};var M=class{constructor(e,t){this.parent=e,this.text=t,this.root=document.createElement("div"),this.root.className=C.questionRoot,this.inner=document.createElement("div"),this.inner.className=C.questionInner,t&&(this.textElement=document.createElement("div"),this.textElement.textContent=t,this.textElement.className=C.questionText),this.inputContainer=document.createElement("div"),this.inputContainer.className=C.questionInputOuter,this.input=document.createElement("input"),this.input.className=C.questionInput,this.input.addEventListener("keypress",this.onkeypress.bind(this)),this.dropper=new O(this.input,this.dropperCallback.bind(this)),this.submitButton=document.createElement("button"),this.submitButton.className=C.questionSubmitButton,this.submitButton.addEventListener("click",this.onsubmitpressclick.bind(this)),this.inputContainer.appendChild(this.input),this.inputContainer.appendChild(this.submitButton),this.textElement&&this.inner.appendChild(this.textElement),this.inner.appendChild(this.inputContainer),this.root.appendChild(this.inner),this.parent._addLayer(this.root),this.input.focus(),this.answerCallback=new Promise((e=>{this.callback=e}))}answer(){return this.answerCallback}submit(){this.callback(this.input.value),this.destroy()}onkeypress(e){"Enter"===e.key&&this.submit()}dropperCallback(e){const t=e.join("").replace(/\r?\n/g," ");this.input.value=t}onsubmitpressclick(){this.submit()}destroy(){this.root.remove(),this.parent.question=null}};var N=class{constructor(e){this.parent=e,this.root=document.createElement("div"),this.root.className=C.contextMenu,this._onmousedown=this._onmousedown.bind(this),this._onresize=this._onresize.bind(this),this._onblur=this._onblur.bind(this)}_onmousedown(e){this.root.contains(e.target)||this.destroy()}_onresize(){this.destroy()}_onblur(){this.destroy()}add(e){const t=document.createElement("button");t.className=C.contextMenuItem,t.textContent=e.text,t.addEventListener("click",(()=>{this.destroy(),e.callback()})),t.addEventListener("contextmenu",(e=>{e.preventDefault()})),this.root.appendChild(t)}show(e){document.addEventListener("mousedown",this._onmousedown),window.addEventListener("resize",this._onresize),window.addEventListener("blur",this._onblur),this.parent._addLayer(this.root);const t=this.parent.layersRect,n=this.root.getBoundingClientRect();let r=e.clientX-t.left,i=e.clientY-t.top;r+n.width>t.width&&(r-=n.width),i+n.height>t.height&&(i-=n.height),this.root.style.transform="translate(".concat(r,"px, ").concat(i,"px)"),getComputedStyle(this.root).opacity,this.root.style.opacity="1"}destroy(){document.removeEventListener("mousedown",this._onmousedown),window.removeEventListener("resize",this._onresize),window.removeEventListener("blur",this._onblur),this.root.style.opacity="0",this.root.style.pointerEvents="none",setTimeout((()=>{this.root.remove()}),200)}};var R=(e,t)=>{if("undefined"!=typeof ExternalDownloadHelper)return void ExternalDownloadHelper.download(e,t);const n=document.createElement("a");if(document.body.appendChild(n),navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(t,e);else if("download"in HTMLAnchorElement.prototype){const r=window.URL.createObjectURL(t);n.href=r,n.download=e,n.type=t.type,n.click(),window.setTimeout((()=>{document.body.removeChild(n),window.URL.revokeObjectURL(r)}),1e3)}else{let e=window.open("","_blank");const n=new FileReader;n.onloadend=function(){e.location.href=n.result,e=null},n.readAsDataURL(t)}};class D{constructor(e,t){this.parent=e,this.id=t.get("id"),this.spriteName=t.get("spriteName"),this.targetId=t.get("targetId"),this.opcode=t.get("opcode"),this.params=t.get("params"),this.root=document.createElement("div"),this.root.className=C.monitorRoot,this.root.dataset.id=this.id,this.root.dataset.opcode=this.opcode,this.parent._monitorOverlay.appendChild(this.root)}getLabel(){let e;if("data_variable"===this.opcode)e=this.params.VARIABLE;else if("data_listcontents"===this.opcode)e=this.params.LIST;else if("motion_xposition"===this.opcode)e=this.parent.getMessage("var-x");else if("motion_yposition"===this.opcode)e=this.parent.getMessage("var-y");else if("motion_direction"===this.opcode)e=this.parent.getMessage("var-direction");else if("sensing_username"===this.opcode)e=this.parent.getMessage("var-username");else if("looks_costumenumbername"===this.opcode)e="number"===this.params.NUMBER_NAME?this.parent.getMessage("var-costume-number"):this.parent.getMessage("var-costume-name");else if("looks_backdropnumbername"===this.opcode)e="number"===this.params.NUMBER_NAME?this.parent.getMessage("var-backdrop-number"):this.parent.getMessage("var-backdrop-name");else if("looks_size"===this.opcode)e=this.parent.getMessage("var-size");else if("sensing_answer"===this.opcode)e=this.parent.getMessage("var-answer");else if("sensing_mousedown"===this.opcode)e=this.parent.getMessage("var-mousedown");else if("sensing_mousex"===this.opcode)e=this.parent.getMessage("var-mousex");else if("sensing_mousey"===this.opcode)e=this.parent.getMessage("var-mousey");else if("sensing_loudness"===this.opcode)e=this.parent.getMessage("var-loudness");else if("sensing_timer"===this.opcode)e=this.parent.getMessage("var-timer");else if("sensing_dayssince2000"===this.opcode)e=this.parent.getMessage("var-dayssince2000");else if("sound_volume"===this.opcode)e=this.parent.getMessage("var-volume");else if("sensing_current"===this.opcode){const t=this.params.CURRENTMENU.toLowerCase();"year"===t?e=this.parent.getMessage("var-year"):"month"===t?e=this.parent.getMessage("var-month"):"date"===t?e=this.parent.getMessage("var-date"):"dayofweek"===t?e=this.parent.getMessage("var-day-of-week"):"hour"===t?e=this.parent.getMessage("var-hour"):"minute"===t?e=this.parent.getMessage("var-minute"):"second"===t&&(e=this.parent.getMessage("var-second"))}else{const t=this.parent.vm.runtime.getLabelForOpcode(this.opcode);e=t?t.label:this.opcode}return this.spriteName?"".concat(this.spriteName,": ").concat(e):e}getTarget(){return this.targetId?this.parent.vm.runtime.getTargetById(this.targetId):this.parent.vm.runtime.getTargetForStage()}getVmVariable(){return this.getTarget().variables[this.id]}update(e){this.x=e.get("x"),this.y=e.get("y"),this.visible=e.get("visible"),this.root.style.transform="translate(".concat(Math.round(this.x),"px, ").concat(Math.round(this.y),"px)"),this.root.style.display=this.visible?"":"none"}}class P extends D{constructor(e,t){super(e,t),this.mode=t.get("mode"),"large"===this.mode?(this.valueElement=document.createElement("div"),this.valueElement.className=C.monitorLargeValue+" "+C.monitorValueColor,this.root.appendChild(this.valueElement)):(this.inner=document.createElement("div"),this.inner.className=C.monitorInner,this.valueRow=document.createElement("div"),this.valueRow.className=C.monitorRow,this.label=document.createElement("div"),this.label.className=C.monitorLabel,this.label.textContent=this.getLabel(),this.valueElement=document.createElement("div"),this.valueElement.className=C.monitorValue+" "+C.monitorValueColor,this.valueRow.appendChild(this.label),this.valueRow.appendChild(this.valueElement),this.inner.appendChild(this.valueRow),"slider"===this.mode&&(this.sliderRow=document.createElement("div"),this.sliderRow.className=C.monitorRow,this.slider=document.createElement("input"),this.slider.className=C.monitorSlider,this.slider.type="range",this.slider.min=t.get("sliderMin"),this.slider.max=t.get("sliderMax"),this.slider.step=t.get("isDiscrete")?1:.01,this.slider.addEventListener("input",this.onsliderchange.bind(this)),this.sliderRow.appendChild(this.slider),this.inner.appendChild(this.sliderRow)),this.root.appendChild(this.inner)),this.parent._monitorOverlay.appendChild(this.root),this._value=""}setVariableValue(e){const t=this.getVmVariable();if(t.value=e,t.isCloud){this.parent.vm.runtime.ioDevices.cloud.requestUpdateVariable(t.name,t.value)}this._value=e,this.valueElement.textContent=e}onsliderchange(e){this.setVariableValue(+e.target.value)}update(e){if(super.update(e),!this.visible)return;let t=e.get("value");"number"==typeof t&&(t=Number(t.toFixed(6))),this._value!==t&&(this._value=t,this.valueElement.textContent=t,this.slider&&(this.slider.value=t))}}class L{constructor(e){this.monitor=e,this.index=-1,this.value="",this.locked=!1,this.root=document.createElement("label"),this.root.className=C.monitorRowRoot,this.indexEl=document.createElement("div"),this.indexEl.className=C.monitorRowIndex,this.valueOuter=document.createElement("div"),this.valueOuter.className=C.monitorRowValueOuter,this.editable=this.monitor.editable,this.editable?(this.valueInner=document.createElement("input"),this.valueInner.tabIndex=-1,this.valueInner.className=C.monitorRowValueInner,this.valueInner.readOnly=!0,this.valueInner.addEventListener("click",this._onclickinput.bind(this)),this.valueInner.addEventListener("blur",this._onblurinput.bind(this)),this.valueInner.addEventListener("keypress",this._onkeypressinput.bind(this)),this.valueInner.addEventListener("keydown",this._onkeypressdown.bind(this)),this.valueInner.addEventListener("contextmenu",this._oncontextmenu.bind(this)),this.valueInner.addEventListener("input",this._oninput.bind(this)),this.valueOuter.appendChild(this.valueInner),this.deleteButton=document.createElement("button"),this.deleteButton.className=C.monitorRowDelete,this.deleteButton.textContent="×",this.deleteButton.addEventListener("mousedown",this._onclickdelete.bind(this)),this.valueOuter.appendChild(this.deleteButton)):(this.valueInner=document.createElement("div"),this.valueInner.className=C.monitorRowValueInner,this.valueOuter.appendChild(this.valueInner),this.valueInner.addEventListener("contextmenu",this._oncontextmenuuneditable.bind(this))),this.root.appendChild(this.indexEl),this.root.appendChild(this.valueOuter)}_onclickinput(){this.valueInner.focus(),this.locked||(this.valueInner.select(),this.valueInner.readOnly=!1,this.locked=!0,this.root.classList.add(C.monitorRowValueEditing),this.addNewValue=!1,this.deleteValue=!1,this.valueWasChanged=!1)}_onblurinput(){if(this.locked)if(this.unfocus(),this.deleteValue){const e=[...this.monitor.value];e.splice(this.index,1),this.monitor.setValue(e),this.monitor.tryToFocusRow(Math.min(e.length-1,this.index))}else if(this.valueWasChanged||this.addNewValue){const e=[...this.monitor.value];e[this.index]=this.valueInner.value,this.addNewValue&&e.splice(this.index+1,0,""),this.monitor.setValue(e),this.addNewValue&&this.monitor.tryToFocusRow(this.index+1)}}_oninput(){this.valueWasChanged=!0}_onkeypressinput(e){"Enter"===e.key&&(this.addNewValue=!0,this.valueInner.blur())}_onkeypressdown(e){if("Escape"===e.key)this.valueInner.blur();else if("ArrowUp"===e.key||"ArrowDown"===e.key||"Tab"===e.key){e.preventDefault();let t=this.index;"ArrowUp"===e.key||"Tab"===e.key&&e.shiftKey?(t--,t<0&&(t=this.monitor.value.length-1)):(t++,t>=this.monitor.value.length&&(t=0)),this.monitor.tryToFocusRow(t)}}_onclickdelete(e){e.preventDefault(),this.deleteValue=!0,this.valueInner.blur()}_oncontextmenu(e){this.locked?e.stopPropagation():e.preventDefault()}_oncontextmenuuneditable(e){const t=getSelection();this.valueInner.contains(t.anchorNode)&&!t.isCollapsed&&e.stopPropagation()}setIndex(e){this.index!==e&&(this.index=e,this.root.dataset.index=e,this.root.style.transform="translateY(".concat(24*e,"px)"),this.indexEl.textContent=e+1)}setValue(e){this.value===e||this.locked||(this.value=e,this.editable?this.valueInner.value=e:this.valueInner.textContent=e)}focus(){this.valueInner.click(),document.activeElement!==this.valueInner&&setTimeout((()=>this.valueInner.click()))}unfocus(){this.locked&&(this.locked=!1,this.valueInner.readOnly=!0,this.root.classList.remove(C.monitorRowValueEditing))}}class B extends D{constructor(e,t){super(e,t),this.editable=e.editableLists,this.rows=new Map,this.cachedRows=[],this.scrollTop=0,this.oldLength=-1,this.label=document.createElement("div"),this.label.className=C.monitorListLabel,this.label.textContent=this.getLabel(),this.footer=document.createElement("div"),this.footer.className=C.monitorListFooter,this.footerText=document.createElement("div"),this.footerText.className=C.monitorListFooterText,this.rowsOuter=document.createElement("div"),this.rowsOuter.className=C.monitorRowsOuter,this.rowsInner=document.createElement("div"),this.rowsInner.className=C.monitorRowsInner,this.rowsInner.addEventListener("scroll",this._onscroll.bind(this),{passive:!0}),this.endPoint=document.createElement("div"),this.endPoint.className=C.monitorRowsEndpoint,this.emptyLabel=document.createElement("div"),this.emptyLabel.textContent=e.getMessage("list-empty"),this.emptyLabel.className=C.monitorEmpty,this.editable&&(this.addButton=document.createElement("button"),this.addButton.className=C.monitorListAdd,this.addButton.textContent="+",this.addButton.addEventListener("click",this._onclickaddbutton.bind(this)),this.footer.appendChild(this.addButton)),this.rowsInner.appendChild(this.endPoint),this.rowsInner.appendChild(this.emptyLabel),this.rowsOuter.appendChild(this.rowsInner),this.footer.appendChild(this.footerText),this.root.appendChild(this.label),this.root.appendChild(this.rowsOuter),this.root.appendChild(this.footer),this.dropper=new O(this.rowsOuter,this.dropperCallback.bind(this)),this.handleImport=this.handleImport.bind(this),this.handleExport=this.handleExport.bind(this),this.root.addEventListener("contextmenu",this._oncontextmenu.bind(this))}_onclickaddbutton(e){this.setValue([...this.value,""]),this.tryToFocusRow(this.value.length-1)}unfocusAllRows(){for(const e of this.rows.values())e.unfocus()}tryToFocusRow(e){if(e>=0&&e<this.value.length){this.unfocusAllRows();let t=this.rows.get(e);t||(t=this.createRow(e)),t.focus()}}_onscroll(e){this.scrollTop=e.target.scrollTop,this.updateValue(this.value)}_oncontextmenu(e){e.preventDefault();const t=new N(this.parent);t.add({text:this.parent.getMessage("list-import"),callback:this.handleImport}),t.add({text:this.parent.getMessage("list-export"),callback:this.handleExport}),t.show(e)}handleImport(){const e=document.createElement("input");e.type="file",e.accept=".txt,.csv,.tsv",e.style.display="none",document.body.appendChild(e),e.addEventListener("change",(e=>{const t=e.target.files;if(0===t.length)return;const n=t[0];I(n).then((e=>this.import(e)))})),e.click()}import(e){const t=e.split(/\r?\n/);this.setValue(t)}handleExport(){const e=this.getValue().join("\n"),t=new Blob([e],{type:"text/plain"});R("".concat(this.getLabel(),".txt"),t)}dropperCallback(e){this.import(e.join("\n"))}getValue(){return this.getVmVariable().value}setValue(e){this.getVmVariable().value=e,this.updateValue(e)}update(e){super.update(e),this.visible&&(this.width=e.get("width")||100,this.height=e.get("height")||200,this.root.style.width="".concat(this.width,"px"),this.root.style.height="".concat(this.height,"px"),this.updateValue(e.get("value")))}createRow(e){const t=this.cachedRows.pop()||new L(this);t.setIndex(e),t.setValue(this.value[e]),this.rows.set(e,t);let n=!1;for(const r of this.rowsInner.children){const i=r.dataset.index;if(!i)continue;if(+i>e){this.rowsInner.insertBefore(t.root,r),n=!0;break}}return n||this.rowsInner.appendChild(t.root),t}updateValue(e){this.value=e,e.length!==this.oldLength&&(this.oldLength=e.length,this.footerText.textContent=this.parent.getMessage("list-length").replace("{n}",e.length),this.endPoint.style.transform="translateY(".concat(24*e.length,"px)"),this.emptyLabel.style.display=e.length?"none":"");let t=Math.floor(this.scrollTop/24)-5;t<0&&(t=0);let n=Math.ceil((this.scrollTop+this.height)/24)+3;n>e.length-1&&(n=e.length-1);for(const r of this.rows.keys())if(r<t||r>n){const t=this.rows.get(r);(!t.locked||r>=e.length)&&(t.unfocus(),t.root.remove(),this.rows.delete(r),this.cachedRows.length<10&&this.cachedRows.push(t))}for(let r=t;r<=n;r++){const t=this.rows.get(r);t?t.setValue(e[r]):this.createRow(r)}}}var z=class{constructor(){this.hasItem=!1,this.root=document.createElement("div"),this.root.className=C.controlsBar,this.start=document.createElement("div"),this.end=document.createElement("div"),this.root.appendChild(this.start),this.root.appendChild(this.end)}addToStart(e){this.hasItem=!0,this.start.appendChild(e)}addToEnd(e){this.hasItem=!0,this.end.appendChild(e)}computeHeight(){return this.hasItem?this.root.getBoundingClientRect().height:0}};const U=e=>"number"==typeof e||"string"==typeof e||"boolean"==typeof e;var j=n(119);const F=e=>e.touches&&e.touches[0]?{x:e.touches[0].clientX,y:e.touches[0].clientY}:e.changedTouches&&e.changedTouches[0]?{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY}:{x:e.clientX,y:e.clientY},W=e=>"function"==typeof e?e:()=>e;class V extends y{constructor(){super(),this.width=480,this.height=360,this.resizeMode="preserve-ratio",this.editableLists=!1,this.shouldConnectPeripherals=!0,this.usePackagedRuntime=!1,this.messages=j,this._monitors=new Map,this._mousedownPosition=null,this._draggingId=null,this._draggingStartMousePosition=null,this._draggingStartSpritePosition=null,this._offsetFromTop=0,this._offsetFromBottom=0,this._offsetFromLeft=0,this._offsetFromRight=0,this._root=document.createElement("div"),this._root.className=C.root,this._layers=document.createElement("div"),this._layers.className=C.layers,this._root.appendChild(this._layers),this._canvas=document.createElement("canvas"),this._canvas.className=C.canvas,this._addLayer(this._canvas),this._overlays=document.createElement("div"),this._overlays.className=C.scaledOverlaysInner,this._overlaysOuter=document.createElement("div"),this._overlaysOuter.className=C.scaledOverlaysOuter,this._overlaysOuter.appendChild(this._overlays),this._addLayer(this._overlaysOuter),this._monitorOverlay=document.createElement("div"),this._monitorOverlay.className=C.monitorOverlay,this._overlays.appendChild(this._monitorOverlay),this._topControls=new z,this._layers.appendChild(this._topControls.root),document.addEventListener("mousemove",this._onmousemove.bind(this)),this._canvas.addEventListener("mousedown",this._onmousedown.bind(this)),document.addEventListener("mouseup",this._onmouseup.bind(this)),this._canvas.addEventListener("touchstart",this._ontouchstart.bind(this)),document.addEventListener("touchmove",this._ontouchmove.bind(this)),document.addEventListener("touchend",this._ontouchend.bind(this)),this._canvas.addEventListener("contextmenu",this._oncontextmenu.bind(this)),this._canvas.addEventListener("wheel",this._onwheel.bind(this)),document.addEventListener("keydown",this._onkeydown.bind(this)),document.addEventListener("keyup",this._onkeyup.bind(this)),window.addEventListener("resize",this._onresize.bind(this))}_addLayer(e){this._layers.appendChild(e)}_scratchCoordinates(e,t){return{x:this.width/this.layersRect.width*(e-this.layersRect.width/2),y:-this.height/this.layersRect.height*(t-this.layersRect.height/2)}}_onmousemove(e){const{x:t,y:n}=F(e),r={x:t-this.layersRect.left,y:n-this.layersRect.top,canvasWidth:this.layersRect.width,canvasHeight:this.layersRect.height};if(this._mousedownPosition&&!this._draggingId){Math.sqrt(Math.pow(r.x-this._mousedownPosition.x,2)+Math.pow(r.y-this._mousedownPosition.y,2))>3&&(this._startDragging(r.x,r.y),this._cancelDragTimeout())}else if(this._draggingId){const e=this._scratchCoordinates(r.x,r.y);this.vm.postSpriteInfo({x:e.x-this._draggingStartMousePosition.x+this._draggingStartSpritePosition.x,y:e.y-this._draggingStartMousePosition.y+this._draggingStartSpritePosition.y,force:!0})}this.vm.postIOData("mouse",r)}_startDragging(e,t){if(this._draggingId)return;const n=this.renderer.pick(e,t);if(null===n)return;const r=this.vm.getTargetIdForDrawableId(n);if(null===r)return;const i=this.vm.runtime.getTargetById(r);i.draggable&&(i.goToFront(),this._draggingId=r,this._draggingStartMousePosition=this._scratchCoordinates(e,t),this._draggingStartSpritePosition={x:i.x,y:i.y},this.vm.startDrag(r))}_cancelDragTimeout(){clearTimeout(this._dragTimeout),this._dragTimeout=null}_onmousedown(e){const{x:t,y:n}=F(e),r={x:t-this.layersRect.left,y:n-this.layersRect.top,button:e.button,canvasWidth:this.layersRect.width,canvasHeight:this.layersRect.height,isDown:!0},i="undefined"!=typeof TouchEvent&&e instanceof TouchEvent;(0===e.button||i)&&(this._dragTimeout=setTimeout(this._startDragging.bind(this,r.x,r.y),400)),i&&(e.preventDefault(),document.activeElement&&document.activeElement.blur&&document.activeElement.blur()),this._mousedownPosition={x:r.x,y:r.y},this.vm.postIOData("mouse",r)}_onmouseup(e){this._cancelDragTimeout();const{x:t,y:n}=F(e),r={x:t-this.layersRect.left,y:n-this.layersRect.top,button:e.button,canvasWidth:this.layersRect.width,canvasHeight:this.layersRect.height,isDown:!1,wasDragged:null!==this._draggingId};this._mousedownPosition=null,this.vm.postIOData("mouse",r),this._draggingId&&(this.vm.stopDrag(this._draggingId),this._draggingStartMousePosition=null,this._draggingStartSpritePosition=null,this._draggingId=null)}_ontouchstart(e){this._onmousedown(e)}_ontouchmove(e){this._onmousemove(e)}_ontouchend(e){this._onmouseup(e)}_oncontextmenu(e){e.preventDefault()}_onwheel(e){const t={deltaX:e.deltaX,deltaY:e.deltaY};this.vm.postIOData("mouseWheel",t)}_onkeydown(e){if(e.target!==document&&e.target!==document.body)return;const t={key:e.key,keyCode:e.keyCode,isDown:!0};this.vm.postIOData("keyboard",t),(32===e.keyCode||e.keyCode>=37&&e.keyCode<=40||8===e.keyCode||222===e.keyCode||191===e.keyCode)&&e.preventDefault()}_onkeyup(e){const t={key:e.key,keyCode:e.keyCode,isDown:!1};this.vm.postIOData("keyboard",t),e.target!==document&&e.target!==document.body&&e.preventDefault()}_onresize(){this.relayout()}relayout(){const e=Math.max(1,this._root.offsetWidth),t=Math.max(1,this._root.offsetHeight),n=this._offsetFromTop+this._topControls.computeHeight(),r=this._offsetFromBottom,i=this._offsetFromLeft,s=this._offsetFromRight,o=Math.max(1,e-i-s),a=Math.max(1,t-n-r);"dynamic-resize"===this.resizeMode&&(this.vm.setStageSize?(this.width=o,this.height=a,this.vm.setStageSize(this.width,this.height)):console.warn("dynamic-resize not supported: vm does not implement setStageSize"));let l=o,c=a;"stretch"!==this.resizeMode&&(l=c/this.height*this.width,l>o&&(c=o/this.width*this.height,l=o));const u=t-c,d=e-l,h=(d-i-s)/2+i-d/2,p=(u-n-r)/2+n-u/2;this._layers.style.transform="translate(".concat(h,"px, ").concat(p,"px)"),this._layers.style.width="".concat(l,"px"),this._layers.style.height="".concat(c,"px"),this._overlays.style.transform="scale(".concat(l/this.width,", ").concat(c/this.height,")"),this.renderer.resize(l,c),this.layersRect=this._layers.getBoundingClientRect()}appendTo(e){e.appendChild(this._root),this.relayout()}setup(){this.vm=new a.a,this.vm.setCompatibilityMode(!0),this.vm.setLocale(navigator.language),this.vm.on("MONITORS_UPDATE",this._onmonitorsupdate.bind(this)),this.vm.runtime.on("QUESTION",this._onquestion.bind(this)),this.vm.on("PROJECT_RUN_START",(()=>this.dispatchEvent(new Event("PROJECT_RUN_START")))),this.vm.on("PROJECT_RUN_STOP",(()=>this.dispatchEvent(new Event("PROJECT_RUN_STOP")))),this.usePackagedRuntime&&this.vm.convertToPackagedRuntime&&this.vm.convertToPackagedRuntime(),this.vm.setStageSize&&this.vm.setStageSize(this.width,this.height),this.vm.runtime.cloudOptions&&(this.vm.runtime.cloudOptions.limit=1/0),this.vm.on("STAGE_SIZE_CHANGED",((e,t)=>{this.width===e&&this.height===t||(this.width=e,this.height=t,this.relayout())})),this.cloudManager=new k.CloudManager(this),this.renderer=new c.a(this._canvas,-this.width/2,this.width/2,-this.height/2,this.height/2),this.vm.attachRenderer(this.renderer),this.renderer.overlayContainer&&this._layers.insertBefore(this.renderer.overlayContainer,this._overlaysOuter),this.storage=new g,this.vm.attachStorage(this.storage),"undefined"!=typeof AudioContext||"undefined"!=typeof webkitAudioContext?(this.audioEngine=new p.a,this.vm.attachAudioEngine(this.audioEngine)):console.warn("AudioContext not supported. Sound will not work."),this.bitmapAdapter=new m.BitmapAdapter,this.vm.attachV2BitmapAdapter(this.bitmapAdapter),this.videoProvider=new w,this.vm.setVideoProvider(this.videoProvider)}async _connectPeripherals(){const e=e=>new Promise((t=>{const n=t=>{const n=Object.keys(t).map((e=>t[e]));if(n.length>0){const t=n[0];console.log("Connecting to peripheral",t),this.vm.connectPeripheral(e,t.peripheralId)}else console.error("No peripherals found for",e);i()},r=()=>{console.error("Peripheral scan timed out for",e),i()},i=()=>{this.vm.removeListener("PERIPHERAL_LIST_UPDATE",n),this.vm.removeListener("PERIPHERAL_SCAN_TIMEOUT",r),t()};this.vm.on("PERIPHERAL_LIST_UPDATE",n),this.vm.on("PERIPHERAL_SCAN_TIMEOUT",r),this.vm.scanForPeripheral(e)}));for(const t of Object.keys(this.vm.runtime.peripheralExtensions))await e(t)}_onmonitorsupdate(e){for(const t of e.valueSeq()){const e=t.get("id");if(!this._monitors.has(e)){if(!t.get("visible"))continue;"list"===t.get("mode")?this._monitors.set(e,new B(this,t)):this._monitors.set(e,new P(this,t))}this._monitors.get(e).update(t)}}ask(e){return this._question=new M(this,e),this._question.answer()}_onquestion(e){this._question&&this._question.destroy(),null!==e&&this.ask(e).then((e=>{this.vm.runtime.emit("ANSWER",e)}))}loadProject(e){return this.vm.loadProject(e).then((()=>{this.vm.setCloudProvider(this.cloudManager),this.cloudManager.projectReady(),this.renderer.draw(),setTimeout((()=>{this.renderer.draw()})),this.shouldConnectPeripherals&&this._connectPeripherals()}))}setUsername(e){this._username=e,this.vm.postIOData("userData",{username:e})}addCloudProvider(e){this.cloudManager.addProvider(e)}addCloudProviderOverride(e,t){this.cloudManager.addProviderOverride(e,t)}addControlButton(e){let{element:t,where:n}=e;if("top-left"===n)this._topControls.addToStart(t);else{if("top-right"!==n)throw new Error("Unknown 'where': ".concat(n));this._topControls.addToEnd(t)}this.relayout()}getMessage(e){return this.messages[e]||e}setAccentColor(e){this._root.style.setProperty("--sc-accent-color",e),this._root.style.setProperty("--sc-accent-color-transparent","".concat(e,"59"))}start(){this.vm.start(),this.vm.greenFlag()}greenFlag(){this.start()}stopAll(){this.vm.stopAll()}_lookupVariable(e,t){const n=this.vm.runtime.getTargetForStage().lookupVariableByNameAndType(e,t);if(!n)throw new Error("Global ".concat(t||"variable"," does not exist: ").concat(e));return n}setExtensionSecurityManager(e){const t=this.vm.extensionManager.securityManager;if(t)for(const[n,r]of Object.entries(e))t[n]=W(r);else console.warn("setExtensionSecurityManager not supported: there is no security manager")}getVariable(e){return this._lookupVariable(e,"").value}setVariable(e,t){if(!U(t))throw new Error("Invalid variable value");this._lookupVariable(e,"").value=t}getList(e){return this._lookupVariable(e,"list").value}setList(e,t){if(!(e=>{if(!Array.isArray(e))return!1;for(let t=0;t<e.length;t++)if(!U(e[t]))return!1;return!0})(t))throw new Error("Invalid list value");this._lookupVariable(e,"list").value=t}}if(window.Scaffolding)throw new Error("Scaffolding already exists on this page");window.Scaffolding=r},function(e,t,n){"use strict";var r;n.r(t),n.d(t,"v1",(function(){return f})),n.d(t,"v3",(function(){return E})),n.d(t,"v4",(function(){return A})),n.d(t,"v5",(function(){return O})),n.d(t,"NIL",(function(){return M})),n.d(t,"version",(function(){return N})),n.d(t,"validate",(function(){return a})),n.d(t,"stringify",(function(){return h})),n.d(t,"parse",(function(){return g}));var i=new Uint8Array(16);function s(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}var o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var a=function(e){return"string"==typeof e&&o.test(e)},l=[],c=0;c<256;++c)l.push((c+256).toString(16).substr(1));var u,d,h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase();if(!a(n))throw TypeError("Stringified UUID is invalid");return n},p=0,m=0;var f=function(e,t,n){var r=t&&n||0,i=t||new Array(16),o=(e=e||{}).node||u,a=void 0!==e.clockseq?e.clockseq:d;if(null==o||null==a){var l=e.random||(e.rng||s)();null==o&&(o=u=[1|l[0],l[1],l[2],l[3],l[4],l[5]]),null==a&&(a=d=16383&(l[6]<<8|l[7]))}var c=void 0!==e.msecs?e.msecs:Date.now(),f=void 0!==e.nsecs?e.nsecs:m+1,g=c-p+(f-m)/1e4;if(g<0&&void 0===e.clockseq&&(a=a+1&16383),(g<0||c>p)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=c,m=f,d=a;var y=(1e4*(268435455&(c+=122192928e5))+f)%4294967296;i[r++]=y>>>24&255,i[r++]=y>>>16&255,i[r++]=y>>>8&255,i[r++]=255&y;var b=c/4294967296*1e4&268435455;i[r++]=b>>>8&255,i[r++]=255&b,i[r++]=b>>>24&15|16,i[r++]=b>>>16&255,i[r++]=a>>>8|128,i[r++]=255&a;for(var v=0;v<6;++v)i[r+v]=o[v];return t||h(i)};var g=function(e){if(!a(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};var y=function(e,t,n){function r(e,r,i,s){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=g(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var o=new Uint8Array(16+e.length);if(o.set(r),o.set(e,r.length),(o=n(o))[6]=15&o[6]|t,o[8]=63&o[8]|128,i){s=s||0;for(var a=0;a<16;++a)i[s+a]=o[a];return i}return h(o)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r};function b(e){return 14+(e+64>>>9<<4)+1}function v(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function S(e,t,n,r,i,s){return v((o=v(v(t,e),v(r,s)))<<(a=i)|o>>>32-a,n);var o,a}function w(e,t,n,r,i,s,o){return S(t&n|~t&r,e,t,i,s,o)}function k(e,t,n,r,i,s,o){return S(t&r|n&~r,e,t,i,s,o)}function T(e,t,n,r,i,s,o){return S(t^n^r,e,t,i,s,o)}function x(e,t,n,r,i,s,o){return S(n^(t|~r),e,t,i,s,o)}var E=y("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,r="0123456789abcdef",i=0;i<n;i+=8){var s=e[i>>5]>>>i%32&255,o=parseInt(r.charAt(s>>>4&15)+r.charAt(15&s),16);t.push(o)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[b(t)-1]=t;for(var n=1732584193,r=-271733879,i=-1732584194,s=271733878,o=0;o<e.length;o+=16){var a=n,l=r,c=i,u=s;n=w(n,r,i,s,e[o],7,-680876936),s=w(s,n,r,i,e[o+1],12,-389564586),i=w(i,s,n,r,e[o+2],17,606105819),r=w(r,i,s,n,e[o+3],22,-1044525330),n=w(n,r,i,s,e[o+4],7,-176418897),s=w(s,n,r,i,e[o+5],12,1200080426),i=w(i,s,n,r,e[o+6],17,-1473231341),r=w(r,i,s,n,e[o+7],22,-45705983),n=w(n,r,i,s,e[o+8],7,1770035416),s=w(s,n,r,i,e[o+9],12,-1958414417),i=w(i,s,n,r,e[o+10],17,-42063),r=w(r,i,s,n,e[o+11],22,-1990404162),n=w(n,r,i,s,e[o+12],7,1804603682),s=w(s,n,r,i,e[o+13],12,-40341101),i=w(i,s,n,r,e[o+14],17,-1502002290),n=k(n,r=w(r,i,s,n,e[o+15],22,1236535329),i,s,e[o+1],5,-165796510),s=k(s,n,r,i,e[o+6],9,-1069501632),i=k(i,s,n,r,e[o+11],14,643717713),r=k(r,i,s,n,e[o],20,-373897302),n=k(n,r,i,s,e[o+5],5,-701558691),s=k(s,n,r,i,e[o+10],9,38016083),i=k(i,s,n,r,e[o+15],14,-660478335),r=k(r,i,s,n,e[o+4],20,-405537848),n=k(n,r,i,s,e[o+9],5,568446438),s=k(s,n,r,i,e[o+14],9,-1019803690),i=k(i,s,n,r,e[o+3],14,-187363961),r=k(r,i,s,n,e[o+8],20,1163531501),n=k(n,r,i,s,e[o+13],5,-1444681467),s=k(s,n,r,i,e[o+2],9,-51403784),i=k(i,s,n,r,e[o+7],14,1735328473),n=T(n,r=k(r,i,s,n,e[o+12],20,-1926607734),i,s,e[o+5],4,-378558),s=T(s,n,r,i,e[o+8],11,-2022574463),i=T(i,s,n,r,e[o+11],16,1839030562),r=T(r,i,s,n,e[o+14],23,-35309556),n=T(n,r,i,s,e[o+1],4,-1530992060),s=T(s,n,r,i,e[o+4],11,1272893353),i=T(i,s,n,r,e[o+7],16,-155497632),r=T(r,i,s,n,e[o+10],23,-1094730640),n=T(n,r,i,s,e[o+13],4,681279174),s=T(s,n,r,i,e[o],11,-358537222),i=T(i,s,n,r,e[o+3],16,-722521979),r=T(r,i,s,n,e[o+6],23,76029189),n=T(n,r,i,s,e[o+9],4,-640364487),s=T(s,n,r,i,e[o+12],11,-421815835),i=T(i,s,n,r,e[o+15],16,530742520),n=x(n,r=T(r,i,s,n,e[o+2],23,-995338651),i,s,e[o],6,-198630844),s=x(s,n,r,i,e[o+7],10,1126891415),i=x(i,s,n,r,e[o+14],15,-1416354905),r=x(r,i,s,n,e[o+5],21,-57434055),n=x(n,r,i,s,e[o+12],6,1700485571),s=x(s,n,r,i,e[o+3],10,-1894986606),i=x(i,s,n,r,e[o+10],15,-1051523),r=x(r,i,s,n,e[o+1],21,-2054922799),n=x(n,r,i,s,e[o+8],6,1873313359),s=x(s,n,r,i,e[o+15],10,-30611744),i=x(i,s,n,r,e[o+6],15,-1560198380),r=x(r,i,s,n,e[o+13],21,1309151649),n=x(n,r,i,s,e[o+4],6,-145523070),s=x(s,n,r,i,e[o+11],10,-1120210379),i=x(i,s,n,r,e[o+2],15,718787259),r=x(r,i,s,n,e[o+9],21,-343485551),n=v(n,a),r=v(r,l),i=v(i,c),s=v(s,u)}return[n,r,i,s]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(b(t)),r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))}));var A=function(e,t,n){var r=(e=e||{}).random||(e.rng||s)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return h(r)};function C(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function I(e,t){return e<<t|e>>>32-t}var O=y("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var i=0;i<r.length;++i)e.push(r.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var s=e.length/4+2,o=Math.ceil(s/16),a=new Array(o),l=0;l<o;++l){for(var c=new Uint32Array(16),u=0;u<16;++u)c[u]=e[64*l+4*u]<<24|e[64*l+4*u+1]<<16|e[64*l+4*u+2]<<8|e[64*l+4*u+3];a[l]=c}a[o-1][14]=8*(e.length-1)/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=8*(e.length-1)&4294967295;for(var d=0;d<o;++d){for(var h=new Uint32Array(80),p=0;p<16;++p)h[p]=a[d][p];for(var m=16;m<80;++m)h[m]=I(h[m-3]^h[m-8]^h[m-14]^h[m-16],1);for(var f=n[0],g=n[1],y=n[2],b=n[3],v=n[4],S=0;S<80;++S){var w=Math.floor(S/20),k=I(f,5)+C(w,g,y,b)+v+t[w]+h[S]>>>0;v=b,b=y,y=I(g,30)>>>0,g=f,f=k}n[0]=n[0]+f>>>0,n[1]=n[1]+g>>>0,n[2]=n[2]+y>>>0,n[3]=n[3]+b>>>0,n[4]=n[4]+v>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]})),M="00000000-0000-0000-0000-000000000000";var N=function(e){if(!a(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}}]);
// bc939e07d27cabcca4e56c3f2f426a18cd22a940eaf104ccb3974d12ba8beefb =^..^=