diff --git a/static/spiele/nachrichten/cc-spiele-nachrichten.html b/static/spiele/nachrichten/cc-spiele-nachrichten.html index d3ba8eb..c129a84 100644 --- a/static/spiele/nachrichten/cc-spiele-nachrichten.html +++ b/static/spiele/nachrichten/cc-spiele-nachrichten.html @@ -204,20 +204,18 @@ Redistribution and use in source and binary forms, with or without modification, 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. */ -!function(A){function e(e){for(var t,B,n=e[0],s=e[1],r=0,g=[];r=A.length?void(f>24,m[p]=y,m[y++]=p;y{if("string"!=typeof A)return!1;for(let e=0;ei?1:0}return t===1/0&&i===1/0||t===-1/0&&i===-1/0?0:t-i}static isInt(A){return"number"==typeof A?!!isNaN(A)||A===Math.floor(A):"boolean"==typeof A||"string"==typeof A&&A.indexOf(".")<0}static get LIST_INVALID(){return"INVALID"}static get LIST_ALL(){return"ALL"}static toListIndex(A,e,t){if("number"!=typeof A){if("all"===A)return t?n.LIST_ALL:n.LIST_INVALID;if("last"===A)return e>0?e:n.LIST_INVALID;if("random"===A||"any"===A)return e>0?1+Math.floor(Math.random()*e):n.LIST_INVALID}return(A=Math.floor(n.toNumber(A)))<1||A>e?n.LIST_INVALID:A}}A.exports=n},function(A,e){A.exports={BOOLEAN:"Boolean",BUTTON:"button",LABEL:"label",COMMAND:"command",CONDITIONAL:"conditional",EVENT:"event",HAT:"hat",LOOP:"loop",REPORTER:"reporter",XML:"xml"}},function(A,e){A.exports={ANGLE:"angle",BOOLEAN:"Boolean",COLOR:"color",NUMBER:"number",STRING:"string",MATRIX:"matrix",NOTE:"note",IMAGE:"image",COSTUME:"costume",SOUND:"sound"}},function(A,e){A.exports=class{static degToRad(A){return A*Math.PI/180}static radToDeg(A){return 180*A/Math.PI}static clamp(A,e,t){return Math.min(Math.max(A,e),t)}static wrapClamp(A,e,t){const i=t-e+1;return A-Math.floor((A-e)/i)*i}static tan(A){switch(A%=360){case-270:case 90:return 1/0;case-90:case 270:return-1/0;default:return Math.round(1e10*Math.tan(Math.PI*A/180))/1e10}}static reducedSortOrdering(A){const e=A.slice(0).sort((A,e)=>A-e);return A.map(A=>e.indexOf(A))}static inclusiveRandIntWithout(A,e,t){const i=e-A,B=A+Math.floor(Math.random()*i);return B>=t?B+1:B}static scale(A,e,t,i,B){return(A-e)/(t-e)*(B-i)+i}}},function(A,e,t){"use strict";var i=t(152),B=t(153),n=t(74),s=t(73),r=t(72);function o(A,e){return Object.keys(e).forEach((function(t){A[t]=e[t]})),A}A.exports=function A(){var e=o({},r),t="en",g={},a=function(A){return A},c=null,Q="warning",E={};function w(A,e,n){var s="string"==typeof A?A:A.default,r=I(s,"object"==typeof A&&A.id||a(s),n||t);return(r.format||(r.format=B(i(r.message),n||t,E)))(e)}w.rich=function(A,e,n){var s="string"==typeof A?A:A.default,r=I(s,"object"==typeof A&&A.id||a(s),n||t);return(r.toParts||(r.toParts=B.toParts(i(r.message,{tagsType:C}),n||t,E)))(e)};var C="<>";function l(A,e){var t=A[2];return function(A,e){var i="object"==typeof t?function(A,e){return Object.keys(A).reduce((function(t,i){return t[i]=A[i](e),t}),{})}(t,e):t;return"function"==typeof A?A(i):A}}function I(A,e,t){var i=s(t,g)||"en",B=g[i]||(g[i]={}),n=B[e];if("string"==typeof n&&(n=B[e]={message:n}),!n){var r='Translation for "'+e+'" in "'+i+'" is missing';if("warning"===Q)"undefined"!=typeof console&&console.warn(r);else if("ignore"!==Q)throw new Error(r);var o="function"==typeof c?c(A,e,i)||A:c||A;n=B[e]={message:o}}return n}function h(A,e,i,B,r){"object"==typeof i&&"object"!=typeof B&&(r=B,B=i,i=0);var o=s(r||t,n),g=o&&n[o][A]||u;return B["="+ +e]||B[g(e-i)]||B.other}function u(){return"other"}return E[C]=l,w.setup=function(A){return(A=A||{}).locale&&(t=A.locale),"translations"in A&&(g=A.translations||{}),A.generateId&&(a=A.generateId),"missingReplacement"in A&&(c=A.missingReplacement),A.missingTranslation&&(Q=A.missingTranslation),A.formats&&(A.formats.number&&o(e.number,A.formats.number),A.formats.date&&o(e.date,A.formats.date),A.formats.time&&o(e.time,A.formats.time)),A.types&&((E=A.types)[C]=l),{locale:t,translations:g,generateId:a,missingReplacement:c,missingTranslation:Q,formats:e,types:E}},w.number=function(A,i,B){var n=i&&e.number[i]||e.parseNumberPattern(i)||e.number.default;return new Intl.NumberFormat(B||t,n).format(A)},w.date=function(A,i,B){var n=i&&e.date[i]||e.parseDatePattern(i)||e.date.default;return new Intl.DateTimeFormat(B||t,n).format(A)},w.time=function(A,i,B){var n=i&&e.time[i]||e.parseDatePattern(i)||e.time.default;return new Intl.DateTimeFormat(B||t,n).format(A)},w.select=function(A,e){return e[A]||e.other},w.custom=function(A,e,t,i){return A[1]in E?E[A[1]](A,e)(t,i):t},w.plural=h.bind(null,"cardinal"),w.selectordinal=h.bind(null,"ordinal"),w.namespace=A,w}()},function(A,e,t){const i=t(1);class B{static withoutTrailingDigits(A){let e=A.length-1;for(;e>=0&&"0123456789".indexOf(A.charAt(e))>-1;)e--;return A.slice(0,e+1)}static unusedName(A,e){if(e.indexOf(A)<0)return A;A=B.withoutTrailingDigits(A);let t=2;for(;e.indexOf(A+t)>=0;)t++;return A+t}static splitFirst(A,e){const t=A.indexOf(e);return t>=0?[A.substring(0,t),A.substring(t+1)]:[A,null]}static stringify(A){return JSON.stringify(A,(A,e)=>"number"!=typeof e||e!==1/0&&e!==-1/0&&!isNaN(e)?e:0)}static replaceUnsafeChars(A){if("string"!=typeof A){if(!Array.isArray(A))return i.error("Unexpected input recieved in replaceUnsafeChars"),A;A=String(A)}return A.replace(/[<>&'"]/g,A=>{switch(A){case"<":return"lt";case">":return"gt";case"&":return"amp";case"'":return"apos";case'"':return"quot"}})}}A.exports=B},function(A,e){const t="!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";A.exports=function(){const A=t.length,e=[];for(let i=0;i<20;i++)e[i]=t.charAt(Math.random()*A);return e.join("")}},function(A,e){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch(A){"object"==typeof window&&(t=window)}A.exports=t},function(A,e,t){const i=t(8),B=t(34);class n{constructor(A,e,t,B){switch(this.id=A||i(),this.name=e,this.type=t,this.isCloud=B,this.type){case n.SCALAR_TYPE:this.value=0;break;case n.LIST_TYPE:this.value=[];break;case n.BROADCAST_MESSAGE_TYPE:this.value=this.name;break;default:throw new Error("Invalid variable type: ".concat(this.type))}}toXML(A){return A=!0===A,'').concat(B(this.name),"")}static get SCALAR_TYPE(){return""}static get LIST_TYPE(){return"list"}static get BROADCAST_MESSAGE_TYPE(){return"broadcast_msg"}}A.exports=n},function(A,e,t){ -/*! - * @license twgl.js 4.4.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved. - * Available via the MIT license. - * see: http://github.com/greggman/twgl.js for details - */ -var i;"undefined"!=typeof self&&self,i=function(){return function(A){var e={};function t(i){if(e[i])return e[i].exports;var B=e[i]={i:i,l:!1,exports:{}};return A[i].call(B.exports,B,B.exports,t),B.l=!0,B.exports}return t.m=A,t.c=e,t.d=function(A,e,i){t.o(A,e)||Object.defineProperty(A,e,{configurable:!1,enumerable:!0,get:i})},t.n=function(A){var e=A&&A.__esModule?function(){return A.default}:function(){return A};return t.d(e,"a",e),e},t.o=function(A,e){return Object.prototype.hasOwnProperty.call(A,e)},t.p="",t(t.s=9)}([function(A,e,t){"use strict";e.__esModule=!0,e.copyExistingProperties=function(A,e){Object.keys(e).forEach((function(t){e.hasOwnProperty(t)&&A.hasOwnProperty(t)&&(e[t]=A[t])}))},e.copyNamedProperties=function(A,e,t){A.forEach((function(A){var i=e[A];void 0!==i&&(t[A]=i)}))},e.isBuffer=function(A,e){return s||(s=A.createBuffer()),e instanceof s.constructor},e.isRenderbuffer=function(A,e){return r||(r=A.createRenderbuffer()),e instanceof r.constructor},e.isShader=function(A,e){return o||(o=A.createShader(A.VERTEX_SHADER)),e instanceof o.constructor},e.isTexture=function(A,e){return g||(g=A.createTexture()),e instanceof g.constructor},e.isSampler=function(A,e){if(!a){if(!A.createSampler)return!1;a=A.createSampler()}return e instanceof a.constructor},e.warn=e.error=void 0;var i,B=(i=t(2))&&i.__esModule?i:{default:i},n=B.default.console&&B.default.console.error&&"function"==typeof B.default.console.error?B.default.console.error.bind(B.default.console):function(){};e.error=n;var s,r,o,g,a,c=B.default.console&&B.default.console.warn&&"function"==typeof B.default.console.warn?B.default.console.warn.bind(B.default.console):function(){};e.warn=c},function(A,e,t){"use strict";e.__esModule=!0,e.getGLTypeForTypedArray=function(A){if(A instanceof Int8Array)return 5120;if(A instanceof Uint8Array)return 5121;if(A instanceof Uint8ClampedArray)return 5121;if(A instanceof Int16Array)return 5122;if(A instanceof Uint16Array)return 5123;if(A instanceof Int32Array)return 5124;if(A instanceof Uint32Array)return 5125;if(A instanceof Float32Array)return 5126;throw"unsupported typed array type"},e.getGLTypeForTypedArrayType=function(A){if(A===Int8Array)return 5120;if(A===Uint8Array)return 5121;if(A===Uint8ClampedArray)return 5121;if(A===Int16Array)return 5122;if(A===Uint16Array)return 5123;if(A===Int32Array)return 5124;if(A===Uint32Array)return 5125;if(A===Float32Array)return 5126;throw"unsupported typed array type"},e.getTypedArrayTypeForGLType=function(A){var e=n[A];if(!e)throw"unknown gl type";return e},e.isArrayBuffer=void 0;var i,B=(i=t(2))&&i.__esModule?i:{default:i},n={},s=n;s[5120]=Int8Array,s[5121]=Uint8Array,s[5122]=Int16Array,s[5123]=Uint16Array,s[5124]=Int32Array,s[5125]=Uint32Array,s[5126]=Float32Array,s[32819]=Uint16Array,s[32820]=Uint16Array,s[33635]=Uint16Array,s[5131]=Uint16Array,s[33640]=Uint32Array,s[35899]=Uint32Array,s[35902]=Uint32Array,s[36269]=Uint32Array,s[34042]=Uint32Array;var r=B.default.SharedArrayBuffer?function(A){return A&&A.buffer&&(A.buffer instanceof ArrayBuffer||A.buffer instanceof B.default.SharedArrayBuffer)}:function(A){return A&&A.buffer&&A.buffer instanceof ArrayBuffer};e.isArrayBuffer=r},function(A,e,t){"use strict";e.__esModule=!0,e.default=void 0;var i=void 0!==i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};e.default=i},function(A,e,t){"use strict";e.__esModule=!0,e.add=function(A,e,t){return(t=t||new i(3))[0]=A[0]+e[0],t[1]=A[1]+e[1],t[2]=A[2]+e[2],t},e.copy=function(A,e){return(e=e||new i(3))[0]=A[0],e[1]=A[1],e[2]=A[2],e},e.create=function(A,e,t){var B=new i(3);return A&&(B[0]=A),e&&(B[1]=e),t&&(B[2]=t),B},e.cross=function(A,e,t){t=t||new i(3);var B=A[2]*e[0]-A[0]*e[2],n=A[0]*e[1]-A[1]*e[0];return t[0]=A[1]*e[2]-A[2]*e[1],t[1]=B,t[2]=n,t},e.distance=function(A,e){var t=A[0]-e[0],i=A[1]-e[1],B=A[2]-e[2];return Math.sqrt(t*t+i*i+B*B)},e.distanceSq=function(A,e){var t=A[0]-e[0],i=A[1]-e[1],B=A[2]-e[2];return t*t+i*i+B*B},e.divide=function(A,e,t){return(t=t||new i(3))[0]=A[0]/e[0],t[1]=A[1]/e[1],t[2]=A[2]/e[2],t},e.divScalar=function(A,e,t){return(t=t||new i(3))[0]=A[0]/e,t[1]=A[1]/e,t[2]=A[2]/e,t},e.dot=function(A,e){return A[0]*e[0]+A[1]*e[1]+A[2]*e[2]},e.lerp=function(A,e,t,B){return(B=B||new i(3))[0]=(1-t)*A[0]+t*e[0],B[1]=(1-t)*A[1]+t*e[1],B[2]=(1-t)*A[2]+t*e[2],B},e.length=function(A){return Math.sqrt(A[0]*A[0]+A[1]*A[1]+A[2]*A[2])},e.lengthSq=function(A){return A[0]*A[0]+A[1]*A[1]+A[2]*A[2]},e.mulScalar=function(A,e,t){return(t=t||new i(3))[0]=A[0]*e,t[1]=A[1]*e,t[2]=A[2]*e,t},e.multiply=function(A,e,t){return(t=t||new i(3))[0]=A[0]*e[0],t[1]=A[1]*e[1],t[2]=A[2]*e[2],t},e.negate=function(A,e){return(e=e||new i(3))[0]=-A[0],e[1]=-A[1],e[2]=-A[2],e},e.normalize=function(A,e){e=e||new i(3);var t=A[0]*A[0]+A[1]*A[1]+A[2]*A[2],B=Math.sqrt(t);return B>1e-5?(e[0]=A[0]/B,e[1]=A[1]/B,e[2]=A[2]/B):(e[0]=0,e[1]=0,e[2]=0),e},e.setDefaultType=function(A){var e=i;return i=A,e},e.subtract=function(A,e,t){return(t=t||new i(3))[0]=A[0]-e[0],t[1]=A[1]-e[1],t[2]=A[2]-e[2],t};var i=Float32Array},function(A,e,t){"use strict";e.__esModule=!0,e.isWebGL1=function(A){return!A.texStorage2D},e.isWebGL2=function(A){return!!A.texStorage2D},e.glEnumToString=void 0;var i,B,n=(i={},B={},function(A,e){return function(A){var e=A.constructor.name;if(!i[e]){for(var t in A)if("number"==typeof A[t]){var n=B[A[t]];B[A[t]]=n?"".concat(n," | ").concat(t):t}i[e]=!0}}(A),B[e]||"0x"+e.toString(16)});e.glEnumToString=n},function(A,e,t){"use strict";e.__esModule=!0,e.createAttributeSetters=z,e.createProgram=G,e.createProgramFromScripts=function(A,e,t,i,B){for(var n=p(t,i,B),s=[],r=0;r=0?(void 0).FRAGMENT_SHADER:A.indexOf("vert")>=0?(void 0).VERTEX_SHADER:void 0}function N(A,e){e.forEach((function(e){A.deleteShader(e)}))}function G(A,e,t,i,B){for(var s=p(t,i,B),r=[],o=[],g=0;g1&&"[0]"===i.name.substr(-3),r=i.type,o=c[r];if(!o)throw"unknown type: 0x"+r.toString(16);if(o.bindPoint){var g=t;t+=i.size,B=s?o.arraySetter(A,r,g,n,i.size):o.setter(A,r,g,n,i.size)}else B=o.arraySetter&&s?o.arraySetter(A,n):o.setter(A,n);return B.location=n,B}for(var B={},n=A.getProgramParameter(e,A.ACTIVE_UNIFORMS),s=0;s0)throw"numComponents "+n+" not correct for length "+B;return s}(e),t},e.createBufferFromArray=h,e.createBufferFromTypedArray=o,e.createBufferInfoFromArrays=function(A,e){var t={attribs:l(A,e)},B=e.indices;if(B){var n=C(B,"indices");t.indices=o(A,n,A.ELEMENT_ARRAY_BUFFER),t.numElements=n.length,t.elementType=i.getGLTypeForTypedArray(n)}else t.numElements=function(A,e){var t,i;for(i=0;i0)throw"Can not guess numComponents for attribute '"+A+"'. Tried "+t+" but "+e+" values is not evenly divisible by "+t+". You should specify it.";return t}function w(A,e){return A.numComponents||A.size||E(e,a(A).length)}function C(A,e){if(i.isArrayBuffer(A))return A;if(i.isArrayBuffer(A.data))return A.data;Array.isArray(A)&&(A={data:A});var t=A.type;return t||(t=g(e)?Uint16Array:Float32Array),new t(A.data)}function l(A,e){var t={};return Object.keys(e).forEach((function(B){if(!g(B)){var n,r,a,c,Q,l=e[B],I=l.attrib||l.name||l.attribName||s.attribPrefix+B;if("number"==typeof l||"number"==typeof l.data){Q=l.data||l;var h=l.type||Float32Array,u=Q*h.BYTES_PER_ELEMENT;r=i.getGLTypeForTypedArrayType(h),a=void 0!==l.normalize?l.normalize:(Y=h)===Int8Array||Y===Uint8Array,c=l.numComponents||l.size||E(B,Q),n=A.createBuffer(),A.bindBuffer(A.ARRAY_BUFFER,n),A.bufferData(A.ARRAY_BUFFER,u,l.drawType||A.STATIC_DRAW)}else{var d=C(l,B);n=o(A,d,void 0,l.drawType),r=i.getGLTypeForTypedArray(d),a=void 0!==l.normalize?l.normalize:function(A){return A instanceof Int8Array||A instanceof Uint8Array}(d),c=w(l,B),Q=d.length}t[I]={buffer:n,numComponents:c,type:r,normalize:a,stride:l.stride||0,offset:l.offset||0,divisor:void 0===l.divisor?void 0:l.divisor,drawType:l.drawType}}var Y})),A.bindBuffer(A.ARRAY_BUFFER,null),t}var I=["position","positions","a_position"];function h(A,e,t){var i="indices"===t?A.ELEMENT_ARRAY_BUFFER:A.ARRAY_BUFFER;return o(A,C(e,t),i)}},function(A,e,t){"use strict";e.__esModule=!0,e.setTextureDefaults_=function(A){s.copyExistingProperties(A,g),A.textureColor&&F(A.textureColor)},e.createSampler=H,e.createSamplers=function(A,e){var t={};return Object.keys(e).forEach((function(i){t[i]=H(A,e[i])})),t},e.setSamplerParameters=y,e.createTexture=V,e.setEmptyTexture=O,e.setTextureFromArray=W,e.loadTextureFromUrl=v,e.setTextureFromElement=T,e.setTextureFilteringForSize=R,e.setTextureParameters=G,e.setDefaultTextureColor=F,e.createTextures=function(A,e,t){t=t||S;var i=0,B=[],n={},s={};function r(){0===i&&setTimeout((function(){t(B.length?B:void 0,n,s)}),0)}return Object.keys(e).forEach((function(t){var o,g,a=e[t];("string"==typeof(g=a.src)||Array.isArray(g)&&"string"==typeof g[0])&&(o=function(A,e,n){s[t]=n,--i,A&&B.push(A),r()},++i),n[t]=V(A,a,o)})),r(),n},e.resizeTexture=function(A,e,t,i,B){i=i||t.width,B=B||t.height;var n=t.target||A.TEXTURE_2D;A.bindTexture(n,e);var s,r=t.level||0,o=t.internalFormat||t.format||A.RGBA,g=u(o),c=t.format||g.format,Q=t.src;if(s=Q&&(a(Q)||Array.isArray(Q)&&"number"==typeof Q[0])?t.type||Y(A,Q,g.type):t.type||g.type,n===A.TEXTURE_CUBE_MAP)for(var E=0;E<6;++E)A.texImage2D(A.TEXTURE_CUBE_MAP_POSITIVE_X+E,r,o,i,B,0,c,s,null);else A.texImage2D(n,r,o,i,B,0,c,s,null)},e.getNumComponentsForFormat=function(A){var e=w[A];if(!e)throw"unknown format: "+A;return e.numColorComponents},e.getBytesPerElementForInternalFormat=h;var i,B=o(t(4)),n=o(t(1)),s=o(t(0)),r=(i=t(2))&&i.__esModule?i:{default:i};function o(A){if(A&&A.__esModule)return A;var e={};if(null!=A)for(var t in A)if(Object.prototype.hasOwnProperty.call(A,t)){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(A,t):{};i.get||i.set?Object.defineProperty(e,t,i):e[t]=A[t]}return e.default=A,e}var g={textureColor:new Uint8Array([128,192,255,255]),textureOptions:{},crossOrigin:void 0},a=n.isArrayBuffer,c=r.default.document&&r.default.document.createElement?r.default.document.createElement("canvas").getContext("2d"):null,Q=6407,E=33319,w={},C=w;C[6406]={numColorComponents:1},C[6409]={numColorComponents:1},C[6410]={numColorComponents:2},C[Q]={numColorComponents:3},C[6408]={numColorComponents:4},C[6403]={numColorComponents:1},C[36244]={numColorComponents:1},C[E]={numColorComponents:2},C[33320]={numColorComponents:2},C[Q]={numColorComponents:3},C[36248]={numColorComponents:3},C[6408]={numColorComponents:4},C[36249]={numColorComponents:4},C[6402]={numColorComponents:1},C[34041]={numColorComponents:2};var l={},I=l;function h(A,e){var t=l[A];if(!t)throw"unknown internal format";var i=t.bytesPerElementMap[e];if(void 0===i)throw"unknown internal format";return i}function u(A){var e=l[A];if(!e)throw"unknown internal format";return{format:e.textureFormat,type:Array.isArray(e.type)?e.type[0]:e.type}}function d(A){return 0==(A&A-1)}function Y(A,e,t){return a(e)?n.getGLTypeForTypedArray(e):t||A.UNSIGNED_BYTE}function M(A,e,t,i,B){if(B%1!=0)throw"can't guess dimensions";if(t||i){if(i){if(!t&&(t=B/i)%1)throw"can't guess dimensions"}else if((i=B/t)%1)throw"can't guess dimensions"}else{var n=Math.sqrt(B/(e===A.TEXTURE_CUBE_MAP?6:1));n%1==0?(t=n,i=n):(t=B,i=1)}return{width:t,height:i}}function F(A){g.textureColor=new Uint8Array([255*A[0],255*A[1],255*A[2],255*A[3]])}I[6406]={textureFormat:6406,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[5121,5131,36193,5126]},I[6409]={textureFormat:6409,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[5121,5131,36193,5126]},I[6410]={textureFormat:6410,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2,4,4,8],type:[5121,5131,36193,5126]},I[Q]={textureFormat:Q,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,6,6,12,2],type:[5121,5131,36193,5126,33635]},I[6408]={textureFormat:6408,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,8,8,16,2,2],type:[5121,5131,36193,5126,32819,32820]},I[33321]={textureFormat:6403,colorRenderable:!0,textureFilterable:!0,bytesPerElement:1,type:5121},I[36756]={textureFormat:6403,colorRenderable:!1,textureFilterable:!0,bytesPerElement:1,type:5120},I[33325]={textureFormat:6403,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4,2],type:[5126,5131]},I[33326]={textureFormat:6403,colorRenderable:!1,textureFilterable:!1,bytesPerElement:4,type:5126},I[33330]={textureFormat:36244,colorRenderable:!0,textureFilterable:!1,bytesPerElement:1,type:5121},I[33329]={textureFormat:36244,colorRenderable:!0,textureFilterable:!1,bytesPerElement:1,type:5120},I[33332]={textureFormat:36244,colorRenderable:!0,textureFilterable:!1,bytesPerElement:2,type:5123},I[33331]={textureFormat:36244,colorRenderable:!0,textureFilterable:!1,bytesPerElement:2,type:5122},I[33334]={textureFormat:36244,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:5125},I[33333]={textureFormat:36244,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:5124},I[33323]={textureFormat:E,colorRenderable:!0,textureFilterable:!0,bytesPerElement:2,type:5121},I[36757]={textureFormat:E,colorRenderable:!1,textureFilterable:!0,bytesPerElement:2,type:5120},I[33327]={textureFormat:E,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[8,4],type:[5126,5131]},I[33328]={textureFormat:E,colorRenderable:!1,textureFilterable:!1,bytesPerElement:8,type:5126},I[33336]={textureFormat:33320,colorRenderable:!0,textureFilterable:!1,bytesPerElement:2,type:5121},I[33335]={textureFormat:33320,colorRenderable:!0,textureFilterable:!1,bytesPerElement:2,type:5120},I[33338]={textureFormat:33320,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:5123},I[33337]={textureFormat:33320,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:5122},I[33340]={textureFormat:33320,colorRenderable:!0,textureFilterable:!1,bytesPerElement:8,type:5125},I[33339]={textureFormat:33320,colorRenderable:!0,textureFilterable:!1,bytesPerElement:8,type:5124},I[32849]={textureFormat:Q,colorRenderable:!0,textureFilterable:!0,bytesPerElement:3,type:5121},I[35905]={textureFormat:Q,colorRenderable:!1,textureFilterable:!0,bytesPerElement:3,type:5121},I[36194]={textureFormat:Q,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,2],type:[5121,33635]},I[36758]={textureFormat:Q,colorRenderable:!1,textureFilterable:!0,bytesPerElement:3,type:5120},I[35898]={textureFormat:Q,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[5126,5131,35899]},I[35901]={textureFormat:Q,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[5126,5131,35902]},I[34843]={textureFormat:Q,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6],type:[5126,5131]},I[34837]={textureFormat:Q,colorRenderable:!1,textureFilterable:!1,bytesPerElement:12,type:5126},I[36221]={textureFormat:36248,colorRenderable:!1,textureFilterable:!1,bytesPerElement:3,type:5121},I[36239]={textureFormat:36248,colorRenderable:!1,textureFilterable:!1,bytesPerElement:3,type:5120},I[36215]={textureFormat:36248,colorRenderable:!1,textureFilterable:!1,bytesPerElement:6,type:5123},I[36233]={textureFormat:36248,colorRenderable:!1,textureFilterable:!1,bytesPerElement:6,type:5122},I[36209]={textureFormat:36248,colorRenderable:!1,textureFilterable:!1,bytesPerElement:12,type:5125},I[36227]={textureFormat:36248,colorRenderable:!1,textureFilterable:!1,bytesPerElement:12,type:5124},I[32856]={textureFormat:6408,colorRenderable:!0,textureFilterable:!0,bytesPerElement:4,type:5121},I[35907]={textureFormat:6408,colorRenderable:!0,textureFilterable:!0,bytesPerElement:4,type:5121},I[36759]={textureFormat:6408,colorRenderable:!1,textureFilterable:!0,bytesPerElement:4,type:5120},I[32855]={textureFormat:6408,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2,4],type:[5121,32820,33640]},I[32854]={textureFormat:6408,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2],type:[5121,32819]},I[32857]={textureFormat:6408,colorRenderable:!0,textureFilterable:!0,bytesPerElement:4,type:33640},I[34842]={textureFormat:6408,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[16,8],type:[5126,5131]},I[34836]={textureFormat:6408,colorRenderable:!1,textureFilterable:!1,bytesPerElement:16,type:5126},I[36220]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:5121},I[36238]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:5120},I[36975]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:33640},I[36214]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:8,type:5123},I[36232]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:8,type:5122},I[36226]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:16,type:5124},I[36208]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:16,type:5125},I[33189]={textureFormat:6402,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[5123,5125]},I[33190]={textureFormat:6402,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:5125},I[36012]={textureFormat:6402,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:5126},I[35056]={textureFormat:34041,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:34042},I[36013]={textureFormat:34041,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:36269},Object.keys(I).forEach((function(A){var e=I[A];if(e.bytesPerElementMap={},Array.isArray(e.bytesPerElement))e.bytesPerElement.forEach((function(A,t){var i=e.type[t];e.bytesPerElementMap[i]=A}));else{var t=e.type;e.bytesPerElementMap[t]=e.bytesPerElement}}));var D={};function m(A,e){void 0!==e.colorspaceConversion&&(D.colorspaceConversion=A.getParameter(A.UNPACK_COLORSPACE_CONVERSION_WEBGL),A.pixelStorei(A.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.colorspaceConversion)),void 0!==e.premultiplyAlpha&&(D.premultiplyAlpha=A.getParameter(A.UNPACK_PREMULTIPLY_ALPHA_WEBGL),A.pixelStorei(A.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.premultiplyAlpha)),void 0!==e.flipY&&(D.flipY=A.getParameter(A.UNPACK_FLIP_Y_WEBGL),A.pixelStorei(A.UNPACK_FLIP_Y_WEBGL,e.flipY))}function p(A,e){void 0!==e.colorspaceConversion&&A.pixelStorei(A.UNPACK_COLORSPACE_CONVERSION_WEBGL,D.colorspaceConversion),void 0!==e.premultiplyAlpha&&A.pixelStorei(A.UNPACK_PREMULTIPLY_ALPHA_WEBGL,D.premultiplyAlpha),void 0!==e.flipY&&A.pixelStorei(A.UNPACK_FLIP_Y_WEBGL,D.flipY)}function U(A){D.unpackAlignment=A.getParameter(A.UNPACK_ALIGNMENT),B.isWebGL2(A)&&(D.unpackRowLength=A.getParameter(A.UNPACK_ROW_LENGTH),D.unpackImageHeight=A.getParameter(A.UNPACK_IMAGE_HEIGHT),D.unpackSkipPixels=A.getParameter(A.UNPACK_SKIP_PIXELS),D.unpackSkipRows=A.getParameter(A.UNPACK_SKIP_ROWS),D.unpackSkipImages=A.getParameter(A.UNPACK_SKIP_IMAGES))}function f(A){A.pixelStorei(A.UNPACK_ALIGNMENT,D.unpackAlignment),B.isWebGL2(A)&&(A.pixelStorei(A.UNPACK_ROW_LENGTH,D.unpackRowLength),A.pixelStorei(A.UNPACK_IMAGE_HEIGHT,D.unpackImageHeight),A.pixelStorei(A.UNPACK_SKIP_PIXELS,D.unpackSkipPixels),A.pixelStorei(A.UNPACK_SKIP_ROWS,D.unpackSkipRows),A.pixelStorei(A.UNPACK_SKIP_IMAGES,D.unpackSkipImages))}function N(A,e,t,i){i.minMag&&(t.call(A,e,A.TEXTURE_MIN_FILTER,i.minMag),t.call(A,e,A.TEXTURE_MAG_FILTER,i.minMag)),i.min&&t.call(A,e,A.TEXTURE_MIN_FILTER,i.min),i.mag&&t.call(A,e,A.TEXTURE_MAG_FILTER,i.mag),i.wrap&&(t.call(A,e,A.TEXTURE_WRAP_S,i.wrap),t.call(A,e,A.TEXTURE_WRAP_T,i.wrap),(e===A.TEXTURE_3D||s.isSampler(A,e))&&t.call(A,e,A.TEXTURE_WRAP_R,i.wrap)),i.wrapR&&t.call(A,e,A.TEXTURE_WRAP_R,i.wrapR),i.wrapS&&t.call(A,e,A.TEXTURE_WRAP_S,i.wrapS),i.wrapT&&t.call(A,e,A.TEXTURE_WRAP_T,i.wrapT),i.minLod&&t.call(A,e,A.TEXTURE_MIN_LOD,i.minLod),i.maxLod&&t.call(A,e,A.TEXTURE_MAX_LOD,i.maxLod),i.baseLevel&&t.call(A,e,A.TEXTURE_BASE_LEVEL,i.baseLevel),i.maxLevel&&t.call(A,e,A.TEXTURE_MAX_LEVEL,i.maxLevel)}function G(A,e,t){var i=t.target||A.TEXTURE_2D;A.bindTexture(i,e),N(A,i,A.texParameteri,t)}function y(A,e,t){N(A,e,A.samplerParameteri,t)}function H(A,e){var t=A.createSampler();return y(A,t,e),t}function R(A,e,t,i,n,s,r){t=t||g.textureOptions,s=s||A.RGBA,r=r||A.UNSIGNED_BYTE;var o=t.target||A.TEXTURE_2D;if(i=i||t.width,n=n||t.height,A.bindTexture(o,e),function(A,e,t,i){if(!B.isWebGL2(A))return d(e)&&d(t);var n=l[i];if(!n)throw"unknown internal format";return n.colorRenderable&&n.textureFilterable}(A,i,n,s))A.generateMipmap(o);else{var a=function(A){var e=l[A];if(!e)throw"unknown internal format";return e.textureFilterable}(s)?A.LINEAR:A.NEAREST;A.texParameteri(o,A.TEXTURE_MIN_FILTER,a),A.texParameteri(o,A.TEXTURE_MAG_FILTER,a),A.texParameteri(o,A.TEXTURE_WRAP_S,A.CLAMP_TO_EDGE),A.texParameteri(o,A.TEXTURE_WRAP_T,A.CLAMP_TO_EDGE)}}function k(A){return!0===A.auto||void 0===A.auto&&void 0===A.level}function x(A,e){return(e=e||{}).cubeFaceOrder||[A.TEXTURE_CUBE_MAP_POSITIVE_X,A.TEXTURE_CUBE_MAP_NEGATIVE_X,A.TEXTURE_CUBE_MAP_POSITIVE_Y,A.TEXTURE_CUBE_MAP_NEGATIVE_Y,A.TEXTURE_CUBE_MAP_POSITIVE_Z,A.TEXTURE_CUBE_MAP_NEGATIVE_Z]}function J(A,e){var t=x(A,e).map((function(A,e){return{face:A,ndx:e}}));return t.sort((function(A,e){return A.face-e.face})),t}function T(A,e,t,i){var B=(i=i||g.textureOptions).target||A.TEXTURE_2D,n=i.level||0,s=t.width,o=t.height,a=i.internalFormat||i.format||A.RGBA,Q=u(a),E=i.format||Q.format,w=i.type||Q.type;if(m(A,i),A.bindTexture(B,e),B===A.TEXTURE_CUBE_MAP){var C,l,I=t.width,h=t.height;if(I/6===h)C=h,l=[0,0,1,0,2,0,3,0,4,0,5,0];else if(h/6===I)C=I,l=[0,0,0,1,0,2,0,3,0,4,0,5];else if(I/3==h/2)C=I/3,l=[0,0,1,0,2,0,0,1,1,1,2,1];else{if(I/2!=h/3)throw"can't figure out cube map from element: "+(t.src?t.src:t.nodeName);C=I/2,l=[0,0,1,0,0,1,1,1,0,2,1,2]}c?(c.canvas.width=C,c.canvas.height=C,s=C,o=C,J(A,i).forEach((function(e){var i=l[2*e.ndx+0]*C,B=l[2*e.ndx+1]*C;c.drawImage(t,i,B,C,C,0,0,C,C),A.texImage2D(e.face,n,a,E,w,c.canvas)})),c.canvas.width=1,c.canvas.height=1):r.default.createImageBitmap&&(s=C,o=C,J(A,i).forEach((function(g){var c=l[2*g.ndx+0]*C,Q=l[2*g.ndx+1]*C;A.texImage2D(g.face,n,a,C,C,0,E,w,null),r.default.createImageBitmap(t,c,Q,C,C,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then((function(t){m(A,i),A.bindTexture(B,e),A.texImage2D(g.face,n,a,E,w,t),p(A,i),k(i)&&R(A,e,i,s,o,a,w)}))})))}else if(B===A.TEXTURE_3D||B===A.TEXTURE_2D_ARRAY){var d=Math.min(t.width,t.height),Y=Math.max(t.width,t.height),M=Y/d;if(M%1!=0)throw"can not compute 3D dimensions of element";var F=t.width===Y?1:0,D=t.height===Y?1:0;U(A),A.pixelStorei(A.UNPACK_ALIGNMENT,1),A.pixelStorei(A.UNPACK_ROW_LENGTH,t.width),A.pixelStorei(A.UNPACK_IMAGE_HEIGHT,0),A.pixelStorei(A.UNPACK_SKIP_IMAGES,0),A.texImage3D(B,n,a,d,d,d,0,E,w,null);for(var N=0;N=0?h(i,e):t.indexOf("tan")>=0||t.indexOf("binorm")>=0?l(i,e):t.indexOf("norm")>=0&&I(i,e)})),A}function d(A,e,t){return A=A||2,{position:{numComponents:2,data:[(e=e||0)+-1*(A*=.5),(t=t||0)+-1*A,e+1*A,t+-1*A,e+-1*A,t+1*A,e+1*A,t+1*A]},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 Y(A,e,t,i,B){A=A||1,e=e||1,t=t||1,i=i||1,B=B||s.identity();for(var n=(t+1)*(i+1),r=Q(3,n),o=Q(3,n),g=Q(2,n),a=0;a<=i;a++)for(var c=0;c<=t;c++){var E=c/t,w=a/i;r.push(A*E-.5*A,0,e*w-.5*e),o.push(0,1,0),g.push(E,w)}for(var C=t+1,l=Q(3,t*i*2,Uint16Array),I=0;I 0");i=i||0,n=n||0;for(var r=(B=B||Math.PI)-i,o=(s=s||2*Math.PI)-n,g=(e+1)*(t+1),a=Q(3,g),c=Q(3,g),E=Q(2,g),w=0;w<=t;w++)for(var C=0;C<=e;C++){var l=C/e,I=w/t,h=o*l,u=r*I,d=Math.sin(h),Y=Math.cos(h),M=Math.sin(u),F=Y*M,D=Math.cos(u),m=d*M;a.push(A*F,A*D,A*m),c.push(F,D,m),E.push(1-l,I)}for(var p=e+1,U=Q(3,e*t*2,Uint16Array),f=0;fB?(F=t,M=1,D=e):D=A+Y/B*(e-A),-2!==Y&&Y!==B+2||(D=0,M=0),F-=t/2;for(var m=0;mB?0:p*h,Y<0?-1:Y>B?1:u,Y<0||Y>B?0:U*h),w.push(m/i,1-M)}}for(var f=0;f 0");var o=(s=s||1)-(n=n||0),g=2*(B+1)*4,a=Q(3,g),c=Q(3,g),E=Q(2,g);function w(A,e,t){return A+(e-A)*t}function C(e,t,s,g,Q,C){for(var l=0;l<=B;l++){var I=t/1,h=l/B,u=2*(I-.5),d=(n+h*o)*Math.PI,Y=Math.sin(d),M=Math.cos(d),F=w(A,e,Y),D=u*i,m=M*A,p=Y*F;a.push(D,m,p);var U=r.add(r.multiply([0,Y,M],s),g);c.push(U),E.push(I*Q+C,h)}}for(var l=0;l<2;l++){var I=2*(l/1-.5);C(e,l,[1,1,1],[0,0,0],1,0),C(e,l,[0,0,0],[I,0,0],0,0),C(t,l,[1,1,1],[0,0,0],1,0),C(t,l,[0,0,0],[I,0,0],0,1)}var h=Q(3,2*B*4,Uint16Array);function u(A,e){for(var t=0;t0&&l!==e){var d=a+(l+1),Y=a+l,M=a+l-E,F=a+(l+1)-E;g.push(d,Y,M),g.push(d,M,F)}}a+=e+1}return{position:s,normal:r,texcoord:o,indices:g}}function H(A){return function(e){var t=A.apply(this,Array.prototype.slice.call(arguments,1));return i.createBuffersFromArrays(e,t)}}function R(A){return function(e){var t=A.apply(null,Array.prototype.slice.call(arguments,1));return i.createBufferInfoFromArrays(e,t)}}var k=["numComponents","size","type","normalize","stride","offset","attrib","name","attribName"];function x(A,e,t,i){i=i||0;for(var B=A.length,n=0;n=A.length?void(f>24,m[p]=y,m[y++]=p;y{if("string"!=typeof A)return!1;for(let e=0;ei?1:0}return t===1/0&&i===1/0||t===-1/0&&i===-1/0?0:t-i}static isInt(A){return"number"==typeof A?!!isNaN(A)||A===Math.floor(A):"boolean"==typeof A||"string"==typeof A&&A.indexOf(".")<0}static get LIST_INVALID(){return"INVALID"}static get LIST_ALL(){return"ALL"}static toListIndex(A,e,t){if("number"!=typeof A){if("all"===A)return t?n.LIST_ALL:n.LIST_INVALID;if("last"===A)return e>0?e:n.LIST_INVALID;if("random"===A||"any"===A)return e>0?1+Math.floor(Math.random()*e):n.LIST_INVALID}return(A=Math.floor(n.toNumber(A)))<1||A>e?n.LIST_INVALID:A}}A.exports=n},function(A,e){A.exports={BOOLEAN:"Boolean",BUTTON:"button",LABEL:"label",COMMAND:"command",CONDITIONAL:"conditional",EVENT:"event",HAT:"hat",LOOP:"loop",REPORTER:"reporter",XML:"xml"}},function(A,e){A.exports={ANGLE:"angle",BOOLEAN:"Boolean",COLOR:"color",NUMBER:"number",STRING:"string",MATRIX:"matrix",NOTE:"note",IMAGE:"image",COSTUME:"costume",SOUND:"sound"}},function(A,e){A.exports=class{static degToRad(A){return A*Math.PI/180}static radToDeg(A){return 180*A/Math.PI}static clamp(A,e,t){return Math.min(Math.max(A,e),t)}static wrapClamp(A,e,t){const i=t-e+1;return A-Math.floor((A-e)/i)*i}static tan(A){switch(A%=360){case-270:case 90:return 1/0;case-90:case 270:return-1/0;default:return Math.round(1e10*Math.tan(Math.PI*A/180))/1e10}}static reducedSortOrdering(A){const e=A.slice(0).sort((A,e)=>A-e);return A.map(A=>e.indexOf(A))}static inclusiveRandIntWithout(A,e,t){const i=e-A,B=A+Math.floor(Math.random()*i);return B>=t?B+1:B}static scale(A,e,t,i,B){return(A-e)/(t-e)*(B-i)+i}}},function(A,e,t){"use strict";var i=t(152),B=t(153),n=t(74),s=t(73),r=t(72);function o(A,e){return Object.keys(e).forEach((function(t){A[t]=e[t]})),A}A.exports=function A(){var e=o({},r),t="en",g={},a=function(A){return A},c=null,Q="warning",E={};function w(A,e,n){var s="string"==typeof A?A:A.default,r=I(s,"object"==typeof A&&A.id||a(s),n||t);return(r.format||(r.format=B(i(r.message),n||t,E)))(e)}w.rich=function(A,e,n){var s="string"==typeof A?A:A.default,r=I(s,"object"==typeof A&&A.id||a(s),n||t);return(r.toParts||(r.toParts=B.toParts(i(r.message,{tagsType:C}),n||t,E)))(e)};var C="<>";function l(A,e){var t=A[2];return function(A,e){var i="object"==typeof t?function(A,e){return Object.keys(A).reduce((function(t,i){return t[i]=A[i](e),t}),{})}(t,e):t;return"function"==typeof A?A(i):A}}function I(A,e,t){var i=s(t,g)||"en",B=g[i]||(g[i]={}),n=B[e];if("string"==typeof n&&(n=B[e]={message:n}),!n){var r='Translation for "'+e+'" in "'+i+'" is missing';if("warning"===Q)"undefined"!=typeof console&&console.warn(r);else if("ignore"!==Q)throw new Error(r);var o="function"==typeof c?c(A,e,i)||A:c||A;n=B[e]={message:o}}return n}function h(A,e,i,B,r){"object"==typeof i&&"object"!=typeof B&&(r=B,B=i,i=0);var o=s(r||t,n),g=o&&n[o][A]||u;return B["="+ +e]||B[g(e-i)]||B.other}function u(){return"other"}return E[C]=l,w.setup=function(A){return(A=A||{}).locale&&(t=A.locale),"translations"in A&&(g=A.translations||{}),A.generateId&&(a=A.generateId),"missingReplacement"in A&&(c=A.missingReplacement),A.missingTranslation&&(Q=A.missingTranslation),A.formats&&(A.formats.number&&o(e.number,A.formats.number),A.formats.date&&o(e.date,A.formats.date),A.formats.time&&o(e.time,A.formats.time)),A.types&&((E=A.types)[C]=l),{locale:t,translations:g,generateId:a,missingReplacement:c,missingTranslation:Q,formats:e,types:E}},w.number=function(A,i,B){var n=i&&e.number[i]||e.parseNumberPattern(i)||e.number.default;return new Intl.NumberFormat(B||t,n).format(A)},w.date=function(A,i,B){var n=i&&e.date[i]||e.parseDatePattern(i)||e.date.default;return new Intl.DateTimeFormat(B||t,n).format(A)},w.time=function(A,i,B){var n=i&&e.time[i]||e.parseDatePattern(i)||e.time.default;return new Intl.DateTimeFormat(B||t,n).format(A)},w.select=function(A,e){return e[A]||e.other},w.custom=function(A,e,t,i){return A[1]in E?E[A[1]](A,e)(t,i):t},w.plural=h.bind(null,"cardinal"),w.selectordinal=h.bind(null,"ordinal"),w.namespace=A,w}()},function(A,e,t){const i=t(1);class B{static withoutTrailingDigits(A){let e=A.length-1;for(;e>=0&&"0123456789".indexOf(A.charAt(e))>-1;)e--;return A.slice(0,e+1)}static unusedName(A,e){if(e.indexOf(A)<0)return A;A=B.withoutTrailingDigits(A);let t=2;for(;e.indexOf(A+t)>=0;)t++;return A+t}static splitFirst(A,e){const t=A.indexOf(e);return t>=0?[A.substring(0,t),A.substring(t+1)]:[A,null]}static stringify(A){return JSON.stringify(A,(A,e)=>"number"!=typeof e||e!==1/0&&e!==-1/0&&!isNaN(e)?e:0)}static replaceUnsafeChars(A){if("string"!=typeof A){if(!Array.isArray(A))return i.error("Unexpected input recieved in replaceUnsafeChars"),A;A=String(A)}return A.replace(/[<>&'"]/g,A=>{switch(A){case"<":return"lt";case">":return"gt";case"&":return"amp";case"'":return"apos";case'"':return"quot"}})}}A.exports=B},function(A,e){const t="!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";A.exports=function(){const A=t.length,e=[];for(let i=0;i<20;i++)e[i]=t.charAt(Math.random()*A);return e.join("")}},function(A,e){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch(A){"object"==typeof window&&(t=window)}A.exports=t},function(A,e,t){const i=t(8),B=t(34);class n{constructor(A,e,t,B){switch(this.id=A||i(),this.name=e,this.type=t,this.isCloud=B,this.type){case n.SCALAR_TYPE:this.value=0;break;case n.LIST_TYPE:this.value=[];break;case n.BROADCAST_MESSAGE_TYPE:this.value=this.name;break;default:throw new Error("Invalid variable type: ".concat(this.type))}}toXML(A){return A=!0===A,'').concat(B(this.name),"")}static get SCALAR_TYPE(){return""}static get LIST_TYPE(){return"list"}static get BROADCAST_MESSAGE_TYPE(){return"broadcast_msg"}}A.exports=n},function(A,e,t){"use strict";t.r(e),t.d(e,"addExtensionsToContext",(function(){return Mi})),t.d(e,"attributes",(function(){return eA})),t.d(e,"bindFramebufferInfo",(function(){return ci})),t.d(e,"bindTransformFeedbackInfo",(function(){return kt})),t.d(e,"bindUniformBlock",(function(){return bt})),t.d(e,"canFilter",(function(){return le})),t.d(e,"canGenerateMipmap",(function(){return Ce})),t.d(e,"createAttribsFromArrays",(function(){return X})),t.d(e,"createAttributeSetters",(function(){return Wt})),t.d(e,"createBufferFromArray",(function(){return $})),t.d(e,"createBufferFromTypedArray",(function(){return S})),t.d(e,"createBufferInfoFromArrays",(function(){return q})),t.d(e,"createBuffersFromArrays",(function(){return AA})),t.d(e,"createFramebufferInfo",(function(){return gi})),t.d(e,"createProgram",(function(){return dt})),t.d(e,"createProgramAsync",(function(){return Mt})),t.d(e,"createProgramFromScripts",(function(){return pt})),t.d(e,"createProgramFromSources",(function(){return Ut})),t.d(e,"createProgramInfo",(function(){return _t})),t.d(e,"createProgramInfoAsync",(function(){return Ft})),t.d(e,"createProgramInfoFromProgram",(function(){return Kt})),t.d(e,"createProgramInfos",(function(){return $t})),t.d(e,"createProgramInfosAsync",(function(){return ei})),t.d(e,"createPrograms",(function(){return qt})),t.d(e,"createProgramsAsync",(function(){return Ai})),t.d(e,"createSampler",(function(){return Ue})),t.d(e,"createSamplers",(function(){return fe})),t.d(e,"createTexture",(function(){return Pe})),t.d(e,"createTextures",(function(){return Oe})),t.d(e,"createTransformFeedback",(function(){return Rt})),t.d(e,"createTransformFeedbackInfo",(function(){return Ht})),t.d(e,"createUniformBlockInfo",(function(){return St})),t.d(e,"createUniformBlockInfoFromProgram",(function(){return Tt})),t.d(e,"createUniformBlockSpecFromProgram",(function(){return xt})),t.d(e,"createUniformSetters",(function(){return yt})),t.d(e,"createVAOAndSetAttributes",(function(){return wi})),t.d(e,"createVAOFromBufferInfo",(function(){return Ci})),t.d(e,"createVertexArrayInfo",(function(){return Ei})),t.d(e,"draw",(function(){return ni})),t.d(e,"drawBufferInfo",(function(){return ii})),t.d(e,"drawObjectList",(function(){return Bi})),t.d(e,"framebuffers",(function(){return Qi})),t.d(e,"getArray_",(function(){return j})),t.d(e,"getBytesPerElementForInternalFormat",(function(){return Qe})),t.d(e,"getContext",(function(){return Di})),t.d(e,"getFormatAndTypeForInternalFormat",(function(){return Ee})),t.d(e,"getGLTypeForTypedArray",(function(){return M})),t.d(e,"getGLTypeForTypedArrayType",(function(){return F})),t.d(e,"getNumComponentsForFormat",(function(){return Ie})),t.d(e,"getNumComponents_",(function(){return L})),t.d(e,"getTypedArrayTypeForGLType",(function(){return D})),t.d(e,"getWebGLContext",(function(){return Fi})),t.d(e,"glEnumToString",(function(){return te})),t.d(e,"isArrayBuffer",(function(){return m})),t.d(e,"isWebGL1",(function(){return ee})),t.d(e,"isWebGL2",(function(){return Ae})),t.d(e,"loadTextureFromUrl",(function(){return be})),t.d(e,"m4",(function(){return d})),t.d(e,"primitives",(function(){return $A})),t.d(e,"programs",(function(){return ti})),t.d(e,"resizeCanvasToDisplaySize",(function(){return mi})),t.d(e,"resizeFramebufferInfo",(function(){return ai})),t.d(e,"resizeTexture",(function(){return We})),t.d(e,"setAttribInfoBufferFromArray",(function(){return _})),t.d(e,"setAttributeDefaults_",(function(){return J})),t.d(e,"setAttributePrefix",(function(){return x})),t.d(e,"setAttributes",(function(){return Ot})),t.d(e,"setBlockUniforms",(function(){return zt})),t.d(e,"setBuffersAndAttributes",(function(){return Vt})),t.d(e,"setDefaultTextureColor",(function(){return de})),t.d(e,"setDefaults",(function(){return hi})),t.d(e,"setEmptyTexture",(function(){return Le})),t.d(e,"setSamplerParameters",(function(){return pe})),t.d(e,"setTextureDefaults_",(function(){return Ye})),t.d(e,"setTextureFilteringForSize",(function(){return Ne})),t.d(e,"setTextureFromArray",(function(){return ve})),t.d(e,"setTextureFromElement",(function(){return ke})),t.d(e,"setTextureParameters",(function(){return me})),t.d(e,"setUniformBlock",(function(){return jt})),t.d(e,"setUniforms",(function(){return Lt})),t.d(e,"setUniformsAndBindTextures",(function(){return Pt})),t.d(e,"textures",(function(){return Ve})),t.d(e,"typedarrays",(function(){return p})),t.d(e,"utils",(function(){return ie})),t.d(e,"v3",(function(){return a})),t.d(e,"vertexArrays",(function(){return li})); +/* @license twgl.js 5.5.3 Copyright (c) 2015, Gregg Tavares All Rights Reserved. +Available via the MIT license. +see: http://github.com/greggman/twgl.js for details */ +let i=Float32Array;function B(A,e,t){const B=new i(3);return A&&(B[0]=A),e&&(B[1]=e),t&&(B[2]=t),B}function n(A,e,t){return(t=t||new i(3))[0]=A[0]+e[0],t[1]=A[1]+e[1],t[2]=A[2]+e[2],t}function s(A,e,t){return(t=t||new i(3))[0]=A[0]-e[0],t[1]=A[1]-e[1],t[2]=A[2]-e[2],t}function r(A,e,t){t=t||new i(3);const B=A[2]*e[0]-A[0]*e[2],n=A[0]*e[1]-A[1]*e[0];return t[0]=A[1]*e[2]-A[2]*e[1],t[1]=B,t[2]=n,t}function o(A,e){e=e||new i(3);const t=A[0]*A[0]+A[1]*A[1]+A[2]*A[2],B=Math.sqrt(t);return B>1e-5?(e[0]=A[0]/B,e[1]=A[1]/B,e[2]=A[2]/B):(e[0]=0,e[1]=0,e[2]=0),e}function g(A,e,t){return(t=t||new i(3))[0]=A[0]*e[0],t[1]=A[1]*e[1],t[2]=A[2]*e[2],t}var a=Object.freeze({__proto__:null,add:n,copy:function(A,e){return(e=e||new i(3))[0]=A[0],e[1]=A[1],e[2]=A[2],e},create:B,cross:r,distance:function(A,e){const t=A[0]-e[0],i=A[1]-e[1],B=A[2]-e[2];return Math.sqrt(t*t+i*i+B*B)},distanceSq:function(A,e){const t=A[0]-e[0],i=A[1]-e[1],B=A[2]-e[2];return t*t+i*i+B*B},divide:function(A,e,t){return(t=t||new i(3))[0]=A[0]/e[0],t[1]=A[1]/e[1],t[2]=A[2]/e[2],t},divScalar:function(A,e,t){return(t=t||new i(3))[0]=A[0]/e,t[1]=A[1]/e,t[2]=A[2]/e,t},dot:function(A,e){return A[0]*e[0]+A[1]*e[1]+A[2]*e[2]},lerp:function(A,e,t,B){return(B=B||new i(3))[0]=A[0]+t*(e[0]-A[0]),B[1]=A[1]+t*(e[1]-A[1]),B[2]=A[2]+t*(e[2]-A[2]),B},lerpV:function(A,e,t,B){return(B=B||new i(3))[0]=A[0]+t[0]*(e[0]-A[0]),B[1]=A[1]+t[1]*(e[1]-A[1]),B[2]=A[2]+t[2]*(e[2]-A[2]),B},length:function(A){return Math.sqrt(A[0]*A[0]+A[1]*A[1]+A[2]*A[2])},lengthSq:function(A){return A[0]*A[0]+A[1]*A[1]+A[2]*A[2]},max:function(A,e,t){return(t=t||new i(3))[0]=Math.max(A[0],e[0]),t[1]=Math.max(A[1],e[1]),t[2]=Math.max(A[2],e[2]),t},min:function(A,e,t){return(t=t||new i(3))[0]=Math.min(A[0],e[0]),t[1]=Math.min(A[1],e[1]),t[2]=Math.min(A[2],e[2]),t},mulScalar:function(A,e,t){return(t=t||new i(3))[0]=A[0]*e,t[1]=A[1]*e,t[2]=A[2]*e,t},multiply:g,negate:function(A,e){return(e=e||new i(3))[0]=-A[0],e[1]=-A[1],e[2]=-A[2],e},normalize:o,setDefaultType:function(A){const e=i;return i=A,e},subtract:s});let c,Q,E,w=Float32Array;function C(A,e){return(e=e||new w(16))[0]=A[0],e[1]=A[1],e[2]=A[2],e[3]=A[3],e[4]=A[4],e[5]=A[5],e[6]=A[6],e[7]=A[7],e[8]=A[8],e[9]=A[9],e[10]=A[10],e[11]=A[11],e[12]=A[12],e[13]=A[13],e[14]=A[14],e[15]=A[15],e}function l(A){return(A=A||new w(16))[0]=1,A[1]=0,A[2]=0,A[3]=0,A[4]=0,A[5]=1,A[6]=0,A[7]=0,A[8]=0,A[9]=0,A[10]=1,A[11]=0,A[12]=0,A[13]=0,A[14]=0,A[15]=1,A}function I(A,e){e=e||new w(16);const t=A[0],i=A[1],B=A[2],n=A[3],s=A[4],r=A[5],o=A[6],g=A[7],a=A[8],c=A[9],Q=A[10],E=A[11],C=A[12],l=A[13],I=A[14],h=A[15],u=Q*h,d=I*E,Y=o*h,M=I*g,F=o*E,D=Q*g,m=B*h,p=I*n,U=B*E,f=Q*n,N=B*g,G=o*n,y=a*l,H=C*c,k=s*l,R=C*r,x=s*c,J=a*r,T=t*l,S=C*i,b=t*c,j=a*i,z=t*r,v=s*i,L=u*r+M*c+F*l-(d*r+Y*c+D*l),P=d*i+m*c+f*l-(u*i+p*c+U*l),W=Y*i+p*r+N*l-(M*i+m*r+G*l),O=D*i+U*r+G*c-(F*i+f*r+N*c),V=1/(t*L+s*P+a*W+C*O);return e[0]=V*L,e[1]=V*P,e[2]=V*W,e[3]=V*O,e[4]=V*(d*s+Y*a+D*C-(u*s+M*a+F*C)),e[5]=V*(u*t+p*a+U*C-(d*t+m*a+f*C)),e[6]=V*(M*t+m*s+G*C-(Y*t+p*s+N*C)),e[7]=V*(F*t+f*s+N*a-(D*t+U*s+G*a)),e[8]=V*(y*g+R*E+x*h-(H*g+k*E+J*h)),e[9]=V*(H*n+T*E+j*h-(y*n+S*E+b*h)),e[10]=V*(k*n+S*g+z*h-(R*n+T*g+v*h)),e[11]=V*(J*n+b*g+v*E-(x*n+j*g+z*E)),e[12]=V*(k*Q+J*I+H*o-(x*I+y*o+R*Q)),e[13]=V*(b*I+y*B+S*Q-(T*Q+j*I+H*B)),e[14]=V*(T*o+v*I+R*B-(z*I+k*B+S*o)),e[15]=V*(z*Q+x*B+j*o-(b*o+v*Q+J*B)),e}function h(A,e,t){t=t||B();const i=e[0],n=e[1],s=e[2],r=i*A[3]+n*A[7]+s*A[11]+A[15];return t[0]=(i*A[0]+n*A[4]+s*A[8]+A[12])/r,t[1]=(i*A[1]+n*A[5]+s*A[9]+A[13])/r,t[2]=(i*A[2]+n*A[6]+s*A[10]+A[14])/r,t}function u(A,e,t){t=t||B();const i=e[0],n=e[1],s=e[2];return t[0]=i*A[0]+n*A[4]+s*A[8],t[1]=i*A[1]+n*A[5]+s*A[9],t[2]=i*A[2]+n*A[6]+s*A[10],t}var d=Object.freeze({__proto__:null,axisRotate:function(A,e,t,i){i=i||new w(16);let B=e[0],n=e[1],s=e[2];const r=Math.sqrt(B*B+n*n+s*s);B/=r,n/=r,s/=r;const o=B*B,g=n*n,a=s*s,c=Math.cos(t),Q=Math.sin(t),E=1-c,C=o+(1-o)*c,l=B*n*E+s*Q,I=B*s*E-n*Q,h=B*n*E-s*Q,u=g+(1-g)*c,d=n*s*E+B*Q,Y=B*s*E+n*Q,M=n*s*E-B*Q,F=a+(1-a)*c,D=A[0],m=A[1],p=A[2],U=A[3],f=A[4],N=A[5],G=A[6],y=A[7],H=A[8],k=A[9],R=A[10],x=A[11];return i[0]=C*D+l*f+I*H,i[1]=C*m+l*N+I*k,i[2]=C*p+l*G+I*R,i[3]=C*U+l*y+I*x,i[4]=h*D+u*f+d*H,i[5]=h*m+u*N+d*k,i[6]=h*p+u*G+d*R,i[7]=h*U+u*y+d*x,i[8]=Y*D+M*f+F*H,i[9]=Y*m+M*N+F*k,i[10]=Y*p+M*G+F*R,i[11]=Y*U+M*y+F*x,A!==i&&(i[12]=A[12],i[13]=A[13],i[14]=A[14],i[15]=A[15]),i},axisRotation:function(A,e,t){t=t||new w(16);let i=A[0],B=A[1],n=A[2];const s=Math.sqrt(i*i+B*B+n*n);i/=s,B/=s,n/=s;const r=i*i,o=B*B,g=n*n,a=Math.cos(e),c=Math.sin(e),Q=1-a;return t[0]=r+(1-r)*a,t[1]=i*B*Q+n*c,t[2]=i*n*Q-B*c,t[3]=0,t[4]=i*B*Q-n*c,t[5]=o+(1-o)*a,t[6]=B*n*Q+i*c,t[7]=0,t[8]=i*n*Q+B*c,t[9]=B*n*Q-i*c,t[10]=g+(1-g)*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},copy:C,create:function(){return new w(16).fill(0)},frustum:function(A,e,t,i,B,n,s){const r=e-A,o=i-t,g=B-n;return(s=s||new w(16))[0]=2*B/r,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2*B/o,s[6]=0,s[7]=0,s[8]=(A+e)/r,s[9]=(i+t)/o,s[10]=n/g,s[11]=-1,s[12]=0,s[13]=0,s[14]=B*n/g,s[15]=0,s},getAxis:function(A,e,t){const i=4*e;return(t=t||B())[0]=A[i+0],t[1]=A[i+1],t[2]=A[i+2],t},getTranslation:function(A,e){return(e=e||B())[0]=A[12],e[1]=A[13],e[2]=A[14],e},identity:l,inverse:I,lookAt:function(A,e,t,i){return i=i||new w(16),c=c||B(),Q=Q||B(),E=E||B(),o(s(A,e,E),E),o(r(t,E,c),c),o(r(E,c,Q),Q),i[0]=c[0],i[1]=c[1],i[2]=c[2],i[3]=0,i[4]=Q[0],i[5]=Q[1],i[6]=Q[2],i[7]=0,i[8]=E[0],i[9]=E[1],i[10]=E[2],i[11]=0,i[12]=A[0],i[13]=A[1],i[14]=A[2],i[15]=1,i},multiply:function(A,e,t){t=t||new w(16);const i=A[0],B=A[1],n=A[2],s=A[3],r=A[4],o=A[5],g=A[6],a=A[7],c=A[8],Q=A[9],E=A[10],C=A[11],l=A[12],I=A[13],h=A[14],u=A[15],d=e[0],Y=e[1],M=e[2],F=e[3],D=e[4],m=e[5],p=e[6],U=e[7],f=e[8],N=e[9],G=e[10],y=e[11],H=e[12],k=e[13],R=e[14],x=e[15];return t[0]=i*d+r*Y+c*M+l*F,t[1]=B*d+o*Y+Q*M+I*F,t[2]=n*d+g*Y+E*M+h*F,t[3]=s*d+a*Y+C*M+u*F,t[4]=i*D+r*m+c*p+l*U,t[5]=B*D+o*m+Q*p+I*U,t[6]=n*D+g*m+E*p+h*U,t[7]=s*D+a*m+C*p+u*U,t[8]=i*f+r*N+c*G+l*y,t[9]=B*f+o*N+Q*G+I*y,t[10]=n*f+g*N+E*G+h*y,t[11]=s*f+a*N+C*G+u*y,t[12]=i*H+r*k+c*R+l*x,t[13]=B*H+o*k+Q*R+I*x,t[14]=n*H+g*k+E*R+h*x,t[15]=s*H+a*k+C*R+u*x,t},negate:function(A,e){return(e=e||new w(16))[0]=-A[0],e[1]=-A[1],e[2]=-A[2],e[3]=-A[3],e[4]=-A[4],e[5]=-A[5],e[6]=-A[6],e[7]=-A[7],e[8]=-A[8],e[9]=-A[9],e[10]=-A[10],e[11]=-A[11],e[12]=-A[12],e[13]=-A[13],e[14]=-A[14],e[15]=-A[15],e},ortho:function(A,e,t,i,B,n,s){return(s=s||new w(16))[0]=2/(e-A),s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2/(i-t),s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=2/(B-n),s[11]=0,s[12]=(e+A)/(A-e),s[13]=(i+t)/(t-i),s[14]=(n+B)/(B-n),s[15]=1,s},perspective:function(A,e,t,i,B){B=B||new w(16);const n=Math.tan(.5*Math.PI-.5*A),s=1/(t-i);return B[0]=n/e,B[1]=0,B[2]=0,B[3]=0,B[4]=0,B[5]=n,B[6]=0,B[7]=0,B[8]=0,B[9]=0,B[10]=(t+i)*s,B[11]=-1,B[12]=0,B[13]=0,B[14]=t*i*s*2,B[15]=0,B},rotateX:function(A,e,t){t=t||new w(16);const i=A[4],B=A[5],n=A[6],s=A[7],r=A[8],o=A[9],g=A[10],a=A[11],c=Math.cos(e),Q=Math.sin(e);return t[4]=c*i+Q*r,t[5]=c*B+Q*o,t[6]=c*n+Q*g,t[7]=c*s+Q*a,t[8]=c*r-Q*i,t[9]=c*o-Q*B,t[10]=c*g-Q*n,t[11]=c*a-Q*s,A!==t&&(t[0]=A[0],t[1]=A[1],t[2]=A[2],t[3]=A[3],t[12]=A[12],t[13]=A[13],t[14]=A[14],t[15]=A[15]),t},rotateY:function(A,e,t){t=t||new w(16);const i=A[0],B=A[1],n=A[2],s=A[3],r=A[8],o=A[9],g=A[10],a=A[11],c=Math.cos(e),Q=Math.sin(e);return t[0]=c*i-Q*r,t[1]=c*B-Q*o,t[2]=c*n-Q*g,t[3]=c*s-Q*a,t[8]=c*r+Q*i,t[9]=c*o+Q*B,t[10]=c*g+Q*n,t[11]=c*a+Q*s,A!==t&&(t[4]=A[4],t[5]=A[5],t[6]=A[6],t[7]=A[7],t[12]=A[12],t[13]=A[13],t[14]=A[14],t[15]=A[15]),t},rotateZ:function(A,e,t){t=t||new w(16);const i=A[0],B=A[1],n=A[2],s=A[3],r=A[4],o=A[5],g=A[6],a=A[7],c=Math.cos(e),Q=Math.sin(e);return t[0]=c*i+Q*r,t[1]=c*B+Q*o,t[2]=c*n+Q*g,t[3]=c*s+Q*a,t[4]=c*r-Q*i,t[5]=c*o-Q*B,t[6]=c*g-Q*n,t[7]=c*a-Q*s,A!==t&&(t[8]=A[8],t[9]=A[9],t[10]=A[10],t[11]=A[11],t[12]=A[12],t[13]=A[13],t[14]=A[14],t[15]=A[15]),t},rotationX:function(A,e){e=e||new w(16);const t=Math.cos(A),i=Math.sin(A);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t,e[6]=i,e[7]=0,e[8]=0,e[9]=-i,e[10]=t,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},rotationY:function(A,e){e=e||new w(16);const t=Math.cos(A),i=Math.sin(A);return e[0]=t,e[1]=0,e[2]=-i,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=i,e[9]=0,e[10]=t,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},rotationZ:function(A,e){e=e||new w(16);const t=Math.cos(A),i=Math.sin(A);return e[0]=t,e[1]=i,e[2]=0,e[3]=0,e[4]=-i,e[5]=t,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},scale:function(A,e,t){t=t||new w(16);const i=e[0],B=e[1],n=e[2];return t[0]=i*A[0],t[1]=i*A[1],t[2]=i*A[2],t[3]=i*A[3],t[4]=B*A[4],t[5]=B*A[5],t[6]=B*A[6],t[7]=B*A[7],t[8]=n*A[8],t[9]=n*A[9],t[10]=n*A[10],t[11]=n*A[11],A!==t&&(t[12]=A[12],t[13]=A[13],t[14]=A[14],t[15]=A[15]),t},scaling:function(A,e){return(e=e||new w(16))[0]=A[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=A[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=A[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},setAxis:function(A,e,t,i){i!==A&&(i=C(A,i));const B=4*t;return i[B+0]=e[0],i[B+1]=e[1],i[B+2]=e[2],i},setDefaultType:function(A){const e=w;return w=A,e},setTranslation:function(A,e,t){return A!==(t=t||l())&&(t[0]=A[0],t[1]=A[1],t[2]=A[2],t[3]=A[3],t[4]=A[4],t[5]=A[5],t[6]=A[6],t[7]=A[7],t[8]=A[8],t[9]=A[9],t[10]=A[10],t[11]=A[11]),t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t},transformDirection:u,transformNormal:function(A,e,t){t=t||B();const i=I(A),n=e[0],s=e[1],r=e[2];return t[0]=n*i[0]+s*i[1]+r*i[2],t[1]=n*i[4]+s*i[5]+r*i[6],t[2]=n*i[8]+s*i[9]+r*i[10],t},transformPoint:h,translate:function(A,e,t){t=t||new w(16);const i=e[0],B=e[1],n=e[2],s=A[0],r=A[1],o=A[2],g=A[3],a=A[4],c=A[5],Q=A[6],E=A[7],C=A[8],l=A[9],I=A[10],h=A[11],u=A[12],d=A[13],Y=A[14],M=A[15];return A!==t&&(t[0]=s,t[1]=r,t[2]=o,t[3]=g,t[4]=a,t[5]=c,t[6]=Q,t[7]=E,t[8]=C,t[9]=l,t[10]=I,t[11]=h),t[12]=s*i+a*B+C*n+u,t[13]=r*i+c*B+l*n+d,t[14]=o*i+Q*B+I*n+Y,t[15]=g*i+E*B+h*n+M,t},translation:function(A,e){return(e=e||new w(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]=A[0],e[13]=A[1],e[14]=A[2],e[15]=1,e},transpose:function(A,e){if((e=e||new w(16))===A){let t;return t=A[1],A[1]=A[4],A[4]=t,t=A[2],A[2]=A[8],A[8]=t,t=A[3],A[3]=A[12],A[12]=t,t=A[6],A[6]=A[9],A[9]=t,t=A[7],A[7]=A[13],A[13]=t,t=A[11],A[11]=A[14],A[14]=t,e}const t=A[0],i=A[1],B=A[2],n=A[3],s=A[4],r=A[5],o=A[6],g=A[7],a=A[8],c=A[9],Q=A[10],E=A[11],C=A[12],l=A[13],I=A[14],h=A[15];return e[0]=t,e[1]=s,e[2]=a,e[3]=C,e[4]=i,e[5]=r,e[6]=c,e[7]=l,e[8]=B,e[9]=o,e[10]=Q,e[11]=I,e[12]=n,e[13]=g,e[14]=E,e[15]=h,e}});const Y={};{const A=Y;A[5120]=Int8Array,A[5121]=Uint8Array,A[5122]=Int16Array,A[5123]=Uint16Array,A[5124]=Int32Array,A[5125]=Uint32Array,A[5126]=Float32Array,A[32819]=Uint16Array,A[32820]=Uint16Array,A[33635]=Uint16Array,A[5131]=Uint16Array,A[33640]=Uint32Array,A[35899]=Uint32Array,A[35902]=Uint32Array,A[36269]=Uint32Array,A[34042]=Uint32Array}function M(A){if(A instanceof Int8Array)return 5120;if(A instanceof Uint8Array)return 5121;if(A instanceof Uint8ClampedArray)return 5121;if(A instanceof Int16Array)return 5122;if(A instanceof Uint16Array)return 5123;if(A instanceof Int32Array)return 5124;if(A instanceof Uint32Array)return 5125;if(A instanceof Float32Array)return 5126;throw new Error("unsupported typed array type")}function F(A){if(A===Int8Array)return 5120;if(A===Uint8Array)return 5121;if(A===Uint8ClampedArray)return 5121;if(A===Int16Array)return 5122;if(A===Uint16Array)return 5123;if(A===Int32Array)return 5124;if(A===Uint32Array)return 5125;if(A===Float32Array)return 5126;throw new Error("unsupported typed array type")}function D(A){const e=Y[A];if(!e)throw new Error("unknown gl type");return e}const m="undefined"!=typeof SharedArrayBuffer?function(A){return A&&A.buffer&&(A.buffer instanceof ArrayBuffer||A.buffer instanceof SharedArrayBuffer)}:function(A){return A&&A.buffer&&A.buffer instanceof ArrayBuffer};var p=Object.freeze({__proto__:null,getGLTypeForTypedArray:M,getGLTypeForTypedArrayType:F,getTypedArrayTypeForGLType:D,isArrayBuffer:m});function U(A,e){Object.keys(e).forEach((function(t){e.hasOwnProperty(t)&&A.hasOwnProperty(t)&&(e[t]=A[t])}))}function f(...A){console.error(...A)}function N(...A){console.warn(...A)}const G=new Map;function y(A,e){if(!A||"object"!=typeof A)return!1;let t=G.get(e);t||(t=new WeakMap,G.set(e,t));let i=t.get(A);if(void 0===i){const B=Object.prototype.toString.call(A);i=B.substring(8,B.length-1)===e,t.set(A,i)}return i}function H(A,e){return"undefined"!=typeof WebGLRenderbuffer&&y(e,"WebGLRenderbuffer")}function k(A,e){return"undefined"!=typeof WebGLTexture&&y(e,"WebGLTexture")}const R={attribPrefix:""};function x(A){R.attribPrefix=A}function J(A){U(A,R)}function T(A,e,t,i,B){A.bindBuffer(e,t),A.bufferData(e,i,B||35044)}function S(A,e,t,i){if(B=e,"undefined"!=typeof WebGLBuffer&&y(B,"WebGLBuffer"))return e;var B;t=t||34962;const n=A.createBuffer();return T(A,t,n,e,i),n}function b(A){return"indices"===A}function j(A){return A.length?A:A.data}const z=/coord|texture/i,v=/color|colour/i;function L(A,e,t){return A.numComponents||A.size||function(A,e){let t;if(t=z.test(A)?2:v.test(A)?4:3,e%t>0)throw new Error(`Can not guess numComponents for attribute '${A}'. Tried ${t} but ${e} values is not evenly divisible by ${t}. You should specify it.`);return t}(e,t||j(A).length)}function P(A,e){if(m(A))return A;if(m(A.data))return A.data;Array.isArray(A)&&(A={data:A});let t=A.type?W(A.type):void 0;return t||(t=b(e)?Uint16Array:Float32Array),new t(A.data)}function W(A){return"number"==typeof A?D(A):A||Float32Array}function O(A,e){return{buffer:e.buffer,numValues:24,type:(t=e.type,"number"==typeof t?t:t?F(t):5126),arrayType:W(e.type)};var t}function V(A,e){const t=e.data||e,i=W(e.type),B=t*i.BYTES_PER_ELEMENT,n=A.createBuffer();return A.bindBuffer(34962,n),A.bufferData(34962,B,e.drawType||35044),{buffer:n,numValues:t,type:F(i),arrayType:i}}function K(A,e,t){const i=P(e,t);return{arrayType:i.constructor,buffer:S(A,i,void 0,e.drawType),type:M(i),numValues:0}}function X(A,e){const t={};return Object.keys(e).forEach((function(i){if(!b(i)){const n=e[i],s=n.attrib||n.name||n.attribName||R.attribPrefix+i;if(n.value){if(!Array.isArray(n.value)&&!m(n.value))throw new Error("array.value is not array or typedarray");t[s]={value:n.value}}else{let e;e=n.buffer&&n.buffer instanceof WebGLBuffer?O:"number"==typeof n||"number"==typeof n.data?V:K;const{buffer:r,type:o,numValues:g,arrayType:a}=e(A,n,i),c=void 0!==n.normalize?n.normalize:(B=a)===Int8Array||B===Uint8Array,Q=L(n,i,g);t[s]={buffer:r,numComponents:Q,type:o,normalize:c,stride:n.stride||0,offset:n.offset||0,divisor:void 0===n.divisor?void 0:n.divisor,drawType:n.drawType}}}var B})),A.bindBuffer(34962,null),t}function _(A,e,t,i){t=P(t),void 0!==i?(A.bindBuffer(34962,e.buffer),A.bufferSubData(34962,i,t)):T(A,34962,e.buffer,t,e.drawType)}const Z=["position","positions","a_position"];function q(A,e,t){const i=X(A,e),B=Object.assign({},t||{});B.attribs=Object.assign({},t?t.attribs:{},i);const n=e.indices;if(n){const e=P(n,"indices");B.indices=S(A,e,34963),B.numElements=e.length,B.elementType=M(e)}else B.numElements||(B.numElements=function(A,e){let t,i;for(i=0;i0)throw new Error(`numComponents ${n} not correct for length ${B}`);return s}(e),t}var eA=Object.freeze({__proto__:null,createAttribsFromArrays:X,createBuffersFromArrays:AA,createBufferFromArray:$,createBufferFromTypedArray:S,createBufferInfoFromArrays:q,setAttribInfoBufferFromArray:_,setAttributePrefix:x,setAttributeDefaults_:J,getNumComponents_:L,getArray_:j});const tA=j,iA=L;function BA(A,e){let t=0;return A.push=function(){for(let e=0;e=0?cA(i,e):t.indexOf("tan")>=0||t.indexOf("binorm")>=0?gA(i,e):t.indexOf("norm")>=0&&aA(i,e)})),A}function EA(A,e,t){return A=A||2,{position:{numComponents:2,data:[(e=e||0)+-1*(A*=.5),(t=t||0)+-1*A,e+1*A,t+-1*A,e+-1*A,t+1*A,e+1*A,t+1*A]},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 wA(A,e,t,i,B){A=A||1,e=e||1,t=t||1,i=i||1,B=B||l();const n=(t+1)*(i+1),s=nA(3,n),r=nA(3,n),o=nA(2,n);for(let B=0;B<=i;B++)for(let n=0;n<=t;n++){const g=n/t,a=B/i;s.push(A*g-.5*A,0,e*a-.5*e),r.push(0,1,0),o.push(g,a)}const g=t+1,a=nA(3,t*i*2,Uint16Array);for(let A=0;A 0");i=i||0,n=n||0;const r=(B=B||Math.PI)-i,o=(s=s||2*Math.PI)-n,g=(e+1)*(t+1),a=nA(3,g),c=nA(3,g),Q=nA(2,g);for(let B=0;B<=t;B++)for(let s=0;s<=e;s++){const g=s/e,E=B/t,w=o*g+n,C=r*E+i,l=Math.sin(w),I=Math.cos(w),h=Math.sin(C),u=I*h,d=Math.cos(C),Y=l*h;a.push(A*u,A*d,A*Y),c.push(u,d,Y),Q.push(1-g,E)}const E=e+1,w=nA(3,e*t*2,Uint16Array);for(let A=0;AB?(o=t,r=1,s=e):s=A+n/B*(e-A),-2!==n&&n!==B+2||(s=0,r=0),o-=t/2;for(let A=0;AB?Q.push(0,1,0):0===s?Q.push(0,0,0):Q.push(e*I,h,t*I),E.push(A/i,1-r)}}for(let A=0;A 0");const o=(r=r||1)-(s=s||0),a=2*(B+1)*4,c=nA(3,a),Q=nA(3,a),E=nA(2,a);function w(A,e,t){return A+(e-A)*t}function C(e,t,r,a,C,l){for(let I=0;I<=B;I++){const h=t/1,u=I/B,d=2*(h-.5),Y=(s+u*o)*Math.PI,M=Math.sin(Y),F=Math.cos(Y),D=w(A,e,M),m=d*i,p=F*A,U=M*D;c.push(m,p,U);const f=n(g([0,M,F],r),a);Q.push(f),E.push(h*C+l,u)}}for(let A=0;A<2;A++){const i=2*(A/1-.5);C(e,A,[1,1,1],[0,0,0],1,0),C(e,A,[0,0,0],[i,0,0],0,0),C(t,A,[1,1,1],[0,0,0],1,0),C(t,A,[0,0,0],[i,0,0],0,1)}const l=nA(3,2*B*4,Uint16Array);function I(A,e){for(let t=0;t0&&i!==e){const A=a+(i+1),e=a+i,t=a+i-Q,B=a+(i+1)-Q;g.push(A,e,t),g.push(A,t,B)}}a+=e+1}return{position:s,normal:r,texcoord:o,indices:g}}function mA(A){return function(e){const t=A.apply(this,Array.prototype.slice.call(arguments,1));return AA(e,t)}}function pA(A){return function(e){const t=A.apply(null,Array.prototype.slice.call(arguments,1));return q(e,t)}}const UA=["numComponents","size","type","normalize","stride","offset","attrib","name","attribName"];function fA(A,e,t,i){i=i||0;const B=A.length;for(let n=0;n{const B=e*i.ndx,r=t.subarray(B,B+e);A.texImage2D(i.face,o,g,n,s,0,c,Q,r)})}else 32879===B||35866===B?A.texImage3D(B,o,g,n,s,r,0,c,Q,t):A.texImage2D(B,o,g,n,s,0,c,Q,t);return{width:n,height:s,depth:r,type:Q}}function Le(A,e,t){const i=t.target||3553;A.bindTexture(i,e);const B=t.level||0,n=t.internalFormat||t.format||6408,s=Ee(n),r=t.format||s.format,o=t.type||s.type;if(Me(A,t),34067===i)for(let e=0;e<6;++e)A.texImage2D(34069+e,B,n,t.width,t.height,0,r,o,null);else 32879===i||35866===i?A.texImage3D(i,B,n,t.width,t.height,t.depth,0,r,o,null):A.texImage2D(i,B,n,t.width,t.height,0,r,o,null)}function Pe(A,e,t){t=t||Re,e=e||Be.textureOptions;const i=A.createTexture(),B=e.target||3553;let n=e.width||1,s=e.height||1;const r=e.internalFormat||6408;A.bindTexture(B,i),34067===B&&(A.texParameteri(B,10242,33071),A.texParameteri(B,10243,33071));let o=e.src;if(o)if("function"==typeof o&&(o=o(A,e)),"string"==typeof o)be(A,i,e,t);else if(ne(o)||Array.isArray(o)&&("number"==typeof o[0]||Array.isArray(o[0])||ne(o[0]))){const t=ve(A,i,o,e);n=t.width,s=t.height}else Array.isArray(o)&&("string"==typeof o[0]||Je(o[0]))?34067===B?je(A,i,e,t):ze(A,i,e,t):(ke(A,i,o,e),n=o.width,s=o.height);else Le(A,i,e);return Ge(e)&&Ne(A,i,e,n,s,r),me(A,i,e),i}function We(A,e,t,i,B,n){i=i||t.width,B=B||t.height,n=n||t.depth;const s=t.target||3553;A.bindTexture(s,e);const r=t.level||0,o=t.internalFormat||t.format||6408,g=Ee(o),a=t.format||g.format;let c;const Q=t.src;if(c=Q&&(ne(Q)||Array.isArray(Q)&&"number"==typeof Q[0])?t.type||he(0,Q,g.type):t.type||g.type,34067===s)for(let e=0;e<6;++e)A.texImage2D(34069+e,r,o,i,B,0,a,c,null);else 32879===s||35866===s?A.texImage3D(s,r,o,i,B,n,0,a,c,null):A.texImage2D(s,r,o,i,B,0,a,c,null)}function Oe(A,e,t){t=t||Re;let i=0;const B=[],n={},s={};function r(){0===i&&setTimeout((function(){t(B.length?B:void 0,n,s)}),0)}return Object.keys(e).forEach((function(t){const o=e[t];let g;var a;("string"==typeof(a=o.src)||Array.isArray(a)&&"string"==typeof a[0])&&(g=function(A,e,n){s[t]=n,--i,A&&B.push(A),r()},++i),n[t]=Pe(A,o,g)})),r(),n}var Ve=Object.freeze({__proto__:null,setTextureDefaults_:Ye,createSampler:Ue,createSamplers:fe,setSamplerParameters:pe,createTexture:Pe,setEmptyTexture:Le,setTextureFromArray:ve,loadTextureFromUrl:be,setTextureFromElement:ke,setTextureFilteringForSize:Ne,setTextureParameters:me,setDefaultTextureColor:de,createTextures:Oe,resizeTexture:We,canGenerateMipmap:Ce,canFilter:le,getNumComponentsForFormat:Ie,getBytesPerElementForInternalFormat:Qe,getFormatAndTypeForInternalFormat:Ee});const Ke=f,Xe=N;function _e(A){return"undefined"!=typeof document&&document.getElementById?document.getElementById(A):null}const Ze={};function qe(A,e){return Ze[e].bindPoint}function $e(A,e){return function(t){A.uniform1i(e,t)}}function At(A,e){return function(t){A.uniform1iv(e,t)}}function et(A,e){return function(t){A.uniform2iv(e,t)}}function tt(A,e){return function(t){A.uniform3iv(e,t)}}function it(A,e){return function(t){A.uniform4iv(e,t)}}function Bt(A,e,t,i){const B=qe(0,e);return Ae(A)?function(e){let n,s;!e||k(0,e)?(n=e,s=null):(n=e.texture,s=e.sampler),A.uniform1i(i,t),A.activeTexture(33984+t),A.bindTexture(B,n),A.bindSampler(t,s)}:function(e){A.uniform1i(i,t),A.activeTexture(33984+t),A.bindTexture(B,e)}}function nt(A,e,t,i,B){const n=qe(0,e),s=new Int32Array(B);for(let A=0;A{A.callback(`${e}\n${A.errors.join("\n")}`)}),null}function Ct(A,e,t,i){i=i||Ke;if(!A.getShaderParameter(t,35713)){const B=A.getShaderInfoLog(t),{lineOffset:n,shaderSource:s}=Et(A.getShaderSource(t)),r=`${function(A,e="",t=0){const i=[...e.matchAll(ct)],B=new Map(i.map((A,t)=>{const B=parseInt(A[1]),n=i[t+1],s=n?n.index:e.length;return[B-1,e.substring(A.index,s)]}));return A.split("\n").map((A,e)=>{const i=B.get(e);return`${e+1+t}: ${A}${i?"\n\n^^^ "+i:""}`}).join("\n")}(s,B,n)}\nError compiling ${te(A,e)}: ${B}`;return i(r),r}return""}function lt(A,e,t){let i,B,n;if("function"==typeof e&&(t=e,e=void 0),"function"==typeof A)t=A,A=void 0;else if(A&&!Array.isArray(A)){const e=A;t=e.errorCallback,A=e.attribLocations,i=e.transformFeedbackVaryings,B=e.transformFeedbackMode,n=e.callback}const s=t||Ke,r=[],o={errorCallback(A,...e){r.push(A),s(A,...e)},transformFeedbackVaryings:i,transformFeedbackMode:B,callback:n,errors:r};{let t={};Array.isArray(A)?A.forEach((function(A,i){t[A]=e?e[i]:i})):t=A||{},o.attribLocations=t}return o}const It=["VERTEX_SHADER","FRAGMENT_SHADER"];const ht=(A=0)=>new Promise(e=>setTimeout(e,A));function ut(A,e,t){const i=A.createProgram(),{attribLocations:B,transformFeedbackVaryings:n,transformFeedbackMode:s}=lt(t);for(let t=0;t=0?35632:r.indexOf("vert")>=0?35633:void 0)||s),B=A.createShader(s),A.shaderSource(B,Et(n).shaderSource),A.compileShader(B),A.attachShader(i,B)}}var r;Object.entries(B).forEach(([e,t])=>A.bindAttribLocation(i,t,e));{let e=n;e&&(e.attribs&&(e=e.attribs),Array.isArray(e)||(e=Object.keys(e)),A.transformFeedbackVaryings(i,e,s||35981))}return A.linkProgram(i),i}function dt(A,e,t,i,B){const n=lt(t,i,B),s=new Set(e),r=ut(A,e,n);function o(A,e){const t=mt(A,e,n.errorCallback);return t&&function(A,e,t){const i=A.getAttachedShaders(e);for(const e of i)t.has(e)&&A.deleteShader(e);A.deleteProgram(e)}(A,e,s),t}if(!n.callback)return o(A,r)?void 0:r;Dt(A,r).then(()=>{const e=o(A,r);n.callback(e,e?void 0:r)})}function Yt(A){return function(e,t,...i){return new Promise((B,n)=>{const s=lt(...i);s.callback=(A,e)=>{A?n(A):B(e)},A(e,t,s)})}}const Mt=Yt(dt),Ft=Yt(_t);async function Dt(A,e){const t=A.getExtension("KHR_parallel_shader_compile"),i=t?(A,e)=>A.getProgramParameter(e,t.COMPLETION_STATUS_KHR):()=>!0;let B=0;do{await ht(B),B=1e3/60}while(!i(A,e))}function mt(A,e,t){t=t||Ke;if(!A.getProgramParameter(e,35714)){const i=A.getProgramInfoLog(e);t("Error in program linking: "+i);return`${i}\n${A.getAttachedShaders(e).map(e=>Ct(A,A.getShaderParameter(e,A.SHADER_TYPE),e,t)).filter(A=>A).join("\n")}`}}function pt(A,e,t,i,B){const n=lt(t,i,B),s=[];for(const A of e){const e=_e(A);if(!e)return wt(n,"unknown script element: "+A);s.push(e.text)}return dt(A,s,n)}function Ut(A,e,t,i,B){return dt(A,e,t,i,B)}function ft(A){const e=A.name;return e.startsWith("gl_")||e.startsWith("webgl_")}const Nt=/(\.|\[|]|\w+)/g;function Gt(A,e,t,i){const B=A.split(Nt).filter(A=>""!==A);let n=0,s="";for(;;){const A=B[n++];s+=A;const o=(r=A[0])>="0"&&r<="9",g=o?parseInt(A):A;o&&(s+=B[n++]);if(n===B.length){t[g]=e;break}{const A=B[n++],e="["===A,r=t[g]||(e?[]:{});t[g]=r,t=r,i[s]=i[s]||function(A){return function(e){vt(A,e)}}(r),s+=A}}var r}function yt(A,e){let t=0;function i(e,i,B){const n=i.name.endsWith("[0]"),s=i.type,r=Ze[s];if(!r)throw new Error("unknown type: 0x"+s.toString(16));let o;if(r.bindPoint){const e=t;t+=i.size,o=n?r.arraySetter(A,s,e,B,i.size):r.setter(A,s,e,B,i.size)}else o=r.arraySetter&&n?r.arraySetter(A,B):r.setter(A,B);return o.location=B,o}const B={},n={},s=A.getProgramParameter(e,35718);for(let t=0;t{r(e,e?void 0:Kt(A,t))});const o=Ut(A,e,n);return o?Kt(A,o):null}function Zt(A,e,t,i,B){for(const[n,s]of Object.entries(e)){const r={...B},o=t[n];Array.isArray(o)||Object.assign(r,o);const g=mt(A,s,r.errorCallback);if(g){for(const t of Object.values(e)){const e=A.getAttachedShaders(t);A.deleteProgram(t);for(const t of e)i.has(t)||A.deleteShader(t)}return g}}}function qt(A,e,t={}){const i=new Set,B=Object.fromEntries(Object.entries(e).map(([e,B])=>{const n={...t},s=Array.isArray(B)?B:B.shaders;return Array.isArray(B)||Object.assign(n,B),s.forEach(i.add,i),[e,ut(A,s,n)]}));if(t.callback)return void async function(A,e){for(const t of Object.values(e))await Dt(A,t)}(A,B).then(()=>{const n=Zt(A,B,e,i,t);t.callback(n,n?void 0:B)});return Zt(A,B,e,i,t)?void 0:B}function $t(A,e,t){function i(A,e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Kt(A,t)]))}const B=(t=lt(t)).callback;B&&(t.callback=(e,t)=>{B(e,e?void 0:i(A,t))});const n=qt(A,e,t);if(!B&&n)return i(A,n)}const Ai=Yt(qt),ei=Yt($t);var ti=Object.freeze({__proto__:null,createAttributeSetters:Wt,createProgram:dt,createProgramAsync:Mt,createPrograms:qt,createProgramsAsync:Ai,createProgramFromScripts:pt,createProgramFromSources:Ut,createProgramInfo:_t,createProgramInfoAsync:Ft,createProgramInfos:$t,createProgramInfosAsync:ei,createProgramInfoFromProgram:Kt,createUniformSetters:yt,createUniformBlockSpecFromProgram:xt,createUniformBlockInfoFromProgram:Tt,createUniformBlockInfo:St,createTransformFeedback:Rt,createTransformFeedbackInfo:Ht,bindTransformFeedbackInfo:kt,setAttributes:Ot,setBuffersAndAttributes:Vt,setUniforms:Lt,setUniformsAndBindTextures:Pt,setUniformBlock:jt,setBlockUniforms:zt,bindUniformBlock:bt});function ii(A,e,t,i,B,n){t=void 0===t?4:t;const s=e.indices,r=e.elementType,o=void 0===i?e.numElements:i;B=void 0===B?0:B,r||s?void 0!==n?A.drawElementsInstanced(t,o,void 0===r?5123:e.elementType,B,n):A.drawElements(t,o,void 0===r?5123:e.elementType,B):void 0!==n?A.drawArraysInstanced(t,B,o,n):A.drawArrays(t,B,o)}function Bi(A,e){let t=null,i=null;e.forEach((function(e){if(!1===e.active)return;const B=e.programInfo,n=e.vertexArrayInfo||e.bufferInfo;let s=!1;const r=void 0===e.type?4:e.type;B!==t&&(t=B,A.useProgram(B.program),s=!0),(s||n!==i)&&(i&&i.vertexArrayObject&&!n.vertexArrayObject&&A.bindVertexArray(null),i=n,Vt(A,B,n)),Lt(B,e.uniforms),ii(A,n,r,e.count,e.offset,e.instanceCount)})),i&&i.vertexArrayObject&&A.bindVertexArray(null)}var ni=Object.freeze({__proto__:null,drawBufferInfo:ii,drawObjectList:Bi});const si=[{format:6408,type:5121,min:9729,wrap:33071},{format:34041}],ri={};ri[34041]=33306,ri[6401]=36128,ri[36168]=36128,ri[6402]=36096,ri[33189]=36096,ri[33190]=36096,ri[36012]=36096,ri[35056]=33306,ri[36013]=33306;const oi={};oi[32854]=!0,oi[32855]=!0,oi[36194]=!0,oi[34041]=!0,oi[33189]=!0,oi[6401]=!0,oi[36168]=!0;function gi(A,e,t,i){const B=A.createFramebuffer();A.bindFramebuffer(36160,B),t=t||A.drawingBufferWidth,i=i||A.drawingBufferHeight;const n=[],s={framebuffer:B,attachments:[],width:t,height:i};return(e=e||si).forEach((function(e,B){let r=e.attachment;const o=e.samples,g=e.format;let a=e.attachmentPoint||function(A,e){return ri[A]||ri[e]}(g,e.internalFormat);if(a||(a=36064+B),function(A){return A>=36064&&A<36096}(a)&&n.push(a),!r)if(void 0!==o||function(A){return oi[A]}(g))r=A.createRenderbuffer(),A.bindRenderbuffer(36161,r),o>1?A.renderbufferStorageMultisample(36161,o,g,t,i):A.renderbufferStorage(36161,g,t,i);else{const B=Object.assign({},e);B.width=t,B.height=i,void 0===B.auto&&(B.auto=!1,B.min=B.min||B.minMag||9729,B.mag=B.mag||B.minMag||9729,B.wrapS=B.wrapS||B.wrap||33071,B.wrapT=B.wrapT||B.wrap||33071),r=Pe(A,B)}if(H(0,r))A.framebufferRenderbuffer(36160,a,36161,r);else{if(!k(0,r))throw new Error("unknown attachment type");void 0!==e.layer?A.framebufferTextureLayer(36160,a,r,e.level||0,e.layer):A.framebufferTexture2D(36160,a,e.target||3553,r,e.level||0)}s.attachments.push(r)})),A.drawBuffers&&A.drawBuffers(n),s}function ai(A,e,t,i,B){i=i||A.drawingBufferWidth,B=B||A.drawingBufferHeight,e.width=i,e.height=B,(t=t||si).forEach((function(t,n){const s=e.attachments[n],r=t.format,o=t.samples;if(void 0!==o||H(0,s))A.bindRenderbuffer(36161,s),o>1?A.renderbufferStorageMultisample(36161,o,r,i,B):A.renderbufferStorage(36161,r,i,B);else{if(!k(0,s))throw new Error("unknown attachment type");We(A,s,t,i,B)}}))}function ci(A,e,t){t=t||36160,e?(A.bindFramebuffer(t,e.framebuffer),A.viewport(0,0,e.width,e.height)):(A.bindFramebuffer(t,null),A.viewport(0,0,A.drawingBufferWidth,A.drawingBufferHeight))}var Qi=Object.freeze({__proto__:null,bindFramebufferInfo:ci,createFramebufferInfo:gi,resizeFramebufferInfo:ai});function Ei(A,e,t){const i=A.createVertexArray();return A.bindVertexArray(i),e.length||(e=[e]),e.forEach((function(e){Vt(A,e,t)})),A.bindVertexArray(null),{numElements:t.numElements,elementType:t.elementType,vertexArrayObject:i}}function wi(A,e,t,i){const B=A.createVertexArray();return A.bindVertexArray(B),Ot(e,t),i&&A.bindBuffer(34963,i),A.bindVertexArray(null),B}function Ci(A,e,t){return wi(A,e.attribSetters||e,t.attribs,t.indices)}var li=Object.freeze({__proto__:null,createVertexArrayInfo:Ei,createVAOAndSetAttributes:wi,createVAOFromBufferInfo:Ci});const Ii={addExtensionsToContext:!0};function hi(A){U(A,Ii),J(A),Ye(A)}const ui=/^(.*?)_/;function di(A,e){te(A,0);const t=A.getExtension(e);if(t){const i={},B=ui.exec(e)[1],n="_"+B;for(const e in t){const s=t[e],r="function"==typeof s,o=r?B:n;let g=e;e.endsWith(o)&&(g=e.substring(0,e.length-o.length)),void 0!==A[g]?r||A[g]===s||N(g,A[g],s,e):r?A[g]=function(A){return function(){return A.apply(t,arguments)}}(s):(A[g]=s,i[g]=s)}i.constructor={name:t.constructor.name},te(i,0)}return t}const Yi=["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 Mi(A){for(let e=0;e * @license MIT */ -var i=t(136),B=t(137),n=t(138);function s(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function r(A,e){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|A}function w(A,e){if(o.isBuffer(A))return A.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(A)||A instanceof ArrayBuffer))return A.byteLength;"string"!=typeof A&&(A=""+A);var t=A.length;if(0===t)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return j(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return z(A).length;default:if(i)return j(A).length;e=(""+e).toLowerCase(),i=!0}}function C(A,e,t){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if((t>>>=0)<=(e>>>=0))return"";for(A||(A="utf8");;)switch(A){case"hex":return N(this,e,t);case"utf8":case"utf-8":return p(this,e,t);case"ascii":return U(this,e,t);case"latin1":case"binary":return f(this,e,t);case"base64":return m(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,e,t);default:if(i)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),i=!0}}function l(A,e,t){var i=A[e];A[e]=A[t],A[t]=i}function I(A,e,t,i,B){if(0===A.length)return-1;if("string"==typeof t?(i=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=B?0:A.length-1),t<0&&(t=A.length+t),t>=A.length){if(B)return-1;t=A.length-1}else if(t<0){if(!B)return-1;t=0}if("string"==typeof e&&(e=o.from(e,i)),o.isBuffer(e))return 0===e.length?-1:h(A,e,t,i,B);if("number"==typeof e)return e&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?B?Uint8Array.prototype.indexOf.call(A,e,t):Uint8Array.prototype.lastIndexOf.call(A,e,t):h(A,[e],t,i,B);throw new TypeError("val must be string, number or Buffer")}function h(A,e,t,i,B){var n,s=1,r=A.length,o=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(A.length<2||e.length<2)return-1;s=2,r/=2,o/=2,t/=2}function g(A,e){return 1===s?A[e]:A.readUInt16BE(e*s)}if(B){var a=-1;for(n=t;nr&&(t=r-o),n=t;n>=0;n--){for(var c=!0,Q=0;QB&&(i=B):i=B;var n=e.length;if(n%2!=0)throw new TypeError("Invalid hex string");i>n/2&&(i=n/2);for(var s=0;s>8,B=t%256,n.push(B),n.push(i);return n}(e,A.length-t),A,t,i)}function m(A,e,t){return 0===e&&t===A.length?i.fromByteArray(A):i.fromByteArray(A.slice(e,t))}function p(A,e,t){t=Math.min(A.length,t);for(var i=[],B=e;B239?4:g>223?3:g>191?2:1;if(B+c<=t)switch(c){case 1:g<128&&(a=g);break;case 2:128==(192&(n=A[B+1]))&&(o=(31&g)<<6|63&n)>127&&(a=o);break;case 3:n=A[B+1],s=A[B+2],128==(192&n)&&128==(192&s)&&(o=(15&g)<<12|(63&n)<<6|63&s)>2047&&(o<55296||o>57343)&&(a=o);break;case 4:n=A[B+1],s=A[B+2],r=A[B+3],128==(192&n)&&128==(192&s)&&128==(192&r)&&(o=(15&g)<<18|(63&n)<<12|(63&s)<<6|63&r)>65535&&o<1114112&&(a=o)}null===a?(a=65533,c=1):a>65535&&(a-=65536,i.push(a>>>10&1023|55296),a=56320|1023&a),i.push(a),B+=c}return function(A){var e=A.length;if(e<=4096)return String.fromCharCode.apply(String,A);var t="",i=0;for(;i0&&(A=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(A+=" ... ")),""},o.prototype.compare=function(A,e,t,i,B){if(!o.isBuffer(A))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===t&&(t=A?A.length:0),void 0===i&&(i=0),void 0===B&&(B=this.length),e<0||t>A.length||i<0||B>this.length)throw new RangeError("out of range index");if(i>=B&&e>=t)return 0;if(i>=B)return-1;if(e>=t)return 1;if(this===A)return 0;for(var n=(B>>>=0)-(i>>>=0),s=(t>>>=0)-(e>>>=0),r=Math.min(n,s),g=this.slice(i,B),a=A.slice(e,t),c=0;cB)&&(t=B),A.length>0&&(t<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var n=!1;;)switch(i){case"hex":return u(this,A,e,t);case"utf8":case"utf-8":return d(this,A,e,t);case"ascii":return Y(this,A,e,t);case"latin1":case"binary":return M(this,A,e,t);case"base64":return F(this,A,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,A,e,t);default:if(n)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),n=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function U(A,e,t){var i="";t=Math.min(A.length,t);for(var B=e;Bi)&&(t=i);for(var B="",n=e;nt)throw new RangeError("Trying to access beyond buffer length")}function H(A,e,t,i,B,n){if(!o.isBuffer(A))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>B||eA.length)throw new RangeError("Index out of range")}function R(A,e,t,i){e<0&&(e=65535+e+1);for(var B=0,n=Math.min(A.length-t,2);B>>8*(i?B:1-B)}function k(A,e,t,i){e<0&&(e=4294967295+e+1);for(var B=0,n=Math.min(A.length-t,4);B>>8*(i?B:3-B)&255}function x(A,e,t,i,B,n){if(t+i>A.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function J(A,e,t,i,n){return n||x(A,0,t,4),B.write(A,e,t,i,23,4),t+4}function T(A,e,t,i,n){return n||x(A,0,t,8),B.write(A,e,t,i,52,8),t+8}o.prototype.slice=function(A,e){var t,i=this.length;if((A=~~A)<0?(A+=i)<0&&(A=0):A>i&&(A=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e0&&(B*=256);)i+=this[A+--e]*B;return i},o.prototype.readUInt8=function(A,e){return e||y(A,1,this.length),this[A]},o.prototype.readUInt16LE=function(A,e){return e||y(A,2,this.length),this[A]|this[A+1]<<8},o.prototype.readUInt16BE=function(A,e){return e||y(A,2,this.length),this[A]<<8|this[A+1]},o.prototype.readUInt32LE=function(A,e){return e||y(A,4,this.length),(this[A]|this[A+1]<<8|this[A+2]<<16)+16777216*this[A+3]},o.prototype.readUInt32BE=function(A,e){return e||y(A,4,this.length),16777216*this[A]+(this[A+1]<<16|this[A+2]<<8|this[A+3])},o.prototype.readIntLE=function(A,e,t){A|=0,e|=0,t||y(A,e,this.length);for(var i=this[A],B=1,n=0;++n=(B*=128)&&(i-=Math.pow(2,8*e)),i},o.prototype.readIntBE=function(A,e,t){A|=0,e|=0,t||y(A,e,this.length);for(var i=e,B=1,n=this[A+--i];i>0&&(B*=256);)n+=this[A+--i]*B;return n>=(B*=128)&&(n-=Math.pow(2,8*e)),n},o.prototype.readInt8=function(A,e){return e||y(A,1,this.length),128&this[A]?-1*(255-this[A]+1):this[A]},o.prototype.readInt16LE=function(A,e){e||y(A,2,this.length);var t=this[A]|this[A+1]<<8;return 32768&t?4294901760|t:t},o.prototype.readInt16BE=function(A,e){e||y(A,2,this.length);var t=this[A+1]|this[A]<<8;return 32768&t?4294901760|t:t},o.prototype.readInt32LE=function(A,e){return e||y(A,4,this.length),this[A]|this[A+1]<<8|this[A+2]<<16|this[A+3]<<24},o.prototype.readInt32BE=function(A,e){return e||y(A,4,this.length),this[A]<<24|this[A+1]<<16|this[A+2]<<8|this[A+3]},o.prototype.readFloatLE=function(A,e){return e||y(A,4,this.length),B.read(this,A,!0,23,4)},o.prototype.readFloatBE=function(A,e){return e||y(A,4,this.length),B.read(this,A,!1,23,4)},o.prototype.readDoubleLE=function(A,e){return e||y(A,8,this.length),B.read(this,A,!0,52,8)},o.prototype.readDoubleBE=function(A,e){return e||y(A,8,this.length),B.read(this,A,!1,52,8)},o.prototype.writeUIntLE=function(A,e,t,i){(A=+A,e|=0,t|=0,i)||H(this,A,e,t,Math.pow(2,8*t)-1,0);var B=1,n=0;for(this[e]=255&A;++n=0&&(n*=256);)this[e+B]=A/n&255;return e+t},o.prototype.writeUInt8=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,1,255,0),o.TYPED_ARRAY_SUPPORT||(A=Math.floor(A)),this[e]=255&A,e+1},o.prototype.writeUInt16LE=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=255&A,this[e+1]=A>>>8):R(this,A,e,!0),e+2},o.prototype.writeUInt16BE=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=A>>>8,this[e+1]=255&A):R(this,A,e,!1),e+2},o.prototype.writeUInt32LE=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e+3]=A>>>24,this[e+2]=A>>>16,this[e+1]=A>>>8,this[e]=255&A):k(this,A,e,!0),e+4},o.prototype.writeUInt32BE=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e]=A>>>24,this[e+1]=A>>>16,this[e+2]=A>>>8,this[e+3]=255&A):k(this,A,e,!1),e+4},o.prototype.writeIntLE=function(A,e,t,i){if(A=+A,e|=0,!i){var B=Math.pow(2,8*t-1);H(this,A,e,t,B-1,-B)}var n=0,s=1,r=0;for(this[e]=255&A;++n>0)-r&255;return e+t},o.prototype.writeIntBE=function(A,e,t,i){if(A=+A,e|=0,!i){var B=Math.pow(2,8*t-1);H(this,A,e,t,B-1,-B)}var n=t-1,s=1,r=0;for(this[e+n]=255&A;--n>=0&&(s*=256);)A<0&&0===r&&0!==this[e+n+1]&&(r=1),this[e+n]=(A/s>>0)-r&255;return e+t},o.prototype.writeInt8=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,1,127,-128),o.TYPED_ARRAY_SUPPORT||(A=Math.floor(A)),A<0&&(A=255+A+1),this[e]=255&A,e+1},o.prototype.writeInt16LE=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=255&A,this[e+1]=A>>>8):R(this,A,e,!0),e+2},o.prototype.writeInt16BE=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=A>>>8,this[e+1]=255&A):R(this,A,e,!1),e+2},o.prototype.writeInt32LE=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[e]=255&A,this[e+1]=A>>>8,this[e+2]=A>>>16,this[e+3]=A>>>24):k(this,A,e,!0),e+4},o.prototype.writeInt32BE=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,4,2147483647,-2147483648),A<0&&(A=4294967295+A+1),o.TYPED_ARRAY_SUPPORT?(this[e]=A>>>24,this[e+1]=A>>>16,this[e+2]=A>>>8,this[e+3]=255&A):k(this,A,e,!1),e+4},o.prototype.writeFloatLE=function(A,e,t){return J(this,A,e,!0,t)},o.prototype.writeFloatBE=function(A,e,t){return J(this,A,e,!1,t)},o.prototype.writeDoubleLE=function(A,e,t){return T(this,A,e,!0,t)},o.prototype.writeDoubleBE=function(A,e,t){return T(this,A,e,!1,t)},o.prototype.copy=function(A,e,t,i){if(t||(t=0),i||0===i||(i=this.length),e>=A.length&&(e=A.length),e||(e=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),A.length-e=0;--B)A[B+e]=this[B+t];else if(n<1e3||!o.TYPED_ARRAY_SUPPORT)for(B=0;B>>=0,t=void 0===t?this.length:t>>>0,A||(A=0),"number"==typeof A)for(n=e;n55295&&t<57344){if(!B){if(t>56319){(e-=3)>-1&&n.push(239,191,189);continue}if(s+1===i){(e-=3)>-1&&n.push(239,191,189);continue}B=t;continue}if(t<56320){(e-=3)>-1&&n.push(239,191,189),B=t;continue}t=65536+(B-55296<<10|t-56320)}else B&&(e-=3)>-1&&n.push(239,191,189);if(B=null,t<128){if((e-=1)<0)break;n.push(t)}else if(t<2048){if((e-=2)<0)break;n.push(t>>6|192,63&t|128)}else if(t<65536){if((e-=3)<0)break;n.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;n.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return n}function z(A){return i.toByteArray(function(A){if((A=function(A){return A.trim?A.trim():A.replace(/^\s+|\s+$/g,"")}(A).replace(S,"")).length<2)return"";for(;A.length%4!=0;)A+="=";return A}(A))}function v(A,e,t,i){for(var B=0;B=e.length||B>=A.length);++B)e[B+t]=A[B];return B}}).call(this,t(9))},function(A,e,t){function i(){}t(143).mixin(i),i.prototype.write=function(A,e,t){this.emit("item",A,e,t)},i.prototype.end=function(){this.emit("end"),this.removeAllListeners()},i.prototype.pipe=function(A){var e=this;function t(){A.write.apply(A,Array.prototype.slice.call(arguments))}function i(){!A._isStdio&&A.end()}return e.emit("unpipe",A),A.emit("pipe",e),e.on("item",t),e.on("end",i),e.when("unpipe",(function(B){var n=B===A||void 0===B;return n&&(e.removeListener("item",t),e.removeListener("end",i),A.emit("unpipe")),n})),A},i.prototype.unpipe=function(A){return this.emit("unpipe",A),this},i.prototype.format=function(A){throw new Error(["Warning: .format() is deprecated in Minilog v2! Use .pipe() instead. For example:","var Minilog = require('minilog');","Minilog"," .pipe(Minilog.backends.console.formatClean)"," .pipe(Minilog.backends.console);"].join("\n"))},i.mixin=function(A){var e,t=i.prototype;for(e in t)t.hasOwnProperty(e)&&(A.prototype[e]=t[e])},A.exports=i},function(A,e){A.exports=class{static simple(A){return JSON.parse(JSON.stringify(A))}}},function(A,e){class t{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[t.BACKGROUND_LAYER,t.VIDEO_LAYER,t.PEN_LAYER,t.SPRITE_LAYER]}}A.exports=t},function(A,e,t){(function(e){class t{constructor(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.nowObj;this.startTime=0,this.nowObj=A}static get USE_PERFORMANCE(){return!1}static get legacyDateCode(){return{now:function(){return(new Date).getTime()}}}static get nowObj(){return t.USE_PERFORMANCE&&"undefined"!=typeof self&&self.performance&&"now"in self.performance?self.performance:Date.now?Date:t.legacyDateCode}time(){return this.nowObj.now()}relativeTime(){return this.nowObj.now()}start(){this.startTime=this.nowObj.now()}timeElapsed(){return this.nowObj.now()-this.startTime}setTimeout(A,t){return e.setTimeout(A,t)}clearTimeout(A){e.clearTimeout(A)}}A.exports=t}).call(this,t(9))},function(A,e,t){const i=t(228),B=t(80),n=t(34),s=t(46),r=t(14),{Map:o}=t(27),g=t(82),a=t(83),c=t(1),Q=t(10),E=t(47);class w{constructor(A,e){this.runtime=A,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=e||!1}getCachedCompileResult(A){return this._cache.compiledScripts.hasOwnProperty(A)?this._cache.compiledScripts[A]:null}cacheCompileResult(A,e){this._cache.compiledScripts[A]={success:!0,value:e}}cacheCompileError(A,e){this._cache.compiledScripts[A]={success:!1,value:e}}static get BRANCH_INPUT_PREFIX(){return"SUBSTACK"}getBlock(A){return this._blocks[A]}getScripts(){return this._scripts}getNextBlock(A){const e=this._blocks[A];return void 0===e?null:e.next}getBranch(A,e){const t=this._blocks[A];if(void 0===t)return null;e||(e=1);let i=w.BRANCH_INPUT_PREFIX;e>1&&(i+=e);const B=t.inputs[i];return void 0===B?null:B.block}getOpcode(A){return void 0===A?null:A.opcode}getFields(A){return void 0===A?null:A.fields}getInputs(A){if(void 0===A)return null;let e=this._cache.inputs[A.id];if(void 0!==e)return e;e={};for(const t in A.inputs)t.substring(0,w.BRANCH_INPUT_PREFIX.length)!==w.BRANCH_INPUT_PREFIX&&(e[t]=A.inputs[t]);return this._cache.inputs[A.id]=e,e}getMutation(A){return void 0===A?null:A.mutation}getTopLevelScript(A){let e=this._blocks[A];if(void 0===e)return null;for(;null!==e.parent;)e=this._blocks[e.parent];return e.id}getProcedureDefinition(A){const e=this._cache.procedureDefinitions[A];if(void 0!==e)return e;for(const e in this._blocks){if(!this._blocks.hasOwnProperty(e))continue;const t=this._blocks[e];if("procedures_definition"===t.opcode){const i=this._getCustomBlockInternal(t);if(i&&i.mutation.proccode===A)return this._cache.procedureDefinitions[A]=e,e}}return this._cache.procedureDefinitions[A]=null,null}getProcedureParamNamesAndIds(A){return this.getProcedureParamNamesIdsAndDefaults(A).slice(0,2)}getProcedureParamNamesIdsAndDefaults(A){const e=this._cache.procedureParamNames[A];if(void 0!==e)return e;for(const e in this._blocks){if(!this._blocks.hasOwnProperty(e))continue;const t=this._blocks[e];if("procedures_prototype"===t.opcode&&t.mutation.proccode===A){const e=JSON.parse(t.mutation.argumentnames),i=JSON.parse(t.mutation.argumentids),B=JSON.parse(t.mutation.argumentdefaults);return this._cache.procedureParamNames[A]=[e,i,B],this._cache.procedureParamNames[A]}}const t=this.runtime.getAddonBlock(A);return t?(this._cache.procedureParamNames[A]=t.namesIdsDefaults,t.namesIdsDefaults):(this._cache.procedureParamNames[A]=null,null)}populateProcedureCache(){if(!this._cache.proceduresPopulated){for(const A in this._blocks){if(!this._blocks.hasOwnProperty(A))continue;const e=this._blocks[A];if("procedures_prototype"!==e.opcode){if("procedures_definition"===e.opcode){const t=this._getCustomBlockInternal(e);if(t){const e=t.mutation.proccode;this._cache.procedureDefinitions[e]||(this._cache.procedureDefinitions[e]=A);continue}}}else{const A=e.mutation.proccode;if(!this._cache.procedureParamNames[A]){const t=JSON.parse(e.mutation.argumentnames),i=JSON.parse(e.mutation.argumentids),B=JSON.parse(e.mutation.argumentdefaults);this._cache.procedureParamNames[A]=[t,i,B]}}}this._cache.proceduresPopulated=!0}}duplicate(){const A=new w(this.runtime,this.forceNoGlow);return A._blocks=r.simple(this._blocks),A._scripts=r.simple(this._scripts),A}blocklyListen(A){if("object"!=typeof A)return;if("string"!=typeof A.blockId&&"string"!=typeof A.varId&&"string"!=typeof A.commentId)return;const e=this.runtime.getTargetForStage(),t=this.runtime.getEditingTarget();if("stackclick"!==A.element)switch(A.type){case"create":{const e=i(A);for(let A=0;AA.isOriginal);for(const e of t)if(e.lookupVariableByNameAndType(A.varName,A.varType,!0))return;e.createVariable(A.varId,A.varName,A.varType,A.isCloud),this.emitProjectChanged()}break;case"var_rename":if(t&&t.variables.hasOwnProperty(A.varId))t.renameVariable(A.varId,A.newName),t.blocks.updateBlocksAfterVarRename(A.varId,A.newName);else{e.renameVariable(A.varId,A.newName);const t=this.runtime.targets;for(let e=0;e0&&"data_variable"!==e.opcode&&"data_listcontents"!==e.opcode){const A=E(e.id,e.fields);let t=this.runtime.monitorBlocks.getBlock(A);t||(t=JSON.parse(JSON.stringify(e)),t.id=A,this.runtime.monitorBlocks.createBlock(t)),e=t}const t=e.isMonitored;e.isMonitored=A.value;let i=!1;"data_variable"===e.opcode?i=!this.runtime.getTargetForStage().variables[e.fields.VARIABLE.id]:"data_listcontents"===e.opcode&&(i=!this.runtime.getTargetForStage().variables[e.fields.LIST.id]);const B=i||this.runtime.monitorBlockInfo.hasOwnProperty(e.opcode)&&this.runtime.monitorBlockInfo[e.opcode].isSpriteSpecific;e.targetId=B?e.targetId||this.runtime.getEditingTarget().id:null,t&&!e.isMonitored?this.runtime.requestHideMonitor(e.id):!t&&e.isMonitored&&(this.runtime.requestShowMonitor(e.id)||this.runtime.requestAddMonitor(s({id:e.id,targetId:e.targetId,spriteName:e.targetId?this.runtime.getTargetById(e.targetId).getName():null,opcode:e.opcode,params:this._getBlockParams(e),value:"",mode:"data_listcontents"===e.opcode?"list":"default"})));break}}this.emitProjectChanged(),this.resetCache()}}moveBlock(A){if(!this._blocks.hasOwnProperty(A.id))return;const e=this._blocks[A.id];let t=!1;if(A.newCoordinate&&(t=e.x!==A.newCoordinate.x||e.y!==A.newCoordinate.y,e.x=A.newCoordinate.x,e.y=A.newCoordinate.y),void 0!==A.oldParent){const e=this._blocks[A.oldParent];void 0!==A.oldInput&&e.inputs[A.oldInput].block===A.id?e.inputs[A.oldInput].block=null:e.next===A.id&&(e.next=null),this._blocks[A.id].parent=null,t=!0}if(void 0===A.newParent)this._addScript(A.id);else{if(this._deleteScript(A.id),void 0===A.newInput)this._blocks[A.newParent].next=A.id;else{let e=null;this._blocks[A.newParent].inputs.hasOwnProperty(A.newInput)&&(e=this._blocks[A.newParent].inputs[A.newInput].shadow),this._blocks[A.id].shadow&&(e=A.id),this._blocks[A.newParent].inputs[A.newInput]={name:A.newInput,block:A.id,shadow:e}}this._blocks[A.id].parent=A.newParent,t=!0}this.resetCache(),t&&this.emitProjectChanged()}runAllMonitored(A){null===this._cache._monitored&&(this._cache._monitored=Object.keys(this._blocks).filter(A=>this.getBlock(A).isMonitored).map(e=>{const t=this.getBlock(e).targetId;return{blockId:e,target:t?A.getTargetById(t):null}}));const e=this._cache._monitored;for(let t=0;tthis.blockToXML(e,A)).join()}blockToXML(A,e){const t=this._blocks[A];if(!t)return;const i=t.shadow?"shadow":"block";let B="<".concat(i,'\n id="').concat(n(t.id),'"\n type="').concat(n(t.opcode),'"\n ').concat(t.topLevel?'x="'.concat(t.x,'" y="').concat(t.y,'"'):"","\n >");const s=t.comment;s&&(e?e.hasOwnProperty(s)?B+=e[s].toXML():c.warn("Could not find comment with id: ".concat(s," in provided comment descriptions.")):c.warn("Cannot serialize comment with id: ".concat(s,"; no comment descriptions provided."))),t.mutation&&(B+=this.mutationToXML(t.mutation));for(const A in t.inputs){if(!t.inputs.hasOwnProperty(A))continue;const i=t.inputs[A];(i.block||i.shadow)&&(B+=''),i.block&&(B+=this.blockToXML(i.block,e)),i.shadow&&i.shadow!==i.block&&(B+=this.blockToXML(i.shadow,e)),B+="")}for(const A in t.fields){if(!t.fields.hasOwnProperty(A))continue;const e=t.fields[A];B+='".concat(r,"")}return t.next&&(B+="".concat(this.blockToXML(t.next,e),"")),B+=""),B}mutationToXML(A){let e="<".concat(A.tagName);for(const t in A){if("children"===t||"tagName"===t)continue;let i="string"==typeof A[t]?n(A[t]):A[t];"blockInfo"===t&&(i=n(JSON.stringify(A[t]))),e+=" ".concat(t,'="').concat(i,'"')}e+=">";for(let t=0;t"),e}_getBlockParams(A){const e={};for(const t in A.fields)e[t]=A.fields[t].value;for(const t in A.inputs){const i=this._blocks[A.inputs[t].block];for(const A in i.fields)e[A]=i.fields[A].value}return e}_getCustomBlockInternal(A){if(A.inputs&&A.inputs.custom_block)return this._blocks[A.inputs.custom_block.block]}_addScript(A){this._scripts.indexOf(A)>-1||(this._scripts.push(A),this._blocks[A].topLevel=!0)}_deleteScript(A){const e=this._scripts.indexOf(A);e>-1&&this._scripts.splice(e,1),this._blocks[A]&&(this._blocks[A].topLevel=!1)}}g.getCached=function(A,e,t){let i=A._cache._executeCached[e];if(void 0!==i)return i;const B=A.getBlock(e);return void 0===B?null:(i=void 0===t?{id:e,opcode:A.getOpcode(B),fields:A.getFields(B),inputs:A.getInputs(B),mutation:A.getMutation(B)}:new t(A,{id:e,opcode:A.getOpcode(B),fields:A.getFields(B),inputs:A.getInputs(B),mutation:A.getMutation(B)}),A._cache._executeCached[e]=i,i)};const C=a._RuntimeScriptCache;a.getScripts=function(A,e){let t=A._cache.scripts[e];if(!t){t=A._cache.scripts[e]=[];const i=A._scripts;for(let B=0;B0&&this.scanner.lookupType(-1)===B?this.scanner.tokenIndex>1?this.scanner.getTokenStart(this.scanner.tokenIndex-1):this.scanner.firstCharOffset:this.scanner.tokenStart}function g(){return 0}A.exports={name:"Raw",structure:{value:String},parse:function(A,e,t){var i,B=this.scanner.getTokenStart(A);return this.scanner.skip(this.scanner.getRawLength(A,e||g)),i=t&&this.scanner.tokenStart>B?o.call(this):this.scanner.tokenStart,{type:"Raw",loc:this.getLocation(B,i),value:this.scanner.source.substring(B,i)}},generate:function(A){this.chunk(A.value)},mode:{default:g,leftCurlyBracket:function(A){return A===s?1:0},leftCurlyBracketOrSemicolon:function(A){return A===s||A===n?1:0},exclamationMarkOrSemicolon:function(A,e,t){return A===r&&33===e.charCodeAt(t)||A===n?1:0},semicolonIncluded:function(A){return A===n?2:0}}}},function(A,e,t){"use strict";var i,B="object"==typeof Reflect?Reflect:null,n=B&&"function"==typeof B.apply?B.apply:function(A,e,t){return Function.prototype.apply.call(A,e,t)};i=B&&"function"==typeof B.ownKeys?B.ownKeys:Object.getOwnPropertySymbols?function(A){return Object.getOwnPropertyNames(A).concat(Object.getOwnPropertySymbols(A))}:function(A){return Object.getOwnPropertyNames(A)};var s=Number.isNaN||function(A){return A!=A};function r(){r.init.call(this)}A.exports=r,A.exports.once=function(A,e){return new Promise((function(t,i){function B(t){A.removeListener(e,n),i(t)}function n(){"function"==typeof A.removeListener&&A.removeListener("error",B),t([].slice.call(arguments))}I(A,e,n,{once:!0}),"error"!==e&&function(A,e,t){"function"==typeof A.on&&I(A,"error",e,t)}(A,B,{once:!0})}))},r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var o=10;function g(A){if("function"!=typeof A)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}function a(A){return void 0===A._maxListeners?r.defaultMaxListeners:A._maxListeners}function c(A,e,t,i){var B,n,s,r;if(g(t),void 0===(n=A._events)?(n=A._events=Object.create(null),A._eventsCount=0):(void 0!==n.newListener&&(A.emit("newListener",e,t.listener?t.listener:t),n=A._events),s=n[e]),void 0===s)s=n[e]=t,++A._eventsCount;else if("function"==typeof s?s=n[e]=i?[t,s]:[s,t]:i?s.unshift(t):s.push(t),(B=a(A))>0&&s.length>B&&!s.warned){s.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=A,o.type=e,o.count=s.length,r=o,console&&console.warn&&console.warn(r)}return A}function Q(){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 E(A,e,t){var i={fired:!1,wrapFn:void 0,target:A,type:e,listener:t},B=Q.bind(i);return B.listener=t,i.wrapFn=B,B}function w(A,e,t){var i=A._events;if(void 0===i)return[];var B=i[e];return void 0===B?[]:"function"==typeof B?t?[B.listener||B]:[B]:t?function(A){for(var e=new Array(A.length),t=0;t0&&(s=e[0]),s instanceof Error)throw s;var r=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw r.context=s,r}var o=B[A];if(void 0===o)return!1;if("function"==typeof o)n(o,this,e);else{var g=o.length,a=l(o,g);for(t=0;t=0;n--)if(t[n]===e||t[n].listener===e){s=t[n].listener,B=n;break}if(B<0)return this;0===B?t.shift():function(A,e){for(;e+1=0;i--)this.removeListener(A,e[i]);return this},r.prototype.listeners=function(A){return w(this,A,!0)},r.prototype.rawListeners=function(A){return w(this,A,!1)},r.listenerCount=function(A,e){return"function"==typeof A.listenerCount?A.listenerCount(e):C.call(A,e)},r.prototype.listenerCount=C,r.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(A,e,t){const i=t(158),B=t(160);class n{static base64ToUint8Array(A){const e=i(A),t=e.length,B=new Uint8Array(t);for(let A=0;A=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|A}function w(A,e){if(o.isBuffer(A))return A.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(A)||A instanceof ArrayBuffer))return A.byteLength;"string"!=typeof A&&(A=""+A);var t=A.length;if(0===t)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return j(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return z(A).length;default:if(i)return j(A).length;e=(""+e).toLowerCase(),i=!0}}function C(A,e,t){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if((t>>>=0)<=(e>>>=0))return"";for(A||(A="utf8");;)switch(A){case"hex":return N(this,e,t);case"utf8":case"utf-8":return p(this,e,t);case"ascii":return U(this,e,t);case"latin1":case"binary":return f(this,e,t);case"base64":return m(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,e,t);default:if(i)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),i=!0}}function l(A,e,t){var i=A[e];A[e]=A[t],A[t]=i}function I(A,e,t,i,B){if(0===A.length)return-1;if("string"==typeof t?(i=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=B?0:A.length-1),t<0&&(t=A.length+t),t>=A.length){if(B)return-1;t=A.length-1}else if(t<0){if(!B)return-1;t=0}if("string"==typeof e&&(e=o.from(e,i)),o.isBuffer(e))return 0===e.length?-1:h(A,e,t,i,B);if("number"==typeof e)return e&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?B?Uint8Array.prototype.indexOf.call(A,e,t):Uint8Array.prototype.lastIndexOf.call(A,e,t):h(A,[e],t,i,B);throw new TypeError("val must be string, number or Buffer")}function h(A,e,t,i,B){var n,s=1,r=A.length,o=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(A.length<2||e.length<2)return-1;s=2,r/=2,o/=2,t/=2}function g(A,e){return 1===s?A[e]:A.readUInt16BE(e*s)}if(B){var a=-1;for(n=t;nr&&(t=r-o),n=t;n>=0;n--){for(var c=!0,Q=0;QB&&(i=B):i=B;var n=e.length;if(n%2!=0)throw new TypeError("Invalid hex string");i>n/2&&(i=n/2);for(var s=0;s>8,B=t%256,n.push(B),n.push(i);return n}(e,A.length-t),A,t,i)}function m(A,e,t){return 0===e&&t===A.length?i.fromByteArray(A):i.fromByteArray(A.slice(e,t))}function p(A,e,t){t=Math.min(A.length,t);for(var i=[],B=e;B239?4:g>223?3:g>191?2:1;if(B+c<=t)switch(c){case 1:g<128&&(a=g);break;case 2:128==(192&(n=A[B+1]))&&(o=(31&g)<<6|63&n)>127&&(a=o);break;case 3:n=A[B+1],s=A[B+2],128==(192&n)&&128==(192&s)&&(o=(15&g)<<12|(63&n)<<6|63&s)>2047&&(o<55296||o>57343)&&(a=o);break;case 4:n=A[B+1],s=A[B+2],r=A[B+3],128==(192&n)&&128==(192&s)&&128==(192&r)&&(o=(15&g)<<18|(63&n)<<12|(63&s)<<6|63&r)>65535&&o<1114112&&(a=o)}null===a?(a=65533,c=1):a>65535&&(a-=65536,i.push(a>>>10&1023|55296),a=56320|1023&a),i.push(a),B+=c}return function(A){var e=A.length;if(e<=4096)return String.fromCharCode.apply(String,A);var t="",i=0;for(;i0&&(A=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(A+=" ... ")),""},o.prototype.compare=function(A,e,t,i,B){if(!o.isBuffer(A))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===t&&(t=A?A.length:0),void 0===i&&(i=0),void 0===B&&(B=this.length),e<0||t>A.length||i<0||B>this.length)throw new RangeError("out of range index");if(i>=B&&e>=t)return 0;if(i>=B)return-1;if(e>=t)return 1;if(this===A)return 0;for(var n=(B>>>=0)-(i>>>=0),s=(t>>>=0)-(e>>>=0),r=Math.min(n,s),g=this.slice(i,B),a=A.slice(e,t),c=0;cB)&&(t=B),A.length>0&&(t<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var n=!1;;)switch(i){case"hex":return u(this,A,e,t);case"utf8":case"utf-8":return d(this,A,e,t);case"ascii":return Y(this,A,e,t);case"latin1":case"binary":return M(this,A,e,t);case"base64":return F(this,A,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,A,e,t);default:if(n)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),n=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function U(A,e,t){var i="";t=Math.min(A.length,t);for(var B=e;Bi)&&(t=i);for(var B="",n=e;nt)throw new RangeError("Trying to access beyond buffer length")}function H(A,e,t,i,B,n){if(!o.isBuffer(A))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>B||eA.length)throw new RangeError("Index out of range")}function k(A,e,t,i){e<0&&(e=65535+e+1);for(var B=0,n=Math.min(A.length-t,2);B>>8*(i?B:1-B)}function R(A,e,t,i){e<0&&(e=4294967295+e+1);for(var B=0,n=Math.min(A.length-t,4);B>>8*(i?B:3-B)&255}function x(A,e,t,i,B,n){if(t+i>A.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function J(A,e,t,i,n){return n||x(A,0,t,4),B.write(A,e,t,i,23,4),t+4}function T(A,e,t,i,n){return n||x(A,0,t,8),B.write(A,e,t,i,52,8),t+8}o.prototype.slice=function(A,e){var t,i=this.length;if((A=~~A)<0?(A+=i)<0&&(A=0):A>i&&(A=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e0&&(B*=256);)i+=this[A+--e]*B;return i},o.prototype.readUInt8=function(A,e){return e||y(A,1,this.length),this[A]},o.prototype.readUInt16LE=function(A,e){return e||y(A,2,this.length),this[A]|this[A+1]<<8},o.prototype.readUInt16BE=function(A,e){return e||y(A,2,this.length),this[A]<<8|this[A+1]},o.prototype.readUInt32LE=function(A,e){return e||y(A,4,this.length),(this[A]|this[A+1]<<8|this[A+2]<<16)+16777216*this[A+3]},o.prototype.readUInt32BE=function(A,e){return e||y(A,4,this.length),16777216*this[A]+(this[A+1]<<16|this[A+2]<<8|this[A+3])},o.prototype.readIntLE=function(A,e,t){A|=0,e|=0,t||y(A,e,this.length);for(var i=this[A],B=1,n=0;++n=(B*=128)&&(i-=Math.pow(2,8*e)),i},o.prototype.readIntBE=function(A,e,t){A|=0,e|=0,t||y(A,e,this.length);for(var i=e,B=1,n=this[A+--i];i>0&&(B*=256);)n+=this[A+--i]*B;return n>=(B*=128)&&(n-=Math.pow(2,8*e)),n},o.prototype.readInt8=function(A,e){return e||y(A,1,this.length),128&this[A]?-1*(255-this[A]+1):this[A]},o.prototype.readInt16LE=function(A,e){e||y(A,2,this.length);var t=this[A]|this[A+1]<<8;return 32768&t?4294901760|t:t},o.prototype.readInt16BE=function(A,e){e||y(A,2,this.length);var t=this[A+1]|this[A]<<8;return 32768&t?4294901760|t:t},o.prototype.readInt32LE=function(A,e){return e||y(A,4,this.length),this[A]|this[A+1]<<8|this[A+2]<<16|this[A+3]<<24},o.prototype.readInt32BE=function(A,e){return e||y(A,4,this.length),this[A]<<24|this[A+1]<<16|this[A+2]<<8|this[A+3]},o.prototype.readFloatLE=function(A,e){return e||y(A,4,this.length),B.read(this,A,!0,23,4)},o.prototype.readFloatBE=function(A,e){return e||y(A,4,this.length),B.read(this,A,!1,23,4)},o.prototype.readDoubleLE=function(A,e){return e||y(A,8,this.length),B.read(this,A,!0,52,8)},o.prototype.readDoubleBE=function(A,e){return e||y(A,8,this.length),B.read(this,A,!1,52,8)},o.prototype.writeUIntLE=function(A,e,t,i){(A=+A,e|=0,t|=0,i)||H(this,A,e,t,Math.pow(2,8*t)-1,0);var B=1,n=0;for(this[e]=255&A;++n=0&&(n*=256);)this[e+B]=A/n&255;return e+t},o.prototype.writeUInt8=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,1,255,0),o.TYPED_ARRAY_SUPPORT||(A=Math.floor(A)),this[e]=255&A,e+1},o.prototype.writeUInt16LE=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=255&A,this[e+1]=A>>>8):k(this,A,e,!0),e+2},o.prototype.writeUInt16BE=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=A>>>8,this[e+1]=255&A):k(this,A,e,!1),e+2},o.prototype.writeUInt32LE=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e+3]=A>>>24,this[e+2]=A>>>16,this[e+1]=A>>>8,this[e]=255&A):R(this,A,e,!0),e+4},o.prototype.writeUInt32BE=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e]=A>>>24,this[e+1]=A>>>16,this[e+2]=A>>>8,this[e+3]=255&A):R(this,A,e,!1),e+4},o.prototype.writeIntLE=function(A,e,t,i){if(A=+A,e|=0,!i){var B=Math.pow(2,8*t-1);H(this,A,e,t,B-1,-B)}var n=0,s=1,r=0;for(this[e]=255&A;++n>0)-r&255;return e+t},o.prototype.writeIntBE=function(A,e,t,i){if(A=+A,e|=0,!i){var B=Math.pow(2,8*t-1);H(this,A,e,t,B-1,-B)}var n=t-1,s=1,r=0;for(this[e+n]=255&A;--n>=0&&(s*=256);)A<0&&0===r&&0!==this[e+n+1]&&(r=1),this[e+n]=(A/s>>0)-r&255;return e+t},o.prototype.writeInt8=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,1,127,-128),o.TYPED_ARRAY_SUPPORT||(A=Math.floor(A)),A<0&&(A=255+A+1),this[e]=255&A,e+1},o.prototype.writeInt16LE=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=255&A,this[e+1]=A>>>8):k(this,A,e,!0),e+2},o.prototype.writeInt16BE=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=A>>>8,this[e+1]=255&A):k(this,A,e,!1),e+2},o.prototype.writeInt32LE=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[e]=255&A,this[e+1]=A>>>8,this[e+2]=A>>>16,this[e+3]=A>>>24):R(this,A,e,!0),e+4},o.prototype.writeInt32BE=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,4,2147483647,-2147483648),A<0&&(A=4294967295+A+1),o.TYPED_ARRAY_SUPPORT?(this[e]=A>>>24,this[e+1]=A>>>16,this[e+2]=A>>>8,this[e+3]=255&A):R(this,A,e,!1),e+4},o.prototype.writeFloatLE=function(A,e,t){return J(this,A,e,!0,t)},o.prototype.writeFloatBE=function(A,e,t){return J(this,A,e,!1,t)},o.prototype.writeDoubleLE=function(A,e,t){return T(this,A,e,!0,t)},o.prototype.writeDoubleBE=function(A,e,t){return T(this,A,e,!1,t)},o.prototype.copy=function(A,e,t,i){if(t||(t=0),i||0===i||(i=this.length),e>=A.length&&(e=A.length),e||(e=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),A.length-e=0;--B)A[B+e]=this[B+t];else if(n<1e3||!o.TYPED_ARRAY_SUPPORT)for(B=0;B>>=0,t=void 0===t?this.length:t>>>0,A||(A=0),"number"==typeof A)for(n=e;n55295&&t<57344){if(!B){if(t>56319){(e-=3)>-1&&n.push(239,191,189);continue}if(s+1===i){(e-=3)>-1&&n.push(239,191,189);continue}B=t;continue}if(t<56320){(e-=3)>-1&&n.push(239,191,189),B=t;continue}t=65536+(B-55296<<10|t-56320)}else B&&(e-=3)>-1&&n.push(239,191,189);if(B=null,t<128){if((e-=1)<0)break;n.push(t)}else if(t<2048){if((e-=2)<0)break;n.push(t>>6|192,63&t|128)}else if(t<65536){if((e-=3)<0)break;n.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;n.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return n}function z(A){return i.toByteArray(function(A){if((A=function(A){return A.trim?A.trim():A.replace(/^\s+|\s+$/g,"")}(A).replace(S,"")).length<2)return"";for(;A.length%4!=0;)A+="=";return A}(A))}function v(A,e,t,i){for(var B=0;B=e.length||B>=A.length);++B)e[B+t]=A[B];return B}}).call(this,t(9))},function(A,e,t){function i(){}t(143).mixin(i),i.prototype.write=function(A,e,t){this.emit("item",A,e,t)},i.prototype.end=function(){this.emit("end"),this.removeAllListeners()},i.prototype.pipe=function(A){var e=this;function t(){A.write.apply(A,Array.prototype.slice.call(arguments))}function i(){!A._isStdio&&A.end()}return e.emit("unpipe",A),A.emit("pipe",e),e.on("item",t),e.on("end",i),e.when("unpipe",(function(B){var n=B===A||void 0===B;return n&&(e.removeListener("item",t),e.removeListener("end",i),A.emit("unpipe")),n})),A},i.prototype.unpipe=function(A){return this.emit("unpipe",A),this},i.prototype.format=function(A){throw new Error(["Warning: .format() is deprecated in Minilog v2! Use .pipe() instead. For example:","var Minilog = require('minilog');","Minilog"," .pipe(Minilog.backends.console.formatClean)"," .pipe(Minilog.backends.console);"].join("\n"))},i.mixin=function(A){var e,t=i.prototype;for(e in t)t.hasOwnProperty(e)&&(A.prototype[e]=t[e])},A.exports=i},function(A,e){A.exports=class{static simple(A){return JSON.parse(JSON.stringify(A))}}},function(A,e){class t{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[t.BACKGROUND_LAYER,t.VIDEO_LAYER,t.PEN_LAYER,t.SPRITE_LAYER]}}A.exports=t},function(A,e,t){(function(e){class t{constructor(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.nowObj;this.startTime=0,this.nowObj=A}static get USE_PERFORMANCE(){return!1}static get legacyDateCode(){return{now:function(){return(new Date).getTime()}}}static get nowObj(){return t.USE_PERFORMANCE&&"undefined"!=typeof self&&self.performance&&"now"in self.performance?self.performance:Date.now?Date:t.legacyDateCode}time(){return this.nowObj.now()}relativeTime(){return this.nowObj.now()}start(){this.startTime=this.nowObj.now()}timeElapsed(){return this.nowObj.now()-this.startTime}setTimeout(A,t){return e.setTimeout(A,t)}clearTimeout(A){e.clearTimeout(A)}}A.exports=t}).call(this,t(9))},function(A,e,t){const i=t(228),B=t(80),n=t(34),s=t(46),r=t(14),{Map:o}=t(27),g=t(82),a=t(83),c=t(1),Q=t(10),E=t(47);class w{constructor(A,e){this.runtime=A,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=e||!1}getCachedCompileResult(A){return this._cache.compiledScripts.hasOwnProperty(A)?this._cache.compiledScripts[A]:null}cacheCompileResult(A,e){this._cache.compiledScripts[A]={success:!0,value:e}}cacheCompileError(A,e){this._cache.compiledScripts[A]={success:!1,value:e}}static get BRANCH_INPUT_PREFIX(){return"SUBSTACK"}getBlock(A){return this._blocks[A]}getScripts(){return this._scripts}getNextBlock(A){const e=this._blocks[A];return void 0===e?null:e.next}getBranch(A,e){const t=this._blocks[A];if(void 0===t)return null;e||(e=1);let i=w.BRANCH_INPUT_PREFIX;e>1&&(i+=e);const B=t.inputs[i];return void 0===B?null:B.block}getOpcode(A){return void 0===A?null:A.opcode}getFields(A){return void 0===A?null:A.fields}getInputs(A){if(void 0===A)return null;let e=this._cache.inputs[A.id];if(void 0!==e)return e;e={};for(const t in A.inputs)t.substring(0,w.BRANCH_INPUT_PREFIX.length)!==w.BRANCH_INPUT_PREFIX&&(e[t]=A.inputs[t]);return this._cache.inputs[A.id]=e,e}getMutation(A){return void 0===A?null:A.mutation}getTopLevelScript(A){let e=this._blocks[A];if(void 0===e)return null;for(;null!==e.parent;)e=this._blocks[e.parent];return e.id}getProcedureDefinition(A){const e=this._cache.procedureDefinitions[A];if(void 0!==e)return e;for(const e in this._blocks){if(!this._blocks.hasOwnProperty(e))continue;const t=this._blocks[e];if("procedures_definition"===t.opcode){const i=this._getCustomBlockInternal(t);if(i&&i.mutation.proccode===A)return this._cache.procedureDefinitions[A]=e,e}}return this._cache.procedureDefinitions[A]=null,null}getProcedureParamNamesAndIds(A){return this.getProcedureParamNamesIdsAndDefaults(A).slice(0,2)}getProcedureParamNamesIdsAndDefaults(A){const e=this._cache.procedureParamNames[A];if(void 0!==e)return e;for(const e in this._blocks){if(!this._blocks.hasOwnProperty(e))continue;const t=this._blocks[e];if("procedures_prototype"===t.opcode&&t.mutation.proccode===A){const e=JSON.parse(t.mutation.argumentnames),i=JSON.parse(t.mutation.argumentids),B=JSON.parse(t.mutation.argumentdefaults);return this._cache.procedureParamNames[A]=[e,i,B],this._cache.procedureParamNames[A]}}const t=this.runtime.getAddonBlock(A);return t?(this._cache.procedureParamNames[A]=t.namesIdsDefaults,t.namesIdsDefaults):(this._cache.procedureParamNames[A]=null,null)}populateProcedureCache(){if(!this._cache.proceduresPopulated){for(const A in this._blocks){if(!this._blocks.hasOwnProperty(A))continue;const e=this._blocks[A];if("procedures_prototype"!==e.opcode){if("procedures_definition"===e.opcode){const t=this._getCustomBlockInternal(e);if(t){const e=t.mutation.proccode;this._cache.procedureDefinitions[e]||(this._cache.procedureDefinitions[e]=A);continue}}}else{const A=e.mutation.proccode;if(!this._cache.procedureParamNames[A]){const t=JSON.parse(e.mutation.argumentnames),i=JSON.parse(e.mutation.argumentids),B=JSON.parse(e.mutation.argumentdefaults);this._cache.procedureParamNames[A]=[t,i,B]}}}this._cache.proceduresPopulated=!0}}duplicate(){const A=new w(this.runtime,this.forceNoGlow);return A._blocks=r.simple(this._blocks),A._scripts=r.simple(this._scripts),A}blocklyListen(A){if("object"!=typeof A)return;if("string"!=typeof A.blockId&&"string"!=typeof A.varId&&"string"!=typeof A.commentId)return;const e=this.runtime.getTargetForStage(),t=this.runtime.getEditingTarget();if("stackclick"!==A.element)switch(A.type){case"create":{const e=i(A);for(let A=0;AA.isOriginal);for(const e of t)if(e.lookupVariableByNameAndType(A.varName,A.varType,!0))return;e.createVariable(A.varId,A.varName,A.varType,A.isCloud),this.emitProjectChanged()}break;case"var_rename":if(t&&t.variables.hasOwnProperty(A.varId))t.renameVariable(A.varId,A.newName),t.blocks.updateBlocksAfterVarRename(A.varId,A.newName);else{e.renameVariable(A.varId,A.newName);const t=this.runtime.targets;for(let e=0;e0&&"data_variable"!==e.opcode&&"data_listcontents"!==e.opcode){const A=E(e.id,e.fields);let t=this.runtime.monitorBlocks.getBlock(A);t||(t=JSON.parse(JSON.stringify(e)),t.id=A,this.runtime.monitorBlocks.createBlock(t)),e=t}const t=e.isMonitored;e.isMonitored=A.value;let i=!1;"data_variable"===e.opcode?i=!this.runtime.getTargetForStage().variables[e.fields.VARIABLE.id]:"data_listcontents"===e.opcode&&(i=!this.runtime.getTargetForStage().variables[e.fields.LIST.id]);const B=i||this.runtime.monitorBlockInfo.hasOwnProperty(e.opcode)&&this.runtime.monitorBlockInfo[e.opcode].isSpriteSpecific;e.targetId=B?e.targetId||this.runtime.getEditingTarget().id:null,t&&!e.isMonitored?this.runtime.requestHideMonitor(e.id):!t&&e.isMonitored&&(this.runtime.requestShowMonitor(e.id)||this.runtime.requestAddMonitor(s({id:e.id,targetId:e.targetId,spriteName:e.targetId?this.runtime.getTargetById(e.targetId).getName():null,opcode:e.opcode,params:this._getBlockParams(e),value:"",mode:"data_listcontents"===e.opcode?"list":"default"})));break}}this.emitProjectChanged(),this.resetCache()}}moveBlock(A){if(!this._blocks.hasOwnProperty(A.id))return;const e=this._blocks[A.id];let t=!1;if(A.newCoordinate&&(t=e.x!==A.newCoordinate.x||e.y!==A.newCoordinate.y,e.x=A.newCoordinate.x,e.y=A.newCoordinate.y),void 0!==A.oldParent){const e=this._blocks[A.oldParent];void 0!==A.oldInput&&e.inputs[A.oldInput].block===A.id?e.inputs[A.oldInput].block=null:e.next===A.id&&(e.next=null),this._blocks[A.id].parent=null,t=!0}if(void 0===A.newParent)this._addScript(A.id);else{if(this._deleteScript(A.id),void 0===A.newInput)this._blocks[A.newParent].next=A.id;else{let e=null;this._blocks[A.newParent].inputs.hasOwnProperty(A.newInput)&&(e=this._blocks[A.newParent].inputs[A.newInput].shadow),this._blocks[A.id].shadow&&(e=A.id),this._blocks[A.newParent].inputs[A.newInput]={name:A.newInput,block:A.id,shadow:e}}this._blocks[A.id].parent=A.newParent,t=!0}this.resetCache(),t&&this.emitProjectChanged()}runAllMonitored(A){null===this._cache._monitored&&(this._cache._monitored=Object.keys(this._blocks).filter(A=>this.getBlock(A).isMonitored).map(e=>{const t=this.getBlock(e).targetId;return{blockId:e,target:t?A.getTargetById(t):null}}));const e=this._cache._monitored;for(let t=0;tthis.blockToXML(e,A)).join()}blockToXML(A,e){const t=this._blocks[A];if(!t)return;const i=t.shadow?"shadow":"block";let B="<".concat(i,'\n id="').concat(n(t.id),'"\n type="').concat(n(t.opcode),'"\n ').concat(t.topLevel?'x="'.concat(t.x,'" y="').concat(t.y,'"'):"","\n >");const s=t.comment;s&&(e?e.hasOwnProperty(s)?B+=e[s].toXML():c.warn("Could not find comment with id: ".concat(s," in provided comment descriptions.")):c.warn("Cannot serialize comment with id: ".concat(s,"; no comment descriptions provided."))),t.mutation&&(B+=this.mutationToXML(t.mutation));for(const A in t.inputs){if(!t.inputs.hasOwnProperty(A))continue;const i=t.inputs[A];(i.block||i.shadow)&&(B+=''),i.block&&(B+=this.blockToXML(i.block,e)),i.shadow&&i.shadow!==i.block&&(B+=this.blockToXML(i.shadow,e)),B+="")}for(const A in t.fields){if(!t.fields.hasOwnProperty(A))continue;const e=t.fields[A];B+='".concat(r,"")}return t.next&&(B+="".concat(this.blockToXML(t.next,e),"")),B+=""),B}mutationToXML(A){let e="<".concat(A.tagName);for(const t in A){if("children"===t||"tagName"===t)continue;let i="string"==typeof A[t]?n(A[t]):A[t];"blockInfo"===t&&(i=n(JSON.stringify(A[t]))),e+=" ".concat(t,'="').concat(i,'"')}e+=">";for(let t=0;t"),e}_getBlockParams(A){const e={};for(const t in A.fields)e[t]=A.fields[t].value;for(const t in A.inputs){const i=this._blocks[A.inputs[t].block];for(const A in i.fields)e[A]=i.fields[A].value}return e}_getCustomBlockInternal(A){if(A.inputs&&A.inputs.custom_block)return this._blocks[A.inputs.custom_block.block]}_addScript(A){this._scripts.indexOf(A)>-1||(this._scripts.push(A),this._blocks[A].topLevel=!0)}_deleteScript(A){const e=this._scripts.indexOf(A);e>-1&&this._scripts.splice(e,1),this._blocks[A]&&(this._blocks[A].topLevel=!1)}}g.getCached=function(A,e,t){let i=A._cache._executeCached[e];if(void 0!==i)return i;const B=A.getBlock(e);return void 0===B?null:(i=void 0===t?{id:e,opcode:A.getOpcode(B),fields:A.getFields(B),inputs:A.getInputs(B),mutation:A.getMutation(B)}:new t(A,{id:e,opcode:A.getOpcode(B),fields:A.getFields(B),inputs:A.getInputs(B),mutation:A.getMutation(B)}),A._cache._executeCached[e]=i,i)};const C=a._RuntimeScriptCache;a.getScripts=function(A,e){let t=A._cache.scripts[e];if(!t){t=A._cache.scripts[e]=[];const i=A._scripts;for(let B=0;B0&&this.scanner.lookupType(-1)===B?this.scanner.tokenIndex>1?this.scanner.getTokenStart(this.scanner.tokenIndex-1):this.scanner.firstCharOffset:this.scanner.tokenStart}function g(){return 0}A.exports={name:"Raw",structure:{value:String},parse:function(A,e,t){var i,B=this.scanner.getTokenStart(A);return this.scanner.skip(this.scanner.getRawLength(A,e||g)),i=t&&this.scanner.tokenStart>B?o.call(this):this.scanner.tokenStart,{type:"Raw",loc:this.getLocation(B,i),value:this.scanner.source.substring(B,i)}},generate:function(A){this.chunk(A.value)},mode:{default:g,leftCurlyBracket:function(A){return A===s?1:0},leftCurlyBracketOrSemicolon:function(A){return A===s||A===n?1:0},exclamationMarkOrSemicolon:function(A,e,t){return A===r&&33===e.charCodeAt(t)||A===n?1:0},semicolonIncluded:function(A){return A===n?2:0}}}},function(A,e,t){"use strict";var i,B="object"==typeof Reflect?Reflect:null,n=B&&"function"==typeof B.apply?B.apply:function(A,e,t){return Function.prototype.apply.call(A,e,t)};i=B&&"function"==typeof B.ownKeys?B.ownKeys:Object.getOwnPropertySymbols?function(A){return Object.getOwnPropertyNames(A).concat(Object.getOwnPropertySymbols(A))}:function(A){return Object.getOwnPropertyNames(A)};var s=Number.isNaN||function(A){return A!=A};function r(){r.init.call(this)}A.exports=r,A.exports.once=function(A,e){return new Promise((function(t,i){function B(t){A.removeListener(e,n),i(t)}function n(){"function"==typeof A.removeListener&&A.removeListener("error",B),t([].slice.call(arguments))}I(A,e,n,{once:!0}),"error"!==e&&function(A,e,t){"function"==typeof A.on&&I(A,"error",e,t)}(A,B,{once:!0})}))},r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var o=10;function g(A){if("function"!=typeof A)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}function a(A){return void 0===A._maxListeners?r.defaultMaxListeners:A._maxListeners}function c(A,e,t,i){var B,n,s,r;if(g(t),void 0===(n=A._events)?(n=A._events=Object.create(null),A._eventsCount=0):(void 0!==n.newListener&&(A.emit("newListener",e,t.listener?t.listener:t),n=A._events),s=n[e]),void 0===s)s=n[e]=t,++A._eventsCount;else if("function"==typeof s?s=n[e]=i?[t,s]:[s,t]:i?s.unshift(t):s.push(t),(B=a(A))>0&&s.length>B&&!s.warned){s.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=A,o.type=e,o.count=s.length,r=o,console&&console.warn&&console.warn(r)}return A}function Q(){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 E(A,e,t){var i={fired:!1,wrapFn:void 0,target:A,type:e,listener:t},B=Q.bind(i);return B.listener=t,i.wrapFn=B,B}function w(A,e,t){var i=A._events;if(void 0===i)return[];var B=i[e];return void 0===B?[]:"function"==typeof B?t?[B.listener||B]:[B]:t?function(A){for(var e=new Array(A.length),t=0;t0&&(s=e[0]),s instanceof Error)throw s;var r=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw r.context=s,r}var o=B[A];if(void 0===o)return!1;if("function"==typeof o)n(o,this,e);else{var g=o.length,a=l(o,g);for(t=0;t=0;n--)if(t[n]===e||t[n].listener===e){s=t[n].listener,B=n;break}if(B<0)return this;0===B?t.shift():function(A,e){for(;e+1=0;i--)this.removeListener(A,e[i]);return this},r.prototype.listeners=function(A){return w(this,A,!0)},r.prototype.rawListeners=function(A){return w(this,A,!1)},r.listenerCount=function(A,e){return"function"==typeof A.listenerCount?A.listenerCount(e):C.call(A,e)},r.prototype.listenerCount=C,r.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(A,e,t){const i=t(158),B=t(160);class n{static base64ToUint8Array(A){const e=i(A),t=e.length,B=new Uint8Array(t);for(let A=0;A>2]|=A[n]<>6,o[B++]=128|63&i):i<55296||i>=57344?(o[B++]=224|i>>12,o[B++]=128|i>>6&63,o[B++]=128|63&i):(i=65536+((1023&i)<<10|1023&A.charCodeAt(++n)),o[B++]=240|i>>18,o[B++]=128|i>>12&63,o[B++]=128|i>>6&63,o[B++]=128|63&i);else for(B=this.start;n>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(r[B>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=64?(this.start=B-64,this.hash(),this.hashed=!0):this.start=B}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 A=this.blocks,e=this.lastByteIndex;A[e>>2]|=EXTRA[3&e],e>=56&&(this.hashed||this.hash(),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),A[14]=this.bytes<<3,A[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var A,e,t,i,B,n,s=this.blocks;this.first?e=((e=((A=((A=s[0]-680876937)<<7|A>>>25)-271733879<<0)^(t=((t=(-271733879^(i=((i=(-1732584194^2004318071&A)+s[1]-117830708)<<12|i>>>20)+A<<0)&(-271733879^A))+s[2]-1126478375)<<17|t>>>15)+i<<0)&(i^A))+s[3]-1316259209)<<22|e>>>10)+t<<0:(A=this.h0,e=this.h1,t=this.h2,e=((e+=((A=((A+=((i=this.h3)^e&(t^i))+s[0]-680876936)<<7|A>>>25)+e<<0)^(t=((t+=(e^(i=((i+=(t^A&(e^t))+s[1]-389564586)<<12|i>>>20)+A<<0)&(A^e))+s[2]+606105819)<<17|t>>>15)+i<<0)&(i^A))+s[3]-1044525330)<<22|e>>>10)+t<<0),e=((e+=((A=((A+=(i^e&(t^i))+s[4]-176418897)<<7|A>>>25)+e<<0)^(t=((t+=(e^(i=((i+=(t^A&(e^t))+s[5]+1200080426)<<12|i>>>20)+A<<0)&(A^e))+s[6]-1473231341)<<17|t>>>15)+i<<0)&(i^A))+s[7]-45705983)<<22|e>>>10)+t<<0,e=((e+=((A=((A+=(i^e&(t^i))+s[8]+1770035416)<<7|A>>>25)+e<<0)^(t=((t+=(e^(i=((i+=(t^A&(e^t))+s[9]-1958414417)<<12|i>>>20)+A<<0)&(A^e))+s[10]-42063)<<17|t>>>15)+i<<0)&(i^A))+s[11]-1990404162)<<22|e>>>10)+t<<0,e=((e+=((A=((A+=(i^e&(t^i))+s[12]+1804603682)<<7|A>>>25)+e<<0)^(t=((t+=(e^(i=((i+=(t^A&(e^t))+s[13]-40341101)<<12|i>>>20)+A<<0)&(A^e))+s[14]-1502002290)<<17|t>>>15)+i<<0)&(i^A))+s[15]+1236535329)<<22|e>>>10)+t<<0,e=((e+=((i=((i+=(e^t&((A=((A+=(t^i&(e^t))+s[1]-165796510)<<5|A>>>27)+e<<0)^e))+s[6]-1069501632)<<9|i>>>23)+A<<0)^A&((t=((t+=(A^e&(i^A))+s[11]+643717713)<<14|t>>>18)+i<<0)^i))+s[0]-373897302)<<20|e>>>12)+t<<0,e=((e+=((i=((i+=(e^t&((A=((A+=(t^i&(e^t))+s[5]-701558691)<<5|A>>>27)+e<<0)^e))+s[10]+38016083)<<9|i>>>23)+A<<0)^A&((t=((t+=(A^e&(i^A))+s[15]-660478335)<<14|t>>>18)+i<<0)^i))+s[4]-405537848)<<20|e>>>12)+t<<0,e=((e+=((i=((i+=(e^t&((A=((A+=(t^i&(e^t))+s[9]+568446438)<<5|A>>>27)+e<<0)^e))+s[14]-1019803690)<<9|i>>>23)+A<<0)^A&((t=((t+=(A^e&(i^A))+s[3]-187363961)<<14|t>>>18)+i<<0)^i))+s[8]+1163531501)<<20|e>>>12)+t<<0,e=((e+=((i=((i+=(e^t&((A=((A+=(t^i&(e^t))+s[13]-1444681467)<<5|A>>>27)+e<<0)^e))+s[2]-51403784)<<9|i>>>23)+A<<0)^A&((t=((t+=(A^e&(i^A))+s[7]+1735328473)<<14|t>>>18)+i<<0)^i))+s[12]-1926607734)<<20|e>>>12)+t<<0,e=((e+=((n=(i=((i+=((B=e^t)^(A=((A+=(B^i)+s[5]-378558)<<4|A>>>28)+e<<0))+s[8]-2022574463)<<11|i>>>21)+A<<0)^A)^(t=((t+=(n^e)+s[11]+1839030562)<<16|t>>>16)+i<<0))+s[14]-35309556)<<23|e>>>9)+t<<0,e=((e+=((n=(i=((i+=((B=e^t)^(A=((A+=(B^i)+s[1]-1530992060)<<4|A>>>28)+e<<0))+s[4]+1272893353)<<11|i>>>21)+A<<0)^A)^(t=((t+=(n^e)+s[7]-155497632)<<16|t>>>16)+i<<0))+s[10]-1094730640)<<23|e>>>9)+t<<0,e=((e+=((n=(i=((i+=((B=e^t)^(A=((A+=(B^i)+s[13]+681279174)<<4|A>>>28)+e<<0))+s[0]-358537222)<<11|i>>>21)+A<<0)^A)^(t=((t+=(n^e)+s[3]-722521979)<<16|t>>>16)+i<<0))+s[6]+76029189)<<23|e>>>9)+t<<0,e=((e+=((n=(i=((i+=((B=e^t)^(A=((A+=(B^i)+s[9]-640364487)<<4|A>>>28)+e<<0))+s[12]-421815835)<<11|i>>>21)+A<<0)^A)^(t=((t+=(n^e)+s[15]+530742520)<<16|t>>>16)+i<<0))+s[2]-995338651)<<23|e>>>9)+t<<0,e=((e+=((i=((i+=(e^((A=((A+=(t^(e|~i))+s[0]-198630844)<<6|A>>>26)+e<<0)|~t))+s[7]+1126891415)<<10|i>>>22)+A<<0)^((t=((t+=(A^(i|~e))+s[14]-1416354905)<<15|t>>>17)+i<<0)|~A))+s[5]-57434055)<<21|e>>>11)+t<<0,e=((e+=((i=((i+=(e^((A=((A+=(t^(e|~i))+s[12]+1700485571)<<6|A>>>26)+e<<0)|~t))+s[3]-1894986606)<<10|i>>>22)+A<<0)^((t=((t+=(A^(i|~e))+s[10]-1051523)<<15|t>>>17)+i<<0)|~A))+s[1]-2054922799)<<21|e>>>11)+t<<0,e=((e+=((i=((i+=(e^((A=((A+=(t^(e|~i))+s[8]+1873313359)<<6|A>>>26)+e<<0)|~t))+s[15]-30611744)<<10|i>>>22)+A<<0)^((t=((t+=(A^(i|~e))+s[6]-1560198380)<<15|t>>>17)+i<<0)|~A))+s[13]+1309151649)<<21|e>>>11)+t<<0,e=((e+=((i=((i+=(e^((A=((A+=(t^(e|~i))+s[4]-145523070)<<6|A>>>26)+e<<0)|~t))+s[11]-1120210379)<<10|i>>>22)+A<<0)^((t=((t+=(A^(i|~e))+s[2]+718787259)<<15|t>>>17)+i<<0)|~A))+s[9]-343485551)<<21|e>>>11)+t<<0,this.first?(this.h0=A+1732584193<<0,this.h1=e-271733879<<0,this.h2=t-1732584194<<0,this.h3=i+271733878<<0,this.first=!1):(this.h0=this.h0+A<<0,this.h1=this.h1+e<<0,this.h2=this.h2+t<<0,this.h3=this.h3+i<<0)},Md5.prototype.hex=function(){this.finalize();var A=this.h0,e=this.h1,t=this.h2,i=this.h3;return HEX_CHARS[A>>4&15]+HEX_CHARS[15&A]+HEX_CHARS[A>>12&15]+HEX_CHARS[A>>8&15]+HEX_CHARS[A>>20&15]+HEX_CHARS[A>>16&15]+HEX_CHARS[A>>28&15]+HEX_CHARS[A>>24&15]+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[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(){this.finalize();var A=this.h0,e=this.h1,t=this.h2,i=this.h3;return[255&A,A>>8&255,A>>16&255,A>>24&255,255&e,e>>8&255,e>>16&255,e>>24&255,255&t,t>>8&255,t>>16&255,t>>24&255,255&i,i>>8&255,i>>16&255,i>>24&255]},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var A=new ArrayBuffer(16),e=new Uint32Array(A);return e[0]=this.h0,e[1]=this.h1,e[2]=this.h2,e[3]=this.h3,A},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var A,e,t,i="",B=this.array(),n=0;n<15;)A=B[n++],e=B[n++],t=B[n++],i+=BASE64_ENCODE_CHAR[A>>>2]+BASE64_ENCODE_CHAR[63&(A<<4|e>>>4)]+BASE64_ENCODE_CHAR[63&(e<<2|t>>>6)]+BASE64_ENCODE_CHAR[63&t];return A=B[n],i+=BASE64_ENCODE_CHAR[A>>>2]+BASE64_ENCODE_CHAR[A<<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__(43),__webpack_require__(9))},function(A,e,t){(function(e,t,i,B){A.exports=function A(e,t,i){function B(s,r){if(!t[s]){if(!e[s]){if(n)return n(s,!0);var o=new Error("Cannot find module '"+s+"'");throw o.code="MODULE_NOT_FOUND",o}var g=t[s]={exports:{}};e[s][0].call(g.exports,(function(A){return B(e[s][1][A]||A)}),g,g.exports,A,e,t,i)}return t[s].exports}for(var n=!1,s=0;s>2,r=(3&e)<<4|t>>4,o=1>6:64,g=2>4,t=(15&s)<<4|(r=n.indexOf(A.charAt(g++)))>>2,i=(3&r)<<6|(o=n.indexOf(A.charAt(g++))),Q[a++]=e,64!==r&&(Q[a++]=t),64!==o&&(Q[a++]=i);return Q}},{"./support":30,"./utils":32}],2:[function(A,e,t){"use strict";var i=A("./external"),B=A("./stream/DataWorker"),n=A("./stream/Crc32Probe"),s=A("./stream/DataLengthProbe");function r(A,e,t,i,B){this.compressedSize=A,this.uncompressedSize=e,this.crc32=t,this.compression=i,this.compressedContent=B}r.prototype={getContentWorker:function(){var A=new B(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),e=this;return A.on("end",(function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),A},getCompressedWorker:function(){return new B(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},r.createWorkerFrom=function(A,e,t){return A.pipe(new n).pipe(new s("uncompressedSize")).pipe(e.compressWorker(t)).pipe(new s("compressedSize")).withStreamInfo("compression",e)},e.exports=r},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(A,e,t){"use strict";var i=A("./stream/GenericWorker");t.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},t.DEFLATE=A("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(A,e,t){"use strict";var i=A("./utils"),B=function(){for(var A,e=[],t=0;t<256;t++){A=t;for(var i=0;i<8;i++)A=1&A?3988292384^A>>>1:A>>>1;e[t]=A}return e}();e.exports=function(A,e){return void 0!==A&&A.length?"string"!==i.getTypeOf(A)?function(A,e,t,i){var n=B,s=0+t;A^=-1;for(var r=0;r>>8^n[255&(A^e[r])];return-1^A}(0|e,A,A.length):function(A,e,t,i){var n=B,s=0+t;A^=-1;for(var r=0;r>>8^n[255&(A^e.charCodeAt(r))];return-1^A}(0|e,A,A.length):0}},{"./utils":32}],5:[function(A,e,t){"use strict";t.base64=!1,t.binary=!1,t.dir=!1,t.createFolders=!0,t.date=null,t.compression=null,t.compressionOptions=null,t.comment=null,t.unixPermissions=null,t.dosPermissions=null},{}],6:[function(A,e,t){"use strict";var i;i="undefined"!=typeof Promise?Promise:A("lie"),e.exports={Promise:i}},{lie:37}],7:[function(A,e,t){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,B=A("pako"),n=A("./utils"),s=A("./stream/GenericWorker"),r=i?"uint8array":"array";function o(A,e){s.call(this,"FlateWorker/"+A),this._pako=null,this._pakoAction=A,this._pakoOptions=e,this.meta={}}t.magic="\b\0",n.inherits(o,s),o.prototype.processChunk=function(A){this.meta=A.meta,null===this._pako&&this._createPako(),this._pako.push(n.transformTo(r,A.data),!1)},o.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},o.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},o.prototype._createPako=function(){this._pako=new B[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var A=this;this._pako.onData=function(e){A.push({data:e,meta:A.meta})}},t.compressWorker=function(A){return new o("Deflate",A)},t.uncompressWorker=function(){return new o("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(A,e,t){"use strict";function i(A,e){var t,i="";for(t=0;t>>=8;return i}function B(A,e,t,B,s,a){var c,Q,E=A.file,w=A.compression,C=a!==r.utf8encode,l=n.transformTo("string",a(E.name)),I=n.transformTo("string",r.utf8encode(E.name)),h=E.comment,u=n.transformTo("string",a(h)),d=n.transformTo("string",r.utf8encode(h)),Y=I.length!==E.name.length,M=d.length!==h.length,F="",D="",m="",p=E.dir,U=E.date,f={crc32:0,compressedSize:0,uncompressedSize:0};e&&!t||(f.crc32=A.crc32,f.compressedSize=A.compressedSize,f.uncompressedSize=A.uncompressedSize);var N=0;e&&(N|=8),C||!Y&&!M||(N|=2048);var G=0,y=0;p&&(G|=16),"UNIX"===s?(y=798,G|=function(A,e){var t=A;return A||(t=e?16893:33204),(65535&t)<<16}(E.unixPermissions,p)):(y=20,G|=function(A){return 63&(A||0)}(E.dosPermissions)),c=U.getUTCHours(),c<<=6,c|=U.getUTCMinutes(),c<<=5,c|=U.getUTCSeconds()/2,Q=U.getUTCFullYear()-1980,Q<<=4,Q|=U.getUTCMonth()+1,Q<<=5,Q|=U.getUTCDate(),Y&&(D=i(1,1)+i(o(l),4)+I,F+="up"+i(D.length,2)+D),M&&(m=i(1,1)+i(o(u),4)+d,F+="uc"+i(m.length,2)+m);var H="";return H+="\n\0",H+=i(N,2),H+=w.magic,H+=i(c,2),H+=i(Q,2),H+=i(f.crc32,4),H+=i(f.compressedSize,4),H+=i(f.uncompressedSize,4),H+=i(l.length,2),H+=i(F.length,2),{fileRecord:g.LOCAL_FILE_HEADER+H+l+F,dirRecord:g.CENTRAL_FILE_HEADER+i(y,2)+H+i(u.length,2)+"\0\0\0\0"+i(G,4)+i(B,4)+l+F+u}}var n=A("../utils"),s=A("../stream/GenericWorker"),r=A("../utf8"),o=A("../crc32"),g=A("../signature");function a(A,e,t,i){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=t,this.encodeFileName=i,this.streamFiles=A,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(a,s),a.prototype.push=function(A){var e=A.meta.percent||0,t=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(A):(this.bytesWritten+=A.data.length,s.prototype.push.call(this,{data:A.data,meta:{currentFile:this.currentFile,percent:t?(e+100*(t-i-1))/t:100}}))},a.prototype.openedSource=function(A){this.currentSourceOffset=this.bytesWritten,this.currentFile=A.file.name;var e=this.streamFiles&&!A.file.dir;if(e){var t=B(A,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:t.fileRecord,meta:{percent:0}})}else this.accumulate=!0},a.prototype.closedSource=function(A){this.accumulate=!1;var e=this.streamFiles&&!A.file.dir,t=B(A,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(t.dirRecord),e)this.push({data:function(A){return g.DATA_DESCRIPTOR+i(A.crc32,4)+i(A.compressedSize,4)+i(A.uncompressedSize,4)}(A),meta:{percent:100}});else for(this.push({data:t.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},a.prototype.flush=function(){for(var A=this.bytesWritten,e=0;e=this.index;e--)t=(t<<8)+this.byteAt(e);return this.index+=A,t},readString:function(A){return i.transformTo("string",this.readData(A))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var A=this.readInt(4);return new Date(Date.UTC(1980+(A>>25&127),(A>>21&15)-1,A>>16&31,A>>11&31,A>>5&63,(31&A)<<1))}},e.exports=B},{"../utils":32}],19:[function(A,e,t){"use strict";var i=A("./Uint8ArrayReader");function B(A){i.call(this,A)}A("../utils").inherits(B,i),B.prototype.readData=function(A){this.checkOffset(A);var e=this.data.slice(this.zero+this.index,this.zero+this.index+A);return this.index+=A,e},e.exports=B},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(A,e,t){"use strict";var i=A("./DataReader");function B(A){i.call(this,A)}A("../utils").inherits(B,i),B.prototype.byteAt=function(A){return this.data.charCodeAt(this.zero+A)},B.prototype.lastIndexOfSignature=function(A){return this.data.lastIndexOf(A)-this.zero},B.prototype.readAndCheckSignature=function(A){return A===this.readData(4)},B.prototype.readData=function(A){this.checkOffset(A);var e=this.data.slice(this.zero+this.index,this.zero+this.index+A);return this.index+=A,e},e.exports=B},{"../utils":32,"./DataReader":18}],21:[function(A,e,t){"use strict";var i=A("./ArrayReader");function B(A){i.call(this,A)}A("../utils").inherits(B,i),B.prototype.readData=function(A){if(this.checkOffset(A),0===A)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+A);return this.index+=A,e},e.exports=B},{"../utils":32,"./ArrayReader":17}],22:[function(A,e,t){"use strict";var i=A("../utils"),B=A("../support"),n=A("./ArrayReader"),s=A("./StringReader"),r=A("./NodeBufferReader"),o=A("./Uint8ArrayReader");e.exports=function(A){var e=i.getTypeOf(A);return i.checkSupport(e),"string"!==e||B.uint8array?"nodebuffer"===e?new r(A):B.uint8array?new o(i.transformTo("uint8array",A)):new n(i.transformTo("array",A)):new s(A)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(A,e,t){"use strict";t.LOCAL_FILE_HEADER="PK",t.CENTRAL_FILE_HEADER="PK",t.CENTRAL_DIRECTORY_END="PK",t.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",t.ZIP64_CENTRAL_DIRECTORY_END="PK",t.DATA_DESCRIPTOR="PK\b"},{}],24:[function(A,e,t){"use strict";var i=A("./GenericWorker"),B=A("../utils");function n(A){i.call(this,"ConvertWorker to "+A),this.destType=A}B.inherits(n,i),n.prototype.processChunk=function(A){this.push({data:B.transformTo(this.destType,A.data),meta:A.meta})},e.exports=n},{"../utils":32,"./GenericWorker":28}],25:[function(A,e,t){"use strict";var i=A("./GenericWorker"),B=A("../crc32");function n(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}A("../utils").inherits(n,i),n.prototype.processChunk=function(A){this.streamInfo.crc32=B(A.data,this.streamInfo.crc32||0),this.push(A)},e.exports=n},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(A,e,t){"use strict";var i=A("../utils"),B=A("./GenericWorker");function n(A){B.call(this,"DataLengthProbe for "+A),this.propName=A,this.withStreamInfo(A,0)}i.inherits(n,B),n.prototype.processChunk=function(A){if(A){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+A.data.length}B.prototype.processChunk.call(this,A)},e.exports=n},{"../utils":32,"./GenericWorker":28}],27:[function(A,e,t){"use strict";var i=A("../utils"),B=A("./GenericWorker");function n(A){B.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,A.then((function(A){e.dataIsReady=!0,e.data=A,e.max=A&&A.length||0,e.type=i.getTypeOf(A),e.isPaused||e._tickAndRepeat()}),(function(A){e.error(A)}))}i.inherits(n,B),n.prototype.cleanUp=function(){B.prototype.cleanUp.call(this),this.data=null},n.prototype.resume=function(){return!!B.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},n.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},n.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var A=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":A=this.data.substring(this.index,e);break;case"uint8array":A=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":A=this.data.slice(this.index,e)}return this.index=e,this.push({data:A,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=n},{"../utils":32,"./GenericWorker":28}],28:[function(A,e,t){"use strict";function i(A){this.name=A||"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}i.prototype={push:function(A){this.emit("data",A)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(A){this.emit("error",A)}return!0},error:function(A){return!this.isFinished&&(this.isPaused?this.generatedError=A:(this.isFinished=!0,this.emit("error",A),this.previous&&this.previous.error(A),this.cleanUp()),!0)},on:function(A,e){return this._listeners[A].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(A,e){if(this._listeners[A])for(var t=0;t "+A:A}},e.exports=i},{}],29:[function(A,t,i){"use strict";var B=A("../utils"),n=A("./ConvertWorker"),s=A("./GenericWorker"),r=A("../base64"),o=A("../support"),g=A("../external"),a=null;if(o.nodestream)try{a=A("../nodejs/NodejsStreamOutputAdapter")}catch(A){}function c(A,e,t){var i=e;switch(e){case"blob":case"arraybuffer":i="uint8array";break;case"base64":i="string"}try{this._internalType=i,this._outputType=e,this._mimeType=t,B.checkSupport(i),this._worker=A.pipe(new n(i)),A.lock()}catch(A){this._worker=new s("error"),this._worker.error(A)}}c.prototype={accumulate:function(A){return function(A,t){return new g.Promise((function(i,n){var s=[],o=A._internalType,g=A._outputType,a=A._mimeType;A.on("data",(function(A,e){s.push(A),t&&t(e)})).on("error",(function(A){s=[],n(A)})).on("end",(function(){try{var A=function(A,e,t){switch(A){case"blob":return B.newBlob(B.transformTo("arraybuffer",e),t);case"base64":return r.encode(e);default:return B.transformTo(A,e)}}(g,function(A,t){var i,B=0,n=null,s=0;for(i=0;i>>6:(t<65536?e[s++]=224|t>>>12:(e[s++]=240|t>>>18,e[s++]=128|t>>>12&63),e[s++]=128|t>>>6&63),e[s++]=128|63&t);return e}(A)},t.utf8decode=function(A){return B.nodebuffer?i.transformTo("nodebuffer",A).toString("utf-8"):function(A){var e,t,B,n,s=A.length,o=new Array(2*s);for(e=t=0;e>10&1023,o[t++]=56320|1023&B)}return o.length!==t&&(o.subarray?o=o.subarray(0,t):o.length=t),i.applyFromCharCode(o)}(A=i.transformTo(B.uint8array?"uint8array":"array",A))},i.inherits(g,s),g.prototype.processChunk=function(A){var e=i.transformTo(B.uint8array?"uint8array":"array",A.data);if(this.leftOver&&this.leftOver.length){if(B.uint8array){var n=e;(e=new Uint8Array(n.length+this.leftOver.length)).set(this.leftOver,0),e.set(n,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var s=function(A,e){var t;for((e=e||A.length)>A.length&&(e=A.length),t=e-1;0<=t&&128==(192&A[t]);)t--;return t<0||0===t?e:t+r[A[t]]>e?t:e}(e),o=e;s!==e.length&&(B.uint8array?(o=e.subarray(0,s),this.leftOver=e.subarray(s,e.length)):(o=e.slice(0,s),this.leftOver=e.slice(s,e.length))),this.push({data:t.utf8decode(o),meta:A.meta})},g.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=g,i.inherits(a,s),a.prototype.processChunk=function(A){this.push({data:t.utf8encode(A.data),meta:A.meta})},t.Utf8EncodeWorker=a},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(A,e,i){"use strict";var B=A("./support"),n=A("./base64"),s=A("./nodejsUtils"),r=A("./external");function o(A){return A}function g(A,e){for(var t=0;t>8;this.dir=!!(16&this.externalFileAttributes),0==A&&(this.dosPermissions=63&this.externalFileAttributes),3==A&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var A=i(this.extraFields[1].value);this.uncompressedSize===B.MAX_VALUE_32BITS&&(this.uncompressedSize=A.readInt(8)),this.compressedSize===B.MAX_VALUE_32BITS&&(this.compressedSize=A.readInt(8)),this.localHeaderOffset===B.MAX_VALUE_32BITS&&(this.localHeaderOffset=A.readInt(8)),this.diskNumberStart===B.MAX_VALUE_32BITS&&(this.diskNumberStart=A.readInt(4))}},readExtraFields:function(A){var e,t,i,B=A.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});A.index+4>>6:(t<65536?e[s++]=224|t>>>12:(e[s++]=240|t>>>18,e[s++]=128|t>>>12&63),e[s++]=128|t>>>6&63),e[s++]=128|63&t);return e},t.buf2binstring=function(A){return o(A,A.length)},t.binstring2buf=function(A){for(var e=new i.Buf8(A.length),t=0,B=e.length;t>10&1023,g[i++]=56320|1023&B)}return o(g,i)},t.utf8border=function(A,e){var t;for((e=e||A.length)>A.length&&(e=A.length),t=e-1;0<=t&&128==(192&A[t]);)t--;return t<0||0===t?e:t+s[A[t]]>e?t:e}},{"./common":41}],43:[function(A,e,t){"use strict";e.exports=function(A,e,t,i){for(var B=65535&A|0,n=A>>>16&65535|0,s=0;0!==t;){for(t-=s=2e3>>1:A>>>1;e[t]=A}return e}();e.exports=function(A,e,t,B){var n=i,s=B+t;A^=-1;for(var r=B;r>>8^n[255&(A^e[r])];return-1^A}},{}],46:[function(A,e,t){"use strict";var i,B=A("../utils/common"),n=A("./trees"),s=A("./adler32"),r=A("./crc32"),o=A("./messages"),g=-2,a=258,c=262,Q=113;function E(A,e){return A.msg=o[e],e}function w(A){return(A<<1)-(4A.avail_out&&(t=A.avail_out),0!==t&&(B.arraySet(A.output,e.pending_buf,e.pending_out,t,A.next_out),A.next_out+=t,e.pending_out+=t,A.total_out+=t,A.avail_out-=t,e.pending-=t,0===e.pending&&(e.pending_out=0))}function I(A,e){n._tr_flush_block(A,0<=A.block_start?A.block_start:-1,A.strstart-A.block_start,e),A.block_start=A.strstart,l(A.strm)}function h(A,e){A.pending_buf[A.pending++]=e}function u(A,e){A.pending_buf[A.pending++]=e>>>8&255,A.pending_buf[A.pending++]=255&e}function d(A,e){var t,i,B=A.max_chain_length,n=A.strstart,s=A.prev_length,r=A.nice_match,o=A.strstart>A.w_size-c?A.strstart-(A.w_size-c):0,g=A.window,Q=A.w_mask,E=A.prev,w=A.strstart+a,C=g[n+s-1],l=g[n+s];A.prev_length>=A.good_match&&(B>>=2),r>A.lookahead&&(r=A.lookahead);do{if(g[(t=e)+s]===l&&g[t+s-1]===C&&g[t]===g[n]&&g[++t]===g[n+1]){n+=2,t++;do{}while(g[++n]===g[++t]&&g[++n]===g[++t]&&g[++n]===g[++t]&&g[++n]===g[++t]&&g[++n]===g[++t]&&g[++n]===g[++t]&&g[++n]===g[++t]&&g[++n]===g[++t]&&no&&0!=--B);return s<=A.lookahead?s:A.lookahead}function Y(A){var e,t,i,n,o,g,a,Q,E,w,C=A.w_size;do{if(n=A.window_size-A.lookahead-A.strstart,A.strstart>=C+(C-c)){for(B.arraySet(A.window,A.window,C,C,0),A.match_start-=C,A.strstart-=C,A.block_start-=C,e=t=A.hash_size;i=A.head[--e],A.head[e]=C<=i?i-C:0,--t;);for(e=t=C;i=A.prev[--e],A.prev[e]=C<=i?i-C:0,--t;);n+=C}if(0===A.strm.avail_in)break;if(g=A.strm,a=A.window,Q=A.strstart+A.lookahead,w=void 0,(E=n)<(w=g.avail_in)&&(w=E),t=0===w?0:(g.avail_in-=w,B.arraySet(a,g.input,g.next_in,w,Q),1===g.state.wrap?g.adler=s(g.adler,a,w,Q):2===g.state.wrap&&(g.adler=r(g.adler,a,w,Q)),g.next_in+=w,g.total_in+=w,w),A.lookahead+=t,A.lookahead+A.insert>=3)for(o=A.strstart-A.insert,A.ins_h=A.window[o],A.ins_h=(A.ins_h<=3&&(A.ins_h=(A.ins_h<=3)if(i=n._tr_tally(A,A.strstart-A.match_start,A.match_length-3),A.lookahead-=A.match_length,A.match_length<=A.max_lazy_match&&A.lookahead>=3){for(A.match_length--;A.strstart++,A.ins_h=(A.ins_h<=3&&(A.ins_h=(A.ins_h<=3&&A.match_length<=A.prev_length){for(B=A.strstart+A.lookahead-3,i=n._tr_tally(A,A.strstart-1-A.prev_match,A.prev_length-3),A.lookahead-=A.prev_length-1,A.prev_length-=2;++A.strstart<=B&&(A.ins_h=(A.ins_h<A.pending_buf_size-5&&(t=A.pending_buf_size-5);;){if(A.lookahead<=1){if(Y(A),0===A.lookahead&&0===e)return 1;if(0===A.lookahead)break}A.strstart+=A.lookahead,A.lookahead=0;var i=A.block_start+t;if((0===A.strstart||A.strstart>=i)&&(A.lookahead=A.strstart-i,A.strstart=i,I(A,!1),0===A.strm.avail_out))return 1;if(A.strstart-A.block_start>=A.w_size-c&&(I(A,!1),0===A.strm.avail_out))return 1}return A.insert=0,4===e?(I(A,!0),0===A.strm.avail_out?3:4):(A.strstart>A.block_start&&(I(A,!1),A.strm.avail_out),1)})),new D(4,4,8,4,M),new D(4,5,16,8,M),new D(4,6,32,32,M),new D(4,4,16,16,F),new D(8,16,32,32,F),new D(8,16,128,128,F),new D(8,32,128,256,F),new D(32,128,258,1024,F),new D(32,258,258,4096,F)],t.deflateInit=function(A,e){return f(A,e,8,15,8,0)},t.deflateInit2=f,t.deflateReset=U,t.deflateResetKeep=p,t.deflateSetHeader=function(A,e){return A&&A.state?2!==A.state.wrap?g:(A.state.gzhead=e,0):g},t.deflate=function(A,e){var t,B,s,o;if(!A||!A.state||5>8&255),h(B,B.gzhead.time>>16&255),h(B,B.gzhead.time>>24&255),h(B,9===B.level?2:2<=B.strategy||B.level<2?4:0),h(B,255&B.gzhead.os),B.gzhead.extra&&B.gzhead.extra.length&&(h(B,255&B.gzhead.extra.length),h(B,B.gzhead.extra.length>>8&255)),B.gzhead.hcrc&&(A.adler=r(A.adler,B.pending_buf,B.pending,0)),B.gzindex=0,B.status=69):(h(B,0),h(B,0),h(B,0),h(B,0),h(B,0),h(B,9===B.level?2:2<=B.strategy||B.level<2?4:0),h(B,3),B.status=Q);else{var c=8+(B.w_bits-8<<4)<<8;c|=(2<=B.strategy||B.level<2?0:B.level<6?1:6===B.level?2:3)<<6,0!==B.strstart&&(c|=32),c+=31-c%31,B.status=Q,u(B,c),0!==B.strstart&&(u(B,A.adler>>>16),u(B,65535&A.adler)),A.adler=1}if(69===B.status)if(B.gzhead.extra){for(s=B.pending;B.gzindex<(65535&B.gzhead.extra.length)&&(B.pending!==B.pending_buf_size||(B.gzhead.hcrc&&B.pending>s&&(A.adler=r(A.adler,B.pending_buf,B.pending-s,s)),l(A),s=B.pending,B.pending!==B.pending_buf_size));)h(B,255&B.gzhead.extra[B.gzindex]),B.gzindex++;B.gzhead.hcrc&&B.pending>s&&(A.adler=r(A.adler,B.pending_buf,B.pending-s,s)),B.gzindex===B.gzhead.extra.length&&(B.gzindex=0,B.status=73)}else B.status=73;if(73===B.status)if(B.gzhead.name){s=B.pending;do{if(B.pending===B.pending_buf_size&&(B.gzhead.hcrc&&B.pending>s&&(A.adler=r(A.adler,B.pending_buf,B.pending-s,s)),l(A),s=B.pending,B.pending===B.pending_buf_size)){o=1;break}o=B.gzindexs&&(A.adler=r(A.adler,B.pending_buf,B.pending-s,s)),0===o&&(B.gzindex=0,B.status=91)}else B.status=91;if(91===B.status)if(B.gzhead.comment){s=B.pending;do{if(B.pending===B.pending_buf_size&&(B.gzhead.hcrc&&B.pending>s&&(A.adler=r(A.adler,B.pending_buf,B.pending-s,s)),l(A),s=B.pending,B.pending===B.pending_buf_size)){o=1;break}o=B.gzindexs&&(A.adler=r(A.adler,B.pending_buf,B.pending-s,s)),0===o&&(B.status=103)}else B.status=103;if(103===B.status&&(B.gzhead.hcrc?(B.pending+2>B.pending_buf_size&&l(A),B.pending+2<=B.pending_buf_size&&(h(B,255&A.adler),h(B,A.adler>>8&255),A.adler=0,B.status=Q)):B.status=Q),0!==B.pending){if(l(A),0===A.avail_out)return B.last_flush=-1,0}else if(0===A.avail_in&&w(e)<=w(t)&&4!==e)return E(A,-5);if(666===B.status&&0!==A.avail_in)return E(A,-5);if(0!==A.avail_in||0!==B.lookahead||0!==e&&666!==B.status){var d=2===B.strategy?function(A,e){for(var t;;){if(0===A.lookahead&&(Y(A),0===A.lookahead)){if(0===e)return 1;break}if(A.match_length=0,t=n._tr_tally(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++,t&&(I(A,!1),0===A.strm.avail_out))return 1}return A.insert=0,4===e?(I(A,!0),0===A.strm.avail_out?3:4):A.last_lit&&(I(A,!1),0===A.strm.avail_out)?1:2}(B,e):3===B.strategy?function(A,e){for(var t,i,B,s,r=A.window;;){if(A.lookahead<=a){if(Y(A),A.lookahead<=a&&0===e)return 1;if(0===A.lookahead)break}if(A.match_length=0,A.lookahead>=3&&0A.lookahead&&(A.match_length=A.lookahead)}if(A.match_length>=3?(t=n._tr_tally(A,1,A.match_length-3),A.lookahead-=A.match_length,A.strstart+=A.match_length,A.match_length=0):(t=n._tr_tally(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++),t&&(I(A,!1),0===A.strm.avail_out))return 1}return A.insert=0,4===e?(I(A,!0),0===A.strm.avail_out?3:4):A.last_lit&&(I(A,!1),0===A.strm.avail_out)?1:2}(B,e):i[B.level].func(B,e);if(3!==d&&4!==d||(B.status=666),1===d||3===d)return 0===A.avail_out&&(B.last_flush=-1),0;if(2===d&&(1===e?n._tr_align(B):5!==e&&(n._tr_stored_block(B,0,0,!1),3===e&&(C(B.head),0===B.lookahead&&(B.strstart=0,B.block_start=0,B.insert=0))),l(A),0===A.avail_out))return B.last_flush=-1,0}return 4!==e?0:B.wrap<=0?1:(2===B.wrap?(h(B,255&A.adler),h(B,A.adler>>8&255),h(B,A.adler>>16&255),h(B,A.adler>>24&255),h(B,255&A.total_in),h(B,A.total_in>>8&255),h(B,A.total_in>>16&255),h(B,A.total_in>>24&255)):(u(B,A.adler>>>16),u(B,65535&A.adler)),l(A),0=t.w_size&&(0===r&&(C(t.head),t.strstart=0,t.block_start=0,t.insert=0),Q=new B.Buf8(t.w_size),B.arraySet(Q,e,E-t.w_size,t.w_size,0),e=Q,E=t.w_size),o=A.avail_in,a=A.next_in,c=A.input,A.avail_in=E,A.next_in=0,A.input=e,Y(t);t.lookahead>=3;){for(i=t.strstart,n=t.lookahead-2;t.ins_h=(t.ins_h<>>=d=u>>>24,w-=d,0==(d=u>>>16&255))p[n++]=65535&u;else{if(!(16&d)){if(0==(64&d)){u=C[(65535&u)+(E&(1<>>=d,w-=d),w<15&&(E+=m[i++]<>>=d=u>>>24,w-=d,!(16&(d=u>>>16&255))){if(0==(64&d)){u=l[(65535&u)+(E&(1<>>=d,w-=d,(d=n-s)>3,E&=(1<<(w-=Y<<3))-1,A.next_in=i,A.next_out=n,A.avail_in=i>>24&255)+(A>>>8&65280)+((65280&A)<<8)+((255&A)<<24)}function a(){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 i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function c(A){var e;return A&&A.state?(e=A.state,A.total_in=A.total_out=e.total=0,A.msg="",e.wrap&&(A.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new i.Buf32(852),e.distcode=e.distdyn=new i.Buf32(592),e.sane=1,e.back=-1,0):o}function Q(A){var e;return A&&A.state?((e=A.state).wsize=0,e.whave=0,e.wnext=0,c(A)):o}function E(A,e){var t,i;return A&&A.state?(i=A.state,e<0?(t=0,e=-e):(t=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15=s.wsize?(i.arraySet(s.window,e,t-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(B<(n=s.wsize-s.wnext)&&(n=B),i.arraySet(s.window,e,t-B,n,s.wnext),(B-=n)?(i.arraySet(s.window,e,t-B,B,0),s.wnext=B,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,t.check=n(t.check,J,2,0),I=l=0,t.mode=2;break}if(t.flags=0,t.head&&(t.head.done=!1),!(1&t.wrap)||(((255&l)<<8)+(l>>8))%31){A.msg="incorrect header check",t.mode=30;break}if(8!=(15&l)){A.msg="unknown compression method",t.mode=30;break}if(I-=4,y=8+(15&(l>>>=4)),0===t.wbits)t.wbits=y;else if(y>t.wbits){A.msg="invalid window size",t.mode=30;break}t.dmax=1<>8&1),512&t.flags&&(J[0]=255&l,J[1]=l>>>8&255,t.check=n(t.check,J,2,0)),I=l=0,t.mode=3;case 3:for(;I<32;){if(0===w)break A;w--,l+=a[Q++]<>>8&255,J[2]=l>>>16&255,J[3]=l>>>24&255,t.check=n(t.check,J,4,0)),I=l=0,t.mode=4;case 4:for(;I<16;){if(0===w)break A;w--,l+=a[Q++]<>8),512&t.flags&&(J[0]=255&l,J[1]=l>>>8&255,t.check=n(t.check,J,2,0)),I=l=0,t.mode=5;case 5:if(1024&t.flags){for(;I<16;){if(0===w)break A;w--,l+=a[Q++]<>>8&255,t.check=n(t.check,J,2,0)),I=l=0}else t.head&&(t.head.extra=null);t.mode=6;case 6:if(1024&t.flags&&(w<(M=t.length)&&(M=w),M&&(t.head&&(y=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Array(t.head.extra_len)),i.arraySet(t.head.extra,a,Q,M,y)),512&t.flags&&(t.check=n(t.check,a,M,Q)),w-=M,Q+=M,t.length-=M),t.length))break A;t.length=0,t.mode=7;case 7:if(2048&t.flags){if(0===w)break A;for(M=0;y=a[Q+M++],t.head&&y&&t.length<65536&&(t.head.name+=String.fromCharCode(y)),y&&M>9&1,t.head.done=!0),A.adler=t.check=0,t.mode=12;break;case 10:for(;I<32;){if(0===w)break A;w--,l+=a[Q++]<>>=7&I,I-=7&I,t.mode=27;break}for(;I<3;){if(0===w)break A;w--,l+=a[Q++]<>>=1)){case 0:t.mode=14;break;case 1:if(h(t),t.mode=20,6!==e)break;l>>>=2,I-=2;break A;case 2:t.mode=17;break;case 3:A.msg="invalid block type",t.mode=30}l>>>=2,I-=2;break;case 14:for(l>>>=7&I,I-=7&I;I<32;){if(0===w)break A;w--,l+=a[Q++]<>>16^65535)){A.msg="invalid stored block lengths",t.mode=30;break}if(t.length=65535&l,I=l=0,t.mode=15,6===e)break A;case 15:t.mode=16;case 16:if(M=t.length){if(w>>=5,I-=5,t.ndist=1+(31&l),l>>>=5,I-=5,t.ncode=4+(15&l),l>>>=4,I-=4,286>>=3,I-=3}for(;t.have<19;)t.lens[T[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,R={bits:t.lenbits},H=r(0,t.lens,0,19,t.lencode,0,t.work,R),t.lenbits=R.bits,H){A.msg="invalid code lengths set",t.mode=30;break}t.have=0,t.mode=19;case 19:for(;t.have>>16&255,U=65535&x,!((m=x>>>24)<=I);){if(0===w)break A;w--,l+=a[Q++]<>>=m,I-=m,t.lens[t.have++]=U;else{if(16===U){for(k=m+2;I>>=m,I-=m,0===t.have){A.msg="invalid bit length repeat",t.mode=30;break}y=t.lens[t.have-1],M=3+(3&l),l>>>=2,I-=2}else if(17===U){for(k=m+3;I>>=m)),l>>>=3,I-=3}else{for(k=m+7;I>>=m)),l>>>=7,I-=7}if(t.have+M>t.nlen+t.ndist){A.msg="invalid bit length repeat",t.mode=30;break}for(;M--;)t.lens[t.have++]=y}}if(30===t.mode)break;if(0===t.lens[256]){A.msg="invalid code -- missing end-of-block",t.mode=30;break}if(t.lenbits=9,R={bits:t.lenbits},H=r(1,t.lens,0,t.nlen,t.lencode,0,t.work,R),t.lenbits=R.bits,H){A.msg="invalid literal/lengths set",t.mode=30;break}if(t.distbits=6,t.distcode=t.distdyn,R={bits:t.distbits},H=r(2,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,R),t.distbits=R.bits,H){A.msg="invalid distances set",t.mode=30;break}if(t.mode=20,6===e)break A;case 20:t.mode=21;case 21:if(6<=w&&258<=C){A.next_out=E,A.avail_out=C,A.next_in=Q,A.avail_in=w,t.hold=l,t.bits=I,s(A,Y),E=A.next_out,c=A.output,C=A.avail_out,Q=A.next_in,a=A.input,w=A.avail_in,l=t.hold,I=t.bits,12===t.mode&&(t.back=-1);break}for(t.back=0;p=(x=t.lencode[l&(1<>>16&255,U=65535&x,!((m=x>>>24)<=I);){if(0===w)break A;w--,l+=a[Q++]<>f)])>>>16&255,U=65535&x,!(f+(m=x>>>24)<=I);){if(0===w)break A;w--,l+=a[Q++]<>>=f,I-=f,t.back+=f}if(l>>>=m,I-=m,t.back+=m,t.length=U,0===p){t.mode=26;break}if(32&p){t.back=-1,t.mode=12;break}if(64&p){A.msg="invalid literal/length code",t.mode=30;break}t.extra=15&p,t.mode=22;case 22:if(t.extra){for(k=t.extra;I>>=t.extra,I-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=23;case 23:for(;p=(x=t.distcode[l&(1<>>16&255,U=65535&x,!((m=x>>>24)<=I);){if(0===w)break A;w--,l+=a[Q++]<>f)])>>>16&255,U=65535&x,!(f+(m=x>>>24)<=I);){if(0===w)break A;w--,l+=a[Q++]<>>=f,I-=f,t.back+=f}if(l>>>=m,I-=m,t.back+=m,64&p){A.msg="invalid distance code",t.mode=30;break}t.offset=U,t.extra=15&p,t.mode=24;case 24:if(t.extra){for(k=t.extra;I>>=t.extra,I-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){A.msg="invalid distance too far back",t.mode=30;break}t.mode=25;case 25:if(0===C)break A;if(M=Y-C,t.offset>M){if((M=t.offset-M)>t.whave&&t.sane){A.msg="invalid distance too far back",t.mode=30;break}F=M>t.wnext?(M-=t.wnext,t.wsize-M):t.wnext-M,M>t.length&&(M=t.length),D=t.window}else D=c,F=E-t.offset,M=t.length;for(Ch?(d=T[S+c[D]],R[k+c[D]]):(d=96,0),E=1<>N)+(w-=E)]=u<<24|d<<16|Y|0,0!==w;);for(E=1<>=1;if(0!==E?(H&=E-1,H+=E):H=0,D++,0==--x[F]){if(F===p)break;F=e[t+c[D]]}if(U>>7)]}function m(A,e){A.pending_buf[A.pending++]=255&e,A.pending_buf[A.pending++]=e>>>8&255}function p(A,e,t){A.bi_valid>16-t?(A.bi_buf|=e<>16-A.bi_valid,A.bi_valid+=t-16):(A.bi_buf|=e<>>=1,t<<=1,0<--e;);return t>>>1}function N(A,e,t){var i,B,n=new Array(16),s=0;for(i=1;i<=o;i++)n[i]=s=s+t[i-1]<<1;for(B=0;B<=e;B++){var r=A[2*B+1];0!==r&&(A[2*B]=f(n[r]++,r))}}function G(A){var e;for(e=0;e>1;1<=t;t--)R(A,n,t);for(B=g;t=A.heap[1],A.heap[1]=A.heap[A.heap_len--],R(A,n,1),i=A.heap[1],A.heap[--A.heap_max]=t,A.heap[--A.heap_max]=i,n[2*B]=n[2*t]+n[2*i],A.depth[B]=(A.depth[t]>=A.depth[i]?A.depth[t]:A.depth[i])+1,n[2*t+1]=n[2*i+1]=B,A.heap[1]=B++,R(A,n,1),2<=A.heap_len;);A.heap[--A.heap_max]=A.heap[1],function(A,e){var t,i,B,n,s,r,g=e.dyn_tree,a=e.max_code,c=e.stat_desc.static_tree,Q=e.stat_desc.has_stree,E=e.stat_desc.extra_bits,w=e.stat_desc.extra_base,C=e.stat_desc.max_length,l=0;for(n=0;n<=o;n++)A.bl_count[n]=0;for(g[2*A.heap[A.heap_max]+1]=0,t=A.heap_max+1;t<573;t++)C<(n=g[2*g[2*(i=A.heap[t])+1]+1]+1)&&(n=C,l++),g[2*i+1]=n,a>=7;i>>=1)if(1&t&&0!==A.dyn_ltree[2*e])return 0;if(0!==A.dyn_ltree[18]||0!==A.dyn_ltree[20]||0!==A.dyn_ltree[26])return 1;for(e=32;e>>3,(s=A.static_len+3+7>>>3)<=B&&(B=s)):B=s=t+5,t+4<=B&&-1!==e?b(A,e,t,i):4===A.strategy||s===B?(p(A,2+(i?1:0),3),k(A,E,w)):(p(A,4+(i?1:0),3),function(A,e,t,i){var B;for(p(A,e-257,5),p(A,t-1,5),p(A,i-4,4),B=0;B>>8&255,A.pending_buf[A.d_buf+2*A.last_lit+1]=255&e,A.pending_buf[A.l_buf+A.last_lit]=255&t,A.last_lit++,0===e?A.dyn_ltree[2*t]++:(A.matches++,e--,A.dyn_ltree[2*(l[t]+n+1)]++,A.dyn_dtree[2*D(e)]++),A.last_lit===A.lit_bufsize-1},t._tr_align=function(A){p(A,2,3),U(A,256,E),function(A){16===A.bi_valid?(m(A,A.bi_buf),A.bi_buf=0,A.bi_valid=0):8<=A.bi_valid&&(A.pending_buf[A.pending++]=255&A.bi_buf,A.bi_buf>>=8,A.bi_valid-=8)}(A)}},{"../utils/common":41}],53:[function(A,e,t){"use strict";e.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(A,e,t){(function(A){!function(A,e){"use strict";if(!A.setImmediate){var t,i,n,s,r=1,o={},g=!1,a=A.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(A);c=c&&c.setTimeout?c:A,t="[object process]"==={}.toString.call(A.process)?function(A){B.nextTick((function(){E(A)}))}:function(){if(A.postMessage&&!A.importScripts){var e=!0,t=A.onmessage;return A.onmessage=function(){e=!1},A.postMessage("","*"),A.onmessage=t,e}}()?(s="setImmediate$"+Math.random()+"$",A.addEventListener?A.addEventListener("message",w,!1):A.attachEvent("onmessage",w),function(e){A.postMessage(s+e,"*")}):A.MessageChannel?((n=new MessageChannel).port1.onmessage=function(A){E(A.data)},function(A){n.port2.postMessage(A)}):a&&"onreadystatechange"in a.createElement("script")?(i=a.documentElement,function(A){var e=a.createElement("script");e.onreadystatechange=function(){E(A),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):function(A){setTimeout(E,0,A)},c.setImmediate=function(A){"function"!=typeof A&&(A=new Function(""+A));for(var e=new Array(arguments.length-1),i=0;i>24&255;return{r:A>>16&255,g:A>>8&255,b:255&A,a:e>0?e:255}}static hexToRgb(A){A.startsWith("#")&&(A=A.substring(1));const e=parseInt(A,16);if(isNaN(e))return null;if(6===A.length)return{r:e>>16&255,g:e>>8&255,b:255&e};if(3===A.length){const A=e>>8&15,t=e>>4&15,i=15&e;return{r:A<<4|A,g:t<<4|t,b:i<<4|i}}return null}static rgbToHex(A){return t.decimalToHex(t.rgbToDecimal(A))}static rgbToDecimal(A){return(A.r<<16)+(A.g<<8)+A.b}static hexToDecimal(A){return t.rgbToDecimal(t.hexToRgb(A))}static hsvToRgb(A){let e=A.h%360;e<0&&(e+=360);const t=Math.max(0,Math.min(A.s,1)),i=Math.max(0,Math.min(A.v,1)),B=Math.floor(e/60),n=e/60-B,s=i*(1-t),r=i*(1-t*n),o=i*(1-t*(1-n));let g,a,c;switch(B){default:case 0:g=i,a=o,c=s;break;case 1:g=r,a=i,c=s;break;case 2:g=s,a=i,c=o;break;case 3:g=s,a=r,c=i;break;case 4:g=o,a=s,c=i;break;case 5:g=i,a=s,c=r}return{r:Math.floor(255*g),g:Math.floor(255*a),b:Math.floor(255*c)}}static rgbToHsv(A){const e=A.r/255,t=A.g/255,i=A.b/255,B=Math.min(Math.min(e,t),i),n=Math.max(Math.max(e,t),i);let s=0,r=0;if(B!==n){s=60*((e===B?3:t===B?5:1)-(e===B?t-i:t===B?i-e:e-t)/(n-B))%360,r=(n-B)/n}return{h:s,s:r,v:n}}static mixRgb(A,e,t){if(t<=0)return A;if(t>=1)return e;const i=1-t;return{r:i*A.r+t*e.r,g:i*A.g+t*e.g,b:i*A.b+t*e.b}}}A.exports=t},function(A,e,t){A.exports=function(){"use strict";var A=Array.prototype.slice;function e(A,e){e&&(A.prototype=Object.create(e.prototype)),A.prototype.constructor=A}function t(A){return s(A)?A:v(A)}function i(A){return r(A)?A:L(A)}function B(A){return o(A)?A:P(A)}function n(A){return s(A)&&!g(A)?A:W(A)}function s(A){return!(!A||!A[c])}function r(A){return!(!A||!A[Q])}function o(A){return!(!A||!A[E])}function g(A){return r(A)||o(A)}function a(A){return!(!A||!A[w])}e(i,t),e(B,t),e(n,t),t.isIterable=s,t.isKeyed=r,t.isIndexed=o,t.isAssociative=g,t.isOrdered=a,t.Keyed=i,t.Indexed=B,t.Set=n;var c="@@__IMMUTABLE_ITERABLE__@@",Q="@@__IMMUTABLE_KEYED__@@",E="@@__IMMUTABLE_INDEXED__@@",w="@@__IMMUTABLE_ORDERED__@@",C={},l={value:!1},I={value:!1};function h(A){return A.value=!1,A}function u(A){A&&(A.value=!0)}function d(){}function Y(A,e){e=e||0;for(var t=Math.max(0,A.length-e),i=new Array(t),B=0;B>>0;if(""+t!==e||4294967295===t)return NaN;e=t}return e<0?M(A)+e:e}function D(){return!0}function m(A,e,t){return(0===A||void 0!==t&&A<=-t)&&(void 0===e||void 0!==t&&e>=t)}function p(A,e){return f(A,e,0)}function U(A,e){return f(A,e,e)}function f(A,e,t){return void 0===A?t:A<0?Math.max(0,e+A):void 0===e?A:Math.min(e,A)}var N,G,y,H="function"==typeof Symbol&&Symbol.iterator,R=H||"@@iterator";function k(A){this.next=A}function x(A,e,t,i){var B=0===A?e:1===A?t:[e,t];return i?i.value=B:i={value:B,done:!1},i}function J(){return{value:void 0,done:!0}}function T(A){return!!j(A)}function S(A){return A&&"function"==typeof A.next}function b(A){var e=j(A);return e&&e.call(A)}function j(A){var e=A&&(H&&A[H]||A["@@iterator"]);if("function"==typeof e)return e}function z(A){return A&&"number"==typeof A.length}function v(A){return null==A?Z():s(A)?A.toSeq():function(A){var e=AA(A)||"object"==typeof A&&new V(A);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+A);return e}(A)}function L(A){return null==A?Z().toKeyedSeq():s(A)?r(A)?A.toSeq():A.fromEntrySeq():q(A)}function P(A){return null==A?Z():s(A)?r(A)?A.entrySeq():A.toIndexedSeq():$(A)}function W(A){return(null==A?Z():s(A)?r(A)?A.entrySeq():A:$(A)).toSetSeq()}function O(A){this._array=A,this.size=A.length}function V(A){var e=Object.keys(A);this._object=A,this._keys=e,this.size=e.length}function K(A){this._iterable=A,this.size=A.length||A.size}function X(A){this._iterator=A,this._iteratorCache=[]}function _(A){return!(!A||!A["@@__IMMUTABLE_SEQ__@@"])}function Z(){return N||(N=new O([]))}function q(A){var e=Array.isArray(A)?new O(A).fromEntrySeq():S(A)?new X(A).fromEntrySeq():T(A)?new K(A).fromEntrySeq():"object"==typeof A?new V(A):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+A);return e}function $(A){var e=AA(A);if(!e)throw new TypeError("Expected Array or iterable object of values: "+A);return e}function AA(A){return z(A)?new O(A):S(A)?new X(A):T(A)?new K(A):void 0}function eA(A,e,t,i){var B=A._cache;if(B){for(var n=B.length-1,s=0;s<=n;s++){var r=B[t?n-s:s];if(!1===e(r[1],i?r[0]:s,A))return s+1}return s}return A.__iterateUncached(e,t)}function tA(A,e,t,i){var B=A._cache;if(B){var n=B.length-1,s=0;return new k((function(){var A=B[t?n-s:s];return s++>n?{value:void 0,done:!0}:x(e,i?A[0]:s-1,A[1])}))}return A.__iteratorUncached(e,t)}function iA(A,e){return e?function A(e,t,i,B){return Array.isArray(t)?e.call(B,i,P(t).map((function(i,B){return A(e,i,B,t)}))):nA(t)?e.call(B,i,L(t).map((function(i,B){return A(e,i,B,t)}))):t}(e,A,"",{"":A}):BA(A)}function BA(A){return Array.isArray(A)?P(A).map(BA).toList():nA(A)?L(A).map(BA).toMap():A}function nA(A){return A&&(A.constructor===Object||void 0===A.constructor)}function sA(A,e){if(A===e||A!=A&&e!=e)return!0;if(!A||!e)return!1;if("function"==typeof A.valueOf&&"function"==typeof e.valueOf){if((A=A.valueOf())===(e=e.valueOf())||A!=A&&e!=e)return!0;if(!A||!e)return!1}return!("function"!=typeof A.equals||"function"!=typeof e.equals||!A.equals(e))}function rA(A,e){if(A===e)return!0;if(!s(e)||void 0!==A.size&&void 0!==e.size&&A.size!==e.size||void 0!==A.__hash&&void 0!==e.__hash&&A.__hash!==e.__hash||r(A)!==r(e)||o(A)!==o(e)||a(A)!==a(e))return!1;if(0===A.size&&0===e.size)return!0;var t=!g(A);if(a(A)){var i=A.entries();return e.every((function(A,e){var B=i.next().value;return B&&sA(B[1],A)&&(t||sA(B[0],e))}))&&i.next().done}var B=!1;if(void 0===A.size)if(void 0===e.size)"function"==typeof A.cacheResult&&A.cacheResult();else{B=!0;var n=A;A=e,e=n}var c=!0,Q=e.__iterate((function(e,i){if(t?!A.has(e):B?!sA(e,A.get(i,C)):!sA(A.get(i,C),e))return c=!1,!1}));return c&&A.size===Q}function oA(A,e){if(!(this instanceof oA))return new oA(A,e);if(this._value=A,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(G)return G;G=this}}function gA(A,e){if(!A)throw new Error(e)}function aA(A,e,t){if(!(this instanceof aA))return new aA(A,e,t);if(gA(0!==t,"Cannot step a Range by 0"),A=A||0,void 0===e&&(e=1/0),t=void 0===t?1:Math.abs(t),ei?{value:void 0,done:!0}:x(A,B,t[e?i-B++:B++])}))},e(V,L),V.prototype.get=function(A,e){return void 0===e||this.has(A)?this._object[A]:e},V.prototype.has=function(A){return this._object.hasOwnProperty(A)},V.prototype.__iterate=function(A,e){for(var t=this._object,i=this._keys,B=i.length-1,n=0;n<=B;n++){var s=i[e?B-n:n];if(!1===A(t[s],s,this))return n+1}return n},V.prototype.__iterator=function(A,e){var t=this._object,i=this._keys,B=i.length-1,n=0;return new k((function(){var s=i[e?B-n:n];return n++>B?{value:void 0,done:!0}:x(A,s,t[s])}))},V.prototype[w]=!0,e(K,P),K.prototype.__iterateUncached=function(A,e){if(e)return this.cacheResult().__iterate(A,e);var t=b(this._iterable),i=0;if(S(t))for(var B;!(B=t.next()).done&&!1!==A(B.value,i++,this););return i},K.prototype.__iteratorUncached=function(A,e){if(e)return this.cacheResult().__iterator(A,e);var t=b(this._iterable);if(!S(t))return new k(J);var i=0;return new k((function(){var e=t.next();return e.done?e:x(A,i++,e.value)}))},e(X,P),X.prototype.__iterateUncached=function(A,e){if(e)return this.cacheResult().__iterate(A,e);for(var t,i=this._iterator,B=this._iteratorCache,n=0;n=i.length){var e=t.next();if(e.done)return e;i[B]=e.value}return x(A,B,i[B++])}))},e(oA,P),oA.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},oA.prototype.get=function(A,e){return this.has(A)?this._value:e},oA.prototype.includes=function(A){return sA(this._value,A)},oA.prototype.slice=function(A,e){var t=this.size;return m(A,e,t)?this:new oA(this._value,U(e,t)-p(A,t))},oA.prototype.reverse=function(){return this},oA.prototype.indexOf=function(A){return sA(this._value,A)?0:-1},oA.prototype.lastIndexOf=function(A){return sA(this._value,A)?this.size:-1},oA.prototype.__iterate=function(A,e){for(var t=0;t=0&&e=0&&tt?{value:void 0,done:!0}:x(A,n++,s)}))},aA.prototype.equals=function(A){return A instanceof aA?this._start===A._start&&this._end===A._end&&this._step===A._step:rA(this,A)},e(cA,t),e(QA,cA),e(EA,cA),e(wA,cA),cA.Keyed=QA,cA.Indexed=EA,cA.Set=wA;var CA="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(A,e){var t=65535&(A|=0),i=65535&(e|=0);return t*i+((A>>>16)*i+t*(e>>>16)<<16>>>0)|0};function lA(A){return A>>>1&1073741824|3221225471&A}function IA(A){if(!1===A||null==A)return 0;if("function"==typeof A.valueOf&&(!1===(A=A.valueOf())||null==A))return 0;if(!0===A)return 1;var e=typeof A;if("number"===e){if(A!=A||A===1/0)return 0;var t=0|A;for(t!==A&&(t^=4294967295*A);A>4294967295;)t^=A/=4294967295;return lA(t)}if("string"===e)return A.length>mA?function(A){var e=fA[A];return void 0===e&&(e=hA(A),UA===pA&&(UA=0,fA={}),UA++,fA[A]=e),e}(A):hA(A);if("function"==typeof A.hashCode)return A.hashCode();if("object"===e)return function(A){var e;if(MA&&void 0!==(e=uA.get(A)))return e;if(void 0!==(e=A[DA]))return e;if(!YA){if(void 0!==(e=A.propertyIsEnumerable&&A.propertyIsEnumerable[DA]))return e;if(void 0!==(e=function(A){if(A&&A.nodeType>0)switch(A.nodeType){case 1:return A.uniqueID;case 9:return A.documentElement&&A.documentElement.uniqueID}}(A)))return e}if(e=++FA,1073741824&FA&&(FA=0),MA)uA.set(A,e);else{if(void 0!==dA&&!1===dA(A))throw new Error("Non-extensible objects are not allowed as keys.");if(YA)Object.defineProperty(A,DA,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==A.propertyIsEnumerable&&A.propertyIsEnumerable===A.constructor.prototype.propertyIsEnumerable)A.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},A.propertyIsEnumerable[DA]=e;else{if(void 0===A.nodeType)throw new Error("Unable to set a non-enumerable property on object.");A[DA]=e}}return e}(A);if("function"==typeof A.toString)return hA(A.toString());throw new Error("Value type "+e+" cannot be hashed.")}function hA(A){for(var e=0,t=0;t=e.length)throw new Error("Missing value for key: "+e[t]);A.set(e[t],e[t+1])}}))},GA.prototype.toString=function(){return this.__toString("Map {","}")},GA.prototype.get=function(A,e){return this._root?this._root.get(0,void 0,A,e):e},GA.prototype.set=function(A,e){return WA(this,A,e)},GA.prototype.setIn=function(A,e){return this.updateIn(A,C,(function(){return e}))},GA.prototype.remove=function(A){return WA(this,A,C)},GA.prototype.deleteIn=function(A){return this.updateIn(A,(function(){return C}))},GA.prototype.update=function(A,e,t){return 1===arguments.length?A(this):this.updateIn([A],e,t)},GA.prototype.updateIn=function(A,e,t){t||(t=e,e=void 0);var i=function A(e,t,i,B){var n=e===C,s=t.next();if(s.done){var r=n?i:e,o=B(r);return o===r?e:o}gA(n||e&&e.set,"invalid keyPath");var g=s.value,a=n?C:e.get(g,C),c=A(a,t,i,B);return c===a?e:c===C?e.remove(g):(n?PA():e).set(g,c)}(this,Xe(A),e,t);return i===C?void 0:i},GA.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):PA()},GA.prototype.merge=function(){return XA(this,void 0,arguments)},GA.prototype.mergeWith=function(e){var t=A.call(arguments,1);return XA(this,e,t)},GA.prototype.mergeIn=function(e){var t=A.call(arguments,1);return this.updateIn(e,PA(),(function(A){return"function"==typeof A.merge?A.merge.apply(A,t):t[t.length-1]}))},GA.prototype.mergeDeep=function(){return XA(this,_A,arguments)},GA.prototype.mergeDeepWith=function(e){var t=A.call(arguments,1);return XA(this,ZA(e),t)},GA.prototype.mergeDeepIn=function(e){var t=A.call(arguments,1);return this.updateIn(e,PA(),(function(A){return"function"==typeof A.mergeDeep?A.mergeDeep.apply(A,t):t[t.length-1]}))},GA.prototype.sort=function(A){return Ye(Se(this,A))},GA.prototype.sortBy=function(A,e){return Ye(Se(this,e,A))},GA.prototype.withMutations=function(A){var e=this.asMutable();return A(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},GA.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new d)},GA.prototype.asImmutable=function(){return this.__ensureOwner()},GA.prototype.wasAltered=function(){return this.__altered},GA.prototype.__iterator=function(A,e){return new jA(this,A,e)},GA.prototype.__iterate=function(A,e){var t=this,i=0;return this._root&&this._root.iterate((function(e){return i++,A(e[1],e[0],t)}),e),i},GA.prototype.__ensureOwner=function(A){return A===this.__ownerID?this:A?LA(this.size,this._root,A,this.__hash):(this.__ownerID=A,this.__altered=!1,this)},GA.isMap=yA;var HA,RA="@@__IMMUTABLE_MAP__@@",kA=GA.prototype;function xA(A,e){this.ownerID=A,this.entries=e}function JA(A,e,t){this.ownerID=A,this.bitmap=e,this.nodes=t}function TA(A,e,t){this.ownerID=A,this.count=e,this.nodes=t}function SA(A,e,t){this.ownerID=A,this.keyHash=e,this.entries=t}function bA(A,e,t){this.ownerID=A,this.keyHash=e,this.entry=t}function jA(A,e,t){this._type=e,this._reverse=t,this._stack=A._root&&vA(A._root)}function zA(A,e){return x(A,e[0],e[1])}function vA(A,e){return{node:A,index:0,__prev:e}}function LA(A,e,t,i){var B=Object.create(kA);return B.size=A,B._root=e,B.__ownerID=t,B.__hash=i,B.__altered=!1,B}function PA(){return HA||(HA=LA(0))}function WA(A,e,t){var i,B;if(A._root){var n=h(l),s=h(I);if(i=OA(A._root,A.__ownerID,0,void 0,e,t,n,s),!s.value)return A;B=A.size+(n.value?t===C?-1:1:0)}else{if(t===C)return A;B=1,i=new xA(A.__ownerID,[[e,t]])}return A.__ownerID?(A.size=B,A._root=i,A.__hash=void 0,A.__altered=!0,A):i?LA(B,i):PA()}function OA(A,e,t,i,B,n,s,r){return A?A.update(e,t,i,B,n,s,r):n===C?A:(u(r),u(s),new bA(e,i,[B,n]))}function VA(A){return A.constructor===bA||A.constructor===SA}function KA(A,e,t,i,B){if(A.keyHash===i)return new SA(e,i,[A.entry,B]);var n,s=31&(0===t?A.keyHash:A.keyHash>>>t),r=31&(0===t?i:i>>>t);return new JA(e,1<>1&1431655765))+(A>>2&858993459))+(A>>4)&252645135,A+=A>>8,127&(A+=A>>16)}function Ae(A,e,t,i){var B=i?A:Y(A);return B[e]=t,B}kA[RA]=!0,kA.delete=kA.remove,kA.removeIn=kA.deleteIn,xA.prototype.get=function(A,e,t,i){for(var B=this.entries,n=0,s=B.length;n=ee)return function(A,e,t,i){A||(A=new d);for(var B=new bA(A,IA(t),[t,i]),n=0;n>>A)),n=this.bitmap;return 0==(n&B)?i:this.nodes[$A(n&B-1)].get(A+5,e,t,i)},JA.prototype.update=function(A,e,t,i,B,n,s){void 0===t&&(t=IA(i));var r=31&(0===e?t:t>>>e),o=1<=te)return function(A,e,t,i,B){for(var n=0,s=new Array(32),r=0;0!==t;r++,t>>>=1)s[r]=1&t?e[n++]:void 0;return s[i]=B,new TA(A,n+1,s)}(A,Q,g,r,w);if(a&&!w&&2===Q.length&&VA(Q[1^c]))return Q[1^c];if(a&&w&&1===Q.length&&VA(w))return w;var l=A&&A===this.ownerID,I=a?w?g:g^o:g|o,h=a?w?Ae(Q,c,w,l):function(A,e,t){var i=A.length-1;if(t&&e===i)return A.pop(),A;for(var B=new Array(i),n=0,s=0;s>>A),n=this.nodes[B];return n?n.get(A+5,e,t,i):i},TA.prototype.update=function(A,e,t,i,B,n,s){void 0===t&&(t=IA(i));var r=31&(0===e?t:t>>>e),o=B===C,g=this.nodes,a=g[r];if(o&&!a)return this;var c=OA(a,A,e+5,t,i,B,n,s);if(c===a)return this;var Q=this.count;if(a){if(!c&&--Q0&&i<32?Ee(0,i,5,null,new oe(t.toArray())):e.withMutations((function(A){A.setSize(i),t.forEach((function(e,t){return A.set(t,e)}))})))}function ne(A){return!(!A||!A[se])}e(Be,EA),Be.of=function(){return this(arguments)},Be.prototype.toString=function(){return this.__toString("List [","]")},Be.prototype.get=function(A,e){if((A=F(this,A))>=0&&A=A.size||e<0)return A.withMutations((function(A){e<0?he(A,e).set(0,t):he(A,0,e+1).set(e,t)}));e+=A._origin;var i=A._tail,B=A._root,n=h(I);return e>=de(A._capacity)?i=Ce(i,A.__ownerID,0,e,t,n):B=Ce(B,A.__ownerID,A._level,e,t,n),n.value?A.__ownerID?(A._root=B,A._tail=i,A.__hash=void 0,A.__altered=!0,A):Ee(A._origin,A._capacity,A._level,B,i):A}(this,A,e)},Be.prototype.remove=function(A){return this.has(A)?0===A?this.shift():A===this.size-1?this.pop():this.splice(A,1):this},Be.prototype.insert=function(A,e){return this.splice(A,0,e)},Be.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):we()},Be.prototype.push=function(){var A=arguments,e=this.size;return this.withMutations((function(t){he(t,0,e+A.length);for(var i=0;i>>e&31;if(i>=this.array.length)return new oe([],A);var B,n=0===i;if(e>0){var s=this.array[i];if((B=s&&s.removeBefore(A,e-5,t))===s&&n)return this}if(n&&!B)return this;var r=le(this,A);if(!n)for(var o=0;o>>e&31;if(B>=this.array.length)return this;if(e>0){var n=this.array[B];if((i=n&&n.removeAfter(A,e-5,t))===n&&B===this.array.length-1)return this}var s=le(this,A);return s.array.splice(B+1),i&&(s.array[B]=i),s};var ge,ae,ce={};function Qe(A,e){var t=A._origin,i=A._capacity,B=de(i),n=A._tail;return s(A._root,A._level,0);function s(A,r,o){return 0===r?function(A,s){var r=s===B?n&&n.array:A&&A.array,o=s>t?0:t-s,g=i-s;return g>32&&(g=32),function(){if(o===g)return ce;var A=e?--g:o++;return r&&r[A]}}(A,o):function(A,B,n){var r,o=A&&A.array,g=n>t?0:t-n>>B,a=1+(i-n>>B);return a>32&&(a=32),function(){for(;;){if(r){var A=r();if(A!==ce)return A;r=null}if(g===a)return ce;var t=e?--a:g++;r=s(o&&o[t],B-5,n+(t<>>t&31,o=A&&r0){var g=A&&A.array[r],a=Ce(g,e,t-5,i,B,n);return a===g?A:((s=le(A,e)).array[r]=a,s)}return o&&A.array[r]===B?A:(u(n),s=le(A,e),void 0===B&&r===s.array.length-1?s.array.pop():s.array[r]=B,s)}function le(A,e){return e&&A&&e===A.ownerID?A:new oe(A?A.array.slice():[],e)}function Ie(A,e){if(e>=de(A._capacity))return A._tail;if(e<1<0;)t=t.array[e>>>i&31],i-=5;return t}}function he(A,e,t){void 0!==e&&(e|=0),void 0!==t&&(t|=0);var i=A.__ownerID||new d,B=A._origin,n=A._capacity,s=B+e,r=void 0===t?n:t<0?n+t:B+t;if(s===B&&r===n)return A;if(s>=r)return A.clear();for(var o=A._level,g=A._root,a=0;s+a<0;)g=new oe(g&&g.array.length?[void 0,g]:[],i),a+=1<<(o+=5);a&&(s+=a,B+=a,r+=a,n+=a);for(var c=de(n),Q=de(r);Q>=1<c?new oe([],i):E;if(E&&Q>c&&s5;l-=5){var I=c>>>l&31;C=C.array[I]=le(C.array[I],i)}C.array[c>>>5&31]=E}if(r=Q)s-=Q,r-=Q,o=5,g=null,w=w&&w.removeBefore(i,0,s);else if(s>B||Q>>o&31;if(h!==Q>>>o&31)break;h&&(a+=(1<B&&(g=g.removeBefore(i,o,s-a)),g&&Qn&&(n=g.size),s(o)||(g=g.map((function(A){return iA(A)}))),i.push(g)}return n>A.size&&(A=A.setSize(n)),qA(A,e,i)}function de(A){return A<32?0:A-1>>>5<<5}function Ye(A){return null==A?De():Me(A)?A:De().withMutations((function(e){var t=i(A);NA(t.size),t.forEach((function(A,t){return e.set(t,A)}))}))}function Me(A){return yA(A)&&a(A)}function Fe(A,e,t,i){var B=Object.create(Ye.prototype);return B.size=A?A.size:0,B._map=A,B._list=e,B.__ownerID=t,B.__hash=i,B}function De(){return ae||(ae=Fe(PA(),we()))}function me(A,e,t){var i,B,n=A._map,s=A._list,r=n.get(e),o=void 0!==r;if(t===C){if(!o)return A;s.size>=32&&s.size>=2*n.size?(i=(B=s.filter((function(A,e){return void 0!==A&&r!==e}))).toKeyedSeq().map((function(A){return A[0]})).flip().toMap(),A.__ownerID&&(i.__ownerID=B.__ownerID=A.__ownerID)):(i=n.remove(e),B=r===s.size-1?s.pop():s.set(r,void 0))}else if(o){if(t===s.get(r)[1])return A;i=n,B=s.set(r,[e,t])}else i=n.set(e,s.size),B=s.set(s.size,[e,t]);return A.__ownerID?(A.size=i.size,A._map=i,A._list=B,A.__hash=void 0,A):Fe(i,B)}function pe(A,e){this._iter=A,this._useKeys=e,this.size=A.size}function Ue(A){this._iter=A,this.size=A.size}function fe(A){this._iter=A,this.size=A.size}function Ne(A){this._iter=A,this.size=A.size}function Ge(A){var e=Oe(A);return e._iter=A,e.size=A.size,e.flip=function(){return A},e.reverse=function(){var e=A.reverse.apply(this);return e.flip=function(){return A.reverse()},e},e.has=function(e){return A.includes(e)},e.includes=function(e){return A.has(e)},e.cacheResult=Ve,e.__iterateUncached=function(e,t){var i=this;return A.__iterate((function(A,t){return!1!==e(t,A,i)}),t)},e.__iteratorUncached=function(e,t){if(2===e){var i=A.__iterator(e,t);return new k((function(){var A=i.next();if(!A.done){var e=A.value[0];A.value[0]=A.value[1],A.value[1]=e}return A}))}return A.__iterator(1===e?0:1,t)},e}function ye(A,e,t){var i=Oe(A);return i.size=A.size,i.has=function(e){return A.has(e)},i.get=function(i,B){var n=A.get(i,C);return n===C?B:e.call(t,n,i,A)},i.__iterateUncached=function(i,B){var n=this;return A.__iterate((function(A,B,s){return!1!==i(e.call(t,A,B,s),B,n)}),B)},i.__iteratorUncached=function(i,B){var n=A.__iterator(2,B);return new k((function(){var B=n.next();if(B.done)return B;var s=B.value,r=s[0];return x(i,r,e.call(t,s[1],r,A),B)}))},i}function He(A,e){var t=Oe(A);return t._iter=A,t.size=A.size,t.reverse=function(){return A},A.flip&&(t.flip=function(){var e=Ge(A);return e.reverse=function(){return A.flip()},e}),t.get=function(t,i){return A.get(e?t:-1-t,i)},t.has=function(t){return A.has(e?t:-1-t)},t.includes=function(e){return A.includes(e)},t.cacheResult=Ve,t.__iterate=function(e,t){var i=this;return A.__iterate((function(A,t){return e(A,t,i)}),!t)},t.__iterator=function(e,t){return A.__iterator(e,!t)},t}function Re(A,e,t,i){var B=Oe(A);return i&&(B.has=function(i){var B=A.get(i,C);return B!==C&&!!e.call(t,B,i,A)},B.get=function(i,B){var n=A.get(i,C);return n!==C&&e.call(t,n,i,A)?n:B}),B.__iterateUncached=function(B,n){var s=this,r=0;return A.__iterate((function(A,n,o){if(e.call(t,A,n,o))return r++,B(A,i?n:r-1,s)}),n),r},B.__iteratorUncached=function(B,n){var s=A.__iterator(2,n),r=0;return new k((function(){for(;;){var n=s.next();if(n.done)return n;var o=n.value,g=o[0],a=o[1];if(e.call(t,a,g,A))return x(B,i?g:r++,a,n)}}))},B}function ke(A,e,t,i){var B=A.size;if(void 0!==e&&(e|=0),void 0!==t&&(t===1/0?t=B:t|=0),m(e,t,B))return A;var n=p(e,B),s=U(t,B);if(n!=n||s!=s)return ke(A.toSeq().cacheResult(),e,t,i);var r,o=s-n;o==o&&(r=o<0?0:o);var g=Oe(A);return g.size=0===r?r:A.size&&r||void 0,!i&&_(A)&&r>=0&&(g.get=function(e,t){return(e=F(this,e))>=0&&er)return{value:void 0,done:!0};var A=B.next();return i||1===e?A:x(e,o-1,0===e?void 0:A.value[1],A)}))},g}function xe(A,e,t,i){var B=Oe(A);return B.__iterateUncached=function(B,n){var s=this;if(n)return this.cacheResult().__iterate(B,n);var r=!0,o=0;return A.__iterate((function(A,n,g){if(!r||!(r=e.call(t,A,n,g)))return o++,B(A,i?n:o-1,s)})),o},B.__iteratorUncached=function(B,n){var s=this;if(n)return this.cacheResult().__iterator(B,n);var r=A.__iterator(2,n),o=!0,g=0;return new k((function(){var A,n,a;do{if((A=r.next()).done)return i||1===B?A:x(B,g++,0===B?void 0:A.value[1],A);var c=A.value;n=c[0],a=c[1],o&&(o=e.call(t,a,n,s))}while(o);return 2===B?A:x(B,n,a,A)}))},B}function Je(A,e){var t=r(A),B=[A].concat(e).map((function(A){return s(A)?t&&(A=i(A)):A=t?q(A):$(Array.isArray(A)?A:[A]),A})).filter((function(A){return 0!==A.size}));if(0===B.length)return A;if(1===B.length){var n=B[0];if(n===A||t&&r(n)||o(A)&&o(n))return n}var g=new O(B);return t?g=g.toKeyedSeq():o(A)||(g=g.toSetSeq()),(g=g.flatten(!0)).size=B.reduce((function(A,e){if(void 0!==A){var t=e.size;if(void 0!==t)return A+t}}),0),g}function Te(A,e,t){var i=Oe(A);return i.__iterateUncached=function(i,B){var n=0,r=!1;return function A(o,g){var a=this;o.__iterate((function(B,o){return(!e||g0}function ze(A,e,i){var B=Oe(A);return B.size=new O(i).map((function(A){return A.size})).min(),B.__iterate=function(A,e){for(var t,i=this.__iterator(1,e),B=0;!(t=i.next()).done&&!1!==A(t.value,B++,this););return B},B.__iteratorUncached=function(A,B){var n=i.map((function(A){return A=t(A),b(B?A.reverse():A)})),s=0,r=!1;return new k((function(){var t;return r||(t=n.map((function(A){return A.next()})),r=t.some((function(A){return A.done}))),r?{value:void 0,done:!0}:x(A,s++,e.apply(null,t.map((function(A){return A.value}))))}))},B}function ve(A,e){return _(A)?e:A.constructor(e)}function Le(A){if(A!==Object(A))throw new TypeError("Expected [K, V] tuple: "+A)}function Pe(A){return NA(A.size),M(A)}function We(A){return r(A)?i:o(A)?B:n}function Oe(A){return Object.create((r(A)?L:o(A)?P:W).prototype)}function Ve(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):v.prototype.cacheResult.call(this)}function Ke(A,e){return A>e?1:A=0;t--)e={value:arguments[t],next:e};return this.__ownerID?(this.size=A,this._head=e,this.__hash=void 0,this.__altered=!0,this):dt(A,e)},Ct.prototype.pushAll=function(A){if(0===(A=B(A)).size)return this;NA(A.size);var e=this.size,t=this._head;return A.reverse().forEach((function(A){e++,t={value:A,next:t}})),this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):dt(e,t)},Ct.prototype.pop=function(){return this.slice(1)},Ct.prototype.unshift=function(){return this.push.apply(this,arguments)},Ct.prototype.unshiftAll=function(A){return this.pushAll(A)},Ct.prototype.shift=function(){return this.pop.apply(this,arguments)},Ct.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):Yt()},Ct.prototype.slice=function(A,e){if(m(A,e,this.size))return this;var t=p(A,this.size);if(U(e,this.size)!==this.size)return EA.prototype.slice.call(this,A,e);for(var i=this.size-t,B=this._head;t--;)B=B.next;return this.__ownerID?(this.size=i,this._head=B,this.__hash=void 0,this.__altered=!0,this):dt(i,B)},Ct.prototype.__ensureOwner=function(A){return A===this.__ownerID?this:A?dt(this.size,this._head,A,this.__hash):(this.__ownerID=A,this.__altered=!1,this)},Ct.prototype.__iterate=function(A,e){if(e)return this.reverse().__iterate(A);for(var t=0,i=this._head;i&&!1!==A(i.value,t++,this);)i=i.next;return t},Ct.prototype.__iterator=function(A,e){if(e)return this.reverse().__iterator(A);var t=0,i=this._head;return new k((function(){if(i){var e=i.value;return i=i.next,x(A,t++,e)}return{value:void 0,done:!0}}))},Ct.isStack=lt;var It,ht="@@__IMMUTABLE_STACK__@@",ut=Ct.prototype;function dt(A,e,t,i){var B=Object.create(ut);return B.size=A,B._head=e,B.__ownerID=t,B.__hash=i,B.__altered=!1,B}function Yt(){return It||(It=dt(0))}function Mt(A,e){var t=function(t){A.prototype[t]=e[t]};return Object.keys(e).forEach(t),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(t),A}ut[ht]=!0,ut.withMutations=kA.withMutations,ut.asMutable=kA.asMutable,ut.asImmutable=kA.asImmutable,ut.wasAltered=kA.wasAltered,t.Iterator=k,Mt(t,{toArray:function(){NA(this.size);var A=new Array(this.size||0);return this.valueSeq().__iterate((function(e,t){A[t]=e})),A},toIndexedSeq:function(){return new Ue(this)},toJS:function(){return this.toSeq().map((function(A){return A&&"function"==typeof A.toJS?A.toJS():A})).__toJS()},toJSON:function(){return this.toSeq().map((function(A){return A&&"function"==typeof A.toJSON?A.toJSON():A})).__toJS()},toKeyedSeq:function(){return new pe(this,!0)},toMap:function(){return GA(this.toKeyedSeq())},toObject:function(){NA(this.size);var A={};return this.__iterate((function(e,t){A[t]=e})),A},toOrderedMap:function(){return Ye(this.toKeyedSeq())},toOrderedSet:function(){return gt(r(this)?this.valueSeq():this)},toSet:function(){return et(r(this)?this.valueSeq():this)},toSetSeq:function(){return new fe(this)},toSeq:function(){return o(this)?this.toIndexedSeq():r(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Ct(r(this)?this.valueSeq():this)},toList:function(){return Be(r(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(A,e){return 0===this.size?A+e:A+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){var e=A.call(arguments,0);return ve(this,Je(this,e))},includes:function(A){return this.some((function(e){return sA(e,A)}))},entries:function(){return this.__iterator(2)},every:function(A,e){NA(this.size);var t=!0;return this.__iterate((function(i,B,n){if(!A.call(e,i,B,n))return t=!1,!1})),t},filter:function(A,e){return ve(this,Re(this,A,e,!0))},find:function(A,e,t){var i=this.findEntry(A,e);return i?i[1]:t},forEach:function(A,e){return NA(this.size),this.__iterate(e?A.bind(e):A)},join:function(A){NA(this.size),A=void 0!==A?""+A:",";var e="",t=!0;return this.__iterate((function(i){t?t=!1:e+=A,e+=null!=i?i.toString():""})),e},keys:function(){return this.__iterator(0)},map:function(A,e){return ve(this,ye(this,A,e))},reduce:function(A,e,t){var i,B;return NA(this.size),arguments.length<2?B=!0:i=e,this.__iterate((function(e,n,s){B?(B=!1,i=e):i=A.call(t,i,e,n,s)})),i},reduceRight:function(A,e,t){var i=this.toKeyedSeq().reverse();return i.reduce.apply(i,arguments)},reverse:function(){return ve(this,He(this,!0))},slice:function(A,e){return ve(this,ke(this,A,e,!0))},some:function(A,e){return!this.every(Ut(A),e)},sort:function(A){return ve(this,Se(this,A))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(A,e){return M(A?this.toSeq().filter(A,e):this)},countBy:function(A,e){return function(A,e,t){var i=GA().asMutable();return A.__iterate((function(B,n){i.update(e.call(t,B,n,A),0,(function(A){return A+1}))})),i.asImmutable()}(this,A,e)},equals:function(A){return rA(this,A)},entrySeq:function(){var A=this;if(A._cache)return new O(A._cache);var e=A.toSeq().map(pt).toIndexedSeq();return e.fromEntrySeq=function(){return A.toSeq()},e},filterNot:function(A,e){return this.filter(Ut(A),e)},findEntry:function(A,e,t){var i=t;return this.__iterate((function(t,B,n){if(A.call(e,t,B,n))return i=[B,t],!1})),i},findKey:function(A,e){var t=this.findEntry(A,e);return t&&t[0]},findLast:function(A,e,t){return this.toKeyedSeq().reverse().find(A,e,t)},findLastEntry:function(A,e,t){return this.toKeyedSeq().reverse().findEntry(A,e,t)},findLastKey:function(A,e){return this.toKeyedSeq().reverse().findKey(A,e)},first:function(){return this.find(D)},flatMap:function(A,e){return ve(this,function(A,e,t){var i=We(A);return A.toSeq().map((function(B,n){return i(e.call(t,B,n,A))})).flatten(!0)}(this,A,e))},flatten:function(A){return ve(this,Te(this,A,!0))},fromEntrySeq:function(){return new Ne(this)},get:function(A,e){return this.find((function(e,t){return sA(t,A)}),void 0,e)},getIn:function(A,e){for(var t,i=this,B=Xe(A);!(t=B.next()).done;){var n=t.value;if((i=i&&i.get?i.get(n,C):C)===C)return e}return i},groupBy:function(A,e){return function(A,e,t){var i=r(A),B=(a(A)?Ye():GA()).asMutable();A.__iterate((function(n,s){B.update(e.call(t,n,s,A),(function(A){return(A=A||[]).push(i?[s,n]:n),A}))}));var n=We(A);return B.map((function(e){return ve(A,n(e))}))}(this,A,e)},has:function(A){return this.get(A,C)!==C},hasIn:function(A){return this.getIn(A,C)!==C},isSubset:function(A){return A="function"==typeof A.includes?A:t(A),this.every((function(e){return A.includes(e)}))},isSuperset:function(A){return(A="function"==typeof A.isSubset?A:t(A)).isSubset(this)},keyOf:function(A){return this.findKey((function(e){return sA(e,A)}))},keySeq:function(){return this.toSeq().map(mt).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(A){return this.toKeyedSeq().reverse().keyOf(A)},max:function(A){return be(this,A)},maxBy:function(A,e){return be(this,e,A)},min:function(A){return be(this,A?ft(A):yt)},minBy:function(A,e){return be(this,e?ft(e):yt,A)},rest:function(){return this.slice(1)},skip:function(A){return this.slice(Math.max(0,A))},skipLast:function(A){return ve(this,this.toSeq().reverse().skip(A).reverse())},skipWhile:function(A,e){return ve(this,xe(this,A,e,!0))},skipUntil:function(A,e){return this.skipWhile(Ut(A),e)},sortBy:function(A,e){return ve(this,Se(this,e,A))},take:function(A){return this.slice(0,Math.max(0,A))},takeLast:function(A){return ve(this,this.toSeq().reverse().take(A).reverse())},takeWhile:function(A,e){return ve(this,function(A,e,t){var i=Oe(A);return i.__iterateUncached=function(i,B){var n=this;if(B)return this.cacheResult().__iterate(i,B);var s=0;return A.__iterate((function(A,B,r){return e.call(t,A,B,r)&&++s&&i(A,B,n)})),s},i.__iteratorUncached=function(i,B){var n=this;if(B)return this.cacheResult().__iterator(i,B);var s=A.__iterator(2,B),r=!0;return new k((function(){if(!r)return{value:void 0,done:!0};var A=s.next();if(A.done)return A;var B=A.value,o=B[0],g=B[1];return e.call(t,g,o,n)?2===i?A:x(i,o,g,A):(r=!1,{value:void 0,done:!0})}))},i}(this,A,e))},takeUntil:function(A,e){return this.takeWhile(Ut(A),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(A){if(A.size===1/0)return 0;var e=a(A),t=r(A),i=e?1:0;return function(A,e){return e=CA(e,3432918353),e=CA(e<<15|e>>>-15,461845907),e=CA(e<<13|e>>>-13,5),e=CA((e=(e+3864292196|0)^A)^e>>>16,2246822507),e=lA((e=CA(e^e>>>13,3266489909))^e>>>16)}(A.__iterate(t?e?function(A,e){i=31*i+Ht(IA(A),IA(e))|0}:function(A,e){i=i+Ht(IA(A),IA(e))|0}:e?function(A){i=31*i+IA(A)|0}:function(A){i=i+IA(A)|0}),i)}(this))}});var Ft=t.prototype;Ft[c]=!0,Ft[R]=Ft.values,Ft.__toJS=Ft.toArray,Ft.__toStringMapper=Nt,Ft.inspect=Ft.toSource=function(){return this.toString()},Ft.chain=Ft.flatMap,Ft.contains=Ft.includes,Mt(i,{flip:function(){return ve(this,Ge(this))},mapEntries:function(A,e){var t=this,i=0;return ve(this,this.toSeq().map((function(B,n){return A.call(e,[n,B],i++,t)})).fromEntrySeq())},mapKeys:function(A,e){var t=this;return ve(this,this.toSeq().flip().map((function(i,B){return A.call(e,i,B,t)})).flip())}});var Dt=i.prototype;function mt(A,e){return e}function pt(A,e){return[e,A]}function Ut(A){return function(){return!A.apply(this,arguments)}}function ft(A){return function(){return-A.apply(this,arguments)}}function Nt(A){return"string"==typeof A?JSON.stringify(A):String(A)}function Gt(){return Y(arguments)}function yt(A,e){return Ae?-1:0}function Ht(A,e){return A^e+2654435769+(A<<6)+(A>>2)|0}return Dt[Q]=!0,Dt[R]=Ft.entries,Dt.__toJS=Ft.toObject,Dt.__toStringMapper=function(A,e){return JSON.stringify(e)+": "+Nt(A)},Mt(B,{toKeyedSeq:function(){return new pe(this,!1)},filter:function(A,e){return ve(this,Re(this,A,e,!1))},findIndex:function(A,e){var t=this.findEntry(A,e);return t?t[0]:-1},indexOf:function(A){var e=this.keyOf(A);return void 0===e?-1:e},lastIndexOf:function(A){var e=this.lastKeyOf(A);return void 0===e?-1:e},reverse:function(){return ve(this,He(this,!1))},slice:function(A,e){return ve(this,ke(this,A,e,!1))},splice:function(A,e){var t=arguments.length;if(e=Math.max(0|e,0),0===t||2===t&&!e)return this;A=p(A,A<0?this.count():this.size);var i=this.slice(0,A);return ve(this,1===t?i:i.concat(Y(arguments,2),this.slice(A+e)))},findLastIndex:function(A,e){var t=this.findLastEntry(A,e);return t?t[0]:-1},first:function(){return this.get(0)},flatten:function(A){return ve(this,Te(this,A,!1))},get:function(A,e){return(A=F(this,A))<0||this.size===1/0||void 0!==this.size&&A>this.size?e:this.find((function(e,t){return t===A}),void 0,e)},has:function(A){return(A=F(this,A))>=0&&(void 0!==this.size?this.size===1/0||AA.length)return!1;for(var B=e;B=0&&o(A.charCodeAt(e));e--);return e+1},findWhiteSpaceEnd:function(A,e){for(;e{if(!e.extensionManager)return null;const t=e.extensionManager.getExtensionURLs(),i={};for(const e of A){const A=t[e];"string"==typeof A&&(i[e]=A)}return 0===Object.keys(i).length?null:i},f=function(A){const e=Object.create(null),t=new Set;for(const i in A){if(!A.hasOwnProperty(i))continue;e[i]=D(A[i]);const B=p(A[i].opcode);B&&t.add(B)}for(const A in e){const t=e[A];e[A]=m(t,e)}for(const A in e){const t=e[A];Array.isArray(t)&&[Y,M].indexOf(t[0])<0&&(g.warn("Found an unexpected top level primitive with block ID: ".concat(A,"; deleting it from serialized blocks.")),delete e[A])}return[e,Array.from(t)]},N=function(A){const e=Object.create(null);e.name=A.name;const t=A.broken||A;return e.bitmapResolution=t.bitmapResolution,e.dataFormat=t.dataFormat.toLowerCase(),e.assetId=t.assetId,e.md5ext=t.md5,e.rotationCenterX=t.rotationCenterX,e.rotationCenterY=t.rotationCenterY,e},G=function(A){const e=Object.create(null);e.name=A.name;const t=A.broken||A;return e.assetId=t.assetId,e.dataFormat=t.dataFormat.toLowerCase(),e.format=t.format,e.rate=t.rate,e.sampleCount=t.sampleCount,e.md5ext=t.md5,e},y=A=>"number"==typeof A||"string"==typeof A||"boolean"==typeof A,H=A=>{if(Array.isArray(A)){let e=null;for(let t=0;t=A.costumes.length)&&(g.warn("currentCostume property for target ".concat(A.name," is out of range")),A.currentCostume=c.clamp(A.currentCostume,0,A.costumes.length-1)),t.currentCostume=A.currentCostume,t.costumes=A.costumes.map(N),t.sounds=A.sounds.map(G),A.hasOwnProperty("volume")&&(t.volume=A.volume),A.hasOwnProperty("layerOrder")&&(t.layerOrder=A.layerOrder),t.isStage?(A.hasOwnProperty("tempo")&&(t.tempo=A.tempo),A.hasOwnProperty("videoTransparency")&&(t.videoTransparency=A.videoTransparency),A.hasOwnProperty("videoState")&&(t.videoState=A.videoState),A.hasOwnProperty("textToSpeechLanguage")&&(t.textToSpeechLanguage=A.textToSpeechLanguage)):(t.visible=A.visible,t.x=A.x,t.y=A.y,t.size=A.size,t.direction=A.direction,t.draggable=A.draggable,t.rotationStyle=A.rotationStyle),i.forEach(A=>{e.add(A)}),t},k=function(A){const e=A.map(A=>A.getLayerOrder());return c.reducedSortOrdering(e)},x=function(A,e,t){const i=(e.stageWidth-480)/2,B=(e.stageHeight-360)/2;return A.valueSeq().filter(A=>{const e=p(A.opcode);return!e||!!A.visible&&(t.add(e),!0)}).map(A=>{const e={id:A.id,mode:A.mode,opcode:A.opcode,params:A.params,spriteName:A.spriteName,value:Array.isArray(A.value)?[]:0,width:A.width,height:A.height,x:A.x-i,y:A.y-B,visible:A.visible};return"list"!==A.mode&&(e.sliderMin=A.sliderMin,e.sliderMax=A.sliderMax,e.isDiscrete=A.isDiscrete),e}).toArray()},J=function(A,e,t,i){if(!Array.isArray(A))return A;const B=Object.create(null),s=a();switch(B.id=s,B.next=null,B.parent=e,B.shadow=t,B.inputs=Object.create(null),A[0]){case 4:B.opcode="math_number",B.fields={NUM:{name:"NUM",value:A[1]}},B.topLevel=!1;break;case 5:B.opcode="math_positive_number",B.fields={NUM:{name:"NUM",value:A[1]}},B.topLevel=!1;break;case 6:B.opcode="math_whole_number",B.fields={NUM:{name:"NUM",value:A[1]}},B.topLevel=!1;break;case 7:B.opcode="math_integer",B.fields={NUM:{name:"NUM",value:A[1]}},B.topLevel=!1;break;case 8:B.opcode="math_angle",B.fields={NUM:{name:"NUM",value:A[1]}},B.topLevel=!1;break;case 9:B.opcode="colour_picker",B.fields={COLOUR:{name:"COLOUR",value:A[1]}},B.topLevel=!1;break;case 10:B.opcode="text",B.fields={TEXT:{name:"TEXT",value:A[1]}},B.topLevel=!1;break;case 11:B.opcode="event_broadcast_menu",B.fields={BROADCAST_OPTION:{name:"BROADCAST_OPTION",value:A[1],id:A[2],variableType:n.BROADCAST_MESSAGE_TYPE}},B.topLevel=!1;break;case Y:B.opcode="data_variable",B.fields={VARIABLE:{name:"VARIABLE",value:A[1],id:A[2],variableType:n.SCALAR_TYPE}},A.length>3&&(B.topLevel=!0,B.x=A[3],B.y=A[4]);break;case M:B.opcode="data_listcontents",B.fields={LIST:{name:"LIST",value:A[1],id:A[2],variableType:n.LIST_TYPE}},A.length>3&&(B.topLevel=!0,B.x=A[3],B.y=A[4]);break;default:return g.error("Found unknown primitive type during deserialization: ".concat(JSON.stringify(A))),null}return i[s]=B,s},T=function(A,e,t){const i={};for(const B in A){if(!u.call(A,B))continue;const n=A[B];if(!Array.isArray(n))continue;let s=null,r=null;const o=n[0];1===o?s=r=J(n[1],e,!0,t):2===o?s=J(n[1],e,!1,t):(s=J(n[1],e,!1,t),r=J(n[2],e,!0,t)),i[B]={name:B,block:s,shadow:r}}return i},S=function(A){const e={};for(const t in A){if(!u.call(A,t))continue;const i=A[t];Array.isArray(i)&&(e[t]={name:t,value:i[0]},i.length>1&&(e[t].id=i[1]),"BROADCAST_OPTION"===t?e[t].variableType=n.BROADCAST_MESSAGE_TYPE:"VARIABLE"===t?e[t].variableType=n.SCALAR_TYPE:"LIST"===t&&(e[t].variableType=n.LIST_TYPE))}return e},b=function(A){for(const e in A){if(!Object.prototype.hasOwnProperty.call(A,e))continue;const t=A[e];Array.isArray(t)?(delete A[e],J(t,null,!1,A)):(t.id=e,t.inputs=T(t.inputs,e,A),t.fields=S(t.fields))}return A};A.exports={serialize:function(A,e){let{allowOptimization:t=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=Object.create(null),B=new Set,n=e?[A.getTargetById(e)]:A.targets.filter(A=>A.isOriginal),s=k(n),r=n.map(A=>A.toJSON());A.renderer&&!e&&r.forEach((A,e)=>{A.layerOrder=s[e]});const o=r.map(A=>R(A,B)),g=A.fontManager.serializeJSON();if(e){const e=o[0];B.size&&(e.extensions=Array.from(B));const t=U(B,A);return t&&(e.extensionURLs=t),g&&(e.customFonts=g),o[0]}i.targets=o,i.monitors=x(A.getMonitorState(),A,B),i.extensions=Array.from(B);const a=U(B,A);a&&(i.extensionURLs=a),g&&(i.customFonts=g);const c=Object.create(null);return c.semver="3.0.0",c.vm="0.2.0",A.origin&&(c.origin=A.origin),c.agent="",i.meta=c,t&&w(i),i},deserialize:function(A,e,t,a){const w={extensionIDs:new Set,extensionURLs:new Map};if(A.meta&&A.meta.origin?e.origin=A.meta.origin:e.origin=null,A.extensionURLs)for(const[e,t]of Object.entries(A.extensionURLs))w.extensionURLs.set(e,t);let u;u=A.customFonts?e.fontManager.deserialize(A.customFonts,t,a):Promise.resolve();const d=((a?[A]:A.targets)||[]).map((A,e)=>Object.assign(A,{targetPaneOrder:e})).sort((A,e)=>A.layerOrder-e.layerOrder),Y=A.monitors||[];return u.then(()=>d.map(A=>function(A,e,t){if(!A.hasOwnProperty("name"))return Promise.resolve(null);const i={costumePromises:null,soundPromises:null,soundBank:e.audioEngine&&e.audioEngine.createBank()};return i.costumePromises=(A.costumes||[]).map(A=>{const i={asset:A.asset,assetId:A.assetId,skinId:null,name:A.name,bitmapResolution:A.bitmapResolution,rotationCenterX:A.rotationCenterX,rotationCenterY:A.rotationCenterY},B=A.dataFormat||A.assetType&&A.assetType.runtimeFormat||"png",n=A.hasOwnProperty("md5ext")?A.md5ext:"".concat(A.assetId,".").concat(B);return i.md5=n,i.dataFormat=B,I(i,e,t).then(()=>C(n,i,e))}),i.soundPromises=(A.sounds||[]).map(A=>{const B={assetId:A.assetId,format:A.format,rate:A.rate,sampleCount:A.sampleCount,name:A.name,md5:A.md5ext,dataFormat:A.dataFormat,data:null};return h(B,e,t).then(()=>l(B,e,i.soundBank))}),i}(A,e,t))).then(A=>Promise.resolve(A)).then(A=>Promise.all(d.map((t,r)=>function(A,e,t,r,g){if(!A.hasOwnProperty("name"))return Promise.resolve(null);const a=new i(e),Q=new B(a,e);if(A.hasOwnProperty("name")&&(Q.name=A.name),A.hasOwnProperty("blocks")){b(A.blocks);for(const e in A.blocks){if(!A.blocks.hasOwnProperty(e))continue;const i=A.blocks[e];a.createBlock(i);const B=p(i.opcode);B&&t.extensionIDs.add(B)}}const{costumePromises:E}=g,{soundBank:w,soundPromises:C}=g,l=Q.createClone(A.isStage?o.BACKGROUND_LAYER:o.SPRITE_LAYER);if(A.hasOwnProperty("tempo")&&(l.tempo=A.tempo),A.hasOwnProperty("volume")&&(l.volume=A.volume),A.hasOwnProperty("videoTransparency")&&(l.videoTransparency=A.videoTransparency),A.hasOwnProperty("videoState")&&(l.videoState=A.videoState),A.hasOwnProperty("textToSpeechLanguage")&&(l.textToSpeechLanguage=A.textToSpeechLanguage),A.hasOwnProperty("variables"))for(const t in A.variables){const i=A.variables[t],B=3===i.length&&i[2]&&A.isStage&&e.canAddCloudVariable(),s=new n(t,i[0],n.SCALAR_TYPE,B);B&&e.addCloudVariable(),s.value=i[1],l.variables[s.id]=s}if(A.hasOwnProperty("lists"))for(const e in A.lists){const t=A.lists[e],i=new n(e,t[0],n.LIST_TYPE,!1);i.value=t[1],l.variables[i.id]=i}if(A.hasOwnProperty("broadcasts"))for(const e in A.broadcasts){const t=A.broadcasts[e],i=new n(e,t,n.BROADCAST_MESSAGE_TYPE,!1);l.variables[i.id]=i}if(A.hasOwnProperty("comments"))for(const e in A.comments){const t=A.comments[e],i=new s(e,t.text,t.x,t.y,t.width,t.height,t.minimized);t.blockId&&(i.blockId=t.blockId),l.comments[i.id]=i}return A.hasOwnProperty("x")&&(l.x=A.x),A.hasOwnProperty("y")&&(l.y=A.y),A.hasOwnProperty("direction")&&(l.direction=A.direction),A.hasOwnProperty("size")&&(l.size=A.size),A.hasOwnProperty("visible")&&(l.visible=A.visible),A.hasOwnProperty("currentCostume")&&(l.currentCostume=c.clamp(A.currentCostume,0,A.costumes.length-1)),A.hasOwnProperty("rotationStyle")&&(l.rotationStyle=A.rotationStyle),A.hasOwnProperty("isStage")&&(l.isStage=A.isStage),A.hasOwnProperty("targetPaneOrder")&&(l.targetPaneOrder=A.targetPaneOrder),A.hasOwnProperty("draggable")&&(l.draggable=A.draggable),Promise.all(E).then(A=>{Q.costumes=A}),Promise.all(C).then(A=>{Q.sounds=A,Q.soundBank=w||null}),Promise.all(E.concat(C)).then(()=>l)}(t,e,w,0,A[r])))).then(A=>A.map((A,e)=>(A.layerOrder=e,A)).sort((A,e)=>A.targetPaneOrder-e.targetPaneOrder).map(A=>(delete A.targetPaneOrder,A))).then(A=>function(A){const e=E.getAllVarRefsForTargets(A,!0);A.forEach(A=>{Object.keys(A.variables).forEach(e=>{const t=Q.replaceUnsafeChars(e);t!==e&&(A.variables[e].id=t,A.variables[t]=A.variables[e],delete A.variables[e])})});for(const A in e){const t=Q.replaceUnsafeChars(A);A!==t&&E.updateVariableIdentifiers(e[A],t)}return A}(A)).then(A=>(Y.map(t=>function(A,e,t,i){const B=(e.stageWidth-480)/2,s=(e.stageHeight-360)/2;if(A.x+=B,A.y+=s,A.x=c.clamp(A.x,0,e.stageWidth),A.y=c.clamp(A.y,0,e.stageHeight),A.spriteName){const e=t.filter(e=>e.sprite.name===A.spriteName);e&&e.length>0?A.targetId=e[0].id:g.warn("Tried to deserialize sprite specific monitor ".concat(A.opcode," but could not find sprite ").concat(A.spriteName,"."))}const o=e.monitorBlockInfo[A.opcode];if("data_listcontents"===A.opcode){const e=A.targetId?t.find(e=>e.id===A.targetId):t.find(A=>A.isStage);e&&Object.prototype.hasOwnProperty.call(e.variables,A.id)&&(A.params.LIST=e.variables[A.id].name)}const a={};for(const e in A.params){const t={name:e,value:A.params[e]};a[e]=t}"data_variable"!==A.opcode&&"data_listcontents"!==A.opcode&&o&&o.isSpriteSpecific?A.id=o.getId(A.targetId,a):A.id=Q.replaceUnsafeChars(A.id);const E=e.monitorBlocks._blocks[A.id];if(E)E.isMonitored=A.visible,E.targetId=A.targetId;else{const t={id:A.id,opcode:A.opcode,inputs:{},fields:a,topLevel:!0,next:null,parent:null,shadow:!1,x:0,y:0,isMonitored:A.visible,targetId:A.targetId};if("data_variable"===A.opcode){const e=t.fields.VARIABLE;e.id=A.id,e.variableType=n.SCALAR_TYPE}else if("data_listcontents"===A.opcode){const e=t.fields.LIST;e.id=A.id,e.variableType=n.LIST_TYPE}e.monitorBlocks.createBlock(t);const B=p(t.opcode);B&&i.extensionIDs.add(B)}e.requestAddMonitor(r(A))}(t,e,A,w)),A)).then(A=>({targets:A,extensions:w}))},deserializeBlocks:b,serializeBlocks:f,deserializeStandaloneBlocks:A=>{if((A=JSON.parse(JSON.stringify(A))).extensionURLs){const e=new Map;for(const[t,i]of Object.entries(A.extensionURLs))e.set(t,i);return{blocks:A.blocks,extensionURLs:e}}return{blocks:A,extensionURLs:new Map}},serializeStandaloneBlocks:(A,e)=>{const t=new Set;for(const e of A){const A=p(e.opcode);A&&t.add(A)}const i=U(t,e);return i?{blocks:A,extensionURLs:i}:A},getExtensionIdForOpcode:p}},function(A,e,t){const i=t(11),B=t(41),n=t(403);A.exports=class{constructor(A,e){this._renderer=e,this._id=A,this._rotationCenter=i.v3.create(0,0),this._texture=null,this._uniforms={u_skinSize:[0,0],u_skin:null},this._silhouette=new n,this.private=!1}dispose(){this._id=B.ID_NONE}get id(){return this._id}get rotationCenter(){return this._rotationCenter}get size(){return[0,0]}useNearest(A,e){return!0}calculateRotationCenter(){return[this.size[0]/2,this.size[1]/2]}getTexture(A){return this._emptyImageTexture}getFenceBounds(A,e){return A.getAABB(e)}getUniforms(A){return this._uniforms.u_skin=this.getTexture(A),this._uniforms.u_skinSize=this.size,this._uniforms}emitWasAltered(){this._renderer.skinWasAltered(this)}updateSilhouette(){this._silhouette.unlazy()}_setTexture(A){const e=this._renderer.gl;e.bindTexture(e.TEXTURE_2D,this._texture),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,A),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),this._silhouette.update(A)}setEmptyImageData(){if(this._texture=null,!this._emptyImageData){this._emptyImageData=new ImageData(1,1);const A=this._renderer.gl,e={auto:!0,wrap:A.CLAMP_TO_EDGE,src:this._emptyImageData};this._emptyImageTexture=i.createTexture(A,e)}this._rotationCenter[0]=0,this._rotationCenter[1]=0,this._silhouette.update(this._emptyImageData),this.emitWasAltered()}isTouchingNearest(A){return this._silhouette.isTouchingNearest(A)}isTouchingLinear(A){return this._silhouette.isTouchingLinear(A)}}},function(A,e,t){const i=t(11);class B{constructor(A){this._gl=A,this._shaderCache={};for(const A in B.DRAW_MODE)Object.prototype.hasOwnProperty.call(B.DRAW_MODE,A)&&(this._shaderCache[A]=[])}getShader(A,e){const t=this._shaderCache[A];A===B.DRAW_MODE.silhouette&&(e&=~(B.EFFECT_INFO.color.mask|B.EFFECT_INFO.brightness.mask));let i=t[e];return i||(i=t[e]=this._buildShader(A,e)),i}_buildShader(A,e){const n=B.EFFECTS.length,s=["#define DRAW_MODE_".concat(A)];for(let A=0;AA/200%1,shapeChanges:!1},fisheye:{uniformName:"u_fisheye",mask:2,converter:A=>Math.max(0,(A+100)/100),shapeChanges:!0},whirl:{uniformName:"u_whirl",mask:4,converter:A=>-A*Math.PI/180,shapeChanges:!0},pixelate:{uniformName:"u_pixelate",mask:8,converter:A=>Math.abs(A)/10,shapeChanges:!0},mosaic:{uniformName:"u_mosaic",mask:16,converter:A=>(A=Math.round((Math.abs(A)+10)/10),Math.max(1,Math.min(A,512))),shapeChanges:!0},brightness:{uniformName:"u_brightness",mask:32,converter:A=>Math.max(-100,Math.min(A,100))/100,shapeChanges:!1},ghost:{uniformName:"u_ghost",mask:64,converter:A=>1-Math.max(0,Math.min(A,100))/100,shapeChanges:!1}},B.EFFECTS=Object.keys(B.EFFECT_INFO),B.DRAW_MODE={default:"default",straightAlpha:"straightAlpha",silhouette:"silhouette",colorMask:"colorMask",line:"line",background:"background"},A.exports=B},function(A,e,t){"use strict";(function(A){!function(A){function e(){}function t(){}var i=String.fromCharCode,B={}.toString,n=B.call(A.SharedArrayBuffer),s=B(),r=A.Uint8Array,o=r||Array,g=r?ArrayBuffer:o,a=g.isView||function(A){return A&&"length"in A},c=B.call(g.prototype);g=t.prototype;var Q=A.TextEncoder,E=new(r?Uint16Array:o)(32);e.prototype.decode=function(A){if(!a(A)){var e=B.call(A);if(e!==c&&e!==n&&e!==s)throw TypeError("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");A=r?new o(A):A||[]}for(var t,g,Q,w=e="",C=0,l=0|A.length,I=l-32|0,h=0,u=0,d=0,Y=-1;C>4){case 15:if(2!=(Q=255&A[C=C+1|0])>>6||247>6?u+4|0:24,g=g+256&768;case 13:case 12:h<<=6,h|=(31&g)<<6|63&(Q=255&A[C=C+1|0]),u=u+7|0,C>6&&h>>u&&1114112>h?(g=h,0<=(h=h-65536|0)&&(Y=55296+(h>>10)|0,g=56320+(1023&h)|0,31>d?(E[d]=Y,d=d+1|0,Y=-1):(Q=Y,Y=g,g=Q))):(C=C-(g>>=8)-1|0,g=65533),h=u=0,t=C<=I?32:l-C|0;default:E[d]=g;continue;case 11:case 10:case 9:case 8:}E[d]=65533}if(w+=i(E[0],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],E[16],E[17],E[18],E[19],E[20],E[21],E[22],E[23],E[24],E[25],E[26],E[27],E[28],E[29],E[30],E[31]),32>d&&(w=w.slice(0,d-32|0)),C>>31,Y=-1,w.length=s)i[B]=s;else{if(2047>=s)i[B]=192|s>>6;else{A:{if(55296<=s)if(56319>=s){var g=0|A.charCodeAt(e=e+1|0);if(56320<=g&&57343>=g){if(65535<(s=(s<<10)+g-56613888|0)){i[B]=240|s>>18,i[B=B+1|0]=128|s>>12&63,i[B=B+1|0]=128|s>>6&63,i[B=B+1|0]=128|63&s;continue}break A}s=65533}else 57343>=s&&(s=65533);!n&&e<<1>12,i[B=B+1|0]=128|s>>6&63}i[B=B+1|0]=128|63&s}}return r?i.subarray(0,B):i.slice(0,B)},Q||(A.TextDecoder=e,A.TextEncoder=t)}(""+void 0==typeof A?""+void 0==typeof self?this:self:A)}).call(this,t(9))},function(A,e,t){const i=t(75);A.exports=class extends i{constructor(A,e,t,i){let B=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;super(),this._socket=A.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=i,this._connected=!1,this._characteristicDidChangeCallback=null,this._resetCallback=B,this._discoverTimeoutID=null,this._extensionId=e,this._peripheralOptions=t,this._runtime=A,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(A=>{this._handleRequestError(A)})}connectPeripheral(A){this.sendRemoteRequest("connect",{peripheralId:A}).then(()=>{this._connected=!0,this._runtime.emit(this._runtime.constructor.PERIPHERAL_CONNECTED),this._connectCallback()}).catch(A=>{this._handleRequestError(A)})}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(A,e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const i={serviceId:A,characteristicId:e};return this._characteristicDidChangeCallback=t,this.sendRemoteRequest("startNotifications",i).catch(A=>{this.handleDisconnectError(A)})}read(A,e){let t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const i={serviceId:A,characteristicId:e};return arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&(i.startNotifications=!0),t&&(this._characteristicDidChangeCallback=t),this.sendRemoteRequest("read",i).catch(A=>{this.handleDisconnectError(A)})}write(A,e,t){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,B=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;const n={serviceId:A,characteristicId:e,message:t};return i&&(n.encoding=i),null!==B&&(n.withResponse=B),this.sendRemoteRequest("write",n).catch(A=>{this.handleDisconnectError(A)})}didReceiveCall(A,e){switch(A){case"didDiscoverPeripheral":this._availablePeripherals[e.peripheralId]=e,this._runtime.emit(this._runtime.constructor.PERIPHERAL_LIST_UPDATE,this._availablePeripherals),this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID);break;case"userDidPickPeripheral":this._availablePeripherals[e.peripheralId]=e,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(e.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(A,e,t){const i=t(1);A.exports=function(A){if("string"!=typeof A){if(!Array.isArray(A))return i.error("Unexpected input recieved in replaceUnsafeChars"),A;A=String(A)}return A.replace(/[<>&'"]/g,A=>{switch(A){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return"""}})}},function(A,e,t){const i=t(1),B=[];class n{constructor(A){this.isLoop=!1,this.warpMode=A,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 A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.warpMode;return this.reset(),this.warpMode=Boolean(A),this}static create(A){const e=B.pop();return void 0!==e?(e.warpMode=Boolean(A),e):new n(A)}static release(A){void 0!==A&&B.push(A.reset())}}class s{constructor(A){this.topBlock=A,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(A,e){return"".concat(A.id,"&").concat(e)}getId(){return s.getIdFromTargetAndBlock(this.target,this.topBlock)}pushStack(A){if(this.stack.push(A),this.stack.length>this.stackFrames.length){const A=this.stackFrames[this.stackFrames.length-1];this.stackFrames.push(n.create(void 0!==A&&A.warpMode))}}reuseStackForNextBlock(A){this.stack[this.stack.length-1]=A,this.stackFrames[this.stackFrames.length-1].reuse()}popStack(){return n.release(this.stackFrames.pop()),this.stack.pop()}stopThisScript(){let A=this.peekStack();for(;null!==A;){const e=this.target.blocks.getBlock(A);if(void 0!==e&&"procedures_call"===e.opcode||this.peekStackFrame().waitingReporter)break;this.popStack(),A=this.peekStack()}0===this.stack.length&&(this.requestScriptGlowInFrame=!1,this.status=s.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(A){this.justReported=void 0===A?null:A}initParams(){const A=this.peekStackFrame();null===A.params&&(A.params={})}pushParam(A,e){this.peekStackFrame().params[A]=e}getParam(A){for(let e=this.stackFrames.length-1;e>=0;e--){const t=this.stackFrames[e];if(null!==t.params)return t.params.hasOwnProperty(A)?t.params[A]:null}return null}getAllparams(){return this.peekStackFrame().params}atStackTop(){return this.peekStack()===this.topBlock}goToNextBlock(){const A=this.target.blocks.getNextBlock(this.peekStack());this.reuseStackForNextBlock(A)}isRecursiveCall(A){let e=5;for(let t=this.stackFrames.length-1-1;t>=0;t--){const i=this.target.blocks.getBlock(this.stackFrames[t].op.id);if("procedures_call"===i.opcode&&i.mutation.proccode===A)return!0;if(--e<0)return!1}return!1}tryCompile(){if(!this.blockContainer)return;const A=t(232);this.triedToCompile=!0;const e=!this.stackClick,B=this.topBlock,n=this.blockContainer.getBlock(B)?this.blockContainer:this.target.runtime.flyoutBlocks,s=e&&n.getCachedCompileResult(B);if(s&&!s.success)return;let r;if(s)r=s.value;else try{r=A(this),e&&n.cacheCompileResult(B,r)}catch(A){return i.error("cannot compile script",this.target.getName(),A),e&&n.cacheCompileError(B,A),void this.target.runtime.emitCompileError(this.target,A)}this.procedures={};for(const A of Object.keys(r.procedures))this.procedures[A]=r.procedures[A](this);this.generator=r.startingFunction(this)(),this.executableHat=r.executableHat,this.blockContainer.forceNoGlow||(this.blockGlowInFrame=this.topBlock,this.requestScriptGlowInFrame=!0),this.isCompiled=!0}}A.exports=s},function(A,e,t){const i=t(7),B=t(1),n=function(A,e,t,i){return A.assetId=e.assetId,t.audioEngine?t.audioEngine.decodeSoundPlayer(Object.assign({},A,{data:e.data})).then(e=>{A.soundId=e.id;const B=e.buffer;return A.rate=B.sampleRate,A.sampleCount=B.length,null!==i&&i.addSoundPlayer(e),t.isPackaged&&(A.asset=null),A}):(B.warn("No audio engine present; cannot load sound asset: ",A.md5),Promise.resolve(A))},s=function(A,e,t){const i=A.asset,B=A.assetId,s=A.sampleCount,r=A.rate,o=A.format,g=A.dataFormat;return A.assetId=e.storage.defaultAssetId.Sound,A.asset=e.storage.get(A.assetId),A.md5="".concat(A.assetId,".").concat(A.asset.dataFormat),n(A,A.asset,e,t).then(A=>(A.broken={},A.broken.assetId=B,A.broken.md5="".concat(B,".").concat(g),A.broken.asset=i,A.broken.sampleCount=s,A.broken.rate=r,A.broken.format=o,A.broken.dataFormat=g,A))};A.exports={loadSound:function(A,e,t){if(!e.storage)return B.warn("No storage module present; cannot load sound asset: ",A.md5),Promise.resolve(A);const r=i.splitFirst(A.md5,"."),o=r[0],g=r[1].toLowerCase();return A.dataFormat=g,(A.asset&&Promise.resolve(A.asset)||e.storage.load(e.storage.AssetType.Sound,o,g)).then(i=>(A.asset=i,i?n(A,i,e,t):(B.warn("Failed to find sound data: ",A.md5),s(A,e,t)))).catch(i=>(B.warn("Failed to load sound: ".concat(A.md5," with error: ").concat(i)),s(A,e,t)))},loadSoundFromAsset:n}},function(A,e,t){const i=t(7),B=t(1),n=t(89),{loadSvgString:s,serializeSvgToString:r}=t(65),{parseVectorMetadata:o}=t(111),g=function(A,e,t,i){return new Promise(B=>{let n=A.asset.decodeText();if(void 0===t){const e=o(n);e&&(t=e,A.rotationCenterX=t[0],A.rotationCenterY=t[1])}if(i&&2===i){const t=r(s(n,!0));if(n!==t){n=t;const i=e.storage;A.asset.encodeTextData(t,i.DataFormat.SVG,!0),A.assetId=A.asset.assetId,A.md5="".concat(A.assetId,".").concat(A.dataFormat)}}A.skinId=e.renderer.createSVGSkin(n,t),A.size=e.renderer.getSkinSize(A.skinId),t||(t=e.renderer.getSkinRotationCenter(A.skinId),A.rotationCenterX=t[0],A.rotationCenterY=t[1],A.bitmapResolution=1),e.isPackaged&&(A.asset=null),B(A)})},a=new class{constructor(){this.pool=[],this.clearSoon=null}clear(){this.clearSoon||(this.clearSoon=new Promise(A=>setTimeout(A,1e3)).then(()=>{this.pool.length=0,this.clearSoon=null}))}create(){return this.pool.pop()||document.createElement("canvas")}release(A){this.clear(),this.pool.push(A)}},c=A=>new Promise((e,t)=>{const i=new Image;i.onload=function(){e(i),i.onload=null,i.onerror=null},i.onerror=function(){t(new Error("Costume load failed. Asset could not be read.")),i.onload=null,i.onerror=null},i.src=A}),Q=new n(async A=>{let e;for(let t=0;t<3;t++)try{if("function"==typeof createImageBitmap){const e=await createImageBitmap(new Blob([A.data.buffer],{type:A.assetType.contentType}));if(!e)throw new Error("createImageBitmap resolved with ".concat(e));return e}return await c(A.encodeDataURI())}catch(A){e||(e=A),B.warn(A),await new Promise(A=>setTimeout(A,2e3*Math.random()))}throw e},25),E=function(A,e,t){return function(A,e,t){return A&&A.asset?e.v2BitmapAdapter?Promise.all([A.asset,A.textLayerAsset].map(A=>A?Q.do(A):null)).then(i=>{let[B,n]=i;if(!B)throw new Error("Loading bitmap costume base failed.");const s=1===A.bitmapResolution?2:1;let r,o;if(n){o=a.create(),o.width=B.width,o.height=B.height;const A=o.getContext("2d");A.drawImage(B,0,0),A.drawImage(n,0,0),r=o}else r=B;return 1!==s&&(r=e.v2BitmapAdapter.resize(r,r.width*s,r.height*s),o&&a.release(o)),r.reusable=!1,t&&(t[0]=t[0]*s,t[1]=t[1]*s,A.rotationCenterX=t[0],A.rotationCenterY=t[1]),A.bitmapResolution=2,delete A.textLayerMD5,delete A.textLayerAsset,{image:r,rotationCenter:t,assetMatchesBase:1===s&&!n}}).finally(()=>{delete A.textLayerMD5,delete A.textLayerAsset}):Promise.reject("No V2 Bitmap adapter present."):Promise.reject("Costume load failed. Assets were missing.")}(A,e,t).then(t=>(t.assetMatchesBase||function(t){if(!e.v2BitmapAdapter)return Promise.reject("No V2 Bitmap adapter present.");const i=e.storage;A.asset=i.createAsset(i.AssetType.ImageBitmap,i.DataFormat.PNG,e.v2BitmapAdapter.convertDataURIToBinary(t),null,!0),A.dataFormat=i.DataFormat.PNG,A.assetId=A.asset.assetId,A.md5="".concat(A.assetId,".").concat(A.dataFormat)}((A=>{if(A instanceof HTMLCanvasElement)return A.toDataURL();const e=a.create();e.width=A.width,e.height=A.height;e.getContext("2d").drawImage(A,0,0);const t=e.toDataURL();return a.release(e),t})(t.image)),t)).then(t=>{let i,{image:B,rotationCenter:n}=t;n&&(i=[n[0]/2,n[1]/2]),A.skinId=e.renderer.createBitmapSkin(B,A.bitmapResolution,i);const s=e.renderer.getSkinSize(A.skinId);return A.size=[2*s[0],2*s[1]],n||(n=e.renderer.getSkinRotationCenter(A.skinId),A.rotationCenterX=2*n[0],A.rotationCenterY=2*n[1],A.bitmapResolution=2),e.isPackaged&&(A.asset=null),A})},w=function(A,e){const t=A.asset,i=A.assetId,B=A.rotationCenterX,n=A.rotationCenterY,s=A.bitmapResolution,r=A.dataFormat,o=e.storage.AssetType,a=A.dataFormat===o.ImageVector.runtimeFormat;A.assetId=a?e.storage.defaultAssetId.ImageVector:e.storage.defaultAssetId.ImageBitmap,A.asset=e.storage.get(A.assetId),A.md5="".concat(A.assetId,".").concat(A.asset.dataFormat);return(a?g(A,e):E(A,e)).then(A=>(A.broken={},A.broken.assetId=i,A.broken.md5="".concat(i,".").concat(r),A.broken.asset=t,A.broken.dataFormat=r,A.broken.rotationCenterX=B,A.broken.rotationCenterY=n,A.broken.bitmapResolution=s,A))},C=function(A,e,t){A.assetId=A.asset.assetId;if(!e.renderer)return B.warn("No rendering module present; cannot load costume: ",A.name),Promise.resolve(A);const i=e.storage.AssetType;let n;return"number"!=typeof A.rotationCenterX||isNaN(A.rotationCenterX)||"number"!=typeof A.rotationCenterY||isNaN(A.rotationCenterY)||(n=[A.rotationCenterX,A.rotationCenterY]),A.asset.assetType.runtimeFormat===i.ImageVector.runtimeFormat?g(A,e,n,t).catch(t=>(B.warn("Error loading vector image: ".concat(t)),w(A,e))):E(A,e,n).catch(t=>(B.warn("Error loading bitmap image: ".concat(t)),w(A,e)))};A.exports={loadCostume:function(A,e,t,n){const s=i.splitFirst(A,"."),r=s[0],o=s[1].toLowerCase();if(e.dataFormat=o,e.asset)return C(e,t,n);if(!t.storage)return B.warn("No storage module present; cannot load costume asset: ",A),Promise.resolve(e);if(!t.storage.defaultAssetId)return B.warn("No default assets found"),Promise.resolve(e);const g=t.storage.AssetType,a="svg"===o?g.ImageVector:g.ImageBitmap,c=t.storage.load(a,r,o);let Q;return Q=e.textLayerMD5?t.storage.load(g.ImageBitmap,e.textLayerMD5,"png"):Promise.resolve(null),Promise.all([c,Q]).then(A=>A[0]?(e.asset=A[0],A[1]&&(e.textLayerAsset=A[1]),C(e,t,n)):w(e,t)).catch(A=>(B.warn("Error loading costume: ",A),w(e,t)))},loadCostumeFromAsset:C}},function(A,e,t){ + */!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__(393),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(A){return"[object Array]"===Object.prototype.toString.call(A)}),!ARRAY_BUFFER||!root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(A){return"object"==typeof A&&A.buffer&&A.buffer.constructor===ArrayBuffer});var createOutputMethod=function(A){return function(e){return new Md5(!0).update(e)[A]()}},createMethod=function(){var A=createOutputMethod("hex");NODE_JS&&(A=nodeWrap(A)),A.create=function(){return new Md5},A.update=function(e){return A.create().update(e)};for(var e=0;e>2]|=A[n]<>6,o[B++]=128|63&i):i<55296||i>=57344?(o[B++]=224|i>>12,o[B++]=128|i>>6&63,o[B++]=128|63&i):(i=65536+((1023&i)<<10|1023&A.charCodeAt(++n)),o[B++]=240|i>>18,o[B++]=128|i>>12&63,o[B++]=128|i>>6&63,o[B++]=128|63&i);else for(B=this.start;n>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(r[B>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=64?(this.start=B-64,this.hash(),this.hashed=!0):this.start=B}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 A=this.blocks,e=this.lastByteIndex;A[e>>2]|=EXTRA[3&e],e>=56&&(this.hashed||this.hash(),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),A[14]=this.bytes<<3,A[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var A,e,t,i,B,n,s=this.blocks;this.first?e=((e=((A=((A=s[0]-680876937)<<7|A>>>25)-271733879<<0)^(t=((t=(-271733879^(i=((i=(-1732584194^2004318071&A)+s[1]-117830708)<<12|i>>>20)+A<<0)&(-271733879^A))+s[2]-1126478375)<<17|t>>>15)+i<<0)&(i^A))+s[3]-1316259209)<<22|e>>>10)+t<<0:(A=this.h0,e=this.h1,t=this.h2,e=((e+=((A=((A+=((i=this.h3)^e&(t^i))+s[0]-680876936)<<7|A>>>25)+e<<0)^(t=((t+=(e^(i=((i+=(t^A&(e^t))+s[1]-389564586)<<12|i>>>20)+A<<0)&(A^e))+s[2]+606105819)<<17|t>>>15)+i<<0)&(i^A))+s[3]-1044525330)<<22|e>>>10)+t<<0),e=((e+=((A=((A+=(i^e&(t^i))+s[4]-176418897)<<7|A>>>25)+e<<0)^(t=((t+=(e^(i=((i+=(t^A&(e^t))+s[5]+1200080426)<<12|i>>>20)+A<<0)&(A^e))+s[6]-1473231341)<<17|t>>>15)+i<<0)&(i^A))+s[7]-45705983)<<22|e>>>10)+t<<0,e=((e+=((A=((A+=(i^e&(t^i))+s[8]+1770035416)<<7|A>>>25)+e<<0)^(t=((t+=(e^(i=((i+=(t^A&(e^t))+s[9]-1958414417)<<12|i>>>20)+A<<0)&(A^e))+s[10]-42063)<<17|t>>>15)+i<<0)&(i^A))+s[11]-1990404162)<<22|e>>>10)+t<<0,e=((e+=((A=((A+=(i^e&(t^i))+s[12]+1804603682)<<7|A>>>25)+e<<0)^(t=((t+=(e^(i=((i+=(t^A&(e^t))+s[13]-40341101)<<12|i>>>20)+A<<0)&(A^e))+s[14]-1502002290)<<17|t>>>15)+i<<0)&(i^A))+s[15]+1236535329)<<22|e>>>10)+t<<0,e=((e+=((i=((i+=(e^t&((A=((A+=(t^i&(e^t))+s[1]-165796510)<<5|A>>>27)+e<<0)^e))+s[6]-1069501632)<<9|i>>>23)+A<<0)^A&((t=((t+=(A^e&(i^A))+s[11]+643717713)<<14|t>>>18)+i<<0)^i))+s[0]-373897302)<<20|e>>>12)+t<<0,e=((e+=((i=((i+=(e^t&((A=((A+=(t^i&(e^t))+s[5]-701558691)<<5|A>>>27)+e<<0)^e))+s[10]+38016083)<<9|i>>>23)+A<<0)^A&((t=((t+=(A^e&(i^A))+s[15]-660478335)<<14|t>>>18)+i<<0)^i))+s[4]-405537848)<<20|e>>>12)+t<<0,e=((e+=((i=((i+=(e^t&((A=((A+=(t^i&(e^t))+s[9]+568446438)<<5|A>>>27)+e<<0)^e))+s[14]-1019803690)<<9|i>>>23)+A<<0)^A&((t=((t+=(A^e&(i^A))+s[3]-187363961)<<14|t>>>18)+i<<0)^i))+s[8]+1163531501)<<20|e>>>12)+t<<0,e=((e+=((i=((i+=(e^t&((A=((A+=(t^i&(e^t))+s[13]-1444681467)<<5|A>>>27)+e<<0)^e))+s[2]-51403784)<<9|i>>>23)+A<<0)^A&((t=((t+=(A^e&(i^A))+s[7]+1735328473)<<14|t>>>18)+i<<0)^i))+s[12]-1926607734)<<20|e>>>12)+t<<0,e=((e+=((n=(i=((i+=((B=e^t)^(A=((A+=(B^i)+s[5]-378558)<<4|A>>>28)+e<<0))+s[8]-2022574463)<<11|i>>>21)+A<<0)^A)^(t=((t+=(n^e)+s[11]+1839030562)<<16|t>>>16)+i<<0))+s[14]-35309556)<<23|e>>>9)+t<<0,e=((e+=((n=(i=((i+=((B=e^t)^(A=((A+=(B^i)+s[1]-1530992060)<<4|A>>>28)+e<<0))+s[4]+1272893353)<<11|i>>>21)+A<<0)^A)^(t=((t+=(n^e)+s[7]-155497632)<<16|t>>>16)+i<<0))+s[10]-1094730640)<<23|e>>>9)+t<<0,e=((e+=((n=(i=((i+=((B=e^t)^(A=((A+=(B^i)+s[13]+681279174)<<4|A>>>28)+e<<0))+s[0]-358537222)<<11|i>>>21)+A<<0)^A)^(t=((t+=(n^e)+s[3]-722521979)<<16|t>>>16)+i<<0))+s[6]+76029189)<<23|e>>>9)+t<<0,e=((e+=((n=(i=((i+=((B=e^t)^(A=((A+=(B^i)+s[9]-640364487)<<4|A>>>28)+e<<0))+s[12]-421815835)<<11|i>>>21)+A<<0)^A)^(t=((t+=(n^e)+s[15]+530742520)<<16|t>>>16)+i<<0))+s[2]-995338651)<<23|e>>>9)+t<<0,e=((e+=((i=((i+=(e^((A=((A+=(t^(e|~i))+s[0]-198630844)<<6|A>>>26)+e<<0)|~t))+s[7]+1126891415)<<10|i>>>22)+A<<0)^((t=((t+=(A^(i|~e))+s[14]-1416354905)<<15|t>>>17)+i<<0)|~A))+s[5]-57434055)<<21|e>>>11)+t<<0,e=((e+=((i=((i+=(e^((A=((A+=(t^(e|~i))+s[12]+1700485571)<<6|A>>>26)+e<<0)|~t))+s[3]-1894986606)<<10|i>>>22)+A<<0)^((t=((t+=(A^(i|~e))+s[10]-1051523)<<15|t>>>17)+i<<0)|~A))+s[1]-2054922799)<<21|e>>>11)+t<<0,e=((e+=((i=((i+=(e^((A=((A+=(t^(e|~i))+s[8]+1873313359)<<6|A>>>26)+e<<0)|~t))+s[15]-30611744)<<10|i>>>22)+A<<0)^((t=((t+=(A^(i|~e))+s[6]-1560198380)<<15|t>>>17)+i<<0)|~A))+s[13]+1309151649)<<21|e>>>11)+t<<0,e=((e+=((i=((i+=(e^((A=((A+=(t^(e|~i))+s[4]-145523070)<<6|A>>>26)+e<<0)|~t))+s[11]-1120210379)<<10|i>>>22)+A<<0)^((t=((t+=(A^(i|~e))+s[2]+718787259)<<15|t>>>17)+i<<0)|~A))+s[9]-343485551)<<21|e>>>11)+t<<0,this.first?(this.h0=A+1732584193<<0,this.h1=e-271733879<<0,this.h2=t-1732584194<<0,this.h3=i+271733878<<0,this.first=!1):(this.h0=this.h0+A<<0,this.h1=this.h1+e<<0,this.h2=this.h2+t<<0,this.h3=this.h3+i<<0)},Md5.prototype.hex=function(){this.finalize();var A=this.h0,e=this.h1,t=this.h2,i=this.h3;return HEX_CHARS[A>>4&15]+HEX_CHARS[15&A]+HEX_CHARS[A>>12&15]+HEX_CHARS[A>>8&15]+HEX_CHARS[A>>20&15]+HEX_CHARS[A>>16&15]+HEX_CHARS[A>>28&15]+HEX_CHARS[A>>24&15]+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[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(){this.finalize();var A=this.h0,e=this.h1,t=this.h2,i=this.h3;return[255&A,A>>8&255,A>>16&255,A>>24&255,255&e,e>>8&255,e>>16&255,e>>24&255,255&t,t>>8&255,t>>16&255,t>>24&255,255&i,i>>8&255,i>>16&255,i>>24&255]},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var A=new ArrayBuffer(16),e=new Uint32Array(A);return e[0]=this.h0,e[1]=this.h1,e[2]=this.h2,e[3]=this.h3,A},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var A,e,t,i="",B=this.array(),n=0;n<15;)A=B[n++],e=B[n++],t=B[n++],i+=BASE64_ENCODE_CHAR[A>>>2]+BASE64_ENCODE_CHAR[63&(A<<4|e>>>4)]+BASE64_ENCODE_CHAR[63&(e<<2|t>>>6)]+BASE64_ENCODE_CHAR[63&t];return A=B[n],i+=BASE64_ENCODE_CHAR[A>>>2]+BASE64_ENCODE_CHAR[A<<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__(43),__webpack_require__(9))},function(A,e,t){(function(e,t,i,B){A.exports=function A(e,t,i){function B(s,r){if(!t[s]){if(!e[s]){if(n)return n(s,!0);var o=new Error("Cannot find module '"+s+"'");throw o.code="MODULE_NOT_FOUND",o}var g=t[s]={exports:{}};e[s][0].call(g.exports,(function(A){return B(e[s][1][A]||A)}),g,g.exports,A,e,t,i)}return t[s].exports}for(var n=!1,s=0;s>2,r=(3&e)<<4|t>>4,o=1>6:64,g=2>4,t=(15&s)<<4|(r=n.indexOf(A.charAt(g++)))>>2,i=(3&r)<<6|(o=n.indexOf(A.charAt(g++))),Q[a++]=e,64!==r&&(Q[a++]=t),64!==o&&(Q[a++]=i);return Q}},{"./support":30,"./utils":32}],2:[function(A,e,t){"use strict";var i=A("./external"),B=A("./stream/DataWorker"),n=A("./stream/Crc32Probe"),s=A("./stream/DataLengthProbe");function r(A,e,t,i,B){this.compressedSize=A,this.uncompressedSize=e,this.crc32=t,this.compression=i,this.compressedContent=B}r.prototype={getContentWorker:function(){var A=new B(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),e=this;return A.on("end",(function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),A},getCompressedWorker:function(){return new B(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},r.createWorkerFrom=function(A,e,t){return A.pipe(new n).pipe(new s("uncompressedSize")).pipe(e.compressWorker(t)).pipe(new s("compressedSize")).withStreamInfo("compression",e)},e.exports=r},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(A,e,t){"use strict";var i=A("./stream/GenericWorker");t.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},t.DEFLATE=A("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(A,e,t){"use strict";var i=A("./utils"),B=function(){for(var A,e=[],t=0;t<256;t++){A=t;for(var i=0;i<8;i++)A=1&A?3988292384^A>>>1:A>>>1;e[t]=A}return e}();e.exports=function(A,e){return void 0!==A&&A.length?"string"!==i.getTypeOf(A)?function(A,e,t,i){var n=B,s=0+t;A^=-1;for(var r=0;r>>8^n[255&(A^e[r])];return-1^A}(0|e,A,A.length):function(A,e,t,i){var n=B,s=0+t;A^=-1;for(var r=0;r>>8^n[255&(A^e.charCodeAt(r))];return-1^A}(0|e,A,A.length):0}},{"./utils":32}],5:[function(A,e,t){"use strict";t.base64=!1,t.binary=!1,t.dir=!1,t.createFolders=!0,t.date=null,t.compression=null,t.compressionOptions=null,t.comment=null,t.unixPermissions=null,t.dosPermissions=null},{}],6:[function(A,e,t){"use strict";var i;i="undefined"!=typeof Promise?Promise:A("lie"),e.exports={Promise:i}},{lie:37}],7:[function(A,e,t){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,B=A("pako"),n=A("./utils"),s=A("./stream/GenericWorker"),r=i?"uint8array":"array";function o(A,e){s.call(this,"FlateWorker/"+A),this._pako=null,this._pakoAction=A,this._pakoOptions=e,this.meta={}}t.magic="\b\0",n.inherits(o,s),o.prototype.processChunk=function(A){this.meta=A.meta,null===this._pako&&this._createPako(),this._pako.push(n.transformTo(r,A.data),!1)},o.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},o.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},o.prototype._createPako=function(){this._pako=new B[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var A=this;this._pako.onData=function(e){A.push({data:e,meta:A.meta})}},t.compressWorker=function(A){return new o("Deflate",A)},t.uncompressWorker=function(){return new o("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(A,e,t){"use strict";function i(A,e){var t,i="";for(t=0;t>>=8;return i}function B(A,e,t,B,s,a){var c,Q,E=A.file,w=A.compression,C=a!==r.utf8encode,l=n.transformTo("string",a(E.name)),I=n.transformTo("string",r.utf8encode(E.name)),h=E.comment,u=n.transformTo("string",a(h)),d=n.transformTo("string",r.utf8encode(h)),Y=I.length!==E.name.length,M=d.length!==h.length,F="",D="",m="",p=E.dir,U=E.date,f={crc32:0,compressedSize:0,uncompressedSize:0};e&&!t||(f.crc32=A.crc32,f.compressedSize=A.compressedSize,f.uncompressedSize=A.uncompressedSize);var N=0;e&&(N|=8),C||!Y&&!M||(N|=2048);var G=0,y=0;p&&(G|=16),"UNIX"===s?(y=798,G|=function(A,e){var t=A;return A||(t=e?16893:33204),(65535&t)<<16}(E.unixPermissions,p)):(y=20,G|=function(A){return 63&(A||0)}(E.dosPermissions)),c=U.getUTCHours(),c<<=6,c|=U.getUTCMinutes(),c<<=5,c|=U.getUTCSeconds()/2,Q=U.getUTCFullYear()-1980,Q<<=4,Q|=U.getUTCMonth()+1,Q<<=5,Q|=U.getUTCDate(),Y&&(D=i(1,1)+i(o(l),4)+I,F+="up"+i(D.length,2)+D),M&&(m=i(1,1)+i(o(u),4)+d,F+="uc"+i(m.length,2)+m);var H="";return H+="\n\0",H+=i(N,2),H+=w.magic,H+=i(c,2),H+=i(Q,2),H+=i(f.crc32,4),H+=i(f.compressedSize,4),H+=i(f.uncompressedSize,4),H+=i(l.length,2),H+=i(F.length,2),{fileRecord:g.LOCAL_FILE_HEADER+H+l+F,dirRecord:g.CENTRAL_FILE_HEADER+i(y,2)+H+i(u.length,2)+"\0\0\0\0"+i(G,4)+i(B,4)+l+F+u}}var n=A("../utils"),s=A("../stream/GenericWorker"),r=A("../utf8"),o=A("../crc32"),g=A("../signature");function a(A,e,t,i){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=t,this.encodeFileName=i,this.streamFiles=A,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(a,s),a.prototype.push=function(A){var e=A.meta.percent||0,t=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(A):(this.bytesWritten+=A.data.length,s.prototype.push.call(this,{data:A.data,meta:{currentFile:this.currentFile,percent:t?(e+100*(t-i-1))/t:100}}))},a.prototype.openedSource=function(A){this.currentSourceOffset=this.bytesWritten,this.currentFile=A.file.name;var e=this.streamFiles&&!A.file.dir;if(e){var t=B(A,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:t.fileRecord,meta:{percent:0}})}else this.accumulate=!0},a.prototype.closedSource=function(A){this.accumulate=!1;var e=this.streamFiles&&!A.file.dir,t=B(A,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(t.dirRecord),e)this.push({data:function(A){return g.DATA_DESCRIPTOR+i(A.crc32,4)+i(A.compressedSize,4)+i(A.uncompressedSize,4)}(A),meta:{percent:100}});else for(this.push({data:t.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},a.prototype.flush=function(){for(var A=this.bytesWritten,e=0;e=this.index;e--)t=(t<<8)+this.byteAt(e);return this.index+=A,t},readString:function(A){return i.transformTo("string",this.readData(A))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var A=this.readInt(4);return new Date(Date.UTC(1980+(A>>25&127),(A>>21&15)-1,A>>16&31,A>>11&31,A>>5&63,(31&A)<<1))}},e.exports=B},{"../utils":32}],19:[function(A,e,t){"use strict";var i=A("./Uint8ArrayReader");function B(A){i.call(this,A)}A("../utils").inherits(B,i),B.prototype.readData=function(A){this.checkOffset(A);var e=this.data.slice(this.zero+this.index,this.zero+this.index+A);return this.index+=A,e},e.exports=B},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(A,e,t){"use strict";var i=A("./DataReader");function B(A){i.call(this,A)}A("../utils").inherits(B,i),B.prototype.byteAt=function(A){return this.data.charCodeAt(this.zero+A)},B.prototype.lastIndexOfSignature=function(A){return this.data.lastIndexOf(A)-this.zero},B.prototype.readAndCheckSignature=function(A){return A===this.readData(4)},B.prototype.readData=function(A){this.checkOffset(A);var e=this.data.slice(this.zero+this.index,this.zero+this.index+A);return this.index+=A,e},e.exports=B},{"../utils":32,"./DataReader":18}],21:[function(A,e,t){"use strict";var i=A("./ArrayReader");function B(A){i.call(this,A)}A("../utils").inherits(B,i),B.prototype.readData=function(A){if(this.checkOffset(A),0===A)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+A);return this.index+=A,e},e.exports=B},{"../utils":32,"./ArrayReader":17}],22:[function(A,e,t){"use strict";var i=A("../utils"),B=A("../support"),n=A("./ArrayReader"),s=A("./StringReader"),r=A("./NodeBufferReader"),o=A("./Uint8ArrayReader");e.exports=function(A){var e=i.getTypeOf(A);return i.checkSupport(e),"string"!==e||B.uint8array?"nodebuffer"===e?new r(A):B.uint8array?new o(i.transformTo("uint8array",A)):new n(i.transformTo("array",A)):new s(A)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(A,e,t){"use strict";t.LOCAL_FILE_HEADER="PK",t.CENTRAL_FILE_HEADER="PK",t.CENTRAL_DIRECTORY_END="PK",t.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",t.ZIP64_CENTRAL_DIRECTORY_END="PK",t.DATA_DESCRIPTOR="PK\b"},{}],24:[function(A,e,t){"use strict";var i=A("./GenericWorker"),B=A("../utils");function n(A){i.call(this,"ConvertWorker to "+A),this.destType=A}B.inherits(n,i),n.prototype.processChunk=function(A){this.push({data:B.transformTo(this.destType,A.data),meta:A.meta})},e.exports=n},{"../utils":32,"./GenericWorker":28}],25:[function(A,e,t){"use strict";var i=A("./GenericWorker"),B=A("../crc32");function n(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}A("../utils").inherits(n,i),n.prototype.processChunk=function(A){this.streamInfo.crc32=B(A.data,this.streamInfo.crc32||0),this.push(A)},e.exports=n},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(A,e,t){"use strict";var i=A("../utils"),B=A("./GenericWorker");function n(A){B.call(this,"DataLengthProbe for "+A),this.propName=A,this.withStreamInfo(A,0)}i.inherits(n,B),n.prototype.processChunk=function(A){if(A){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+A.data.length}B.prototype.processChunk.call(this,A)},e.exports=n},{"../utils":32,"./GenericWorker":28}],27:[function(A,e,t){"use strict";var i=A("../utils"),B=A("./GenericWorker");function n(A){B.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,A.then((function(A){e.dataIsReady=!0,e.data=A,e.max=A&&A.length||0,e.type=i.getTypeOf(A),e.isPaused||e._tickAndRepeat()}),(function(A){e.error(A)}))}i.inherits(n,B),n.prototype.cleanUp=function(){B.prototype.cleanUp.call(this),this.data=null},n.prototype.resume=function(){return!!B.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},n.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},n.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var A=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":A=this.data.substring(this.index,e);break;case"uint8array":A=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":A=this.data.slice(this.index,e)}return this.index=e,this.push({data:A,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=n},{"../utils":32,"./GenericWorker":28}],28:[function(A,e,t){"use strict";function i(A){this.name=A||"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}i.prototype={push:function(A){this.emit("data",A)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(A){this.emit("error",A)}return!0},error:function(A){return!this.isFinished&&(this.isPaused?this.generatedError=A:(this.isFinished=!0,this.emit("error",A),this.previous&&this.previous.error(A),this.cleanUp()),!0)},on:function(A,e){return this._listeners[A].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(A,e){if(this._listeners[A])for(var t=0;t "+A:A}},e.exports=i},{}],29:[function(A,t,i){"use strict";var B=A("../utils"),n=A("./ConvertWorker"),s=A("./GenericWorker"),r=A("../base64"),o=A("../support"),g=A("../external"),a=null;if(o.nodestream)try{a=A("../nodejs/NodejsStreamOutputAdapter")}catch(A){}function c(A,e,t){var i=e;switch(e){case"blob":case"arraybuffer":i="uint8array";break;case"base64":i="string"}try{this._internalType=i,this._outputType=e,this._mimeType=t,B.checkSupport(i),this._worker=A.pipe(new n(i)),A.lock()}catch(A){this._worker=new s("error"),this._worker.error(A)}}c.prototype={accumulate:function(A){return function(A,t){return new g.Promise((function(i,n){var s=[],o=A._internalType,g=A._outputType,a=A._mimeType;A.on("data",(function(A,e){s.push(A),t&&t(e)})).on("error",(function(A){s=[],n(A)})).on("end",(function(){try{var A=function(A,e,t){switch(A){case"blob":return B.newBlob(B.transformTo("arraybuffer",e),t);case"base64":return r.encode(e);default:return B.transformTo(A,e)}}(g,function(A,t){var i,B=0,n=null,s=0;for(i=0;i>>6:(t<65536?e[s++]=224|t>>>12:(e[s++]=240|t>>>18,e[s++]=128|t>>>12&63),e[s++]=128|t>>>6&63),e[s++]=128|63&t);return e}(A)},t.utf8decode=function(A){return B.nodebuffer?i.transformTo("nodebuffer",A).toString("utf-8"):function(A){var e,t,B,n,s=A.length,o=new Array(2*s);for(e=t=0;e>10&1023,o[t++]=56320|1023&B)}return o.length!==t&&(o.subarray?o=o.subarray(0,t):o.length=t),i.applyFromCharCode(o)}(A=i.transformTo(B.uint8array?"uint8array":"array",A))},i.inherits(g,s),g.prototype.processChunk=function(A){var e=i.transformTo(B.uint8array?"uint8array":"array",A.data);if(this.leftOver&&this.leftOver.length){if(B.uint8array){var n=e;(e=new Uint8Array(n.length+this.leftOver.length)).set(this.leftOver,0),e.set(n,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var s=function(A,e){var t;for((e=e||A.length)>A.length&&(e=A.length),t=e-1;0<=t&&128==(192&A[t]);)t--;return t<0||0===t?e:t+r[A[t]]>e?t:e}(e),o=e;s!==e.length&&(B.uint8array?(o=e.subarray(0,s),this.leftOver=e.subarray(s,e.length)):(o=e.slice(0,s),this.leftOver=e.slice(s,e.length))),this.push({data:t.utf8decode(o),meta:A.meta})},g.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=g,i.inherits(a,s),a.prototype.processChunk=function(A){this.push({data:t.utf8encode(A.data),meta:A.meta})},t.Utf8EncodeWorker=a},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(A,e,i){"use strict";var B=A("./support"),n=A("./base64"),s=A("./nodejsUtils"),r=A("./external");function o(A){return A}function g(A,e){for(var t=0;t>8;this.dir=!!(16&this.externalFileAttributes),0==A&&(this.dosPermissions=63&this.externalFileAttributes),3==A&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var A=i(this.extraFields[1].value);this.uncompressedSize===B.MAX_VALUE_32BITS&&(this.uncompressedSize=A.readInt(8)),this.compressedSize===B.MAX_VALUE_32BITS&&(this.compressedSize=A.readInt(8)),this.localHeaderOffset===B.MAX_VALUE_32BITS&&(this.localHeaderOffset=A.readInt(8)),this.diskNumberStart===B.MAX_VALUE_32BITS&&(this.diskNumberStart=A.readInt(4))}},readExtraFields:function(A){var e,t,i,B=A.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});A.index+4>>6:(t<65536?e[s++]=224|t>>>12:(e[s++]=240|t>>>18,e[s++]=128|t>>>12&63),e[s++]=128|t>>>6&63),e[s++]=128|63&t);return e},t.buf2binstring=function(A){return o(A,A.length)},t.binstring2buf=function(A){for(var e=new i.Buf8(A.length),t=0,B=e.length;t>10&1023,g[i++]=56320|1023&B)}return o(g,i)},t.utf8border=function(A,e){var t;for((e=e||A.length)>A.length&&(e=A.length),t=e-1;0<=t&&128==(192&A[t]);)t--;return t<0||0===t?e:t+s[A[t]]>e?t:e}},{"./common":41}],43:[function(A,e,t){"use strict";e.exports=function(A,e,t,i){for(var B=65535&A|0,n=A>>>16&65535|0,s=0;0!==t;){for(t-=s=2e3>>1:A>>>1;e[t]=A}return e}();e.exports=function(A,e,t,B){var n=i,s=B+t;A^=-1;for(var r=B;r>>8^n[255&(A^e[r])];return-1^A}},{}],46:[function(A,e,t){"use strict";var i,B=A("../utils/common"),n=A("./trees"),s=A("./adler32"),r=A("./crc32"),o=A("./messages"),g=-2,a=258,c=262,Q=113;function E(A,e){return A.msg=o[e],e}function w(A){return(A<<1)-(4A.avail_out&&(t=A.avail_out),0!==t&&(B.arraySet(A.output,e.pending_buf,e.pending_out,t,A.next_out),A.next_out+=t,e.pending_out+=t,A.total_out+=t,A.avail_out-=t,e.pending-=t,0===e.pending&&(e.pending_out=0))}function I(A,e){n._tr_flush_block(A,0<=A.block_start?A.block_start:-1,A.strstart-A.block_start,e),A.block_start=A.strstart,l(A.strm)}function h(A,e){A.pending_buf[A.pending++]=e}function u(A,e){A.pending_buf[A.pending++]=e>>>8&255,A.pending_buf[A.pending++]=255&e}function d(A,e){var t,i,B=A.max_chain_length,n=A.strstart,s=A.prev_length,r=A.nice_match,o=A.strstart>A.w_size-c?A.strstart-(A.w_size-c):0,g=A.window,Q=A.w_mask,E=A.prev,w=A.strstart+a,C=g[n+s-1],l=g[n+s];A.prev_length>=A.good_match&&(B>>=2),r>A.lookahead&&(r=A.lookahead);do{if(g[(t=e)+s]===l&&g[t+s-1]===C&&g[t]===g[n]&&g[++t]===g[n+1]){n+=2,t++;do{}while(g[++n]===g[++t]&&g[++n]===g[++t]&&g[++n]===g[++t]&&g[++n]===g[++t]&&g[++n]===g[++t]&&g[++n]===g[++t]&&g[++n]===g[++t]&&g[++n]===g[++t]&&no&&0!=--B);return s<=A.lookahead?s:A.lookahead}function Y(A){var e,t,i,n,o,g,a,Q,E,w,C=A.w_size;do{if(n=A.window_size-A.lookahead-A.strstart,A.strstart>=C+(C-c)){for(B.arraySet(A.window,A.window,C,C,0),A.match_start-=C,A.strstart-=C,A.block_start-=C,e=t=A.hash_size;i=A.head[--e],A.head[e]=C<=i?i-C:0,--t;);for(e=t=C;i=A.prev[--e],A.prev[e]=C<=i?i-C:0,--t;);n+=C}if(0===A.strm.avail_in)break;if(g=A.strm,a=A.window,Q=A.strstart+A.lookahead,w=void 0,(E=n)<(w=g.avail_in)&&(w=E),t=0===w?0:(g.avail_in-=w,B.arraySet(a,g.input,g.next_in,w,Q),1===g.state.wrap?g.adler=s(g.adler,a,w,Q):2===g.state.wrap&&(g.adler=r(g.adler,a,w,Q)),g.next_in+=w,g.total_in+=w,w),A.lookahead+=t,A.lookahead+A.insert>=3)for(o=A.strstart-A.insert,A.ins_h=A.window[o],A.ins_h=(A.ins_h<=3&&(A.ins_h=(A.ins_h<=3)if(i=n._tr_tally(A,A.strstart-A.match_start,A.match_length-3),A.lookahead-=A.match_length,A.match_length<=A.max_lazy_match&&A.lookahead>=3){for(A.match_length--;A.strstart++,A.ins_h=(A.ins_h<=3&&(A.ins_h=(A.ins_h<=3&&A.match_length<=A.prev_length){for(B=A.strstart+A.lookahead-3,i=n._tr_tally(A,A.strstart-1-A.prev_match,A.prev_length-3),A.lookahead-=A.prev_length-1,A.prev_length-=2;++A.strstart<=B&&(A.ins_h=(A.ins_h<A.pending_buf_size-5&&(t=A.pending_buf_size-5);;){if(A.lookahead<=1){if(Y(A),0===A.lookahead&&0===e)return 1;if(0===A.lookahead)break}A.strstart+=A.lookahead,A.lookahead=0;var i=A.block_start+t;if((0===A.strstart||A.strstart>=i)&&(A.lookahead=A.strstart-i,A.strstart=i,I(A,!1),0===A.strm.avail_out))return 1;if(A.strstart-A.block_start>=A.w_size-c&&(I(A,!1),0===A.strm.avail_out))return 1}return A.insert=0,4===e?(I(A,!0),0===A.strm.avail_out?3:4):(A.strstart>A.block_start&&(I(A,!1),A.strm.avail_out),1)})),new D(4,4,8,4,M),new D(4,5,16,8,M),new D(4,6,32,32,M),new D(4,4,16,16,F),new D(8,16,32,32,F),new D(8,16,128,128,F),new D(8,32,128,256,F),new D(32,128,258,1024,F),new D(32,258,258,4096,F)],t.deflateInit=function(A,e){return f(A,e,8,15,8,0)},t.deflateInit2=f,t.deflateReset=U,t.deflateResetKeep=p,t.deflateSetHeader=function(A,e){return A&&A.state?2!==A.state.wrap?g:(A.state.gzhead=e,0):g},t.deflate=function(A,e){var t,B,s,o;if(!A||!A.state||5>8&255),h(B,B.gzhead.time>>16&255),h(B,B.gzhead.time>>24&255),h(B,9===B.level?2:2<=B.strategy||B.level<2?4:0),h(B,255&B.gzhead.os),B.gzhead.extra&&B.gzhead.extra.length&&(h(B,255&B.gzhead.extra.length),h(B,B.gzhead.extra.length>>8&255)),B.gzhead.hcrc&&(A.adler=r(A.adler,B.pending_buf,B.pending,0)),B.gzindex=0,B.status=69):(h(B,0),h(B,0),h(B,0),h(B,0),h(B,0),h(B,9===B.level?2:2<=B.strategy||B.level<2?4:0),h(B,3),B.status=Q);else{var c=8+(B.w_bits-8<<4)<<8;c|=(2<=B.strategy||B.level<2?0:B.level<6?1:6===B.level?2:3)<<6,0!==B.strstart&&(c|=32),c+=31-c%31,B.status=Q,u(B,c),0!==B.strstart&&(u(B,A.adler>>>16),u(B,65535&A.adler)),A.adler=1}if(69===B.status)if(B.gzhead.extra){for(s=B.pending;B.gzindex<(65535&B.gzhead.extra.length)&&(B.pending!==B.pending_buf_size||(B.gzhead.hcrc&&B.pending>s&&(A.adler=r(A.adler,B.pending_buf,B.pending-s,s)),l(A),s=B.pending,B.pending!==B.pending_buf_size));)h(B,255&B.gzhead.extra[B.gzindex]),B.gzindex++;B.gzhead.hcrc&&B.pending>s&&(A.adler=r(A.adler,B.pending_buf,B.pending-s,s)),B.gzindex===B.gzhead.extra.length&&(B.gzindex=0,B.status=73)}else B.status=73;if(73===B.status)if(B.gzhead.name){s=B.pending;do{if(B.pending===B.pending_buf_size&&(B.gzhead.hcrc&&B.pending>s&&(A.adler=r(A.adler,B.pending_buf,B.pending-s,s)),l(A),s=B.pending,B.pending===B.pending_buf_size)){o=1;break}o=B.gzindexs&&(A.adler=r(A.adler,B.pending_buf,B.pending-s,s)),0===o&&(B.gzindex=0,B.status=91)}else B.status=91;if(91===B.status)if(B.gzhead.comment){s=B.pending;do{if(B.pending===B.pending_buf_size&&(B.gzhead.hcrc&&B.pending>s&&(A.adler=r(A.adler,B.pending_buf,B.pending-s,s)),l(A),s=B.pending,B.pending===B.pending_buf_size)){o=1;break}o=B.gzindexs&&(A.adler=r(A.adler,B.pending_buf,B.pending-s,s)),0===o&&(B.status=103)}else B.status=103;if(103===B.status&&(B.gzhead.hcrc?(B.pending+2>B.pending_buf_size&&l(A),B.pending+2<=B.pending_buf_size&&(h(B,255&A.adler),h(B,A.adler>>8&255),A.adler=0,B.status=Q)):B.status=Q),0!==B.pending){if(l(A),0===A.avail_out)return B.last_flush=-1,0}else if(0===A.avail_in&&w(e)<=w(t)&&4!==e)return E(A,-5);if(666===B.status&&0!==A.avail_in)return E(A,-5);if(0!==A.avail_in||0!==B.lookahead||0!==e&&666!==B.status){var d=2===B.strategy?function(A,e){for(var t;;){if(0===A.lookahead&&(Y(A),0===A.lookahead)){if(0===e)return 1;break}if(A.match_length=0,t=n._tr_tally(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++,t&&(I(A,!1),0===A.strm.avail_out))return 1}return A.insert=0,4===e?(I(A,!0),0===A.strm.avail_out?3:4):A.last_lit&&(I(A,!1),0===A.strm.avail_out)?1:2}(B,e):3===B.strategy?function(A,e){for(var t,i,B,s,r=A.window;;){if(A.lookahead<=a){if(Y(A),A.lookahead<=a&&0===e)return 1;if(0===A.lookahead)break}if(A.match_length=0,A.lookahead>=3&&0A.lookahead&&(A.match_length=A.lookahead)}if(A.match_length>=3?(t=n._tr_tally(A,1,A.match_length-3),A.lookahead-=A.match_length,A.strstart+=A.match_length,A.match_length=0):(t=n._tr_tally(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++),t&&(I(A,!1),0===A.strm.avail_out))return 1}return A.insert=0,4===e?(I(A,!0),0===A.strm.avail_out?3:4):A.last_lit&&(I(A,!1),0===A.strm.avail_out)?1:2}(B,e):i[B.level].func(B,e);if(3!==d&&4!==d||(B.status=666),1===d||3===d)return 0===A.avail_out&&(B.last_flush=-1),0;if(2===d&&(1===e?n._tr_align(B):5!==e&&(n._tr_stored_block(B,0,0,!1),3===e&&(C(B.head),0===B.lookahead&&(B.strstart=0,B.block_start=0,B.insert=0))),l(A),0===A.avail_out))return B.last_flush=-1,0}return 4!==e?0:B.wrap<=0?1:(2===B.wrap?(h(B,255&A.adler),h(B,A.adler>>8&255),h(B,A.adler>>16&255),h(B,A.adler>>24&255),h(B,255&A.total_in),h(B,A.total_in>>8&255),h(B,A.total_in>>16&255),h(B,A.total_in>>24&255)):(u(B,A.adler>>>16),u(B,65535&A.adler)),l(A),0=t.w_size&&(0===r&&(C(t.head),t.strstart=0,t.block_start=0,t.insert=0),Q=new B.Buf8(t.w_size),B.arraySet(Q,e,E-t.w_size,t.w_size,0),e=Q,E=t.w_size),o=A.avail_in,a=A.next_in,c=A.input,A.avail_in=E,A.next_in=0,A.input=e,Y(t);t.lookahead>=3;){for(i=t.strstart,n=t.lookahead-2;t.ins_h=(t.ins_h<>>=d=u>>>24,w-=d,0==(d=u>>>16&255))p[n++]=65535&u;else{if(!(16&d)){if(0==(64&d)){u=C[(65535&u)+(E&(1<>>=d,w-=d),w<15&&(E+=m[i++]<>>=d=u>>>24,w-=d,!(16&(d=u>>>16&255))){if(0==(64&d)){u=l[(65535&u)+(E&(1<>>=d,w-=d,(d=n-s)>3,E&=(1<<(w-=Y<<3))-1,A.next_in=i,A.next_out=n,A.avail_in=i>>24&255)+(A>>>8&65280)+((65280&A)<<8)+((255&A)<<24)}function a(){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 i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function c(A){var e;return A&&A.state?(e=A.state,A.total_in=A.total_out=e.total=0,A.msg="",e.wrap&&(A.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new i.Buf32(852),e.distcode=e.distdyn=new i.Buf32(592),e.sane=1,e.back=-1,0):o}function Q(A){var e;return A&&A.state?((e=A.state).wsize=0,e.whave=0,e.wnext=0,c(A)):o}function E(A,e){var t,i;return A&&A.state?(i=A.state,e<0?(t=0,e=-e):(t=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15=s.wsize?(i.arraySet(s.window,e,t-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(B<(n=s.wsize-s.wnext)&&(n=B),i.arraySet(s.window,e,t-B,n,s.wnext),(B-=n)?(i.arraySet(s.window,e,t-B,B,0),s.wnext=B,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,t.check=n(t.check,J,2,0),I=l=0,t.mode=2;break}if(t.flags=0,t.head&&(t.head.done=!1),!(1&t.wrap)||(((255&l)<<8)+(l>>8))%31){A.msg="incorrect header check",t.mode=30;break}if(8!=(15&l)){A.msg="unknown compression method",t.mode=30;break}if(I-=4,y=8+(15&(l>>>=4)),0===t.wbits)t.wbits=y;else if(y>t.wbits){A.msg="invalid window size",t.mode=30;break}t.dmax=1<>8&1),512&t.flags&&(J[0]=255&l,J[1]=l>>>8&255,t.check=n(t.check,J,2,0)),I=l=0,t.mode=3;case 3:for(;I<32;){if(0===w)break A;w--,l+=a[Q++]<>>8&255,J[2]=l>>>16&255,J[3]=l>>>24&255,t.check=n(t.check,J,4,0)),I=l=0,t.mode=4;case 4:for(;I<16;){if(0===w)break A;w--,l+=a[Q++]<>8),512&t.flags&&(J[0]=255&l,J[1]=l>>>8&255,t.check=n(t.check,J,2,0)),I=l=0,t.mode=5;case 5:if(1024&t.flags){for(;I<16;){if(0===w)break A;w--,l+=a[Q++]<>>8&255,t.check=n(t.check,J,2,0)),I=l=0}else t.head&&(t.head.extra=null);t.mode=6;case 6:if(1024&t.flags&&(w<(M=t.length)&&(M=w),M&&(t.head&&(y=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Array(t.head.extra_len)),i.arraySet(t.head.extra,a,Q,M,y)),512&t.flags&&(t.check=n(t.check,a,M,Q)),w-=M,Q+=M,t.length-=M),t.length))break A;t.length=0,t.mode=7;case 7:if(2048&t.flags){if(0===w)break A;for(M=0;y=a[Q+M++],t.head&&y&&t.length<65536&&(t.head.name+=String.fromCharCode(y)),y&&M>9&1,t.head.done=!0),A.adler=t.check=0,t.mode=12;break;case 10:for(;I<32;){if(0===w)break A;w--,l+=a[Q++]<>>=7&I,I-=7&I,t.mode=27;break}for(;I<3;){if(0===w)break A;w--,l+=a[Q++]<>>=1)){case 0:t.mode=14;break;case 1:if(h(t),t.mode=20,6!==e)break;l>>>=2,I-=2;break A;case 2:t.mode=17;break;case 3:A.msg="invalid block type",t.mode=30}l>>>=2,I-=2;break;case 14:for(l>>>=7&I,I-=7&I;I<32;){if(0===w)break A;w--,l+=a[Q++]<>>16^65535)){A.msg="invalid stored block lengths",t.mode=30;break}if(t.length=65535&l,I=l=0,t.mode=15,6===e)break A;case 15:t.mode=16;case 16:if(M=t.length){if(w>>=5,I-=5,t.ndist=1+(31&l),l>>>=5,I-=5,t.ncode=4+(15&l),l>>>=4,I-=4,286>>=3,I-=3}for(;t.have<19;)t.lens[T[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,k={bits:t.lenbits},H=r(0,t.lens,0,19,t.lencode,0,t.work,k),t.lenbits=k.bits,H){A.msg="invalid code lengths set",t.mode=30;break}t.have=0,t.mode=19;case 19:for(;t.have>>16&255,U=65535&x,!((m=x>>>24)<=I);){if(0===w)break A;w--,l+=a[Q++]<>>=m,I-=m,t.lens[t.have++]=U;else{if(16===U){for(R=m+2;I>>=m,I-=m,0===t.have){A.msg="invalid bit length repeat",t.mode=30;break}y=t.lens[t.have-1],M=3+(3&l),l>>>=2,I-=2}else if(17===U){for(R=m+3;I>>=m)),l>>>=3,I-=3}else{for(R=m+7;I>>=m)),l>>>=7,I-=7}if(t.have+M>t.nlen+t.ndist){A.msg="invalid bit length repeat",t.mode=30;break}for(;M--;)t.lens[t.have++]=y}}if(30===t.mode)break;if(0===t.lens[256]){A.msg="invalid code -- missing end-of-block",t.mode=30;break}if(t.lenbits=9,k={bits:t.lenbits},H=r(1,t.lens,0,t.nlen,t.lencode,0,t.work,k),t.lenbits=k.bits,H){A.msg="invalid literal/lengths set",t.mode=30;break}if(t.distbits=6,t.distcode=t.distdyn,k={bits:t.distbits},H=r(2,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,k),t.distbits=k.bits,H){A.msg="invalid distances set",t.mode=30;break}if(t.mode=20,6===e)break A;case 20:t.mode=21;case 21:if(6<=w&&258<=C){A.next_out=E,A.avail_out=C,A.next_in=Q,A.avail_in=w,t.hold=l,t.bits=I,s(A,Y),E=A.next_out,c=A.output,C=A.avail_out,Q=A.next_in,a=A.input,w=A.avail_in,l=t.hold,I=t.bits,12===t.mode&&(t.back=-1);break}for(t.back=0;p=(x=t.lencode[l&(1<>>16&255,U=65535&x,!((m=x>>>24)<=I);){if(0===w)break A;w--,l+=a[Q++]<>f)])>>>16&255,U=65535&x,!(f+(m=x>>>24)<=I);){if(0===w)break A;w--,l+=a[Q++]<>>=f,I-=f,t.back+=f}if(l>>>=m,I-=m,t.back+=m,t.length=U,0===p){t.mode=26;break}if(32&p){t.back=-1,t.mode=12;break}if(64&p){A.msg="invalid literal/length code",t.mode=30;break}t.extra=15&p,t.mode=22;case 22:if(t.extra){for(R=t.extra;I>>=t.extra,I-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=23;case 23:for(;p=(x=t.distcode[l&(1<>>16&255,U=65535&x,!((m=x>>>24)<=I);){if(0===w)break A;w--,l+=a[Q++]<>f)])>>>16&255,U=65535&x,!(f+(m=x>>>24)<=I);){if(0===w)break A;w--,l+=a[Q++]<>>=f,I-=f,t.back+=f}if(l>>>=m,I-=m,t.back+=m,64&p){A.msg="invalid distance code",t.mode=30;break}t.offset=U,t.extra=15&p,t.mode=24;case 24:if(t.extra){for(R=t.extra;I>>=t.extra,I-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){A.msg="invalid distance too far back",t.mode=30;break}t.mode=25;case 25:if(0===C)break A;if(M=Y-C,t.offset>M){if((M=t.offset-M)>t.whave&&t.sane){A.msg="invalid distance too far back",t.mode=30;break}F=M>t.wnext?(M-=t.wnext,t.wsize-M):t.wnext-M,M>t.length&&(M=t.length),D=t.window}else D=c,F=E-t.offset,M=t.length;for(Ch?(d=T[S+c[D]],k[R+c[D]]):(d=96,0),E=1<>N)+(w-=E)]=u<<24|d<<16|Y|0,0!==w;);for(E=1<>=1;if(0!==E?(H&=E-1,H+=E):H=0,D++,0==--x[F]){if(F===p)break;F=e[t+c[D]]}if(U>>7)]}function m(A,e){A.pending_buf[A.pending++]=255&e,A.pending_buf[A.pending++]=e>>>8&255}function p(A,e,t){A.bi_valid>16-t?(A.bi_buf|=e<>16-A.bi_valid,A.bi_valid+=t-16):(A.bi_buf|=e<>>=1,t<<=1,0<--e;);return t>>>1}function N(A,e,t){var i,B,n=new Array(16),s=0;for(i=1;i<=o;i++)n[i]=s=s+t[i-1]<<1;for(B=0;B<=e;B++){var r=A[2*B+1];0!==r&&(A[2*B]=f(n[r]++,r))}}function G(A){var e;for(e=0;e>1;1<=t;t--)k(A,n,t);for(B=g;t=A.heap[1],A.heap[1]=A.heap[A.heap_len--],k(A,n,1),i=A.heap[1],A.heap[--A.heap_max]=t,A.heap[--A.heap_max]=i,n[2*B]=n[2*t]+n[2*i],A.depth[B]=(A.depth[t]>=A.depth[i]?A.depth[t]:A.depth[i])+1,n[2*t+1]=n[2*i+1]=B,A.heap[1]=B++,k(A,n,1),2<=A.heap_len;);A.heap[--A.heap_max]=A.heap[1],function(A,e){var t,i,B,n,s,r,g=e.dyn_tree,a=e.max_code,c=e.stat_desc.static_tree,Q=e.stat_desc.has_stree,E=e.stat_desc.extra_bits,w=e.stat_desc.extra_base,C=e.stat_desc.max_length,l=0;for(n=0;n<=o;n++)A.bl_count[n]=0;for(g[2*A.heap[A.heap_max]+1]=0,t=A.heap_max+1;t<573;t++)C<(n=g[2*g[2*(i=A.heap[t])+1]+1]+1)&&(n=C,l++),g[2*i+1]=n,a>=7;i>>=1)if(1&t&&0!==A.dyn_ltree[2*e])return 0;if(0!==A.dyn_ltree[18]||0!==A.dyn_ltree[20]||0!==A.dyn_ltree[26])return 1;for(e=32;e>>3,(s=A.static_len+3+7>>>3)<=B&&(B=s)):B=s=t+5,t+4<=B&&-1!==e?b(A,e,t,i):4===A.strategy||s===B?(p(A,2+(i?1:0),3),R(A,E,w)):(p(A,4+(i?1:0),3),function(A,e,t,i){var B;for(p(A,e-257,5),p(A,t-1,5),p(A,i-4,4),B=0;B>>8&255,A.pending_buf[A.d_buf+2*A.last_lit+1]=255&e,A.pending_buf[A.l_buf+A.last_lit]=255&t,A.last_lit++,0===e?A.dyn_ltree[2*t]++:(A.matches++,e--,A.dyn_ltree[2*(l[t]+n+1)]++,A.dyn_dtree[2*D(e)]++),A.last_lit===A.lit_bufsize-1},t._tr_align=function(A){p(A,2,3),U(A,256,E),function(A){16===A.bi_valid?(m(A,A.bi_buf),A.bi_buf=0,A.bi_valid=0):8<=A.bi_valid&&(A.pending_buf[A.pending++]=255&A.bi_buf,A.bi_buf>>=8,A.bi_valid-=8)}(A)}},{"../utils/common":41}],53:[function(A,e,t){"use strict";e.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(A,e,t){(function(A){!function(A,e){"use strict";if(!A.setImmediate){var t,i,n,s,r=1,o={},g=!1,a=A.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(A);c=c&&c.setTimeout?c:A,t="[object process]"==={}.toString.call(A.process)?function(A){B.nextTick((function(){E(A)}))}:function(){if(A.postMessage&&!A.importScripts){var e=!0,t=A.onmessage;return A.onmessage=function(){e=!1},A.postMessage("","*"),A.onmessage=t,e}}()?(s="setImmediate$"+Math.random()+"$",A.addEventListener?A.addEventListener("message",w,!1):A.attachEvent("onmessage",w),function(e){A.postMessage(s+e,"*")}):A.MessageChannel?((n=new MessageChannel).port1.onmessage=function(A){E(A.data)},function(A){n.port2.postMessage(A)}):a&&"onreadystatechange"in a.createElement("script")?(i=a.documentElement,function(A){var e=a.createElement("script");e.onreadystatechange=function(){E(A),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):function(A){setTimeout(E,0,A)},c.setImmediate=function(A){"function"!=typeof A&&(A=new Function(""+A));for(var e=new Array(arguments.length-1),i=0;i>24&255;return{r:A>>16&255,g:A>>8&255,b:255&A,a:e>0?e:255}}static hexToRgb(A){A.startsWith("#")&&(A=A.substring(1));const e=parseInt(A,16);if(isNaN(e))return null;if(6===A.length)return{r:e>>16&255,g:e>>8&255,b:255&e};if(3===A.length){const A=e>>8&15,t=e>>4&15,i=15&e;return{r:A<<4|A,g:t<<4|t,b:i<<4|i}}return null}static rgbToHex(A){return t.decimalToHex(t.rgbToDecimal(A))}static rgbToDecimal(A){return(A.r<<16)+(A.g<<8)+A.b}static hexToDecimal(A){return t.rgbToDecimal(t.hexToRgb(A))}static hsvToRgb(A){let e=A.h%360;e<0&&(e+=360);const t=Math.max(0,Math.min(A.s,1)),i=Math.max(0,Math.min(A.v,1)),B=Math.floor(e/60),n=e/60-B,s=i*(1-t),r=i*(1-t*n),o=i*(1-t*(1-n));let g,a,c;switch(B){default:case 0:g=i,a=o,c=s;break;case 1:g=r,a=i,c=s;break;case 2:g=s,a=i,c=o;break;case 3:g=s,a=r,c=i;break;case 4:g=o,a=s,c=i;break;case 5:g=i,a=s,c=r}return{r:Math.floor(255*g),g:Math.floor(255*a),b:Math.floor(255*c)}}static rgbToHsv(A){const e=A.r/255,t=A.g/255,i=A.b/255,B=Math.min(Math.min(e,t),i),n=Math.max(Math.max(e,t),i);let s=0,r=0;if(B!==n){s=60*((e===B?3:t===B?5:1)-(e===B?t-i:t===B?i-e:e-t)/(n-B))%360,r=(n-B)/n}return{h:s,s:r,v:n}}static mixRgb(A,e,t){if(t<=0)return A;if(t>=1)return e;const i=1-t;return{r:i*A.r+t*e.r,g:i*A.g+t*e.g,b:i*A.b+t*e.b}}}A.exports=t},function(A,e,t){A.exports=function(){"use strict";var A=Array.prototype.slice;function e(A,e){e&&(A.prototype=Object.create(e.prototype)),A.prototype.constructor=A}function t(A){return s(A)?A:v(A)}function i(A){return r(A)?A:L(A)}function B(A){return o(A)?A:P(A)}function n(A){return s(A)&&!g(A)?A:W(A)}function s(A){return!(!A||!A[c])}function r(A){return!(!A||!A[Q])}function o(A){return!(!A||!A[E])}function g(A){return r(A)||o(A)}function a(A){return!(!A||!A[w])}e(i,t),e(B,t),e(n,t),t.isIterable=s,t.isKeyed=r,t.isIndexed=o,t.isAssociative=g,t.isOrdered=a,t.Keyed=i,t.Indexed=B,t.Set=n;var c="@@__IMMUTABLE_ITERABLE__@@",Q="@@__IMMUTABLE_KEYED__@@",E="@@__IMMUTABLE_INDEXED__@@",w="@@__IMMUTABLE_ORDERED__@@",C={},l={value:!1},I={value:!1};function h(A){return A.value=!1,A}function u(A){A&&(A.value=!0)}function d(){}function Y(A,e){e=e||0;for(var t=Math.max(0,A.length-e),i=new Array(t),B=0;B>>0;if(""+t!==e||4294967295===t)return NaN;e=t}return e<0?M(A)+e:e}function D(){return!0}function m(A,e,t){return(0===A||void 0!==t&&A<=-t)&&(void 0===e||void 0!==t&&e>=t)}function p(A,e){return f(A,e,0)}function U(A,e){return f(A,e,e)}function f(A,e,t){return void 0===A?t:A<0?Math.max(0,e+A):void 0===e?A:Math.min(e,A)}var N,G,y,H="function"==typeof Symbol&&Symbol.iterator,k=H||"@@iterator";function R(A){this.next=A}function x(A,e,t,i){var B=0===A?e:1===A?t:[e,t];return i?i.value=B:i={value:B,done:!1},i}function J(){return{value:void 0,done:!0}}function T(A){return!!j(A)}function S(A){return A&&"function"==typeof A.next}function b(A){var e=j(A);return e&&e.call(A)}function j(A){var e=A&&(H&&A[H]||A["@@iterator"]);if("function"==typeof e)return e}function z(A){return A&&"number"==typeof A.length}function v(A){return null==A?Z():s(A)?A.toSeq():function(A){var e=AA(A)||"object"==typeof A&&new V(A);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+A);return e}(A)}function L(A){return null==A?Z().toKeyedSeq():s(A)?r(A)?A.toSeq():A.fromEntrySeq():q(A)}function P(A){return null==A?Z():s(A)?r(A)?A.entrySeq():A.toIndexedSeq():$(A)}function W(A){return(null==A?Z():s(A)?r(A)?A.entrySeq():A:$(A)).toSetSeq()}function O(A){this._array=A,this.size=A.length}function V(A){var e=Object.keys(A);this._object=A,this._keys=e,this.size=e.length}function K(A){this._iterable=A,this.size=A.length||A.size}function X(A){this._iterator=A,this._iteratorCache=[]}function _(A){return!(!A||!A["@@__IMMUTABLE_SEQ__@@"])}function Z(){return N||(N=new O([]))}function q(A){var e=Array.isArray(A)?new O(A).fromEntrySeq():S(A)?new X(A).fromEntrySeq():T(A)?new K(A).fromEntrySeq():"object"==typeof A?new V(A):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+A);return e}function $(A){var e=AA(A);if(!e)throw new TypeError("Expected Array or iterable object of values: "+A);return e}function AA(A){return z(A)?new O(A):S(A)?new X(A):T(A)?new K(A):void 0}function eA(A,e,t,i){var B=A._cache;if(B){for(var n=B.length-1,s=0;s<=n;s++){var r=B[t?n-s:s];if(!1===e(r[1],i?r[0]:s,A))return s+1}return s}return A.__iterateUncached(e,t)}function tA(A,e,t,i){var B=A._cache;if(B){var n=B.length-1,s=0;return new R((function(){var A=B[t?n-s:s];return s++>n?{value:void 0,done:!0}:x(e,i?A[0]:s-1,A[1])}))}return A.__iteratorUncached(e,t)}function iA(A,e){return e?function A(e,t,i,B){return Array.isArray(t)?e.call(B,i,P(t).map((function(i,B){return A(e,i,B,t)}))):nA(t)?e.call(B,i,L(t).map((function(i,B){return A(e,i,B,t)}))):t}(e,A,"",{"":A}):BA(A)}function BA(A){return Array.isArray(A)?P(A).map(BA).toList():nA(A)?L(A).map(BA).toMap():A}function nA(A){return A&&(A.constructor===Object||void 0===A.constructor)}function sA(A,e){if(A===e||A!=A&&e!=e)return!0;if(!A||!e)return!1;if("function"==typeof A.valueOf&&"function"==typeof e.valueOf){if((A=A.valueOf())===(e=e.valueOf())||A!=A&&e!=e)return!0;if(!A||!e)return!1}return!("function"!=typeof A.equals||"function"!=typeof e.equals||!A.equals(e))}function rA(A,e){if(A===e)return!0;if(!s(e)||void 0!==A.size&&void 0!==e.size&&A.size!==e.size||void 0!==A.__hash&&void 0!==e.__hash&&A.__hash!==e.__hash||r(A)!==r(e)||o(A)!==o(e)||a(A)!==a(e))return!1;if(0===A.size&&0===e.size)return!0;var t=!g(A);if(a(A)){var i=A.entries();return e.every((function(A,e){var B=i.next().value;return B&&sA(B[1],A)&&(t||sA(B[0],e))}))&&i.next().done}var B=!1;if(void 0===A.size)if(void 0===e.size)"function"==typeof A.cacheResult&&A.cacheResult();else{B=!0;var n=A;A=e,e=n}var c=!0,Q=e.__iterate((function(e,i){if(t?!A.has(e):B?!sA(e,A.get(i,C)):!sA(A.get(i,C),e))return c=!1,!1}));return c&&A.size===Q}function oA(A,e){if(!(this instanceof oA))return new oA(A,e);if(this._value=A,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(G)return G;G=this}}function gA(A,e){if(!A)throw new Error(e)}function aA(A,e,t){if(!(this instanceof aA))return new aA(A,e,t);if(gA(0!==t,"Cannot step a Range by 0"),A=A||0,void 0===e&&(e=1/0),t=void 0===t?1:Math.abs(t),ei?{value:void 0,done:!0}:x(A,B,t[e?i-B++:B++])}))},e(V,L),V.prototype.get=function(A,e){return void 0===e||this.has(A)?this._object[A]:e},V.prototype.has=function(A){return this._object.hasOwnProperty(A)},V.prototype.__iterate=function(A,e){for(var t=this._object,i=this._keys,B=i.length-1,n=0;n<=B;n++){var s=i[e?B-n:n];if(!1===A(t[s],s,this))return n+1}return n},V.prototype.__iterator=function(A,e){var t=this._object,i=this._keys,B=i.length-1,n=0;return new R((function(){var s=i[e?B-n:n];return n++>B?{value:void 0,done:!0}:x(A,s,t[s])}))},V.prototype[w]=!0,e(K,P),K.prototype.__iterateUncached=function(A,e){if(e)return this.cacheResult().__iterate(A,e);var t=b(this._iterable),i=0;if(S(t))for(var B;!(B=t.next()).done&&!1!==A(B.value,i++,this););return i},K.prototype.__iteratorUncached=function(A,e){if(e)return this.cacheResult().__iterator(A,e);var t=b(this._iterable);if(!S(t))return new R(J);var i=0;return new R((function(){var e=t.next();return e.done?e:x(A,i++,e.value)}))},e(X,P),X.prototype.__iterateUncached=function(A,e){if(e)return this.cacheResult().__iterate(A,e);for(var t,i=this._iterator,B=this._iteratorCache,n=0;n=i.length){var e=t.next();if(e.done)return e;i[B]=e.value}return x(A,B,i[B++])}))},e(oA,P),oA.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},oA.prototype.get=function(A,e){return this.has(A)?this._value:e},oA.prototype.includes=function(A){return sA(this._value,A)},oA.prototype.slice=function(A,e){var t=this.size;return m(A,e,t)?this:new oA(this._value,U(e,t)-p(A,t))},oA.prototype.reverse=function(){return this},oA.prototype.indexOf=function(A){return sA(this._value,A)?0:-1},oA.prototype.lastIndexOf=function(A){return sA(this._value,A)?this.size:-1},oA.prototype.__iterate=function(A,e){for(var t=0;t=0&&e=0&&tt?{value:void 0,done:!0}:x(A,n++,s)}))},aA.prototype.equals=function(A){return A instanceof aA?this._start===A._start&&this._end===A._end&&this._step===A._step:rA(this,A)},e(cA,t),e(QA,cA),e(EA,cA),e(wA,cA),cA.Keyed=QA,cA.Indexed=EA,cA.Set=wA;var CA="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(A,e){var t=65535&(A|=0),i=65535&(e|=0);return t*i+((A>>>16)*i+t*(e>>>16)<<16>>>0)|0};function lA(A){return A>>>1&1073741824|3221225471&A}function IA(A){if(!1===A||null==A)return 0;if("function"==typeof A.valueOf&&(!1===(A=A.valueOf())||null==A))return 0;if(!0===A)return 1;var e=typeof A;if("number"===e){if(A!=A||A===1/0)return 0;var t=0|A;for(t!==A&&(t^=4294967295*A);A>4294967295;)t^=A/=4294967295;return lA(t)}if("string"===e)return A.length>mA?function(A){var e=fA[A];return void 0===e&&(e=hA(A),UA===pA&&(UA=0,fA={}),UA++,fA[A]=e),e}(A):hA(A);if("function"==typeof A.hashCode)return A.hashCode();if("object"===e)return function(A){var e;if(MA&&void 0!==(e=uA.get(A)))return e;if(void 0!==(e=A[DA]))return e;if(!YA){if(void 0!==(e=A.propertyIsEnumerable&&A.propertyIsEnumerable[DA]))return e;if(void 0!==(e=function(A){if(A&&A.nodeType>0)switch(A.nodeType){case 1:return A.uniqueID;case 9:return A.documentElement&&A.documentElement.uniqueID}}(A)))return e}if(e=++FA,1073741824&FA&&(FA=0),MA)uA.set(A,e);else{if(void 0!==dA&&!1===dA(A))throw new Error("Non-extensible objects are not allowed as keys.");if(YA)Object.defineProperty(A,DA,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==A.propertyIsEnumerable&&A.propertyIsEnumerable===A.constructor.prototype.propertyIsEnumerable)A.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},A.propertyIsEnumerable[DA]=e;else{if(void 0===A.nodeType)throw new Error("Unable to set a non-enumerable property on object.");A[DA]=e}}return e}(A);if("function"==typeof A.toString)return hA(A.toString());throw new Error("Value type "+e+" cannot be hashed.")}function hA(A){for(var e=0,t=0;t=e.length)throw new Error("Missing value for key: "+e[t]);A.set(e[t],e[t+1])}}))},GA.prototype.toString=function(){return this.__toString("Map {","}")},GA.prototype.get=function(A,e){return this._root?this._root.get(0,void 0,A,e):e},GA.prototype.set=function(A,e){return WA(this,A,e)},GA.prototype.setIn=function(A,e){return this.updateIn(A,C,(function(){return e}))},GA.prototype.remove=function(A){return WA(this,A,C)},GA.prototype.deleteIn=function(A){return this.updateIn(A,(function(){return C}))},GA.prototype.update=function(A,e,t){return 1===arguments.length?A(this):this.updateIn([A],e,t)},GA.prototype.updateIn=function(A,e,t){t||(t=e,e=void 0);var i=function A(e,t,i,B){var n=e===C,s=t.next();if(s.done){var r=n?i:e,o=B(r);return o===r?e:o}gA(n||e&&e.set,"invalid keyPath");var g=s.value,a=n?C:e.get(g,C),c=A(a,t,i,B);return c===a?e:c===C?e.remove(g):(n?PA():e).set(g,c)}(this,Xe(A),e,t);return i===C?void 0:i},GA.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):PA()},GA.prototype.merge=function(){return XA(this,void 0,arguments)},GA.prototype.mergeWith=function(e){var t=A.call(arguments,1);return XA(this,e,t)},GA.prototype.mergeIn=function(e){var t=A.call(arguments,1);return this.updateIn(e,PA(),(function(A){return"function"==typeof A.merge?A.merge.apply(A,t):t[t.length-1]}))},GA.prototype.mergeDeep=function(){return XA(this,_A,arguments)},GA.prototype.mergeDeepWith=function(e){var t=A.call(arguments,1);return XA(this,ZA(e),t)},GA.prototype.mergeDeepIn=function(e){var t=A.call(arguments,1);return this.updateIn(e,PA(),(function(A){return"function"==typeof A.mergeDeep?A.mergeDeep.apply(A,t):t[t.length-1]}))},GA.prototype.sort=function(A){return Ye(Se(this,A))},GA.prototype.sortBy=function(A,e){return Ye(Se(this,e,A))},GA.prototype.withMutations=function(A){var e=this.asMutable();return A(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},GA.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new d)},GA.prototype.asImmutable=function(){return this.__ensureOwner()},GA.prototype.wasAltered=function(){return this.__altered},GA.prototype.__iterator=function(A,e){return new jA(this,A,e)},GA.prototype.__iterate=function(A,e){var t=this,i=0;return this._root&&this._root.iterate((function(e){return i++,A(e[1],e[0],t)}),e),i},GA.prototype.__ensureOwner=function(A){return A===this.__ownerID?this:A?LA(this.size,this._root,A,this.__hash):(this.__ownerID=A,this.__altered=!1,this)},GA.isMap=yA;var HA,kA="@@__IMMUTABLE_MAP__@@",RA=GA.prototype;function xA(A,e){this.ownerID=A,this.entries=e}function JA(A,e,t){this.ownerID=A,this.bitmap=e,this.nodes=t}function TA(A,e,t){this.ownerID=A,this.count=e,this.nodes=t}function SA(A,e,t){this.ownerID=A,this.keyHash=e,this.entries=t}function bA(A,e,t){this.ownerID=A,this.keyHash=e,this.entry=t}function jA(A,e,t){this._type=e,this._reverse=t,this._stack=A._root&&vA(A._root)}function zA(A,e){return x(A,e[0],e[1])}function vA(A,e){return{node:A,index:0,__prev:e}}function LA(A,e,t,i){var B=Object.create(RA);return B.size=A,B._root=e,B.__ownerID=t,B.__hash=i,B.__altered=!1,B}function PA(){return HA||(HA=LA(0))}function WA(A,e,t){var i,B;if(A._root){var n=h(l),s=h(I);if(i=OA(A._root,A.__ownerID,0,void 0,e,t,n,s),!s.value)return A;B=A.size+(n.value?t===C?-1:1:0)}else{if(t===C)return A;B=1,i=new xA(A.__ownerID,[[e,t]])}return A.__ownerID?(A.size=B,A._root=i,A.__hash=void 0,A.__altered=!0,A):i?LA(B,i):PA()}function OA(A,e,t,i,B,n,s,r){return A?A.update(e,t,i,B,n,s,r):n===C?A:(u(r),u(s),new bA(e,i,[B,n]))}function VA(A){return A.constructor===bA||A.constructor===SA}function KA(A,e,t,i,B){if(A.keyHash===i)return new SA(e,i,[A.entry,B]);var n,s=31&(0===t?A.keyHash:A.keyHash>>>t),r=31&(0===t?i:i>>>t);return new JA(e,1<>1&1431655765))+(A>>2&858993459))+(A>>4)&252645135,A+=A>>8,127&(A+=A>>16)}function Ae(A,e,t,i){var B=i?A:Y(A);return B[e]=t,B}RA[kA]=!0,RA.delete=RA.remove,RA.removeIn=RA.deleteIn,xA.prototype.get=function(A,e,t,i){for(var B=this.entries,n=0,s=B.length;n=ee)return function(A,e,t,i){A||(A=new d);for(var B=new bA(A,IA(t),[t,i]),n=0;n>>A)),n=this.bitmap;return 0==(n&B)?i:this.nodes[$A(n&B-1)].get(A+5,e,t,i)},JA.prototype.update=function(A,e,t,i,B,n,s){void 0===t&&(t=IA(i));var r=31&(0===e?t:t>>>e),o=1<=te)return function(A,e,t,i,B){for(var n=0,s=new Array(32),r=0;0!==t;r++,t>>>=1)s[r]=1&t?e[n++]:void 0;return s[i]=B,new TA(A,n+1,s)}(A,Q,g,r,w);if(a&&!w&&2===Q.length&&VA(Q[1^c]))return Q[1^c];if(a&&w&&1===Q.length&&VA(w))return w;var l=A&&A===this.ownerID,I=a?w?g:g^o:g|o,h=a?w?Ae(Q,c,w,l):function(A,e,t){var i=A.length-1;if(t&&e===i)return A.pop(),A;for(var B=new Array(i),n=0,s=0;s>>A),n=this.nodes[B];return n?n.get(A+5,e,t,i):i},TA.prototype.update=function(A,e,t,i,B,n,s){void 0===t&&(t=IA(i));var r=31&(0===e?t:t>>>e),o=B===C,g=this.nodes,a=g[r];if(o&&!a)return this;var c=OA(a,A,e+5,t,i,B,n,s);if(c===a)return this;var Q=this.count;if(a){if(!c&&--Q0&&i<32?Ee(0,i,5,null,new oe(t.toArray())):e.withMutations((function(A){A.setSize(i),t.forEach((function(e,t){return A.set(t,e)}))})))}function ne(A){return!(!A||!A[se])}e(Be,EA),Be.of=function(){return this(arguments)},Be.prototype.toString=function(){return this.__toString("List [","]")},Be.prototype.get=function(A,e){if((A=F(this,A))>=0&&A=A.size||e<0)return A.withMutations((function(A){e<0?he(A,e).set(0,t):he(A,0,e+1).set(e,t)}));e+=A._origin;var i=A._tail,B=A._root,n=h(I);return e>=de(A._capacity)?i=Ce(i,A.__ownerID,0,e,t,n):B=Ce(B,A.__ownerID,A._level,e,t,n),n.value?A.__ownerID?(A._root=B,A._tail=i,A.__hash=void 0,A.__altered=!0,A):Ee(A._origin,A._capacity,A._level,B,i):A}(this,A,e)},Be.prototype.remove=function(A){return this.has(A)?0===A?this.shift():A===this.size-1?this.pop():this.splice(A,1):this},Be.prototype.insert=function(A,e){return this.splice(A,0,e)},Be.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):we()},Be.prototype.push=function(){var A=arguments,e=this.size;return this.withMutations((function(t){he(t,0,e+A.length);for(var i=0;i>>e&31;if(i>=this.array.length)return new oe([],A);var B,n=0===i;if(e>0){var s=this.array[i];if((B=s&&s.removeBefore(A,e-5,t))===s&&n)return this}if(n&&!B)return this;var r=le(this,A);if(!n)for(var o=0;o>>e&31;if(B>=this.array.length)return this;if(e>0){var n=this.array[B];if((i=n&&n.removeAfter(A,e-5,t))===n&&B===this.array.length-1)return this}var s=le(this,A);return s.array.splice(B+1),i&&(s.array[B]=i),s};var ge,ae,ce={};function Qe(A,e){var t=A._origin,i=A._capacity,B=de(i),n=A._tail;return s(A._root,A._level,0);function s(A,r,o){return 0===r?function(A,s){var r=s===B?n&&n.array:A&&A.array,o=s>t?0:t-s,g=i-s;return g>32&&(g=32),function(){if(o===g)return ce;var A=e?--g:o++;return r&&r[A]}}(A,o):function(A,B,n){var r,o=A&&A.array,g=n>t?0:t-n>>B,a=1+(i-n>>B);return a>32&&(a=32),function(){for(;;){if(r){var A=r();if(A!==ce)return A;r=null}if(g===a)return ce;var t=e?--a:g++;r=s(o&&o[t],B-5,n+(t<>>t&31,o=A&&r0){var g=A&&A.array[r],a=Ce(g,e,t-5,i,B,n);return a===g?A:((s=le(A,e)).array[r]=a,s)}return o&&A.array[r]===B?A:(u(n),s=le(A,e),void 0===B&&r===s.array.length-1?s.array.pop():s.array[r]=B,s)}function le(A,e){return e&&A&&e===A.ownerID?A:new oe(A?A.array.slice():[],e)}function Ie(A,e){if(e>=de(A._capacity))return A._tail;if(e<1<0;)t=t.array[e>>>i&31],i-=5;return t}}function he(A,e,t){void 0!==e&&(e|=0),void 0!==t&&(t|=0);var i=A.__ownerID||new d,B=A._origin,n=A._capacity,s=B+e,r=void 0===t?n:t<0?n+t:B+t;if(s===B&&r===n)return A;if(s>=r)return A.clear();for(var o=A._level,g=A._root,a=0;s+a<0;)g=new oe(g&&g.array.length?[void 0,g]:[],i),a+=1<<(o+=5);a&&(s+=a,B+=a,r+=a,n+=a);for(var c=de(n),Q=de(r);Q>=1<c?new oe([],i):E;if(E&&Q>c&&s5;l-=5){var I=c>>>l&31;C=C.array[I]=le(C.array[I],i)}C.array[c>>>5&31]=E}if(r=Q)s-=Q,r-=Q,o=5,g=null,w=w&&w.removeBefore(i,0,s);else if(s>B||Q>>o&31;if(h!==Q>>>o&31)break;h&&(a+=(1<B&&(g=g.removeBefore(i,o,s-a)),g&&Qn&&(n=g.size),s(o)||(g=g.map((function(A){return iA(A)}))),i.push(g)}return n>A.size&&(A=A.setSize(n)),qA(A,e,i)}function de(A){return A<32?0:A-1>>>5<<5}function Ye(A){return null==A?De():Me(A)?A:De().withMutations((function(e){var t=i(A);NA(t.size),t.forEach((function(A,t){return e.set(t,A)}))}))}function Me(A){return yA(A)&&a(A)}function Fe(A,e,t,i){var B=Object.create(Ye.prototype);return B.size=A?A.size:0,B._map=A,B._list=e,B.__ownerID=t,B.__hash=i,B}function De(){return ae||(ae=Fe(PA(),we()))}function me(A,e,t){var i,B,n=A._map,s=A._list,r=n.get(e),o=void 0!==r;if(t===C){if(!o)return A;s.size>=32&&s.size>=2*n.size?(i=(B=s.filter((function(A,e){return void 0!==A&&r!==e}))).toKeyedSeq().map((function(A){return A[0]})).flip().toMap(),A.__ownerID&&(i.__ownerID=B.__ownerID=A.__ownerID)):(i=n.remove(e),B=r===s.size-1?s.pop():s.set(r,void 0))}else if(o){if(t===s.get(r)[1])return A;i=n,B=s.set(r,[e,t])}else i=n.set(e,s.size),B=s.set(s.size,[e,t]);return A.__ownerID?(A.size=i.size,A._map=i,A._list=B,A.__hash=void 0,A):Fe(i,B)}function pe(A,e){this._iter=A,this._useKeys=e,this.size=A.size}function Ue(A){this._iter=A,this.size=A.size}function fe(A){this._iter=A,this.size=A.size}function Ne(A){this._iter=A,this.size=A.size}function Ge(A){var e=Oe(A);return e._iter=A,e.size=A.size,e.flip=function(){return A},e.reverse=function(){var e=A.reverse.apply(this);return e.flip=function(){return A.reverse()},e},e.has=function(e){return A.includes(e)},e.includes=function(e){return A.has(e)},e.cacheResult=Ve,e.__iterateUncached=function(e,t){var i=this;return A.__iterate((function(A,t){return!1!==e(t,A,i)}),t)},e.__iteratorUncached=function(e,t){if(2===e){var i=A.__iterator(e,t);return new R((function(){var A=i.next();if(!A.done){var e=A.value[0];A.value[0]=A.value[1],A.value[1]=e}return A}))}return A.__iterator(1===e?0:1,t)},e}function ye(A,e,t){var i=Oe(A);return i.size=A.size,i.has=function(e){return A.has(e)},i.get=function(i,B){var n=A.get(i,C);return n===C?B:e.call(t,n,i,A)},i.__iterateUncached=function(i,B){var n=this;return A.__iterate((function(A,B,s){return!1!==i(e.call(t,A,B,s),B,n)}),B)},i.__iteratorUncached=function(i,B){var n=A.__iterator(2,B);return new R((function(){var B=n.next();if(B.done)return B;var s=B.value,r=s[0];return x(i,r,e.call(t,s[1],r,A),B)}))},i}function He(A,e){var t=Oe(A);return t._iter=A,t.size=A.size,t.reverse=function(){return A},A.flip&&(t.flip=function(){var e=Ge(A);return e.reverse=function(){return A.flip()},e}),t.get=function(t,i){return A.get(e?t:-1-t,i)},t.has=function(t){return A.has(e?t:-1-t)},t.includes=function(e){return A.includes(e)},t.cacheResult=Ve,t.__iterate=function(e,t){var i=this;return A.__iterate((function(A,t){return e(A,t,i)}),!t)},t.__iterator=function(e,t){return A.__iterator(e,!t)},t}function ke(A,e,t,i){var B=Oe(A);return i&&(B.has=function(i){var B=A.get(i,C);return B!==C&&!!e.call(t,B,i,A)},B.get=function(i,B){var n=A.get(i,C);return n!==C&&e.call(t,n,i,A)?n:B}),B.__iterateUncached=function(B,n){var s=this,r=0;return A.__iterate((function(A,n,o){if(e.call(t,A,n,o))return r++,B(A,i?n:r-1,s)}),n),r},B.__iteratorUncached=function(B,n){var s=A.__iterator(2,n),r=0;return new R((function(){for(;;){var n=s.next();if(n.done)return n;var o=n.value,g=o[0],a=o[1];if(e.call(t,a,g,A))return x(B,i?g:r++,a,n)}}))},B}function Re(A,e,t,i){var B=A.size;if(void 0!==e&&(e|=0),void 0!==t&&(t===1/0?t=B:t|=0),m(e,t,B))return A;var n=p(e,B),s=U(t,B);if(n!=n||s!=s)return Re(A.toSeq().cacheResult(),e,t,i);var r,o=s-n;o==o&&(r=o<0?0:o);var g=Oe(A);return g.size=0===r?r:A.size&&r||void 0,!i&&_(A)&&r>=0&&(g.get=function(e,t){return(e=F(this,e))>=0&&er)return{value:void 0,done:!0};var A=B.next();return i||1===e?A:x(e,o-1,0===e?void 0:A.value[1],A)}))},g}function xe(A,e,t,i){var B=Oe(A);return B.__iterateUncached=function(B,n){var s=this;if(n)return this.cacheResult().__iterate(B,n);var r=!0,o=0;return A.__iterate((function(A,n,g){if(!r||!(r=e.call(t,A,n,g)))return o++,B(A,i?n:o-1,s)})),o},B.__iteratorUncached=function(B,n){var s=this;if(n)return this.cacheResult().__iterator(B,n);var r=A.__iterator(2,n),o=!0,g=0;return new R((function(){var A,n,a;do{if((A=r.next()).done)return i||1===B?A:x(B,g++,0===B?void 0:A.value[1],A);var c=A.value;n=c[0],a=c[1],o&&(o=e.call(t,a,n,s))}while(o);return 2===B?A:x(B,n,a,A)}))},B}function Je(A,e){var t=r(A),B=[A].concat(e).map((function(A){return s(A)?t&&(A=i(A)):A=t?q(A):$(Array.isArray(A)?A:[A]),A})).filter((function(A){return 0!==A.size}));if(0===B.length)return A;if(1===B.length){var n=B[0];if(n===A||t&&r(n)||o(A)&&o(n))return n}var g=new O(B);return t?g=g.toKeyedSeq():o(A)||(g=g.toSetSeq()),(g=g.flatten(!0)).size=B.reduce((function(A,e){if(void 0!==A){var t=e.size;if(void 0!==t)return A+t}}),0),g}function Te(A,e,t){var i=Oe(A);return i.__iterateUncached=function(i,B){var n=0,r=!1;return function A(o,g){var a=this;o.__iterate((function(B,o){return(!e||g0}function ze(A,e,i){var B=Oe(A);return B.size=new O(i).map((function(A){return A.size})).min(),B.__iterate=function(A,e){for(var t,i=this.__iterator(1,e),B=0;!(t=i.next()).done&&!1!==A(t.value,B++,this););return B},B.__iteratorUncached=function(A,B){var n=i.map((function(A){return A=t(A),b(B?A.reverse():A)})),s=0,r=!1;return new R((function(){var t;return r||(t=n.map((function(A){return A.next()})),r=t.some((function(A){return A.done}))),r?{value:void 0,done:!0}:x(A,s++,e.apply(null,t.map((function(A){return A.value}))))}))},B}function ve(A,e){return _(A)?e:A.constructor(e)}function Le(A){if(A!==Object(A))throw new TypeError("Expected [K, V] tuple: "+A)}function Pe(A){return NA(A.size),M(A)}function We(A){return r(A)?i:o(A)?B:n}function Oe(A){return Object.create((r(A)?L:o(A)?P:W).prototype)}function Ve(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):v.prototype.cacheResult.call(this)}function Ke(A,e){return A>e?1:A=0;t--)e={value:arguments[t],next:e};return this.__ownerID?(this.size=A,this._head=e,this.__hash=void 0,this.__altered=!0,this):dt(A,e)},Ct.prototype.pushAll=function(A){if(0===(A=B(A)).size)return this;NA(A.size);var e=this.size,t=this._head;return A.reverse().forEach((function(A){e++,t={value:A,next:t}})),this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):dt(e,t)},Ct.prototype.pop=function(){return this.slice(1)},Ct.prototype.unshift=function(){return this.push.apply(this,arguments)},Ct.prototype.unshiftAll=function(A){return this.pushAll(A)},Ct.prototype.shift=function(){return this.pop.apply(this,arguments)},Ct.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):Yt()},Ct.prototype.slice=function(A,e){if(m(A,e,this.size))return this;var t=p(A,this.size);if(U(e,this.size)!==this.size)return EA.prototype.slice.call(this,A,e);for(var i=this.size-t,B=this._head;t--;)B=B.next;return this.__ownerID?(this.size=i,this._head=B,this.__hash=void 0,this.__altered=!0,this):dt(i,B)},Ct.prototype.__ensureOwner=function(A){return A===this.__ownerID?this:A?dt(this.size,this._head,A,this.__hash):(this.__ownerID=A,this.__altered=!1,this)},Ct.prototype.__iterate=function(A,e){if(e)return this.reverse().__iterate(A);for(var t=0,i=this._head;i&&!1!==A(i.value,t++,this);)i=i.next;return t},Ct.prototype.__iterator=function(A,e){if(e)return this.reverse().__iterator(A);var t=0,i=this._head;return new R((function(){if(i){var e=i.value;return i=i.next,x(A,t++,e)}return{value:void 0,done:!0}}))},Ct.isStack=lt;var It,ht="@@__IMMUTABLE_STACK__@@",ut=Ct.prototype;function dt(A,e,t,i){var B=Object.create(ut);return B.size=A,B._head=e,B.__ownerID=t,B.__hash=i,B.__altered=!1,B}function Yt(){return It||(It=dt(0))}function Mt(A,e){var t=function(t){A.prototype[t]=e[t]};return Object.keys(e).forEach(t),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(t),A}ut[ht]=!0,ut.withMutations=RA.withMutations,ut.asMutable=RA.asMutable,ut.asImmutable=RA.asImmutable,ut.wasAltered=RA.wasAltered,t.Iterator=R,Mt(t,{toArray:function(){NA(this.size);var A=new Array(this.size||0);return this.valueSeq().__iterate((function(e,t){A[t]=e})),A},toIndexedSeq:function(){return new Ue(this)},toJS:function(){return this.toSeq().map((function(A){return A&&"function"==typeof A.toJS?A.toJS():A})).__toJS()},toJSON:function(){return this.toSeq().map((function(A){return A&&"function"==typeof A.toJSON?A.toJSON():A})).__toJS()},toKeyedSeq:function(){return new pe(this,!0)},toMap:function(){return GA(this.toKeyedSeq())},toObject:function(){NA(this.size);var A={};return this.__iterate((function(e,t){A[t]=e})),A},toOrderedMap:function(){return Ye(this.toKeyedSeq())},toOrderedSet:function(){return gt(r(this)?this.valueSeq():this)},toSet:function(){return et(r(this)?this.valueSeq():this)},toSetSeq:function(){return new fe(this)},toSeq:function(){return o(this)?this.toIndexedSeq():r(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Ct(r(this)?this.valueSeq():this)},toList:function(){return Be(r(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(A,e){return 0===this.size?A+e:A+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){var e=A.call(arguments,0);return ve(this,Je(this,e))},includes:function(A){return this.some((function(e){return sA(e,A)}))},entries:function(){return this.__iterator(2)},every:function(A,e){NA(this.size);var t=!0;return this.__iterate((function(i,B,n){if(!A.call(e,i,B,n))return t=!1,!1})),t},filter:function(A,e){return ve(this,ke(this,A,e,!0))},find:function(A,e,t){var i=this.findEntry(A,e);return i?i[1]:t},forEach:function(A,e){return NA(this.size),this.__iterate(e?A.bind(e):A)},join:function(A){NA(this.size),A=void 0!==A?""+A:",";var e="",t=!0;return this.__iterate((function(i){t?t=!1:e+=A,e+=null!=i?i.toString():""})),e},keys:function(){return this.__iterator(0)},map:function(A,e){return ve(this,ye(this,A,e))},reduce:function(A,e,t){var i,B;return NA(this.size),arguments.length<2?B=!0:i=e,this.__iterate((function(e,n,s){B?(B=!1,i=e):i=A.call(t,i,e,n,s)})),i},reduceRight:function(A,e,t){var i=this.toKeyedSeq().reverse();return i.reduce.apply(i,arguments)},reverse:function(){return ve(this,He(this,!0))},slice:function(A,e){return ve(this,Re(this,A,e,!0))},some:function(A,e){return!this.every(Ut(A),e)},sort:function(A){return ve(this,Se(this,A))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(A,e){return M(A?this.toSeq().filter(A,e):this)},countBy:function(A,e){return function(A,e,t){var i=GA().asMutable();return A.__iterate((function(B,n){i.update(e.call(t,B,n,A),0,(function(A){return A+1}))})),i.asImmutable()}(this,A,e)},equals:function(A){return rA(this,A)},entrySeq:function(){var A=this;if(A._cache)return new O(A._cache);var e=A.toSeq().map(pt).toIndexedSeq();return e.fromEntrySeq=function(){return A.toSeq()},e},filterNot:function(A,e){return this.filter(Ut(A),e)},findEntry:function(A,e,t){var i=t;return this.__iterate((function(t,B,n){if(A.call(e,t,B,n))return i=[B,t],!1})),i},findKey:function(A,e){var t=this.findEntry(A,e);return t&&t[0]},findLast:function(A,e,t){return this.toKeyedSeq().reverse().find(A,e,t)},findLastEntry:function(A,e,t){return this.toKeyedSeq().reverse().findEntry(A,e,t)},findLastKey:function(A,e){return this.toKeyedSeq().reverse().findKey(A,e)},first:function(){return this.find(D)},flatMap:function(A,e){return ve(this,function(A,e,t){var i=We(A);return A.toSeq().map((function(B,n){return i(e.call(t,B,n,A))})).flatten(!0)}(this,A,e))},flatten:function(A){return ve(this,Te(this,A,!0))},fromEntrySeq:function(){return new Ne(this)},get:function(A,e){return this.find((function(e,t){return sA(t,A)}),void 0,e)},getIn:function(A,e){for(var t,i=this,B=Xe(A);!(t=B.next()).done;){var n=t.value;if((i=i&&i.get?i.get(n,C):C)===C)return e}return i},groupBy:function(A,e){return function(A,e,t){var i=r(A),B=(a(A)?Ye():GA()).asMutable();A.__iterate((function(n,s){B.update(e.call(t,n,s,A),(function(A){return(A=A||[]).push(i?[s,n]:n),A}))}));var n=We(A);return B.map((function(e){return ve(A,n(e))}))}(this,A,e)},has:function(A){return this.get(A,C)!==C},hasIn:function(A){return this.getIn(A,C)!==C},isSubset:function(A){return A="function"==typeof A.includes?A:t(A),this.every((function(e){return A.includes(e)}))},isSuperset:function(A){return(A="function"==typeof A.isSubset?A:t(A)).isSubset(this)},keyOf:function(A){return this.findKey((function(e){return sA(e,A)}))},keySeq:function(){return this.toSeq().map(mt).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(A){return this.toKeyedSeq().reverse().keyOf(A)},max:function(A){return be(this,A)},maxBy:function(A,e){return be(this,e,A)},min:function(A){return be(this,A?ft(A):yt)},minBy:function(A,e){return be(this,e?ft(e):yt,A)},rest:function(){return this.slice(1)},skip:function(A){return this.slice(Math.max(0,A))},skipLast:function(A){return ve(this,this.toSeq().reverse().skip(A).reverse())},skipWhile:function(A,e){return ve(this,xe(this,A,e,!0))},skipUntil:function(A,e){return this.skipWhile(Ut(A),e)},sortBy:function(A,e){return ve(this,Se(this,e,A))},take:function(A){return this.slice(0,Math.max(0,A))},takeLast:function(A){return ve(this,this.toSeq().reverse().take(A).reverse())},takeWhile:function(A,e){return ve(this,function(A,e,t){var i=Oe(A);return i.__iterateUncached=function(i,B){var n=this;if(B)return this.cacheResult().__iterate(i,B);var s=0;return A.__iterate((function(A,B,r){return e.call(t,A,B,r)&&++s&&i(A,B,n)})),s},i.__iteratorUncached=function(i,B){var n=this;if(B)return this.cacheResult().__iterator(i,B);var s=A.__iterator(2,B),r=!0;return new R((function(){if(!r)return{value:void 0,done:!0};var A=s.next();if(A.done)return A;var B=A.value,o=B[0],g=B[1];return e.call(t,g,o,n)?2===i?A:x(i,o,g,A):(r=!1,{value:void 0,done:!0})}))},i}(this,A,e))},takeUntil:function(A,e){return this.takeWhile(Ut(A),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(A){if(A.size===1/0)return 0;var e=a(A),t=r(A),i=e?1:0;return function(A,e){return e=CA(e,3432918353),e=CA(e<<15|e>>>-15,461845907),e=CA(e<<13|e>>>-13,5),e=CA((e=(e+3864292196|0)^A)^e>>>16,2246822507),e=lA((e=CA(e^e>>>13,3266489909))^e>>>16)}(A.__iterate(t?e?function(A,e){i=31*i+Ht(IA(A),IA(e))|0}:function(A,e){i=i+Ht(IA(A),IA(e))|0}:e?function(A){i=31*i+IA(A)|0}:function(A){i=i+IA(A)|0}),i)}(this))}});var Ft=t.prototype;Ft[c]=!0,Ft[k]=Ft.values,Ft.__toJS=Ft.toArray,Ft.__toStringMapper=Nt,Ft.inspect=Ft.toSource=function(){return this.toString()},Ft.chain=Ft.flatMap,Ft.contains=Ft.includes,Mt(i,{flip:function(){return ve(this,Ge(this))},mapEntries:function(A,e){var t=this,i=0;return ve(this,this.toSeq().map((function(B,n){return A.call(e,[n,B],i++,t)})).fromEntrySeq())},mapKeys:function(A,e){var t=this;return ve(this,this.toSeq().flip().map((function(i,B){return A.call(e,i,B,t)})).flip())}});var Dt=i.prototype;function mt(A,e){return e}function pt(A,e){return[e,A]}function Ut(A){return function(){return!A.apply(this,arguments)}}function ft(A){return function(){return-A.apply(this,arguments)}}function Nt(A){return"string"==typeof A?JSON.stringify(A):String(A)}function Gt(){return Y(arguments)}function yt(A,e){return Ae?-1:0}function Ht(A,e){return A^e+2654435769+(A<<6)+(A>>2)|0}return Dt[Q]=!0,Dt[k]=Ft.entries,Dt.__toJS=Ft.toObject,Dt.__toStringMapper=function(A,e){return JSON.stringify(e)+": "+Nt(A)},Mt(B,{toKeyedSeq:function(){return new pe(this,!1)},filter:function(A,e){return ve(this,ke(this,A,e,!1))},findIndex:function(A,e){var t=this.findEntry(A,e);return t?t[0]:-1},indexOf:function(A){var e=this.keyOf(A);return void 0===e?-1:e},lastIndexOf:function(A){var e=this.lastKeyOf(A);return void 0===e?-1:e},reverse:function(){return ve(this,He(this,!1))},slice:function(A,e){return ve(this,Re(this,A,e,!1))},splice:function(A,e){var t=arguments.length;if(e=Math.max(0|e,0),0===t||2===t&&!e)return this;A=p(A,A<0?this.count():this.size);var i=this.slice(0,A);return ve(this,1===t?i:i.concat(Y(arguments,2),this.slice(A+e)))},findLastIndex:function(A,e){var t=this.findLastEntry(A,e);return t?t[0]:-1},first:function(){return this.get(0)},flatten:function(A){return ve(this,Te(this,A,!1))},get:function(A,e){return(A=F(this,A))<0||this.size===1/0||void 0!==this.size&&A>this.size?e:this.find((function(e,t){return t===A}),void 0,e)},has:function(A){return(A=F(this,A))>=0&&(void 0!==this.size?this.size===1/0||AA.length)return!1;for(var B=e;B=0&&o(A.charCodeAt(e));e--);return e+1},findWhiteSpaceEnd:function(A,e){for(;e{if(!e.extensionManager)return null;const t=e.extensionManager.getExtensionURLs(),i={};for(const e of A){const A=t[e];"string"==typeof A&&(i[e]=A)}return 0===Object.keys(i).length?null:i},f=function(A){const e=Object.create(null),t=new Set;for(const i in A){if(!A.hasOwnProperty(i))continue;e[i]=D(A[i]);const B=p(A[i].opcode);B&&t.add(B)}for(const A in e){const t=e[A];e[A]=m(t,e)}for(const A in e){const t=e[A];Array.isArray(t)&&[Y,M].indexOf(t[0])<0&&(g.warn("Found an unexpected top level primitive with block ID: ".concat(A,"; deleting it from serialized blocks.")),delete e[A])}return[e,Array.from(t)]},N=function(A){const e=Object.create(null);e.name=A.name;const t=A.broken||A;return e.bitmapResolution=t.bitmapResolution,e.dataFormat=t.dataFormat.toLowerCase(),e.assetId=t.assetId,e.md5ext=t.md5,e.rotationCenterX=t.rotationCenterX,e.rotationCenterY=t.rotationCenterY,e},G=function(A){const e=Object.create(null);e.name=A.name;const t=A.broken||A;return e.assetId=t.assetId,e.dataFormat=t.dataFormat.toLowerCase(),e.format=t.format,e.rate=t.rate,e.sampleCount=t.sampleCount,e.md5ext=t.md5,e},y=A=>"number"==typeof A||"string"==typeof A||"boolean"==typeof A,H=A=>{if(Array.isArray(A)){let e=null;for(let t=0;t=A.costumes.length)&&(g.warn("currentCostume property for target ".concat(A.name," is out of range")),A.currentCostume=c.clamp(A.currentCostume,0,A.costumes.length-1)),t.currentCostume=A.currentCostume,t.costumes=A.costumes.map(N),t.sounds=A.sounds.map(G),A.hasOwnProperty("volume")&&(t.volume=A.volume),A.hasOwnProperty("layerOrder")&&(t.layerOrder=A.layerOrder),t.isStage?(A.hasOwnProperty("tempo")&&(t.tempo=A.tempo),A.hasOwnProperty("videoTransparency")&&(t.videoTransparency=A.videoTransparency),A.hasOwnProperty("videoState")&&(t.videoState=A.videoState),A.hasOwnProperty("textToSpeechLanguage")&&(t.textToSpeechLanguage=A.textToSpeechLanguage)):(t.visible=A.visible,t.x=A.x,t.y=A.y,t.size=A.size,t.direction=A.direction,t.draggable=A.draggable,t.rotationStyle=A.rotationStyle),i.forEach(A=>{e.add(A)}),t},R=function(A){const e=A.map(A=>A.getLayerOrder());return c.reducedSortOrdering(e)},x=function(A,e,t){const i=(e.stageWidth-480)/2,B=(e.stageHeight-360)/2;return A.valueSeq().filter(A=>{const e=p(A.opcode);return!e||!!A.visible&&(t.add(e),!0)}).map(A=>{const e={id:A.id,mode:A.mode,opcode:A.opcode,params:A.params,spriteName:A.spriteName,value:Array.isArray(A.value)?[]:0,width:A.width,height:A.height,x:A.x-i,y:A.y-B,visible:A.visible};return"list"!==A.mode&&(e.sliderMin=A.sliderMin,e.sliderMax=A.sliderMax,e.isDiscrete=A.isDiscrete),e}).toArray()},J=function(A,e,t,i){if(!Array.isArray(A))return A;const B=Object.create(null),s=a();switch(B.id=s,B.next=null,B.parent=e,B.shadow=t,B.inputs=Object.create(null),A[0]){case 4:B.opcode="math_number",B.fields={NUM:{name:"NUM",value:A[1]}},B.topLevel=!1;break;case 5:B.opcode="math_positive_number",B.fields={NUM:{name:"NUM",value:A[1]}},B.topLevel=!1;break;case 6:B.opcode="math_whole_number",B.fields={NUM:{name:"NUM",value:A[1]}},B.topLevel=!1;break;case 7:B.opcode="math_integer",B.fields={NUM:{name:"NUM",value:A[1]}},B.topLevel=!1;break;case 8:B.opcode="math_angle",B.fields={NUM:{name:"NUM",value:A[1]}},B.topLevel=!1;break;case 9:B.opcode="colour_picker",B.fields={COLOUR:{name:"COLOUR",value:A[1]}},B.topLevel=!1;break;case 10:B.opcode="text",B.fields={TEXT:{name:"TEXT",value:A[1]}},B.topLevel=!1;break;case 11:B.opcode="event_broadcast_menu",B.fields={BROADCAST_OPTION:{name:"BROADCAST_OPTION",value:A[1],id:A[2],variableType:n.BROADCAST_MESSAGE_TYPE}},B.topLevel=!1;break;case Y:B.opcode="data_variable",B.fields={VARIABLE:{name:"VARIABLE",value:A[1],id:A[2],variableType:n.SCALAR_TYPE}},A.length>3&&(B.topLevel=!0,B.x=A[3],B.y=A[4]);break;case M:B.opcode="data_listcontents",B.fields={LIST:{name:"LIST",value:A[1],id:A[2],variableType:n.LIST_TYPE}},A.length>3&&(B.topLevel=!0,B.x=A[3],B.y=A[4]);break;default:return g.error("Found unknown primitive type during deserialization: ".concat(JSON.stringify(A))),null}return i[s]=B,s},T=function(A,e,t){const i={};for(const B in A){if(!u.call(A,B))continue;const n=A[B];if(!Array.isArray(n))continue;let s=null,r=null;const o=n[0];1===o?s=r=J(n[1],e,!0,t):2===o?s=J(n[1],e,!1,t):(s=J(n[1],e,!1,t),r=J(n[2],e,!0,t)),i[B]={name:B,block:s,shadow:r}}return i},S=function(A){const e={};for(const t in A){if(!u.call(A,t))continue;const i=A[t];Array.isArray(i)&&(e[t]={name:t,value:i[0]},i.length>1&&(e[t].id=i[1]),"BROADCAST_OPTION"===t?e[t].variableType=n.BROADCAST_MESSAGE_TYPE:"VARIABLE"===t?e[t].variableType=n.SCALAR_TYPE:"LIST"===t&&(e[t].variableType=n.LIST_TYPE))}return e},b=function(A){for(const e in A){if(!Object.prototype.hasOwnProperty.call(A,e))continue;const t=A[e];Array.isArray(t)?(delete A[e],J(t,null,!1,A)):(t.id=e,t.inputs=T(t.inputs,e,A),t.fields=S(t.fields))}return A};A.exports={serialize:function(A,e){let{allowOptimization:t=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=Object.create(null),B=new Set,n=e?[A.getTargetById(e)]:A.targets.filter(A=>A.isOriginal),s=R(n),r=n.map(A=>A.toJSON());A.renderer&&!e&&r.forEach((A,e)=>{A.layerOrder=s[e]});const o=r.map(A=>k(A,B)),g=A.fontManager.serializeJSON();if(e){const e=o[0];B.size&&(e.extensions=Array.from(B));const t=U(B,A);return t&&(e.extensionURLs=t),g&&(e.customFonts=g),o[0]}i.targets=o,i.monitors=x(A.getMonitorState(),A,B),i.extensions=Array.from(B);const a=U(B,A);a&&(i.extensionURLs=a),g&&(i.customFonts=g);const c=Object.create(null);return c.semver="3.0.0",c.vm="0.2.0",A.origin&&(c.origin=A.origin),c.agent="",i.meta=c,t&&w(i),i},deserialize:function(A,e,t,a){const w={extensionIDs:new Set,extensionURLs:new Map};if(A.meta&&A.meta.origin?e.origin=A.meta.origin:e.origin=null,A.extensionURLs)for(const[e,t]of Object.entries(A.extensionURLs))w.extensionURLs.set(e,t);let u;u=A.customFonts?e.fontManager.deserialize(A.customFonts,t,a):Promise.resolve();const d=((a?[A]:A.targets)||[]).map((A,e)=>Object.assign(A,{targetPaneOrder:e})).sort((A,e)=>A.layerOrder-e.layerOrder),Y=A.monitors||[];return u.then(()=>d.map(A=>function(A,e,t){if(!A.hasOwnProperty("name"))return Promise.resolve(null);const i={costumePromises:null,soundPromises:null,soundBank:e.audioEngine&&e.audioEngine.createBank()};return i.costumePromises=(A.costumes||[]).map(A=>{const i={asset:A.asset,assetId:A.assetId,skinId:null,name:A.name,bitmapResolution:A.bitmapResolution,rotationCenterX:A.rotationCenterX,rotationCenterY:A.rotationCenterY},B=A.dataFormat||A.assetType&&A.assetType.runtimeFormat||"png",n=A.hasOwnProperty("md5ext")?A.md5ext:"".concat(A.assetId,".").concat(B);return i.md5=n,i.dataFormat=B,I(i,e,t).then(()=>C(n,i,e))}),i.soundPromises=(A.sounds||[]).map(A=>{const B={assetId:A.assetId,format:A.format,rate:A.rate,sampleCount:A.sampleCount,name:A.name,md5:A.md5ext,dataFormat:A.dataFormat,data:null};return h(B,e,t).then(()=>l(B,e,i.soundBank))}),i}(A,e,t))).then(A=>Promise.resolve(A)).then(A=>Promise.all(d.map((t,r)=>function(A,e,t,r,g){if(!A.hasOwnProperty("name"))return Promise.resolve(null);const a=new i(e),Q=new B(a,e);if(A.hasOwnProperty("name")&&(Q.name=A.name),A.hasOwnProperty("blocks")){b(A.blocks);for(const e in A.blocks){if(!A.blocks.hasOwnProperty(e))continue;const i=A.blocks[e];a.createBlock(i);const B=p(i.opcode);B&&t.extensionIDs.add(B)}}const{costumePromises:E}=g,{soundBank:w,soundPromises:C}=g,l=Q.createClone(A.isStage?o.BACKGROUND_LAYER:o.SPRITE_LAYER);if(A.hasOwnProperty("tempo")&&(l.tempo=A.tempo),A.hasOwnProperty("volume")&&(l.volume=A.volume),A.hasOwnProperty("videoTransparency")&&(l.videoTransparency=A.videoTransparency),A.hasOwnProperty("videoState")&&(l.videoState=A.videoState),A.hasOwnProperty("textToSpeechLanguage")&&(l.textToSpeechLanguage=A.textToSpeechLanguage),A.hasOwnProperty("variables"))for(const t in A.variables){const i=A.variables[t],B=3===i.length&&i[2]&&A.isStage&&e.canAddCloudVariable(),s=new n(t,i[0],n.SCALAR_TYPE,B);B&&e.addCloudVariable(),s.value=i[1],l.variables[s.id]=s}if(A.hasOwnProperty("lists"))for(const e in A.lists){const t=A.lists[e],i=new n(e,t[0],n.LIST_TYPE,!1);i.value=t[1],l.variables[i.id]=i}if(A.hasOwnProperty("broadcasts"))for(const e in A.broadcasts){const t=A.broadcasts[e],i=new n(e,t,n.BROADCAST_MESSAGE_TYPE,!1);l.variables[i.id]=i}if(A.hasOwnProperty("comments"))for(const e in A.comments){const t=A.comments[e],i=new s(e,t.text,t.x,t.y,t.width,t.height,t.minimized);t.blockId&&(i.blockId=t.blockId),l.comments[i.id]=i}return A.hasOwnProperty("x")&&(l.x=A.x),A.hasOwnProperty("y")&&(l.y=A.y),A.hasOwnProperty("direction")&&(l.direction=A.direction),A.hasOwnProperty("size")&&(l.size=A.size),A.hasOwnProperty("visible")&&(l.visible=A.visible),A.hasOwnProperty("currentCostume")&&(l.currentCostume=c.clamp(A.currentCostume,0,A.costumes.length-1)),A.hasOwnProperty("rotationStyle")&&(l.rotationStyle=A.rotationStyle),A.hasOwnProperty("isStage")&&(l.isStage=A.isStage),A.hasOwnProperty("targetPaneOrder")&&(l.targetPaneOrder=A.targetPaneOrder),A.hasOwnProperty("draggable")&&(l.draggable=A.draggable),Promise.all(E).then(A=>{Q.costumes=A}),Promise.all(C).then(A=>{Q.sounds=A,Q.soundBank=w||null}),Promise.all(E.concat(C)).then(()=>l)}(t,e,w,0,A[r])))).then(A=>A.map((A,e)=>(A.layerOrder=e,A)).sort((A,e)=>A.targetPaneOrder-e.targetPaneOrder).map(A=>(delete A.targetPaneOrder,A))).then(A=>function(A){const e=E.getAllVarRefsForTargets(A,!0);A.forEach(A=>{Object.keys(A.variables).forEach(e=>{const t=Q.replaceUnsafeChars(e);t!==e&&(A.variables[e].id=t,A.variables[t]=A.variables[e],delete A.variables[e])})});for(const A in e){const t=Q.replaceUnsafeChars(A);A!==t&&E.updateVariableIdentifiers(e[A],t)}return A}(A)).then(A=>(Y.map(t=>function(A,e,t,i){const B=(e.stageWidth-480)/2,s=(e.stageHeight-360)/2;if(A.x+=B,A.y+=s,A.x=c.clamp(A.x,0,e.stageWidth),A.y=c.clamp(A.y,0,e.stageHeight),A.spriteName){const e=t.filter(e=>e.sprite.name===A.spriteName);e&&e.length>0?A.targetId=e[0].id:g.warn("Tried to deserialize sprite specific monitor ".concat(A.opcode," but could not find sprite ").concat(A.spriteName,"."))}const o=e.monitorBlockInfo[A.opcode];if("data_listcontents"===A.opcode){const e=A.targetId?t.find(e=>e.id===A.targetId):t.find(A=>A.isStage);e&&Object.prototype.hasOwnProperty.call(e.variables,A.id)&&(A.params.LIST=e.variables[A.id].name)}const a={};for(const e in A.params){const t={name:e,value:A.params[e]};a[e]=t}"data_variable"!==A.opcode&&"data_listcontents"!==A.opcode&&o&&o.isSpriteSpecific?A.id=o.getId(A.targetId,a):A.id=Q.replaceUnsafeChars(A.id);const E=e.monitorBlocks._blocks[A.id];if(E)E.isMonitored=A.visible,E.targetId=A.targetId;else{const t={id:A.id,opcode:A.opcode,inputs:{},fields:a,topLevel:!0,next:null,parent:null,shadow:!1,x:0,y:0,isMonitored:A.visible,targetId:A.targetId};if("data_variable"===A.opcode){const e=t.fields.VARIABLE;e.id=A.id,e.variableType=n.SCALAR_TYPE}else if("data_listcontents"===A.opcode){const e=t.fields.LIST;e.id=A.id,e.variableType=n.LIST_TYPE}e.monitorBlocks.createBlock(t);const B=p(t.opcode);B&&i.extensionIDs.add(B)}e.requestAddMonitor(r(A))}(t,e,A,w)),A)).then(A=>({targets:A,extensions:w}))},deserializeBlocks:b,serializeBlocks:f,deserializeStandaloneBlocks:A=>{if((A=JSON.parse(JSON.stringify(A))).extensionURLs){const e=new Map;for(const[t,i]of Object.entries(A.extensionURLs))e.set(t,i);return{blocks:A.blocks,extensionURLs:e}}return{blocks:A,extensionURLs:new Map}},serializeStandaloneBlocks:(A,e)=>{const t=new Set;for(const e of A){const A=p(e.opcode);A&&t.add(A)}const i=U(t,e);return i?{blocks:A,extensionURLs:i}:A},getExtensionIdForOpcode:p}},function(A,e,t){const i=t(11),B=t(41),n=t(403);A.exports=class{constructor(A,e){this._renderer=e,this._id=A,this._rotationCenter=i.v3.create(0,0),this._texture=null,this._uniforms={u_skinSize:[0,0],u_skin:null},this._silhouette=new n,this.private=!1}dispose(){this._id=B.ID_NONE}get id(){return this._id}get rotationCenter(){return this._rotationCenter}get size(){return[0,0]}useNearest(A,e){return!0}calculateRotationCenter(){return[this.size[0]/2,this.size[1]/2]}getTexture(A){return this._emptyImageTexture}getFenceBounds(A,e){return A.getAABB(e)}getUniforms(A){return this._uniforms.u_skin=this.getTexture(A),this._uniforms.u_skinSize=this.size,this._uniforms}emitWasAltered(){this._renderer.skinWasAltered(this)}updateSilhouette(){this._silhouette.unlazy()}_setTexture(A){const e=this._renderer.gl;e.bindTexture(e.TEXTURE_2D,this._texture),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,A),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),this._silhouette.update(A)}setEmptyImageData(){if(this._texture=null,!this._emptyImageData){this._emptyImageData=new ImageData(1,1);const A=this._renderer.gl,e={auto:!0,wrap:A.CLAMP_TO_EDGE,src:this._emptyImageData};this._emptyImageTexture=i.createTexture(A,e)}this._rotationCenter[0]=0,this._rotationCenter[1]=0,this._silhouette.update(this._emptyImageData),this.emitWasAltered()}isTouchingNearest(A){return this._silhouette.isTouchingNearest(A)}isTouchingLinear(A){return this._silhouette.isTouchingLinear(A)}}},function(A,e,t){const i=t(11);class B{constructor(A){this._gl=A,this._shaderCache={};for(const A in B.DRAW_MODE)Object.prototype.hasOwnProperty.call(B.DRAW_MODE,A)&&(this._shaderCache[A]=[])}getShader(A,e){const t=this._shaderCache[A];A===B.DRAW_MODE.silhouette&&(e&=~(B.EFFECT_INFO.color.mask|B.EFFECT_INFO.brightness.mask));let i=t[e];return i||(i=t[e]=this._buildShader(A,e)),i}_buildShader(A,e){const n=B.EFFECTS.length,s=["#define DRAW_MODE_".concat(A)];for(let A=0;AA/200%1,shapeChanges:!1},fisheye:{uniformName:"u_fisheye",mask:2,converter:A=>Math.max(0,(A+100)/100),shapeChanges:!0},whirl:{uniformName:"u_whirl",mask:4,converter:A=>-A*Math.PI/180,shapeChanges:!0},pixelate:{uniformName:"u_pixelate",mask:8,converter:A=>Math.abs(A)/10,shapeChanges:!0},mosaic:{uniformName:"u_mosaic",mask:16,converter:A=>(A=Math.round((Math.abs(A)+10)/10),Math.max(1,Math.min(A,512))),shapeChanges:!0},brightness:{uniformName:"u_brightness",mask:32,converter:A=>Math.max(-100,Math.min(A,100))/100,shapeChanges:!1},ghost:{uniformName:"u_ghost",mask:64,converter:A=>1-Math.max(0,Math.min(A,100))/100,shapeChanges:!1}},B.EFFECTS=Object.keys(B.EFFECT_INFO),B.DRAW_MODE={default:"default",straightAlpha:"straightAlpha",silhouette:"silhouette",colorMask:"colorMask",line:"line",background:"background"},A.exports=B},function(A,e,t){"use strict";(function(A){!function(A){function e(){}function t(){}var i=String.fromCharCode,B={}.toString,n=B.call(A.SharedArrayBuffer),s=B(),r=A.Uint8Array,o=r||Array,g=r?ArrayBuffer:o,a=g.isView||function(A){return A&&"length"in A},c=B.call(g.prototype);g=t.prototype;var Q=A.TextEncoder,E=new(r?Uint16Array:o)(32);e.prototype.decode=function(A){if(!a(A)){var e=B.call(A);if(e!==c&&e!==n&&e!==s)throw TypeError("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");A=r?new o(A):A||[]}for(var t,g,Q,w=e="",C=0,l=0|A.length,I=l-32|0,h=0,u=0,d=0,Y=-1;C>4){case 15:if(2!=(Q=255&A[C=C+1|0])>>6||247>6?u+4|0:24,g=g+256&768;case 13:case 12:h<<=6,h|=(31&g)<<6|63&(Q=255&A[C=C+1|0]),u=u+7|0,C>6&&h>>u&&1114112>h?(g=h,0<=(h=h-65536|0)&&(Y=55296+(h>>10)|0,g=56320+(1023&h)|0,31>d?(E[d]=Y,d=d+1|0,Y=-1):(Q=Y,Y=g,g=Q))):(C=C-(g>>=8)-1|0,g=65533),h=u=0,t=C<=I?32:l-C|0;default:E[d]=g;continue;case 11:case 10:case 9:case 8:}E[d]=65533}if(w+=i(E[0],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],E[16],E[17],E[18],E[19],E[20],E[21],E[22],E[23],E[24],E[25],E[26],E[27],E[28],E[29],E[30],E[31]),32>d&&(w=w.slice(0,d-32|0)),C>>31,Y=-1,w.length=s)i[B]=s;else{if(2047>=s)i[B]=192|s>>6;else{A:{if(55296<=s)if(56319>=s){var g=0|A.charCodeAt(e=e+1|0);if(56320<=g&&57343>=g){if(65535<(s=(s<<10)+g-56613888|0)){i[B]=240|s>>18,i[B=B+1|0]=128|s>>12&63,i[B=B+1|0]=128|s>>6&63,i[B=B+1|0]=128|63&s;continue}break A}s=65533}else 57343>=s&&(s=65533);!n&&e<<1>12,i[B=B+1|0]=128|s>>6&63}i[B=B+1|0]=128|63&s}}return r?i.subarray(0,B):i.slice(0,B)},Q||(A.TextDecoder=e,A.TextEncoder=t)}(""+void 0==typeof A?""+void 0==typeof self?this:self:A)}).call(this,t(9))},function(A,e,t){const i=t(75);A.exports=class extends i{constructor(A,e,t,i){let B=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;super(),this._socket=A.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=i,this._connected=!1,this._characteristicDidChangeCallback=null,this._resetCallback=B,this._discoverTimeoutID=null,this._extensionId=e,this._peripheralOptions=t,this._runtime=A,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(A=>{this._handleRequestError(A)})}connectPeripheral(A){this.sendRemoteRequest("connect",{peripheralId:A}).then(()=>{this._connected=!0,this._runtime.emit(this._runtime.constructor.PERIPHERAL_CONNECTED),this._connectCallback()}).catch(A=>{this._handleRequestError(A)})}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(A,e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const i={serviceId:A,characteristicId:e};return this._characteristicDidChangeCallback=t,this.sendRemoteRequest("startNotifications",i).catch(A=>{this.handleDisconnectError(A)})}read(A,e){let t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const i={serviceId:A,characteristicId:e};return arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&(i.startNotifications=!0),t&&(this._characteristicDidChangeCallback=t),this.sendRemoteRequest("read",i).catch(A=>{this.handleDisconnectError(A)})}write(A,e,t){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,B=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;const n={serviceId:A,characteristicId:e,message:t};return i&&(n.encoding=i),null!==B&&(n.withResponse=B),this.sendRemoteRequest("write",n).catch(A=>{this.handleDisconnectError(A)})}didReceiveCall(A,e){switch(A){case"didDiscoverPeripheral":this._availablePeripherals[e.peripheralId]=e,this._runtime.emit(this._runtime.constructor.PERIPHERAL_LIST_UPDATE,this._availablePeripherals),this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID);break;case"userDidPickPeripheral":this._availablePeripherals[e.peripheralId]=e,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(e.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(A,e,t){const i=t(1);A.exports=function(A){if("string"!=typeof A){if(!Array.isArray(A))return i.error("Unexpected input recieved in replaceUnsafeChars"),A;A=String(A)}return A.replace(/[<>&'"]/g,A=>{switch(A){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return"""}})}},function(A,e,t){const i=t(1),B=[];class n{constructor(A){this.isLoop=!1,this.warpMode=A,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 A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.warpMode;return this.reset(),this.warpMode=Boolean(A),this}static create(A){const e=B.pop();return void 0!==e?(e.warpMode=Boolean(A),e):new n(A)}static release(A){void 0!==A&&B.push(A.reset())}}class s{constructor(A){this.topBlock=A,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(A,e){return"".concat(A.id,"&").concat(e)}getId(){return s.getIdFromTargetAndBlock(this.target,this.topBlock)}pushStack(A){if(this.stack.push(A),this.stack.length>this.stackFrames.length){const A=this.stackFrames[this.stackFrames.length-1];this.stackFrames.push(n.create(void 0!==A&&A.warpMode))}}reuseStackForNextBlock(A){this.stack[this.stack.length-1]=A,this.stackFrames[this.stackFrames.length-1].reuse()}popStack(){return n.release(this.stackFrames.pop()),this.stack.pop()}stopThisScript(){let A=this.peekStack();for(;null!==A;){const e=this.target.blocks.getBlock(A);if(void 0!==e&&"procedures_call"===e.opcode||this.peekStackFrame().waitingReporter)break;this.popStack(),A=this.peekStack()}0===this.stack.length&&(this.requestScriptGlowInFrame=!1,this.status=s.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(A){this.justReported=void 0===A?null:A}initParams(){const A=this.peekStackFrame();null===A.params&&(A.params={})}pushParam(A,e){this.peekStackFrame().params[A]=e}getParam(A){for(let e=this.stackFrames.length-1;e>=0;e--){const t=this.stackFrames[e];if(null!==t.params)return t.params.hasOwnProperty(A)?t.params[A]:null}return null}getAllparams(){return this.peekStackFrame().params}atStackTop(){return this.peekStack()===this.topBlock}goToNextBlock(){const A=this.target.blocks.getNextBlock(this.peekStack());this.reuseStackForNextBlock(A)}isRecursiveCall(A){let e=5;for(let t=this.stackFrames.length-1-1;t>=0;t--){const i=this.target.blocks.getBlock(this.stackFrames[t].op.id);if("procedures_call"===i.opcode&&i.mutation.proccode===A)return!0;if(--e<0)return!1}return!1}tryCompile(){if(!this.blockContainer)return;const A=t(232);this.triedToCompile=!0;const e=!this.stackClick,B=this.topBlock,n=this.blockContainer.getBlock(B)?this.blockContainer:this.target.runtime.flyoutBlocks,s=e&&n.getCachedCompileResult(B);if(s&&!s.success)return;let r;if(s)r=s.value;else try{r=A(this),e&&n.cacheCompileResult(B,r)}catch(A){return i.error("cannot compile script",this.target.getName(),A),e&&n.cacheCompileError(B,A),void this.target.runtime.emitCompileError(this.target,A)}this.procedures={};for(const A of Object.keys(r.procedures))this.procedures[A]=r.procedures[A](this);this.generator=r.startingFunction(this)(),this.executableHat=r.executableHat,this.blockContainer.forceNoGlow||(this.blockGlowInFrame=this.topBlock,this.requestScriptGlowInFrame=!0),this.isCompiled=!0}}A.exports=s},function(A,e,t){const i=t(7),B=t(1),n=function(A,e,t,i){return A.assetId=e.assetId,t.audioEngine?t.audioEngine.decodeSoundPlayer(Object.assign({},A,{data:e.data})).then(e=>{A.soundId=e.id;const B=e.buffer;return A.rate=B.sampleRate,A.sampleCount=B.length,null!==i&&i.addSoundPlayer(e),t.isPackaged&&(A.asset=null),A}):(B.warn("No audio engine present; cannot load sound asset: ",A.md5),Promise.resolve(A))},s=function(A,e,t){const i=A.asset,B=A.assetId,s=A.sampleCount,r=A.rate,o=A.format,g=A.dataFormat;return A.assetId=e.storage.defaultAssetId.Sound,A.asset=e.storage.get(A.assetId),A.md5="".concat(A.assetId,".").concat(A.asset.dataFormat),n(A,A.asset,e,t).then(A=>(A.broken={},A.broken.assetId=B,A.broken.md5="".concat(B,".").concat(g),A.broken.asset=i,A.broken.sampleCount=s,A.broken.rate=r,A.broken.format=o,A.broken.dataFormat=g,A))};A.exports={loadSound:function(A,e,t){if(!e.storage)return B.warn("No storage module present; cannot load sound asset: ",A.md5),Promise.resolve(A);const r=i.splitFirst(A.md5,"."),o=r[0],g=r[1].toLowerCase();return A.dataFormat=g,(A.asset&&Promise.resolve(A.asset)||e.storage.load(e.storage.AssetType.Sound,o,g)).then(i=>(A.asset=i,i?n(A,i,e,t):(B.warn("Failed to find sound data: ",A.md5),s(A,e,t)))).catch(i=>(B.warn("Failed to load sound: ".concat(A.md5," with error: ").concat(i)),s(A,e,t)))},loadSoundFromAsset:n}},function(A,e,t){const i=t(7),B=t(1),n=t(89),{loadSvgString:s,serializeSvgToString:r}=t(65),{parseVectorMetadata:o}=t(111),g=function(A,e,t,i){return new Promise(B=>{let n=A.asset.decodeText();if(void 0===t){const e=o(n);e&&(t=e,A.rotationCenterX=t[0],A.rotationCenterY=t[1])}if(i&&2===i){const t=r(s(n,!0));if(n!==t){n=t;const i=e.storage;A.asset.encodeTextData(t,i.DataFormat.SVG,!0),A.assetId=A.asset.assetId,A.md5="".concat(A.assetId,".").concat(A.dataFormat)}}A.skinId=e.renderer.createSVGSkin(n,t),A.size=e.renderer.getSkinSize(A.skinId),t||(t=e.renderer.getSkinRotationCenter(A.skinId),A.rotationCenterX=t[0],A.rotationCenterY=t[1],A.bitmapResolution=1),e.isPackaged&&(A.asset=null),B(A)})},a=new class{constructor(){this.pool=[],this.clearSoon=null}clear(){this.clearSoon||(this.clearSoon=new Promise(A=>setTimeout(A,1e3)).then(()=>{this.pool.length=0,this.clearSoon=null}))}create(){return this.pool.pop()||document.createElement("canvas")}release(A){this.clear(),this.pool.push(A)}},c=A=>new Promise((e,t)=>{const i=new Image;i.onload=function(){e(i),i.onload=null,i.onerror=null},i.onerror=function(){t(new Error("Costume load failed. Asset could not be read.")),i.onload=null,i.onerror=null},i.src=A}),Q=new n(async A=>{let e;for(let t=0;t<3;t++)try{if("function"==typeof createImageBitmap){const e=await createImageBitmap(new Blob([A.data.buffer],{type:A.assetType.contentType}));if(!e)throw new Error("createImageBitmap resolved with ".concat(e));return e}return await c(A.encodeDataURI())}catch(A){e||(e=A),B.warn(A),await new Promise(A=>setTimeout(A,2e3*Math.random()))}throw e},25),E=function(A,e,t){return function(A,e,t){return A&&A.asset?e.v2BitmapAdapter?Promise.all([A.asset,A.textLayerAsset].map(A=>A?Q.do(A):null)).then(i=>{let[B,n]=i;if(!B)throw new Error("Loading bitmap costume base failed.");const s=1===A.bitmapResolution?2:1;let r,o;if(n){o=a.create(),o.width=B.width,o.height=B.height;const A=o.getContext("2d");A.drawImage(B,0,0),A.drawImage(n,0,0),r=o}else r=B;return 1!==s&&(r=e.v2BitmapAdapter.resize(r,r.width*s,r.height*s),o&&a.release(o)),r.reusable=!1,t&&(t[0]=t[0]*s,t[1]=t[1]*s,A.rotationCenterX=t[0],A.rotationCenterY=t[1]),A.bitmapResolution=2,delete A.textLayerMD5,delete A.textLayerAsset,{image:r,rotationCenter:t,assetMatchesBase:1===s&&!n}}).finally(()=>{delete A.textLayerMD5,delete A.textLayerAsset}):Promise.reject("No V2 Bitmap adapter present."):Promise.reject("Costume load failed. Assets were missing.")}(A,e,t).then(t=>(t.assetMatchesBase||function(t){if(!e.v2BitmapAdapter)return Promise.reject("No V2 Bitmap adapter present.");const i=e.storage;A.asset=i.createAsset(i.AssetType.ImageBitmap,i.DataFormat.PNG,e.v2BitmapAdapter.convertDataURIToBinary(t),null,!0),A.dataFormat=i.DataFormat.PNG,A.assetId=A.asset.assetId,A.md5="".concat(A.assetId,".").concat(A.dataFormat)}((A=>{if(A instanceof HTMLCanvasElement)return A.toDataURL();const e=a.create();e.width=A.width,e.height=A.height;e.getContext("2d").drawImage(A,0,0);const t=e.toDataURL();return a.release(e),t})(t.image)),t)).then(t=>{let i,{image:B,rotationCenter:n}=t;n&&(i=[n[0]/2,n[1]/2]),A.skinId=e.renderer.createBitmapSkin(B,A.bitmapResolution,i);const s=e.renderer.getSkinSize(A.skinId);return A.size=[2*s[0],2*s[1]],n||(n=e.renderer.getSkinRotationCenter(A.skinId),A.rotationCenterX=2*n[0],A.rotationCenterY=2*n[1],A.bitmapResolution=2),e.isPackaged&&(A.asset=null),A})},w=function(A,e){const t=A.asset,i=A.assetId,B=A.rotationCenterX,n=A.rotationCenterY,s=A.bitmapResolution,r=A.dataFormat,o=e.storage.AssetType,a=A.dataFormat===o.ImageVector.runtimeFormat;A.assetId=a?e.storage.defaultAssetId.ImageVector:e.storage.defaultAssetId.ImageBitmap,A.asset=e.storage.get(A.assetId),A.md5="".concat(A.assetId,".").concat(A.asset.dataFormat);return(a?g(A,e):E(A,e)).then(A=>(A.broken={},A.broken.assetId=i,A.broken.md5="".concat(i,".").concat(r),A.broken.asset=t,A.broken.dataFormat=r,A.broken.rotationCenterX=B,A.broken.rotationCenterY=n,A.broken.bitmapResolution=s,A))},C=function(A,e,t){A.assetId=A.asset.assetId;if(!e.renderer)return B.warn("No rendering module present; cannot load costume: ",A.name),Promise.resolve(A);const i=e.storage.AssetType;let n;return"number"!=typeof A.rotationCenterX||isNaN(A.rotationCenterX)||"number"!=typeof A.rotationCenterY||isNaN(A.rotationCenterY)||(n=[A.rotationCenterX,A.rotationCenterY]),A.asset.assetType.runtimeFormat===i.ImageVector.runtimeFormat?g(A,e,n,t).catch(t=>(B.warn("Error loading vector image: ".concat(t)),w(A,e))):E(A,e,n).catch(t=>(B.warn("Error loading bitmap image: ".concat(t)),w(A,e)))};A.exports={loadCostume:function(A,e,t,n){const s=i.splitFirst(A,"."),r=s[0],o=s[1].toLowerCase();if(e.dataFormat=o,e.asset)return C(e,t,n);if(!t.storage)return B.warn("No storage module present; cannot load costume asset: ",A),Promise.resolve(e);if(!t.storage.defaultAssetId)return B.warn("No default assets found"),Promise.resolve(e);const g=t.storage.AssetType,a="svg"===o?g.ImageVector:g.ImageBitmap,c=t.storage.load(a,r,o);let Q;return Q=e.textLayerMD5?t.storage.load(g.ImageBitmap,e.textLayerMD5,"png"):Promise.resolve(null),Promise.all([c,Q]).then(A=>A[0]?(e.asset=A[0],A[1]&&(e.textLayerAsset=A[1]),C(e,t,n)):w(e,t)).catch(A=>(B.warn("Error loading costume: ",A),w(e,t)))},loadCostumeFromAsset:C}},function(A,e,t){ /*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */ -A.exports=function(){"use strict";var A=Object.hasOwnProperty,e=Object.setPrototypeOf,t=Object.isFrozen,i=Object.getPrototypeOf,B=Object.getOwnPropertyDescriptor,n=Object.freeze,s=Object.seal,r=Object.create,o="undefined"!=typeof Reflect&&Reflect,g=o.apply,a=o.construct;g||(g=function(A,e,t){return A.apply(e,t)}),n||(n=function(A){return A}),s||(s=function(A){return A}),a||(a=function(A,e){return new(Function.prototype.bind.apply(A,[null].concat(function(A){if(Array.isArray(A)){for(var e=0,t=Array(A.length);e1?t-1:0),B=1;B/gm),b=s(/^data-[\-\w.\u00B7-\uFFFF]/),j=s(/^aria-[\-\w]+$/),z=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),v=s(/^(?:\w+script|data):/i),L=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A};function W(A){if(Array.isArray(A)){for(var e=0,t=Array(A.length);e0&&void 0!==arguments[0]?arguments[0]:O(),t=function(e){return A(e)};if(t.version="2.2.7",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;var i=e.document,B=e.document,s=e.DocumentFragment,r=e.HTMLTemplateElement,o=e.Node,g=e.Element,a=e.NodeFilter,c=e.NamedNodeMap,M=void 0===c?e.NamedNodeMap||e.MozNamedAttrMap:c,K=e.Text,X=e.Comment,_=e.DOMParser,Z=e.trustedTypes,q=g.prototype,$=m(q,"cloneNode"),AA=m(q,"nextSibling"),eA=m(q,"childNodes"),tA=m(q,"parentNode");if("function"==typeof r){var iA=B.createElement("template");iA.content&&iA.content.ownerDocument&&(B=iA.content.ownerDocument)}var BA=V(Z,i),nA=BA&&TA?BA.createHTML(""):"",sA=B,rA=sA.implementation,oA=sA.createNodeIterator,gA=sA.getElementsByTagName,aA=sA.createDocumentFragment,cA=i.importNode,QA={};try{QA=D(B).documentMode?B.documentMode:{}}catch(A){}var EA={};t.isSupported="function"==typeof tA&&rA&&void 0!==rA.createHTMLDocument&&9!==QA;var wA=T,CA=S,lA=b,IA=j,hA=v,uA=L,dA=z,YA=null,MA=F({},[].concat(W(p),W(U),W(f),W(G),W(H))),FA=null,DA=F({},[].concat(W(R),W(k),W(x),W(J))),mA=null,pA=null,UA=!0,fA=!0,NA=!1,GA=!1,yA=!1,HA=!1,RA=!1,kA=!1,xA=!1,JA=!0,TA=!1,SA=!0,bA=!0,jA=!1,zA={},vA=F({},["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"]),LA=null,PA=F({},["audio","video","img","source","image","track"]),WA=null,OA=F({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),VA=null,KA=B.createElement("form"),XA=function(A){VA&&VA===A||(A&&"object"===(void 0===A?"undefined":P(A))||(A={}),A=D(A),YA="ALLOWED_TAGS"in A?F({},A.ALLOWED_TAGS):MA,FA="ALLOWED_ATTR"in A?F({},A.ALLOWED_ATTR):DA,WA="ADD_URI_SAFE_ATTR"in A?F(D(OA),A.ADD_URI_SAFE_ATTR):OA,LA="ADD_DATA_URI_TAGS"in A?F(D(PA),A.ADD_DATA_URI_TAGS):PA,mA="FORBID_TAGS"in A?F({},A.FORBID_TAGS):{},pA="FORBID_ATTR"in A?F({},A.FORBID_ATTR):{},zA="USE_PROFILES"in A&&A.USE_PROFILES,UA=!1!==A.ALLOW_ARIA_ATTR,fA=!1!==A.ALLOW_DATA_ATTR,NA=A.ALLOW_UNKNOWN_PROTOCOLS||!1,GA=A.SAFE_FOR_TEMPLATES||!1,yA=A.WHOLE_DOCUMENT||!1,kA=A.RETURN_DOM||!1,xA=A.RETURN_DOM_FRAGMENT||!1,JA=!1!==A.RETURN_DOM_IMPORT,TA=A.RETURN_TRUSTED_TYPE||!1,RA=A.FORCE_BODY||!1,SA=!1!==A.SANITIZE_DOM,bA=!1!==A.KEEP_CONTENT,jA=A.IN_PLACE||!1,dA=A.ALLOWED_URI_REGEXP||dA,GA&&(fA=!1),xA&&(kA=!0),zA&&(YA=F({},[].concat(W(H))),FA=[],!0===zA.html&&(F(YA,p),F(FA,R)),!0===zA.svg&&(F(YA,U),F(FA,k),F(FA,J)),!0===zA.svgFilters&&(F(YA,f),F(FA,k),F(FA,J)),!0===zA.mathMl&&(F(YA,G),F(FA,x),F(FA,J))),A.ADD_TAGS&&(YA===MA&&(YA=D(YA)),F(YA,A.ADD_TAGS)),A.ADD_ATTR&&(FA===DA&&(FA=D(FA)),F(FA,A.ADD_ATTR)),A.ADD_URI_SAFE_ATTR&&F(WA,A.ADD_URI_SAFE_ATTR),bA&&(YA["#text"]=!0),yA&&F(YA,["html","head","body"]),YA.table&&(F(YA,["tbody"]),delete mA.tbody),n&&n(A),VA=A)},_A=F({},["mi","mo","mn","ms","mtext"]),ZA=F({},["foreignobject","desc","title","annotation-xml"]),qA=F({},U);F(qA,f),F(qA,N);var $A=F({},G);F($A,y);var Ae="http://www.w3.org/1998/Math/MathML",ee="http://www.w3.org/2000/svg",te="http://www.w3.org/1999/xhtml",ie=function(A){var e=tA(A);e&&e.tagName||(e={namespaceURI:te,tagName:"template"});var t=C(A.tagName),i=C(e.tagName);if(A.namespaceURI===ee)return e.namespaceURI===te?"svg"===t:e.namespaceURI===Ae?"svg"===t&&("annotation-xml"===i||_A[i]):Boolean(qA[t]);if(A.namespaceURI===Ae)return e.namespaceURI===te?"math"===t:e.namespaceURI===ee?"math"===t&&ZA[i]:Boolean($A[t]);if(A.namespaceURI===te){if(e.namespaceURI===ee&&!ZA[i])return!1;if(e.namespaceURI===Ae&&!_A[i])return!1;var B=F({},["title","style","font","a","script"]);return!$A[t]&&(B[t]||!qA[t])}return!1},Be=function(A){w(t.removed,{element:A});try{A.parentNode.removeChild(A)}catch(e){try{A.outerHTML=nA}catch(e){A.remove()}}},ne=function(A,e){try{w(t.removed,{attribute:e.getAttributeNode(A),from:e})}catch(A){w(t.removed,{attribute:null,from:e})}if(e.removeAttribute(A),"is"===A&&!FA[A])if(kA||xA)try{Be(e)}catch(A){}else try{e.setAttribute(A,"")}catch(A){}},se=function(A){var e=void 0,t=void 0;if(RA)A=""+A;else{var i=l(A,/^[\r\n\t ]+/);t=i&&i[0]}var n=BA?BA.createHTML(A):A;try{e=(new _).parseFromString(n,"text/html")}catch(A){}if(!e||!e.documentElement){var s=(e=rA.createHTMLDocument("")).body;s.parentNode.removeChild(s.parentNode.firstElementChild),s.outerHTML=n}return A&&t&&e.body.insertBefore(B.createTextNode(t),e.body.childNodes[0]||null),gA.call(e,yA?"html":"body")[0]},re=function(A){return oA.call(A.ownerDocument||A,A,a.SHOW_ELEMENT|a.SHOW_COMMENT|a.SHOW_TEXT,(function(){return a.FILTER_ACCEPT}),!1)},oe=function(A){return!(A instanceof K||A instanceof X||"string"==typeof A.nodeName&&"string"==typeof A.textContent&&"function"==typeof A.removeChild&&A.attributes instanceof M&&"function"==typeof A.removeAttribute&&"function"==typeof A.setAttribute&&"string"==typeof A.namespaceURI&&"function"==typeof A.insertBefore)},ge=function(A){return"object"===(void 0===o?"undefined":P(o))?A instanceof o:A&&"object"===(void 0===A?"undefined":P(A))&&"number"==typeof A.nodeType&&"string"==typeof A.nodeName},ae=function(A,e,i){EA[A]&&Q(EA[A],(function(A){A.call(t,e,i,VA)}))},ce=function(A){var e=void 0;if(ae("beforeSanitizeElements",A,null),oe(A))return Be(A),!0;if(l(A.nodeName,/[\u0080-\uFFFF]/))return Be(A),!0;var i=C(A.nodeName);if(ae("uponSanitizeElement",A,{tagName:i,allowedTags:YA}),!ge(A.firstElementChild)&&(!ge(A.content)||!ge(A.content.firstElementChild))&&d(/<[/\w]/g,A.innerHTML)&&d(/<[/\w]/g,A.textContent))return Be(A),!0;if(!YA[i]||mA[i]){if(bA&&!vA[i]){var B=tA(A),n=eA(A);if(n&&B)for(var s=n.length-1;s>=0;--s)B.insertBefore($(n[s],!0),AA(A))}return Be(A),!0}return A instanceof g&&!ie(A)?(Be(A),!0):"noscript"!==i&&"noembed"!==i||!d(/<\/no(script|embed)/i,A.innerHTML)?(GA&&3===A.nodeType&&(e=A.textContent,e=I(e,wA," "),e=I(e,CA," "),A.textContent!==e&&(w(t.removed,{element:A.cloneNode()}),A.textContent=e)),ae("afterSanitizeElements",A,null),!1):(Be(A),!0)},Qe=function(A,e,t){if(SA&&("id"===e||"name"===e)&&(t in B||t in KA))return!1;if(fA&&d(lA,e));else if(UA&&d(IA,e));else{if(!FA[e]||pA[e])return!1;if(WA[e]);else if(d(dA,I(t,uA,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===A||0!==h(t,"data:")||!LA[A])if(NA&&!d(hA,I(t,uA,"")));else if(t)return!1}return!0},Ee=function(A){var e=void 0,i=void 0,B=void 0,n=void 0;ae("beforeSanitizeAttributes",A,null);var s=A.attributes;if(s){var r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:FA};for(n=s.length;n--;){var o=e=s[n],g=o.name,a=o.namespaceURI;if(i=u(e.value),B=C(g),r.attrName=B,r.attrValue=i,r.keepAttr=!0,r.forceKeepAttr=void 0,ae("uponSanitizeAttribute",A,r),i=r.attrValue,!r.forceKeepAttr&&(ne(g,A),r.keepAttr))if(d(/\/>/i,i))ne(g,A);else{GA&&(i=I(i,wA," "),i=I(i,CA," "));var c=A.nodeName.toLowerCase();if(Qe(c,B,i))try{a?A.setAttributeNS(a,g,i):A.setAttribute(g,i),E(t.removed)}catch(A){}}}ae("afterSanitizeAttributes",A,null)}},we=function A(e){var t=void 0,i=re(e);for(ae("beforeSanitizeShadowDOM",e,null);t=i.nextNode();)ae("uponSanitizeShadowNode",t,null),ce(t)||(t.content instanceof s&&A(t.content),Ee(t));ae("afterSanitizeShadowDOM",e,null)};return t.sanitize=function(A,B){var n=void 0,r=void 0,g=void 0,a=void 0,c=void 0;if(A||(A="\x3c!--\x3e"),"string"!=typeof A&&!ge(A)){if("function"!=typeof A.toString)throw Y("toString is not a function");if("string"!=typeof(A=A.toString()))throw Y("dirty is not a string, aborting")}if(!t.isSupported){if("object"===P(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof A)return e.toStaticHTML(A);if(ge(A))return e.toStaticHTML(A.outerHTML)}return A}if(HA||XA(B),t.removed=[],"string"==typeof A&&(jA=!1),jA);else if(A instanceof o)1===(r=(n=se("\x3c!----\x3e")).ownerDocument.importNode(A,!0)).nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!kA&&!GA&&!yA&&-1===A.indexOf("<"))return BA&&TA?BA.createHTML(A):A;if(!(n=se(A)))return kA?null:nA}n&&RA&&Be(n.firstChild);for(var Q=re(jA?A:n);g=Q.nextNode();)3===g.nodeType&&g===a||ce(g)||(g.content instanceof s&&we(g.content),Ee(g),a=g);if(a=null,jA)return A;if(kA){if(xA)for(c=aA.call(n.ownerDocument);n.firstChild;)c.appendChild(n.firstChild);else c=n;return JA&&(c=cA.call(i,c,!0)),c}var E=yA?n.outerHTML:n.innerHTML;return GA&&(E=I(E,wA," "),E=I(E,CA," ")),BA&&TA?BA.createHTML(E):E},t.setConfig=function(A){XA(A),HA=!0},t.clearConfig=function(){VA=null,HA=!1},t.isValidAttribute=function(A,e,t){VA||XA({});var i=C(A),B=C(e);return Qe(i,B,t)},t.addHook=function(A,e){"function"==typeof e&&(EA[A]=EA[A]||[],w(EA[A],e))},t.removeHook=function(A){EA[A]&&E(EA[A])},t.removeHooks=function(A){EA[A]&&(EA[A]=[])},t.removeAllHooks=function(){EA={}},t}()}()},function(A,e,t){var i=t(40),B=i.TYPE,n=i.NAME,s=t(28).cmpStr,r=B.EOF,o=B.WhiteSpace,g=B.Comment,a=function(){this.offsetAndType=null,this.balance=null,this.reset()};a.prototype={reset:function(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset},lookupType:function(A){return(A+=this.tokenIndex)>24:r},lookupOffset:function(A){return(A+=this.tokenIndex)0?A>24,this.source,B)){case 1:break A;case 2:i++;break A;default:this.balance[t]===i&&(i=t),B=16777215&this.offsetAndType[i]}return i-this.tokenIndex},isBalanceEdge:function(A){return this.balance[this.tokenIndex]>24===o;A++,e++);e>0&&this.skip(e)},skipSC:function(){for(;this.tokenType===o||this.tokenType===g;)this.next()},skip:function(A){var e=this.tokenIndex+A;e>24,this.tokenEnd=16777215&e):(this.tokenIndex=this.tokenCount,this.next())},next:function(){var A=this.tokenIndex+1;A>24,this.tokenEnd=16777215&A):(this.tokenIndex=this.tokenCount,this.eof=!0,this.tokenType=r,this.tokenStart=this.tokenEnd=this.source.length)},forEachToken(A){for(var e=0,t=this.firstCharOffset;e>24,i,n,e)}},dump(){var A=new Array(this.tokenCount);return this.forEachToken((e,t,i,B)=>{A[B]={idx:B,type:n[e],chunk:this.source.substring(t,i),balance:this.balance[B]}}),A}},A.exports=a},function(A,e){var t={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},i=Object.keys(t).reduce((function(A,e){return A[t[e]]=e,A}),{});A.exports={TYPE:t,NAME:i}},function(A,e){A.exports={ID_NONE:-1,Events:{UseHighQualityRenderChanged:"UseHighQualityRenderChanged",AllowPrivateSkinAccessChanged:"AllowPrivateSkinAccessChanged",NativeSizeChanged:"NativeSizeChanged"}}},function(A,e,t){const i=t(25);i.enable(),A.exports=i("scratch-audioengine")},function(A,e){var t,i,B=A.exports={};function n(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function r(A){if(t===setTimeout)return setTimeout(A,0);if((t===n||!t)&&setTimeout)return t=setTimeout,setTimeout(A,0);try{return t(A,0)}catch(e){try{return t.call(null,A,0)}catch(e){return t.call(this,A,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:n}catch(A){t=n}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(A){i=s}}();var o,g=[],a=!1,c=-1;function Q(){a&&o&&(a=!1,o.length?g=o.concat(g):c=-1,g.length&&E())}function E(){if(!a){var A=r(Q);a=!0;for(var e=g.length;e;){for(o=g,g=[];++c1)for(var t=1;t0&&(this._lastUpdateTime=A),this._count=Math.min(this._maxTokens,this._count+t),this._count>0&&(this._count--,!0)}}},function(A,e,t){const{Record:i}=t(27),B=i({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});A.exports=B},function(A,e){A.exports=function(A,e){let t="";for(const A in e){let i=e[A].value;"CURRENTMENU"===A&&(i=i.toLowerCase()),t+="_".concat(i)}return"".concat(A).concat(t)}},function(A,e,t){const i={Timer:t(16),Cast:t(2),log:t(1),blockUtility:t(237),thread:null};let B="";const n={};B+="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};",n.startHats="const startHats = (requestedHat, optMatchFields) => {\n const thread = globalState.thread;\n const threads = thread.target.runtime.startHats(requestedHat, optMatchFields);\n return threads;\n}",n.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}",n.executeInCompatibilityLayer="let hasResumedFromPromise = false;\nconst waitPromise = function*(promise) {\n const thread = globalState.thread;\n let returnValue;\n\n promise\n .then(value => {\n returnValue = value;\n thread.status = 0; // STATUS_RUNNING\n })\n .catch(error => {\n thread.status = 0; // STATUS_RUNNING\n globalState.log.warn('Promise rejected in compiled script:', error);\n });\n\n // enter STATUS_PROMISE_WAIT and yield\n // this will stop script execution until the promise handlers reset the thread status\n thread.status = 1; // STATUS_PROMISE_WAIT\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 */) {\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 */) {\n yield;\n return finish('');\n }\n }\n\n // todo: do we have to do anything extra if status is STATUS_DONE?\n\n return finish(returnValue);\n}",n.createBranchInfo="const createBranchInfo = (isLoop) => ({\n defaultIsLoop: isLoop,\n isLoop: false,\n branch: 0,\n stackFrame: {}\n});",n.retire="const retire = () => {\n const thread = globalState.thread;\n thread.target.runtime.sequencer.retireThread(thread);\n}",n.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}",n.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}",B+="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};",B+="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);",n.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)",n.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)",n.randomInt="const randomInt = (low, high) => low + Math.floor(Math.random() * ((high + 1) - low))",n.randomFloat="const randomFloat = (low, high) => (Math.random() * (high - low)) + low",n.timer="const timer = () => {\n const t = new globalState.Timer({\n now: () => globalState.thread.target.runtime.currentMSecs\n });\n t.start();\n return t;\n}",n.daysSince2000="const daysSince2000 = () => (Date.now() - 946684800000) / (24 * 60 * 60 * 1000)",n.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}",B+="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};",n.listGet="const listGet = (list, idx) => {\n const index = listIndex(idx, list.length);\n if (index === -1) {\n return '';\n }\n return list[index];\n}",n.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}",n.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}",n.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}",n.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}",n.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}",n.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}",n.colorToList="const colorToList = color => globalState.Cast.toRgbColorList(color)",n.mod="const mod = (n, modulus) => {\n let result = n % modulus;\n if (result / modulus < 0) result += modulus;\n return result;\n}",n.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}",n.yieldThenCall="const yieldThenCall = function* (callback, ...args) {\n yield;\n return callback(...args);\n}",n.yieldThenCallGenerator="const yieldThenCallGenerator = function* (callback, ...args) {\n yield;\n return yield* callback(...args);\n}";const s=A=>{i.thread=A,A.generator.next()},r=[];s.scopedEval=A=>{const e=(A=>{let e="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 t of Object.keys(n))A.includes(t)&&(e+="".concat(n[t],";"));return e+="return ".concat(A),e})(A);try{return new Function("globalState",e)(i)}catch(A){throw i.log.error("was unable to compile script",e),A}},s.runtimeFunctions=n,s.saveGlobalState=()=>{r.push(i.thread)},s.restoreGlobalState=()=>{i.thread=r.pop()},A.exports=s},function(A,e,t){const i=t(5),B=t(7),n=t(2),s=t(14),r=t(275),o=t(15);class g extends r{constructor(A,e){super(e,A.blocks),this.sprite=A,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=g.ROTATION_STYLE_ALL_AROUND,this.volume=100,this.tempo=60,this.videoTransparency=50,this.videoState=g.VIDEO_STATE.ON,this.textToSpeechLanguage=null,this.onTargetMoved=null,this.onTargetVisualChange=null,this.interpolationData=null}initDrawable(A){this.renderer&&(this.drawableID=this.renderer.createDrawable(A)),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 A=this.sprite.soundBank,e={playSound:e=>A.play(this,e)};return Object.defineProperty(this,"audioPlayer",{configurable:!1,enumerable:!0,writable:!1,value:e}),e}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(A,e,t){if(this.isStage)return;if(this.dragging&&!t)return;const i=this.x,B=this.y;if(this.renderer){const t=this.runtime.runtimeOptions.fencing?this.renderer.getFencedPositionOfDrawable(this.drawableID,[A,e]):[A,e];this.x=t[0],this.y=t[1],this.renderer.updateDrawablePosition(this.drawableID,t),this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())}else this.x=A,this.y=e;this.onTargetMoved&&this.onTargetMoved(this,i,B,t),this.runtime.requestTargetsUpdate(this)}_getRenderedDirectionAndScale(){let A=this.direction,e=[this.size,this.size];if(this.rotationStyle===g.ROTATION_STYLE_NONE)A=90;else if(this.rotationStyle===g.ROTATION_STYLE_LEFT_RIGHT){A=90;e=[(this.direction<0?-1:1)*this.size,this.size]}return{direction:A,scale:e}}setDirection(A){if(!this.isStage&&isFinite(A)){if(this.direction=i.wrapClamp(A,-179,180),this.renderer){const{direction:A,scale:e}=this._getRenderedDirectionAndScale();this.renderer.updateDrawableDirectionScale(this.drawableID,A,e),this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())}this.runtime.requestTargetsUpdate(this)}}setDraggable(A){this.isStage||(this.draggable=!!A,this.runtime.requestTargetsUpdate(this))}setVisible(A){this.isStage||(this.visible=!!A,this.renderer&&(this.renderer.updateDrawableVisible(this.drawableID,this.visible),this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())),this.runtime.requestTargetsUpdate(this))}setSize(A){if(!this.isStage){if(this.renderer){const e=this.renderer.getCurrentSkinSize(this.drawableID),t=e[0],B=e[1],n=this.runtime.runtimeOptions.fencing,s=n?Math.min(1,Math.max(5/t,5/B)):0,r=n?Math.min(1.5*this.runtime.stageWidth/t,1.5*this.runtime.stageHeight/B):1/0;this.size=100*i.clamp(A/100,s,r);const{direction:o,scale:g}=this._getRenderedDirectionAndScale();this.renderer.updateDrawableDirectionScale(this.drawableID,o,g),this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())}else this.size=A;this.runtime.requestTargetsUpdate(this)}}setEffect(A,e){this.effects.hasOwnProperty(A)&&(this.effects[A]=e,this.renderer&&(this.renderer.updateDrawableEffect(this.drawableID,A,e),this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())))}clearEffects(){for(const A in this.effects)this.effects.hasOwnProperty(A)&&(this.effects[A]=0);if(this.renderer){for(const A in this.effects)this.effects.hasOwnProperty(A)&&this.renderer.updateDrawableEffect(this.drawableID,A,0);this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())}}setCostume(A){if((A=Math.round(A))!==1/0&&A!==-1/0&&A||(A=0),this.currentCostume=i.wrapClamp(A,0,this.sprite.costumes.length-1),this.renderer){const A=this.sprite.costumes[this.currentCostume];this.renderer.updateDrawableSkinId(this.drawableID,A.skinId),this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())}this.runtime.requestTargetsUpdate(this)}addCostume(A,e){"number"!=typeof e||isNaN(e)?this.sprite.addCostumeAt(A,this.sprite.costumes.length):this.sprite.addCostumeAt(A,e)}renameCostume(A,e){const t=this.sprite.costumes.filter((e,t)=>A!==t).map(A=>A.name),i=this.getCostumes()[A].name,n=B.unusedName(e,t);if(this.getCostumes()[A].name=n,this.isStage){const A=this.runtime.targets;for(let e=0;e=e)return null;const t=this.sprite.deleteCostumeAt(A);return A===this.currentCostume&&A===e-1?this.setCostume(A-1):AA.name);A.name=B.unusedName(A.name,t),"number"!=typeof e||isNaN(e)?this.sprite.sounds.push(A):this.sprite.sounds.splice(e,0,A)}renameSound(A,e){const t=this.sprite.sounds.filter((e,t)=>A!==t).map(A=>A.name),i=this.sprite.sounds[A].name,n=B.unusedName(e,t);this.sprite.sounds[A].name=n,this.blocks.updateAssetName(i,n,"sound")}deleteSound(A){if(A<0||A>=this.sprite.sounds.length)return null;const e=this.sprite.sounds.splice(A,1)[0];return this.runtime.requestTargetsUpdate(this),e}setRotationStyle(A){if(A===g.ROTATION_STYLE_NONE?this.rotationStyle=g.ROTATION_STYLE_NONE:A===g.ROTATION_STYLE_ALL_AROUND?this.rotationStyle=g.ROTATION_STYLE_ALL_AROUND:A===g.ROTATION_STYLE_LEFT_RIGHT&&(this.rotationStyle=g.ROTATION_STYLE_LEFT_RIGHT),this.renderer){const{direction:A,scale:e}=this._getRenderedDirectionAndScale();this.renderer.updateDrawableDirectionScale(this.drawableID,A,e),this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())}this.runtime.requestTargetsUpdate(this)}getCostumeIndexByName(A){const e=this.getCostumes();for(let t=0;tA/2||t.top>e/2||t.bottom<-e/2)return!0}return!1}isTouchingSprite(A){A=n.toString(A);const e=this.runtime.getSpriteTargetByName(A);if(!e||!this.renderer)return!1;const t=e.sprite.clones.filter(A=>!A.dragging).map(A=>A.drawableID);return this.renderer.isTouchingDrawables(this.drawableID,t)}isTouchingColor(A){return!!this.renderer&&this.renderer.isTouchingColor(this.drawableID,A)}colorIsTouchingColor(A,e){return!!this.renderer&&this.renderer.isTouchingColor(this.drawableID,A,e)}getLayerOrder(){return this.renderer?this.renderer.getDrawableOrder(this.drawableID):null}goToFront(){this.renderer&&this.renderer.setDrawableOrder(this.drawableID,1/0,o.SPRITE_LAYER),this.runtime.setExecutablePosition(this,1/0)}goToBack(){this.renderer&&this.renderer.setDrawableOrder(this.drawableID,-1/0,o.SPRITE_LAYER,!1),this.runtime.setExecutablePosition(this,-1/0)}goForwardLayers(A){this.renderer&&this.renderer.setDrawableOrder(this.drawableID,A,o.SPRITE_LAYER,!0),this.runtime.moveExecutable(this,A)}goBackwardLayers(A){this.renderer&&this.renderer.setDrawableOrder(this.drawableID,-A,o.SPRITE_LAYER,!0),this.runtime.moveExecutable(this,-A)}goBehindOther(A){if(this.renderer){const e=this.renderer.setDrawableOrder(A.drawableID,0,o.SPRITE_LAYER,!0);this.renderer.setDrawableOrder(this.drawableID,e,o.SPRITE_LAYER)}const e=this.runtime.executableTargets.indexOf(A);this.runtime.setExecutablePosition(this,e)}keepInFence(A,e,t){let i=t;i||(i={left:-this.runtime.stageWidth/2,right:this.runtime.stageWidth/2,top:this.runtime.stageHeight/2,bottom:-this.runtime.stageHeight/2});const B=this.getBounds();if(!B)return;B.left+=A-this.x,B.right+=A-this.x,B.top+=e-this.y,B.bottom+=e-this.y;let n=0,s=0;return B.lefti.right&&(n+=i.right-B.right),B.top>i.top&&(s+=i.top-B.top),B.bottom{const e=A.createClone();return e.x=400*(Math.random()-.5)/2,e.y=300*(Math.random()-.5)/2,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=JSON.parse(JSON.stringify(this.effects)),e.variables=this.duplicateVariables(e.blocks),e.updateAllDrawableProperties(),e})}onGreenFlag(){this.clearEffects()}onStopAll(){this.clearEffects()}postSpriteInfo(A){const e=A.hasOwnProperty("force")?A.force:null,t=A.hasOwnProperty("x"),i=A.hasOwnProperty("y");(t||i)&&this.setXY(t?A.x:this.x,i?A.y:this.y,e),A.hasOwnProperty("direction")&&this.setDirection(A.direction),A.hasOwnProperty("draggable")&&this.setDraggable(A.draggable),A.hasOwnProperty("rotationStyle")&&this.setRotationStyle(A.rotationStyle),A.hasOwnProperty("visible")&&this.setVisible(A.visible),A.hasOwnProperty("size")&&this.setSize(A.size)}startDrag(){this.dragging=!0}stopDrag(){this.dragging=!1}toJSON(){const A=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:A[this.currentCostume],costumeCount:A.length,visible:this.visible,rotationStyle:this.rotationStyle,comments:this.comments,blocks:this.blocks._blocks,variables:this.variables,costumes:A,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?o.BACKGROUND_LAYER:o.SPRITE_LAYER),this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw()))}}A.exports=g},function(A,e,t){const i=t(8),B=t(34);class n{constructor(A,e,t,B,s,r,o){this.id=A||i(),this.text=e,this.x=t,this.y=B,this.width=Math.max(Number(s),n.MIN_WIDTH),this.height=Math.max(Number(r),n.MIN_HEIGHT),this.minimized=o||!1,this.blockId=null}toXML(){return'').concat(B(this.text),"")}static get MIN_WIDTH(){return 20}static get MIN_HEIGHT(){return 20}static get DEFAULT_WIDTH(){return 100}static get DEFAULT_HEIGHT(){return 100}}A.exports=n},function(A,e,t){const i=t(49),B=t(17),{loadSoundFromAsset:n}=t(36),{loadCostumeFromAsset:s}=t(37),r=t(112),o=t(7),g=t(15);class a{constructor(A,e){this.runtime=e,A||(A=new B(e)),this.blocks=A,this.name="",this.costumes_=[],this.sounds=[],this.clones=[],this.soundBank=null,this.runtime&&this.runtime.audioEngine&&(this.soundBank=this.runtime.audioEngine.createBank())}set costumes(A){this.costumes_=[];for(const e of A)this.addCostumeAt(e,this.costumes_.length)}get costumes(){return this.costumes_}addCostumeAt(A,e){A.name||(A.name="");const t=this.costumes_.map(A=>A.name);A.name=o.unusedName(A.name,t),this.costumes_.splice(e,0,A)}deleteCostumeAt(A){return this.costumes.splice(A,1)[0]}createClone(A){const e=new i(this,this.runtime);if(e.isOriginal=0===this.clones.length,this.clones.push(e),e.initAudio(),e.isOriginal){const t="string"==typeof A?A:g.SPRITE_LAYER;e.initDrawable(t),this.runtime.fireTargetWasCreated(e)}else this.runtime.fireTargetWasCreated(e,this.clones[0]);return e}removeClone(A){this.runtime.fireTargetWasRemoved(A);const e=this.clones.indexOf(A);e>=0&&this.clones.splice(e,1)}duplicate(){const A=new a(null,this.runtime),e=this.blocks._blocks,t=Object.keys(e).map(A=>e[A]),i=JSON.parse(JSON.stringify(t));r(i),i.forEach(e=>{A.blocks.createBlock(e)});const B=this.runtime.targets.map(A=>A.sprite.name);A.name=o.unusedName(this.name,B);const g=[];return A.costumes=this.costumes_.map(A=>{const e=Object.assign({},A);return g.push(s(e,this.runtime)),e}),A.sounds=this.sounds.map(e=>{const t=Object.assign({},e),i=e.asset;return g.push(n(t,i,this.runtime,A.soundBank)),t}),Promise.all(g).then(()=>A)}dispose(){this.soundBank&&this.soundBank.dispose()}}A.exports=a},function(A,e){class t{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:t.xlink,xlink:t.xmlns,xmlns:"".concat(t.xmlns,"/"),"xmlns:xlink":"".concat(t.xmlns,"/")}}static create(A,e,i){return t.set(document.createElementNS(t.svg,A),e,i)}static get(A,e){const i=t.attributeNamespace[e],B=i?A.getAttributeNS(i,e):A.getAttribute(e);return"null"===B?null:B}static set(A,e,i){for(const B in e){let n=e[B];const s=t.attributeNamespace[B];"number"==typeof n&&i&&(n=i.number(n)),s?A.setAttributeNS(s,B,n):A.setAttribute(B,n)}return A}}A.exports=t},function(A,e){A.exports=function(A,e){var t=Object.create(SyntaxError.prototype),i=new Error;return t.name=A,t.message=e,Object.defineProperty(t,"stack",{get:function(){return(i.stack||"").replace(/^(.+\n){1,3}/,A+": "+e+"\n")}}),t}},function(A,e){function t(A){return A}function i(A,e,t,B){var n,s;switch(A.type){case"Group":n=function(A,e,t,B){var n=" "===A.combinator||B?A.combinator:" "+A.combinator+" ",s=A.terms.map((function(A){return i(A,e,t,B)})).join(n);return(A.explicit||t)&&(s=(B||","===s[0]?"[":"[ ")+s+(B?"]":" ]")),s}(A,e,t,B)+(A.disallowEmpty?"!":"");break;case"Multiplier":return i(A.term,e,t,B)+e(0===(s=A).min&&0===s.max?"*":0===s.min&&1===s.max?"?":1===s.min&&0===s.max?s.comma?"#":"+":1===s.min&&1===s.max?"":(s.comma?"#":"")+(s.min===s.max?"{"+s.min+"}":"{"+s.min+","+(0!==s.max?s.max:"")+"}"),A);case"Type":n="<"+A.name+(A.opts?e(function(A){switch(A.type){case"Range":return" ["+(null===A.min?"-∞":A.min)+","+(null===A.max?"∞":A.max)+"]";default:throw new Error("Unknown node type `"+A.type+"`")}}(A.opts),A.opts):"")+">";break;case"Property":n="<'"+A.name+"'>";break;case"Keyword":n=A.name;break;case"AtKeyword":n="@"+A.name;break;case"Function":n=A.name+"(";break;case"String":case"Token":n=A.value;break;case"Comma":n=",";break;default:throw new Error("Unknown node type `"+A.type+"`")}return e(n,A)}A.exports=function(A,e){var B=t,n=!1,s=!1;return"function"==typeof e?B=e:e&&(n=Boolean(e.forceBraces),s=Boolean(e.compact),"function"==typeof e.decorate&&(B=e.decorate)),i(A,B,n,s)}},function(A,e){var t=Object.prototype.hasOwnProperty,i=Object.create(null),B=Object.create(null);function n(A,e){return e=e||0,A.length-e>=2&&45===A.charCodeAt(e)&&45===A.charCodeAt(e+1)}function s(A,e){if(e=e||0,A.length-e>=3&&45===A.charCodeAt(e)&&45!==A.charCodeAt(e+1)){var t=A.indexOf("-",e+2);if(-1!==t)return A.substring(e,t+1)}return""}A.exports={keyword:function(A){if(t.call(i,A))return i[A];var e=A.toLowerCase();if(t.call(i,e))return i[A]=i[e];var B=n(e,0),r=B?"":s(e,0);return i[A]=Object.freeze({basename:e.substr(r.length),name:e,vendor:r,prefix:r,custom:B})},property:function(A){if(t.call(B,A))return B[A];var e=A,i=A[0];"/"===i?i="/"===A[1]?"//":"/":"_"!==i&&"*"!==i&&"$"!==i&&"#"!==i&&"+"!==i&&"&"!==i&&(i="");var r=n(e,i.length);if(!r&&(e=e.toLowerCase(),t.call(B,e)))return B[A]=B[e];var o=r?"":s(e,i.length),g=e.substr(0,i.length+o.length);return B[A]=Object.freeze({basename:e.substr(g.length),name:e.substr(i.length),hack:i,vendor:o,prefix:g,custom:r})},isCustomProperty:n,vendorPrefix:s}},function(A,e,t){var i=t(295),B=function(A){for(var e="function"==typeof Uint32Array?new Uint32Array(128):new Array(128),t=0;t<128;t++)e[t]=A(String.fromCharCode(t))?1:0;return e}((function(A){return/[a-zA-Z0-9\-]/.test(A)})),n={" ":1,"&&":2,"||":3,"|":4};function s(A){return A.substringToPos(A.findWsEnd(A.pos))}function r(A){for(var e=A.pos;e=128||0===B[t])break}return A.pos===e&&A.error("Expect a keyword"),A.substringToPos(e)}function o(A){for(var e=A.pos;e57)break}return A.pos===e&&A.error("Expect a number"),A.substringToPos(e)}function g(A){var e=A.str.indexOf("'",A.pos+1);return-1===e&&(A.pos=A.str.length,A.error("Expect an apostrophe")),A.substringToPos(e+1)}function a(A){var e,t=null;return A.eat(123),e=o(A),44===A.charCode()?(A.pos++,125!==A.charCode()&&(t=o(A))):t=e,A.eat(125),{min:Number(e),max:t?Number(t):0}}function c(A,e){var t=function(A){var e=null,t=!1;switch(A.charCode()){case 42:A.pos++,e={min:0,max:0};break;case 43:A.pos++,e={min:1,max:0};break;case 63:A.pos++,e={min:0,max:1};break;case 35:A.pos++,t=!0,e=123===A.charCode()?a(A):{min:1,max:0};break;case 123:e=a(A);break;default:return null}return{type:"Multiplier",comma:t,min:e.min,max:e.max,term:null}}(A);return null!==t?(t.term=e,t):e}function Q(A){var e=A.peek();return""===e?null:{type:"Token",value:e}}function E(A){var e,t=null;return A.eat(60),e=r(A),40===A.charCode()&&41===A.nextCharCode()&&(A.pos+=2,e+="()"),91===A.charCodeAt(A.findWsEnd(A.pos))&&(s(A),t=function(A){var e=null,t=null,i=1;return A.eat(91),45===A.charCode()&&(A.peek(),i=-1),-1==i&&8734===A.charCode()?A.peek():e=i*Number(o(A)),s(A),A.eat(44),s(A),8734===A.charCode()?A.peek():(i=1,45===A.charCode()&&(A.peek(),i=-1),t=i*Number(o(A))),A.eat(93),null===e&&null===t?null:{type:"Range",min:e,max:t}}(A)),A.eat(62),c(A,{type:"Type",name:e,opts:t})}function w(A,e){function t(A,e){return{type:"Group",terms:A,combinator:e,disallowEmpty:!1,explicit:!1}}for(e=Object.keys(e).sort((function(A,e){return n[A]-n[e]}));e.length>0;){for(var i=e.shift(),B=0,s=0;B1&&(A.splice(s,B-s,t(A.slice(s,B),i)),B=s+1),s=-1))}-1!==s&&e.length&&A.splice(s,B-s,t(A.slice(s,B),i))}return i}function C(A){for(var e,t=[],i={},B=null,n=A.pos;e=l(A);)"Spaces"!==e.type&&("Combinator"===e.type?(null!==B&&"Combinator"!==B.type||(A.pos=n,A.error("Unexpected combinator")),i[e.value]=!0):null!==B&&"Combinator"!==B.type&&(i[" "]=!0,t.push({type:"Combinator",value:" "})),t.push(e),B=e,n=A.pos);return null!==B&&"Combinator"===B.type&&(A.pos-=n,A.error("Unexpected combinator")),{type:"Group",terms:t,combinator:w(t,i)||" ",disallowEmpty:!1,explicit:!1}}function l(A){var e=A.charCode();if(e<128&&1===B[e])return function(A){var e;return e=r(A),40===A.charCode()?(A.pos++,{type:"Function",name:e}):c(A,{type:"Keyword",name:e})}(A);switch(e){case 93:break;case 91:return c(A,function(A){var e;return A.eat(91),e=C(A),A.eat(93),e.explicit=!0,33===A.charCode()&&(A.pos++,e.disallowEmpty=!0),e}(A));case 60:return 39===A.nextCharCode()?function(A){var e;return A.eat(60),A.eat(39),e=r(A),A.eat(39),A.eat(62),c(A,{type:"Property",name:e})}(A):E(A);case 124:return{type:"Combinator",value:A.substringToPos(124===A.nextCharCode()?A.pos+2:A.pos+1)};case 38:return A.pos++,A.eat(38),{type:"Combinator",value:"&&"};case 44:return A.pos++,{type:"Comma"};case 39:return c(A,{type:"String",value:g(A)});case 32:case 9:case 10:case 13:case 12:return{type:"Spaces",value:s(A)};case 64:return(e=A.nextCharCode())<128&&1===B[e]?(A.pos++,{type:"AtKeyword",name:r(A)}):Q(A);case 42:case 43:case 63:case 35:case 33:break;case 123:if((e=A.nextCharCode())<48||e>57)return Q(A);break;default:return Q(A)}}function I(A){var e=new i(A),t=C(e);return e.pos!==A.length&&e.error("Unexpected input"),1===t.terms.length&&"Group"===t.terms[0].type&&(t=t.terms[0]),t}I("[a&&#|<'c'>*||e() f{2} /,(% g#{1,2} h{2,})]!"),A.exports=I},function(A,e){e.getArg=function(A,e,t){if(e in A)return A[e];if(3===arguments.length)return t;throw new Error('"'+e+'" is a required argument.')};var t=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,i=/^data:.+\,.+$/;function B(A){var e=A.match(t);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}function n(A){var e="";return A.scheme&&(e+=A.scheme+":"),e+="//",A.auth&&(e+=A.auth+"@"),A.host&&(e+=A.host),A.port&&(e+=":"+A.port),A.path&&(e+=A.path),e}function s(A){var t=A,i=B(A);if(i){if(!i.path)return A;t=i.path}for(var s,r=e.isAbsolute(t),o=t.split(/\/+/),g=0,a=o.length-1;a>=0;a--)"."===(s=o[a])?o.splice(a,1):".."===s?g++:g>0&&(""===s?(o.splice(a+1,g),g=0):(o.splice(a,2),g--));return""===(t=o.join("/"))&&(t=r?"/":"."),i?(i.path=t,n(i)):t}function r(A,e){""===A&&(A="."),""===e&&(e=".");var t=B(e),r=B(A);if(r&&(A=r.path||"/"),t&&!t.scheme)return r&&(t.scheme=r.scheme),n(t);if(t||e.match(i))return e;if(r&&!r.host&&!r.path)return r.host=e,n(r);var o="/"===e.charAt(0)?e:s(A.replace(/\/+$/,"")+"/"+e);return r?(r.path=o,n(r)):o}e.urlParse=B,e.urlGenerate=n,e.normalize=s,e.join=r,e.isAbsolute=function(A){return"/"===A.charAt(0)||t.test(A)},e.relative=function(A,e){""===A&&(A="."),A=A.replace(/\/$/,"");for(var t=0;0!==e.indexOf(A+"/");){var i=A.lastIndexOf("/");if(i<0)return e;if((A=A.slice(0,i)).match(/^([^\/]+:\/)?\/*$/))return e;++t}return Array(t+1).join("../")+e.substr(A.length+1)};var o=!("__proto__"in Object.create(null));function g(A){return A}function a(A){if(!A)return!1;var e=A.length;if(e<9)return!1;if(95!==A.charCodeAt(e-1)||95!==A.charCodeAt(e-2)||111!==A.charCodeAt(e-3)||116!==A.charCodeAt(e-4)||111!==A.charCodeAt(e-5)||114!==A.charCodeAt(e-6)||112!==A.charCodeAt(e-7)||95!==A.charCodeAt(e-8)||95!==A.charCodeAt(e-9))return!1;for(var t=e-10;t>=0;t--)if(36!==A.charCodeAt(t))return!1;return!0}function c(A,e){return A===e?0:null===A?1:null===e?-1:A>e?1:-1}e.toSetString=o?g:function(A){return a(A)?"$"+A:A},e.fromSetString=o?g:function(A){return a(A)?A.slice(1):A},e.compareByOriginalPositions=function(A,e,t){var i=c(A.source,e.source);return 0!==i||0!==(i=A.originalLine-e.originalLine)||0!==(i=A.originalColumn-e.originalColumn)||t||0!==(i=A.generatedColumn-e.generatedColumn)||0!==(i=A.generatedLine-e.generatedLine)?i:c(A.name,e.name)},e.compareByGeneratedPositionsDeflated=function(A,e,t){var i=A.generatedLine-e.generatedLine;return 0!==i||0!==(i=A.generatedColumn-e.generatedColumn)||t||0!==(i=c(A.source,e.source))||0!==(i=A.originalLine-e.originalLine)||0!==(i=A.originalColumn-e.originalColumn)?i:c(A.name,e.name)},e.compareByGeneratedPositionsInflated=function(A,e){var t=A.generatedLine-e.generatedLine;return 0!==t||0!==(t=A.generatedColumn-e.generatedColumn)||0!==(t=c(A.source,e.source))||0!==(t=A.originalLine-e.originalLine)||0!==(t=A.originalColumn-e.originalColumn)?t:c(A.name,e.name)},e.parseSourceMapInput=function(A){return JSON.parse(A.replace(/^\)]}'[^\n]*\n/,""))},e.computeSourceURL=function(A,e,t){if(e=e||"",A&&("/"!==A[A.length-1]&&"/"!==e[0]&&(A+="/"),e=A+e),t){var i=B(t);if(!i)throw new Error("sourceMapURL could not be parsed");if(i.path){var o=i.path.lastIndexOf("/");o>=0&&(i.path=i.path.substring(0,o+1))}e=r(n(i),e)}return s(e)}},function(A,e,t){A.exports={AnPlusB:t(322),Atrule:t(323),AtrulePrelude:t(324),AttributeSelector:t(325),Block:t(326),Brackets:t(327),CDC:t(328),CDO:t(329),ClassSelector:t(330),Combinator:t(331),Comment:t(332),Declaration:t(333),DeclarationList:t(334),Dimension:t(335),Function:t(336),Hash:t(337),Identifier:t(338),IdSelector:t(339),MediaFeature:t(340),MediaQuery:t(341),MediaQueryList:t(342),Nth:t(343),Number:t(344),Operator:t(345),Parentheses:t(346),Percentage:t(347),PseudoClassSelector:t(348),PseudoElementSelector:t(349),Ratio:t(350),Raw:t(18),Rule:t(351),Selector:t(352),SelectorList:t(353),String:t(354),StyleSheet:t(355),TypeSelector:t(356),UnicodeRange:t(357),Url:t(358),Value:t(359),WhiteSpace:t(360)}},function(A,e){class t{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:t.xlink,xlink:t.xmlns,xmlns:"".concat(t.xmlns,"/"),"xmlns:xlink":"".concat(t.xmlns,"/")}}static create(A,e,i){return t.set(document.createElementNS(t.svg,A),e,i)}static get(A,e){const i=t.attributeNamespace[e],B=i?A.getAttributeNS(i,e):A.getAttribute(e);return"null"===B?null:B}static set(A,e,i){for(const B in e){let n=e[B];const s=t.attributeNamespace[B];"number"==typeof n&&i&&(n=i.number(n)),s?A.setAttributeNS(s,B,n):A.setAttribute(B,n)}return A}}A.exports=t},function(A,e,t){"undefined"!=typeof TextDecoder&&"undefined"!=typeof TextEncoder||t(32);const i=t(23);let B=null;const n={},s={},r="function"==typeof FinalizationRegistry?new FinalizationRegistry(A=>{const e=s[A];1===e?(delete s[A],delete n[A]):s[A]=e-1}):null,o=r?A=>{const e=A.assetId,t=s[e]||0;s[e]=t+1,r.register(A,e)}:()=>{};A.exports=class{constructor(A,e,t,i,B){this.assetType=A,this.assetId=e,this.setData(i,t||A.runtimeFormat,B),this.dependencies=[],o(this)}setData(A,e,t){if(A&&!e)throw new Error("Data provided without specifying its format");this.dataFormat=e,this.data=A,t&&(this.assetId=i(A)),this.clean=!t}decodeText(){return(new TextDecoder).decode(this.data)}encodeTextData(A,e,t){const i=new TextEncoder;this.setData(i.encode(A),e,t)}encodeDataURI(A){return A=A||this.assetType.contentType,"data:".concat(A,";base64,").concat(((A,e)=>{if(!Object.prototype.hasOwnProperty.call(n,A))if("undefined"==typeof btoa){const i=t(430);n[A]=i.fromByteArray(e)}else{if(null===B){B=new Array(256);for(let A=0;A<256;A++)B[A]=String.fromCharCode(A)}const{length:t}=e;let i="";for(let A=0,n=0;A{if(A)return A===this||e(A.target)};if(e(A))throw new Error("Effect cannot connect to itself");this.target=A,null!==this.outputNode&&this.outputNode.disconnect(),(this._isPatch||this._lastPatch+this.audioEngine.DECAY_DURATION * {\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('+g+');\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',""]),o.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"},e.a=o},function(A,e,t){const i=t(141),B=t(1);A.exports=new class extends i{constructor(){super(),this.services={},this.workerClass="undefined"==typeof Worker?null:Worker,this.workers=[]}callSync(A,e){const{provider:t,isRemote:i}=this._getServiceProvider(A);if(t){if(i)throw new Error("Cannot use 'callSync' on remote provider for service ".concat(A,"."));for(var B=arguments.length,n=new Array(B>2?B-2:0),s=2;s{B.error("Could not handshake with worker: ".concat(A))})):B.warn("Central dispatch ignoring attempt to add duplicate worker")}_getServiceProvider(A){const e=this.services[A];return e&&{provider:e,isRemote:Boolean(this.workerClass&&e instanceof this.workerClass||e.isRemote)}}_onDispatchMessage(A,e){let t;switch(e.method){case"setService":t=this.setService(e.args[0],A);break;default:B.error("Central dispatch received message for unknown method: ".concat(e.method))}return t}}},function(A,e){var t={black:"#000",red:"#c23621",green:"#25bc26",yellow:"#bbbb00",blue:"#492ee1",magenta:"#d338d3",cyan:"#33bbc8",gray:"#808080",purple:"#708"};A.exports=function(A,e){return e?"color: #fff; background: "+t[A]+";":"color: "+t[A]+";"}},function(A,e,t){const i=t(6);A.exports=function(A,e,t){return A&&A.id&&A.default?i(A,e,t):A}},function(A,e){var t="long",i="short",B="numeric";A.exports={number:{decimal:{style:"decimal"},integer:{style:"decimal",maximumFractionDigits:0},currency:{style:"currency",currency:"USD"},percent:{style:"percent"},default:{style:"decimal"}},date:{short:{month:B,day:B,year:"2-digit"},medium:{month:i,day:B,year:B},long:{month:t,day:B,year:B},full:{month:t,day:B,year:B,weekday:t},default:{month:i,day:B,year:B}},time:{short:{hour:B,minute:B},medium:{hour:B,minute:B,second:B},long:{hour:B,minute:B,second:B,timeZoneName:i},full:{hour:B,minute:B,second:B,timeZoneName:i},default:{hour:B,minute:B,second:B}},duration:{default:{hours:{minimumIntegerDigits:1,maximumFractionDigits:0},minutes:{minimumIntegerDigits:2,maximumFractionDigits:0},seconds:{minimumIntegerDigits:2,maximumFractionDigits:3}}},parseNumberPattern:function(A){if(A){var e={},t=A.match(/\b[A-Z]{3}\b/i),i=A.replace(/[^¤]/g,"").length;if(!i&&t&&(i=1),i?(e.style="currency",e.currencyDisplay=1===i?"symbol":2===i?"code":"name",e.currency=t?t[0].toUpperCase():"USD"):A.indexOf("%")>=0&&(e.style="percent"),!/[@#0]/.test(A))return e.style?e:void 0;if(e.useGrouping=A.indexOf(",")>=0,/E\+?[@#0]+/i.test(A)||A.indexOf("@")>=0){var B=A.replace(/E\+?[@#0]+|[^@#0]/gi,"");e.minimumSignificantDigits=Math.min(Math.max(B.replace(/[^@0]/g,"").length,1),21),e.maximumSignificantDigits=Math.min(Math.max(B.length,1),21)}else{for(var n=A.replace(/[^#0.]/g,"").split("."),s=n[0],r=s.length-1;"0"===s[r];)--r;e.minimumIntegerDigits=Math.min(Math.max(s.length-1-r,1),21);var o=n[1]||"";for(r=0;"0"===o[r];)++r;for(e.minimumFractionDigits=Math.min(Math.max(r,0),20);"#"===o[r];)++r;e.maximumFractionDigits=Math.min(Math.max(r,0),20)}return e}},parseDatePattern:function(A){if(A){for(var e={},n=0;n{this._openRequests[t]={resolve:A,reject:e}});return this._sendRequest(A,e,t),i}sendRemoteNotification(A,e){this._sendRequest(A,e)}didReceiveCall(){throw new Error("Must override didReceiveCall")}_sendMessage(){throw new Error("Must override _sendMessage")}_sendRequest(A,e,t){const i={jsonrpc:"2.0",method:A,params:e};null!==t&&(i.id=t),this._sendMessage(i)}_handleMessage(A){if("2.0"!==A.jsonrpc)throw new Error("Bad or missing JSON-RPC version in message: ".concat(A));A.hasOwnProperty("method")?this._handleRequest(A):this._handleResponse(A)}_sendResponse(A,e,t){const i={jsonrpc:"2.0",id:A};t?i.error=t:i.result=e||null,this._sendMessage(i)}_handleResponse(A){const{result:e,error:t,id:i}=A,B=this._openRequests[i];delete this._openRequests[i],B&&(t?B.reject(t):B.resolve(e))}_handleRequest(A){const{method:e,params:t,id:i}=A,B=this.didReceiveCall(e,t);i&&Promise.resolve(B).then(A=>{this._sendResponse(i,A)},A=>{this._sendResponse(i,null,A)})}}},function(A){A.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 (giả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(A,e){A.exports=(A,e,t)=>{let i=null;const B=window.AbortController?new window.AbortController:null,n=B?B.signal:null;return Promise.race([fetch(A,Object.assign({signal:n},e)).then(A=>(clearTimeout(i),A),A=>{throw clearTimeout(i),A}),new Promise((A,e)=>{i=setTimeout(()=>{B&&B.abort(),e(new Error("Fetch timed out after ".concat(t," ms")))},t)})])}},function(A,e,t){function i(A,e){var t=Object.keys(A);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(A);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(A,e).enumerable}))),t.push.apply(t,i)}return t}function B(A,e,t){return e in A?Object.defineProperty(A,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):A[e]=t,A}const n=t(19),{OrderedMap:s}=t(27),r=t(79),o=t(4),g=t(17),a=t(83),c=t(3),Q=t(230),E=t(231),w=t(86),C=t(48),l=t(239),I=t(44),h=t(35),u=t(1),d=t(71),Y=t(15),M=t(10),F=t(34),D=t(240),m=t(241),p=t(243),U=t(244),f=t(245),N=t(246),G=t(247),y=t(248),H=t(87),R=t(7),k=t(8),x={scratch3_control:t(249),scratch3_event:t(250),scratch3_looks:t(251),scratch3_motion:t(252),scratch3_operators:t(253),scratch3_sound:t(254),scratch3_sensing:t(255),scratch3_data:t(256),scratch3_procedures:t(257)},J=t(258),T=t(259),S=["#0FBD8C","#0DA57A","#0B8E69"],b=(()=>{const A={};return A[o.ANGLE]={shadow:{type:"math_angle",fieldName:"NUM"}},A[o.COLOR]={shadow:{type:"colour_picker",fieldName:"COLOUR"}},A[o.NUMBER]={shadow:{type:"math_number",fieldName:"NUM"}},A[o.STRING]={shadow:{type:"text",fieldName:"TEXT"}},A[o.BOOLEAN]={check:"Boolean"},A[o.MATRIX]={shadow:{type:"matrix",fieldName:"MATRIX"}},A[o.NOTE]={shadow:{type:"note",fieldName:"NOTE"}},A[o.IMAGE]={fieldType:"field_image"},A[o.COSTUME]={shadow:{type:"looks_costume",fieldName:"COSTUME"}},A[o.SOUND]={shadow:{type:"sound_sounds_menu",fieldName:"SOUND_MENU"}},A})(),j=A=>{let e=0;return{canAddCloudVariable:()=>e{e++},removeCloudVariable:()=>{e--},hasCloudVariables:()=>e>0,getNumberOfCloudVariables:()=>e}};let z=-1,v=-1,L=-1;class P extends n{constructor(){super(),this.targets=[],this.executableTargets=[],this.threads=[],this.threadMap=new Map,this.sequencer=new E(this),this.flyoutBlocks=new g(this,!0),this.monitorBlocks=new g(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=s({}),this._prevMonitorState=s({}),this.turboMode=!1,this.frameLoop=new T(this),this.currentStepTime=1e3/30,this.updateCurrentMSecs(),this.redrawRequested=!1,this._registerBlockPackages(),this.ioDevices={clock:new p(this),cloud:new U(this),keyboard:new f(this),mouse:new N(this),mouseWheel:new G(this),userData:new y,video:new H(this)},this.peripheralExtensions={},this.profiler=null,this.cloudOptions={limit:10};const A=j(this.cloudOptions);this.hasCloudData=A.hasCloudVariables,this.canAddCloudVariable=A.canAddCloudVariable,this.getNumberOfCloudVariables=A.getNumberOfCloudVariables,this.addCloudVariable=this._initializeAddCloudVariable(A),this.removeCloudVariable=this._initializeRemoveCloudVariable(A),this.origin=null,this._stageTarget=null,this.addonBlocks={},this.stageWidth=P.STAGE_WIDTH,this.stageHeight=P.STAGE_HEIGHT,this.runtimeOptions={maxClones:P.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(P.HAS_CLOUD_DATA_UPDATE,A=>{this.setExternalCommunicationMethod("cloudVariables",A)}),this.enforcePrivacy=!0,this.extensionButtons=new Map,this.fontManager=new m(this)}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 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 THREAD_STEP_INTERVAL(){return 1e3/60}static get THREAD_STEP_INTERVAL_COMPATIBILITY(){return 1e3/30}static get MAX_CLONES(){return 300}_initializeAddCloudVariable(A){return()=>{const e=this.hasCloudData();A.addCloudVariable(),!e&&this.hasCloudData()&&this.emit(P.HAS_CLOUD_DATA_UPDATE,!0)}}_initializeRemoveCloudVariable(A){return()=>{const e=this.hasCloudData();A.removeCloudVariable(),e&&!this.hasCloudData()&&this.emit(P.HAS_CLOUD_DATA_UPDATE,!1)}}_registerBlockPackages(){for(const A in x)if(x.hasOwnProperty(A)){const e=new x[A](this);if(e.getPrimitives){const A=e.getPrimitives();for(const t in A)A.hasOwnProperty(t)&&(this._primitives[t]=A[t].bind(e))}if(e.getHats){const A=e.getHats();for(const e in A)A.hasOwnProperty(e)&&(this._hats[e]=A[e])}e.getMonitored&&(this.monitorBlockInfo=Object.assign({},this.monitorBlockInfo,e.getMonitored())),this.compilerRegisterExtension(A,e)}}compilerRegisterExtension(A,e){this["ext_".concat(A)]=e}getMonitorState(){return this._monitorState}_makeExtensionMenuId(A,e){return"".concat(e,"_menu_").concat(A)}makeMessageContextForTarget(A){const e={};(A=A||this.getEditingTarget()||this.getTargetForStage())&&(e.targetType=A.isStage?I.STAGE:I.SPRITE)}_registerExtensionPrimitives(A){const e={id:A.id,name:d(A.name),showStatusButton:A.showStatusButton,blockIconURI:A.blockIconURI,menuIconURI:A.menuIconURI};A.color1?(e.color1=A.color1,e.color2=A.color2,e.color3=A.color3):(e.color1=S[0],e.color2=S[1],e.color3=S[2]),this._blockInfo.push(e),this._fillExtensionCategory(e,A);for(const t in e.customFieldTypes)if(A.customFieldTypes.hasOwnProperty(t)){const A=e.customFieldTypes[t];this.emit(P.EXTENSION_FIELD_ADDED,{name:"field_".concat(A.extendedName),implementation:A.fieldImplementation})}this.emit(P.EXTENSION_ADDED,e)}_refreshExtensionPrimitives(A){const e=this._blockInfo.find(e=>e.id===A.id);e&&(e.name=d(A.name),this._fillExtensionCategory(e,A),this.emit(P.BLOCKSINFO_UPDATE,e))}_fillExtensionCategory(A,e){A.blocks=[],A.customFieldTypes={},A.menus=[],A.menuInfo={};for(const t in e.menus)if(e.menus.hasOwnProperty(t)){const i=e.menus[t],B=this._buildMenuForScratchBlocks(t,i,A);A.menus.push(B),A.menuInfo[t]=i}for(const t in e.customFieldTypes)if(e.customFieldTypes.hasOwnProperty(t)){const i=e.customFieldTypes[t],B=this._buildCustomFieldInfo(t,i,e.id,A);A.customFieldTypes[t]=B}if(e.docsURI){const t={info:{},xml:"')};A.blocks.push(t)}for(const t of e.blocks)try{const e=this._convertForScratchBlocks(t,A);if(A.blocks.push(e),e.json){const A=e.json.type;t.blockType!==c.EVENT&&(this._primitives[A]=e.info.func),t.blockType===c.EVENT||t.blockType===c.HAT?this._hats[A]={edgeActivated:t.isEdgeActivated,restartExistingThreads:t.shouldRestartExistingThreads}:t.blockType===c.CONDITIONAL?this._flowing[A]={conditional:!0,loop:!1}:t.blockType===c.LOOP&&(this._flowing[A]={conditional:!1,loop:!0})}}catch(A){u.error("Error parsing block: ",{block:t,error:A})}}_convertMenuItems(A){if("function"!=typeof A){const e=this.makeMessageContextForTarget();return A.map(A=>{const t=d(A,e);switch(typeof t){case"string":return[t,t];case"object":return[d(A.text,e),A.value];default:throw new Error("Can't interpret menu item: ".concat(JSON.stringify(A)))}})}return A}_buildMenuForScratchBlocks(A,e,t){const i=this._makeExtensionMenuId(A,t.id),B=this._convertMenuItems(e.items);return{json:{message0:"%1",type:i,inputsInline:!0,output:"String",colour:t.color1,colourSecondary:t.color2,colourTertiary:t.color3,outputShape:e.acceptReporters?l.OUTPUT_SHAPE_ROUND:l.OUTPUT_SHAPE_SQUARE,args0:[{type:"field_dropdown",name:A,options:B}]}}}_buildCustomFieldInfo(A,e,t,i){const B="".concat(t,"_").concat(A);return{fieldName:A,extendedName:B,argumentTypeInfo:{shadow:{type:B,fieldName:"field_".concat(B)}},scratchBlocksDefinition:this._buildCustomFieldTypeForScratchBlocks(B,e.output,e.outputShape,i),fieldImplementation:e.implementation}}_buildCustomFieldTypeForScratchBlocks(A,e,t,i){return{json:{type:A,message0:"%1",inputsInline:!0,output:e,colour:i.color1,colourSecondary:i.color2,colourTertiary:i.color3,outputShape:t,args0:[{name:"field_".concat(A),type:"field_".concat(A)}]}}}_convertForScratchBlocks(A,e){return"---"===A?this._convertSeparatorForScratchBlocks(A):A.blockType===c.LABEL?this._convertLabelForScratchBlocks(A):A.blockType===c.BUTTON?this._convertButtonForScratchBlocks(A,e):A.blockType===c.XML?this._convertXmlForScratchBlocks(A):this._convertBlockForScratchBlocks(A,e)}_convertBlockForScratchBlocks(A,e){const t="".concat(e.id,"_").concat(A.opcode),i={type:t,inputsInline:!0,category:e.name,colour:e.color1,colourSecondary:e.color2,colourTertiary:e.color3},B={argsMap:{},blockJSON:i,categoryInfo:e,blockInfo:A,inputList:[]},n=A.blockIconURI||e.blockIconURI;if(n){i.extensions=["scratch_extension"],i.message0="%1 %2";const A={type:"field_image",src:n,width:40,height:40},e={type:"field_vertical_separator"};i.args0=[A,e]}switch(A.blockType){case c.COMMAND:i.outputShape=l.OUTPUT_SHAPE_SQUARE,i.previousStatement=null,A.isTerminal||(i.nextStatement=null);break;case c.REPORTER:i.output=A.allowDropAnywhere?null:"String",i.outputShape=l.OUTPUT_SHAPE_ROUND;break;case c.BOOLEAN:i.output="Boolean",i.outputShape=l.OUTPUT_SHAPE_HEXAGONAL;break;case c.HAT:case c.EVENT:A.hasOwnProperty("isEdgeActivated")||(A.isEdgeActivated=!0),i.outputShape=l.OUTPUT_SHAPE_SQUARE,i.nextStatement=null;break;case c.CONDITIONAL:case c.LOOP:A.branchCount=A.branchCount||1,i.outputShape=l.OUTPUT_SHAPE_SQUARE,i.previousStatement=null,A.isTerminal||(i.nextStatement=null)}const s=Array.isArray(A.text)?A.text:[A.text];let r=0,o=0,g=0;const a=this._convertPlaceholders.bind(this,B),Q=this.makeMessageContextForTarget();for(;r0?o+1:"")}],++o,++g)}A.blockType===c.REPORTER||A.blockType===c.BOOLEAN?A.disableMonitor||0!==B.inputList.length||(i.checkboxInFlyout=!0):A.blockType===c.LOOP&&(i["lastDummyAlign".concat(g)]="RIGHT",i["message".concat(g)]="%1",i["args".concat(g)]=[{type:"field_image",src:"./static/blocks-media/repeat.svg",width:24,height:24,alt:"*",flip_rtl:!0}],++g);const E=A.isDynamic?''):"",w=B.inputList.join(""),C='').concat(E).concat(w,"");return{info:B.blockInfo,json:B.blockJSON,xml:C}}_convertSeparatorForScratchBlocks(A){return{info:A,xml:''}}_convertLabelForScratchBlocks(A){return{info:A,xml:'')}}_convertButtonForScratchBlocks(A,e){const t=this.makeMessageContextForTarget(),i=d(A.text,t);if(["MAKE_A_LIST","MAKE_A_PROCEDURE","MAKE_A_VARIABLE"].includes(A.func))return{info:A,xml:'')};const B="".concat(e.id,"_").concat(A.func);return this.extensionButtons.set(B,A.callFunc),{info:A,xml:'')}}_convertXmlForScratchBlocks(A){return{info:A,xml:A.xml}}handleExtensionButtonPress(A){this.extensionButtons.get(A)()}_constructInlineImageJson(A){return A.dataURI||u.warn("Missing data URI in extension block with argument type IMAGE"),{type:"field_image",src:A.dataURI||"",width:24,height:24,flip_rtl:A.flipRTL||!1}}_convertPlaceholders(A,e,t){const i=A.blockInfo.arguments[t]||{};let B,n=b[i.type]||{};if(!b[i.type]&&A.categoryInfo.customFieldTypes[i.type]&&(n=A.categoryInfo.customFieldTypes[i.type].argumentTypeInfo),"field_image"===n.fieldType)B=this._constructInlineImageJson(i);else{B={type:"input_value",name:t};const e=void 0===i.defaultValue?null:d(i.defaultValue,this.makeMessageContextForTarget()).toString();let s,r,o;if(n.check&&(B.check=n.check),i.menu){const e=A.categoryInfo.menuInfo[i.menu];e.acceptReporters?(s=t,r=this._makeExtensionMenuId(i.menu,A.categoryInfo.id),o=i.menu):(B.type="field_dropdown",B.options=this._convertMenuItems(e.items),s=null,r=null,o=t)}else s=t,r=n.shadow&&n.shadow.type||null,o=n.shadow&&n.shadow.fieldName||null;s&&A.inputList.push('')),r&&A.inputList.push('')),null!==e&&o&&A.inputList.push('').concat(F(e),"")),r&&A.inputList.push(""),s&&A.inputList.push("")}const s="args".concat(A.outLineNum),r=A.blockJSON[s]=A.blockJSON[s]||[];B&&r.push(B);const o=r.length;return A.argsMap[t]=o,"%".concat(o)}getBlocksXML(A){return this._blockInfo.map(e=>{const{name:t,color1:i,color2:B}=e,n=e.blocks.filter(e=>{let t=!0;return A&&e.info.filter&&(t=e.info.filter.includes(A.isStage?I.STAGE:I.SPRITE)),t&&!e.info.hideFromPalette}),s='colour="'.concat(F(i),'" secondaryColour="').concat(F(B),'"');let r="";e.menuIconURI?r=e.menuIconURI:e.blockIconURI&&(r=e.blockIconURI);const o=r?'iconURI="'.concat(F(r),'"'):"";let g="";e.showStatusButton&&(g='showStatusButton="true"');let a='"),a+=n.map(A=>A.xml).join(""),a+="",{id:e.id,xml:a}})}getBlocksJSON(){return this._blockInfo.reduce((A,e)=>A.concat(e.blocks.map(A=>A.json)),[])}getScratchLinkSocket(A){return(this._linkSocketFactory||this._defaultScratchLinkSocketFactory)(A)}configureScratchLinkSocketFactory(A){this._linkSocketFactory=A}_defaultScratchLinkSocketFactory(A){return new D(A)}registerPeripheralExtension(A,e){this.peripheralExtensions[A]=e}scanForPeripheral(A){this.peripheralExtensions[A]&&this.peripheralExtensions[A].scan()}connectPeripheral(A,e){this.peripheralExtensions[A]&&this.peripheralExtensions[A].connect(e)}disconnectPeripheral(A){this.peripheralExtensions[A]&&this.peripheralExtensions[A].disconnect()}getPeripheralIsConnected(A){let e=!1;return this.peripheralExtensions[A]&&(e=this.peripheralExtensions[A].isConnected()),e}emitMicListening(A){this.emit(P.MIC_LISTENING,A)}getOpcodeFunction(A){return this._primitives[A]}getIsHat(A){return this._hats.hasOwnProperty(A)}getIsEdgeActivatedHat(A){return this._hats.hasOwnProperty(A)&&this._hats[A].edgeActivated}attachAudioEngine(A){this.audioEngine=A}attachRenderer(A){this.renderer=A,this.renderer.setLayerGroupOrdering(Y.LAYER_GROUPS),this.renderer.offscreenTouching=!this.runtimeOptions.fencing,this.updatePrivacy()}attachV2BitmapAdapter(A){this.v2BitmapAdapter=A}attachStorage(A){if(this.storage=A,this.isPackaged){const e=A.createAsset;let t=0;A.createAsset=function(A,i,B,n,s){return n||(n=(++t).toString()),e.call(this,A,i,B,n,!1)}}}_pushThread(A,e,t){const i=new h(A);return i.target=e,i.stackClick=Boolean(t&&t.stackClick),i.updateMonitor=Boolean(t&&t.updateMonitor),i.blockContainer=i.updateMonitor?this.monitorBlocks:e.blocks,i.pushStack(A),this.threads.push(i),i.stackClick||i.updateMonitor||this.threadMap.set(i.getId(),i),t&&t.updateMonitor||!this.compilerOptions.enabled||i.tryCompile(),i}_stopThread(A){A.isKilled=!0,this.sequencer.retireThread(A)}_restartThread(A){const e=new h(A.topBlock);e.target=A.target,e.stackClick=A.stackClick,e.updateMonitor=A.updateMonitor,e.blockContainer=A.blockContainer,e.pushStack(A.topBlock),A.triedToCompile&&this.compilerOptions.enabled&&e.tryCompile(),e.stackClick||e.updateMonitor||this.threadMap.set(e.getId(),e);const t=this.threads.indexOf(A);return t>-1?(this.threads[t]=e,e):(this.threads.push(A),A)}emitCompileError(A,e){this.emit(P.COMPILE_ERROR,A,e)}isActiveThread(A){return A.stack.length>0&&A.status!==h.STATUS_DONE&&this.threads.indexOf(A)>-1}isWaitingThread(A){return A.status===h.STATUS_PROMISE_WAIT||A.status===h.STATUS_YIELD_TICK||!this.isActiveThread(A)}toggleScript(A,e){e=Object.assign({target:this._editingTarget,stackClick:!1},e);for(let t=0;t=0;e--){const i=t[e],B=i.blocks.getScripts();for(let e=0;e=0;t--){const B=i[t],n=a.getScripts(B.blocks,A);for(let A=0;A{const{blockId:s,fieldsOfInputs:r}=A;for(const A in e)if(r[A].value!==e[A])return;if(B.restartExistingThreads){const A=this.threadMap.get(h.getIdFromTargetAndBlock(t,s));if(A)return void i.push(this._restartThread(A))}else for(let A=0;A{A.isCompiled?A.executableHat&&(C.saveGlobalState(),C(A),C.restoreGlobalState()):(w(this.sequencer,A),A.goToNextBlock())}),i}dispose(){this.stopAll(),this.targets.forEach(A=>{A.isOriginal&&A.deleteMonitors()}),this.targets.map(this.disposeTarget,this);const A=s({});A.equals(this._monitorState)||(this._monitorState=A,this.emit(P.MONITORS_UPDATE,this._monitorState)),this.emit(P.RUNTIME_DISPOSED),this.ioDevices.clock.resetProjectTimer(),this.fontManager.clear(),this.hasCloudData()&&this.emit(P.HAS_CLOUD_DATA_UPDATE,!1),this.ioDevices.cloud.clear();const e=j(this.cloudOptions);this.hasCloudData=e.hasCloudVariables,this.canAddCloudVariable=e.canAddCloudVariable,this.getNumberOfCloudVariables=e.getNumberOfCloudVariables,this.addCloudVariable=this._initializeAddCloudVariable(e),this.removeCloudVariable=this._initializeRemoveCloudVariable(e)}addTarget(A){this.targets.push(A),this.executableTargets.push(A),A.isStage&&!this._stageTarget&&(this._stageTarget=A)}moveExecutable(A,e){const t=this.executableTargets.indexOf(A);this.executableTargets.splice(t,1);let i=t+e;return i>this.executableTargets.length&&(i=this.executableTargets.length),i<=0&&(i=this.executableTargets.length>0&&this.executableTargets[0].isStage?1:0),this.executableTargets.splice(i,0,A),i}setExecutablePosition(A,e){const t=this.executableTargets.indexOf(A);return this.moveExecutable(A,e-t)}removeExecutable(A){const e=this.executableTargets.indexOf(A);e>-1&&this.executableTargets.splice(e,1)}disposeTarget(A){this.targets=this.targets.filter(e=>A!==e||(e.dispose(),!1)),this._stageTarget===A&&(this._stageTarget=null)}stopForTarget(A,e){this.emit(P.STOP_FOR_TARGET,A,e);for(let t=0;tA.clearEdgeActivatedValues());for(let A=0;A!A.isKilled),this.updateThreadMap();for(const A in this._hats){if(!this._hats.hasOwnProperty(A))continue;this._hats[A].edgeActivated&&this.startHats(A)}this.redrawRequested=!1,this._pushMonitors(),null!==this.profiler&&(-1===v&&(v=this.profiler.idByName("Sequencer.stepThreads")),this.profiler.start(v)),this.emit(P.BEFORE_EXECUTE);const A=this.sequencer.stepThreads();null!==this.profiler&&this.profiler.stop(),this.emit(P.AFTER_EXECUTE),this._updateGlows(A),this._emitProjectRunStatus(this.threads.length+A.length-this._getMonitorThreadCount([...this.threads,...A])),this._lastStepDoneThreads=A,this.renderer&&(null!==this.profiler&&(-1===L&&(L=this.profiler.idByName("RenderWebGL.draw")),this.profiler.start(L)),document.hidden||this.frameLoop._interpolationAnimation||this.renderer.draw(),null!==this.profiler&&this.profiler.stop()),this._refreshTargets&&(this.emit(P.TARGETS_UPDATE,!1),this._refreshTargets=!1),this._prevMonitorState.equals(this._monitorState)||(this.emit(P.MONITORS_UPDATE,this._monitorState),this._prevMonitorState=this._monitorState),null!==this.profiler&&(this.profiler.stop(),this.profiler.reportFrames()),this.interpolationEnabled&&(this._lastStepTime=Date.now())}_getMonitorThreadCount(A){let e=0;return A.forEach(A=>{A.updateMonitor&&e++}),e}_pushMonitors(){this.monitorBlocks.runAllMonitored(this)}setEditingTarget(A){const e=this._editingTarget;this._editingTarget=A,this._scriptGlowsPreviousFrame=[],this._updateGlows(),e!==this._editingTarget&&this.requestToolboxExtensionsUpdate()}setCompatibilityMode(A){A?this.setFramerate(30):this.setFramerate(60)}setFramerate(A){A>250&&(A=250),A<0&&(A=1),this.frameLoop.setFramerate(A),this.emit(P.FRAMERATE_CHANGED,A)}setInterpolation(A){this.interpolationEnabled=A,this.frameLoop.setInterpolation(this.interpolationEnabled),this.emit(P.INTERPOLATION_CHANGED,A)}setRuntimeOptions(A){this.runtimeOptions=Object.assign({},this.runtimeOptions,A),this.emit(P.RUNTIME_OPTIONS_CHANGED,this.runtimeOptions),this.renderer&&(this.renderer.offscreenTouching=!this.runtimeOptions.fencing)}setCompilerOptions(A){this.compilerOptions=Object.assign({},this.compilerOptions,A),this.resetAllCaches(),this.emit(P.COMPILER_OPTIONS_CHANGED,this.compilerOptions)}setStageSize(A,e){if(A=Math.round(Math.max(1,A)),e=Math.round(Math.max(1,e)),this.stageWidth!==A||this.stageHeight!==e){const t=A-this.stageWidth,i=e-this.stageHeight;if(this._monitorState.size>0){const A=t/2,e=i/2;for(const t of this._monitorState.valueSeq()){const i=t.set("x",t.get("x")+A).set("y",t.get("y")+e);this.requestUpdateMonitor(i)}this.emit(P.MONITORS_UPDATE,this._monitorState)}this.stageWidth=A,this.stageHeight=e,this.renderer&&this.renderer.setStageSize(-A/2,A/2,-e/2,e/2)}this.emit(P.STAGE_SIZE_CHANGED,A,e)}setInEditor(A){}convertToPackagedRuntime(){if(this.storage)throw new Error("convertToPackagedRuntime must be called before attachStorage");this.isPackaged=!0}resetAllCaches(){for(const A of this.targets)A.isOriginal&&A.blocks.resetCache();this.flyoutBlocks.resetCache(),this.monitorBlocks.resetCache()}addAddonBlock(A){const e=A.procedureCode,t=A.arguments||[],n=t,s=t.map((A,e)=>"arg".concat(e)),r=t.map(()=>"");if(this.addonBlocks[e]=function(A){for(var e=1;eA.id===t);if(!i){const A='';i={id:t,name:d({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(A)),blocks:[],customFieldTypes:{},menus:[]},this._blockInfo.unshift(i)}i.blocks.push({info:{},xml:'"})}this.resetAllCaches()}getAddonBlock(A){return Object.prototype.hasOwnProperty.call(this.addonBlocks,A)?this.addonBlocks[A]:null}findProjectOptionsComment(){const A=this.getTargetForStage().comments;for(const e of Object.values(A))if(e.text.includes(" // _twconfig_"))return e;return null}parseProjectOptions(){const A=this.findProjectOptionsComment();if(!A)return;const e=A.text.split("\n").find(A=>A.endsWith(" // _twconfig_"));if(!e)return void u.warn("Config comment does not contain valid line");const t=e.substr(0,e.length-" // _twconfig_".length);let i;try{if(i=r.parse(t),!i||"object"!=typeof i)throw new Error("Invalid object")}catch(A){return void u.warn("Config comment has invalid JSON",A)}"number"==typeof i.framerate&&this.setFramerate(i.framerate),i.turbo&&(this.turboMode=!0,this.emit(P.TURBO_MODE_ON)),i.interpolation&&this.setInterpolation(!0),i.runtimeOptions&&this.setRuntimeOptions(i.runtimeOptions),i.hq&&this.renderer&&this.renderer.setUseHighQualityRender(!0);const B=+i.width||this.stageWidth,n=+i.height||this.stageHeight;B===this.stageWidth&&n===this.stageHeight||this.setStageSize(B,n)}_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 A=(e,t)=>{const i={};for(const B of Object.keys(t)){const n=t[B],s=e[B];if("object"==typeof n&&n){const e=A(s,n);Object.keys(e).length>0&&(i[B]=e)}else n!==s&&(i[B]=n)}return i};return A(this._defaultStoredSettings,this._generateAllProjectOptions())}storeProjectOptions(){const A=this.generateDifferingProjectOptions(),e="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(r.stringify(A)).concat(" // _twconfig_"),t=this.findProjectOptionsComment();if(t)t.text=e;else{this.getTargetForStage().createComment(k(),null,e,50,50,350,170,!1)}this.emitProjectChanged()}precompile(){this.allScriptsDo((A,e)=>{const t=e.blocks.getBlock(A);if(this.getIsHat(t.opcode)){const t=new h(A);t.target=e,t.blockContainer=e.blocks,t.tryCompile()}})}enableDebug(){this.resetAllCaches(),this.debug=!0}_updateGlows(A){const e=[];e.push.apply(e,this.threads),A&&e.push.apply(e,A);const t=[],i=[];for(let A=0;A0&&this.emit(P.PROJECT_RUN_START),this._nonMonitorThreadCount>0&&0===A&&this.emit(P.PROJECT_RUN_STOP),this._nonMonitorThreadCount=A}quietGlow(A){const e=this._scriptGlowsPreviousFrame.indexOf(A);e>-1&&this._scriptGlowsPreviousFrame.splice(e,1)}glowBlock(A,e){e?this.emit(P.BLOCK_GLOW_ON,{id:A}):this.emit(P.BLOCK_GLOW_OFF,{id:A})}glowScript(A,e){e?this.emit(P.SCRIPT_GLOW_ON,{id:A}):this.emit(P.SCRIPT_GLOW_OFF,{id:A})}emitBlockDragUpdate(A){this.emit(P.BLOCK_DRAG_UPDATE,A)}emitBlockEndDrag(A,e){this.emit(P.BLOCK_DRAG_END,A,e)}visualReport(A,e){this.emit(P.VISUAL_REPORT,{id:A,value:String(e)})}requestAddMonitor(A){const e=A.get("id");this.requestUpdateMonitor(A)||(this._monitorState=this._monitorState.set(e,A))}requestUpdateMonitor(A){const e=A.get("id");return!!this._monitorState.has(e)&&(this._monitorState=this._monitorState.set(e,this._monitorState.get(e).mergeWith((A,e)=>null==e?A:e,A)),!0)}requestRemoveMonitor(A){this._monitorState=this._monitorState.delete(A)}requestHideMonitor(A){return this.requestUpdateMonitor(new Map([["id",A],["visible",!1]]))}requestShowMonitor(A){return this.requestUpdateMonitor(new Map([["id",A],["visible",!0]]))}requestRemoveMonitorByTargetId(A){this._monitorState=this._monitorState.filterNot(e=>e.targetId===A)}getTargetById(A){for(let e=0;eA.id===e);if(!i)return;const B=i.blocks.find(A=>A.info.opcode===t);return B?{category:"extension",label:"".concat(i.name,": ").concat(B.info.text)}:void 0}createNewGlobalVariable(A,e,t){const i="string"==typeof t?t:M.SCALAR_TYPE,B=this.getAllVarNamesOfType(i),n=R.unusedName(A,B),s=new M(e||k(),n,i);return this.getTargetForStage().variables[s.id]=s,s}requestRedraw(){this.redrawRequested=!0}requestTargetsUpdate(A){A.isOriginal&&(this._refreshTargets=!0)}requestBlocksUpdate(){this.emit(P.BLOCKS_NEED_UPDATE)}requestToolboxExtensionsUpdate(){this.emit(P.TOOLBOX_EXTENSIONS_NEED_UPDATE)}start(){this.frameLoop.running||(this.frameLoop.start(),this.emit(P.RUNTIME_STARTED))}stop(){this.frameLoop.running&&(this.frameLoop.stop(),this.emit(P.RUNTIME_STOPPED))}enableProfiling(A){Q.available()&&(this.profiler=new Q(A))}disableProfiling(){this.profiler=null}updateCurrentMSecs(){this.currentMSecs=Date.now()}updatePrivacy(){const A=this.enforcePrivacy&&Object.values(this.externalCommunicationMethods).some(A=>A);this.renderer&&this.renderer.setPrivateSkinAccess&&this.renderer.setPrivateSkinAccess(!A)}setEnforcePrivacy(A){this.enforcePrivacy=A,this.updatePrivacy()}setExternalCommunicationMethod(A,e){if(!Object.prototype.hasOwnProperty.call(this.externalCommunicationMethods,A))throw new Error("Unknown method: ".concat(A));this.externalCommunicationMethods[A]=e,this.updatePrivacy()}}A.exports=P},function(A,e,t){"use strict";t.r(e),t.d(e,"_parse",(function(){return i})),t.d(e,"parse",(function(){return B})),t.d(e,"stringify",(function(){return n}));const i=A=>{let e=0;const t=t=>{const{line:i,column:B}=(()=>{let t=0,i=0;for(let B=0;B(e>=A.length&&t("Unexpected end of input"),A[e]),B=()=>i(e),n=()=>{e++},s=A=>{B()!==A&&t(`Expected '${A}' but found '${B()}'`),n()},r=(t=1,B=1)=>{if(e+B+t>A.length)return"";if(1===t)return i(e+B);let n="";for(let A=0;A{for(;;)if(/\s/.test(B()))n();else{const A=r(2,0);if("//"===A)for(n(),n();"\n"!==B();)n();else{if("/*"!==A)break;for(n(),n();"*/"!==r(2,0);)n();n(),n()}}},g=()=>{o();switch(B()){case'"':return Q();case"{":return w();case"[":return E();case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"-":return c();default:return a()}},a=()=>{if("null"===r(4,0)){for(let A=0;A<4;A++)n();return null}if("true"===r(4,0)){for(let A=0;A<4;A++)n();return!0}if("false"===r(5,0)){for(let A=0;A<5;A++)n();return!1}if("Infinity"===r(8,0)){for(let A=0;A<8;A++)n();return 1/0}if("NaN"===r(3,0)){for(let A=0;A<3;A++)n();return NaN}t(`Unexpected character '${B()}'`)},c=()=>{if("-Infinity"===r(9,0)){for(let A=0;A<9;A++)n();return-1/0}let A="";for(;A+=B(),/[\d.e+-]/i.test(r());)n();n();const e=+A;return Number.isNaN(e)&&t("Not a number: "+A),e},Q=()=>{s('"');let A="";for(;;){const e=B();if('"'===e)break;if("\\"===e)switch(n(),B()){case'"':A+='"';break;case"/":A+="/";break;case"\\":A+="\\";break;case"b":A+="\b";break;case"f":A+="\f";break;case"n":A+="\n";break;case"r":A+="\r";break;case"t":A+="\t";break;case"u":{let e="";for(let A=0;A<4;A++){n();const A=B();/[0-9a-f]/i.test(A)||t("Invalid hex code: "+A),e+=A}const i=Number.parseInt(e,16);A+=String.fromCharCode(i);break}default:t("Invalid escape code: \\"+B())}else A+=e;n()}return s('"'),A},E=()=>{s("["),o();const A=[];for(;o(),"]"!==B();){const e=g();if(A.push(e),o(),","!==B())break;n()}return s("]"),A},w=()=>{s("{"),o();const A={};for(;o(),"}"!==B();){const e=Q();o(),s(":");const t=g();if(A[e]=t,o(),","!==B())break;n()}return s("}"),A};return g()},B=A=>{try{return JSON.parse(A)}catch(e){try{return i(A)}catch(A){throw e}}},n=A=>{if("string"==typeof A)return JSON.stringify(A);if("number"==typeof A||"boolean"==typeof A)return A.toString();if(null==A||"symbol"==typeof A)return"null";if(Array.isArray(A))return`[${A.map(A=>n(A)).join(",")}]`;if("object"==typeof A){let e="{",t=!0;const i=Object.keys(A);for(let B=0;B0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.sequencer=A,this.thread=e,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 A=this.thread.peekStackFrame();return null===A.executionContext&&(A.executionContext={}),A.executionContext}stackTimerFinished(){return!(this.stackFrame.timer.timeElapsed(){t.status===s.STATUS_RUNNING&&(t.status=s.STATUS_PROMISE_WAIT),A.then(A=>{if(c(A,e,t,i,B),B&&(!i._isHat||t.stackClick)){let A,e;do{const i=t.popStack();if(null===i)return;if(e=t.target.blocks.getNextBlock(i),null!==e)break;A=t.peekStackFrame()}while(null!==A&&!A.isLoop);t.pushStack(e)}},A=>{n.warn("Primitive rejected promise: ",A),t.status=s.STATUS_RUNNING,t.popStack()})};class E{constructor(A,e){this.id=e.id,this.opcode=e.opcode,this.fields=e.fields,this.inputs=e.inputs,this.mutation=e.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:t}=g.sequencer,{opcode:i,fields:n,inputs:s}=this;this._isHat=t.getIsHat(i),this._blockFunction=t.getOpcodeFunction(i),this._definedBlockFunction=void 0!==this._blockFunction;const r=t._flowing[i];this._isConditional=!(!r||!r.conditional),this._isLoop=!(!r||!r.loop);const o=Object.keys(n);this._isShadowBlock=!this._definedBlockFunction&&1===o.length&&0===Object.keys(s).length,this._shadowValue=this._isShadowBlock&&n[o[0]].value;for(const A in n)this._argValues[A]="VARIABLE"===A||"LIST"===A||"BROADCAST_OPTION"===A?{id:n[A].id,name:n[A].value}:n[A].value;if(delete this._inputs.custom_block,"BROADCAST_INPUT"in this._inputs){this._argValues.BROADCAST_OPTION={id:null,name:null};const e=this._inputs.BROADCAST_INPUT;if(e.block===e.shadow){const t=A.getBlock(e.shadow).fields.BROADCAST_OPTION;this._argValues.BROADCAST_OPTION.id=t.id,this._argValues.BROADCAST_OPTION.name=t.value,delete this._inputs.BROADCAST_INPUT}}for(const e in this._inputs){const t=this._inputs[e];if(t.block){const i=B.getCached(A,t.block,E);if(i._isHat)continue;this._ops.push(...i._ops),i._parentKey=e,i._parentValues=this._argValues,i._isShadowBlock&&(this._argValues[e]=i._shadowValue)}}this._definedBlockFunction&&this._ops.push(this)}}A.exports=function(A,e){const t=A.runtime;g.sequencer=A,g.thread=e;const i=e.peekStack(),n=e.peekStackFrame();let r=e.blockContainer,w=B.getCached(r,i,E);if(null===w&&(r=t.flyoutBlocks,w=B.getCached(r,i,E),null===w))return void A.retireThread(e);const C=w._ops,l=C.length;let I=0;if(null!==n.reported){const A=n.reported;for(;IA.id===e);if(i){const A=i._parentKey,e=i._parentValues;"BROADCAST_INPUT"===A?(e.BROADCAST_OPTION.id=null,e.BROADCAST_OPTION.name=o.toString(t)):e[A]=t}}if(A.length>0){const e=A.reverse().find(A=>C.find(e=>e.id===A.opCached));I=e?C.findIndex(A=>A.id===e.opCached)+1:0}if(null!==e.justReported&&C[I]&&C[I].id===n.reporting){const A=C[I],t=e.justReported;e.justReported=null;const i=A._parentKey,B=A._parentValues;"BROADCAST_INPUT"===i?(B.BROADCAST_OPTION.id=null,B.BROADCAST_OPTION.name=o.toString(t)):B[i]=t,I+=1}n.reporting=null,n.reported=null,n.waitingReporter=!1}const h=I;for(;I{const e=A._parentKey,t=A._parentValues;return"BROADCAST_INPUT"===e?{opCached:A.id,inputValue:t[e].BROADCAST_OPTION.name}:{opCached:A.id,inputValue:t[e]}});break}if(e.status===s.STATUS_RUNNING)if(t)c(E,A,e,i,t);else{const A=i._parentKey,e=i._parentValues;"BROADCAST_INPUT"===A?(e.BROADCAST_OPTION.id=null,e.BROADCAST_OPTION.name=o.toString(E)):e[A]=E}}var u;if(null!==t.profiler){w._profiler!==t.profiler&&function(A,e){e._profiler=A,-1===a&&(a=A.idByName("blockFunction"));const t=e._ops;for(let e=0;ethis._setupPreview()):null}disableVideo(){if(this._disablePreview(),!this.provider)return null;this.provider.disableVideo()}getFrame(A){let{dimensions:e=B.DIMENSIONS,mirror:t=this.mirror,format:i=B.FORMAT_IMAGE_DATA,cacheTimeout:n=this._frameCacheTimeout}=A;return this.provider?this.provider.getFrame({dimensions:e,mirror:t,format:i,cacheTimeout:n}):null}setPreviewGhost(A){this._ghost=A,-1!==this._drawable&&this.runtime.renderer.updateDrawableEffect(this._drawable,"ghost",this._forceTransparentPreview?100:A)}_disablePreview(){-1!==this._skinId&&(this.runtime.renderer.updateBitmapSkin(this._skinId,new ImageData(...B.DIMENSIONS),1),this.runtime.renderer.updateDrawableVisible(this._drawable,!1)),this._renderPreviewFrame=null}_setupPreview(){const{renderer:A}=this.runtime;A&&(-1===this._skinId&&-1===this._drawable&&(this._skinId=A.createBitmapSkin(new ImageData(...B.DIMENSIONS),1),this._drawable=A.createDrawable(i.VIDEO_LAYER),A.updateDrawableSkinId(this._drawable,this._skinId),A.markSkinAsPrivate&&A.markSkinAsPrivate(this._skinId)),this._renderPreviewFrame||(A.updateDrawableEffect(this._drawable,"ghost",this._forceTransparentPreview?100:this._ghost),A.updateDrawableVisible(this._drawable,!0),this._renderPreviewFrame=()=>{if(clearTimeout(this._renderPreviewTimeout),!this._renderPreviewFrame)return;this._renderPreviewTimeout=setTimeout(this._renderPreviewFrame,this.runtime.currentStepTime);const e=this.getFrame({format:B.FORMAT_IMAGE_DATA,cacheTimeout:this.runtime.currentStepTime});e?(A.updateBitmapSkin(this._skinId,e,1),this.runtime.requestRedraw()):A.updateBitmapSkin(this._skinId,new ImageData(...B.DIMENSIONS),1)},this._renderPreviewFrame()))}get videoReady(){return!!this.provider&&this.provider.videoReady}postData(A){let{forceTransparentPreview:e}=A;this._forceTransparentPreview=e,this.setPreviewGhost(this._ghost)}}A.exports=B},function(A,e){A.exports={generateExtensionId:A=>{const e=A.replace(/[^a-z0-9]/gi,"").toLowerCase();return"sbx".concat(e)},argumentIndexToId:A=>A.toString()}},function(A,e){A.exports=class{constructor(A,e){this.callback=A,this.maxConcurrent=e,this._current=0,this._queue=[]}do(){for(var A=arguments.length,e=new Array(A),t=0;t{this._queue.push([A,t,e]),this._startNext()})}_startNext(){if(this._current>=this.maxConcurrent||0===this._queue.length)return;this._current++;const[A,e,t]=this._queue.shift();this.callback.apply(null,t).then(e=>{A(e),this._current--,this._startNext()}).catch(A=>{e(A),this._current--,this._startNext()})}}},function(A,e,t){"use strict";var i=window.URL||window.webkitURL;A.exports=function(A,e){try{try{var t;try{(t=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder)).append(A),t=t.getBlob()}catch(e){t=new Blob([A])}return new Worker(i.createObjectURL(t))}catch(e){return new Worker("data:application/javascript,"+encodeURIComponent(A))}}catch(A){if(!e)throw Error("Inline worker is not supported");return new Worker(e)}}},function(A,e){class t{static _mergeVarRefObjects(A,e){for(const t in e)A[t]?A[t]=A[t].concat(e[t]):A[t]=e[t];return A}static getAllVarRefsForTargets(A,e){return A.map(A=>A.blocks.getAllVariableAndListReferences(null,e)).reduce(t._mergeVarRefObjects,{})}static updateVariableIdentifiers(A,e,t){A.map(A=>(A.referencingField.id=e,t&&(A.referencingField.value=t),A))}}A.exports=t},function(A,e,t){const i=t(38),B=t(52),n=t(93),s=t(94),r=t(277),o=(A,e)=>{const t=[],i=A=>{A.localName!==e&&void 0!==e||!A.getAttribute||t.push(A);for(let e=0;e{const e=document.createElement("span"),t=A.outerHTML,B=i.sanitize(t,{USE_PROFILES:{svg:!0},FORBID_TAGS:["a","audio","canvas","video"],ADD_DATA_URI_TAGS:["image"]});let n,s;try{e.innerHTML=B,document.body.appendChild(e),n=e.children[0].getBBox()}finally{document.body.removeChild(e)}s=0===n.width||0===n.height?0:(A=>{let e=0;const t=A=>{A.getAttribute&&(A.getAttribute("stroke")&&(e=Math.max(e,1)),A.getAttribute("stroke-width")&&(e=Math.max(e,Number(A.getAttribute("stroke-width"))||0)));for(let e=0;e{e&&(A=>{const e=o(A,"linearGradient");for(const A of e)A.getAttribute("x2")||A.setAttribute("x2","0")})(A),r(A,window),(A=>{const e=o(A,"image"),t="image-rendering: optimizespeed; image-rendering: pixelated;";for(const A of e)A.getAttribute("style")?A.setAttribute("style","".concat(t," ").concat(A.getAttribute("style"))):A.setAttribute("style",t)})(A),e?((A=>{const e=[],t=A=>{"text"===A.localName&&e.push(A);for(let e=0;e{const e=o(A);for(const A of e){if(!A.style)continue;const e=A.style.stroke||A.getAttribute("stroke");e&&e.match(/^url\(#.*\)$/)&&(A.style["stroke-linejoin"]="round",A.style["stroke-linecap"]="round")}})(A)):A.getAttribute("viewBox")?A.getAttribute("width")&&A.getAttribute("height")||(A.setAttribute("width",A.viewBox.baseVal.width),A.setAttribute("height",A.viewBox.baseVal.height)):g(A)};A.exports=(A,e)=>{const t=new DOMParser;A=s(A);const i=t.parseFromString(A,"text/xml");if(i.childNodes.length<1||"svg"!==i.documentElement.localName)throw new Error("Document does not appear to be SVG.");const B=i.documentElement;return a(B,e),B}},function(A,e){A.exports=function(A){const e=[],t=A=>{"text"===A.localName&&e.push(A);for(let e=0;e]*>/);e&&-1===e[0].indexOf("xmlns=")&&(A=A.replace("]+?xlink:href=["'])data:img\/png/g,(A,e)=>"".concat(e,"data:image/png")));const t=/(<[^>]+?xmlns:(?!xml=)[^ ]+=)"http:\/\/www.w3.org\/XML\/1998\/namespace"/g;return null!==A.match(t)&&(A=A.replace(t,(A,e)=>"".concat(e,'"http://dummy.namespace"'))),A=(A=(A=A.replace(/<(\/?)\s*svg:/g,"<$1")).replace(/[\s\S]*<\/metadata>/,"")).replace(/[\s\S]*<\/script>/,"#|<'c'>*||e() f{2} /,(% g#{1,2} h{2,})]!"),A.exports=I},function(A,e){e.getArg=function(A,e,t){if(e in A)return A[e];if(3===arguments.length)return t;throw new Error('"'+e+'" is a required argument.')};var t=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,i=/^data:.+\,.+$/;function B(A){var e=A.match(t);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}function n(A){var e="";return A.scheme&&(e+=A.scheme+":"),e+="//",A.auth&&(e+=A.auth+"@"),A.host&&(e+=A.host),A.port&&(e+=":"+A.port),A.path&&(e+=A.path),e}function s(A){var t=A,i=B(A);if(i){if(!i.path)return A;t=i.path}for(var s,r=e.isAbsolute(t),o=t.split(/\/+/),g=0,a=o.length-1;a>=0;a--)"."===(s=o[a])?o.splice(a,1):".."===s?g++:g>0&&(""===s?(o.splice(a+1,g),g=0):(o.splice(a,2),g--));return""===(t=o.join("/"))&&(t=r?"/":"."),i?(i.path=t,n(i)):t}function r(A,e){""===A&&(A="."),""===e&&(e=".");var t=B(e),r=B(A);if(r&&(A=r.path||"/"),t&&!t.scheme)return r&&(t.scheme=r.scheme),n(t);if(t||e.match(i))return e;if(r&&!r.host&&!r.path)return r.host=e,n(r);var o="/"===e.charAt(0)?e:s(A.replace(/\/+$/,"")+"/"+e);return r?(r.path=o,n(r)):o}e.urlParse=B,e.urlGenerate=n,e.normalize=s,e.join=r,e.isAbsolute=function(A){return"/"===A.charAt(0)||t.test(A)},e.relative=function(A,e){""===A&&(A="."),A=A.replace(/\/$/,"");for(var t=0;0!==e.indexOf(A+"/");){var i=A.lastIndexOf("/");if(i<0)return e;if((A=A.slice(0,i)).match(/^([^\/]+:\/)?\/*$/))return e;++t}return Array(t+1).join("../")+e.substr(A.length+1)};var o=!("__proto__"in Object.create(null));function g(A){return A}function a(A){if(!A)return!1;var e=A.length;if(e<9)return!1;if(95!==A.charCodeAt(e-1)||95!==A.charCodeAt(e-2)||111!==A.charCodeAt(e-3)||116!==A.charCodeAt(e-4)||111!==A.charCodeAt(e-5)||114!==A.charCodeAt(e-6)||112!==A.charCodeAt(e-7)||95!==A.charCodeAt(e-8)||95!==A.charCodeAt(e-9))return!1;for(var t=e-10;t>=0;t--)if(36!==A.charCodeAt(t))return!1;return!0}function c(A,e){return A===e?0:null===A?1:null===e?-1:A>e?1:-1}e.toSetString=o?g:function(A){return a(A)?"$"+A:A},e.fromSetString=o?g:function(A){return a(A)?A.slice(1):A},e.compareByOriginalPositions=function(A,e,t){var i=c(A.source,e.source);return 0!==i||0!==(i=A.originalLine-e.originalLine)||0!==(i=A.originalColumn-e.originalColumn)||t||0!==(i=A.generatedColumn-e.generatedColumn)||0!==(i=A.generatedLine-e.generatedLine)?i:c(A.name,e.name)},e.compareByGeneratedPositionsDeflated=function(A,e,t){var i=A.generatedLine-e.generatedLine;return 0!==i||0!==(i=A.generatedColumn-e.generatedColumn)||t||0!==(i=c(A.source,e.source))||0!==(i=A.originalLine-e.originalLine)||0!==(i=A.originalColumn-e.originalColumn)?i:c(A.name,e.name)},e.compareByGeneratedPositionsInflated=function(A,e){var t=A.generatedLine-e.generatedLine;return 0!==t||0!==(t=A.generatedColumn-e.generatedColumn)||0!==(t=c(A.source,e.source))||0!==(t=A.originalLine-e.originalLine)||0!==(t=A.originalColumn-e.originalColumn)?t:c(A.name,e.name)},e.parseSourceMapInput=function(A){return JSON.parse(A.replace(/^\)]}'[^\n]*\n/,""))},e.computeSourceURL=function(A,e,t){if(e=e||"",A&&("/"!==A[A.length-1]&&"/"!==e[0]&&(A+="/"),e=A+e),t){var i=B(t);if(!i)throw new Error("sourceMapURL could not be parsed");if(i.path){var o=i.path.lastIndexOf("/");o>=0&&(i.path=i.path.substring(0,o+1))}e=r(n(i),e)}return s(e)}},function(A,e,t){A.exports={AnPlusB:t(322),Atrule:t(323),AtrulePrelude:t(324),AttributeSelector:t(325),Block:t(326),Brackets:t(327),CDC:t(328),CDO:t(329),ClassSelector:t(330),Combinator:t(331),Comment:t(332),Declaration:t(333),DeclarationList:t(334),Dimension:t(335),Function:t(336),Hash:t(337),Identifier:t(338),IdSelector:t(339),MediaFeature:t(340),MediaQuery:t(341),MediaQueryList:t(342),Nth:t(343),Number:t(344),Operator:t(345),Parentheses:t(346),Percentage:t(347),PseudoClassSelector:t(348),PseudoElementSelector:t(349),Ratio:t(350),Raw:t(18),Rule:t(351),Selector:t(352),SelectorList:t(353),String:t(354),StyleSheet:t(355),TypeSelector:t(356),UnicodeRange:t(357),Url:t(358),Value:t(359),WhiteSpace:t(360)}},function(A,e){class t{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:t.xlink,xlink:t.xmlns,xmlns:"".concat(t.xmlns,"/"),"xmlns:xlink":"".concat(t.xmlns,"/")}}static create(A,e,i){return t.set(document.createElementNS(t.svg,A),e,i)}static get(A,e){const i=t.attributeNamespace[e],B=i?A.getAttributeNS(i,e):A.getAttribute(e);return"null"===B?null:B}static set(A,e,i){for(const B in e){let n=e[B];const s=t.attributeNamespace[B];"number"==typeof n&&i&&(n=i.number(n)),s?A.setAttributeNS(s,B,n):A.setAttribute(B,n)}return A}}A.exports=t},function(A,e,t){"undefined"!=typeof TextDecoder&&"undefined"!=typeof TextEncoder||t(32);const i=t(23);let B=null;const n={},s={},r="function"==typeof FinalizationRegistry?new FinalizationRegistry(A=>{const e=s[A];1===e?(delete s[A],delete n[A]):s[A]=e-1}):null,o=r?A=>{const e=A.assetId,t=s[e]||0;s[e]=t+1,r.register(A,e)}:()=>{};A.exports=class{constructor(A,e,t,i,B){this.assetType=A,this.assetId=e,this.setData(i,t||A.runtimeFormat,B),this.dependencies=[],o(this)}setData(A,e,t){if(A&&!e)throw new Error("Data provided without specifying its format");this.dataFormat=e,this.data=A,t&&(this.assetId=i(A)),this.clean=!t}decodeText(){return(new TextDecoder).decode(this.data)}encodeTextData(A,e,t){const i=new TextEncoder;this.setData(i.encode(A),e,t)}encodeDataURI(A){return A=A||this.assetType.contentType,"data:".concat(A,";base64,").concat(((A,e)=>{if(!Object.prototype.hasOwnProperty.call(n,A))if("undefined"==typeof btoa){const i=t(430);n[A]=i.fromByteArray(e)}else{if(null===B){B=new Array(256);for(let A=0;A<256;A++)B[A]=String.fromCharCode(A)}const{length:t}=e;let i="";for(let A=0,n=0;A{if(A)return A===this||e(A.target)};if(e(A))throw new Error("Effect cannot connect to itself");this.target=A,null!==this.outputNode&&this.outputNode.disconnect(),(this._isPatch||this._lastPatch+this.audioEngine.DECAY_DURATION * {\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('+g+');\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',""]),o.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"},e.a=o},function(A,e,t){const i=t(141),B=t(1);A.exports=new class extends i{constructor(){super(),this.services={},this.workerClass="undefined"==typeof Worker?null:Worker,this.workers=[]}callSync(A,e){const{provider:t,isRemote:i}=this._getServiceProvider(A);if(t){if(i)throw new Error("Cannot use 'callSync' on remote provider for service ".concat(A,"."));for(var B=arguments.length,n=new Array(B>2?B-2:0),s=2;s{B.error("Could not handshake with worker: ".concat(A))})):B.warn("Central dispatch ignoring attempt to add duplicate worker")}_getServiceProvider(A){const e=this.services[A];return e&&{provider:e,isRemote:Boolean(this.workerClass&&e instanceof this.workerClass||e.isRemote)}}_onDispatchMessage(A,e){let t;switch(e.method){case"setService":t=this.setService(e.args[0],A);break;default:B.error("Central dispatch received message for unknown method: ".concat(e.method))}return t}}},function(A,e){var t={black:"#000",red:"#c23621",green:"#25bc26",yellow:"#bbbb00",blue:"#492ee1",magenta:"#d338d3",cyan:"#33bbc8",gray:"#808080",purple:"#708"};A.exports=function(A,e){return e?"color: #fff; background: "+t[A]+";":"color: "+t[A]+";"}},function(A,e,t){const i=t(6);A.exports=function(A,e,t){return A&&A.id&&A.default?i(A,e,t):A}},function(A,e){var t="long",i="short",B="numeric";A.exports={number:{decimal:{style:"decimal"},integer:{style:"decimal",maximumFractionDigits:0},currency:{style:"currency",currency:"USD"},percent:{style:"percent"},default:{style:"decimal"}},date:{short:{month:B,day:B,year:"2-digit"},medium:{month:i,day:B,year:B},long:{month:t,day:B,year:B},full:{month:t,day:B,year:B,weekday:t},default:{month:i,day:B,year:B}},time:{short:{hour:B,minute:B},medium:{hour:B,minute:B,second:B},long:{hour:B,minute:B,second:B,timeZoneName:i},full:{hour:B,minute:B,second:B,timeZoneName:i},default:{hour:B,minute:B,second:B}},duration:{default:{hours:{minimumIntegerDigits:1,maximumFractionDigits:0},minutes:{minimumIntegerDigits:2,maximumFractionDigits:0},seconds:{minimumIntegerDigits:2,maximumFractionDigits:3}}},parseNumberPattern:function(A){if(A){var e={},t=A.match(/\b[A-Z]{3}\b/i),i=A.replace(/[^¤]/g,"").length;if(!i&&t&&(i=1),i?(e.style="currency",e.currencyDisplay=1===i?"symbol":2===i?"code":"name",e.currency=t?t[0].toUpperCase():"USD"):A.indexOf("%")>=0&&(e.style="percent"),!/[@#0]/.test(A))return e.style?e:void 0;if(e.useGrouping=A.indexOf(",")>=0,/E\+?[@#0]+/i.test(A)||A.indexOf("@")>=0){var B=A.replace(/E\+?[@#0]+|[^@#0]/gi,"");e.minimumSignificantDigits=Math.min(Math.max(B.replace(/[^@0]/g,"").length,1),21),e.maximumSignificantDigits=Math.min(Math.max(B.length,1),21)}else{for(var n=A.replace(/[^#0.]/g,"").split("."),s=n[0],r=s.length-1;"0"===s[r];)--r;e.minimumIntegerDigits=Math.min(Math.max(s.length-1-r,1),21);var o=n[1]||"";for(r=0;"0"===o[r];)++r;for(e.minimumFractionDigits=Math.min(Math.max(r,0),20);"#"===o[r];)++r;e.maximumFractionDigits=Math.min(Math.max(r,0),20)}return e}},parseDatePattern:function(A){if(A){for(var e={},n=0;n{this._openRequests[t]={resolve:A,reject:e}});return this._sendRequest(A,e,t),i}sendRemoteNotification(A,e){this._sendRequest(A,e)}didReceiveCall(){throw new Error("Must override didReceiveCall")}_sendMessage(){throw new Error("Must override _sendMessage")}_sendRequest(A,e,t){const i={jsonrpc:"2.0",method:A,params:e};null!==t&&(i.id=t),this._sendMessage(i)}_handleMessage(A){if("2.0"!==A.jsonrpc)throw new Error("Bad or missing JSON-RPC version in message: ".concat(A));A.hasOwnProperty("method")?this._handleRequest(A):this._handleResponse(A)}_sendResponse(A,e,t){const i={jsonrpc:"2.0",id:A};t?i.error=t:i.result=e||null,this._sendMessage(i)}_handleResponse(A){const{result:e,error:t,id:i}=A,B=this._openRequests[i];delete this._openRequests[i],B&&(t?B.reject(t):B.resolve(e))}_handleRequest(A){const{method:e,params:t,id:i}=A,B=this.didReceiveCall(e,t);i&&Promise.resolve(B).then(A=>{this._sendResponse(i,A)},A=>{this._sendResponse(i,null,A)})}}},function(A){A.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 (giả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(A,e){A.exports=(A,e,t)=>{let i=null;const B=window.AbortController?new window.AbortController:null,n=B?B.signal:null;return Promise.race([fetch(A,Object.assign({signal:n},e)).then(A=>(clearTimeout(i),A),A=>{throw clearTimeout(i),A}),new Promise((A,e)=>{i=setTimeout(()=>{B&&B.abort(),e(new Error("Fetch timed out after ".concat(t," ms")))},t)})])}},function(A,e,t){function i(A,e){var t=Object.keys(A);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(A);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(A,e).enumerable}))),t.push.apply(t,i)}return t}function B(A,e,t){return e in A?Object.defineProperty(A,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):A[e]=t,A}const n=t(19),{OrderedMap:s}=t(27),r=t(79),o=t(4),g=t(17),a=t(83),c=t(3),Q=t(230),E=t(231),w=t(86),C=t(48),l=t(239),I=t(44),h=t(35),u=t(1),d=t(71),Y=t(15),M=t(10),F=t(34),D=t(240),m=t(241),p=t(243),U=t(244),f=t(245),N=t(246),G=t(247),y=t(248),H=t(87),k=t(7),R=t(8),x={scratch3_control:t(249),scratch3_event:t(250),scratch3_looks:t(251),scratch3_motion:t(252),scratch3_operators:t(253),scratch3_sound:t(254),scratch3_sensing:t(255),scratch3_data:t(256),scratch3_procedures:t(257)},J=t(258),T=t(259),S=["#0FBD8C","#0DA57A","#0B8E69"],b=(()=>{const A={};return A[o.ANGLE]={shadow:{type:"math_angle",fieldName:"NUM"}},A[o.COLOR]={shadow:{type:"colour_picker",fieldName:"COLOUR"}},A[o.NUMBER]={shadow:{type:"math_number",fieldName:"NUM"}},A[o.STRING]={shadow:{type:"text",fieldName:"TEXT"}},A[o.BOOLEAN]={check:"Boolean"},A[o.MATRIX]={shadow:{type:"matrix",fieldName:"MATRIX"}},A[o.NOTE]={shadow:{type:"note",fieldName:"NOTE"}},A[o.IMAGE]={fieldType:"field_image"},A[o.COSTUME]={shadow:{type:"looks_costume",fieldName:"COSTUME"}},A[o.SOUND]={shadow:{type:"sound_sounds_menu",fieldName:"SOUND_MENU"}},A})(),j=A=>{let e=0;return{canAddCloudVariable:()=>e{e++},removeCloudVariable:()=>{e--},hasCloudVariables:()=>e>0,getNumberOfCloudVariables:()=>e}};let z=-1,v=-1,L=-1;class P extends n{constructor(){super(),this.targets=[],this.executableTargets=[],this.threads=[],this.threadMap=new Map,this.sequencer=new E(this),this.flyoutBlocks=new g(this,!0),this.monitorBlocks=new g(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=s({}),this._prevMonitorState=s({}),this.turboMode=!1,this.frameLoop=new T(this),this.currentStepTime=1e3/30,this.updateCurrentMSecs(),this.redrawRequested=!1,this._registerBlockPackages(),this.ioDevices={clock:new p(this),cloud:new U(this),keyboard:new f(this),mouse:new N(this),mouseWheel:new G(this),userData:new y,video:new H(this)},this.peripheralExtensions={},this.profiler=null,this.cloudOptions={limit:10};const A=j(this.cloudOptions);this.hasCloudData=A.hasCloudVariables,this.canAddCloudVariable=A.canAddCloudVariable,this.getNumberOfCloudVariables=A.getNumberOfCloudVariables,this.addCloudVariable=this._initializeAddCloudVariable(A),this.removeCloudVariable=this._initializeRemoveCloudVariable(A),this.origin=null,this._stageTarget=null,this.addonBlocks={},this.stageWidth=P.STAGE_WIDTH,this.stageHeight=P.STAGE_HEIGHT,this.runtimeOptions={maxClones:P.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(P.HAS_CLOUD_DATA_UPDATE,A=>{this.setExternalCommunicationMethod("cloudVariables",A)}),this.enforcePrivacy=!0,this.extensionButtons=new Map,this.fontManager=new m(this)}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 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 THREAD_STEP_INTERVAL(){return 1e3/60}static get THREAD_STEP_INTERVAL_COMPATIBILITY(){return 1e3/30}static get MAX_CLONES(){return 300}_initializeAddCloudVariable(A){return()=>{const e=this.hasCloudData();A.addCloudVariable(),!e&&this.hasCloudData()&&this.emit(P.HAS_CLOUD_DATA_UPDATE,!0)}}_initializeRemoveCloudVariable(A){return()=>{const e=this.hasCloudData();A.removeCloudVariable(),e&&!this.hasCloudData()&&this.emit(P.HAS_CLOUD_DATA_UPDATE,!1)}}_registerBlockPackages(){for(const A in x)if(x.hasOwnProperty(A)){const e=new x[A](this);if(e.getPrimitives){const A=e.getPrimitives();for(const t in A)A.hasOwnProperty(t)&&(this._primitives[t]=A[t].bind(e))}if(e.getHats){const A=e.getHats();for(const e in A)A.hasOwnProperty(e)&&(this._hats[e]=A[e])}e.getMonitored&&(this.monitorBlockInfo=Object.assign({},this.monitorBlockInfo,e.getMonitored())),this.compilerRegisterExtension(A,e)}}compilerRegisterExtension(A,e){this["ext_".concat(A)]=e}getMonitorState(){return this._monitorState}_makeExtensionMenuId(A,e){return"".concat(e,"_menu_").concat(A)}makeMessageContextForTarget(A){const e={};(A=A||this.getEditingTarget()||this.getTargetForStage())&&(e.targetType=A.isStage?I.STAGE:I.SPRITE)}_registerExtensionPrimitives(A){const e={id:A.id,name:d(A.name),showStatusButton:A.showStatusButton,blockIconURI:A.blockIconURI,menuIconURI:A.menuIconURI};A.color1?(e.color1=A.color1,e.color2=A.color2,e.color3=A.color3):(e.color1=S[0],e.color2=S[1],e.color3=S[2]),this._blockInfo.push(e),this._fillExtensionCategory(e,A);for(const t in e.customFieldTypes)if(A.customFieldTypes.hasOwnProperty(t)){const A=e.customFieldTypes[t];this.emit(P.EXTENSION_FIELD_ADDED,{name:"field_".concat(A.extendedName),implementation:A.fieldImplementation})}this.emit(P.EXTENSION_ADDED,e)}_refreshExtensionPrimitives(A){const e=this._blockInfo.find(e=>e.id===A.id);e&&(e.name=d(A.name),this._fillExtensionCategory(e,A),this.emit(P.BLOCKSINFO_UPDATE,e))}_fillExtensionCategory(A,e){A.blocks=[],A.customFieldTypes={},A.menus=[],A.menuInfo={};for(const t in e.menus)if(e.menus.hasOwnProperty(t)){const i=e.menus[t],B=this._buildMenuForScratchBlocks(t,i,A);A.menus.push(B),A.menuInfo[t]=i}for(const t in e.customFieldTypes)if(e.customFieldTypes.hasOwnProperty(t)){const i=e.customFieldTypes[t],B=this._buildCustomFieldInfo(t,i,e.id,A);A.customFieldTypes[t]=B}if(e.docsURI){const t={info:{},xml:"')};A.blocks.push(t)}for(const t of e.blocks)try{const e=this._convertForScratchBlocks(t,A);if(A.blocks.push(e),e.json){const A=e.json.type;t.blockType!==c.EVENT&&(this._primitives[A]=e.info.func),t.blockType===c.EVENT||t.blockType===c.HAT?this._hats[A]={edgeActivated:t.isEdgeActivated,restartExistingThreads:t.shouldRestartExistingThreads}:t.blockType===c.CONDITIONAL?this._flowing[A]={conditional:!0,loop:!1}:t.blockType===c.LOOP&&(this._flowing[A]={conditional:!1,loop:!0})}}catch(A){u.error("Error parsing block: ",{block:t,error:A})}}_convertMenuItems(A){if("function"!=typeof A){const e=this.makeMessageContextForTarget();return A.map(A=>{const t=d(A,e);switch(typeof t){case"string":return[t,t];case"object":return[d(A.text,e),A.value];default:throw new Error("Can't interpret menu item: ".concat(JSON.stringify(A)))}})}return A}_buildMenuForScratchBlocks(A,e,t){const i=this._makeExtensionMenuId(A,t.id),B=this._convertMenuItems(e.items);return{json:{message0:"%1",type:i,inputsInline:!0,output:"String",colour:t.color1,colourSecondary:t.color2,colourTertiary:t.color3,outputShape:e.acceptReporters?l.OUTPUT_SHAPE_ROUND:l.OUTPUT_SHAPE_SQUARE,args0:[{type:"field_dropdown",name:A,options:B}]}}}_buildCustomFieldInfo(A,e,t,i){const B="".concat(t,"_").concat(A);return{fieldName:A,extendedName:B,argumentTypeInfo:{shadow:{type:B,fieldName:"field_".concat(B)}},scratchBlocksDefinition:this._buildCustomFieldTypeForScratchBlocks(B,e.output,e.outputShape,i),fieldImplementation:e.implementation}}_buildCustomFieldTypeForScratchBlocks(A,e,t,i){return{json:{type:A,message0:"%1",inputsInline:!0,output:e,colour:i.color1,colourSecondary:i.color2,colourTertiary:i.color3,outputShape:t,args0:[{name:"field_".concat(A),type:"field_".concat(A)}]}}}_convertForScratchBlocks(A,e){return"---"===A?this._convertSeparatorForScratchBlocks(A):A.blockType===c.LABEL?this._convertLabelForScratchBlocks(A):A.blockType===c.BUTTON?this._convertButtonForScratchBlocks(A,e):A.blockType===c.XML?this._convertXmlForScratchBlocks(A):this._convertBlockForScratchBlocks(A,e)}_convertBlockForScratchBlocks(A,e){const t="".concat(e.id,"_").concat(A.opcode),i={type:t,inputsInline:!0,category:e.name,colour:e.color1,colourSecondary:e.color2,colourTertiary:e.color3},B={argsMap:{},blockJSON:i,categoryInfo:e,blockInfo:A,inputList:[]},n=A.blockIconURI||e.blockIconURI;if(n){i.extensions=["scratch_extension"],i.message0="%1 %2";const A={type:"field_image",src:n,width:40,height:40},e={type:"field_vertical_separator"};i.args0=[A,e]}switch(A.blockType){case c.COMMAND:i.outputShape=l.OUTPUT_SHAPE_SQUARE,i.previousStatement=null,A.isTerminal||(i.nextStatement=null);break;case c.REPORTER:i.output=A.allowDropAnywhere?null:"String",i.outputShape=l.OUTPUT_SHAPE_ROUND;break;case c.BOOLEAN:i.output="Boolean",i.outputShape=l.OUTPUT_SHAPE_HEXAGONAL;break;case c.HAT:case c.EVENT:A.hasOwnProperty("isEdgeActivated")||(A.isEdgeActivated=!0),i.outputShape=l.OUTPUT_SHAPE_SQUARE,i.nextStatement=null;break;case c.CONDITIONAL:case c.LOOP:A.branchCount=A.branchCount||1,i.outputShape=l.OUTPUT_SHAPE_SQUARE,i.previousStatement=null,A.isTerminal||(i.nextStatement=null)}const s=Array.isArray(A.text)?A.text:[A.text];let r=0,o=0,g=0;const a=this._convertPlaceholders.bind(this,B),Q=this.makeMessageContextForTarget();for(;r0?o+1:"")}],++o,++g)}A.blockType===c.REPORTER||A.blockType===c.BOOLEAN?A.disableMonitor||0!==B.inputList.length||(i.checkboxInFlyout=!0):A.blockType===c.LOOP&&(i["lastDummyAlign".concat(g)]="RIGHT",i["message".concat(g)]="%1",i["args".concat(g)]=[{type:"field_image",src:"./static/blocks-media/repeat.svg",width:24,height:24,alt:"*",flip_rtl:!0}],++g);const E=A.isDynamic?''):"",w=B.inputList.join(""),C='').concat(E).concat(w,"");return{info:B.blockInfo,json:B.blockJSON,xml:C}}_convertSeparatorForScratchBlocks(A){return{info:A,xml:''}}_convertLabelForScratchBlocks(A){return{info:A,xml:'')}}_convertButtonForScratchBlocks(A,e){const t=this.makeMessageContextForTarget(),i=d(A.text,t);if(["MAKE_A_LIST","MAKE_A_PROCEDURE","MAKE_A_VARIABLE"].includes(A.func))return{info:A,xml:'')};const B="".concat(e.id,"_").concat(A.func);return this.extensionButtons.set(B,A.callFunc),{info:A,xml:'')}}_convertXmlForScratchBlocks(A){return{info:A,xml:A.xml}}handleExtensionButtonPress(A){this.extensionButtons.get(A)()}_constructInlineImageJson(A){return A.dataURI||u.warn("Missing data URI in extension block with argument type IMAGE"),{type:"field_image",src:A.dataURI||"",width:24,height:24,flip_rtl:A.flipRTL||!1}}_convertPlaceholders(A,e,t){const i=A.blockInfo.arguments[t]||{};let B,n=b[i.type]||{};if(!b[i.type]&&A.categoryInfo.customFieldTypes[i.type]&&(n=A.categoryInfo.customFieldTypes[i.type].argumentTypeInfo),"field_image"===n.fieldType)B=this._constructInlineImageJson(i);else{B={type:"input_value",name:t};const e=void 0===i.defaultValue?null:d(i.defaultValue,this.makeMessageContextForTarget()).toString();let s,r,o;if(n.check&&(B.check=n.check),i.menu){const e=A.categoryInfo.menuInfo[i.menu];e.acceptReporters?(s=t,r=this._makeExtensionMenuId(i.menu,A.categoryInfo.id),o=i.menu):(B.type="field_dropdown",B.options=this._convertMenuItems(e.items),s=null,r=null,o=t)}else s=t,r=n.shadow&&n.shadow.type||null,o=n.shadow&&n.shadow.fieldName||null;s&&A.inputList.push('')),r&&A.inputList.push('')),null!==e&&o&&A.inputList.push('').concat(F(e),"")),r&&A.inputList.push(""),s&&A.inputList.push("")}const s="args".concat(A.outLineNum),r=A.blockJSON[s]=A.blockJSON[s]||[];B&&r.push(B);const o=r.length;return A.argsMap[t]=o,"%".concat(o)}getBlocksXML(A){return this._blockInfo.map(e=>{const{name:t,color1:i,color2:B}=e,n=e.blocks.filter(e=>{let t=!0;return A&&e.info.filter&&(t=e.info.filter.includes(A.isStage?I.STAGE:I.SPRITE)),t&&!e.info.hideFromPalette}),s='colour="'.concat(F(i),'" secondaryColour="').concat(F(B),'"');let r="";e.menuIconURI?r=e.menuIconURI:e.blockIconURI&&(r=e.blockIconURI);const o=r?'iconURI="'.concat(F(r),'"'):"";let g="";e.showStatusButton&&(g='showStatusButton="true"');let a='"),a+=n.map(A=>A.xml).join(""),a+="",{id:e.id,xml:a}})}getBlocksJSON(){return this._blockInfo.reduce((A,e)=>A.concat(e.blocks.map(A=>A.json)),[])}getScratchLinkSocket(A){return(this._linkSocketFactory||this._defaultScratchLinkSocketFactory)(A)}configureScratchLinkSocketFactory(A){this._linkSocketFactory=A}_defaultScratchLinkSocketFactory(A){return new D(A)}registerPeripheralExtension(A,e){this.peripheralExtensions[A]=e}scanForPeripheral(A){this.peripheralExtensions[A]&&this.peripheralExtensions[A].scan()}connectPeripheral(A,e){this.peripheralExtensions[A]&&this.peripheralExtensions[A].connect(e)}disconnectPeripheral(A){this.peripheralExtensions[A]&&this.peripheralExtensions[A].disconnect()}getPeripheralIsConnected(A){let e=!1;return this.peripheralExtensions[A]&&(e=this.peripheralExtensions[A].isConnected()),e}emitMicListening(A){this.emit(P.MIC_LISTENING,A)}getOpcodeFunction(A){return this._primitives[A]}getIsHat(A){return this._hats.hasOwnProperty(A)}getIsEdgeActivatedHat(A){return this._hats.hasOwnProperty(A)&&this._hats[A].edgeActivated}attachAudioEngine(A){this.audioEngine=A}attachRenderer(A){this.renderer=A,this.renderer.setLayerGroupOrdering(Y.LAYER_GROUPS),this.renderer.offscreenTouching=!this.runtimeOptions.fencing,this.updatePrivacy()}attachV2BitmapAdapter(A){this.v2BitmapAdapter=A}attachStorage(A){if(this.storage=A,this.isPackaged){const e=A.createAsset;let t=0;A.createAsset=function(A,i,B,n,s){return n||(n=(++t).toString()),e.call(this,A,i,B,n,!1)}}}_pushThread(A,e,t){const i=new h(A);return i.target=e,i.stackClick=Boolean(t&&t.stackClick),i.updateMonitor=Boolean(t&&t.updateMonitor),i.blockContainer=i.updateMonitor?this.monitorBlocks:e.blocks,i.pushStack(A),this.threads.push(i),i.stackClick||i.updateMonitor||this.threadMap.set(i.getId(),i),t&&t.updateMonitor||!this.compilerOptions.enabled||i.tryCompile(),i}_stopThread(A){A.isKilled=!0,this.sequencer.retireThread(A)}_restartThread(A){const e=new h(A.topBlock);e.target=A.target,e.stackClick=A.stackClick,e.updateMonitor=A.updateMonitor,e.blockContainer=A.blockContainer,e.pushStack(A.topBlock),A.triedToCompile&&this.compilerOptions.enabled&&e.tryCompile(),e.stackClick||e.updateMonitor||this.threadMap.set(e.getId(),e);const t=this.threads.indexOf(A);return t>-1?(this.threads[t]=e,e):(this.threads.push(A),A)}emitCompileError(A,e){this.emit(P.COMPILE_ERROR,A,e)}isActiveThread(A){return A.stack.length>0&&A.status!==h.STATUS_DONE&&this.threads.indexOf(A)>-1}isWaitingThread(A){return A.status===h.STATUS_PROMISE_WAIT||A.status===h.STATUS_YIELD_TICK||!this.isActiveThread(A)}toggleScript(A,e){e=Object.assign({target:this._editingTarget,stackClick:!1},e);for(let t=0;t=0;e--){const i=t[e],B=i.blocks.getScripts();for(let e=0;e=0;t--){const B=i[t],n=a.getScripts(B.blocks,A);for(let A=0;A{const{blockId:s,fieldsOfInputs:r}=A;for(const A in e)if(r[A].value!==e[A])return;if(B.restartExistingThreads){const A=this.threadMap.get(h.getIdFromTargetAndBlock(t,s));if(A)return void i.push(this._restartThread(A))}else for(let A=0;A{A.isCompiled?A.executableHat&&(C.saveGlobalState(),C(A),C.restoreGlobalState()):(w(this.sequencer,A),A.goToNextBlock())}),i}dispose(){this.stopAll(),this.targets.forEach(A=>{A.isOriginal&&A.deleteMonitors()}),this.targets.map(this.disposeTarget,this);const A=s({});A.equals(this._monitorState)||(this._monitorState=A,this.emit(P.MONITORS_UPDATE,this._monitorState)),this.emit(P.RUNTIME_DISPOSED),this.ioDevices.clock.resetProjectTimer(),this.fontManager.clear(),this.hasCloudData()&&this.emit(P.HAS_CLOUD_DATA_UPDATE,!1),this.ioDevices.cloud.clear();const e=j(this.cloudOptions);this.hasCloudData=e.hasCloudVariables,this.canAddCloudVariable=e.canAddCloudVariable,this.getNumberOfCloudVariables=e.getNumberOfCloudVariables,this.addCloudVariable=this._initializeAddCloudVariable(e),this.removeCloudVariable=this._initializeRemoveCloudVariable(e)}addTarget(A){this.targets.push(A),this.executableTargets.push(A),A.isStage&&!this._stageTarget&&(this._stageTarget=A)}moveExecutable(A,e){const t=this.executableTargets.indexOf(A);this.executableTargets.splice(t,1);let i=t+e;return i>this.executableTargets.length&&(i=this.executableTargets.length),i<=0&&(i=this.executableTargets.length>0&&this.executableTargets[0].isStage?1:0),this.executableTargets.splice(i,0,A),i}setExecutablePosition(A,e){const t=this.executableTargets.indexOf(A);return this.moveExecutable(A,e-t)}removeExecutable(A){const e=this.executableTargets.indexOf(A);e>-1&&this.executableTargets.splice(e,1)}disposeTarget(A){this.targets=this.targets.filter(e=>A!==e||(e.dispose(),!1)),this._stageTarget===A&&(this._stageTarget=null)}stopForTarget(A,e){this.emit(P.STOP_FOR_TARGET,A,e);for(let t=0;tA.clearEdgeActivatedValues());for(let A=0;A!A.isKilled),this.updateThreadMap();for(const A in this._hats){if(!this._hats.hasOwnProperty(A))continue;this._hats[A].edgeActivated&&this.startHats(A)}this.redrawRequested=!1,this._pushMonitors(),null!==this.profiler&&(-1===v&&(v=this.profiler.idByName("Sequencer.stepThreads")),this.profiler.start(v)),this.emit(P.BEFORE_EXECUTE);const A=this.sequencer.stepThreads();null!==this.profiler&&this.profiler.stop(),this.emit(P.AFTER_EXECUTE),this._updateGlows(A),this._emitProjectRunStatus(this.threads.length+A.length-this._getMonitorThreadCount([...this.threads,...A])),this._lastStepDoneThreads=A,this.renderer&&(null!==this.profiler&&(-1===L&&(L=this.profiler.idByName("RenderWebGL.draw")),this.profiler.start(L)),document.hidden||this.frameLoop._interpolationAnimation||this.renderer.draw(),null!==this.profiler&&this.profiler.stop()),this._refreshTargets&&(this.emit(P.TARGETS_UPDATE,!1),this._refreshTargets=!1),this._prevMonitorState.equals(this._monitorState)||(this.emit(P.MONITORS_UPDATE,this._monitorState),this._prevMonitorState=this._monitorState),null!==this.profiler&&(this.profiler.stop(),this.profiler.reportFrames()),this.interpolationEnabled&&(this._lastStepTime=Date.now())}_getMonitorThreadCount(A){let e=0;return A.forEach(A=>{A.updateMonitor&&e++}),e}_pushMonitors(){this.monitorBlocks.runAllMonitored(this)}setEditingTarget(A){const e=this._editingTarget;this._editingTarget=A,this._scriptGlowsPreviousFrame=[],this._updateGlows(),e!==this._editingTarget&&this.requestToolboxExtensionsUpdate()}setCompatibilityMode(A){A?this.setFramerate(30):this.setFramerate(60)}setFramerate(A){A>250&&(A=250),A<0&&(A=1),this.frameLoop.setFramerate(A),this.emit(P.FRAMERATE_CHANGED,A)}setInterpolation(A){this.interpolationEnabled=A,this.frameLoop.setInterpolation(this.interpolationEnabled),this.emit(P.INTERPOLATION_CHANGED,A)}setRuntimeOptions(A){this.runtimeOptions=Object.assign({},this.runtimeOptions,A),this.emit(P.RUNTIME_OPTIONS_CHANGED,this.runtimeOptions),this.renderer&&(this.renderer.offscreenTouching=!this.runtimeOptions.fencing)}setCompilerOptions(A){this.compilerOptions=Object.assign({},this.compilerOptions,A),this.resetAllCaches(),this.emit(P.COMPILER_OPTIONS_CHANGED,this.compilerOptions)}setStageSize(A,e){if(A=Math.round(Math.max(1,A)),e=Math.round(Math.max(1,e)),this.stageWidth!==A||this.stageHeight!==e){const t=A-this.stageWidth,i=e-this.stageHeight;if(this._monitorState.size>0){const A=t/2,e=i/2;for(const t of this._monitorState.valueSeq()){const i=t.set("x",t.get("x")+A).set("y",t.get("y")+e);this.requestUpdateMonitor(i)}this.emit(P.MONITORS_UPDATE,this._monitorState)}this.stageWidth=A,this.stageHeight=e,this.renderer&&this.renderer.setStageSize(-A/2,A/2,-e/2,e/2)}this.emit(P.STAGE_SIZE_CHANGED,A,e)}setInEditor(A){}convertToPackagedRuntime(){if(this.storage)throw new Error("convertToPackagedRuntime must be called before attachStorage");this.isPackaged=!0}resetAllCaches(){for(const A of this.targets)A.isOriginal&&A.blocks.resetCache();this.flyoutBlocks.resetCache(),this.monitorBlocks.resetCache()}addAddonBlock(A){const e=A.procedureCode,t=A.arguments||[],n=t,s=t.map((A,e)=>"arg".concat(e)),r=t.map(()=>"");if(this.addonBlocks[e]=function(A){for(var e=1;eA.id===t);if(!i){const A='';i={id:t,name:d({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(A)),blocks:[],customFieldTypes:{},menus:[]},this._blockInfo.unshift(i)}i.blocks.push({info:{},xml:'"})}this.resetAllCaches()}getAddonBlock(A){return Object.prototype.hasOwnProperty.call(this.addonBlocks,A)?this.addonBlocks[A]:null}findProjectOptionsComment(){const A=this.getTargetForStage().comments;for(const e of Object.values(A))if(e.text.includes(" // _twconfig_"))return e;return null}parseProjectOptions(){const A=this.findProjectOptionsComment();if(!A)return;const e=A.text.split("\n").find(A=>A.endsWith(" // _twconfig_"));if(!e)return void u.warn("Config comment does not contain valid line");const t=e.substr(0,e.length-" // _twconfig_".length);let i;try{if(i=r.parse(t),!i||"object"!=typeof i)throw new Error("Invalid object")}catch(A){return void u.warn("Config comment has invalid JSON",A)}"number"==typeof i.framerate&&this.setFramerate(i.framerate),i.turbo&&(this.turboMode=!0,this.emit(P.TURBO_MODE_ON)),i.interpolation&&this.setInterpolation(!0),i.runtimeOptions&&this.setRuntimeOptions(i.runtimeOptions),i.hq&&this.renderer&&this.renderer.setUseHighQualityRender(!0);const B=+i.width||this.stageWidth,n=+i.height||this.stageHeight;B===this.stageWidth&&n===this.stageHeight||this.setStageSize(B,n)}_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 A=(e,t)=>{const i={};for(const B of Object.keys(t)){const n=t[B],s=e[B];if("object"==typeof n&&n){const e=A(s,n);Object.keys(e).length>0&&(i[B]=e)}else n!==s&&(i[B]=n)}return i};return A(this._defaultStoredSettings,this._generateAllProjectOptions())}storeProjectOptions(){const A=this.generateDifferingProjectOptions(),e="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(r.stringify(A)).concat(" // _twconfig_"),t=this.findProjectOptionsComment();if(t)t.text=e;else{this.getTargetForStage().createComment(R(),null,e,50,50,350,170,!1)}this.emitProjectChanged()}precompile(){this.allScriptsDo((A,e)=>{const t=e.blocks.getBlock(A);if(this.getIsHat(t.opcode)){const t=new h(A);t.target=e,t.blockContainer=e.blocks,t.tryCompile()}})}enableDebug(){this.resetAllCaches(),this.debug=!0}_updateGlows(A){const e=[];e.push.apply(e,this.threads),A&&e.push.apply(e,A);const t=[],i=[];for(let A=0;A0&&this.emit(P.PROJECT_RUN_START),this._nonMonitorThreadCount>0&&0===A&&this.emit(P.PROJECT_RUN_STOP),this._nonMonitorThreadCount=A}quietGlow(A){const e=this._scriptGlowsPreviousFrame.indexOf(A);e>-1&&this._scriptGlowsPreviousFrame.splice(e,1)}glowBlock(A,e){e?this.emit(P.BLOCK_GLOW_ON,{id:A}):this.emit(P.BLOCK_GLOW_OFF,{id:A})}glowScript(A,e){e?this.emit(P.SCRIPT_GLOW_ON,{id:A}):this.emit(P.SCRIPT_GLOW_OFF,{id:A})}emitBlockDragUpdate(A){this.emit(P.BLOCK_DRAG_UPDATE,A)}emitBlockEndDrag(A,e){this.emit(P.BLOCK_DRAG_END,A,e)}visualReport(A,e){this.emit(P.VISUAL_REPORT,{id:A,value:String(e)})}requestAddMonitor(A){const e=A.get("id");this.requestUpdateMonitor(A)||(this._monitorState=this._monitorState.set(e,A))}requestUpdateMonitor(A){const e=A.get("id");return!!this._monitorState.has(e)&&(this._monitorState=this._monitorState.set(e,this._monitorState.get(e).mergeWith((A,e)=>null==e?A:e,A)),!0)}requestRemoveMonitor(A){this._monitorState=this._monitorState.delete(A)}requestHideMonitor(A){return this.requestUpdateMonitor(new Map([["id",A],["visible",!1]]))}requestShowMonitor(A){return this.requestUpdateMonitor(new Map([["id",A],["visible",!0]]))}requestRemoveMonitorByTargetId(A){this._monitorState=this._monitorState.filterNot(e=>e.targetId===A)}getTargetById(A){for(let e=0;eA.id===e);if(!i)return;const B=i.blocks.find(A=>A.info.opcode===t);return B?{category:"extension",label:"".concat(i.name,": ").concat(B.info.text)}:void 0}createNewGlobalVariable(A,e,t){const i="string"==typeof t?t:M.SCALAR_TYPE,B=this.getAllVarNamesOfType(i),n=k.unusedName(A,B),s=new M(e||R(),n,i);return this.getTargetForStage().variables[s.id]=s,s}requestRedraw(){this.redrawRequested=!0}requestTargetsUpdate(A){A.isOriginal&&(this._refreshTargets=!0)}requestBlocksUpdate(){this.emit(P.BLOCKS_NEED_UPDATE)}requestToolboxExtensionsUpdate(){this.emit(P.TOOLBOX_EXTENSIONS_NEED_UPDATE)}start(){this.frameLoop.running||(this.frameLoop.start(),this.emit(P.RUNTIME_STARTED))}stop(){this.frameLoop.running&&(this.frameLoop.stop(),this.emit(P.RUNTIME_STOPPED))}enableProfiling(A){Q.available()&&(this.profiler=new Q(A))}disableProfiling(){this.profiler=null}updateCurrentMSecs(){this.currentMSecs=Date.now()}updatePrivacy(){const A=this.enforcePrivacy&&Object.values(this.externalCommunicationMethods).some(A=>A);this.renderer&&this.renderer.setPrivateSkinAccess&&this.renderer.setPrivateSkinAccess(!A)}setEnforcePrivacy(A){this.enforcePrivacy=A,this.updatePrivacy()}setExternalCommunicationMethod(A,e){if(!Object.prototype.hasOwnProperty.call(this.externalCommunicationMethods,A))throw new Error("Unknown method: ".concat(A));this.externalCommunicationMethods[A]=e,this.updatePrivacy()}}A.exports=P},function(A,e,t){"use strict";t.r(e),t.d(e,"_parse",(function(){return i})),t.d(e,"parse",(function(){return B})),t.d(e,"stringify",(function(){return n}));const i=A=>{let e=0;const t=t=>{const{line:i,column:B}=(()=>{let t=0,i=0;for(let B=0;B(e>=A.length&&t("Unexpected end of input"),A[e]),B=()=>i(e),n=()=>{e++},s=A=>{B()!==A&&t(`Expected '${A}' but found '${B()}'`),n()},r=(t=1,B=1)=>{if(e+B+t>A.length)return"";if(1===t)return i(e+B);let n="";for(let A=0;A{for(;;)if(/\s/.test(B()))n();else{const A=r(2,0);if("//"===A)for(n(),n();"\n"!==B();)n();else{if("/*"!==A)break;for(n(),n();"*/"!==r(2,0);)n();n(),n()}}},g=()=>{o();switch(B()){case'"':return Q();case"{":return w();case"[":return E();case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"-":return c();default:return a()}},a=()=>{if("null"===r(4,0)){for(let A=0;A<4;A++)n();return null}if("true"===r(4,0)){for(let A=0;A<4;A++)n();return!0}if("false"===r(5,0)){for(let A=0;A<5;A++)n();return!1}if("Infinity"===r(8,0)){for(let A=0;A<8;A++)n();return 1/0}if("NaN"===r(3,0)){for(let A=0;A<3;A++)n();return NaN}t(`Unexpected character '${B()}'`)},c=()=>{if("-Infinity"===r(9,0)){for(let A=0;A<9;A++)n();return-1/0}let A="";for(;A+=B(),/[\d.e+-]/i.test(r());)n();n();const e=+A;return Number.isNaN(e)&&t("Not a number: "+A),e},Q=()=>{s('"');let A="";for(;;){const e=B();if('"'===e)break;if("\\"===e)switch(n(),B()){case'"':A+='"';break;case"/":A+="/";break;case"\\":A+="\\";break;case"b":A+="\b";break;case"f":A+="\f";break;case"n":A+="\n";break;case"r":A+="\r";break;case"t":A+="\t";break;case"u":{let e="";for(let A=0;A<4;A++){n();const A=B();/[0-9a-f]/i.test(A)||t("Invalid hex code: "+A),e+=A}const i=Number.parseInt(e,16);A+=String.fromCharCode(i);break}default:t("Invalid escape code: \\"+B())}else A+=e;n()}return s('"'),A},E=()=>{s("["),o();const A=[];for(;o(),"]"!==B();){const e=g();if(A.push(e),o(),","!==B())break;n()}return s("]"),A},w=()=>{s("{"),o();const A={};for(;o(),"}"!==B();){const e=Q();o(),s(":");const t=g();if(A[e]=t,o(),","!==B())break;n()}return s("}"),A};return g()},B=A=>{try{return JSON.parse(A)}catch(e){try{return i(A)}catch(A){throw e}}},n=A=>{if("string"==typeof A)return JSON.stringify(A);if("number"==typeof A||"boolean"==typeof A)return A.toString();if(null==A||"symbol"==typeof A)return"null";if(Array.isArray(A))return`[${A.map(A=>n(A)).join(",")}]`;if("object"==typeof A){let e="{",t=!0;const i=Object.keys(A);for(let B=0;B0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.sequencer=A,this.thread=e,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 A=this.thread.peekStackFrame();return null===A.executionContext&&(A.executionContext={}),A.executionContext}stackTimerFinished(){return!(this.stackFrame.timer.timeElapsed(){t.status===s.STATUS_RUNNING&&(t.status=s.STATUS_PROMISE_WAIT),A.then(A=>{if(c(A,e,t,i,B),B&&(!i._isHat||t.stackClick)){let A,e;do{const i=t.popStack();if(null===i)return;if(e=t.target.blocks.getNextBlock(i),null!==e)break;A=t.peekStackFrame()}while(null!==A&&!A.isLoop);t.pushStack(e)}},A=>{n.warn("Primitive rejected promise: ",A),t.status=s.STATUS_RUNNING,t.popStack()})};class E{constructor(A,e){this.id=e.id,this.opcode=e.opcode,this.fields=e.fields,this.inputs=e.inputs,this.mutation=e.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:t}=g.sequencer,{opcode:i,fields:n,inputs:s}=this;this._isHat=t.getIsHat(i),this._blockFunction=t.getOpcodeFunction(i),this._definedBlockFunction=void 0!==this._blockFunction;const r=t._flowing[i];this._isConditional=!(!r||!r.conditional),this._isLoop=!(!r||!r.loop);const o=Object.keys(n);this._isShadowBlock=!this._definedBlockFunction&&1===o.length&&0===Object.keys(s).length,this._shadowValue=this._isShadowBlock&&n[o[0]].value;for(const A in n)this._argValues[A]="VARIABLE"===A||"LIST"===A||"BROADCAST_OPTION"===A?{id:n[A].id,name:n[A].value}:n[A].value;if(delete this._inputs.custom_block,"BROADCAST_INPUT"in this._inputs){this._argValues.BROADCAST_OPTION={id:null,name:null};const e=this._inputs.BROADCAST_INPUT;if(e.block===e.shadow){const t=A.getBlock(e.shadow).fields.BROADCAST_OPTION;this._argValues.BROADCAST_OPTION.id=t.id,this._argValues.BROADCAST_OPTION.name=t.value,delete this._inputs.BROADCAST_INPUT}}for(const e in this._inputs){const t=this._inputs[e];if(t.block){const i=B.getCached(A,t.block,E);if(i._isHat)continue;this._ops.push(...i._ops),i._parentKey=e,i._parentValues=this._argValues,i._isShadowBlock&&(this._argValues[e]=i._shadowValue)}}this._definedBlockFunction&&this._ops.push(this)}}A.exports=function(A,e){const t=A.runtime;g.sequencer=A,g.thread=e;const i=e.peekStack(),n=e.peekStackFrame();let r=e.blockContainer,w=B.getCached(r,i,E);if(null===w&&(r=t.flyoutBlocks,w=B.getCached(r,i,E),null===w))return void A.retireThread(e);const C=w._ops,l=C.length;let I=0;if(null!==n.reported){const A=n.reported;for(;IA.id===e);if(i){const A=i._parentKey,e=i._parentValues;"BROADCAST_INPUT"===A?(e.BROADCAST_OPTION.id=null,e.BROADCAST_OPTION.name=o.toString(t)):e[A]=t}}if(A.length>0){const e=A.reverse().find(A=>C.find(e=>e.id===A.opCached));I=e?C.findIndex(A=>A.id===e.opCached)+1:0}if(null!==e.justReported&&C[I]&&C[I].id===n.reporting){const A=C[I],t=e.justReported;e.justReported=null;const i=A._parentKey,B=A._parentValues;"BROADCAST_INPUT"===i?(B.BROADCAST_OPTION.id=null,B.BROADCAST_OPTION.name=o.toString(t)):B[i]=t,I+=1}n.reporting=null,n.reported=null,n.waitingReporter=!1}const h=I;for(;I{const e=A._parentKey,t=A._parentValues;return"BROADCAST_INPUT"===e?{opCached:A.id,inputValue:t[e].BROADCAST_OPTION.name}:{opCached:A.id,inputValue:t[e]}});break}if(e.status===s.STATUS_RUNNING)if(t)c(E,A,e,i,t);else{const A=i._parentKey,e=i._parentValues;"BROADCAST_INPUT"===A?(e.BROADCAST_OPTION.id=null,e.BROADCAST_OPTION.name=o.toString(E)):e[A]=E}}var u;if(null!==t.profiler){w._profiler!==t.profiler&&function(A,e){e._profiler=A,-1===a&&(a=A.idByName("blockFunction"));const t=e._ops;for(let e=0;ethis._setupPreview()):null}disableVideo(){if(this._disablePreview(),!this.provider)return null;this.provider.disableVideo()}getFrame(A){let{dimensions:e=B.DIMENSIONS,mirror:t=this.mirror,format:i=B.FORMAT_IMAGE_DATA,cacheTimeout:n=this._frameCacheTimeout}=A;return this.provider?this.provider.getFrame({dimensions:e,mirror:t,format:i,cacheTimeout:n}):null}setPreviewGhost(A){this._ghost=A,-1!==this._drawable&&this.runtime.renderer.updateDrawableEffect(this._drawable,"ghost",this._forceTransparentPreview?100:A)}_disablePreview(){-1!==this._skinId&&(this.runtime.renderer.updateBitmapSkin(this._skinId,new ImageData(...B.DIMENSIONS),1),this.runtime.renderer.updateDrawableVisible(this._drawable,!1)),this._renderPreviewFrame=null}_setupPreview(){const{renderer:A}=this.runtime;A&&(-1===this._skinId&&-1===this._drawable&&(this._skinId=A.createBitmapSkin(new ImageData(...B.DIMENSIONS),1),this._drawable=A.createDrawable(i.VIDEO_LAYER),A.updateDrawableSkinId(this._drawable,this._skinId),A.markSkinAsPrivate&&A.markSkinAsPrivate(this._skinId)),this._renderPreviewFrame||(A.updateDrawableEffect(this._drawable,"ghost",this._forceTransparentPreview?100:this._ghost),A.updateDrawableVisible(this._drawable,!0),this._renderPreviewFrame=()=>{if(clearTimeout(this._renderPreviewTimeout),!this._renderPreviewFrame)return;this._renderPreviewTimeout=setTimeout(this._renderPreviewFrame,this.runtime.currentStepTime);const e=this.getFrame({format:B.FORMAT_IMAGE_DATA,cacheTimeout:this.runtime.currentStepTime});e?(A.updateBitmapSkin(this._skinId,e,1),this.runtime.requestRedraw()):A.updateBitmapSkin(this._skinId,new ImageData(...B.DIMENSIONS),1)},this._renderPreviewFrame()))}get videoReady(){return!!this.provider&&this.provider.videoReady}postData(A){let{forceTransparentPreview:e}=A;this._forceTransparentPreview=e,this.setPreviewGhost(this._ghost)}}A.exports=B},function(A,e){A.exports={generateExtensionId:A=>{const e=A.replace(/[^a-z0-9]/gi,"").toLowerCase();return"sbx".concat(e)},argumentIndexToId:A=>A.toString()}},function(A,e){A.exports=class{constructor(A,e){this.callback=A,this.maxConcurrent=e,this._current=0,this._queue=[]}do(){for(var A=arguments.length,e=new Array(A),t=0;t{this._queue.push([A,t,e]),this._startNext()})}_startNext(){if(this._current>=this.maxConcurrent||0===this._queue.length)return;this._current++;const[A,e,t]=this._queue.shift();this.callback.apply(null,t).then(e=>{A(e),this._current--,this._startNext()}).catch(A=>{e(A),this._current--,this._startNext()})}}},function(A,e,t){"use strict";var i=window.URL||window.webkitURL;A.exports=function(A,e){try{try{var t;try{(t=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder)).append(A),t=t.getBlob()}catch(e){t=new Blob([A])}return new Worker(i.createObjectURL(t))}catch(e){return new Worker("data:application/javascript,"+encodeURIComponent(A))}}catch(A){if(!e)throw Error("Inline worker is not supported");return new Worker(e)}}},function(A,e){class t{static _mergeVarRefObjects(A,e){for(const t in e)A[t]?A[t]=A[t].concat(e[t]):A[t]=e[t];return A}static getAllVarRefsForTargets(A,e){return A.map(A=>A.blocks.getAllVariableAndListReferences(null,e)).reduce(t._mergeVarRefObjects,{})}static updateVariableIdentifiers(A,e,t){A.map(A=>(A.referencingField.id=e,t&&(A.referencingField.value=t),A))}}A.exports=t},function(A,e,t){const i=t(38),B=t(52),n=t(93),s=t(94),r=t(277),o=(A,e)=>{const t=[],i=A=>{A.localName!==e&&void 0!==e||!A.getAttribute||t.push(A);for(let e=0;e{const e=document.createElement("span"),t=A.outerHTML,B=i.sanitize(t,{USE_PROFILES:{svg:!0},FORBID_TAGS:["a","audio","canvas","video"],ADD_DATA_URI_TAGS:["image"]});let n,s;try{e.innerHTML=B,document.body.appendChild(e),n=e.children[0].getBBox()}finally{document.body.removeChild(e)}s=0===n.width||0===n.height?0:(A=>{let e=0;const t=A=>{A.getAttribute&&(A.getAttribute("stroke")&&(e=Math.max(e,1)),A.getAttribute("stroke-width")&&(e=Math.max(e,Number(A.getAttribute("stroke-width"))||0)));for(let e=0;e{e&&(A=>{const e=o(A,"linearGradient");for(const A of e)A.getAttribute("x2")||A.setAttribute("x2","0")})(A),r(A,window),(A=>{const e=o(A,"image"),t="image-rendering: optimizespeed; image-rendering: pixelated;";for(const A of e)A.getAttribute("style")?A.setAttribute("style","".concat(t," ").concat(A.getAttribute("style"))):A.setAttribute("style",t)})(A),e?((A=>{const e=[],t=A=>{"text"===A.localName&&e.push(A);for(let e=0;e{const e=o(A);for(const A of e){if(!A.style)continue;const e=A.style.stroke||A.getAttribute("stroke");e&&e.match(/^url\(#.*\)$/)&&(A.style["stroke-linejoin"]="round",A.style["stroke-linecap"]="round")}})(A)):A.getAttribute("viewBox")?A.getAttribute("width")&&A.getAttribute("height")||(A.setAttribute("width",A.viewBox.baseVal.width),A.setAttribute("height",A.viewBox.baseVal.height)):g(A)};A.exports=(A,e)=>{const t=new DOMParser;A=s(A);const i=t.parseFromString(A,"text/xml");if(i.childNodes.length<1||"svg"!==i.documentElement.localName)throw new Error("Document does not appear to be SVG.");const B=i.documentElement;return a(B,e),B}},function(A,e){A.exports=function(A){const e=[],t=A=>{"text"===A.localName&&e.push(A);for(let e=0;e]*>/);e&&-1===e[0].indexOf("xmlns=")&&(A=A.replace("]+?xlink:href=["'])data:img\/png/g,(A,e)=>"".concat(e,"data:image/png")));const t=/(<[^>]+?xmlns:(?!xml=)[^ ]+=)"http:\/\/www.w3.org\/XML\/1998\/namespace"/g;return null!==A.match(t)&&(A=A.replace(t,(A,e)=>"".concat(e,'"http://dummy.namespace"'))),A=(A=(A=A.replace(/<(\/?)\s*svg:/g,"<$1")).replace(/[\s\S]*<\/metadata>/,"")).replace(/[\s\S]*<\/script>/,"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(A,e){A.exports={rgbToHsv:(A,e)=>{let[t,i,B]=A,n=0;t/=255,i/=255,B/=255;let s=0;i{let[t,i,B]=A;if(0===i)return e[0]=e[1]=e[2]=255*B+.5,e;t%=1;const n=6*t|0,s=6*t-n,r=B*(1-i),o=B*(1-i*s),g=B*(1-i*(1-s));let a=0,c=0,Q=0;switch(n){case 0:a=B,c=g,Q=r;break;case 1:a=o,c=B,Q=r;break;case 2:a=r,c=B,Q=g;break;case 3:a=r,c=o,Q=B;break;case 4:a=g,c=r,Q=B;break;case 5:a=B,c=r,Q=o}return e[0]=255*a+.5,e[1]=255*c+.5,e[2]=255*Q+.5,e}}},function(A,e,t){const i=t(11),B=t(41),n=t(30),s=t(31),r={color4f:[0,0,1,1],diameter:1},o=[0,0,0,0];A.exports=class extends n{constructor(A,e){super(A,e),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=e.getNativeSize(),this._resetAttributeIndexes(),this.a_lineColor=new Float32Array(65520),this.a_lineThicknessAndLength=new Float32Array(32760),this.a_penPoints=new Float32Array(65520),this.a_position=new Float32Array(32760);for(let A=0;Athis._enterDrawTexture(),exit:()=>this._exitDrawTexture()},this.onNativeSizeChanged=this.onNativeSizeChanged.bind(this),this._renderer.on(B.Events.NativeSizeChanged,this.onNativeSizeChanged),this._setCanvasSize(e.getNativeSize())}dispose(){this._renderer.removeListener(B.Events.NativeSizeChanged,this.onNativeSizeChanged),this._renderer.gl.deleteTexture(this._texture),this._texture=null,super.dispose()}get size(){return this._nativeSize}useNearest(A){return Math.max(A[0],A[1])>=100}getTexture(A){return this._texture}clear(){this._renderer.enterDrawRegion(this._usePenBufferDrawRegionId);const A=this._renderer.gl;A.clearColor(0,0,0,0),A.clear(A.COLOR_BUFFER_BIT),this._silhouetteDirty=!0}drawPoint(A,e,t){this.drawLine(A,e,t,e,t)}drawLine(A,e,t,i,B){const n=A.diameter||r.diameter,s=1===n||3===n?.5:0;this._drawLineOnBuffer(A,e+s,t+s,i+s,B+s),this._silhouetteDirty=!0}_enterDrawLineOnBuffer(){this._resetAttributeIndexes();const A=this._renderer.gl;i.bindFramebufferInfo(A,this._framebuffer),A.viewport(0,0,this._size[0],this._size[1]);const e=this._lineShader;A.useProgram(e.program),i.setBuffersAndAttributes(A,e,this._lineBufferInfo);const t={u_skin:this._texture,u_stageSize:this._size};i.setUniforms(e,t)}_exitDrawLineOnBuffer(){this.a_lineColorIndex&&this._flushLines();const A=this._renderer.gl;i.bindFramebufferInfo(A,null)}_enterUsePenBuffer(){i.bindFramebufferInfo(this._renderer.gl,this._framebuffer)}_exitUsePenBuffer(){i.bindFramebufferInfo(this._renderer.gl,null)}_enterDrawTexture(){this._enterUsePenBuffer();const A=this._renderer.gl;A.viewport(0,0,this._size[0],this._size[1]),A.useProgram(this._drawTextureShader.program),i.setBuffersAndAttributes(A,this._drawTextureShader,this._renderer._bufferInfo)}_exitDrawTexture(){this._exitUsePenBuffer()}_drawPenTexture(A){this._renderer.enterDrawRegion(this._drawTextureRegionId);const e=this._renderer.gl,t=this._size[0],B=this._size[1],n={u_skin:A,u_projectionMatrix:i.m4.ortho(t/2,t/-2,B/-2,B/2,-1,1,i.m4.identity()),u_modelMatrix:i.m4.scaling(i.v3.create(t,B,0),i.m4.identity())};i.setTextureParameters(e,A,{minMag:e.NEAREST}),i.setUniforms(this._drawTextureShader,n),i.drawBufferInfo(e,this._renderer._bufferInfo,e.TRIANGLES)}_drawLineOnBuffer(A,e,t,i,B){this._renderer.enterDrawRegion(this._lineOnBufferDrawRegionId),this.a_lineColorIndex+24>65520&&this._flushLines();const n=A.color4f||r.color4f;o[0]=n[0]*n[3],o[1]=n[1]*n[3],o[2]=n[2]*n[3],o[3]=n[3],e*=this.renderQuality,t*=this.renderQuality;const s=(i*=this.renderQuality)-e,g=(B*=this.renderQuality)-t,a=Math.sqrt(s*s+g*g),c=(A.diameter||r.diameter)*this.renderQuality;for(let A=0;A<6;A++)this.a_lineColor[this.a_lineColorIndex]=o[0],this.a_lineColorIndex++,this.a_lineColor[this.a_lineColorIndex]=o[1],this.a_lineColorIndex++,this.a_lineColor[this.a_lineColorIndex]=o[2],this.a_lineColorIndex++,this.a_lineColor[this.a_lineColorIndex]=o[3],this.a_lineColorIndex++,this.a_lineThicknessAndLength[this.a_lineThicknessAndLengthIndex]=c,this.a_lineThicknessAndLengthIndex++,this.a_lineThicknessAndLength[this.a_lineThicknessAndLengthIndex]=a,this.a_lineThicknessAndLengthIndex++,this.a_penPoints[this.a_penPointsIndex]=e,this.a_penPointsIndex++,this.a_penPoints[this.a_penPointsIndex]=-t,this.a_penPointsIndex++,this.a_penPoints[this.a_penPointsIndex]=s,this.a_penPointsIndex++,this.a_penPoints[this.a_penPointsIndex]=-g,this.a_penPointsIndex++}_resetAttributeIndexes(){this.a_lineColorIndex=0,this.a_lineThicknessAndLengthIndex=0,this.a_penPointsIndex=0}_flushLines(){const A=this._renderer.gl,e=this._lineShader;this.a_lineColorIndex<1e3?(i.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_lineColor,new Float32Array(this.a_lineColor.buffer,0,this.a_lineColorIndex),0),i.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_penPoints,new Float32Array(this.a_penPoints.buffer,0,this.a_penPointsIndex),0),i.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_lineThicknessAndLength,new Float32Array(this.a_lineThicknessAndLength.buffer,0,this.a_lineThicknessAndLengthIndex),0)):(i.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_lineColor,this.a_lineColor),i.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_penPoints,this.a_penPoints),i.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_lineThicknessAndLength,this.a_lineThicknessAndLength)),i.setBuffersAndAttributes(A,e,this._lineBufferInfo),i.drawBufferInfo(A,this._lineBufferInfo,A.TRIANGLES,this.a_lineThicknessAndLengthIndex/2),this._resetAttributeIndexes(),this._silhouetteDirty=!0}onNativeSizeChanged(A){this._nativeSize=A.newSize,this._setCanvasSize([A.newSize[0]*this.renderQuality,A.newSize[1]*this.renderQuality]),this.emitWasAltered()}_setCanvasSize(A){const[e,t]=A;if(this._size&&this._size[0]===e&&this._size[1]===t)return;this._size=A,this._rotationCenter[0]=this._nativeSize[0]/2,this._rotationCenter[1]=this._nativeSize[1]/2;const B=this._renderer.gl,n=this._texture;this._texture=i.createTexture(B,{mag:B.NEAREST,min:B.NEAREST,wrap:B.CLAMP_TO_EDGE,width:e,height:t});const s=[{format:B.RGBA,attachment:this._texture}];this._framebuffer,this._framebuffer=i.createFramebufferInfo(B,s,e,t),B.clearColor(0,0,0,0),B.clear(B.COLOR_BUFFER_BIT),n&&this._drawPenTexture(n),this._silhouettePixels=new Uint8Array(Math.floor(e*t*4)),this._silhouetteImageData=new ImageData(e,t),this._silhouetteDirty=!0}setRenderQuality(A){this.renderQuality!==A&&(this.renderQuality=A,this._setCanvasSize([Math.round(this._nativeSize[0]*A),Math.round(this._nativeSize[1]*A)]))}updateSilhouette(){if(this._silhouetteDirty){this._renderer.enterDrawRegion(this._usePenBufferDrawRegionId);const A=this._renderer.gl;A.readPixels(0,0,this._size[0],this._size[1],A.RGBA,A.UNSIGNED_BYTE,this._silhouettePixels),this._silhouetteImageData.data.set(this._silhouettePixels),this._silhouette.update(this._silhouetteImageData,!0),this._silhouetteDirty=!1}}}},function(A,e,t){const i=t(11),B=t(30),{loadSvgString:n,serializeSvgToString:s}=t(411),r=t(31);A.exports=class extends B{constructor(A,e){super(A,e),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(A,e){return 0==(e.enabledEffects&(r.EFFECT_INFO.fisheye.mask|r.EFFECT_INFO.whirl.mask|r.EFFECT_INFO.pixelate.mask|r.EFFECT_INFO.mosaic.mask))&&(e._direction%90==0&&(Math.abs(A[0])>99&&Math.abs(A[0])<101&&Math.abs(A[1])>99&&Math.abs(A[1])<101))}createMIP(A){const e=this._largestMIPScale0&&void 0!==arguments[0]?arguments[0]:[100,100];this.getTexture(A),this._silhouette.unlazy()}getTexture(A){const e=A?Math.max(Math.abs(A[0]),Math.abs(A[1])):100,t=Math.min(e/100,this._maxTextureScale),i=Math.max(Math.ceil(Math.log2(t))+8,0),B=Math.pow(2,i-8);return this._svgImageLoaded&&!this._scaledMIPs[i]&&(this._scaledMIPs[i]=this.createMIP(B)),this._scaledMIPs[i]||super.getTexture()}resetMIPs(){this._scaledMIPs.forEach(A=>this._renderer.gl.deleteTexture(A)),this._scaledMIPs.length=0,this._largestMIPScale=0}setSVG(A,e){const t=n(A),i=s(t,this._renderer.customFonts);this._svgImageLoaded=!1;const{x:B,y:r,width:o,height:g}=t.viewBox.baseVal;this._size[0]=o,this._size[1]=g,this._svgImage.onload=()=>{if(0===o||0===g)return void super.setEmptyImageData();const A=Math.ceil(Math.max(o,g)),t=this._renderer.maxTextureDimension;let i=2;for(;A*i<=t;i*=2)this._maxTextureScale=i;this.resetMIPs(),void 0===e&&(e=this.calculateRotationCenter()),this._rotationCenter[0]=e[0]-B,this._rotationCenter[1]=e[1]-r,this._svgImageLoaded=!0,this.emitWasAltered()},this._svgImage.src="data:image/svg+xml;utf8,".concat(encodeURIComponent(i))}}},function(A,e,t){const i=t(412),B=t(415),n=t(123),s=t(119),r=t(417),o=t(122),g=t(59),a=t(120);A.exports={BitmapAdapter:B,convertFonts:a,inlineSvgFonts:n,loadSvgString:s,sanitizeSvg:r,serializeSvgToString:o,SvgElement:g,SVGRenderer:i}},function(A,e,t){const i=t(119),B=t(122);A.exports=class{constructor(A){this._canvas=A||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(A,e){this._cachedImage=null;const t=i(A,e);this._svgTag=t,this._measurements={width:t.viewBox.baseVal.width,height:t.viewBox.baseVal.height,x:t.viewBox.baseVal.x,y:t.viewBox.baseVal.y}}loadSVG(A,e,t){this.loadString(A,e),this._createSVGImage(t)}_createSVGImage(A){null===this._cachedImage&&(this._cachedImage=new Image);const e=this._cachedImage;e.onload=()=>{this.loaded=!0,A&&A()};const t=this.toString(!0);e.src="data:image/svg+xml;utf8,".concat(encodeURIComponent(t)),this.loaded=!1}toString(A){return B(this._svgTag,A)}draw(A){if(!this.loaded)throw new Error("SVG image has not finished loading");this._drawFromImage(A)}_drawFromImage(A){if(null===this._cachedImage)return;const e=Number.isFinite(A)?A:1,t=this._measurements;this._canvas.width=t.width*e,this._canvas.height=t.height*e,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(e,0,0,e,0,0),this._context.drawImage(this._cachedImage,0,0))}}},function(A,e,t){const i=t(95),B=t(59),n=t(414),s=function(A){let e=i.identity();const t=A.attributes&&A.attributes.transform&&A.attributes.transform.value;if(!t)return e;const B=t.split(/\)\s*/g);for(const A of B){if(!A)break;const t=A.split(/\(\s*/),B=t[0].trim(),s=t[1].split(/[\s,]+/g);for(let A=0;AA.x*e.x+A.y*e.y,e=(A,e)=>({x:A*e.x,y:A*e.y}),t=(A,e)=>({x:A.x+e.x,y:A.y+e.y}),B=(A,e)=>({x:A.x-e.x,y:A.y-e.y});let s=Math.abs(I.x-h.x)<1e-8?t(I,{x:1,y:(I.x-h.x)/(h.y-I.y)}):t(I,{x:(h.y-I.y)/(I.x-h.x),y:1});s=i.applyToPoint(n,s),I=i.applyToPoint(n,I),h=i.applyToPoint(n,h);const r=B(s,I),o=B(h,I),g=Math.abs(r.x)<1e-8?{x:1,y:-r.x/r.y}:{x:-r.y/r.x,y:1},a=e(A(o,g)/A(g,g),g);h={x:I.x+a.x,y:I.y+a.y}}return Q?(E.setAttribute("cx",Number(I.x.toFixed(4))),E.setAttribute("cy",Number(I.y.toFixed(4))),E.setAttribute("r",Number(u.toFixed(4))),d&&(E.setAttribute("fx",Number(d.x.toFixed(4))),E.setAttribute("fy",Number(d.y.toFixed(4))))):(E.setAttribute("x1",Number(I.x.toFixed(4))),E.setAttribute("y1",Number(I.y.toFixed(4))),E.setAttribute("x2",Number(h.x.toFixed(4))),E.setAttribute("y2",Number(h.y.toFixed(4)))),E.setAttribute("gradientUnits","userSpaceOnUse"),g.appendChild(E),"url(#".concat(C,")")},E=(A,e)=>{const t=A&&A.match(/\((?:["'#]*)([^"')]+)/),i=t&&t[1];return i&&e?i.replace("".concat(e.location.href.split("#")[0],"#"),""):i};A.exports=function(A,e,t){const n=i.identity(),w=(n,C,l,I,h)=>{if(function(A){return A.tagName&&a.includes(A.tagName.toLowerCase())}(n)){n.attributes["stroke-width"]&&(l=n.attributes["stroke-width"].value),n.attributes&&(n.attributes.fill&&(I=n.attributes.fill.value),n.attributes.stroke&&(h=n.attributes.stroke.value));for(let A=0;A0&&E.y<0||E.x<0&&E.y>0)&&(g^=1),Q+="A ".concat(C(Math.abs(c.radiusX))," ")+"".concat(C(Math.abs(c.radiusY))," ")+"".concat(C(c.rotation)," ").concat(s," ")+"".concat(g," ").concat(l(a))):Q+="L ".concat(l(a))}break;case"z":Q+="Z ",a=c}n=h}return Q}(n.attributes.d.value,C)),n.removeAttribute("transform");const w=r(C);n.setAttribute("stroke-width",c(w.x,w.y)*l),I&&n.setAttribute("fill",I),h&&n.setAttribute("stroke",h)}else(function(A){return A.tagName&&g.includes(A.tagName.toLowerCase())})(n)&&(l&&!n.attributes["stroke-width"]&&n.setAttribute("stroke-width",l),I&&!n.attributes.fill&&n.setAttribute("fill",I),h&&!n.attributes.stroke&&n.setAttribute("stroke",h),C=i.compose(C,s(n)),i.toString(C)===i.toString(i.identity())?n.removeAttribute("transform"):n.setAttribute("transform",i.toString(C)))};w(A,n,1)}},function(A,e,t){const i=t(25);i.enable(),A.exports=i("scratch-svg-render")},function(A,e,t){const i=t(416);A.exports=class{constructor(A,e){this._makeImage=A||(()=>new Image),this._makeCanvas=e||(()=>document.createElement("canvas")),this.stageWidth=480,this.stageHeight=360}setStageSize(A,e){this.stageWidth=A,this.stageHeight=e}resize(A,e,t){const i=this._makeCanvas();i.width=e,i.height=A.height;let B=i.getContext("2d");B.imageSmoothingEnabled=!1,B.drawImage(A,0,0,i.width,i.height);const n=this._makeCanvas();return n.width=e,n.height=t,B=n.getContext("2d"),B.imageSmoothingEnabled=!1,B.drawImage(i,0,0,n.width,n.height),n}convertResolution1Bitmap(A,e){const t=this._makeImage();t.src=A,t.onload=()=>{e(null,this.resize(t,2*t.width,2*t.height).toDataURL())},t.onerror=()=>{e("Image load failed")}}getResizedWidthHeight(A,e){const t=this.stageWidth,i=this.stageHeight;if(A<=t&&e<=i)return{width:2*A,height:2*e};if(A<=2*t&&e<=2*i)return{width:A,height:e};const B=A/e;return B>=t/i?{width:2*t,height:2*t/B}:{width:2*i*B,height:2*i}}importBitmap(A,e){let t=A;return A instanceof ArrayBuffer&&(t=this.convertBinaryToDataURI(A,e)),new Promise((A,e)=>{const i=this._makeImage();i.src=t,i.onload=()=>{const e=this.getResizedWidthHeight(i.width,i.height);if(e.width===i.width&&e.height===i.height)A(this.convertDataURIToBinary(t));else{const t=this.resize(i,e.width,e.height).toDataURL();A(this.convertDataURIToBinary(t))}},i.onerror=()=>{e("Image load failed")}})}convertDataURIToBinary(A){const e=A.indexOf(";base64,")+";base64,".length,t=A.substring(e),i=window.atob(t),B=i.length,n=new Uint8Array(new ArrayBuffer(B));for(let A=0;A0?o-4:o;var a=0;for(e=0;e>16&255,r[a++]=i>>8&255,r[a++]=255&i;2===s?(i=B[A.charCodeAt(e)]<<2|B[A.charCodeAt(e+1)]>>4,r[a++]=255&i):1===s&&(i=B[A.charCodeAt(e)]<<10|B[A.charCodeAt(e+1)]<<4|B[A.charCodeAt(e+2)]>>2,r[a++]=i>>8&255,r[a++]=255&i);return r},e.fromByteArray=function(A){for(var e,t=A.length,B=t%3,n="",s=[],r=0,o=t-B;ro?o:r+16383));1===B?(e=A[t-1],n+=i[e>>2],n+=i[e<<4&63],n+="=="):2===B&&(e=(A[t-2]<<8)+A[t-1],n+=i[e>>10],n+=i[e>>4&63],n+=i[e<<2&63],n+="=");return s.push(n),s.join("")};for(var i=[],B=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,o=s.length;r0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===A[e-2]?2:"="===A[e-1]?1:0}function a(A,e,t){for(var B,n,s=[],r=e;r>18&63]+i[n>>12&63]+i[n>>6&63]+i[63&n]);return s.join("")}B["-".charCodeAt(0)]=62,B["_".charCodeAt(0)]=63},function(A,e,t){const i=t(121),{generate:B,parse:n,walk:s}=t(99),r=t(38),o={};let g,a;if(r.addHook("beforeSanitizeAttributes",A=>{if(A&&A.href&&A.href.baseVal){const e=A.href.baseVal.replace(/\s/g,"");"data:"!==e.slice(0,5)&&"#"!==e.slice(0,1)&&(A.attributes.getNamedItem("xlink:href")&&(A.attributes.removeNamedItem("xlink:href"),delete A["xlink:href"]),A.attributes.getNamedItem("href")&&(A.attributes.removeNamedItem("href"),delete A.href))}return A}),r.addHook("uponSanitizeElement",(A,e)=>{if("style"===e.tagName){const e=n(A.textContent);let t=!1;s(e,(A,e,i)=>{"Atrule"===A.type&&"import"===A.name&&(i.remove(e),t=!0)}),t&&(A.textContent=B(e))}}),"undefined"==typeof TextDecoder||"undefined"==typeof TextEncoder){const A=t(32);g=A.TextDecoder,a=A.TextEncoder}else g=TextDecoder,a=TextEncoder;o.sanitizeByteStream=function(A){const e=new g,t=new a,i=o.sanitizeSvgText(e.decode(A));return t.encode(i)};const c=""),E=new RegExp("".concat(c,"rotationCenter:(-?[\\d\\.]+):(-?[\\d\\.]+)").concat(Q,"$"));o.sanitizeSvgText=function(A){let e=r.sanitize(A,{USE_PROFILES:{svg:!0}});e.indexOf("]>")>=0&&(e=e.substring(5,e.length)),e=i(e);const t=A.match(E);return t&&(e+=t[0]),e},A.exports=o},function(A,e,t){const i=t(11),B=t(124),n=t(30),s=170,r=50,o=4,g=10,a=16,c=12,Q="Helvetica",E=14,w=.9,C=16,l={BUBBLE_FILL:"white",BUBBLE_STROKE:"rgba(0, 0, 0, 0.15)",TEXT_FILL:"#575E75"};A.exports=class extends n{constructor(A,e){super(A,e),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 B(this._canvas.getContext("2d")),this.textWrapper=e.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(A,e,t){this._text=e,this._bubbleType=A,this._pointsLeft=t,this._textDirty=!0,this._textureDirty=!0,this.emitWasAltered()}_restyleCanvas(){this._canvas.getContext("2d").font="".concat(E,"px ").concat(Q,", sans-serif")}_reflowLines(){this._lines=this.textWrapper.wrapText(s,this._text);let A=0;for(const e of this._lines)A=Math.max(A,this.measurementProvider.measureText(e));const e=Math.max(A,r)+2*g,t=C*this._lines.length+2*g;this._textAreaSize.width=e,this._textAreaSize.height=t,this._size[0]=e+o,this._size[1]=t+o+c,this._textDirty=!1}_renderTextBubble(A){const e=this._canvas.getContext("2d");this._textDirty&&this._reflowLines();const t=this._textAreaSize.width,i=this._textAreaSize.height;this._canvas.width=Math.ceil(this._size[0]*A),this._canvas.height=Math.ceil(this._size[1]*A),this._restyleCanvas(),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,this._canvas.width,this._canvas.height),e.scale(A,A),e.translate(.5*o,.5*o),e.save(),this._pointsLeft&&(e.scale(-1,1),e.translate(-t,0)),e.beginPath(),e.moveTo(a,i),e.arcTo(0,i,0,i-a,a),e.arcTo(0,0,t,0,a),e.arcTo(t,0,t,i,a),e.arcTo(t,i,t-a,i,a),e.save(),e.translate(t-a,i),"say"===this._bubbleType?(e.bezierCurveTo(0,4,4,8,4,10),e.arcTo(4,12,2,12,2),e.bezierCurveTo(-1,12,-11,8,-16,0),e.closePath()):(e.arc(-16,0,4,0,Math.PI),e.closePath(),e.moveTo(-7,7.25),e.arc(-9.25,7.25,2.25,0,2*Math.PI),e.moveTo(0,9.5),e.arc(-1.5,9.5,1.5,0,2*Math.PI)),e.restore(),e.fillStyle=l.BUBBLE_FILL,e.strokeStyle=l.BUBBLE_STROKE,e.lineWidth=o,e.stroke(),e.fill(),e.restore(),e.fillStyle=l.TEXT_FILL,e.font="".concat(E,"px ").concat(Q,", sans-serif");const B=this._lines;for(let A=0;A0&&void 0!==arguments[0]?arguments[0]:[100,100];this.getTexture(A)}getTexture(A){const e=A?Math.max(Math.abs(A[0]),Math.abs(A[1])):100,t=Math.min(10,e/100);if(this._textureDirty||this._renderedScale!==t){this._renderTextBubble(t),this._textureDirty=!1;const A=this._canvas.getContext("2d").getImageData(0,0,this._canvas.width,this._canvas.height),e=this._renderer.gl;if(null===this._texture){const A={auto:!1,wrap:e.CLAMP_TO_EDGE};this._texture=i.createTexture(e,A)}this._setTexture(A)}return this._texture}}},function(A,e,t){const i=t(420),B=t(425);A.exports=class{constructor(A){this._measurementProvider=A,this._cache={}}wrapText(A,e){e=e.normalize();const t="".concat(A,"-").concat(e);if(this._cache[t])return this._cache[t];const n=this._measurementProvider.beginMeasurementSession(),s=new i(e);let r,o=0,g=null;const a=[];for(;r=s.nextBreak();){const t=e.slice(o,r.position).replace(/\n+$/,"");let i=(g||"").concat(t),n=this._measurementProvider.measureText(i);if(n>A){if(this._measurementProvider.measureText(t)>A){let e,s=0;for(;s!==(e=B.nextBreak(t,s));){const B=t.substring(s,e);i=(g||"").concat(B),n=this._measurementProvider.measureText(i),null===g||n<=A?g=i:(a.push(g),g=B),s=e}}else null!==g&&a.push(g),g=t}else g=i;r.required&&(null!==g&&a.push(g),g=null),o=r.position}return g=g||"",(g.length>0||0===a.length)&&a.push(g),this._cache[t]=a,this._measurementProvider.endMeasurementSession(n),a}}},function(A,e,t){(function(){var e,i,B,n,s,r,o,g,a,c,Q,E,w,C,l,I,h,u,d,Y,M,F,D,m,p,U,f;d=t(125),F=t(422),U=t(423),U.BK,a=U.CR,U.LF,U.NL,s=U.CB,B=U.BA,U.SP,Y=U.WJ,u=U.SP,n=U.BK,E=U.LF,C=U.NL,e=U.AI,i=U.AL,I=U.SA,h=U.SG,M=U.XX,o=U.CJ,U.ID,l=U.NS,U.characterClasses,f=t(424),c=f.DI_BRK,Q=f.IN_BRK,r=f.CI_BRK,g=f.CP_BRK,f.PR_BRK,p=f.pairTable,m=F.toByteArray("AA4IAAAAAAAAAhqg5VV7NJtZvz7fTC8zU5deplUlMrQoWqmqahD5So0aipYWrUhVFSVBQ10iSTtUtW6nKDVF6k7d75eQfEUbFcQ9KiFS90tQEolcP23nrLPmO+esr/+f39rr/a293t/e7/P8nmfvlz0O6RvrBJADtbBNaD88IOKTOmOrCqhu9zE770vc1pBV/xL5dxj2V7Zj4FGSomFKStCWNlV7hG1VabZfZ1LaHbFrRwzzLjzPoi1UHDnlV/lWbhgIIJvLBp/pu7AHEdRnIY+ROdXxg4fNpMdTxVnnm08OjozejAVsBqwqz8kddGRlRxsd8c55dNZoPuex6a7Dt6L0NNb03sqgTlR2/OT7eTt0Y0WnpUXxLsp5SMANc4DsmX4zJUBQvznwexm9tsMH+C9uRYMPOd96ZHB29NZjCIM2nfO7tsmQveX3l2r7ft0N4/SRJ7kO6Y8ZCaeuUQ4gMTZ67cp7TgxvlNDsPgOBdZi2YTam5Q7m3+00l+XG7PrDe6YoPmHgK+yLih7fAR16ZFCeD9WvOVt+gfNW/KT5/M6rb/9KERt+N1lad5RneVjzxXHsLofuU+TvrEsr3+26sVz5WJh6L/svoPK3qepFH9bysDljWtD1F7KrxzW1i9r+e/NLxV/acts7zuo304J9+t3Pd6Y6u8f3EAqxNRgv5DZjaI3unyvkvHPya/v3mWVYOC38qBq11+yHZ2bAyP1HbkV92vdno7r2lxz9UwCdCJVfd14NLcpO2CadHS/XPJ9doXgz5vLv/1OBVS3gX0D9n6LiNIDfpilO9RsLgZ2W/wIy8W/Rh93jfoz4qmRV2xElv6p2lRXQdO6/Cv8f5nGn3u0wLXjhnvClabL1o+7yvIpvLfT/xsKG30y/sTvq30ia9Czxp9dr9v/e7Yn/O0QJXxxBOJmceP/DBFa1q1v6oudn/e6qc/37dUoNvnYL4plQ9OoneYOh/r8fOFm7yl7FETHY9dXd5K2n/qEc53dOEe1TTJcvCfp1dpTC334l0vyaFL6mttNEbFjzO+ZV2mLk0qc3BrxJ4d9gweMmjRorxb7vic0rSq6D4wzAyFWas1TqPE0sLI8XLAryC8tPChaN3ALEZSWmtB34SyZcxXYn/E4Tg0LeMIPhgPKD9zyHGMxxhxnDDih7eI86xECTM8zodUCdgffUmRh4rQ8zyA6ow/Aei+01a8OMfziQQ+GAEkhwN/cqUFYAVzA9ex4n6jgtsiMvXf5BtXxEU4hSphvx3v8+9au8eEekEEpkrkne/zB1M+HAPuXIz3paxKlfe8aDMfGWAX6Md6PuuAdKHFVH++Ed5LEji94Z5zeiJIxbmWeN7rr1/ZcaBl5/nimdHsHgIH/ssyLUXZ4fDQ46HnBb+hQqG8yNiKRrXL/b1IPYDUsu3dFKtRMcjqlRvONd4xBvOufx2cUHuk8pmG1D7PyOQmUmluisVFS9OWS8fPIe8LiCtjwJKnEC9hrS9uKmISI3Wa5+vdXUG9dtyfr7g/oJv2wbzeZU838G6mEvntUb3SVV/fBZ6H/sL+lElzeRrHy2Xbe7UWX1q5sgOQ81rv+2baej4fP4m5Mf/GkoxfDtT3++KP7do9Jn26aa6xAhCf5L9RZVfkWKCcjI1eYbm2plvTEqkDxKC402bGzXCYaGnuALHabBT1dFLuOSB7RorOPEhZah1NjZIgR/UFGfK3p1ElYnevOMBDLURdpIjrI+qZk4sffGbRFiXuEmdFjiAODlQCJvIaB1rW61Ljg3y4eS4LAcSgDxxZQs0DYa15wA032Z+lGUfpoyOrFo3mg1sRQtN/fHHCx3TrM8eTrldMbYisDLXbUDoXMLejSq0fUNuO1muX0gEa8vgyegkqiqqbC3W0S4cC9Kmt8MuS/hFO7Xei3f8rSvIjeveMM7kxjUixOrl6gJshe4JU7PhOHpfrRYvu7yoAZKa3Buyk2J+K5W+nNTz1nhJDhRUfDJLiUXxjxXCJeeaOe/r7HlBP/uURc/5efaZEPxr55Qj39rfTLkugUGyMrwo7HAglfEjDriehF1jXtwJkPoiYkYQ5aoXSA7qbCBGKq5hwtu2VkpI9xVDop/1xrC52eiIvCoPWx4lLl40jm9upvycVPfpaH9/o2D4xKXpeNjE2HPQRS+3RFaYTc4Txw7Dvq5X6JBRwzs9mvoB49BK6b+XgsZVJYiInTlSXZ+62FT18mkFVcPKCJsoF5ahb19WheZLUYsSwdrrVM3aQ2XE6SzU2xHDS6iWkodk5AF6F8WUNmmushi8aVpMPwiIfEiQWo3CApONDRjrhDiVnkaFsaP5rjIJkmsN6V26li5LNM3JxGSyKgomknTyyrhcnwv9Qcqaq5utAh44W30SWo8Q0XHKR0glPF4fWst1FUCnk2woFq3iy9fAbzcjJ8fvSjgKVOfn14RDqyQuIgaGJZuswTywdCFSa89SakMf6fe+9KaQMYQlKxiJBczuPSho4wmBjdA+ag6QUOr2GdpcbSl51Ay6khhBt5UXdrnxc7ZGMxCvz96A4oLocxh2+px+1zkyLacCGrxnPzTRSgrLKpStFpH5ppKWm7PgMKZtwgytKLOjbGCOQLTm+KOowqa1sdut9raj1CZFkZD0jbaKNLpJUarSH5Qknx1YiOxdA5L6d5sfI/unmkSF65Ic/AvtXt98Pnrdwl5vgppQ3dYzWFwknZsy6xh2llmLxpegF8ayLwniknlXRHiF4hzzrgB8jQ4wdIqcaHCEAxyJwCeGkXPBZYSrrGa4vMwZvNN9aK0F4JBOK9mQ8g8EjEbIQVwvfS2D8GuCYsdqwqSWbQrfWdTRUJMqmpnWPax4Z7E137I6brHbvjpPlfNZpF1d7PP7HB/MPHcHVKTMhLO4f3CZcaccZEOiS2DpKiQB5KXDJ+Ospcz4qTRCRxgrKEQIgUkKLTKKwskdx2DWo3bg3PEoB5h2nA24olwfKSR+QR6TAvEDi/0czhUT59RZmO1MGeKGeEfuOSPWfL+XKmhqpZmOVR9mJVNDPKOS49Lq+Um10YsBybzDMtemlPCOJEtE8zaXhsaqEs9bngSJGhlOTTMlCXly9Qv5cRN3PVLK7zoMptutf7ihutrQ/Xj7VqeCdUwleTTKklOI8Wep9h7fCY0kVtDtIWKnubWAvbNZtsRRqOYl802vebPEkZRSZc6wXOfPtpPtN5HI63EUFfsy7U/TLr8NkIzaY3vx4A28x765XZMzRZTpMk81YIMuwJ5+/zoCuZj1wGnaHObxa5rpKZj4WhT670maRw04w0e3cZW74Z0aZe2n05hjZaxm6urenz8Ef5O6Yu1J2aqYAlqsCXs5ZB5o1JJ5l3xkTVr8rJQ09NLsBqRRDT2IIjOPmcJa6xQ1R5yGP9jAsj23xYDTezdyqG8YWZ7vJBIWK56K+iDgcHimiQOTIasNSua1fOBxsKMMEKd15jxTl+3CyvGCR+UyRwuSI2XuwRIPoNNclPihfJhaq2mKkNijwYLY6feqohktukmI3KDvOpN7ItCqHHhNuKlxMfBAEO5LjW2RKh6lE5Hd1dtAOopac/Z4FdsNsjMhXz/ug8JGmbVJTA+VOBJXdrYyJcIn5+OEeoK8kWEWF+wdG8ZtZHKSquWDtDVyhFPkRVqguKFkLkKCz46hcU1SUY9oJ2Sk+dmq0kglqk4kqKT1CV9JDELPjK1WsWGkEXF87g9P98e5ff0mIupm/w6vc3kCeq04X5bgJQlcMFRjlFWmSk+kssXCAVikfeAlMuzpUvCSdXiG+dc6KrIiLxxhbEVuKf7vW7KmDQI95bZe3H9mN3/77F6fZ2Yx/F9yClllj8gXpLWLpd5+v90iOaFa9sd7Pvx0lNa1o1+bkiZ69wCiC2x9UIb6/boBCuNMB/HYR0RC6+FD9Oe5qrgQl6JbXtkaYn0wkdNhROLqyhv6cKvyMj1Fvs2o3OOKoMYTubGENLfY5F6H9d8wX1cnINsvz+wZFQu3zhWVlwJvwBEp69Dqu/ZnkBf3nIfbx4TK7zOVJH5sGJX+IMwkn1vVBn38GbpTg9bJnMcTOb5F6Ci5gOn9Fcy6Qzcu+FL6mYJJ+f2ZZJGda1VqruZ0JRXItp8X0aTjIcJgzdaXlha7q7kV4ebrMsunfsRyRa9qYuryBHA0hc1KVsKdE+oI0ljLmSAyMze8lWmc5/lQ18slyTVC/vADTc+SNM5++gztTBLz4m0aVUKcfgOEExuKVomJ7XQDZuziMDjG6JP9tgR7JXZTeo9RGetW/Xm9/TgPJpTgHACPOGvmy2mDm9fl09WeMm9sQUAXP3Su2uApeCwJVT5iWCXDgmcuTsFgU9Nm6/PusJzSbDQIMfl6INY/OAEvZRN54BSSXUClM51im6Wn9VhVamKJmzOaFJErgJcs0etFZ40LIF3EPkjFTjGmAhsd174NnOwJW8TdJ1Dja+E6Wa6FVS22Haj1DDA474EesoMP5nbspAPJLWJ8rYcP1DwCslhnn+gTFm+sS9wY+U6SogAa9tiwpoxuaFeqm2OK+uozR6SfiLCOPz36LiDlzXr6UWd7BpY6mlrNANkTOeme5EgnnAkQRTGo9T6iYxbUKfGJcI9B+ub2PcyUOgpwXbOf3bHFWtygD7FYbRhb+vkzi87dB0JeXl/vBpBUz93VtqZi7AL7C1VowTF+tGmyurw7DBcktc+UMY0E10Jw4URojf8NdaNpN6E1q4+Oz+4YePtMLy8FPRP"),D=new d(m),w=function(){var A,t,w;function d(A){this.string=A,this.pos=0,this.lastPos=0,this.curClass=null,this.nextClass=null}return d.prototype.nextCodePoint=function(){var A,e;return A=this.string.charCodeAt(this.pos++),e=this.string.charCodeAt(this.pos),55296<=A&&A<=56319&&56320<=e&&e<=57343?(this.pos++,1024*(A-55296)+(e-56320)+65536):A},t=function(A){switch(A){case e:return i;case I:case h:case M:return i;case o:return l;default:return A}},w=function(A){switch(A){case E:case C:return n;case s:return B;case u:return Y;default:return A}},d.prototype.nextCharClass=function(A){return null==A&&(A=!1),t(D.get(this.nextCodePoint()))},A=function(A,e){this.position=A,this.required=null!=e&&e},d.prototype.nextBreak=function(){var e,i,o;for(null==this.curClass&&(this.curClass=w(this.nextCharClass()));this.pos=this.string.length)return this.lastPos>>=1,e}function I(A,e,t){if(!e)return t;for(;A.bitcount<24;)A.tag|=A.source[A.sourceIndex++]<>>16-e;return A.tag>>>=e,A.bitcount-=e,i+t}function h(A,e){for(;A.bitcount<24;)A.tag|=A.source[A.sourceIndex++]<>>=1,++B,t+=e.table[B],i-=e.table[B]}while(i>=0);return A.tag=n,A.bitcount-=B,e.trans[t+i]}function u(A,e,t){var i,B,n,s,r,o;for(i=I(A,5,257),B=I(A,5,1),n=I(A,4,4),s=0;s<19;++s)Q[s]=0;for(s=0;s8;)A.sourceIndex--,A.bitcount-=8;if((e=256*(e=A.source[A.sourceIndex+1])+A.source[A.sourceIndex])!==(65535&~(256*A.source[A.sourceIndex+3]+A.source[A.sourceIndex+2])))return-3;for(A.sourceIndex+=4,t=e;t;--t)A.dest[A.destLen++]=A.source[A.sourceIndex++];return A.bitcount=0,0}!function(A,e){var t;for(t=0;t<7;++t)A.table[t]=0;for(A.table[7]=24,A.table[8]=152,A.table[9]=112,t=0;t<24;++t)A.trans[t]=256+t;for(t=0;t<144;++t)A.trans[24+t]=t;for(t=0;t<8;++t)A.trans[168+t]=280+t;for(t=0;t<112;++t)A.trans[176+t]=144+t;for(t=0;t<5;++t)e.table[t]=0;for(e.table[5]=32,t=0;t<32;++t)e.trans[t]=t}(B,n),E(s,r,4,3),E(o,g,2,1),s[28]=0,r[28]=258,A.exports=function(A,e){var t,s,r=new i(A,e);do{switch(t=l(r),I(r,2,0)){case 0:s=Y(r);break;case 1:s=d(r,B,n);break;case 2:u(r,r.ltree,r.dtree),s=d(r,r.ltree,r.dtree);break;default:s=-3}if(0!==s)throw new Error("Data error")}while(!t);return r.destLen0)throw new Error("Invalid string. Length must be a multiple of 4");var o=A.length;s="="===A.charAt(o-2)?2:"="===A.charAt(o-1)?1:0,r=new e(3*A.length/4-s),B=s>0?A.length-4:A.length;var a=0;function c(A){r[a++]=A}for(t=0,i=0;t>16),c((65280&n)>>8),c(255&n);return 2===s?c(255&(n=g(A.charAt(t))<<2|g(A.charAt(t+1))>>4)):1===s&&(c((n=g(A.charAt(t))<<10|g(A.charAt(t+1))<<4|g(A.charAt(t+2))>>2)>>8&255),c(255&n)),r},A.fromByteArray=function(A){var e,t,i,B,n=A.length%3,s="";function r(A){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(A)}for(e=0,i=A.length-n;e>18&63)+r(B>>12&63)+r(B>>6&63)+r(63&B);switch(n){case 1:s+=r((t=A[A.length-1])>>2),s+=r(t<<4&63),s+="==";break;case 2:s+=r((t=(A[A.length-2]<<8)+A[A.length-1])>>10),s+=r(t>>4&63),s+=r(t<<2&63),s+="="}return s}}(e)},function(A,e){(function(){e.OP=0,e.CL=1,e.CP=2,e.QU=3,e.GL=4,e.NS=5,e.EX=6,e.SY=7,e.IS=8,e.PR=9,e.PO=10,e.NU=11,e.AL=12,e.HL=13,e.ID=14,e.IN=15,e.HY=16,e.BA=17,e.BB=18,e.B2=19,e.ZW=20,e.CM=21,e.WJ=22,e.H2=23,e.H3=24,e.JL=25,e.JV=26,e.JT=27,e.RI=28,e.AI=29,e.BK=30,e.CB=31,e.CJ=32,e.CR=33,e.LF=34,e.NL=35,e.SA=36,e.SG=37,e.SP=38,e.XX=39}).call(this)},function(A,e){(function(){e.DI_BRK=0,e.IN_BRK=1,e.CI_BRK=2,e.CP_BRK=3,e.PR_BRK=4,e.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(A,e,t){(function(A){(function(){var i,B,n,s,r,o,g,a,c,Q,E,w,C,l,I,h;h=t(426),i=h.CR,r=h.LF,B=h.Control,n=h.Extend,a=h.Regional_Indicator,c=h.SpacingMark,s=h.L,w=h.V,Q=h.T,o=h.LV,g=h.LVT,E=t(125),C=new E(A("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")),l=function(A,e){var t,i,B;return e=e||0,55296<=(t=A.charCodeAt(e))&&t<=56319?(i=t,56320<=(B=A.charCodeAt(e+1))&&B<=57343?1024*(i-55296)+(B-56320)+65536:i):56320<=t&&t<=57343?(B=t,55296<=(i=A.charCodeAt(e-1))&&i<=56319?1024*(i-55296)+(B-56320)+65536:B):t},I=function(A,e){return(A!==i||e!==r)&&(A===B||A===i||A===r||(e===B||e===i||e===r||(A!==s||e!==s&&e!==w&&e!==o&&e!==g)&&((A!==o&&A!==w||e!==w&&e!==Q)&&((A!==g&&A!==Q||e!==Q)&&((A!==a||e!==a)&&(e!==n&&e!==c))))))},e.nextBreak=function(A,e){var t,i,B,n,s,r,o;if(null==e&&(e=0),e<0)return 0;if(e>=A.length-1)return A.length;for(B=C.get(l(A,e)),t=n=e+1,s=A.length;nA.length)return A.length;if(e<=1)return 0;for(e--,i=C.get(l(A,e)),t=n=e-1;n>=0;t=n+=-1)if(!(55296<=(s=A.charCodeAt(t))&&s<=56319&&56320<=(r=A.charCodeAt(t+1))&&r<=57343)){if(B=C.get(l(A,t)),I(B,i))return t+1;i=B}return 0},e.break=function(A){var t,i,B;for(B=[],i=0;(t=e.nextBreak(A,i)) * {\n position: absolute;\n top: 0;\n left: 0;\n}\n"},function(A,e,t){const i=t(429),B=t(434),n=t(60),s=t(126),r=t(61);A.exports=class{constructor(){this.defaultAssetId={},this.builtinHelper=new i(this),this.webHelper=new B(this),this.builtinHelper.registerDefaultAssets(this),this._helpers=[{helper:this.builtinHelper,priority:100},{helper:this.webHelper,priority:-100}]}get Asset(){return n}get AssetType(){return s}get DataFormat(){return r}static get Asset(){return n}static get AssetType(){return s}addHelper(A){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._helpers.push({helper:A,priority:e}),this._helpers.sort((A,e)=>e.priority-A.priority)}get(A){return this.builtinHelper.get(A)}cache(A,e,t,i){return this.builtinHelper._store(A,e,t,i)}createAsset(A,e,t,i,B){if(!e)throw new Error("Tried to create asset without a dataFormat");return new n(A,i,e,t,B)}addWebStore(A,e,t,i){this.webHelper.addStore(A,e,t,i)}addWebSource(A,e){this.addWebStore(A,e)}getDefaultAssetId(A){if(Object.prototype.hasOwnProperty.call(this.defaultAssetId,A.name))return this.defaultAssetId[A.name]}setDefaultAssetId(A,e){this.defaultAssetId[A.name]=e}load(A,e,t){const i=this._helpers.map(A=>A.helper),B=[];t=t||A.runtimeFormat;let n,s=0;const r=o=>{if(o&&B.push(o),n=i[s++],n){const i=n.load(A,e,t);return null===i?r():i.catch(r)}return B.length>0?Promise.reject(B):Promise.resolve(null)};return r()}store(A,e,t,i){return e=e||A.runtimeFormat,new Promise((B,n)=>this.webHelper.store(A,e,t,i).then(i=>(this.builtinHelper._store(A,e,t,i.id),B(i))).catch(A=>n(A)))}}},function(A,e,t){(function(e){const i=t(23),B=t(60),n=t(126),s=t(61),r=t(127),o=[{type:n.ImageBitmap,format:s.PNG,id:null,data:e.from(t(431))},{type:n.Sound,format:s.WAV,id:null,data:e.from(t(432))},{type:n.ImageVector,format:s.SVG,id:null,data:e.from(t(433))}],g=o.concat([]);A.exports=class extends r{constructor(A){super(A),this.assets={},g.forEach(A=>{A.id=this._store(A.type,A.format,A.data,A.id)})}registerDefaultAssets(){const A=o.length;for(let e=0;e0?i-4:i,c=0;c>16&255,r[o++]=e>>8&255,r[o++]=255&e;2===s&&(e=B[A.charCodeAt(c)]<<2|B[A.charCodeAt(c+1)]>>4,r[o++]=255&e);1===s&&(e=B[A.charCodeAt(c)]<<10|B[A.charCodeAt(c+1)]<<4|B[A.charCodeAt(c+2)]>>2,r[o++]=e>>8&255,r[o++]=255&e);return r},e.fromByteArray=function(A){for(var e,t=A.length,B=t%3,n=[],s=0,r=t-B;sr?r:s+16383));1===B?(e=A[t-1],n.push(i[e>>2]+i[e<<4&63]+"==")):2===B&&(e=(A[t-2]<<8)+A[t-1],n.push(i[e>>10]+i[e>>4&63]+i[e<<2&63]+"="));return n.join("")};for(var i=[],B=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,o=s.length;r0)throw new Error("Invalid string. Length must be a multiple of 4");var t=A.indexOf("=");return-1===t&&(t=e),[t,t===e?0:4-t%4]}function a(A,e,t){for(var B,n,s=[],r=e;r>18&63]+i[n>>12&63]+i[n>>6&63]+i[63&n]);return s.join("")}B["-".charCodeAt(0)]=62,B["_".charCodeAt(0)]=63},function(A,e,t){A.exports=t(62)("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==")},function(A,e,t){A.exports=t(62)("UklGRiYAAABXQVZFZm10IBAAAAABAAEAIlYAAESsAAACABAAZGF0YQIAAAAAAA==")},function(A,e,t){A.exports=t(62)("PD94bWwgdmVyc2lvbj0iMS4wIj8+Cjxzdmcgd2lkdGg9IjEyOCIgaGVpZ2h0PSIxMjgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiA8Zz4KICA8cmVjdCBmaWxsPSIjQ0NDIiBoZWlnaHQ9IjEyOCIgd2lkdGg9IjEyOCIvPgogIDx0ZXh0IGZpbGw9ImJsYWNrIiB5PSIxMDciIHg9IjM1LjUiIGZvbnQtc2l6ZT0iMTI4Ij4/PC90ZXh0PgogPC9nPgo8L3N2Zz4K")},function(A,e,t){const i=t(60),B=t(127),n=t(435),s=A=>"string"==typeof A?{url:A}:A;A.exports=class extends B{constructor(A){super(A),this.stores=[],this.assetTool=new n,this.projectTool=new n(n.TOOL_FILTER.READY)}addSource(A,e){this.addStore(A,e)}addStore(A,e,t,i){this.stores.push({types:A.map(A=>A.name),get:e,create:t,update:i})}load(A,e,t){const B=[],n=this.stores.slice().filter(e=>e.types.indexOf(A.name)>=0),r=new i(A,e,t);let o=this.assetTool;"Project"===A.name&&(o=this.projectTool);let g=0;const a=A=>{A&&B.push(A);const e=n[g++],i=e&&e.get;if(i){const A=s(i(r));return!1===A?a():o.get(A).then(A=>A?(r.setData(A,t),r):a()).catch(a)}return B.length>0?Promise.reject(B):Promise.resolve(null)};return a()}store(A,e,t,B){const n=new i(A,B,e),r=""===B||null==B,o=this.stores.filter(e=>-1!==e.types.indexOf(A.name)&&(r&&e.create||e.update))[0],g=r?"post":"put";if(!o)return Promise.reject(new Error("No appropriate stores"));let a=this.assetTool;"Project"===A.name&&(a=this.projectTool);const c=s(r?o.create(n):o.update(n)),Q=Object.assign({body:t,method:g},c);return a.send(Q).then(A=>{if("string"==typeof A)try{A=JSON.parse(A)}catch(e){return A}return Object.assign({id:A["content-name"]||B},A)})}}},function(A,e,t){const i=t(436),B=t(438);class n{constructor(){let A;A=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.TOOL_FILTER.ALL)===n.TOOL_FILTER.READY?[new B]:[new i,new B],this.tools=A}get isGetSupported(){return this.tools.some(A=>A.isGetSupported)}get(A){let e=0;const t=i=>{const B=this.tools[e++];if(!B)throw i;return B.isGetSupported?B.get(A).catch(t):t(i)};return t()}get isSendSupported(){return this.tools.some(A=>A.isSendSupported)}send(A){let e=0;const t=i=>{const B=this.tools[e++];if(!B)throw i;return B.isSendSupported?B.send(A).catch(t):t(i)};return t()}}n.TOOL_FILTER={ALL:"all",READY:"ready"},A.exports=n},function(A,e,t){const i=["url"];function B(A,e){if(null==A)return{};var t,i,B=function(A,e){if(null==A)return{};var t,i,B={},n=Object.keys(A);for(i=0;i=0||(B[t]=A[t]);return B}(A,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(A);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(A,t)&&(B[t]=A[t])}return B}class n{constructor(){this._workerSupport={fetch:"undefined"!=typeof fetch},this._supportError=null,this.worker=null,this.jobs={};try{if(this.isGetSupported){const A=t(437);this.worker=new A,this.worker.addEventListener("message",A=>{let{data:e}=A;if(e.support)this._workerSupport=e.support;else for(const A of e)this.jobs[A.id]&&(A.error?this.jobs[A.id].reject(A.error):this.jobs[A.id].resolve(A.buffer),delete this.jobs[A.id])})}}catch(A){this._supportError=A}}get isGetSupported(){return"undefined"!=typeof Worker&&this._workerSupport.fetch&&!this._supportError}get(A){let{url:e}=A,t=B(A,i);return new Promise((A,i)=>{const B=Math.random().toString(16).substring(2);this.worker.postMessage({id:B,url:e,options:Object.assign({method:"GET"},t)}),this.jobs[B]={id:B,resolve:A,reject:i}}).then(A=>A?new Uint8Array(A):null)}get isSendSupported(){return!1}send(){throw new Error("Not implemented.")}static get instance(){return this._instance||(this._instance=new n),this._instance}}A.exports=class{constructor(){this.inner=n.instance}get isGetSupported(){return this.inner.isGetSupported}get(A){return this.inner.get(A)}get isSendSupported(){return!1}send(){throw new Error("Not implemented.")}}},function(A,e,t){A.exports=function(){return t(90)('!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}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 o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));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){const r=n(1),o=[];let s=null;const u=()=>{s||(s=setTimeout(()=>{s=null,o.length&&(postMessage(o.slice(),o.map(e=>e.buffer).filter(Boolean)),o.length=0)}))},a=e=>{let{data:t}=e;r(t.url,t.options).then(e=>o.push({id:t.id,buffer:e})).catch(e=>o.push({id:t.id,error:e&&e.message||"Failed request: ".concat(t.url)})).then(u)};self.fetch?(postMessage({support:{fetch:!0}}),self.addEventListener("message",a)):(postMessage({support:{fetch:!1}}),self.addEventListener("message",e=>{let{data:t}=e;postMessage([{id:t.id,error:"fetch is unavailable"}])}))},function(e,t){let n=0;const r=[],o=()=>{n<100&&r.length>0&&(n++,(e=>{let t,[r,s,u]=e,a=0;const l=()=>fetch(s,u).then(e=>e.ok||0===e.status?e.arrayBuffer():404===e.status?null:Promise.reject(e.status)).then(e=>(n--,o(),e)).catch(e=>{if(403===e)throw e;if(console.warn("Attempt to fetch ".concat(s," failed"),e),t||(t=e),a<2)return a++,new Promise(e=>setTimeout(e,5e3*(a+Math.random()-1))).then(l);throw n--,o(),t});r(l())})(r.shift()))};e.exports=(e,t)=>new Promise(n=>{r.push([n,e,t]),o()})}]);',null)}},function(A,e,t){const i=["url"],B=["url","withCredentials"];function n(A,e){if(null==A)return{};var t,i,B=function(A,e){if(null==A)return{};var t,i,B={},n=Object.keys(A);for(i=0;i=0||(B[t]=A[t]);return B}(A,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(A);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(A,t)&&(B[t]=A[t])}return B}const s=t(439);A.exports=class{get isGetSupported(){return"undefined"!=typeof fetch}get(A){let{url:e}=A,t=n(A,i);return s(e,Object.assign({method:"GET"},t)).then(A=>A?new Uint8Array(A):A)}get isSendSupported(){return"undefined"!=typeof fetch}send(A){let{url:e,withCredentials:t=!1}=A,i=n(A,B);return fetch(e,Object.assign({credentials:t?"include":"omit"},i)).then(A=>A.ok?A.text():Promise.reject(A.status))}}},function(A,e){let t=0;const i=[],B=()=>{t<100&&i.length>0&&(t++,(A=>{let e,[i,n,s]=A,r=0;const o=()=>fetch(n,s).then(A=>A.ok||0===A.status?A.arrayBuffer():404===A.status?null:Promise.reject(A.status)).then(A=>(t--,B(),A)).catch(A=>{if(403===A)throw A;if(console.warn("Attempt to fetch ".concat(n," failed"),A),e||(e=A),r<2)return r++,new Promise(A=>setTimeout(A,5e3*(r+Math.random()-1))).then(o);throw t--,B(),e});i(o())})(i.shift()))};A.exports=(A,e)=>new Promise(t=>{i.push([t,A,e]),B()})},function(A,e,t){const i=t(441),B=t(443),n=t(42),s=t(445),r=t(446),o=t(448),g=t(449),a=t(450),c=t(451),Q=t(452),E=t(128),w=t(453);A.exports=class{constructor(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new B;this.audioContext=A,i(this.audioContext),this.inputNode=this.audioContext.createGain(),this.inputNode.connect(this.audioContext.destination),this.audioBuffers={},this.loudness=null,this.effects=[c,Q,E]}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(A){const e=A.data.buffer.slice(0),t=s();var i,B;return(i=this.audioContext,B=e,1===i.decodeAudioData.length?i.decodeAudioData(B):new Promise((A,e)=>{i.decodeAudioData(B,e=>A(e),A=>e(A))})).catch(()=>{if(0===A.data.length)return this._emptySound();const e=A.data.buffer.slice(0);return new r(this.audioContext).decode(e).catch(()=>this._emptySound())}).then(A=>[t,A],A=>{n.warn("audio data could not be decoded",A)})}_emptySound(){return this.audioContext.createBuffer(1,1,this.audioContext.sampleRate)}decodeSound(A){return this._decodeSound(A).then(A=>{let[e,t]=A;return this.audioBuffers[e]=t,e})}decodeSoundPlayer(A){return this._decodeSound(A).then(A=>{let[e,t]=A;return new g(this,{id:e,buffer:t})})}getLoudness(){return this.loudness||(this.loudness=new o(this.audioContext)),this.loudness.getLoudness()}createEffectChain(){const A=new a(this,this.effects);return A.connect(this),A}createBank(){return new w(this,this.createEffectChain())}}},function(A,e,t){const i=t(442);A.exports=function(A){if("undefined"!=typeof document)return i(A)}},function(A,e,t){var i,B,n; +!function(A){"use strict";var e,t=A.Uint8Array,i=A.HTMLCanvasElement,B=i&&i.prototype,n=/\s*;\s*base64\s*(?:;|$)/i,s="toDataURL",r=function(A){for(var i,B,n=A.length,s=new t(n/4*3|0),r=0,o=0,g=[0,0],a=0,c=0;n--;)B=A.charCodeAt(r++),255!==(i=e[B-43])&&void 0!==i&&(g[1]=g[0],g[0]=B,c=c<<6|i,4===++a&&(s[o++]=c>>>16,61!==g[1]&&(s[o++]=c>>>8),61!==g[0]&&(s[o++]=c),a=0));return s};t&&(e=new t([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])),!i||B.toBlob&&B.toBlobHD||(B.toBlob||(B.toBlob=function(A,e){if(e||(e="image/png"),this.mozGetAsFile)A(this.mozGetAsFile("canvas",e));else if(this.msToBlob&&/^\s*image\/png\s*(?:$|;)/i.test(e))A(this.msToBlob());else{var i,B=Array.prototype.slice.call(arguments,1),o=this[s].apply(this,B),g=o.indexOf(","),a=o.substring(g+1),c=n.test(o.substring(0,g));Blob.fake?((i=new Blob).encoding=c?"base64":"URI",i.data=a,i.size=a.length):t&&(i=c?new Blob([r(a)],{type:e}):new Blob([decodeURIComponent(a)],{type:e})),A(i)}}),!B.toBlobHD&&B.toDataURLHD?B.toBlobHD=function(){s="toDataURLHD";var A=this.toBlob();return s="toDataURL",A}:B.toBlobHD=B.toBlob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this)},function(A,e,t){(function(e){var i=t(390);A.exports=function(A,t,B){if("string"==typeof A)return B(null,[A,null]);if(!e.isBuffer(A))try{A=new e(A)}catch(A){return B("Input must be a Buffer or a string.")}var n=A.slice(0,3).join(" "),s=!1,r=!1;return 0===n.indexOf("83 99 114")&&(s=!0),0===n.indexOf("80 75")&&(r=!0),r||s?s?B("Parser only supports Scratch 2.X and above"):void i(A,t,B):B(null,[A.toString("utf-8"),null])}}).call(this,t(12).Buffer)},function(A,e,t){var i=t(24);A.exports=function(A,e,t){var B="Failed to unzip and extract project.json, with error: ";return i.loadAsync(A).then((function(A){const i=e?A.file(/^([^/]*\/)?sprite\.json$/)[0]:A.file(/^([^/]*\/)?project\.json$/)[0];return i?i.async("string").then((function(e){return t(null,[e,A])})):t(B+"missing project or sprite json")})).catch((function(A){return t(B+A)}))}},function(A,e,t){const i=t(79);A.exports=function(A,e){var t;try{t=i.parse(A.replace(/(\\+)(b|u0008)/g,(A,e,t)=>e.length%2?A.replace("\\"+t,""):A))}catch(A){return e(A.toString())}return e(null,t)}},function(A,e){A.exports=function(A,e,t){if("objName"in e)return e.projectVersion=2,t(null,e);if(A){if("name"in e)return e.projectVersion=3,t(null,e)}else if("targets"in e)return e.projectVersion=3,t(null,e);t(new Error("Could not parse as a valid SB2 or SB3 project."))}},function(A,e){(function(e){A.exports=e}).call(this,{})},function(A,e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#%()*+,-./:;=?@[]^_`{|}~",i=A=>{let e="";for(;A>=0;)e=t[A%t.length]+e,A=Math.floor(A/t.length)-1;return e};class B{constructor(){this.generatedIds=new Map,this.references=new Map,this.skippedIds=new Set,this.skippedIds.add("of")}skip(A){this.skippedIds.add(A)}addReference(A){const e=this.references.get(A)||0;this.references.set(A,e+1)}generateNewIds(){const A=Array.from(this.references.entries());A.sort((A,e)=>e[1]-A[1]);let e=0;for(const t of A){const A=t[0];let B=i(e);for(;this.skippedIds.has(B);)e++,B=i(e);this.generatedIds.set(A,B),e++}}getNewId(A){return this.generatedIds.has(A)?this.generatedIds.get(A):A}}A.exports=A=>{const e=new B;for(const t of A.targets){for(const A of Object.keys(t.variables))e.skip(A);for(const A of Object.keys(t.lists))e.skip(A);for(const A of Object.keys(t.broadcasts))e.skip(A);for(const A of Object.keys(t.blocks)){const i=t.blocks[A];if(e.addReference(A),!Array.isArray(i)){i.parent&&e.addReference(i.parent),i.next&&e.addReference(i.next),i.comment&&e.addReference(i.comment);for(const A of Object.values(i.inputs))for(let t=1;t{let[,e]=A;return"video motion"===e?{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:i.BROADCAST_MESSAGE_TYPE}]},"broadcast:":{opcode:"event_broadcast",argMap:[{type:"input",inputOp:"event_broadcast_menu",inputName:"BROADCAST_INPUT",variableType:i.BROADCAST_MESSAGE_TYPE}]},doBroadcastAndWait:{opcode:"event_broadcastandwait",argMap:[{type:"input",inputOp:"event_broadcast_menu",inputName:"BROADCAST_INPUT",variableType:i.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:i.SCALAR_TYPE}]},"getVar:":{opcode:"data_variable",argMap:[{type:"field",fieldName:"VARIABLE",variableType:i.SCALAR_TYPE}]},"setVar:to:":{opcode:"data_setvariableto",argMap:[{type:"field",fieldName:"VARIABLE",variableType:i.SCALAR_TYPE},{type:"input",inputOp:"text",inputName:"VALUE"}]},"changeVar:by:":{opcode:"data_changevariableby",argMap:[{type:"field",fieldName:"VARIABLE",variableType:i.SCALAR_TYPE},{type:"input",inputOp:"math_number",inputName:"VALUE"}]},"showVariable:":{opcode:"data_showvariable",argMap:[{type:"field",fieldName:"VARIABLE",variableType:i.SCALAR_TYPE}]},"hideVariable:":{opcode:"data_hidevariable",argMap:[{type:"field",fieldName:"VARIABLE",variableType:i.SCALAR_TYPE}]},"contentsOfList:":{opcode:"data_listcontents",argMap:[{type:"field",fieldName:"LIST",variableType:i.LIST_TYPE}]},"append:toList:":{opcode:"data_addtolist",argMap:[{type:"input",inputOp:"text",inputName:"ITEM"},{type:"field",fieldName:"LIST",variableType:i.LIST_TYPE}]},"deleteLine:ofList:":{opcode:"data_deleteoflist",argMap:[{type:"input",inputOp:"math_integer",inputName:"INDEX"},{type:"field",fieldName:"LIST",variableType:i.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:i.LIST_TYPE}]},"setLine:ofList:to:":{opcode:"data_replaceitemoflist",argMap:[{type:"input",inputOp:"math_integer",inputName:"INDEX"},{type:"field",fieldName:"LIST",variableType:i.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:i.LIST_TYPE}]},"lineCountOfList:":{opcode:"data_lengthoflist",argMap:[{type:"field",fieldName:"LIST",variableType:i.LIST_TYPE}]},"list:contains:":{opcode:"data_listcontainsitem",argMap:[{type:"field",fieldName:"LIST",variableType:i.LIST_TYPE},{type:"input",inputOp:"text",inputName:"ITEM"}]},"showList:":{opcode:"data_showlist",argMap:[{type:"field",fieldName:"LIST",variableType:i.LIST_TYPE}]},"hideList:":{opcode:"data_hidelist",argMap:[{type:"field",fieldName:"LIST",variableType:i.LIST_TYPE}]},procDef:{opcode:"procedures_definition",argMap:[]},getParam:{opcode:"argument_reporter_string_number",argMap:[{type:"field",fieldName:"VALUE"}]},call:{opcode:"procedures_call",argMap:[]}},n=function(A,e,t){B["".concat(A).concat("").concat(e)]=t,B["".concat(A,".").concat(e)]=t},s="LEGO WeDo 2.0";n(s,"motorOnFor",{opcode:"wedo2_motorOnFor",argMap:[{type:"input",inputOp:"wedo2_menu_MOTOR_ID",inputName:"MOTOR_ID"},{type:"input",inputOp:"math_number",inputName:"DURATION"}]}),n(s,"motorOn",{opcode:"wedo2_motorOn",argMap:[{type:"input",inputOp:"wedo2_menu_MOTOR_ID",inputName:"MOTOR_ID"}]}),n(s,"motorOff",{opcode:"wedo2_motorOff",argMap:[{type:"input",inputOp:"wedo2_menu_MOTOR_ID",inputName:"MOTOR_ID"}]}),n(s,"startMotorPower",{opcode:"wedo2_startMotorPower",argMap:[{type:"input",inputOp:"wedo2_menu_MOTOR_ID",inputName:"MOTOR_ID"},{type:"input",inputOp:"math_number",inputName:"POWER"}]}),n(s,"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"}]}),n(s,"setLED",{opcode:"wedo2_setLightHue",argMap:[{type:"input",inputOp:"math_number",inputName:"HUE"}]}),n(s,"playNote",{opcode:"wedo2_playNoteFor",argMap:[{type:"input",inputOp:"math_number",inputName:"NOTE"},{type:"input",inputOp:"math_number",inputName:"DURATION"}]}),n(s,"whenDistance",{opcode:"wedo2_whenDistance",argMap:[{type:"input",inputOp:"wedo2_menu_OP",inputName:"OP"},{type:"input",inputOp:"math_number",inputName:"REFERENCE"}]}),n(s,"whenTilted",{opcode:"wedo2_whenTilted",argMap:[{type:"input",inputOp:"wedo2_menu_TILT_DIRECTION_ANY",inputName:"TILT_DIRECTION_ANY"}]}),n(s,"getDistance",{opcode:"wedo2_getDistance",argMap:[]}),n(s,"isTilted",{opcode:"wedo2_isTilted",argMap:[{type:"input",inputOp:"wedo2_menu_TILT_DIRECTION_ANY",inputName:"TILT_DIRECTION_ANY"}]}),n(s,"getTilt",{opcode:"wedo2_getTiltAngle",argMap:[{type:"input",inputOp:"wedo2_menu_TILT_DIRECTION",inputName:"TILT_DIRECTION"}]}),A.exports=B},function(A,e){const t=new Map;t.set("text","https://extensions.turbowarp.org/lab/text.js"),t.set("audiostr","https://extensions.turbowarp.org/turboloader/audiostream.js"),A.exports=t},function(A,e,t){const i=t(19),B=t(398),n=t(11),s=t(30),r=t(404),o=t(405),g=t(116),a=t(409),c=t(41),Q=t(31),E=t(410),w=t(418),C=t(117),l=t(124),I=t(118),h=n.v3.create(),u=new g,d=new g,Y=new Uint8ClampedArray(4),M=new Uint8ClampedArray(4),F=[3,3],D=(A,e,t)=>(248&A[0])==(248&e[t+0])&&(248&A[1])==(248&e[t+1])&&(240&A[2])==(240&e[t+2]);let m;let p;class U extends i{static isSupported(A){try{A=A||document.createElement("canvas");const e={alpha:!1,stencil:!0,antialias:!1};return!!(A.getContext("webgl",e)||A.getContext("experimental-webgl",e)||A.getContext("webgl2",e))}catch(A){return!1}}static _getContext(A){const e={alpha:!1,stencil:!0,antialias:!1,powerPreference:U.powerPreference};return n.getWebGLContext(A,e)||n.getContext(A,e)}constructor(A,e,i,B,C){super();const I=this._gl=U._getContext(A);if(!I)throw new Error("Could not get WebGL context: this browser or environment may not support WebGL.");this._useGpuMode=U.UseGpuModes.Automatic,this._allDrawables=[],this._allSkins=[],this._drawList=[],this._groupOrdering=[],this._layerGroups={},this._nextDrawableId=c.ID_NONE+1,this._nextSkinId=c.ID_NONE+1,this._projection=n.m4.identity(),this._shaderManager=new Q(I),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=[],p||(p=document.createElement("style"),p.textContent=t(427),p.className="scratch-render-styles",document.head.appendChild(p)),this._createGeometry(),this.on(c.Events.NativeSizeChanged,this.onNativeSizeChanged),this.setBackgroundColor(1,1,1),this.setStageSize(e||-240,i||240,B||-180,C||180),this.resize(this._nativeSize[0],this._nativeSize[1]),I.disable(I.DEPTH_TEST),I.enable(I.BLEND),I.blendFunc(I.ONE,I.ONE_MINUS_SRC_ALPHA),this.allowPrivateSkinAccess=!0,this.maxTextureDimension=2048,this.customFonts={},this._customFontStyles=null,this.exports={twgl:n,Drawable:o,Skin:s,BitmapSkin:r,TextBubbleSkin:w,PenSkin:a,SVGSkin:E,CanvasMeasurementProvider:l,Rectangle:g}}setUseHighQualityRender(A){this.dirty=!0,this.useHighQualityRender=A,this.emit(c.Events.UseHighQualityRenderChanged,A),this._updateRenderQuality()}_updateRenderQuality(){if(null!==this._penSkinId){const A=this._allSkins[this._penSkinId];A&&(this.useHighQualityRender?A.setRenderQuality(this.canvas.width/this._nativeSize[0]):A.setRenderQuality(1))}for(const A of this._allDrawables)A&&A.setHighQuality(this.useHighQualityRender)}setPrivateSkinAccess(A){this.allowPrivateSkinAccess=A,this.emit(c.Events.AllowPrivateSkinAccessChanged,A)}setMaxTextureDimension(A){const e=this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE);this.maxTextureDimension=Math.min(A,e)}get gl(){return this._gl}get canvas(){return this._gl&&this._gl.canvas}resize(A,e){const{canvas:t}=this._gl,i=window.devicePixelRatio||1,B=A*i,n=e*i;t.width===B&&t.height===n||(t.width=B,t.height=n,this._updateRenderQuality(),this._updateOverlays(),this.dirty=!0,this.draw())}setBackgroundColor(A,e,t){this.dirty=!0,this._backgroundColor4f[0]=A,this._backgroundColor4f[1]=e,this._backgroundColor4f[2]=t,this._backgroundColor3b[0]=255*A,this._backgroundColor3b[1]=255*e,this._backgroundColor3b[2]=255*t}setDebugCanvas(A){this._debugCanvas=A}setUseGpuMode(A){this._useGpuMode=A}setStageSize(A,e,t,i){this._xLeft=A,this._xRight=e,this._yBottom=t,this._yTop=i,this._projection=n.m4.ortho(A,e,t,i,-1,1),this._setNativeSize(Math.abs(e-A),Math.abs(t-i))}getNativeSize(){return[this._nativeSize[0],this._nativeSize[1]]}_setNativeSize(A,e){this._nativeSize=[A,e],this._updateOverlays(),this.emit(c.Events.NativeSizeChanged,{newSize:this._nativeSize})}addOverlay(A){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"scale";const t=document.createElement("div");t.appendChild(A),this.overlayContainer.appendChild(t);const i={container:t,userElement:A,mode:e};return this._overlays.push(i),this._updateOverlays(),i}removeOverlay(A){const e=this._overlays.findIndex(e=>e.userElement===A);-1!==e&&(this._overlays[e].container.remove(),this._overlays.splice(e,1))}_updateOverlays(){const[A,e]=this._nativeSize,t=this.canvas.width/window.devicePixelRatio,i=this.canvas.height/window.devicePixelRatio;this.overlayContainer.style.width="".concat(t,"px"),this.overlayContainer.style.height="".concat(i,"px");for(const B of this._overlays){const n=B.container;if("scale"===B.mode||"scale-centered"===B.mode){const s=t/A,r=i/e;n.style.width="".concat(A,"px"),n.style.height="".concat(e,"px");const o="scale(".concat(s,", ").concat(r,")");if(n.style.transformOrigin="top left","scale"===B.mode)n.style.transform=o;else{const t="translate(".concat(A/2,"px, ").concat(e/2,"px)");n.style.transform="".concat(o," ").concat(t)}}else n.style.transform="",n.style.width="100%",n.style.height="100%"}}createBitmapSkin(A,e,t){const i=this._nextSkinId++,B=new r(i,this);return B.setBitmap(A,e,t),this._allSkins[i]=B,i}createSVGSkin(A,e){const t=this._nextSkinId++,i=new E(t,this);return i.setSVG(A,e),this._allSkins[t]=i,t}createPenSkin(){const A=this._nextSkinId++,e=new a(A,this);return this._allSkins[A]=e,this._penSkinId=A,this._updateRenderQuality(),A}createTextSkin(A,e,t){const i=this._nextSkinId++,B=new w(i,this);return B.setTextBubble(A,e,t),this._allSkins[i]=B,i}updateSVGSkin(A,e,t){if(this._allSkins[A]instanceof E)return void this._allSkins[A].setSVG(e,t);const i=new E(A,this);i.setSVG(e,t),this._reskin(A,i)}updateBitmapSkin(A,e,t,i){if(this._allSkins[A]instanceof r)return void this._allSkins[A].setBitmap(e,t,i);const B=new r(A,this);B.setBitmap(e,t,i),this._reskin(A,B)}_reskin(A,e){const t=this._allSkins[A];this._allSkins[A]=e;for(const A of this._allDrawables)A&&A.skin===t&&(A.skin=e);t.dispose()}updateTextSkin(A,e,t,i){if(this._allSkins[A]instanceof w)return void this._allSkins[A].setTextBubble(e,t,i);const B=new w(A,this);B.setTextBubble(e,t,i),this._reskin(A,B)}destroySkin(A){this._allSkins[A].dispose(),delete this._allSkins[A]}createDrawable(A){if(!A||!Object.prototype.hasOwnProperty.call(this._layerGroups,A))return void I.warn("Cannot create a drawable without a known layer group");const e=this._nextDrawableId++,t=new o(e,this);return this._allDrawables[e]=t,this._addToDrawList(e,A),t.setHighQuality(this.useHighQualityRender),t.skin=null,e}createTextWrapper(A){return new(m||(m=t(419)),m)(A)}markSkinAsPrivate(A){const e=this._allSkins[A];e&&(e.private=!0)}setLayerGroupOrdering(A){this._groupOrdering=A;for(let A=0;Athis._allDrawables[A]._visible)}_endIndexForKnownLayerGroup(A){const e=A.groupIndex;return e===this._groupOrdering.length-1?this._drawList.length:this._layerGroups[this._groupOrdering[e+1]].drawListOffset}destroyDrawable(A,e){if(!e||!Object.prototype.hasOwnProperty.call(this._layerGroups,e))return void I.warn("Cannot destroy drawable without known layer group.");this.dirty=!0;this._allDrawables[A].dispose(),delete this._allDrawables[A];const t=this._layerGroups[e],i=this._endIndexForKnownLayerGroup(t);let B=t.drawListOffset;for(;B=s&&n0;if(this._drawThese(this._drawList,Q.DRAW_MODE.default,this._projection,{framebufferWidth:A.canvas.width,framebufferHeight:A.canvas.height,skipPrivateSkins:e}),e){const e=A.canvas.toDataURL();this._snapshotCallbacks.forEach(A=>A(e)),this._snapshotCallbacks=[],this.dirty=!0}}getBounds(A){const e=this._allDrawables[A];if(e.needsConvexHullPoints()){const t=this._getConvexHullPointsForDrawable(A);e.setConvexHullPoints(t)}const t=e.getFastBounds();if(this._debugCanvas){const A=this._gl;this._debugCanvas.width=A.canvas.width,this._debugCanvas.height=A.canvas.height;const e=this._debugCanvas.getContext("2d");e.drawImage(A.canvas,0,0),e.strokeStyle="#FF0000";const i=window.devicePixelRatio;e.strokeRect(i*(t.left+this._nativeSize[0]/2),i*(-t.top+this._nativeSize[1]/2),i*(t.right-t.left),i*(-t.bottom+t.top))}return t}getBoundsForBubble(A){const e=this._allDrawables[A];if(e.needsConvexHullPoints()){const t=this._getConvexHullPointsForDrawable(A);e.setConvexHullPoints(t)}const t=e.getBoundsForBubble();if(this._debugCanvas){const A=this._gl;this._debugCanvas.width=A.canvas.width,this._debugCanvas.height=A.canvas.height;const e=this._debugCanvas.getContext("2d");e.drawImage(A.canvas,0,0),e.strokeStyle="#FF0000";const i=window.devicePixelRatio;e.strokeRect(i*(t.left+this._nativeSize[0]/2),i*(-t.top+this._nativeSize[1]/2),i*(t.right-t.left),i*(-t.bottom+t.top))}return t}getCurrentSkinSize(A){const e=this._allDrawables[A];return this.getSkinSize(e.skin.id)}getSkinSize(A){return this._allSkins[A].size}getSkinRotationCenter(A){return this._allSkins[A].calculateRotationCenter()}isTouchingColor(A,e,t){const i=this._candidatesTouching(A,this._visibleDrawList);let B;if(D(e,this._backgroundColor3b,0)){if(B=this._touchingBounds(A),null===B)return!1}else{if(0===i.length)return!1;B=this._candidatesBounds(i)}const n=this._getMaxPixelsForCPU(),s=this._debugCanvas&&this._debugCanvas.getContext("2d");s&&(this._debugCanvas.width=B.width,this._debugCanvas.height=B.height),B.width*B.height*(i.length+1)>=n&&this._isTouchingColorGpuStart(A,i.map(A=>{let{id:e}=A;return e}).reverse(),B,e,t);const r=this._allDrawables[A],g=h,a=Y,c=Boolean(t);r.updateCPURenderAttributes();const E=~Q.EFFECT_INFO.ghost.mask;for(let A=B.bottom;A<=B.top;A++){if(B.width*(A-B.bottom)*(i.length+1)>=n)return this._isTouchingColorGpuFin(B,e,A-B.bottom);for(let n=B.left;n<=B.right;n++)if(g[1]=A,g[0]=n,(c?(w=o.sampleColor4b(g,r,a,E),C=t,w[3]>0&&(252&w[0])==(252&C[0])&&(252&w[1])==(252&C[1])&&(252&w[2])==(252&C[2])):r.isTouching(g))&&(U.sampleColor3b(g,i,a),s&&(s.fillStyle="rgb(".concat(a[0],",").concat(a[1],",").concat(a[2],")"),s.fillRect(n-B.left,B.bottom-A,1,1)),D(a,e,0)))return!0}var w,C;return!1}_getMaxPixelsForCPU(){switch(this._useGpuMode){case U.UseGpuModes.ForceCPU:return 1/0;case U.UseGpuModes.ForceGPU:return 0;case U.UseGpuModes.Automatic:default:return 4e4}}_enterDrawBackground(){const A=this.gl,e=this._shaderManager.getShader(Q.DRAW_MODE.background,0);A.disable(A.BLEND),A.useProgram(e.program),n.setBuffersAndAttributes(A,e,this._bufferInfo)}_exitDrawBackground(){const A=this.gl;A.enable(A.BLEND)}_isTouchingColorGpuStart(A,e,t,i,B){this._doExitDrawRegion();const s=this._gl;n.bindFramebufferInfo(s,this._queryBufferInfo),s.viewport(0,0,t.width,t.height);const r=n.m4.ortho(t.left,t.right,t.top,t.bottom,-1,1);let o;s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT|s.STENCIL_BUFFER_BIT),B&&(o={u_colorMask:[B[0]/255,B[1]/255,B[2]/255],u_colorMaskTolerance:2/255});try{s.enable(s.STENCIL_TEST),s.stencilFunc(s.ALWAYS,1,1),s.stencilOp(s.KEEP,s.KEEP,s.REPLACE),s.colorMask(!1,!1,!1,!1),this._drawThese([A],B?Q.DRAW_MODE.colorMask:Q.DRAW_MODE.silhouette,r,{extraUniforms:o,ignoreVisibility:!0,effectMask:~Q.EFFECT_INFO.ghost.mask}),s.stencilFunc(s.EQUAL,1,1),s.stencilOp(s.KEEP,s.KEEP,s.KEEP),s.colorMask(!0,!0,!0,!0),this.enterDrawRegion(this._backgroundDrawRegionId);const t={u_backgroundColor:this._backgroundColor4f},i=this._shaderManager.getShader(Q.DRAW_MODE.background,0);n.setUniforms(i,t),n.drawBufferInfo(s,this._bufferInfo,s.TRIANGLES),this._drawThese(e,Q.DRAW_MODE.default,r,{idFilterFunc:e=>e!==A})}finally{s.colorMask(!0,!0,!0,!0),s.disable(s.STENCIL_TEST),this._doExitDrawRegion()}}_isTouchingColorGpuFin(A,e,t){const i=this._gl,B=new Uint8Array(Math.floor(A.width*(A.height-t)*4));if(i.readPixels(0,0,A.width,A.height-t,i.RGBA,i.UNSIGNED_BYTE,B),this._debugCanvas){this._debugCanvas.width=A.width,this._debugCanvas.height=A.height;const e=this._debugCanvas.getContext("2d"),i=e.getImageData(0,0,A.width,A.height-t);i.data.set(B),e.putImageData(i,0,0)}for(let A=0;A1&&void 0!==arguments[1]?arguments[1]:this._drawList;const t=this._candidatesTouching(A,e.filter(A=>this._allDrawables[A]._visible));if(0===t.length||!this._allDrawables[A]._visible)return!1;const i=this._candidatesBounds(t),B=this._allDrawables[A],n=h;B.updateCPURenderAttributes();for(let A=i.left;A<=i.right;A++){n[0]=A;for(let A=i.bottom;A<=i.top;A++)if(n[1]=A,B.isTouching(n))for(let A=0;A2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const B=this._gl,n=this._nativeSize[0]/B.canvas.clientWidth,s=this._nativeSize[1]/B.canvas.clientHeight;t*=n,i*=s,t=Math.max(1,Math.min(Math.round(t),F[0])),i=Math.max(1,Math.min(Math.round(i),F[1]));const r=A*n-(t-1)/2,o=e*s+(i-1)/2,a=t%2?0:-.5,c=i%2?0:-.5,Q=new g;return Q.initFromBounds(Math.floor(this._xLeft+r+a),Math.floor(this._xLeft+r+a+t-1),Math.ceil(this._yTop-o+c),Math.ceil(this._yTop-o+c+i-1)),Q}drawableTouching(A,e,t,i,B){const s=this._allDrawables[A];if(!s)return!1;const r=this.clientSpaceToScratchBounds(e,t,i,B),o=s.getFastBounds();if(o.snapToInt(),!o.intersects(r))return!1;s.updateCPURenderAttributes();const g=n.v3.create();for(g[1]=r.bottom;g[1]<=r.top;g[1]++)for(g[0]=r.left;g[0]<=r.right;g[0]++)if(s.isTouching(g))return!0;return!1}pick(A,e,t,i,B){const s=this.clientSpaceToScratchBounds(A,e,t,i);if(s.left===-1/0||s.bottom===-1/0)return!1;if(0===(B=(B||this._drawList).filter(A=>{const e=this._allDrawables[A];if(e.getVisible()&&0!==e.getUniforms().u_ghost){const A=e.getFastBounds();return!!s.intersects(A)&&(!(e.skin instanceof a)&&(e.updateCPURenderAttributes(),!0))}return!1})).length)return!1;const r=[],o=n.v3.create(0,0,0);for(o[1]=s.bottom;o[1]<=s.top;o[1]++)for(o[0]=s.left;o[0]<=s.right;o[0]++)for(let A=B.length-1;A>=0;A--){const e=B[A];if(this._allDrawables[e].isTouching(o)){r[e]=(r[e]||0)+1;break}}r[c.ID_NONE]=0;let g=c.ID_NONE;for(const A in r)Object.prototype.hasOwnProperty.call(r,A)&&r[A]>r[g]&&(g=A);return Number(g)}extractDrawableScreenSpace(A){const e=this._allDrawables[A];if(!e)throw new Error("Could not extract drawable with ID ".concat(A,"; it does not exist"));this._doExitDrawRegion();const t=.5*this._nativeSize[0],i=.5*this._nativeSize[1],B=e.getFastBounds(),s=this.canvas,r=s.width/this._nativeSize[0],o=new g;o.initFromBounds((B.left+t)*r,(B.right+t)*r,(i-B.top)*r,(i-B.bottom)*r),o.snapToInt(),B.initFromBounds(o.left/r-t,o.right/r-t,i-o.top/r,i-o.bottom/r);const a=this._gl,c=a.getParameter(a.MAX_TEXTURE_SIZE),E=Math.min(2048,o.width,c),w=Math.min(2048,o.height,c),C=n.createFramebufferInfo(a,[{format:a.RGBA}],E,w);try{n.bindFramebufferInfo(a,C),a.viewport(0,0,E,w);const e=n.m4.ortho(B.left,B.right,B.top,B.bottom,-1,1);a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT),this._drawThese([A],Q.DRAW_MODE.straightAlpha,e,{effectMask:~Q.EFFECT_INFO.ghost.mask,framebufferWidth:s.width,framebufferHeight:s.height});const t=new Uint8Array(Math.floor(E*w*4));a.readPixels(0,0,E,w,a.RGBA,a.UNSIGNED_BYTE,t);const i=new ImageData(new Uint8ClampedArray(t.buffer),E,w),r=s.getBoundingClientRect().width/s.width;return{imageData:i,x:o.left*r,y:o.bottom*r,width:o.width*r,height:o.height*r}}finally{a.deleteFramebuffer(C.framebuffer)}}extractColor(A,e,t){this._doExitDrawRegion();const i=Math.round(this._nativeSize[0]*(A/this._gl.canvas.clientWidth-.5)),B=Math.round(-this._nativeSize[1]*(e/this._gl.canvas.clientHeight-.5)),s=this._gl;n.bindFramebufferInfo(s,this._queryBufferInfo);const r=new g;r.initFromBounds(i-t,i+t,B-t,B+t);const o=i-r.left,a=r.top-B;s.viewport(0,0,r.width,r.height);const c=n.m4.ortho(r.left,r.right,r.top,r.bottom,-1,1);s.clearColor(...this._backgroundColor4f),s.clear(s.COLOR_BUFFER_BIT),this._drawThese(this._drawList,Q.DRAW_MODE.default,c);const E=new Uint8Array(Math.floor(r.width*r.height*4));s.readPixels(0,0,r.width,r.height,s.RGBA,s.UNSIGNED_BYTE,E);const w=Math.floor(4*(a*r.width+o)),C={r:E[w],g:E[w+1],b:E[w+2],a:E[w+3]};if(this._debugCanvas){this._debugCanvas.width=r.width,this._debugCanvas.height=r.height;const A=this._debugCanvas.getContext("2d"),e=A.createImageData(r.width,r.height);e.data.set(E),A.putImageData(e,0,0),A.strokeStyle="black",A.fillStyle="rgba(".concat(C.r,", ").concat(C.g,", ").concat(C.b,", ").concat(C.a,")"),A.rect(o-4,a-4,8,8),A.fill(),A.stroke()}return{data:E,width:r.width,height:r.height,color:C}}_touchingBounds(A){const e=this._allDrawables[A];if(!e.skin||!e.skin.getTexture([100,100]))return null;const t=e.getFastBounds();return this.offscreenTouching||t.clamp(this._xLeft,this._xRight,this._yBottom,this._yTop),t.snapToInt(),0===t.width||0===t.height?null:t}_unsnappedTouchingBounds(A){const e=this._allDrawables[A];if(!e.skin||!e.skin.getTexture([100,100]))return null;const t=e.getFastBounds();return this.offscreenTouching||t.clamp(this._xLeft,this._xRight,this._yBottom,this._yTop),0===t.width||0===t.height?null:t}_candidatesTouching(A,e){const t=this._touchingBounds(A),i=[];if(null===t)return i;for(let B=e.length-1;B>=0;B--){const n=e[B];if(n!==A){const A=this._allDrawables[n];if(A.skin instanceof w)continue;if(A.skin&&A._visible){if(!this.allowPrivateSkinAccess&&A.skin.private)continue;A.updateCPURenderAttributes();const e=A.getFastBounds();e.snapToInt(),t.intersects(e)&&i.push({id:n,drawable:A,intersection:g.intersect(t,e)})}}}return i}_candidatesBounds(A){return A.reduce((A,e)=>{let{intersection:t}=e;return A?g.union(A,t,u):t},null)}updateDrawableSkinId(A,e){const t=this._allDrawables[A];t&&(t.skin=this._allSkins[e])}updateDrawablePosition(A,e){const t=this._allDrawables[A];t&&t.updatePosition(e)}updateDrawableDirection(A,e){const t=this._allDrawables[A];t&&t.updateDirection(e)}updateDrawableScale(A,e){const t=this._allDrawables[A];t&&t.updateScale(e)}updateDrawableDirectionScale(A,e,t){const i=this._allDrawables[A];i&&(i.updateDirection(e),i.updateScale(t))}updateDrawableVisible(A,e){const t=this._allDrawables[A];t&&t.updateVisible(e)}updateDrawableEffect(A,e,t){const i=this._allDrawables[A];i&&i.updateEffect(e,t)}updateDrawableProperties(A,e){const t=this._allDrawables[A];t&&("skinId"in e&&this.updateDrawableSkinId(A,e.skinId),t.updateProperties(e))}getFencedPositionOfDrawable(A,e){let t=e[0],i=e[1];const B=this._allDrawables[A];if(!B)return[t,i];const n=t-B._position[0],s=i-B._position[1],r=B._skin.getFenceBounds(B,d),o=Math.floor(Math.min(r.width,r.height)/2),g=this._xRight-Math.min(15,o);r.right+n<-g?t=Math.ceil(B._position[0]-(g+r.right)):r.left+n>g&&(t=Math.floor(B._position[0]+(g-r.left)));const a=this._yTop-Math.min(15,o);return r.top+s<-a?i=Math.ceil(B._position[1]-(a+r.top)):r.bottom+s>a&&(i=Math.floor(B._position[1]+(a-r.bottom))),[t,i]}penClear(A){this.dirty=!0;this._allSkins[A].clear()}penPoint(A,e,t,i){this.dirty=!0;this._allSkins[A].drawPoint(e,t,i)}penLine(A,e,t,i,B,n){this.dirty=!0;this._allSkins[A].drawLine(e,t,i,B,n)}penStamp(A,e){this.dirty=!0;if(!this._allDrawables[e])return;const t=this._unsnappedTouchingBounds(e);if(!t)return;this._doExitDrawRegion();const i=this._allSkins[A],B=this._gl;n.bindFramebufferInfo(B,i._framebuffer);const s=i.renderQuality;t.left*=s,t.right*=s,t.top*=s,t.bottom*=s,t.snapToInt(),B.viewport(.5*this._nativeSize[0]*s+t.left,.5*this._nativeSize[1]*s-t.top,t.width,t.height);const r=n.m4.ortho(t.left/s,t.right/s,t.top/s,t.bottom/s,-1,1);this._drawThese([e],Q.DRAW_MODE.default,r,{ignoreVisibility:!0,framebufferWidth:this._nativeSize[0]*s,framebufferHeight:this._nativeSize[1]*s}),i._silhouetteDirty=!0}_createGeometry(){this._bufferInfo=n.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(A){this.dirty=!0;const[e,t]=A.newSize,i=this._gl,B=[{format:i.RGBA},{format:i.DEPTH_STENCIL}];this._pickBufferInfo||(this._pickBufferInfo=n.createFramebufferInfo(i,B,F[0],F[1])),this._queryBufferInfo?n.resizeFramebufferInfo(i,this._queryBufferInfo,B,e,t):this._queryBufferInfo=n.createFramebufferInfo(i,B,e,t)}enterDrawRegion(A){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A.enter,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A.exit;this._regionId!==A&&(this._doExitDrawRegion(),this._regionId=A,e(),this._exitRegion=t)}_doExitDrawRegion(){null!==this._exitRegion&&this._exitRegion(),this._exitRegion=null,this._regionId=null}_drawThese(A,e,t){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const B=this._gl;let s=null;const r="framebufferWidth"in i&&"framebufferHeight"in i&&i.framebufferWidth!==this._nativeSize[0]&&i.framebufferHeight!==this._nativeSize[1],o=A.length;for(let g=0;g=t)){for(;g>0&&!(s(r[g],r[g-1],E)>0);)--g;for(r[++g]=E,B=t-1;B>=0;B--)if(c[0]=B/t,C.transformPoint(e,c,Q),e.skin.isTouchingLinear(Q)){E=[B,A];break}for(;a>0&&!(s(o[a],o[a-1],E)<0);)--a;o[++a]=E}}const w=r;w.length=g+1;for(let A=a;A>=0;--A)w.push(o[A]);return B(w,1/0)}static sampleColor3b(A,e,t){(t=t||new Uint8ClampedArray(3)).fill(0);let i=1;for(let B=0;0!==i&&Bs&&B>r&&!g([A[0],e[a]],t)&&!g([A[1],e[a]],t)&&(s=i,r=B,n=e[a]);return n}var Q=Math.cos(90/(180/Math.PI)),E=.6;A.exports=function(A,e,t){var i,o,g,Q,w,C,l,I=e||20;return A.length<4?A.slice():(w=[(Q=function(A){for(var e=1/0,t=1/0,i=-1/0,B=-1/0,n=A.length-1;n>=0;n--)A[n][0]i&&(i=A[n][0]),A[n][1]>B&&(B=A[n][1]);return[i-e,B-t]}(l=function(A){return A.filter((function(A,e,t){var i=t[e-1];return 0===e||!(i[0]===A[0]&&i[1]===A[1])}))}(function(A){return A.sort((function(A,e){return A[0]==e[0]?A[1]-e[1]:A[0]-e[0]}))}(n.toXy(A,t)))))[0]*E,Q[1]*E],i=s(l),g=l.filter((function(A){return i.indexOf(A)<0})),C=Math.ceil(1/(l.length/(Q[0]*Q[1]))),o=function A(e,t,i,B,n){for(var s,o,g,Q,E,w,C,l=!1,I=0;Iw||i[1]>C));w>=i[0]&&C>=i[1]&&(n[o]=!0),null!==Q&&(e.splice(I+1,0,Q),B.removePoint(Q),l=!0)}return l?A(e,t,i,B,n):e}(i,Math.pow(I,2),w,B(g,C),{}),n.fromXy(o,t))}},function(A,e){function t(A,e,t,i,B,n){var s=(n-e)*(t-A)-(i-e)*(B-A);return s>0||!(s<0)}A.exports=function(A,e){var i=A[0][0],B=A[0][1],n=A[1][0],s=A[1][1],r=e[0][0],o=e[0][1],g=e[1][0],a=e[1][1];return t(i,B,r,o,g,a)!==t(n,s,r,o,g,a)&&t(i,B,n,s,r,o)!==t(i,B,n,s,g,a)}},function(A,e){function t(A,e){this._cells=[],this._cellSize=e,A.forEach((function(A){var e=this.point2CellXY(A),t=e[0],i=e[1];void 0===this._cells[t]&&(this._cells[t]=[]),void 0===this._cells[t][i]&&(this._cells[t][i]=[]),this._cells[t][i].push(A)}),this)}t.prototype={cellPoints:function(A,e){return void 0!==this._cells[A]&&void 0!==this._cells[A][e]?this._cells[A][e]:[]},rangePoints:function(A){for(var e=this.point2CellXY([A[0],A[1]]),t=this.point2CellXY([A[2],A[3]]),i=[],B=e[0];B<=t[0];B++)for(var n=e[1];n<=t[1];n++)i=i.concat(this.cellPoints(B,n));return i},removePoint:function(A){for(var e,t=this.point2CellXY(A),i=this._cells[t[0]][t[1]],B=0;B=2&&t(e[e.length-2],e[e.length-1],A[i])<=0;)e.pop();e.push(A[i])}return e.pop(),e}(A);return(e=function(A){for(var e=A.reverse(),i=[],B=0;B=2&&t(i[i.length-2],i[i.length-1],e[B])<=0;)i.pop();i.push(e[B])}return i.pop(),i}(A).concat(i)).push(A[0]),e}},function(A,e){let t;const i=(A,e)=>e^(A^e)&A-e>>31,B=(A,e)=>A^(A^e)&A-e>>31,n=(A,e,t)=>{let{_width:i,_height:B,_colorData:n}=A;return e>=i||t>=B||e<0||t<0?0:n[4*(t*i+e)+3]},s=[new Uint8ClampedArray(4),new Uint8ClampedArray(4),new Uint8ClampedArray(4),new Uint8ClampedArray(4)],r=(A,e,t,n)=>{let{_width:s,_height:r,_colorData:o}=A;if(e=B(0,i(e,s-1)),t=B(0,i(t,r-1)),e>=s||t>=r||e<0||t<0)return n.fill(0);const g=4*(t*s+e),a=o[g+3]/255;return n[0]=o[g]*a,n[1]=o[g+1]*a,n[2]=o[g+2]*a,n[3]=o[g+3],n},o=(A,e,t,n)=>{let{_width:s,_height:r,_colorData:o}=A;e=B(0,i(e,s-1));const g=4*((t=B(0,i(t,r-1)))*s+e);return n[0]=o[g],n[1]=o[g+1],n[2]=o[g+2],n[3]=o[g+3],n};class g{constructor(){this._width=0,this._height=0,this._lazyData=null,this._colorData=null,this._getColor=r,this.colorAtNearest=this.colorAtLinear=(A,e)=>e.fill(0)}update(A){let e,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(A instanceof ImageData)e=A,this._width=A.width,this._height=A.height,this._lazyData=null,this._colorData=e.data;else{if(this._width=A.width,this._height=A.height,!this._width||!this._height)return;this._lazyData=A,this._colorData=null}this._getColor=t?o:r,delete this.colorAtNearest,delete this.colorAtLinear}unlazy(){if(!this._lazyData)return;const A=this._lazyData.width,e=this._lazyData.height;if(A&&e){const t=g._updateCanvas();t.width=A,t.height=e;const i=t.getContext("2d");i.clearRect(0,0,A,e),i.drawImage(this._lazyData,0,0,A,e);const B=i.getImageData(0,0,A,e);this._colorData=B.data}this._lazyData=null}colorAtNearest(A,e){return this._getColor(this,Math.floor(A[0]*(this._width-1)),Math.floor(A[1]*(this._height-1)),e)}colorAtLinear(A,e){const t=A[0]*(this._width-1),i=A[1]*(this._height-1),B=t%1,n=i%1,r=1-B,o=1-n,g=Math.floor(t),a=Math.floor(i),c=this._getColor(this,g,a,s[0]),Q=this._getColor(this,g+1,a,s[1]),E=this._getColor(this,g,a+1,s[2]),w=this._getColor(this,g+1,a+1,s[3]);return e[0]=c[0]*r*o+E[0]*r*n+Q[0]*B*o+w[0]*B*n,e[1]=c[1]*r*o+E[1]*r*n+Q[1]*B*o+w[1]*B*n,e[2]=c[2]*r*o+E[2]*r*n+Q[2]*B*o+w[2]*B*n,e[3]=c[3]*r*o+E[3]*r*n+Q[3]*B*o+w[3]*B*n,e}isTouchingNearest(A){if(this._colorData)return n(this,Math.floor(A[0]*(this._width-1)),Math.floor(A[1]*(this._height-1)))>0}isTouchingLinear(A){if(!this._colorData)return;const e=Math.floor(A[0]*(this._width-1)),t=Math.floor(A[1]*(this._height-1));return n(this,e,t)>0||n(this,e+1,t)>0||n(this,e,t+1)>0||n(this,e+1,t+1)>0}static _updateCanvas(){return void 0===t&&(t=document.createElement("canvas")),t}}A.exports=g},function(A,e,t){const i=t(11),B=t(30);class n extends B{constructor(A,e){super(A,e),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(A){return this._texture||super.getTexture()}setBitmap(A,e,t){if(!A.width||!A.height)return void super.setEmptyImageData();const B=this._renderer.gl;let s=A;if(A instanceof HTMLCanvasElement&&!1!==A.reusable){s=A.getContext("2d").getImageData(0,0,A.width,A.height)}if(null===this._texture){const A={auto:!1,wrap:B.CLAMP_TO_EDGE};this._texture=i.createTexture(B,A)}this._setTexture(s),this._costumeResolution=e||2,this._textureSize=n._getBitmapSize(A),void 0===t&&(t=this.calculateRotationCenter()),this._rotationCenter[0]=t[0],this._rotationCenter[1]=t[1],this.emitWasAltered()}static _getBitmapSize(A){return A instanceof HTMLImageElement?[A.naturalWidth||A.width,A.naturalHeight||A.height]:A instanceof HTMLVideoElement?[A.videoWidth||A.width,A.videoHeight||A.height]:[A.width,A.height]}}A.exports=n},function(A,e,t){const i=t(11),B=t(116),n=t(41),s=t(31),r=t(117),o=t(118),g=i.v3.create(),a=(A,e)=>{const t=g,i=e[0],B=e[1],n=A._inverseMatrix,s=i*n[3]+B*n[7]+n[15];return t[0]=.5-(i*n[0]+B*n[4]+n[12])/s,t[1]=(i*n[1]+B*n[5]+n[13])/s+.5,Math.abs(t[0])<1e-6&&(t[0]=0),Math.abs(t[1])<1e-6&&(t[1]=0),0!==A.enabledEffects&&t[0]>=0&&t[0]<1&&t[1]>=0&&t[1]<1&&r.transformPoint(A,t,t),t};class c{constructor(A,e){this._id=A,this._renderer=e,this._uniforms={u_modelMatrix:i.m4.identity(),u_silhouetteColor:c.color4fFromID(this._id)};const t=s.EFFECTS.length;for(let A=0;AA[1])),i=e.filter(A=>A[1]>t-8);return(A=A||new B).initFromPointsAABB(i),A}getAABB(A){this._transformDirty&&this._calculateTransform();const e=this._uniforms.u_modelMatrix;return(A=A||new B).initFromModelMatrix(e),A}getFastBounds(A){return this.needsConvexHullPoints()?this.getAABB(A):this.getBounds(A)}_getTransformedHullPoints(){if(!this._transformedHullDirty)return this._transformedHullPoints;const A=i.m4.ortho(-1,1,-1,1,-1,1),e=this.skin.size,t=1/e[0]/2,B=1/e[1]/2,n=i.m4.multiply(this._uniforms.u_modelMatrix,A);for(let A=0;A>0&255)/255,(A>>8&255)/255,(A>>16&255)/255,1]}static color3bToID(A,e,t){let i;return i=(255&A)<<0,i|=(255&e)<<8,i|=(255&t)<<16,i+n.ID_NONE}static sampleColor4b(A,e,t,i){const B=a(e,A);if(B[0]<0||B[1]<0||B[0]>1||B[1]>1)return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t;const n=e.skin._silhouette.colorAtNearest(B,t);return 0===e.enabledEffects?n:r.transformColor(e,n,i)}}A.exports=c},function(A,e){A.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(A,e){A.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 GG. 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(A,e){A.exports={rgbToHsv:(A,e)=>{let[t,i,B]=A,n=0;t/=255,i/=255,B/=255;let s=0;i{let[t,i,B]=A;if(0===i)return e[0]=e[1]=e[2]=255*B+.5,e;t%=1;const n=6*t|0,s=6*t-n,r=B*(1-i),o=B*(1-i*s),g=B*(1-i*(1-s));let a=0,c=0,Q=0;switch(n){case 0:a=B,c=g,Q=r;break;case 1:a=o,c=B,Q=r;break;case 2:a=r,c=B,Q=g;break;case 3:a=r,c=o,Q=B;break;case 4:a=g,c=r,Q=B;break;case 5:a=B,c=r,Q=o}return e[0]=255*a+.5,e[1]=255*c+.5,e[2]=255*Q+.5,e}}},function(A,e,t){const i=t(11),B=t(41),n=t(30),s=t(31),r={color4f:[0,0,1,1],diameter:1},o=[0,0,0,0];A.exports=class extends n{constructor(A,e){super(A,e),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=e.getNativeSize(),this._resetAttributeIndexes(),this.a_lineColor=new Float32Array(65520),this.a_lineThicknessAndLength=new Float32Array(32760),this.a_penPoints=new Float32Array(65520),this.a_position=new Float32Array(32760);for(let A=0;Athis._enterDrawTexture(),exit:()=>this._exitDrawTexture()},this.onNativeSizeChanged=this.onNativeSizeChanged.bind(this),this._renderer.on(B.Events.NativeSizeChanged,this.onNativeSizeChanged),this._setCanvasSize(e.getNativeSize())}dispose(){this._renderer.removeListener(B.Events.NativeSizeChanged,this.onNativeSizeChanged),this._renderer.gl.deleteTexture(this._texture),this._texture=null,super.dispose()}get size(){return this._nativeSize}useNearest(A){return Math.max(A[0],A[1])>=100}getTexture(A){return this._texture}clear(){this._renderer.enterDrawRegion(this._usePenBufferDrawRegionId);const A=this._renderer.gl;A.clearColor(0,0,0,0),A.clear(A.COLOR_BUFFER_BIT),this._silhouetteDirty=!0}drawPoint(A,e,t){this.drawLine(A,e,t,e,t)}drawLine(A,e,t,i,B){const n=A.diameter||r.diameter,s=1===n||3===n?.5:0;this._drawLineOnBuffer(A,e+s,t+s,i+s,B+s),this._silhouetteDirty=!0}_enterDrawLineOnBuffer(){this._resetAttributeIndexes();const A=this._renderer.gl;i.bindFramebufferInfo(A,this._framebuffer),A.viewport(0,0,this._size[0],this._size[1]);const e=this._lineShader;A.useProgram(e.program),i.setBuffersAndAttributes(A,e,this._lineBufferInfo);const t={u_skin:this._texture,u_stageSize:this._size};i.setUniforms(e,t)}_exitDrawLineOnBuffer(){this.a_lineColorIndex&&this._flushLines();const A=this._renderer.gl;i.bindFramebufferInfo(A,null)}_enterUsePenBuffer(){i.bindFramebufferInfo(this._renderer.gl,this._framebuffer)}_exitUsePenBuffer(){i.bindFramebufferInfo(this._renderer.gl,null)}_enterDrawTexture(){this._enterUsePenBuffer();const A=this._renderer.gl;A.viewport(0,0,this._size[0],this._size[1]),A.useProgram(this._drawTextureShader.program),i.setBuffersAndAttributes(A,this._drawTextureShader,this._renderer._bufferInfo)}_exitDrawTexture(){this._exitUsePenBuffer()}_drawPenTexture(A){this._renderer.enterDrawRegion(this._drawTextureRegionId);const e=this._renderer.gl,t=this._size[0],B=this._size[1],n={u_skin:A,u_projectionMatrix:i.m4.ortho(t/2,t/-2,B/-2,B/2,-1,1,i.m4.identity()),u_modelMatrix:i.m4.scaling(i.v3.create(t,B,0),i.m4.identity())};i.setTextureParameters(e,A,{minMag:e.NEAREST}),i.setUniforms(this._drawTextureShader,n),i.drawBufferInfo(e,this._renderer._bufferInfo,e.TRIANGLES)}_drawLineOnBuffer(A,e,t,i,B){this._renderer.enterDrawRegion(this._lineOnBufferDrawRegionId),this.a_lineColorIndex+24>65520&&this._flushLines();const n=A.color4f||r.color4f;o[0]=n[0]*n[3],o[1]=n[1]*n[3],o[2]=n[2]*n[3],o[3]=n[3],e*=this.renderQuality,t*=this.renderQuality;const s=(i*=this.renderQuality)-e,g=(B*=this.renderQuality)-t,a=Math.sqrt(s*s+g*g),c=(A.diameter||r.diameter)*this.renderQuality;for(let A=0;A<6;A++)this.a_lineColor[this.a_lineColorIndex]=o[0],this.a_lineColorIndex++,this.a_lineColor[this.a_lineColorIndex]=o[1],this.a_lineColorIndex++,this.a_lineColor[this.a_lineColorIndex]=o[2],this.a_lineColorIndex++,this.a_lineColor[this.a_lineColorIndex]=o[3],this.a_lineColorIndex++,this.a_lineThicknessAndLength[this.a_lineThicknessAndLengthIndex]=c,this.a_lineThicknessAndLengthIndex++,this.a_lineThicknessAndLength[this.a_lineThicknessAndLengthIndex]=a,this.a_lineThicknessAndLengthIndex++,this.a_penPoints[this.a_penPointsIndex]=e,this.a_penPointsIndex++,this.a_penPoints[this.a_penPointsIndex]=-t,this.a_penPointsIndex++,this.a_penPoints[this.a_penPointsIndex]=s,this.a_penPointsIndex++,this.a_penPoints[this.a_penPointsIndex]=-g,this.a_penPointsIndex++}_resetAttributeIndexes(){this.a_lineColorIndex=0,this.a_lineThicknessAndLengthIndex=0,this.a_penPointsIndex=0}_flushLines(){const A=this._renderer.gl,e=this._lineShader;this.a_lineColorIndex<1e3?(i.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_lineColor,new Float32Array(this.a_lineColor.buffer,0,this.a_lineColorIndex),0),i.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_penPoints,new Float32Array(this.a_penPoints.buffer,0,this.a_penPointsIndex),0),i.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_lineThicknessAndLength,new Float32Array(this.a_lineThicknessAndLength.buffer,0,this.a_lineThicknessAndLengthIndex),0)):(i.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_lineColor,this.a_lineColor),i.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_penPoints,this.a_penPoints),i.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_lineThicknessAndLength,this.a_lineThicknessAndLength)),i.setBuffersAndAttributes(A,e,this._lineBufferInfo),i.drawBufferInfo(A,this._lineBufferInfo,A.TRIANGLES,this.a_lineThicknessAndLengthIndex/2),this._resetAttributeIndexes(),this._silhouetteDirty=!0}onNativeSizeChanged(A){this._nativeSize=A.newSize,this._setCanvasSize([A.newSize[0]*this.renderQuality,A.newSize[1]*this.renderQuality]),this.emitWasAltered()}_setCanvasSize(A){const[e,t]=A;if(this._size&&this._size[0]===e&&this._size[1]===t)return;this._size=A,this._rotationCenter[0]=this._nativeSize[0]/2,this._rotationCenter[1]=this._nativeSize[1]/2;const B=this._renderer.gl,n=this._texture;this._texture=i.createTexture(B,{mag:B.NEAREST,min:B.NEAREST,wrap:B.CLAMP_TO_EDGE,width:e,height:t});const s=[{format:B.RGBA,attachment:this._texture}];this._framebuffer,this._framebuffer=i.createFramebufferInfo(B,s,e,t),B.clearColor(0,0,0,0),B.clear(B.COLOR_BUFFER_BIT),n&&this._drawPenTexture(n),this._silhouettePixels=new Uint8Array(Math.floor(e*t*4)),this._silhouetteImageData=new ImageData(e,t),this._silhouetteDirty=!0}setRenderQuality(A){this.renderQuality!==A&&(this.renderQuality=A,this._setCanvasSize([Math.round(this._nativeSize[0]*A),Math.round(this._nativeSize[1]*A)]))}updateSilhouette(){if(this._silhouetteDirty){this._renderer.enterDrawRegion(this._usePenBufferDrawRegionId);const A=this._renderer.gl;A.readPixels(0,0,this._size[0],this._size[1],A.RGBA,A.UNSIGNED_BYTE,this._silhouettePixels),this._silhouetteImageData.data.set(this._silhouettePixels),this._silhouette.update(this._silhouetteImageData,!0),this._silhouetteDirty=!1}}}},function(A,e,t){const i=t(11),B=t(30),{loadSvgString:n,serializeSvgToString:s}=t(411),r=t(31);A.exports=class extends B{constructor(A,e){super(A,e),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(A,e){return 0==(e.enabledEffects&(r.EFFECT_INFO.fisheye.mask|r.EFFECT_INFO.whirl.mask|r.EFFECT_INFO.pixelate.mask|r.EFFECT_INFO.mosaic.mask))&&(e._direction%90==0&&(Math.abs(A[0])>99&&Math.abs(A[0])<101&&Math.abs(A[1])>99&&Math.abs(A[1])<101))}createMIP(A){const e=this._largestMIPScale0&&void 0!==arguments[0]?arguments[0]:[100,100];this.getTexture(A),this._silhouette.unlazy()}getTexture(A){const e=A?Math.max(Math.abs(A[0]),Math.abs(A[1])):100,t=Math.min(e/100,this._maxTextureScale),i=Math.max(Math.ceil(Math.log2(t))+8,0),B=Math.pow(2,i-8);return this._svgImageLoaded&&!this._scaledMIPs[i]&&(this._scaledMIPs[i]=this.createMIP(B)),this._scaledMIPs[i]||super.getTexture()}resetMIPs(){this._scaledMIPs.forEach(A=>this._renderer.gl.deleteTexture(A)),this._scaledMIPs.length=0,this._largestMIPScale=0}setSVG(A,e){const t=n(A),i=s(t,this._renderer.customFonts);this._svgImageLoaded=!1;const{x:B,y:r,width:o,height:g}=t.viewBox.baseVal;this._size[0]=o,this._size[1]=g,this._svgImage.onload=()=>{if(0===o||0===g)return void super.setEmptyImageData();const A=Math.ceil(Math.max(o,g)),t=this._renderer.maxTextureDimension;let i=2;for(;A*i<=t;i*=2)this._maxTextureScale=i;this.resetMIPs(),void 0===e&&(e=this.calculateRotationCenter()),this._rotationCenter[0]=e[0]-B,this._rotationCenter[1]=e[1]-r,this._svgImageLoaded=!0,this.emitWasAltered()},this._svgImage.src="data:image/svg+xml;utf8,".concat(encodeURIComponent(i))}}},function(A,e,t){const i=t(412),B=t(415),n=t(123),s=t(119),r=t(417),o=t(122),g=t(59),a=t(120);A.exports={BitmapAdapter:B,convertFonts:a,inlineSvgFonts:n,loadSvgString:s,sanitizeSvg:r,serializeSvgToString:o,SvgElement:g,SVGRenderer:i}},function(A,e,t){const i=t(119),B=t(122);A.exports=class{constructor(A){this._canvas=A||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(A,e){this._cachedImage=null;const t=i(A,e);this._svgTag=t,this._measurements={width:t.viewBox.baseVal.width,height:t.viewBox.baseVal.height,x:t.viewBox.baseVal.x,y:t.viewBox.baseVal.y}}loadSVG(A,e,t){this.loadString(A,e),this._createSVGImage(t)}_createSVGImage(A){null===this._cachedImage&&(this._cachedImage=new Image);const e=this._cachedImage;e.onload=()=>{this.loaded=!0,A&&A()};const t=this.toString(!0);e.src="data:image/svg+xml;utf8,".concat(encodeURIComponent(t)),this.loaded=!1}toString(A){return B(this._svgTag,A)}draw(A){if(!this.loaded)throw new Error("SVG image has not finished loading");this._drawFromImage(A)}_drawFromImage(A){if(null===this._cachedImage)return;const e=Number.isFinite(A)?A:1,t=this._measurements;this._canvas.width=t.width*e,this._canvas.height=t.height*e,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(e,0,0,e,0,0),this._context.drawImage(this._cachedImage,0,0))}}},function(A,e,t){const i=t(95),B=t(59),n=t(414),s=function(A){let e=i.identity();const t=A.attributes&&A.attributes.transform&&A.attributes.transform.value;if(!t)return e;const B=t.split(/\)\s*/g);for(const A of B){if(!A)break;const t=A.split(/\(\s*/),B=t[0].trim(),s=t[1].split(/[\s,]+/g);for(let A=0;AA.x*e.x+A.y*e.y,e=(A,e)=>({x:A*e.x,y:A*e.y}),t=(A,e)=>({x:A.x+e.x,y:A.y+e.y}),B=(A,e)=>({x:A.x-e.x,y:A.y-e.y});let s=Math.abs(I.x-h.x)<1e-8?t(I,{x:1,y:(I.x-h.x)/(h.y-I.y)}):t(I,{x:(h.y-I.y)/(I.x-h.x),y:1});s=i.applyToPoint(n,s),I=i.applyToPoint(n,I),h=i.applyToPoint(n,h);const r=B(s,I),o=B(h,I),g=Math.abs(r.x)<1e-8?{x:1,y:-r.x/r.y}:{x:-r.y/r.x,y:1},a=e(A(o,g)/A(g,g),g);h={x:I.x+a.x,y:I.y+a.y}}return Q?(E.setAttribute("cx",Number(I.x.toFixed(4))),E.setAttribute("cy",Number(I.y.toFixed(4))),E.setAttribute("r",Number(u.toFixed(4))),d&&(E.setAttribute("fx",Number(d.x.toFixed(4))),E.setAttribute("fy",Number(d.y.toFixed(4))))):(E.setAttribute("x1",Number(I.x.toFixed(4))),E.setAttribute("y1",Number(I.y.toFixed(4))),E.setAttribute("x2",Number(h.x.toFixed(4))),E.setAttribute("y2",Number(h.y.toFixed(4)))),E.setAttribute("gradientUnits","userSpaceOnUse"),g.appendChild(E),"url(#".concat(C,")")},E=(A,e)=>{const t=A&&A.match(/\((?:["'#]*)([^"')]+)/),i=t&&t[1];return i&&e?i.replace("".concat(e.location.href.split("#")[0],"#"),""):i};A.exports=function(A,e,t){const n=i.identity(),w=(n,C,l,I,h)=>{if(function(A){return A.tagName&&a.includes(A.tagName.toLowerCase())}(n)){n.attributes["stroke-width"]&&(l=n.attributes["stroke-width"].value),n.attributes&&(n.attributes.fill&&(I=n.attributes.fill.value),n.attributes.stroke&&(h=n.attributes.stroke.value));for(let A=0;A0&&E.y<0||E.x<0&&E.y>0)&&(g^=1),Q+="A ".concat(C(Math.abs(c.radiusX))," ")+"".concat(C(Math.abs(c.radiusY))," ")+"".concat(C(c.rotation)," ").concat(s," ")+"".concat(g," ").concat(l(a))):Q+="L ".concat(l(a))}break;case"z":Q+="Z ",a=c}n=h}return Q}(n.attributes.d.value,C)),n.removeAttribute("transform");const w=r(C);n.setAttribute("stroke-width",c(w.x,w.y)*l),I&&n.setAttribute("fill",I),h&&n.setAttribute("stroke",h)}else(function(A){return A.tagName&&g.includes(A.tagName.toLowerCase())})(n)&&(l&&!n.attributes["stroke-width"]&&n.setAttribute("stroke-width",l),I&&!n.attributes.fill&&n.setAttribute("fill",I),h&&!n.attributes.stroke&&n.setAttribute("stroke",h),C=i.compose(C,s(n)),i.toString(C)===i.toString(i.identity())?n.removeAttribute("transform"):n.setAttribute("transform",i.toString(C)))};w(A,n,1)}},function(A,e,t){const i=t(25);i.enable(),A.exports=i("scratch-svg-render")},function(A,e,t){const i=t(416);A.exports=class{constructor(A,e){this._makeImage=A||(()=>new Image),this._makeCanvas=e||(()=>document.createElement("canvas")),this.stageWidth=480,this.stageHeight=360}setStageSize(A,e){this.stageWidth=A,this.stageHeight=e}resize(A,e,t){const i=this._makeCanvas();i.width=e,i.height=A.height;let B=i.getContext("2d");B.imageSmoothingEnabled=!1,B.drawImage(A,0,0,i.width,i.height);const n=this._makeCanvas();return n.width=e,n.height=t,B=n.getContext("2d"),B.imageSmoothingEnabled=!1,B.drawImage(i,0,0,n.width,n.height),n}convertResolution1Bitmap(A,e){const t=this._makeImage();t.src=A,t.onload=()=>{e(null,this.resize(t,2*t.width,2*t.height).toDataURL())},t.onerror=()=>{e("Image load failed")}}getResizedWidthHeight(A,e){const t=this.stageWidth,i=this.stageHeight;if(A<=t&&e<=i)return{width:2*A,height:2*e};if(A<=2*t&&e<=2*i)return{width:A,height:e};const B=A/e;return B>=t/i?{width:2*t,height:2*t/B}:{width:2*i*B,height:2*i}}importBitmap(A,e){let t=A;return A instanceof ArrayBuffer&&(t=this.convertBinaryToDataURI(A,e)),new Promise((A,e)=>{const i=this._makeImage();i.src=t,i.onload=()=>{const e=this.getResizedWidthHeight(i.width,i.height);if(e.width===i.width&&e.height===i.height)A(this.convertDataURIToBinary(t));else{const t=this.resize(i,e.width,e.height).toDataURL();A(this.convertDataURIToBinary(t))}},i.onerror=()=>{e("Image load failed")}})}convertDataURIToBinary(A){const e=A.indexOf(";base64,")+";base64,".length,t=A.substring(e),i=window.atob(t),B=i.length,n=new Uint8Array(new ArrayBuffer(B));for(let A=0;A0?o-4:o;var a=0;for(e=0;e>16&255,r[a++]=i>>8&255,r[a++]=255&i;2===s?(i=B[A.charCodeAt(e)]<<2|B[A.charCodeAt(e+1)]>>4,r[a++]=255&i):1===s&&(i=B[A.charCodeAt(e)]<<10|B[A.charCodeAt(e+1)]<<4|B[A.charCodeAt(e+2)]>>2,r[a++]=i>>8&255,r[a++]=255&i);return r},e.fromByteArray=function(A){for(var e,t=A.length,B=t%3,n="",s=[],r=0,o=t-B;ro?o:r+16383));1===B?(e=A[t-1],n+=i[e>>2],n+=i[e<<4&63],n+="=="):2===B&&(e=(A[t-2]<<8)+A[t-1],n+=i[e>>10],n+=i[e>>4&63],n+=i[e<<2&63],n+="=");return s.push(n),s.join("")};for(var i=[],B=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,o=s.length;r0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===A[e-2]?2:"="===A[e-1]?1:0}function a(A,e,t){for(var B,n,s=[],r=e;r>18&63]+i[n>>12&63]+i[n>>6&63]+i[63&n]);return s.join("")}B["-".charCodeAt(0)]=62,B["_".charCodeAt(0)]=63},function(A,e,t){const i=t(121),{generate:B,parse:n,walk:s}=t(99),r=t(38),o={};let g,a;if(r.addHook("beforeSanitizeAttributes",A=>{if(A&&A.href&&A.href.baseVal){const e=A.href.baseVal.replace(/\s/g,"");"data:"!==e.slice(0,5)&&"#"!==e.slice(0,1)&&(A.attributes.getNamedItem("xlink:href")&&(A.attributes.removeNamedItem("xlink:href"),delete A["xlink:href"]),A.attributes.getNamedItem("href")&&(A.attributes.removeNamedItem("href"),delete A.href))}return A}),r.addHook("uponSanitizeElement",(A,e)=>{if("style"===e.tagName){const e=n(A.textContent);let t=!1;s(e,(A,e,i)=>{"Atrule"===A.type&&"import"===A.name&&(i.remove(e),t=!0)}),t&&(A.textContent=B(e))}}),"undefined"==typeof TextDecoder||"undefined"==typeof TextEncoder){const A=t(32);g=A.TextDecoder,a=A.TextEncoder}else g=TextDecoder,a=TextEncoder;o.sanitizeByteStream=function(A){const e=new g,t=new a,i=o.sanitizeSvgText(e.decode(A));return t.encode(i)};const c=""),E=new RegExp("".concat(c,"rotationCenter:(-?[\\d\\.]+):(-?[\\d\\.]+)").concat(Q,"$"));o.sanitizeSvgText=function(A){let e=r.sanitize(A,{USE_PROFILES:{svg:!0}});e.indexOf("]>")>=0&&(e=e.substring(5,e.length)),e=i(e);const t=A.match(E);return t&&(e+=t[0]),e},A.exports=o},function(A,e,t){const i=t(11),B=t(124),n=t(30),s=170,r=50,o=4,g=10,a=16,c=12,Q="Helvetica",E=14,w=.9,C=16,l={BUBBLE_FILL:"white",BUBBLE_STROKE:"rgba(0, 0, 0, 0.15)",TEXT_FILL:"#575E75"};A.exports=class extends n{constructor(A,e){super(A,e),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 B(this._canvas.getContext("2d")),this.textWrapper=e.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(A,e,t){this._text=e,this._bubbleType=A,this._pointsLeft=t,this._textDirty=!0,this._textureDirty=!0,this.emitWasAltered()}_restyleCanvas(){this._canvas.getContext("2d").font="".concat(E,"px ").concat(Q,", sans-serif")}_reflowLines(){this._lines=this.textWrapper.wrapText(s,this._text);let A=0;for(const e of this._lines)A=Math.max(A,this.measurementProvider.measureText(e));const e=Math.max(A,r)+2*g,t=C*this._lines.length+2*g;this._textAreaSize.width=e,this._textAreaSize.height=t,this._size[0]=e+o,this._size[1]=t+o+c,this._textDirty=!1}_renderTextBubble(A){const e=this._canvas.getContext("2d");this._textDirty&&this._reflowLines();const t=this._textAreaSize.width,i=this._textAreaSize.height;this._canvas.width=Math.ceil(this._size[0]*A),this._canvas.height=Math.ceil(this._size[1]*A),this._restyleCanvas(),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,this._canvas.width,this._canvas.height),e.scale(A,A),e.translate(.5*o,.5*o),e.save(),this._pointsLeft&&(e.scale(-1,1),e.translate(-t,0)),e.beginPath(),e.moveTo(a,i),e.arcTo(0,i,0,i-a,a),e.arcTo(0,0,t,0,a),e.arcTo(t,0,t,i,a),e.arcTo(t,i,t-a,i,a),e.save(),e.translate(t-a,i),"say"===this._bubbleType?(e.bezierCurveTo(0,4,4,8,4,10),e.arcTo(4,12,2,12,2),e.bezierCurveTo(-1,12,-11,8,-16,0),e.closePath()):(e.arc(-16,0,4,0,Math.PI),e.closePath(),e.moveTo(-7,7.25),e.arc(-9.25,7.25,2.25,0,2*Math.PI),e.moveTo(0,9.5),e.arc(-1.5,9.5,1.5,0,2*Math.PI)),e.restore(),e.fillStyle=l.BUBBLE_FILL,e.strokeStyle=l.BUBBLE_STROKE,e.lineWidth=o,e.stroke(),e.fill(),e.restore(),e.fillStyle=l.TEXT_FILL,e.font="".concat(E,"px ").concat(Q,", sans-serif");const B=this._lines;for(let A=0;A0&&void 0!==arguments[0]?arguments[0]:[100,100];this.getTexture(A)}getTexture(A){const e=A?Math.max(Math.abs(A[0]),Math.abs(A[1])):100,t=Math.min(10,e/100);if(this._textureDirty||this._renderedScale!==t){this._renderTextBubble(t),this._textureDirty=!1;const A=this._canvas.getContext("2d").getImageData(0,0,this._canvas.width,this._canvas.height),e=this._renderer.gl;if(null===this._texture){const A={auto:!1,wrap:e.CLAMP_TO_EDGE};this._texture=i.createTexture(e,A)}this._setTexture(A)}return this._texture}}},function(A,e,t){const i=t(420),B=t(425);A.exports=class{constructor(A){this._measurementProvider=A,this._cache={}}wrapText(A,e){e=e.normalize();const t="".concat(A,"-").concat(e);if(this._cache[t])return this._cache[t];const n=this._measurementProvider.beginMeasurementSession(),s=new i(e);let r,o=0,g=null;const a=[];for(;r=s.nextBreak();){const t=e.slice(o,r.position).replace(/\n+$/,"");let i=(g||"").concat(t),n=this._measurementProvider.measureText(i);if(n>A){if(this._measurementProvider.measureText(t)>A){let e,s=0;for(;s!==(e=B.nextBreak(t,s));){const B=t.substring(s,e);i=(g||"").concat(B),n=this._measurementProvider.measureText(i),null===g||n<=A?g=i:(a.push(g),g=B),s=e}}else null!==g&&a.push(g),g=t}else g=i;r.required&&(null!==g&&a.push(g),g=null),o=r.position}return g=g||"",(g.length>0||0===a.length)&&a.push(g),this._cache[t]=a,this._measurementProvider.endMeasurementSession(n),a}}},function(A,e,t){(function(){var e,i,B,n,s,r,o,g,a,c,Q,E,w,C,l,I,h,u,d,Y,M,F,D,m,p,U,f;d=t(125),F=t(422),U=t(423),U.BK,a=U.CR,U.LF,U.NL,s=U.CB,B=U.BA,U.SP,Y=U.WJ,u=U.SP,n=U.BK,E=U.LF,C=U.NL,e=U.AI,i=U.AL,I=U.SA,h=U.SG,M=U.XX,o=U.CJ,U.ID,l=U.NS,U.characterClasses,f=t(424),c=f.DI_BRK,Q=f.IN_BRK,r=f.CI_BRK,g=f.CP_BRK,f.PR_BRK,p=f.pairTable,m=F.toByteArray("AA4IAAAAAAAAAhqg5VV7NJtZvz7fTC8zU5deplUlMrQoWqmqahD5So0aipYWrUhVFSVBQ10iSTtUtW6nKDVF6k7d75eQfEUbFcQ9KiFS90tQEolcP23nrLPmO+esr/+f39rr/a293t/e7/P8nmfvlz0O6RvrBJADtbBNaD88IOKTOmOrCqhu9zE770vc1pBV/xL5dxj2V7Zj4FGSomFKStCWNlV7hG1VabZfZ1LaHbFrRwzzLjzPoi1UHDnlV/lWbhgIIJvLBp/pu7AHEdRnIY+ROdXxg4fNpMdTxVnnm08OjozejAVsBqwqz8kddGRlRxsd8c55dNZoPuex6a7Dt6L0NNb03sqgTlR2/OT7eTt0Y0WnpUXxLsp5SMANc4DsmX4zJUBQvznwexm9tsMH+C9uRYMPOd96ZHB29NZjCIM2nfO7tsmQveX3l2r7ft0N4/SRJ7kO6Y8ZCaeuUQ4gMTZ67cp7TgxvlNDsPgOBdZi2YTam5Q7m3+00l+XG7PrDe6YoPmHgK+yLih7fAR16ZFCeD9WvOVt+gfNW/KT5/M6rb/9KERt+N1lad5RneVjzxXHsLofuU+TvrEsr3+26sVz5WJh6L/svoPK3qepFH9bysDljWtD1F7KrxzW1i9r+e/NLxV/acts7zuo304J9+t3Pd6Y6u8f3EAqxNRgv5DZjaI3unyvkvHPya/v3mWVYOC38qBq11+yHZ2bAyP1HbkV92vdno7r2lxz9UwCdCJVfd14NLcpO2CadHS/XPJ9doXgz5vLv/1OBVS3gX0D9n6LiNIDfpilO9RsLgZ2W/wIy8W/Rh93jfoz4qmRV2xElv6p2lRXQdO6/Cv8f5nGn3u0wLXjhnvClabL1o+7yvIpvLfT/xsKG30y/sTvq30ia9Czxp9dr9v/e7Yn/O0QJXxxBOJmceP/DBFa1q1v6oudn/e6qc/37dUoNvnYL4plQ9OoneYOh/r8fOFm7yl7FETHY9dXd5K2n/qEc53dOEe1TTJcvCfp1dpTC334l0vyaFL6mttNEbFjzO+ZV2mLk0qc3BrxJ4d9gweMmjRorxb7vic0rSq6D4wzAyFWas1TqPE0sLI8XLAryC8tPChaN3ALEZSWmtB34SyZcxXYn/E4Tg0LeMIPhgPKD9zyHGMxxhxnDDih7eI86xECTM8zodUCdgffUmRh4rQ8zyA6ow/Aei+01a8OMfziQQ+GAEkhwN/cqUFYAVzA9ex4n6jgtsiMvXf5BtXxEU4hSphvx3v8+9au8eEekEEpkrkne/zB1M+HAPuXIz3paxKlfe8aDMfGWAX6Md6PuuAdKHFVH++Ed5LEji94Z5zeiJIxbmWeN7rr1/ZcaBl5/nimdHsHgIH/ssyLUXZ4fDQ46HnBb+hQqG8yNiKRrXL/b1IPYDUsu3dFKtRMcjqlRvONd4xBvOufx2cUHuk8pmG1D7PyOQmUmluisVFS9OWS8fPIe8LiCtjwJKnEC9hrS9uKmISI3Wa5+vdXUG9dtyfr7g/oJv2wbzeZU838G6mEvntUb3SVV/fBZ6H/sL+lElzeRrHy2Xbe7UWX1q5sgOQ81rv+2baej4fP4m5Mf/GkoxfDtT3++KP7do9Jn26aa6xAhCf5L9RZVfkWKCcjI1eYbm2plvTEqkDxKC402bGzXCYaGnuALHabBT1dFLuOSB7RorOPEhZah1NjZIgR/UFGfK3p1ElYnevOMBDLURdpIjrI+qZk4sffGbRFiXuEmdFjiAODlQCJvIaB1rW61Ljg3y4eS4LAcSgDxxZQs0DYa15wA032Z+lGUfpoyOrFo3mg1sRQtN/fHHCx3TrM8eTrldMbYisDLXbUDoXMLejSq0fUNuO1muX0gEa8vgyegkqiqqbC3W0S4cC9Kmt8MuS/hFO7Xei3f8rSvIjeveMM7kxjUixOrl6gJshe4JU7PhOHpfrRYvu7yoAZKa3Buyk2J+K5W+nNTz1nhJDhRUfDJLiUXxjxXCJeeaOe/r7HlBP/uURc/5efaZEPxr55Qj39rfTLkugUGyMrwo7HAglfEjDriehF1jXtwJkPoiYkYQ5aoXSA7qbCBGKq5hwtu2VkpI9xVDop/1xrC52eiIvCoPWx4lLl40jm9upvycVPfpaH9/o2D4xKXpeNjE2HPQRS+3RFaYTc4Txw7Dvq5X6JBRwzs9mvoB49BK6b+XgsZVJYiInTlSXZ+62FT18mkFVcPKCJsoF5ahb19WheZLUYsSwdrrVM3aQ2XE6SzU2xHDS6iWkodk5AF6F8WUNmmushi8aVpMPwiIfEiQWo3CApONDRjrhDiVnkaFsaP5rjIJkmsN6V26li5LNM3JxGSyKgomknTyyrhcnwv9Qcqaq5utAh44W30SWo8Q0XHKR0glPF4fWst1FUCnk2woFq3iy9fAbzcjJ8fvSjgKVOfn14RDqyQuIgaGJZuswTywdCFSa89SakMf6fe+9KaQMYQlKxiJBczuPSho4wmBjdA+ag6QUOr2GdpcbSl51Ay6khhBt5UXdrnxc7ZGMxCvz96A4oLocxh2+px+1zkyLacCGrxnPzTRSgrLKpStFpH5ppKWm7PgMKZtwgytKLOjbGCOQLTm+KOowqa1sdut9raj1CZFkZD0jbaKNLpJUarSH5Qknx1YiOxdA5L6d5sfI/unmkSF65Ic/AvtXt98Pnrdwl5vgppQ3dYzWFwknZsy6xh2llmLxpegF8ayLwniknlXRHiF4hzzrgB8jQ4wdIqcaHCEAxyJwCeGkXPBZYSrrGa4vMwZvNN9aK0F4JBOK9mQ8g8EjEbIQVwvfS2D8GuCYsdqwqSWbQrfWdTRUJMqmpnWPax4Z7E137I6brHbvjpPlfNZpF1d7PP7HB/MPHcHVKTMhLO4f3CZcaccZEOiS2DpKiQB5KXDJ+Ospcz4qTRCRxgrKEQIgUkKLTKKwskdx2DWo3bg3PEoB5h2nA24olwfKSR+QR6TAvEDi/0czhUT59RZmO1MGeKGeEfuOSPWfL+XKmhqpZmOVR9mJVNDPKOS49Lq+Um10YsBybzDMtemlPCOJEtE8zaXhsaqEs9bngSJGhlOTTMlCXly9Qv5cRN3PVLK7zoMptutf7ihutrQ/Xj7VqeCdUwleTTKklOI8Wep9h7fCY0kVtDtIWKnubWAvbNZtsRRqOYl802vebPEkZRSZc6wXOfPtpPtN5HI63EUFfsy7U/TLr8NkIzaY3vx4A28x765XZMzRZTpMk81YIMuwJ5+/zoCuZj1wGnaHObxa5rpKZj4WhT670maRw04w0e3cZW74Z0aZe2n05hjZaxm6urenz8Ef5O6Yu1J2aqYAlqsCXs5ZB5o1JJ5l3xkTVr8rJQ09NLsBqRRDT2IIjOPmcJa6xQ1R5yGP9jAsj23xYDTezdyqG8YWZ7vJBIWK56K+iDgcHimiQOTIasNSua1fOBxsKMMEKd15jxTl+3CyvGCR+UyRwuSI2XuwRIPoNNclPihfJhaq2mKkNijwYLY6feqohktukmI3KDvOpN7ItCqHHhNuKlxMfBAEO5LjW2RKh6lE5Hd1dtAOopac/Z4FdsNsjMhXz/ug8JGmbVJTA+VOBJXdrYyJcIn5+OEeoK8kWEWF+wdG8ZtZHKSquWDtDVyhFPkRVqguKFkLkKCz46hcU1SUY9oJ2Sk+dmq0kglqk4kqKT1CV9JDELPjK1WsWGkEXF87g9P98e5ff0mIupm/w6vc3kCeq04X5bgJQlcMFRjlFWmSk+kssXCAVikfeAlMuzpUvCSdXiG+dc6KrIiLxxhbEVuKf7vW7KmDQI95bZe3H9mN3/77F6fZ2Yx/F9yClllj8gXpLWLpd5+v90iOaFa9sd7Pvx0lNa1o1+bkiZ69wCiC2x9UIb6/boBCuNMB/HYR0RC6+FD9Oe5qrgQl6JbXtkaYn0wkdNhROLqyhv6cKvyMj1Fvs2o3OOKoMYTubGENLfY5F6H9d8wX1cnINsvz+wZFQu3zhWVlwJvwBEp69Dqu/ZnkBf3nIfbx4TK7zOVJH5sGJX+IMwkn1vVBn38GbpTg9bJnMcTOb5F6Ci5gOn9Fcy6Qzcu+FL6mYJJ+f2ZZJGda1VqruZ0JRXItp8X0aTjIcJgzdaXlha7q7kV4ebrMsunfsRyRa9qYuryBHA0hc1KVsKdE+oI0ljLmSAyMze8lWmc5/lQ18slyTVC/vADTc+SNM5++gztTBLz4m0aVUKcfgOEExuKVomJ7XQDZuziMDjG6JP9tgR7JXZTeo9RGetW/Xm9/TgPJpTgHACPOGvmy2mDm9fl09WeMm9sQUAXP3Su2uApeCwJVT5iWCXDgmcuTsFgU9Nm6/PusJzSbDQIMfl6INY/OAEvZRN54BSSXUClM51im6Wn9VhVamKJmzOaFJErgJcs0etFZ40LIF3EPkjFTjGmAhsd174NnOwJW8TdJ1Dja+E6Wa6FVS22Haj1DDA474EesoMP5nbspAPJLWJ8rYcP1DwCslhnn+gTFm+sS9wY+U6SogAa9tiwpoxuaFeqm2OK+uozR6SfiLCOPz36LiDlzXr6UWd7BpY6mlrNANkTOeme5EgnnAkQRTGo9T6iYxbUKfGJcI9B+ub2PcyUOgpwXbOf3bHFWtygD7FYbRhb+vkzi87dB0JeXl/vBpBUz93VtqZi7AL7C1VowTF+tGmyurw7DBcktc+UMY0E10Jw4URojf8NdaNpN6E1q4+Oz+4YePtMLy8FPRP"),D=new d(m),w=function(){var A,t,w;function d(A){this.string=A,this.pos=0,this.lastPos=0,this.curClass=null,this.nextClass=null}return d.prototype.nextCodePoint=function(){var A,e;return A=this.string.charCodeAt(this.pos++),e=this.string.charCodeAt(this.pos),55296<=A&&A<=56319&&56320<=e&&e<=57343?(this.pos++,1024*(A-55296)+(e-56320)+65536):A},t=function(A){switch(A){case e:return i;case I:case h:case M:return i;case o:return l;default:return A}},w=function(A){switch(A){case E:case C:return n;case s:return B;case u:return Y;default:return A}},d.prototype.nextCharClass=function(A){return null==A&&(A=!1),t(D.get(this.nextCodePoint()))},A=function(A,e){this.position=A,this.required=null!=e&&e},d.prototype.nextBreak=function(){var e,i,o;for(null==this.curClass&&(this.curClass=w(this.nextCharClass()));this.pos=this.string.length)return this.lastPos>>=1,e}function I(A,e,t){if(!e)return t;for(;A.bitcount<24;)A.tag|=A.source[A.sourceIndex++]<>>16-e;return A.tag>>>=e,A.bitcount-=e,i+t}function h(A,e){for(;A.bitcount<24;)A.tag|=A.source[A.sourceIndex++]<>>=1,++B,t+=e.table[B],i-=e.table[B]}while(i>=0);return A.tag=n,A.bitcount-=B,e.trans[t+i]}function u(A,e,t){var i,B,n,s,r,o;for(i=I(A,5,257),B=I(A,5,1),n=I(A,4,4),s=0;s<19;++s)Q[s]=0;for(s=0;s8;)A.sourceIndex--,A.bitcount-=8;if((e=256*(e=A.source[A.sourceIndex+1])+A.source[A.sourceIndex])!==(65535&~(256*A.source[A.sourceIndex+3]+A.source[A.sourceIndex+2])))return-3;for(A.sourceIndex+=4,t=e;t;--t)A.dest[A.destLen++]=A.source[A.sourceIndex++];return A.bitcount=0,0}!function(A,e){var t;for(t=0;t<7;++t)A.table[t]=0;for(A.table[7]=24,A.table[8]=152,A.table[9]=112,t=0;t<24;++t)A.trans[t]=256+t;for(t=0;t<144;++t)A.trans[24+t]=t;for(t=0;t<8;++t)A.trans[168+t]=280+t;for(t=0;t<112;++t)A.trans[176+t]=144+t;for(t=0;t<5;++t)e.table[t]=0;for(e.table[5]=32,t=0;t<32;++t)e.trans[t]=t}(B,n),E(s,r,4,3),E(o,g,2,1),s[28]=0,r[28]=258,A.exports=function(A,e){var t,s,r=new i(A,e);do{switch(t=l(r),I(r,2,0)){case 0:s=Y(r);break;case 1:s=d(r,B,n);break;case 2:u(r,r.ltree,r.dtree),s=d(r,r.ltree,r.dtree);break;default:s=-3}if(0!==s)throw new Error("Data error")}while(!t);return r.destLen0)throw new Error("Invalid string. Length must be a multiple of 4");var o=A.length;s="="===A.charAt(o-2)?2:"="===A.charAt(o-1)?1:0,r=new e(3*A.length/4-s),B=s>0?A.length-4:A.length;var a=0;function c(A){r[a++]=A}for(t=0,i=0;t>16),c((65280&n)>>8),c(255&n);return 2===s?c(255&(n=g(A.charAt(t))<<2|g(A.charAt(t+1))>>4)):1===s&&(c((n=g(A.charAt(t))<<10|g(A.charAt(t+1))<<4|g(A.charAt(t+2))>>2)>>8&255),c(255&n)),r},A.fromByteArray=function(A){var e,t,i,B,n=A.length%3,s="";function r(A){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(A)}for(e=0,i=A.length-n;e>18&63)+r(B>>12&63)+r(B>>6&63)+r(63&B);switch(n){case 1:s+=r((t=A[A.length-1])>>2),s+=r(t<<4&63),s+="==";break;case 2:s+=r((t=(A[A.length-2]<<8)+A[A.length-1])>>10),s+=r(t>>4&63),s+=r(t<<2&63),s+="="}return s}}(e)},function(A,e){(function(){e.OP=0,e.CL=1,e.CP=2,e.QU=3,e.GL=4,e.NS=5,e.EX=6,e.SY=7,e.IS=8,e.PR=9,e.PO=10,e.NU=11,e.AL=12,e.HL=13,e.ID=14,e.IN=15,e.HY=16,e.BA=17,e.BB=18,e.B2=19,e.ZW=20,e.CM=21,e.WJ=22,e.H2=23,e.H3=24,e.JL=25,e.JV=26,e.JT=27,e.RI=28,e.AI=29,e.BK=30,e.CB=31,e.CJ=32,e.CR=33,e.LF=34,e.NL=35,e.SA=36,e.SG=37,e.SP=38,e.XX=39}).call(this)},function(A,e){(function(){e.DI_BRK=0,e.IN_BRK=1,e.CI_BRK=2,e.CP_BRK=3,e.PR_BRK=4,e.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(A,e,t){(function(A){(function(){var i,B,n,s,r,o,g,a,c,Q,E,w,C,l,I,h;h=t(426),i=h.CR,r=h.LF,B=h.Control,n=h.Extend,a=h.Regional_Indicator,c=h.SpacingMark,s=h.L,w=h.V,Q=h.T,o=h.LV,g=h.LVT,E=t(125),C=new E(A("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")),l=function(A,e){var t,i,B;return e=e||0,55296<=(t=A.charCodeAt(e))&&t<=56319?(i=t,56320<=(B=A.charCodeAt(e+1))&&B<=57343?1024*(i-55296)+(B-56320)+65536:i):56320<=t&&t<=57343?(B=t,55296<=(i=A.charCodeAt(e-1))&&i<=56319?1024*(i-55296)+(B-56320)+65536:B):t},I=function(A,e){return(A!==i||e!==r)&&(A===B||A===i||A===r||(e===B||e===i||e===r||(A!==s||e!==s&&e!==w&&e!==o&&e!==g)&&((A!==o&&A!==w||e!==w&&e!==Q)&&((A!==g&&A!==Q||e!==Q)&&((A!==a||e!==a)&&(e!==n&&e!==c))))))},e.nextBreak=function(A,e){var t,i,B,n,s,r,o;if(null==e&&(e=0),e<0)return 0;if(e>=A.length-1)return A.length;for(B=C.get(l(A,e)),t=n=e+1,s=A.length;nA.length)return A.length;if(e<=1)return 0;for(e--,i=C.get(l(A,e)),t=n=e-1;n>=0;t=n+=-1)if(!(55296<=(s=A.charCodeAt(t))&&s<=56319&&56320<=(r=A.charCodeAt(t+1))&&r<=57343)){if(B=C.get(l(A,t)),I(B,i))return t+1;i=B}return 0},e.break=function(A){var t,i,B;for(B=[],i=0;(t=e.nextBreak(A,i)) * {\n position: absolute;\n top: 0;\n left: 0;\n}\n"},function(A,e,t){const i=t(429),B=t(434),n=t(60),s=t(126),r=t(61);A.exports=class{constructor(){this.defaultAssetId={},this.builtinHelper=new i(this),this.webHelper=new B(this),this.builtinHelper.registerDefaultAssets(this),this._helpers=[{helper:this.builtinHelper,priority:100},{helper:this.webHelper,priority:-100}]}get Asset(){return n}get AssetType(){return s}get DataFormat(){return r}static get Asset(){return n}static get AssetType(){return s}addHelper(A){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._helpers.push({helper:A,priority:e}),this._helpers.sort((A,e)=>e.priority-A.priority)}get(A){return this.builtinHelper.get(A)}cache(A,e,t,i){return this.builtinHelper._store(A,e,t,i)}createAsset(A,e,t,i,B){if(!e)throw new Error("Tried to create asset without a dataFormat");return new n(A,i,e,t,B)}addWebStore(A,e,t,i){this.webHelper.addStore(A,e,t,i)}addWebSource(A,e){this.addWebStore(A,e)}getDefaultAssetId(A){if(Object.prototype.hasOwnProperty.call(this.defaultAssetId,A.name))return this.defaultAssetId[A.name]}setDefaultAssetId(A,e){this.defaultAssetId[A.name]=e}load(A,e,t){const i=this._helpers.map(A=>A.helper),B=[];t=t||A.runtimeFormat;let n,s=0;const r=o=>{if(o&&B.push(o),n=i[s++],n){const i=n.load(A,e,t);return null===i?r():i.catch(r)}return B.length>0?Promise.reject(B):Promise.resolve(null)};return r()}store(A,e,t,i){return e=e||A.runtimeFormat,new Promise((B,n)=>this.webHelper.store(A,e,t,i).then(i=>(this.builtinHelper._store(A,e,t,i.id),B(i))).catch(A=>n(A)))}}},function(A,e,t){(function(e){const i=t(23),B=t(60),n=t(126),s=t(61),r=t(127),o=[{type:n.ImageBitmap,format:s.PNG,id:null,data:e.from(t(431))},{type:n.Sound,format:s.WAV,id:null,data:e.from(t(432))},{type:n.ImageVector,format:s.SVG,id:null,data:e.from(t(433))}],g=o.concat([]);A.exports=class extends r{constructor(A){super(A),this.assets={},g.forEach(A=>{A.id=this._store(A.type,A.format,A.data,A.id)})}registerDefaultAssets(){const A=o.length;for(let e=0;e0?i-4:i,c=0;c>16&255,r[o++]=e>>8&255,r[o++]=255&e;2===s&&(e=B[A.charCodeAt(c)]<<2|B[A.charCodeAt(c+1)]>>4,r[o++]=255&e);1===s&&(e=B[A.charCodeAt(c)]<<10|B[A.charCodeAt(c+1)]<<4|B[A.charCodeAt(c+2)]>>2,r[o++]=e>>8&255,r[o++]=255&e);return r},e.fromByteArray=function(A){for(var e,t=A.length,B=t%3,n=[],s=0,r=t-B;sr?r:s+16383));1===B?(e=A[t-1],n.push(i[e>>2]+i[e<<4&63]+"==")):2===B&&(e=(A[t-2]<<8)+A[t-1],n.push(i[e>>10]+i[e>>4&63]+i[e<<2&63]+"="));return n.join("")};for(var i=[],B=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,o=s.length;r0)throw new Error("Invalid string. Length must be a multiple of 4");var t=A.indexOf("=");return-1===t&&(t=e),[t,t===e?0:4-t%4]}function a(A,e,t){for(var B,n,s=[],r=e;r>18&63]+i[n>>12&63]+i[n>>6&63]+i[63&n]);return s.join("")}B["-".charCodeAt(0)]=62,B["_".charCodeAt(0)]=63},function(A,e,t){A.exports=t(62)("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==")},function(A,e,t){A.exports=t(62)("UklGRiYAAABXQVZFZm10IBAAAAABAAEAIlYAAESsAAACABAAZGF0YQIAAAAAAA==")},function(A,e,t){A.exports=t(62)("PD94bWwgdmVyc2lvbj0iMS4wIj8+Cjxzdmcgd2lkdGg9IjEyOCIgaGVpZ2h0PSIxMjgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiA8Zz4KICA8cmVjdCBmaWxsPSIjQ0NDIiBoZWlnaHQ9IjEyOCIgd2lkdGg9IjEyOCIvPgogIDx0ZXh0IGZpbGw9ImJsYWNrIiB5PSIxMDciIHg9IjM1LjUiIGZvbnQtc2l6ZT0iMTI4Ij4/PC90ZXh0PgogPC9nPgo8L3N2Zz4K")},function(A,e,t){const i=t(60),B=t(127),n=t(435),s=A=>"string"==typeof A?{url:A}:A;A.exports=class extends B{constructor(A){super(A),this.stores=[],this.assetTool=new n,this.projectTool=new n(n.TOOL_FILTER.READY)}addSource(A,e){this.addStore(A,e)}addStore(A,e,t,i){this.stores.push({types:A.map(A=>A.name),get:e,create:t,update:i})}load(A,e,t){const B=[],n=this.stores.slice().filter(e=>e.types.indexOf(A.name)>=0),r=new i(A,e,t);let o=this.assetTool;"Project"===A.name&&(o=this.projectTool);let g=0;const a=A=>{A&&B.push(A);const e=n[g++],i=e&&e.get;if(i){const A=s(i(r));return!1===A?a():o.get(A).then(A=>A?(r.setData(A,t),r):a()).catch(a)}return B.length>0?Promise.reject(B):Promise.resolve(null)};return a()}store(A,e,t,B){const n=new i(A,B,e),r=""===B||null==B,o=this.stores.filter(e=>-1!==e.types.indexOf(A.name)&&(r&&e.create||e.update))[0],g=r?"post":"put";if(!o)return Promise.reject(new Error("No appropriate stores"));let a=this.assetTool;"Project"===A.name&&(a=this.projectTool);const c=s(r?o.create(n):o.update(n)),Q=Object.assign({body:t,method:g},c);return a.send(Q).then(A=>{if("string"==typeof A)try{A=JSON.parse(A)}catch(e){return A}return Object.assign({id:A["content-name"]||B},A)})}}},function(A,e,t){const i=t(436),B=t(438);class n{constructor(){let A;A=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.TOOL_FILTER.ALL)===n.TOOL_FILTER.READY?[new B]:[new i,new B],this.tools=A}get isGetSupported(){return this.tools.some(A=>A.isGetSupported)}get(A){let e=0;const t=i=>{const B=this.tools[e++];if(!B)throw i;return B.isGetSupported?B.get(A).catch(t):t(i)};return t()}get isSendSupported(){return this.tools.some(A=>A.isSendSupported)}send(A){let e=0;const t=i=>{const B=this.tools[e++];if(!B)throw i;return B.isSendSupported?B.send(A).catch(t):t(i)};return t()}}n.TOOL_FILTER={ALL:"all",READY:"ready"},A.exports=n},function(A,e,t){const i=["url"];function B(A,e){if(null==A)return{};var t,i,B=function(A,e){if(null==A)return{};var t,i,B={},n=Object.keys(A);for(i=0;i=0||(B[t]=A[t]);return B}(A,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(A);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(A,t)&&(B[t]=A[t])}return B}class n{constructor(){this._workerSupport={fetch:"undefined"!=typeof fetch},this._supportError=null,this.worker=null,this.jobs={};try{if(this.isGetSupported){const A=t(437);this.worker=new A,this.worker.addEventListener("message",A=>{let{data:e}=A;if(e.support)this._workerSupport=e.support;else for(const A of e)this.jobs[A.id]&&(A.error?this.jobs[A.id].reject(A.error):this.jobs[A.id].resolve(A.buffer),delete this.jobs[A.id])})}}catch(A){this._supportError=A}}get isGetSupported(){return"undefined"!=typeof Worker&&this._workerSupport.fetch&&!this._supportError}get(A){let{url:e}=A,t=B(A,i);return new Promise((A,i)=>{const B=Math.random().toString(16).substring(2);this.worker.postMessage({id:B,url:e,options:Object.assign({method:"GET"},t)}),this.jobs[B]={id:B,resolve:A,reject:i}}).then(A=>A?new Uint8Array(A):null)}get isSendSupported(){return!1}send(){throw new Error("Not implemented.")}static get instance(){return this._instance||(this._instance=new n),this._instance}}A.exports=class{constructor(){this.inner=n.instance}get isGetSupported(){return this.inner.isGetSupported}get(A){return this.inner.get(A)}get isSendSupported(){return!1}send(){throw new Error("Not implemented.")}}},function(A,e,t){A.exports=function(){return t(90)('!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}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 o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));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){const r=n(1),o=[];let s=null;const u=()=>{s||(s=setTimeout(()=>{s=null,o.length&&(postMessage(o.slice(),o.map(e=>e.buffer).filter(Boolean)),o.length=0)}))},a=e=>{let{data:t}=e;r(t.url,t.options).then(e=>o.push({id:t.id,buffer:e})).catch(e=>o.push({id:t.id,error:e&&e.message||"Failed request: ".concat(t.url)})).then(u)};self.fetch?(postMessage({support:{fetch:!0}}),self.addEventListener("message",a)):(postMessage({support:{fetch:!1}}),self.addEventListener("message",e=>{let{data:t}=e;postMessage([{id:t.id,error:"fetch is unavailable"}])}))},function(e,t){let n=0;const r=[],o=()=>{n<100&&r.length>0&&(n++,(e=>{let t,[r,s,u]=e,a=0;const l=()=>fetch(s,u).then(e=>e.ok||0===e.status?e.arrayBuffer():404===e.status?null:Promise.reject(e.status)).then(e=>(n--,o(),e)).catch(e=>{if(403===e)throw e;if(console.warn("Attempt to fetch ".concat(s," failed"),e),t||(t=e),a<2)return a++,new Promise(e=>setTimeout(e,5e3*(a+Math.random()-1))).then(l);throw n--,o(),t});r(l())})(r.shift()))};e.exports=(e,t)=>new Promise(n=>{r.push([n,e,t]),o()})}]);',null)}},function(A,e,t){const i=["url"],B=["url","withCredentials"];function n(A,e){if(null==A)return{};var t,i,B=function(A,e){if(null==A)return{};var t,i,B={},n=Object.keys(A);for(i=0;i=0||(B[t]=A[t]);return B}(A,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(A);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(A,t)&&(B[t]=A[t])}return B}const s=t(439);A.exports=class{get isGetSupported(){return"undefined"!=typeof fetch}get(A){let{url:e}=A,t=n(A,i);return s(e,Object.assign({method:"GET"},t)).then(A=>A?new Uint8Array(A):A)}get isSendSupported(){return"undefined"!=typeof fetch}send(A){let{url:e,withCredentials:t=!1}=A,i=n(A,B);return fetch(e,Object.assign({credentials:t?"include":"omit"},i)).then(A=>A.ok?A.text():Promise.reject(A.status))}}},function(A,e){let t=0;const i=[],B=()=>{t<100&&i.length>0&&(t++,(A=>{let e,[i,n,s]=A,r=0;const o=()=>fetch(n,s).then(A=>A.ok||0===A.status?A.arrayBuffer():404===A.status?null:Promise.reject(A.status)).then(A=>(t--,B(),A)).catch(A=>{if(403===A)throw A;if(console.warn("Attempt to fetch ".concat(n," failed"),A),e||(e=A),r<2)return r++,new Promise(A=>setTimeout(A,5e3*(r+Math.random()-1))).then(o);throw t--,B(),e});i(o())})(i.shift()))};A.exports=(A,e)=>new Promise(t=>{i.push([t,A,e]),B()})},function(A,e,t){const i=t(441),B=t(443),n=t(42),s=t(445),r=t(446),o=t(448),g=t(449),a=t(450),c=t(451),Q=t(452),E=t(128),w=t(453);A.exports=class{constructor(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new B;this.audioContext=A,i(this.audioContext),this.inputNode=this.audioContext.createGain(),this.inputNode.connect(this.audioContext.destination),this.audioBuffers={},this.loudness=null,this.effects=[c,Q,E]}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(A){const e=A.data.buffer.slice(0),t=s();var i,B;return(i=this.audioContext,B=e,1===i.decodeAudioData.length?i.decodeAudioData(B):new Promise((A,e)=>{i.decodeAudioData(B,e=>A(e),A=>e(A))})).catch(()=>{if(0===A.data.length)return this._emptySound();const e=A.data.buffer.slice(0);return new r(this.audioContext).decode(e).catch(()=>this._emptySound())}).then(A=>[t,A],A=>{n.warn("audio data could not be decoded",A)})}_emptySound(){return this.audioContext.createBuffer(1,1,this.audioContext.sampleRate)}decodeSound(A){return this._decodeSound(A).then(A=>{let[e,t]=A;return this.audioBuffers[e]=t,e})}decodeSoundPlayer(A){return this._decodeSound(A).then(A=>{let[e,t]=A;return new g(this,{id:e,buffer:t})})}getLoudness(){return this.loudness||(this.loudness=new o(this.audioContext)),this.loudness.getLoudness()}createEffectChain(){const A=new a(this,this.effects);return A.connect(this),A}createBank(){return new w(this,this.createEffectChain())}}},function(A,e,t){const i=t(442);A.exports=function(A){if("undefined"!=typeof document)return i(A)}},function(A,e,t){var i,B,n; /** * StartAudioContext.js * @author Yotam Mann * @license http://opensource.org/licenses/MIT MIT License * @copyright 2016 Yotam Mann - */B=[],void 0===(n="function"==typeof(i=function(){var A=function(A,e){this._dragged=!1,this._element=A,this._bindedMove=this._moved.bind(this),this._bindedEnd=this._ended.bind(this,e),A.addEventListener("touchstart",this._bindedEnd),A.addEventListener("touchmove",this._bindedMove),A.addEventListener("touchend",this._bindedEnd),A.addEventListener("mouseup",this._bindedEnd)};function e(A){return"running"===A.state}return A.prototype._moved=function(A){this._dragged=!0},A.prototype._ended=function(A){this._dragged||function(A){var e=A.createBuffer(1,1,A.sampleRate),t=A.createBufferSource();t.buffer=e,t.connect(A.destination),t.start(0),A.resume&&A.resume()}(A),this._dragged=!1},A.prototype.dispose=function(){this._element.removeEventListener("touchstart",this._bindedEnd),this._element.removeEventListener("touchmove",this._bindedMove),this._element.removeEventListener("touchend",this._bindedEnd),this._element.removeEventListener("mouseup",this._bindedEnd),this._bindedMove=null,this._bindedEnd=null,this._element=null},function(t,i,B){var n=new Promise((function(A){!function(A,t){e(A)?t():function i(){e(A)?t():(requestAnimationFrame(i),A.resume&&A.resume())}()}(t,A)})),s=[];return i||(i=document.body),function e(t,i,B){if(Array.isArray(t)||NodeList&&t instanceof NodeList)for(var n=0;n{const n=new i(A);"RIFF"!==n.readUint8String(4)&&(B.warn("incorrect adpcm wav header"),t());const s=n.readInt32();s+8!==A.byteLength&&B.warn("adpcm wav length in header: ".concat(s," is incorrect"));"WAVE"!==n.readUint8String(4)&&(B.warn("incorrect adpcm wav header"),t());const r=this.extractChunk("fmt ",n);this.encoding=r.readUint16(),this.channels=r.readUint16(),this.samplesPerSecond=r.readUint32(),this.bytesPerSecond=r.readUint32(),this.blockAlignment=r.readUint16(),this.bitsPerSample=r.readUint16(),r.position+=2,this.samplesPerBlock=r.readUint16(),this.adpcmBlockSize=(this.samplesPerBlock-1)/2+4;const o=this.extractChunk("data",n),g=this.numberOfSamples(o,this.adpcmBlockSize),a=this.audioContext.createBuffer(1,g,this.samplesPerSecond);this.imaDecompress(o,this.adpcmBlockSize,a.getChannelData(0)),e(a)})}extractChunk(A,e){for(e.position=12;e.position>1),1&A&&(B+=e>>2),B+=e>>3,r[t++]=8&A?-B:B}}return r}();let w=0;for(;w88&&(g=88),t[w++]=i/32768;const e=Math.min(Q,c-w),n=w;for(;w-n88?g=88:g<0&&(g=0),i+=o,i>32767?i=32767:i<-32768&&(i=-32768),t[w++]=i/32768,B=a>>4&15,o=E[16*g+B],g+=s[B],g>88?g=88:g<0&&(g=0),i+=o,i>32767?i=32767:i<-32768&&(i=-32768),t[w++]=i/32768}}}},function(A,e){class t{constructor(A){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A.byteLength,{_uint8View:i=new Uint8Array(A)}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.arrayBuffer=A,this.start=e,this.end=t,this._uint8View=i,this._position=e}extract(A){return new t(this.arrayBuffer,this._position,this._position+A,this)}getLength(){return this.end-this.start}getBytesAvailable(){return this.end-this._position}get position(){return this._position-this.start}set position(A){return this._position=A+this.start,A}readUint8(){const A=this._uint8View[this._position];return this._position+=1,A}readUint8String(A){const e=this._uint8View;let t="";const i=this._position+A;for(let A=this._position;A{this.audioStream=A,this.mic=this.audioContext.createMediaStreamSource(A),this.analyser=this.audioContext.createAnalyser(),this.mic.connect(this.analyser),this.micDataArray=new Float32Array(this.analyser.fftSize)}).catch(A=>{i.warn(A)})),this.mic&&this.audioStream.active){this.analyser.getFloatTimeDomainData(this.micDataArray);let A=0;for(let e=0;ethis.audioEngine.currentTime}handleEvent(A){"ended"===A.type&&this.onEnded()}onEnded(){this.emit("stop"),this.isPlaying=!1}_createSource(){null!==this.outputNode&&(this.outputNode.removeEventListener("ended",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("ended",this.handleEvent),null!==this.target&&this.connect(this.target)}initialize(){this.initialized=!0,this._createSource()}connect(A){return A===this.volumeEffect?(this.outputNode.disconnect(),void this.outputNode.connect(this.volumeEffect.getInputNode())):(this.target=A,this.initialized?(null===this.volumeEffect?(this.outputNode.disconnect(),this.outputNode.connect(A.getInputNode())):this.volumeEffect.connect(A),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("ended",this.handleEvent);const A=new n(this.audioEngine,this);return A.playbackRate=this.playbackRate,this.isPlaying&&(A.startingUntil=this.startingUntil,A.isPlaying=this.isPlaying,A.initialized=this.initialized,A.outputNode=this.outputNode,A.outputNode.addEventListener("ended",A.handleEvent),A.volumeEffect=this.volumeEffect,A.volumeEffect&&(A.volumeEffect.audioPlayer=A),null!==this.target&&A.connect(this.target),this.emit("stop"),A.emit("play")),this.outputNode=null,this.volumeEffect=null,this.initialized=!1,this.startingUntil=0,this.isPlaying=!1,A}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:A,DECAY_DURATION:e}=this.audioEngine;this.startingUntil=A+e,this.emit("play")}stop(){if(!this.isPlaying)return;const A=this.take();A.volumeEffect=new B(A.audioEngine,A,null),A.volumeEffect.connect(A.target),A.finished().then(()=>A.dispose()),A.volumeEffect.set(0);const{currentTime:e,DECAY_DURATION:t}=this.audioEngine;A.outputNode.stop(e+t)}stopImmediately(){this.isPlaying&&(this.outputNode.stop(),this.isPlaying=!1,this.startingUntil=0,this.emit("stop"))}finished(){return new Promise(A=>{this.once("stop",A)})}setPlaybackRate(A){this.playbackRate=A,this.initialized&&(this.outputNode.playbackRate.value=A)}}A.exports=n},function(A,e){class t{constructor(A,e){this.audioEngine=A,this.inputNode=this.audioEngine.audioContext.createGain(),this.effects=e;let t=null;this._effects=e.reverse().map(e=>{const i=new e(A,this,t);return this[i.name]=i,t=i,i}).reverse(),this.firstEffect=this._effects[0],this.lastEffect=this._effects[this._effects.length-1],this._soundPlayers=new Set}clone(){const A=new t(this.audioEngine,this.effects);return this.target&&A.connect(this.target),A}addSoundPlayer(A){this._soundPlayers.has(A)||(this._soundPlayers.add(A),this.update())}removeSoundPlayer(A){this._soundPlayers.remove(A)}getInputNode(){return this.inputNode}connect(A){const{firstEffect:e,lastEffect:t}=this;if(A===t)return this.inputNode.disconnect(),void this.inputNode.connect(t.getInputNode());A!==e&&(this.target=A,e.connect(A))}getSoundPlayers(){return[...this._soundPlayers]}setEffectsFromTarget(A){this._effects.forEach(e=>{"soundEffects"in A&&e.name in A.soundEffects?e.set(A.soundEffects[e.name]):e.name in A&&e.set(A[e.name])})}set(A,e){A in this&&this[A].set(e)}update(){this._effects.forEach(A=>A.update())}clear(){this._effects.forEach(A=>A.clear())}dispose(){this._soundPlayers=null,this._effects.forEach(A=>A.dispose()),this._effects=null}}A.exports=t},function(A,e,t){const i=t(63);A.exports=class extends i{constructor(A,e,t){super(A,e,t),this.leftGain=null,this.rightGain=null,this.channelMerger=null}get name(){return"pan"}initialize(){const A=this.audioEngine.audioContext;this.inputNode=A.createGain(),this.leftGain=A.createGain(),this.rightGain=A.createGain(),this.channelMerger=A.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(A){this.value=A;const e=(A+100)/200,t=Math.cos(e*Math.PI/2),i=Math.sin(e*Math.PI/2),{currentTime:B,DECAY_WAIT:n,DECAY_DURATION:s}=this.audioEngine;this.leftGain.gain.setTargetAtTime(t,B+n,s),this.rightGain.gain.setTargetAtTime(i,B+n,s)}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(A,e,t){const i=t(63);A.exports=class extends i{constructor(A,e,t){super(A,e,t),this.ratio=1}get name(){return"pitch"}get _isPatch(){return!1}getInputNode(){return this.target.getInputNode()}initialize(){this.initialized=!0}_set(A){this.value=A,this.ratio=this.getRatio(this.value),this.updatePlayers(this.audioPlayer.getSoundPlayers())}update(){this.updatePlayers(this.audioPlayer.getSoundPlayers())}getRatio(A){const e=A/10;return Math.pow(2,e/12)}updatePlayer(A){A.setPlaybackRate(this.ratio)}updatePlayers(A){if(A)for(const e in A)A.hasOwnProperty(e)&&this.updatePlayer(A[e])}}},function(A,e,t){const i=t(42);A.exports=class{constructor(A,e){this.audioEngine=A,this.soundPlayers={},this.playerTargets=new Map,this.soundEffects=new Map,this.effectChainPrime=e}addSoundPlayer(A){this.soundPlayers[A.id]=A}getSoundPlayer(A){return this.soundPlayers[A]||i.error("SoundBank.getSoundPlayer(".concat(A,"): called missing sound in bank")),this.soundPlayers[A]}getSoundEffects(A){return this.soundEffects.has(A)||this.soundEffects.set(A,this.effectChainPrime.clone()),this.soundEffects.get(A)}playSound(A,e){const t=this.getSoundEffects(e),i=this.getSoundPlayer(e);return this.playerTargets.get(e)!==A&&i.stop(),this.playerTargets.set(e,A),t.addSoundPlayer(i),t.setEffectsFromTarget(A),i.connect(t),i.play(),i.finished()}setEffects(A){this.playerTargets.forEach((e,t)=>{e===A&&this.getSoundEffects(t).setEffectsFromTarget(A)})}stop(A,e){this.playerTargets.get(e)===A&&this.soundPlayers[e].stop()}stopAllSounds(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*";this.playerTargets.forEach((e,t)=>{"*"!==A&&e!==A||this.getSoundPlayer(t).stop()})}dispose(){this.playerTargets.clear(),this.soundEffects.forEach(A=>A.dispose()),this.soundEffects.clear();for(const A in this.soundPlayers)this.soundPlayers.hasOwnProperty(A)&&this.soundPlayers[A].dispose();this.soundPlayers={}}}},function(A,e,t){"use strict";t.r(e),t.d(e,"SB1File",(function(){return ie})),t.d(e,"AssertionError",(function(){return i})),t.d(e,"ValidationError",(function(){return B}));class i extends Error{}class B extends i{}const n=function(A,e){if(!A)throw new i(e)};n.validate=function(A,e){if(!A)throw new B(e)};class s{constructor(A){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.buffer=A,this.position=e,this.uint8a=new Uint8Array(this.buffer)}read(A){const e=A.read(this.uint8a,this.position);return 0===A.size?this.position+=A.sizeOf(this.uint8a,this.position):this.position+=A.size,e}readStruct(A){const e=new A(this.uint8a,this.position);return this.position+=A.size,e}resize(A){if(this.buffer.byteLength1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A.length;n(A instanceof Uint8Array,"writeBytes must be passed an Uint8Array"),this.resize(this.position+(t-e));for(let i=e;i1&&void 0!==arguments[1]?arguments[1]:1/0;this.iter=A,this.maxPosition=e}[Symbol.iterator](){return this}next(){return this.iter.stream.position>=this.maxPosition?{value:null,done:!0}:this.iter.next()}}const o=()=>{throw new Error("Not implemented")},g=(()=>{const A=new Uint16Array(1),e=new Uint8Array(A.buffer);return A[0]=43707,187===e[0]})();class a{constructor(A){let{size:e=0,sizeOf:t=(()=>e),writeSizeOf:i=o,toBytes:B=new Uint8Array(1),read:n,write:s=o}=A;this.size=e,this.sizeOf=t,this.writeSizeOf=i,this.toBytes=B,this.bytes=new Uint8Array(B.buffer),this.read=n,this.write=s}asPropertyObject(A){const e=this;return{get(){return e.read(this.uint8a,A+this.offset)},set(t){return e.write(this.uint8a,A+this.offset,t)},enumerable:!0}}read(){return null}}const c=new a({size:1,read:(A,e)=>A[e],write:(A,e,t)=>(A[e]=t,t)}),Q={size:2,read(A,e){return this.bytes[1]=A[e+0],this.bytes[0]=A[e+1],this.toBytes[0]},write(A,e,t){return this.toBytes[0]=t,A[e+0]=this.bytes[1],A[e+1]=this.bytes[0],t}},E={size:2,read(A,e){return this.bytes[0]=A[e+0],this.bytes[1]=A[e+1],this.toBytes[0]},write(A,e,t){return this.toBytes[0]=t,A[e+0]=this.bytes[0],A[e+1]=this.bytes[1],t}};let w;w=g?Q:E;new a(Object.assign({},w,{toBytes:new Uint16Array(1)}));const C=new a(Object.assign({},w,{toBytes:new Int16Array(1)})),l={size:4,read(A,e){return this.bytes[3]=A[e+0],this.bytes[2]=A[e+1],this.bytes[1]=A[e+2],this.bytes[0]=A[e+3],this.toBytes[0]},write(A,e,t){return this.toBytes[0]=t,A[e+0]=this.bytes[3],A[e+1]=this.bytes[2],A[e+2]=this.bytes[1],A[e+3]=this.bytes[0],t}},I={size:4,read(A,e){return this.bytes[0]=A[e+0],this.bytes[1]=A[e+1],this.bytes[2]=A[e+2],this.bytes[3]=A[e+3],this.toBytes[0]},write(A,e,t){return this.toBytes[0]=t,A[e+0]=this.bytes[0],A[e+1]=this.bytes[1],A[e+2]=this.bytes[2],A[e+3]=this.bytes[3],t}};let h;h=g?l:I;const u=new a(Object.assign({},h,{toBytes:new Int32Array(1)})),d=new a(Object.assign({},h,{toBytes:new Uint32Array(1)}));let Y;Y=g?E:Q;const M=new a(Object.assign({},Y,{toBytes:new Uint16Array(1)}));let F;F=g?I:l;const D=new a(Object.assign({},F,{toBytes:new Uint32Array(1)}));let m;m=g?{size:8,read(A,e){return this.bytes[7]=A[e+0],this.bytes[6]=A[e+1],this.bytes[5]=A[e+2],this.bytes[4]=A[e+3],this.bytes[3]=A[e+4],this.bytes[2]=A[e+5],this.bytes[1]=A[e+6],this.bytes[0]=A[e+7],this.toBytes[0]}}:{size:8,read(A,e){return this.bytes[7]=A[e+0],this.bytes[6]=A[e+1],this.bytes[5]=A[e+2],this.bytes[4]=A[e+3],this.bytes[3]=A[e+4],this.bytes[2]=A[e+5],this.bytes[1]=A[e+6],this.bytes[0]=A[e+7],this.toBytes[0]}};const p=new a(Object.assign({},m,{toBytes:new Float64Array(1)}));class U extends a{constructor(A){super({size:A,read(e,t){let i="";for(let B=0;BA[e+0]<<16|A[e+1]<<8|A[e+2]}:{size:3,read:(A,e)=>A[e+2]<<16|A[e+1]<<8|A[e+0]});const G=new a({sizeOf(A,e){const t=C.read(A,e);return C.size+t},read(A,e){let t=0,i=0;const B=C.read(A,e);for(let n=0;nd.size+d.read(A,e),read(A,e){const t=d.read(A,e);return n(t<10485760,"bytes too big"),e+=d.size,n(t<10485760,"uint8a array too big"),new Uint8Array(A.buffer,e,t)}}),R=new a({sizeOf:(A,e)=>d.size+2*d.read(A,e),read(A,e){const t=d.read(A,e);n(t<10485760,"sound too big"),e+=d.size;const i=2*t;return n(i<10485760,"uint8a array too big"),new Uint8Array(A.buffer,e,i)}}),k=new a({sizeOf:(A,e)=>d.size+d.read(A,e)*d.size,read(A,e){const t=d.read(A,e);n(t<10485760,"bitmap too big"),e+=d.size,n(t<10485760,"uint8a array too big");const i=new Uint32Array(t);for(let B=0;Bd.size+d.read(A,e),read(A,e){const t=d.read(A,e);return n(t<10485760,"utf8 too big"),e+=d.size,n(t<10485760,"uint8a array too big"),x.decode(new Uint8Array(A.buffer,e,t))}}),T=new a({size:4,read(A,e){const t=d.read(A,e);return(255<<24|(t>>22&255)<<16|(t>>12&255)<<8|t>>2&255)>>>0}}),S=new a({size:5,read(A,e){const t=d.read(A,e);return(c.read(A,e)<<24|(t>>22&255)<<16|(t>>12&255)<<8|t>>2&255)>>>0}}),b={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},j=Object.entries(b).reduce((A,e)=>{let[t,i]=e;return A[i]=t,A},{});class z{constructor(A,e){this.classId=A,this.position=e}}const v=A=>"object"==typeof A&&A?A.valueOf():A;class L extends z{constructor(A,e,t){super(A,e),this.value=t}valueOf(){return this.value}toJSON(){return this.classId===b.TRANSLUCENT_COLOR||this.classId===b.COLOR?16777215&this.value:this.value}toString(){return this.value}}class P extends z{constructor(A,e,t){super(A,e),this.size=t}}class W extends z{constructor(A,e,t){super(A,e),this.index=t}valueOf(){return"Ref(".concat(this.index,")")}}class O extends P{constructor(A,e,t,i){super(A,e,i),this.version=t}}class V{constructor(A){let{type:e=L,read:t,value:i=(t?A=>A.read(t):null)}=A;this.type=e,this.value=i}next(A,e,t){return{value:new this.type(e,t,this.value(A)),done:!1}}}const K={[b.NULL]:{value:()=>null},[b.TRUE]:{value:()=>!0},[b.FALSE]:{value:()=>!1},[b.SMALL_INT]:{read:u},[b.SMALL_INT_16]:{read:C},[b.LARGE_INT_POSITIVE]:{read:G},[b.LARGE_INT_NEGATIVE]:{read:G},[b.FLOATING]:{read:p},[b.STRING]:{read:y},[b.SYMBOL]:{read:y},[b.BYTES]:{read:H},[b.SOUND]:{read:R},[b.BITMAP]:{read:k},[b.UTF8]:{read:J},[b.ARRAY]:{type:P,read:u},[b.ORDERED_COLLECTION]:{type:P,read:u},[b.SET]:{type:P,read:u},[b.IDENTITY_SET]:{type:P,read:u},[b.DICTIONARY]:{type:P,value:A=>2*A.read(u)},[b.IDENTITY_DICTIONARY]:{type:P,value:A=>2*A.read(u)},[b.COLOR]:{read:T},[b.TRANSLUCENT_COLOR]:{read:S},[b.POINT]:{type:P,value:()=>2},[b.RECTANGLE]:{type:P,value:()=>4},[b.FORM]:{type:P,value:()=>5},[b.SQUEAK]:{type:P,value:()=>6},[b.OBJECT_REF]:{type:W,read:N}},X=Array.from({length:256},(A,e)=>K[e]?new V(K[e]):null),_=new V({type:class extends P{constructor(A,e){super(A,e,0)}},value:()=>null});class Z{constructor(A,e){this.buffer=A,this.stream=new s(A,e)}[Symbol.iterator](){return this}next(){if(this.stream.position>=this.stream.uint8a.length)return{value:null,done:!0};const A=this.stream.position,e=this.stream.read(c),t=X[e];if(null!==t)return t.next(this.stream,e,A);if(e1&&void 0!==arguments[1]?arguments[1]:q;class t extends e{get FIELDS(){return A}static get FIELDS(){return A}}return Object.keys(A).forEach(e=>{const i=A[e];Object.defineProperty(t.prototype,e.toLowerCase().replace(/_(\w)/g,A=>{let[,e]=A;return e.toUpperCase()}),{get(){return this.fields[i]}})}),t}}class ${constructor(){let A;this.bit=new Uint32Array(1),this.crc=0,this.c=0,this.table=[];for(let e=0;e<256;e++){A=e;for(let e=0;e<8;e++)A=1&A?3988292384^A>>>1:A>>>1;this.table[e]=A>>>0}}update(A){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A.length,i=~this.crc>>>0;for(let B=0;B>>8^this.table[255&(i^A[e+B])];return this.crc=~i>>>0,this}get digest(){return this.crc}}const AA=[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],eA=[4294967295,4278190080],tA=new a({sizeOf(A,e){const t=A[e];return t<=223?1:t<=254?2:5},read(A,e){const t=A[e];return t<=223?t:t<=254?256*(t-224)+A[e+1]:d.read(A,e+1)}});class iA{decode(A,e,t,i,B){const n=this.decodePixels(i,32===t);if(t<=8)return B||(B=1===t?eA:AA),this.unpackPixels(n,A,e,t,B);if(16===t)return this.raster16To32(n,A,e);if(32===t)return n;throw new Error("Unhandled Squeak Image depth.")}decodePixels(A,e){let t;if(Array.isArray(A)||A instanceof Uint32Array){if(t=new Uint32Array(A),e)for(let A=0;A>2;let s;switch(3&A){case 0:n+=B;break;case 1:s=i.read(c),s|=s<<24|s<<16|s<<8,e&&0!==s&&(s|=4278190080);for(let A=0;A>a&s],a-=i}return n}raster16To32(A,e,t){const i=new Uint32Array(2*A.length);let B,n,s,r=0,o=0;for(let g=0;g>B&65535,0!==s){s=4278190080|(s>>7&248)<<16|(s>>2&248)<<8|s<<3&248}i[o++]=s,B-=16}}return i}buildCustomColormap(A,e,t){const i=new Uint32Array(1<>1,this.bitPosition=0,this.currentByte=0,this.stream=null,this.end=0}decode(A){this.bitPosition=0,this.currentByte=0,this.stream=new s(A.buffer,A.byteOffset),this.end=A.byteOffset+A.length;const e=Math.floor(8*A.length/this.bitsPerSample),t=new Int16Array(e);let i=0,B=0;for(let A=0;A=0,"Ran out of bits in Squeak Sound");let s=BA[B],r=0;for(let A=this.valueHighBit;A>0;A>>=1)0!=(e&A)&&(r+=s),s>>=1;r+=s,i+=0==(e&this.signMask)?r:-r,B+=this.indexTable[e],B<0&&(B=0),B>88&&(B=88),i>32767&&(i=32767),i<-32768&&(i=-32768),t[A]=i}return t}nextCode(){let A=this.bitsPerSample,e=A-this.bitPosition,t=e<0?this.currentByte>>-e:this.currentByte<0;){if(A-=this.bitPosition,!(this.end-this.stream.position>0))return this.currentByte=0,this.bitPosition=0,-1;this.currentByte=this.stream.read(c),this.bitPosition=8,e=A-this.bitPosition,t+=e<0?this.currentByte>>-e:this.currentByte<>8-this.bitPosition,t}static samples(A,e){return 8*e.length/A}}class rA{constructor(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Uint8Array(this.size),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.uint8a=A,this.offset=e}equals(A){for(const e in A)if(this[e]!==A[e])return!1;return!0}view(){const A=this.constructor.name,e={toString:()=>A};for(const A in this.shape)e[A]=this[A];return e}static initConstructor(A){return A.size=A.prototype.size,A}static extend(A){const e=class extends rA{get shape(){return A}};let t=0;return Object.keys(A).forEach(i=>{if(Object.defineProperty(e.prototype,i,A[i].asPropertyObject(t)),0===A[i].size)throw new Error("Packet cannot be defined with variable sized members.");t+=A[i].size}),e.prototype.size=t,e.size=t,e}}class oA extends(rA.extend({riff:new U(4),length:D,wave:new U(4)})){}rA.initConstructor(oA);class gA extends(rA.extend({chunkType:new U(4),length:D})){}rA.initConstructor(gA);class aA extends(rA.extend({format:M,channels:M,sampleRate:D,bytesPerSec:D,blockAlignment:M,bitsPerSample:M})){}rA.initConstructor(aA);class cA{encode(A){let{channels:e=1,sampleRate:t=22050}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=new Uint8Array(A.buffer,A.byteOffset,A.byteLength),B=oA.size+gA.size+aA.size+gA.size+i.length,n=new s(new ArrayBuffer(B));return n.writeStruct(oA,{riff:"RIFF",length:B-8,wave:"WAVE"}),n.writeStruct(gA,{chunkType:"fmt ",length:aA.size}),n.writeStruct(aA,{format:1,channels:e,sampleRate:t,bytesPerSec:2*t*e,blockAlignment:2*e,bitsPerSample:16}),n.writeStruct(gA,{chunkType:"data",length:B-n.position-gA.size}),n.writeBytes(i),n.uint8a}static encode(A,e){return(new cA).encode(A,e)}static samples(A){const e=new gA(A,oA.size).length;return new gA(A,oA.size+gA.size+e).length/2}}var QA=t(23),EA=t.n(QA);class wA extends(q.define({X:0,Y:1})){}class CA extends(q.define({X:0,Y:1,X2:2,Y2:3})){get width(){return this.x2-this.x}get height(){return this.y2-this.y}}class lA extends(q.define({WIDTH:0,HEIGHT:1,DEPTH:2,BYTES:4,COLORMAP:5})){get decoded(){return this._decoded||(this._decoded=(A=>{for(let e=0;eA.valueOf())).buffer))),this._decoded}get extension(){return"uncompressed"}}class IA extends(q.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 hA extends(q.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 0==(1&this.fields[this.FIELDS.VISIBLE])}get tempoBPM(){return this.fields[this.FIELDS.TEMPO_BPM]||0}get lists(){return this.fields[this.FIELDS.LISTS]||[]}}q.define({RECTANGLE:0,FONT:8,COLOR:9,LINES:11});class uA extends(q.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 lA?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 A=(new $).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=A.digest}return this._crc}get extension(){return this.oldComposite instanceof lA?"uncompressed":this.baseLayerData.value?"jpg":"uncompressed"}toString(){return'ImageMediaData "'.concat(this.costumeName,'"')}}class dA extends(q.define({DATA:3,RATE:4})){}class YA extends(q.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 sA(this.bitsPerSample.value).decode(this.data.value):this._decoded=new Int16Array((A=>{const e=new Uint8Array(A);for(let t=0;tHA[e]||null);class kA{constructor(A){this.valueIterator=A}[Symbol.iterator](){return this}next(){const A=this.valueIterator.next();if(A.done)return A;const e=A.value,{classId:t}=e;let i=e;if(e instanceof P){i=[];for(let A=0;A>>16;for(let n=0;n1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A.length;return this.stream.writeBytes(A,e,t)}}class OA extends WA{constructor(A){super(A),this.stream.writeStruct(vA,{cmf:8,flag:29}),this.adler=new zA,this.chunk=this.stream.writeStruct(LA,{lastPacket:0,length:0,lengthCheck:65535})}get _deflateIndex(){return this.chunk.length}set _deflateIndex(A){return this.chunk.length=A,this.chunk.lengthCheck=65535^A,this.chunk.length}writeStruct(A,e){this.writeBytes(Object.assign(new A,e).uint8a)}writeBytes(A){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A.length,i=e;for(;t-i>0;){65535===this._deflateIndex&&(this.chunk=this.stream.writeStruct(LA,{lastPacket:0,length:0,lengthCheck:65535}));const e=Math.min(t-i,65535-this._deflateIndex);this.stream.writeBytes(A,i,i+e),this._deflateIndex+=e,i+=e}this.adler.update(A,e,t-e)}finish(){this.chunk.lastPacket=1,this.stream.writeStruct(PA,{checksum:this.adler.digest})}static estimateSize(A){const e=Math.ceil(A/65535);return vA.size+e*LA.size+PA.size+A}}class VA extends WA{constructor(A){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"IHDR";super(A),this.start=this.stream.writeStruct(TA,{length:0,chunkType:e}),this.crc=new $}finish(){const A=this.start.offset+this.start.size,e=this.position-A;this.start.length=e,this.crc.update(this.stream.uint8a,A-d.size,e+d.size),this.stream.writeStruct(SA,{checksum:this.crc.digest})}static size(A){return TA.size+A+SA.size}}class KA{encode(A,e,t){const i=4*A+jA.size,B=i*e,n=JA.size+VA.size(bA.size)+VA.size(OA.estimateSize(B))+VA.size(0),r=new s(new ArrayBuffer(n));r.writeStruct(JA,{support8Bit:137,png:"PNG",dosLineEnding:"\r\n",dosEndOfFile:"",unixLineEnding:"\n"});const o=new VA(r,"IHDR");o.writeStruct(bA,{width:A,height:e,bitDepth:8,colorType:6,compressionMethod:0,filterMethod:0,interlaceMethod:0}),o.finish();const g=new VA(r,"IDAT"),a=new OA(g);let c=0;for(;c"uncompressed"===A.extension?new Uint8Array(KA.encode(A.width,A.height,A.decoded)):A.decoded,qA=A=>{const e=String(A[A.length-1]),t=A.length-1;return"mouse"===e?A[t]="_mouse_":"edge"===e?A[t]="_edge_":A[A.length-1]instanceof IA&&(A[t]="_stage_"),A},$A={getParam:A=>{let[e,t,i,B]=A;return[e,t,i,B||"r"]},changeVariable:A=>[A[2],A[1],A[3]],EventHatMorph:A=>"Scratch-StartClicked"===String(A[1])?["whenGreenFlag"]:["whenIReceive",A[1]],MouseClickEventHatMorph:()=>["whenClicked"],KeyEventHatMorph:A=>["whenKeyPressed",A[1]],stopScripts:A=>"other scripts"===String(A[1])?[A[0],"other scripts in sprite"]:A,abs:A=>["computeFunction:of:","abs",A[1]],sqrt:A=>["computeFunction:of:","sqrt",A[1]],"\\\\":A=>["%",...A.slice(1)],doReturn:()=>["stopScripts","this script"],stopAll:()=>["stopScripts","all"],"showBackground:":A=>["startScene",A[1]],nextBackground:()=>["nextScene"],doForeverIf:A=>["doForever",[["doIf",A[1],A[2]]]],"getAttribute:of:":qA,"gotoSpriteOrMouse:":qA,"distanceTo:":qA,"pointTowards:":qA,"touching:":qA},Ae=A=>{const{info:e,stageData:t,images:i,sounds:B}=A,n=A=>{const e=[];for(let t=0;t{let[e,t]=A;return{name:e,value:t,isPersistent:!1}},r=A=>{let[,{listName:e,contents:t,x:i,y:B,width:n,height:s,hiddenWhenNull:r}]=A;return{listName:e,contents:t,isPersistent:!1,x:i,y:B,width:n,height:s,visible:null!==(o=r,"object"==typeof o&&o?o.valueOf():o)};var o},o=A=>{const e=B.findIndex(e=>e.crc===A.crc);return{soundName:A.name,soundID:e,md5:"".concat(A.md5,".wav"),sampleCount:A.sampleCount,rate:A.rate,format:""}},g=A=>{const e=i.findIndex(e=>e.crc===A.crc);return{costumeName:A.costumeName,baseLayerID:e,baseLayerMD5:"".concat(EA()(A.rawBytes),".").concat((t=A,"uncompressed"===t.extension?"png":"jpg")),bitmapResolution:1,rotationCenterX:A.rotationCenter.x,rotationCenterY:A.rotationCenter.y};var t},a=A=>{let e=A.map(Q);const t=$A[e[0]];return t&&(e=t(e)),e},c=A=>A.map(a),Q=A=>A instanceof hA?A.objName:Array.isArray(A)?0===A.length||Array.isArray(A[0])?c(A):a(A):A,E=A=>[A[0].x,A[0].y,c(A[1])],w=A=>A instanceof hA?(A=>{const e=A.media.filter(A=>A instanceof uA),i=A.media.filter(A=>A instanceof YA);return{objName:A.objName,variables:n(A.vars).map(s),lists:n(A.lists).map(r),scripts:A.blocksBin.map(E),costumes:e.map(g),currentCostumeIndex:e.findIndex(e=>e.crc===A.currentCostume.crc),sounds:i.map(o),scratchX:A.scratchX,scratchY:A.scratchY,scale:A.scalePoint.x,direction:Math.round(1e6*A.rotationDegrees)/1e6-270,rotationStyle:A.rotationStyle,isDraggable:A.draggable,indexInLibrary:t.spriteOrderInLibrary.indexOf(A),visible:A.visible,spriteInfo:{}}})(A):null;return JSON.parse(JSON.stringify(Object.assign((A=>{const e=A.media.filter(A=>A instanceof uA),t=A.media.filter(A=>A instanceof YA);return{objName:A.objName,variables:n(A.vars).map(s),lists:n(A.lists).map(r),scripts:A.blocksBin.map(E),costumes:e.map(g),currentCostumeIndex:e.findIndex(e=>e.crc===A.currentCostume.crc),sounds:t.map(o),penLayerMD5:"5c81a336fab8be57adc039a8a2b33ca9.png",penLayerID:0,tempoBPM:A.tempoBPM,videoAlpha:.5,children:A.stageContents.map(w).filter(Boolean).reverse()}})(t),{info:(A=>{const e={};for(let t=0;t{let{images:e,sounds:t}=A;const i={};let B=0;for(const A of e)i["".concat(B++,".").concat((n=A,"uncompressed"===n.extension?"png":"jpg"))]={bytes:ZA(A)};var n,s;B=0;for(const A of t)i["".concat(B++,".wav")]={bytes:(s=A,s.wavEncodedData)};return new _A(i)})({images:this.images(),sounds:this.sounds()})}view(){return{signature:this.signature,infoHeader:this.infoHeader,dataHeader:this.dataHeader,toString:()=>"SB1File"}}infoRaw(){return new r(new Z(this.buffer,this.infoHeader.offset+te.size),this.signature.infoByteLength+ee.size)}infoTable(){return new kA(this.infoRaw())}info(){return this._info||(this._info=new xA(this.infoTable()).table[0]),this._info}dataRaw(){return new r(new Z(this.buffer,this.dataHeader.offset+te.size),this.stream.uint8a.length)}dataTable(){return new kA(this.dataRaw())}dataFixed(){return this._data||(this._data=new xA(this.dataTable()).table),this._data}data(){return this.dataFixed()[0]}images(){const A=new Set;return this.dataFixed().filter(e=>e instanceof uA&&(!A.has(e.crc)&&(A.add(e.crc),!0)))}sounds(){const A=new Set;return this.dataFixed().filter(e=>e instanceof YA&&(!A.has(e.crc)&&(A.add(e.crc),!0)))}}},function(A,e,t){"use strict";t.r(e);var i={};t.r(i),t.d(i,"Scaffolding",(function(){return z})),t.d(i,"Cloud",(function(){return Y})),t.d(i,"VM",(function(){return n.a})),t.d(i,"Renderer",(function(){return r.a})),t.d(i,"Storage",(function(){return c})),t.d(i,"AudioEngine",(function(){return E.a})),t.d(i,"JSZip",(function(){return l.a}));var B=t(64),n=t.n(B),s=t(66),r=t.n(s),o=t(129),g=t.n(o);class a extends g.a{constructor(){super(),this._totalAssets=0,this._loadedAssets=0}_updateProgress(){this.onprogress&&this.onprogress(this._totalAssets,this._loadedAssets)}load(A,e,t){return A===this.AssetType.ImageBitmap||A===this.AssetType.ImageVector||A===this.AssetType.Sound||A===this.AssetType.Font?(this._totalAssets++,this._updateProgress(),super.load(A,e,t).then(A=>(this._loadedAssets++,this._updateProgress(),A))):super.load(A,e,t)}}var c=a,Q=t(67),E=t.n(Q),w=t(65),C=t(24),l=t.n(C);const I=[],h=A=>{let e;var t;return 0===I.length?(t={audio:!1,video:A},e=navigator.mediaDevices?navigator.mediaDevices.getUserMedia(t):Promise.reject(new Error("video is not supported in this context (insecure domain?)")),I.push(e)):I.length>0&&(e=I[0],I.push(!0)),e};class u{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(A=>this.onError(A))}_teardown(){if(!1===this.enabled){const A=(I.pop(),!(I.length>0));this._singleSetup=null,this._video=null,this._track&&A&&this._track.stop(),this._track=null}}getFrame(A){let{dimensions:e=u.DIMENSIONS,mirror:t=this.mirror,format:i=u.FORMAT_IMAGE_DATA,cacheTimeout:B=this._frameCacheTimeout}=A;if(!this.videoReady)return null;const[n,s]=e,r=this._getWorkspace({dimensions:e,mirror:Boolean(t)}),{videoWidth:o,videoHeight:g}=this._video,{canvas:a,context:c,lastUpdate:Q,cacheData:E}=r,w=Date.now();Q+B{this._video=document.createElement("video");try{this._video.srcObject=A}catch(e){this._video.src=window.URL.createObjectURL(A)}return this._video.play(),this._track=A.getTracks()[0],this}).catch(A=>{this._singleSetup=null,this.onError(A)})),this._singleSetup}get videoReady(){if(!this.enabled)return!1;if(!this._video)return!1;if(!this._track)return!1;const{videoWidth:A,videoHeight:e}=this._video;return"number"==typeof A&&"number"==typeof e&&(0!==A&&0!==e)}_getWorkspace(A){let{dimensions:e,mirror:t}=A,i=this._workspace.find(A=>A.dimensions.join("-")===e.join("-")&&A.mirror===t);return i||(i={dimensions:e,mirror:t,canvas:document.createElement("canvas"),lastUpdate:0,cacheData:{}},i.canvas.width=e[0],i.canvas.height=e[1],i.context=i.canvas.getContext("2d"),this._workspace.push(i)),i}}var d=u;var Y={CloudManager:class{constructor(A){this.parent=A,this.providers=[],this.overrides=new Map}hasCloudData(){return this.parent.vm.runtime.hasCloudData()}projectReady(){if(this.hasCloudData())for(const A of this.providers)A.enable()}setVariable(A,e,t){this.overrides.has(e)&&this.overrides.get(e)!==A||this.parent.vm.postIOData("cloud",{varUpdate:{name:e,value:t}})}getUsername(){return this.parent._username}addProvider(A){A.manager=this,this.hasCloudData()&&A.enable(),this.providers.push(A)}requestCloseConnection(){}createVariable(A,e){}renameVariable(A,e){}deleteVariable(A){}addProviderOverride(A,e){if(e&&!this.providers.includes(e))throw new Error("Manager is not aware of this provider");this.overrides.set(A,e)}updateVariable(A,e){if(this.overrides.has(A)){const t=this.overrides.get(A);t&&t.handleUpdateVariable(A,e)}else for(const t of this.providers)t.handleUpdateVariable(A,e)}},WebSocketProvider:class{constructor(A,e){this.cloudHosts=Array.isArray(A)?A:[A],this.projectId=e,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(A){this.projectId=A,this.closeAndReconnect()}openConnection(){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(A){throw console.error(A),new Error("Cloud host ".concat(this.currentCloudHost," is invalid: ").concat(A))}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(A){console.error("WebSocket error",A)}onmessage(A){for(const e of A.data.split("\n"))if(e){const A=JSON.parse(e);"set"===A.method&&this.manager.setVariable(this,A.name,A.value)}}onopen(){this.attemptedConnections=0,this.writeToServer({method:"handshake"}),this.sendBufferedMessages(),console.log("WebSocket connected")}onclose(A){if(A&&4002===A.code)return void console.log("Username is invalid; not reconnecting.");if(A&&4004===A.code)return void console.log("Project is blocked; not reconnecting.");const e=Math.random()*(Math.pow(2,Math.min(this.attemptedConnections+1,5))-1)*1e3;console.log("Connection lost; reconnecting in ".concat(Math.round(e),"ms")),this.reconnectTimeout=setTimeout(this.openConnection,e)}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 A of this.bufferedMessages)this.writeToServer(A);this.bufferedMessages.length=0}bufferedWriteToServer(A){this.bufferedMessages.push(A),this.scheduleBufferedSend()}writeToServer(A){A.project_id=this.projectId,A.user=this.manager.getUsername(),this.ws.send(JSON.stringify(A))}handleUpdateVariable(A,e){for(const t of this.bufferedMessages)if(t.name===A)return void(t.value=e);this.bufferedWriteToServer({method:"set",name:A,value:e})}},LocalStorageProvider:class{constructor(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"p4:cloudvariables";this.key=A,this.variables={},this.handleStorageEvent=this.handleStorageEvent.bind(this)}readFromLocalStorage(){let A;try{if(A=JSON.parse(localStorage.getItem(this.key)),!A||"object"!=typeof A)return}catch(A){return}this.variables=A;for(const A of Object.keys(this.variables))this.manager.setVariable(this,A,this.variables[A])}storeToLocalStorage(){try{localStorage.setItem(this.key,JSON.stringify(this.variables))}catch(A){}}handleStorageEvent(A){A.key===this.key&&A.storageArea===localStorage&&this.readFromLocalStorage()}enable(){this.readFromLocalStorage(),window.addEventListener("storage",this.handleStorageEvent)}handleUpdateVariable(A,e){this.variables[A]=e,this.storeToLocalStorage()}}},M=t(130),F=t.n(M),D=t(68),m={insert:A=>{var e=document.head||document.body||document.documentElement;e.insertBefore(A,e.firstChild)},singleton:!1},p=(F()(D.a,m),D.a.locals||{});const U=A=>new Promise((e,t)=>{const i=new FileReader;i.onload=()=>e(i.result),i.onerror=()=>t(new Error("Cannot read as text: ".concat(i.error))),i.readAsText(A)});var f=class{constructor(A,e){this.el=A,this.callback=e,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(A){A.dataTransfer.types.includes("Files")&&(A.preventDefault(),A.dataTransfer.dropEffect="copy",this.el.classList.add(p.dropping))}ondragleave(A){A.preventDefault(),this.el.classList.remove(p.dropping)}ondrop(A){A.preventDefault(),this.el.classList.remove(p.dropping),A.dataTransfer.types.includes("Files")&&A.dataTransfer.files.length>0&&Promise.all(Array.from(A.dataTransfer.files).map(U)).then(A=>{this.callback(A)})}};var N=class{constructor(A,e){this.parent=A,this.text=e,this.root=document.createElement("div"),this.root.className=p.questionRoot,this.inner=document.createElement("div"),this.inner.className=p.questionInner,e&&(this.textElement=document.createElement("div"),this.textElement.textContent=e,this.textElement.className=p.questionText),this.inputContainer=document.createElement("div"),this.inputContainer.className=p.questionInputOuter,this.input=document.createElement("input"),this.input.className=p.questionInput,this.input.addEventListener("keypress",this.onkeypress.bind(this)),this.dropper=new f(this.input,this.dropperCallback.bind(this)),this.submitButton=document.createElement("button"),this.submitButton.className=p.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(A=>{this.callback=A})}answer(){return this.answerCallback}submit(){this.callback(this.input.value),this.destroy()}onkeypress(A){"Enter"===A.key&&this.submit()}dropperCallback(A){const e=A.join("").replace(/\r?\n/g," ");this.input.value=e}onsubmitpressclick(){this.submit()}destroy(){this.root.remove(),this.parent.question=null}};var G=class{constructor(A){this.parent=A,this.root=document.createElement("div"),this.root.className=p.contextMenu,this._onmousedown=this._onmousedown.bind(this),this._onresize=this._onresize.bind(this),this._onblur=this._onblur.bind(this)}_onmousedown(A){this.root.contains(A.target)||this.destroy()}_onresize(){this.destroy()}_onblur(){this.destroy()}add(A){const e=document.createElement("button");e.className=p.contextMenuItem,e.textContent=A.text,e.addEventListener("click",()=>{this.destroy(),A.callback()}),e.addEventListener("contextmenu",A=>{A.preventDefault()}),this.root.appendChild(e)}show(A){document.addEventListener("mousedown",this._onmousedown),window.addEventListener("resize",this._onresize),window.addEventListener("blur",this._onblur),this.parent._addLayer(this.root);const e=this.parent.layersRect,t=this.root.getBoundingClientRect();let i=A.clientX-e.left,B=A.clientY-e.top;i+t.width>e.width&&(i-=t.width),B+t.height>e.height&&(B-=t.height),this.root.style.transform="translate(".concat(i,"px, ").concat(B,"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 y=(A,e)=>{if("undefined"!=typeof ExternalDownloadHelper)return void ExternalDownloadHelper.download(A,e);const t=document.createElement("a");if(document.body.appendChild(t),navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(e,A);else if("download"in HTMLAnchorElement.prototype){const i=window.URL.createObjectURL(e);t.href=i,t.download=A,t.type=e.type,t.click(),window.setTimeout(()=>{document.body.removeChild(t),window.URL.revokeObjectURL(i)},1e3)}else{let A=window.open("","_blank");const t=new FileReader;t.onloadend=function(){A.location.href=t.result,A=null},t.readAsDataURL(e)}};class H{constructor(A,e){this.parent=A,this.id=e.get("id"),this.spriteName=e.get("spriteName"),this.targetId=e.get("targetId"),this.opcode=e.get("opcode"),this.params=e.get("params"),this.root=document.createElement("div"),this.root.className=p.monitorRoot,this.root.dataset.id=this.id,this.root.dataset.opcode=this.opcode,this.parent._monitorOverlay.appendChild(this.root)}getLabel(){let A;if("data_variable"===this.opcode)A=this.params.VARIABLE;else if("data_listcontents"===this.opcode)A=this.params.LIST;else if("motion_xposition"===this.opcode)A=this.parent.getMessage("var-x");else if("motion_yposition"===this.opcode)A=this.parent.getMessage("var-y");else if("motion_direction"===this.opcode)A=this.parent.getMessage("var-direction");else if("sensing_username"===this.opcode)A=this.parent.getMessage("var-username");else if("looks_costumenumbername"===this.opcode)A="number"===this.params.NUMBER_NAME?this.parent.getMessage("var-costume-number"):this.parent.getMessage("var-costume-name");else if("looks_backdropnumbername"===this.opcode)A="number"===this.params.NUMBER_NAME?this.parent.getMessage("var-backdrop-number"):this.parent.getMessage("var-backdrop-name");else if("looks_size"===this.opcode)A=this.parent.getMessage("var-size");else if("sensing_answer"===this.opcode)A=this.parent.getMessage("var-answer");else if("sensing_mousedown"===this.opcode)A=this.parent.getMessage("var-mousedown");else if("sensing_mousex"===this.opcode)A=this.parent.getMessage("var-mousex");else if("sensing_mousey"===this.opcode)A=this.parent.getMessage("var-mousey");else if("sensing_loudness"===this.opcode)A=this.parent.getMessage("var-loudness");else if("sensing_timer"===this.opcode)A=this.parent.getMessage("var-timer");else if("sensing_dayssince2000"===this.opcode)A=this.parent.getMessage("var-dayssince2000");else if("sound_volume"===this.opcode)A=this.parent.getMessage("var-volume");else if("sensing_current"===this.opcode){const e=this.params.CURRENTMENU.toLowerCase();"year"===e?A=this.parent.getMessage("var-year"):"month"===e?A=this.parent.getMessage("var-month"):"date"===e?A=this.parent.getMessage("var-date"):"dayofweek"===e?A=this.parent.getMessage("var-day-of-week"):"hour"===e?A=this.parent.getMessage("var-hour"):"minute"===e?A=this.parent.getMessage("var-minute"):"second"===e&&(A=this.parent.getMessage("var-second"))}else{const e=this.parent.vm.runtime.getLabelForOpcode(this.opcode);A=e?e.label:this.opcode}return this.spriteName?"".concat(this.spriteName,": ").concat(A):A}getTarget(){return this.targetId?this.parent.vm.runtime.getTargetById(this.targetId):this.parent.vm.runtime.getTargetForStage()}getVmVariable(){return this.getTarget().variables[this.id]}update(A){this.x=A.get("x"),this.y=A.get("y"),this.visible=A.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 R extends H{constructor(A,e){super(A,e),this.mode=e.get("mode"),"large"===this.mode?(this.valueElement=document.createElement("div"),this.valueElement.className=p.monitorLargeValue+" "+p.monitorValueColor,this.root.appendChild(this.valueElement)):(this.inner=document.createElement("div"),this.inner.className=p.monitorInner,this.valueRow=document.createElement("div"),this.valueRow.className=p.monitorRow,this.label=document.createElement("div"),this.label.className=p.monitorLabel,this.label.textContent=this.getLabel(),this.valueElement=document.createElement("div"),this.valueElement.className=p.monitorValue+" "+p.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=p.monitorRow,this.slider=document.createElement("input"),this.slider.className=p.monitorSlider,this.slider.type="range",this.slider.min=e.get("sliderMin"),this.slider.max=e.get("sliderMax"),this.slider.step=e.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(A){const e=this.getVmVariable();if(e.value=A,e.isCloud){this.parent.vm.runtime.ioDevices.cloud.requestUpdateVariable(e.name,e.value)}this._value=A,this.valueElement.textContent=A}onsliderchange(A){this.setVariableValue(+A.target.value)}update(A){if(super.update(A),!this.visible)return;let e=A.get("value");"number"==typeof e&&(e=Number(e.toFixed(6))),this._value!==e&&(this._value=e,this.valueElement.textContent=e,this.slider&&(this.slider.value=e))}}class k{constructor(A){this.monitor=A,this.index=-1,this.value="",this.locked=!1,this.root=document.createElement("label"),this.root.className=p.monitorRowRoot,this.indexEl=document.createElement("div"),this.indexEl.className=p.monitorRowIndex,this.valueOuter=document.createElement("div"),this.valueOuter.className=p.monitorRowValueOuter,this.editable=this.monitor.editable,this.editable?(this.valueInner=document.createElement("input"),this.valueInner.tabIndex=-1,this.valueInner.className=p.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=p.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=p.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(p.monitorRowValueEditing),this.addNewValue=!1,this.deleteValue=!1,this.valueWasChanged=!1)}_onblurinput(){if(this.locked)if(this.unfocus(),this.deleteValue){const A=[...this.monitor.value];A.splice(this.index,1),this.monitor.setValue(A),this.monitor.tryToFocusRow(Math.min(A.length-1,this.index))}else if(this.valueWasChanged||this.addNewValue){const A=[...this.monitor.value];A[this.index]=this.valueInner.value,this.addNewValue&&A.splice(this.index+1,0,""),this.monitor.setValue(A),this.addNewValue&&this.monitor.tryToFocusRow(this.index+1)}}_oninput(){this.valueWasChanged=!0}_onkeypressinput(A){"Enter"===A.key&&(this.addNewValue=!0,this.valueInner.blur())}_onkeypressdown(A){if("Escape"===A.key)this.valueInner.blur();else if("ArrowUp"===A.key||"ArrowDown"===A.key||"Tab"===A.key){A.preventDefault();let e=this.index;"ArrowUp"===A.key||"Tab"===A.key&&A.shiftKey?(e--,e<0&&(e=this.monitor.value.length-1)):(e++,e>=this.monitor.value.length&&(e=0)),this.monitor.tryToFocusRow(e)}}_onclickdelete(A){A.preventDefault(),this.deleteValue=!0,this.valueInner.blur()}_oncontextmenu(A){this.locked?A.stopPropagation():A.preventDefault()}_oncontextmenuuneditable(A){const e=getSelection();this.valueInner.contains(e.anchorNode)&&!e.isCollapsed&&A.stopPropagation()}setIndex(A){this.index!==A&&(this.index=A,this.root.dataset.index=A,this.root.style.transform="translateY(".concat(24*A,"px)"),this.indexEl.textContent=A+1)}setValue(A){this.value===A||this.locked||(this.value=A,this.editable?this.valueInner.value=A:this.valueInner.textContent=A)}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(p.monitorRowValueEditing))}}class x extends H{constructor(A,e){super(A,e),this.editable=A.editableLists,this.rows=new Map,this.cachedRows=[],this.scrollTop=0,this.oldLength=-1,this.label=document.createElement("div"),this.label.className=p.monitorListLabel,this.label.textContent=this.getLabel(),this.footer=document.createElement("div"),this.footer.className=p.monitorListFooter,this.footerText=document.createElement("div"),this.footerText.className=p.monitorListFooterText,this.rowsOuter=document.createElement("div"),this.rowsOuter.className=p.monitorRowsOuter,this.rowsInner=document.createElement("div"),this.rowsInner.className=p.monitorRowsInner,this.rowsInner.addEventListener("scroll",this._onscroll.bind(this),{passive:!0}),this.endPoint=document.createElement("div"),this.endPoint.className=p.monitorRowsEndpoint,this.emptyLabel=document.createElement("div"),this.emptyLabel.textContent=A.getMessage("list-empty"),this.emptyLabel.className=p.monitorEmpty,this.editable&&(this.addButton=document.createElement("button"),this.addButton.className=p.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 f(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(A){this.setValue([...this.value,""]),this.tryToFocusRow(this.value.length-1)}unfocusAllRows(){for(const A of this.rows.values())A.unfocus()}tryToFocusRow(A){if(A>=0&&A{const e=A.target.files;if(0===e.length)return;const t=e[0];U(t).then(A=>this.import(A))}),A.click()}import(A){const e=A.split(/\r?\n/);this.setValue(e)}handleExport(){const A=this.getValue().join("\n"),e=new Blob([A],{type:"text/plain"});y("".concat(this.getLabel(),".txt"),e)}dropperCallback(A){this.import(A.join("\n"))}getValue(){return this.getVmVariable().value}setValue(A){this.getVmVariable().value=A,this.updateValue(A)}update(A){super.update(A),this.visible&&(this.width=A.get("width")||100,this.height=A.get("height")||200,this.root.style.width="".concat(this.width,"px"),this.root.style.height="".concat(this.height,"px"),this.updateValue(A.get("value")))}createRow(A){const e=this.cachedRows.pop()||new k(this);e.setIndex(A),e.setValue(this.value[A]),this.rows.set(A,e);let t=!1;for(const i of this.rowsInner.children){const B=i.dataset.index;if(!B)continue;if(+B>A){this.rowsInner.insertBefore(e.root,i),t=!0;break}}return t||this.rowsInner.appendChild(e.root),e}updateValue(A){this.value=A,A.length!==this.oldLength&&(this.oldLength=A.length,this.footerText.textContent=this.parent.getMessage("list-length").replace("{n}",A.length),this.endPoint.style.transform="translateY(".concat(24*A.length,"px)"),this.emptyLabel.style.display=A.length?"none":"");let e=Math.floor(this.scrollTop/24)-5;e<0&&(e=0);let t=Math.ceil((this.scrollTop+this.height)/24)+3;t>A.length-1&&(t=A.length-1);for(const i of this.rows.keys())if(it){const e=this.rows.get(i);(!e.locked||i>=A.length)&&(e.unfocus(),e.root.remove(),this.rows.delete(i),this.cachedRows.length<10&&this.cachedRows.push(e))}for(let i=e;i<=t;i++){const e=this.rows.get(i);e?e.setValue(A[i]):this.createRow(i)}}}var J=class{constructor(){this.hasItem=!1,this.root=document.createElement("div"),this.root.className=p.controlsBar,this.start=document.createElement("div"),this.end=document.createElement("div"),this.root.appendChild(this.start),this.root.appendChild(this.end)}addToStart(A){this.hasItem=!0,this.start.appendChild(A)}addToEnd(A){this.hasItem=!0,this.end.appendChild(A)}computeHeight(){return this.hasItem?this.root.getBoundingClientRect().height:0}};const T=A=>"number"==typeof A||"string"==typeof A||"boolean"==typeof A;var S=t(134);const b=A=>A.touches&&A.touches[0]?{x:A.touches[0].clientX,y:A.touches[0].clientY}:A.changedTouches&&A.changedTouches[0]?{x:A.changedTouches[0].clientX,y:A.changedTouches[0].clientY}:{x:A.clientX,y:A.clientY},j=A=>"function"==typeof A?A:()=>A;class z extends class{constructor(){this._events={}}addEventListener(A,e){this._events[A]||(this._events[A]=[]),this._events[A].push(e)}removeEventListener(A,e){const t=this._events[A];t&&(this._events[A]=t.filter(A=>A!==e))}dispatchEvent(A){const e=this._events[A.type];if(e)for(const t of e)t(A)}}{constructor(){super(),this.width=480,this.height=360,this.resizeMode="preserve-ratio",this.editableLists=!1,this.shouldConnectPeripherals=!0,this.usePackagedRuntime=!1,this.messages=S,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=p.root,this._layers=document.createElement("div"),this._layers.className=p.layers,this._root.appendChild(this._layers),this._canvas=document.createElement("canvas"),this._canvas.className=p.canvas,this._addLayer(this._canvas),this._overlays=document.createElement("div"),this._overlays.className=p.scaledOverlaysInner,this._overlaysOuter=document.createElement("div"),this._overlaysOuter.className=p.scaledOverlaysOuter,this._overlaysOuter.appendChild(this._overlays),this._addLayer(this._overlaysOuter),this._monitorOverlay=document.createElement("div"),this._monitorOverlay.className=p.monitorOverlay,this._overlays.appendChild(this._monitorOverlay),this._topControls=new J,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(A){this._layers.appendChild(A)}_scratchCoordinates(A,e){return{x:this.width/this.layersRect.width*(A-this.layersRect.width/2),y:-this.height/this.layersRect.height*(e-this.layersRect.height/2)}}_onmousemove(A){const{x:e,y:t}=b(A),i={x:e-this.layersRect.left,y:t-this.layersRect.top,canvasWidth:this.layersRect.width,canvasHeight:this.layersRect.height};if(this._mousedownPosition&&!this._draggingId){Math.sqrt(Math.pow(i.x-this._mousedownPosition.x,2)+Math.pow(i.y-this._mousedownPosition.y,2))>3&&(this._startDragging(i.x,i.y),this._cancelDragTimeout())}else if(this._draggingId){const A=this._scratchCoordinates(i.x,i.y);this.vm.postSpriteInfo({x:A.x-this._draggingStartMousePosition.x+this._draggingStartSpritePosition.x,y:A.y-this._draggingStartMousePosition.y+this._draggingStartSpritePosition.y,force:!0})}this.vm.postIOData("mouse",i)}_startDragging(A,e){if(this._draggingId)return;const t=this.renderer.pick(A,e);if(null===t)return;const i=this.vm.getTargetIdForDrawableId(t);if(null===i)return;const B=this.vm.runtime.getTargetById(i);B.draggable&&(B.goToFront(),this._draggingId=i,this._draggingStartMousePosition=this._scratchCoordinates(A,e),this._draggingStartSpritePosition={x:B.x,y:B.y},this.vm.startDrag(i))}_cancelDragTimeout(){clearTimeout(this._dragTimeout),this._dragTimeout=null}_onmousedown(A){const{x:e,y:t}=b(A),i={x:e-this.layersRect.left,y:t-this.layersRect.top,button:A.button,canvasWidth:this.layersRect.width,canvasHeight:this.layersRect.height,isDown:!0},B="undefined"!=typeof TouchEvent&&A instanceof TouchEvent;(0===A.button||B)&&(this._dragTimeout=setTimeout(this._startDragging.bind(this,i.x,i.y),400)),B&&(A.preventDefault(),document.activeElement&&document.activeElement.blur&&document.activeElement.blur()),this._mousedownPosition={x:i.x,y:i.y},this.vm.postIOData("mouse",i)}_onmouseup(A){this._cancelDragTimeout();const{x:e,y:t}=b(A),i={x:e-this.layersRect.left,y:t-this.layersRect.top,button:A.button,canvasWidth:this.layersRect.width,canvasHeight:this.layersRect.height,isDown:!1,wasDragged:null!==this._draggingId};this._mousedownPosition=null,this.vm.postIOData("mouse",i),this._draggingId&&(this.vm.stopDrag(this._draggingId),this._draggingStartMousePosition=null,this._draggingStartSpritePosition=null,this._draggingId=null)}_ontouchstart(A){this._onmousedown(A)}_ontouchmove(A){this._onmousemove(A)}_ontouchend(A){this._onmouseup(A)}_oncontextmenu(A){A.preventDefault()}_onwheel(A){const e={deltaX:A.deltaX,deltaY:A.deltaY};this.vm.postIOData("mouseWheel",e)}_onkeydown(A){if(A.target!==document&&A.target!==document.body)return;const e={key:A.key,keyCode:A.keyCode,isDown:!0};this.vm.postIOData("keyboard",e),(32===A.keyCode||A.keyCode>=37&&A.keyCode<=40||8===A.keyCode||222===A.keyCode||191===A.keyCode)&&A.preventDefault()}_onkeyup(A){const e={key:A.key,keyCode:A.keyCode,isDown:!1};this.vm.postIOData("keyboard",e),A.target!==document&&A.target!==document.body&&A.preventDefault()}_onresize(){this.relayout()}relayout(){const A=Math.max(1,this._root.offsetWidth),e=Math.max(1,this._root.offsetHeight),t=this._offsetFromTop+this._topControls.computeHeight(),i=this._offsetFromBottom,B=this._offsetFromLeft,n=this._offsetFromRight,s=Math.max(1,A-B-n),r=Math.max(1,e-t-i);"dynamic-resize"===this.resizeMode&&(this.vm.setStageSize?(this.width=s,this.height=r,this.vm.setStageSize(this.width,this.height)):console.warn("dynamic-resize not supported: vm does not implement setStageSize"));let o=s,g=r;"stretch"!==this.resizeMode&&(o=g/this.height*this.width,o>s&&(g=s/this.width*this.height,o=s));const a=e-g,c=A-o,Q=(c-B-n)/2+B-c/2,E=(a-t-i)/2+t-a/2;this._layers.style.transform="translate(".concat(Q,"px, ").concat(E,"px)"),this._layers.style.width="".concat(o,"px"),this._layers.style.height="".concat(g,"px"),this._overlays.style.transform="scale(".concat(o/this.width,", ").concat(g/this.height,")"),this.renderer.resize(o,g),this.layersRect=this._layers.getBoundingClientRect()}appendTo(A){A.appendChild(this._root),this.relayout()}setup(){this.vm=new n.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",(A,e)=>{this.width===A&&this.height===e||(this.width=A,this.height=e,this.relayout())}),this.cloudManager=new Y.CloudManager(this),this.renderer=new r.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 c,this.vm.attachStorage(this.storage),"undefined"!=typeof AudioContext||"undefined"!=typeof webkitAudioContext?(this.audioEngine=new E.a,this.vm.attachAudioEngine(this.audioEngine)):console.warn("AudioContext not supported. Sound will not work."),this.bitmapAdapter=new w.BitmapAdapter,this.vm.attachV2BitmapAdapter(this.bitmapAdapter),this.videoProvider=new d,this.vm.setVideoProvider(this.videoProvider)}async _connectPeripherals(){const A=A=>new Promise(e=>{const t=e=>{const t=Object.keys(e).map(A=>e[A]);if(t.length>0){const e=t[0];console.log("Connecting to peripheral",e),this.vm.connectPeripheral(A,e.peripheralId)}else console.error("No peripherals found for",A);B()},i=()=>{console.error("Peripheral scan timed out for",A),B()},B=()=>{this.vm.removeListener("PERIPHERAL_LIST_UPDATE",t),this.vm.removeListener("PERIPHERAL_SCAN_TIMEOUT",i),e()};this.vm.on("PERIPHERAL_LIST_UPDATE",t),this.vm.on("PERIPHERAL_SCAN_TIMEOUT",i),this.vm.scanForPeripheral(A)});for(const e of Object.keys(this.vm.runtime.peripheralExtensions))await A(e)}_onmonitorsupdate(A){for(const e of A.valueSeq()){const A=e.get("id");if(!this._monitors.has(A)){if(!e.get("visible"))continue;"list"===e.get("mode")?this._monitors.set(A,new x(this,e)):this._monitors.set(A,new R(this,e))}this._monitors.get(A).update(e)}}ask(A){return this._question=new N(this,A),this._question.answer()}_onquestion(A){this._question&&this._question.destroy(),null!==A&&this.ask(A).then(A=>{this.vm.runtime.emit("ANSWER",A)})}loadProject(A){return this.vm.loadProject(A).then(()=>{this.vm.setCloudProvider(this.cloudManager),this.cloudManager.projectReady(),this.renderer.draw(),setTimeout(()=>{this.renderer.draw()}),this.shouldConnectPeripherals&&this._connectPeripherals()})}setUsername(A){this._username=A,this.vm.postIOData("userData",{username:A})}addCloudProvider(A){this.cloudManager.addProvider(A)}addCloudProviderOverride(A,e){this.cloudManager.addProviderOverride(A,e)}addControlButton(A){let{element:e,where:t}=A;if("top-left"===t)this._topControls.addToStart(e);else{if("top-right"!==t)throw new Error("Unknown 'where': ".concat(t));this._topControls.addToEnd(e)}this.relayout()}getMessage(A){return this.messages[A]||A}setAccentColor(A){this._root.style.setProperty("--sc-accent-color",A),this._root.style.setProperty("--sc-accent-color-transparent","".concat(A,"59"))}start(){this.vm.start(),this.vm.greenFlag()}greenFlag(){this.start()}stopAll(){this.vm.stopAll()}_lookupVariable(A,e){const t=this.vm.runtime.getTargetForStage().lookupVariableByNameAndType(A,e);if(!t)throw new Error("Global ".concat(e||"variable"," does not exist: ").concat(A));return t}setExtensionSecurityManager(A){const e=this.vm.extensionManager.securityManager;if(e)for(const[t,i]of Object.entries(A))e[t]=j(i);else console.warn("setExtensionSecurityManager not supported: there is no security manager")}getVariable(A){return this._lookupVariable(A,"").value}setVariable(A,e){if(!T(e))throw new Error("Invalid variable value");this._lookupVariable(A,"").value=e}getList(A){return this._lookupVariable(A,"list").value}setList(A,e){if(!(A=>{if(!Array.isArray(A))return!1;for(let e=0;e + */B=[],void 0===(n="function"==typeof(i=function(){var A=function(A,e){this._dragged=!1,this._element=A,this._bindedMove=this._moved.bind(this),this._bindedEnd=this._ended.bind(this,e),A.addEventListener("touchstart",this._bindedEnd),A.addEventListener("touchmove",this._bindedMove),A.addEventListener("touchend",this._bindedEnd),A.addEventListener("mouseup",this._bindedEnd)};function e(A){return"running"===A.state}return A.prototype._moved=function(A){this._dragged=!0},A.prototype._ended=function(A){this._dragged||function(A){var e=A.createBuffer(1,1,A.sampleRate),t=A.createBufferSource();t.buffer=e,t.connect(A.destination),t.start(0),A.resume&&A.resume()}(A),this._dragged=!1},A.prototype.dispose=function(){this._element.removeEventListener("touchstart",this._bindedEnd),this._element.removeEventListener("touchmove",this._bindedMove),this._element.removeEventListener("touchend",this._bindedEnd),this._element.removeEventListener("mouseup",this._bindedEnd),this._bindedMove=null,this._bindedEnd=null,this._element=null},function(t,i,B){var n=new Promise((function(A){!function(A,t){e(A)?t():function i(){e(A)?t():(requestAnimationFrame(i),A.resume&&A.resume())}()}(t,A)})),s=[];return i||(i=document.body),function e(t,i,B){if(Array.isArray(t)||NodeList&&t instanceof NodeList)for(var n=0;n{const n=new i(A);"RIFF"!==n.readUint8String(4)&&(B.warn("incorrect adpcm wav header"),t());const s=n.readInt32();s+8!==A.byteLength&&B.warn("adpcm wav length in header: ".concat(s," is incorrect"));"WAVE"!==n.readUint8String(4)&&(B.warn("incorrect adpcm wav header"),t());const r=this.extractChunk("fmt ",n);this.encoding=r.readUint16(),this.channels=r.readUint16(),this.samplesPerSecond=r.readUint32(),this.bytesPerSecond=r.readUint32(),this.blockAlignment=r.readUint16(),this.bitsPerSample=r.readUint16(),r.position+=2,this.samplesPerBlock=r.readUint16(),this.adpcmBlockSize=(this.samplesPerBlock-1)/2+4;const o=this.extractChunk("data",n),g=this.numberOfSamples(o,this.adpcmBlockSize),a=this.audioContext.createBuffer(1,g,this.samplesPerSecond);this.imaDecompress(o,this.adpcmBlockSize,a.getChannelData(0)),e(a)})}extractChunk(A,e){for(e.position=12;e.position>1),1&A&&(B+=e>>2),B+=e>>3,r[t++]=8&A?-B:B}}return r}();let w=0;for(;w88&&(g=88),t[w++]=i/32768;const e=Math.min(Q,c-w),n=w;for(;w-n88?g=88:g<0&&(g=0),i+=o,i>32767?i=32767:i<-32768&&(i=-32768),t[w++]=i/32768,B=a>>4&15,o=E[16*g+B],g+=s[B],g>88?g=88:g<0&&(g=0),i+=o,i>32767?i=32767:i<-32768&&(i=-32768),t[w++]=i/32768}}}},function(A,e){class t{constructor(A){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A.byteLength,{_uint8View:i=new Uint8Array(A)}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.arrayBuffer=A,this.start=e,this.end=t,this._uint8View=i,this._position=e}extract(A){return new t(this.arrayBuffer,this._position,this._position+A,this)}getLength(){return this.end-this.start}getBytesAvailable(){return this.end-this._position}get position(){return this._position-this.start}set position(A){return this._position=A+this.start,A}readUint8(){const A=this._uint8View[this._position];return this._position+=1,A}readUint8String(A){const e=this._uint8View;let t="";const i=this._position+A;for(let A=this._position;A{this.audioStream=A,this.mic=this.audioContext.createMediaStreamSource(A),this.analyser=this.audioContext.createAnalyser(),this.mic.connect(this.analyser),this.micDataArray=new Float32Array(this.analyser.fftSize)}).catch(A=>{i.warn(A)})),this.mic&&this.audioStream.active){this.analyser.getFloatTimeDomainData(this.micDataArray);let A=0;for(let e=0;ethis.audioEngine.currentTime}handleEvent(A){"ended"===A.type&&this.onEnded()}onEnded(){this.emit("stop"),this.isPlaying=!1}_createSource(){null!==this.outputNode&&(this.outputNode.removeEventListener("ended",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("ended",this.handleEvent),null!==this.target&&this.connect(this.target)}initialize(){this.initialized=!0,this._createSource()}connect(A){return A===this.volumeEffect?(this.outputNode.disconnect(),void this.outputNode.connect(this.volumeEffect.getInputNode())):(this.target=A,this.initialized?(null===this.volumeEffect?(this.outputNode.disconnect(),this.outputNode.connect(A.getInputNode())):this.volumeEffect.connect(A),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("ended",this.handleEvent);const A=new n(this.audioEngine,this);return A.playbackRate=this.playbackRate,this.isPlaying&&(A.startingUntil=this.startingUntil,A.isPlaying=this.isPlaying,A.initialized=this.initialized,A.outputNode=this.outputNode,A.outputNode.addEventListener("ended",A.handleEvent),A.volumeEffect=this.volumeEffect,A.volumeEffect&&(A.volumeEffect.audioPlayer=A),null!==this.target&&A.connect(this.target),this.emit("stop"),A.emit("play")),this.outputNode=null,this.volumeEffect=null,this.initialized=!1,this.startingUntil=0,this.isPlaying=!1,A}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:A,DECAY_DURATION:e}=this.audioEngine;this.startingUntil=A+e,this.emit("play")}stop(){if(!this.isPlaying)return;const A=this.take();A.volumeEffect=new B(A.audioEngine,A,null),A.volumeEffect.connect(A.target),A.finished().then(()=>A.dispose()),A.volumeEffect.set(0);const{currentTime:e,DECAY_DURATION:t}=this.audioEngine;A.outputNode.stop(e+t)}stopImmediately(){this.isPlaying&&(this.outputNode.stop(),this.isPlaying=!1,this.startingUntil=0,this.emit("stop"))}finished(){return new Promise(A=>{this.once("stop",A)})}setPlaybackRate(A){this.playbackRate=A,this.initialized&&(this.outputNode.playbackRate.value=A)}}A.exports=n},function(A,e){class t{constructor(A,e){this.audioEngine=A,this.inputNode=this.audioEngine.audioContext.createGain(),this.effects=e;let t=null;this._effects=e.reverse().map(e=>{const i=new e(A,this,t);return this[i.name]=i,t=i,i}).reverse(),this.firstEffect=this._effects[0],this.lastEffect=this._effects[this._effects.length-1],this._soundPlayers=new Set}clone(){const A=new t(this.audioEngine,this.effects);return this.target&&A.connect(this.target),A}addSoundPlayer(A){this._soundPlayers.has(A)||(this._soundPlayers.add(A),this.update())}removeSoundPlayer(A){this._soundPlayers.remove(A)}getInputNode(){return this.inputNode}connect(A){const{firstEffect:e,lastEffect:t}=this;if(A===t)return this.inputNode.disconnect(),void this.inputNode.connect(t.getInputNode());A!==e&&(this.target=A,e.connect(A))}getSoundPlayers(){return[...this._soundPlayers]}setEffectsFromTarget(A){this._effects.forEach(e=>{"soundEffects"in A&&e.name in A.soundEffects?e.set(A.soundEffects[e.name]):e.name in A&&e.set(A[e.name])})}set(A,e){A in this&&this[A].set(e)}update(){this._effects.forEach(A=>A.update())}clear(){this._effects.forEach(A=>A.clear())}dispose(){this._soundPlayers=null,this._effects.forEach(A=>A.dispose()),this._effects=null}}A.exports=t},function(A,e,t){const i=t(63);A.exports=class extends i{constructor(A,e,t){super(A,e,t),this.leftGain=null,this.rightGain=null,this.channelMerger=null}get name(){return"pan"}initialize(){const A=this.audioEngine.audioContext;this.inputNode=A.createGain(),this.leftGain=A.createGain(),this.rightGain=A.createGain(),this.channelMerger=A.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(A){this.value=A;const e=(A+100)/200,t=Math.cos(e*Math.PI/2),i=Math.sin(e*Math.PI/2),{currentTime:B,DECAY_WAIT:n,DECAY_DURATION:s}=this.audioEngine;this.leftGain.gain.setTargetAtTime(t,B+n,s),this.rightGain.gain.setTargetAtTime(i,B+n,s)}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(A,e,t){const i=t(63);A.exports=class extends i{constructor(A,e,t){super(A,e,t),this.ratio=1}get name(){return"pitch"}get _isPatch(){return!1}getInputNode(){return this.target.getInputNode()}initialize(){this.initialized=!0}_set(A){this.value=A,this.ratio=this.getRatio(this.value),this.updatePlayers(this.audioPlayer.getSoundPlayers())}update(){this.updatePlayers(this.audioPlayer.getSoundPlayers())}getRatio(A){const e=A/10;return Math.pow(2,e/12)}updatePlayer(A){A.setPlaybackRate(this.ratio)}updatePlayers(A){if(A)for(const e in A)A.hasOwnProperty(e)&&this.updatePlayer(A[e])}}},function(A,e,t){const i=t(42);A.exports=class{constructor(A,e){this.audioEngine=A,this.soundPlayers={},this.playerTargets=new Map,this.soundEffects=new Map,this.effectChainPrime=e}addSoundPlayer(A){this.soundPlayers[A.id]=A}getSoundPlayer(A){return this.soundPlayers[A]||i.error("SoundBank.getSoundPlayer(".concat(A,"): called missing sound in bank")),this.soundPlayers[A]}getSoundEffects(A){return this.soundEffects.has(A)||this.soundEffects.set(A,this.effectChainPrime.clone()),this.soundEffects.get(A)}playSound(A,e){const t=this.getSoundEffects(e),i=this.getSoundPlayer(e);return this.playerTargets.get(e)!==A&&i.stop(),this.playerTargets.set(e,A),t.addSoundPlayer(i),t.setEffectsFromTarget(A),i.connect(t),i.play(),i.finished()}setEffects(A){this.playerTargets.forEach((e,t)=>{e===A&&this.getSoundEffects(t).setEffectsFromTarget(A)})}stop(A,e){this.playerTargets.get(e)===A&&this.soundPlayers[e].stop()}stopAllSounds(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*";this.playerTargets.forEach((e,t)=>{"*"!==A&&e!==A||this.getSoundPlayer(t).stop()})}dispose(){this.playerTargets.clear(),this.soundEffects.forEach(A=>A.dispose()),this.soundEffects.clear();for(const A in this.soundPlayers)this.soundPlayers.hasOwnProperty(A)&&this.soundPlayers[A].dispose();this.soundPlayers={}}}},function(A,e,t){"use strict";t.r(e),t.d(e,"SB1File",(function(){return ie})),t.d(e,"AssertionError",(function(){return i})),t.d(e,"ValidationError",(function(){return B}));class i extends Error{}class B extends i{}const n=function(A,e){if(!A)throw new i(e)};n.validate=function(A,e){if(!A)throw new B(e)};class s{constructor(A){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.buffer=A,this.position=e,this.uint8a=new Uint8Array(this.buffer)}read(A){const e=A.read(this.uint8a,this.position);return 0===A.size?this.position+=A.sizeOf(this.uint8a,this.position):this.position+=A.size,e}readStruct(A){const e=new A(this.uint8a,this.position);return this.position+=A.size,e}resize(A){if(this.buffer.byteLength1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A.length;n(A instanceof Uint8Array,"writeBytes must be passed an Uint8Array"),this.resize(this.position+(t-e));for(let i=e;i1&&void 0!==arguments[1]?arguments[1]:1/0;this.iter=A,this.maxPosition=e}[Symbol.iterator](){return this}next(){return this.iter.stream.position>=this.maxPosition?{value:null,done:!0}:this.iter.next()}}const o=()=>{throw new Error("Not implemented")},g=(()=>{const A=new Uint16Array(1),e=new Uint8Array(A.buffer);return A[0]=43707,187===e[0]})();class a{constructor(A){let{size:e=0,sizeOf:t=(()=>e),writeSizeOf:i=o,toBytes:B=new Uint8Array(1),read:n,write:s=o}=A;this.size=e,this.sizeOf=t,this.writeSizeOf=i,this.toBytes=B,this.bytes=new Uint8Array(B.buffer),this.read=n,this.write=s}asPropertyObject(A){const e=this;return{get(){return e.read(this.uint8a,A+this.offset)},set(t){return e.write(this.uint8a,A+this.offset,t)},enumerable:!0}}read(){return null}}const c=new a({size:1,read:(A,e)=>A[e],write:(A,e,t)=>(A[e]=t,t)}),Q={size:2,read(A,e){return this.bytes[1]=A[e+0],this.bytes[0]=A[e+1],this.toBytes[0]},write(A,e,t){return this.toBytes[0]=t,A[e+0]=this.bytes[1],A[e+1]=this.bytes[0],t}},E={size:2,read(A,e){return this.bytes[0]=A[e+0],this.bytes[1]=A[e+1],this.toBytes[0]},write(A,e,t){return this.toBytes[0]=t,A[e+0]=this.bytes[0],A[e+1]=this.bytes[1],t}};let w;w=g?Q:E;new a(Object.assign({},w,{toBytes:new Uint16Array(1)}));const C=new a(Object.assign({},w,{toBytes:new Int16Array(1)})),l={size:4,read(A,e){return this.bytes[3]=A[e+0],this.bytes[2]=A[e+1],this.bytes[1]=A[e+2],this.bytes[0]=A[e+3],this.toBytes[0]},write(A,e,t){return this.toBytes[0]=t,A[e+0]=this.bytes[3],A[e+1]=this.bytes[2],A[e+2]=this.bytes[1],A[e+3]=this.bytes[0],t}},I={size:4,read(A,e){return this.bytes[0]=A[e+0],this.bytes[1]=A[e+1],this.bytes[2]=A[e+2],this.bytes[3]=A[e+3],this.toBytes[0]},write(A,e,t){return this.toBytes[0]=t,A[e+0]=this.bytes[0],A[e+1]=this.bytes[1],A[e+2]=this.bytes[2],A[e+3]=this.bytes[3],t}};let h;h=g?l:I;const u=new a(Object.assign({},h,{toBytes:new Int32Array(1)})),d=new a(Object.assign({},h,{toBytes:new Uint32Array(1)}));let Y;Y=g?E:Q;const M=new a(Object.assign({},Y,{toBytes:new Uint16Array(1)}));let F;F=g?I:l;const D=new a(Object.assign({},F,{toBytes:new Uint32Array(1)}));let m;m=g?{size:8,read(A,e){return this.bytes[7]=A[e+0],this.bytes[6]=A[e+1],this.bytes[5]=A[e+2],this.bytes[4]=A[e+3],this.bytes[3]=A[e+4],this.bytes[2]=A[e+5],this.bytes[1]=A[e+6],this.bytes[0]=A[e+7],this.toBytes[0]}}:{size:8,read(A,e){return this.bytes[7]=A[e+0],this.bytes[6]=A[e+1],this.bytes[5]=A[e+2],this.bytes[4]=A[e+3],this.bytes[3]=A[e+4],this.bytes[2]=A[e+5],this.bytes[1]=A[e+6],this.bytes[0]=A[e+7],this.toBytes[0]}};const p=new a(Object.assign({},m,{toBytes:new Float64Array(1)}));class U extends a{constructor(A){super({size:A,read(e,t){let i="";for(let B=0;BA[e+0]<<16|A[e+1]<<8|A[e+2]}:{size:3,read:(A,e)=>A[e+2]<<16|A[e+1]<<8|A[e+0]});const G=new a({sizeOf(A,e){const t=C.read(A,e);return C.size+t},read(A,e){let t=0,i=0;const B=C.read(A,e);for(let n=0;nd.size+d.read(A,e),read(A,e){const t=d.read(A,e);return n(t<10485760,"bytes too big"),e+=d.size,n(t<10485760,"uint8a array too big"),new Uint8Array(A.buffer,e,t)}}),k=new a({sizeOf:(A,e)=>d.size+2*d.read(A,e),read(A,e){const t=d.read(A,e);n(t<10485760,"sound too big"),e+=d.size;const i=2*t;return n(i<10485760,"uint8a array too big"),new Uint8Array(A.buffer,e,i)}}),R=new a({sizeOf:(A,e)=>d.size+d.read(A,e)*d.size,read(A,e){const t=d.read(A,e);n(t<10485760,"bitmap too big"),e+=d.size,n(t<10485760,"uint8a array too big");const i=new Uint32Array(t);for(let B=0;Bd.size+d.read(A,e),read(A,e){const t=d.read(A,e);return n(t<10485760,"utf8 too big"),e+=d.size,n(t<10485760,"uint8a array too big"),x.decode(new Uint8Array(A.buffer,e,t))}}),T=new a({size:4,read(A,e){const t=d.read(A,e);return(255<<24|(t>>22&255)<<16|(t>>12&255)<<8|t>>2&255)>>>0}}),S=new a({size:5,read(A,e){const t=d.read(A,e);return(c.read(A,e)<<24|(t>>22&255)<<16|(t>>12&255)<<8|t>>2&255)>>>0}}),b={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},j=Object.entries(b).reduce((A,e)=>{let[t,i]=e;return A[i]=t,A},{});class z{constructor(A,e){this.classId=A,this.position=e}}const v=A=>"object"==typeof A&&A?A.valueOf():A;class L extends z{constructor(A,e,t){super(A,e),this.value=t}valueOf(){return this.value}toJSON(){return this.classId===b.TRANSLUCENT_COLOR||this.classId===b.COLOR?16777215&this.value:this.value}toString(){return this.value}}class P extends z{constructor(A,e,t){super(A,e),this.size=t}}class W extends z{constructor(A,e,t){super(A,e),this.index=t}valueOf(){return"Ref(".concat(this.index,")")}}class O extends P{constructor(A,e,t,i){super(A,e,i),this.version=t}}class V{constructor(A){let{type:e=L,read:t,value:i=(t?A=>A.read(t):null)}=A;this.type=e,this.value=i}next(A,e,t){return{value:new this.type(e,t,this.value(A)),done:!1}}}const K={[b.NULL]:{value:()=>null},[b.TRUE]:{value:()=>!0},[b.FALSE]:{value:()=>!1},[b.SMALL_INT]:{read:u},[b.SMALL_INT_16]:{read:C},[b.LARGE_INT_POSITIVE]:{read:G},[b.LARGE_INT_NEGATIVE]:{read:G},[b.FLOATING]:{read:p},[b.STRING]:{read:y},[b.SYMBOL]:{read:y},[b.BYTES]:{read:H},[b.SOUND]:{read:k},[b.BITMAP]:{read:R},[b.UTF8]:{read:J},[b.ARRAY]:{type:P,read:u},[b.ORDERED_COLLECTION]:{type:P,read:u},[b.SET]:{type:P,read:u},[b.IDENTITY_SET]:{type:P,read:u},[b.DICTIONARY]:{type:P,value:A=>2*A.read(u)},[b.IDENTITY_DICTIONARY]:{type:P,value:A=>2*A.read(u)},[b.COLOR]:{read:T},[b.TRANSLUCENT_COLOR]:{read:S},[b.POINT]:{type:P,value:()=>2},[b.RECTANGLE]:{type:P,value:()=>4},[b.FORM]:{type:P,value:()=>5},[b.SQUEAK]:{type:P,value:()=>6},[b.OBJECT_REF]:{type:W,read:N}},X=Array.from({length:256},(A,e)=>K[e]?new V(K[e]):null),_=new V({type:class extends P{constructor(A,e){super(A,e,0)}},value:()=>null});class Z{constructor(A,e){this.buffer=A,this.stream=new s(A,e)}[Symbol.iterator](){return this}next(){if(this.stream.position>=this.stream.uint8a.length)return{value:null,done:!0};const A=this.stream.position,e=this.stream.read(c),t=X[e];if(null!==t)return t.next(this.stream,e,A);if(e1&&void 0!==arguments[1]?arguments[1]:q;class t extends e{get FIELDS(){return A}static get FIELDS(){return A}}return Object.keys(A).forEach(e=>{const i=A[e];Object.defineProperty(t.prototype,e.toLowerCase().replace(/_(\w)/g,A=>{let[,e]=A;return e.toUpperCase()}),{get(){return this.fields[i]}})}),t}}class ${constructor(){let A;this.bit=new Uint32Array(1),this.crc=0,this.c=0,this.table=[];for(let e=0;e<256;e++){A=e;for(let e=0;e<8;e++)A=1&A?3988292384^A>>>1:A>>>1;this.table[e]=A>>>0}}update(A){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A.length,i=~this.crc>>>0;for(let B=0;B>>8^this.table[255&(i^A[e+B])];return this.crc=~i>>>0,this}get digest(){return this.crc}}const AA=[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],eA=[4294967295,4278190080],tA=new a({sizeOf(A,e){const t=A[e];return t<=223?1:t<=254?2:5},read(A,e){const t=A[e];return t<=223?t:t<=254?256*(t-224)+A[e+1]:d.read(A,e+1)}});class iA{decode(A,e,t,i,B){const n=this.decodePixels(i,32===t);if(t<=8)return B||(B=1===t?eA:AA),this.unpackPixels(n,A,e,t,B);if(16===t)return this.raster16To32(n,A,e);if(32===t)return n;throw new Error("Unhandled Squeak Image depth.")}decodePixels(A,e){let t;if(Array.isArray(A)||A instanceof Uint32Array){if(t=new Uint32Array(A),e)for(let A=0;A>2;let s;switch(3&A){case 0:n+=B;break;case 1:s=i.read(c),s|=s<<24|s<<16|s<<8,e&&0!==s&&(s|=4278190080);for(let A=0;A>a&s],a-=i}return n}raster16To32(A,e,t){const i=new Uint32Array(2*A.length);let B,n,s,r=0,o=0;for(let g=0;g>B&65535,0!==s){s=4278190080|(s>>7&248)<<16|(s>>2&248)<<8|s<<3&248}i[o++]=s,B-=16}}return i}buildCustomColormap(A,e,t){const i=new Uint32Array(1<>1,this.bitPosition=0,this.currentByte=0,this.stream=null,this.end=0}decode(A){this.bitPosition=0,this.currentByte=0,this.stream=new s(A.buffer,A.byteOffset),this.end=A.byteOffset+A.length;const e=Math.floor(8*A.length/this.bitsPerSample),t=new Int16Array(e);let i=0,B=0;for(let A=0;A=0,"Ran out of bits in Squeak Sound");let s=BA[B],r=0;for(let A=this.valueHighBit;A>0;A>>=1)0!=(e&A)&&(r+=s),s>>=1;r+=s,i+=0==(e&this.signMask)?r:-r,B+=this.indexTable[e],B<0&&(B=0),B>88&&(B=88),i>32767&&(i=32767),i<-32768&&(i=-32768),t[A]=i}return t}nextCode(){let A=this.bitsPerSample,e=A-this.bitPosition,t=e<0?this.currentByte>>-e:this.currentByte<0;){if(A-=this.bitPosition,!(this.end-this.stream.position>0))return this.currentByte=0,this.bitPosition=0,-1;this.currentByte=this.stream.read(c),this.bitPosition=8,e=A-this.bitPosition,t+=e<0?this.currentByte>>-e:this.currentByte<>8-this.bitPosition,t}static samples(A,e){return 8*e.length/A}}class rA{constructor(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Uint8Array(this.size),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.uint8a=A,this.offset=e}equals(A){for(const e in A)if(this[e]!==A[e])return!1;return!0}view(){const A=this.constructor.name,e={toString:()=>A};for(const A in this.shape)e[A]=this[A];return e}static initConstructor(A){return A.size=A.prototype.size,A}static extend(A){const e=class extends rA{get shape(){return A}};let t=0;return Object.keys(A).forEach(i=>{if(Object.defineProperty(e.prototype,i,A[i].asPropertyObject(t)),0===A[i].size)throw new Error("Packet cannot be defined with variable sized members.");t+=A[i].size}),e.prototype.size=t,e.size=t,e}}class oA extends(rA.extend({riff:new U(4),length:D,wave:new U(4)})){}rA.initConstructor(oA);class gA extends(rA.extend({chunkType:new U(4),length:D})){}rA.initConstructor(gA);class aA extends(rA.extend({format:M,channels:M,sampleRate:D,bytesPerSec:D,blockAlignment:M,bitsPerSample:M})){}rA.initConstructor(aA);class cA{encode(A){let{channels:e=1,sampleRate:t=22050}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=new Uint8Array(A.buffer,A.byteOffset,A.byteLength),B=oA.size+gA.size+aA.size+gA.size+i.length,n=new s(new ArrayBuffer(B));return n.writeStruct(oA,{riff:"RIFF",length:B-8,wave:"WAVE"}),n.writeStruct(gA,{chunkType:"fmt ",length:aA.size}),n.writeStruct(aA,{format:1,channels:e,sampleRate:t,bytesPerSec:2*t*e,blockAlignment:2*e,bitsPerSample:16}),n.writeStruct(gA,{chunkType:"data",length:B-n.position-gA.size}),n.writeBytes(i),n.uint8a}static encode(A,e){return(new cA).encode(A,e)}static samples(A){const e=new gA(A,oA.size).length;return new gA(A,oA.size+gA.size+e).length/2}}var QA=t(23),EA=t.n(QA);class wA extends(q.define({X:0,Y:1})){}class CA extends(q.define({X:0,Y:1,X2:2,Y2:3})){get width(){return this.x2-this.x}get height(){return this.y2-this.y}}class lA extends(q.define({WIDTH:0,HEIGHT:1,DEPTH:2,BYTES:4,COLORMAP:5})){get decoded(){return this._decoded||(this._decoded=(A=>{for(let e=0;eA.valueOf())).buffer))),this._decoded}get extension(){return"uncompressed"}}class IA extends(q.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 hA extends(q.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 0==(1&this.fields[this.FIELDS.VISIBLE])}get tempoBPM(){return this.fields[this.FIELDS.TEMPO_BPM]||0}get lists(){return this.fields[this.FIELDS.LISTS]||[]}}q.define({RECTANGLE:0,FONT:8,COLOR:9,LINES:11});class uA extends(q.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 lA?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 A=(new $).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=A.digest}return this._crc}get extension(){return this.oldComposite instanceof lA?"uncompressed":this.baseLayerData.value?"jpg":"uncompressed"}toString(){return'ImageMediaData "'.concat(this.costumeName,'"')}}class dA extends(q.define({DATA:3,RATE:4})){}class YA extends(q.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 sA(this.bitsPerSample.value).decode(this.data.value):this._decoded=new Int16Array((A=>{const e=new Uint8Array(A);for(let t=0;tHA[e]||null);class RA{constructor(A){this.valueIterator=A}[Symbol.iterator](){return this}next(){const A=this.valueIterator.next();if(A.done)return A;const e=A.value,{classId:t}=e;let i=e;if(e instanceof P){i=[];for(let A=0;A>>16;for(let n=0;n1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A.length;return this.stream.writeBytes(A,e,t)}}class OA extends WA{constructor(A){super(A),this.stream.writeStruct(vA,{cmf:8,flag:29}),this.adler=new zA,this.chunk=this.stream.writeStruct(LA,{lastPacket:0,length:0,lengthCheck:65535})}get _deflateIndex(){return this.chunk.length}set _deflateIndex(A){return this.chunk.length=A,this.chunk.lengthCheck=65535^A,this.chunk.length}writeStruct(A,e){this.writeBytes(Object.assign(new A,e).uint8a)}writeBytes(A){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A.length,i=e;for(;t-i>0;){65535===this._deflateIndex&&(this.chunk=this.stream.writeStruct(LA,{lastPacket:0,length:0,lengthCheck:65535}));const e=Math.min(t-i,65535-this._deflateIndex);this.stream.writeBytes(A,i,i+e),this._deflateIndex+=e,i+=e}this.adler.update(A,e,t-e)}finish(){this.chunk.lastPacket=1,this.stream.writeStruct(PA,{checksum:this.adler.digest})}static estimateSize(A){const e=Math.ceil(A/65535);return vA.size+e*LA.size+PA.size+A}}class VA extends WA{constructor(A){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"IHDR";super(A),this.start=this.stream.writeStruct(TA,{length:0,chunkType:e}),this.crc=new $}finish(){const A=this.start.offset+this.start.size,e=this.position-A;this.start.length=e,this.crc.update(this.stream.uint8a,A-d.size,e+d.size),this.stream.writeStruct(SA,{checksum:this.crc.digest})}static size(A){return TA.size+A+SA.size}}class KA{encode(A,e,t){const i=4*A+jA.size,B=i*e,n=JA.size+VA.size(bA.size)+VA.size(OA.estimateSize(B))+VA.size(0),r=new s(new ArrayBuffer(n));r.writeStruct(JA,{support8Bit:137,png:"PNG",dosLineEnding:"\r\n",dosEndOfFile:"",unixLineEnding:"\n"});const o=new VA(r,"IHDR");o.writeStruct(bA,{width:A,height:e,bitDepth:8,colorType:6,compressionMethod:0,filterMethod:0,interlaceMethod:0}),o.finish();const g=new VA(r,"IDAT"),a=new OA(g);let c=0;for(;c"uncompressed"===A.extension?new Uint8Array(KA.encode(A.width,A.height,A.decoded)):A.decoded,qA=A=>{const e=String(A[A.length-1]),t=A.length-1;return"mouse"===e?A[t]="_mouse_":"edge"===e?A[t]="_edge_":A[A.length-1]instanceof IA&&(A[t]="_stage_"),A},$A={getParam:A=>{let[e,t,i,B]=A;return[e,t,i,B||"r"]},changeVariable:A=>[A[2],A[1],A[3]],EventHatMorph:A=>"Scratch-StartClicked"===String(A[1])?["whenGreenFlag"]:["whenIReceive",A[1]],MouseClickEventHatMorph:()=>["whenClicked"],KeyEventHatMorph:A=>["whenKeyPressed",A[1]],stopScripts:A=>"other scripts"===String(A[1])?[A[0],"other scripts in sprite"]:A,abs:A=>["computeFunction:of:","abs",A[1]],sqrt:A=>["computeFunction:of:","sqrt",A[1]],"\\\\":A=>["%",...A.slice(1)],doReturn:()=>["stopScripts","this script"],stopAll:()=>["stopScripts","all"],"showBackground:":A=>["startScene",A[1]],nextBackground:()=>["nextScene"],doForeverIf:A=>["doForever",[["doIf",A[1],A[2]]]],"getAttribute:of:":qA,"gotoSpriteOrMouse:":qA,"distanceTo:":qA,"pointTowards:":qA,"touching:":qA},Ae=A=>{const{info:e,stageData:t,images:i,sounds:B}=A,n=A=>{const e=[];for(let t=0;t{let[e,t]=A;return{name:e,value:t,isPersistent:!1}},r=A=>{let[,{listName:e,contents:t,x:i,y:B,width:n,height:s,hiddenWhenNull:r}]=A;return{listName:e,contents:t,isPersistent:!1,x:i,y:B,width:n,height:s,visible:null!==(o=r,"object"==typeof o&&o?o.valueOf():o)};var o},o=A=>{const e=B.findIndex(e=>e.crc===A.crc);return{soundName:A.name,soundID:e,md5:"".concat(A.md5,".wav"),sampleCount:A.sampleCount,rate:A.rate,format:""}},g=A=>{const e=i.findIndex(e=>e.crc===A.crc);return{costumeName:A.costumeName,baseLayerID:e,baseLayerMD5:"".concat(EA()(A.rawBytes),".").concat((t=A,"uncompressed"===t.extension?"png":"jpg")),bitmapResolution:1,rotationCenterX:A.rotationCenter.x,rotationCenterY:A.rotationCenter.y};var t},a=A=>{let e=A.map(Q);const t=$A[e[0]];return t&&(e=t(e)),e},c=A=>A.map(a),Q=A=>A instanceof hA?A.objName:Array.isArray(A)?0===A.length||Array.isArray(A[0])?c(A):a(A):A,E=A=>[A[0].x,A[0].y,c(A[1])],w=A=>A instanceof hA?(A=>{const e=A.media.filter(A=>A instanceof uA),i=A.media.filter(A=>A instanceof YA);return{objName:A.objName,variables:n(A.vars).map(s),lists:n(A.lists).map(r),scripts:A.blocksBin.map(E),costumes:e.map(g),currentCostumeIndex:e.findIndex(e=>e.crc===A.currentCostume.crc),sounds:i.map(o),scratchX:A.scratchX,scratchY:A.scratchY,scale:A.scalePoint.x,direction:Math.round(1e6*A.rotationDegrees)/1e6-270,rotationStyle:A.rotationStyle,isDraggable:A.draggable,indexInLibrary:t.spriteOrderInLibrary.indexOf(A),visible:A.visible,spriteInfo:{}}})(A):null;return JSON.parse(JSON.stringify(Object.assign((A=>{const e=A.media.filter(A=>A instanceof uA),t=A.media.filter(A=>A instanceof YA);return{objName:A.objName,variables:n(A.vars).map(s),lists:n(A.lists).map(r),scripts:A.blocksBin.map(E),costumes:e.map(g),currentCostumeIndex:e.findIndex(e=>e.crc===A.currentCostume.crc),sounds:t.map(o),penLayerMD5:"5c81a336fab8be57adc039a8a2b33ca9.png",penLayerID:0,tempoBPM:A.tempoBPM,videoAlpha:.5,children:A.stageContents.map(w).filter(Boolean).reverse()}})(t),{info:(A=>{const e={};for(let t=0;t{let{images:e,sounds:t}=A;const i={};let B=0;for(const A of e)i["".concat(B++,".").concat((n=A,"uncompressed"===n.extension?"png":"jpg"))]={bytes:ZA(A)};var n,s;B=0;for(const A of t)i["".concat(B++,".wav")]={bytes:(s=A,s.wavEncodedData)};return new _A(i)})({images:this.images(),sounds:this.sounds()})}view(){return{signature:this.signature,infoHeader:this.infoHeader,dataHeader:this.dataHeader,toString:()=>"SB1File"}}infoRaw(){return new r(new Z(this.buffer,this.infoHeader.offset+te.size),this.signature.infoByteLength+ee.size)}infoTable(){return new RA(this.infoRaw())}info(){return this._info||(this._info=new xA(this.infoTable()).table[0]),this._info}dataRaw(){return new r(new Z(this.buffer,this.dataHeader.offset+te.size),this.stream.uint8a.length)}dataTable(){return new RA(this.dataRaw())}dataFixed(){return this._data||(this._data=new xA(this.dataTable()).table),this._data}data(){return this.dataFixed()[0]}images(){const A=new Set;return this.dataFixed().filter(e=>e instanceof uA&&(!A.has(e.crc)&&(A.add(e.crc),!0)))}sounds(){const A=new Set;return this.dataFixed().filter(e=>e instanceof YA&&(!A.has(e.crc)&&(A.add(e.crc),!0)))}}},function(A,e,t){"use strict";t.r(e);var i={};t.r(i),t.d(i,"Scaffolding",(function(){return z})),t.d(i,"Cloud",(function(){return Y})),t.d(i,"VM",(function(){return n.a})),t.d(i,"Renderer",(function(){return r.a})),t.d(i,"Storage",(function(){return c})),t.d(i,"AudioEngine",(function(){return E.a})),t.d(i,"JSZip",(function(){return l.a}));var B=t(64),n=t.n(B),s=t(66),r=t.n(s),o=t(129),g=t.n(o);class a extends g.a{constructor(){super(),this._totalAssets=0,this._loadedAssets=0}_updateProgress(){this.onprogress&&this.onprogress(this._totalAssets,this._loadedAssets)}load(A,e,t){return A===this.AssetType.ImageBitmap||A===this.AssetType.ImageVector||A===this.AssetType.Sound||A===this.AssetType.Font?(this._totalAssets++,this._updateProgress(),super.load(A,e,t).then(A=>(this._loadedAssets++,this._updateProgress(),A))):super.load(A,e,t)}}var c=a,Q=t(67),E=t.n(Q),w=t(65),C=t(24),l=t.n(C);const I=[],h=A=>{let e;var t;return 0===I.length?(t={audio:!1,video:A},e=navigator.mediaDevices?navigator.mediaDevices.getUserMedia(t):Promise.reject(new Error("video is not supported in this context (insecure domain?)")),I.push(e)):I.length>0&&(e=I[0],I.push(!0)),e};class u{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(A=>this.onError(A))}_teardown(){if(!1===this.enabled){const A=(I.pop(),!(I.length>0));this._singleSetup=null,this._video=null,this._track&&A&&this._track.stop(),this._track=null}}getFrame(A){let{dimensions:e=u.DIMENSIONS,mirror:t=this.mirror,format:i=u.FORMAT_IMAGE_DATA,cacheTimeout:B=this._frameCacheTimeout}=A;if(!this.videoReady)return null;const[n,s]=e,r=this._getWorkspace({dimensions:e,mirror:Boolean(t)}),{videoWidth:o,videoHeight:g}=this._video,{canvas:a,context:c,lastUpdate:Q,cacheData:E}=r,w=Date.now();Q+B{this._video=document.createElement("video");try{this._video.srcObject=A}catch(e){this._video.src=window.URL.createObjectURL(A)}return this._video.play(),this._track=A.getTracks()[0],this}).catch(A=>{this._singleSetup=null,this.onError(A)})),this._singleSetup}get videoReady(){if(!this.enabled)return!1;if(!this._video)return!1;if(!this._track)return!1;const{videoWidth:A,videoHeight:e}=this._video;return"number"==typeof A&&"number"==typeof e&&(0!==A&&0!==e)}_getWorkspace(A){let{dimensions:e,mirror:t}=A,i=this._workspace.find(A=>A.dimensions.join("-")===e.join("-")&&A.mirror===t);return i||(i={dimensions:e,mirror:t,canvas:document.createElement("canvas"),lastUpdate:0,cacheData:{}},i.canvas.width=e[0],i.canvas.height=e[1],i.context=i.canvas.getContext("2d"),this._workspace.push(i)),i}}var d=u;var Y={CloudManager:class{constructor(A){this.parent=A,this.providers=[],this.overrides=new Map}hasCloudData(){return this.parent.vm.runtime.hasCloudData()}projectReady(){if(this.hasCloudData())for(const A of this.providers)A.enable()}setVariable(A,e,t){this.overrides.has(e)&&this.overrides.get(e)!==A||this.parent.vm.postIOData("cloud",{varUpdate:{name:e,value:t}})}getUsername(){return this.parent._username}addProvider(A){A.manager=this,this.hasCloudData()&&A.enable(),this.providers.push(A)}requestCloseConnection(){}createVariable(A,e){}renameVariable(A,e){}deleteVariable(A){}addProviderOverride(A,e){if(e&&!this.providers.includes(e))throw new Error("Manager is not aware of this provider");this.overrides.set(A,e)}updateVariable(A,e){if(this.overrides.has(A)){const t=this.overrides.get(A);t&&t.handleUpdateVariable(A,e)}else for(const t of this.providers)t.handleUpdateVariable(A,e)}},WebSocketProvider:class{constructor(A,e){this.cloudHosts=Array.isArray(A)?A:[A],this.projectId=e,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(A){this.projectId=A,this.closeAndReconnect()}openConnection(){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(A){throw console.error(A),new Error("Cloud host ".concat(this.currentCloudHost," is invalid: ").concat(A))}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(A){console.error("WebSocket error",A)}onmessage(A){for(const e of A.data.split("\n"))if(e){const A=JSON.parse(e);"set"===A.method&&this.manager.setVariable(this,A.name,A.value)}}onopen(){this.attemptedConnections=0,this.writeToServer({method:"handshake"}),this.sendBufferedMessages(),console.log("WebSocket connected")}onclose(A){if(A&&4002===A.code)return void console.log("Username is invalid; not reconnecting.");if(A&&4004===A.code)return void console.log("Project is blocked; not reconnecting.");const e=Math.random()*(Math.pow(2,Math.min(this.attemptedConnections+1,5))-1)*1e3;console.log("Connection lost; reconnecting in ".concat(Math.round(e),"ms")),this.reconnectTimeout=setTimeout(this.openConnection,e)}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 A of this.bufferedMessages)this.writeToServer(A);this.bufferedMessages.length=0}bufferedWriteToServer(A){this.bufferedMessages.push(A),this.scheduleBufferedSend()}writeToServer(A){A.project_id=this.projectId,A.user=this.manager.getUsername(),this.ws.send(JSON.stringify(A))}handleUpdateVariable(A,e){for(const t of this.bufferedMessages)if(t.name===A)return void(t.value=e);this.bufferedWriteToServer({method:"set",name:A,value:e})}},LocalStorageProvider:class{constructor(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"p4:cloudvariables";this.key=A,this.variables={},this.handleStorageEvent=this.handleStorageEvent.bind(this)}readFromLocalStorage(){let A;try{if(A=JSON.parse(localStorage.getItem(this.key)),!A||"object"!=typeof A)return}catch(A){return}this.variables=A;for(const A of Object.keys(this.variables))this.manager.setVariable(this,A,this.variables[A])}storeToLocalStorage(){try{localStorage.setItem(this.key,JSON.stringify(this.variables))}catch(A){}}handleStorageEvent(A){A.key===this.key&&A.storageArea===localStorage&&this.readFromLocalStorage()}enable(){this.readFromLocalStorage(),window.addEventListener("storage",this.handleStorageEvent)}handleUpdateVariable(A,e){this.variables[A]=e,this.storeToLocalStorage()}}},M=t(130),F=t.n(M),D=t(68),m={insert:A=>{var e=document.head||document.body||document.documentElement;e.insertBefore(A,e.firstChild)},singleton:!1},p=(F()(D.a,m),D.a.locals||{});const U=A=>new Promise((e,t)=>{const i=new FileReader;i.onload=()=>e(i.result),i.onerror=()=>t(new Error("Cannot read as text: ".concat(i.error))),i.readAsText(A)});var f=class{constructor(A,e){this.el=A,this.callback=e,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(A){A.dataTransfer.types.includes("Files")&&(A.preventDefault(),A.dataTransfer.dropEffect="copy",this.el.classList.add(p.dropping))}ondragleave(A){A.preventDefault(),this.el.classList.remove(p.dropping)}ondrop(A){A.preventDefault(),this.el.classList.remove(p.dropping),A.dataTransfer.types.includes("Files")&&A.dataTransfer.files.length>0&&Promise.all(Array.from(A.dataTransfer.files).map(U)).then(A=>{this.callback(A)})}};var N=class{constructor(A,e){this.parent=A,this.text=e,this.root=document.createElement("div"),this.root.className=p.questionRoot,this.inner=document.createElement("div"),this.inner.className=p.questionInner,e&&(this.textElement=document.createElement("div"),this.textElement.textContent=e,this.textElement.className=p.questionText),this.inputContainer=document.createElement("div"),this.inputContainer.className=p.questionInputOuter,this.input=document.createElement("input"),this.input.className=p.questionInput,this.input.addEventListener("keypress",this.onkeypress.bind(this)),this.dropper=new f(this.input,this.dropperCallback.bind(this)),this.submitButton=document.createElement("button"),this.submitButton.className=p.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(A=>{this.callback=A})}answer(){return this.answerCallback}submit(){this.callback(this.input.value),this.destroy()}onkeypress(A){"Enter"===A.key&&this.submit()}dropperCallback(A){const e=A.join("").replace(/\r?\n/g," ");this.input.value=e}onsubmitpressclick(){this.submit()}destroy(){this.root.remove(),this.parent.question=null}};var G=class{constructor(A){this.parent=A,this.root=document.createElement("div"),this.root.className=p.contextMenu,this._onmousedown=this._onmousedown.bind(this),this._onresize=this._onresize.bind(this),this._onblur=this._onblur.bind(this)}_onmousedown(A){this.root.contains(A.target)||this.destroy()}_onresize(){this.destroy()}_onblur(){this.destroy()}add(A){const e=document.createElement("button");e.className=p.contextMenuItem,e.textContent=A.text,e.addEventListener("click",()=>{this.destroy(),A.callback()}),e.addEventListener("contextmenu",A=>{A.preventDefault()}),this.root.appendChild(e)}show(A){document.addEventListener("mousedown",this._onmousedown),window.addEventListener("resize",this._onresize),window.addEventListener("blur",this._onblur),this.parent._addLayer(this.root);const e=this.parent.layersRect,t=this.root.getBoundingClientRect();let i=A.clientX-e.left,B=A.clientY-e.top;i+t.width>e.width&&(i-=t.width),B+t.height>e.height&&(B-=t.height),this.root.style.transform="translate(".concat(i,"px, ").concat(B,"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 y=(A,e)=>{if("undefined"!=typeof ExternalDownloadHelper)return void ExternalDownloadHelper.download(A,e);const t=document.createElement("a");if(document.body.appendChild(t),navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(e,A);else if("download"in HTMLAnchorElement.prototype){const i=window.URL.createObjectURL(e);t.href=i,t.download=A,t.type=e.type,t.click(),window.setTimeout(()=>{document.body.removeChild(t),window.URL.revokeObjectURL(i)},1e3)}else{let A=window.open("","_blank");const t=new FileReader;t.onloadend=function(){A.location.href=t.result,A=null},t.readAsDataURL(e)}};class H{constructor(A,e){this.parent=A,this.id=e.get("id"),this.spriteName=e.get("spriteName"),this.targetId=e.get("targetId"),this.opcode=e.get("opcode"),this.params=e.get("params"),this.root=document.createElement("div"),this.root.className=p.monitorRoot,this.root.dataset.id=this.id,this.root.dataset.opcode=this.opcode,this.parent._monitorOverlay.appendChild(this.root)}getLabel(){let A;if("data_variable"===this.opcode)A=this.params.VARIABLE;else if("data_listcontents"===this.opcode)A=this.params.LIST;else if("motion_xposition"===this.opcode)A=this.parent.getMessage("var-x");else if("motion_yposition"===this.opcode)A=this.parent.getMessage("var-y");else if("motion_direction"===this.opcode)A=this.parent.getMessage("var-direction");else if("sensing_username"===this.opcode)A=this.parent.getMessage("var-username");else if("looks_costumenumbername"===this.opcode)A="number"===this.params.NUMBER_NAME?this.parent.getMessage("var-costume-number"):this.parent.getMessage("var-costume-name");else if("looks_backdropnumbername"===this.opcode)A="number"===this.params.NUMBER_NAME?this.parent.getMessage("var-backdrop-number"):this.parent.getMessage("var-backdrop-name");else if("looks_size"===this.opcode)A=this.parent.getMessage("var-size");else if("sensing_answer"===this.opcode)A=this.parent.getMessage("var-answer");else if("sensing_mousedown"===this.opcode)A=this.parent.getMessage("var-mousedown");else if("sensing_mousex"===this.opcode)A=this.parent.getMessage("var-mousex");else if("sensing_mousey"===this.opcode)A=this.parent.getMessage("var-mousey");else if("sensing_loudness"===this.opcode)A=this.parent.getMessage("var-loudness");else if("sensing_timer"===this.opcode)A=this.parent.getMessage("var-timer");else if("sensing_dayssince2000"===this.opcode)A=this.parent.getMessage("var-dayssince2000");else if("sound_volume"===this.opcode)A=this.parent.getMessage("var-volume");else if("sensing_current"===this.opcode){const e=this.params.CURRENTMENU.toLowerCase();"year"===e?A=this.parent.getMessage("var-year"):"month"===e?A=this.parent.getMessage("var-month"):"date"===e?A=this.parent.getMessage("var-date"):"dayofweek"===e?A=this.parent.getMessage("var-day-of-week"):"hour"===e?A=this.parent.getMessage("var-hour"):"minute"===e?A=this.parent.getMessage("var-minute"):"second"===e&&(A=this.parent.getMessage("var-second"))}else{const e=this.parent.vm.runtime.getLabelForOpcode(this.opcode);A=e?e.label:this.opcode}return this.spriteName?"".concat(this.spriteName,": ").concat(A):A}getTarget(){return this.targetId?this.parent.vm.runtime.getTargetById(this.targetId):this.parent.vm.runtime.getTargetForStage()}getVmVariable(){return this.getTarget().variables[this.id]}update(A){this.x=A.get("x"),this.y=A.get("y"),this.visible=A.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 k extends H{constructor(A,e){super(A,e),this.mode=e.get("mode"),"large"===this.mode?(this.valueElement=document.createElement("div"),this.valueElement.className=p.monitorLargeValue+" "+p.monitorValueColor,this.root.appendChild(this.valueElement)):(this.inner=document.createElement("div"),this.inner.className=p.monitorInner,this.valueRow=document.createElement("div"),this.valueRow.className=p.monitorRow,this.label=document.createElement("div"),this.label.className=p.monitorLabel,this.label.textContent=this.getLabel(),this.valueElement=document.createElement("div"),this.valueElement.className=p.monitorValue+" "+p.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=p.monitorRow,this.slider=document.createElement("input"),this.slider.className=p.monitorSlider,this.slider.type="range",this.slider.min=e.get("sliderMin"),this.slider.max=e.get("sliderMax"),this.slider.step=e.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(A){const e=this.getVmVariable();if(e.value=A,e.isCloud){this.parent.vm.runtime.ioDevices.cloud.requestUpdateVariable(e.name,e.value)}this._value=A,this.valueElement.textContent=A}onsliderchange(A){this.setVariableValue(+A.target.value)}update(A){if(super.update(A),!this.visible)return;let e=A.get("value");"number"==typeof e&&(e=Number(e.toFixed(6))),this._value!==e&&(this._value=e,this.valueElement.textContent=e,this.slider&&(this.slider.value=e))}}class R{constructor(A){this.monitor=A,this.index=-1,this.value="",this.locked=!1,this.root=document.createElement("label"),this.root.className=p.monitorRowRoot,this.indexEl=document.createElement("div"),this.indexEl.className=p.monitorRowIndex,this.valueOuter=document.createElement("div"),this.valueOuter.className=p.monitorRowValueOuter,this.editable=this.monitor.editable,this.editable?(this.valueInner=document.createElement("input"),this.valueInner.tabIndex=-1,this.valueInner.className=p.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=p.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=p.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(p.monitorRowValueEditing),this.addNewValue=!1,this.deleteValue=!1,this.valueWasChanged=!1)}_onblurinput(){if(this.locked)if(this.unfocus(),this.deleteValue){const A=[...this.monitor.value];A.splice(this.index,1),this.monitor.setValue(A),this.monitor.tryToFocusRow(Math.min(A.length-1,this.index))}else if(this.valueWasChanged||this.addNewValue){const A=[...this.monitor.value];A[this.index]=this.valueInner.value,this.addNewValue&&A.splice(this.index+1,0,""),this.monitor.setValue(A),this.addNewValue&&this.monitor.tryToFocusRow(this.index+1)}}_oninput(){this.valueWasChanged=!0}_onkeypressinput(A){"Enter"===A.key&&(this.addNewValue=!0,this.valueInner.blur())}_onkeypressdown(A){if("Escape"===A.key)this.valueInner.blur();else if("ArrowUp"===A.key||"ArrowDown"===A.key||"Tab"===A.key){A.preventDefault();let e=this.index;"ArrowUp"===A.key||"Tab"===A.key&&A.shiftKey?(e--,e<0&&(e=this.monitor.value.length-1)):(e++,e>=this.monitor.value.length&&(e=0)),this.monitor.tryToFocusRow(e)}}_onclickdelete(A){A.preventDefault(),this.deleteValue=!0,this.valueInner.blur()}_oncontextmenu(A){this.locked?A.stopPropagation():A.preventDefault()}_oncontextmenuuneditable(A){const e=getSelection();this.valueInner.contains(e.anchorNode)&&!e.isCollapsed&&A.stopPropagation()}setIndex(A){this.index!==A&&(this.index=A,this.root.dataset.index=A,this.root.style.transform="translateY(".concat(24*A,"px)"),this.indexEl.textContent=A+1)}setValue(A){this.value===A||this.locked||(this.value=A,this.editable?this.valueInner.value=A:this.valueInner.textContent=A)}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(p.monitorRowValueEditing))}}class x extends H{constructor(A,e){super(A,e),this.editable=A.editableLists,this.rows=new Map,this.cachedRows=[],this.scrollTop=0,this.oldLength=-1,this.label=document.createElement("div"),this.label.className=p.monitorListLabel,this.label.textContent=this.getLabel(),this.footer=document.createElement("div"),this.footer.className=p.monitorListFooter,this.footerText=document.createElement("div"),this.footerText.className=p.monitorListFooterText,this.rowsOuter=document.createElement("div"),this.rowsOuter.className=p.monitorRowsOuter,this.rowsInner=document.createElement("div"),this.rowsInner.className=p.monitorRowsInner,this.rowsInner.addEventListener("scroll",this._onscroll.bind(this),{passive:!0}),this.endPoint=document.createElement("div"),this.endPoint.className=p.monitorRowsEndpoint,this.emptyLabel=document.createElement("div"),this.emptyLabel.textContent=A.getMessage("list-empty"),this.emptyLabel.className=p.monitorEmpty,this.editable&&(this.addButton=document.createElement("button"),this.addButton.className=p.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 f(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(A){this.setValue([...this.value,""]),this.tryToFocusRow(this.value.length-1)}unfocusAllRows(){for(const A of this.rows.values())A.unfocus()}tryToFocusRow(A){if(A>=0&&A{const e=A.target.files;if(0===e.length)return;const t=e[0];U(t).then(A=>this.import(A))}),A.click()}import(A){const e=A.split(/\r?\n/);this.setValue(e)}handleExport(){const A=this.getValue().join("\n"),e=new Blob([A],{type:"text/plain"});y("".concat(this.getLabel(),".txt"),e)}dropperCallback(A){this.import(A.join("\n"))}getValue(){return this.getVmVariable().value}setValue(A){this.getVmVariable().value=A,this.updateValue(A)}update(A){super.update(A),this.visible&&(this.width=A.get("width")||100,this.height=A.get("height")||200,this.root.style.width="".concat(this.width,"px"),this.root.style.height="".concat(this.height,"px"),this.updateValue(A.get("value")))}createRow(A){const e=this.cachedRows.pop()||new R(this);e.setIndex(A),e.setValue(this.value[A]),this.rows.set(A,e);let t=!1;for(const i of this.rowsInner.children){const B=i.dataset.index;if(!B)continue;if(+B>A){this.rowsInner.insertBefore(e.root,i),t=!0;break}}return t||this.rowsInner.appendChild(e.root),e}updateValue(A){this.value=A,A.length!==this.oldLength&&(this.oldLength=A.length,this.footerText.textContent=this.parent.getMessage("list-length").replace("{n}",A.length),this.endPoint.style.transform="translateY(".concat(24*A.length,"px)"),this.emptyLabel.style.display=A.length?"none":"");let e=Math.floor(this.scrollTop/24)-5;e<0&&(e=0);let t=Math.ceil((this.scrollTop+this.height)/24)+3;t>A.length-1&&(t=A.length-1);for(const i of this.rows.keys())if(it){const e=this.rows.get(i);(!e.locked||i>=A.length)&&(e.unfocus(),e.root.remove(),this.rows.delete(i),this.cachedRows.length<10&&this.cachedRows.push(e))}for(let i=e;i<=t;i++){const e=this.rows.get(i);e?e.setValue(A[i]):this.createRow(i)}}}var J=class{constructor(){this.hasItem=!1,this.root=document.createElement("div"),this.root.className=p.controlsBar,this.start=document.createElement("div"),this.end=document.createElement("div"),this.root.appendChild(this.start),this.root.appendChild(this.end)}addToStart(A){this.hasItem=!0,this.start.appendChild(A)}addToEnd(A){this.hasItem=!0,this.end.appendChild(A)}computeHeight(){return this.hasItem?this.root.getBoundingClientRect().height:0}};const T=A=>"number"==typeof A||"string"==typeof A||"boolean"==typeof A;var S=t(134);const b=A=>A.touches&&A.touches[0]?{x:A.touches[0].clientX,y:A.touches[0].clientY}:A.changedTouches&&A.changedTouches[0]?{x:A.changedTouches[0].clientX,y:A.changedTouches[0].clientY}:{x:A.clientX,y:A.clientY},j=A=>"function"==typeof A?A:()=>A;class z extends class{constructor(){this._events={}}addEventListener(A,e){this._events[A]||(this._events[A]=[]),this._events[A].push(e)}removeEventListener(A,e){const t=this._events[A];t&&(this._events[A]=t.filter(A=>A!==e))}dispatchEvent(A){const e=this._events[A.type];if(e)for(const t of e)t(A)}}{constructor(){super(),this.width=480,this.height=360,this.resizeMode="preserve-ratio",this.editableLists=!1,this.shouldConnectPeripherals=!0,this.usePackagedRuntime=!1,this.messages=S,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=p.root,this._layers=document.createElement("div"),this._layers.className=p.layers,this._root.appendChild(this._layers),this._canvas=document.createElement("canvas"),this._canvas.className=p.canvas,this._addLayer(this._canvas),this._overlays=document.createElement("div"),this._overlays.className=p.scaledOverlaysInner,this._overlaysOuter=document.createElement("div"),this._overlaysOuter.className=p.scaledOverlaysOuter,this._overlaysOuter.appendChild(this._overlays),this._addLayer(this._overlaysOuter),this._monitorOverlay=document.createElement("div"),this._monitorOverlay.className=p.monitorOverlay,this._overlays.appendChild(this._monitorOverlay),this._topControls=new J,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(A){this._layers.appendChild(A)}_scratchCoordinates(A,e){return{x:this.width/this.layersRect.width*(A-this.layersRect.width/2),y:-this.height/this.layersRect.height*(e-this.layersRect.height/2)}}_onmousemove(A){const{x:e,y:t}=b(A),i={x:e-this.layersRect.left,y:t-this.layersRect.top,canvasWidth:this.layersRect.width,canvasHeight:this.layersRect.height};if(this._mousedownPosition&&!this._draggingId){Math.sqrt(Math.pow(i.x-this._mousedownPosition.x,2)+Math.pow(i.y-this._mousedownPosition.y,2))>3&&(this._startDragging(i.x,i.y),this._cancelDragTimeout())}else if(this._draggingId){const A=this._scratchCoordinates(i.x,i.y);this.vm.postSpriteInfo({x:A.x-this._draggingStartMousePosition.x+this._draggingStartSpritePosition.x,y:A.y-this._draggingStartMousePosition.y+this._draggingStartSpritePosition.y,force:!0})}this.vm.postIOData("mouse",i)}_startDragging(A,e){if(this._draggingId)return;const t=this.renderer.pick(A,e);if(null===t)return;const i=this.vm.getTargetIdForDrawableId(t);if(null===i)return;const B=this.vm.runtime.getTargetById(i);B.draggable&&(B.goToFront(),this._draggingId=i,this._draggingStartMousePosition=this._scratchCoordinates(A,e),this._draggingStartSpritePosition={x:B.x,y:B.y},this.vm.startDrag(i))}_cancelDragTimeout(){clearTimeout(this._dragTimeout),this._dragTimeout=null}_onmousedown(A){const{x:e,y:t}=b(A),i={x:e-this.layersRect.left,y:t-this.layersRect.top,button:A.button,canvasWidth:this.layersRect.width,canvasHeight:this.layersRect.height,isDown:!0},B="undefined"!=typeof TouchEvent&&A instanceof TouchEvent;(0===A.button||B)&&(this._dragTimeout=setTimeout(this._startDragging.bind(this,i.x,i.y),400)),B&&(A.preventDefault(),document.activeElement&&document.activeElement.blur&&document.activeElement.blur()),this._mousedownPosition={x:i.x,y:i.y},this.vm.postIOData("mouse",i)}_onmouseup(A){this._cancelDragTimeout();const{x:e,y:t}=b(A),i={x:e-this.layersRect.left,y:t-this.layersRect.top,button:A.button,canvasWidth:this.layersRect.width,canvasHeight:this.layersRect.height,isDown:!1,wasDragged:null!==this._draggingId};this._mousedownPosition=null,this.vm.postIOData("mouse",i),this._draggingId&&(this.vm.stopDrag(this._draggingId),this._draggingStartMousePosition=null,this._draggingStartSpritePosition=null,this._draggingId=null)}_ontouchstart(A){this._onmousedown(A)}_ontouchmove(A){this._onmousemove(A)}_ontouchend(A){this._onmouseup(A)}_oncontextmenu(A){A.preventDefault()}_onwheel(A){const e={deltaX:A.deltaX,deltaY:A.deltaY};this.vm.postIOData("mouseWheel",e)}_onkeydown(A){if(A.target!==document&&A.target!==document.body)return;const e={key:A.key,keyCode:A.keyCode,isDown:!0};this.vm.postIOData("keyboard",e),(32===A.keyCode||A.keyCode>=37&&A.keyCode<=40||8===A.keyCode||222===A.keyCode||191===A.keyCode)&&A.preventDefault()}_onkeyup(A){const e={key:A.key,keyCode:A.keyCode,isDown:!1};this.vm.postIOData("keyboard",e),A.target!==document&&A.target!==document.body&&A.preventDefault()}_onresize(){this.relayout()}relayout(){const A=Math.max(1,this._root.offsetWidth),e=Math.max(1,this._root.offsetHeight),t=this._offsetFromTop+this._topControls.computeHeight(),i=this._offsetFromBottom,B=this._offsetFromLeft,n=this._offsetFromRight,s=Math.max(1,A-B-n),r=Math.max(1,e-t-i);"dynamic-resize"===this.resizeMode&&(this.vm.setStageSize?(this.width=s,this.height=r,this.vm.setStageSize(this.width,this.height)):console.warn("dynamic-resize not supported: vm does not implement setStageSize"));let o=s,g=r;"stretch"!==this.resizeMode&&(o=g/this.height*this.width,o>s&&(g=s/this.width*this.height,o=s));const a=e-g,c=A-o,Q=(c-B-n)/2+B-c/2,E=(a-t-i)/2+t-a/2;this._layers.style.transform="translate(".concat(Q,"px, ").concat(E,"px)"),this._layers.style.width="".concat(o,"px"),this._layers.style.height="".concat(g,"px"),this._overlays.style.transform="scale(".concat(o/this.width,", ").concat(g/this.height,")"),this.renderer.resize(o,g),this.layersRect=this._layers.getBoundingClientRect()}appendTo(A){A.appendChild(this._root),this.relayout()}setup(){this.vm=new n.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",(A,e)=>{this.width===A&&this.height===e||(this.width=A,this.height=e,this.relayout())}),this.cloudManager=new Y.CloudManager(this),this.renderer=new r.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 c,this.vm.attachStorage(this.storage),"undefined"!=typeof AudioContext||"undefined"!=typeof webkitAudioContext?(this.audioEngine=new E.a,this.vm.attachAudioEngine(this.audioEngine)):console.warn("AudioContext not supported. Sound will not work."),this.bitmapAdapter=new w.BitmapAdapter,this.vm.attachV2BitmapAdapter(this.bitmapAdapter),this.videoProvider=new d,this.vm.setVideoProvider(this.videoProvider)}async _connectPeripherals(){const A=A=>new Promise(e=>{const t=e=>{const t=Object.keys(e).map(A=>e[A]);if(t.length>0){const e=t[0];console.log("Connecting to peripheral",e),this.vm.connectPeripheral(A,e.peripheralId)}else console.error("No peripherals found for",A);B()},i=()=>{console.error("Peripheral scan timed out for",A),B()},B=()=>{this.vm.removeListener("PERIPHERAL_LIST_UPDATE",t),this.vm.removeListener("PERIPHERAL_SCAN_TIMEOUT",i),e()};this.vm.on("PERIPHERAL_LIST_UPDATE",t),this.vm.on("PERIPHERAL_SCAN_TIMEOUT",i),this.vm.scanForPeripheral(A)});for(const e of Object.keys(this.vm.runtime.peripheralExtensions))await A(e)}_onmonitorsupdate(A){for(const e of A.valueSeq()){const A=e.get("id");if(!this._monitors.has(A)){if(!e.get("visible"))continue;"list"===e.get("mode")?this._monitors.set(A,new x(this,e)):this._monitors.set(A,new k(this,e))}this._monitors.get(A).update(e)}}ask(A){return this._question=new N(this,A),this._question.answer()}_onquestion(A){this._question&&this._question.destroy(),null!==A&&this.ask(A).then(A=>{this.vm.runtime.emit("ANSWER",A)})}loadProject(A){return this.vm.loadProject(A).then(()=>{this.vm.setCloudProvider(this.cloudManager),this.cloudManager.projectReady(),this.renderer.draw(),setTimeout(()=>{this.renderer.draw()}),this.shouldConnectPeripherals&&this._connectPeripherals()})}setUsername(A){this._username=A,this.vm.postIOData("userData",{username:A})}addCloudProvider(A){this.cloudManager.addProvider(A)}addCloudProviderOverride(A,e){this.cloudManager.addProviderOverride(A,e)}addControlButton(A){let{element:e,where:t}=A;if("top-left"===t)this._topControls.addToStart(e);else{if("top-right"!==t)throw new Error("Unknown 'where': ".concat(t));this._topControls.addToEnd(e)}this.relayout()}getMessage(A){return this.messages[A]||A}setAccentColor(A){this._root.style.setProperty("--sc-accent-color",A),this._root.style.setProperty("--sc-accent-color-transparent","".concat(A,"59"))}start(){this.vm.start(),this.vm.greenFlag()}greenFlag(){this.start()}stopAll(){this.vm.stopAll()}_lookupVariable(A,e){const t=this.vm.runtime.getTargetForStage().lookupVariableByNameAndType(A,e);if(!t)throw new Error("Global ".concat(e||"variable"," does not exist: ").concat(A));return t}setExtensionSecurityManager(A){const e=this.vm.extensionManager.securityManager;if(e)for(const[t,i]of Object.entries(A))e[t]=j(i);else console.warn("setExtensionSecurityManager not supported: there is no security manager")}getVariable(A){return this._lookupVariable(A,"").value}setVariable(A,e){if(!T(e))throw new Error("Invalid variable value");this._lookupVariable(A,"").value=e}getList(A){return this._lookupVariable(A,"list").value}setList(A,e){if(!(A=>{if(!Array.isArray(A))return!1;for(let e=0;e - +