From c876fca5cb6e3bd808baf2f6a5caf7fbc026b954 Mon Sep 17 00:00:00 2001 From: arne Date: Sun, 9 Apr 2023 13:25:46 +0200 Subject: [PATCH] Oster-Version --- static/html/witch.html | 88 +++++++++++++++++++++++------------------- 1 file changed, 49 insertions(+), 39 deletions(-) diff --git a/static/html/witch.html b/static/html/witch.html index 1dbd4d2..d0ce705 100644 --- a/static/html/witch.html +++ b/static/html/witch.html @@ -6,10 +6,10 @@ - Klick the Witch 2.0 + Click the Witch vollversion ",A=A.replace(/]*>/,"$&".concat(e))}return A}},function(A,B,t){let e;A.exports=function(){if(e)return e;e={"Sans Serif":t(246),Serif:t(247),Handwriting:t(248),Marker:t(249),Curly:t(250),Pixel:t(251),Scratch:t(252)};for(const A in e){const B=e[A];e[A]="@font-face {"+'font-family: "'.concat(A,'";src: url("data:application/x-font-ttf;charset=utf-8;base64,').concat(B,'");}')}if(!document.getElementById("scratch-font-styles")){const A=document.createElement("style");A.id="scratch-font-styles";for(const B in e)A.textContent+=e[B];document.body.insertBefore(A,document.body.firstChild)}return e}},function(A,B,t){let e,g;"undefined"==typeof TextEncoder?(e=t(18).TextEncoder,g=t(18).TextDecoder):(e=TextEncoder,g=TextDecoder);const i=""),s=new RegExp("".concat(i,"rotationCenter:(-?[\\d\\.]+):(-?[\\d\\.]+)").concat(Q,"$"));A.exports={parseVectorMetadata:A=>{const B=A.match(s);if(!B)return null;const t=+B[1],e=+B[2];return Number.isNaN(t)||Number.isNaN(e)?null:[t,e]},exportCostume:A=>{const B=A.asset.data;if("svg"!==A.dataFormat)return B;let t=(new g).decode(B);t=t.replace(s,"");const n=A.rotationCenterX,r=A.rotationCenterY;return t+="".concat(i,"rotationCenter:").concat(n,":").concat(r).concat(Q),(new e).encode(t)}}},function(A,B,t){var e=t(257),g=e(t(258)),i=e(t(260)),Q=e(t(261));A.exports=function(A,B,t){g(A,B).then((function(A){return i(A[0]).then(Q.bind(null,B)).then((function(B){return[B,A[1]]}))})).then(t.bind(null,null),t)}},function(A,B,t){const e=t(27),g=t(16),{loadSoundFromAsset:i}=t(32),{loadCostumeFromAsset:Q}=t(31),s=t(77),n=t(7),r=t(14);class c{constructor(A,B){this.runtime=B,A||(A=new g(B)),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 B of A)this.addCostumeAt(B,this.costumes_.length)}get costumes(){return this.costumes_}addCostumeAt(A,B){A.name||(A.name="");const t=this.costumes_.map(A=>A.name);A.name=n.unusedName(A.name,t),this.costumes_.splice(B,0,A)}deleteCostumeAt(A){return this.costumes.splice(A,1)[0]}createClone(A){const B=new e(this,this.runtime);if(B.isOriginal=0===this.clones.length,this.clones.push(B),B.initAudio(),B.isOriginal){const t="string"==typeof A?A:r.SPRITE_LAYER;B.initDrawable(t),this.runtime.fireTargetWasCreated(B)}else this.runtime.fireTargetWasCreated(B,this.clones[0]);return B}removeClone(A){this.runtime.fireTargetWasRemoved(A);const B=this.clones.indexOf(A);B>=0&&this.clones.splice(B,1)}duplicate(){const A=new c(null,this.runtime),B=this.blocks._blocks,t=Object.keys(B).map(A=>B[A]),e=JSON.parse(JSON.stringify(t));s(e),e.forEach(B=>{A.blocks.createBlock(B)});const g=this.runtime.targets.map(A=>A.sprite.name);A.name=n.unusedName(this.name,g);const r=[];return A.costumes=this.costumes_.map(A=>{const B=Object.assign({},A);return r.push(Q(B,this.runtime)),B}),A.sounds=this.sounds.map(B=>{const t=Object.assign({},B),e=B.asset;return r.push(i(t,e,this.runtime,A.soundBank)),t}),Promise.all(r).then(()=>A)}dispose(){this.soundBank&&this.soundBank.dispose()}}A.exports=c},function(A,B,t){const e=t(21),g=t(0);A.exports={deserializeSound:function(A,B,t,i){const Q=i||A.md5,s=B.storage;if(!s)return g.warn("No storage module present; cannot load sound asset: ",Q),Promise.resolve(null);if(!t)return Promise.resolve(null);let n=t.file(Q);if(!n){const A=new RegExp("^([^/]*/)?".concat(Q,"$"));n=t.file(A)[0]}if(!n)return g.error("Could not find sound file associated with the ".concat(A.name," sound.")),Promise.resolve(null);if(!e.support.uint8array)return g.error("JSZip uint8array is not supported in this browser."),Promise.resolve(null);const r="mp3"===A.dataFormat.toLowerCase()?s.DataFormat.MP3:s.DataFormat.WAV;return n.async("uint8array").then(A=>s.createAsset(s.AssetType.Sound,r,A,null,!0)).then(B=>{A.asset=B,A.assetId=B.assetId,A.md5="".concat(B.assetId,".").concat(B.dataFormat)})},deserializeCostume:function(A,B,t,i,Q){const s=B.storage,n=A.assetId,r=i||"".concat(n,".").concat(A.dataFormat);if(!s)return g.warn("No storage module present; cannot load costume asset: ",r),Promise.resolve(null);if(A.asset)return Promise.resolve(s.createAsset(A.asset.assetType,A.asset.dataFormat,new Uint8Array(Object.keys(A.asset.data).map(B=>A.asset.data[B])),null,!0)).then(B=>{A.asset=B,A.assetId=B.assetId,A.md5="".concat(B.assetId,".").concat(B.dataFormat)});if(!t)return Promise.resolve(null);let c=t.file(r);if(!c){const A=new RegExp("^([^/]*/)?".concat(r,"$"));c=t.file(A)[0]}if(!c)return g.error("Could not find costume file associated with the ".concat(A.name," costume.")),Promise.resolve(null);let E=null;const o=A.dataFormat.toLowerCase();if("svg"===o?E=s.AssetType.ImageVector:["png","bmp","jpeg","jpg","gif"].indexOf(o)>=0?E=s.AssetType.ImageBitmap:g.error("Unexpected file format for costume: ".concat(o)),!e.support.uint8array)return g.error("JSZip uint8array is not supported in this browser."),Promise.resolve(null);let w;if(A.textLayerMD5){const B=t.file(Q);if(!B)return g.error("Could not find text layer file associated with the ".concat(A.name," costume.")),Promise.resolve(null);w=B.async("uint8array").then(B=>s.createAsset(s.AssetType.ImageBitmap,"png",B,A.textLayerMD5)).then(B=>{A.textLayerAsset=B})}else w=Promise.resolve(null);return Promise.all([w,c.async("uint8array").then(A=>s.createAsset(E,o,A,null,!0)).then(B=>{A.asset=B,A.assetId=B.assetId,A.md5="".concat(B.assetId,".").concat(B.dataFormat)})])}}},function(A,B,t){const e=t(16),g=t(27),i=t(87),Q=t(23),s=t(0),n=t(6),r=t(7),c=t(3),E=t(264),o=t(40),w=t(8),C=t(38),a=t(14),I=t(265),{loadCostume:Y}=t(31),{loadSound:h}=t(32),{deserializeCostume:M,deserializeSound:F}=t(88),D=["argument","control","data","event","looks","math","motion","operator","procedures","sensing","sound"],u=/\u001f|\./,l=A=>{const[B,t]=A.split(u),e=I.generateExtensionId(B);return"".concat(e,"_").concat(t)},d=function(A){const B=[{}];let t=0;const e=A.split(/(?=[^\\]%[nbs])/);for(let A=0;AA.inputName).filter(A=>A)},N=function A(B){let t=[];for(let e=0;e"".concat(A,"-").concat(r.replaceUnsafeChars(B),"-").concat(t);return function(t,e){return e&&(A={}),function(g,i){return e?(A["".concat(g,"-").concat(i)]=B(t,g,i),A["".concat(g,"-").concat(i)]):A["".concat(g,"-").concat(i)]?A["".concat(g,"-").concat(i)]:B(t,g,i)}}}(),f=function(){let A={};const B=[],t=n();return function(e){return e&&(A={}),{broadcastMsgMapUpdater:function(e,g){return""===(e=e.toLowerCase())&&(e=t),A[e]="broadcastMsgId-".concat(r.replaceUnsafeChars(e)),B.push(g),A[e]},globalBroadcastMsgs:A,allBroadcastFields:B,emptyMsgName:t}}}(),H=(A,B,t,e)=>{if(!E[A.cmd])return void s.warn("Could not find monitor block with opcode: ".concat(A.cmd));const g=E[A.cmd].opcode,i=g.indexOf("_"),Q=g.substring(0,i);if("videoSensing"===Q)return;if(-1===D.indexOf(Q)&&""!==Q&&!e.extensionIDs.has(Q)&&!A.visible)return;let n=null;if(!A.hasOwnProperty("target"))for(let B=0;B{const t=e.variables[B];return t.type===w.LIST_TYPE&&t.name===A.listName}).length>0&&(n=e,A.target=e.getName())}if(n=n||t.filter(B=>B.getName()===A.target)[0],!n)throw new Error("Cannot create monitor for target that cannot be found by name");const r=G(n.id,!1),[c,o]=y([A.cmd,A.param],null,r,e,{},null,null);"getVar:"===A.cmd?c.id=r(A.param,w.SCALAR_TYPE):"contentsOfList:"===A.cmd?c.id=r(A.param,w.LIST_TYPE):B.monitorBlockInfo.hasOwnProperty(c.opcode)?c.id=B.monitorBlockInfo[c.opcode].getId(n.id,c.fields):c.id=c.opcode,c.targetId=n.isStage?null:n.id,c.isMonitored=A.visible;const a=B.monitorBlocks._blocks[c.id];if(a)a.isMonitored=A.visible,a.targetId=c.targetId;else{const A=N([c]);for(let t=0;t{const[B,t,e,g,i,Q,s]=A,n=A[5]>=0,r=new o(null,s,n?null:1.5*B,n?null:2.2*t,1.5*e,2.2*g,!i);return n&&(r.blockId=Q,l.hasOwnProperty(Q)?l[Q].push(r):l[Q]=[r]),r}).forEach(A=>{M.comments[A.id]=A})}B.hasOwnProperty("scripts")&&function(A,B,t,e,g,i){let Q=0;for(let s=0;s{"number"==typeof A.blockId&&(A.blockId=null)})}if(E.updateTargetSpecificBlocks(s),B.hasOwnProperty("lists"))for(let A=0;A{C.costumes=A}),Promise.all(h).then(A=>{C.sounds=A,C.soundBank=Y||null});const d=[];if(B.children)for(let e=0;ePromise.all(d).then(A=>{if(M.isStage){const A=D.globalBroadcastMsgs,B=D.allBroadcastFields,t=D.emptyMsgName;if(A[t]){let e=1;for(;A["message".concat(e)];)e+=1;const g="message".concat(e);A[g]=A[t],delete A[t];for(let A=0;A(A.layerOrder=B,A)).sort((A,B)=>A.targetPaneOrder-B.targetPaneOrder);return B.forEach(A=>{delete A.targetPaneOrder}),B},J=function(A){const B=A[0],t=B&&E[B];return t?"function"==typeof t?t(A):t:B&&(A=>u.test(A))(B)?(A=>{const B=A[0],t=A.length-1,e=[];for(let A=0;A{A.blockId=null,A.x=A.y=0}),[null,c+1];const C=B[0],a=o.opcode.indexOf("_"),I=o.opcode.substring(0,a);-1===D.indexOf(I)&&""!==I&&g.extensionIDs.add(I);const Y={id:n(),opcode:o.opcode,inputs:{},fields:{},next:null,shadow:!1,children:[]};E&&(Y.comment=E[E.length-1].id,E.forEach(A=>{A.id===Y.comment?A.blockId=Y.id:(A.blockId=null,A.x=A.y=0)})),c++;const h=i.expectedArg;"call"===C&&(o.argMap=d(B[1]));for(let E=0;E0){let A=null;for(let t=0;tY(n.md5,n,t,2)))}const{soundBank:s,soundPromises:n}=i;if(B.hasOwnProperty("sounds"))for(let A=0;Ah(i,t,s)))}const c=i.children;if(B.children)for(let e=0;ePromise.resolve(A)).then(i=>R(A,B,g,!t,e,i)).then(p).then(A=>({targets:A,extensions:g}))}}},function(A,B){class t{constructor(){this.left=-1/0,this.right=1/0,this.bottom=-1/0,this.top=1/0}initFromBounds(A,B,t,e){this.left=A,this.right=B,this.bottom=t,this.top=e}initFromPointsAABB(A){this.left=1/0,this.right=-1/0,this.top=-1/0,this.bottom=1/0;for(let B=0;Bthis.right&&(this.right=t),e>this.top&&(this.top=e),e=A.bottom&&A.top>=this.bottom}contains(A){return A.left>this.left&&A.rightthis.bottom}clamp(A,B,t,e){this.left=Math.max(this.left,A),this.right=Math.min(this.right,B),this.bottom=Math.max(this.bottom,t),this.top=Math.min(this.top,e),this.left=Math.min(this.left,B),this.right=Math.max(this.right,A),this.bottom=Math.min(this.bottom,e),this.top=Math.max(this.top,t)}snapToInt(){this.left=Math.floor(this.left),this.right=Math.ceil(this.right),this.bottom=Math.floor(this.bottom),this.top=Math.ceil(this.top)}static intersect(A,B){let e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new t;return e.left=Math.max(A.left,B.left),e.right=Math.min(A.right,B.right),e.top=Math.min(A.top,B.top),e.bottom=Math.max(A.bottom,B.bottom),e}static union(A,B){let e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new t;return e.left=Math.min(A.left,B.left),e.right=Math.max(A.right,B.right),e.top=Math.max(A.top,B.top),e.bottom=Math.min(A.bottom,B.bottom),e}get width(){return Math.abs(this.left-this.right)}get height(){return Math.abs(this.top-this.bottom)}}A.exports=t},function(A,B,t){const e=t(9),{rgbToHsv:g,hsvToRgb:i}=t(277),Q=t(25),s=[0,0,0];A.exports=class{static transformColor(A,B,t){if(0===B[3])return B;let e=A.enabledEffects;"number"==typeof t&&(e&=t);const n=A.getUniforms(),r=0!=(e&Q.EFFECT_INFO.color.mask),c=0!=(e&Q.EFFECT_INFO.brightness.mask);if(r||c){const A=B[3]/255;if(B[0]/=A,B[1]/=A,B[2]/=A,r){const A=g(B,s),t=.055,e=.09;A[2]{const t=[],e=A=>{A.localName!==B&&void 0!==B||!A.getAttribute||t.push(A);for(let B=0;B{const B=document.createElement("span"),t=A.outerHTML,g=e.sanitize(t,{USE_PROFILES:{svg:!0},FORBID_TAGS:["a","audio","canvas","video"],ADD_DATA_URI_TAGS:["image"]});let i,Q;try{B.innerHTML=g,document.body.appendChild(B),i=B.children[0].getBBox()}finally{document.body.removeChild(B)}Q=0===i.width||0===i.height?0:(A=>{let B=0;const t=A=>{A.getAttribute&&(A.getAttribute("stroke")&&(B=Math.max(B,1)),A.getAttribute("stroke-width")&&(B=Math.max(B,Number(A.getAttribute("stroke-width"))||0)));for(let B=0;B{B&&(A=>{const B=n(A,"linearGradient");for(const A of B)A.getAttribute("x2")||A.setAttribute("x2","0")})(A),s(A,window),(A=>{const B=n(A,"image"),t="image-rendering: optimizespeed; image-rendering: pixelated;";for(const A of B)A.getAttribute("style")?A.setAttribute("style","".concat(t," ").concat(A.getAttribute("style"))):A.setAttribute("style",t)})(A),B?((A=>{const B=[],t=A=>{"text"===A.localName&&B.push(A);for(let B=0;B{const B=n(A);for(const A of B){if(!A.style)continue;const B=A.style.stroke||A.getAttribute("stroke");B&&B.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)):r(A)};A.exports=(A,B)=>{const t=new DOMParser;A=Q(A);const e=t.parseFromString(A,"text/xml");if(e.childNodes.length<1||"svg"!==e.documentElement.localName)throw new Error("Document does not appear to be SVG.");const g=e.documentElement;return c(g,B),g}},function(A,B){A.exports=function(A){const B=[],t=A=>{"text"===A.localName&&B.push(A);for(let B=0;B{let t=(new XMLSerializer).serializeToString(A);return B&&(t=e(t)),t}},function(A,B,t){const e=t(84);A.exports=function(A){const B=e();if("string"!=typeof A)throw new Error("SVG to be inlined is not a string");const t=new Set,g=/font-family="([^"]*)"/g;let i=g.exec(A);for(;i;)t.add(i[1]),i=g.exec(A);if(t.size>0){let e="",A=A.replace(/]*>/,"$&".concat(e))}return A}},function(A,B,t){var e,g;g=t(291),e=function(){function A(A){var B,t,e;(B="function"==typeof A.readUInt32BE&&"function"==typeof A.slice)||A instanceof Uint8Array?(B?(this.highStart=A.readUInt32BE(0),this.errorValue=A.readUInt32BE(4),t=A.readUInt32BE(8),A=A.slice(12)):(e=new DataView(A.buffer),this.highStart=e.getUint32(0),this.errorValue=e.getUint32(4),t=e.getUint32(8),A=A.subarray(12)),A=g(A,new Uint8Array(t)),A=g(A,new Uint8Array(t)),this.data=new Uint32Array(A.buffer)):(this.data=A.data,this.highStart=A.highStart,this.errorValue=A.errorValue)}return 11,5,6,32,64,63,2,32,31,2048,32,2080,2080,32,2112,4,A.prototype.get=function(A){var B;return A<0||A>1114111?this.errorValue:A<55296||A>56319&&A<=65535?(B=(this.data[A>>5]<<2)+(31&A),this.data[B]):A<=65535?(B=(this.data[2048+(A-55296>>5)]<<2)+(31&A),this.data[B]):A>11)],B=((B=this.data[B+(A>>5&63)])<<2)+(31&A),this.data[B]):this.data[this.data.length-4]},A}(),A.exports=e},function(A,B,t){const e=t(45),g={ImageBitmap:{contentType:"image/png",name:"ImageBitmap",runtimeFormat:e.PNG,immutable:!0},ImageVector:{contentType:"image/svg+xml",name:"ImageVector",runtimeFormat:e.SVG,immutable:!0},Project:{contentType:"application/json",name:"Project",runtimeFormat:e.JSON,immutable:!1},Sound:{contentType:"audio/x-wav",name:"Sound",runtimeFormat:e.WAV,immutable:!0},Sprite:{contentType:"application/json",name:"Sprite",runtimeFormat:e.JSON,immutable:!0}};A.exports=g},function(A,B){A.exports=class{constructor(A){this.parent=A}load(A,B,t){return Promise.reject(new Error("No asset of type ".concat(A," for ID ").concat(B," with format ").concat(t)))}}},function(A,B,t){const e=t(47);A.exports=class extends e{get DEFAULT_VALUE(){return 100}get name(){return"volume"}initialize(){this.inputNode=this.audioEngine.audioContext.createGain(),this.outputNode=this.inputNode,this.initialized=!0}_set(A){this.value=A;const{gain:B}=this.outputNode,{currentTime:t,DECAY_DURATION:e}=this.audioEngine;B.linearRampToValueAtTime(A/100,t+e)}dispose(){this.initialized&&(this.outputNode.disconnect(),this.inputNode=null,this.outputNode=null,this.target=null,this.initialized=!1)}}},function(A,B,t){"use strict";var e,g=function(){return void 0===e&&(e=Boolean(window&&document&&document.all&&!window.atob)),e},i=function(){var A={};return function(B){if(void 0===A[B]){var t=document.querySelector(B);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(A){t=null}A[B]=t}return A[B]}}(),Q=[];function s(A){for(var B=-1,t=0;t{const B={};return B._refreshExtensionPrimitives=A._refreshExtensionPrimitives.bind(A),B._registerExtensionPrimitives=A._registerExtensionPrimitives.bind(A),B})(this.runtime)).catch(A=>{r.error("Failed to register runtime service: ".concat(JSON.stringify(A)))}),this.editingTarget=null,this._dragTarget=null,this.runtime.on(E.SCRIPT_GLOW_ON,A=>{this.emit(E.SCRIPT_GLOW_ON,A)}),this.runtime.on(E.SCRIPT_GLOW_OFF,A=>{this.emit(E.SCRIPT_GLOW_OFF,A)}),this.runtime.on(E.BLOCK_GLOW_ON,A=>{this.emit(E.BLOCK_GLOW_ON,A)}),this.runtime.on(E.BLOCK_GLOW_OFF,A=>{this.emit(E.BLOCK_GLOW_OFF,A)}),this.runtime.on(E.PROJECT_START,()=>{this.emit(E.PROJECT_START)}),this.runtime.on(E.PROJECT_RUN_START,()=>{this.emit(E.PROJECT_RUN_START)}),this.runtime.on(E.PROJECT_RUN_STOP,()=>{this.emit(E.PROJECT_RUN_STOP)}),this.runtime.on(E.PROJECT_CHANGED,()=>{this.emit(E.PROJECT_CHANGED)}),this.runtime.on(E.VISUAL_REPORT,A=>{this.emit(E.VISUAL_REPORT,A)}),this.runtime.on(E.TARGETS_UPDATE,A=>{this.emitTargetsUpdate(A)}),this.runtime.on(E.MONITORS_UPDATE,A=>{this.emit(E.MONITORS_UPDATE,A)}),this.runtime.on(E.BLOCK_DRAG_UPDATE,A=>{this.emit(E.BLOCK_DRAG_UPDATE,A)}),this.runtime.on(E.BLOCK_DRAG_END,(A,B)=>{this.emit(E.BLOCK_DRAG_END,A,B)}),this.runtime.on(E.EXTENSION_ADDED,A=>{this.emit(E.EXTENSION_ADDED,A)}),this.runtime.on(E.EXTENSION_FIELD_ADDED,(A,B)=>{this.emit(E.EXTENSION_FIELD_ADDED,A,B)}),this.runtime.on(E.BLOCKSINFO_UPDATE,A=>{this.emit(E.BLOCKSINFO_UPDATE,A)}),this.runtime.on(E.BLOCKS_NEED_UPDATE,()=>{this.emitWorkspaceUpdate()}),this.runtime.on(E.TOOLBOX_EXTENSIONS_NEED_UPDATE,()=>{this.extensionManager.refreshBlocks()}),this.runtime.on(E.PERIPHERAL_LIST_UPDATE,A=>{this.emit(E.PERIPHERAL_LIST_UPDATE,A)}),this.runtime.on(E.USER_PICKED_PERIPHERAL,A=>{this.emit(E.USER_PICKED_PERIPHERAL,A)}),this.runtime.on(E.PERIPHERAL_CONNECTED,()=>this.emit(E.PERIPHERAL_CONNECTED)),this.runtime.on(E.PERIPHERAL_REQUEST_ERROR,()=>this.emit(E.PERIPHERAL_REQUEST_ERROR)),this.runtime.on(E.PERIPHERAL_DISCONNECTED,()=>this.emit(E.PERIPHERAL_DISCONNECTED)),this.runtime.on(E.PERIPHERAL_CONNECTION_LOST_ERROR,A=>this.emit(E.PERIPHERAL_CONNECTION_LOST_ERROR,A)),this.runtime.on(E.PERIPHERAL_SCAN_TIMEOUT,()=>this.emit(E.PERIPHERAL_SCAN_TIMEOUT)),this.runtime.on(E.MIC_LISTENING,A=>{this.emit(E.MIC_LISTENING,A)}),this.runtime.on(E.RUNTIME_STARTED,()=>{this.emit(E.RUNTIME_STARTED)}),this.runtime.on(E.RUNTIME_STOPPED,()=>{this.emit(E.RUNTIME_STOPPED)}),this.runtime.on(E.HAS_CLOUD_DATA_UPDATE,A=>{this.emit(E.HAS_CLOUD_DATA_UPDATE,A)}),this.runtime.on(E.RUNTIME_OPTIONS_CHANGED,A=>{this.emit(E.RUNTIME_OPTIONS_CHANGED,A)}),this.runtime.on(E.COMPILER_OPTIONS_CHANGED,A=>{this.emit(E.COMPILER_OPTIONS_CHANGED,A)}),this.runtime.on(E.FRAMERATE_CHANGED,A=>{this.emit(E.FRAMERATE_CHANGED,A)}),this.runtime.on(E.INTERPOLATION_CHANGED,A=>{this.emit(E.INTERPOLATION_CHANGED,A)}),this.runtime.on(E.STAGE_SIZE_CHANGED,(A,B)=>{this.emit(E.STAGE_SIZE_CHANGED,A,B)}),this.runtime.on(E.COMPILE_ERROR,(A,B)=>{this.emit(E.COMPILE_ERROR,A,B)}),this.runtime.on(E.TURBO_MODE_OFF,()=>{this.emit(E.TURBO_MODE_OFF)}),this.runtime.on(E.TURBO_MODE_ON,()=>{this.emit(E.TURBO_MODE_ON)}),this.extensionManager=new n(this.runtime);for(const A of l)this.extensionManager.loadExtensionIdSync(A);this.blockListener=this.blockListener.bind(this),this.flyoutBlockListener=this.flyoutBlockListener.bind(this),this.monitorBlockListener=this.monitorBlockListener.bind(this),this.variableListener=this.variableListener.bind(this)}start(){this.runtime.start()}stop(){this.runtime.stop()}greenFlag(){this.runtime.greenFlag()}setTurboMode(A){this.runtime.turboMode=!!A,this.runtime.turboMode?this.emit(E.TURBO_MODE_ON):this.emit(E.TURBO_MODE_OFF)}setCompatibilityMode(A){this.runtime.setCompatibilityMode(!!A)}setFramerate(A){this.runtime.setFramerate(A)}setInterpolation(A){this.runtime.setInterpolation(A)}setRuntimeOptions(A){this.runtime.setRuntimeOptions(A)}setCompilerOptions(A){this.runtime.setCompilerOptions(A)}setStageSize(A,B){this.runtime.setStageSize(A,B)}setInEditor(A){this.runtime.setInEditor(A)}convertToPackagedRuntime(){this.runtime.convertToPackagedRuntime()}addAddonBlock(A){this.runtime.addAddonBlock(A)}getAddonBlock(A){return this.runtime.getAddonBlock(A)}storeProjectOptions(){this.runtime.storeProjectOptions(),this.editingTarget.isStage&&this.emitWorkspaceUpdate()}enableDebug(){return this.runtime.enableDebug(),"enabled debug mode"}stopAll(){this.runtime.stopAll()}clear(){this.runtime.dispose(),this.editingTarget=null,this.emitTargetsUpdate(!1)}getPlaygroundData(){const A=this,B=this.runtime.threads.filter(B=>B.target===A.editingTarget),t=JSON.stringify(B,(A,B)=>{if("target"!==A&&"blockContainer"!==A)return B},2);this.emit("playgroundData",{blocks:this.editingTarget.blocks,threads:t})}postIOData(A,B){this.runtime.ioDevices[A]&&this.runtime.ioDevices[A].postData(B)}setVideoProvider(A){this.runtime.ioDevices.video.setProvider(A)}setCloudProvider(A){this.runtime.ioDevices.cloud.setProvider(A)}scanForPeripheral(A){this.runtime.scanForPeripheral(A)}connectPeripheral(A,B){this.runtime.connectPeripheral(A,B)}disconnectPeripheral(A){this.runtime.disconnectPeripheral(A)}getPeripheralIsConnected(A){return this.runtime.getPeripheralIsConnected(A)}loadProject(A){"object"!=typeof A||A instanceof ArrayBuffer||ArrayBuffer.isView(A)||(A=JSON.stringify(A));return new Promise((B,e)=>{t(86)(A,!1,(A,t)=>{if(A)return e(A);B(t)})}).catch(B=>{const{SB1File:e,ValidationError:g}=t(323);try{const B=new e(A),t=B.json;return t.projectVersion=2,Promise.resolve([t,B.zip])}catch(A){if(!(A instanceof g||"".concat(A).includes("Non-ascii character in FixedAsciiString")))return Promise.reject(A)}return Promise.reject(B)}).then(A=>this.deserializeProject(A[0],A[1])).then(()=>this.runtime.emitProjectLoaded()).catch(A=>A.hasOwnProperty("validationError")?Promise.reject(JSON.stringify(A)):Promise.reject(A))}downloadProjectId(A){const B=this.runtime.storage;if(!B)return void r.error("No storage module present; cannot load project: ",A);const t=this;B.load(B.AssetType.Project,A).then(B=>B?t.loadProject(B.data):(r.error("Failed to fetch project with id: ".concat(A)),null))}saveProjectSb3(){const A=h(this.runtime),B=M(this.runtime),t=this.toJSON(),e=new i;return e.file("project.json",t),this._addFileDescsToZip(A.concat(B),e),e.generateAsync({type:"blob",mimeType:"application/x.scratch.sb3",compression:"DEFLATE",compressionOptions:{level:6}})}saveProjectSb3DontZip(){const A=h(this.runtime),B=M(this.runtime),t=this.toJSON(),g={"project.json":(new e).encode(t)};for(const t of A.concat(B))g[t.fileName]=t.fileContent;return g}get assets(){return this.runtime.targets.reduce((A,B)=>A.concat(B.sprite.sounds.map(A=>A.asset)).concat(B.sprite.costumes.map(A=>A.asset)),[])}_addFileDescsToZip(A,B){for(let t=0;t{let{targets:B,extensions:t}=A;if("undefined"!=typeof performance){performance.mark("scratch-vm-deserialize-end");try{performance.measure("scratch-vm-deserialize","scratch-vm-deserialize-start","scratch-vm-deserialize-end")}catch(A){r.error(A)}}return this.installTargets(B,t,!0)})}async installTargets(A,B,t){await this.extensionManager.allAsyncExtensionsLoaded();const e=[];return B.extensionIDs.forEach(A=>{if(!this.extensionManager.isExtensionLoaded(A)){const t=B.extensionURLs.get(A)||A;e.push(this.extensionManager.loadExtensionURL(t))}}),A=A.filter(A=>!!A),Promise.all(e).then(()=>{A.forEach(A=>{this.runtime.addTarget(A),A.updateAllDrawableProperties(),A.isSprite()&&this.renameSprite(A.id,A.getName())}),this.runtime.executableTargets.sort((A,B)=>A.layerOrder-B.layerOrder),A.forEach(A=>{delete A.layerOrder}),t&&A.length>1?this.editingTarget=A[1]:this.editingTarget=A[0],t||this.editingTarget.fixUpVariableReferences(),t&&this.runtime.parseProjectOptions(),this.emitTargetsUpdate(!1),this.emitWorkspaceUpdate(),this.runtime.setEditingTarget(this.editingTarget),this.runtime.ioDevices.cloud.setStage(this.runtime.getTargetForStage())})}addSprite(A){"object"!=typeof A||A instanceof ArrayBuffer||ArrayBuffer.isView(A)||(A=JSON.stringify(A));return new Promise((B,e)=>{t(86)(A,!0,(A,t)=>{if(A)return e(A);B(t)})}).then(A=>{const B=A[0].projectVersion;return 2===B?this._addSprite2(A[0],A[1]):3===B?this._addSprite3(A[0],A[1]):Promise.reject("".concat("Sprite Upload Error:"," Unable to verify sprite version."))}).then(()=>this.runtime.emitProjectChanged()).catch(A=>A.hasOwnProperty("validationError")?Promise.reject(JSON.stringify(A)):Promise.reject("".concat("Sprite Upload Error:"," ").concat(A)))}_addSprite2(A,B){return t(89).deserialize(A,this.runtime,!0,B).then(A=>{let{targets:B,extensions:t}=A;return this.installTargets(B,t,!1)})}_addSprite3(A,B){return t(33).deserialize(A,this.runtime,B,!0).then(A=>{let{targets:B,extensions:t}=A;return this.installTargets(B,t,!1)})}addCostume(A,B,t,e){const g=t?this.runtime.getTargetById(t):this.editingTarget;return g?I(A,B,this.runtime,e).then(()=>{g.addCostume(B),g.setCostume(g.getCostumes().length-1),this.runtime.emitProjectChanged()}):Promise.reject()}addCostumeFromLibrary(A,B){return this.editingTarget?this.addCostume(A,B,this.editingTarget.id,2):Promise.reject()}duplicateCostume(A){const B=this.editingTarget.getCostumes()[A],t=Object.assign({},B),e="".concat(t.assetId,".").concat(t.dataFormat);return I(e,t,this.runtime).then(()=>{this.editingTarget.addCostume(t,A+1),this.editingTarget.setCostume(A+1),this.emitTargetsUpdate()})}duplicateSound(A){const B=this.editingTarget.getSounds()[A],t=Object.assign({},B);return Y(t,this.runtime,this.editingTarget.sprite.soundBank).then(()=>{this.editingTarget.addSound(t,A+1),this.emitTargetsUpdate()})}renameCostume(A,B){this.editingTarget.renameCostume(A,B),this.emitTargetsUpdate()}deleteCostume(A){const B=this.editingTarget.deleteCostume(A);if(B){const A=this.editingTarget;return this.runtime.emitProjectChanged(),()=>{A.addCostume(B),this.emitTargetsUpdate()}}return null}addSound(A,B){const t=B?this.runtime.getTargetById(B):this.editingTarget;return t?Y(A,this.runtime,t.sprite.soundBank).then(()=>{t.addSound(A),this.emitTargetsUpdate()}):Promise.reject(new Error("No target with ID: ".concat(B)))}renameSound(A,B){this.editingTarget.renameSound(A,B),this.emitTargetsUpdate()}getSoundBuffer(A){const B=this.editingTarget.sprite.sounds[A].soundId;return B&&this.runtime&&this.runtime.audioEngine?this.editingTarget.sprite.soundBank.getSoundPlayer(B).buffer:null}updateSoundBuffer(A,B,t){const e=this.editingTarget.sprite.sounds[A];e&&e.broken&&delete e.broken;const g=e?e.soundId:null;if(g&&this.runtime&&this.runtime.audioEngine&&(this.editingTarget.sprite.soundBank.getSoundPlayer(g).buffer=B),t){e.format="";const A=this.runtime.storage;e.asset=A.createAsset(A.AssetType.Sound,A.DataFormat.WAV,t,null,!0),e.assetId=e.asset.assetId,e.dataFormat=A.DataFormat.WAV,e.md5="".concat(e.assetId,".").concat(e.dataFormat),e.sampleCount=B.length,e.rate=B.sampleRate}this.emitTargetsUpdate()}deleteSound(A){const B=this.editingTarget,t=this.editingTarget.deleteSound(A);if(t){this.runtime.emitProjectChanged();return()=>{B.addSound(t),this.emitTargetsUpdate()}}return null}getCostume(A){const B=this.editingTarget.getCostumes()[A].asset;if(!B||!this.runtime||!this.runtime.storage)return null;const t=B.dataFormat;return t===this.runtime.storage.DataFormat.SVG?B.decodeText():t===this.runtime.storage.DataFormat.PNG||t===this.runtime.storage.DataFormat.JPG?B.encodeDataURI():(r.error("Unhandled format: ".concat(B.dataFormat)),null)}getExportedCostume(A){return F(A)}getExportedCostumeBase64(A){const B=this.getExportedCostume(A);return D.uint8ArrayToBase64(B)}updateBitmap(A,B,t,e,g){return this._updateBitmap(this.editingTarget.getCostumes()[A],B,t,e,g)}_updateBitmap(A,B,t,e,g){if(!(A&&this.runtime&&this.runtime.renderer))return;A&&A.broken&&delete A.broken,A.rotationCenterX=t,A.rotationCenterY=e;const i=0===B.sourceWidth?0:B.width,s=0===B.sourceHeight?0:B.height,n=document.createElement("canvas");n.width=i,n.height=s;n.getContext("2d").putImageData(B,0,0),this.runtime.renderer.updateBitmapSkin(A.skinId,n,g,[t/g,e/g]),n.toBlob(B=>{const t=new FileReader;t.addEventListener("loadend",()=>{const B=this.runtime.storage;A.dataFormat=B.DataFormat.PNG,A.bitmapResolution=g,A.size=[i,s],A.asset=B.createAsset(B.AssetType.ImageBitmap,A.dataFormat,Q.from(t.result),null,!0),A.assetId=A.asset.assetId,A.md5="".concat(A.assetId,".").concat(A.dataFormat),this.emitTargetsUpdate()}),B&&t.readAsArrayBuffer(B)})}updateSvg(A,B,t,e){return this._updateSvg(this.editingTarget.getCostumes()[A],B,t,e)}_updateSvg(A,B,t,g){A&&A.broken&&delete A.broken,A&&this.runtime&&this.runtime.renderer&&(A.rotationCenterX=t,A.rotationCenterY=g,this.runtime.renderer.updateSVGSkin(A.skinId,B,[t,g]),A.size=this.runtime.renderer.getSkinSize(A.skinId));const i=this.runtime.storage;A.dataFormat=i.DataFormat.SVG,A.bitmapResolution=1,A.asset=i.createAsset(i.AssetType.ImageVector,A.dataFormat,(new e).encode(B),null,!0),A.assetId=A.asset.assetId,A.md5="".concat(A.assetId,".").concat(A.dataFormat),this.emitTargetsUpdate()}addBackdrop(A,B){return I(A,B,this.runtime).then(()=>{const A=this.runtime.getTargetForStage();A.addCostume(B),A.setCostume(A.getCostumes().length-1),this.runtime.emitProjectChanged()})}renameSprite(A,B){const t=this.runtime.getTargetById(A);if(!t)throw new Error("No target with the provided id.");{if(!t.isSprite())throw new Error("Cannot rename non-sprite targets.");const A=t.sprite;if(!A)throw new Error("No sprite associated with this target.");if(B&&-1===u.indexOf(B)){const e=this.runtime.targets.filter(A=>A.isSprite()&&A.id!==t.id).map(A=>A.sprite.name),g=A.name,i=o.unusedName(B,e);if(A.name=i,g===i)return;const Q=this.runtime.targets;for(let A=0;AA.id).indexOf(B.id);if(!B.isSprite())throw new Error("Cannot delete non-sprite targets.");const e=B.sprite;if(!e)throw new Error("No sprite associated with this target.");const g=this.exportSprite(A,"uint8array"),i=()=>g.then(A=>this.addSprite(A));B.deleteMonitors();const Q=this.editingTarget;for(let A=0;A0?this.setEditingTarget(this.runtime.targets[A].id):this.editingTarget=null}}return this.emitTargetsUpdate(),i}throw new Error("No target with the provided id.")}duplicateSprite(A){const B=this.runtime.getTargetById(A);if(!B)throw new Error("No target with the provided id.");if(!B.isSprite())throw new Error("Cannot duplicate non-sprite targets.");if(!B.sprite)throw new Error("No sprite associated with this target.");return B.duplicate().then(A=>{this.runtime.addTarget(A),A.goBehindOther(B),this.setEditingTarget(A.id)})}attachAudioEngine(A){this.runtime.attachAudioEngine(A)}attachRenderer(A){this.runtime.attachRenderer(A)}get renderer(){return this.runtime&&this.runtime.renderer}attachV2SVGAdapter(){}attachV2BitmapAdapter(A){this.runtime.attachV2BitmapAdapter(A)}attachStorage(A){this.runtime.attachStorage(A)}setLocale(A,B){return A!==w.setup().locale&&w.setup({locale:A,translations:{[A]:B}}),this.extensionManager.refreshBlocks()}getLocale(){return w.setup().locale}blockListener(A){this.editingTarget&&this.editingTarget.blocks.blocklyListen(A)}flyoutBlockListener(A){this.runtime.flyoutBlocks.blocklyListen(A)}monitorBlockListener(A){-1!==["create","change"].indexOf(A.type)&&this.runtime.monitorBlocks.blocklyListen(A)}variableListener(A){-1!==["var_create","var_rename","var_delete"].indexOf(A.type)&&this.runtime.getTargetForStage().blocks.blocklyListen(A)}setEditingTarget(A){if(this.editingTarget&&A===this.editingTarget.id)return;const B=this.runtime.getTargetById(A);B&&(this.editingTarget=B,this.emitTargetsUpdate(!1),this.emitWorkspaceUpdate(),this.runtime.setEditingTarget(B))}shareBlocksToTarget(A,B,e){const g=t(33),i=JSON.parse(JSON.stringify(A));a(i);const Q=this.runtime.getTargetById(B);if(e){this.runtime.getTargetById(e).resolveVariableSharingConflictsWithTarget(i,Q)}const s=new Set(i.map(A=>g.getExtensionIdForOpcode(A.opcode)).filter(A=>!!A).filter(A=>!this.extensionManager.isExtensionLoaded(A))),n=Array.from(s,A=>this.extensionManager.loadExtensionURL(A));return Promise.all(n).then(()=>{i.forEach(A=>{Q.blocks.createBlock(A)}),Q.blocks.updateTargetSpecificBlocks(Q.isStage)})}shareCostumeToTarget(A,B){const t=this.editingTarget.getCostumes()[A],e=Object.assign({},t),g="".concat(e.assetId,".").concat(e.dataFormat);return I(g,e,this.runtime).then(()=>{const A=this.runtime.getTargetById(B);A&&(A.addCostume(e),A.setCostume(A.getCostumes().length-1))})}shareSoundToTarget(A,B){const t=this.editingTarget.getSounds()[A],e=Object.assign({},t),g=this.runtime.getTargetById(B);return Y(e,this.runtime,g.sprite.soundBank).then(()=>{g&&(g.addSound(e),this.emitTargetsUpdate())})}refreshWorkspace(){this.editingTarget&&(this.emitWorkspaceUpdate(),this.runtime.setEditingTarget(this.editingTarget),this.emitTargetsUpdate(!1))}emitTargetsUpdate(A){let B;void 0===A&&(A=!0);const t=()=>(B||(B=this.runtime.targets.filter(A=>!A.hasOwnProperty("isOriginal")||A.isOriginal).map(A=>A.toJSON())),B);this.emit("targetsUpdate",{get targetList(){return t()},editingTarget:this.editingTarget?this.editingTarget.id:null}),A&&this.runtime.emitProjectChanged()}emitWorkspaceUpdate(){const A=this.runtime.getTargetForStage().variables;let B=[];for(const t in A)A[t].type===C.BROADCAST_MESSAGE_TYPE&&B.push(t);for(let A=0;At[A]),i=Object.keys(e).map(A=>e[A]),Q=Object.keys(this.editingTarget.comments).map(A=>this.editingTarget.comments[A]).filter(A=>null===A.blockId),s='\n \n '.concat(g.map(A=>A.toXML()).join(),"\n ").concat(i.map(A=>A.toXML(!0)).join(),"\n \n ").concat(Q.map(A=>A.toXML()).join(),"\n ").concat(this.editingTarget.blocks.toXML(this.editingTarget.comments),"\n ");this.emit("workspaceUpdate",{xml:s})}getTargetIdForDrawableId(A){const B=this.runtime.getTargetByDrawableId(A);return B&&B.hasOwnProperty("id")&&B.hasOwnProperty("isStage")&&!B.isStage?B.id:null}reorderTarget(A,B){let t=this.runtime.targets;if((A=c.clamp(A,0,t.length-1))===(B=c.clamp(B,0,t.length-1)))return!1;const e=t[A];return t=t.slice(0,A).concat(t.slice(A+1)),t.splice(B,0,e),this.runtime.targets=t,this.emitTargetsUpdate(),!0}reorderCostume(A,B,t){const e=this.runtime.getTargetById(A);if(e){const A=e.reorderCostume(B,t);return A&&this.runtime.emitProjectChanged(),A}return!1}reorderSound(A,B,t){const e=this.runtime.getTargetById(A);if(e){const A=e.reorderSound(B,t);return A&&this.runtime.emitProjectChanged(),A}return!1}startDrag(A){const B=this.runtime.getTargetById(A);B&&(this._dragTarget=B,B.startDrag())}stopDrag(A){const B=this.runtime.getTargetById(A);B&&(this._dragTarget=null,B.stopDrag(),this.setEditingTarget(B.sprite&&B.sprite.clones[0]?B.sprite.clones[0].id:B.id))}postSpriteInfo(A){this._dragTarget?this._dragTarget.postSpriteInfo(A):this.editingTarget.postSpriteInfo(A),this.runtime.emitProjectChanged()}setVariableValue(A,B,t){const e=this.runtime.getTargetById(A);if(e){const A=e.lookupVariableById(B);if(A)return A.value=t,A.isCloud&&this.runtime.ioDevices.cloud.requestUpdateVariable(A.name,A.value),!0}return!1}getVariableValue(A,B){const t=this.runtime.getTargetById(A);if(t){const A=t.lookupVariableById(B);if(A)return A.value}return null}configureScratchLinkSocketFactory(A){this.runtime.configureScratchLinkSocketFactory(A)}}},function(A,B,t){"use strict";B.byteLength=function(A){var B=r(A),t=B[0],e=B[1];return 3*(t+e)/4-e},B.toByteArray=function(A){var B,t,e=r(A),Q=e[0],s=e[1],n=new i(function(A,B,t){return 3*(B+t)/4-t}(0,Q,s)),c=0,E=s>0?Q-4:Q;for(t=0;t>16&255,n[c++]=B>>8&255,n[c++]=255&B;2===s&&(B=g[A.charCodeAt(t)]<<2|g[A.charCodeAt(t+1)]>>4,n[c++]=255&B);1===s&&(B=g[A.charCodeAt(t)]<<10|g[A.charCodeAt(t+1)]<<4|g[A.charCodeAt(t+2)]>>2,n[c++]=B>>8&255,n[c++]=255&B);return n},B.fromByteArray=function(A){for(var B,t=A.length,g=t%3,i=[],Q=0,s=t-g;Qs?s:Q+16383));1===g?(B=A[t-1],i.push(e[B>>2]+e[B<<4&63]+"==")):2===g&&(B=(A[t-2]<<8)+A[t-1],i.push(e[B>>10]+e[B>>4&63]+e[B<<2&63]+"="));return i.join("")};for(var e=[],g=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,n=Q.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var t=A.indexOf("=");return-1===t&&(t=B),[t,t===B?0:4-t%4]}function c(A,B,t){for(var g,i,Q=[],s=B;s>18&63]+e[i>>12&63]+e[i>>6&63]+e[63&i]);return Q.join("")}g["-".charCodeAt(0)]=62,g["_".charCodeAt(0)]=63},function(A,B){ +A.exports=function(){"use strict";var A=Object.hasOwnProperty,B=Object.setPrototypeOf,t=Object.isFrozen,e=Object.getPrototypeOf,g=Object.getOwnPropertyDescriptor,i=Object.freeze,Q=Object.seal,s=Object.create,n="undefined"!=typeof Reflect&&Reflect,r=n.apply,c=n.construct;r||(r=function(A,B,t){return A.apply(B,t)}),i||(i=function(A){return A}),Q||(Q=function(A){return A}),c||(c=function(A,B){return new(Function.prototype.bind.apply(A,[null].concat(function(A){if(Array.isArray(A)){for(var B=0,t=Array(A.length);B1?t-1:0),g=1;g/gm),S=Q(/^data-[\-\w.\u00B7-\uFFFF]/),b=Q(/^aria-[\-\w]+$/),z=Q(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),L=Q(/^(?:\w+script|data):/i),P=Q(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),v="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 B=0,t=Array(A.length);B0&&void 0!==arguments[0]?arguments[0]:V(),t=function(B){return A(B)};if(t.version="2.2.7",t.removed=[],!B||!B.document||9!==B.document.nodeType)return t.isSupported=!1,t;var e=B.document,g=B.document,Q=B.DocumentFragment,s=B.HTMLTemplateElement,n=B.Node,r=B.Element,c=B.NodeFilter,E=B.NamedNodeMap,u=void 0===E?B.NamedNodeMap||B.MozNamedAttrMap:E,O=B.Text,X=B.Comment,Z=B.DOMParser,_=B.trustedTypes,q=r.prototype,$=U(q,"cloneNode"),AA=U(q,"nextSibling"),BA=U(q,"childNodes"),tA=U(q,"parentNode");if("function"==typeof s){var eA=g.createElement("template");eA.content&&eA.content.ownerDocument&&(g=eA.content.ownerDocument)}var gA=K(_,e),iA=gA&&jA?gA.createHTML(""):"",QA=g,sA=QA.implementation,nA=QA.createNodeIterator,rA=QA.getElementsByTagName,cA=QA.createDocumentFragment,EA=e.importNode,oA={};try{oA=d(g).documentMode?g.documentMode:{}}catch(A){}var wA={};t.isSupported="function"==typeof tA&&sA&&void 0!==sA.createHTMLDocument&&9!==oA;var CA=j,aA=x,IA=S,YA=b,hA=L,MA=P,FA=z,DA=null,uA=l({},[].concat(W(N),W(m),W(G),W(H),W(p))),lA=null,dA=l({},[].concat(W(y),W(J),W(k),W(T))),UA=null,NA=null,mA=!0,GA=!0,fA=!1,HA=!1,RA=!1,pA=!1,yA=!1,JA=!1,kA=!1,TA=!0,jA=!1,xA=!0,SA=!0,bA=!1,zA={},LA=l({},["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"]),PA=null,vA=l({},["audio","video","img","source","image","track"]),WA=null,VA=l({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),KA=null,OA=g.createElement("form"),XA=function(A){KA&&KA===A||(A&&"object"===(void 0===A?"undefined":v(A))||(A={}),A=d(A),DA="ALLOWED_TAGS"in A?l({},A.ALLOWED_TAGS):uA,lA="ALLOWED_ATTR"in A?l({},A.ALLOWED_ATTR):dA,WA="ADD_URI_SAFE_ATTR"in A?l(d(VA),A.ADD_URI_SAFE_ATTR):VA,PA="ADD_DATA_URI_TAGS"in A?l(d(vA),A.ADD_DATA_URI_TAGS):vA,UA="FORBID_TAGS"in A?l({},A.FORBID_TAGS):{},NA="FORBID_ATTR"in A?l({},A.FORBID_ATTR):{},zA="USE_PROFILES"in A&&A.USE_PROFILES,mA=!1!==A.ALLOW_ARIA_ATTR,GA=!1!==A.ALLOW_DATA_ATTR,fA=A.ALLOW_UNKNOWN_PROTOCOLS||!1,HA=A.SAFE_FOR_TEMPLATES||!1,RA=A.WHOLE_DOCUMENT||!1,JA=A.RETURN_DOM||!1,kA=A.RETURN_DOM_FRAGMENT||!1,TA=!1!==A.RETURN_DOM_IMPORT,jA=A.RETURN_TRUSTED_TYPE||!1,yA=A.FORCE_BODY||!1,xA=!1!==A.SANITIZE_DOM,SA=!1!==A.KEEP_CONTENT,bA=A.IN_PLACE||!1,FA=A.ALLOWED_URI_REGEXP||FA,HA&&(GA=!1),kA&&(JA=!0),zA&&(DA=l({},[].concat(W(p))),lA=[],!0===zA.html&&(l(DA,N),l(lA,y)),!0===zA.svg&&(l(DA,m),l(lA,J),l(lA,T)),!0===zA.svgFilters&&(l(DA,G),l(lA,J),l(lA,T)),!0===zA.mathMl&&(l(DA,H),l(lA,k),l(lA,T))),A.ADD_TAGS&&(DA===uA&&(DA=d(DA)),l(DA,A.ADD_TAGS)),A.ADD_ATTR&&(lA===dA&&(lA=d(lA)),l(lA,A.ADD_ATTR)),A.ADD_URI_SAFE_ATTR&&l(WA,A.ADD_URI_SAFE_ATTR),SA&&(DA["#text"]=!0),RA&&l(DA,["html","head","body"]),DA.table&&(l(DA,["tbody"]),delete UA.tbody),i&&i(A),KA=A)},ZA=l({},["mi","mo","mn","ms","mtext"]),_A=l({},["foreignobject","desc","title","annotation-xml"]),qA=l({},m);l(qA,G),l(qA,f);var $A=l({},H);l($A,R);var AB="http://www.w3.org/1998/Math/MathML",BB="http://www.w3.org/2000/svg",tB="http://www.w3.org/1999/xhtml",eB=function(A){var B=tA(A);B&&B.tagName||(B={namespaceURI:tB,tagName:"template"});var t=a(A.tagName),e=a(B.tagName);if(A.namespaceURI===BB)return B.namespaceURI===tB?"svg"===t:B.namespaceURI===AB?"svg"===t&&("annotation-xml"===e||ZA[e]):Boolean(qA[t]);if(A.namespaceURI===AB)return B.namespaceURI===tB?"math"===t:B.namespaceURI===BB?"math"===t&&_A[e]:Boolean($A[t]);if(A.namespaceURI===tB){if(B.namespaceURI===BB&&!_A[e])return!1;if(B.namespaceURI===AB&&!ZA[e])return!1;var g=l({},["title","style","font","a","script"]);return!$A[t]&&(g[t]||!qA[t])}return!1},gB=function(A){C(t.removed,{element:A});try{A.parentNode.removeChild(A)}catch(B){try{A.outerHTML=iA}catch(B){A.remove()}}},iB=function(A,B){try{C(t.removed,{attribute:B.getAttributeNode(A),from:B})}catch(A){C(t.removed,{attribute:null,from:B})}if(B.removeAttribute(A),"is"===A&&!lA[A])if(JA||kA)try{gB(B)}catch(A){}else try{B.setAttribute(A,"")}catch(A){}},QB=function(A){var B=void 0,t=void 0;if(yA)A=""+A;else{var e=I(A,/^[\r\n\t ]+/);t=e&&e[0]}var i=gA?gA.createHTML(A):A;try{B=(new Z).parseFromString(i,"text/html")}catch(A){}if(!B||!B.documentElement){var Q=(B=sA.createHTMLDocument("")).body;Q.parentNode.removeChild(Q.parentNode.firstElementChild),Q.outerHTML=i}return A&&t&&B.body.insertBefore(g.createTextNode(t),B.body.childNodes[0]||null),rA.call(B,RA?"html":"body")[0]},sB=function(A){return nA.call(A.ownerDocument||A,A,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,(function(){return c.FILTER_ACCEPT}),!1)},nB=function(A){return!(A instanceof O||A instanceof X||"string"==typeof A.nodeName&&"string"==typeof A.textContent&&"function"==typeof A.removeChild&&A.attributes instanceof u&&"function"==typeof A.removeAttribute&&"function"==typeof A.setAttribute&&"string"==typeof A.namespaceURI&&"function"==typeof A.insertBefore)},rB=function(A){return"object"===(void 0===n?"undefined":v(n))?A instanceof n:A&&"object"===(void 0===A?"undefined":v(A))&&"number"==typeof A.nodeType&&"string"==typeof A.nodeName},cB=function(A,B,e){wA[A]&&o(wA[A],(function(A){A.call(t,B,e,KA)}))},EB=function(A){var B=void 0;if(cB("beforeSanitizeElements",A,null),nB(A))return gB(A),!0;if(I(A.nodeName,/[\u0080-\uFFFF]/))return gB(A),!0;var e=a(A.nodeName);if(cB("uponSanitizeElement",A,{tagName:e,allowedTags:DA}),!rB(A.firstElementChild)&&(!rB(A.content)||!rB(A.content.firstElementChild))&&F(/<[/\w]/g,A.innerHTML)&&F(/<[/\w]/g,A.textContent))return gB(A),!0;if(!DA[e]||UA[e]){if(SA&&!LA[e]){var g=tA(A),i=BA(A);if(i&&g)for(var Q=i.length-1;Q>=0;--Q)g.insertBefore($(i[Q],!0),AA(A))}return gB(A),!0}return A instanceof r&&!eB(A)?(gB(A),!0):"noscript"!==e&&"noembed"!==e||!F(/<\/no(script|embed)/i,A.innerHTML)?(HA&&3===A.nodeType&&(B=A.textContent,B=Y(B,CA," "),B=Y(B,aA," "),A.textContent!==B&&(C(t.removed,{element:A.cloneNode()}),A.textContent=B)),cB("afterSanitizeElements",A,null),!1):(gB(A),!0)},oB=function(A,B,t){if(xA&&("id"===B||"name"===B)&&(t in g||t in OA))return!1;if(GA&&F(IA,B));else if(mA&&F(YA,B));else{if(!lA[B]||NA[B])return!1;if(WA[B]);else if(F(FA,Y(t,MA,"")));else if("src"!==B&&"xlink:href"!==B&&"href"!==B||"script"===A||0!==h(t,"data:")||!PA[A])if(fA&&!F(hA,Y(t,MA,"")));else if(t)return!1}return!0},wB=function(A){var B=void 0,e=void 0,g=void 0,i=void 0;cB("beforeSanitizeAttributes",A,null);var Q=A.attributes;if(Q){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:lA};for(i=Q.length;i--;){var n=B=Q[i],r=n.name,c=n.namespaceURI;if(e=M(B.value),g=a(r),s.attrName=g,s.attrValue=e,s.keepAttr=!0,s.forceKeepAttr=void 0,cB("uponSanitizeAttribute",A,s),e=s.attrValue,!s.forceKeepAttr&&(iB(r,A),s.keepAttr))if(F(/\/>/i,e))iB(r,A);else{HA&&(e=Y(e,CA," "),e=Y(e,aA," "));var E=A.nodeName.toLowerCase();if(oB(E,g,e))try{c?A.setAttributeNS(c,r,e):A.setAttribute(r,e),w(t.removed)}catch(A){}}}cB("afterSanitizeAttributes",A,null)}},CB=function A(B){var t=void 0,e=sB(B);for(cB("beforeSanitizeShadowDOM",B,null);t=e.nextNode();)cB("uponSanitizeShadowNode",t,null),EB(t)||(t.content instanceof Q&&A(t.content),wB(t));cB("afterSanitizeShadowDOM",B,null)};return t.sanitize=function(A,g){var i=void 0,s=void 0,r=void 0,c=void 0,E=void 0;if(A||(A="\x3c!--\x3e"),"string"!=typeof A&&!rB(A)){if("function"!=typeof A.toString)throw D("toString is not a function");if("string"!=typeof(A=A.toString()))throw D("dirty is not a string, aborting")}if(!t.isSupported){if("object"===v(B.toStaticHTML)||"function"==typeof B.toStaticHTML){if("string"==typeof A)return B.toStaticHTML(A);if(rB(A))return B.toStaticHTML(A.outerHTML)}return A}if(pA||XA(g),t.removed=[],"string"==typeof A&&(bA=!1),bA);else if(A instanceof n)1===(s=(i=QB("\x3c!----\x3e")).ownerDocument.importNode(A,!0)).nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?i=s:i.appendChild(s);else{if(!JA&&!HA&&!RA&&-1===A.indexOf("<"))return gA&&jA?gA.createHTML(A):A;if(!(i=QB(A)))return JA?null:iA}i&&yA&&gB(i.firstChild);for(var o=sB(bA?A:i);r=o.nextNode();)3===r.nodeType&&r===c||EB(r)||(r.content instanceof Q&&CB(r.content),wB(r),c=r);if(c=null,bA)return A;if(JA){if(kA)for(E=cA.call(i.ownerDocument);i.firstChild;)E.appendChild(i.firstChild);else E=i;return TA&&(E=EA.call(e,E,!0)),E}var w=RA?i.outerHTML:i.innerHTML;return HA&&(w=Y(w,CA," "),w=Y(w,aA," ")),gA&&jA?gA.createHTML(w):w},t.setConfig=function(A){XA(A),pA=!0},t.clearConfig=function(){KA=null,pA=!1},t.isValidAttribute=function(A,B,t){KA||XA({});var e=a(A),g=a(B);return oB(e,g,t)},t.addHook=function(A,B){"function"==typeof B&&(wA[A]=wA[A]||[],C(wA[A],B))},t.removeHook=function(A){wA[A]&&w(wA[A])},t.removeHooks=function(A){wA[A]&&(wA[A]=[])},t.removeAllHooks=function(){wA={}},t}()}()},function(A,B){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,B,e){return t.set(document.createElementNS(t.svg,A),B,e)}static get(A,B){const e=t.attributeNamespace[B],g=e?A.getAttributeNS(e,B):A.getAttribute(B);return"null"===g?null:g}static set(A,B,e){for(const g in B){let i=B[g];const Q=t.attributeNamespace[g];"number"==typeof i&&e&&(i=e.number(i)),Q?A.setAttributeNS(Q,g,i):A.setAttribute(g,i)}return A}}A.exports=t},function(A,B,t){const e=t(6),g=t(27);class i{constructor(A,B,t,g,Q,s,n){this.id=A||e(),this.text=B,this.x=t,this.y=g,this.width=Math.max(Number(Q),i.MIN_WIDTH),this.height=Math.max(Number(s),i.MIN_HEIGHT),this.minimized=n||!1,this.blockId=null}toXML(){return'').concat(g(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=i},function(A,B){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,B,e){return t.set(document.createElementNS(t.svg,A),B,e)}static get(A,B){const e=t.attributeNamespace[B],g=e?A.getAttributeNS(e,B):A.getAttribute(B);return"null"===g?null:g}static set(A,B,e){for(const g in B){let i=B[g];const Q=t.attributeNamespace[g];"number"==typeof i&&e&&(i=e.number(i)),Q?A.setAttributeNS(Q,g,i):A.setAttribute(g,i)}return A}}A.exports=t},function(A,B,t){"undefined"!=typeof TextDecoder&&"undefined"!=typeof TextEncoder||t(35);const e=t(19);let g=null;const i={},Q={},s="function"==typeof FinalizationRegistry?new FinalizationRegistry(A=>{const B=Q[A];1===B?(delete Q[A],delete i[A]):Q[A]=B-1}):null,n=s?A=>{const B=A.assetId,t=Q[B]||0;Q[B]=t+1,s.register(A,B)}:()=>{};A.exports=class{constructor(A,B,t,e,g){this.assetType=A,this.assetId=B,this.setData(e,t||A.runtimeFormat,g),this.dependencies=[],n(this)}setData(A,B,t){if(A&&!B)throw new Error("Data provided without specifying its format");this.dataFormat=B,this.data=A,t&&(this.assetId=e(A)),this.clean=!t}decodeText(){return(new TextDecoder).decode(this.data)}encodeTextData(A,B,t){const e=new TextEncoder;this.setData(e.encode(A),B,t)}encodeDataURI(A){return A=A||this.assetType.contentType,"data:".concat(A,";base64,").concat(((A,B)=>{if(!Object.prototype.hasOwnProperty.call(i,A))if("undefined"==typeof btoa){const e=t(302);i[A]=e.fromByteArray(B)}else{if(null===g){g=new Array(256);for(let A=0;A<256;A++)g[A]=String.fromCharCode(A)}const{length:t}=B;let e="";for(let A=0,i=0;A{if(A)return A===this||B(A.target)};if(B(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('+r+');\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[opcode^="motion_"] .sc-monitor-value-color {\n background-color: #4c97ff;\n}\n.sc-monitor-root[opcode^="sensing_"] .sc-monitor-value-color {\n background-color: #5cb1d6;\n}\n.sc-monitor-root[opcode^="data_"] .sc-monitor-value-color {\n background-color: #ff8c1a;\n}\n.sc-monitor-root[opcode^="looks_"] .sc-monitor-value-color {\n background-color: #9966ff;\n}\n.sc-monitor-root[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',""]),n.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"},B.a=n},function(A,B,t){const e=t(115),g=t(0);A.exports=new class extends e{constructor(){super(),this.services={},this.workerClass="undefined"==typeof Worker?null:Worker,this.workers=[]}callSync(A,B){const{provider:t,isRemote:e}=this._getServiceProvider(A);if(t){if(e)throw new Error("Cannot use 'callSync' on remote provider for service ".concat(A,"."));for(var g=arguments.length,i=new Array(g>2?g-2:0),Q=2;Q{g.error("Could not handshake with worker: ".concat(A))})):g.warn("Central dispatch ignoring attempt to add duplicate worker")}_getServiceProvider(A){const B=this.services[A];return B&&{provider:B,isRemote:Boolean(this.workerClass&&B instanceof this.workerClass||B.isRemote)}}_onDispatchMessage(A,B){let t;switch(B.method){case"setService":t=this.setService(B.args[0],A);break;default:g.error("Central dispatch received message for unknown method: ".concat(B.method))}return t}}},function(A,B){var t={black:"#000",red:"#c23621",green:"#25bc26",yellow:"#bbbb00",blue:"#492ee1",magenta:"#d338d3",cyan:"#33bbc8",gray:"#808080",purple:"#708"};A.exports=function(A,B){return B?"color: #fff; background: "+t[A]+";":"color: "+t[A]+";"}},function(A,B,t){const e=t(5);A.exports=function(A,B,t){return A&&A.id&&A.default?e(A,B,t):A}},function(A,B){var t="long",e="short",g="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:g,day:g,year:"2-digit"},medium:{month:e,day:g,year:g},long:{month:t,day:g,year:g},full:{month:t,day:g,year:g,weekday:t},default:{month:e,day:g,year:g}},time:{short:{hour:g,minute:g},medium:{hour:g,minute:g,second:g},long:{hour:g,minute:g,second:g,timeZoneName:e},full:{hour:g,minute:g,second:g,timeZoneName:e},default:{hour:g,minute:g,second:g}},duration:{default:{hours:{minimumIntegerDigits:1,maximumFractionDigits:0},minutes:{minimumIntegerDigits:2,maximumFractionDigits:0},seconds:{minimumIntegerDigits:2,maximumFractionDigits:3}}},parseNumberPattern:function(A){if(A){var B={},t=A.match(/\b[A-Z]{3}\b/i),e=A.replace(/[^¤]/g,"").length;if(!e&&t&&(e=1),e?(B.style="currency",B.currencyDisplay=1===e?"symbol":2===e?"code":"name",B.currency=t?t[0].toUpperCase():"USD"):A.indexOf("%")>=0&&(B.style="percent"),!/[@#0]/.test(A))return B.style?B:void 0;if(B.useGrouping=A.indexOf(",")>=0,/E\+?[@#0]+/i.test(A)||A.indexOf("@")>=0){var g=A.replace(/E\+?[@#0]+|[^@#0]/gi,"");B.minimumSignificantDigits=Math.min(Math.max(g.replace(/[^@0]/g,"").length,1),21),B.maximumSignificantDigits=Math.min(Math.max(g.length,1),21)}else{for(var i=A.replace(/[^#0.]/g,"").split("."),Q=i[0],s=Q.length-1;"0"===Q[s];)--s;B.minimumIntegerDigits=Math.min(Math.max(Q.length-1-s,1),21);var n=i[1]||"";for(s=0;"0"===n[s];)++s;for(B.minimumFractionDigits=Math.min(Math.max(s,0),20);"#"===n[s];)++s;B.maximumFractionDigits=Math.min(Math.max(s,0),20)}return B}},parseDatePattern:function(A){if(A){for(var B={},i=0;i{this._openRequests[t]={resolve:A,reject:B}});return this._sendRequest(A,B,t),e}sendRemoteNotification(A,B){this._sendRequest(A,B)}didReceiveCall(){throw new Error("Must override didReceiveCall")}_sendMessage(){throw new Error("Must override _sendMessage")}_sendRequest(A,B,t){const e={jsonrpc:"2.0",method:A,params:B};null!==t&&(e.id=t),this._sendMessage(e)}_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,B,t){const e={jsonrpc:"2.0",id:A};t?e.error=t:e.result=B||null,this._sendMessage(e)}_handleResponse(A){const{result:B,error:t,id:e}=A,g=this._openRequests[e];delete this._openRequests[e],g&&(t?g.reject(t):g.resolve(B))}_handleRequest(A){const{method:B,params:t,id:e}=A,g=this.didReceiveCall(B,t);e&&Promise.resolve(g).then(A=>{this._sendResponse(e,A)},A=>{this._sendResponse(e,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,B){A.exports=(A,B,t)=>{let e=null;const g=window.AbortController?new window.AbortController:null,i=g?g.signal:null;return Promise.race([fetch(A,Object.assign({signal:i},B)).then(A=>(clearTimeout(e),A)),new Promise((A,B)=>{e=setTimeout(()=>{g&&g.abort(),B(new Error("Fetch timed out after ".concat(t," ms")))},t)})])}},function(A,B,t){function e(A,B){var t=Object.keys(A);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(A);B&&(e=e.filter((function(B){return Object.getOwnPropertyDescriptor(A,B).enumerable}))),t.push.apply(t,e)}return t}function g(A,B,t){return B in A?Object.defineProperty(A,B,{value:t,enumerable:!0,configurable:!0,writable:!0}):A[B]=t,A}const i=t(20),{OrderedMap:Q}=t(24),s=t(64),n=t(3),r=t(16),c=t(68),E=t(2),o=t(204),w=t(205),C=t(72),a=t(213),I=t(37),Y=t(28),h=t(0),M=t(56),F=t(14),D=t(9),u=t(27),l=t(214),d=t(215),U=t(216),N=t(217),m=t(218),G=t(219),f=t(220),H=t(73),R=t(7),p=t(6),y={scratch3_control:t(221),scratch3_event:t(222),scratch3_looks:t(223),scratch3_motion:t(224),scratch3_operators:t(225),scratch3_sound:t(226),scratch3_sensing:t(227),scratch3_data:t(228),scratch3_procedures:t(229)},J=t(230),k=t(231),T=["#0FBD8C","#0DA57A","#0B8E69"],j=(()=>{const A={};return A[n.ANGLE]={shadow:{type:"math_angle",fieldName:"NUM"}},A[n.COLOR]={shadow:{type:"colour_picker",fieldName:"COLOUR"}},A[n.NUMBER]={shadow:{type:"math_number",fieldName:"NUM"}},A[n.STRING]={shadow:{type:"text",fieldName:"TEXT"}},A[n.BOOLEAN]={check:"Boolean"},A[n.MATRIX]={shadow:{type:"matrix",fieldName:"MATRIX"}},A[n.NOTE]={shadow:{type:"note",fieldName:"NOTE"}},A[n.IMAGE]={fieldType:"field_image"},A})(),x=A=>{let B=0;return{canAddCloudVariable:()=>B{B++},removeCloudVariable:()=>{B--},hasCloudVariables:()=>B>0,getNumberOfCloudVariables:()=>B}};let S=-1,b=-1,z=-1;class L extends i{constructor(){super(),this.targets=[],this.executableTargets=[],this.threads=[],this.threadMap=new Map,this.sequencer=new w(this),this.flyoutBlocks=new r(this,!0),this.monitorBlocks=new r(this,!0),this._editingTarget=null,this._primitives={},this._blockInfo=[],this._hats={},this._scriptGlowsPreviousFrame=[],this._nonMonitorThreadCount=0,this._lastStepDoneThreads=null,this._cloneCounter=0,this._refreshTargets=!1,this.monitorBlockInfo={},this._monitorState=Q({}),this._prevMonitorState=Q({}),this.turboMode=!1,this.frameLoop=new k(this),this.currentStepTime=1e3/30,this.updateCurrentMSecs(),this.redrawRequested=!1,this._registerBlockPackages(),this.ioDevices={clock:new d(this),cloud:new U(this),keyboard:new N(this),mouse:new m(this),mouseWheel:new G(this),userData:new f,video:new H(this)},this.peripheralExtensions={},this.profiler=null,this.cloudOptions={limit:10};const A=x(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=L.STAGE_WIDTH,this.stageHeight=L.STAGE_HEIGHT,this.runtimeOptions={maxClones:L.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(L.HAS_CLOUD_DATA_UPDATE,A=>{this.setExternalCommunicationMethod("cloudVariables",A)}),this.enforcePrivacy=!0}static get STAGE_WIDTH(){return 480}static get STAGE_HEIGHT(){return 360}static get SCRIPT_GLOW_ON(){return"SCRIPT_GLOW_ON"}static get SCRIPT_GLOW_OFF(){return"SCRIPT_GLOW_OFF"}static get BLOCK_GLOW_ON(){return"BLOCK_GLOW_ON"}static get BLOCK_GLOW_OFF(){return"BLOCK_GLOW_OFF"}static get HAS_CLOUD_DATA_UPDATE(){return"HAS_CLOUD_DATA_UPDATE"}static get TURBO_MODE_ON(){return"TURBO_MODE_ON"}static get TURBO_MODE_OFF(){return"TURBO_MODE_OFF"}static get RUNTIME_OPTIONS_CHANGED(){return"RUNTIME_OPTIONS_CHANGED"}static get COMPILER_OPTIONS_CHANGED(){return"COMPILER_OPTIONS_CHANGED"}static get FRAMERATE_CHANGED(){return"FRAMERATE_CHANGED"}static get INTERPOLATION_CHANGED(){return"INTERPOLATION_CHANGED"}static get STAGE_SIZE_CHANGED(){return"STAGE_SIZE_CHANGED"}static get COMPILE_ERROR(){return"COMPILE_ERROR"}static get 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 B=this.hasCloudData();A.addCloudVariable(),!B&&this.hasCloudData()&&this.emit(L.HAS_CLOUD_DATA_UPDATE,!0)}}_initializeRemoveCloudVariable(A){return()=>{const B=this.hasCloudData();A.removeCloudVariable(),B&&!this.hasCloudData()&&this.emit(L.HAS_CLOUD_DATA_UPDATE,!1)}}_registerBlockPackages(){for(const A in y)if(y.hasOwnProperty(A)){const B=new y[A](this);if(B.getPrimitives){const A=B.getPrimitives();for(const t in A)A.hasOwnProperty(t)&&(this._primitives[t]=A[t].bind(B))}if(B.getHats){const A=B.getHats();for(const B in A)A.hasOwnProperty(B)&&(this._hats[B]=A[B])}B.getMonitored&&(this.monitorBlockInfo=Object.assign({},this.monitorBlockInfo,B.getMonitored())),this.compilerRegisterExtension(A,B)}}compilerRegisterExtension(A,B){this["ext_".concat(A)]=B}getMonitorState(){return this._monitorState}_makeExtensionMenuId(A,B){return"".concat(B,"_menu_").concat(u(A))}makeMessageContextForTarget(A){const B={};(A=A||this.getEditingTarget()||this.getTargetForStage())&&(B.targetType=A.isStage?I.STAGE:I.SPRITE)}_registerExtensionPrimitives(A){const B={id:A.id,name:M(A.name),showStatusButton:A.showStatusButton,blockIconURI:A.blockIconURI,menuIconURI:A.menuIconURI};A.color1?(B.color1=A.color1,B.color2=A.color2,B.color3=A.color3):(B.color1=T[0],B.color2=T[1],B.color3=T[2]),this._blockInfo.push(B),this._fillExtensionCategory(B,A);for(const t in B.customFieldTypes)if(A.customFieldTypes.hasOwnProperty(t)){const A=B.customFieldTypes[t];this.emit(L.EXTENSION_FIELD_ADDED,{name:"field_".concat(A.extendedName),implementation:A.fieldImplementation})}this.emit(L.EXTENSION_ADDED,B)}_refreshExtensionPrimitives(A){const B=this._blockInfo.find(B=>B.id===A.id);B&&(B.name=M(A.name),this._fillExtensionCategory(B,A),this.emit(L.BLOCKSINFO_UPDATE,B))}_fillExtensionCategory(A,B){A.blocks=[],A.customFieldTypes={},A.menus=[],A.menuInfo={};for(const t in B.menus)if(B.menus.hasOwnProperty(t)){const e=B.menus[t],g=this._buildMenuForScratchBlocks(t,e,A);A.menus.push(g),A.menuInfo[t]=e}for(const t in B.customFieldTypes)if(B.customFieldTypes.hasOwnProperty(t)){const e=B.customFieldTypes[t],g=this._buildCustomFieldInfo(t,e,B.id,A);A.customFieldTypes[t]=g}if(B.docsURI)try{const t=new URL(B.docsURI);if("http:"!==t.protocol&&"https:"!==t.protocol)throw new Error("invalid protocol");const e={info:{},xml:"')};A.blocks.push(e)}catch(A){h.warn("cannot create docsURI button",A)}for(const t of B.blocks)try{const B=this._convertForScratchBlocks(t,A);if(A.blocks.push(B),B.json){const A=B.json.type;t.blockType!==E.EVENT&&(this._primitives[A]=B.info.func),t.blockType!==E.EVENT&&t.blockType!==E.HAT||(this._hats[A]={edgeActivated:t.isEdgeActivated,restartExistingThreads:t.shouldRestartExistingThreads})}}catch(A){h.error("Error parsing block: ",{block:t,error:A})}}_convertMenuItems(A){if("function"!=typeof A){const B=this.makeMessageContextForTarget();return A.map(A=>{const t=M(A,B);switch(typeof t){case"string":return[t,t];case"object":return[M(A.text,B),A.value];default:throw new Error("Can't interpret menu item: ".concat(JSON.stringify(A)))}})}return A}_buildMenuForScratchBlocks(A,B,t){const e=this._makeExtensionMenuId(A,t.id),g=this._convertMenuItems(B.items);return{json:{message0:"%1",type:e,inputsInline:!0,output:"String",colour:t.color1,colourSecondary:t.color2,colourTertiary:t.color3,outputShape:B.acceptReporters?a.OUTPUT_SHAPE_ROUND:a.OUTPUT_SHAPE_SQUARE,args0:[{type:"field_dropdown",name:A,options:g}]}}}_buildCustomFieldInfo(A,B,t,e){const g="".concat(t,"_").concat(A);return{fieldName:A,extendedName:g,argumentTypeInfo:{shadow:{type:g,fieldName:"field_".concat(g)}},scratchBlocksDefinition:this._buildCustomFieldTypeForScratchBlocks(g,B.output,B.outputShape,e),fieldImplementation:B.implementation}}_buildCustomFieldTypeForScratchBlocks(A,B,t,e){return{json:{type:A,message0:"%1",inputsInline:!0,output:B,colour:e.color1,colourSecondary:e.color2,colourTertiary:e.color3,outputShape:t,args0:[{name:"field_".concat(A),type:"field_".concat(A)}]}}}_convertForScratchBlocks(A,B){return"---"===A?this._convertSeparatorForScratchBlocks(A):A.blockType===E.BUTTON?this._convertButtonForScratchBlocks(A):this._convertBlockForScratchBlocks(A,B)}_convertBlockForScratchBlocks(A,B){const t="".concat(B.id,"_").concat(A.opcode),e={type:t,inputsInline:!0,category:B.name,colour:B.color1,colourSecondary:B.color2,colourTertiary:B.color3},g={argsMap:{},blockJSON:e,categoryInfo:B,blockInfo:A,inputList:[]},i=A.blockIconURI||B.blockIconURI;if(i){e.extensions=["scratch_extension"],e.message0="%1 %2";const A={type:"field_image",src:i,width:40,height:40},B={type:"field_vertical_separator"};e.args0=[A,B]}switch(A.blockType){case E.COMMAND:e.outputShape=a.OUTPUT_SHAPE_SQUARE,e.previousStatement=null,A.isTerminal||(e.nextStatement=null);break;case E.REPORTER:e.output="String",e.outputShape=a.OUTPUT_SHAPE_ROUND;break;case E.BOOLEAN:e.output="Boolean",e.outputShape=a.OUTPUT_SHAPE_HEXAGONAL;break;case E.HAT:case E.EVENT:A.hasOwnProperty("isEdgeActivated")||(A.isEdgeActivated=!0),e.outputShape=a.OUTPUT_SHAPE_SQUARE,e.nextStatement=null;break;case E.CONDITIONAL:case E.LOOP:A.branchCount=A.branchCount||1,e.outputShape=a.OUTPUT_SHAPE_SQUARE,e.previousStatement=null,A.isTerminal||(e.nextStatement=null)}const Q=Array.isArray(A.text)?A.text:[A.text];let s=0,n=0,r=0;const c=this._convertPlaceholders.bind(this,g),o=this.makeMessageContextForTarget();for(;s0?n+1:"")}],++n,++r)}A.blockType===E.REPORTER?A.disableMonitor||0!==g.inputList.length||(e.checkboxInFlyout=!0):A.blockType===E.LOOP&&(e["lastDummyAlign".concat(r)]="RIGHT",e["message".concat(r)]="%1",e["args".concat(r)]=[{type:"field_image",src:"./static/blocks-media/repeat.svg",width:24,height:24,alt:"*",flip_rtl:!0}],++r);const w=A.isDynamic?''):"",C=g.inputList.join(""),I='').concat(w).concat(C,"");return{info:g.blockInfo,json:g.blockJSON,xml:I}}_convertSeparatorForScratchBlocks(A){return{info:A,xml:''}}_convertButtonForScratchBlocks(A){["MAKE_A_LIST","MAKE_A_PROCEDURE","MAKE_A_VARIABLE"].indexOf(A.func)<0&&h.error("Custom button callbacks not supported yet: ".concat(A.func));const B=this.makeMessageContextForTarget(),t=M(A.text,B);return{info:A,xml:'')}}_constructInlineImageJson(A){return A.dataURI||h.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,B,t){t=t.replace(/[<"&]/,"_");const e=A.blockInfo.arguments[t]||{};let g,i=j[e.type]||{};if(!j[e.type]&&A.categoryInfo.customFieldTypes[e.type]&&(i=A.categoryInfo.customFieldTypes[e.type].argumentTypeInfo),"field_image"===i.fieldType)g=this._constructInlineImageJson(e);else{g={type:"input_value",name:t};const B=void 0===e.defaultValue?"":u(M(e.defaultValue,this.makeMessageContextForTarget()).toString());let Q,s,n;if(i.check&&(g.check=i.check),e.menu){const B=A.categoryInfo.menuInfo[e.menu];B.acceptReporters?(Q=t,s=this._makeExtensionMenuId(e.menu,A.categoryInfo.id),n=e.menu):(g.type="field_dropdown",g.options=this._convertMenuItems(B.items),Q=null,s=null,n=t)}else Q=t,s=i.shadow&&i.shadow.type||null,n=i.shadow&&i.shadow.fieldName||null;Q&&A.inputList.push('')),s&&A.inputList.push('')),B&&n&&A.inputList.push('').concat(B,"")),s&&A.inputList.push(""),Q&&A.inputList.push("")}const Q="args".concat(A.outLineNum),s=A.blockJSON[Q]=A.blockJSON[Q]||[];g&&s.push(g);const n=s.length;return A.argsMap[t]=n,"%".concat(n)}getBlocksXML(A){return this._blockInfo.map(B=>{const{name:t,color1:e,color2:g}=B,i=B.blocks.filter(B=>{let t=!0;return A&&B.info.filter&&(t=B.info.filter.includes(A.isStage?I.STAGE:I.SPRITE)),t&&!B.info.hideFromPalette}),Q='colour="'.concat(e,'" secondaryColour="').concat(g,'"');let s="";B.menuIconURI?s=B.menuIconURI:B.blockIconURI&&(s=B.blockIconURI);const n=s?'iconURI="'.concat(s,'"'):"";let r="";return B.showStatusButton&&(r='showStatusButton="true"'),{id:B.id,xml:'").concat(i.map(A=>A.xml).join(""),"")}})}getBlocksJSON(){return this._blockInfo.reduce((A,B)=>A.concat(B.blocks.map(A=>A.json)),[])}getScratchLinkSocket(A){return(this._linkSocketFactory||this._defaultScratchLinkSocketFactory)(A)}configureScratchLinkSocketFactory(A){this._linkSocketFactory=A}_defaultScratchLinkSocketFactory(A){return new l(A)}registerPeripheralExtension(A,B){this.peripheralExtensions[A]=B}scanForPeripheral(A){this.peripheralExtensions[A]&&this.peripheralExtensions[A].scan()}connectPeripheral(A,B){this.peripheralExtensions[A]&&this.peripheralExtensions[A].connect(B)}disconnectPeripheral(A){this.peripheralExtensions[A]&&this.peripheralExtensions[A].disconnect()}getPeripheralIsConnected(A){let B=!1;return this.peripheralExtensions[A]&&(B=this.peripheralExtensions[A].isConnected()),B}emitMicListening(A){this.emit(L.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(F.LAYER_GROUPS),this.renderer.offscreenTouching=!this.runtimeOptions.fencing,this.updatePrivacy()}attachV2BitmapAdapter(A){this.v2BitmapAdapter=A}attachStorage(A){if(this.storage=A,this.isPackaged){const B=A.createAsset;let t=0;A.createAsset=function(A,e,g,i,Q){return i||(i=(++t).toString()),B.call(this,A,e,g,i,!1)}}}_pushThread(A,B,t){const e=new Y(A);return e.target=B,e.stackClick=Boolean(t&&t.stackClick),e.updateMonitor=Boolean(t&&t.updateMonitor),e.blockContainer=e.updateMonitor?this.monitorBlocks:B.blocks,e.pushStack(A),this.threads.push(e),e.stackClick||e.updateMonitor||this.threadMap.set(e.getId(),e),t&&t.updateMonitor||!this.compilerOptions.enabled||e.tryCompile(),e}_stopThread(A){A.isKilled=!0,this.sequencer.retireThread(A)}_restartThread(A){const B=new Y(A.topBlock);B.target=A.target,B.stackClick=A.stackClick,B.updateMonitor=A.updateMonitor,B.blockContainer=A.blockContainer,B.pushStack(A.topBlock),A.triedToCompile&&this.compilerOptions.enabled&&B.tryCompile(),B.stackClick||B.updateMonitor||this.threadMap.set(B.getId(),B);const t=this.threads.indexOf(A);return t>-1?(this.threads[t]=B,B):(this.threads.push(A),A)}emitCompileError(A,B){this.emit(L.COMPILE_ERROR,A,B)}isActiveThread(A){return A.stack.length>0&&A.status!==Y.STATUS_DONE&&this.threads.indexOf(A)>-1}isWaitingThread(A){return A.status===Y.STATUS_PROMISE_WAIT||A.status===Y.STATUS_YIELD_TICK||!this.isActiveThread(A)}toggleScript(A,B){B=Object.assign({target:this._editingTarget,stackClick:!1},B);for(let t=0;t=0;B--){const e=t[B],g=e.blocks.getScripts();for(let B=0;B=0;t--){const g=e[t],i=c.getScripts(g.blocks,A);for(let A=0;A{const{blockId:Q,fieldsOfInputs:s}=A;for(const A in B)if(s[A].value!==B[A])return;if(g.restartExistingThreads){const A=this.threadMap.get(Y.getIdFromTargetAndBlock(t,Q));if(A)return void e.push(this._restartThread(A))}else for(let A=0;A{A.isCompiled||(C(this.sequencer,A),A.goToNextBlock())}),e}dispose(){this.stopAll(),this.targets.forEach(A=>{A.isOriginal&&A.deleteMonitors()}),this.targets.map(this.disposeTarget,this);const A=Q({});A.equals(this._monitorState)||(this._monitorState=A,this.emit(L.MONITORS_UPDATE,this._monitorState)),this.emit(L.RUNTIME_DISPOSED),this.ioDevices.clock.resetProjectTimer(),this.hasCloudData()&&this.emit(L.HAS_CLOUD_DATA_UPDATE,!1),this.ioDevices.cloud.clear();const B=x(this.cloudOptions);this.hasCloudData=B.hasCloudVariables,this.canAddCloudVariable=B.canAddCloudVariable,this.getNumberOfCloudVariables=B.getNumberOfCloudVariables,this.addCloudVariable=this._initializeAddCloudVariable(B),this.removeCloudVariable=this._initializeRemoveCloudVariable(B)}addTarget(A){this.targets.push(A),this.executableTargets.push(A),A.isStage&&!this._stageTarget&&(this._stageTarget=A)}moveExecutable(A,B){const t=this.executableTargets.indexOf(A);this.executableTargets.splice(t,1);let e=t+B;return e>this.executableTargets.length&&(e=this.executableTargets.length),e<=0&&(e=this.executableTargets.length>0&&this.executableTargets[0].isStage?1:0),this.executableTargets.splice(e,0,A),e}setExecutablePosition(A,B){const t=this.executableTargets.indexOf(A);return this.moveExecutable(A,B-t)}removeExecutable(A){const B=this.executableTargets.indexOf(A);B>-1&&this.executableTargets.splice(B,1)}disposeTarget(A){this.targets=this.targets.filter(B=>A!==B||(B.dispose(),!1)),this._stageTarget===A&&(this._stageTarget=null)}stopForTarget(A,B){this.emit(L.STOP_FOR_TARGET,A,B);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===b&&(b=this.profiler.idByName("Sequencer.stepThreads")),this.profiler.start(b));const A=this.sequencer.stepThreads();null!==this.profiler&&this.profiler.stop(),this._updateGlows(A),this._emitProjectRunStatus(this.threads.length+A.length-this._getMonitorThreadCount([...this.threads,...A])),this._lastStepDoneThreads=A,this.renderer&&(null!==this.profiler&&(-1===z&&(z=this.profiler.idByName("RenderWebGL.draw")),this.profiler.start(z)),document.hidden||this.frameLoop._interpolationAnimation||this.renderer.draw(),null!==this.profiler&&this.profiler.stop()),this._refreshTargets&&(this.emit(L.TARGETS_UPDATE,!1),this._refreshTargets=!1),this._prevMonitorState.equals(this._monitorState)||(this.emit(L.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 B=0;return A.forEach(A=>{A.updateMonitor&&B++}),B}_pushMonitors(){this.monitorBlocks.runAllMonitored(this)}setEditingTarget(A){const B=this._editingTarget;this._editingTarget=A,this._scriptGlowsPreviousFrame=[],this._updateGlows(),B!==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(L.FRAMERATE_CHANGED,A)}setInterpolation(A){this.interpolationEnabled=A,this.frameLoop.setInterpolation(this.interpolationEnabled),this.emit(L.INTERPOLATION_CHANGED,A)}setRuntimeOptions(A){this.runtimeOptions=Object.assign({},this.runtimeOptions,A),this.emit(L.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(L.COMPILER_OPTIONS_CHANGED,this.compilerOptions)}setStageSize(A,B){if(A=Math.round(Math.max(1,A)),B=Math.round(Math.max(1,B)),this.stageWidth!==A||this.stageHeight!==B){const t=A-this.stageWidth,e=B-this.stageHeight;if(this._monitorState.size>0){const A=t/2,B=e/2;for(const t of this._monitorState.valueSeq()){const e=t.set("x",t.get("x")+A).set("y",t.get("y")+B);this.requestUpdateMonitor(e)}this.emit(L.MONITORS_UPDATE,this._monitorState)}this.stageWidth=A,this.stageHeight=B,this.renderer&&this.renderer.setStageSize(-A/2,A/2,-B/2,B/2)}this.emit(L.STAGE_SIZE_CHANGED,A,B)}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 B=A.procedureCode,t=A.arguments,i=A.arguments.map((A,B)=>"arg".concat(B)),Q=A.arguments.map(()=>"");if(this.addonBlocks[B]=function(A){for(var B=1;BB.id===A);if(!e){e={id:A,name:"Addons",color1:"#29beb8",color2:"#3aa8a4",color3:"#3aa8a4",menuIconURI:"data:image/svg+xml;,".concat(encodeURIComponent('')),blocks:[],customFieldTypes:{},menus:[]},this._blockInfo.unshift(e)}e.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 B of Object.values(A))if(B.text.includes(" // _twconfig_"))return B;return null}parseProjectOptions(){const A=this.findProjectOptionsComment();if(!A)return;const B=A.text.split("\n").find(A=>A.endsWith(" // _twconfig_"));if(!B)return void h.warn("Config comment does not contain valid line");const t=B.substr(0,B.length-" // _twconfig_".length);let e;try{if(e=s.parse(t),!e||"object"!=typeof e)throw new Error("Invalid object")}catch(A){return void h.warn("Config comment has invalid JSON",A)}"number"==typeof e.framerate&&this.setFramerate(e.framerate),e.turbo&&(this.turboMode=!0,this.emit(L.TURBO_MODE_ON)),e.interpolation&&this.setInterpolation(!0),e.runtimeOptions&&this.setRuntimeOptions(e.runtimeOptions),e.hq&&this.renderer&&this.renderer.setUseHighQualityRender(!0);const g=+e.width||this.stageWidth,i=+e.height||this.stageHeight;g===this.stageWidth&&i===this.stageHeight||this.setStageSize(g,i)}_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=(B,t)=>{const e={};for(const g of Object.keys(t)){const i=t[g],Q=B[g];if("object"==typeof i&&i){const B=A(Q,i);Object.keys(B).length>0&&(e[g]=B)}else i!==Q&&(e[g]=i)}return e};return A(this._defaultStoredSettings,this._generateAllProjectOptions())}storeProjectOptions(){const A=this.generateDifferingProjectOptions(),B="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(s.stringify(A)).concat(" // _twconfig_"),t=this.findProjectOptionsComment();if(t)t.text=B;else{this.getTargetForStage().createComment(p(),null,B,50,50,350,170,!1)}this.emitProjectChanged()}precompile(){this.allScriptsDo((A,B)=>{const t=B.blocks.getBlock(A);if(this.getIsHat(t.opcode)){const t=new Y(A);t.target=B,t.blockContainer=B.blocks,t.tryCompile()}})}enableDebug(){this.resetAllCaches(),this.debug=!0}_updateGlows(A){const B=[];B.push.apply(B,this.threads),A&&B.push.apply(B,A);const t=[],e=[];for(let A=0;A0&&this.emit(L.PROJECT_RUN_START),this._nonMonitorThreadCount>0&&0===A&&this.emit(L.PROJECT_RUN_STOP),this._nonMonitorThreadCount=A}quietGlow(A){const B=this._scriptGlowsPreviousFrame.indexOf(A);B>-1&&this._scriptGlowsPreviousFrame.splice(B,1)}glowBlock(A,B){B?this.emit(L.BLOCK_GLOW_ON,{id:A}):this.emit(L.BLOCK_GLOW_OFF,{id:A})}glowScript(A,B){B?this.emit(L.SCRIPT_GLOW_ON,{id:A}):this.emit(L.SCRIPT_GLOW_OFF,{id:A})}emitBlockDragUpdate(A){this.emit(L.BLOCK_DRAG_UPDATE,A)}emitBlockEndDrag(A,B){this.emit(L.BLOCK_DRAG_END,A,B)}visualReport(A,B){this.emit(L.VISUAL_REPORT,{id:A,value:String(B)})}requestAddMonitor(A){const B=A.get("id");this.requestUpdateMonitor(A)||(this._monitorState=this._monitorState.set(B,A))}requestUpdateMonitor(A){const B=A.get("id");return!!this._monitorState.has(B)&&(this._monitorState=this._monitorState.set(B,this._monitorState.get(B).mergeWith((A,B)=>null==B?A:B,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(B=>B.targetId===A)}getTargetById(A){for(let B=0;BA.id===B);if(!e)return;const g=e.blocks.find(A=>A.info.opcode===t);return g?{category:"extension",label:"".concat(e.name,": ").concat(g.info.text)}:void 0}createNewGlobalVariable(A,B,t){const e="string"==typeof t?t:D.SCALAR_TYPE,g=this.getAllVarNamesOfType(e),i=R.unusedName(A,g),Q=new D(B||p(),i,e);return this.getTargetForStage().variables[Q.id]=Q,Q}requestRedraw(){this.redrawRequested=!0}requestTargetsUpdate(A){A.isOriginal&&(this._refreshTargets=!0)}requestBlocksUpdate(){this.emit(L.BLOCKS_NEED_UPDATE)}requestToolboxExtensionsUpdate(){this.emit(L.TOOLBOX_EXTENSIONS_NEED_UPDATE)}start(){this.frameLoop.running||(this.frameLoop.start(),this.emit(L.RUNTIME_STARTED))}stop(){this.frameLoop.running&&(this.frameLoop.stop(),this.emit(L.RUNTIME_STOPPED))}enableProfiling(A){o.available()&&(this.profiler=new o(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,B){if(!Object.prototype.hasOwnProperty.call(this.externalCommunicationMethods,A))throw new Error("Unknown method: ".concat(A));this.externalCommunicationMethods[A]=B,this.updatePrivacy()}}A.exports=L},function(A,B,t){"use strict";t.r(B),t.d(B,"_parse",(function(){return e})),t.d(B,"parse",(function(){return g})),t.d(B,"stringify",(function(){return i}));const e=A=>{let B=0;const t=t=>{const{line:e,column:g}=(()=>{let t=0,e=0;for(let g=0;g(B>=A.length&&t("Unexpected end of input"),A[B]),g=()=>e(B),i=()=>{B++},Q=A=>{g()!==A&&t(`Expected '${A}' but found '${g()}'`),i()},s=(t=1,g=1)=>{if(B+g+t>A.length)return"";if(1===t)return e(B+g);let i="";for(let A=0;A{for(;;)if(/\s/.test(g()))i();else{const A=s(2,0);if("//"===A)for(i(),i();"\n"!==g();)i();else{if("/*"!==A)break;for(i(),i();"*/"!==s(2,0);)i();i(),i()}}},r=()=>{n();switch(g()){case'"':return o();case"{":return C();case"[":return w();case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"-":return E();default:return c()}},c=()=>{if("null"===s(4,0)){for(let A=0;A<4;A++)i();return null}if("true"===s(4,0)){for(let A=0;A<4;A++)i();return!0}if("false"===s(5,0)){for(let A=0;A<5;A++)i();return!1}if("Infinity"===s(8,0)){for(let A=0;A<8;A++)i();return 1/0}if("NaN"===s(3,0)){for(let A=0;A<3;A++)i();return NaN}t(`Unexpected character '${g()}'`)},E=()=>{if("-Infinity"===s(9,0)){for(let A=0;A<9;A++)i();return-1/0}let A="";for(;A+=g(),/[\d.e+-]/i.test(s());)i();i();const B=+A;return Number.isNaN(B)&&t("Not a number: "+A),B},o=()=>{Q('"');let A="";for(;;){const B=g();if('"'===B)break;if("\\"===B)switch(i(),g()){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 B="";for(let A=0;A<4;A++){i();const A=g();/[0-9a-f]/i.test(A)||t("Invalid hex code: "+A),B+=A}const e=Number.parseInt(B,16);A+=String.fromCharCode(e);break}default:t("Invalid escape code: \\"+g())}else A+=B;i()}return Q('"'),A},w=()=>{Q("["),n();const A=[];for(;n(),"]"!==g();){const B=r();if(A.push(B),n(),","!==g())break;i()}return Q("]"),A},C=()=>{Q("{"),n();const A={};for(;n(),"}"!==g();){const B=o();n(),Q(":");const t=r();if(A[B]=t,n(),","!==g())break;i()}return Q("}"),A};return r()},g=A=>{try{return JSON.parse(A)}catch(B){try{return e(A)}catch(A){throw B}}},i=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=>i(A)).join(",")}]`;if("object"==typeof A){let B="{",t=!0;const e=Object.keys(A);for(let g=0;g {\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};",i.startHats="const startHats = (requestedHat, optMatchFields) => {\n const thread = globalState.thread;\n const threads = thread.target.runtime.startHats(requestedHat, optMatchFields);\n return threads;\n}",i.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}",i.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) {\n const thread = globalState.thread;\n\n // reset the stackframe\n // we only ever use one stackframe at a time, so this shouldn't cause issues\n thread.stackFrames[thread.stackFrames.length - 1].reuse(isWarp);\n\n const executeBlock = () => {\n const blockUtility = globalState.blockUtility;\n blockUtility.init(thread, blockId);\n return blockFunction(inputs, blockUtility);\n };\n\n let returnValue = executeBlock();\n\n if (isPromise(returnValue)) {\n returnValue = yield* waitPromise(returnValue);\n if (useFlags) {\n hasResumedFromPromise = true;\n }\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\n if (isPromise(returnValue)) {\n returnValue = yield* waitPromise(returnValue);\n if (useFlags) {\n hasResumedFromPromise = true;\n }\n return returnValue;\n }\n\n if (thread.status === 1 /* STATUS_PROMISE_WAIT */) {\n yield;\n return '';\n }\n }\n\n // todo: do we have to do anything extra if status is STATUS_DONE?\n\n return returnValue;\n}",i.retire="const retire = () => {\n const thread = globalState.thread;\n thread.target.runtime.sequencer.retireThread(thread);\n}",i.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}",i.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}",g+="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};",g+="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);",i.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)",i.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)",i.randomInt="const randomInt = (low, high) => low + Math.floor(Math.random() * ((high + 1) - low))",i.randomFloat="const randomFloat = (low, high) => (Math.random() * (high - low)) + low",i.timer="const timer = () => {\n const t = new globalState.Timer({\n now: () => globalState.thread.target.runtime.currentMSecs\n });\n t.start();\n return t;\n}",i.daysSince2000="const daysSince2000 = () => (Date.now() - 946684800000) / (24 * 60 * 60 * 1000)",i.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}",g+="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};",i.listGet="const listGet = (list, idx) => {\n const index = listIndex(idx, list.length);\n if (index === -1) {\n return '';\n }\n return list[index];\n}",i.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}",i.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}",i.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}",i.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}",i.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}",i.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}",i.colorToList="const colorToList = color => globalState.Cast.toRgbColorList(color)",i.mod="const mod = (n, modulus) => {\n let result = n % modulus;\n if (result / modulus < 0) result += modulus;\n return result;\n}",i.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}";const Q=A=>{e.thread=A,A.generator.next()};Q.scopedEval=A=>{const B=(A=>{let 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};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(i))A.includes(t)&&(B+="".concat(i[t],";"));return B+="return ".concat(A),B})(A);try{return new Function("globalState",B)(e)}catch(A){throw e.log.error("was unable to compile script",B),A}},Q.runtimeFunctions=i,A.exports=Q},function(A,B,t){const e=t(28),g=t(15);A.exports=class{constructor(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,B=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.sequencer=A,this.thread=B,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===Q.STATUS_RUNNING&&(t.status=Q.STATUS_PROMISE_WAIT),A.then(A=>{if(E(A,B,t,e,g),g&&!e._isHat){let A,B;do{const e=t.popStack();if(null===e)return;if(B=t.target.blocks.getNextBlock(e),null!==B)break;A=t.peekStackFrame()}while(null!==A&&!A.isLoop);t.pushStack(B)}},A=>{i.warn("Primitive rejected promise: ",A),t.status=Q.STATUS_RUNNING,t.popStack()})};class w{constructor(A,B){this.id=B.id,this.opcode=B.opcode,this.fields=B.fields,this.inputs=B.inputs,this.mutation=B.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}=r.sequencer,{opcode:e,fields:i,inputs:Q}=this;this._isHat=t.getIsHat(e),this._blockFunction=t.getOpcodeFunction(e),this._definedBlockFunction=void 0!==this._blockFunction;const s=Object.keys(i);this._isShadowBlock=!this._definedBlockFunction&&1===s.length&&0===Object.keys(Q).length,this._shadowValue=this._isShadowBlock&&i[s[0]].value;for(const A in i)this._argValues[A]="VARIABLE"===A||"LIST"===A||"BROADCAST_OPTION"===A?{id:i[A].id,name:i[A].value}:i[A].value;if(delete this._inputs.custom_block,"BROADCAST_INPUT"in this._inputs){this._argValues.BROADCAST_OPTION={id:null,name:null};const B=this._inputs.BROADCAST_INPUT;if(B.block===B.shadow){const t=A.getBlock(B.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 B in this._inputs){const t=this._inputs[B];if(t.block){const e=g.getCached(A,t.block,w);if(e._isHat)continue;this._ops.push(...e._ops),e._parentKey=B,e._parentValues=this._argValues,e._isShadowBlock&&(this._argValues[B]=e._shadowValue)}}this._definedBlockFunction&&this._ops.push(this)}}A.exports=function(A,B){const t=A.runtime;r.sequencer=A,r.thread=B;const e=B.peekStack(),i=B.peekStackFrame();let s=B.blockContainer,C=g.getCached(s,e,w);if(null===C&&(s=t.flyoutBlocks,C=g.getCached(s,e,w),null===C))return void A.retireThread(B);const a=C._ops,I=a.length;let Y=0;if(null!==i.reported){const A=i.reported;for(;YA.id===B);if(e){const A=e._parentKey,B=e._parentValues;"BROADCAST_INPUT"===A?(B.BROADCAST_OPTION.id=null,B.BROADCAST_OPTION.name=n.toString(t)):B[A]=t}}if(A.length>0){const B=A.reverse().find(A=>a.find(B=>B.id===A.opCached));Y=B?a.findIndex(A=>A.id===B.opCached)+1:0}if(null!==B.justReported&&a[Y]&&a[Y].id===i.reporting){const A=a[Y],t=B.justReported;B.justReported=null;const e=A._parentKey,g=A._parentValues;"BROADCAST_INPUT"===e?(g.BROADCAST_OPTION.id=null,g.BROADCAST_OPTION.name=n.toString(t)):g[e]=t,Y+=1}i.reporting=null,i.reported=null}const h=Y;for(;Y{const B=A._parentKey,t=A._parentValues;return"BROADCAST_INPUT"===B?{opCached:A.id,inputValue:t[B].BROADCAST_OPTION.name}:{opCached:A.id,inputValue:t[B]}});break}if(B.status===Q.STATUS_RUNNING)if(t)E(w,A,B,e,t);else{const A=e._parentKey,B=e._parentValues;"BROADCAST_INPUT"===A?(B.BROADCAST_OPTION.id=null,B.BROADCAST_OPTION.name=n.toString(w)):B[A]=w}}var M;if(null!==t.profiler){C._profiler!==t.profiler&&function(A,B){B._profiler=A,-1===c&&(c=A.idByName("blockFunction"));const t=B._ops;for(let B=0;Bthis._setupPreview()):null}disableVideo(){if(this._disablePreview(),!this.provider)return null;this.provider.disableVideo()}getFrame(A){let{dimensions:B=g.DIMENSIONS,mirror:t=this.mirror,format:e=g.FORMAT_IMAGE_DATA,cacheTimeout:i=this._frameCacheTimeout}=A;return this.provider?this.provider.getFrame({dimensions:B,mirror:t,format:e,cacheTimeout:i}):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(...g.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(...g.DIMENSIONS),1),this._drawable=A.createDrawable(e.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 B=this.getFrame({format:g.FORMAT_IMAGE_DATA,cacheTimeout:this.runtime.currentStepTime});B?(A.updateBitmapSkin(this._skinId,B,1),this.runtime.requestRedraw()):A.updateBitmapSkin(this._skinId,new ImageData(...g.DIMENSIONS),1)},this._renderPreviewFrame()))}get videoReady(){return!!this.provider&&this.provider.videoReady}postData(A){let{forceTransparentPreview:B}=A;this._forceTransparentPreview=B,this.setPreviewGhost(this._ghost)}}A.exports=g},function(A,B){A.exports=class{constructor(A,B){this.callback=A,this.maxConcurrent=B,this._current=0,this._queue=[]}do(){for(var A=arguments.length,B=new Array(A),t=0;t{this._queue.push([A,t,B]),this._startNext()})}_startNext(){if(this._current>=this.maxConcurrent||0===this._queue.length)return;this._current++;const[A,B,t]=this._queue.shift();this.callback.apply(null,t).then(B=>{A(B),this._current--,this._startNext()}).catch(A=>{B(A),this._current--,this._startNext()})}}},function(A,B){A.exports={generateExtensionId:A=>{const B=A.replace(/[^a-z0-9]/gi,"").toLowerCase();return"sbx".concat(B)},argumentIndexToId:A=>A.toString()}},function(A,B,t){"use strict";var e=window.URL||window.webkitURL;A.exports=function(A,B){try{try{var t;try{(t=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder)).append(A),t=t.getBlob()}catch(B){t=new Blob([A])}return new Worker(e.createObjectURL(t))}catch(B){return new Worker("data:application/javascript,"+encodeURIComponent(A))}}catch(A){if(!B)throw Error("Inline worker is not supported");return new Worker(B)}}},function(A,B,t){const e=t(6);A.exports=A=>{const B={};for(let t=0;t{const t=[],e=A=>{A.localName!==B&&void 0!==B||!A.getAttribute||t.push(A);for(let B=0;B{const B=document.createElement("span"),t=A.outerHTML,g=e.sanitize(t,{USE_PROFILES:{svg:!0},FORBID_TAGS:["a","audio","canvas","video"],ADD_DATA_URI_TAGS:["image"]});let i,Q;try{B.innerHTML=g,document.body.appendChild(B),i=B.children[0].getBBox()}finally{document.body.removeChild(B)}Q=0===i.width||0===i.height?0:(A=>{let B=0;const t=A=>{A.getAttribute&&(A.getAttribute("stroke")&&(B=Math.max(B,1)),A.getAttribute("stroke-width")&&(B=Math.max(B,Number(A.getAttribute("stroke-width"))||0)));for(let B=0;B{B&&(A=>{const B=n(A,"linearGradient");for(const A of B)A.getAttribute("x2")||A.setAttribute("x2","0")})(A),s(A,window),(A=>{const B=n(A,"image"),t="image-rendering: optimizespeed; image-rendering: pixelated;";for(const A of B)A.getAttribute("style")?A.setAttribute("style","".concat(t," ").concat(A.getAttribute("style"))):A.setAttribute("style",t)})(A),B?((A=>{const B=[],t=A=>{"text"===A.localName&&B.push(A);for(let B=0;B{const B=n(A);for(const A of B){if(!A.style)continue;const B=A.style.stroke||A.getAttribute("stroke");B&&B.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)):r(A)};A.exports=(A,B)=>{const t=new DOMParser;A=Q(A);const e=t.parseFromString(A,"text/xml");if(e.childNodes.length<1||"svg"!==e.documentElement.localName)throw new Error("Document does not appear to be SVG.");const g=e.documentElement;return c(g,B),g}},function(A,B){A.exports=function(A){const B=[],t=A=>{"text"===A.localName&&B.push(A);for(let B=0;B]*>/);B&&-1===B[0].indexOf("xmlns=")&&(A=A.replace("]+?xlink:href=["'])data:img\/png/g,(A,B)=>"".concat(B,"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,B)=>"".concat(B,'"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,B){A.exports={rgbToHsv:(A,B)=>{let[t,e,g]=A,i=0;t/=255,e/=255,g/=255;let Q=0;e{let[t,e,g]=A;if(0===e)return B[0]=B[1]=B[2]=255*g+.5,B;t%=1;const i=6*t|0,Q=6*t-i,s=g*(1-e),n=g*(1-e*Q),r=g*(1-e*(1-Q));let c=0,E=0,o=0;switch(i){case 0:c=g,E=r,o=s;break;case 1:c=n,E=g,o=s;break;case 2:c=s,E=g,o=r;break;case 3:c=s,E=n,o=g;break;case 4:c=r,E=s,o=g;break;case 5:c=g,E=s,o=n}return B[0]=255*c+.5,B[1]=255*E+.5,B[2]=255*o+.5,B}}},function(A,B,t){const e=t(9),g=t(35),i=t(34),Q=t(25),s={color4f:[0,0,1,1],diameter:1},n=[0,0,0,0];A.exports=class extends i{constructor(A,B){super(A,B),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=B.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(g.Events.NativeSizeChanged,this.onNativeSizeChanged),this._setCanvasSize(B.getNativeSize())}dispose(){this._renderer.removeListener(g.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,B,t){this.drawLine(A,B,t,B,t)}drawLine(A,B,t,e,g){const i=A.diameter||s.diameter,Q=1===i||3===i?.5:0;this._drawLineOnBuffer(A,B+Q,t+Q,e+Q,g+Q),this._silhouetteDirty=!0}_enterDrawLineOnBuffer(){this._resetAttributeIndexes();const A=this._renderer.gl;e.bindFramebufferInfo(A,this._framebuffer),A.viewport(0,0,this._size[0],this._size[1]);const B=this._lineShader;A.useProgram(B.program),e.setBuffersAndAttributes(A,B,this._lineBufferInfo);const t={u_skin:this._texture,u_stageSize:this._size};e.setUniforms(B,t)}_exitDrawLineOnBuffer(){this.a_lineColorIndex&&this._flushLines();const A=this._renderer.gl;e.bindFramebufferInfo(A,null)}_enterUsePenBuffer(){e.bindFramebufferInfo(this._renderer.gl,this._framebuffer)}_exitUsePenBuffer(){e.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),e.setBuffersAndAttributes(A,this._drawTextureShader,this._renderer._bufferInfo)}_exitDrawTexture(){this._exitUsePenBuffer()}_drawPenTexture(A){this._renderer.enterDrawRegion(this._drawTextureRegionId);const B=this._renderer.gl,t=this._size[0],g=this._size[1],i={u_skin:A,u_projectionMatrix:e.m4.ortho(t/2,t/-2,g/-2,g/2,-1,1,e.m4.identity()),u_modelMatrix:e.m4.scaling(e.v3.create(t,g,0),e.m4.identity())};e.setTextureParameters(B,A,{minMag:B.NEAREST}),e.setUniforms(this._drawTextureShader,i),e.drawBufferInfo(B,this._renderer._bufferInfo,B.TRIANGLES)}_drawLineOnBuffer(A,B,t,e,g){this._renderer.enterDrawRegion(this._lineOnBufferDrawRegionId),this.a_lineColorIndex+24>65520&&this._flushLines();const i=A.color4f||s.color4f;n[0]=i[0]*i[3],n[1]=i[1]*i[3],n[2]=i[2]*i[3],n[3]=i[3],B*=this.renderQuality,t*=this.renderQuality;const Q=(e*=this.renderQuality)-B,r=(g*=this.renderQuality)-t,c=Math.sqrt(Q*Q+r*r),E=(A.diameter||s.diameter)*this.renderQuality;for(let A=0;A<6;A++)this.a_lineColor[this.a_lineColorIndex]=n[0],this.a_lineColorIndex++,this.a_lineColor[this.a_lineColorIndex]=n[1],this.a_lineColorIndex++,this.a_lineColor[this.a_lineColorIndex]=n[2],this.a_lineColorIndex++,this.a_lineColor[this.a_lineColorIndex]=n[3],this.a_lineColorIndex++,this.a_lineThicknessAndLength[this.a_lineThicknessAndLengthIndex]=E,this.a_lineThicknessAndLengthIndex++,this.a_lineThicknessAndLength[this.a_lineThicknessAndLengthIndex]=c,this.a_lineThicknessAndLengthIndex++,this.a_penPoints[this.a_penPointsIndex]=B,this.a_penPointsIndex++,this.a_penPoints[this.a_penPointsIndex]=-t,this.a_penPointsIndex++,this.a_penPoints[this.a_penPointsIndex]=Q,this.a_penPointsIndex++,this.a_penPoints[this.a_penPointsIndex]=-r,this.a_penPointsIndex++}_resetAttributeIndexes(){this.a_lineColorIndex=0,this.a_lineThicknessAndLengthIndex=0,this.a_penPointsIndex=0}_flushLines(){const A=this._renderer.gl,B=this._lineShader;this.a_lineColorIndex<1e3?(e.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_lineColor,new Float32Array(this.a_lineColor.buffer,0,this.a_lineColorIndex),0),e.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_penPoints,new Float32Array(this.a_penPoints.buffer,0,this.a_penPointsIndex),0),e.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_lineThicknessAndLength,new Float32Array(this.a_lineThicknessAndLength.buffer,0,this.a_lineThicknessAndLengthIndex),0)):(e.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_lineColor,this.a_lineColor),e.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_penPoints,this.a_penPoints),e.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_lineThicknessAndLength,this.a_lineThicknessAndLength)),e.setBuffersAndAttributes(A,B,this._lineBufferInfo),e.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[B,t]=A;if(this._size&&this._size[0]===B&&this._size[1]===t)return;this._size=A,this._rotationCenter[0]=this._nativeSize[0]/2,this._rotationCenter[1]=this._nativeSize[1]/2;const g=this._renderer.gl,i=this._texture;this._texture=e.createTexture(g,{mag:g.NEAREST,min:g.NEAREST,wrap:g.CLAMP_TO_EDGE,width:B,height:t});const Q=[{format:g.RGBA,attachment:this._texture}];this._framebuffer,this._framebuffer=e.createFramebufferInfo(g,Q,B,t),g.clearColor(0,0,0,0),g.clear(g.COLOR_BUFFER_BIT),i&&this._drawPenTexture(i),this._silhouettePixels=new Uint8Array(Math.floor(B*t*4)),this._silhouetteImageData=new ImageData(B,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,B,t){const e=t(9),g=t(34),{loadSvgString:i,serializeSvgToString:Q}=t(280),s=t(25);A.exports=class extends g{constructor(A,B){super(A,B),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,B){return 0==(B.enabledEffects&(s.EFFECT_INFO.fisheye.mask|s.EFFECT_INFO.whirl.mask|s.EFFECT_INFO.pixelate.mask|s.EFFECT_INFO.mosaic.mask))&&(B._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 B=this._largestMIPScale0&&void 0!==arguments[0]?arguments[0]:[100,100];this.getTexture(A),this._silhouette.unlazy()}getTexture(A){const B=A?Math.max(Math.abs(A[0]),Math.abs(A[1])):100,t=Math.min(B/100,this._maxTextureScale),e=Math.max(Math.ceil(Math.log2(t))+8,0),g=Math.pow(2,e-8);return this._svgImageLoaded&&!this._scaledMIPs[e]&&(this._scaledMIPs[e]=this.createMIP(g)),this._scaledMIPs[e]||super.getTexture()}resetMIPs(){this._scaledMIPs.forEach(A=>this._renderer.gl.deleteTexture(A)),this._scaledMIPs.length=0,this._largestMIPScale=0}setSVG(A,B){const t=i(A),e=Q(t,!0);this._svgImageLoaded=!1;const{x:g,y:s,width:n,height:r}=t.viewBox.baseVal;this._size[0]=n,this._size[1]=r,this._svgImage.onload=()=>{if(0===n||0===r)return void super.setEmptyImageData();const A=Math.ceil(Math.max(n,r));let t=2;for(;A*t<=2048;t*=2)this._maxTextureScale=t;this.resetMIPs(),void 0===B&&(B=this.calculateRotationCenter()),this._rotationCenter[0]=B[0]-g,this._rotationCenter[1]=B[1]-s,this._svgImageLoaded=!0,this.emitWasAltered()},this._svgImage.src="data:image/svg+xml;utf8,".concat(encodeURIComponent(e))}}},function(A,B,t){const e=t(281),g=t(285),i=t(96),Q=t(93),s=t(95),n=t(43),r=t(94);A.exports={BitmapAdapter:g,convertFonts:r,inlineSvgFonts:i,loadSvgString:Q,serializeSvgToString:s,SvgElement:n,SVGRenderer:e}},function(A,B,t){const e=t(93),g=t(95);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,B){this._cachedImage=null;const t=e(A,B);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,B,t){this.loadString(A,B),this._createSVGImage(t)}_createSVGImage(A){null===this._cachedImage&&(this._cachedImage=new Image);const B=this._cachedImage;B.onload=()=>{this.loaded=!0,A&&A()};const t=this.toString(!0);B.src="data:image/svg+xml;utf8,".concat(encodeURIComponent(t)),this.loaded=!1}toString(A){return g(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 B=Number.isFinite(A)?A:1,t=this._measurements;this._canvas.width=t.width*B,this._canvas.height=t.height*B,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(B,0,0,B,0,0),this._context.drawImage(this._cachedImage,0,0))}}},function(A,B){A.exports=function(A){const B=A.match(/]*>/);B&&-1===B[0].indexOf("xmlns=")&&(A=A.replace("]+?xlink:href=["'])data:img\/png/g,(A,B)=>"".concat(B,"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,B)=>"".concat(B,'"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,B){A.exports={rgbToHsv:(A,B)=>{let[t,e,g]=A,i=0;t/=255,e/=255,g/=255;let Q=0;e{let[t,e,g]=A;if(0===e)return B[0]=B[1]=B[2]=255*g+.5,B;t%=1;const i=6*t|0,Q=6*t-i,s=g*(1-e),n=g*(1-e*Q),r=g*(1-e*(1-Q));let c=0,E=0,o=0;switch(i){case 0:c=g,E=r,o=s;break;case 1:c=n,E=g,o=s;break;case 2:c=s,E=g,o=r;break;case 3:c=s,E=n,o=g;break;case 4:c=r,E=s,o=g;break;case 5:c=g,E=s,o=n}return B[0]=255*c+.5,B[1]=255*E+.5,B[2]=255*o+.5,B}}},function(A,B,t){const e=t(10),g=t(33),i=t(32),Q=t(25),s={color4f:[0,0,1,1],diameter:1},n=[0,0,0,0];A.exports=class extends i{constructor(A,B){super(A,B),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=B.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(g.Events.NativeSizeChanged,this.onNativeSizeChanged),this._setCanvasSize(B.getNativeSize())}dispose(){this._renderer.removeListener(g.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,B,t){this.drawLine(A,B,t,B,t)}drawLine(A,B,t,e,g){const i=A.diameter||s.diameter,Q=1===i||3===i?.5:0;this._drawLineOnBuffer(A,B+Q,t+Q,e+Q,g+Q),this._silhouetteDirty=!0}_enterDrawLineOnBuffer(){this._resetAttributeIndexes();const A=this._renderer.gl;e.bindFramebufferInfo(A,this._framebuffer),A.viewport(0,0,this._size[0],this._size[1]);const B=this._lineShader;A.useProgram(B.program),e.setBuffersAndAttributes(A,B,this._lineBufferInfo);const t={u_skin:this._texture,u_stageSize:this._size};e.setUniforms(B,t)}_exitDrawLineOnBuffer(){this.a_lineColorIndex&&this._flushLines();const A=this._renderer.gl;e.bindFramebufferInfo(A,null)}_enterUsePenBuffer(){e.bindFramebufferInfo(this._renderer.gl,this._framebuffer)}_exitUsePenBuffer(){e.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),e.setBuffersAndAttributes(A,this._drawTextureShader,this._renderer._bufferInfo)}_exitDrawTexture(){this._exitUsePenBuffer()}_drawPenTexture(A){this._renderer.enterDrawRegion(this._drawTextureRegionId);const B=this._renderer.gl,t=this._size[0],g=this._size[1],i={u_skin:A,u_projectionMatrix:e.m4.ortho(t/2,t/-2,g/-2,g/2,-1,1,e.m4.identity()),u_modelMatrix:e.m4.scaling(e.v3.create(t,g,0),e.m4.identity())};e.setTextureParameters(B,A,{minMag:B.NEAREST}),e.setUniforms(this._drawTextureShader,i),e.drawBufferInfo(B,this._renderer._bufferInfo,B.TRIANGLES)}_drawLineOnBuffer(A,B,t,e,g){this._renderer.enterDrawRegion(this._lineOnBufferDrawRegionId),this.a_lineColorIndex+24>65520&&this._flushLines();const i=A.color4f||s.color4f;n[0]=i[0]*i[3],n[1]=i[1]*i[3],n[2]=i[2]*i[3],n[3]=i[3],B*=this.renderQuality,t*=this.renderQuality;const Q=(e*=this.renderQuality)-B,r=(g*=this.renderQuality)-t,c=Math.sqrt(Q*Q+r*r),E=(A.diameter||s.diameter)*this.renderQuality;for(let A=0;A<6;A++)this.a_lineColor[this.a_lineColorIndex]=n[0],this.a_lineColorIndex++,this.a_lineColor[this.a_lineColorIndex]=n[1],this.a_lineColorIndex++,this.a_lineColor[this.a_lineColorIndex]=n[2],this.a_lineColorIndex++,this.a_lineColor[this.a_lineColorIndex]=n[3],this.a_lineColorIndex++,this.a_lineThicknessAndLength[this.a_lineThicknessAndLengthIndex]=E,this.a_lineThicknessAndLengthIndex++,this.a_lineThicknessAndLength[this.a_lineThicknessAndLengthIndex]=c,this.a_lineThicknessAndLengthIndex++,this.a_penPoints[this.a_penPointsIndex]=B,this.a_penPointsIndex++,this.a_penPoints[this.a_penPointsIndex]=-t,this.a_penPointsIndex++,this.a_penPoints[this.a_penPointsIndex]=Q,this.a_penPointsIndex++,this.a_penPoints[this.a_penPointsIndex]=-r,this.a_penPointsIndex++}_resetAttributeIndexes(){this.a_lineColorIndex=0,this.a_lineThicknessAndLengthIndex=0,this.a_penPointsIndex=0}_flushLines(){const A=this._renderer.gl,B=this._lineShader;this.a_lineColorIndex<1e3?(e.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_lineColor,new Float32Array(this.a_lineColor.buffer,0,this.a_lineColorIndex),0),e.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_penPoints,new Float32Array(this.a_penPoints.buffer,0,this.a_penPointsIndex),0),e.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_lineThicknessAndLength,new Float32Array(this.a_lineThicknessAndLength.buffer,0,this.a_lineThicknessAndLengthIndex),0)):(e.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_lineColor,this.a_lineColor),e.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_penPoints,this.a_penPoints),e.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_lineThicknessAndLength,this.a_lineThicknessAndLength)),e.setBuffersAndAttributes(A,B,this._lineBufferInfo),e.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[B,t]=A;if(this._size&&this._size[0]===B&&this._size[1]===t)return;this._size=A,this._rotationCenter[0]=this._nativeSize[0]/2,this._rotationCenter[1]=this._nativeSize[1]/2;const g=this._renderer.gl,i=this._texture;this._texture=e.createTexture(g,{mag:g.NEAREST,min:g.NEAREST,wrap:g.CLAMP_TO_EDGE,width:B,height:t});const Q=[{format:g.RGBA,attachment:this._texture}];this._framebuffer,this._framebuffer=e.createFramebufferInfo(g,Q,B,t),g.clearColor(0,0,0,0),g.clear(g.COLOR_BUFFER_BIT),i&&this._drawPenTexture(i),this._silhouettePixels=new Uint8Array(Math.floor(B*t*4)),this._silhouetteImageData=new ImageData(B,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,B,t){const e=t(10),g=t(32),{loadSvgString:i,serializeSvgToString:Q}=t(283),s=t(25);A.exports=class extends g{constructor(A,B){super(A,B),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,B){return 0==(B.enabledEffects&(s.EFFECT_INFO.fisheye.mask|s.EFFECT_INFO.whirl.mask|s.EFFECT_INFO.pixelate.mask|s.EFFECT_INFO.mosaic.mask))&&(B._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 B=this._largestMIPScale0&&void 0!==arguments[0]?arguments[0]:[100,100];this.getTexture(A),this._silhouette.unlazy()}getTexture(A){const B=A?Math.max(Math.abs(A[0]),Math.abs(A[1])):100,t=Math.min(B/100,this._maxTextureScale),e=Math.max(Math.ceil(Math.log2(t))+8,0),g=Math.pow(2,e-8);return this._svgImageLoaded&&!this._scaledMIPs[e]&&(this._scaledMIPs[e]=this.createMIP(g)),this._scaledMIPs[e]||super.getTexture()}resetMIPs(){this._scaledMIPs.forEach(A=>this._renderer.gl.deleteTexture(A)),this._scaledMIPs.length=0,this._largestMIPScale=0}setSVG(A,B){const t=i(A),e=Q(t,!0);this._svgImageLoaded=!1;const{x:g,y:s,width:n,height:r}=t.viewBox.baseVal;this._size[0]=n,this._size[1]=r,this._svgImage.onload=()=>{if(0===n||0===r)return void super.setEmptyImageData();const A=Math.ceil(Math.max(n,r));let t=2;for(;A*t<=2048;t*=2)this._maxTextureScale=t;this.resetMIPs(),void 0===B&&(B=this.calculateRotationCenter()),this._rotationCenter[0]=B[0]-g,this._rotationCenter[1]=B[1]-s,this._svgImageLoaded=!0,this.emitWasAltered()},this._svgImage.src="data:image/svg+xml;utf8,".concat(encodeURIComponent(e))}}},function(A,B,t){const e=t(284),g=t(288),i=t(98),Q=t(95),s=t(97),n=t(44),r=t(96);A.exports={BitmapAdapter:g,convertFonts:r,inlineSvgFonts:i,loadSvgString:Q,serializeSvgToString:s,SvgElement:n,SVGRenderer:e}},function(A,B,t){const e=t(95),g=t(97);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,B){this._cachedImage=null;const t=e(A,B);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,B,t){this.loadString(A,B),this._createSVGImage(t)}_createSVGImage(A){null===this._cachedImage&&(this._cachedImage=new Image);const B=this._cachedImage;B.onload=()=>{this.loaded=!0,A&&A()};const t=this.toString(!0);B.src="data:image/svg+xml;utf8,".concat(encodeURIComponent(t)),this.loaded=!1}toString(A){return g(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 B=Number.isFinite(A)?A:1,t=this._measurements;this._canvas.width=t.width*B,this._canvas.height=t.height*B,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(B,0,0,B,0,0),this._context.drawImage(this._cachedImage,0,0))}}},function(A,B){A.exports=function(A){const B=A.match(/]*>/);B&&-1===B[0].indexOf("xmlns=")&&(A=A.replace("]+?xlink:href=["'])data:img\/png/g,(A,B)=>"".concat(B,"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,B)=>"".concat(B,'"http://dummy.namespace"'))),A=(A=(A=A.replace(/<(\/?)\s*svg:/g,"<$1")).replace(/[\s\S]*<\/metadata>/,"")).replace(/[\s\S]*<\/script>/," + */g=[],void 0===(i="function"==typeof(e=function(){var A=function(A,B){this._dragged=!1,this._element=A,this._bindedMove=this._moved.bind(this),this._bindedEnd=this._ended.bind(this,B),A.addEventListener("touchstart",this._bindedEnd),A.addEventListener("touchmove",this._bindedMove),A.addEventListener("touchend",this._bindedEnd),A.addEventListener("mouseup",this._bindedEnd)};function B(A){return"running"===A.state}return A.prototype._moved=function(A){this._dragged=!0},A.prototype._ended=function(A){this._dragged||function(A){var B=A.createBuffer(1,1,A.sampleRate),t=A.createBufferSource();t.buffer=B,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,e,g){var i=new Promise((function(A){!function(A,t){B(A)?t():function e(){B(A)?t():(requestAnimationFrame(e),A.resume&&A.resume())}()}(t,A)})),Q=[];return e||(e=document.body),function B(t,e,g){if(Array.isArray(t)||NodeList&&t instanceof NodeList)for(var i=0;i{const i=new e(A);"RIFF"!==i.readUint8String(4)&&(g.warn("incorrect adpcm wav header"),t());const Q=i.readInt32();Q+8!==A.byteLength&&g.warn("adpcm wav length in header: ".concat(Q," is incorrect"));"WAVE"!==i.readUint8String(4)&&(g.warn("incorrect adpcm wav header"),t());const s=this.extractChunk("fmt ",i);this.encoding=s.readUint16(),this.channels=s.readUint16(),this.samplesPerSecond=s.readUint32(),this.bytesPerSecond=s.readUint32(),this.blockAlignment=s.readUint16(),this.bitsPerSample=s.readUint16(),s.position+=2,this.samplesPerBlock=s.readUint16(),this.adpcmBlockSize=(this.samplesPerBlock-1)/2+4;const n=this.extractChunk("data",i),r=this.numberOfSamples(n,this.adpcmBlockSize),c=this.audioContext.createBuffer(1,r,this.samplesPerSecond);this.imaDecompress(n,this.adpcmBlockSize,c.getChannelData(0)),B(c)})}extractChunk(A,B){for(B.position=12;B.position>1),1&A&&(g+=B>>2),g+=B>>3,s[t++]=8&A?-g:g}}return s}();let C=0;for(;C88&&(r=88),t[C++]=e/32768;const B=Math.min(o,E-C),i=C;for(;C-i88?r=88:r<0&&(r=0),e+=n,e>32767?e=32767:e<-32768&&(e=-32768),t[C++]=e/32768,g=c>>4&15,n=w[16*r+g],r+=Q[g],r>88?r=88:r<0&&(r=0),e+=n,e>32767?e=32767:e<-32768&&(e=-32768),t[C++]=e/32768}}}},function(A,B){class t{constructor(A){let B=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A.byteLength,{_uint8View:e=new Uint8Array(A)}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.arrayBuffer=A,this.start=B,this.end=t,this._uint8View=e,this._position=B}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 B=this._uint8View;let t="";const e=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=>{e.warn(A)})),this.mic&&this.audioStream.active){this.analyser.getFloatTimeDomainData(this.micDataArray);let A=0;for(let B=0;Bthis.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 i(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:B}=this.audioEngine;this.startingUntil=A+B,this.emit("play")}stop(){if(!this.isPlaying)return;const A=this.take();A.volumeEffect=new g(A.audioEngine,A,null),A.volumeEffect.connect(A.target),A.finished().then(()=>A.dispose()),A.volumeEffect.set(0);const{currentTime:B,DECAY_DURATION:t}=this.audioEngine;A.outputNode.stop(B+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=i},function(A,B){class t{constructor(A,B){this.audioEngine=A,this.inputNode=this.audioEngine.audioContext.createGain(),this.effects=B;let t=null;this._effects=B.reverse().map(B=>{const e=new B(A,this,t);return this[e.name]=e,t=e,e}).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:B,lastEffect:t}=this;if(A===t)return this.inputNode.disconnect(),void this.inputNode.connect(t.getInputNode());A!==B&&(this.target=A,B.connect(A))}getSoundPlayers(){return[...this._soundPlayers]}setEffectsFromTarget(A){this._effects.forEach(B=>{"soundEffects"in A&&B.name in A.soundEffects?B.set(A.soundEffects[B.name]):B.name in A&&B.set(A[B.name])})}set(A,B){A in this&&this[A].set(B)}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,B,t){const e=t(48);A.exports=class extends e{constructor(A,B,t){super(A,B,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 B=(A+100)/200,t=Math.cos(B*Math.PI/2),e=Math.sin(B*Math.PI/2),{currentTime:g,DECAY_WAIT:i,DECAY_DURATION:Q}=this.audioEngine;this.leftGain.gain.setTargetAtTime(t,g+i,Q),this.rightGain.gain.setTargetAtTime(e,g+i,Q)}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,B,t){const e=t(48);A.exports=class extends e{constructor(A,B,t){super(A,B,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 B=A/10;return Math.pow(2,B/12)}updatePlayer(A){A.setPlaybackRate(this.ratio)}updatePlayers(A){if(A)for(const B in A)A.hasOwnProperty(B)&&this.updatePlayer(A[B])}}},function(A,B,t){const e=t(34);A.exports=class{constructor(A,B){this.audioEngine=A,this.soundPlayers={},this.playerTargets=new Map,this.soundEffects=new Map,this.effectChainPrime=B}addSoundPlayer(A){this.soundPlayers[A.id]=A}getSoundPlayer(A){return this.soundPlayers[A]||e.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,B){const t=this.getSoundEffects(B),e=this.getSoundPlayer(B);return this.playerTargets.get(B)!==A&&e.stop(),this.playerTargets.set(B,A),t.addSoundPlayer(e),t.setEffectsFromTarget(A),e.connect(t),e.play(),e.finished()}setEffects(A){this.playerTargets.forEach((B,t)=>{B===A&&this.getSoundEffects(t).setEffectsFromTarget(A)})}stop(A,B){this.playerTargets.get(B)===A&&this.soundPlayers[B].stop()}stopAllSounds(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*";this.playerTargets.forEach((B,t)=>{"*"!==A&&B!==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,B,t){"use strict";t.r(B),t.d(B,"SB1File",(function(){return eB})),t.d(B,"AssertionError",(function(){return e})),t.d(B,"ValidationError",(function(){return g}));class e extends Error{}class g extends e{}const i=function(A,B){if(!A)throw new e(B)};i.validate=function(A,B){if(!A)throw new g(B)};class Q{constructor(A){let B=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.buffer=A,this.position=B,this.uint8a=new Uint8Array(this.buffer)}read(A){const B=A.read(this.uint8a,this.position);return 0===A.size?this.position+=A.sizeOf(this.uint8a,this.position):this.position+=A.size,B}readStruct(A){const B=new A(this.uint8a,this.position);return this.position+=A.size,B}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;i(A instanceof Uint8Array,"writeBytes must be passed an Uint8Array"),this.resize(this.position+(t-B));for(let e=B;e1&&void 0!==arguments[1]?arguments[1]:1/0;this.iter=A,this.maxPosition=B}[Symbol.iterator](){return this}next(){return this.iter.stream.position>=this.maxPosition?{value:null,done:!0}:this.iter.next()}}const n=()=>{throw new Error("Not implemented")},r=(()=>{const A=new Uint16Array(1),B=new Uint8Array(A.buffer);return A[0]=43707,187===B[0]})();class c{constructor(A){let{size:B=0,sizeOf:t=(()=>B),writeSizeOf:e=n,toBytes:g=new Uint8Array(1),read:i,write:Q=n}=A;this.size=B,this.sizeOf=t,this.writeSizeOf=e,this.toBytes=g,this.bytes=new Uint8Array(g.buffer),this.read=i,this.write=Q}asPropertyObject(A){const B=this;return{get(){return B.read(this.uint8a,A+this.offset)},set(t){return B.write(this.uint8a,A+this.offset,t)},enumerable:!0}}read(){return null}}const E=new c({size:1,read:(A,B)=>A[B],write:(A,B,t)=>(A[B]=t,t)}),o={size:2,read(A,B){return this.bytes[1]=A[B+0],this.bytes[0]=A[B+1],this.toBytes[0]},write(A,B,t){return this.toBytes[0]=t,A[B+0]=this.bytes[1],A[B+1]=this.bytes[0],t}},w={size:2,read(A,B){return this.bytes[0]=A[B+0],this.bytes[1]=A[B+1],this.toBytes[0]},write(A,B,t){return this.toBytes[0]=t,A[B+0]=this.bytes[0],A[B+1]=this.bytes[1],t}};let C;C=r?o:w;new c(Object.assign({},C,{toBytes:new Uint16Array(1)}));const a=new c(Object.assign({},C,{toBytes:new Int16Array(1)})),I={size:4,read(A,B){return this.bytes[3]=A[B+0],this.bytes[2]=A[B+1],this.bytes[1]=A[B+2],this.bytes[0]=A[B+3],this.toBytes[0]},write(A,B,t){return this.toBytes[0]=t,A[B+0]=this.bytes[3],A[B+1]=this.bytes[2],A[B+2]=this.bytes[1],A[B+3]=this.bytes[0],t}},Y={size:4,read(A,B){return this.bytes[0]=A[B+0],this.bytes[1]=A[B+1],this.bytes[2]=A[B+2],this.bytes[3]=A[B+3],this.toBytes[0]},write(A,B,t){return this.toBytes[0]=t,A[B+0]=this.bytes[0],A[B+1]=this.bytes[1],A[B+2]=this.bytes[2],A[B+3]=this.bytes[3],t}};let h;h=r?I:Y;const M=new c(Object.assign({},h,{toBytes:new Int32Array(1)})),F=new c(Object.assign({},h,{toBytes:new Uint32Array(1)}));let D;D=r?w:o;const u=new c(Object.assign({},D,{toBytes:new Uint16Array(1)}));let l;l=r?Y:I;const d=new c(Object.assign({},l,{toBytes:new Uint32Array(1)}));let U;U=r?{size:8,read(A,B){return this.bytes[7]=A[B+0],this.bytes[6]=A[B+1],this.bytes[5]=A[B+2],this.bytes[4]=A[B+3],this.bytes[3]=A[B+4],this.bytes[2]=A[B+5],this.bytes[1]=A[B+6],this.bytes[0]=A[B+7],this.toBytes[0]}}:{size:8,read(A,B){return this.bytes[7]=A[B+0],this.bytes[6]=A[B+1],this.bytes[5]=A[B+2],this.bytes[4]=A[B+3],this.bytes[3]=A[B+4],this.bytes[2]=A[B+5],this.bytes[1]=A[B+6],this.bytes[0]=A[B+7],this.toBytes[0]}};const N=new c(Object.assign({},U,{toBytes:new Float64Array(1)}));class m extends c{constructor(A){super({size:A,read(B,t){let e="";for(let g=0;gA[B+0]<<16|A[B+1]<<8|A[B+2]}:{size:3,read:(A,B)=>A[B+2]<<16|A[B+1]<<8|A[B+0]});const H=new c({sizeOf(A,B){const t=a.read(A,B);return a.size+t},read(A,B){let t=0,e=0;const g=a.read(A,B);for(let i=0;iF.size+F.read(A,B),read(A,B){const t=F.read(A,B);return i(t<10485760,"bytes too big"),B+=F.size,i(t<10485760,"uint8a array too big"),new Uint8Array(A.buffer,B,t)}}),y=new c({sizeOf:(A,B)=>F.size+2*F.read(A,B),read(A,B){const t=F.read(A,B);i(t<10485760,"sound too big"),B+=F.size;const e=2*t;return i(e<10485760,"uint8a array too big"),new Uint8Array(A.buffer,B,e)}}),J=new c({sizeOf:(A,B)=>F.size+F.read(A,B)*F.size,read(A,B){const t=F.read(A,B);i(t<10485760,"bitmap too big"),B+=F.size,i(t<10485760,"uint8a array too big");const e=new Uint32Array(t);for(let g=0;gF.size+F.read(A,B),read(A,B){const t=F.read(A,B);return i(t<10485760,"utf8 too big"),B+=F.size,i(t<10485760,"uint8a array too big"),k.decode(new Uint8Array(A.buffer,B,t))}}),j=new c({size:4,read(A,B){const t=F.read(A,B);return(255<<24|(t>>22&255)<<16|(t>>12&255)<<8|t>>2&255)>>>0}}),x=new c({size:5,read(A,B){const t=F.read(A,B);return(E.read(A,B)<<24|(t>>22&255)<<16|(t>>12&255)<<8|t>>2&255)>>>0}}),S={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},b=Object.entries(S).reduce((A,B)=>{let[t,e]=B;return A[e]=t,A},{});class z{constructor(A,B){this.classId=A,this.position=B}}const L=A=>"object"==typeof A&&A?A.valueOf():A;class P extends z{constructor(A,B,t){super(A,B),this.value=t}valueOf(){return this.value}toJSON(){return this.classId===S.TRANSLUCENT_COLOR||this.classId===S.COLOR?16777215&this.value:this.value}toString(){return this.value}}class v extends z{constructor(A,B,t){super(A,B),this.size=t}}class W extends z{constructor(A,B,t){super(A,B),this.index=t}valueOf(){return"Ref(".concat(this.index,")")}}class V extends v{constructor(A,B,t,e){super(A,B,e),this.version=t}}class K{constructor(A){let{type:B=P,read:t,value:e=(t?A=>A.read(t):null)}=A;this.type=B,this.value=e}next(A,B,t){return{value:new this.type(B,t,this.value(A)),done:!1}}}const O={[S.NULL]:{value:()=>null},[S.TRUE]:{value:()=>!0},[S.FALSE]:{value:()=>!1},[S.SMALL_INT]:{read:M},[S.SMALL_INT_16]:{read:a},[S.LARGE_INT_POSITIVE]:{read:H},[S.LARGE_INT_NEGATIVE]:{read:H},[S.FLOATING]:{read:N},[S.STRING]:{read:R},[S.SYMBOL]:{read:R},[S.BYTES]:{read:p},[S.SOUND]:{read:y},[S.BITMAP]:{read:J},[S.UTF8]:{read:T},[S.ARRAY]:{type:v,read:M},[S.ORDERED_COLLECTION]:{type:v,read:M},[S.SET]:{type:v,read:M},[S.IDENTITY_SET]:{type:v,read:M},[S.DICTIONARY]:{type:v,value:A=>2*A.read(M)},[S.IDENTITY_DICTIONARY]:{type:v,value:A=>2*A.read(M)},[S.COLOR]:{read:j},[S.TRANSLUCENT_COLOR]:{read:x},[S.POINT]:{type:v,value:()=>2},[S.RECTANGLE]:{type:v,value:()=>4},[S.FORM]:{type:v,value:()=>5},[S.SQUEAK]:{type:v,value:()=>6},[S.OBJECT_REF]:{type:W,read:f}},X=Array.from({length:256},(A,B)=>O[B]?new K(O[B]):null),Z=new K({type:class extends v{constructor(A,B){super(A,B,0)}},value:()=>null});class _{constructor(A,B){this.buffer=A,this.stream=new Q(A,B)}[Symbol.iterator](){return this}next(){if(this.stream.position>=this.stream.uint8a.length)return{value:null,done:!0};const A=this.stream.position,B=this.stream.read(E),t=X[B];if(null!==t)return t.next(this.stream,B,A);if(B1&&void 0!==arguments[1]?arguments[1]:q;class t extends B{get FIELDS(){return A}static get FIELDS(){return A}}return Object.keys(A).forEach(B=>{const e=A[B];Object.defineProperty(t.prototype,B.toLowerCase().replace(/_(\w)/g,A=>{let[,B]=A;return B.toUpperCase()}),{get(){return this.fields[e]}})}),t}}class ${constructor(){let A;this.bit=new Uint32Array(1),this.crc=0,this.c=0,this.table=[];for(let B=0;B<256;B++){A=B;for(let B=0;B<8;B++)A=1&A?3988292384^A>>>1:A>>>1;this.table[B]=A>>>0}}update(A){let B=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A.length,e=~this.crc>>>0;for(let g=0;g>>8^this.table[255&(e^A[B+g])];return this.crc=~e>>>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],BA=[4294967295,4278190080],tA=new c({sizeOf(A,B){const t=A[B];return t<=223?1:t<=254?2:5},read(A,B){const t=A[B];return t<=223?t:t<=254?256*(t-224)+A[B+1]:F.read(A,B+1)}});class eA{decode(A,B,t,e,g){const i=this.decodePixels(e,32===t);if(t<=8)return g||(g=1===t?BA:AA),this.unpackPixels(i,A,B,t,g);if(16===t)return this.raster16To32(i,A,B);if(32===t)return i;throw new Error("Unhandled Squeak Image depth.")}decodePixels(A,B){let t;if(Array.isArray(A)||A instanceof Uint32Array){if(t=new Uint32Array(A),B)for(let A=0;A>2;let Q;switch(3&A){case 0:i+=g;break;case 1:Q=e.read(E),Q|=Q<<24|Q<<16|Q<<8,B&&0!==Q&&(Q|=4278190080);for(let A=0;A>c&Q],c-=e}return i}raster16To32(A,B,t){const e=new Uint32Array(2*A.length);let g,i,Q,s=0,n=0;for(let r=0;r>g&65535,0!==Q){Q=4278190080|(Q>>7&248)<<16|(Q>>2&248)<<8|Q<<3&248}e[n++]=Q,g-=16}}return e}buildCustomColormap(A,B,t){const e=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 Q(A.buffer,A.byteOffset),this.end=A.byteOffset+A.length;const B=Math.floor(8*A.length/this.bitsPerSample),t=new Int16Array(B);let e=0,g=0;for(let A=0;A=0,"Ran out of bits in Squeak Sound");let Q=gA[g],s=0;for(let A=this.valueHighBit;A>0;A>>=1)0!=(B&A)&&(s+=Q),Q>>=1;s+=Q,e+=0==(B&this.signMask)?s:-s,g+=this.indexTable[B],g<0&&(g=0),g>88&&(g=88),e>32767&&(e=32767),e<-32768&&(e=-32768),t[A]=e}return t}nextCode(){let A=this.bitsPerSample,B=A-this.bitPosition,t=B<0?this.currentByte>>-B: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(E),this.bitPosition=8,B=A-this.bitPosition,t+=B<0?this.currentByte>>-B:this.currentByte<>8-this.bitPosition,t}static samples(A,B){return 8*B.length/A}}class sA{constructor(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Uint8Array(this.size),B=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.uint8a=A,this.offset=B}equals(A){for(const B in A)if(this[B]!==A[B])return!1;return!0}view(){const A=this.constructor.name,B={toString:()=>A};for(const A in this.shape)B[A]=this[A];return B}static initConstructor(A){return A.size=A.prototype.size,A}static extend(A){const B=class extends sA{get shape(){return A}};let t=0;return Object.keys(A).forEach(e=>{if(Object.defineProperty(B.prototype,e,A[e].asPropertyObject(t)),0===A[e].size)throw new Error("Packet cannot be defined with variable sized members.");t+=A[e].size}),B.prototype.size=t,B.size=t,B}}class nA extends(sA.extend({riff:new m(4),length:d,wave:new m(4)})){}sA.initConstructor(nA);class rA extends(sA.extend({chunkType:new m(4),length:d})){}sA.initConstructor(rA);class cA extends(sA.extend({format:u,channels:u,sampleRate:d,bytesPerSec:d,blockAlignment:u,bitsPerSample:u})){}sA.initConstructor(cA);class EA{encode(A){let{channels:B=1,sampleRate:t=22050}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const e=new Uint8Array(A.buffer,A.byteOffset,A.byteLength),g=nA.size+rA.size+cA.size+rA.size+e.length,i=new Q(new ArrayBuffer(g));return i.writeStruct(nA,{riff:"RIFF",length:g-8,wave:"WAVE"}),i.writeStruct(rA,{chunkType:"fmt ",length:cA.size}),i.writeStruct(cA,{format:1,channels:B,sampleRate:t,bytesPerSec:2*t*B,blockAlignment:2*B,bitsPerSample:16}),i.writeStruct(rA,{chunkType:"data",length:g-i.position-rA.size}),i.writeBytes(e),i.uint8a}static encode(A,B){return(new EA).encode(A,B)}static samples(A){const B=new rA(A,nA.size).length;return new rA(A,nA.size+rA.size+B).length/2}}var oA=t(19),wA=t.n(oA);class CA extends(q.define({X:0,Y:1})){}class aA 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 IA extends(q.define({WIDTH:0,HEIGHT:1,DEPTH:2,BYTES:4,COLORMAP:5})){get decoded(){return this._decoded||(this._decoded=(A=>{for(let B=0;BA.valueOf())).buffer))),this._decoded}get extension(){return"uncompressed"}}class YA 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 MA 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 IA?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 IA?"uncompressed":this.baseLayerData.value?"jpg":"uncompressed"}toString(){return'ImageMediaData "'.concat(this.costumeName,'"')}}class FA extends(q.define({DATA:3,RATE:4})){}class DA 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 QA(this.bitsPerSample.value).decode(this.data.value):this._decoded=new Int16Array((A=>{const B=new Uint8Array(A);for(let t=0;tpA[B]||null);class JA{constructor(A){this.valueIterator=A}[Symbol.iterator](){return this}next(){const A=this.valueIterator.next();if(A.done)return A;const B=A.value,{classId:t}=B;let e=B;if(B instanceof v){e=[];for(let A=0;A>>16;for(let i=0;i1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A.length;return this.stream.writeBytes(A,B,t)}}class VA extends WA{constructor(A){super(A),this.stream.writeStruct(LA,{cmf:8,flag:29}),this.adler=new zA,this.chunk=this.stream.writeStruct(PA,{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,B){this.writeBytes(Object.assign(new A,B).uint8a)}writeBytes(A){let B=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A.length,e=B;for(;t-e>0;){65535===this._deflateIndex&&(this.chunk=this.stream.writeStruct(PA,{lastPacket:0,length:0,lengthCheck:65535}));const B=Math.min(t-e,65535-this._deflateIndex);this.stream.writeBytes(A,e,e+B),this._deflateIndex+=B,e+=B}this.adler.update(A,B,t-B)}finish(){this.chunk.lastPacket=1,this.stream.writeStruct(vA,{checksum:this.adler.digest})}static estimateSize(A){const B=Math.ceil(A/65535);return LA.size+B*PA.size+vA.size+A}}class KA extends WA{constructor(A){let B=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"IHDR";super(A),this.start=this.stream.writeStruct(jA,{length:0,chunkType:B}),this.crc=new $}finish(){const A=this.start.offset+this.start.size,B=this.position-A;this.start.length=B,this.crc.update(this.stream.uint8a,A-F.size,B+F.size),this.stream.writeStruct(xA,{checksum:this.crc.digest})}static size(A){return jA.size+A+xA.size}}class OA{encode(A,B,t){const e=4*A+bA.size,g=e*B,i=TA.size+KA.size(SA.size)+KA.size(VA.estimateSize(g))+KA.size(0),s=new Q(new ArrayBuffer(i));s.writeStruct(TA,{support8Bit:137,png:"PNG",dosLineEnding:"\r\n",dosEndOfFile:"",unixLineEnding:"\n"});const n=new KA(s,"IHDR");n.writeStruct(SA,{width:A,height:B,bitDepth:8,colorType:6,compressionMethod:0,filterMethod:0,interlaceMethod:0}),n.finish();const r=new KA(s,"IDAT"),c=new VA(r);let E=0;for(;E"uncompressed"===A.extension?new Uint8Array(OA.encode(A.width,A.height,A.decoded)):A.decoded,qA=A=>{const B=String(A[A.length-1]),t=A.length-1;return"mouse"===B?A[t]="_mouse_":"edge"===B?A[t]="_edge_":A[A.length-1]instanceof YA&&(A[t]="_stage_"),A},$A={getParam:A=>{let[B,t,e,g]=A;return[B,t,e,g||"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},AB=A=>{const{info:B,stageData:t,images:e,sounds:g}=A,i=A=>{const B=[];for(let t=0;t{let[B,t]=A;return{name:B,value:t,isPersistent:!1}},s=A=>{let[,{listName:B,contents:t,x:e,y:g,width:i,height:Q,hiddenWhenNull:s}]=A;return{listName:B,contents:t,isPersistent:!1,x:e,y:g,width:i,height:Q,visible:null!==(n=s,"object"==typeof n&&n?n.valueOf():n)};var n},n=A=>{const B=g.findIndex(B=>B.crc===A.crc);return{soundName:A.name,soundID:B,md5:"".concat(A.md5,".wav"),sampleCount:A.sampleCount,rate:A.rate,format:""}},r=A=>{const B=e.findIndex(B=>B.crc===A.crc);return{costumeName:A.costumeName,baseLayerID:B,baseLayerMD5:"".concat(wA()(A.rawBytes),".").concat((t=A,"uncompressed"===t.extension?"png":"jpg")),bitmapResolution:1,rotationCenterX:A.rotationCenter.x,rotationCenterY:A.rotationCenter.y};var t},c=A=>{let B=A.map(o);const t=$A[B[0]];return t&&(B=t(B)),B},E=A=>A.map(c),o=A=>A instanceof hA?A.objName:Array.isArray(A)?0===A.length||Array.isArray(A[0])?E(A):c(A):A,w=A=>[A[0].x,A[0].y,E(A[1])],C=A=>A instanceof hA?(A=>{const B=A.media.filter(A=>A instanceof MA),e=A.media.filter(A=>A instanceof DA);return{objName:A.objName,variables:i(A.vars).map(Q),lists:i(A.lists).map(s),scripts:A.blocksBin.map(w),costumes:B.map(r),currentCostumeIndex:B.findIndex(B=>B.crc===A.currentCostume.crc),sounds:e.map(n),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 B=A.media.filter(A=>A instanceof MA),t=A.media.filter(A=>A instanceof DA);return{objName:A.objName,variables:i(A.vars).map(Q),lists:i(A.lists).map(s),scripts:A.blocksBin.map(w),costumes:B.map(r),currentCostumeIndex:B.findIndex(B=>B.crc===A.currentCostume.crc),sounds:t.map(n),penLayerMD5:"5c81a336fab8be57adc039a8a2b33ca9.png",penLayerID:0,tempoBPM:A.tempoBPM,videoAlpha:.5,children:A.stageContents.map(C).filter(Boolean).reverse()}})(t),{info:(A=>{const B={};for(let t=0;t{let{images:B,sounds:t}=A;const e={};let g=0;for(const A of B)e["".concat(g++,".").concat((i=A,"uncompressed"===i.extension?"png":"jpg"))]={bytes:_A(A)};var i,Q;g=0;for(const A of t)e["".concat(g++,".wav")]={bytes:(Q=A,Q.wavEncodedData)};return new ZA(e)})({images:this.images(),sounds:this.sounds()})}view(){return{signature:this.signature,infoHeader:this.infoHeader,dataHeader:this.dataHeader,toString:()=>"SB1File"}}infoRaw(){return new s(new _(this.buffer,this.infoHeader.offset+tB.size),this.signature.infoByteLength+BB.size)}infoTable(){return new JA(this.infoRaw())}info(){return this._info||(this._info=new kA(this.infoTable()).table[0]),this._info}dataRaw(){return new s(new _(this.buffer,this.dataHeader.offset+tB.size),this.stream.uint8a.length)}dataTable(){return new JA(this.dataRaw())}dataFixed(){return this._data||(this._data=new kA(this.dataTable()).table),this._data}data(){return this.dataFixed()[0]}images(){const A=new Set;return this.dataFixed().filter(B=>B instanceof MA&&(!A.has(B.crc)&&(A.add(B.crc),!0)))}sounds(){const A=new Set;return this.dataFixed().filter(B=>B instanceof DA&&(!A.has(B.crc)&&(A.add(B.crc),!0)))}}},function(A,B,t){"use strict";t.r(B);var e={};t.r(e),t.d(e,"Scaffolding",(function(){return z})),t.d(e,"Cloud",(function(){return D})),t.d(e,"VM",(function(){return i.a})),t.d(e,"Renderer",(function(){return s.a})),t.d(e,"Storage",(function(){return E})),t.d(e,"AudioEngine",(function(){return w.a})),t.d(e,"JSZip",(function(){return I.a}));var g=t(49),i=t.n(g),Q=t(51),s=t.n(Q),n=t(103),r=t.n(n);class c extends r.a{constructor(){super(),this._totalAssets=0,this._loadedAssets=0}_updateProgress(){this.onprogress&&this.onprogress(this._totalAssets,this._loadedAssets)}load(A,B,t){return A===this.AssetType.ImageBitmap||A===this.AssetType.ImageVector||A===this.AssetType.Sound?(this._totalAssets++,this._updateProgress(),super.load(A,B,t).then(A=>(this._loadedAssets++,this._updateProgress(),A))):super.load(A,B,t)}}var E=c,o=t(52),w=t.n(o),C=t(50),a=t(21),I=t.n(a);const Y=[],h=A=>{let B;var t;return 0===Y.length?(t={audio:!1,video:A},B=navigator.mediaDevices?navigator.mediaDevices.getUserMedia(t):Promise.reject(new Error("video is not supported in this context (insecure domain?)")),Y.push(B)):Y.length>0&&(B=Y[0],Y.push(!0)),B};class M{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=(Y.pop(),!(Y.length>0));this._singleSetup=null,this._video=null,this._track&&A&&this._track.stop(),this._track=null}}getFrame(A){let{dimensions:B=M.DIMENSIONS,mirror:t=this.mirror,format:e=M.FORMAT_IMAGE_DATA,cacheTimeout:g=this._frameCacheTimeout}=A;if(!this.videoReady)return null;const[i,Q]=B,s=this._getWorkspace({dimensions:B,mirror:Boolean(t)}),{videoWidth:n,videoHeight:r}=this._video,{canvas:c,context:E,lastUpdate:o,cacheData:w}=s,C=Date.now();o+g{this._video=document.createElement("video");try{this._video.srcObject=A}catch(B){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:B}=this._video;return"number"==typeof A&&"number"==typeof B&&(0!==A&&0!==B)}_getWorkspace(A){let{dimensions:B,mirror:t}=A,e=this._workspace.find(A=>A.dimensions.join("-")===B.join("-")&&A.mirror===t);return e||(e={dimensions:B,mirror:t,canvas:document.createElement("canvas"),lastUpdate:0,cacheData:{}},e.canvas.width=B[0],e.canvas.height=B[1],e.context=e.canvas.getContext("2d"),this._workspace.push(e)),e}}var F=M;var D={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,B,t){this.overrides.has(B)&&this.overrides.get(B)!==A||this.parent.vm.postIOData("cloud",{varUpdate:{name:B,value:t}})}getUsername(){return this.parent._username}addProvider(A){A.manager=this,this.hasCloudData()&&A.enable(),this.providers.push(A)}requestCloseConnection(){}createVariable(A,B){}renameVariable(A,B){}deleteVariable(A){}addProviderOverride(A,B){if(B&&!this.providers.includes(B))throw new Error("Manager is not aware of this provider");this.overrides.set(A,B)}updateVariable(A,B){if(this.overrides.has(A)){const t=this.overrides.get(A);t&&t.handleUpdateVariable(A,B)}else for(const t of this.providers)t.handleUpdateVariable(A,B)}},WebSocketProvider:class{constructor(A,B){this.cloudHosts=Array.isArray(A)?A:[A],this.projectId=B,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 B of A.data.split("\n"))if(B){const A=JSON.parse(B);"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 B=Math.random()*(Math.pow(2,Math.min(this.attemptedConnections+1,5))-1)*1e3;console.log("Connection lost; reconnecting in ".concat(Math.round(B),"ms")),this.reconnectTimeout=setTimeout(this.openConnection,B)}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,B){for(const t of this.bufferedMessages)if(t.name===A)return void(t.value=B);this.bufferedWriteToServer({method:"set",name:A,value:B})}},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,B){this.variables[A]=B,this.storeToLocalStorage()}}},u=t(104),l=t.n(u),d=t(53),U={insert:A=>{var B=document.head||document.body||document.documentElement;B.insertBefore(A,B.firstChild)},singleton:!1},N=(l()(d.a,U),d.a.locals||{});const m=A=>new Promise((B,t)=>{const e=new FileReader;e.onload=()=>B(e.result),e.onerror=()=>t(new Error("Cannot read as text: ".concat(e.error))),e.readAsText(A)});var G=class{constructor(A,B){this.el=A,this.callback=B,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(N.dropping))}ondragleave(A){A.preventDefault(),this.el.classList.remove(N.dropping)}ondrop(A){A.preventDefault(),this.el.classList.remove(N.dropping),A.dataTransfer.types.includes("Files")&&A.dataTransfer.files.length>0&&Promise.all(Array.from(A.dataTransfer.files).map(m)).then(A=>{this.callback(A)})}};var f=class{constructor(A,B){this.parent=A,this.text=B,this.root=document.createElement("div"),this.root.className=N.questionRoot,this.inner=document.createElement("div"),this.inner.className=N.questionInner,B&&(this.textElement=document.createElement("div"),this.textElement.textContent=B,this.textElement.className=N.questionText),this.inputContainer=document.createElement("div"),this.inputContainer.className=N.questionInputOuter,this.input=document.createElement("input"),this.input.className=N.questionInput,this.input.addEventListener("keypress",this.onkeypress.bind(this)),this.dropper=new G(this.input,this.dropperCallback.bind(this)),this.submitButton=document.createElement("button"),this.submitButton.className=N.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 B=A.join("").replace(/\r?\n/g," ");this.input.value=B}onsubmitpressclick(){this.submit()}destroy(){this.root.remove(),this.parent.question=null}};var H=class{constructor(A){this.parent=A,this.root=document.createElement("div"),this.root.className=N.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 B=document.createElement("button");B.className=N.contextMenuItem,B.textContent=A.text,B.addEventListener("click",()=>{this.destroy(),A.callback()}),B.addEventListener("contextmenu",A=>{A.preventDefault()}),this.root.appendChild(B)}show(A){document.addEventListener("mousedown",this._onmousedown),window.addEventListener("resize",this._onresize),window.addEventListener("blur",this._onblur),this.parent._addLayer(this.root);const B=this.parent.layersRect,t=this.root.getBoundingClientRect();let e=A.clientX-B.left,g=A.clientY-B.top;e+t.width>B.width&&(e-=t.width),g+t.height>B.height&&(g-=t.height),this.root.style.transform="translate(".concat(e,"px, ").concat(g,"px)"),getComputedStyle(this.root).opacity,this.root.style.opacity="1"}destroy(){document.removeEventListener("mousedown",this._onmousedown),window.removeEventListener("resize",this._onresize),window.removeEventListener("blur",this._onblur),this.root.style.opacity="0",this.root.style.pointerEvents="none",setTimeout(()=>{this.root.remove()},200)}};var R=(A,B)=>{if("undefined"!=typeof ExternalDownloadHelper)return void ExternalDownloadHelper.download(A,B);const t=document.createElement("a");if(document.body.appendChild(t),navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(B,A);else if("download"in HTMLAnchorElement.prototype){const e=window.URL.createObjectURL(B);t.href=e,t.download=A,t.type=B.type,t.click(),window.setTimeout(()=>{document.body.removeChild(t),window.URL.revokeObjectURL(e)},1e3)}else{let A=window.open("","_blank");const t=new FileReader;t.onloadend=function(){A.location.href=t.result,A=null},t.readAsDataURL(B)}};class p{constructor(A,B){this.parent=A,this.id=B.get("id"),this.spriteName=B.get("spriteName"),this.targetId=B.get("targetId"),this.opcode=B.get("opcode"),this.params=B.get("params"),this.root=document.createElement("div"),this.root.className=N.monitorRoot,this.root.setAttribute("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 B=this.params.CURRENTMENU.toLowerCase();"year"===B?A=this.parent.getMessage("var-year"):"month"===B?A=this.parent.getMessage("var-month"):"date"===B?A=this.parent.getMessage("var-date"):"dayofweek"===B?A=this.parent.getMessage("var-day-of-week"):"hour"===B?A=this.parent.getMessage("var-hour"):"minute"===B?A=this.parent.getMessage("var-minute"):"second"===B&&(A=this.parent.getMessage("var-second"))}else{const B=this.parent.vm.runtime.getLabelForOpcode(this.opcode);A=B?B.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 y extends p{constructor(A,B){super(A,B),this.mode=B.get("mode"),"large"===this.mode?(this.valueElement=document.createElement("div"),this.valueElement.className=N.monitorLargeValue+" "+N.monitorValueColor,this.root.appendChild(this.valueElement)):(this.inner=document.createElement("div"),this.inner.className=N.monitorInner,this.valueRow=document.createElement("div"),this.valueRow.className=N.monitorRow,this.label=document.createElement("div"),this.label.className=N.monitorLabel,this.label.textContent=this.getLabel(),this.valueElement=document.createElement("div"),this.valueElement.className=N.monitorValue+" "+N.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=N.monitorRow,this.slider=document.createElement("input"),this.slider.className=N.monitorSlider,this.slider.type="range",this.slider.min=B.get("sliderMin"),this.slider.max=B.get("sliderMax"),this.slider.step=B.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 B=this.getVmVariable();if(B.value=A,B.isCloud){this.parent.vm.runtime.ioDevices.cloud.requestUpdateVariable(B.name,B.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 B=A.get("value");"number"==typeof B&&(B=Number(B.toFixed(6))),this._value!==B&&(this._value=B,this.valueElement.textContent=B,this.slider&&(this.slider.value=B))}}class J{constructor(A){this.monitor=A,this.index=-1,this.value="",this.locked=!1,this.root=document.createElement("label"),this.root.className=N.monitorRowRoot,this.indexEl=document.createElement("div"),this.indexEl.className=N.monitorRowIndex,this.valueOuter=document.createElement("div"),this.valueOuter.className=N.monitorRowValueOuter,this.editable=this.monitor.editable,this.editable?(this.valueInner=document.createElement("input"),this.valueInner.tabIndex=-1,this.valueInner.className=N.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=N.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=N.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(N.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 B=this.index;"ArrowUp"===A.key||"Tab"===A.key&&A.shiftKey?(B--,B<0&&(B=this.monitor.value.length-1)):(B++,B>=this.monitor.value.length&&(B=0)),this.monitor.tryToFocusRow(B)}}_onclickdelete(A){A.preventDefault(),this.deleteValue=!0,this.valueInner.blur()}_oncontextmenu(A){this.locked?A.stopPropagation():A.preventDefault()}_oncontextmenuuneditable(A){const B=getSelection();this.valueInner.contains(B.anchorNode)&&!B.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(N.monitorRowValueEditing))}}class k extends p{constructor(A,B){super(A,B),this.editable=A.editableLists,this.rows=new Map,this.cachedRows=[],this.scrollTop=0,this.oldLength=-1,this.label=document.createElement("div"),this.label.className=N.monitorListLabel,this.label.textContent=this.getLabel(),this.footer=document.createElement("div"),this.footer.className=N.monitorListFooter,this.footerText=document.createElement("div"),this.footerText.className=N.monitorListFooterText,this.rowsOuter=document.createElement("div"),this.rowsOuter.className=N.monitorRowsOuter,this.rowsInner=document.createElement("div"),this.rowsInner.className=N.monitorRowsInner,this.rowsInner.addEventListener("scroll",this._onscroll.bind(this),{passive:!0}),this.endPoint=document.createElement("div"),this.endPoint.className=N.monitorRowsEndpoint,this.emptyLabel=document.createElement("div"),this.emptyLabel.textContent=A.getMessage("list-empty"),this.emptyLabel.className=N.monitorEmpty,this.editable&&(this.addButton=document.createElement("button"),this.addButton.className=N.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 G(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 B=A.target.files;if(0===B.length)return;const t=B[0];m(t).then(A=>this.import(A))}),A.click()}import(A){const B=A.split(/\r?\n/);this.setValue(B)}handleExport(){const A=this.getValue().join("\n"),B=new Blob([A],{type:"text/plain"});R("".concat(this.getLabel(),".txt"),B)}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 B=this.cachedRows.pop()||new J(this);B.setIndex(A),B.setValue(this.value[A]),this.rows.set(A,B);let t=!1;for(const e of this.rowsInner.children){const g=e.dataset.index;if(!g)continue;if(+g>A){this.rowsInner.insertBefore(B.root,e),t=!0;break}}return t||this.rowsInner.appendChild(B.root),B}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 B=Math.floor(this.scrollTop/24)-5;B<0&&(B=0);let t=Math.ceil((this.scrollTop+this.height)/24)+3;t>A.length-1&&(t=A.length-1);for(const e of this.rows.keys())if(et){const B=this.rows.get(e);(!B.locked||e>=A.length)&&(B.unfocus(),B.root.remove(),this.rows.delete(e),this.cachedRows.length<10&&this.cachedRows.push(B))}for(let e=B;e<=t;e++){const B=this.rows.get(e);B?B.setValue(A[e]):this.createRow(e)}}}var T=class{constructor(){this.hasItem=!1,this.root=document.createElement("div"),this.root.className=N.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 j=A=>"number"==typeof A||"string"==typeof A||"boolean"==typeof A;var x=t(108);const S=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},b=A=>"function"==typeof A?A:()=>A;class z extends class{constructor(){this._events={}}addEventListener(A,B){this._events[A]||(this._events[A]=[]),this._events[A].push(B)}removeEventListener(A,B){const t=this._events[A];t&&(this._events[A]=t.filter(A=>A!==B))}dispatchEvent(A){const B=this._events[A.type];if(B)for(const t of B)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=x,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=N.root,this._layers=document.createElement("div"),this._layers.className=N.layers,this._root.appendChild(this._layers),this._canvas=document.createElement("canvas"),this._canvas.className=N.canvas,this._addLayer(this._canvas),this._overlays=document.createElement("div"),this._overlays.className=N.scaledOverlaysInner,this._overlaysOuter=document.createElement("div"),this._overlaysOuter.className=N.scaledOverlaysOuter,this._overlaysOuter.appendChild(this._overlays),this._addLayer(this._overlaysOuter),this._monitorOverlay=document.createElement("div"),this._monitorOverlay.className=N.monitorOverlay,this._overlays.appendChild(this._monitorOverlay),this._topControls=new T,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,B){return{x:this.width/this.layersRect.width*(A-this.layersRect.width/2),y:-this.height/this.layersRect.height*(B-this.layersRect.height/2)}}_onmousemove(A){const{x:B,y:t}=S(A),e={x:B-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(e.x-this._mousedownPosition.x,2)+Math.pow(e.y-this._mousedownPosition.y,2))>3&&(this._startDragging(e.x,e.y),this._cancelDragTimeout())}else if(this._draggingId){const A=this._scratchCoordinates(e.x,e.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",e)}_startDragging(A,B){if(this._draggingId)return;const t=this.renderer.pick(A,B);if(null===t)return;const e=this.vm.getTargetIdForDrawableId(t);if(null===e)return;const g=this.vm.runtime.getTargetById(e);g.draggable&&(g.goToFront(),this._draggingId=e,this._draggingStartMousePosition=this._scratchCoordinates(A,B),this._draggingStartSpritePosition={x:g.x,y:g.y},this.vm.startDrag(e))}_cancelDragTimeout(){clearTimeout(this._dragTimeout),this._dragTimeout=null}_onmousedown(A){const{x:B,y:t}=S(A),e={x:B-this.layersRect.left,y:t-this.layersRect.top,button:A.button,canvasWidth:this.layersRect.width,canvasHeight:this.layersRect.height,isDown:!0},g="undefined"!=typeof TouchEvent&&A instanceof TouchEvent;(0===A.button||g)&&(this._dragTimeout=setTimeout(this._startDragging.bind(this,e.x,e.y),400)),g&&(A.preventDefault(),document.activeElement&&document.activeElement.blur&&document.activeElement.blur()),this._mousedownPosition={x:e.x,y:e.y},this.vm.postIOData("mouse",e)}_onmouseup(A){this._cancelDragTimeout();const{x:B,y:t}=S(A),e={x:B-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",e),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 B={deltaX:A.deltaX,deltaY:A.deltaY};this.vm.postIOData("mouseWheel",B)}_onkeydown(A){if(A.target!==document&&A.target!==document.body)return;const B={key:A.key,keyCode:A.keyCode,isDown:!0};this.vm.postIOData("keyboard",B),(32===A.keyCode||A.keyCode>=37&&A.keyCode<=40||8===A.keyCode||222===A.keyCode||191===A.keyCode)&&A.preventDefault()}_onkeyup(A){const B={key:A.key,keyCode:A.keyCode,isDown:!1};this.vm.postIOData("keyboard",B),A.target!==document&&A.target!==document.body&&A.preventDefault()}_onresize(){this.relayout()}relayout(){const A=Math.max(1,this._root.offsetWidth),B=Math.max(1,this._root.offsetHeight),t=this._offsetFromTop+this._topControls.computeHeight(),e=this._offsetFromBottom,g=this._offsetFromLeft,i=this._offsetFromRight,Q=Math.max(1,A-g-i),s=Math.max(1,B-t-e);"dynamic-resize"===this.resizeMode&&(this.vm.setStageSize?(this.width=Q,this.height=s,this.vm.setStageSize(this.width,this.height)):console.warn("dynamic-resize not supported: vm does not implement setStageSize"));let n=Q,r=s;"stretch"!==this.resizeMode&&(n=r/this.height*this.width,n>Q&&(r=Q/this.width*this.height,n=Q));const c=B-r,E=A-n,o=(E-g-i)/2+g-E/2,w=(c-t-e)/2+t-c/2;this._layers.style.transform="translate(".concat(o,"px, ").concat(w,"px)"),this._layers.style.width="".concat(n,"px"),this._layers.style.height="".concat(r,"px"),this._overlays.style.transform="scale(".concat(n/this.width,", ").concat(r/this.height,")"),this.renderer.resize(n,r),this.layersRect=this._layers.getBoundingClientRect()}appendTo(A){A.appendChild(this._root),this.relayout()}setup(){this.vm=new i.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,B)=>{this.width===A&&this.height===B||(this.width=A,this.height=B,this.relayout())}),this.cloudManager=new D.CloudManager(this),this.renderer=new s.a(this._canvas,-this.width/2,this.width/2,-this.height/2,this.height/2),this.vm.attachRenderer(this.renderer),this.storage=new E,this.vm.attachStorage(this.storage),"undefined"!=typeof AudioContext||"undefined"!=typeof webkitAudioContext?(this.audioEngine=new w.a,this.vm.attachAudioEngine(this.audioEngine)):console.warn("AudioContext not supported. Sound will not work."),this.bitmapAdapter=new C.BitmapAdapter,this.vm.attachV2BitmapAdapter(this.bitmapAdapter),this.videoProvider=new F,this.vm.setVideoProvider(this.videoProvider)}async _connectPeripherals(){const A=A=>new Promise(B=>{const t=B=>{const t=Object.keys(B).map(A=>B[A]);if(t.length>0){const B=t[0];console.log("Connecting to peripheral",B),this.vm.connectPeripheral(A,B.peripheralId)}else console.error("No peripherals found for",A);g()},e=()=>{console.error("Peripheral scan timed out for",A),g()},g=()=>{this.vm.removeListener("PERIPHERAL_LIST_UPDATE",t),this.vm.removeListener("PERIPHERAL_SCAN_TIMEOUT",e),B()};this.vm.on("PERIPHERAL_LIST_UPDATE",t),this.vm.on("PERIPHERAL_SCAN_TIMEOUT",e),this.vm.scanForPeripheral(A)});for(const B of Object.keys(this.vm.runtime.peripheralExtensions))await A(B)}_onmonitorsupdate(A){for(const B of A.valueSeq()){const A=B.get("id");if(!this._monitors.has(A)){if(!B.get("visible"))continue;"list"===B.get("mode")?this._monitors.set(A,new k(this,B)):this._monitors.set(A,new y(this,B))}this._monitors.get(A).update(B)}}ask(A){return this._question=new f(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,B){this.cloudManager.addProviderOverride(A,B)}addControlButton(A){let{element:B,where:t}=A;if("top-left"===t)this._topControls.addToStart(B);else{if("top-right"!==t)throw new Error("Unknown 'where': ".concat(t));this._topControls.addToEnd(B)}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,B){const t=this.vm.runtime.getTargetForStage().lookupVariableByNameAndType(A,B);if(!t)throw new Error("Global ".concat(B||"variable"," does not exist: ").concat(A));return t}setExtensionSecurityManager(A){let{getSandboxMode:B,canLoadExtensionFromProject:t}=A;const e=this.vm.extensionManager.securityManager;e?(void 0!==B&&(e.getSandboxMode=b(B)),void 0!==t&&(e.canLoadExtensionFromProject=b(t))):console.warn("setExtensionSecurityManager not supported: there is no security manager")}getVariable(A){return this._lookupVariable(A,"").value}setVariable(A,B){if(!j(B))throw new Error("Invalid variable value");this._lookupVariable(A,"").value=B}getList(A){return this._lookupVariable(A,"list").value}setList(A,B){if(!(A=>{if(!Array.isArray(A))return!1;for(let B=0;B input {\n margin-right: 4px;\n}\n.sa-gamepad-has-controller .sa-gamepad-store-settings {\n display: block;\n}\n'},111:function(module,__webpack_exports__,__webpack_require__){"use strict";const isPromise=e=>!!e&&"function"==typeof e.then,jsValueToScratchValue=e=>"boolean"==typeof e||"number"==typeof e||"string"==typeof e?e:""+e;class UnsafeCloudBehaviorsProvider{enable(){}setEvalValue(e){this.manager.setVariable(this,"☁ eval output",jsValueToScratchValue(e))}setEvalError(e){console.error("Error evaluating ☁ eval",e),this.manager.setVariable(this,"☁ eval error",jsValueToScratchValue(e))}evaluateAsync(js){try{const value=eval(js);isPromise(value)?value.then(e=>this.setEvalValue(e)).catch(e=>this.setEvalError(e)):this.setEvalValue(value)}catch(e){this.setEvalError(e)}}handleUpdateVariable(e,t){"☁ eval"===e&&this.evaluateAsync(t)}}__webpack_exports__.a=function(e){let{scaffolding:t}=e;const n=new UnsafeCloudBehaviorsProvider;t.addCloudProvider(n),t.addCloudProviderOverride("☁ eval",n),t.addCloudProviderOverride("☁ eval output",n),t.addCloudProviderOverride("☁ eval error",n)}},331:function(e,t,n){"use strict";n.r(t);var s=n(6);let r=window.console;const i=[{type:"key",high:"ArrowRight",low:"ArrowLeft",deadZone:.5},{type:"key",high:"ArrowDown",low:"ArrowUp",deadZone:.5}],o=[{type:"key",high:"d",low:"a",deadZone:.5},{type:"key",high:"s",low:"w",deadZone:.5}],a=[{type:"virtual_cursor",high:"+x",low:"-x",sensitivity:.6,deadZone:.2},{type:"virtual_cursor",high:"-y",low:"+y",sensitivity:.6,deadZone:.2}],d=e=>{if("object"!=typeof e||!e)return r.warn("invalid mapping",e),{type:"key",high:null,low:null};const t=Object.assign({},e);if("key"===t.type)void 0===t.deadZone&&(t.deadZone=.5),void 0===t.high&&(t.high=""),void 0===t.low&&(t.low="");else if("mousedown"===t.type)void 0===t.deadZone&&(t.deadZone=.5),void 0===t.button&&(t.button=0);else{if("virtual_cursor"!==t.type)return r.warn("unknown mapping type",t.type),{type:"key",high:null,low:null};void 0===t.high&&(t.high=""),void 0===t.low&&(t.low=""),void 0===t.sensitivity&&(t.sensitivity=10),void 0===t.deadZone&&(t.deadZone=.5)}return t},u=(e,t)=>{for(;e.lengthu([],e),l=e=>({usesArrows:e.has("ArrowUp")||e.has("ArrowDown")||e.has("ArrowRight")||e.has("ArrowLeft"),usesWASD:e.has("w")&&e.has("s")||e.has("a")&&e.has("d")}),h=e=>"".concat(e.id," (").concat(e.index,")");class p{constructor(e,t){this.gamepad=e,this.gamepadLib=t,this.resetMappings()}resetMappings(){this.hints=this.gamepadLib.getHints(),this.buttonMappings=this.getDefaultButtonMappings().map(d),this.axesMappings=this.getDefaultAxisMappings().map(d)}clearMappings(){this.buttonMappings=c(this.gamepad.buttons.length),this.axesMappings=c(this.gamepad.axes.length)}getDefaultButtonMappings(){let e;if(this.hints.importedSettings)e=this.hints.importedSettings.buttons;else{const t=this.hints.usedKeys,n=new Set,{usesArrows:s,usesWASD:r}=l(t);r&&(n.add("w"),n.add("a"),n.add("s"),n.add("d"));const i=["p","q","r"],o=[" ","Enter","e","f","z","x","c",...Array.from(t).filter(e=>1===e.length&&!i.includes(e))],a=e=>{for(const s of e)if(t.has(s)&&!n.has(s))return n.add(s),s;return null},d=()=>a(o),u=()=>a(i),c=()=>s||!r?"ArrowUp":"w",h=()=>s||!r?"ArrowDown":"s",p=()=>s||!r?"ArrowRight":"d",m=()=>s||!r?"ArrowLeft":"a",g=(()=>s&&t.has("ArrowUp")?"ArrowUp":r&&t.has("w")?"w":a(o))();let v=d(),f=d(),y=d();!g||v||f||y||(v=g,f=g,y=g),g&&v&&!f&&!y&&(f=g,y=v),e=[],e[0]={type:"key",high:g},e[1]={type:"key",high:v},e[2]={type:"key",high:f},e[3]={type:"key",high:y},e[4]={type:"mousedown"},e[5]={type:"mousedown"},e[6]={type:"mousedown"},e[7]={type:"mousedown"},e[9]={type:"key",high:u()},e[8]={type:"key",high:u()},e[10]={type:"key",high:null,low:null},e[11]={type:"key",high:null,low:null},e[12]={type:"key",high:c()},e[13]={type:"key",high:h()},e[14]={type:"key",high:m()},e[15]={type:"key",high:p()}}return u(e,this.gamepad.buttons.length)}getDefaultAxisMappings(){let e=[];if(this.hints.importedSettings)e=this.hints.importedSettings.axes;else if(4===this.gamepad.axes.length){const t=this.hints.usedKeys,{usesArrows:n,usesWASD:s}=l(t);s?(e.push(o[0]),e.push(o[1])):n?(e.push(i[0]),e.push(i[1])):(e.push(a[0]),e.push(a[1])),e.push(a[0]),e.push(a[1])}return u(e,this.gamepad.axes.length)}}class m extends s.b{constructor(){super(),this.gamepads=new Map,this.handleConnect=this.handleConnect.bind(this),this.handleDisconnect=this.handleDisconnect.bind(this),this.update=this.update.bind(this),this.animationFrame=null,this.currentTime=null,this.deltaTime=0,this.virtualCursor={x:0,y:0,maxX:1/0,minX:-1/0,maxY:1/0,minY:-1/0,modified:!1},this._editor=null,this.connectCallbacks=[],this.keysPressedThisFrame=new Set,this.oldKeysPressed=new Set,this.mouseButtonsPressedThisFrame=new Set,this.oldMouseDown=new Set,this.addEventHandlers()}addEventHandlers(){window.addEventListener("gamepadconnected",this.handleConnect),window.addEventListener("gamepaddisconnected",this.handleDisconnect)}removeEventHandlers(){window.removeEventListener("gamepadconnected",this.handleConnect),window.removeEventListener("gamepaddisconnected",this.handleDisconnect)}gamepadConnected(){return this.gamepads.size>0?Promise.resolve():new Promise(e=>{this.connectCallbacks.push(e)})}getHints(){return Object.assign({usedKeys:new Set,importedSettings:null,generated:!1},this.getUserHints())}getUserHints(){return{}}resetControls(){for(const e of this.gamepads.values())e.resetMappings()}clearControls(){for(const e of this.gamepads.values())e.clearMappings()}handleConnect(e){for(const e of this.connectCallbacks)e();this.connectCallbacks=[];const t=e.gamepad,n=h(t);r.log("connected",t);const i=new p(t,this);this.gamepads.set(n,i),null===this.animationFrame&&(this.animationFrame=requestAnimationFrame(this.update)),this.dispatchEvent(new s.a("gamepadconnected",{detail:i}))}handleDisconnect(e){const t=e.gamepad,n=h(t);r.log("disconnected",t);const i=this.gamepads.get(n);this.gamepads.delete(n),this.dispatchEvent(new s.a("gamepaddisconnected",{detail:i})),0===this.gamepads.size&&(cancelAnimationFrame(this.animationFrame),this.animationFrame=null,this.currentTime=null)}dispatchKey(e,t){t?this.dispatchEvent(new s.a("keydown",{detail:e})):this.dispatchEvent(new s.a("keyup",{detail:e}))}dispatchMouse(e,t){t?this.dispatchEvent(new s.a("mousedown",{detail:e})):this.dispatchEvent(new s.a("mouseup",{detail:e}))}dispatchMouseMove(e,t){this.dispatchEvent(new s.a("mousemove",{detail:{x:e,y:t}}))}updateButton(e,t){if("key"===t.type)e>=t.deadZone?t.high&&this.keysPressedThisFrame.add(t.high):e<=-t.deadZone&&t.low&&this.keysPressedThisFrame.add(t.low);else if("mousedown"===t.type){Math.abs(e)>=t.deadZone&&this.mouseButtonsPressedThisFrame.add(t.button)}else if("virtual_cursor"===t.type){const n=t.deadZone;let s;if(e>=n&&(s=t.high),e<=-n&&(s=t.low),s){const r=(Math.abs(e)-n)/(1-n),i=r*r*t.sensitivity*this.deltaTime;"+x"===s?this.virtualCursor.x+=i:"-x"===s?this.virtualCursor.x-=i:"+y"===s?this.virtualCursor.y+=i:"-y"===s&&(this.virtualCursor.y-=i),this.virtualCursor.modified=!0}}}update(e){this.oldKeysPressed=this.keysPressedThisFrame,this.oldMouseButtonsPressed=this.mouseButtonsPressedThisFrame,this.keysPressedThisFrame=new Set,this.mouseButtonsPressedThisFrame=new Set,null===this.currentTime?this.deltaTime=0:this.deltaTime=e-this.currentTime,this.deltaTime=Math.max(Math.min(this.deltaTime,1e3),0),this.currentTime=e,this.animationFrame=requestAnimationFrame(this.update);const t=navigator.getGamepads();for(const e of t){if(null===e)continue;const t=h(e),n=this.gamepads.get(t);for(let t=0;tthis.virtualCursor.maxX&&(this.virtualCursor.x=this.virtualCursor.maxX),this.virtualCursor.xthis.virtualCursor.maxY&&(this.virtualCursor.y=this.virtualCursor.maxY),this.virtualCursor.y!navigator.getGamepads||(!(!navigator.userAgent.includes("Firefox")||!navigator.userAgent.includes("Linux"))||!(!navigator.userAgent.includes("Firefox")||!navigator.userAgent.includes("Mac OS"))),m.setConsole=e=>r=e;var g=m;function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function f(e){for(var t=1;t{if(n.editingTarget)return e();n.runtime.once("PROJECT_LOADED",e)});const s=()=>null!==n.runtime._steppingInterval,r=e=>{switch(e){case"right arrow":return"ArrowRight";case"up arrow":return"ArrowUp";case"left arrow":return"ArrowLeft";case"down arrow":return"ArrowDown";case"enter":return"Enter";case"space":return" "}return e.toLowerCase().charAt(0)},i=()=>{const e=[n.runtime.getTargetForStage(),...n.runtime.targets].filter(e=>e.isOriginal).map(e=>e.blocks),t=new Set;for(const n of e)for(const e of Object.values(n._blocks))if("event_whenkeypressed"===e.opcode||"sensing_keyoptions"===e.opcode){if("sensing_keyoptions"===e.opcode&&!e.parent)continue;const n=e.fields.KEY_OPTION.value;t.add(r(n))}return t};g.setConsole(console);const o=new g,a=(()=>{const e=(()=>{const e=n.runtime.getTargetForStage().comments;for(const t of Object.values(e))if(t.text.includes(" // _gamepad_"))return t;return null})();if(!e)return null;const t=e.text.split("\n").find(e=>e.endsWith(" // _gamepad_"));if(!t)return console.warn("Gamepad comment does not contain valid line"),null;const s=t.substr(0,t.length-" // _gamepad_".length);let r;try{if(r=JSON.parse(s),!r||"object"!=typeof r||!Array.isArray(r.buttons)||!Array.isArray(r.axes))throw new Error("Invalid data")}catch(e){return console.warn("Gamepad comment has invalid JSON",e),null}return r})();o.getUserHints=()=>a?{importedSettings:a}:{usedKeys:i()};const d=n.runtime.renderer,u=d._xRight-d._xLeft,c=d._yTop-d._yBottom,l=d.canvas,h=document.createElement("img");let p;h.hidden=!0,h.className="sa-gamepad-cursor",h.src=(e=>{if("/active.png"===e)return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAIAAABvrngfAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAAgSURBVBhXY/z//z8DKmCC0kgAKsQIBhA2FlXEmMXAAAC+2gYLeDM0CAAAAABJRU5ErkJggg==";if("/close.svg"===e)return"data:image/svg+xml;base64,PHN2ZyBkYXRhLW5hbWU9IkxheWVyIDEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDcuNDggNy40OCI+PHBhdGggZD0iTTMuNzQgNi40OFYxTTEgMy43NGg1LjQ4IiBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojZmZmO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2Utd2lkdGg6MnB4Ii8+PC9zdmc+Cg==";if("/cursor.png"===e)return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAIAAABvrngfAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAAVSURBVBhXYyAF/AcDCJsJQpEKGBgAjmQF/WBrfi0AAAAASUVORK5CYII=";if("/dot.svg"===e)return"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4IiBoZWlnaHQ9IjgiIHZpZXdCb3g9IjAgMCAyLjExNyAyLjExNyI+PGNpcmNsZSBjeD0iMS4wNTgiIGN5PSIxLjA1OCIgcj0iMS4wNTgiIGZpbGw9InJlZCIvPjwvc3ZnPgo=";throw new Error("Unknown asset: ".concat(e))})("/cursor.png");const m=e=>{h.hidden=!e,clearTimeout(p),e&&(document.body.classList.add("sa-gamepad-hide-cursor"),p=setTimeout(v,8e3))},v=()=>{m(!1)},y=e=>{m(!0),h.classList.toggle("sa-gamepad-cursor-down",e)};let w;if(document.addEventListener("mousemove",()=>{m(!1),document.body.classList.remove("sa-gamepad-hide-cursor")}),window.ResizeObserver){let e=u,t=c;new ResizeObserver(n=>{for(const s of n)e=s.contentRect.width,t=s.contentRect.height}).observe(l),w=()=>[e,t]}else w=()=>{const e=l.getBoundingClientRect();return[e.width,e.height]};let A=0,b=0;const C=e=>{if(!s())return;const[t,r]=w();n.postIOData("mouse",f(f({},e),{},{canvasWidth:t,canvasHeight:r,x:(A+u/2)*(t/u),y:r/c*(c/2-b)}))},x=(e,t)=>{s()&&n.postIOData("keyboard",{key:e,isDown:t})};t||(o.virtualCursor.maxX=d._xRight,o.virtualCursor.minX=d._xLeft,o.virtualCursor.maxY=d._yTop,o.virtualCursor.minY=d._yBottom),o.addEventListener("keydown",e=>x(e.detail,!0)),o.addEventListener("keyup",e=>x(e.detail,!1)),o.addEventListener("mousedown",e=>{y(!0),C({isDown:!0,button:e.detail})}),o.addEventListener("mouseup",e=>{y(!1),C({isDown:!1,button:e.detail})}),o.addEventListener("mousemove",s=>{const{x:r,y:i}=s.detail;if(t){const t=r-A,s=-(i-b);A=r,b=i;const o=4,a=e.layersRect.width/n.runtime.stageWidth,d=e.layersRect.height/n.runtime.stageHeight;n.pointerLockMove(t*o*a,s*o*d)}else A=r,b=i,((e,t)=>{m(!0);const n=u/2+e-3,s=c/2-t-3;h.style.transform="translate(".concat(n,"px, ").concat(s,"px)")})(A,b),C({})}),t||e._overlays.appendChild(h)},A=n(110),b=n.n(A);var C=e=>{let{scaffolding:t,options:n}=e;w(t,n.pointerlock),(e=>{const t=document.createElement("style");t.textContent=e,document.head.appendChild(t)})(b.a)};var x=e=>{let{scaffolding:t}=e;const n=t._canvas,s=t.vm,r=s.runtime.ioDevices.mouse;let i=!1;const o=(e,n)=>{const{movementX:i,movementY:o}=e,{width:a,height:d}=t.layersRect,u=r._clientX+i,c=r._clientY-o;if(r._clientX=u,r._scratchX=r.runtime.stageWidth*(u/a-.5),r._clientY=c,r._scratchY=r.runtime.stageWidth*(c/d-.5),"boolean"==typeof n){const t={button:e.button,isDown:n};s.postIOData("mouse",t)}};document.addEventListener("mousedown",e=>{n.contains(e.target)&&(e.stopPropagation(),i?o(e,!0):n.requestPointerLock())},!0),document.addEventListener("mouseup",e=>{e.stopPropagation(),i?o(e,!1):n.contains(e.target)&&n.requestPointerLock()},!0),document.addEventListener("mousemove",e=>{e.stopPropagation(),i&&o(e)},!0),t.addEventListener("PROJECT_RUN_START",()=>{i||n.requestPointerLock()}),document.addEventListener("pointerlockchange",()=>{i=document.pointerLockElement===n}),document.addEventListener("pointerlockerror",e=>{console.error("Pointer lock error",e)}),s.pointerLockMove=(e,t)=>{o({movementX:e,movementY:t})};const a=s.runtime._step;s.runtime._step=function(){for(var e=arguments.length,n=new Array(e),s=0;s{try{const t=new URL(e,location.href);return P.includes(t.protocol)}catch(e){return!1}},_=e=>{window.open(e)},E=e=>{location.href=e};class O{enable(){this.manager.setVariable(this,"☁ url",location.href),document.addEventListener("paste",e=>{const t=(e.clipboardData||window.clipboardData).getData("text");this.manager.setVariable(this,"☁ pasted",t)}),this.webSocketProvider=this.manager.providers.find(e=>"function"==typeof e.setProjectId),this.initialProjectId=this.webSocketProvider?this.webSocketProvider.projectId:null}handleUpdateVariable(e,t){if("☁ redirect"===e)k(t)&&((e=>{try{return"data:"===new URL(e,location.href).protocol}catch(e){return!1}})(t)?_(t):E(t));else if("☁ open link"===e)k(t)&&((e=>{try{return"mailto:"===new URL(e,location.href).protocol}catch(e){return!1}})(t)?E(t):_(t));else if("☁ username"===e)this.manager.parent.setUsername(t);else if("☁ set clipboard"===e)navigator.clipboard.writeText(t);else if("☁ room id"===e&&this.webSocketProvider){const e=this.initialProjectId+(t?"-".concat(t):"");this.webSocketProvider.setProjectId(e)}}}var S=n(111);window.ScaffoldingAddons={run:(e,t)=>{const n={scaffolding:e,options:t};t.gamepad&&C(n),t.pointerlock&&x(n),t.specialCloudBehaviors&&function(e){let{scaffolding:t}=e;const n=new O;t.addCloudProvider(n),t.addCloudProviderOverride("☁ url",n),t.addCloudProviderOverride("☁ redirect",n),t.addCloudProviderOverride("☁ open link",n),t.addCloudProviderOverride("☁ username",n),t.addCloudProviderOverride("☁ set clipboard",n),t.addCloudProviderOverride("☁ pasted",n),t.addCloudProviderOverride("☁ room id",n)}(n),t.unsafeCloudBehaviors&&Object(S.a)(n),t.pause&&function(e){let{scaffolding:t}=e;const n=t.vm;let s=!1,r=new WeakMap,i=Promise.resolve();const o=e=>{if(s=e,s){i=i.then(()=>n.runtime.audioEngine.audioContext.suspend()),n.runtime.ioDevices.clock._paused||n.runtime.ioDevices.clock.pause();for(const e of n.runtime.threads)if(!e.updateMonitor&&!r.has(e)){const t={pauseTime:n.runtime.currentMSecs,status:e.status};r.set(e,t),e.status=1}n.runtime.emit("PROJECT_RUN_STOP")}else{i=i.then(()=>n.runtime.audioEngine.audioContext.resume()),n.runtime.ioDevices.clock.resume();const e=Date.now();for(const t of n.runtime.threads){const n=r.get(t);if(n){const s=t.peekStackFrame();if(s&&s.executionContext&&s.executionContext.timer){const t=e-n.pauseTime;s.executionContext.timer.startTime+=t}if(t.timer){const s=e-n.pauseTime;t.timer.startTime+=s}t.status=n.status}}r=new WeakMap}n.emit("P4_PAUSE",s)},a=e=>{if(4===e.status)return;const t=r.get(e);t&&1!==e.status&&(t.status=e.status,e.status=1)},d=n.runtime.sequencer.stepThreads;n.runtime.sequencer.stepThreads=function(){if(s)for(const e of this.runtime.threads)a(e);return d.call(this)};const u=n.runtime.greenFlag;n.runtime.greenFlag=function(){return o(!1),u.call(this)};const c=n.runtime.startHats;n.runtime.startHats=function(){if(s)return[];for(var e=arguments.length,t=new Array(e),n=0;ne!==t))}dispatchEvent(e){const t=this._events[e.type];if(t)for(const n of t)n(e)}}class r{constructor(e,t){this.type=e,this.detail=t?t.detail:{}}}}}); +// fccf43c5cc8f3a112506846b69abfdd434c586d1bdf86385fae8e17cac55cb84 =^..^= - +