iak
This commit is contained in:
1 parent
c81d052a14
commit
541545ff12
2 files changed
+392
No files matched your search
@@ -0,0 +1,391 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- Created with https://packager.turbowarp.org/ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<!-- We only include this to explicitly loosen the CSP of various packager environments. It does not provide any security. -->
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src * 'self' 'unsafe-inline' 'unsafe-eval' data: blob:">
|
||||
<title>The Shadow Reform</title>
|
||||
<style>
|
||||
body {
|
||||
color: #ffffff;
|
||||
font-family: sans-serif;
|
||||
overflow: hidden;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
:root, body.is-fullscreen {
|
||||
background-color: #000000;
|
||||
}
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
h1 {
|
||||
font-weight: normal;
|
||||
}
|
||||
a {
|
||||
color: inherit;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#app, #loading, #error, #launch {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.screen {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
cursor: default;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
background-color: #000000;
|
||||
}
|
||||
#launch {
|
||||
background-color: rgba(0, 0, 0, 0.7);
|
||||
cursor: pointer;
|
||||
}
|
||||
.green-flag {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
padding: 16px;
|
||||
border-radius: 100%;
|
||||
background: rgba(255, 255, 255, 0.75);
|
||||
border: 3px solid hsla(0, 100%, 100%, 1);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
#loading {
|
||||
|
||||
}
|
||||
.progress-bar-outer {
|
||||
border: 1px solid currentColor;
|
||||
height: 10px;
|
||||
width: 200px;
|
||||
max-width: 200px;
|
||||
}
|
||||
.progress-bar-inner {
|
||||
height: 100%;
|
||||
width: 0;
|
||||
background-color: currentColor;
|
||||
}
|
||||
.loading-text, noscript {
|
||||
font-weight: normal;
|
||||
font-size: 36px;
|
||||
margin: 0 0 16px;
|
||||
}
|
||||
.loading-image {
|
||||
margin: 0 0 16px;
|
||||
}
|
||||
#error-message, #error-stack {
|
||||
font-family: monospace;
|
||||
max-width: 600px;
|
||||
white-space: pre-wrap;
|
||||
user-select: text;
|
||||
-webkit-user-select: text;
|
||||
}
|
||||
#error-stack {
|
||||
text-align: left;
|
||||
max-height: 200px;
|
||||
overflow: auto;
|
||||
}
|
||||
.control-button {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
padding: 0.375rem;
|
||||
margin-top: 0.5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
cursor: pointer;
|
||||
border: 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.control-button:hover {
|
||||
background: #ff4c4c26;
|
||||
}
|
||||
.control-button.active {
|
||||
background: #ff4c4c59;
|
||||
}
|
||||
.fullscreen-button {
|
||||
background: white !important;
|
||||
}
|
||||
.standalone-fullscreen-button {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
border-radius: 0 0 0 4px;
|
||||
padding: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.sc-canvas {
|
||||
cursor: auto;
|
||||
}
|
||||
.sc-monitor-root[data-opcode^="data_"] .sc-monitor-value-color {
|
||||
background-color: #ff8c1a;
|
||||
}
|
||||
.sc-monitor-row-value-outer {
|
||||
background-color: #fc662c;
|
||||
}
|
||||
.sc-monitor-row-value-editing .sc-monitor-row-value-outer {
|
||||
background-color: #e25b27;
|
||||
}
|
||||
|
||||
</style>
|
||||
<meta name="theme-color" content="#000000">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
<div id="launch" class="screen" hidden title="Click to start">
|
||||
<div class="green-flag">
|
||||
<svg viewBox="0 0 16.63 17.5" width="42" height="44">
|
||||
<defs><style>.cls-1,.cls-2{fill:#4cbf56;stroke:#45993d;stroke-linecap:round;stroke-linejoin:round;}.cls-2{stroke-width:1.5px;}</style></defs>
|
||||
<path class="cls-1" d="M.75,2A6.44,6.44,0,0,1,8.44,2h0a6.44,6.44,0,0,0,7.69,0V12.4a6.44,6.44,0,0,1-7.69,0h0a6.44,6.44,0,0,0-7.69,0"/>
|
||||
<line class="cls-2" x1="0.75" y1="16.75" x2="0.75" y2="0.75"/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="loading" class="screen">
|
||||
<noscript>Enable JavaScript</noscript>
|
||||
|
||||
|
||||
<div class="progress-bar-outer"><div class="progress-bar-inner" id="loading-inner"></div></div>
|
||||
</div>
|
||||
|
||||
<div id="error" class="screen" hidden>
|
||||
<h1>Error</h1>
|
||||
<details>
|
||||
<summary id="error-message"></summary>
|
||||
<p id="error-stack"></p>
|
||||
</details>
|
||||
</div>
|
||||
|
||||
<script>/*!
|
||||
Parts of this script are from the TurboWarp Packager <https://packager.turbowarp.org/>, licensed as follows:
|
||||
Copyright (C) 2021-2022 Thomas Weber
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Parts of this script are from Scratch <https://scratch.mit.edu/>, licensed as follows:
|
||||
Copyright (c) 2016, Massachusetts Institute of Technology
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
!function(A){function e(e){for(var t,B,n=e[0],s=e[1],r=0,g=[];r<n.length;r++)B=n[r],Object.prototype.hasOwnProperty.call(i,B)&&i[B]&&g.push(i[B][0]),i[B]=0;for(t in s)Object.prototype.hasOwnProperty.call(s,t)&&(A[t]=s[t]);for(o&&o(e);g.length;)g.shift()()}var t={},i={0:0};function B(e){if(t[e])return t[e].exports;var i=t[e]={i:e,l:!1,exports:{}};return A[e].call(i.exports,i,i.exports,B),i.l=!0,i.exports}B.e=function(A){var e=[],t=i[A];if(0!==t)if(t)e.push(t[2]);else{var n=new Promise((function(e,B){t=i[A]=[e,B]}));e.push(t[2]=n);var s,r=document.createElement("script");r.charset="utf-8",r.timeout=120,B.nc&&r.setAttribute("nonce",B.nc),r.src=function(A){return B.p+"scaffolding/"+({1:"vendors~iframe-extension-worker"}[A]||A)+".js"}(A);var o=new Error;s=function(e){r.onerror=r.onload=null,clearTimeout(g);var t=i[A];if(0!==t){if(t){var B=e&&("load"===e.type?"missing":e.type),n=e&&e.target&&e.target.src;o.message="Loading chunk "+A+" failed.\n("+B+": "+n+")",o.name="ChunkLoadError",o.type=B,o.request=n,t[1](o)}i[A]=void 0}};var g=setTimeout((function(){s({type:"timeout",target:r})}),12e4);r.onerror=r.onload=s,document.head.appendChild(r)}return Promise.all(e)},B.m=A,B.c=t,B.d=function(A,e,t){B.o(A,e)||Object.defineProperty(A,e,{enumerable:!0,get:t})},B.r=function(A){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})},B.t=function(A,e){if(1&e&&(A=B(A)),8&e)return A;if(4&e&&"object"==typeof A&&A&&A.__esModule)return A;var t=Object.create(null);if(B.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:A}),2&e&&"string"!=typeof A)for(var i in A)B.d(t,i,function(e){return A[e]}.bind(null,i));return t},B.n=function(A){var e=A&&A.__esModule?function(){return A.default}:function(){return A};return B.d(e,"a",e),e},B.o=function(A,e){return Object.prototype.hasOwnProperty.call(A,e)},B.p="",B.oe=function(A){throw console.error(A),A};var n=window.webpackJsonp=window.webpackJsonp||[],s=n.push.bind(n);n.push=e,n=n.slice();for(var r=0;r<n.length;r++)e(n[r]);var o=s;B(B.s=455)}([function(A,e,t){var i=t(39),B=t(103),n=t(40),s=n.TYPE,r=t(101),o=r.isNewline,g=r.isName,a=r.isValidEscape,c=r.isNumberStart,Q=r.isIdentifierStart,E=r.charCodeCategory,w=r.isBOM,C=t(28),l=C.cmpStr,I=C.getNewlineLength,h=C.findWhiteSpaceEnd,u=C.consumeEscaped,d=C.consumeName,Y=C.consumeNumber,M=C.consumeBadUrlRemnants;function F(A,e){function t(e){return e<F?A.charCodeAt(e):0}function n(){return f=Y(A,f),Q(t(f),t(f+1),t(f+2))?(k=s.Dimension,void(f=d(A,f))):37===t(f)?(k=s.Percentage,void f++):void(k=s.Number)}function r(){const e=f;return f=d(A,f),l(A,e,f,"url")&&40===t(f)?34===t(f=h(A,f+1))||39===t(f)?(k=s.Function,void(f=e+4)):void function(){for(k=s.Url,f=h(A,f);f<A.length;f++){var e=A.charCodeAt(f);switch(E(e)){case 41:return void f++;case E.Eof:return;case E.WhiteSpace:return 41===t(f=h(A,f))||f>=A.length?void(f<A.length&&f++):(f=M(A,f),void(k=s.BadUrl));case 34:case 39:case 40:case E.NonPrintable:return f=M(A,f),void(k=s.BadUrl);case 92:if(a(e,t(f+1))){f=u(A,f)-1;break}return f=M(A,f),void(k=s.BadUrl)}}}():40===t(f)?(k=s.Function,void f++):void(k=s.Ident)}function C(e){for(e||(e=t(f++)),k=s.String;f<A.length;f++){var i=A.charCodeAt(f);switch(E(i)){case e:return void f++;case E.Eof:return;case E.WhiteSpace:if(o(i))return f+=I(A,f,i),void(k=s.BadString);break;case 92:if(f===A.length-1)break;var B=t(f+1);o(B)?f+=I(A,f+1,B):a(i,B)&&(f=u(A,f)-1)}}}e||(e=new i);for(var F=(A=String(A||"")).length,D=B(e.offsetAndType,F+1),m=B(e.balance,F+1),p=0,U=w(t(0)),f=U,N=0,G=0,y=0;f<F;){var H=A.charCodeAt(f),k=0;switch(m[p]=F,E(H)){case E.WhiteSpace:k=s.WhiteSpace,f=h(A,f+1);break;case 34:C();break;case 35:g(t(f+1))||a(t(f+1),t(f+2))?(k=s.Hash,f=d(A,f+1)):(k=s.Delim,f++);break;case 39:C();break;case 40:k=s.LeftParenthesis,f++;break;case 41:k=s.RightParenthesis,f++;break;case 43:c(H,t(f+1),t(f+2))?n():(k=s.Delim,f++);break;case 44:k=s.Comma,f++;break;case 45:c(H,t(f+1),t(f+2))?n():45===t(f+1)&&62===t(f+2)?(k=s.CDC,f+=3):Q(H,t(f+1),t(f+2))?r():(k=s.Delim,f++);break;case 46:c(H,t(f+1),t(f+2))?n():(k=s.Delim,f++);break;case 47:42===t(f+1)?(k=s.Comment,1===(f=A.indexOf("*/",f+2)+2)&&(f=A.length)):(k=s.Delim,f++);break;case 58:k=s.Colon,f++;break;case 59:k=s.Semicolon,f++;break;case 60:33===t(f+1)&&45===t(f+2)&&45===t(f+3)?(k=s.CDO,f+=4):(k=s.Delim,f++);break;case 64:Q(t(f+1),t(f+2),t(f+3))?(k=s.AtKeyword,f=d(A,f+1)):(k=s.Delim,f++);break;case 91:k=s.LeftSquareBracket,f++;break;case 92:a(H,t(f+1))?r():(k=s.Delim,f++);break;case 93:k=s.RightSquareBracket,f++;break;case 123:k=s.LeftCurlyBracket,f++;break;case 125:k=s.RightCurlyBracket,f++;break;case E.Digit:n();break;case E.NameStart:r();break;case E.Eof:break;default:k=s.Delim,f++}switch(k){case N:for(N=(G=m[y=16777215&G])>>24,m[p]=y,m[y++]=p;y<p;y++)m[y]===F&&(m[y]=p);break;case s.LeftParenthesis:case s.Function:m[p]=G,G=(N=s.RightParenthesis)<<24|p;break;case s.LeftSquareBracket:m[p]=G,G=(N=s.RightSquareBracket)Line truncated
|
||||
/* @license twgl.js 5.5.3 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
|
||||
Available via the MIT license.
|
||||
see: http://github.com/greggman/twgl.js for details */
|
||||
let i=Float32Array;function B(A,e,t){const B=new i(3);return A&&(B[0]=A),e&&(B[1]=e),t&&(B[2]=t),B}function n(A,e,t){return(t=t||new i(3))[0]=A[0]+e[0],t[1]=A[1]+e[1],t[2]=A[2]+e[2],t}function s(A,e,t){return(t=t||new i(3))[0]=A[0]-e[0],t[1]=A[1]-e[1],t[2]=A[2]-e[2],t}function r(A,e,t){t=t||new i(3);const B=A[2]*e[0]-A[0]*e[2],n=A[0]*e[1]-A[1]*e[0];return t[0]=A[1]*e[2]-A[2]*e[1],t[1]=B,t[2]=n,t}function o(A,e){e=e||new i(3);const t=A[0]*A[0]+A[1]*A[1]+A[2]*A[2],B=Math.sqrt(t);return B>1e-5?(e[0]=A[0]/B,e[1]=A[1]/B,e[2]=A[2]/B):(e[0]=0,e[1]=0,e[2]=0),e}function g(A,e,t){return(t=t||new i(3))[0]=A[0]*e[0],t[1]=A[1]*e[1],t[2]=A[2]*e[2],t}var a=Object.freeze({__proto__:null,add:n,copy:function(A,e){return(e=e||new i(3))[0]=A[0],e[1]=A[1],e[2]=A[2],e},create:B,cross:r,distance:function(A,e){const t=A[0]-e[0],i=A[1]-e[1],B=A[2]-e[2];return Math.sqrt(t*t+i*i+B*B)},distanceSq:function(A,e){const t=A[0]-e[0],i=A[1]-e[1],B=A[2]-e[2];return t*t+i*i+B*B},divide:function(A,e,t){return(t=t||new i(3))[0]=A[0]/e[0],t[1]=A[1]/e[1],t[2]=A[2]/e[2],t},divScalar:function(A,e,t){return(t=t||new i(3))[0]=A[0]/e,t[1]=A[1]/e,t[2]=A[2]/e,t},dot:function(A,e){return A[0]*e[0]+A[1]*e[1]+A[2]*e[2]},lerp:function(A,e,t,B){return(B=B||new i(3))[0]=A[0]+t*(e[0]-A[0]),B[1]=A[1]+t*(e[1]-A[1]),B[2]=A[2]+t*(e[2]-A[2]),B},lerpV:function(A,e,t,B){return(B=B||new i(3))[0]=A[0]+t[0]*(e[0]-A[0]),B[1]=A[1]+t[1]*(e[1]-A[1]),B[2]=A[2]+t[2]*(e[2]-A[2]),B},length:function(A){return Math.sqrt(A[0]*A[0]+A[1]*A[1]+A[2]*A[2])},lengthSq:function(A){return A[0]*A[0]+A[1]*A[1]+A[2]*A[2]},max:function(A,e,t){return(t=t||new i(3))[0]=Math.max(A[0],e[0]),t[1]=Math.max(A[1],e[1]),t[2]=Math.max(A[2],e[2]),t},min:function(A,e,t){return(t=t||new i(3))[0]=Math.min(A[0],e[0]),t[1]=Math.min(A[1],e[1]),t[2]=Math.min(A[2],e[2]),t},mulScalar:function(A,e,t){return(t=t||new i(3))[0]=A[0]*e,t[1]=A[1]*e,t[2]=A[2]*e,t},multiply:g,negate:function(A,e){return(e=e||new i(3))[0]=-A[0],e[1]=-A[1],e[2]=-A[2],e},normalize:o,setDefaultType:function(A){const e=i;return i=A,e},subtract:s});let c,Q,E,w=Float32Array;function C(A,e){return(e=e||new w(16))[0]=A[0],e[1]=A[1],e[2]=A[2],e[3]=A[3],e[4]=A[4],e[5]=A[5],e[6]=A[6],e[7]=A[7],e[8]=A[8],e[9]=A[9],e[10]=A[10],e[11]=A[11],e[12]=A[12],e[13]=A[13],e[14]=A[14],e[15]=A[15],e}function l(A){return(A=A||new w(16))[0]=1,A[1]=0,A[2]=0,A[3]=0,A[4]=0,A[5]=1,A[6]=0,A[7]=0,A[8]=0,A[9]=0,A[10]=1,A[11]=0,A[12]=0,A[13]=0,A[14]=0,A[15]=1,A}function I(A,e){e=e||new w(16);const t=A[0],i=A[1],B=A[2],n=A[3],s=A[4],r=A[5],o=A[6],g=A[7],a=A[8],c=A[9],Q=A[10],E=A[11],C=A[12],l=A[13],I=A[14],h=A[15],u=Q*h,d=I*E,Y=o*h,M=I*g,F=o*E,D=Q*g,m=B*h,p=I*n,U=B*E,f=Q*n,N=B*g,G=o*n,y=a*l,H=C*c,k=s*l,R=C*r,x=s*c,J=a*r,T=t*l,S=C*i,b=t*c,j=a*i,z=t*r,v=s*i,L=u*r+M*c+F*l-(d*r+Y*c+D*l),P=d*i+m*c+f*l-(u*i+p*c+U*l),W=Y*i+p*r+N*l-(M*i+m*r+G*l),O=D*i+U*r+G*c-(F*i+f*r+N*c),V=1/(t*L+s*P+a*W+C*O);return e[0]=V*L,e[1]=V*P,e[2]=V*W,e[3]=V*O,e[4]=V*(d*s+Y*a+D*C-(u*s+M*a+F*C)),e[5]=V*(u*t+p*a+U*C-(d*t+m*a+f*C)),e[6]=V*(M*t+m*s+G*C-(Y*t+p*s+N*C)),e[7]=V*(F*t+f*s+N*a-(D*t+U*s+G*a)),e[8]=V*(y*g+R*E+x*h-(H*g+k*E+J*h)),e[9]=V*(H*n+T*E+j*h-(y*n+S*E+b*h)),e[10]=V*(k*n+S*g+z*h-(R*n+T*g+v*h)),e[11]=V*(J*n+b*g+v*E-(x*n+j*g+z*E)),e[12]=V*(k*Q+J*I+H*o-(x*I+y*o+R*Q)),e[13]=V*(b*I+y*B+S*Q-(T*Q+j*I+H*B)),e[14]=V*(T*o+v*I+R*B-(z*I+k*B+S*o)),e[15]=V*(z*Q+x*B+j*o-(b*o+v*Q+J*B)),e}function h(A,e,t){t=t||B();const i=e[0],n=e[1],s=e[2],r=i*A[3]+n*A[7]+s*A[11]+A[15];return t[0]=(i*A[0]+n*A[4]+s*A[8]+A[12])/r,t[1]=(i*A[1]+n*A[5]+s*A[9]+A[13])/r,t[2]=(i*A[2]+n*A[6]+s*A[10]+A[14])/r,t}function u(A,e,t){t=t||B();const i=e[0],n=e[1],s=e[2];return t[0]=i*A[0]+n*A[4]+s*A[8],t[1]=i*A[1]+n*A[5]+s*A[9],t[2]=i*A[2]+n*A[6]+s*A[10],t}var d=Object.freeze({__proto__:null,axisRotate:function(A,e,t,i){i=i||new w(16);let B=e[0],n=e[1],s=e[2];const r=Math.sqrt(B*B+n*n+s*s);B/=r,n/=r,s/=r;const o=B*B,g=n*n,a=s*s,c=Math.cos(t),Q=Math.sin(t),E=1-c,C=o+(1-o)*c,l=B*n*E+s*Q,I=B*s*E-n*Q,h=B*n*E-s*Q,u=g+(1-g)*c,d=n*s*E+B*Q,Y=B*s*E+n*Q,M=n*s*E-B*Q,F=a+(1-a)*c,D=A[0],m=A[1],p=A[2],U=A[3],f=A[4],N=A[5],G=A[6],y=A[7],H=A[8],k=A[9],R=A[10],x=A[11];return i[0]=C*D+l*f+I*H,i[1]=C*m+l*N+I*k,i[2]=C*p+l*G+I*R,i[3]=C*U+l*y+I*x,i[4]=h*D+u*f+d*H,i[5]=h*m+u*N+d*k,i[6]=h*p+u*G+d*R,i[7]=h*U+u*y+d*x,i[8]=Y*D+M*f+F*H,i[9]=Y*m+M*N+F*k,i[10]=Y*p+M*G+F*R,i[11]=Y*U+M*y+F*x,A!==i&&(i[12]=A[12],i[13]=A[13],i[14]=A[14],i[15]=A[15]),i},axisRotation:function(A,e,t){t=t||new w(16);let i=A[0],B=A[1],n=A[2];const s=Math.sqrt(i*i+B*B+n*n);i/=s,B/=s,n/=s;const r=i*i,o=B*B,g=n*n,a=Math.cos(e),c=Math.sin(e),Q=1-a;return t[0]=r+(1-r)*a,t[1]=i*B*Q+n*c,t[2]=i*n*Q-B*c,t[3]=0,t[4]=i*B*Q-n*c,t[5]=o+(1-o)*a,t[6]=B*n*Q+i*c,t[7]=0,t[8]=i*n*Q+B*c,t[9]=B*n*Q-i*c,t[10]=g+(1-g)*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},copy:C,create:function(){return new w(16).fill(0)},frustum:function(A,e,t,i,B,n,s){const r=e-A,o=i-t,g=B-n;return(s=s||new w(16))[0]=2*B/r,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2*B/o,s[6]=0,s[7]=0,s[8]=(A+e)/r,s[9]=(i+t)/o,s[10]=n/g,s[11]=-1,s[12]=0,s[13]=0,s[14]=B*n/Line truncated
|
||||
/*!
|
||||
* The buffer module from node.js, for the browser.
|
||||
*
|
||||
* @author Feross Aboukhadijeh <http://feross.org>
|
||||
* @license MIT
|
||||
*/
|
||||
var i=t(136),B=t(137),n=t(138);function s(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function r(A,e){if(s()<e)throw new RangeError("Invalid typed array length");return o.TYPED_ARRAY_SUPPORT?(A=new Uint8Array(e)).__proto__=o.prototype:(null===A&&(A=new o(e)),A.length=e),A}function o(A,e,t){if(!(o.TYPED_ARRAY_SUPPORT||this instanceof o))return new o(A,e,t);if("number"==typeof A){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return c(this,A)}return g(this,A,e,t)}function g(A,e,t,i){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(A,e,t,i){if(e.byteLength,t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(i||0))throw new RangeError("'length' is out of bounds");e=void 0===t&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,t):new Uint8Array(e,t,i);o.TYPED_ARRAY_SUPPORT?(A=e).__proto__=o.prototype:A=Q(A,e);return A}(A,e,t,i):"string"==typeof e?function(A,e,t){"string"==typeof t&&""!==t||(t="utf8");if(!o.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var i=0|w(e,t),B=(A=r(A,i)).write(e,t);B!==i&&(A=A.slice(0,B));return A}(A,e,t):function(A,e){if(o.isBuffer(e)){var t=0|E(e.length);return 0===(A=r(A,t)).length||e.copy(A,0,0,t),A}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(i=e.length)!=i?r(A,0):Q(A,e);if("Buffer"===e.type&&n(e.data))return Q(A,e.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(A,e)}function a(A){if("number"!=typeof A)throw new TypeError('"size" argument must be a number');if(A<0)throw new RangeError('"size" argument must not be negative')}function c(A,e){if(a(e),A=r(A,e<0?0:0|E(e)),!o.TYPED_ARRAY_SUPPORT)for(var t=0;t<e;++t)A[t]=0;return A}function Q(A,e){var t=e.length<0?0:0|E(e.length);A=r(A,t);for(var i=0;i<t;i+=1)A[i]=255&e[i];return A}function E(A){if(A>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|A}function w(A,e){if(o.isBuffer(A))return A.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(A)||A instanceof ArrayBuffer))return A.byteLength;"string"!=typeof A&&(A=""+A);var t=A.length;if(0===t)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return j(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return z(A).length;default:if(i)return j(A).length;e=(""+e).toLowerCase(),i=!0}}function C(A,e,t){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if((t>>>=0)<=(e>>>=0))return"";for(A||(A="utf8");;)switch(A){case"hex":return N(this,e,t);case"utf8":case"utf-8":return p(this,e,t);case"ascii":return U(this,e,t);case"latin1":case"binary":return f(this,e,t);case"base64":return m(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,e,t);default:if(i)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),i=!0}}function l(A,e,t){var i=A[e];A[e]=A[t],A[t]=i}function I(A,e,t,i,B){if(0===A.length)return-1;if("string"==typeof t?(i=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=B?0:A.length-1),t<0&&(t=A.length+t),t>=A.length){if(B)return-1;t=A.length-1}else if(t<0){if(!B)return-1;t=0}if("string"==typeof e&&(e=o.from(e,i)),o.isBuffer(e))return 0===e.length?-1:h(A,e,t,i,B);if("number"==typeof e)return e&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?B?Uint8Array.prototype.indexOf.call(A,e,t):Uint8Array.prototype.lastIndexOf.call(A,e,t):h(A,[e],t,i,B);throw new TypeError("val must be string, number or Buffer")}function h(A,e,t,i,B){var n,s=1,r=A.length,o=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(A.length<2||e.length<2)return-1;s=2,r/=2,o/=2,t/=2}function g(A,e){return 1===s?A[e]:A.readUInt16BE(e*s)}if(B){var a=-1;for(n=t;n<r;n++)if(g(A,n)===g(e,-1===a?0:n-a)){if(-1===a&&(a=n),n-a+1===o)return a*s}else-1!==a&&(n-=n-a),a=-1}else for(t+o>r&&(t=r-o),n=t;n>=0;n--){for(var c=!0,Q=0;Q<o;Q++)if(g(A,n+Q)!==g(e,Q)){c=!1;break}if(c)return n}return-1}function u(A,e,t,i){t=Number(t)||0;var B=A.length-t;i?(i=Number(i))>B&&(i=B):i=B;var n=e.length;if(n%2!=0)throw new TypeError("Invalid hex string");i>n/2&&(i=n/2);for(var s=0;s<i;++s){var r=parseInt(e.substr(2*s,2),16);if(isNaN(r))return s;A[t+s]=r}return s}function d(A,e,t,i){return v(j(e,A.length-t),A,t,i)}function Y(A,e,t,i){return v(function(A){for(var e=[],t=0;t<A.length;++t)e.push(255&A.charCodeAt(t));return e}(e),A,t,i)}function M(A,e,t,i){return Y(A,e,t,i)}function F(A,e,t,i){return v(z(e),A,t,Line truncated
|
||||
/**
|
||||
* [js-md5]{@link https://github.com/emn178/js-md5}
|
||||
*
|
||||
* @namespace md5
|
||||
* @version 0.7.3
|
||||
* @author Chen, Yi-Cyuan [[email protected]]
|
||||
* @copyright Chen, Yi-Cyuan 2014-2017
|
||||
* @license MIT
|
||||
*/!function(){"use strict";var ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self,NODE_JS=!root.JS_MD5_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_MD5_NO_COMMON_JS&&"object"==typeof module&&module.exports,AMD=__webpack_require__(393),ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[128,32768,8388608,-2147483648],SHIFT=[0,8,16,24],OUTPUT_TYPES=["hex","array","digest","buffer","arrayBuffer","base64"],BASE64_ENCODE_CHAR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),blocks=[],buffer8;if(ARRAY_BUFFER){var buffer=new ArrayBuffer(68);buffer8=new Uint8Array(buffer),blocks=new Uint32Array(buffer)}!root.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(A){return"[object Array]"===Object.prototype.toString.call(A)}),!ARRAY_BUFFER||!root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(A){return"object"==typeof A&&A.buffer&&A.buffer.constructor===ArrayBuffer});var createOutputMethod=function(A){return function(e){return new Md5(!0).update(e)[A]()}},createMethod=function(){var A=createOutputMethod("hex");NODE_JS&&(A=nodeWrap(A)),A.create=function(){return new Md5},A.update=function(e){return A.create().update(e)};for(var e=0;e<OUTPUT_TYPES.length;++e){var t=OUTPUT_TYPES[e];A[t]=createOutputMethod(t)}return A},nodeWrap=function(method){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),nodeMethod=function(A){if("string"==typeof A)return crypto.createHash("md5").update(A,"utf8").digest("hex");if(null==A)throw ERROR;return A.constructor===ArrayBuffer&&(A=new Uint8Array(A)),Array.isArray(A)||ArrayBuffer.isView(A)||A.constructor===Buffer?crypto.createHash("md5").update(new Buffer(A)).digest("hex"):method(A)};return nodeMethod};function Md5(A){if(A)blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks,this.buffer8=buffer8;else if(ARRAY_BUFFER){var e=new ArrayBuffer(68);this.buffer8=new Uint8Array(e),this.blocks=new Uint32Array(e)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}Md5.prototype.update=function(A){if(!this.finalized){var e,t=typeof A;if("string"!==t){if("object"!==t)throw ERROR;if(null===A)throw ERROR;if(ARRAY_BUFFER&&A.constructor===ArrayBuffer)A=new Uint8Array(A);else if(!(Array.isArray(A)||ARRAY_BUFFER&&ArrayBuffer.isView(A)))throw ERROR;e=!0}for(var i,B,n=0,s=A.length,r=this.blocks,o=this.buffer8;n<s;){if(this.hashed&&(this.hashed=!1,r[0]=r[16],r[16]=r[1]=r[2]=r[3]=r[4]=r[5]=r[6]=r[7]=r[8]=r[9]=r[10]=r[11]=r[12]=r[13]=r[14]=r[15]=0),e)if(ARRAY_BUFFER)for(B=this.start;n<s&&B<64;++n)o[B++]=A[n];else for(B=this.start;n<s&&B<64;++n)r[B>>2]|=A[n]<<SHIFT[3&B++];else if(ARRAY_BUFFER)for(B=this.start;n<s&&B<64;++n)(i=A.charCodeAt(n))<128?o[B++]=i:i<2048?(o[B++]=192|i>>6,o[B++]=128|63&i):i<55296||i>=57344?(o[B++]=224|i>>12,o[B++]=128|i>>6&63,o[B++]=128|63&i):(i=65536+((1023&i)<<10|1023&A.charCodeAt(++n)),o[B++]=240|i>>18,o[B++]=128|i>>12&63,o[B++]=128|i>>6&63,o[B++]=128|63&i);else for(B=this.start;n<s&&B<64;++n)(i=A.charCodeAt(n))<128?r[B>>2]|=i<<SHIFT[3&B++]:i<2048?(r[B>>2]|=(192|i>>6)<<SHIFT[3&B++],r[B>>2]|=(128|63&i)<<SHIFT[3&B++]):i<55296||i>=57344?(r[B>>2]|=(224|i>>12)<<SHIFT[3&B++],r[B>>2]|=(128|i>>6&63)<<SHIFT[3&B++],r[B>>2]|=(128|63&i)<<SHIFT[3&B++]):(i=65536+((1023&i)<<10|1023&A.charCodeAt(++n)),r[B>>2]|=(240|i>>18)<<SHIFT[3&B++],r[B>>2]|=(128|i>>12&63)<<SHIFT[3&B++],r[B>>2]|=(128|i>>6&63)<<SHIFT[3&B++],r[B>>2]|=(128|63&i)<<SHIFT[3&B++]);this.lastByteIndex=B,this.bytes+=B-this.start,B>=64?(this.start=B-64,this.hash(),this.hashed=!0):this.start=B}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var A=this.blocks,e=this.lastByteIndex;A[e>>2]|=EXTRA[3&e],e>=56&&(this.hashed||this.hash(),A[0]=A[16],A[16]=A[1]=A[2]=A[3]=A[4]=A[5]=A[6]=A[7]=A[8]=A[9]=A[10]=A[11]=A[12]=A[13]=A[14]=A[15]=0),A[14]=this.bytes<<3,A[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var A,e,t,i,B,n,s=this.blocks;this.first?e=((e=((A=((A=s[0]-680876937)<<7|A>>>25)-271733879<<0)^(t=((t=(-271733879^(i=((i=(-1732584194^2004318071&A)+s[1]-117830708)<<12|i>>>20)+A<<0)&(-271733879^A))+s[2]-1126478375)<<17|t>>>15)+i<<0)&(i^A))+s[3]-1316259209)<<22|e>>>10)+t<<0:(A=this.h0,e=this.h1,t=this.h2,e=((e+=((A=((A+=((i=this.h3)^e&(t^i))+s[0]-680876936)<<7|A>>>25)+e<<0)^(t=((t+=(e^(i=((i+=(t^A&(e^t))+s[1]-389564586)<<12|i>>>20)+A<<0)&(A^e))+s[2]+606105819)<<17|t>>>Line truncated
|
||||
/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */
|
||||
A.exports=function(){"use strict";var A=Object.hasOwnProperty,e=Object.setPrototypeOf,t=Object.isFrozen,i=Object.getPrototypeOf,B=Object.getOwnPropertyDescriptor,n=Object.freeze,s=Object.seal,r=Object.create,o="undefined"!=typeof Reflect&&Reflect,g=o.apply,a=o.construct;g||(g=function(A,e,t){return A.apply(e,t)}),n||(n=function(A){return A}),s||(s=function(A){return A}),a||(a=function(A,e){return new(Function.prototype.bind.apply(A,[null].concat(function(A){if(Array.isArray(A)){for(var e=0,t=Array(A.length);e<A.length;e++)t[e]=A[e];return t}return Array.from(A)}(e))))});var c,Q=M(Array.prototype.forEach),E=M(Array.prototype.pop),w=M(Array.prototype.push),C=M(String.prototype.toLowerCase),l=M(String.prototype.match),I=M(String.prototype.replace),h=M(String.prototype.indexOf),u=M(String.prototype.trim),d=M(RegExp.prototype.test),Y=(c=TypeError,function(){for(var A=arguments.length,e=Array(A),t=0;t<A;t++)e[t]=arguments[t];return a(c,e)});function M(A){return function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),B=1;B<t;B++)i[B-1]=arguments[B];return g(A,e,i)}}function F(A,i){e&&e(A,null);for(var B=i.length;B--;){var n=i[B];if("string"==typeof n){var s=C(n);s!==n&&(t(i)||(i[B]=s),n=s)}A[n]=!0}return A}function D(e){var t=r(null),i=void 0;for(i in e)g(A,e,[i])&&(t[i]=e[i]);return t}function m(A,e){for(;null!==A;){var t=B(A,e);if(t){if(t.get)return M(t.get);if("function"==typeof t.value)return M(t.value)}A=i(A)}return function(A){return console.warn("fallback value for",A),null}}var p=n(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),U=n(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),f=n(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),N=n(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),G=n(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),y=n(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),H=n(["#text"]),k=n(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns"]),R=n(["accent-height","accumulate","additive","alignment-baseliLine truncated
|
||||
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||
e.read=function(A,e,t,i,B){var n,s,r=8*B-i-1,o=(1<<r)-1,g=o>>1,a=-7,c=t?B-1:0,Q=t?-1:1,E=A[e+c];for(c+=Q,n=E&(1<<-a)-1,E>>=-a,a+=r;a>0;n=256*n+A[e+c],c+=Q,a-=8);for(s=n&(1<<-a)-1,n>>=-a,a+=i;a>0;s=256*s+A[e+c],c+=Q,a-=8);if(0===n)n=1-g;else{if(n===o)return s?NaN:1/0*(E?-1:1);s+=Math.pow(2,i),n-=g}return(E?-1:1)*s*Math.pow(2,n-i)},e.write=function(A,e,t,i,B,n){var s,r,o,g=8*n-B-1,a=(1<<g)-1,c=a>>1,Q=23===B?Math.pow(2,-24)-Math.pow(2,-77):0,E=i?0:n-1,w=i?1:-1,C=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(r=isNaN(e)?1:0,s=a):(s=Math.floor(Math.log(e)/Math.LN2),e*(o=Math.pow(2,-s))<1&&(s--,o*=2),(e+=s+c>=1?Q/o:Q*Math.pow(2,1-c))*o>=2&&(s++,o/=2),s+c>=a?(r=0,s=a):s+c>=1?(r=(e*o-1)*Math.pow(2,B),s+=c):(r=e*Math.pow(2,c-1)*Math.pow(2,B),s=0));B>=8;A[t+E]=255&r,E+=w,r/=256,B-=8);for(s=s<<B|r,g+=B;g>0;A[t+E]=255&s,E+=w,s/=256,g-=8);A[t+E-w]|=128*C}},function(A,e){var t={}.toString;A.exports=Array.isArray||function(A){return"[object Array]"==t.call(A)}},function(A,e,t){(function(A){var i=void 0!==A&&A||"undefined"!=typeof self&&self||window,B=Function.prototype.apply;function n(A,e){this._id=A,this._clearFn=e}e.setTimeout=function(){return new n(B.call(setTimeout,i,arguments),clearTimeout)},e.setInterval=function(){return new n(B.call(setInterval,i,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(A){A&&A.close()},n.prototype.unref=n.prototype.ref=function(){},n.prototype.close=function(){this._clearFn.call(i,this._id)},e.enroll=function(A,e){clearTimeout(A._idleTimeoutId),A._idleTimeout=e},e.unenroll=function(A){clearTimeout(A._idleTimeoutId),A._idleTimeout=-1},e._unrefActive=e.active=function(A){clearTimeout(A._idleTimeoutId);var e=A._idleTimeout;e>=0&&(A._idleTimeoutId=setTimeout((function(){A._onTimeout&&A._onTimeout()}),e))},t(140),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==A&&A.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==A&&A.clearImmediate||this&&this.clearImmediate}).call(this,t(9))},function(A,e,t){(function(A,e){!function(A,t){"use strict";if(!A.setImmediate){var i,B,n,s,r,o=1,g={},a=!1,c=A.document,Q=Object.getPrototypeOf&&Object.getPrototypeOf(A);Q=Q&&Q.setTimeout?Q:A,"[object process]"==={}.toString.call(A.process)?i=function(A){e.nextTick((function(){w(A)}))}:!function(){if(A.postMessage&&!A.importScripts){var e=!0,t=A.onmessage;return A.onmessage=function(){e=!1},A.postMessage("","*"),A.onmessage=t,e}}()?A.MessageChannel?((n=new MessageChannel).port1.onmessage=function(A){w(A.data)},i=function(A){n.port2.postMessage(A)}):c&&"onreadystatechange"in c.createElement("script")?(B=c.documentElement,i=function(A){var e=c.createElement("script");e.onreadystatechange=function(){w(A),e.onreadystatechange=null,B.removeChild(e),e=null},B.appendChild(e)}):i=function(A){setTimeout(w,0,A)}:(s="setImmediate$"+Math.random()+"$",r=function(e){e.source===A&&"string"==typeof e.data&&0===e.data.indexOf(s)&&w(+e.data.slice(s.length))},A.addEventListener?A.addEventListener("message",r,!1):A.attachEvent("onmessage",r),i=function(e){A.postMessage(s+e,"*")}),Q.setImmediate=function(A){"function"!=typeof A&&(A=new Function(""+A));for(var e=new Array(arguments.length-1),t=0;t<e.length;t++)e[t]=arguments[t+1];var B={callback:A,args:e};return g[o]=B,i(o),o++},Q.clearImmediate=E}function E(A){delete g[A]}function w(A){if(a)setTimeout(w,0,A);else{var e=g[A];if(e){a=!0;try{!function(A){var e=A.callback,t=A.args;switch(t.length){case 0:e();break;case 1:e(t[0]);break;case 2:e(t[0],t[1]);break;case 3:e(t[0],t[1],t[2]);break;default:e.apply(void 0,t)}}(e)}finally{E(A),a=!1}}}}}("undefined"==typeof self?void 0===A?this:A:self)}).call(this,t(9),t(43))},function(A,e,t){const i=t(1);A.exports=class{constructor(){this.callbacks=[],this.nextResponseId=0}call(A,e){for(var t=arguments.length,i=new Array(t>2?t-2:0),B=2;B<t;B++)i[B-2]=arguments[B];return this.transferCall(A,e,null,...i)}transferCall(A,e,t){try{const{provider:s,isRemote:r}=this._getServiceProvider(A);if(s){for(var i=arguments.length,B=new Array(i>3?i-3:0),n=3;n<i;n++)B[n-3]=arguments[n];if(r)return this._remoteTransferCall(s,A,e,t,...B);const o=s[e].apply(s,B);return Promise.resolve(o)}return Promise.reject(new Error("Service not found: ".concat(A)))}catch(A){return Promise.reject(A)}}_isRemoteService(A){return this._getServiceProvider(A).isRemote}_remoteCall(A,e,t){for(var i=arguments.length,B=new Array(i>3?i-3:0),n=3;n<i;n++)B[n-3]=arguments[n];return this._remoteTransferCall(A,e,t,null,...B)}_remoteTransferCall(A,e,t,i){for(var B=arguments.length,n=new Array(B>4?B-4:0),s=4;s<B;s++)n[s-4]=arguments[s];return new Promise((B,s)=>{const r=this._storeCallbacks(B,s);n.length>0&&"function"==typeof n[n.length-1].func&&(n.pop(),n.pop()),i?A.postMessage({service:e,method:t,responseId:r,args:n},i):A.postMessage({service:e,method:t,responseId:r,args:n})})}_storeCallbacks(A,e){const t=this.nextResponseId++;return this.callbacks[t]=[A,e],t}_deliverResponse(A,e){try{consLine truncated
|
||||
//!! Deliberately using an API that's deprecated in node.js because
|
||||
//!! this file is for browsers and we expect them to cope with it.
|
||||
//!! Discussion: github.com/node-browser-compat/atob/pull/9
|
||||
return new A(e,"base64").toString("binary")}:"object"==typeof t.base64js?function(A){var e=t.base64js.b64ToByteArray(A);return Array.prototype.map.call(e,(function(A){return String.fromCharCode(A)})).join("")}:function(){throw new Error("You're probably in an old browser or an iOS webworker. It might help to include beatgammit's base64-js.")};t.atob=B,e&&e.exports&&(e.exports=B)}(window)}).call(this,t(12).Buffer,t(159)(A))},function(A,e){A.exports=function(A){return A.webpackPolyfill||(A.deprecate=function(){},A.paths=[],A.children||(A.children=[]),Object.defineProperty(A,"loaded",{enumerable:!0,get:function(){return A.l}}),Object.defineProperty(A,"id",{enumerable:!0,get:function(){return A.i}}),A.webpackPolyfill=1),A}},function(A,e,t){(function(e){!function(){"use strict";A.exports=function(A){return(A instanceof e?A:e.from(A.toString(),"binary")).toString("base64")}}()}).call(this,t(12).Buffer)},function(A,e,t){const i=t(4),B=t(3),n=t(14),s=t(2),r=t(6),o=t(5),g=t(16);let a={};try{a=t(162)}catch(A){}class c{constructor(A){this.runtime=A,this._concurrencyCounter=0,this._drumPlayers=[],this._instrumentPlayerArrays=[],this._instrumentPlayerNoteArrays=[],this._bufferSources=[],this._loadAllSounds(),this._onTargetCreated=this._onTargetCreated.bind(this),this.runtime.on("targetWasCreated",this._onTargetCreated),this._playNoteForPicker=this._playNoteForPicker.bind(this),this.runtime.on("PLAY_NOTE",this._playNoteForPicker)}_loadAllSounds(){const A=[];this.DRUM_INFO.forEach((e,t)=>{const i="drums/".concat(e.fileName),B=this._storeSound(i,t,this._drumPlayers);A.push(B)}),this.INSTRUMENT_INFO.forEach((e,t)=>{this._instrumentPlayerArrays[t]=[],this._instrumentPlayerNoteArrays[t]=[],e.samples.forEach((i,B)=>{const n="instruments/".concat(e.dirName,"/").concat(i),s=this._storeSound(n,B,this._instrumentPlayerArrays[t]);A.push(s)})}),Promise.all(A).then(()=>{})}_storeSound(A,e,t){const i="".concat(A,".mp3");if(!a[i])return;const B=a[i];return fetch(B).then(A=>A.arrayBuffer()).then(A=>this._decodeSound(A)).then(A=>{t[e]=A})}_decodeSound(A){const e=this.runtime.audioEngine;return e?e.decodeSoundPlayer({data:{buffer:A}}):Promise.reject(new Error("No Audio Context Detected"))}_buildMenu(A){return A.map((A,e)=>{const t={};return t.text=A.name,t.value=String(e+1),t})}get DRUM_INFO(){return[{name:r({id:"music.drumSnare",default:"(1) Snare Drum",description:"Sound of snare drum as used in a standard drum kit"}),fileName:"1-snare"},{name:r({id:"music.drumBass",default:"(2) Bass Drum",description:"Sound of bass drum as used in a standard drum kit"}),fileName:"2-bass-drum"},{name:r({id:"music.drumSideStick",default:"(3) Side Stick",description:"Sound of a drum stick hitting the side of a drum (usually the snare)"}),fileName:"3-side-stick"},{name:r({id:"music.drumCrashCymbal",default:"(4) Crash Cymbal",description:"Sound of a drum stick hitting a crash cymbal"}),fileName:"4-crash-cymbal"},{name:r({id:"music.drumOpenHiHat",default:"(5) Open Hi-Hat",description:"Sound of a drum stick hitting a hi-hat while open"}),fileName:"5-open-hi-hat"},{name:r({id:"music.drumClosedHiHat",default:"(6) Closed Hi-Hat",description:"Sound of a drum stick hitting a hi-hat while closed"}),fileName:"6-closed-hi-hat"},{name:r({id:"music.drumTambourine",default:"(7) Tambourine",description:"Sound of a tambourine being struck"}),fileName:"7-tambourine"},{name:r({id:"music.drumHandClap",default:"(8) Hand Clap",description:"Sound of two hands clapping together"}),fileName:"8-hand-clap"},{name:r({id:"music.drumClaves",default:"(9) Claves",description:"Sound of claves being struck together"}),fileName:"9-claves"},{name:r({id:"music.drumWoodBlock",default:"(10) Wood Block",description:"Sound of a wood block being struck"}),fileName:"10-wood-block"},{name:r({id:"music.drumCowbell",default:"(11) Cowbell",description:"Sound of a cowbell being struck"}),fileName:"11-cowbell"},{name:r({id:"music.drumTriangle",default:"(12) Triangle",description:"Sound of a triangle (instrument) being struck"}),fileName:"12-triangle"},{name:r({id:"music.drumBongo",default:"(13) Bongo",description:"Sound of a bongo being struck"}),fileName:"13-bongo"},{name:r({id:"music.drumConga",default:"(14) Conga",description:"Sound of a conga being struck"}),fileName:"14-conga"},{name:r({id:"music.drumCabasa",default:"(15) Cabasa",description:"Sound of a cabasa being shaken"}),fileName:"15-cabasa"},{name:r({id:"music.drumGuiro",default:"(16) Guiro",description:"Sound of a guiro being played"}),fileName:"16-guiro"},{name:r({id:"music.drumVibraslap",default:"(17) Vibraslap",description:"Sound of a Vibraslap being played"}),fileName:"17-vibraslap"},{name:r({id:"music.drumCuica",default:"(18) Cuica",description:"Sound of a cuica being played"}),fileName:"18-cuica"}]}get INSTRUMENT_INFO(){return[{name:r({id:"music.instrumentPiano",default:"(1) Piano",description:"Sound of a piano"}),dirName:"1-piano",releaseTime:.5,samples:[24,36,48,60,72,84,96,108]},{name:r({id:"music.instrumentElectricPiano",default:"Line truncated
|
||||
/*! @source http://purl.eligrey.com/github/canvas-toBlob.js/blob/master/canvas-toBlob.js */
|
||||
!function(A){"use strict";var e,t=A.Uint8Array,i=A.HTMLCanvasElement,B=i&&i.prototype,n=/\s*;\s*base64\s*(?:;|$)/i,s="toDataURL",r=function(A){for(var i,B,n=A.length,s=new t(n/4*3|0),r=0,o=0,g=[0,0],a=0,c=0;n--;)B=A.charCodeAt(r++),255!==(i=e[B-43])&&void 0!==i&&(g[1]=g[0],g[0]=B,c=c<<6|i,4===++a&&(s[o++]=c>>>16,61!==g[1]&&(s[o++]=c>>>8),61!==g[0]&&(s[o++]=c),a=0));return s};t&&(e=new t([62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,0,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51])),!i||B.toBlob&&B.toBlobHD||(B.toBlob||(B.toBlob=function(A,e){if(e||(e="image/png"),this.mozGetAsFile)A(this.mozGetAsFile("canvas",e));else if(this.msToBlob&&/^\s*image\/png\s*(?:$|;)/i.test(e))A(this.msToBlob());else{var i,B=Array.prototype.slice.call(arguments,1),o=this[s].apply(this,B),g=o.indexOf(","),a=o.substring(g+1),c=n.test(o.substring(0,g));Blob.fake?((i=new Blob).encoding=c?"base64":"URI",i.data=a,i.size=a.length):t&&(i=c?new Blob([r(a)],{type:e}):new Blob([decodeURIComponent(a)],{type:e})),A(i)}}),!B.toBlobHD&&B.toDataURLHD?B.toBlobHD=function(){s="toDataURLHD";var A=this.toBlob();return s="toDataURL",A}:B.toBlobHD=B.toBlob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this)},function(A,e,t){(function(e){var i=t(390);A.exports=function(A,t,B){if("string"==typeof A)return B(null,[A,null]);if(!e.isBuffer(A))try{A=new e(A)}catch(A){return B("Input must be a Buffer or a string.")}var n=A.slice(0,3).join(" "),s=!1,r=!1;return 0===n.indexOf("83 99 114")&&(s=!0),0===n.indexOf("80 75")&&(r=!0),r||s?s?B("Parser only supports Scratch 2.X and above"):void i(A,t,B):B(null,[A.toString("utf-8"),null])}}).call(this,t(12).Buffer)},function(A,e,t){var i=t(24);A.exports=function(A,e,t){var B="Failed to unzip and extract project.json, with error: ";return i.loadAsync(A).then((function(A){const i=e?A.file(/^([^/]*\/)?sprite\.json$/)[0]:A.file(/^([^/]*\/)?project\.json$/)[0];return i?i.async("string").then((function(e){return t(null,[e,A])})):t(B+"missing project or sprite json")})).catch((function(A){return t(B+A)}))}},function(A,e,t){const i=t(79);A.exports=function(A,e){var t;try{t=i.parse(A.replace(/(\\+)(b|u0008)/g,(A,e,t)=>e.length%2?A.replace("\\"+t,""):A))}catch(A){return e(A.toString())}return e(null,t)}},function(A,e){A.exports=function(A,e,t){if("objName"in e)return e.projectVersion=2,t(null,e);if(A){if("name"in e)return e.projectVersion=3,t(null,e)}else if("targets"in e)return e.projectVersion=3,t(null,e);t(new Error("Could not parse as a valid SB2 or SB3 project."))}},function(A,e){(function(e){A.exports=e}).call(this,{})},function(A,e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#%()*+,-./:;=?@[]^_`{|}~",i=A=>{let e="";for(;A>=0;)e=t[A%t.length]+e,A=Math.floor(A/t.length)-1;return e};class B{constructor(){this.generatedIds=new Map,this.references=new Map,this.skippedIds=new Set,this.skippedIds.add("of")}skip(A){this.skippedIds.add(A)}addReference(A){const e=this.references.get(A)||0;this.references.set(A,e+1)}generateNewIds(){const A=Array.from(this.references.entries());A.sort((A,e)=>e[1]-A[1]);let e=0;for(const t of A){const A=t[0];let B=i(e);for(;this.skippedIds.has(B);)e++,B=i(e);this.generatedIds.set(A,B),e++}}getNewId(A){return this.generatedIds.has(A)?this.generatedIds.get(A):A}}A.exports=A=>{const e=new B;for(const t of A.targets){for(const A of Object.keys(t.variables))e.skip(A);for(const A of Object.keys(t.lists))e.skip(A);for(const A of Object.keys(t.broadcasts))e.skip(A);for(const A of Object.keys(t.blocks)){const i=t.blocks[A];if(e.addReference(A),!Array.isArray(i)){i.parent&&e.addReference(i.parent),i.next&&e.addReference(i.next),i.comment&&e.addReference(i.comment);for(const A of Object.values(i.inputs))for(let t=1;t<A.length;t++){const i=A[t];"string"==typeof i&&e.addReference(i)}}}for(const A of Object.keys(t.comments)){const i=t.comments[A];e.addReference(A),i.blockId&&e.addReference(i.blockId)}}e.generateNewIds();for(const t of A.targets){const A={},i={};for(const i of Object.keys(t.blocks)){const B=t.blocks[i];if(A[e.getNewId(i)]=B,!Array.isArray(B)){B.parent&&(B.parent=e.getNewId(B.parent)),B.next&&(B.next=e.getNewId(B.next)),B.comment&&(B.comment=e.getNewId(B.comment));for(const A of Object.values(B.inputs))for(let t=1;t<A.length;t++){const i=A[t];"string"==typeof i&&(A[t]=e.getNewId(i))}}}for(const A of Object.keys(t.comments)){const B=t.comments[A];i[e.getNewId(A)]=B,B.blockId&&(B.blockId=e.getNewId(B.blockId))}t.blocks=A,t.comments=i}}},function(A,e,t){const i=t(10),B={"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_pointinLine truncated
|
||||
/**
|
||||
* StartAudioContext.js
|
||||
* @author Yotam Mann
|
||||
* @license http://opensource.org/licenses/MIT MIT License
|
||||
* @copyright 2016 Yotam Mann
|
||||
*/B=[],void 0===(n="function"==typeof(i=function(){var A=function(A,e){this._dragged=!1,this._element=A,this._bindedMove=this._moved.bind(this),this._bindedEnd=this._ended.bind(this,e),A.addEventListener("touchstart",this._bindedEnd),A.addEventListener("touchmove",this._bindedMove),A.addEventListener("touchend",this._bindedEnd),A.addEventListener("mouseup",this._bindedEnd)};function e(A){return"running"===A.state}return A.prototype._moved=function(A){this._dragged=!0},A.prototype._ended=function(A){this._dragged||function(A){var e=A.createBuffer(1,1,A.sampleRate),t=A.createBufferSource();t.buffer=e,t.connect(A.destination),t.start(0),A.resume&&A.resume()}(A),this._dragged=!1},A.prototype.dispose=function(){this._element.removeEventListener("touchstart",this._bindedEnd),this._element.removeEventListener("touchmove",this._bindedMove),this._element.removeEventListener("touchend",this._bindedEnd),this._element.removeEventListener("mouseup",this._bindedEnd),this._bindedMove=null,this._bindedEnd=null,this._element=null},function(t,i,B){var n=new Promise((function(A){!function(A,t){e(A)?t():function i(){e(A)?t():(requestAnimationFrame(i),A.resume&&A.resume())}()}(t,A)})),s=[];return i||(i=document.body),function e(t,i,B){if(Array.isArray(t)||NodeList&&t instanceof NodeList)for(var n=0;n<t.length;n++)e(t[n],i,B);else if("string"==typeof t)e(document.querySelectorAll(t),i,B);else if(t.jquery&&"function"==typeof t.toArray)e(t.toArray(),i,B);else if(Element&&t instanceof Element){var s=new A(t,B);i.push(s)}}(i,s,t),n.then((function(){for(var A=0;A<s.length;A++)s[A].dispose();s=null,B&&B()})),n}})?i.apply(e,B):i)||(A.exports=n)},function(A,e,t){"use strict";var i=t(444),B=i.OfflineAudioContext||i.webkitOfflineAudioContext,n=i.AudioContext||i.webkitAudioContext,s={};A.exports=function(A){if(!n)return null;"number"==typeof A&&(A={sampleRate:A});var e=A&&A.sampleRate;if(A&&A.offline)return B?new B(A.channels||2,A.length,e||44100):null;var t=s[e];if(t)return t;try{t=new n(A)}catch(A){t=new n}return s[t.sampleRate]=s[e]=t,t}},function(A,e,t){(function(e){var t;t="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},A.exports=t}).call(this,t(9))},function(A,e){const t="!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";A.exports=function(){const A=t.length,e=[];for(let i=0;i<20;i++)e[i]=t.charAt(Math.random()*A);return e.join("")}},function(A,e,t){const i=t(447),B=t(42),n=[7,8,9,10,11,12,13,14,16,17,19,21,23,25,28,31,34,37,41,45,50,55,60,66,73,80,88,97,107,118,130,143,157,173,190,209,230,253,279,307,337,371,408,449,494,544,598,658,724,796,876,963,1060,1166,1282,1411,1552,1707,1878,2066,2272,2499,2749,3024,3327,3660,4026,4428,4871,5358,5894,6484,7132,7845,8630,9493,10442,11487,12635,13899,15289,16818,18500,20350,22385,24623,27086,29794,32767],s=[-1,-1,-1,-1,2,4,6,8,-1,-1,-1,-1,2,4,6,8];let r=null;A.exports=class{constructor(A){this.audioContext=A}static get STEP_TABLE(){return n}static get INDEX_TABLE(){return s}decode(A){return new Promise((e,t)=>{const n=new i(A);"RIFF"!==n.readUint8String(4)&&(B.warn("incorrect adpcm wav header"),t());const s=n.readInt32();s+8!==A.byteLength&&B.warn("adpcm wav length in header: ".concat(s," is incorrect"));"WAVE"!==n.readUint8String(4)&&(B.warn("incorrect adpcm wav header"),t());const r=this.extractChunk("fmt ",n);this.encoding=r.readUint16(),this.channels=r.readUint16(),this.samplesPerSecond=r.readUint32(),this.bytesPerSecond=r.readUint32(),this.blockAlignment=r.readUint16(),this.bitsPerSample=r.readUint16(),r.position+=2,this.samplesPerBlock=r.readUint16(),this.adpcmBlockSize=(this.samplesPerBlock-1)/2+4;const o=this.extractChunk("data",n),g=this.numberOfSamples(o,this.adpcmBlockSize),a=this.audioContext.createBuffer(1,g,this.samplesPerSecond);this.imaDecompress(o,this.adpcmBlockSize,a.getChannelData(0)),e(a)})}extractChunk(A,e){for(e.position=12;e.position<e.getLength()-8;){const t=e.readUint8String(4),i=e.readInt32();if(t===A){return e.extract(i)}e.position+=i}}numberOfSamples(A,e){if(!A)return 0;A.position=0;const t=A.getBytesAvailable();return(t/e|0)*(2*(e-4))+1+2*Math.max(t%e-4,0)+Math.min(t%e,1)}imaDecompress(A,e,t){let i,B,o,g=0,a=-1;if(!A)return;A.position=0;const c=t.length,Q=2*(e-4),E=function(){if(null===r){const A=n.length,e=s.length;r=new Array(A*e).fill(0);let t=0;for(let i=0;i<A;i++)for(let A=0;A<e;A++){const e=n[i];let B=0;4&A&&(B+=e),2&A&&(B+=e>>1),1&A&&(B+=e>>2),B+=e>>3,r[t++]=8&A?-B:B}}return r}();let w=0;for(;w<c;){i=A.readInt16(),g=A.readUint8(),A.position++,g>88&&(g=88),t[w++]=i/32768;const e=Math.min(Q,c-w),n=w;for(;w-n<e;)a=A.readUint8(),B=15&a,o=E[16*g+B],g+=s[B],g>88?g=88:g<0&&(g=0),i+=o,i>32767?i=32767:i<-32768&&(i=-32768),t[w++]=i/32768,B=a>>4&15,o=E[16*g+B],g+=s[B],g>88?g=88:g<0&&(g=0),i+=o,i>32767?i=32767:i<-32768&&(i=-32768),t[w++]=i/32768}}}},function(A,e){class t{constructor(A){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?argumenLine truncated
|
||||
// 272d7379976344ea8f1f9149b1a0629d29a38381e41cef1f2040749edba229f3 =^..^=</script>
|
||||
<script>
|
||||
const appElement = document.getElementById('app');
|
||||
const launchScreen = document.getElementById('launch');
|
||||
const loadingScreen = document.getElementById('loading');
|
||||
const loadingInner = document.getElementById('loading-inner');
|
||||
const errorScreen = document.getElementById('error');
|
||||
const errorScreenMessage = document.getElementById('error-message');
|
||||
const errorScreenStack = document.getElementById('error-stack');
|
||||
|
||||
const handleError = (error) => {
|
||||
console.error(error);
|
||||
if (!errorScreen.hidden) return;
|
||||
errorScreen.hidden = false;
|
||||
errorScreenMessage.textContent = '' + error;
|
||||
let debug = error && error.stack || 'no stack';
|
||||
debug += '\nUser agent: ' + navigator.userAgent;
|
||||
errorScreenStack.textContent = debug;
|
||||
};
|
||||
const setProgress = (progress) => {
|
||||
if (loadingInner) loadingInner.style.width = progress * 100 + '%';
|
||||
};
|
||||
const interpolate = (a, b, t) => a + t * (b - a);
|
||||
|
||||
try {
|
||||
setProgress(0.1);
|
||||
|
||||
const scaffolding = new Scaffolding.Scaffolding();
|
||||
scaffolding.width = 480;
|
||||
scaffolding.height = 360;
|
||||
scaffolding.resizeMode = "preserve-ratio";
|
||||
scaffolding.editableLists = false;
|
||||
scaffolding.usePackagedRuntime = true;
|
||||
scaffolding.setup();
|
||||
scaffolding.appendTo(appElement);
|
||||
|
||||
const vm = scaffolding.vm;
|
||||
window.scaffolding = scaffolding;
|
||||
window.vm = scaffolding.vm;
|
||||
window.Scratch = {
|
||||
vm,
|
||||
renderer: vm.renderer,
|
||||
audioEngine: vm.runtime.audioEngine,
|
||||
bitmapAdapter: vm.runtime.v2BitmapAdapter,
|
||||
videoProvider: vm.runtime.ioDevices.video.provider
|
||||
};
|
||||
|
||||
scaffolding.setUsername("player####".replace(/#/g, () => Math.floor(Math.random() * 10)));
|
||||
scaffolding.setAccentColor("#ff4c4c");
|
||||
|
||||
scaffolding.addCloudProvider(new Scaffolding.Cloud.WebSocketProvider(["wss://clouddata.turbowarp.org","wss://clouddata.turbowarp.xyz"], "591855014"));
|
||||
|
||||
vm.setTurboMode(false);
|
||||
if (vm.setInterpolation) vm.setInterpolation(false);
|
||||
if (vm.setFramerate) vm.setFramerate(30);
|
||||
if (vm.renderer.setUseHighQualityRender) vm.renderer.setUseHighQualityRender(false);
|
||||
if (vm.setRuntimeOptions) vm.setRuntimeOptions({
|
||||
fencing: true,
|
||||
miscLimits: true,
|
||||
maxClones: 300,
|
||||
});
|
||||
if (vm.setCompilerOptions) vm.setCompilerOptions({
|
||||
enabled: true,
|
||||
warpTimer: false
|
||||
});
|
||||
if (vm.renderer.setMaxTextureDimension) vm.renderer.setMaxTextureDimension(2048);
|
||||
|
||||
if (typeof ScaffoldingAddons !== 'undefined') {
|
||||
ScaffoldingAddons.run(scaffolding, {"gamepad":false,"pointerlock":false,"specialCloudBehaviors":false,"unsafeCloudBehaviors":false,"pause":false});
|
||||
}
|
||||
|
||||
scaffolding.setExtensionSecurityManager({
|
||||
getSandboxMode: () => 'unsandboxed',
|
||||
canLoadExtensionFromProject: () => true
|
||||
});
|
||||
for (const extension of []) {
|
||||
vm.extensionManager.loadExtensionURL(extension);
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
handleError(e);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="p4-project">dfabjicf,wC_B+4****2****FY__T(kx9r::NcuXrA+*b*DlNwLKzIUF*2OMUm+g@.N(k92,`E{~ch.~O2-fA\,=l/I.?u@1fm17yk@/6Q3^gV?VI3N2Eze||4avZxj-J_cNmDMTb6`pQnEu:8Vdl),F=t|;l=gn]y^pIXlWwgIo@@Ay5r\X,E^De,m,G,v8)tfp`e85vqM\hYQDf;Bt5=n,VtM=T[^pZ\A|5wP+z5b*KVfdqO9HKL]UtNe^=1Y8?DIb/VIq+lL7C,~xL:R=:vv;D[.npmtQs{G11KC0_*1McX+z:*JW.~2zqZ7sdSvN}\irf@aIC~^j|g,X^GbpxA:pfW}`1v^h?4*1RVzr9?rLUeH7F=TVmm@O@Ndo@KyvH:uEbAM?AH8{ma0g0?=K|i+gj\9KRP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fc?N8sD4=?pBA1.fCUQeCVj=AxL)3.|k6v^rY@NvapTnw=w3Q+EJ)Jx5M,u^lgEU@gWs{38HfcT/n;_d.GSOqGzF1X6]O^q(bB.?AAncmm7?@l-n__jMKqR62W/FBDUrt?QR/N.Y}k:it,2?.rAQr]xaRP5dVBg2QESa(wx`271BM]A_hGQ}=bF)4t~0ujiEXbPldzeZL=]I~,;iO|[cDp,q`{P7w4T3hO@mWK+S~`\/oud}YpR0c80vtDO2.CMP4Y138PZkU2K@d5FYgmGEQemLS:jiH7PT^~U\)6xTE1H\Bi^3kTrHg7:F*ulD1ryIe9hpZ}GKW7x1nsrzu/do^,=,2~Ej2uY|LHp_\hI;g?RkuX2DJbAGbDf^{p_:4)~xIM_8u\XLkcKxsPDXOF+tEE(qNq.aJo*ZJZMd3X}1L+YpM_L(rlSJLine truncated
|
||||
<script>
|
||||
const getProjectData = (function() {
|
||||
const storage = scaffolding.storage;
|
||||
storage.onprogress = (total, loaded) => {
|
||||
setProgress(interpolate(0.75, 0.98, loaded / total));
|
||||
};
|
||||
|
||||
let zip;
|
||||
// Allow zip to be GC'd after project loads
|
||||
vm.runtime.on('PROJECT_LOADED', () => (zip = null));
|
||||
const findFileInZip = (path) => zip.file(path) || zip.file(new RegExp("^([^/]*/)?" + path + "$"))[0];
|
||||
storage.addHelper({
|
||||
load: (assetType, assetId, dataFormat) => {
|
||||
if (!zip) {
|
||||
throw new Error('Zip is not loaded or has been closed');
|
||||
}
|
||||
const path = assetId + '.' + dataFormat;
|
||||
const file = findFileInZip(path);
|
||||
if (!file) {
|
||||
throw new Error('Asset is not in zip: ' + path)
|
||||
}
|
||||
return file
|
||||
.async('uint8array')
|
||||
.then((data) => storage.createAsset(assetType, dataFormat, data, assetId));
|
||||
}
|
||||
});
|
||||
return () => (async () => {
|
||||
const base85decode = e=>{const t=e=>(40===e&&(e=60),41===e&&(e=62),e-42),n=e.indexOf(","),c=+e.substring(0,n).split("").map(e=>String.fromCharCode(e.charCodeAt(0)-49)).join(""),o=new ArrayBuffer((s=c)%4==0?s:s+(4-s%4));var s;const i=new Uint32Array(o);for(let c=n+1,o=0;c<e.length;c+=5,o++)i[o]=85*t(e.charCodeAt(c+4))*85*85*85+85*t(e.charCodeAt(c+3))*85*85+85*t(e.charCodeAt(c+2))*85+85*t(e.charCodeAt(c+1))+t(e.charCodeAt(c));return new Uint8Array(o,0,c)};
|
||||
const dataElements = Array.from(document.querySelectorAll('script[type="p4-project"]'));
|
||||
const result = base85decode(dataElements.map(i => i.textContent).join(''));
|
||||
dataElements.forEach(i => i.remove());
|
||||
return result;
|
||||
})().then(async (data) => {
|
||||
zip = await Scaffolding.JSZip.loadAsync(data);
|
||||
const file = findFileInZip('project.json');
|
||||
if (!file) {
|
||||
throw new Error('project.json is not in zip');
|
||||
}
|
||||
return file.async('arraybuffer');
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
<script>
|
||||
const run = async () => {
|
||||
const projectData = await getProjectData();
|
||||
await scaffolding.loadProject(projectData);
|
||||
setProgress(1);
|
||||
loadingScreen.hidden = true;
|
||||
if (false) {
|
||||
scaffolding.start();
|
||||
} else {
|
||||
launchScreen.hidden = false;
|
||||
launchScreen.addEventListener('click', () => {
|
||||
launchScreen.hidden = true;
|
||||
scaffolding.start();
|
||||
});
|
||||
launchScreen.focus();
|
||||
}
|
||||
};
|
||||
run().catch(handleError);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -25,6 +25,7 @@
|
||||
<a href="/games/Super Scratch Bros Beta 4 (2).html">Super Scratch Bros Beta 4</a>
|
||||
<a href="/games/Super Tower Tumble.html">Super Tower Tumble</a>
|
||||
<a href="/games/Super Mario Scratchy World v0.1.html">Super Mario Scratchy World v0.1</a>
|
||||
<a href="/games/The Shadow Reform.html">The Shadow Reform</a>
|
||||
|
||||
<p></p>
|
||||
<a href="https://hideip.network/aHR0cHM6Ly9naXRodWIuY29tL2hpZGVpcG5ldHdvcms=/hvtrs8%2F-gcmgs%2Ccpaxyeaoeq.aoo%2Fgn%5DUQ%2Fqtkcimcn%2Fpcriowr%2F3-ildgx%2Chvmn">parkor game</a>
|
||||
|
||||
Reference in new issue
Block a user