mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-25 07:22:33 -05:00
13 lines
No EOL
212 KiB
JavaScript
13 lines
No EOL
212 KiB
JavaScript
!function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){(function(e){t.exports=e.VirtualMachine=r(1)}).call(e,function(){return this}())},function(t,e,r){var n=r(103);t.exports=n},function(t,e){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function i(t){return"number"==typeof t}function o(t){return"object"==typeof t&&null!==t}function s(t){return void 0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!i(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,r,i,a,u,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var p=new Error('Uncaught, unspecified "error" event. ('+e+")");throw p.context=e,p}if(r=this._events[t],s(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),r.apply(this,a)}else if(o(r))for(a=Array.prototype.slice.call(arguments,1),c=r.slice(),i=c.length,u=0;u<i;u++)c[u].apply(this,a);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function r(){this.removeListener(t,r),i||(i=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var i=!1;return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var r,i,s,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],s=r.length,i=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(a=s;a-- >0;)if(r[a]===e||r[a].listener&&r[a].listener===e){i=a;break}if(i<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],n(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,r){(function(t,n){function i(t,r){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&e._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),u(n,t,n.depth)}function o(t,e){var r=i.styles[e];return r?"["+i.colors[r][0]+"m"+t+"["+i.colors[r][1]+"m":t}function s(t,e){return t}function a(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function u(t,r,n){if(t.customInspect&&r&&k(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return b(i)||(i=u(t,i,n)),i}var o=c(t,r);if(o)return o;var s=Object.keys(r),g=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),O(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return p(r);if(0===s.length){if(k(r)){var m=r.name?": "+r.name:"";return t.stylize("[Function"+m+"]","special")}if(S(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return t.stylize(Date.prototype.toString.call(r),"date");if(O(r))return p(r)}var _="",y=!1,v=["{","}"];if(d(r)&&(y=!0,v=["[","]"]),k(r)){var w=r.name?": "+r.name:"";_=" [Function"+w+"]"}if(S(r)&&(_=" "+RegExp.prototype.toString.call(r)),E(r)&&(_=" "+Date.prototype.toUTCString.call(r)),O(r)&&(_=" "+p(r)),0===s.length&&(!y||0==r.length))return v[0]+_+v[1];if(n<0)return S(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var T;return T=y?h(t,r,n,g,s):s.map(function(e){return l(t,r,n,g,e,y)}),t.seen.pop(),f(T,_,v)}function c(t,e){if(w(e))return t.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return y(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}function p(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var o=[],s=0,a=e.length;s<a;++s)R(e,String(s))?o.push(l(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(l(t,e,r,n,i,!0))}),o}function l(t,e,r,n,i,o){var s,a,c;if(c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},c.get?a=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(a=t.stylize("[Setter]","special")),R(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(c.value)<0?(a=m(r)?u(t,c.value,null):u(t,c.value,r-1),a.indexOf("\n")>-1&&(a=o?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n"))):a=t.stylize("[Circular]","special")),w(s)){if(o&&i.match(/^\d+$/))return a;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function f(t,e,r){var n=0,i=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function d(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function m(t){return null===t}function _(t){return null==t}function y(t){return"number"==typeof t}function b(t){return"string"==typeof t}function v(t){return"symbol"==typeof t}function w(t){return void 0===t}function S(t){return T(t)&&"[object RegExp]"===x(t)}function T(t){return"object"==typeof t&&null!==t}function E(t){return T(t)&&"[object Date]"===x(t)}function O(t){return T(t)&&("[object Error]"===x(t)||t instanceof Error)}function k(t){return"function"==typeof t}function N(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function x(t){return Object.prototype.toString.call(t)}function A(t){return t<10?"0"+t.toString(10):t.toString(10)}function I(){var t=new Date,e=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":");return[t.getDate(),D[t.getMonth()],e].join(" ")}function R(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var L=/%[sdj%]/g;e.format=function(t){if(!b(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(L,function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return t}}),a=n[r];r<o;a=n[++r])s+=m(a)||!T(a)?" "+a:" "+i(a);return s},e.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var C,M={};e.debuglog=function(t){if(w(C)&&(C=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!M[t])if(new RegExp("\\b"+t+"\\b","i").test(C)){var r=n.pid;M[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else M[t]=function(){};return M[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=g,e.isNull=m,e.isNullOrUndefined=_,e.isNumber=y,e.isString=b,e.isSymbol=v,e.isUndefined=w,e.isRegExp=S,e.isObject=T,e.isDate=E,e.isError=O,e.isFunction=k,e.isPrimitive=N,e.isBuffer=r(5);var D=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",I(),e.format.apply(e,arguments))},e.inherits=r(6),e._extend=function(t,e){if(!e||!T(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(4))},function(t,e){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(t){if(p===setTimeout)return setTimeout(t,0);if((p===r||!p)&&setTimeout)return p=setTimeout,setTimeout(t,0);try{return p(t,0)}catch(e){try{return p.call(null,t,0)}catch(e){return p.call(this,t,0)}}}function o(t){if(h===clearTimeout)return clearTimeout(t);if((h===n||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function s(){g&&f&&(g=!1,f.length?d=f.concat(d):m=-1,d.length&&a())}function a(){if(!g){var t=i(s);g=!0;for(var e=d.length;e;){for(f=d,d=[];++m<e;)f&&f[m].run();m=-1,e=d.length}f=null,g=!1,o(t)}}function u(t,e){this.fun=t,this.array=e}function c(){}var p,h,l=t.exports={};!function(){try{p="function"==typeof setTimeout?setTimeout:r}catch(t){p=r}try{h="function"==typeof clearTimeout?clearTimeout:n}catch(t){h=n}}();var f,d=[],g=!1,m=-1;l.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];d.push(new u(t,e)),1!==d.length||g||i(a)},u.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=c,l.addListener=c,l.once=c,l.off=c,l.removeListener=c,l.removeAllListeners=c,l.emit=c,l.binding=function(t){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(t){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){var n=r(2),i=r(8),o=r(25),s=r(10),a=r(3),u=r(80),c=r(81),p=r(84),h={scratch3_control:r(86),scratch3_event:r(87),scratch3_looks:r(88),scratch3_motion:r(89),scratch3_operators:r(90),scratch3_pen:r(104),scratch3_sound:r(91),scratch3_sensing:r(92),scratch3_data:r(93),scratch3_procedures:r(94)},l=function(){n.call(this),this.targets=[],this.threads=[],this.sequencer=new i(this),this.flyoutBlocks=new o,this._editingTarget=null,this._primitives={},this._hats={},this._edgeActivatedHatValues={},this._scriptGlowsPreviousFrame=[],this._threadCount=0,this._cloneCounter=0,this.turboMode=!1,this.compatibilityMode=!1,this._steppingInterval=null,this.currentStepTime=null,this.redrawRequested=!1,this._registerBlockPackages(),this.ioDevices={clock:new u,keyboard:new c(this),mouse:new p(this)}};a.inherits(l,n),l.STAGE_WIDTH=480,l.STAGE_HEIGHT=360,l.SCRIPT_GLOW_ON="SCRIPT_GLOW_ON",l.SCRIPT_GLOW_OFF="SCRIPT_GLOW_OFF",l.BLOCK_GLOW_ON="BLOCK_GLOW_ON",l.BLOCK_GLOW_OFF="BLOCK_GLOW_OFF",l.PROJECT_RUN_START="PROJECT_RUN_START",l.PROJECT_RUN_STOP="PROJECT_RUN_STOP",l.VISUAL_REPORT="VISUAL_REPORT",l.SPRITE_INFO_REPORT="SPRITE_INFO_REPORT",l.THREAD_STEP_INTERVAL=1e3/60,l.THREAD_STEP_INTERVAL_COMPATIBILITY=1e3/30,l.MAX_CLONES=300,l.prototype._registerBlockPackages=function(){for(var t in h)if(h.hasOwnProperty(t)){var e=new h[t](this);if(e.getPrimitives){var r=e.getPrimitives();for(var n in r)r.hasOwnProperty(n)&&(this._primitives[n]=r[n].bind(e))}if(e.getHats){var i=e.getHats();for(var o in i)i.hasOwnProperty(o)&&(this._hats[o]=i[o])}}},l.prototype.getOpcodeFunction=function(t){return this._primitives[t]},l.prototype.getIsHat=function(t){return this._hats.hasOwnProperty(t)},l.prototype.getIsEdgeActivatedHat=function(t){return this._hats.hasOwnProperty(t)&&this._hats[t].edgeActivated},l.prototype.updateEdgeActivatedValue=function(t,e){var r=this._edgeActivatedHatValues[t];return this._edgeActivatedHatValues[t]=e,r},l.prototype.clearEdgeActivatedValues=function(){this._edgeActivatedHatValues={}},l.prototype.attachRenderer=function(t){this.renderer=t},l.prototype.attachAudioEngine=function(t){this.audioEngine=t},l.prototype._pushThread=function(t,e){var r=new s(t);return r.target=e,r.pushStack(t),this.threads.push(r),r},l.prototype._removeThread=function(t){this.sequencer.retireThread(t);var e=this.threads.indexOf(t);e>-1&&this.threads.splice(e,1)},l.prototype._restartThread=function(t){var e=new s(t.topBlock);e.target=t.target,e.pushStack(t.topBlock);var r=this.threads.indexOf(t);r>-1?this.threads[r]=e:this.threads.push(t)},l.prototype.isActiveThread=function(t){return this.threads.indexOf(t)>-1},l.prototype.toggleScript=function(t){for(var e=0;e<this.threads.length;e++)if(this.threads[e].topBlock===t)return void this._removeThread(this.threads[e]);this._pushThread(t,this._editingTarget)},l.prototype.allScriptsDo=function(t,e){var r=this.targets;e&&(r=[e]);for(var n=0;n<r.length;n++)for(var i=r[n],o=i.blocks.getScripts(),s=0;s<o.length;s++){var a=o[s];t(a,i)}},l.prototype.startHats=function(t,e,r){if(this._hats.hasOwnProperty(t)){var n=this,i=[];return this.allScriptsDo(function(r,o){var s=o.blocks.getBlock(r).opcode;if(s===t){var a=o.blocks.getFields(r);if(0===Object.keys(a).length){var u=o.blocks.getInputs(r);for(var c in u){var p=u[c].block,h=o.blocks.getFields(p);a=Object.assign(h,a)}}if(e)for(var l in e)if(a[l].value!==e[l])return;var f=n._hats[t];if(f.restartExistingThreads){for(var d=0;d<n.threads.length;d++)if(n.threads[d].topBlock===r&&n.threads[d].target===o)return void n._restartThread(n.threads[d])}else for(var g=0;g<n.threads.length;g++)if(n.threads[g].topBlock===r&&n.threads[g].target===o)return;i.push(n._pushThread(r,o))}},r),i}},l.prototype.dispose=function(){this.stopAll(),this.targets.map(this.disposeTarget,this)},l.prototype.disposeTarget=function(t){this.targets=this.targets.filter(function(e){return t!==e||(e.dispose(),!1)})},l.prototype.stopForTarget=function(t,e){for(var r=0;r<this.threads.length;r++)this.threads[r]!==e&&this.threads[r].target===t&&this._removeThread(this.threads[r])},l.prototype.greenFlag=function(){this.stopAll(),this.ioDevices.clock.resetProjectTimer(),this.clearEdgeActivatedValues();for(var t=0;t<this.targets.length;t++)this.targets[t].onGreenFlag();this.startHats("event_whenflagclicked")},l.prototype.stopAll=function(){for(var t=[],e=0;e<this.targets.length;e++)this.targets[e].onStopAll(),this.targets[e].hasOwnProperty("isOriginal")&&!this.targets[e].isOriginal?this.targets[e].dispose():t.push(this.targets[e]);this.targets=t;for(var r=this.threads.slice();r.length>0;){var n=r.pop();this._removeThread(n)}},l.prototype._step=function(){for(var t in this._hats){var e=this._hats[t];e.edgeActivated&&this.startHats(t)}this.redrawRequested=!1;var r=this.sequencer.stepThreads();this._updateGlows(r),this._setThreadCount(this.threads.length+r.length),this.renderer&&this.renderer.draw()},l.prototype.setEditingTarget=function(t){this._editingTarget=t,this._scriptGlowsPreviousFrame=[],this._updateGlows(),this.spriteInfoReport(t)},l.prototype.setCompatibilityMode=function(t){this.compatibilityMode=t,this._steppingInterval&&(clearInterval(this._steppingInterval),this.start())},l.prototype._updateGlows=function(t){var e=[];e.push.apply(e,this.threads),t&&e.push.apply(e,t);for(var r=[],n=[],i=0;i<e.length;i++){var o=e[i],s=o.target;if(s===this._editingTarget){var a=o.blockGlowInFrame;if(o.requestScriptGlowInFrame){var u=s.blocks.getTopLevelScript(a);u||(u=this.flyoutBlocks.getTopLevelScript(a)),u&&r.push(u)}}}for(var c=0;c<this._scriptGlowsPreviousFrame.length;c++){var p=this._scriptGlowsPreviousFrame[c];r.indexOf(p)<0?this.glowScript(p,!1):n.push(p)}for(var h=0;h<r.length;h++){var l=r[h];this._scriptGlowsPreviousFrame.indexOf(l)<0&&(this.glowScript(l,!0),n.push(l))}this._scriptGlowsPreviousFrame=n},l.prototype._setThreadCount=function(t){0===this._threadCount&&t>0&&this.emit(l.PROJECT_RUN_START),this._threadCount>0&&0===t&&this.emit(l.PROJECT_RUN_STOP),this._threadCount=t},l.prototype.quietGlow=function(t){var e=this._scriptGlowsPreviousFrame.indexOf(t);e>-1&&this._scriptGlowsPreviousFrame.splice(e,1)},l.prototype.glowBlock=function(t,e){e?this.emit(l.BLOCK_GLOW_ON,{id:t}):this.emit(l.BLOCK_GLOW_OFF,{id:t})},l.prototype.glowScript=function(t,e){e?this.emit(l.SCRIPT_GLOW_ON,{id:t}):this.emit(l.SCRIPT_GLOW_OFF,{id:t})},l.prototype.visualReport=function(t,e){this.emit(l.VISUAL_REPORT,{id:t,value:String(e)})},l.prototype.spriteInfoReport=function(t){t.isOriginal&&this.emit(l.SPRITE_INFO_REPORT,t.toJSON())},l.prototype.getTargetById=function(t){for(var e=0;e<this.targets.length;e++){var r=this.targets[e];if(r.id===t)return r}},l.prototype.getSpriteTargetByName=function(t){for(var e=0;e<this.targets.length;e++){var r=this.targets[e];if(r.sprite&&r.sprite.name===t)return r}},l.prototype.changeCloneCounter=function(t){this._cloneCounter+=t},l.prototype.clonesAvailable=function(){return this._cloneCounter<l.MAX_CLONES},l.prototype.getTargetForStage=function(){for(var t=0;t<this.targets.length;t++){var e=this.targets[t];if(e.isStage)return e}},l.prototype.requestRedraw=function(){this.redrawRequested=!0},l.prototype.start=function(){var t=l.THREAD_STEP_INTERVAL;this.compatibilityMode&&(t=l.THREAD_STEP_INTERVAL_COMPATIBILITY),this.currentStepTime=t,this._steppingInterval=setInterval(function(){this._step()}.bind(this),t)},t.exports=l},function(t,e,r){var n=r(9),i=r(10),o=r(11),s=function(t){this.timer=new n,this.runtime=t};s.WARP_TIME=500,s.prototype.stepThreads=function(){var t=.75*this.runtime.currentStepTime;this.timer.start();for(var e=1/0,r=!1,n=[];this.runtime.threads.length>0&&e>0&&this.timer.timeElapsed()<t&&(this.runtime.turboMode||!this.runtime.redrawRequested);){e=0;for(var o=0;o<this.runtime.threads.length;o++){var s=this.runtime.threads[o];0!==s.stack.length&&s.status!==i.STATUS_DONE?(s.status!==i.STATUS_YIELD_TICK||r||(s.status=i.STATUS_RUNNING),s.status!==i.STATUS_RUNNING&&s.status!==i.STATUS_YIELD||(this.stepThread(s),s.warpTimer=null),s.status===i.STATUS_RUNNING&&e++):n.indexOf(s)<0&&n.push(s)}r=!0}return this.runtime.threads=this.runtime.threads.filter(function(t){return!(n.indexOf(t)>-1)}),n},s.prototype.stepThread=function(t){var e=t.peekStack();for(e||t.popStack();t.peekStack();){var r=t.peekStackFrame().warpMode;if(r&&!t.warpTimer&&(t.warpTimer=new n,t.warpTimer.start()),e=t.peekStack(),o(this,t),t.blockGlowInFrame=e,t.status===i.STATUS_YIELD){if(t.status=i.STATUS_RUNNING,r&&t.warpTimer.timeElapsed()<=s.WARP_TIME)continue;return}if(t.status===i.STATUS_PROMISE_WAIT)return;for(t.peekStack()===e&&t.goToNextBlock();!t.peekStack();){if(t.popStack(),0===t.stack.length)return void(t.status=i.STATUS_DONE);var a=t.peekStackFrame();if(r=a.warpMode,a.isLoop){if(!r||t.warpTimer.timeElapsed()>s.WARP_TIME)return}else{if(a.waitingReporter)return;t.goToNextBlock()}}}},s.prototype.stepToBranch=function(t,e,r){e||(e=1);var n=t.peekStack(),i=t.target.blocks.getBranch(n,e);t.peekStackFrame().isLoop=r,i?t.pushStack(i):t.pushStack(null)},s.prototype.stepToProcedure=function(t,e){var r=t.target.blocks.getProcedureDefinition(e);if(r){var n=t.isRecursiveCall(e);if(t.pushStack(r),t.peekStackFrame().warpMode&&t.warpTimer.timeElapsed()>s.WARP_TIME)t.status=i.STATUS_YIELD;else{var o=t.target.blocks.getBlock(r),a=o.mutation.warp;a?t.peekStackFrame().warpMode=!0:n&&(t.status=i.STATUS_YIELD)}}},s.prototype.retireThread=function(t){t.stack=[],t.stackFrame=[],t.requestScriptGlowInFrame=!1,t.status=i.STATUS_DONE},t.exports=s},function(t,e){var r=function(){};r.prototype.startTime=0,r.prototype.time=function(){return Date.now?Date.now():(new Date).getTime()},r.prototype.relativeTime=function(){return"undefined"!=typeof self&&self.performance&&"now"in self.performance?self.performance.now():this.time()},r.prototype.start=function(){this.startTime=this.relativeTime()},r.prototype.timeElapsed=function(){return this.relativeTime()-this.startTime},t.exports=r},function(t,e){var r=function(t){this.topBlock=t,this.stack=[],this.stackFrames=[],this.status=0,this.target=null,this.requestScriptGlowInFrame=!1,this.blockGlowInFrame=null,this.warpTimer=null};r.STATUS_RUNNING=0,r.STATUS_PROMISE_WAIT=1,r.STATUS_YIELD=2,r.STATUS_YIELD_TICK=3,r.STATUS_DONE=4,r.prototype.pushStack=function(t){if(this.stack.push(t),this.stack.length>this.stackFrames.length){var e=!1;this.stackFrames[this.stackFrames.length-1]&&(e=this.stackFrames[this.stackFrames.length-1].warpMode),this.stackFrames.push({isLoop:!1,warpMode:e,reported:{},waitingReporter:null,params:{},executionContext:{}})}},r.prototype.popStack=function(){return this.stackFrames.pop(),this.stack.pop()},r.prototype.peekStack=function(){return this.stack[this.stack.length-1]},r.prototype.peekStackFrame=function(){return this.stackFrames[this.stackFrames.length-1]},r.prototype.peekParentStackFrame=function(){return this.stackFrames[this.stackFrames.length-2]},r.prototype.pushReportedValue=function(t){var e=this.peekParentStackFrame();if(e){var r=e.waitingReporter;e.reported[r]=t}},r.prototype.pushParam=function(t,e){var r=this.peekStackFrame();r.params[t]=e},r.prototype.getParam=function(t){for(var e=this.stackFrames.length-1;e>=0;e--){var r=this.stackFrames[e];if(r.params.hasOwnProperty(t))return r.params[t]}return null},r.prototype.atStackTop=function(){return this.peekStack()===this.topBlock},r.prototype.goToNextBlock=function(){var t=this.target.blocks.getNextBlock(this.peekStack()),e=this.peekStackFrame().warpMode;this.popStack(),this.pushStack(t),this.peekStackFrame()&&(this.peekStackFrame().warpMode=e)},r.prototype.isRecursiveCall=function(t){for(var e=5,r=this.stack.length-1,n=r-1;n>=0;n--){var i=this.target.blocks.getBlock(this.stack[n]);if("procedures_callnoreturn"===i.opcode&&i.mutation.proccode===t)return!0;if(--e<0)return!1}return!1},t.exports=r},function(t,e,r){var n=r(12),i=r(10),o=function(t){return t&&t.then&&"function"==typeof t.then},s=function(t,e){var r=t.runtime,a=e.target,u=e.peekStack(),c=e.peekStackFrame(),p="undefined"!=typeof a.blocks.getBlock(u),h="undefined"!=typeof r.flyoutBlocks.getBlock(u);if(!a||!p&&!h)return void t.retireThread(e);var l=null;l=p?a.blocks:r.flyoutBlocks;var f=l.getOpcode(u),d=l.getFields(u),g=l.getInputs(u),m=r.getOpcodeFunction(f),_=r.getIsHat(f);if(!f)return void n.warn("Could not get opcode for block: "+u);var y=function(n){if(e.pushReportedValue(n),_)if(r.getIsEdgeActivatedHat(f)){var o=r.updateEdgeActivatedValue(u,n),s=!o&&n;s||t.retireThread(e)}else n||t.retireThread(e);else"undefined"!=typeof n&&e.atStackTop()&&r.visualReport(u,n),e.status=i.STATUS_RUNNING};if(!m){if(_)return;if(1===Object.keys(d).length&&0===Object.keys(g).length)for(var b in d)y(d[b].value);else n.warn("Could not get implementation for opcode: "+f);return void(e.requestScriptGlowInFrame=!0)}var v={};for(var w in d)v[w]=d[w].value;for(var S in g){var T=g[S],E=T.block;if("undefined"==typeof c.reported[S]&&E){if(e.pushStack(E),c.waitingReporter=S,s(t,e),e.status===i.STATUS_PROMISE_WAIT)return;c.waitingReporter=null,e.popStack()}v[S]=c.reported[S]}var O=l.getMutation(u);O&&(v.mutation=O),c.reported={};var k=null;k=m(v,{stackFrame:c.executionContext,target:a,"yield":function(){e.status=i.STATUS_YIELD},startBranch:function(r,n){t.stepToBranch(e,r,n)},stopAll:function(){r.stopAll()},stopOtherTargetThreads:function(){r.stopForTarget(a,e)},stopThread:function(){t.retireThread(e)},startProcedure:function(r){t.stepToProcedure(e,r)},getProcedureParamNames:function(t){return l.getProcedureParamNames(t)},pushParam:function(t,r){e.pushParam(t,r)},getParam:function(t){return e.getParam(t)},startHats:function(t,e,n){return r.startHats(t,e,n)},ioQuery:function(t,e,n){if(r.ioDevices[t]&&r.ioDevices[t][e]){var i=r.ioDevices[t];return i[e].call(i,n)}}}),"undefined"==typeof k&&(e.requestScriptGlowInFrame=!0),o(k)?(e.status===i.STATUS_RUNNING&&(e.status=i.STATUS_PROMISE_WAIT),k.then(function(t){if(y(t),"undefined"==typeof t){var r=e.popStack(),n=e.target.blocks.getNextBlock(r);e.pushStack(n)}else e.popStack()},function(t){n.warn("Primitive rejected promise: ",t),e.status=i.STATUS_RUNNING,e.popStack()})):e.status===i.STATUS_RUNNING&&y(k)};t.exports=s},function(t,e,r){var n=r(13);n.enable(),t.exports=n("vm")},function(t,e,r){var n=r(14),i=n.enable,o=n.disable,s="undefined"!=typeof navigator&&/chrome/i.test(navigator.userAgent),a=r(18);if(n.defaultBackend=s?a.minilog:a,"undefined"!=typeof window){try{n.enable(JSON.parse(window.localStorage.minilogSettings))}catch(u){}if(window.location&&window.location.search){var c=RegExp("[?&]minilog=([^&]*)").exec(window.location.search);c&&n.enable(decodeURIComponent(c[1]))}}n.enable=function(){i.call(n,!0);try{window.localStorage.minilogSettings=JSON.stringify(!0)}catch(t){}return this},n.disable=function(){o.call(n);try{delete window.localStorage.minilogSettings}catch(t){}return this},e=t.exports=n,e.backends={array:r(22),browser:n.defaultBackend,localStorage:r(23),jQuery:r(24)}},function(t,e,r){var n=r(15),i=r(17),o=new n,s=Array.prototype.slice;e=t.exports=function(t){var r=function(){return o.write(t,void 0,s.call(arguments)),r};return r.debug=function(){return o.write(t,"debug",s.call(arguments)),r},r.info=function(){return o.write(t,"info",s.call(arguments)),r},r.warn=function(){return o.write(t,"warn",s.call(arguments)),r},r.error=function(){return o.write(t,"error",s.call(arguments)),r},r.log=r.debug,r.suggest=e.suggest,r.format=o.format,r},e.defaultBackend=e.defaultFormatter=null,e.pipe=function(t){return o.pipe(t)},e.end=e.unpipe=e.disable=function(t){return o.unpipe(t)},e.Transform=n,e.Filter=i,e.suggest=new i,e.enable=function(){return e.defaultFormatter?o.pipe(e.suggest).pipe(e.defaultFormatter).pipe(e.defaultBackend):o.pipe(e.suggest).pipe(e.defaultBackend)}},function(t,e,r){function n(){}var i=r(16);i.mixin(n),n.prototype.write=function(t,e,r){this.emit("item",t,e,r)},n.prototype.end=function(){this.emit("end"),this.removeAllListeners()},n.prototype.pipe=function(t){function e(){t.write.apply(t,Array.prototype.slice.call(arguments))}function r(){!t._isStdio&&t.end()}var n=this;return n.emit("unpipe",t),t.emit("pipe",n),n.on("item",e),n.on("end",r),n.when("unpipe",function(i){var o=i===t||"undefined"==typeof i;return o&&(n.removeListener("item",e),n.removeListener("end",r),t.emit("unpipe")),o}),t},n.prototype.unpipe=function(t){return this.emit("unpipe",t),this},n.prototype.format=function(t){throw new Error(["Warning: .format() is deprecated in Minilog v2! Use .pipe() instead. For example:","var Minilog = require('minilog');","Minilog"," .pipe(Minilog.backends.console.formatClean)"," .pipe(Minilog.backends.console);"].join("\n"))},n.mixin=function(t){var e,r=n.prototype;for(e in r)r.hasOwnProperty(e)&&(t.prototype[e]=r[e])},t.exports=n},function(t,e){function r(){this._events={}}r.prototype={on:function(t,e){this._events||(this._events={});var r=this._events;return(r[t]||(r[t]=[])).push(e),this},removeListener:function(t,e){var r,n=this._events[t]||[];for(r=n.length-1;r>=0&&n[r];r--)n[r]!==e&&n[r].cb!==e||n.splice(r,1)},removeAllListeners:function(t){t?this._events[t]&&(this._events[t]=[]):this._events={}},emit:function(t){this._events||(this._events={});var e,r=Array.prototype.slice.call(arguments,1),n=this._events[t]||[];for(e=n.length-1;e>=0&&n[e];e--)n[e].apply(this,r);return this},when:function(t,e){return this.once(t,e,!0)},once:function(t,e,r){function n(){r||this.removeListener(t,n),e.apply(this,arguments)&&r&&this.removeListener(t,n)}return e?(n.cb=e,this.on(t,n),this):this}},r.mixin=function(t){var e,n=r.prototype;for(e in n)n.hasOwnProperty(e)&&(t.prototype[e]=n[e])},t.exports=r},function(t,e,r){function n(){this.enabled=!0,this.defaultResult=!0,this.clear()}function i(t,e){return t.n.test?t.n.test(e):t.n==e}var o=r(15),s={debug:1,info:2,warn:3,error:4};o.mixin(n),n.prototype.allow=function(t,e){return this._white.push({n:t,l:s[e]}),this},n.prototype.deny=function(t,e){return this._black.push({n:t,l:s[e]}),this},n.prototype.clear=function(){return this._white=[],this._black=[],this},n.prototype.test=function(t,e){var r,n=Math.max(this._white.length,this._black.length);for(r=0;r<n;r++){if(this._white[r]&&i(this._white[r],t)&&s[e]>=this._white[r].l)return!0;if(this._black[r]&&i(this._black[r],t)&&s[e]<this._black[r].l)return!1}return this.defaultResult},n.prototype.write=function(t,e,r){if(!this.enabled||this.test(t,e))return this.emit("item",t,e,r)},t.exports=n},function(t,e,r){var n=r(15),i=/\n+$/,o=new n;o.write=function(t,e,r){var n=r.length-1;if("undefined"!=typeof console&&console.log){if(console.log.apply)return console.log.apply(console,[t,e].concat(r));if(JSON&&JSON.stringify){r[n]&&"string"==typeof r[n]&&(r[n]=r[n].replace(i,""));try{for(n=0;n<r.length;n++)r[n]=JSON.stringify(r[n])}catch(o){}console.log(r.join(" "))}}},o.formatters=["color","minilog"],o.color=r(19),o.minilog=r(21),t.exports=o},function(t,e,r){var n=r(15),i=r(20),o={debug:["cyan"],info:["purple"],warn:["yellow",!0],error:["red",!0]},s=new n;s.write=function(t,e,r){var n=console.log;console[e]&&console[e].apply&&(n=console[e],n.apply(console,["%c"+t+" %c"+e,i("gray"),i.apply(i,o[e])].concat(r)))},s.pipe=function(){},t.exports=s},function(t,e){function r(t,e){return e?"color: #fff; background: "+n[t]+";":"color: "+n[t]+";"}var n={black:"#000",red:"#c23621",green:"#25bc26",yellow:"#bbbb00",blue:"#492ee1",magenta:"#d338d3",cyan:"#33bbc8",gray:"#808080",purple:"#708"};t.exports=r},function(t,e,r){var n=r(15),i=r(20),o={debug:["gray"],info:["purple"],warn:["yellow",!0],error:["red",!0]},s=new n;s.write=function(t,e,r){var n=console.log;"debug"!=e&&console[e]&&(n=console[e]);var s=0;if("info"!=e){for(;s<r.length&&"string"==typeof r[s];s++);n.apply(console,["%c"+t+" "+r.slice(0,s).join(" "),i.apply(i,o[e])].concat(r.slice(s)))}else n.apply(console,["%c"+t,i.apply(i,o[e])].concat(r))},s.pipe=function(){},t.exports=s},function(t,e,r){var n=r(15),i=[],o=new n;o.write=function(t,e,r){
|
||
i.push([t,e,r])},o.get=function(){return i},o.empty=function(){i=[]},t.exports=o},function(t,e,r){var n=r(15),i=!1,o=new n;o.write=function(t,e,r){if("undefined"!=typeof window&&"undefined"!=typeof JSON&&JSON.stringify&&JSON.parse)try{i||(i=window.localStorage.minilog?JSON.parse(window.localStorage.minilog):[]),i.push([(new Date).toString(),t,e,r]),window.localStorage.minilog=JSON.stringify(i)}catch(n){}},t.exports=o},function(t,e,r){function n(t){this.url=t.url||"",this.cache=[],this.timer=null,this.interval=t.interval||3e4,this.enabled=!0,this.jQuery=window.jQuery,this.extras={}}var i=r(15),o=(new Date).valueOf().toString(36);i.mixin(n),n.prototype.write=function(t,e,r){this.timer||this.init(),this.cache.push([t,e].concat(r))},n.prototype.init=function(){if(this.enabled&&this.jQuery){var t=this;this.timer=setTimeout(function(){var e,r,n=[],i=t.url;if(0==t.cache.length)return t.init();for(e=0;e<t.cache.length;e++)try{JSON.stringify(t.cache[e]),n.push(t.cache[e])}catch(s){}t.jQuery.isEmptyObject(t.extras)?(r=JSON.stringify({logs:n}),i=t.url+"?client_id="+o):r=JSON.stringify(t.jQuery.extend({logs:n},t.extras)),t.jQuery.ajax(i,{type:"POST",cache:!1,processData:!1,data:r,contentType:"application/json",timeout:1e4}).success(function(e,r,n){e.interval&&(t.interval=Math.max(1e3,e.interval))}).error(function(){t.interval=3e4}).always(function(){t.init()}),t.cache=[]},this.interval)}},n.prototype.end=function(){},n.jQueryWait=function(t){return"undefined"!=typeof window&&(window.jQuery||window.$)?t(window.jQuery||window.$):void("undefined"!=typeof window&&setTimeout(function(){n.jQueryWait(t)},200))},t.exports=n},function(t,e,r){var n=r(26),i=r(27),o=r(79),s=function(){this._blocks={},this._scripts=[]};s.BRANCH_INPUT_PREFIX="SUBSTACK",s.prototype.getBlock=function(t){return this._blocks[t]},s.prototype.getScripts=function(){return this._scripts},s.prototype.getNextBlock=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].next},s.prototype.getBranch=function(t,e){var r=this._blocks[t];if("undefined"==typeof r)return null;e||(e=1);var n=s.BRANCH_INPUT_PREFIX;return e>1&&(n+=e),n in r.inputs?r.inputs[n].block:null},s.prototype.getOpcode=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].opcode},s.prototype.getFields=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].fields},s.prototype.getInputs=function(t){if("undefined"==typeof this._blocks[t])return null;var e={};for(var r in this._blocks[t].inputs)r.substring(0,s.BRANCH_INPUT_PREFIX.length)!==s.BRANCH_INPUT_PREFIX&&(e[r]=this._blocks[t].inputs[r]);return e},s.prototype.getMutation=function(t){return"undefined"==typeof this._blocks[t]?null:this._blocks[t].mutation},s.prototype.getTopLevelScript=function(t){if("undefined"==typeof this._blocks[t])return null;for(var e=this._blocks[t];null!==e.parent;)e=this._blocks[e.parent];return e.id},s.prototype.getProcedureDefinition=function(t){for(var e in this._blocks){var r=this._blocks[e];if(("procedures_defnoreturn"===r.opcode||"procedures_defreturn"===r.opcode)&&r.mutation.proccode===t)return e}return null},s.prototype.getProcedureParamNames=function(t){for(var e in this._blocks){var r=this._blocks[e];if(("procedures_defnoreturn"===r.opcode||"procedures_defreturn"===r.opcode)&&r.mutation.proccode===t)return JSON.parse(r.mutation.argumentnames)}return null},s.prototype.blocklyListen=function(t,e){if("object"==typeof t&&"string"==typeof t.blockId){if("stackclick"===t.element)return void(e&&e.toggleScript(t.blockId));switch(t.type){case"create":for(var r=n(t),i=0;i<r.length;i++)this.createBlock(r[i]);break;case"change":this.changeBlock({id:t.blockId,element:t.element,name:t.name,value:t.newValue});break;case"move":this.moveBlock({id:t.blockId,oldParent:t.oldParentId,oldInput:t.oldInputName,newParent:t.newParentId,newInput:t.newInputName,newCoordinate:t.newCoordinate});break;case"delete":if(!this._blocks.hasOwnProperty(t.blockId)||this._blocks[t.blockId].shadow)return;e&&this._blocks[t.blockId].topLevel&&e.quietGlow(t.blockId),this.deleteBlock({id:t.blockId})}}},s.prototype.createBlock=function(t){this._blocks.hasOwnProperty(t.id)||(this._blocks[t.id]=t,t.topLevel&&this._addScript(t.id))},s.prototype.changeBlock=function(t){if(("field"===t.element||"mutation"===t.element)&&"undefined"!=typeof this._blocks[t.id])if("field"===t.element){if(!this._blocks[t.id].fields[t.name])return;this._blocks[t.id].fields[t.name].value=t.value}else"mutation"===t.element&&(this._blocks[t.id].mutation=i(t.value))},s.prototype.moveBlock=function(t){if(this._blocks.hasOwnProperty(t.id)){if(t.newCoordinate&&(this._blocks[t.id].x=t.newCoordinate.x,this._blocks[t.id].y=t.newCoordinate.y),"undefined"!=typeof t.oldParent){var e=this._blocks[t.oldParent];"undefined"!=typeof t.oldInput&&e.inputs[t.oldInput].block===t.id?e.inputs[t.oldInput].block=null:e.next===t.id&&(e.next=null),this._blocks[t.id].parent=null}if("undefined"==typeof t.newParent)this._addScript(t.id);else{if(this._deleteScript(t.id),"undefined"==typeof t.newInput)this._blocks[t.newParent].next=t.id;else{var r=null;this._blocks[t.newParent].inputs.hasOwnProperty(t.newInput)&&(r=this._blocks[t.newParent].inputs[t.newInput].shadow),this._blocks[t.newParent].inputs[t.newInput]={name:t.newInput,block:t.id,shadow:r}}this._blocks[t.id].parent=t.newParent}}},s.prototype.deleteBlock=function(t){var e=this._blocks[t.id];null!==e.next&&this.deleteBlock({id:e.next});for(var r in e.inputs)null!==e.inputs[r].block&&this.deleteBlock({id:e.inputs[r].block}),null!==e.inputs[r].shadow&&e.inputs[r].shadow!==e.inputs[r].block&&this.deleteBlock({id:e.inputs[r].shadow});this._deleteScript(t.id),delete this._blocks[t.id]},s.prototype.toXML=function(){for(var t='<xml xmlns="http://www.w3.org/1999/xhtml">',e=0;e<this._scripts.length;e++)t+=this.blockToXML(this._scripts[e]);return t+"</xml>"},s.prototype.blockToXML=function(t){var e=this._blocks[t],r=e.shadow?"shadow":"block",n=e.topLevel?' x="'+e.x+'" y="'+e.y+'"':"",i="";i+="<"+r+' id="'+e.id+'" type="'+e.opcode+'"'+n+">",e.mutation&&(i+=this.mutationToXML(e.mutation));for(var s in e.inputs){var a=e.inputs[s];(a.block||a.shadow)&&(i+='<value name="'+a.name+'">',a.block&&(i+=this.blockToXML(a.block)),a.shadow&&a.shadow!==a.block&&(i+=this.blockToXML(a.shadow)),i+="</value>")}for(var u in e.fields){var c=e.fields[u],p=c.value;"string"==typeof p&&(p=o(c.value)),i+='<field name="'+c.name+'">'+p+"</field>"}return e.next&&(i+="<next>"+this.blockToXML(e.next)+"</next>"),i+="</"+r+">"},s.prototype.mutationToXML=function(t){var e="<"+t.tagName;for(var r in t)if("children"!==r&&"tagName"!==r){var n="string"==typeof t[r]?o(t[r]):t[r];e+=" "+r+'="'+n+'"'}e+=">";for(var i=0;i<t.children.length;i++)e+=this.mutationToXML(t.children[i]);return e+="</"+t.tagName+">"},s.prototype._addScript=function(t){var e=this._scripts.indexOf(t);e>-1||(this._scripts.push(t),this._blocks[t].topLevel=!0)},s.prototype._deleteScript=function(t){var e=this._scripts.indexOf(t);e>-1&&this._scripts.splice(e,1),this._blocks[t]&&(this._blocks[t].topLevel=!1)},t.exports=s},function(t,e,r){var n=r(27),i=r(28),o=function(t){for(var e={},r=0;r<t.length;r++){var n=t[r];if(n.name&&n.attribs){var i=n.name.toLowerCase();"block"!==i&&"shadow"!==i||a(n,e,!0,null)}}var o=[];for(var s in e)o.push(e[s]);return o},s=function(t){if("object"==typeof t&&"object"==typeof t.xml)return o(i.parseDOM(t.xml.outerHTML))},a=function(t,e,r,i){var o={id:t.attribs.id,opcode:t.attribs.type,inputs:{},fields:{},next:null,topLevel:r,parent:i,shadow:"shadow"===t.name,x:t.attribs.x,y:t.attribs.y};e[o.id]=o;for(var s=0;s<t.children.length;s++){for(var u=t.children[s],c=null,p=null,h=0;h<u.children.length;h++){var l=u.children[h];if(l.name){var f=l.name.toLowerCase();"block"===f?c=l:"shadow"===f&&(p=l)}}switch(!c&&p&&(c=p),u.name.toLowerCase()){case"field":var d=u.attribs.name,g="";g=u.children.length>0&&u.children[0].data?u.children[0].data:"",o.fields[d]={name:d,value:g};break;case"value":case"statement":a(c,e,!1,o.id),p&&c!==p&&a(p,e,!1,o.id);var m=u.attribs.name;o.inputs[m]={name:m,block:c.attribs.id,shadow:p?p.attribs.id:null};break;case"next":if(!c||!c.attribs)continue;a(c,e,!1,o.id),o.next=c.attribs.id;break;case"mutation":o.mutation=n(u)}}};t.exports=s},function(t,e,r){var n=r(28),i=function(t){var e=Object.create(null);e.tagName=t.name,e.children=[];for(var r in t.attribs)"xmlns"!==r&&(e[r]=t.attribs[r]);for(var n=0;n<t.children.length;n++)e.children.push(i(t.children[n]));return e},o=function(t){var e;return e="object"==typeof t?t:n.parseDOM(t)[0],i(e)};t.exports=o},function(t,e,r){function n(e,r){return delete t.exports[e],t.exports[e]=r,r}var i=r(29),o=r(36);t.exports={Parser:i,Tokenizer:r(30),ElementType:r(37),DomHandler:o,get FeedHandler(){return n("FeedHandler",r(40))},get Stream(){return n("Stream",r(41))},get WritableStream(){return n("WritableStream",r(42))},get ProxyHandler(){return n("ProxyHandler",r(65))},get DomUtils(){return n("DomUtils",r(66))},get CollectingHandler(){return n("CollectingHandler",r(78))},DefaultHandler:o,get RssHandler(){return n("RssHandler",this.FeedHandler)},parseDOM:function(t,e){var r=new o(e);return new i(r,e).end(t),r.dom},parseFeed:function(e,r){var n=new t.exports.FeedHandler(r);return new i(n,r).end(e),n.dom},createDomStream:function(t,e,r){var n=new o(t,e,r);return new i(n,e)},EVENTS:{attribute:2,cdatastart:0,cdataend:0,text:1,processinginstruction:2,comment:1,commentend:0,closetag:1,opentag:2,opentagname:1,error:1,end:0}}},function(t,e,r){function n(t,e){this._options=e||{},this._cbs=t||{},this._tagname="",this._attribname="",this._attribvalue="",this._attribs=null,this._stack=[],this.startIndex=0,this.endIndex=null,this._lowerCaseTagNames="lowerCaseTags"in this._options?!!this._options.lowerCaseTags:!this._options.xmlMode,this._lowerCaseAttributeNames="lowerCaseAttributeNames"in this._options?!!this._options.lowerCaseAttributeNames:!this._options.xmlMode,this._options.Tokenizer&&(i=this._options.Tokenizer),this._tokenizer=new i(this._options,this),this._cbs.onparserinit&&this._cbs.onparserinit(this)}var i=r(30),o={input:!0,option:!0,optgroup:!0,select:!0,button:!0,datalist:!0,textarea:!0},s={tr:{tr:!0,th:!0,td:!0},th:{th:!0},td:{thead:!0,th:!0,td:!0},body:{head:!0,link:!0,script:!0},li:{li:!0},p:{p:!0},h1:{p:!0},h2:{p:!0},h3:{p:!0},h4:{p:!0},h5:{p:!0},h6:{p:!0},select:o,input:o,output:o,button:o,datalist:o,textarea:o,option:{option:!0},optgroup:{optgroup:!0}},a={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,path:!0,circle:!0,ellipse:!0,line:!0,rect:!0,use:!0,stop:!0,polyline:!0,polygon:!0},u=/\s|\//;r(3).inherits(n,r(2).EventEmitter),n.prototype._updatePosition=function(t){null===this.endIndex?this._tokenizer._sectionStart<=t?this.startIndex=0:this.startIndex=this._tokenizer._sectionStart-t:this.startIndex=this.endIndex+1,this.endIndex=this._tokenizer.getAbsoluteIndex()},n.prototype.ontext=function(t){this._updatePosition(1),this.endIndex--,this._cbs.ontext&&this._cbs.ontext(t)},n.prototype.onopentagname=function(t){if(this._lowerCaseTagNames&&(t=t.toLowerCase()),this._tagname=t,!this._options.xmlMode&&t in s)for(var e;(e=this._stack[this._stack.length-1])in s[t];this.onclosetag(e));!this._options.xmlMode&&t in a||this._stack.push(t),this._cbs.onopentagname&&this._cbs.onopentagname(t),this._cbs.onopentag&&(this._attribs={})},n.prototype.onopentagend=function(){this._updatePosition(1),this._attribs&&(this._cbs.onopentag&&this._cbs.onopentag(this._tagname,this._attribs),this._attribs=null),!this._options.xmlMode&&this._cbs.onclosetag&&this._tagname in a&&this._cbs.onclosetag(this._tagname),this._tagname=""},n.prototype.onclosetag=function(t){if(this._updatePosition(1),this._lowerCaseTagNames&&(t=t.toLowerCase()),!this._stack.length||t in a&&!this._options.xmlMode)this._options.xmlMode||"br"!==t&&"p"!==t||(this.onopentagname(t),this._closeCurrentTag());else{var e=this._stack.lastIndexOf(t);if(e!==-1)if(this._cbs.onclosetag)for(e=this._stack.length-e;e--;)this._cbs.onclosetag(this._stack.pop());else this._stack.length=e;else"p"!==t||this._options.xmlMode||(this.onopentagname(t),this._closeCurrentTag())}},n.prototype.onselfclosingtag=function(){this._options.xmlMode||this._options.recognizeSelfClosing?this._closeCurrentTag():this.onopentagend()},n.prototype._closeCurrentTag=function(){var t=this._tagname;this.onopentagend(),this._stack[this._stack.length-1]===t&&(this._cbs.onclosetag&&this._cbs.onclosetag(t),this._stack.pop())},n.prototype.onattribname=function(t){this._lowerCaseAttributeNames&&(t=t.toLowerCase()),this._attribname=t},n.prototype.onattribdata=function(t){this._attribvalue+=t},n.prototype.onattribend=function(){this._cbs.onattribute&&this._cbs.onattribute(this._attribname,this._attribvalue),this._attribs&&!Object.prototype.hasOwnProperty.call(this._attribs,this._attribname)&&(this._attribs[this._attribname]=this._attribvalue),this._attribname="",this._attribvalue=""},n.prototype._getInstructionName=function(t){var e=t.search(u),r=e<0?t:t.substr(0,e);return this._lowerCaseTagNames&&(r=r.toLowerCase()),r},n.prototype.ondeclaration=function(t){if(this._cbs.onprocessinginstruction){var e=this._getInstructionName(t);this._cbs.onprocessinginstruction("!"+e,"!"+t)}},n.prototype.onprocessinginstruction=function(t){if(this._cbs.onprocessinginstruction){var e=this._getInstructionName(t);this._cbs.onprocessinginstruction("?"+e,"?"+t)}},n.prototype.oncomment=function(t){this._updatePosition(4),this._cbs.oncomment&&this._cbs.oncomment(t),this._cbs.oncommentend&&this._cbs.oncommentend()},n.prototype.oncdata=function(t){this._updatePosition(1),this._options.xmlMode||this._options.recognizeCDATA?(this._cbs.oncdatastart&&this._cbs.oncdatastart(),this._cbs.ontext&&this._cbs.ontext(t),this._cbs.oncdataend&&this._cbs.oncdataend()):this.oncomment("[CDATA["+t+"]]")},n.prototype.onerror=function(t){this._cbs.onerror&&this._cbs.onerror(t)},n.prototype.onend=function(){if(this._cbs.onclosetag)for(var t=this._stack.length;t>0;this._cbs.onclosetag(this._stack[--t]));this._cbs.onend&&this._cbs.onend()},n.prototype.reset=function(){this._cbs.onreset&&this._cbs.onreset(),this._tokenizer.reset(),this._tagname="",this._attribname="",this._attribs=null,this._stack=[],this._cbs.onparserinit&&this._cbs.onparserinit(this)},n.prototype.parseComplete=function(t){this.reset(),this.end(t)},n.prototype.write=function(t){this._tokenizer.write(t)},n.prototype.end=function(t){this._tokenizer.end(t)},n.prototype.pause=function(){this._tokenizer.pause()},n.prototype.resume=function(){this._tokenizer.resume()},n.prototype.parseChunk=n.prototype.write,n.prototype.done=n.prototype.end,t.exports=n},function(t,e,r){function n(t){return" "===t||"\n"===t||"\t"===t||"\f"===t||"\r"===t}function i(t,e){return function(r){r===t&&(this._state=e)}}function o(t,e,r){var n=t.toLowerCase();return t===n?function(t){t===n?this._state=e:(this._state=r,this._index--)}:function(i){i===n||i===t?this._state=e:(this._state=r,this._index--)}}function s(t,e){var r=t.toLowerCase();return function(n){n===r||n===t?this._state=e:(this._state=g,this._index--)}}function a(t,e){this._state=f,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=f,this._special=gt,this._cbs=e,this._running=!0,this._ended=!1,this._xmlMode=!(!t||!t.xmlMode),this._decodeEntities=!(!t||!t.decodeEntities)}t.exports=a;var u=r(31),c=r(33),p=r(34),h=r(35),l=0,f=l++,d=l++,g=l++,m=l++,_=l++,y=l++,b=l++,v=l++,w=l++,S=l++,T=l++,E=l++,O=l++,k=l++,N=l++,x=l++,A=l++,I=l++,R=l++,L=l++,C=l++,M=l++,D=l++,P=l++,B=l++,U=l++,q=l++,F=l++,j=l++,G=l++,H=l++,V=l++,Y=l++,z=l++,X=l++,W=l++,J=l++,K=l++,Q=l++,Z=l++,$=l++,tt=l++,et=l++,rt=l++,nt=l++,it=l++,ot=l++,st=l++,at=l++,ut=l++,ct=l++,pt=l++,ht=l++,lt=l++,ft=l++,dt=0,gt=dt++,mt=dt++,_t=dt++;a.prototype._stateText=function(t){"<"===t?(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._state=d,this._sectionStart=this._index):this._decodeEntities&&this._special===gt&&"&"===t&&(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._baseState=f,this._state=ct,this._sectionStart=this._index)},a.prototype._stateBeforeTagName=function(t){"/"===t?this._state=_:">"===t||this._special!==gt||n(t)?this._state=f:"!"===t?(this._state=N,this._sectionStart=this._index+1):"?"===t?(this._state=A,this._sectionStart=this._index+1):"<"===t?(this._cbs.ontext(this._getSection()),this._sectionStart=this._index):(this._state=this._xmlMode||"s"!==t&&"S"!==t?g:H,this._sectionStart=this._index)},a.prototype._stateInTagName=function(t){("/"===t||">"===t||n(t))&&(this._emitToken("onopentagname"),this._state=v,this._index--)},a.prototype._stateBeforeCloseingTagName=function(t){n(t)||(">"===t?this._state=f:this._special!==gt?"s"===t||"S"===t?this._state=V:(this._state=f,this._index--):(this._state=y,this._sectionStart=this._index))},a.prototype._stateInCloseingTagName=function(t){(">"===t||n(t))&&(this._emitToken("onclosetag"),this._state=b,this._index--)},a.prototype._stateAfterCloseingTagName=function(t){">"===t&&(this._state=f,this._sectionStart=this._index+1)},a.prototype._stateBeforeAttributeName=function(t){">"===t?(this._cbs.onopentagend(),this._state=f,this._sectionStart=this._index+1):"/"===t?this._state=m:n(t)||(this._state=w,this._sectionStart=this._index)},a.prototype._stateInSelfClosingTag=function(t){">"===t?(this._cbs.onselfclosingtag(),this._state=f,this._sectionStart=this._index+1):n(t)||(this._state=v,this._index--)},a.prototype._stateInAttributeName=function(t){("="===t||"/"===t||">"===t||n(t))&&(this._cbs.onattribname(this._getSection()),this._sectionStart=-1,this._state=S,this._index--)},a.prototype._stateAfterAttributeName=function(t){"="===t?this._state=T:"/"===t||">"===t?(this._cbs.onattribend(),this._state=v,this._index--):n(t)||(this._cbs.onattribend(),this._state=w,this._sectionStart=this._index)},a.prototype._stateBeforeAttributeValue=function(t){'"'===t?(this._state=E,this._sectionStart=this._index+1):"'"===t?(this._state=O,this._sectionStart=this._index+1):n(t)||(this._state=k,this._sectionStart=this._index,this._index--)},a.prototype._stateInAttributeValueDoubleQuotes=function(t){'"'===t?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=v):this._decodeEntities&&"&"===t&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ct,this._sectionStart=this._index)},a.prototype._stateInAttributeValueSingleQuotes=function(t){"'"===t?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=v):this._decodeEntities&&"&"===t&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ct,this._sectionStart=this._index)},a.prototype._stateInAttributeValueNoQuotes=function(t){n(t)||">"===t?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=v,this._index--):this._decodeEntities&&"&"===t&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ct,this._sectionStart=this._index)},a.prototype._stateBeforeDeclaration=function(t){this._state="["===t?M:"-"===t?I:x},a.prototype._stateInDeclaration=function(t){">"===t&&(this._cbs.ondeclaration(this._getSection()),this._state=f,this._sectionStart=this._index+1)},a.prototype._stateInProcessingInstruction=function(t){">"===t&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=f,this._sectionStart=this._index+1)},a.prototype._stateBeforeComment=function(t){"-"===t?(this._state=R,this._sectionStart=this._index+1):this._state=x},a.prototype._stateInComment=function(t){"-"===t&&(this._state=L)},a.prototype._stateAfterComment1=function(t){"-"===t?this._state=C:this._state=R},a.prototype._stateAfterComment2=function(t){">"===t?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=f,this._sectionStart=this._index+1):"-"!==t&&(this._state=R)},a.prototype._stateBeforeCdata1=o("C",D,x),a.prototype._stateBeforeCdata2=o("D",P,x),a.prototype._stateBeforeCdata3=o("A",B,x),a.prototype._stateBeforeCdata4=o("T",U,x),a.prototype._stateBeforeCdata5=o("A",q,x),a.prototype._stateBeforeCdata6=function(t){"["===t?(this._state=F,this._sectionStart=this._index+1):(this._state=x,this._index--)},a.prototype._stateInCdata=function(t){"]"===t&&(this._state=j)},a.prototype._stateAfterCdata1=i("]",G),a.prototype._stateAfterCdata2=function(t){">"===t?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=f,this._sectionStart=this._index+1):"]"!==t&&(this._state=F)},a.prototype._stateBeforeSpecial=function(t){"c"===t||"C"===t?this._state=Y:"t"===t||"T"===t?this._state=et:(this._state=g,this._index--)},a.prototype._stateBeforeSpecialEnd=function(t){this._special!==mt||"c"!==t&&"C"!==t?this._special!==_t||"t"!==t&&"T"!==t?this._state=f:this._state=ot:this._state=K},a.prototype._stateBeforeScript1=s("R",z),a.prototype._stateBeforeScript2=s("I",X),a.prototype._stateBeforeScript3=s("P",W),a.prototype._stateBeforeScript4=s("T",J),a.prototype._stateBeforeScript5=function(t){("/"===t||">"===t||n(t))&&(this._special=mt),this._state=g,this._index--},a.prototype._stateAfterScript1=o("R",Q,f),a.prototype._stateAfterScript2=o("I",Z,f),a.prototype._stateAfterScript3=o("P",$,f),a.prototype._stateAfterScript4=o("T",tt,f),a.prototype._stateAfterScript5=function(t){">"===t||n(t)?(this._special=gt,this._state=y,this._sectionStart=this._index-6,this._index--):this._state=f},a.prototype._stateBeforeStyle1=s("Y",rt),a.prototype._stateBeforeStyle2=s("L",nt),a.prototype._stateBeforeStyle3=s("E",it),a.prototype._stateBeforeStyle4=function(t){("/"===t||">"===t||n(t))&&(this._special=_t),this._state=g,this._index--},a.prototype._stateAfterStyle1=o("Y",st,f),a.prototype._stateAfterStyle2=o("L",at,f),a.prototype._stateAfterStyle3=o("E",ut,f),a.prototype._stateAfterStyle4=function(t){">"===t||n(t)?(this._special=gt,this._state=y,this._sectionStart=this._index-5,this._index--):this._state=f},a.prototype._stateBeforeEntity=o("#",pt,ht),a.prototype._stateBeforeNumericEntity=o("X",ft,lt),a.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+1<this._index){var t=this._buffer.substring(this._sectionStart+1,this._index),e=this._xmlMode?h:c;e.hasOwnProperty(t)&&(this._emitPartial(e[t]),this._sectionStart=this._index+1)}},a.prototype._parseLegacyEntity=function(){var t=this._sectionStart+1,e=this._index-t;for(e>6&&(e=6);e>=2;){var r=this._buffer.substr(t,e);if(p.hasOwnProperty(r))return this._emitPartial(p[r]),void(this._sectionStart+=e+1);e--}},a.prototype._stateInNamedEntity=function(t){";"===t?(this._parseNamedEntityStrict(),this._sectionStart+1<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):(t<"a"||t>"z")&&(t<"A"||t>"Z")&&(t<"0"||t>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==f?"="!==t&&this._parseNamedEntityStrict():this._parseLegacyEntity()),this._state=this._baseState,this._index--)},a.prototype._decodeNumericEntity=function(t,e){var r=this._sectionStart+t;if(r!==this._index){var n=this._buffer.substring(r,this._index),i=parseInt(n,e);this._emitPartial(u(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},a.prototype._stateInNumericEntity=function(t){";"===t?(this._decodeNumericEntity(2,10),this._sectionStart++):(t<"0"||t>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(2,10),this._index--)},a.prototype._stateInHexEntity=function(t){";"===t?(this._decodeNumericEntity(3,16),this._sectionStart++):(t<"a"||t>"f")&&(t<"A"||t>"F")&&(t<"0"||t>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(3,16),this._index--)},a.prototype._cleanup=function(){this._sectionStart<0?(this._buffer="",this._index=0,this._bufferOffset+=this._index):this._running&&(this._state===f?(this._sectionStart!==this._index&&this._cbs.ontext(this._buffer.substr(this._sectionStart)),this._buffer="",this._index=0,this._bufferOffset+=this._index):this._sectionStart===this._index?(this._buffer="",this._index=0,this._bufferOffset+=this._index):(this._buffer=this._buffer.substr(this._sectionStart),this._index-=this._sectionStart,this._bufferOffset+=this._sectionStart),this._sectionStart=0)},a.prototype.write=function(t){this._ended&&this._cbs.onerror(Error(".write() after done!")),this._buffer+=t,this._parse()},a.prototype._parse=function(){for(;this._index<this._buffer.length&&this._running;){var t=this._buffer.charAt(this._index);this._state===f?this._stateText(t):this._state===d?this._stateBeforeTagName(t):this._state===g?this._stateInTagName(t):this._state===_?this._stateBeforeCloseingTagName(t):this._state===y?this._stateInCloseingTagName(t):this._state===b?this._stateAfterCloseingTagName(t):this._state===m?this._stateInSelfClosingTag(t):this._state===v?this._stateBeforeAttributeName(t):this._state===w?this._stateInAttributeName(t):this._state===S?this._stateAfterAttributeName(t):this._state===T?this._stateBeforeAttributeValue(t):this._state===E?this._stateInAttributeValueDoubleQuotes(t):this._state===O?this._stateInAttributeValueSingleQuotes(t):this._state===k?this._stateInAttributeValueNoQuotes(t):this._state===N?this._stateBeforeDeclaration(t):this._state===x?this._stateInDeclaration(t):this._state===A?this._stateInProcessingInstruction(t):this._state===I?this._stateBeforeComment(t):this._state===R?this._stateInComment(t):this._state===L?this._stateAfterComment1(t):this._state===C?this._stateAfterComment2(t):this._state===M?this._stateBeforeCdata1(t):this._state===D?this._stateBeforeCdata2(t):this._state===P?this._stateBeforeCdata3(t):this._state===B?this._stateBeforeCdata4(t):this._state===U?this._stateBeforeCdata5(t):this._state===q?this._stateBeforeCdata6(t):this._state===F?this._stateInCdata(t):this._state===j?this._stateAfterCdata1(t):this._state===G?this._stateAfterCdata2(t):this._state===H?this._stateBeforeSpecial(t):this._state===V?this._stateBeforeSpecialEnd(t):this._state===Y?this._stateBeforeScript1(t):this._state===z?this._stateBeforeScript2(t):this._state===X?this._stateBeforeScript3(t):this._state===W?this._stateBeforeScript4(t):this._state===J?this._stateBeforeScript5(t):this._state===K?this._stateAfterScript1(t):this._state===Q?this._stateAfterScript2(t):this._state===Z?this._stateAfterScript3(t):this._state===$?this._stateAfterScript4(t):this._state===tt?this._stateAfterScript5(t):this._state===et?this._stateBeforeStyle1(t):this._state===rt?this._stateBeforeStyle2(t):this._state===nt?this._stateBeforeStyle3(t):this._state===it?this._stateBeforeStyle4(t):this._state===ot?this._stateAfterStyle1(t):this._state===st?this._stateAfterStyle2(t):this._state===at?this._stateAfterStyle3(t):this._state===ut?this._stateAfterStyle4(t):this._state===ct?this._stateBeforeEntity(t):this._state===pt?this._stateBeforeNumericEntity(t):this._state===ht?this._stateInNamedEntity(t):this._state===lt?this._stateInNumericEntity(t):this._state===ft?this._stateInHexEntity(t):this._cbs.onerror(Error("unknown _state"),this._state),this._index++}this._cleanup()},a.prototype.pause=function(){this._running=!1},a.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},a.prototype.end=function(t){this._ended&&this._cbs.onerror(Error(".end() after done!")),t&&this.write(t),this._ended=!0,this._running&&this._finish()},a.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},a.prototype._handleTrailingData=function(){var t=this._buffer.substr(this._sectionStart);this._state===F||this._state===j||this._state===G?this._cbs.oncdata(t):this._state===R||this._state===L||this._state===C?this._cbs.oncomment(t):this._state!==ht||this._xmlMode?this._state!==lt||this._xmlMode?this._state!==ft||this._xmlMode?this._state!==g&&this._state!==v&&this._state!==T&&this._state!==S&&this._state!==w&&this._state!==O&&this._state!==E&&this._state!==k&&this._state!==y&&this._cbs.ontext(t):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},a.prototype.reset=function(){a.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},a.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},a.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},a.prototype._emitToken=function(t){this._cbs[t](this._getSection()),this._sectionStart=-1},a.prototype._emitPartial=function(t){this._baseState!==f?this._cbs.onattribdata(t):this._cbs.ontext(t)}},function(t,e,r){function n(t){if(t>=55296&&t<=57343||t>1114111)return"<22>";t in i&&(t=i[t]);var e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|1023&t),e+=String.fromCharCode(t)}var i=r(32);t.exports=n},function(t,e){t.exports={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}},function(t,e){t.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",
|
||
CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅","in":"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺","int":"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}},function(t,e){t.exports={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"}},function(t,e){t.exports={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}},function(t,e,r){function n(t,e,r){"object"==typeof t?(r=e,e=t,t=null):"function"==typeof e&&(r=e,e=u),this._callback=t,this._options=e||u,this._elementCB=r,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=r(37),o=/\s+/g,s=r(38),a=r(39),u={normalizeWhitespace:!1,withStartIndices:!1};n.prototype.onparserinit=function(t){this._parser=t},n.prototype.onreset=function(){n.call(this,this._callback,this._options,this._elementCB)},n.prototype.onend=function(){this._done||(this._done=!0,this._parser=null,this._handleCallback(null))},n.prototype._handleCallback=n.prototype.onerror=function(t){if("function"==typeof this._callback)this._callback(t,this.dom);else if(t)throw t},n.prototype.onclosetag=function(){var t=this._tagStack.pop();this._elementCB&&this._elementCB(t)},n.prototype._addDomElement=function(t){var e=this._tagStack[this._tagStack.length-1],r=e?e.children:this.dom,n=r[r.length-1];t.next=null,this._options.withStartIndices&&(t.startIndex=this._parser.startIndex),this._options.withDomLvl1&&(t.__proto__="tag"===t.type?a:s),n?(t.prev=n,n.next=t):t.prev=null,r.push(t),t.parent=e||null},n.prototype.onopentag=function(t,e){var r={type:"script"===t?i.Script:"style"===t?i.Style:i.Tag,name:t,attribs:e,children:[]};this._addDomElement(r),this._tagStack.push(r)},n.prototype.ontext=function(t){var e,r=this._options.normalizeWhitespace||this._options.ignoreWhitespace;!this._tagStack.length&&this.dom.length&&(e=this.dom[this.dom.length-1]).type===i.Text?r?e.data=(e.data+t).replace(o," "):e.data+=t:this._tagStack.length&&(e=this._tagStack[this._tagStack.length-1])&&(e=e.children[e.children.length-1])&&e.type===i.Text?r?e.data=(e.data+t).replace(o," "):e.data+=t:(r&&(t=t.replace(o," ")),this._addDomElement({data:t,type:i.Text}))},n.prototype.oncomment=function(t){var e=this._tagStack[this._tagStack.length-1];if(e&&e.type===i.Comment)return void(e.data+=t);var r={data:t,type:i.Comment};this._addDomElement(r),this._tagStack.push(r)},n.prototype.oncdatastart=function(){var t={children:[{data:"",type:i.Text}],type:i.CDATA};this._addDomElement(t),this._tagStack.push(t)},n.prototype.oncommentend=n.prototype.oncdataend=function(){this._tagStack.pop()},n.prototype.onprocessinginstruction=function(t,e){this._addDomElement({name:t,data:e,type:i.Directive})},t.exports=n},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",Doctype:"doctype",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e){var r=t.exports={get firstChild(){var t=this.children;return t&&t[0]||null},get lastChild(){var t=this.children;return t&&t[t.length-1]||null},get nodeType(){return i[this.type]||i.element}},n={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"},i={element:1,text:3,cdata:4,comment:8};Object.keys(n).forEach(function(t){var e=n[t];Object.defineProperty(r,t,{get:function(){return this[e]||null},set:function(t){return this[e]=t,t}})})},function(t,e,r){var n=r(38),i=t.exports=Object.create(n),o={tagName:"name"};Object.keys(o).forEach(function(t){var e=o[t];Object.defineProperty(i,t,{get:function(){return this[e]||null},set:function(t){return this[e]=t,t}})})},function(t,e,r){function n(t,e){this.init(t,e)}function i(t,e){return p.getElementsByTagName(t,e,!0)}function o(t,e){return p.getElementsByTagName(t,e,!0,1)[0]}function s(t,e,r){return p.getText(p.getElementsByTagName(t,e,r,1)).trim()}function a(t,e,r,n,i){var o=s(r,n,i);o&&(t[e]=o)}var u=r(28),c=u.DomHandler,p=u.DomUtils;r(3).inherits(n,c),n.prototype.init=c;var h=function(t){return"rss"===t||"feed"===t||"rdf:RDF"===t};n.prototype.onend=function(){var t,e,r={},n=o(h,this.dom);n&&("feed"===n.name?(e=n.children,r.type="atom",a(r,"id","id",e),a(r,"title","title",e),(t=o("link",e))&&(t=t.attribs)&&(t=t.href)&&(r.link=t),a(r,"description","subtitle",e),(t=s("updated",e))&&(r.updated=new Date(t)),a(r,"author","email",e,!0),r.items=i("entry",e).map(function(t){var e,r={};return t=t.children,a(r,"id","id",t),a(r,"title","title",t),(e=o("link",t))&&(e=e.attribs)&&(e=e.href)&&(r.link=e),(e=s("summary",t)||s("content",t))&&(r.description=e),(e=s("updated",t))&&(r.pubDate=new Date(e)),r})):(e=o("channel",n.children).children,r.type=n.name.substr(0,3),r.id="",a(r,"title","title",e),a(r,"link","link",e),a(r,"description","description",e),(t=s("lastBuildDate",e))&&(r.updated=new Date(t)),a(r,"author","managingEditor",e,!0),r.items=i("item",n.children).map(function(t){var e,r={};return t=t.children,a(r,"id","guid",t),a(r,"title","title",t),a(r,"link","link",t),a(r,"description","description",t),(e=s("pubDate",t))&&(r.pubDate=new Date(e)),r}))),this.dom=r,c.prototype._handleCallback.call(this,n?null:Error("couldn't find root of feed"))},t.exports=n},function(t,e,r){function n(t){o.call(this,new i(this),t)}function i(t){this.scope=t}t.exports=n;var o=r(42);r(3).inherits(n,o),n.prototype.readable=!0;var s=r(28).EVENTS;Object.keys(s).forEach(function(t){if(0===s[t])i.prototype["on"+t]=function(){this.scope.emit(t)};else if(1===s[t])i.prototype["on"+t]=function(e){this.scope.emit(t,e)};else{if(2!==s[t])throw Error("wrong number of arguments!");i.prototype["on"+t]=function(e,r){this.scope.emit(t,e,r)}}})},function(t,e,r){function n(t,e){var r=this._parser=new i(t,e);o.call(this,{decodeStrings:!1}),this.once("finish",function(){r.end()})}t.exports=n;var i=r(29),o=r(43).Writable||r(64).Writable;r(3).inherits(n,o),o.prototype._write=function(t,e,r){this._parser.write(t),r()}},function(t,e,r){function n(){i.call(this)}t.exports=n;var i=r(2).EventEmitter,o=r(44);o(n,i),n.Readable=r(45),n.Writable=r(60),n.Duplex=r(61),n.Transform=r(62),n.PassThrough=r(63),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&c.pause&&c.pause()}function n(){c.readable&&c.resume&&c.resume()}function o(){p||(p=!0,t.end())}function s(){p||(p=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(u(),0===i.listenerCount(this,"error"))throw t}function u(){c.removeListener("data",r),t.removeListener("drain",n),c.removeListener("end",o),c.removeListener("close",s),c.removeListener("error",a),t.removeListener("error",a),c.removeListener("end",u),c.removeListener("close",u),t.removeListener("close",u)}var c=this;c.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(c.on("end",o),c.on("close",s));var p=!1;return c.on("error",a),t.on("error",a),c.on("end",u),c.on("close",u),t.on("close",u),t.emit("pipe",c),t}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){(function(n){e=t.exports=r(46),e.Stream=r(43),e.Readable=e,e.Writable=r(56),e.Duplex=r(55),e.Transform=r(58),e.PassThrough=r(59),n.browser||"disable"!==n.env.READABLE_STREAM||(t.exports=r(43))}).call(e,r(4))},function(t,e,r){(function(e){function n(t,e){var n=r(55);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(x||(x=r(57).StringDecoder),this.decoder=new x(t.encoding),this.encoding=t.encoding)}function i(t){r(55);return this instanceof i?(this._readableState=new n(t,this),this.readable=!0,void k.call(this)):new i(t)}function o(t,e,r,n,i){var o=c(e,r);if(o)t.emit("error",o);else if(N.isNullOrUndefined(r))e.reading=!1,e.ended||p(t,e);else if(e.objectMode||r&&r.length>0)if(e.ended&&!i){var a=new Error("stream.push() after EOF");t.emit("error",a)}else if(e.endEmitted&&i){var a=new Error("stream.unshift() after end event");t.emit("error",a)}else!e.decoder||i||n||(r=e.decoder.write(r)),i||(e.reading=!1),e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&h(t)),f(t,e);else i||(e.reading=!1);return s(e)}function s(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length);
|
||
}function a(t){if(t>=I)t=I;else{t--;for(var e=1;e<32;e<<=1)t|=t>>e;t++}return t}function u(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||N.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:t<=0?0:(t>e.highWaterMark&&(e.highWaterMark=a(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function c(t,e){var r=null;return N.isBuffer(e)||N.isString(e)||N.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function p(t,e){if(e.decoder&&!e.ended){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,h(t)}function h(t){var r=t._readableState;r.needReadable=!1,r.emittedReadable||(A("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(function(){l(t)}):l(t))}function l(t){A("emit readable"),t.emit("readable"),y(t)}function f(t,r){r.readingMore||(r.readingMore=!0,e.nextTick(function(){d(t,r)}))}function d(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(A("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function g(t){return function(){var e=t._readableState;A("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&O.listenerCount(t,"data")&&(e.flowing=!0,y(t))}}function m(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(function(){_(t,r)}))}function _(t,e){e.resumeScheduled=!1,t.emit("resume"),y(t),e.flowing&&!e.reading&&t.read(0)}function y(t){var e=t._readableState;if(A("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function b(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):E.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new E(t);for(var u=0,c=0,p=n.length;c<p&&u<t;c++){var a=n[0],h=Math.min(t-u,a.length);o?r+=a.slice(0,h):a.copy(r,u,0,h),h<a.length?n[0]=a.slice(h):n.shift(),u+=h}}return r}function v(t){var r=t._readableState;if(r.length>0)throw new Error("endReadable called on non-empty stream");r.endEmitted||(r.ended=!0,e.nextTick(function(){r.endEmitted||0!==r.length||(r.endEmitted=!0,t.readable=!1,t.emit("end"))}))}function w(t,e){for(var r=0,n=t.length;r<n;r++)e(t[r],r)}function S(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}t.exports=i;var T=r(47),E=r(48).Buffer;i.ReadableState=n;var O=r(2).EventEmitter;O.listenerCount||(O.listenerCount=function(t,e){return t.listeners(e).length});var k=r(43),N=r(52);N.inherits=r(53);var x,A=r(54);A=A&&A.debuglog?A.debuglog("stream"):function(){},N.inherits(i,k),i.prototype.push=function(t,e){var r=this._readableState;return N.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new E(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return x||(x=r(57).StringDecoder),this._readableState.decoder=new x(t),this._readableState.encoding=t,this};var I=8388608;i.prototype.read=function(t){A("read",t);var e=this._readableState,r=t;if((!N.isNumber(t)||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return A("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?v(this):h(this),null;if(t=u(t,e),0===t&&e.ended)return 0===e.length&&v(this),null;var n=e.needReadable;A("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,A("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,A("reading or ended",n)),n&&(A("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=u(r,e));var i;return i=t>0?b(t,e):null,N.isNull(i)&&(e.needReadable=!0,t=0),e.length-=t,0!==e.length||e.ended||(e.needReadable=!0),r!==t&&e.ended&&0===e.length&&v(this),N.isNull(i)||this.emit("data",i),i},i.prototype._read=function(t){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(t,r){function n(t){A("onunpipe"),t===h&&o()}function i(){A("onend"),t.end()}function o(){A("cleanup"),t.removeListener("close",u),t.removeListener("finish",c),t.removeListener("drain",m),t.removeListener("error",a),t.removeListener("unpipe",n),h.removeListener("end",i),h.removeListener("end",o),h.removeListener("data",s),!l.awaitDrain||t._writableState&&!t._writableState.needDrain||m()}function s(e){A("ondata");var r=t.write(e);!1===r&&(A("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,h.pause())}function a(e){A("onerror",e),p(),t.removeListener("error",a),0===O.listenerCount(t,"error")&&t.emit("error",e)}function u(){t.removeListener("finish",c),p()}function c(){A("onfinish"),t.removeListener("close",u),p()}function p(){A("unpipe"),h.unpipe(t)}var h=this,l=this._readableState;switch(l.pipesCount){case 0:l.pipes=t;break;case 1:l.pipes=[l.pipes,t];break;default:l.pipes.push(t)}l.pipesCount+=1,A("pipe count=%d opts=%j",l.pipesCount,r);var f=(!r||r.end!==!1)&&t!==e.stdout&&t!==e.stderr,d=f?i:o;l.endEmitted?e.nextTick(d):h.once("end",d),t.on("unpipe",n);var m=g(h);return t.on("drain",m),h.on("data",s),t._events&&t._events.error?T(t._events.error)?t._events.error.unshift(a):t._events.error=[a,t._events.error]:t.on("error",a),t.once("close",u),t.once("finish",c),t.emit("pipe",h),l.flowing||(A("pipe resume"),h.resume()),t},i.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this),this);if(!t){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;i<n;i++)r[i].emit("unpipe",this);return this}var i=S(e.pipes,t);return i===-1?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,r){var n=k.prototype.on.call(this,t,r);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&h(this,i);else{var o=this;e.nextTick(function(){A("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(A("resume"),t.flowing=!0,t.reading||(A("resume read 0"),this.read(0)),m(this,t)),this},i.prototype.pause=function(){return A("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(A("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(A("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(A("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)N.isFunction(t[i])&&N.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){A("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=b}).call(e,r(4))},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,r){(function(t,n){/*!
|
||
* The buffer module from node.js, for the browser.
|
||
*
|
||
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
||
* @license MIT
|
||
*/
|
||
"use strict";function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(e){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,r){if(o()<r)throw new RangeError("Invalid typed array length");return t.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(r),e.__proto__=t.prototype):(null===e&&(e=new t(r)),e.length=r),e}function t(e,r,n){if(!(t.TYPED_ARRAY_SUPPORT||this instanceof t))return new t(e,r,n);if("number"==typeof e){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return p(this,e)}return a(this,e,r,n)}function a(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?f(t,e,r,n):"string"==typeof e?h(t,e,r):d(t,e)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,e,r,n){return u(e),e<=0?s(t,e):void 0!==r?"string"==typeof n?s(t,e).fill(r,n):s(t,e).fill(r):s(t,e)}function p(e,r){if(u(r),e=s(e,r<0?0:0|g(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;n<r;++n)e[n]=0;return e}function h(e,r,n){if("string"==typeof n&&""!==n||(n="utf8"),!t.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|_(r,n);e=s(e,i);var o=e.write(r,n);return o!==i&&(e=e.slice(0,o)),e}function l(t,e){var r=e.length<0?0:0|g(e.length);t=s(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function f(e,r,n,i){if(r.byteLength,n<0||r.byteLength<n)throw new RangeError("'offset' is out of bounds");if(r.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");return r=void 0===n&&void 0===i?new Uint8Array(r):void 0===i?new Uint8Array(r,n):new Uint8Array(r,n,i),t.TYPED_ARRAY_SUPPORT?(e=r,e.__proto__=t.prototype):e=l(e,r),e}function d(e,r){if(t.isBuffer(r)){var n=0|g(r.length);return e=s(e,n),0===e.length?e:(r.copy(e,0,0,n),e)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||K(r.length)?s(e,0):l(e,r);if("Buffer"===r.type&&$(r.data))return l(e,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function g(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function m(e){return+e!=e&&(e=0),t.alloc(+e)}function _(e,r){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(e).length;default:if(i)return Y(e).length;r=(""+r).toLowerCase(),i=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return C(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return R(this,e,r);case"latin1":case"binary":return L(this,e,r);case"base64":return x(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(e,r,n,i,o){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=t.from(r,i)),t.isBuffer(r))return 0===r.length?-1:w(e,r,n,i,o);if("number"==typeof r)return r=255&r,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):w(e,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){function o(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}var s=1,a=t.length,u=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}var c;if(i){var p=-1;for(c=r;c<a;c++)if(o(t,c)===o(e,p===-1?0:c-p)){if(p===-1&&(p=c),c-p+1===u)return p*s}else p!==-1&&(c-=c-p),p=-1}else for(r+u>a&&(r=a-u),c=r;c>=0;c--){for(var h=!0,l=0;l<u;l++)if(o(t,c+l)!==o(e,l)){h=!1;break}if(h)return c}return-1}function S(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function T(t,e,r,n){return J(Y(e,t.length-r),t,r,n)}function E(t,e,r,n){return J(z(e),t,r,n)}function O(t,e,r,n){return E(t,e,r,n)}function k(t,e,r,n){return J(W(e),t,r,n)}function N(t,e,r,n){return J(X(e,t.length-r),t,r,n)}function x(t,e,r){return 0===e&&r===t.length?Q.fromByteArray(t):Q.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o=t[i],s=null,a=o>239?4:o>223?3:o>191?2:1;if(i+a<=r){var u,c,p,h;switch(a){case 1:o<128&&(s=o);break;case 2:u=t[i+1],128===(192&u)&&(h=(31&o)<<6|63&u,h>127&&(s=h));break;case 3:u=t[i+1],c=t[i+2],128===(192&u)&&128===(192&c)&&(h=(15&o)<<12|(63&u)<<6|63&c,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:u=t[i+1],c=t[i+2],p=t[i+3],128===(192&u)&&128===(192&c)&&128===(192&p)&&(h=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&p,h>65535&&h<1114112&&(s=h))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=a}return I(n)}function I(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=tt));return r}function R(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function L(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function C(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=V(t[o]);return i}function M(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function D(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function P(e,r,n,i,o,s){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<s)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function B(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function U(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function q(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function F(t,e,r,n,i){return i||q(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(t,e,r,n,23,4),r+4}function j(t,e,r,n,i){return i||q(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(t,e,r,n,52,8),r+8}function G(t){if(t=H(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function H(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function V(t){return t<16?"0"+t.toString(16):t.toString(16)}function Y(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;s<n;++s){if(r=t.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function z(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function X(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function W(t){return Q.toByteArray(G(t))}function J(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function K(t){return t!==t}var Q=r(49),Z=r(50),$=r(51);e.Buffer=t,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),e.kMaxLength=o(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,r){return a(null,t,e,r)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,r){return c(null,t,e,r)},t.allocUnsafe=function(t){return p(null,t)},t.allocUnsafeSlow=function(t){return p(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,r){if(!t.isBuffer(e)||!t.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,i=r.length,o=0,s=Math.min(n,i);o<s;++o)if(e[o]!==r[o]){n=e[o],i=r[o];break}return n<i?-1:i<n?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!$(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var i=t.allocUnsafe(r),o=0;for(n=0;n<e.length;++n){var s=e[n];if(!t.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i},t.byteLength=_,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)b(this,e,e+1);return this},t.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)b(this,e,e+3),b(this,e+1,e+2);return this},t.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)b(this,e,e+7),b(this,e+1,e+6),b(this,e+2,e+5),b(this,e+3,e+4);return this},t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):y.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(e,r,n,i,o){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),r<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var s=o-i,a=n-r,u=Math.min(s,a),c=this.slice(i,o),p=e.slice(r,n),h=0;h<u;++h)if(c[h]!==p[h]){s=c[h],a=p[h];break}return s<a?-1:a<s?1:0},t.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1},t.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},t.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return S(this,t,e,r);case"utf8":case"utf-8":return T(this,t,e,r);case"ascii":return E(this,t,e,r);case"latin1":case"binary":return O(this,t,e,r);case"base64":return k(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=this.subarray(e,r),i.__proto__=t.prototype;else{var o=r-e;i=new t(o,(void 0));for(var s=0;s<o;++s)i[s]=this[s+e]}return i},t.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||D(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||D(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,r){t=0|t,e=0|e,r||D(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||D(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},t.prototype.readInt8=function(t,e){return e||D(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||D(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(t,e){e||D(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(t,e){return e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||D(t,4,this.length),Z.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),Z.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),Z.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),Z.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e=0|e,r=0|r,!n){var i=Math.pow(2,8*r)-1;P(this,t,e,r,i,0)}var o=1,s=0;for(this[e]=255&t;++s<r&&(o*=256);)this[e+s]=t/o&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e=0|e,r=0|r,!n){var i=Math.pow(2,8*r)-1;P(this,t,e,r,i,0)}var o=r-1,s=1;for(this[e+o]=255&t;--o>=0&&(s*=256);)this[e+o]=t/s&255;return e+r},t.prototype.writeUInt8=function(e,r,n){return e=+e,r=0|r,n||P(this,e,r,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=255&e,r+1},t.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=0|r,n||P(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):B(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=0|r,n||P(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):B(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=0|r,n||P(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=255&e):U(this,e,r,!0),r+4},t.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=0|r,n||P(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):U(this,e,r,!1),r+4},t.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},t.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},t.prototype.writeInt8=function(e,r,n){return e=+e,r=0|r,n||P(this,e,r,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeInt16LE=function(e,r,n){return e=+e,r=0|r,n||P(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):B(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r=0|r,n||P(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):B(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r=0|r,n||P(this,e,r,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):U(this,e,r,!0),r+4},t.prototype.writeInt32BE=function(e,r,n){return e=+e,r=0|r,n||P(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):U(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return F(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return F(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return j(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return j(this,t,e,!1,r)},t.prototype.copy=function(e,r,n,i){if(n||(n=0),i||0===i||(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var o,s=i-n;if(this===e&&n<r&&r<i)for(o=s-1;o>=0;--o)e[o+r]=this[o+n];else if(s<1e3||!t.TYPED_ARRAY_SUPPORT)for(o=0;o<s;++o)e[o+r]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+s),r);return s},t.prototype.fill=function(e,r,n,i){if("string"==typeof e){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e=255&e);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var s;if("number"==typeof e)for(s=r;s<n;++s)this[s]=e;else{var a=t.isBuffer(e)?e:Y(new t(e,i).toString()),u=a.length;for(s=0;s<n-r;++s)this[s+r]=a[s%u]}return this};var et=/[^+\/0-9A-Za-z-_]/g}).call(e,r(48).Buffer,function(){return this}())},function(t,e){"use strict";function r(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function n(t){return 3*t.length/4-r(t)}function i(t){var e,n,i,o,s,a,u=t.length;s=r(t),a=new p(3*u/4-s),i=s>0?u-4:u;var h=0;for(e=0,n=0;e<i;e+=4,n+=3)o=c[t.charCodeAt(e)]<<18|c[t.charCodeAt(e+1)]<<12|c[t.charCodeAt(e+2)]<<6|c[t.charCodeAt(e+3)],a[h++]=o>>16&255,a[h++]=o>>8&255,a[h++]=255&o;return 2===s?(o=c[t.charCodeAt(e)]<<2|c[t.charCodeAt(e+1)]>>4,a[h++]=255&o):1===s&&(o=c[t.charCodeAt(e)]<<10|c[t.charCodeAt(e+1)]<<4|c[t.charCodeAt(e+2)]>>2,a[h++]=o>>8&255,a[h++]=255&o),a}function o(t){return u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}function s(t,e,r){for(var n,i=[],s=e;s<r;s+=3)n=(t[s]<<16)+(t[s+1]<<8)+t[s+2],i.push(o(n));return i.join("")}function a(t){for(var e,r=t.length,n=r%3,i="",o=[],a=16383,c=0,p=r-n;c<p;c+=a)o.push(s(t,c,c+a>p?p:c+a));return 1===n?(e=t[r-1],i+=u[e>>2],i+=u[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=u[e>>10],i+=u[e>>4&63],i+=u[e<<2&63],i+="="),o.push(i),o.join("")}e.byteLength=n,e.toByteArray=i,e.fromByteArray=a;for(var u=[],c=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,f=h.length;l<f;++l)u[l]=h[l],c[h.charCodeAt(l)]=l;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,p=-7,h=r?i-1:0,l=r?-1:1,f=t[e+h];for(h+=l,o=f&(1<<-p)-1,f>>=-p,p+=a;p>0;o=256*o+t[e+h],h+=l,p-=8);for(s=o&(1<<-p)-1,o>>=-p,p+=n;p>0;s=256*s+t[e+h],h+=l,p-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:(f?-1:1)*(1/0);s+=Math.pow(2,n),o-=c}return(f?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,p=(1<<c)-1,h=p>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=p):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),e+=s+h>=1?l/u:l*Math.pow(2,1-h),e*u>=2&&(s++,u/=2),s+h>=p?(a=0,s=p):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+f]=255&a,f+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[r+f]=255&s,f+=d,s/=256,c-=8);t[r+f-d]|=128*g}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){(function(t){function r(t){return Array.isArray?Array.isArray(t):"[object Array]"===m(t)}function n(t){return"boolean"==typeof t}function i(t){return null===t}function o(t){return null==t}function s(t){return"number"==typeof t}function a(t){return"string"==typeof t}function u(t){return"symbol"==typeof t}function c(t){return void 0===t}function p(t){return"[object RegExp]"===m(t)}function h(t){return"object"==typeof t&&null!==t}function l(t){return"[object Date]"===m(t)}function f(t){return"[object Error]"===m(t)||t instanceof Error}function d(t){return"function"==typeof t}function g(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function m(t){return Object.prototype.toString.call(t)}e.isArray=r,e.isBoolean=n,e.isNull=i,e.isNullOrUndefined=o,e.isNumber=s,e.isString=a,e.isSymbol=u,e.isUndefined=c,e.isRegExp=p,e.isObject=h,e.isDate=l,e.isError=f,e.isFunction=d,e.isPrimitive=g,e.isBuffer=t.isBuffer}).call(e,r(48).Buffer)},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e){},function(t,e,r){(function(e){function n(t){return this instanceof n?(u.call(this,t),c.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new n(t)}function i(){this.allowHalfOpen||this._writableState.ended||e.nextTick(this.end.bind(this))}function o(t,e){for(var r=0,n=t.length;r<n;r++)e(t[r],r)}t.exports=n;var s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},a=r(52);a.inherits=r(53);var u=r(46),c=r(56);a.inherits(n,u),o(s(c.prototype),function(t){n.prototype[t]||(n.prototype[t]=c.prototype[t])})}).call(e,r(4))},function(t,e,r){(function(e){function n(t,e,r){this.chunk=t,this.encoding=e,this.callback=r}function i(t,e){var n=r(55);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){f(e,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(t){var e=r(55);return this instanceof o||this instanceof e?(this._writableState=new i(t,this),this.writable=!0,void T.call(this)):new o(t)}function s(t,r,n){var i=new Error("write after end");t.emit("error",i),e.nextTick(function(){n(i)})}function a(t,r,n,i){var o=!0;if(!(S.isBuffer(n)||S.isString(n)||S.isNullOrUndefined(n)||r.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");t.emit("error",s),e.nextTick(function(){i(s)}),o=!1}return o}function u(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&S.isString(e)&&(e=new w(e,r)),e}function c(t,e,r,i,o){r=u(e,r,i),S.isBuffer(r)&&(i="buffer");var s=e.objectMode?1:r.length;e.length+=s;var a=e.length<e.highWaterMark;return a||(e.needDrain=!0),e.writing||e.corked?e.buffer.push(new n(r,i,o)):p(t,e,!1,s,r,i,o),a}function p(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function h(t,r,n,i,o){n?e.nextTick(function(){r.pendingcb--,o(i)}):(r.pendingcb--,o(i)),t._writableState.errorEmitted=!0,t.emit("error",i)}function l(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function f(t,r){var n=t._writableState,i=n.sync,o=n.writecb;if(l(n),r)h(t,n,i,r,o);else{var s=_(t,n);s||n.corked||n.bufferProcessing||!n.buffer.length||m(t,n),i?e.nextTick(function(){d(t,n,s,o)}):d(t,n,s,o)}}function d(t,e,r,n){r||g(t,e),e.pendingcb--,n(),b(t,e)}function g(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function m(t,e){if(e.bufferProcessing=!0,t._writev&&e.buffer.length>1){for(var r=[],n=0;n<e.buffer.length;n++)r.push(e.buffer[n].callback);e.pendingcb++,p(t,e,!0,e.length,e.buffer,"",function(t){for(var n=0;n<r.length;n++)e.pendingcb--,r[n](t)}),e.buffer=[]}else{for(var n=0;n<e.buffer.length;n++){var i=e.buffer[n],o=i.chunk,s=i.encoding,a=i.callback,u=e.objectMode?1:o.length;if(p(t,e,!1,u,o,s,a),e.writing){n++;break}}n<e.buffer.length?e.buffer=e.buffer.slice(n):e.buffer.length=0}e.bufferProcessing=!1}function _(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function y(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function b(t,e){var r=_(t,e);return r&&(0===e.pendingcb?(y(t,e),e.finished=!0,t.emit("finish")):y(t,e)),r}function v(t,r,n){r.ending=!0,b(t,r),n&&(r.finished?e.nextTick(n):t.once("finish",n)),r.ended=!0}t.exports=o;var w=r(48).Buffer;o.WritableState=i;var S=r(52);S.inherits=r(53);var T=r(43);S.inherits(o,T),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(t,e,r){var n=this._writableState,i=!1;return S.isFunction(e)&&(r=e,e=null),S.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),S.isFunction(r)||(r=function(){}),n.ended?s(this,n,r):a(this,n,t,r)&&(n.pendingcb++,i=c(this,n,t,e,r)),i},o.prototype.cork=function(){var t=this._writableState;t.corked++},o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.buffer.length||m(this,t))},o.prototype._write=function(t,e,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(t,e,r){var n=this._writableState;S.isFunction(t)?(r=t,t=null,e=null):S.isFunction(e)&&(r=e,e=null),S.isNullOrUndefined(t)||this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||v(this,n,r)}}).call(e,r(4))},function(t,e,r){function n(t){if(t&&!u(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function s(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=r(48).Buffer,u=a.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},c=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};c.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var i=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived),e+=t.toString(this.encoding,0,i);var i=e.length-1,n=e.charCodeAt(i);if(n>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,i)}return e},c.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var r=t[t.length-e];if(1==e&&r>>5==6){this.charLength=2;break}if(e<=2&&r>>4==14){this.charLength=3;break}if(e<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=e},c.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;e+=n.slice(0,r).toString(i)}return e}},function(t,e,r){function n(t,e){this.afterTransform=function(t,r){return i(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function i(t,e,r){var n=t._transformState;n.transforming=!1;var i=n.writecb;if(!i)return t.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,u.isNullOrUndefined(r)||t.push(r),i&&i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);a.call(this,t),this._transformState=new n(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){u.isFunction(this._flush)?this._flush(function(t){s(e,t)}):s(e)})}function s(t,e){if(e)return t.emit("error",e);var r=t._writableState,n=t._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}t.exports=o;var a=r(55),u=r(52);u.inherits=r(53),u.inherits(o,a),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("not implemented")},o.prototype._write=function(t,e,r){
|
||
var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;u.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))}},function(t,e,r){function n(t){return this instanceof n?void i.call(this,t):new n(t)}t.exports=n;var i=r(58),o=r(52);o.inherits=r(53),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(56)},function(t,e,r){t.exports=r(55)},function(t,e,r){t.exports=r(58)},function(t,e,r){t.exports=r(59)},function(t,e){},function(t,e,r){function n(t){this._cbs=t||{}}t.exports=n;var i=r(28).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this._cbs[t]&&this._cbs[t](e,r)}}})},function(t,e,r){var n=t.exports;[r(67),r(73),r(74),r(75),r(76),r(77)].forEach(function(t){Object.keys(t).forEach(function(e){n[e]=t[e].bind(n)})})},function(t,e,r){function n(t,e){return t.children?t.children.map(function(t){return s(t,e)}).join(""):""}function i(t){return Array.isArray(t)?t.map(i).join(""):a(t)||t.type===o.CDATA?i(t.children):t.type===o.Text?t.data:""}var o=r(37),s=r(68),a=o.isTag;t.exports={getInnerHTML:n,getOuterHTML:s,getText:i}},function(t,e,r){function n(t,e){if(t){var r,n="";for(var i in t)r=t[i],n&&(n+=" "),n+=!r&&h[i]?i:i+'="'+(e.decodeEntities?p.encodeXML(r):r)+'"';return n}}function i(t,e){"svg"===t.name&&(e={decodeEntities:e.decodeEntities,xmlMode:!0});var r="<"+t.name,i=n(t.attribs,e);return i&&(r+=" "+i),!e.xmlMode||t.children&&0!==t.children.length?(r+=">",t.children&&(r+=d(t.children,e)),f[t.name]&&!e.xmlMode||(r+="</"+t.name+">")):r+="/>",r}function o(t){return"<"+t.data+">"}function s(t,e){var r=t.data||"";return!e.decodeEntities||t.parent&&t.parent.name in l||(r=p.encodeXML(r)),r}function a(t){return"<![CDATA["+t.children[0].data+"]]>"}function u(t){return"<!--"+t.data+"-->"}var c=r(69),p=r(70),h={__proto__:null,allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,"default":!0,defer:!0,disabled:!0,hidden:!0,ismap:!0,loop:!0,multiple:!0,muted:!0,open:!0,readonly:!0,required:!0,reversed:!0,scoped:!0,seamless:!0,selected:!0,typemustmatch:!0},l={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0},f={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},d=t.exports=function(t,e){Array.isArray(t)||t.cheerio||(t=[t]),e=e||{};for(var r="",n=0;n<t.length;n++){var p=t[n];r+="root"===p.type?d(p.children,e):c.isTag(p)?i(p,e):p.type===c.Directive?o(p):p.type===c.Comment?u(p):p.type===c.CDATA?a(p):s(p,e)}return r}},function(t,e){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},function(t,e,r){var n=r(71),i=r(72);e.decode=function(t,e){return(!e||e<=0?i.XML:i.HTML)(t)},e.decodeStrict=function(t,e){return(!e||e<=0?i.XML:i.HTMLStrict)(t)},e.encode=function(t,e){return(!e||e<=0?n.XML:n.HTML)(t)},e.encodeXML=n.XML,e.encodeHTML4=e.encodeHTML5=e.encodeHTML=n.HTML,e.decodeXML=e.decodeXMLStrict=i.XML,e.decodeHTML4=e.decodeHTML5=e.decodeHTML=i.HTML,e.decodeHTML4Strict=e.decodeHTML5Strict=e.decodeHTMLStrict=i.HTMLStrict,e.escape=n.escape},function(t,e,r){function n(t){return Object.keys(t).sort().reduce(function(e,r){return e[t[r]]="&"+r+";",e},{})}function i(t){var e=[],r=[];return Object.keys(t).forEach(function(t){1===t.length?e.push("\\"+t):r.push(t)}),r.unshift("["+e.join("")+"]"),new RegExp(r.join("|"),"g")}function o(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"}function s(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=1024*(e-55296)+r-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}function a(t,e){function r(e){return t[e]}return function(t){return t.replace(e,r).replace(d,s).replace(f,o)}}function u(t){return t.replace(g,o).replace(d,s).replace(f,o)}var c=n(r(35)),p=i(c);e.XML=a(c,p);var h=n(r(33)),l=i(h);e.HTML=a(h,l);var f=/[^\0-\x7F]/g,d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=i(c);e.escape=u},function(t,e,r){function n(t){var e=Object.keys(t).join("|"),r=o(t);e+="|#[xX][\\da-fA-F]+|#\\d+";var n=new RegExp("&(?:"+e+");","g");return function(t){return String(t).replace(n,r)}}function i(t,e){return t<e?1:-1}function o(t){return function(e){return"#"===e.charAt(1)?c("X"===e.charAt(2)||"x"===e.charAt(2)?parseInt(e.substr(3),16):parseInt(e.substr(2),10)):t[e.slice(1,-1)]}}var s=r(33),a=r(34),u=r(35),c=r(31),p=n(u),h=n(s),l=function(){function t(t){return";"!==t.substr(-1)&&(t+=";"),p(t)}for(var e=Object.keys(a).sort(i),r=Object.keys(s).sort(i),n=0,u=0;n<r.length;n++)e[u]===r[n]?(r[n]+=";?",u++):r[n]+=";";var c=new RegExp("&(?:"+r.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),p=o(s);return function(e){return String(e).replace(c,t)}}();t.exports={XML:p,HTML:l,HTMLStrict:h}},function(t,e){var r=e.getChildren=function(t){return t.children},n=e.getParent=function(t){return t.parent};e.getSiblings=function(t){var e=n(t);return e?r(e):[t]},e.getAttributeValue=function(t,e){return t.attribs&&t.attribs[e]},e.hasAttrib=function(t,e){return!!t.attribs&&hasOwnProperty.call(t.attribs,e)},e.getName=function(t){return t.name}},function(t,e){e.removeElement=function(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}},e.replaceElement=function(t,e){var r=e.prev=t.prev;r&&(r.next=e);var n=e.next=t.next;n&&(n.prev=e);var i=e.parent=t.parent;if(i){var o=i.children;o[o.lastIndexOf(t)]=e}},e.appendChild=function(t,e){if(e.parent=t,1!==t.children.push(e)){var r=t.children[t.children.length-2];r.next=e,e.prev=r,e.next=null}},e.append=function(t,e){var r=t.parent,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){var i=r.children;i.splice(i.lastIndexOf(n),0,e)}}else r&&r.children.push(e)},e.prepend=function(t,e){var r=t.parent;if(r){var n=r.children;n.splice(n.lastIndexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}},function(t,e,r){function n(t,e,r,n){return Array.isArray(e)||(e=[e]),"number"==typeof n&&isFinite(n)||(n=1/0),i(t,e,r!==!1,n)}function i(t,e,r,n){for(var o,s=[],a=0,u=e.length;a<u&&!(t(e[a])&&(s.push(e[a]),--n<=0))&&(o=e[a].children,!(r&&o&&o.length>0&&(o=i(t,o,r,n),s=s.concat(o),n-=o.length,n<=0)));a++);return s}function o(t,e){for(var r=0,n=e.length;r<n;r++)if(t(e[r]))return e[r];return null}function s(t,e){for(var r=null,n=0,i=e.length;n<i&&!r;n++)c(e[n])&&(t(e[n])?r=e[n]:e[n].children.length>0&&(r=s(t,e[n].children)));return r}function a(t,e){for(var r=0,n=e.length;r<n;r++)if(c(e[r])&&(t(e[r])||e[r].children.length>0&&a(t,e[r].children)))return!0;return!1}function u(t,e){for(var r=[],n=0,i=e.length;n<i;n++)c(e[n])&&(t(e[n])&&r.push(e[n]),e[n].children.length>0&&(r=r.concat(u(t,e[n].children))));return r}var c=r(37).isTag;t.exports={filter:n,find:i,findOneChild:o,findOne:s,existsOne:a,findAll:u}},function(t,e,r){function n(t,e){return"function"==typeof e?function(r){return r.attribs&&e(r.attribs[t])}:function(r){return r.attribs&&r.attribs[t]===e}}function i(t,e){return function(r){return t(r)||e(r)}}var o=r(37),s=e.isTag=o.isTag;e.testElement=function(t,e){for(var r in t)if(t.hasOwnProperty(r)){if("tag_name"===r){if(!s(e)||!t.tag_name(e.name))return!1}else if("tag_type"===r){if(!t.tag_type(e.type))return!1}else if("tag_contains"===r){if(s(e)||!t.tag_contains(e.data))return!1}else if(!e.attribs||!t[r](e.attribs[r]))return!1}else;return!0};var a={tag_name:function(t){return"function"==typeof t?function(e){return s(e)&&t(e.name)}:"*"===t?s:function(e){return s(e)&&e.name===t}},tag_type:function(t){return"function"==typeof t?function(e){return t(e.type)}:function(e){return e.type===t}},tag_contains:function(t){return"function"==typeof t?function(e){return!s(e)&&t(e.data)}:function(e){return!s(e)&&e.data===t}}};e.getElements=function(t,e,r,o){var s=Object.keys(t).map(function(e){var r=t[e];return e in a?a[e](r):n(e,r)});return 0===s.length?[]:this.filter(s.reduce(i),e,r,o)},e.getElementById=function(t,e,r){return Array.isArray(e)||(e=[e]),this.findOne(n("id",t),e,r!==!1)},e.getElementsByTagName=function(t,e,r,n){return this.filter(a.tag_name(t),e,r,n)},e.getElementsByTagType=function(t,e,r,n){return this.filter(a.tag_type(t),e,r,n)}},function(t,e){e.removeSubsets=function(t){for(var e,r,n,i=t.length;--i>-1;){for(e=r=t[i],t[i]=null,n=!0;r;){if(t.indexOf(r)>-1){n=!1,t.splice(i,1);break}r=r.parent}n&&(t[i]=e)}return t};var r={DISCONNECTED:1,PRECEDING:2,FOLLOWING:4,CONTAINS:8,CONTAINED_BY:16},n=e.compareDocumentPosition=function(t,e){var n,i,o,s,a,u,c=[],p=[];if(t===e)return 0;for(n=t;n;)c.unshift(n),n=n.parent;for(n=e;n;)p.unshift(n),n=n.parent;for(u=0;c[u]===p[u];)u++;return 0===u?r.DISCONNECTED:(i=c[u-1],o=i.children,s=c[u],a=p[u],o.indexOf(s)>o.indexOf(a)?i===e?r.FOLLOWING|r.CONTAINED_BY:r.FOLLOWING:i===t?r.PRECEDING|r.CONTAINS:r.PRECEDING)};e.uniqueSort=function(t){var e,i,o=t.length;for(t=t.slice();--o>-1;)e=t[o],i=t.indexOf(e),i>-1&&i<o&&t.splice(o,1);return t.sort(function(t,e){var i=n(t,e);return i&r.PRECEDING?-1:i&r.FOLLOWING?1:0}),t}},function(t,e,r){function n(t){this._cbs=t||{},this.events=[]}t.exports=n;var i=r(28).EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this.events.push([t]),this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this.events.push([t,e]),this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this.events.push([t,e,r]),this._cbs[t]&&this._cbs[t](e,r)}}}),n.prototype.onreset=function(){this.events=[],this._cbs.onreset&&this._cbs.onreset()},n.prototype.restart=function(){this._cbs.onreset&&this._cbs.onreset();for(var t=0,e=this.events.length;t<e;t++)if(this._cbs[this.events[t][0]]){var r=this.events[t].length;1===r?this._cbs[this.events[t][0]]():2===r?this._cbs[this.events[t][0]](this.events[t][1]):this._cbs[this.events[t][0]](this.events[t][1],this.events[t][2])}}},function(t,e){var r=function(t){return t.replace(/[<>&'"]/g,function(t){switch(t){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return"""}})};t.exports=r},function(t,e,r){var n=r(9),i=function(t){this._projectTimer=new n,this._projectTimer.start(),this._pausedTime=null,this._paused=!1,this.runtime=t};i.prototype.projectTimer=function(){return this._paused?this._pausedTime/1e3:this._projectTimer.timeElapsed()/1e3},i.prototype.pause=function(){this._paused=!0,this._pausedTime=this._projectTimer.timeElapsed()},i.prototype.resume=function(){this._paused=!1;var t=this._projectTimer.timeElapsed()-this._pausedTime;this._projectTimer.startTime+=t},i.prototype.resetProjectTimer=function(){this._projectTimer.start()},t.exports=i},function(t,e,r){var n=r(82),i=function(t){this._keysPressed=[],this.runtime=t};i.prototype._scratchKeyToKeyCode=function(t){if("number"==typeof t)return t;var e=n.toString(t);switch(e){case"space":return 32;case"left arrow":return 37;case"up arrow":return 38;case"right arrow":return 39;case"down arrow":return 40}return e.toUpperCase().charCodeAt(0)},i.prototype._keyCodeToScratchKey=function(t){if(t>=48&&t<=90)return String.fromCharCode(t).toLowerCase();switch(t){case 32:return"space";case 37:return"left arrow";case 38:return"up arrow";case 39:return"right arrow";case 40:return"down arrow"}return null},i.prototype.postData=function(t){if(t.keyCode){var e=this._keysPressed.indexOf(t.keyCode);t.isDown?(e<0&&this._keysPressed.push(t.keyCode),this.runtime.startHats("event_whenkeypressed",{KEY_OPTION:this._keyCodeToScratchKey(t.keyCode)}),this.runtime.startHats("event_whenkeypressed",{KEY_OPTION:"any"})):e>-1&&this._keysPressed.splice(e,1)}},i.prototype.getKeyIsDown=function(t){if("any"===t)return this._keysPressed.length>0;var e=this._scratchKeyToKeyCode(t);return this._keysPressed.indexOf(e)>-1},t.exports=i},function(t,e,r){var n=r(83),i=function(){};i.toNumber=function(t){var e=Number(t);return isNaN(e)?0:e},i.toBoolean=function(t){return"boolean"==typeof t?t:"string"==typeof t?""!==t&&"0"!==t&&"false"!==t.toLowerCase():Boolean(t)},i.toString=function(t){return String(t)},i.toRgbColorList=function(t){var e=i.toRgbColorObject(t);return[e.r,e.g,e.b]},i.toRgbColorObject=function(t){var e;return e="string"==typeof t&&"#"===t.substring(0,1)?n.hexToRgb(t):n.decimalToRgb(i.toNumber(t))},i.compare=function(t,e){var r=Number(t),n=Number(e);if(isNaN(r)||isNaN(n)){var i=String(t).toLowerCase(),o=String(e).toLowerCase();return i.localeCompare(o)}return r-n},i.isInt=function(t){return"number"==typeof t?!!isNaN(t)||t===parseInt(t,10):"boolean"==typeof t||"string"==typeof t&&t.indexOf(".")<0},i.LIST_INVALID="INVALID",i.LIST_ALL="ALL",i.toListIndex=function(t,e){if("number"!=typeof t){if("all"===t)return i.LIST_ALL;if("last"===t)return e>0?e:i.LIST_INVALID;if("random"===t||"any"===t)return e>0?1+Math.floor(Math.random()*e):i.LIST_INVALID}return t=Math.floor(i.toNumber(t)),t<1||t>e?i.LIST_INVALID:t},t.exports=i},function(t,e){var r=function(){};r.RGB_BLACK={r:0,g:0,b:0},r.RGB_WHITE={r:255,g:255,b:255},r.decimalToHex=function(t){t<0&&(t+=16777216);var e=Number(t).toString(16);return e="#"+"000000".substr(0,6-e.length)+e},r.decimalToRgb=function(t){var e=t>>24&255,r=t>>16&255,n=t>>8&255,i=255&t;return{r:r,g:n,b:i,a:e>0?e:255}},r.hexToRgb=function(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,r,n){return e+e+r+r+n+n});var r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return r?{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)}:null},r.rgbToHex=function(t){return r.decimalToHex(r.rgbToDecimal(t))},r.rgbToDecimal=function(t){return(t.r<<16)+(t.g<<8)+t.b},r.hexToDecimal=function(t){return r.rgbToDecimal(r.hexToRgb(t))},r.hsvToRgb=function(t){var e=t.h%360;e<0&&(e+=360);var r,n,i,o=Math.max(0,Math.min(t.s,1)),s=Math.max(0,Math.min(t.v,1)),a=Math.floor(e/60),u=e/60-a,c=s*(1-o),p=s*(1-o*u),h=s*(1-o*(1-u));switch(a){default:case 0:r=s,n=h,i=c;break;case 1:r=p,n=s,i=c;break;case 2:r=c,n=s,i=h;break;case 3:r=c,n=p,i=s;break;case 4:r=h,n=c,i=s;break;case 5:r=s,n=c,i=p}return{r:Math.floor(255*r),g:Math.floor(255*n),b:Math.floor(255*i)}},r.rgbToHsv=function(t){var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(Math.min(e,r),n),o=Math.max(Math.max(e,r),n),s=0,a=0;if(i!==o){var u=e===i?r-n:r===i?n-e:e-r,c=e===i?3:r===i?5:1;s=60*(c-u/(o-i))%360,a=(o-i)/o}return{h:s,s:a,v:o}},r.mixRgb=function(t,e,r){if(r<=0)return t;if(r>=1)return e;var n=1-r;return{r:n*t.r+r*e.r,g:n*t.g+r*e.g,b:n*t.b+r*e.b}},t.exports=r},function(t,e,r){var n=r(85),i=function(t){this._x=0,this._y=0,this._isDown=!1,this.runtime=t};i.prototype._activateClickHats=function(t,e){if(this.runtime.renderer)for(var r=this.runtime.renderer.pick(t,e),n=0;n<this.runtime.targets.length;n++){var i=this.runtime.targets[n];if(i.hasOwnProperty("drawableID")&&i.drawableID===r)return void this.runtime.startHats("event_whenthisspriteclicked",null,i)}},i.prototype.postData=function(t){t.x&&(this._x=t.x-t.canvasWidth/2),t.y&&(this._y=t.y-t.canvasHeight/2),"undefined"!=typeof t.isDown&&(this._isDown=t.isDown,this._isDown&&this._activateClickHats(t.x,t.y))},i.prototype.getX=function(){return n.clamp(this._x,-240,240)},i.prototype.getY=function(){return n.clamp(-this._y,-180,180)},i.prototype.getIsDown=function(){return this._isDown},t.exports=i},function(t,e){var r=function(){};r.degToRad=function(t){return t*Math.PI/180},r.radToDeg=function(t){return 180*t/Math.PI},r.clamp=function(t,e,r){return Math.min(Math.max(t,e),r)},r.wrapClamp=function(t,e,r){var n=r-e+1;return t-Math.floor((t-e)/n)*n},t.exports=r},function(t,e,r){var n=r(82),i=r(9),o=function(t){this.runtime=t};o.prototype.getPrimitives=function(){return{control_repeat:this.repeat,control_repeat_until:this.repeatUntil,control_forever:this.forever,control_wait:this.wait,control_wait_until:this.waitUntil,control_if:this["if"],control_if_else:this.ifElse,control_stop:this.stop,control_create_clone_of:this.createClone,control_delete_this_clone:this.deleteClone}},o.prototype.getHats=function(){return{control_start_as_clone:{restartExistingThreads:!1}}},o.prototype.repeat=function(t,e){var r=Math.floor(n.toNumber(t.TIMES));"undefined"==typeof e.stackFrame.loopCounter&&(e.stackFrame.loopCounter=r),e.stackFrame.loopCounter--,e.stackFrame.loopCounter>=0&&e.startBranch(1,!0)},o.prototype.repeatUntil=function(t,e){var r=n.toBoolean(t.CONDITION);r||e.startBranch(1,!0)},o.prototype.waitUntil=function(t,e){var r=n.toBoolean(t.CONDITION);r||e["yield"]()},o.prototype.forever=function(t,e){e.startBranch(1,!0)},o.prototype.wait=function(t,e){if(e.stackFrame.timer){var r=Math.max(0,1e3*n.toNumber(t.DURATION));e.stackFrame.timer.timeElapsed()<r&&e["yield"]()}else e.stackFrame.timer=new i,e.stackFrame.timer.start(),e["yield"](),this.runtime.requestRedraw()},o.prototype["if"]=function(t,e){var r=n.toBoolean(t.CONDITION);r&&e.startBranch(1,!1)},o.prototype.ifElse=function(t,e){var r=n.toBoolean(t.CONDITION);r?e.startBranch(1,!1):e.startBranch(2,!1)},o.prototype.stop=function(t,e){var r=t.STOP_OPTION;"all"===r?e.stopAll():"other scripts in sprite"===r||"other scripts in stage"===r?e.stopOtherTargetThreads():"this script"===r&&e.stopThread()},o.prototype.createClone=function(t,e){var r;if(r="_myself_"===t.CLONE_OPTION?e.target:this.runtime.getSpriteTargetByName(t.CLONE_OPTION)){var n=r.makeClone();n&&this.runtime.targets.push(n)}},o.prototype.deleteClone=function(t,e){e.target.isOriginal||(this.runtime.disposeTarget(e.target),this.runtime.stopForTarget(e.target))},t.exports=o},function(t,e,r){var n=r(82),i=function(t){this.runtime=t};i.prototype.getPrimitives=function(){return{event_broadcast:this.broadcast,event_broadcastandwait:this.broadcastAndWait,event_whengreaterthan:this.hatGreaterThanPredicate}},i.prototype.getHats=function(){return{event_whenflagclicked:{restartExistingThreads:!0},event_whenkeypressed:{restartExistingThreads:!1},event_whenthisspriteclicked:{restartExistingThreads:!0},event_whenbackdropswitchesto:{restartExistingThreads:!0},event_whengreaterthan:{restartExistingThreads:!1,edgeActivated:!0},event_whenbroadcastreceived:{restartExistingThreads:!0}}},i.prototype.hatGreaterThanPredicate=function(t,e){var r=n.toString(t.WHENGREATERTHANMENU).toLowerCase(),i=n.toNumber(t.VALUE);return"timer"===r&&e.ioQuery("clock","projectTimer")>i},i.prototype.broadcast=function(t,e){var r=n.toString(t.BROADCAST_OPTION);e.startHats("event_whenbroadcastreceived",{BROADCAST_OPTION:r})},i.prototype.broadcastAndWait=function(t,e){var r=n.toString(t.BROADCAST_OPTION);if(e.stackFrame.startedThreads||(e.stackFrame.startedThreads=e.startHats("event_whenbroadcastreceived",{BROADCAST_OPTION:r}),0!==e.stackFrame.startedThreads.length)){var i=this,o=e.stackFrame.startedThreads.some(function(t){return i.runtime.isActiveThread(t)});o&&e["yield"]()}},t.exports=i},function(t,e,r){var n=r(82),i=function(t){this.runtime=t};i.prototype.getPrimitives=function(){return{looks_say:this.say,looks_sayforsecs:this.sayforsecs,looks_think:this.think,looks_thinkforsecs:this.sayforsecs,looks_show:this.show,looks_hide:this.hide,looks_switchcostumeto:this.switchCostume,looks_switchbackdropto:this.switchBackdrop,looks_switchbackdroptoandwait:this.switchBackdropAndWait,looks_nextcostume:this.nextCostume,looks_nextbackdrop:this.nextBackdrop,looks_changeeffectby:this.changeEffect,looks_seteffectto:this.setEffect,looks_cleargraphiceffects:this.clearEffects,looks_changesizeby:this.changeSize,looks_setsizeto:this.setSize,looks_gotofront:this.goToFront,looks_gobacklayers:this.goBackLayers,looks_size:this.getSize,looks_costumeorder:this.getCostumeIndex,looks_backdroporder:this.getBackdropIndex,looks_backdropname:this.getBackdropName}},i.prototype.say=function(t,e){e.target.setSay("say",t.MESSAGE)},i.prototype.sayforsecs=function(t,e){return e.target.setSay("say",t.MESSAGE),new Promise(function(r){setTimeout(function(){e.target.setSay(),r()},1e3*t.SECS)})},i.prototype.think=function(t,e){e.target.setSay("think",t.MESSAGE)},i.prototype.thinkforsecs=function(t,e){return e.target.setSay("think",t.MESSAGE),new Promise(function(r){setTimeout(function(){e.target.setSay(),r()},1e3*t.SECS)})},i.prototype.show=function(t,e){e.target.setVisible(!0)},i.prototype.hide=function(t,e){e.target.setVisible(!1)},i.prototype._setCostumeOrBackdrop=function(t,e,r){if("number"==typeof e)t.setCostume(r?e:e-1);else{var i=t.getCostumeIndexByName(e);if(i>-1)t.setCostume(i);else if("previous costume"===e||"previous backdrop"===e)t.setCostume(t.currentCostume-1);else if("next costume"===e||"next backdrop"===e)t.setCostume(t.currentCostume+1);else{var o=n.toNumber(e);isNaN(o)||t.setCostume(r?o:o-1)}}if(t===this.runtime.getTargetForStage()){var s=t.sprite.costumes[t.currentCostume].name;return this.runtime.startHats("event_whenbackdropswitchesto",{BACKDROP:s})}return[]},i.prototype.switchCostume=function(t,e){this._setCostumeOrBackdrop(e.target,t.COSTUME)},i.prototype.nextCostume=function(t,e){this._setCostumeOrBackdrop(e.target,e.target.currentCostume+1,!0)},i.prototype.switchBackdrop=function(t){this._setCostumeOrBackdrop(this.runtime.getTargetForStage(),t.BACKDROP)},i.prototype.switchBackdropAndWait=function(t,e){if(e.stackFrame.startedThreads||(e.stackFrame.startedThreads=this._setCostumeOrBackdrop(this.runtime.getTargetForStage(),t.BACKDROP),0!==e.stackFrame.startedThreads.length)){var r=this,n=e.stackFrame.startedThreads.some(function(t){return r.runtime.isActiveThread(t)});n&&e["yield"]()}},i.prototype.nextBackdrop=function(){var t=this.runtime.getTargetForStage();this._setCostumeOrBackdrop(t,t.currentCostume+1,!0)},i.prototype.changeEffect=function(t,e){var r=n.toString(t.EFFECT).toLowerCase(),i=n.toNumber(t.CHANGE);if(e.target.effects.hasOwnProperty(r)){var o=i+e.target.effects[r];e.target.setEffect(r,o)}},i.prototype.setEffect=function(t,e){var r=n.toString(t.EFFECT).toLowerCase(),i=n.toNumber(t.VALUE);e.target.setEffect(r,i)},i.prototype.clearEffects=function(t,e){e.target.clearEffects()},i.prototype.changeSize=function(t,e){var r=n.toNumber(t.CHANGE);e.target.setSize(e.target.size+r)},i.prototype.setSize=function(t,e){var r=n.toNumber(t.SIZE);e.target.setSize(r)},i.prototype.goToFront=function(t,e){e.target.goToFront()},i.prototype.goBackLayers=function(t,e){e.target.goBackLayers(t.NUM)},i.prototype.getSize=function(t,e){return e.target.size},i.prototype.getBackdropIndex=function(){var t=this.runtime.getTargetForStage();return t.currentCostume+1},i.prototype.getBackdropName=function(){var t=this.runtime.getTargetForStage();return t.sprite.costumes[t.currentCostume].name},i.prototype.getCostumeIndex=function(t,e){return e.target.currentCostume+1},t.exports=i},function(t,e,r){var n=r(82),i=r(85),o=r(9),s=function(t){this.runtime=t};s.prototype.getPrimitives=function(){return{motion_movesteps:this.moveSteps,motion_gotoxy:this.goToXY,motion_goto:this.goTo,motion_turnright:this.turnRight,motion_turnleft:this.turnLeft,motion_pointindirection:this.pointInDirection,motion_pointtowards:this.pointTowards,motion_glidesecstoxy:this.glide,motion_ifonedgebounce:this.ifOnEdgeBounce,motion_setrotationstyle:this.setRotationStyle,motion_changexby:this.changeX,motion_setx:this.setX,motion_changeyby:this.changeY,motion_sety:this.setY,motion_xposition:this.getX,motion_yposition:this.getY,motion_direction:this.getDirection}},s.prototype.moveSteps=function(t,e){var r=n.toNumber(t.STEPS),o=i.degToRad(90-e.target.direction),s=r*Math.cos(o),a=r*Math.sin(o);e.target.setXY(e.target.x+s,e.target.y+a)},s.prototype.goToXY=function(t,e){var r=n.toNumber(t.X),i=n.toNumber(t.Y);e.target.setXY(r,i)},s.prototype.goTo=function(t,e){var r=0,n=0;if("_mouse_"===t.TO)r=e.ioQuery("mouse","getX"),n=e.ioQuery("mouse","getY");else if("_random_"===t.TO){var i=this.runtime.constructor.STAGE_WIDTH,o=this.runtime.constructor.STAGE_HEIGHT;r=Math.round(i*(Math.random()-.5)),n=Math.round(o*(Math.random()-.5))}else{var s=this.runtime.getSpriteTargetByName(t.TO);if(!s)return;r=s.x,n=s.y}e.target.setXY(r,n)},s.prototype.turnRight=function(t,e){var r=n.toNumber(t.DEGREES);e.target.setDirection(e.target.direction+r)},s.prototype.turnLeft=function(t,e){var r=n.toNumber(t.DEGREES);e.target.setDirection(e.target.direction-r)},s.prototype.pointInDirection=function(t,e){var r=n.toNumber(t.DIRECTION);e.target.setDirection(r)},s.prototype.pointTowards=function(t,e){var r=0,n=0;if("_mouse_"===t.TOWARDS)r=e.ioQuery("mouse","getX"),n=e.ioQuery("mouse","getY");else{var o=this.runtime.getSpriteTargetByName(t.TOWARDS);if(!o)return;r=o.x,n=o.y}var s=r-e.target.x,a=n-e.target.y,u=90-i.radToDeg(Math.atan2(a,s));e.target.setDirection(u)},s.prototype.glide=function(t,e){if(e.stackFrame.timer){var r=e.stackFrame.timer.timeElapsed();if(r<1e3*e.stackFrame.duration){var i=r/(1e3*e.stackFrame.duration),s=i*(e.stackFrame.endX-e.stackFrame.startX),a=i*(e.stackFrame.endY-e.stackFrame.startY);e.target.setXY(e.stackFrame.startX+s,e.stackFrame.startY+a),e["yield"]()}else e.target.setXY(e.stackFrame.endX,e.stackFrame.endY)}else{if(e.stackFrame.timer=new o,e.stackFrame.timer.start(),e.stackFrame.duration=n.toNumber(t.SECS),e.stackFrame.startX=e.target.x,e.stackFrame.startY=e.target.y,e.stackFrame.endX=n.toNumber(t.X),e.stackFrame.endY=n.toNumber(t.Y),e.stackFrame.duration<=0)return void e.target.setXY(e.stackFrame.endX,e.stackFrame.endY);e["yield"]()}},s.prototype.ifOnEdgeBounce=function(t,e){var r=e.target.getBounds();if(r){var n=this.runtime.constructor.STAGE_WIDTH,o=this.runtime.constructor.STAGE_HEIGHT,s=Math.max(0,n/2+r.left),a=Math.max(0,o/2-r.top),u=Math.max(0,n/2-r.right),c=Math.max(0,o/2+r.bottom),p="",h=1/0;if(s<h&&(h=s,p="left"),a<h&&(h=a,p="top"),u<h&&(h=u,p="right"),c<h&&(h=c,p="bottom"),!(h>0)){var l=i.degToRad(90-e.target.direction),f=Math.cos(l),d=-Math.sin(l);"left"===p?f=Math.max(.2,Math.abs(f)):"top"===p?d=Math.max(.2,Math.abs(d)):"right"===p?f=0-Math.max(.2,Math.abs(f)):"bottom"===p&&(d=0-Math.max(.2,Math.abs(d)));var g=i.radToDeg(Math.atan2(d,f))+90;e.target.setDirection(g);var m=e.target.keepInFence(e.target.x,e.target.y);e.target.setXY(m[0],m[1])}}},s.prototype.setRotationStyle=function(t,e){e.target.setRotationStyle(t.STYLE)},s.prototype.changeX=function(t,e){var r=n.toNumber(t.DX);e.target.setXY(e.target.x+r,e.target.y)},s.prototype.setX=function(t,e){var r=n.toNumber(t.X);e.target.setXY(r,e.target.y)},s.prototype.changeY=function(t,e){var r=n.toNumber(t.DY);e.target.setXY(e.target.x,e.target.y+r)},s.prototype.setY=function(t,e){var r=n.toNumber(t.Y);e.target.setXY(e.target.x,r)},s.prototype.getX=function(t,e){return e.target.x},s.prototype.getY=function(t,e){return e.target.y},s.prototype.getDirection=function(t,e){return e.target.direction},t.exports=s},function(t,e,r){var n=r(82),i=function(t){this.runtime=t};i.prototype.getPrimitives=function(){return{operator_add:this.add,operator_subtract:this.subtract,operator_multiply:this.multiply,operator_divide:this.divide,operator_lt:this.lt,operator_equals:this.equals,operator_gt:this.gt,operator_and:this.and,operator_or:this.or,operator_not:this.not,operator_random:this.random,operator_join:this.join,operator_letter_of:this.letterOf,operator_length:this.length,operator_mod:this.mod,operator_round:this.round,operator_mathop:this.mathop}},i.prototype.add=function(t){return n.toNumber(t.NUM1)+n.toNumber(t.NUM2)},i.prototype.subtract=function(t){return n.toNumber(t.NUM1)-n.toNumber(t.NUM2)},i.prototype.multiply=function(t){return n.toNumber(t.NUM1)*n.toNumber(t.NUM2)},i.prototype.divide=function(t){return n.toNumber(t.NUM1)/n.toNumber(t.NUM2)},i.prototype.lt=function(t){return n.compare(t.OPERAND1,t.OPERAND2)<0},i.prototype.equals=function(t){return 0===n.compare(t.OPERAND1,t.OPERAND2)},i.prototype.gt=function(t){return n.compare(t.OPERAND1,t.OPERAND2)>0},i.prototype.and=function(t){return n.toBoolean(t.OPERAND1)&&n.toBoolean(t.OPERAND2)},i.prototype.or=function(t){return n.toBoolean(t.OPERAND1)||n.toBoolean(t.OPERAND2)},i.prototype.not=function(t){return!n.toBoolean(t.OPERAND)},i.prototype.random=function(t){var e=n.toNumber(t.FROM),r=n.toNumber(t.TO),i=e<=r?e:r,o=e<=r?r:e;return i===o?i:n.isInt(t.FROM)&&n.isInt(t.TO)?i+parseInt(Math.random()*(o+1-i),10):Math.random()*(o-i)+i},i.prototype.join=function(t){return n.toString(t.STRING1)+n.toString(t.STRING2)},i.prototype.letterOf=function(t){var e=n.toNumber(t.LETTER)-1,r=n.toString(t.STRING);return e<0||e>=r.length?"":r.charAt(e)},i.prototype.length=function(t){return n.toString(t.STRING).length},i.prototype.mod=function(t){var e=n.toNumber(t.NUM1),r=n.toNumber(t.NUM2),i=e%r;return i/r<0&&(i+=r),i},i.prototype.round=function(t){return Math.round(n.toNumber(t.NUM))},i.prototype.mathop=function(t){var e=n.toString(t.OPERATOR).toLowerCase(),r=n.toNumber(t.NUM);switch(e){case"abs":return Math.abs(r);case"floor":return Math.floor(r);case"ceiling":return Math.ceil(r);case"sqrt":return Math.sqrt(r);case"sin":return Math.sin(Math.PI*r/180);case"cos":return Math.cos(Math.PI*r/180);case"tan":return Math.tan(Math.PI*r/180);case"asin":return 180*Math.asin(r)/Math.PI;case"acos":return 180*Math.acos(r)/Math.PI;case"atan":return 180*Math.atan(r)/Math.PI;case"ln":return Math.log(r);case"log":return Math.log(r)/Math.LN10;case"e ^":return Math.exp(r);case"10 ^":return Math.pow(10,r)}return 0},t.exports=i},function(t,e,r){var n=r(85),i=r(82),o=function(t){this.runtime=t};o.prototype.getPrimitives=function(){return{sound_play:this.playSound,sound_playuntildone:this.playSoundAndWait,sound_stopallsounds:this.stopAllSounds,sound_playnoteforbeats:this.playNoteForBeats,sound_playdrumforbeats:this.playDrumForBeats,sound_restforbeats:this.restForBeats,sound_setinstrumentto:this.setInstrument,sound_seteffectto:this.setEffect,sound_changeeffectby:this.changeEffect,sound_cleareffects:this.clearEffects,sound_sounds_menu:this.soundsMenu,sound_beats_menu:this.beatsMenu,sound_effects_menu:this.effectsMenu,sound_setvolumeto:this.setVolume,sound_changevolumeby:this.changeVolume,sound_volume:this.getVolume,sound_settempotobpm:this.setTempo,sound_changetempoby:this.changeTempo,sound_tempo:this.getTempo}},o.prototype.playSound=function(t,e){var r=this._getSoundIndex(t.SOUND_MENU,e);e.target.playSound(r)},o.prototype.playSoundAndWait=function(t,e){var r=this._getSoundIndex(t.SOUND_MENU,e);return e.target.playSound(r)},o.prototype._getSoundIndex=function(t,e){if(0===e.target.sprite.sounds.length)return 0;var r;if(Number(t)){t=Number(t);var i=e.target.sprite.sounds.length;r=n.wrapClamp(t,1,i)-1}else r=e.target.getSoundIndexByName(t),r===-1&&(r=0);return r},o.prototype.stopAllSounds=function(t,e){e.target.audioPlayer.stopAllSounds()},o.prototype.playNoteForBeats=function(t,e){var r=i.toNumber(t.NOTE),n=i.toNumber(t.BEATS);return e.target.playNoteForBeats(r,n)},o.prototype.playDrumForBeats=function(t,e){var r=i.toNumber(t.DRUM);r-=1,r=n.wrapClamp(r,0,this.runtime.audioEngine.numDrums);var o=i.toNumber(t.BEATS);return e.target.audioPlayer.playDrumForBeats(r,o)},o.prototype.restForBeats=function(t){var e=i.toNumber(t.BEATS);return this.runtime.audioEngine.waitForBeats(e)},o.prototype.setInstrument=function(t,e){var r=i.toNumber(t.INSTRUMENT);return r-=1,r=n.wrapClamp(r,0,this.runtime.audioEngine.numInstruments),e.target.setInstrument(r),this.runtime.audioEngine.instrumentPlayer.loadInstrument(r)},o.prototype.setEffect=function(t,e){var r=i.toString(t.EFFECT).toLowerCase(),n=i.toNumber(t.VALUE);e.target.setAudioEffect(r,n)},o.prototype.changeEffect=function(t,e){
|
||
var r=i.toString(t.EFFECT).toLowerCase(),n=i.toNumber(t.VALUE);if(e.target.audioEffects.hasOwnProperty(r)){var o=n+e.target.audioEffects[r];e.target.setAudioEffect(r,o)}},o.prototype.clearEffects=function(t,e){e.target.audioPlayer.clearEffects()},o.prototype.setVolume=function(t,e){var r=i.toNumber(t.VOLUME);e.target.audioPlayer.setVolume(r)},o.prototype.changeVolume=function(t,e){var r=i.toNumber(t.VOLUME);e.target.audioPlayer.changeVolume(r)},o.prototype.getVolume=function(t,e){return e.target.audioPlayer.currentVolume},o.prototype.setTempo=function(t){var e=i.toNumber(t.TEMPO);this.runtime.audioEngine.setTempo(e)},o.prototype.changeTempo=function(t){var e=i.toNumber(t.TEMPO);this.runtime.audioEngine.changeTempo(e)},o.prototype.getTempo=function(){return this.runtime.audioEngine.currentTempo},o.prototype.soundsMenu=function(t){return t.SOUND_MENU},o.prototype.beatsMenu=function(t){return t.BEATS},o.prototype.effectsMenu=function(t){return t.EFFECT},t.exports=o},function(t,e,r){var n=r(82),i=function(t){this.runtime=t};i.prototype.getPrimitives=function(){return{sensing_touchingobject:this.touchingObject,sensing_touchingcolor:this.touchingColor,sensing_coloristouchingcolor:this.colorTouchingColor,sensing_distanceto:this.distanceTo,sensing_timer:this.getTimer,sensing_resettimer:this.resetTimer,sensing_of:this.getAttributeOf,sensing_mousex:this.getMouseX,sensing_mousey:this.getMouseY,sensing_mousedown:this.getMouseDown,sensing_keypressed:this.getKeyPressed,sensing_current:this.current,sensing_dayssince2000:this.daysSince2000}},i.prototype.touchingObject=function(t,e){var r=t.TOUCHINGOBJECTMENU;if("_mouse_"===r){var n=e.ioQuery("mouse","getX"),i=e.ioQuery("mouse","getY");return e.target.isTouchingPoint(n,i)}return"_edge_"===r?e.target.isTouchingEdge():e.target.isTouchingSprite(r)},i.prototype.touchingColor=function(t,e){var r=n.toRgbColorList(t.COLOR);return e.target.isTouchingColor(r)},i.prototype.colorTouchingColor=function(t,e){var r=n.toRgbColorList(t.COLOR),i=n.toRgbColorList(t.COLOR2);return e.target.colorIsTouchingColor(i,r)},i.prototype.distanceTo=function(t,e){if(e.target.isStage)return 1e4;var r=0,n=0;if("_mouse_"===t.DISTANCETOMENU)r=e.ioQuery("mouse","getX"),n=e.ioQuery("mouse","getY");else{var i=this.runtime.getSpriteTargetByName(t.DISTANCETOMENU);if(!i)return 1e4;r=i.x,n=i.y}var o=e.target.x-r,s=e.target.y-n;return Math.sqrt(o*o+s*s)},i.prototype.getTimer=function(t,e){return e.ioQuery("clock","projectTimer")},i.prototype.resetTimer=function(t,e){e.ioQuery("clock","resetProjectTimer")},i.prototype.getMouseX=function(t,e){return e.ioQuery("mouse","getX")},i.prototype.getMouseY=function(t,e){return e.ioQuery("mouse","getY")},i.prototype.getMouseDown=function(t,e){return e.ioQuery("mouse","getIsDown")},i.prototype.current=function(t){var e=n.toString(t.CURRENTMENU).toLowerCase(),r=new Date;switch(e){case"year":return r.getFullYear();case"month":return r.getMonth()+1;case"date":return r.getDate();case"dayofweek":return r.getDay()+1;case"hour":return r.getHours();case"minute":return r.getMinutes();case"second":return r.getSeconds()}return 0},i.prototype.getKeyPressed=function(t,e){return e.ioQuery("keyboard","getKeyIsDown",t.KEY_OPTION)},i.prototype.daysSince2000=function(){var t=864e5,e=new Date(2e3,0,1),r=new Date,n=r.getTimezoneOffset()-e.getTimezoneOffset(),i=r.valueOf()-e.valueOf();return i+=60*(r.getTimezoneOffset()-n)*1e3,i/t},i.prototype.getAttributeOf=function(t){var e;if(e="_stage_"===t.OBJECT?this.runtime.getTargetForStage():this.runtime.getSpriteTargetByName(t.OBJECT),e.isStage)switch(t.PROPERTY){case"background #":return e.currentCostume+1;case"backdrop #":return e.currentCostume+1;case"backdrop name":return e.sprite.costumes[e.currentCostume].name;case"volume":return}else switch(t.PROPERTY){case"x position":return e.x;case"y position":return e.y;case"direction":return e.direction;case"costume #":return e.currentCostume+1;case"costume name":return e.sprite.costumes[e.currentCostume].name;case"size":return e.size;case"volume":return}var r=t.PROPERTY;return e.variables.hasOwnProperty(r)?e.variables[r].value:0},t.exports=i},function(t,e,r){var n=r(82),i=function(t){this.runtime=t};i.prototype.getPrimitives=function(){return{data_variable:this.getVariable,data_setvariableto:this.setVariableTo,data_changevariableby:this.changeVariableBy,data_listcontents:this.getListContents,data_addtolist:this.addToList,data_deleteoflist:this.deleteOfList,data_insertatlist:this.insertAtList,data_replaceitemoflist:this.replaceItemOfList,data_itemoflist:this.getItemOfList,data_lengthoflist:this.lengthOfList,data_listcontainsitem:this.listContainsItem}},i.prototype.getVariable=function(t,e){var r=e.target.lookupOrCreateVariable(t.VARIABLE);return r.value},i.prototype.setVariableTo=function(t,e){var r=e.target.lookupOrCreateVariable(t.VARIABLE);r.value=t.VALUE},i.prototype.changeVariableBy=function(t,e){var r=e.target.lookupOrCreateVariable(t.VARIABLE),i=n.toNumber(r.value),o=n.toNumber(t.VALUE);r.value=i+o},i.prototype.getListContents=function(t,e){for(var r=e.target.lookupOrCreateList(t.LIST),n=!0,i=0;i<r.contents.length;i++){var o=r.contents[i];if("string"!=typeof o||1!==o.length){n=!1;break}}return n?r.contents.join(""):r.contents.join(" ")},i.prototype.addToList=function(t,e){var r=e.target.lookupOrCreateList(t.LIST);r.contents.push(t.ITEM)},i.prototype.deleteOfList=function(t,e){var r=e.target.lookupOrCreateList(t.LIST),i=n.toListIndex(t.INDEX,r.contents.length);if(i!==n.LIST_INVALID)return i===n.LIST_ALL?void(r.contents=[]):void r.contents.splice(i-1,1)},i.prototype.insertAtList=function(t,e){var r=t.ITEM,i=e.target.lookupOrCreateList(t.LIST),o=n.toListIndex(t.INDEX,i.contents.length+1);o!==n.LIST_INVALID&&i.contents.splice(o-1,0,r)},i.prototype.replaceItemOfList=function(t,e){var r=t.ITEM,i=e.target.lookupOrCreateList(t.LIST),o=n.toListIndex(t.INDEX,i.contents.length);o!==n.LIST_INVALID&&i.contents.splice(o-1,1,r)},i.prototype.getItemOfList=function(t,e){var r=e.target.lookupOrCreateList(t.LIST),i=n.toListIndex(t.INDEX,r.contents.length);return i===n.LIST_INVALID?"":r.contents[i-1]},i.prototype.lengthOfList=function(t,e){var r=e.target.lookupOrCreateList(t.LIST);return r.contents.length},i.prototype.listContainsItem=function(t,e){var r=t.ITEM,i=e.target.lookupOrCreateList(t.LIST);if(i.contents.indexOf(r)>=0)return!0;for(var o=0;o<i.contents.length;o++)if(0===n.compare(i.contents[o],r))return!0;return!1},t.exports=i},function(t,e){var r=function(t){this.runtime=t};r.prototype.getPrimitives=function(){return{procedures_defnoreturn:this.defNoReturn,procedures_callnoreturn:this.callNoReturn,procedures_param:this.param}},r.prototype.defNoReturn=function(){},r.prototype.callNoReturn=function(t,e){if(!e.stackFrame.executed){for(var r=t.mutation.proccode,n=e.getProcedureParamNames(r),i=0;i<n.length;i++)t.hasOwnProperty("input"+i)&&e.pushParam(n[i],t["input"+i]);e.stackFrame.executed=!0,e.startProcedure(r)}},r.prototype.param=function(t,e){var r=e.getParam(t.mutation.paramname);return r},t.exports=r},function(t,e,r){var n=r(25),i=r(96),o=r(101),s=r(83),a=r(12),u=r(100),c=r(102),p=r(98),h=r(99),l=function(t,e,r){if(t.hasOwnProperty("objName")){var s=new n,a=new o(s,e);if(t.hasOwnProperty("objName")&&(a.name=t.objName),t.hasOwnProperty("costumes"))for(var u=0;u<t.costumes.length;u++){var c=t.costumes[u];a.costumes.push({skin:"https://cdn.assets.scratch.mit.edu/internalapi/asset/"+c.baseLayerMD5+"/get/",name:c.costumeName,bitmapResolution:c.bitmapResolution,rotationCenterX:c.rotationCenterX,rotationCenterY:c.rotationCenterY})}if(t.hasOwnProperty("sounds"))for(var f=0;f<t.sounds.length;f++){var g=t.sounds[f];a.sounds.push({format:g.format,fileUrl:"https://cdn.assets.scratch.mit.edu/internalapi/asset/"+g.md5+"/get/",rate:g.rate,sampleCount:g.sampleCount,soundID:g.soundID,name:g.soundName,md5:g.md5})}t.hasOwnProperty("scripts")&&d(t.scripts,s);var m=a.createClone();if(e.targets.push(m),t.hasOwnProperty("variables"))for(var _=0;_<t.variables.length;_++){var y=t.variables[_];m.variables[y.name]=new p(y.name,y.value,y.isPersistent)}if(t.hasOwnProperty("lists"))for(var b=0;b<t.lists.length;b++){var v=t.lists[b];m.lists[v.listName]=new h(v.listName,v.contents)}if(t.hasOwnProperty("scratchX")&&(m.x=t.scratchX),t.hasOwnProperty("scratchY")&&(m.y=t.scratchY),t.hasOwnProperty("direction")&&(m.direction=t.direction),t.hasOwnProperty("scale")&&(m.size=100*t.scale),t.hasOwnProperty("visible")&&(m.visible=t.visible),t.hasOwnProperty("currentCostumeIndex")&&(m.currentCostume=Math.round(t.currentCostumeIndex)),t.hasOwnProperty("rotationStyle")&&("none"===t.rotationStyle?m.rotationStyle=i.ROTATION_STYLE_NONE:"leftRight"===t.rotationStyle?m.rotationStyle=i.ROTATION_STYLE_LEFT_RIGHT:"normal"===t.rotationStyle&&(m.rotationStyle=i.ROTATION_STYLE_ALL_AROUND)),m.isStage=r,m.updateAllDrawableProperties(),t.children)for(var w=0;w<t.children.length;w++)l(t.children[w],e,!1);return m}},f=function(t,e,r){return l(JSON.parse(t),e,!r)},d=function(t,e){for(var r=0;r<t.length;r++){var n=t[r],i=n[0],o=n[1],s=n[2],a=g(s);a[0]&&(a[0].x=1.5*i,a[0].y=2.2*o,a[0].topLevel=!0,a[0].parent=null);for(var u=m(a),c=0;c<u.length;c++)e.createBlock(u[c])}},g=function(t){for(var e=[],r=null,n=0;n<t.length;n++){var i=t[n],o=y(i);r&&(o.parent=r.id,r.next=o.id),r=o,e.push(o)}return e},m=function(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];e.push(n),n.children&&(e=e.concat(m(n.children))),delete n.children}return e},_=function(t){for(var e=[{}],r="input",n=0,i=t.split(/(?=[^\\]%[nbs])/),o=0;o<i.length;o++){var s=i[o].trim();if("%"===s.substring(0,1)){var a=s.substring(1,2),u={type:"input",inputName:r+n++};"n"===a?u.inputOp="math_number":"s"===a&&(u.inputOp="text"),e.push(u)}}return e},y=function(t){var e=t[0];if(!e||!c[e])return void a.warn("Couldn't find SB2 block: ",e);var r=c[e],n={id:u(),opcode:r.opcode,inputs:{},fields:{},next:null,shadow:!1,children:[]};"call"===e&&(r.argMap=_(t[1]));for(var i=0;i<r.argMap.length;i++){var o=r.argMap[i],p=t[i+1],h=!1;if("input"===o.type){var l=u();if(n.inputs[o.inputName]={name:o.inputName,block:null,shadow:null},"object"==typeof p&&p){var f;f="object"==typeof p[0]&&p[0]?g(p):[y(p)];for(var d=null,m=0;m<f.length;m++)0===m?f[m].parent=n.id:f[m].parent=d,d=f[m].id;h=!0,n.inputs[o.inputName].block=f[0].id,n.children=n.children.concat(f)}if(!o.inputOp)continue;var b=p,v=o.inputName;"math_number"===o.inputOp||"math_whole_number"===o.inputOp||"math_positive_number"===o.inputOp||"math_integer"===o.inputOp||"math_angle"===o.inputOp?(v="NUM",h&&(b=10)):"text"===o.inputOp?(v="TEXT",h&&(b="")):"colour_picker"===o.inputOp?(b=s.decimalToHex(p),v="COLOUR",h&&(b="#990000")):h&&(b="");var w={};w[v]={name:v,value:b},n.children.push({id:l,opcode:o.inputOp,inputs:{},fields:w,next:null,topLevel:!1,parent:n.id,shadow:!0}),n.inputs[o.inputName].shadow=l,n.inputs[o.inputName].block||(n.inputs[o.inputName].block=l)}else"field"===o.type&&(n.fields[o.fieldName]={name:o.fieldName,value:p})}if("stopScripts"===e)"other scripts in sprite"!==t[1]&&"other scripts in stage"!==t[1]||(n.mutation={tagName:"mutation",hasnext:"true",children:[]});else if("procDef"===e){var S=t.slice(1);n.mutation={tagName:"mutation",proccode:S[0],argumentnames:JSON.stringify(S[1]),argumentdefaults:JSON.stringify(S[2]),warp:S[3],children:[]}}else"call"===e?n.mutation={tagName:"mutation",children:[],proccode:t[1]}:"getParam"===e&&(n.mutation={tagName:"mutation",children:[],paramname:t[1],shape:t[2]});return n};t.exports=f},function(t,e,r){var n=r(3),i=r(12),o=r(85),s=r(97),a=function(t,e){s.call(this,t.blocks),this.runtime=e,this.sprite=t,this.renderer=null,this.runtime&&(this.renderer=this.runtime.renderer),this.drawableID=null,this.effects={color:0,fisheye:0,whirl:0,pixelate:0,mosaic:0,brightness:0,ghost:0},this.audioEffects={pitch:0,pan:0,echo:0,reverb:0,fuzz:0,robot:0}};n.inherits(a,s),a.prototype.initDrawable=function(){this.renderer&&(this.drawableID=this.renderer.createDrawable()),this.isOriginal||this.runtime.startHats("control_start_as_clone",null,this),this.audioPlayer=null,this.runtime&&this.runtime.audioEngine&&(this.isOriginal&&this.runtime.audioEngine.loadSounds(this.sprite.sounds),this.audioPlayer=this.runtime.audioEngine.createPlayer())},a.prototype.isOriginal=!0,a.prototype.isStage=!1,a.prototype.x=0,a.prototype.y=0,a.prototype.direction=90,a.prototype.visible=!0,a.prototype.size=100,a.prototype.currentCostume=0,a.EVENT_TARGET_MOVED="TARGET_MOVED",a.ROTATION_STYLE_ALL_AROUND="all around",a.ROTATION_STYLE_LEFT_RIGHT="left-right",a.ROTATION_STYLE_NONE="don't rotate",a.prototype.rotationStyle=a.ROTATION_STYLE_ALL_AROUND,a.prototype.volume=100,a.prototype.currentInstrument=0,a.prototype.setXY=function(t,e){if(!this.isStage){var r=this.x,n=this.y;this.x=t,this.y=e,this.renderer&&(this.renderer.updateDrawableProperties(this.drawableID,{position:[this.x,this.y]}),this.visible&&this.runtime.requestRedraw()),this.emit(a.EVENT_TARGET_MOVED,this,r,n),this.runtime.spriteInfoReport(this)}},a.prototype._getRenderedDirectionAndScale=function(){var t=this.direction,e=[this.size,this.size];if(this.rotationStyle===a.ROTATION_STYLE_NONE)t=90;else if(this.rotationStyle===a.ROTATION_STYLE_LEFT_RIGHT){t=90;var r=this.direction<0?-1:1;e=[r*this.size,this.size]}return{direction:t,scale:e}},a.prototype.setDirection=function(t){if(!this.isStage){if(this.direction=o.wrapClamp(t,-179,180),this.renderer){var e=this._getRenderedDirectionAndScale();this.renderer.updateDrawableProperties(this.drawableID,{direction:e.direction,scale:e.scale}),this.visible&&this.runtime.requestRedraw()}this.runtime.spriteInfoReport(this)}},a.prototype.setSay=function(t,e){if(!this.isStage)return t&&e?void i.info("Setting say bubble:",t,e):void i.info("Clearing say bubble")},a.prototype.setVisible=function(t){this.isStage||(this.visible=!!t,this.renderer&&(this.renderer.updateDrawableProperties(this.drawableID,{visible:this.visible}),this.visible&&this.runtime.requestRedraw()),this.runtime.spriteInfoReport(this))},a.prototype.setSize=function(t){if(!this.isStage&&this.renderer){var e=this.renderer.getSkinSize(this.drawableID),r=Math.round(e[0]),n=Math.round(e[1]),i=Math.min(1,Math.max(5/r,5/n)),s=Math.min(1.5*this.runtime.constructor.STAGE_WIDTH/r,1.5*this.runtime.constructor.STAGE_HEIGHT/n);this.size=Math.round(100*o.clamp(t/100,i,s));var a=this._getRenderedDirectionAndScale();this.renderer.updateDrawableProperties(this.drawableID,{direction:a.direction,scale:a.scale}),this.visible&&this.runtime.requestRedraw()}},a.prototype.setEffect=function(t,e){if(this.effects.hasOwnProperty(t)&&(this.effects[t]=e,this.renderer)){var r={};r[t]=this.effects[t],this.renderer.updateDrawableProperties(this.drawableID,r),this.visible&&this.runtime.requestRedraw()}},a.prototype.clearEffects=function(){for(var t in this.effects)this.effects[t]=0;this.renderer&&(this.renderer.updateDrawableProperties(this.drawableID,this.effects),this.visible&&this.runtime.requestRedraw())},a.prototype.setAudioEffect=function(t,e){this.audioEffects.hasOwnProperty(t)&&(this.audioEffects[t]=e,this.audioPlayer.setEffect(t,e))},a.prototype.clearAudioEffects=function(){for(var t in this.audioEffects)this.audioEffects[t]=0,this.audioPlayer.setEffect(t,0)},a.prototype.setCostume=function(t){if(t=Math.round(t),this.currentCostume=o.wrapClamp(t,0,this.sprite.costumes.length-1),this.renderer){var e=this.sprite.costumes[this.currentCostume],r={skin:e.skin,costumeResolution:e.bitmapResolution};if("undefined"!=typeof e.rotationCenterX&&"undefined"!=typeof e.rotationCenterY){var n=e.bitmapResolution||1;r.rotationCenter=[e.rotationCenterX/n,e.rotationCenterY/n]}this.renderer.updateDrawableProperties(this.drawableID,r),this.visible&&this.runtime.requestRedraw()}this.runtime.spriteInfoReport(this)},a.prototype.setRotationStyle=function(t){if(t===a.ROTATION_STYLE_NONE?this.rotationStyle=a.ROTATION_STYLE_NONE:t===a.ROTATION_STYLE_ALL_AROUND?this.rotationStyle=a.ROTATION_STYLE_ALL_AROUND:t===a.ROTATION_STYLE_LEFT_RIGHT&&(this.rotationStyle=a.ROTATION_STYLE_LEFT_RIGHT),this.renderer){var e=this._getRenderedDirectionAndScale();this.renderer.updateDrawableProperties(this.drawableID,{direction:e.direction,scale:e.scale}),this.visible&&this.runtime.requestRedraw()}this.runtime.spriteInfoReport(this)},a.prototype.getCostumeIndexByName=function(t){for(var e=0;e<this.sprite.costumes.length;e++)if(this.sprite.costumes[e].name===t)return e;return-1},a.prototype.getSoundIndexByName=function(t){for(var e=0;e<this.sprite.sounds.length;e++)if(this.sprite.sounds[e].name===t)return e;return-1},a.prototype.getCurrentCostume=function(){return this.sprite.costumes[this.currentCostume]},a.prototype.getCostumes=function(){return this.sprite.costumes},a.prototype.updateAllDrawableProperties=function(){if(this.renderer){var t=this._getRenderedDirectionAndScale(),e=this.sprite.costumes[this.currentCostume],r={position:[this.x,this.y],direction:t.direction,scale:t.scale,visible:this.visible,skin:e.skin,costumeResolution:e.bitmapResolution,rotationCenter:[e.rotationCenterX/e.bitmapResolution,e.rotationCenterY/e.bitmapResolution]};for(var n in this.effects)r[n]=this.effects[n];this.renderer.updateDrawableProperties(this.drawableID,r),this.visible&&this.runtime.requestRedraw()}this.runtime.spriteInfoReport(this)},a.prototype.playSound=function(t){return this.audioPlayer.playSound(this.sprite.sounds[t].md5)},a.prototype.setInstrument=function(t){this.currentInstrument=t},a.prototype.playNoteForBeats=function(t,e){return this.runtime.audioEngine.playNoteForBeatsWithInst(t,e,this.currentInstrument)},a.prototype.getName=function(){return this.sprite.name},a.prototype.isSprite=function(){return!this.isStage&&this.isOriginal},a.prototype.getBounds=function(){return this.renderer?this.runtime.renderer.getBounds(this.drawableID):null},a.prototype.isTouchingPoint=function(t,e){if(this.renderer){var r=this.runtime.renderer.pick(t+this.runtime.constructor.STAGE_WIDTH/2,-e+this.runtime.constructor.STAGE_HEIGHT/2,null,null,[this.drawableID]);return r===this.drawableID}return!1},a.prototype.isTouchingEdge=function(){if(this.renderer){var t=this.runtime.constructor.STAGE_WIDTH,e=this.runtime.constructor.STAGE_HEIGHT,r=this.getBounds();if(r.left<-t/2||r.right>t/2||r.top>e/2||r.bottom<-e/2)return!0}return!1},a.prototype.isTouchingSprite=function(t){var e=this.runtime.getSpriteTargetByName(t);if(!e||!this.renderer)return!1;var r=e.sprite.clones.map(function(t){return t.drawableID});return this.renderer.isTouchingDrawables(this.drawableID,r)},a.prototype.isTouchingColor=function(t){return!!this.renderer&&this.renderer.isTouchingColor(this.drawableID,t)},a.prototype.colorIsTouchingColor=function(t,e){return!!this.renderer&&this.renderer.isTouchingColor(this.drawableID,t,e)},a.prototype.goToFront=function(){this.renderer&&this.renderer.setDrawableOrder(this.drawableID,1/0)},a.prototype.goBackLayers=function(t){this.renderer&&this.renderer.setDrawableOrder(this.drawableID,-t,!0,1)},a.prototype.goBehindOther=function(t){if(this.renderer){var e=this.renderer.setDrawableOrder(t.drawableID,0,!0);this.renderer.setDrawableOrder(this.drawableID,e)}},a.prototype.keepInFence=function(t,e,r){var n=r;n||(n={left:-this.runtime.constructor.STAGE_WIDTH/2,right:this.runtime.constructor.STAGE_WIDTH/2,top:this.runtime.constructor.STAGE_HEIGHT/2,bottom:-this.runtime.constructor.STAGE_HEIGHT/2});var i=this.getBounds();if(i){i.left+=t-this.x,i.right+=t-this.x,i.top+=e-this.y,i.bottom+=e-this.y;var o=0,s=0;return i.left<n.left&&(o+=n.left-i.left),i.right>n.right&&(o+=n.right-i.right),i.top>n.top&&(s+=n.top-i.top),i.bottom<n.bottom&&(s+=n.bottom-i.bottom),[t+o,e+s]}},a.prototype.makeClone=function(){if(this.runtime.clonesAvailable()&&!this.isStage){this.runtime.changeCloneCounter(1);var t=this.sprite.createClone();return t.x=this.x,t.y=this.y,t.direction=this.direction,t.visible=this.visible,t.size=this.size,t.currentCostume=this.currentCostume,t.rotationStyle=this.rotationStyle,t.effects=JSON.parse(JSON.stringify(this.effects)),t.variables=JSON.parse(JSON.stringify(this.variables)),t.lists=JSON.parse(JSON.stringify(this.lists)),t.initDrawable(),t.updateAllDrawableProperties(),t.goBehindOther(this),t}},a.prototype.onGreenFlag=function(){this.clearEffects()},a.prototype.onStopAll=function(){this.audioPlayer&&(this.audioPlayer.stopAllSounds(),this.audioPlayer.clearEffects())},a.prototype.postSpriteInfo=function(t){t.hasOwnProperty("x")&&this.setXY(t.x,this.y),t.hasOwnProperty("y")&&this.setXY(this.x,t.y),t.hasOwnProperty("direction")&&this.setDirection(t.direction),t.hasOwnProperty("rotationStyle")&&this.setRotationStyle(t.rotationStyle),t.hasOwnProperty("visible")&&this.setVisible(t.visible)},a.prototype.toJSON=function(){return{id:this.id,name:this.getName(),isStage:this.isStage,x:this.x,y:this.y,direction:this.direction,costume:this.getCurrentCostume(),costumeCount:this.getCostumes().length,visible:this.visible,rotationStyle:this.rotationStyle}},a.prototype.dispose=function(){this.runtime.changeCloneCounter(-1),this.renderer&&null!==this.drawableID&&(this.renderer.destroyDrawable(this.drawableID),this.visible&&this.runtime.requestRedraw())},t.exports=a},function(t,e,r){var n=r(2),i=r(3),o=r(25),s=r(98),a=r(99),u=r(100),c=function(t){n.call(this),t||(t=new o(this)),this.id=u(),this.blocks=t,this.variables={},this.lists={},this._customState={}};i.inherits(c,n),c.prototype.onGreenFlag=function(){},c.prototype.getName=function(){return this.id},c.prototype.lookupOrCreateVariable=function(t){if(this.variables.hasOwnProperty(t))return this.variables[t];if(this.runtime&&!this.isStage){var e=this.runtime.getTargetForStage();if(e.variables.hasOwnProperty(t))return e.variables[t]}var r=new s(t,0,(!1));return this.variables[t]=r,r},c.prototype.lookupOrCreateList=function(t){if(this.lists.hasOwnProperty(t))return this.lists[t];if(this.runtime&&!this.isStage){var e=this.runtime.getTargetForStage();if(e.lists.hasOwnProperty(t))return e.lists[t]}var r=new a(t,[]);return this.lists[t]=r,r},c.prototype.postSpriteInfo=function(){},c.prototype.getCustomState=function(t){return this._customState[t]},c.prototype.setCustomState=function(t,e){this._customState[t]=e},c.prototype.dispose=function(){this._customState={}},t.exports=c},function(t,e){var r=function(t,e,r){this.name=t,this.value=e,this.isCloud=r};t.exports=r},function(t,e){var r=function(t,e){this.name=t,this.contents=e};t.exports=r},function(t,e){var r="!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=function(){for(var t=20,e=r.length,n=[],i=0;i<t;i++)n[i]=r.charAt(Math.random()*e);return n.join("")};t.exports=n},function(t,e,r){var n=r(96),i=r(25),o=function(t,e){this.runtime=e,t||(t=new i),this.blocks=t,this.name="",this.costumes=[],this.sounds=[],this.clones=[]};o.prototype.createClone=function(){var t=new n(this,this.runtime);return t.isOriginal=0===this.clones.length,this.clones.push(t),t.isOriginal&&t.initDrawable(),t},t.exports=o},function(t,e){var r={"forward:":{opcode:"motion_movesteps",argMap:[{type:"input",inputOp:"math_number",inputName:"STEPS"}]},"turnRight:":{opcode:"motion_turnright",argMap:[{type:"input",inputOp:"math_number",inputName:"DEGREES"}]},"turnLeft:":{opcode:"motion_turnleft",argMap:[{type:"input",inputOp:"math_number",inputName:"DEGREES"}]},"heading:":{opcode:"motion_pointindirection",argMap:[{type:"input",inputOp:"math_angle",inputName:"DIRECTION"}]},"pointTowards:":{opcode:"motion_pointtowards",argMap:[{type:"input",inputOp:"motion_pointtowards_menu",inputName:"TOWARDS"}]},"gotoX:y:":{opcode:"motion_gotoxy",argMap:[{type:"input",inputOp:"math_number",inputName:"X"},{type:"input",inputOp:"math_number",inputName:"Y"}]},"gotoSpriteOrMouse:":{opcode:"motion_goto",argMap:[{type:"input",inputOp:"motion_goto_menu",inputName:"TO"}]},"glideSecs:toX:y:elapsed:from:":{opcode:"motion_glidesecstoxy",argMap:[{type:"input",inputOp:"math_number",inputName:"SECS"},{type:"input",inputOp:"math_number",inputName:"X"},{type:"input",inputOp:"math_number",inputName:"Y"}]},"changeXposBy:":{opcode:"motion_changexby",argMap:[{type:"input",inputOp:"math_number",inputName:"DX"}]},"xpos:":{opcode:"motion_setx",argMap:[{type:"input",inputOp:"math_number",inputName:"X"}]},"changeYposBy:":{opcode:"motion_changeyby",argMap:[{type:"input",inputOp:"math_number",inputName:"DY"}]},"ypos:":{opcode:"motion_sety",argMap:[{type:"input",inputOp:"math_number",inputName:"Y"}]},bounceOffEdge:{opcode:"motion_ifonedgebounce",argMap:[]},setRotationStyle:{opcode:"motion_setrotationstyle",argMap:[{type:"input",inputOp:"motion_setrotationstyle_menu",inputName:"STYLE"}]},xpos:{opcode:"motion_xposition",argMap:[]},ypos:{opcode:"motion_yposition",argMap:[]},heading:{opcode:"motion_direction",argMap:[]},"say:duration:elapsed:from:":{opcode:"looks_sayforsecs",argMap:[{type:"input",inputOp:"text",inputName:"MESSAGE"},{type:"input",inputOp:"math_number",inputName:"SECS"}]},"say:":{opcode:"looks_say",argMap:[{type:"input",inputOp:"text",inputName:"MESSAGE"}]},"think:duration:elapsed:from:":{opcode:"looks_thinkforsecs",argMap:[{type:"input",inputOp:"text",inputName:"MESSAGE"},{type:"input",inputOp:"math_number",inputName:"SECS"}]},"think:":{opcode:"looks_think",argMap:[{type:"input",inputOp:"text",inputName:"MESSAGE"}]},show:{opcode:"looks_show",argMap:[]},hide:{opcode:"looks_hide",argMap:[]},"lookLike:":{opcode:"looks_switchcostumeto",argMap:[{type:"input",inputOp:"looks_costume",inputName:"COSTUME"}]},nextCostume:{opcode:"looks_nextcostume",argMap:[]},startScene:{opcode:"looks_switchbackdropto",argMap:[{type:"input",inputOp:"looks_backdrops",inputName:"BACKDROP"}]},"changeGraphicEffect:by:":{opcode:"looks_changeeffectby",argMap:[{type:"input",inputOp:"looks_effectmenu",inputName:"EFFECT"},{type:"input",inputOp:"math_number",inputName:"CHANGE"}]},"setGraphicEffect:to:":{opcode:"looks_seteffectto",argMap:[{type:"input",inputOp:"looks_effectmenu",inputName:"EFFECT"},{type:"input",inputOp:"math_number",inputName:"VALUE"}]},filterReset:{opcode:"looks_cleargraphiceffects",argMap:[]},"changeSizeBy:":{opcode:"looks_changesizeby",argMap:[{type:"input",inputOp:"math_number",inputName:"CHANGE"}]},"setSizeTo:":{opcode:"looks_setsizeto",argMap:[{type:"input",inputOp:"math_number",inputName:"SIZE"}]},comeToFront:{opcode:"looks_gotofront",argMap:[]},"goBackByLayers:":{opcode:"looks_gobacklayers",argMap:[{type:"input",inputOp:"math_integer",inputName:"NUM"}]},costumeIndex:{opcode:"looks_costumeorder",argMap:[]},sceneName:{opcode:"looks_backdropname",argMap:[]},scale:{opcode:"looks_size",argMap:[]},startSceneAndWait:{opcode:"looks_switchbackdroptoandwait",argMap:[{type:"input",inputOp:"looks_backdrops",inputName:"BACKDROP"}]},nextScene:{opcode:"looks_nextbackdrop",argMap:[]},backgroundIndex:{opcode:"looks_backdroporder",argMap:[]},"playSound:":{opcode:"sound_play",argMap:[{type:"input",inputOp:"sound_sounds_menu",inputName:"SOUND_MENU"}]},doPlaySoundAndWait:{opcode:"sound_playuntildone",argMap:[{type:"input",inputOp:"sound_sounds_menu",inputName:"SOUND_MENU"}]},stopAllSounds:{opcode:"sound_stopallsounds",argMap:[]},playDrum:{opcode:"sound_playdrumforbeats",argMap:[{type:"input",inputOp:"math_number",inputName:"DRUM"},{type:"input",inputOp:"math_number",inputName:"BEATS"}]},"rest:elapsed:from:":{opcode:"sound_restforbeats",argMap:[{type:"input",inputOp:"math_number",inputName:"BEATS"}]},"noteOn:duration:elapsed:from:":{opcode:"sound_playnoteforbeats",argMap:[{type:"input",inputOp:"math_number",inputName:"NOTE"},{type:"input",inputOp:"math_number",inputName:"BEATS"}]},"instrument:":{opcode:"sound_setinstrumentto",argMap:[{type:"input",inputOp:"math_number",inputName:"INSTRUMENT"}]},"changeVolumeBy:":{opcode:"sound_changevolumeby",argMap:[{type:"input",inputOp:"math_number",inputName:"VOLUME"}]},"setVolumeTo:":{opcode:"sound_setvolumeto",argMap:[{type:"input",inputOp:"math_number",inputName:"VOLUME"}]},volume:{opcode:"sound_volume",argMap:[]},"changeTempoBy:":{opcode:"sound_changetempoby",argMap:[{type:"input",inputOp:"math_number",inputName:"TEMPO"}]},"setTempoTo:":{opcode:"sound_settempotobpm",argMap:[{type:"input",inputOp:"math_number",inputName:"TEMPO"}]},tempo:{opcode:"sound_tempo",argMap:[]},clearPenTrails:{opcode:"pen_clear",argMap:[]},stampCostume:{opcode:"pen_stamp",argMap:[]},putPenDown:{opcode:"pen_pendown",argMap:[]},putPenUp:{opcode:"pen_penup",argMap:[]},"penColor:":{opcode:"pen_setpencolortocolor",argMap:[{type:"input",inputOp:"colour_picker",inputName:"COLOR"}]},"changePenHueBy:":{opcode:"pen_changepencolorby",argMap:[{type:"input",inputOp:"math_number",inputName:"COLOR"}]},"setPenHueTo:":{opcode:"pen_setpencolortonum",argMap:[{type:"input",inputOp:"math_number",inputName:"COLOR"}]},"changePenShadeBy:":{opcode:"pen_changepenshadeby",argMap:[{type:"input",inputOp:"math_number",inputName:"SHADE"}]},"setPenShadeTo:":{opcode:"pen_setpenshadeto",argMap:[{type:"input",inputOp:"math_number",inputName:"SHADE"}]},"changePenSizeBy:":{opcode:"pen_changepensizeby",argMap:[{type:"input",inputOp:"math_number",inputName:"SIZE"}]},"penSize:":{opcode:"pen_setpensizeto",argMap:[{type:"input",inputOp:"math_number",inputName:"SIZE"}]},whenGreenFlag:{opcode:"event_whenflagclicked",argMap:[]},whenKeyPressed:{opcode:"event_whenkeypressed",argMap:[{type:"field",fieldName:"KEY_OPTION"}]},whenClicked:{opcode:"event_whenthisspriteclicked",argMap:[]},whenSceneStarts:{opcode:"event_whenbackdropswitchesto",argMap:[{type:"field",fieldName:"BACKDROP"}]},whenSensorGreaterThan:{opcode:"event_whengreaterthan",argMap:[{type:"field",fieldName:"WHENGREATERTHANMENU"},{type:"input",inputOp:"math_number",inputName:"VALUE"}]},whenIReceive:{opcode:"event_whenbroadcastreceived",argMap:[{type:"field",fieldName:"BROADCAST_OPTION"}]},"broadcast:":{opcode:"event_broadcast",argMap:[{type:"input",inputOp:"event_broadcast_menu",inputName:"BROADCAST_OPTION"}]},doBroadcastAndWait:{opcode:"event_broadcastandwait",argMap:[{type:"input",inputOp:"event_broadcast_menu",inputName:"BROADCAST_OPTION"}]},"wait:elapsed:from:":{opcode:"control_wait",argMap:[{type:"input",inputOp:"math_positive_number",inputName:"DURATION"}]},doRepeat:{opcode:"control_repeat",argMap:[{type:"input",inputOp:"math_whole_number",inputName:"TIMES"},{type:"input",inputName:"SUBSTACK"}]},doForever:{opcode:"control_forever",argMap:[{type:"input",inputName:"SUBSTACK"}]},doIf:{opcode:"control_if",argMap:[{type:"input",inputName:"CONDITION"},{type:"input",inputName:"SUBSTACK"}]},doIfElse:{opcode:"control_if_else",argMap:[{type:"input",inputName:"CONDITION"},{type:"input",inputName:"SUBSTACK"},{type:"input",inputName:"SUBSTACK2"}]},doWaitUntil:{opcode:"control_wait_until",argMap:[{type:"input",inputName:"CONDITION"}]},doUntil:{opcode:"control_repeat_until",argMap:[{type:"input",inputName:"CONDITION"},{type:"input",inputName:"SUBSTACK"}]},stopScripts:{opcode:"control_stop",argMap:[{type:"field",fieldName:"STOP_OPTION"}]},whenCloned:{opcode:"control_start_as_clone",argMap:[]},createCloneOf:{opcode:"control_create_clone_of",argMap:[{type:"input",inputOp:"control_create_clone_of_menu",inputName:"CLONE_OPTION"}]},deleteClone:{opcode:"control_delete_this_clone",argMap:[]},"touching:":{opcode:"sensing_touchingobject",argMap:[{type:"input",inputOp:"sensing_touchingobjectmenu",inputName:"TOUCHINGOBJECTMENU"}]},"touchingColor:":{opcode:"sensing_touchingcolor",argMap:[{type:"input",inputOp:"colour_picker",inputName:"COLOR"}]},"color:sees:":{opcode:"sensing_coloristouchingcolor",argMap:[{type:"input",inputOp:"colour_picker",inputName:"COLOR"},{type:"input",inputOp:"colour_picker",inputName:"COLOR2"}]},"distanceTo:":{opcode:"sensing_distanceto",argMap:[{type:"input",inputOp:"sensing_distancetomenu",inputName:"DISTANCETOMENU"}]},doAsk:{opcode:"sensing_askandwait",argMap:[{type:"input",inputOp:"text",inputName:"QUESTION"}]},answer:{opcode:"sensing_answer",argMap:[]},"keyPressed:":{opcode:"sensing_keypressed",argMap:[{type:"input",inputOp:"sensing_keyoptions",inputName:"KEY_OPTION"}]},mousePressed:{opcode:"sensing_mousedown",argMap:[]},mouseX:{opcode:"sensing_mousex",argMap:[]
|
||
},mouseY:{opcode:"sensing_mousey",argMap:[]},soundLevel:{opcode:"sensing_loudness",argMap:[]},senseVideoMotion:{opcode:"sensing_videoon",argMap:[{type:"input",inputOp:"sensing_videoonmenuone",inputName:"VIDEOONMENU1"},{type:"input",inputOp:"sensing_videoonmenutwo",inputName:"VIDEOONMENU2"}]},setVideoState:{opcode:"sensing_videotoggle",argMap:[{type:"input",inputOp:"sensing_videotogglemenu",inputName:"VIDEOTOGGLEMENU"}]},setVideoTransparency:{opcode:"sensing_setvideotransparency",argMap:[{type:"input",inputOp:"math_number",inputName:"TRANSPARENCY"}]},timer:{opcode:"sensing_timer",argMap:[]},timerReset:{opcode:"sensing_resettimer",argMap:[]},"getAttribute:of:":{opcode:"sensing_of",argMap:[{type:"input",inputOp:"sensing_of_property_menu",inputName:"PROPERTY"},{type:"input",inputOp:"sensing_of_object_menu",inputName:"OBJECT"}]},timeAndDate:{opcode:"sensing_current",argMap:[{type:"input",inputOp:"sensing_currentmenu",inputName:"CURRENTMENU"}]},timestamp:{opcode:"sensing_dayssince2000",argMap:[]},getUserName:{opcode:"sensing_username",argMap:[]},"+":{opcode:"operator_add",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},"-":{opcode:"operator_subtract",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},"*":{opcode:"operator_multiply",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},"/":{opcode:"operator_divide",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},"randomFrom:to:":{opcode:"operator_random",argMap:[{type:"input",inputOp:"math_number",inputName:"FROM"},{type:"input",inputOp:"math_number",inputName:"TO"}]},"<":{opcode:"operator_lt",argMap:[{type:"input",inputOp:"text",inputName:"OPERAND1"},{type:"input",inputOp:"text",inputName:"OPERAND2"}]},"=":{opcode:"operator_equals",argMap:[{type:"input",inputOp:"text",inputName:"OPERAND1"},{type:"input",inputOp:"text",inputName:"OPERAND2"}]},">":{opcode:"operator_gt",argMap:[{type:"input",inputOp:"text",inputName:"OPERAND1"},{type:"input",inputOp:"text",inputName:"OPERAND2"}]},"&":{opcode:"operator_and",argMap:[{type:"input",inputName:"OPERAND1"},{type:"input",inputName:"OPERAND2"}]},"|":{opcode:"operator_or",argMap:[{type:"input",inputName:"OPERAND1"},{type:"input",inputName:"OPERAND2"}]},not:{opcode:"operator_not",argMap:[{type:"input",inputName:"OPERAND"}]},"concatenate:with:":{opcode:"operator_join",argMap:[{type:"input",inputOp:"text",inputName:"STRING1"},{type:"input",inputOp:"text",inputName:"STRING2"}]},"letter:of:":{opcode:"operator_letter_of",argMap:[{type:"input",inputOp:"math_whole_number",inputName:"LETTER"},{type:"input",inputOp:"text",inputName:"STRING"}]},"stringLength:":{opcode:"operator_length",argMap:[{type:"input",inputOp:"text",inputName:"STRING"}]},"%":{opcode:"operator_mod",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM1"},{type:"input",inputOp:"math_number",inputName:"NUM2"}]},rounded:{opcode:"operator_round",argMap:[{type:"input",inputOp:"math_number",inputName:"NUM"}]},"computeFunction:of:":{opcode:"operator_mathop",argMap:[{type:"input",inputOp:"operator_mathop_menu",inputName:"OPERATOR"},{type:"input",inputOp:"math_number",inputName:"NUM"}]},readVariable:{opcode:"data_variable",argMap:[{type:"input",inputOp:"data_variablemenu",inputName:"VARIABLE"}]},"setVar:to:":{opcode:"data_setvariableto",argMap:[{type:"input",inputOp:"data_variablemenu",inputName:"VARIABLE"},{type:"input",inputOp:"text",inputName:"VALUE"}]},"changeVar:by:":{opcode:"data_changevariableby",argMap:[{type:"input",inputOp:"data_variablemenu",inputName:"VARIABLE"},{type:"input",inputOp:"math_number",inputName:"VALUE"}]},"showVariable:":{opcode:"data_showvariable",argMap:[{type:"input",inputOp:"data_variablemenu",inputName:"VARIABLE"}]},"hideVariable:":{opcode:"data_hidevariable",argMap:[{type:"input",inputOp:"data_variablemenu",inputName:"VARIABLE"}]},"contentsOfList:":{opcode:"data_list",argMap:[{type:"field",fieldName:"LIST"}]},"append:toList:":{opcode:"data_addtolist",argMap:[{type:"input",inputOp:"text",inputName:"ITEM"},{type:"field",fieldName:"LIST"}]},"deleteLine:ofList:":{opcode:"data_deleteoflist",argMap:[{type:"input",inputOp:"math_integer",inputName:"INDEX"},{type:"field",fieldName:"LIST"}]},"insert:at:ofList:":{opcode:"data_insertatlist",argMap:[{type:"input",inputOp:"text",inputName:"ITEM"},{type:"input",inputOp:"math_integer",inputName:"INDEX"},{type:"field",fieldName:"LIST"}]},"setLine:ofList:to:":{opcode:"data_replaceitemoflist",argMap:[{type:"input",inputOp:"math_integer",inputName:"INDEX"},{type:"field",fieldName:"LIST"},{type:"input",inputOp:"text",inputName:"ITEM"}]},"getLine:ofList:":{opcode:"data_itemoflist",argMap:[{type:"input",inputOp:"math_integer",inputName:"INDEX"},{type:"field",fieldName:"LIST"}]},"lineCountOfList:":{opcode:"data_lengthoflist",argMap:[{type:"field",fieldName:"LIST"}]},"list:contains:":{opcode:"data_listcontainsitem",argMap:[{type:"field",fieldName:"LIST"},{type:"input",inputOp:"text",inputName:"ITEM"}]},"showList:":{opcode:"data_showlist",argMap:[{type:"field",fieldName:"LIST"}]},"hideList:":{opcode:"data_hidelist",argMap:[{type:"field",fieldName:"LIST"}]},procDef:{opcode:"procedures_defnoreturn",argMap:[]},getParam:{opcode:"procedures_param",argMap:[]},call:{opcode:"procedures_callnoreturn",argMap:[]}};t.exports=r},function(t,e,r){var n=r(2),i=r(3),o=r(7),s=r(95),a=function(){var t=this;n.call(t),t.runtime=new o,t.editingTarget=null,t.runtime.on(o.SCRIPT_GLOW_ON,function(e){t.emit(o.SCRIPT_GLOW_ON,e)}),t.runtime.on(o.SCRIPT_GLOW_OFF,function(e){t.emit(o.SCRIPT_GLOW_OFF,e)}),t.runtime.on(o.BLOCK_GLOW_ON,function(e){t.emit(o.BLOCK_GLOW_ON,e)}),t.runtime.on(o.BLOCK_GLOW_OFF,function(e){t.emit(o.BLOCK_GLOW_OFF,e)}),t.runtime.on(o.PROJECT_RUN_START,function(){t.emit(o.PROJECT_RUN_START)}),t.runtime.on(o.PROJECT_RUN_STOP,function(){t.emit(o.PROJECT_RUN_STOP)}),t.runtime.on(o.VISUAL_REPORT,function(e){t.emit(o.VISUAL_REPORT,e)}),t.runtime.on(o.SPRITE_INFO_REPORT,function(e){t.emit(o.SPRITE_INFO_REPORT,e)}),this.blockListener=this.blockListener.bind(this),this.flyoutBlockListener=this.flyoutBlockListener.bind(this)};i.inherits(a,n),a.prototype.start=function(){this.runtime.start()},a.prototype.greenFlag=function(){this.runtime.greenFlag()},a.prototype.setTurboMode=function(t){this.runtime.turboMode=!!t},a.prototype.setCompatibilityMode=function(t){this.runtime.setCompatibilityMode(!!t)},a.prototype.stopAll=function(){this.runtime.stopAll()},a.prototype.clear=function(){this.runtime.dispose(),this.editingTarget=null,this.emitTargetsUpdate()},a.prototype.getPlaygroundData=function(){var t=this,e=this.runtime.threads.filter(function(e){return e.target===t.editingTarget}),r=JSON.stringify(e,function(t,e){if("target"!==t)return e},2);this.emit("playgroundData",{blocks:this.editingTarget.blocks,threads:r})},a.prototype.postIOData=function(t,e){this.runtime.ioDevices[t]&&this.runtime.ioDevices[t].postData(e)},a.prototype.loadProject=function(t){this.clear(),s(t,this.runtime),this.editingTarget=this.runtime.targets[1],this.emitTargetsUpdate(),this.emitWorkspaceUpdate(),this.runtime.setEditingTarget(this.editingTarget)},a.prototype.addSprite2=function(t){this.editingTarget=s(t,this.runtime,!0),this.emitTargetsUpdate(),this.emitWorkspaceUpdate(),this.runtime.setEditingTarget(this.editingTarget)},a.prototype.addCostume=function(t){this.editingTarget.sprite.costumes.push(t),this.editingTarget.setCostume(this.editingTarget.sprite.costumes.length-1)},a.prototype.addBackdrop=function(t){var e=this.runtime.getTargetForStage();e.sprite.costumes.push(t),e.setCostume(e.sprite.costumes.length-1)},a.prototype.renameSprite=function(t,e){var r=this.runtime.getTargetById(t);if(!r)throw new Error("No target with the provided id.");if(!r.isSprite())throw new Error("Cannot rename non-sprite targets.");var n=r.sprite;if(!n)throw new Error("No sprite associated with this target.");n.name=e,this.emitTargetsUpdate()},a.prototype.deleteSprite=function(t){var e=this.runtime.getTargetById(t);if(!e)throw new Error("No target with the provided id.");if(!e.isSprite())throw new Error("Cannot delete non-sprite targets.");var r=e.sprite;if(!r)throw new Error("No sprite associated with this target.");for(var n=this.editingTarget,i=0;i<r.clones.length;i++){var o=r.clones[i];this.runtime.stopForTarget(r.clones[i]),this.runtime.disposeTarget(r.clones[i]),o===n&&this.setEditingTarget(this.runtime.targets[0].id)}this.emitTargetsUpdate()},a.prototype.attachRenderer=function(t){this.runtime.attachRenderer(t)},a.prototype.attachAudioEngine=function(t){this.runtime.attachAudioEngine(t)},a.prototype.blockListener=function(t){this.editingTarget&&this.editingTarget.blocks.blocklyListen(t,this.runtime)},a.prototype.flyoutBlockListener=function(t){this.runtime.flyoutBlocks.blocklyListen(t,this.runtime)},a.prototype.setEditingTarget=function(t){if(t!==this.editingTarget.id){var e=this.runtime.getTargetById(t);e&&(this.editingTarget=e,this.emitTargetsUpdate(),this.emitWorkspaceUpdate(),this.runtime.setEditingTarget(e))}},a.prototype.emitTargetsUpdate=function(){this.emit("targetsUpdate",{targetList:this.runtime.targets.filter(function(t){return!t.hasOwnProperty("isOriginal")||t.isOriginal}).map(function(t){return t.toJSON()}),editingTarget:this.editingTarget?this.editingTarget.id:null})},a.prototype.emitWorkspaceUpdate=function(){this.emit("workspaceUpdate",{xml:this.editingTarget.blocks.toXML()})},a.prototype.postSpriteInfo=function(t){this.editingTarget.postSpriteInfo(t)},t.exports=a},function(t,e,r){var n=r(82),i=r(105),o=r(83),s=r(85),a=r(96),u=function(t){this.runtime=t,this._penDrawableId=-1,this._penSkinId=-1,this._onTargetMoved=this._onTargetMoved.bind(this)};u.DEFAULT_PEN_STATE={penDown:!1,hue:120,shade:50,penAttributes:{color4f:[0,0,1,1],diameter:1}},u.PEN_ORDER=1,u.PEN_SIZE_RANGE={min:1,max:255},u.STATE_KEY="Scratch.pen",u.prototype._clampPenSize=function(t){return s.clamp(t,u.PEN_SIZE_RANGE.min,u.PEN_SIZE_RANGE.max)},u.prototype._getPenLayerID=function(){return this._penSkinId<0&&this.runtime.renderer&&(this._penSkinId=this.runtime.renderer.createPenSkin(),this._penDrawableId=this.runtime.renderer.createDrawable(),this.runtime.renderer.setDrawableOrder(this._penDrawableId,u.PEN_ORDER),this.runtime.renderer.updateDrawableProperties(this._penDrawableId,{skinId:this._penSkinId})),this._penSkinId},u.prototype._getPenState=function(t){var e=t.getCustomState(u.STATE_KEY);return e||(e=i.simple(u.DEFAULT_PEN_STATE),t.setCustomState(u.STATE_KEY,e)),e},u.prototype._onTargetMoved=function(t,e,r){var n=this._getPenLayerID();if(n>=0){var i=this._getPenState(t);this.runtime.renderer.penLine(n,i.penAttributes,e,r,t.x,t.y),this.runtime.requestRedraw()}},u.prototype._updatePenColor=function(t){var e=o.hsvToRgb({h:180*t.hue/100,s:1,v:1}),r=t.shade>100?200-t.shade:t.shade;e=r<50?o.mixRgb(o.RGB_BLACK,e,(10+r)/60):o.mixRgb(e,o.RGB_WHITE,(r-50)/60),t.penAttributes.color4f[0]=e.r/255,t.penAttributes.color4f[1]=e.g/255,t.penAttributes.color4f[2]=e.b/255},u.prototype._wrapHueOrShade=function(t){return t%=200,t<0&&(t+=200),t},u.prototype.getPrimitives=function(){return{pen_clear:this.clear,pen_stamp:this.stamp,pen_pendown:this.penDown,pen_penup:this.penUp,pen_setpencolortocolor:this.setPenColorToColor,pen_changepencolorby:this.changePenHueBy,pen_setpencolortonum:this.setPenHueToNumber,pen_changepenshadeby:this.changePenShadeBy,pen_setpenshadeto:this.setPenShadeToNumber,pen_changepensizeby:this.changePenSizeBy,pen_setpensizeto:this.setPenSizeTo}},u.prototype.clear=function(){var t=this._getPenLayerID();t>=0&&(this.runtime.renderer.penClear(t),this.runtime.requestRedraw())},u.prototype.stamp=function(t,e){var r=this._getPenLayerID();if(r>=0){var n=e.target;this.runtime.renderer.penStamp(r,n.drawableID),this.runtime.requestRedraw()}},u.prototype.penDown=function(t,e){var r=e.target,n=this._getPenState(r);n.penDown||(n.penDown=!0,r.addListener(a.EVENT_TARGET_MOVED,this._onTargetMoved));var i=this._getPenLayerID();i>=0&&(this.runtime.renderer.penPoint(i,n.penAttributes,r.x,r.y),this.runtime.requestRedraw())},u.prototype.penUp=function(t,e){var r=e.target,n=this._getPenState(r);n.penDown&&(n.penDown=!1,r.removeListener(a.EVENT_TARGET_MOVED,this._onTargetMoved))},u.prototype.setPenColorToColor=function(t,e){var r=this._getPenState(e.target),i=n.toRgbColorObject(t.COLOR),s=o.rgbToHsv(i);r.hue=200*s.h/360,r.shade=50*s.v,r.penAttributes.color4f[0]=i.r/255,r.penAttributes.color4f[1]=i.g/255,r.penAttributes.color4f[2]=i.b/255,i.hasOwnProperty("a")&&(r.penAttributes.color4f[3]=i.a/255)},u.prototype.changePenHueBy=function(t,e){var r=this._getPenState(e.target);r.hue=this._wrapHueOrShade(r.hue+n.toNumber(t.COLOR)),this._updatePenColor(r)},u.prototype.setPenHueToNumber=function(t,e){var r=this._getPenState(e.target);r.hue=this._wrapHueOrShade(n.toNumber(t.COLOR)),this._updatePenColor(r)},u.prototype.changePenShadeBy=function(t,e){var r=this._getPenState(e.target);r.shade=this._wrapHueOrShade(r.shade+n.toNumber(t.SHADE)),this._updatePenColor(r)},u.prototype.setPenShadeToNumber=function(t,e){var r=this._getPenState(e.target);r.shade=this._wrapHueOrShade(n.toNumber(t.SHADE)),this._updatePenColor(r)},u.prototype.changePenSizeBy=function(t,e){var r=this._getPenState(e.target).penAttributes;r.diameter=this._clampPenSize(r.diameter+n.toNumber(t.SIZE))},u.prototype.setPenSizeTo=function(t,e){var r=this._getPenState(e.target).penAttributes;r.diameter=this._clampPenSize(n.toNumber(t.SIZE))},t.exports=u},function(t,e){var r={};r.simple=function(t){return JSON.parse(JSON.stringify(t))},t.exports=r}]); |